create-cloudflare 2.71.0 → 2.72.0

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
@@ -1079,7 +1079,7 @@ var require_tree = __commonJS({
1079
1079
  var require_util = __commonJS({
1080
1080
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/core/util.js"(exports2, module2) {
1081
1081
  "use strict";
1082
- var assert8 = require("node:assert");
1082
+ var assert9 = require("node:assert");
1083
1083
  var { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols();
1084
1084
  var { IncomingMessage } = require("node:http");
1085
1085
  var stream = require("node:stream");
@@ -1097,7 +1097,7 @@ var require_util = __commonJS({
1097
1097
  this[kBodyUsed] = false;
1098
1098
  }
1099
1099
  async *[Symbol.asyncIterator]() {
1100
- assert8(!this[kBodyUsed], "disturbed");
1100
+ assert9(!this[kBodyUsed], "disturbed");
1101
1101
  this[kBodyUsed] = true;
1102
1102
  yield* this[kBody];
1103
1103
  }
@@ -1108,7 +1108,7 @@ var require_util = __commonJS({
1108
1108
  if (isStream(body)) {
1109
1109
  if (bodyLength(body) === 0) {
1110
1110
  body.on("data", function() {
1111
- assert8(false);
1111
+ assert9(false);
1112
1112
  });
1113
1113
  }
1114
1114
  if (typeof body.readableDidRead !== "boolean") {
@@ -1219,7 +1219,7 @@ var require_util = __commonJS({
1219
1219
  function getHostname(host) {
1220
1220
  if (host[0] === "[") {
1221
1221
  const idx2 = host.indexOf("]");
1222
- assert8(idx2 !== -1);
1222
+ assert9(idx2 !== -1);
1223
1223
  return host.substring(1, idx2);
1224
1224
  }
1225
1225
  const idx = host.indexOf(":");
@@ -1230,7 +1230,7 @@ var require_util = __commonJS({
1230
1230
  if (!host) {
1231
1231
  return null;
1232
1232
  }
1233
- assert8(typeof host === "string");
1233
+ assert9(typeof host === "string");
1234
1234
  const servername = getHostname(host);
1235
1235
  if (net.isIP(servername)) {
1236
1236
  return "";
@@ -1761,7 +1761,7 @@ var require_util = __commonJS({
1761
1761
  function errorRequest(client, request2, err) {
1762
1762
  try {
1763
1763
  request2.onError(err);
1764
- assert8(request2.aborted);
1764
+ assert9(request2.aborted);
1765
1765
  } catch (err2) {
1766
1766
  client.emit("error", err2);
1767
1767
  }
@@ -2155,7 +2155,7 @@ var require_request = __commonJS({
2155
2155
  InvalidArgumentError,
2156
2156
  NotSupportedError
2157
2157
  } = require_errors();
2158
- var assert8 = require("node:assert");
2158
+ var assert9 = require("node:assert");
2159
2159
  var {
2160
2160
  isValidHTTPToken,
2161
2161
  isValidHeaderValue,
@@ -2353,8 +2353,8 @@ var require_request = __commonJS({
2353
2353
  }
2354
2354
  }
2355
2355
  onConnect(abort) {
2356
- assert8(!this.aborted);
2357
- assert8(!this.completed);
2356
+ assert9(!this.aborted);
2357
+ assert9(!this.completed);
2358
2358
  if (this.error) {
2359
2359
  abort(this.error);
2360
2360
  } else {
@@ -2366,8 +2366,8 @@ var require_request = __commonJS({
2366
2366
  return this[kHandler].onResponseStarted?.();
2367
2367
  }
2368
2368
  onHeaders(statusCode, headers, resume, statusText) {
2369
- assert8(!this.aborted);
2370
- assert8(!this.completed);
2369
+ assert9(!this.aborted);
2370
+ assert9(!this.completed);
2371
2371
  if (channels.headers.hasSubscribers) {
2372
2372
  channels.headers.publish({ request: this, response: { statusCode, headers, statusText } });
2373
2373
  }
@@ -2378,8 +2378,8 @@ var require_request = __commonJS({
2378
2378
  }
2379
2379
  }
2380
2380
  onData(chunk) {
2381
- assert8(!this.aborted);
2382
- assert8(!this.completed);
2381
+ assert9(!this.aborted);
2382
+ assert9(!this.completed);
2383
2383
  if (channels.bodyChunkReceived.hasSubscribers) {
2384
2384
  channels.bodyChunkReceived.publish({ request: this, chunk });
2385
2385
  }
@@ -2391,14 +2391,14 @@ var require_request = __commonJS({
2391
2391
  }
2392
2392
  }
2393
2393
  onUpgrade(statusCode, headers, socket) {
2394
- assert8(!this.aborted);
2395
- assert8(!this.completed);
2394
+ assert9(!this.aborted);
2395
+ assert9(!this.completed);
2396
2396
  return this[kHandler].onUpgrade(statusCode, headers, socket);
2397
2397
  }
2398
2398
  onComplete(trailers) {
2399
2399
  this.onFinally();
2400
- assert8(!this.aborted);
2401
- assert8(!this.completed);
2400
+ assert9(!this.aborted);
2401
+ assert9(!this.completed);
2402
2402
  this.completed = true;
2403
2403
  if (channels.trailers.hasSubscribers) {
2404
2404
  channels.trailers.publish({ request: this, trailers });
@@ -2896,7 +2896,7 @@ var require_connect = __commonJS({
2896
2896
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/core/connect.js"(exports2, module2) {
2897
2897
  "use strict";
2898
2898
  var net = require("node:net");
2899
- var assert8 = require("node:assert");
2899
+ var assert9 = require("node:assert");
2900
2900
  var util2 = require_util();
2901
2901
  var { InvalidArgumentError } = require_errors();
2902
2902
  var tls;
@@ -2956,7 +2956,7 @@ var require_connect = __commonJS({
2956
2956
  }
2957
2957
  servername = servername || options.servername || util2.getServerName(host) || null;
2958
2958
  const sessionKey = servername || hostname3;
2959
- assert8(sessionKey);
2959
+ assert9(sessionKey);
2960
2960
  const session = customSession || sessionCache.get(sessionKey) || null;
2961
2961
  port = port || 443;
2962
2962
  socket = tls.connect({
@@ -2976,7 +2976,7 @@ var require_connect = __commonJS({
2976
2976
  sessionCache.set(sessionKey, session2);
2977
2977
  });
2978
2978
  } else {
2979
- assert8(!httpSocket, "httpSocket can only be sent on TLS update");
2979
+ assert9(!httpSocket, "httpSocket can only be sent on TLS update");
2980
2980
  port = port || 80;
2981
2981
  socket = net.connect({
2982
2982
  highWaterMark: 64 * 1024,
@@ -3971,7 +3971,7 @@ var require_encoding = __commonJS({
3971
3971
  var require_infra = __commonJS({
3972
3972
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/web/infra/index.js"(exports2, module2) {
3973
3973
  "use strict";
3974
- var assert8 = require("node:assert");
3974
+ var assert9 = require("node:assert");
3975
3975
  var { utf8DecodeBytes } = require_encoding();
3976
3976
  function collectASequenceOfCodePoints(condition, input, position) {
3977
3977
  let result = "";
@@ -4037,7 +4037,7 @@ var require_infra = __commonJS({
4037
4037
  }
4038
4038
  var invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/;
4039
4039
  function isomorphicEncode(input) {
4040
- assert8(!invalidIsomorphicEncodeValueRegex.test(input));
4040
+ assert9(!invalidIsomorphicEncodeValueRegex.test(input));
4041
4041
  return input;
4042
4042
  }
4043
4043
  function parseJSONFromBytes(bytes) {
@@ -4062,7 +4062,7 @@ var require_infra = __commonJS({
4062
4062
  if (result === void 0) {
4063
4063
  throw new TypeError("Value is not JSON serializable");
4064
4064
  }
4065
- assert8(typeof result === "string");
4065
+ assert9(typeof result === "string");
4066
4066
  return result;
4067
4067
  }
4068
4068
  module2.exports = {
@@ -4084,14 +4084,14 @@ var require_infra = __commonJS({
4084
4084
  var require_data_url = __commonJS({
4085
4085
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/web/fetch/data-url.js"(exports2, module2) {
4086
4086
  "use strict";
4087
- var assert8 = require("node:assert");
4087
+ var assert9 = require("node:assert");
4088
4088
  var { forgivingBase64, collectASequenceOfCodePoints, collectASequenceOfCodePointsFast, isomorphicDecode, removeASCIIWhitespace, removeChars } = require_infra();
4089
4089
  var encoder = new TextEncoder();
4090
4090
  var HTTP_TOKEN_CODEPOINTS = /^[-!#$%&'*+.^_|~A-Za-z0-9]+$/u;
4091
4091
  var HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/u;
4092
4092
  var HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/u;
4093
4093
  function dataURLProcessor(dataURL) {
4094
- assert8(dataURL.protocol === "data:");
4094
+ assert9(dataURL.protocol === "data:");
4095
4095
  let input = URLSerializer(dataURL, true);
4096
4096
  input = input.slice(5);
4097
4097
  const position = { position: 0 };
@@ -4256,7 +4256,7 @@ var require_data_url = __commonJS({
4256
4256
  function collectAnHTTPQuotedString(input, position, extractValue3 = false) {
4257
4257
  const positionStart = position.position;
4258
4258
  let value = "";
4259
- assert8(input[position.position] === '"');
4259
+ assert9(input[position.position] === '"');
4260
4260
  position.position++;
4261
4261
  while (true) {
4262
4262
  value += collectASequenceOfCodePoints(
@@ -4277,7 +4277,7 @@ var require_data_url = __commonJS({
4277
4277
  value += input[position.position];
4278
4278
  position.position++;
4279
4279
  } else {
4280
- assert8(quoteOrBackslash === '"');
4280
+ assert9(quoteOrBackslash === '"');
4281
4281
  break;
4282
4282
  }
4283
4283
  }
@@ -4287,7 +4287,7 @@ var require_data_url = __commonJS({
4287
4287
  return input.slice(positionStart, position.position);
4288
4288
  }
4289
4289
  function serializeAMimeType(mimeType) {
4290
- assert8(mimeType !== "failure");
4290
+ assert9(mimeType !== "failure");
4291
4291
  const { parameters, essence } = mimeType;
4292
4292
  let serialization = essence;
4293
4293
  for (let [name3, value] of parameters.entries()) {
@@ -4465,7 +4465,7 @@ var require_runtime_features = __commonJS({
4465
4465
  var require_webidl = __commonJS({
4466
4466
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/web/webidl/index.js"(exports2, module2) {
4467
4467
  "use strict";
4468
- var assert8 = require("node:assert");
4468
+ var assert9 = require("node:assert");
4469
4469
  var { types: types11, inspect: inspect2 } = require("node:util");
4470
4470
  var { runtimeFeatures } = require_runtime_features();
4471
4471
  var UNDEFINED = 1;
@@ -4821,7 +4821,7 @@ var require_webidl = __commonJS({
4821
4821
  offset = jsBufferSource.byteOffset;
4822
4822
  length = jsBufferSource.byteLength;
4823
4823
  } else {
4824
- assert8(types11.isAnyArrayBuffer(jsBufferSource));
4824
+ assert9(types11.isAnyArrayBuffer(jsBufferSource));
4825
4825
  length = jsBufferSource.byteLength;
4826
4826
  }
4827
4827
  if (jsArrayBuffer.detached) {
@@ -5074,7 +5074,7 @@ var require_util2 = __commonJS({
5074
5074
  var { collectAnHTTPQuotedString, parseMIMEType } = require_data_url();
5075
5075
  var { performance: performance2 } = require("node:perf_hooks");
5076
5076
  var { ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util();
5077
- var assert8 = require("node:assert");
5077
+ var assert9 = require("node:assert");
5078
5078
  var { isUint8Array } = require("node:util/types");
5079
5079
  var { webidl } = require_webidl();
5080
5080
  var { isomorphicEncode, collectASequenceOfCodePoints, removeChars } = require_infra();
@@ -5256,7 +5256,7 @@ var require_util2 = __commonJS({
5256
5256
  }
5257
5257
  function determineRequestsReferrer(request2) {
5258
5258
  const policy = request2.referrerPolicy;
5259
- assert8(policy);
5259
+ assert9(policy);
5260
5260
  let referrerSource = null;
5261
5261
  if (request2.referrer === "client") {
5262
5262
  const globalOrigin = getGlobalOrigin();
@@ -5319,7 +5319,7 @@ var require_util2 = __commonJS({
5319
5319
  }
5320
5320
  }
5321
5321
  function stripURLForReferrer(url2, originOnly = false) {
5322
- assert8(webidl.is.URL(url2));
5322
+ assert9(webidl.is.URL(url2));
5323
5323
  url2 = new URL(url2);
5324
5324
  if (urlIsLocal(url2)) {
5325
5325
  return "no-referrer";
@@ -5566,7 +5566,7 @@ var require_util2 = __commonJS({
5566
5566
  }
5567
5567
  }
5568
5568
  function urlIsLocal(url2) {
5569
- assert8("protocol" in url2);
5569
+ assert9("protocol" in url2);
5570
5570
  const protocol = url2.protocol;
5571
5571
  return protocol === "about:" || protocol === "blob:" || protocol === "data:";
5572
5572
  }
@@ -5574,7 +5574,7 @@ var require_util2 = __commonJS({
5574
5574
  return typeof url2 === "string" && url2[5] === ":" && url2[0] === "h" && url2[1] === "t" && url2[2] === "t" && url2[3] === "p" && url2[4] === "s" || url2.protocol === "https:";
5575
5575
  }
5576
5576
  function urlIsHttpHttpsScheme(url2) {
5577
- assert8("protocol" in url2);
5577
+ assert9("protocol" in url2);
5578
5578
  const protocol = url2.protocol;
5579
5579
  return protocol === "http:" || protocol === "https:";
5580
5580
  }
@@ -5739,7 +5739,7 @@ var require_util2 = __commonJS({
5739
5739
  continue;
5740
5740
  }
5741
5741
  } else {
5742
- assert8(input.charCodeAt(position.position) === 44);
5742
+ assert9(input.charCodeAt(position.position) === 44);
5743
5743
  position.position++;
5744
5744
  }
5745
5745
  }
@@ -6000,7 +6000,7 @@ var require_formdata_parser = __commonJS({
6000
6000
  var { HTTP_TOKEN_CODEPOINTS } = require_data_url();
6001
6001
  var { makeEntry } = require_formdata();
6002
6002
  var { webidl } = require_webidl();
6003
- var assert8 = require("node:assert");
6003
+ var assert9 = require("node:assert");
6004
6004
  var { isomorphicDecode } = require_infra();
6005
6005
  var dd = Buffer.from("--");
6006
6006
  var decoder = new TextDecoder();
@@ -6027,7 +6027,7 @@ var require_formdata_parser = __commonJS({
6027
6027
  return true;
6028
6028
  }
6029
6029
  function multipartFormDataParser(input, mimeType) {
6030
- assert8(mimeType !== "failure" && mimeType.essence === "multipart/form-data");
6030
+ assert9(mimeType !== "failure" && mimeType.essence === "multipart/form-data");
6031
6031
  const boundaryString = mimeType.parameters.get("boundary");
6032
6032
  if (boundaryString === void 0) {
6033
6033
  throw parsingError("missing boundary in content-type header");
@@ -6083,8 +6083,8 @@ var require_formdata_parser = __commonJS({
6083
6083
  } else {
6084
6084
  value = decoderIgnoreBOM.decode(Buffer.from(body));
6085
6085
  }
6086
- assert8(webidl.is.USVString(name3));
6087
- assert8(typeof value === "string" && webidl.is.USVString(value) || webidl.is.File(value));
6086
+ assert9(webidl.is.USVString(name3));
6087
+ assert9(typeof value === "string" && webidl.is.USVString(value) || webidl.is.File(value));
6088
6088
  entryList.push(makeEntry(name3, value, filename));
6089
6089
  }
6090
6090
  }
@@ -6354,7 +6354,7 @@ var require_body = __commonJS({
6354
6354
  } = require_util2();
6355
6355
  var { FormData: FormData2, setFormDataState } = require_formdata();
6356
6356
  var { webidl } = require_webidl();
6357
- var assert8 = require("node:assert");
6357
+ var assert9 = require("node:assert");
6358
6358
  var { isErrored, isDisturbed } = require("node:stream");
6359
6359
  var { isUint8Array } = require("node:util/types");
6360
6360
  var { serializeAMimeType } = require_data_url();
@@ -6392,7 +6392,7 @@ var require_body = __commonJS({
6392
6392
  type: "bytes"
6393
6393
  });
6394
6394
  }
6395
- assert8(webidl.is.ReadableStream(stream));
6395
+ assert9(webidl.is.ReadableStream(stream));
6396
6396
  let action = null;
6397
6397
  let source = null;
6398
6398
  let length = null;
@@ -6500,8 +6500,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r
6500
6500
  }
6501
6501
  function safelyExtractBody(object2, keepalive = false) {
6502
6502
  if (webidl.is.ReadableStream(object2)) {
6503
- assert8(!util2.isDisturbed(object2), "The body has already been consumed.");
6504
- assert8(!object2.locked, "The stream is locked.");
6503
+ assert9(!util2.isDisturbed(object2), "The body has already been consumed.");
6504
+ assert9(!object2.locked, "The stream is locked.");
6505
6505
  }
6506
6506
  return extractBody(object2, keepalive);
6507
6507
  }
@@ -6628,7 +6628,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r
6628
6628
  var require_client_h1 = __commonJS({
6629
6629
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/dispatcher/client-h1.js"(exports2, module2) {
6630
6630
  "use strict";
6631
- var assert8 = require("node:assert");
6631
+ var assert9 = require("node:assert");
6632
6632
  var util2 = require_util();
6633
6633
  var { channels } = require_diagnostics();
6634
6634
  var timers = require_timers();
@@ -6723,7 +6723,7 @@ var require_client_h1 = __commonJS({
6723
6723
  * @returns {number}
6724
6724
  */
6725
6725
  wasm_on_status: (p2, at2, len) => {
6726
- assert8(currentParser.ptr === p2);
6726
+ assert9(currentParser.ptr === p2);
6727
6727
  const start = at2 - currentBufferPtr + currentBufferRef.byteOffset;
6728
6728
  return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len));
6729
6729
  },
@@ -6732,7 +6732,7 @@ var require_client_h1 = __commonJS({
6732
6732
  * @returns {number}
6733
6733
  */
6734
6734
  wasm_on_message_begin: (p2) => {
6735
- assert8(currentParser.ptr === p2);
6735
+ assert9(currentParser.ptr === p2);
6736
6736
  return currentParser.onMessageBegin();
6737
6737
  },
6738
6738
  /**
@@ -6742,7 +6742,7 @@ var require_client_h1 = __commonJS({
6742
6742
  * @returns {number}
6743
6743
  */
6744
6744
  wasm_on_header_field: (p2, at2, len) => {
6745
- assert8(currentParser.ptr === p2);
6745
+ assert9(currentParser.ptr === p2);
6746
6746
  const start = at2 - currentBufferPtr + currentBufferRef.byteOffset;
6747
6747
  return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len));
6748
6748
  },
@@ -6753,7 +6753,7 @@ var require_client_h1 = __commonJS({
6753
6753
  * @returns {number}
6754
6754
  */
6755
6755
  wasm_on_header_value: (p2, at2, len) => {
6756
- assert8(currentParser.ptr === p2);
6756
+ assert9(currentParser.ptr === p2);
6757
6757
  const start = at2 - currentBufferPtr + currentBufferRef.byteOffset;
6758
6758
  return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len));
6759
6759
  },
@@ -6765,7 +6765,7 @@ var require_client_h1 = __commonJS({
6765
6765
  * @returns {number}
6766
6766
  */
6767
6767
  wasm_on_headers_complete: (p2, statusCode, upgrade, shouldKeepAlive) => {
6768
- assert8(currentParser.ptr === p2);
6768
+ assert9(currentParser.ptr === p2);
6769
6769
  return currentParser.onHeadersComplete(statusCode, upgrade === 1, shouldKeepAlive === 1);
6770
6770
  },
6771
6771
  /**
@@ -6775,7 +6775,7 @@ var require_client_h1 = __commonJS({
6775
6775
  * @returns {number}
6776
6776
  */
6777
6777
  wasm_on_body: (p2, at2, len) => {
6778
- assert8(currentParser.ptr === p2);
6778
+ assert9(currentParser.ptr === p2);
6779
6779
  const start = at2 - currentBufferPtr + currentBufferRef.byteOffset;
6780
6780
  return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len));
6781
6781
  },
@@ -6784,7 +6784,7 @@ var require_client_h1 = __commonJS({
6784
6784
  * @returns {number}
6785
6785
  */
6786
6786
  wasm_on_message_complete: (p2) => {
6787
- assert8(currentParser.ptr === p2);
6787
+ assert9(currentParser.ptr === p2);
6788
6788
  return currentParser.onMessageComplete();
6789
6789
  }
6790
6790
  }
@@ -6856,10 +6856,10 @@ var require_client_h1 = __commonJS({
6856
6856
  if (this.socket.destroyed || !this.paused) {
6857
6857
  return;
6858
6858
  }
6859
- assert8(this.ptr != null);
6860
- assert8(currentParser === null);
6859
+ assert9(this.ptr != null);
6860
+ assert9(currentParser === null);
6861
6861
  this.llhttp.llhttp_resume(this.ptr);
6862
- assert8(this.timeoutType === TIMEOUT_BODY);
6862
+ assert9(this.timeoutType === TIMEOUT_BODY);
6863
6863
  if (this.timeout) {
6864
6864
  if (this.timeout.refresh) {
6865
6865
  this.timeout.refresh();
@@ -6882,9 +6882,9 @@ var require_client_h1 = __commonJS({
6882
6882
  * @param {Buffer} chunk
6883
6883
  */
6884
6884
  execute(chunk) {
6885
- assert8(currentParser === null);
6886
- assert8(this.ptr != null);
6887
- assert8(!this.paused);
6885
+ assert9(currentParser === null);
6886
+ assert9(this.ptr != null);
6887
+ assert9(!this.paused);
6888
6888
  const { socket, llhttp } = this;
6889
6889
  if (chunk.length > currentBufferSize) {
6890
6890
  if (currentBufferPtr) {
@@ -6920,9 +6920,9 @@ var require_client_h1 = __commonJS({
6920
6920
  }
6921
6921
  }
6922
6922
  finish() {
6923
- assert8(currentParser === null);
6924
- assert8(this.ptr != null);
6925
- assert8(!this.paused);
6923
+ assert9(currentParser === null);
6924
+ assert9(this.ptr != null);
6925
+ assert9(!this.paused);
6926
6926
  const { llhttp } = this;
6927
6927
  let ret;
6928
6928
  try {
@@ -6954,8 +6954,8 @@ var require_client_h1 = __commonJS({
6954
6954
  return new HTTPParserError(message, constants3.ERROR[ret], data);
6955
6955
  }
6956
6956
  destroy() {
6957
- assert8(currentParser === null);
6958
- assert8(this.ptr != null);
6957
+ assert9(currentParser === null);
6958
+ assert9(this.ptr != null);
6959
6959
  this.llhttp.llhttp_free(this.ptr);
6960
6960
  this.ptr = null;
6961
6961
  this.timeout && timers.clearTimeout(this.timeout);
@@ -7045,14 +7045,14 @@ var require_client_h1 = __commonJS({
7045
7045
  */
7046
7046
  onUpgrade(head) {
7047
7047
  const { upgrade, client, socket, headers, statusCode } = this;
7048
- assert8(upgrade);
7049
- assert8(client[kSocket] === socket);
7050
- assert8(!socket.destroyed);
7051
- assert8(!this.paused);
7052
- assert8((headers.length & 1) === 0);
7048
+ assert9(upgrade);
7049
+ assert9(client[kSocket] === socket);
7050
+ assert9(!socket.destroyed);
7051
+ assert9(!this.paused);
7052
+ assert9((headers.length & 1) === 0);
7053
7053
  const request2 = client[kQueue][client[kRunningIdx]];
7054
- assert8(request2);
7055
- assert8(request2.upgrade || request2.method === "CONNECT");
7054
+ assert9(request2);
7055
+ assert9(request2.upgrade || request2.method === "CONNECT");
7056
7056
  this.statusCode = 0;
7057
7057
  this.statusText = "";
7058
7058
  this.shouldKeepAlive = false;
@@ -7094,8 +7094,8 @@ var require_client_h1 = __commonJS({
7094
7094
  if (!request2) {
7095
7095
  return -1;
7096
7096
  }
7097
- assert8(!this.upgrade);
7098
- assert8(this.statusCode < 200);
7097
+ assert9(!this.upgrade);
7098
+ assert9(this.statusCode < 200);
7099
7099
  if (statusCode === 100) {
7100
7100
  util2.destroy(socket, new SocketError("bad response", util2.getSocketInfo(socket)));
7101
7101
  return -1;
@@ -7104,7 +7104,7 @@ var require_client_h1 = __commonJS({
7104
7104
  util2.destroy(socket, new SocketError("bad upgrade", util2.getSocketInfo(socket)));
7105
7105
  return -1;
7106
7106
  }
7107
- assert8(this.timeoutType === TIMEOUT_HEADERS);
7107
+ assert9(this.timeoutType === TIMEOUT_HEADERS);
7108
7108
  this.statusCode = statusCode;
7109
7109
  this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD.
7110
7110
  request2.method === "HEAD" && !socket[kReset2] && this.connection.toLowerCase() === "keep-alive";
@@ -7117,16 +7117,16 @@ var require_client_h1 = __commonJS({
7117
7117
  }
7118
7118
  }
7119
7119
  if (request2.method === "CONNECT") {
7120
- assert8(client[kRunning] === 1);
7120
+ assert9(client[kRunning] === 1);
7121
7121
  this.upgrade = true;
7122
7122
  return 2;
7123
7123
  }
7124
7124
  if (upgrade) {
7125
- assert8(client[kRunning] === 1);
7125
+ assert9(client[kRunning] === 1);
7126
7126
  this.upgrade = true;
7127
7127
  return 2;
7128
7128
  }
7129
- assert8((this.headers.length & 1) === 0);
7129
+ assert9((this.headers.length & 1) === 0);
7130
7130
  this.headers = [];
7131
7131
  this.headersSize = 0;
7132
7132
  if (this.shouldKeepAlive && client[kPipelining]) {
@@ -7173,14 +7173,14 @@ var require_client_h1 = __commonJS({
7173
7173
  return -1;
7174
7174
  }
7175
7175
  const request2 = client[kQueue][client[kRunningIdx]];
7176
- assert8(request2);
7177
- assert8(this.timeoutType === TIMEOUT_BODY);
7176
+ assert9(request2);
7177
+ assert9(this.timeoutType === TIMEOUT_BODY);
7178
7178
  if (this.timeout) {
7179
7179
  if (this.timeout.refresh) {
7180
7180
  this.timeout.refresh();
7181
7181
  }
7182
7182
  }
7183
- assert8(statusCode >= 200);
7183
+ assert9(statusCode >= 200);
7184
7184
  if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) {
7185
7185
  util2.destroy(socket, new ResponseExceededMaxSizeError());
7186
7186
  return -1;
@@ -7202,10 +7202,10 @@ var require_client_h1 = __commonJS({
7202
7202
  if (upgrade) {
7203
7203
  return 0;
7204
7204
  }
7205
- assert8(statusCode >= 100);
7206
- assert8((this.headers.length & 1) === 0);
7205
+ assert9(statusCode >= 100);
7206
+ assert9((this.headers.length & 1) === 0);
7207
7207
  const request2 = client[kQueue][client[kRunningIdx]];
7208
- assert8(request2);
7208
+ assert9(request2);
7209
7209
  this.statusCode = 0;
7210
7210
  this.statusText = "";
7211
7211
  this.bytesRead = 0;
@@ -7225,7 +7225,7 @@ var require_client_h1 = __commonJS({
7225
7225
  client[kQueue][client[kRunningIdx]++] = null;
7226
7226
  socket[kSocketUsed] = client[kPending] === 0;
7227
7227
  if (socket[kWriting]) {
7228
- assert8(client[kRunning] === 0);
7228
+ assert9(client[kRunning] === 0);
7229
7229
  util2.destroy(socket, new InformationalError("reset"));
7230
7230
  return constants3.ERROR.PAUSED;
7231
7231
  } else if (!shouldKeepAlive) {
@@ -7250,7 +7250,7 @@ var require_client_h1 = __commonJS({
7250
7250
  const { socket, timeoutType, client, paused } = parser2;
7251
7251
  if (timeoutType === TIMEOUT_HEADERS) {
7252
7252
  if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) {
7253
- assert8(!paused, "cannot be paused while waiting for headers");
7253
+ assert9(!paused, "cannot be paused while waiting for headers");
7254
7254
  util2.destroy(socket, new HeadersTimeoutError());
7255
7255
  }
7256
7256
  } else if (timeoutType === TIMEOUT_BODY) {
@@ -7258,7 +7258,7 @@ var require_client_h1 = __commonJS({
7258
7258
  util2.destroy(socket, new BodyTimeoutError());
7259
7259
  }
7260
7260
  } else if (timeoutType === TIMEOUT_KEEP_ALIVE) {
7261
- assert8(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]);
7261
+ assert9(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]);
7262
7262
  util2.destroy(socket, new InformationalError("socket idle timeout"));
7263
7263
  }
7264
7264
  }
@@ -7338,7 +7338,7 @@ var require_client_h1 = __commonJS({
7338
7338
  };
7339
7339
  }
7340
7340
  function onHttpSocketError(err) {
7341
- assert8(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
7341
+ assert9(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
7342
7342
  const parser2 = this[kParser];
7343
7343
  if (err.code === "ECONNRESET" && parser2.statusCode && !parser2.shouldKeepAlive) {
7344
7344
  const parserErr = parser2.finish();
@@ -7380,7 +7380,7 @@ var require_client_h1 = __commonJS({
7380
7380
  client[kSocket] = null;
7381
7381
  client[kHTTPContext] = null;
7382
7382
  if (client.destroyed) {
7383
- assert8(client[kPending] === 0);
7383
+ assert9(client[kPending] === 0);
7384
7384
  const requests = client[kQueue].splice(client[kRunningIdx]);
7385
7385
  for (let i = 0; i < requests.length; i++) {
7386
7386
  const request2 = requests[i];
@@ -7392,7 +7392,7 @@ var require_client_h1 = __commonJS({
7392
7392
  util2.errorRequest(client, request2, err);
7393
7393
  }
7394
7394
  client[kPendingIdx] = client[kRunningIdx];
7395
- assert8(client[kRunning] === 0);
7395
+ assert9(client[kRunning] === 0);
7396
7396
  client.emit("disconnect", client[kUrl], [client], err);
7397
7397
  client[kResume]();
7398
7398
  }
@@ -7597,12 +7597,12 @@ upgrade: ${upgrade}\r
7597
7597
  } else if (util2.isIterable(body)) {
7598
7598
  writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload);
7599
7599
  } else {
7600
- assert8(false);
7600
+ assert9(false);
7601
7601
  }
7602
7602
  return true;
7603
7603
  }
7604
7604
  function writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
7605
- assert8(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
7605
+ assert9(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
7606
7606
  let finished = false;
7607
7607
  const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header });
7608
7608
  const onData = function(chunk) {
@@ -7639,7 +7639,7 @@ upgrade: ${upgrade}\r
7639
7639
  return;
7640
7640
  }
7641
7641
  finished = true;
7642
- assert8(socket.destroyed || socket[kWriting] && client[kRunning] <= 1);
7642
+ assert9(socket.destroyed || socket[kWriting] && client[kRunning] <= 1);
7643
7643
  socket.off("drain", onDrain).off("error", onFinished);
7644
7644
  body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose);
7645
7645
  if (!err) {
@@ -7678,12 +7678,12 @@ upgrade: ${upgrade}\r
7678
7678
  \r
7679
7679
  `, "latin1");
7680
7680
  } else {
7681
- assert8(contentLength === null, "no body must not have content length");
7681
+ assert9(contentLength === null, "no body must not have content length");
7682
7682
  socket.write(`${header}\r
7683
7683
  `, "latin1");
7684
7684
  }
7685
7685
  } else if (util2.isBuffer(body)) {
7686
- assert8(contentLength === body.byteLength, "buffer body must have content length");
7686
+ assert9(contentLength === body.byteLength, "buffer body must have content length");
7687
7687
  socket.cork();
7688
7688
  socket.write(`${header}content-length: ${contentLength}\r
7689
7689
  \r
@@ -7702,7 +7702,7 @@ upgrade: ${upgrade}\r
7702
7702
  }
7703
7703
  }
7704
7704
  async function writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
7705
- assert8(contentLength === body.size, "blob body must have content length");
7705
+ assert9(contentLength === body.size, "blob body must have content length");
7706
7706
  try {
7707
7707
  if (contentLength != null && contentLength !== body.size) {
7708
7708
  throw new RequestContentLengthMismatchError();
@@ -7725,7 +7725,7 @@ upgrade: ${upgrade}\r
7725
7725
  }
7726
7726
  }
7727
7727
  async function writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
7728
- assert8(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
7728
+ assert9(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
7729
7729
  let callback = null;
7730
7730
  function onDrain() {
7731
7731
  if (callback) {
@@ -7735,7 +7735,7 @@ upgrade: ${upgrade}\r
7735
7735
  }
7736
7736
  }
7737
7737
  const waitForDrain = () => new Promise((resolve15, reject) => {
7738
- assert8(callback === null);
7738
+ assert9(callback === null);
7739
7739
  if (socket[kError]) {
7740
7740
  reject(socket[kError]);
7741
7741
  } else {
@@ -7884,7 +7884,7 @@ ${len.toString(16)}\r
7884
7884
  const { socket, client, abort } = this;
7885
7885
  socket[kWriting] = false;
7886
7886
  if (err) {
7887
- assert8(client[kRunning] <= 1, "pipeline should only contain this request");
7887
+ assert9(client[kRunning] <= 1, "pipeline should only contain this request");
7888
7888
  abort(err);
7889
7889
  }
7890
7890
  }
@@ -7897,7 +7897,7 @@ ${len.toString(16)}\r
7897
7897
  var require_client_h2 = __commonJS({
7898
7898
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/dispatcher/client-h2.js"(exports2, module2) {
7899
7899
  "use strict";
7900
- var assert8 = require("node:assert");
7900
+ var assert9 = require("node:assert");
7901
7901
  var { pipeline } = require("node:stream");
7902
7902
  var util2 = require_util();
7903
7903
  var {
@@ -8116,7 +8116,7 @@ var require_client_h2 = __commonJS({
8116
8116
  }
8117
8117
  }
8118
8118
  function onHttp2SessionError(err) {
8119
- assert8(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
8119
+ assert9(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
8120
8120
  this[kSocket][kError] = err;
8121
8121
  this[kClient][kOnError](err);
8122
8122
  }
@@ -8146,7 +8146,7 @@ var require_client_h2 = __commonJS({
8146
8146
  util2.errorRequest(client, request2, err);
8147
8147
  client[kPendingIdx] = client[kRunningIdx];
8148
8148
  }
8149
- assert8(client[kRunning] === 0);
8149
+ assert9(client[kRunning] === 0);
8150
8150
  client.emit("disconnect", client[kUrl], [client], err);
8151
8151
  client.emit("connectionError", client[kUrl], [client], err);
8152
8152
  client[kResume]();
@@ -8162,7 +8162,7 @@ var require_client_h2 = __commonJS({
8162
8162
  state.ping.interval = null;
8163
8163
  }
8164
8164
  if (client.destroyed) {
8165
- assert8(client[kPending] === 0);
8165
+ assert9(client[kPending] === 0);
8166
8166
  const requests = client[kQueue].splice(client[kRunningIdx]);
8167
8167
  for (let i = 0; i < requests.length; i++) {
8168
8168
  const request2 = requests[i];
@@ -8179,12 +8179,12 @@ var require_client_h2 = __commonJS({
8179
8179
  this[kHTTP2Session].destroy(err);
8180
8180
  }
8181
8181
  client[kPendingIdx] = client[kRunningIdx];
8182
- assert8(client[kRunning] === 0);
8182
+ assert9(client[kRunning] === 0);
8183
8183
  client.emit("disconnect", client[kUrl], [client], err);
8184
8184
  client[kResume]();
8185
8185
  }
8186
8186
  function onHttp2SocketError(err) {
8187
- assert8(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
8187
+ assert9(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
8188
8188
  this[kError] = err;
8189
8189
  this[kClient][kOnError](err);
8190
8190
  }
@@ -8337,7 +8337,7 @@ var require_client_h2 = __commonJS({
8337
8337
  process.emitWarning(new RequestContentLengthMismatchError());
8338
8338
  }
8339
8339
  if (contentLength != null) {
8340
- assert8(body || contentLength === 0, "no body must not have content length");
8340
+ assert9(body || contentLength === 0, "no body must not have content length");
8341
8341
  headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`;
8342
8342
  }
8343
8343
  session.ref();
@@ -8506,14 +8506,14 @@ var require_client_h2 = __commonJS({
8506
8506
  expectsPayload
8507
8507
  );
8508
8508
  } else {
8509
- assert8(false);
8509
+ assert9(false);
8510
8510
  }
8511
8511
  }
8512
8512
  }
8513
8513
  function writeBuffer(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
8514
8514
  try {
8515
8515
  if (body != null && util2.isBuffer(body)) {
8516
- assert8(contentLength === body.byteLength, "buffer body must have content length");
8516
+ assert9(contentLength === body.byteLength, "buffer body must have content length");
8517
8517
  h2stream.cork();
8518
8518
  h2stream.write(body);
8519
8519
  h2stream.uncork();
@@ -8530,7 +8530,7 @@ var require_client_h2 = __commonJS({
8530
8530
  }
8531
8531
  }
8532
8532
  function writeStream(abort, socket, expectsPayload, h2stream, body, client, request2, contentLength) {
8533
- assert8(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
8533
+ assert9(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
8534
8534
  const pipe2 = pipeline(
8535
8535
  body,
8536
8536
  h2stream,
@@ -8554,7 +8554,7 @@ var require_client_h2 = __commonJS({
8554
8554
  }
8555
8555
  }
8556
8556
  async function writeBlob(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
8557
- assert8(contentLength === body.size, "blob body must have content length");
8557
+ assert9(contentLength === body.size, "blob body must have content length");
8558
8558
  try {
8559
8559
  if (contentLength != null && contentLength !== body.size) {
8560
8560
  throw new RequestContentLengthMismatchError();
@@ -8575,7 +8575,7 @@ var require_client_h2 = __commonJS({
8575
8575
  }
8576
8576
  }
8577
8577
  async function writeIterable(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
8578
- assert8(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
8578
+ assert9(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
8579
8579
  let callback = null;
8580
8580
  function onDrain() {
8581
8581
  if (callback) {
@@ -8585,7 +8585,7 @@ var require_client_h2 = __commonJS({
8585
8585
  }
8586
8586
  }
8587
8587
  const waitForDrain = () => new Promise((resolve15, reject) => {
8588
- assert8(callback === null);
8588
+ assert9(callback === null);
8589
8589
  if (socket[kError]) {
8590
8590
  reject(socket[kError]);
8591
8591
  } else {
@@ -8624,7 +8624,7 @@ var require_client_h2 = __commonJS({
8624
8624
  var require_client = __commonJS({
8625
8625
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/dispatcher/client.js"(exports2, module2) {
8626
8626
  "use strict";
8627
- var assert8 = require("node:assert");
8627
+ var assert9 = require("node:assert");
8628
8628
  var net = require("node:net");
8629
8629
  var http = require("node:http");
8630
8630
  var util2 = require_util();
@@ -8939,24 +8939,24 @@ var require_client = __commonJS({
8939
8939
  };
8940
8940
  function onError(client, err) {
8941
8941
  if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") {
8942
- assert8(client[kPendingIdx] === client[kRunningIdx]);
8942
+ assert9(client[kPendingIdx] === client[kRunningIdx]);
8943
8943
  const requests = client[kQueue].splice(client[kRunningIdx]);
8944
8944
  for (let i = 0; i < requests.length; i++) {
8945
8945
  const request2 = requests[i];
8946
8946
  util2.errorRequest(client, request2, err);
8947
8947
  }
8948
- assert8(client[kSize] === 0);
8948
+ assert9(client[kSize] === 0);
8949
8949
  }
8950
8950
  }
8951
8951
  function connect(client) {
8952
- assert8(!client[kConnecting]);
8953
- assert8(!client[kHTTPContext]);
8952
+ assert9(!client[kConnecting]);
8953
+ assert9(!client[kHTTPContext]);
8954
8954
  let { host, hostname: hostname3, protocol, port } = client[kUrl];
8955
8955
  if (hostname3[0] === "[") {
8956
8956
  const idx = hostname3.indexOf("]");
8957
- assert8(idx !== -1);
8957
+ assert9(idx !== -1);
8958
8958
  const ip = hostname3.substring(1, idx);
8959
- assert8(net.isIPv6(ip));
8959
+ assert9(net.isIPv6(ip));
8960
8960
  hostname3 = ip;
8961
8961
  }
8962
8962
  client[kConnecting] = true;
@@ -8993,7 +8993,7 @@ var require_client = __commonJS({
8993
8993
  client[kResume]();
8994
8994
  return;
8995
8995
  }
8996
- assert8(socket);
8996
+ assert9(socket);
8997
8997
  try {
8998
8998
  client[kHTTPContext] = socket.alpnProtocol === "h2" ? connectH2(client, socket) : connectH1(client, socket);
8999
8999
  } catch (err2) {
@@ -9051,7 +9051,7 @@ var require_client = __commonJS({
9051
9051
  });
9052
9052
  }
9053
9053
  if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") {
9054
- assert8(client[kRunning] === 0);
9054
+ assert9(client[kRunning] === 0);
9055
9055
  while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) {
9056
9056
  const request2 = client[kQueue][client[kPendingIdx]++];
9057
9057
  util2.errorRequest(client, request2, err);
@@ -9081,7 +9081,7 @@ var require_client = __commonJS({
9081
9081
  function _resume(client, sync) {
9082
9082
  while (true) {
9083
9083
  if (client.destroyed) {
9084
- assert8(client[kPending] === 0);
9084
+ assert9(client[kPending] === 0);
9085
9085
  return;
9086
9086
  }
9087
9087
  if (client[kClosedResolve] && !client[kSize]) {
@@ -10975,7 +10975,7 @@ var require_env_http_proxy_agent = __commonJS({
10975
10975
  var require_retry_handler = __commonJS({
10976
10976
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/handler/retry-handler.js"(exports2, module2) {
10977
10977
  "use strict";
10978
- var assert8 = require("node:assert");
10978
+ var assert9 = require("node:assert");
10979
10979
  var { kRetryHandlerDefaultRetry } = require_symbols();
10980
10980
  var { RequestRetryError } = require_errors();
10981
10981
  var WrapHandler = require_wrap_handler();
@@ -11175,8 +11175,8 @@ var require_retry_handler = __commonJS({
11175
11175
  }
11176
11176
  validatePartialResponseContentLength(headers, contentRange, statusCode, this.retryCount);
11177
11177
  const { start, size, end = size ? size - 1 : null } = contentRange;
11178
- assert8(this.start === start, "content-range mismatch");
11179
- assert8(this.end == null || this.end === end, "content-range mismatch");
11178
+ assert9(this.start === start, "content-range mismatch");
11179
+ assert9(this.end == null || this.end === end, "content-range mismatch");
11180
11180
  return;
11181
11181
  }
11182
11182
  if (this.end == null) {
@@ -11194,11 +11194,11 @@ var require_retry_handler = __commonJS({
11194
11194
  }
11195
11195
  validatePartialResponseContentLength(headers, range, statusCode, this.retryCount);
11196
11196
  const { start, size, end = size ? size - 1 : null } = range;
11197
- assert8(
11197
+ assert9(
11198
11198
  start != null && Number.isFinite(start),
11199
11199
  "content-range mismatch"
11200
11200
  );
11201
- assert8(end != null && Number.isFinite(end), "invalid content-length");
11201
+ assert9(end != null && Number.isFinite(end), "invalid content-length");
11202
11202
  this.start = start;
11203
11203
  this.end = end;
11204
11204
  }
@@ -11206,8 +11206,8 @@ var require_retry_handler = __commonJS({
11206
11206
  const contentLength = headers["content-length"];
11207
11207
  this.end = contentLength != null ? Number(contentLength) - 1 : null;
11208
11208
  }
11209
- assert8(Number.isFinite(this.start));
11210
- assert8(
11209
+ assert9(Number.isFinite(this.start));
11210
+ assert9(
11211
11211
  this.end == null || Number.isFinite(this.end),
11212
11212
  "invalid content-length"
11213
11213
  );
@@ -11381,7 +11381,7 @@ var require_h2c_client = __commonJS({
11381
11381
  var require_readable = __commonJS({
11382
11382
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/api/readable.js"(exports2, module2) {
11383
11383
  "use strict";
11384
- var assert8 = require("node:assert");
11384
+ var assert9 = require("node:assert");
11385
11385
  var { Readable } = require("node:stream");
11386
11386
  var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require_errors();
11387
11387
  var util2 = require_util();
@@ -11575,7 +11575,7 @@ var require_readable = __commonJS({
11575
11575
  this[kBody] = ReadableStreamFrom(this);
11576
11576
  if (this[kConsume]) {
11577
11577
  this[kBody].getReader();
11578
- assert8(this[kBody].locked);
11578
+ assert9(this[kBody].locked);
11579
11579
  }
11580
11580
  }
11581
11581
  return this[kBody];
@@ -11644,7 +11644,7 @@ var require_readable = __commonJS({
11644
11644
  return util2.isDisturbed(bodyReadable) || isLocked(bodyReadable);
11645
11645
  }
11646
11646
  function consume(stream, type) {
11647
- assert8(!stream[kConsume]);
11647
+ assert9(!stream[kConsume]);
11648
11648
  return new Promise((resolve15, reject) => {
11649
11649
  if (isUnusable(stream)) {
11650
11650
  const rState = stream._readableState;
@@ -11783,7 +11783,7 @@ var require_readable = __commonJS({
11783
11783
  var require_api_request = __commonJS({
11784
11784
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/api/api-request.js"(exports2, module2) {
11785
11785
  "use strict";
11786
- var assert8 = require("node:assert");
11786
+ var assert9 = require("node:assert");
11787
11787
  var { AsyncResource } = require("node:async_hooks");
11788
11788
  var { Readable } = require_readable();
11789
11789
  var { InvalidArgumentError, RequestAbortedError } = require_errors();
@@ -11850,7 +11850,7 @@ var require_api_request = __commonJS({
11850
11850
  abort(this.reason);
11851
11851
  return;
11852
11852
  }
11853
- assert8(this.callback);
11853
+ assert9(this.callback);
11854
11854
  this.abort = abort;
11855
11855
  this.context = context;
11856
11856
  }
@@ -12013,7 +12013,7 @@ var require_abort_signal = __commonJS({
12013
12013
  var require_api_stream = __commonJS({
12014
12014
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/api/api-stream.js"(exports2, module2) {
12015
12015
  "use strict";
12016
- var assert8 = require("node:assert");
12016
+ var assert9 = require("node:assert");
12017
12017
  var { finished } = require("node:stream");
12018
12018
  var { AsyncResource } = require("node:async_hooks");
12019
12019
  var { InvalidArgumentError, InvalidReturnValueError } = require_errors();
@@ -12072,7 +12072,7 @@ var require_api_stream = __commonJS({
12072
12072
  abort(this.reason);
12073
12073
  return;
12074
12074
  }
12075
- assert8(this.callback);
12075
+ assert9(this.callback);
12076
12076
  this.abort = abort;
12077
12077
  this.context = context;
12078
12078
  }
@@ -12179,7 +12179,7 @@ var require_api_pipeline = __commonJS({
12179
12179
  Duplex,
12180
12180
  PassThrough
12181
12181
  } = require("node:stream");
12182
- var assert8 = require("node:assert");
12182
+ var assert9 = require("node:assert");
12183
12183
  var { AsyncResource } = require("node:async_hooks");
12184
12184
  var {
12185
12185
  InvalidArgumentError,
@@ -12293,7 +12293,7 @@ var require_api_pipeline = __commonJS({
12293
12293
  abort(this.reason);
12294
12294
  return;
12295
12295
  }
12296
- assert8(!res, "pipeline cannot be retried");
12296
+ assert9(!res, "pipeline cannot be retried");
12297
12297
  this.abort = abort;
12298
12298
  this.context = context;
12299
12299
  }
@@ -12377,7 +12377,7 @@ var require_api_upgrade = __commonJS({
12377
12377
  "use strict";
12378
12378
  var { InvalidArgumentError, SocketError } = require_errors();
12379
12379
  var { AsyncResource } = require("node:async_hooks");
12380
- var assert8 = require("node:assert");
12380
+ var assert9 = require("node:assert");
12381
12381
  var util2 = require_util();
12382
12382
  var { kHTTP2Stream } = require_symbols();
12383
12383
  var { addSignal, removeSignal } = require_abort_signal();
@@ -12406,7 +12406,7 @@ var require_api_upgrade = __commonJS({
12406
12406
  abort(this.reason);
12407
12407
  return;
12408
12408
  }
12409
- assert8(this.callback);
12409
+ assert9(this.callback);
12410
12410
  this.abort = abort;
12411
12411
  this.context = null;
12412
12412
  }
@@ -12414,7 +12414,7 @@ var require_api_upgrade = __commonJS({
12414
12414
  throw new SocketError("bad upgrade", null);
12415
12415
  }
12416
12416
  onUpgrade(statusCode, rawHeaders, socket) {
12417
- assert8(socket[kHTTP2Stream] === true ? statusCode === 200 : statusCode === 101);
12417
+ assert9(socket[kHTTP2Stream] === true ? statusCode === 200 : statusCode === 101);
12418
12418
  const { callback, opaque, context } = this;
12419
12419
  removeSignal(this);
12420
12420
  this.callback = null;
@@ -12469,7 +12469,7 @@ var require_api_upgrade = __commonJS({
12469
12469
  var require_api_connect = __commonJS({
12470
12470
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/api/api-connect.js"(exports2, module2) {
12471
12471
  "use strict";
12472
- var assert8 = require("node:assert");
12472
+ var assert9 = require("node:assert");
12473
12473
  var { AsyncResource } = require("node:async_hooks");
12474
12474
  var { InvalidArgumentError, SocketError } = require_errors();
12475
12475
  var util2 = require_util();
@@ -12498,7 +12498,7 @@ var require_api_connect = __commonJS({
12498
12498
  abort(this.reason);
12499
12499
  return;
12500
12500
  }
12501
- assert8(this.callback);
12501
+ assert9(this.callback);
12502
12502
  this.abort = abort;
12503
12503
  this.context = context;
12504
12504
  }
@@ -14526,7 +14526,7 @@ var require_global2 = __commonJS({
14526
14526
  var require_decorator_handler = __commonJS({
14527
14527
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/handler/decorator-handler.js"(exports2, module2) {
14528
14528
  "use strict";
14529
- var assert8 = require("node:assert");
14529
+ var assert9 = require("node:assert");
14530
14530
  var WrapHandler = require_wrap_handler();
14531
14531
  module2.exports = class DecoratorHandler {
14532
14532
  #handler;
@@ -14543,25 +14543,25 @@ var require_decorator_handler = __commonJS({
14543
14543
  this.#handler.onRequestStart?.(...args);
14544
14544
  }
14545
14545
  onRequestUpgrade(...args) {
14546
- assert8(!this.#onCompleteCalled);
14547
- assert8(!this.#onErrorCalled);
14546
+ assert9(!this.#onCompleteCalled);
14547
+ assert9(!this.#onErrorCalled);
14548
14548
  return this.#handler.onRequestUpgrade?.(...args);
14549
14549
  }
14550
14550
  onResponseStart(...args) {
14551
- assert8(!this.#onCompleteCalled);
14552
- assert8(!this.#onErrorCalled);
14553
- assert8(!this.#onResponseStartCalled);
14551
+ assert9(!this.#onCompleteCalled);
14552
+ assert9(!this.#onErrorCalled);
14553
+ assert9(!this.#onResponseStartCalled);
14554
14554
  this.#onResponseStartCalled = true;
14555
14555
  return this.#handler.onResponseStart?.(...args);
14556
14556
  }
14557
14557
  onResponseData(...args) {
14558
- assert8(!this.#onCompleteCalled);
14559
- assert8(!this.#onErrorCalled);
14558
+ assert9(!this.#onCompleteCalled);
14559
+ assert9(!this.#onErrorCalled);
14560
14560
  return this.#handler.onResponseData?.(...args);
14561
14561
  }
14562
14562
  onResponseEnd(...args) {
14563
- assert8(!this.#onCompleteCalled);
14564
- assert8(!this.#onErrorCalled);
14563
+ assert9(!this.#onCompleteCalled);
14564
+ assert9(!this.#onErrorCalled);
14565
14565
  this.#onCompleteCalled = true;
14566
14566
  return this.#handler.onResponseEnd?.(...args);
14567
14567
  }
@@ -14584,7 +14584,7 @@ var require_redirect_handler = __commonJS({
14584
14584
  "use strict";
14585
14585
  var util2 = require_util();
14586
14586
  var { kBodyUsed } = require_symbols();
14587
- var assert8 = require("node:assert");
14587
+ var assert9 = require("node:assert");
14588
14588
  var { InvalidArgumentError } = require_errors();
14589
14589
  var EE = require("node:events");
14590
14590
  var redirectableStatusCodes = [300, 301, 302, 303, 307, 308];
@@ -14597,7 +14597,7 @@ var require_redirect_handler = __commonJS({
14597
14597
  this[kBodyUsed] = false;
14598
14598
  }
14599
14599
  async *[Symbol.asyncIterator]() {
14600
- assert8(!this[kBodyUsed], "disturbed");
14600
+ assert9(!this[kBodyUsed], "disturbed");
14601
14601
  this[kBodyUsed] = true;
14602
14602
  yield* this[kBody];
14603
14603
  }
@@ -14624,7 +14624,7 @@ var require_redirect_handler = __commonJS({
14624
14624
  if (util2.isStream(this.opts.body)) {
14625
14625
  if (util2.bodyLength(this.opts.body) === 0) {
14626
14626
  this.opts.body.on("data", function() {
14627
- assert8(false);
14627
+ assert9(false);
14628
14628
  });
14629
14629
  }
14630
14630
  if (typeof this.opts.body.readableDidRead !== "boolean") {
@@ -14730,7 +14730,7 @@ var require_redirect_handler = __commonJS({
14730
14730
  }
14731
14731
  }
14732
14732
  } else {
14733
- assert8(headers == null, "headers must be an object or an array");
14733
+ assert9(headers == null, "headers must be an object or an array");
14734
14734
  }
14735
14735
  return ret;
14736
14736
  }
@@ -17104,7 +17104,7 @@ var require_memory_cache_store = __commonJS({
17104
17104
  var require_cache_revalidation_handler = __commonJS({
17105
17105
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/handler/cache-revalidation-handler.js"(exports2, module2) {
17106
17106
  "use strict";
17107
- var assert8 = require("node:assert");
17107
+ var assert9 = require("node:assert");
17108
17108
  var CacheRevalidationHandler = class {
17109
17109
  #successful = false;
17110
17110
  /**
@@ -17141,7 +17141,7 @@ var require_cache_revalidation_handler = __commonJS({
17141
17141
  this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket);
17142
17142
  }
17143
17143
  onResponseStart(controller, statusCode, headers, statusMessage) {
17144
- assert8(this.#callback != null);
17144
+ assert9(this.#callback != null);
17145
17145
  this.#successful = statusCode === 304 || this.#allowErrorStatusCodes && statusCode >= 500 && statusCode <= 504;
17146
17146
  this.#callback(this.#successful, this.#context, statusCode, headers);
17147
17147
  this.#callback = null;
@@ -17191,7 +17191,7 @@ var require_cache_revalidation_handler = __commonJS({
17191
17191
  var require_cache2 = __commonJS({
17192
17192
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/interceptor/cache.js"(exports2, module2) {
17193
17193
  "use strict";
17194
- var assert8 = require("node:assert");
17194
+ var assert9 = require("node:assert");
17195
17195
  var { Readable } = require("node:stream");
17196
17196
  var util2 = require_util();
17197
17197
  var CacheHandler = require_cache_handler();
@@ -17362,8 +17362,8 @@ var require_cache2 = __commonJS({
17362
17362
  }
17363
17363
  function sendCachedValue(handler, opts, result, age, context, isStale2) {
17364
17364
  const stream = util2.isStream(result.body) ? result.body : Readable.from(result.body ?? []);
17365
- assert8(!stream.destroyed, "stream should not be destroyed");
17366
- assert8(!stream.readableDidRead, "stream should not be readableDidRead");
17365
+ assert9(!stream.destroyed, "stream should not be destroyed");
17366
+ assert9(!stream.readableDidRead, "stream should not be readableDidRead");
17367
17367
  const controller = {
17368
17368
  resume() {
17369
17369
  stream.resume();
@@ -18629,7 +18629,7 @@ var require_headers = __commonJS({
18629
18629
  isValidHeaderValue
18630
18630
  } = require_util2();
18631
18631
  var { webidl } = require_webidl();
18632
- var assert8 = require("node:assert");
18632
+ var assert9 = require("node:assert");
18633
18633
  var util2 = require("node:util");
18634
18634
  function isHTTPWhiteSpaceCharCode(code) {
18635
18635
  return code === 10 || code === 13 || code === 9 || code === 32;
@@ -18845,11 +18845,11 @@ var require_headers = __commonJS({
18845
18845
  const iterator = this.headersMap[Symbol.iterator]();
18846
18846
  const firstValue = iterator.next().value;
18847
18847
  array2[0] = [firstValue[0], firstValue[1].value];
18848
- assert8(firstValue[1].value !== null);
18848
+ assert9(firstValue[1].value !== null);
18849
18849
  for (let i = 1, j2 = 0, right2 = 0, left2 = 0, pivot = 0, x, value; i < size; ++i) {
18850
18850
  value = iterator.next().value;
18851
18851
  x = array2[i] = [value[0], value[1].value];
18852
- assert8(x[1] !== null);
18852
+ assert9(x[1] !== null);
18853
18853
  left2 = 0;
18854
18854
  right2 = i;
18855
18855
  while (left2 < right2) {
@@ -18876,7 +18876,7 @@ var require_headers = __commonJS({
18876
18876
  let i = 0;
18877
18877
  for (const { 0: name3, 1: { value } } of this.headersMap) {
18878
18878
  array2[i++] = [name3, value];
18879
- assert8(value !== null);
18879
+ assert9(value !== null);
18880
18880
  }
18881
18881
  return array2.sort(compareHeaderName);
18882
18882
  }
@@ -19101,7 +19101,7 @@ var require_response = __commonJS({
19101
19101
  var { webidl } = require_webidl();
19102
19102
  var { URLSerializer } = require_data_url();
19103
19103
  var { kConstruct } = require_symbols();
19104
- var assert8 = require("node:assert");
19104
+ var assert9 = require("node:assert");
19105
19105
  var { isomorphicEncode, serializeJavascriptValueToJSONString } = require_infra();
19106
19106
  var textEncoder = new TextEncoder("utf-8");
19107
19107
  var Response2 = class _Response {
@@ -19358,7 +19358,7 @@ var require_response = __commonJS({
19358
19358
  return p2 in state ? state[p2] : target[p2];
19359
19359
  },
19360
19360
  set(target, p2, value) {
19361
- assert8(!(p2 in state));
19361
+ assert9(!(p2 in state));
19362
19362
  target[p2] = value;
19363
19363
  return true;
19364
19364
  }
@@ -19392,11 +19392,11 @@ var require_response = __commonJS({
19392
19392
  body: null
19393
19393
  });
19394
19394
  } else {
19395
- assert8(false);
19395
+ assert9(false);
19396
19396
  }
19397
19397
  }
19398
19398
  function makeAppropriateNetworkError(fetchParams, err = null) {
19399
- assert8(isCancelled(fetchParams));
19399
+ assert9(isCancelled(fetchParams));
19400
19400
  return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err }));
19401
19401
  }
19402
19402
  function initializeResponse(response, init2, body) {
@@ -19527,7 +19527,7 @@ var require_request2 = __commonJS({
19527
19527
  var { webidl } = require_webidl();
19528
19528
  var { URLSerializer } = require_data_url();
19529
19529
  var { kConstruct } = require_symbols();
19530
- var assert8 = require("node:assert");
19530
+ var assert9 = require("node:assert");
19531
19531
  var { getMaxListeners, setMaxListeners, defaultMaxListeners } = require("node:events");
19532
19532
  var kAbortController = /* @__PURE__ */ Symbol("abortController");
19533
19533
  var requestFinalizer = new FinalizationRegistry(({ signal, abort }) => {
@@ -19603,7 +19603,7 @@ var require_request2 = __commonJS({
19603
19603
  request2 = makeRequest({ urlList: [parsedURL] });
19604
19604
  fallbackMode = "cors";
19605
19605
  } else {
19606
- assert8(webidl.is.Request(input));
19606
+ assert9(webidl.is.Request(input));
19607
19607
  request2 = input.#state;
19608
19608
  signal = input.#signal;
19609
19609
  this.#dispatcher = init2.dispatcher || input.#dispatcher;
@@ -20260,7 +20260,7 @@ var require_request2 = __commonJS({
20260
20260
  var require_subresource_integrity = __commonJS({
20261
20261
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js"(exports2, module2) {
20262
20262
  "use strict";
20263
- var assert8 = require("node:assert");
20263
+ var assert9 = require("node:assert");
20264
20264
  var { runtimeFeatures } = require_runtime_features();
20265
20265
  var validSRIHashAlgorithmTokenSet = /* @__PURE__ */ new Map([["sha256", 0], ["sha384", 1], ["sha512", 2]]);
20266
20266
  var crypto;
@@ -20308,7 +20308,7 @@ var require_subresource_integrity = __commonJS({
20308
20308
  const result = [];
20309
20309
  let strongest = null;
20310
20310
  for (const item of metadataList) {
20311
- assert8(isValidSRIHashAlgorithm(item.alg), "Invalid SRI hash algorithm token");
20311
+ assert9(isValidSRIHashAlgorithm(item.alg), "Invalid SRI hash algorithm token");
20312
20312
  if (result.length === 0) {
20313
20313
  result.push(item);
20314
20314
  strongest = item;
@@ -20444,7 +20444,7 @@ var require_fetch = __commonJS({
20444
20444
  includesCredentials,
20445
20445
  isTraversableNavigable
20446
20446
  } = require_util2();
20447
- var assert8 = require("node:assert");
20447
+ var assert9 = require("node:assert");
20448
20448
  var { safelyExtractBody, extractBody } = require_body();
20449
20449
  var {
20450
20450
  redirectStatusSet,
@@ -20527,7 +20527,7 @@ var require_fetch = __commonJS({
20527
20527
  requestObject.signal,
20528
20528
  () => {
20529
20529
  locallyAborted = true;
20530
- assert8(controller != null);
20530
+ assert9(controller != null);
20531
20531
  controller.abort(requestObject.signal.reason);
20532
20532
  const realResponse = responseObject?.deref();
20533
20533
  abortFetch(p2, request2, realResponse, requestObject.signal.reason, controller.controller);
@@ -20630,7 +20630,7 @@ var require_fetch = __commonJS({
20630
20630
  requestObject = null
20631
20631
  // Keep alive to prevent AbortController GC, see #4627
20632
20632
  }) {
20633
- assert8(dispatcher);
20633
+ assert9(dispatcher);
20634
20634
  let taskDestination = null;
20635
20635
  let crossOriginIsolatedCapability = false;
20636
20636
  if (request2.client != null) {
@@ -20655,7 +20655,7 @@ var require_fetch = __commonJS({
20655
20655
  // Keep requestObject alive to prevent its AbortController from being GC'd
20656
20656
  requestObject
20657
20657
  };
20658
- assert8(!request2.body || request2.body.stream);
20658
+ assert9(!request2.body || request2.body.stream);
20659
20659
  if (request2.window === "client") {
20660
20660
  request2.window = request2.client?.globalObject?.constructor?.name === "Window" ? request2.client : "no-window";
20661
20661
  }
@@ -20744,7 +20744,7 @@ var require_fetch = __commonJS({
20744
20744
  } else if (request2.responseTainting === "opaque") {
20745
20745
  response = filterResponse(response, "opaque");
20746
20746
  } else {
20747
- assert8(false);
20747
+ assert9(false);
20748
20748
  }
20749
20749
  }
20750
20750
  let internalResponse = response.status === 0 ? response : response.internalResponse;
@@ -20974,7 +20974,7 @@ var require_fetch = __commonJS({
20974
20974
  } else if (request2.redirect === "follow") {
20975
20975
  response = await httpRedirectFetch(fetchParams, response);
20976
20976
  } else {
20977
- assert8(false);
20977
+ assert9(false);
20978
20978
  }
20979
20979
  }
20980
20980
  response.timingInfo = timingInfo;
@@ -21027,7 +21027,7 @@ var require_fetch = __commonJS({
21027
21027
  request2.headersList.delete("host", true);
21028
21028
  }
21029
21029
  if (request2.body != null) {
21030
- assert8(request2.body.source != null);
21030
+ assert9(request2.body.source != null);
21031
21031
  request2.body = safelyExtractBody(request2.body.source)[0];
21032
21032
  }
21033
21033
  const timingInfo = fetchParams.timingInfo;
@@ -21187,7 +21187,7 @@ var require_fetch = __commonJS({
21187
21187
  return response;
21188
21188
  }
21189
21189
  async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) {
21190
- assert8(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed);
21190
+ assert9(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed);
21191
21191
  fetchParams.controller.connection = {
21192
21192
  abort: null,
21193
21193
  destroyed: false,
@@ -21543,7 +21543,7 @@ var require_fetch = __commonJS({
21543
21543
  var require_util3 = __commonJS({
21544
21544
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/web/cache/util.js"(exports2, module2) {
21545
21545
  "use strict";
21546
- var assert8 = require("node:assert");
21546
+ var assert9 = require("node:assert");
21547
21547
  var { URLSerializer } = require_data_url();
21548
21548
  var { isValidHeaderName } = require_util2();
21549
21549
  function urlEquals(A2, B, excludeFragment = false) {
@@ -21552,7 +21552,7 @@ var require_util3 = __commonJS({
21552
21552
  return serializedA === serializedB;
21553
21553
  }
21554
21554
  function getFieldValues(header) {
21555
- assert8(header !== null);
21555
+ assert9(header !== null);
21556
21556
  const values = [];
21557
21557
  for (let value of header.split(",")) {
21558
21558
  value = value.trim();
@@ -21573,7 +21573,7 @@ var require_util3 = __commonJS({
21573
21573
  var require_cache3 = __commonJS({
21574
21574
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/web/cache/cache.js"(exports2, module2) {
21575
21575
  "use strict";
21576
- var assert8 = require("node:assert");
21576
+ var assert9 = require("node:assert");
21577
21577
  var { kConstruct } = require_symbols();
21578
21578
  var { urlEquals, getFieldValues } = require_util3();
21579
21579
  var { kEnumerableProperty, isDisturbed } = require_util();
@@ -21823,7 +21823,7 @@ var require_cache3 = __commonJS({
21823
21823
  return false;
21824
21824
  }
21825
21825
  } else {
21826
- assert8(typeof request2 === "string");
21826
+ assert9(typeof request2 === "string");
21827
21827
  r = getRequestState(new Request(request2));
21828
21828
  }
21829
21829
  const operations = [];
@@ -21934,7 +21934,7 @@ var require_cache3 = __commonJS({
21934
21934
  }
21935
21935
  for (const requestResponse of requestResponses) {
21936
21936
  const idx = cache.indexOf(requestResponse);
21937
- assert8(idx !== -1);
21937
+ assert9(idx !== -1);
21938
21938
  cache.splice(idx, 1);
21939
21939
  }
21940
21940
  } else if (operation.type === "put") {
@@ -21966,7 +21966,7 @@ var require_cache3 = __commonJS({
21966
21966
  requestResponses = this.#queryCache(operation.request);
21967
21967
  for (const requestResponse of requestResponses) {
21968
21968
  const idx = cache.indexOf(requestResponse);
21969
- assert8(idx !== -1);
21969
+ assert9(idx !== -1);
21970
21970
  cache.splice(idx, 1);
21971
21971
  }
21972
21972
  cache.push([operation.request, operation.response]);
@@ -22456,7 +22456,7 @@ var require_parse = __commonJS({
22456
22456
  var { collectASequenceOfCodePointsFast } = require_infra();
22457
22457
  var { maxNameValuePairSize, maxAttributeValueSize } = require_constants4();
22458
22458
  var { isCTLExcludingHtab } = require_util4();
22459
- var assert8 = require("node:assert");
22459
+ var assert9 = require("node:assert");
22460
22460
  function parseSetCookie(header) {
22461
22461
  if (isCTLExcludingHtab(header)) {
22462
22462
  return null;
@@ -22498,7 +22498,7 @@ var require_parse = __commonJS({
22498
22498
  if (unparsedAttributes.length === 0) {
22499
22499
  return cookieAttributeList;
22500
22500
  }
22501
- assert8(unparsedAttributes[0] === ";");
22501
+ assert9(unparsedAttributes[0] === ";");
22502
22502
  unparsedAttributes = unparsedAttributes.slice(1);
22503
22503
  let cookieAv = "";
22504
22504
  if (unparsedAttributes.includes(";")) {
@@ -23337,7 +23337,7 @@ var require_connection = __commonJS({
23337
23337
  var { Headers: Headers2, getHeadersList } = require_headers();
23338
23338
  var { getDecodeSplit } = require_util2();
23339
23339
  var { WebsocketFrameSend } = require_frame();
23340
- var assert8 = require("node:assert");
23340
+ var assert9 = require("node:assert");
23341
23341
  var { runtimeFeatures } = require_runtime_features();
23342
23342
  var crypto = runtimeFeatures.has("crypto") ? require("node:crypto") : null;
23343
23343
  var warningEmitted = false;
@@ -23443,7 +23443,7 @@ var require_connection = __commonJS({
23443
23443
  if (reason.length !== 0 && code === null) {
23444
23444
  code = 1e3;
23445
23445
  }
23446
- assert8(code === null || Number.isInteger(code));
23446
+ assert9(code === null || Number.isInteger(code));
23447
23447
  if (code === null && reason.length === 0) {
23448
23448
  frame.frameData = emptyBuffer;
23449
23449
  } else if (code !== null && reason === null) {
@@ -23568,7 +23568,7 @@ var require_receiver = __commonJS({
23568
23568
  "../../node_modules/.pnpm/undici@7.29.0/node_modules/undici/lib/web/websocket/receiver.js"(exports2, module2) {
23569
23569
  "use strict";
23570
23570
  var { Writable } = require("node:stream");
23571
- var assert8 = require("node:assert");
23571
+ var assert9 = require("node:assert");
23572
23572
  var { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants5();
23573
23573
  var {
23574
23574
  isValidStatusCode,
@@ -23852,7 +23852,7 @@ var require_receiver = __commonJS({
23852
23852
  return output;
23853
23853
  }
23854
23854
  parseCloseBody(data) {
23855
- assert8(data.length !== 1);
23855
+ assert9(data.length !== 1);
23856
23856
  let code;
23857
23857
  if (data.length >= 2) {
23858
23858
  code = data.readUInt16BE(0);
@@ -26863,7 +26863,7 @@ var require_signal_exit = __commonJS({
26863
26863
  };
26864
26864
  };
26865
26865
  } else {
26866
- assert8 = require("assert");
26866
+ assert9 = require("assert");
26867
26867
  signals2 = require_signals();
26868
26868
  isWin = /^win/i.test(process15.platform);
26869
26869
  EE = require("events");
@@ -26886,7 +26886,7 @@ var require_signal_exit = __commonJS({
26886
26886
  return function() {
26887
26887
  };
26888
26888
  }
26889
- assert8.equal(typeof cb, "function", "a callback must be provided for exit handler");
26889
+ assert9.equal(typeof cb, "function", "a callback must be provided for exit handler");
26890
26890
  if (loaded === false) {
26891
26891
  load2();
26892
26892
  }
@@ -26992,7 +26992,7 @@ var require_signal_exit = __commonJS({
26992
26992
  }
26993
26993
  };
26994
26994
  }
26995
- var assert8;
26995
+ var assert9;
26996
26996
  var signals2;
26997
26997
  var isWin;
26998
26998
  var EE;
@@ -29599,7 +29599,7 @@ var require_index_688c5d50 = __commonJS({
29599
29599
  var Events = require("events");
29600
29600
  var Stream$1 = require("stream");
29601
29601
  var require$$0 = require("string_decoder");
29602
- var assert8 = require("assert");
29602
+ var assert9 = require("assert");
29603
29603
  var require$$0$1 = require("buffer");
29604
29604
  var realZlib = require("zlib");
29605
29605
  var util$1 = require("util");
@@ -29620,7 +29620,7 @@ var require_index_688c5d50 = __commonJS({
29620
29620
  var Events__default = /* @__PURE__ */ _interopDefaultLegacy(Events);
29621
29621
  var Stream__default = /* @__PURE__ */ _interopDefaultLegacy(Stream$1);
29622
29622
  var require$$0__default = /* @__PURE__ */ _interopDefaultLegacy(require$$0);
29623
- var assert__default = /* @__PURE__ */ _interopDefaultLegacy(assert8);
29623
+ var assert__default = /* @__PURE__ */ _interopDefaultLegacy(assert9);
29624
29624
  var require$$0__default$1 = /* @__PURE__ */ _interopDefaultLegacy(require$$0$1);
29625
29625
  var realZlib__default = /* @__PURE__ */ _interopDefaultLegacy(realZlib);
29626
29626
  var util__default = /* @__PURE__ */ _interopDefaultLegacy(util$1);
@@ -45467,12 +45467,12 @@ var require_esprima = __commonJS({
45467
45467
  function(module3, exports3) {
45468
45468
  "use strict";
45469
45469
  Object.defineProperty(exports3, "__esModule", { value: true });
45470
- function assert8(condition, message) {
45470
+ function assert9(condition, message) {
45471
45471
  if (!condition) {
45472
45472
  throw new Error("ASSERT: " + message);
45473
45473
  }
45474
45474
  }
45475
- exports3.assert = assert8;
45475
+ exports3.assert = assert9;
45476
45476
  },
45477
45477
  /* 10 */
45478
45478
  /***/
@@ -47008,30 +47008,30 @@ var require_esprima = __commonJS({
47008
47008
  };
47009
47009
  Reader2.prototype.isRegexStart = function() {
47010
47010
  var previous = this.values[this.values.length - 1];
47011
- var regex2 = previous !== null;
47011
+ var regex3 = previous !== null;
47012
47012
  switch (previous) {
47013
47013
  case "this":
47014
47014
  case "]":
47015
- regex2 = false;
47015
+ regex3 = false;
47016
47016
  break;
47017
47017
  case ")":
47018
47018
  var keyword = this.values[this.paren - 1];
47019
- regex2 = keyword === "if" || keyword === "while" || keyword === "for" || keyword === "with";
47019
+ regex3 = keyword === "if" || keyword === "while" || keyword === "for" || keyword === "with";
47020
47020
  break;
47021
47021
  case "}":
47022
- regex2 = false;
47022
+ regex3 = false;
47023
47023
  if (this.values[this.curly - 3] === "function") {
47024
47024
  var check2 = this.values[this.curly - 4];
47025
- regex2 = check2 ? !this.beforeFunctionExpression(check2) : false;
47025
+ regex3 = check2 ? !this.beforeFunctionExpression(check2) : false;
47026
47026
  } else if (this.values[this.curly - 4] === "function") {
47027
47027
  var check2 = this.values[this.curly - 5];
47028
- regex2 = check2 ? !this.beforeFunctionExpression(check2) : true;
47028
+ regex3 = check2 ? !this.beforeFunctionExpression(check2) : true;
47029
47029
  }
47030
47030
  break;
47031
47031
  default:
47032
47032
  break;
47033
47033
  }
47034
- return regex2;
47034
+ return regex3;
47035
47035
  };
47036
47036
  Reader2.prototype.push = function(token) {
47037
47037
  if (token.type === 7 || token.type === 4) {
@@ -59904,12 +59904,12 @@ var require_lib = __commonJS({
59904
59904
  pattern,
59905
59905
  flags
59906
59906
  }) {
59907
- let regex2 = null;
59907
+ let regex3 = null;
59908
59908
  try {
59909
- regex2 = new RegExp(pattern, flags);
59909
+ regex3 = new RegExp(pattern, flags);
59910
59910
  } catch (_) {
59911
59911
  }
59912
- const node = this.estreeParseLiteral(regex2);
59912
+ const node = this.estreeParseLiteral(regex3);
59913
59913
  node.regex = {
59914
59914
  pattern,
59915
59915
  flags
@@ -66835,7 +66835,7 @@ var require_lib = __commonJS({
66835
66835
  }
66836
66836
  return x;
66837
66837
  }
66838
- function assert8(x) {
66838
+ function assert9(x) {
66839
66839
  if (!x) {
66840
66840
  throw new Error("Assert fail");
66841
66841
  }
@@ -67861,7 +67861,7 @@ var require_lib = __commonJS({
67861
67861
  return this.finishNode(t2, "TSTypeAnnotation");
67862
67862
  }
67863
67863
  tsParseType() {
67864
- assert8(this.state.inType);
67864
+ assert9(this.state.inType);
67865
67865
  const type = this.tsParseNonConditionalType();
67866
67866
  if (this.state.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(81)) {
67867
67867
  return type;
@@ -68909,7 +68909,7 @@ var require_lib = __commonJS({
68909
68909
  return arrow.node;
68910
68910
  }
68911
68911
  if (!jsx2) {
68912
- assert8(!this.hasPlugin("jsx"));
68912
+ assert9(!this.hasPlugin("jsx"));
68913
68913
  typeCast = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state);
68914
68914
  if (!typeCast.error) return typeCast.node;
68915
68915
  }
@@ -75341,7 +75341,7 @@ var stderr = process.stderr;
75341
75341
  // ../cli/dist/check-macos-version.mjs
75342
75342
  var import_node_os5 = __toESM(require("node:os"), 1);
75343
75343
 
75344
- // ../workers-utils/dist/chunk-J6JRMPLM.mjs
75344
+ // ../workers-utils/dist/chunk-NMPHTL5R.mjs
75345
75345
  init_chunk_Q72B4Q5Z();
75346
75346
  var import_node_assert = __toESM(require("node:assert"), 1);
75347
75347
  function isCompatDate(str) {
@@ -75358,6 +75358,29 @@ function getTodaysCompatDate() {
75358
75358
  return formatCompatibilityDate(/* @__PURE__ */ new Date());
75359
75359
  }
75360
75360
  __name(getTodaysCompatDate, "getTodaysCompatDate");
75361
+ var NODEJS_COMPAT_DEFAULT_ON_DATE = "2026-08-04";
75362
+ function isNodejsCompatDefaultOn(compatibilityDate) {
75363
+ return compatibilityDate !== void 0 && compatibilityDate >= NODEJS_COMPAT_DEFAULT_ON_DATE;
75364
+ }
75365
+ __name(isNodejsCompatDefaultOn, "isNodejsCompatDefaultOn");
75366
+ var NODEJS_COMPAT_V2_SWITCH_OVER_DATE = "2024-09-23";
75367
+ function resolveNodejsCompat(compatibilityDate, compatibilityFlags) {
75368
+ const isDefaultOn = isNodejsCompatDefaultOn(compatibilityDate);
75369
+ const isNodejsCompatEnabled = compatibilityFlags.includes("nodejs_compat") || isDefaultOn && !compatibilityFlags.includes("no_nodejs_compat");
75370
+ const isNodejsCompatV2Enabled = compatibilityFlags.includes("nodejs_compat_v2") || !compatibilityFlags.includes("no_nodejs_compat_v2") && (isDefaultOn || isNodejsCompatEnabled && compatibilityDate >= NODEJS_COMPAT_V2_SWITCH_OVER_DATE);
75371
+ return { isNodejsCompatEnabled, isNodejsCompatV2Enabled };
75372
+ }
75373
+ __name(resolveNodejsCompat, "resolveNodejsCompat");
75374
+ function stripRedundantNodejsCompatFlags(compatibilityDate, compatibilityFlags) {
75375
+ if (!isNodejsCompatDefaultOn(compatibilityDate)) {
75376
+ return compatibilityFlags;
75377
+ }
75378
+ const redundantFlags = ["nodejs_compat", "nodejs_compat_v2"].filter(
75379
+ (flag) => !compatibilityFlags.includes(`no_${flag}`)
75380
+ );
75381
+ return compatibilityFlags.filter((flag) => !redundantFlags.includes(flag));
75382
+ }
75383
+ __name(stripRedundantNodejsCompatFlags, "stripRedundantNodejsCompatFlags");
75361
75384
  function assertNever(_value) {
75362
75385
  }
75363
75386
  __name(assertNever, "assertNever");
@@ -80584,6 +80607,7 @@ var defaultWranglerConfig = {
80584
80607
  upload_source_maps: void 0,
80585
80608
  assets: void 0,
80586
80609
  observability: { enabled: true },
80610
+ access: void 0,
80587
80611
  cache: void 0,
80588
80612
  /** The default here is undefined so that we can delegate to the CLOUDFLARE_COMPLIANCE_REGION environment variable. */
80589
80613
  compliance_region: void 0,
@@ -82300,8 +82324,8 @@ var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][
82300
82324
  var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
82301
82325
  function timeSource(args) {
82302
82326
  const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
82303
- const regex2 = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
82304
- return regex2;
82327
+ const regex3 = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
82328
+ return regex3;
82305
82329
  }
82306
82330
  __name(timeSource, "timeSource");
82307
82331
  function time(args) {
@@ -82320,8 +82344,8 @@ function datetime(args) {
82320
82344
  }
82321
82345
  __name(datetime, "datetime");
82322
82346
  var string = /* @__PURE__ */ __name((params) => {
82323
- const regex2 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
82324
- return new RegExp(`^${regex2}$`);
82347
+ const regex3 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
82348
+ return new RegExp(`^${regex3}$`);
82325
82349
  }, "string");
82326
82350
  var bigint = /^-?\d+n?$/;
82327
82351
  var integer = /^-?\d+$/;
@@ -92610,9 +92634,9 @@ var stringProcessor = /* @__PURE__ */ __name((schema, ctx, _json, _params) => {
92610
92634
  json2.pattern = regexes[0].source;
92611
92635
  else if (regexes.length > 1) {
92612
92636
  json2.allOf = [
92613
- ...regexes.map((regex2) => ({
92637
+ ...regexes.map((regex3) => ({
92614
92638
  ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
92615
- pattern: regex2.source
92639
+ pattern: regex3.source
92616
92640
  }))
92617
92641
  ];
92618
92642
  }
@@ -93952,10 +93976,10 @@ __name(hex2, "hex");
93952
93976
  function hash(alg, params) {
93953
93977
  const enc = params?.enc ?? "hex";
93954
93978
  const format22 = `${alg}_${enc}`;
93955
- const regex2 = regexes_exports[format22];
93956
- if (!regex2)
93979
+ const regex3 = regexes_exports[format22];
93980
+ if (!regex3)
93957
93981
  throw new Error(`Unrecognized hash format: ${format22}`);
93958
- return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, format22, regex2, params);
93982
+ return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, format22, regex3, params);
93959
93983
  }
93960
93984
  __name(hash, "hash");
93961
93985
  var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
@@ -95517,6 +95541,9 @@ function getWranglerSendMetricsFromEnv() {
95517
95541
  return getWranglerSendMetricsVariableFromEnv();
95518
95542
  }
95519
95543
  __name(getWranglerSendMetricsFromEnv, "getWranglerSendMetricsFromEnv");
95544
+ var getNoSkillsUpdatePromptsFromEnv = getBooleanEnvironmentVariableFactory({
95545
+ variableName: "WRANGLER_NO_SKILLS_UPDATE_PROMPTS"
95546
+ });
95520
95547
  var getWranglerSendErrorReportsFromEnv = getBooleanEnvironmentVariableFactory({
95521
95548
  variableName: "WRANGLER_SEND_ERROR_REPORTS",
95522
95549
  defaultValue: false
@@ -97685,6 +97712,14 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
97685
97712
  validateObservability,
97686
97713
  void 0
97687
97714
  ),
97715
+ access: inheritable(
97716
+ diagnostics,
97717
+ topLevelEnv,
97718
+ rawEnv,
97719
+ "access",
97720
+ validateAccess,
97721
+ void 0
97722
+ ),
97688
97723
  cache: inheritable(
97689
97724
  diagnostics,
97690
97725
  topLevelEnv,
@@ -101140,6 +101175,46 @@ function validateHeadSamplingRate(diagnostics, container, key, samplingRate) {
101140
101175
  }
101141
101176
  }
101142
101177
  __name(validateHeadSamplingRate, "validateHeadSamplingRate");
101178
+ var validateAccess = /* @__PURE__ */ __name((diagnostics, field, value) => {
101179
+ if (value === void 0) {
101180
+ return true;
101181
+ }
101182
+ if (typeof value !== "object" || value === null) {
101183
+ diagnostics.errors.push(
101184
+ `"${field}" should be an object but got ${JSON.stringify(value)}.`
101185
+ );
101186
+ return false;
101187
+ }
101188
+ const val = value;
101189
+ let isValid = true;
101190
+ isValid = validateOptionalProperty(diagnostics, field, "dev", val.dev, "object") && isValid;
101191
+ isValid = validateAdditionalProperties(diagnostics, field, Object.keys(val), [
101192
+ "dev"
101193
+ ]) && isValid;
101194
+ if (typeof val.dev === "object" && val.dev !== null) {
101195
+ isValid = validateRequiredProperty(
101196
+ diagnostics,
101197
+ `${field}.dev`,
101198
+ "aud",
101199
+ val.dev.aud,
101200
+ "string"
101201
+ ) && isValid;
101202
+ isValid = validateOptionalProperty(
101203
+ diagnostics,
101204
+ `${field}.dev`,
101205
+ "identity",
101206
+ val.dev.identity,
101207
+ "object"
101208
+ ) && isValid;
101209
+ isValid = validateAdditionalProperties(
101210
+ diagnostics,
101211
+ `${field}.dev`,
101212
+ Object.keys(val.dev),
101213
+ ["aud", "identity"]
101214
+ ) && isValid;
101215
+ }
101216
+ return isValid;
101217
+ }, "validateAccess");
101143
101218
  var validateCache = /* @__PURE__ */ __name((diagnostics, field, value) => {
101144
101219
  if (value === void 0) {
101145
101220
  return true;
@@ -103731,8 +103806,8 @@ var warn = (msg, { shape = shapes.corners.bl, multiline = false, newlineBefore =
103731
103806
  };
103732
103807
  var stripAnsi = (str) => {
103733
103808
  const pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
103734
- const regex2 = RegExp(pattern, "g");
103735
- return str.replace(linkRegex, "$2").replace(regex2, "");
103809
+ const regex3 = RegExp(pattern, "g");
103810
+ return str.replace(linkRegex, "$2").replace(regex3, "");
103736
103811
  };
103737
103812
  var linkRegex = /\u001B\]8;;(?<url>.+)\u001B\\(?<label>.+)\u001B\]8;;\u001B\\/g;
103738
103813
  var hyperlink = (url2, label = url2) => {
@@ -104617,21 +104692,24 @@ cliCursor.toggle = (force, writableStream) => {
104617
104692
  };
104618
104693
  var cli_cursor_default = cliCursor;
104619
104694
 
104620
- // ../../node_modules/.pnpm/ansi-regex@6.0.1/node_modules/ansi-regex/index.js
104695
+ // ../../node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
104621
104696
  function ansiRegex({ onlyFirst = false } = {}) {
104622
- const pattern = [
104623
- "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
104624
- "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
104625
- ].join("|");
104697
+ const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
104698
+ const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
104699
+ const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
104700
+ const pattern = `${osc}|${csi}`;
104626
104701
  return new RegExp(pattern, onlyFirst ? void 0 : "g");
104627
104702
  }
104628
104703
 
104629
- // ../../node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js
104704
+ // ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
104630
104705
  var regex = ansiRegex();
104631
104706
  function stripAnsi2(string4) {
104632
104707
  if (typeof string4 !== "string") {
104633
104708
  throw new TypeError(`Expected a \`string\`, got \`${typeof string4}\``);
104634
104709
  }
104710
+ if (!string4.includes("\x1B") && !string4.includes("\x9B")) {
104711
+ return string4;
104712
+ }
104635
104713
  return string4.replace(regex, "");
104636
104714
  }
104637
104715
 
@@ -105120,6 +105198,24 @@ function sliceAnsi(string4, begin, end) {
105120
105198
  return output;
105121
105199
  }
105122
105200
 
105201
+ // ../../node_modules/.pnpm/ansi-regex@6.0.1/node_modules/ansi-regex/index.js
105202
+ function ansiRegex2({ onlyFirst = false } = {}) {
105203
+ const pattern = [
105204
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
105205
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
105206
+ ].join("|");
105207
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
105208
+ }
105209
+
105210
+ // ../../node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js
105211
+ var regex2 = ansiRegex2();
105212
+ function stripAnsi3(string4) {
105213
+ if (typeof string4 !== "string") {
105214
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string4}\``);
105215
+ }
105216
+ return string4.replace(regex2, "");
105217
+ }
105218
+
105123
105219
  // ../../node_modules/.pnpm/log-update@5.0.1/node_modules/log-update/index.js
105124
105220
  var defaultTerminalHeight = 24;
105125
105221
  var getWidth = (stream) => {
@@ -105138,7 +105234,7 @@ var fitToTerminalHeight = (stream, text) => {
105138
105234
  }
105139
105235
  return sliceAnsi(
105140
105236
  text,
105141
- stripAnsi2(lines.slice(0, toRemove).join("\n")).length + 1
105237
+ stripAnsi3(lines.slice(0, toRemove).join("\n")).length + 1
105142
105238
  );
105143
105239
  };
105144
105240
  function createLogUpdate(stream, { showCursor: showCursor2 = false } = {}) {
@@ -105892,12 +105988,12 @@ function cliui(opts, _mixin) {
105892
105988
 
105893
105989
  // ../../node_modules/.pnpm/cliui@8.0.1/node_modules/cliui/build/lib/string-utils.js
105894
105990
  var ansi = new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)", "g");
105895
- function stripAnsi3(str) {
105991
+ function stripAnsi4(str) {
105896
105992
  return str.replace(ansi, "");
105897
105993
  }
105898
105994
  function wrap(str, width) {
105899
105995
  const [start, end] = str.match(ansi) || ["", ""];
105900
- str = stripAnsi3(str);
105996
+ str = stripAnsi4(str);
105901
105997
  let wrapped = "";
105902
105998
  for (let i = 0; i < str.length; i++) {
105903
105999
  if (i !== 0 && i % width === 0) {
@@ -105917,7 +106013,7 @@ function ui(opts) {
105917
106013
  stringWidth: (str) => {
105918
106014
  return [...str].length;
105919
106015
  },
105920
- stripAnsi: stripAnsi3,
106016
+ stripAnsi: stripAnsi4,
105921
106017
  wrap
105922
106018
  });
105923
106019
  }
@@ -110482,7 +110578,7 @@ var Yargs = YargsFactory(esm_default2);
110482
110578
  var yargs_default = Yargs;
110483
110579
 
110484
110580
  // package.json
110485
- var version2 = "2.71.0";
110581
+ var version2 = "2.72.0";
110486
110582
 
110487
110583
  // src/metrics.ts
110488
110584
  var import_node_async_hooks = require("node:async_hooks");
@@ -110715,7 +110811,7 @@ var detectPackageManager = () => {
110715
110811
  }
110716
110812
  };
110717
110813
  var rectifyPmMismatch = async (ctx) => {
110718
- const { npm: npm24 } = detectPackageManager();
110814
+ const { npm: npm25 } = detectPackageManager();
110719
110815
  if (!detectPmMismatch(ctx)) {
110720
110816
  return;
110721
110817
  }
@@ -110727,17 +110823,17 @@ var rectifyPmMismatch = async (ctx) => {
110727
110823
  if ((0, import_node_fs7.existsSync)(lockfilePath)) {
110728
110824
  (0, import_node_fs7.rmSync)(lockfilePath);
110729
110825
  }
110730
- await runCommand([npm24, "install"], {
110826
+ await runCommand([npm25, "install"], {
110731
110827
  silent: true,
110732
110828
  cwd: ctx.project.path,
110733
110829
  startText: "Installing dependencies",
110734
- doneText: `${brandColor("installed")} ${dim(`via \`${npm24} install\``)}`
110830
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm25} install\``)}`
110735
110831
  });
110736
110832
  };
110737
110833
  var detectPmMismatch = (ctx) => {
110738
- const { npm: npm24 } = detectPackageManager();
110834
+ const { npm: npm25 } = detectPackageManager();
110739
110835
  const projectPath = ctx.project.path;
110740
- switch (npm24) {
110836
+ switch (npm25) {
110741
110837
  case "npm":
110742
110838
  return false;
110743
110839
  case "yarn":
@@ -112029,8 +112125,8 @@ var hasTsConfig = (path7) => {
112029
112125
  var APPROVED_BUILDS = ["esbuild", "workerd"];
112030
112126
  var APPROVED_BUILDS_SET = new Set(APPROVED_BUILDS);
112031
112127
  var writePnpmBuildApprovals = (projectPath) => {
112032
- const { npm: npm24 } = detectPackageManager();
112033
- if (npm24 !== "pnpm") {
112128
+ const { npm: npm25 } = detectPackageManager();
112129
+ if (npm25 !== "pnpm") {
112034
112130
  return;
112035
112131
  }
112036
112132
  const yamlPath = (0, import_node_path10.join)(projectPath, "pnpm-workspace.yaml");
@@ -112177,49 +112273,49 @@ var getPnpmIgnoredBuildsGuidance = (packages = []) => {
112177
112273
 
112178
112274
  // src/helpers/packages.ts
112179
112275
  var installPackages2 = async (packages, config50 = {}) => {
112180
- const { npm: npm24 } = detectPackageManager();
112181
- return installPackages(npm24, packages, config50);
112276
+ const { npm: npm25 } = detectPackageManager();
112277
+ return installPackages(npm25, packages, config50);
112182
112278
  };
112183
112279
  async function installWrangler2() {
112184
- const { npm: npm24 } = detectPackageManager();
112185
- return installWrangler(npm24, false);
112280
+ const { npm: npm25 } = detectPackageManager();
112281
+ return installWrangler(npm25, false);
112186
112282
  }
112187
112283
  var npmInstall = async (ctx) => {
112188
112284
  const nodeModulesPath = import_node_path11.default.join(ctx.project.path, "node_modules");
112189
112285
  if ((0, import_node_fs11.existsSync)(nodeModulesPath)) {
112190
112286
  return;
112191
112287
  }
112192
- const { npm: npm24 } = detectPackageManager();
112193
- if (npm24 === "pnpm") {
112194
- await pnpmInstallWithBuildApprovalRetry(npm24);
112288
+ const { npm: npm25 } = detectPackageManager();
112289
+ if (npm25 === "pnpm") {
112290
+ await pnpmInstallWithBuildApprovalRetry(npm25);
112195
112291
  return;
112196
112292
  }
112197
- await runCommand([npm24, "install"], {
112293
+ await runCommand([npm25, "install"], {
112198
112294
  silent: true,
112199
112295
  startText: "Installing dependencies",
112200
- doneText: `${brandColor("installed")} ${dim(`via \`${npm24} install\``)}`
112296
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm25} install\``)}`
112201
112297
  });
112202
112298
  };
112203
- var runPnpmInstallQuiet = async (npm24, startText) => {
112299
+ var runPnpmInstallQuiet = async (npm25, startText) => {
112204
112300
  const s = spinner();
112205
112301
  s.start(startText);
112206
112302
  try {
112207
- await runCommand([npm24, "install"], { silent: true, useSpinner: false });
112208
- s.stop(`${brandColor("installed")} ${dim(`via \`${npm24} install\``)}`);
112303
+ await runCommand([npm25, "install"], { silent: true, useSpinner: false });
112304
+ s.stop(`${brandColor("installed")} ${dim(`via \`${npm25} install\``)}`);
112209
112305
  } catch (err) {
112210
112306
  s.stop(red("install failed"));
112211
112307
  throw err;
112212
112308
  }
112213
112309
  };
112214
- var pnpmInstallWithBuildApprovalRetry = async (npm24) => {
112310
+ var pnpmInstallWithBuildApprovalRetry = async (npm25) => {
112215
112311
  try {
112216
- await runPnpmInstallQuiet(npm24, "Installing dependencies");
112312
+ await runPnpmInstallQuiet(npm25, "Installing dependencies");
112217
112313
  return;
112218
112314
  } catch (err) {
112219
112315
  if (!isPnpmIgnoredBuildsError(err)) {
112220
112316
  throw err;
112221
112317
  }
112222
- await recoverFromIgnoredBuilds(npm24, err);
112318
+ await recoverFromIgnoredBuilds(npm25, err);
112223
112319
  }
112224
112320
  };
112225
112321
  var STDIN_EOF_MARKER = "__c3_stdin_eof__";
@@ -112251,7 +112347,7 @@ var promptOrEOF = async (packages) => {
112251
112347
  }
112252
112348
  }
112253
112349
  };
112254
- var recoverFromIgnoredBuilds = async (npm24, originalErr) => {
112350
+ var recoverFromIgnoredBuilds = async (npm25, originalErr) => {
112255
112351
  const packages = extractIgnoredBuildPackages(originalErr);
112256
112352
  if (packages.length === 0) {
112257
112353
  throw new IgnoredBuildsError([], originalErr);
@@ -112271,13 +112367,13 @@ var recoverFromIgnoredBuilds = async (npm24, originalErr) => {
112271
112367
  if (!approve) {
112272
112368
  throw new IgnoredBuildsError(packages, originalErr);
112273
112369
  }
112274
- await runCommand([npm24, "approve-builds", ...packages], {
112370
+ await runCommand([npm25, "approve-builds", ...packages], {
112275
112371
  silent: true,
112276
112372
  startText: "Approving dependency build scripts",
112277
112373
  doneText: `${brandColor("approved")} ${dim(packages.join(", "))}`
112278
112374
  });
112279
112375
  try {
112280
- await runPnpmInstallQuiet(npm24, "Re-running install");
112376
+ await runPnpmInstallQuiet(npm25, "Re-running install");
112281
112377
  } catch (retryErr) {
112282
112378
  if (isPnpmIgnoredBuildsError(retryErr)) {
112283
112379
  throw new IgnoredBuildsError(
@@ -112934,12 +113030,12 @@ var isUpdateAvailable = async () => {
112934
113030
  }
112935
113031
  };
112936
113032
  var runLatest = async () => {
112937
- const { npm: npm24 } = detectPackageManager();
113033
+ const { npm: npm25 } = detectPackageManager();
112938
113034
  const args = process.argv.slice(2);
112939
- if (npm24 === "npm") {
113035
+ if (npm25 === "npm") {
112940
113036
  args.unshift("--");
112941
113037
  }
112942
- await runCommand([npm24, "create", "cloudflare@latest", ...args], {
113038
+ await runCommand([npm25, "create", "cloudflare@latest", ...args], {
112943
113039
  // Mark the spawned process so it doesn't attempt to update and re-spawn
112944
113040
  // again, which would loop indefinitely when the package manager keeps
112945
113041
  // resolving the same version of `cloudflare@latest`.
@@ -113079,6 +113175,7 @@ var package_default = {
113079
113175
  "create-rwsdk": "3.1.3",
113080
113176
  "create-solid": "0.8.1",
113081
113177
  "create-vike": "0.0.673",
113178
+ "create-vinext-app": "1.0.0-beta.1",
113082
113179
  "create-vite": "9.1.2",
113083
113180
  "create-vue": "3.23.0",
113084
113181
  "create-waku": "0.12.5-1.0.0-alpha.10-0",
@@ -113103,9 +113200,9 @@ var getFrameworkCli = (ctx, withVersion = true) => {
113103
113200
  };
113104
113201
  var runFrameworkGenerator = async (ctx, args) => {
113105
113202
  const cli = getFrameworkCli(ctx, true);
113106
- const { npm: npm24, dlx } = detectPackageManager();
113107
- const cmd = [...npm24 === "yarn" ? ["npx"] : dlx, cli, ...args];
113108
- const env3 = npm24 === "yarn" && !process.env.npm_config_user_agent?.startsWith("yarn") ? { npm_config_user_agent: "yarn/1.22.22" } : {};
113203
+ const { npm: npm25, dlx } = detectPackageManager();
113204
+ const cmd = [...npm25 === "yarn" ? ["npx"] : dlx, cli, ...args];
113205
+ const env3 = npm25 === "yarn" && !process.env.npm_config_user_agent?.startsWith("yarn") ? { npm_config_user_agent: "yarn/1.22.22" } : {};
113109
113206
  if (ctx.args.additionalArgs?.length) {
113110
113207
  cmd.push(...ctx.args.additionalArgs);
113111
113208
  }
@@ -113940,39 +114037,123 @@ var config22 = {
113940
114037
  var c3_default23 = config22;
113941
114038
 
113942
114039
  // templates/next/c3.ts
113943
- var generate12 = async (ctx) => {
114040
+ var import_node_assert5 = __toESM(require("node:assert"));
114041
+ var { npm: npm8 } = detectPackageManager();
114042
+ var VINEXT_TYPES_PATH = "./worker-configuration.d.ts";
114043
+ var OPENNEXT_TYPES_PATH = "./cloudflare-env.d.ts";
114044
+ var NEXT_VARIANTS = [
114045
+ {
114046
+ value: "vinext",
114047
+ label: "vinext (recommended)"
114048
+ },
114049
+ {
114050
+ value: "opennext",
114051
+ label: "OpenNext adapter"
114052
+ }
114053
+ ];
114054
+ async function getNextVariant(ctx) {
114055
+ if (ctx.args.variant) {
114056
+ const selected2 = NEXT_VARIANTS.find(
114057
+ (variant) => variant.value === ctx.args.variant
114058
+ );
114059
+ if (!selected2) {
114060
+ throw new Error(
114061
+ `Unknown Next.js variant "${ctx.args.variant}". Valid variants are: ${NEXT_VARIANTS.map((v) => v.value).join(", ")}`
114062
+ );
114063
+ }
114064
+ return selected2;
114065
+ }
114066
+ const value = await inputPrompt({
114067
+ type: "select",
114068
+ question: "Which Next.js adapter do you want to use?",
114069
+ label: "variant",
114070
+ options: NEXT_VARIANTS,
114071
+ defaultValue: NEXT_VARIANTS[0].value,
114072
+ // Honour -y / --accept-defaults by taking the recommended vinext path.
114073
+ acceptDefault: Boolean(ctx.args.acceptDefaults)
114074
+ });
114075
+ const selected = NEXT_VARIANTS.find((variant) => variant.value === value);
114076
+ (0, import_node_assert5.default)(selected, "Expected a Next.js variant to be selected");
114077
+ return selected;
114078
+ }
114079
+ async function generateVinext(ctx) {
114080
+ const pmFlag = npm8 === "pnpm" ? "--use-pnpm" : npm8 === "yarn" ? "--use-yarn" : npm8 === "bun" ? "--use-bun" : "--use-npm";
114081
+ await runFrameworkGenerator(ctx, [
114082
+ ctx.project.name,
114083
+ "--platform",
114084
+ "cloudflare",
114085
+ // Avoid a placeholder KV namespace id that would block `wrangler deploy`
114086
+ // until the user manually provisions one. Caching can be added later
114087
+ // via vinext's Cloudflare cache adapters.
114088
+ "--data-cache",
114089
+ "none",
114090
+ "--yes",
114091
+ "--skip-install",
114092
+ "--disable-git",
114093
+ pmFlag
114094
+ ]);
114095
+ logRaw("");
114096
+ }
114097
+ async function generateOpenNext(ctx) {
113944
114098
  const branch = "main";
113945
114099
  const repoUrl = `github:opennextjs/opennextjs-cloudflare/create-cloudflare/next#${branch}`;
113946
114100
  await downloadRemoteTemplate(repoUrl, {
113947
114101
  intoFolder: ctx.project.path
113948
114102
  });
113949
114103
  await updatePackageName(ctx);
114104
+ }
114105
+ var generate12 = async (ctx) => {
114106
+ const variant = await getNextVariant(ctx);
114107
+ ctx.args.variant = variant.value;
114108
+ ctx.template.typesPath = variant.value === "opennext" ? OPENNEXT_TYPES_PATH : VINEXT_TYPES_PATH;
114109
+ if (variant.value === "opennext") {
114110
+ ctx.template.frameworkCliUsed = false;
114111
+ await generateOpenNext(ctx);
114112
+ return;
114113
+ }
114114
+ await generateVinext(ctx);
113950
114115
  };
113951
114116
  var envInterfaceName3 = "CloudflareEnv";
113952
- var typesPath = "./cloudflare-env.d.ts";
113953
114117
  var c3_default24 = {
113954
114118
  configVersion: 1,
113955
114119
  id: "next",
113956
- frameworkCli: "create-next-app",
114120
+ // Used by runFrameworkGenerator for the vinext path. OpenNext downloads a
114121
+ // remote template and does not invoke this CLI.
114122
+ frameworkCli: "create-vinext-app",
113957
114123
  platform: "workers",
113958
114124
  displayName: "Next.js",
113959
114125
  generate: generate12,
114126
+ transformPackageJson: async (_pkgJson, ctx) => {
114127
+ if (ctx.args.variant === "opennext") {
114128
+ return {};
114129
+ }
114130
+ return {
114131
+ scripts: {
114132
+ // Align with OpenNext so the shared previewScript: "preview" works
114133
+ // for both variants (vinext only ships dev/build/start/deploy).
114134
+ preview: `${npm8} run build && ${npm8} run start${npm8 === "npm" ? " --" : ""}`,
114135
+ "cf-typegen": `wrangler types --env-interface ${envInterfaceName3} ${VINEXT_TYPES_PATH}`
114136
+ }
114137
+ };
114138
+ },
113960
114139
  devScript: "dev",
113961
114140
  previewScript: "preview",
113962
114141
  deployScript: "deploy",
113963
- typesPath,
114142
+ typesPath: VINEXT_TYPES_PATH,
113964
114143
  envInterfaceName: envInterfaceName3
113965
114144
  };
113966
114145
 
113967
114146
  // templates/next/experimental_c3.ts
113968
114147
  var generate13 = async (ctx) => {
113969
- await runFrameworkGenerator(ctx, [
113970
- ctx.project.name,
113971
- "--skip-install"
113972
- ]);
114148
+ if (ctx.args.variant) {
114149
+ throw new Error(
114150
+ "Next.js adapter variants are not supported with --experimental."
114151
+ );
114152
+ }
114153
+ await runFrameworkGenerator(ctx, [ctx.project.name, "--skip-install"]);
113973
114154
  };
113974
114155
  var envInterfaceName4 = "CloudflareEnv";
113975
- var typesPath2 = "./cloudflare-env.d.ts";
114156
+ var typesPath = "./cloudflare-env.d.ts";
113976
114157
  var experimental_c3_default = {
113977
114158
  configVersion: 1,
113978
114159
  id: "next",
@@ -113983,20 +114164,20 @@ var experimental_c3_default = {
113983
114164
  devScript: "dev",
113984
114165
  previewScript: "preview",
113985
114166
  deployScript: "deploy",
113986
- typesPath: typesPath2,
114167
+ typesPath,
113987
114168
  envInterfaceName: envInterfaceName4
113988
114169
  };
113989
114170
 
113990
114171
  // templates/nuxt/pages/c3.ts
113991
114172
  var recast4 = __toESM(require_main2());
113992
- var { npm: npm8, name: pm } = detectPackageManager();
114173
+ var { npm: npm9, name: pm } = detectPackageManager();
113993
114174
  var generate14 = async (ctx) => {
113994
114175
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
113995
114176
  await runFrameworkGenerator(ctx, [
113996
114177
  "init",
113997
114178
  ctx.project.name,
113998
114179
  "--packageManager",
113999
- npm8,
114180
+ npm9,
114000
114181
  "--no-install",
114001
114182
  gitFlag
114002
114183
  ]);
@@ -114011,7 +114192,7 @@ var configure6 = async () => {
114011
114192
  await installPackages2(packages, {
114012
114193
  dev: true,
114013
114194
  startText: "Installing nitro module `nitro-cloudflare-dev`",
114014
- doneText: `${brandColor("installed")} ${dim(`via \`${npm8} install\``)}`
114195
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm9} install\``)}`
114015
114196
  });
114016
114197
  updateNuxtConfig();
114017
114198
  };
@@ -114072,8 +114253,8 @@ var config23 = {
114072
114253
  configure: configure6,
114073
114254
  transformPackageJson: async () => ({
114074
114255
  scripts: {
114075
- deploy: `${npm8} run build && wrangler pages deploy`,
114076
- preview: `${npm8} run build && wrangler pages dev`,
114256
+ deploy: `${npm9} run build && wrangler pages deploy`,
114257
+ preview: `${npm9} run build && wrangler pages dev`,
114077
114258
  "cf-typegen": `wrangler types`
114078
114259
  }
114079
114260
  }),
@@ -114085,14 +114266,14 @@ var c3_default25 = config23;
114085
114266
 
114086
114267
  // templates/nuxt/workers/c3.ts
114087
114268
  var recast5 = __toESM(require_main2());
114088
- var { npm: npm9, name: pm2 } = detectPackageManager();
114269
+ var { npm: npm10, name: pm2 } = detectPackageManager();
114089
114270
  var generate15 = async (ctx) => {
114090
114271
  const gitFlag = ctx.args.git ? `--gitInit` : `--no-gitInit`;
114091
114272
  await runFrameworkGenerator(ctx, [
114092
114273
  "init",
114093
114274
  ctx.project.name,
114094
114275
  "--packageManager",
114095
- npm9,
114276
+ npm10,
114096
114277
  "--no-install",
114097
114278
  gitFlag
114098
114279
  ]);
@@ -114107,7 +114288,7 @@ var configure7 = async () => {
114107
114288
  await installPackages2(packages, {
114108
114289
  dev: true,
114109
114290
  startText: "Installing nitro module `nitro-cloudflare-dev`",
114110
- doneText: `${brandColor("installed")} ${dim(`via \`${npm9} install\``)}`
114291
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm10} install\``)}`
114111
114292
  });
114112
114293
  updateNuxtConfig2();
114113
114294
  };
@@ -114167,8 +114348,8 @@ var config24 = {
114167
114348
  configure: configure7,
114168
114349
  transformPackageJson: async () => ({
114169
114350
  scripts: {
114170
- deploy: `${npm9} run build && wrangler deploy`,
114171
- preview: `${npm9} run build && wrangler dev`,
114351
+ deploy: `${npm10} run build && wrangler deploy`,
114352
+ preview: `${npm10} run build && wrangler dev`,
114172
114353
  "cf-typegen": `wrangler types`
114173
114354
  }
114174
114355
  }),
@@ -114458,13 +114639,13 @@ var loadTemplateSnippets = (ctx) => {
114458
114639
 
114459
114640
  // templates/qwik/pages/c3.ts
114460
114641
  var recast6 = __toESM(require_main2());
114461
- var { npm: npm10, npx: npx3, name } = detectPackageManager();
114642
+ var { npm: npm11, npx: npx3, name } = detectPackageManager();
114462
114643
  var generate16 = async (ctx) => {
114463
114644
  await runFrameworkGenerator(ctx, ["playground", ctx.project.name]);
114464
114645
  };
114465
114646
  var configure8 = async (ctx) => {
114466
114647
  const cmd = [
114467
- name === "pnpm" ? npm10 : npx3,
114648
+ name === "pnpm" ? npm11 : npx3,
114468
114649
  "qwik",
114469
114650
  "add",
114470
114651
  "cloudflare-pages",
@@ -114532,8 +114713,8 @@ var config29 = {
114532
114713
  configure: configure8,
114533
114714
  transformPackageJson: async () => ({
114534
114715
  scripts: {
114535
- deploy: `${npm10} run build && wrangler pages deploy`,
114536
- preview: `${npm10} run build && wrangler pages dev`,
114716
+ deploy: `${npm11} run build && wrangler pages deploy`,
114717
+ preview: `${npm11} run build && wrangler pages dev`,
114537
114718
  "cf-typegen": `wrangler types`
114538
114719
  }
114539
114720
  }),
@@ -114546,13 +114727,13 @@ var c3_default31 = config29;
114546
114727
 
114547
114728
  // templates/qwik/workers/c3.ts
114548
114729
  var recast7 = __toESM(require_main2());
114549
- var { npm: npm11, npx: npx4, name: name2 } = detectPackageManager();
114730
+ var { npm: npm12, npx: npx4, name: name2 } = detectPackageManager();
114550
114731
  var generate17 = async (ctx) => {
114551
114732
  await runFrameworkGenerator(ctx, ["playground", ctx.project.name]);
114552
114733
  };
114553
114734
  var configure9 = async (ctx) => {
114554
114735
  const cmd = [
114555
- name2 === "pnpm" ? npm11 : npx4,
114736
+ name2 === "pnpm" ? npm12 : npx4,
114556
114737
  "qwik",
114557
114738
  "add",
114558
114739
  "cloudflare-workers",
@@ -114619,8 +114800,8 @@ var config30 = {
114619
114800
  configure: configure9,
114620
114801
  transformPackageJson: async () => ({
114621
114802
  scripts: {
114622
- deploy: `${npm11} run build && wrangler deploy`,
114623
- preview: `${npm11} run build && wrangler dev`,
114803
+ deploy: `${npm12} run build && wrangler deploy`,
114804
+ preview: `${npm12} run build && wrangler dev`,
114624
114805
  "cf-typegen": `wrangler types`
114625
114806
  }
114626
114807
  }),
@@ -114640,7 +114821,7 @@ var c3_default33 = config31;
114640
114821
 
114641
114822
  // templates/react-router/c3.ts
114642
114823
  var import_node_path19 = require("node:path");
114643
- var { npm: npm12 } = detectPackageManager();
114824
+ var { npm: npm13 } = detectPackageManager();
114644
114825
  var generate18 = async (ctx) => {
114645
114826
  await runFrameworkGenerator(ctx, [
114646
114827
  ctx.project.name,
@@ -114681,8 +114862,8 @@ var config32 = {
114681
114862
  configure: configure10,
114682
114863
  transformPackageJson: async () => ({
114683
114864
  scripts: {
114684
- deploy: `${npm12} run build && wrangler deploy`,
114685
- preview: `${npm12} run build && vite preview`,
114865
+ deploy: `${npm13} run build && wrangler deploy`,
114866
+ preview: `${npm13} run build && vite preview`,
114686
114867
  "cf-typegen": `wrangler types`,
114687
114868
  typecheck: `wrangler types && react-router typegen && tsc -b`,
114688
114869
  postinstall: `wrangler types`
@@ -114695,7 +114876,7 @@ var config32 = {
114695
114876
  var c3_default34 = config32;
114696
114877
 
114697
114878
  // templates/react/pages/c3.ts
114698
- var { npm: npm13 } = detectPackageManager();
114879
+ var { npm: npm14 } = detectPackageManager();
114699
114880
  var generate19 = async (ctx) => {
114700
114881
  const variant = await getVariant(ctx);
114701
114882
  await runFrameworkGenerator(ctx, [
@@ -114755,8 +114936,8 @@ var config33 = {
114755
114936
  generate: generate19,
114756
114937
  transformPackageJson: async () => ({
114757
114938
  scripts: {
114758
- deploy: `${npm13} run build && wrangler pages deploy`,
114759
- preview: `${npm13} run build && wrangler pages dev`,
114939
+ deploy: `${npm14} run build && wrangler pages deploy`,
114940
+ preview: `${npm14} run build && wrangler pages dev`,
114760
114941
  "cf-typegen": `wrangler types`
114761
114942
  }
114762
114943
  }),
@@ -114767,11 +114948,11 @@ var config33 = {
114767
114948
  var c3_default35 = config33;
114768
114949
 
114769
114950
  // templates/react/workers/c3.ts
114770
- var import_node_assert5 = __toESM(require("node:assert"));
114951
+ var import_node_assert6 = __toESM(require("node:assert"));
114771
114952
  var recast8 = __toESM(require_main2());
114772
114953
  var b = recast8.types.builders;
114773
114954
  var t = recast8.types.namedTypes;
114774
- var { npm: npm14 } = detectPackageManager();
114955
+ var { npm: npm15 } = detectPackageManager();
114775
114956
  var generate20 = async (ctx) => {
114776
114957
  const variant = await getVariant2(ctx);
114777
114958
  ctx.args.lang = variant.lang;
@@ -114815,9 +114996,9 @@ function transformViteConfig(ctx) {
114815
114996
  return this.traverse(n);
114816
114997
  }
114817
114998
  const config50 = n.node.arguments[0];
114818
- (0, import_node_assert5.default)(t.ObjectExpression.check(config50));
114999
+ (0, import_node_assert6.default)(t.ObjectExpression.check(config50));
114819
115000
  const pluginsProp = config50.properties.find((prop) => isPluginsProp(prop));
114820
- (0, import_node_assert5.default)(pluginsProp && t.ArrayExpression.check(pluginsProp.value));
115001
+ (0, import_node_assert6.default)(pluginsProp && t.ArrayExpression.check(pluginsProp.value));
114821
115002
  pluginsProp.value.elements.push(
114822
115003
  b.callExpression(b.identifier("cloudflare"), [])
114823
115004
  );
@@ -114881,7 +115062,7 @@ async function getVariant2(ctx) {
114881
115062
  defaultValue: variantsOptions2[0].value
114882
115063
  });
114883
115064
  const selected = variantsOptions2.find((variant) => variant.value === value);
114884
- (0, import_node_assert5.default)(selected, "Expected a variant to be selected");
115065
+ (0, import_node_assert6.default)(selected, "Expected a variant to be selected");
114885
115066
  return selected;
114886
115067
  }
114887
115068
  var config34 = {
@@ -114905,8 +115086,8 @@ var config34 = {
114905
115086
  configure: configure11,
114906
115087
  transformPackageJson: async (_, ctx) => ({
114907
115088
  scripts: {
114908
- deploy: `${npm14} run build && wrangler deploy`,
114909
- preview: `${npm14} run build && vite preview`,
115089
+ deploy: `${npm15} run build && wrangler deploy`,
115090
+ preview: `${npm15} run build && vite preview`,
114910
115091
  ...usesTypescript(ctx) && { "cf-typegen": `wrangler types` }
114911
115092
  }
114912
115093
  }),
@@ -114924,7 +115105,7 @@ var config35 = {
114924
115105
  var c3_default37 = config35;
114925
115106
 
114926
115107
  // templates/redwood/c3.ts
114927
- var { npm: npm15 } = detectPackageManager();
115108
+ var { npm: npm16 } = detectPackageManager();
114928
115109
  var generate21 = async (ctx) => {
114929
115110
  await runFrameworkGenerator(ctx, [ctx.project.name]);
114930
115111
  logRaw("");
@@ -114938,8 +115119,8 @@ var config36 = {
114938
115119
  generate: generate21,
114939
115120
  transformPackageJson: async () => ({
114940
115121
  scripts: {
114941
- deploy: `${npm15} run release`,
114942
- preview: `${npm15} run build && wrangler dev`,
115122
+ deploy: `${npm16} run release`,
115123
+ preview: `${npm16} run build && wrangler dev`,
114943
115124
  "cf-typegen": `wrangler types`
114944
115125
  }
114945
115126
  }),
@@ -114971,7 +115152,7 @@ var c3_default39 = config37;
114971
115152
 
114972
115153
  // templates/solid/c3.ts
114973
115154
  var recast9 = __toESM(require_main2());
114974
- var { npm: npm16 } = detectPackageManager();
115155
+ var { npm: npm17 } = detectPackageManager();
114975
115156
  var generate22 = async (ctx) => {
114976
115157
  await runFrameworkGenerator(ctx, ["-p", ctx.project.name, "-s"]);
114977
115158
  logRaw("");
@@ -115017,8 +115198,8 @@ var config38 = {
115017
115198
  configure: configure12,
115018
115199
  transformPackageJson: async () => ({
115019
115200
  scripts: {
115020
- preview: `${npm16} run build && npx wrangler dev`,
115021
- deploy: `${npm16} run build && wrangler deploy`,
115201
+ preview: `${npm17} run build && npx wrangler dev`,
115202
+ deploy: `${npm17} run build && wrangler deploy`,
115022
115203
  "cf-typegen": `wrangler types`
115023
115204
  }
115024
115205
  }),
@@ -115031,7 +115212,7 @@ var c3_default40 = config38;
115031
115212
  // templates/svelte/pages/c3.ts
115032
115213
  var import_node_fs19 = require("node:fs");
115033
115214
  var recast10 = __toESM(require_main2());
115034
- var { npm: npm17 } = detectPackageManager();
115215
+ var { npm: npm18 } = detectPackageManager();
115035
115216
  var generate23 = async (ctx) => {
115036
115217
  await runFrameworkGenerator(ctx, ["create", ctx.project.name]);
115037
115218
  logRaw("");
@@ -115119,7 +115300,7 @@ var updateTypeDefinitions = (ctx) => {
115119
115300
  }
115120
115301
  });
115121
115302
  };
115122
- var typesPath3 = "src/worker-configuration.d.ts";
115303
+ var typesPath2 = "src/worker-configuration.d.ts";
115123
115304
  var config39 = {
115124
115305
  configVersion: 1,
115125
115306
  id: "svelte",
@@ -115135,13 +115316,13 @@ var config39 = {
115135
115316
  configure: configure13,
115136
115317
  transformPackageJson: async (original, ctx) => {
115137
115318
  let scripts = {
115138
- preview: `${npm17} run build && wrangler pages dev`,
115139
- deploy: `${npm17} run build && wrangler pages deploy`
115319
+ preview: `${npm18} run build && wrangler pages dev`,
115320
+ deploy: `${npm18} run build && wrangler pages deploy`
115140
115321
  };
115141
115322
  if (usesTypescript(ctx)) {
115142
115323
  scripts = {
115143
115324
  ...scripts,
115144
- "cf-typegen": `wrangler types ${typesPath3}`
115325
+ "cf-typegen": `wrangler types ${typesPath2}`
115145
115326
  };
115146
115327
  }
115147
115328
  return { scripts };
@@ -115149,13 +115330,13 @@ var config39 = {
115149
115330
  devScript: "dev",
115150
115331
  deployScript: "deploy",
115151
115332
  previewScript: "preview",
115152
- typesPath: typesPath3
115333
+ typesPath: typesPath2
115153
115334
  };
115154
115335
  var c3_default41 = config39;
115155
115336
 
115156
115337
  // templates/svelte/workers/c3.ts
115157
115338
  var recast11 = __toESM(require_main2());
115158
- var { npm: npm18 } = detectPackageManager();
115339
+ var { npm: npm19 } = detectPackageManager();
115159
115340
  var generate24 = async (ctx) => {
115160
115341
  await runFrameworkGenerator(ctx, ["create", ctx.project.name]);
115161
115342
  logRaw("");
@@ -115220,7 +115401,7 @@ var updateTypeDefinitions2 = (ctx) => {
115220
115401
  }
115221
115402
  });
115222
115403
  };
115223
- var typesPath4 = "./src/worker-configuration.d.ts";
115404
+ var typesPath3 = "./src/worker-configuration.d.ts";
115224
115405
  var config40 = {
115225
115406
  configVersion: 1,
115226
115407
  id: "svelte",
@@ -115235,13 +115416,13 @@ var config40 = {
115235
115416
  configure: configure14,
115236
115417
  transformPackageJson: async (original, ctx) => {
115237
115418
  let scripts = {
115238
- preview: `${npm18} run build && wrangler dev`,
115239
- deploy: `${npm18} run build && wrangler deploy`
115419
+ preview: `${npm19} run build && wrangler dev`,
115420
+ deploy: `${npm19} run build && wrangler deploy`
115240
115421
  };
115241
115422
  if (usesTypescript(ctx)) {
115242
115423
  scripts = {
115243
115424
  ...scripts,
115244
- "cf-typegen": `wrangler types ${typesPath4}`
115425
+ "cf-typegen": `wrangler types ${typesPath3}`
115245
115426
  };
115246
115427
  }
115247
115428
  return { scripts };
@@ -115249,7 +115430,7 @@ var config40 = {
115249
115430
  devScript: "dev",
115250
115431
  deployScript: "deploy",
115251
115432
  previewScript: "preview",
115252
- typesPath: typesPath4
115433
+ typesPath: typesPath3
115253
115434
  };
115254
115435
  var c3_default42 = config40;
115255
115436
 
@@ -115261,7 +115442,7 @@ var config41 = {
115261
115442
  var c3_default43 = config41;
115262
115443
 
115263
115444
  // templates/tanstack-start/c3.ts
115264
- var { npm: npm19 } = detectPackageManager();
115445
+ var { npm: npm20 } = detectPackageManager();
115265
115446
  var generate25 = async (ctx) => {
115266
115447
  await runFrameworkGenerator(ctx, [
115267
115448
  // @tanstack/cli uses `create` as a subcommand
@@ -115287,8 +115468,8 @@ var config42 = {
115287
115468
  generate: generate25,
115288
115469
  transformPackageJson: async () => ({
115289
115470
  scripts: {
115290
- deploy: `${npm19} run build && wrangler deploy`,
115291
- preview: `${npm19} run build && vite preview`,
115471
+ deploy: `${npm20} run build && wrangler deploy`,
115472
+ preview: `${npm20} run build && vite preview`,
115292
115473
  "cf-typegen": `wrangler types`
115293
115474
  }
115294
115475
  }),
@@ -115352,7 +115533,7 @@ var config44 = {
115352
115533
  var experimental_c3_default2 = config44;
115353
115534
 
115354
115535
  // templates/vue/pages/c3.ts
115355
- var { npm: npm20 } = detectPackageManager();
115536
+ var { npm: npm21 } = detectPackageManager();
115356
115537
  var generate28 = async (ctx) => {
115357
115538
  await runFrameworkGenerator(ctx, [ctx.project.name]);
115358
115539
  };
@@ -115368,8 +115549,8 @@ var config45 = {
115368
115549
  generate: generate28,
115369
115550
  transformPackageJson: async () => ({
115370
115551
  scripts: {
115371
- deploy: `${npm20} run build && wrangler pages deploy`,
115372
- preview: `${npm20} run build && wrangler pages dev`,
115552
+ deploy: `${npm21} run build && wrangler pages deploy`,
115553
+ preview: `${npm21} run build && wrangler pages dev`,
115373
115554
  "cf-typegen": `wrangler types`
115374
115555
  }
115375
115556
  }),
@@ -115380,7 +115561,7 @@ var config45 = {
115380
115561
  var c3_default46 = config45;
115381
115562
 
115382
115563
  // templates/vue/workers/c3.ts
115383
- var { npm: npm21 } = detectPackageManager();
115564
+ var { npm: npm22 } = detectPackageManager();
115384
115565
  var generate29 = async (ctx) => {
115385
115566
  const lang = ctx.args.lang ?? await inputPrompt({
115386
115567
  type: "select",
@@ -115443,8 +115624,8 @@ var config46 = {
115443
115624
  generate: generate29,
115444
115625
  transformPackageJson: async (_, ctx) => ({
115445
115626
  scripts: {
115446
- deploy: `${npm21} run build && wrangler deploy`,
115447
- preview: `${npm21} run build && wrangler dev`,
115627
+ deploy: `${npm22} run build && wrangler deploy`,
115628
+ preview: `${npm22} run build && wrangler dev`,
115448
115629
  ...usesTypescript(ctx) && { "cf-typegen": `wrangler types` }
115449
115630
  }
115450
115631
  }),
@@ -115463,7 +115644,7 @@ var c3_default48 = config47;
115463
115644
 
115464
115645
  // templates/waku/c3.ts
115465
115646
  var import_node_path20 = require("node:path");
115466
- var { npm: npm22 } = detectPackageManager();
115647
+ var { npm: npm23 } = detectPackageManager();
115467
115648
  var generate30 = async (ctx) => {
115468
115649
  await runFrameworkGenerator(ctx, [
115469
115650
  "--project-name",
@@ -115503,8 +115684,8 @@ var config48 = {
115503
115684
  configure: configure16,
115504
115685
  transformPackageJson: async () => ({
115505
115686
  scripts: {
115506
- deploy: `${npm22} run build && wrangler deploy`,
115507
- preview: `NODE_ENV=production ${npm22} run build && wrangler dev`,
115687
+ deploy: `${npm23} run build && wrangler deploy`,
115688
+ preview: `NODE_ENV=production ${npm23} run build && wrangler dev`,
115508
115689
  start: `wrangler dev`,
115509
115690
  "cf-typegen": `wrangler types`
115510
115691
  }
@@ -115516,7 +115697,7 @@ var config48 = {
115516
115697
  var c3_default49 = config48;
115517
115698
 
115518
115699
  // templates/waku/experimental-c3.ts
115519
- var { npm: npm23 } = detectPackageManager();
115700
+ var { npm: npm24 } = detectPackageManager();
115520
115701
  var generate31 = async (ctx) => {
115521
115702
  await runFrameworkGenerator(ctx, [
115522
115703
  "--project-name",
@@ -115585,10 +115766,10 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
115585
115766
  `;
115586
115767
 
115587
115768
  // src/git.ts
115588
- var import_node_assert6 = __toESM(require("node:assert"));
115769
+ var import_node_assert7 = __toESM(require("node:assert"));
115589
115770
 
115590
115771
  // ../wrangler/package.json
115591
- var version3 = "4.121.0";
115772
+ var version3 = "4.123.0";
115592
115773
 
115593
115774
  // src/git.ts
115594
115775
  var offerGit = async (ctx) => {
@@ -115624,7 +115805,7 @@ var offerGit = async (ctx) => {
115624
115805
  }
115625
115806
  };
115626
115807
  var gitCommit = async (ctx) => {
115627
- import_node_assert6.default.notStrictEqual(
115808
+ import_node_assert7.default.notStrictEqual(
115628
115809
  ctx.args.git,
115629
115810
  void 0,
115630
115811
  "Expected git context to be defined by now"
@@ -115675,7 +115856,7 @@ var createCommitMessage = async (ctx) => {
115675
115856
  { key: "C3", value: `create-cloudflare@${version2}` },
115676
115857
  { key: "project name", value: ctx.project.name },
115677
115858
  ...framework ? [{ key: "framework", value: ctx.template.id }] : [],
115678
- ...framework ? [{ key: "framework cli", value: getFrameworkCli(ctx) }] : [],
115859
+ ...framework && ctx.template.frameworkCliUsed !== false ? [{ key: "framework cli", value: getFrameworkCli(ctx) }] : [],
115679
115860
  {
115680
115861
  key: "package manager",
115681
115862
  value: `${packageManager.name}@${packageManager.version}`
@@ -115852,8 +116033,8 @@ var isAllowedExistingFile = (file3) => {
115852
116033
  /^yarn-debug\.log/,
115853
116034
  /^yarn-error\.log/
115854
116035
  ];
115855
- for (const regex2 of allowedExistingPatters) {
115856
- if (regex2.test(file3)) {
116036
+ for (const regex3 of allowedExistingPatters) {
116037
+ if (regex3.test(file3)) {
115857
116038
  return true;
115858
116039
  }
115859
116040
  }
@@ -117014,14 +117195,15 @@ var updateWranglerConfig = async (ctx) => {
117014
117195
  "$schema",
117015
117196
  "node_modules/wrangler/config-schema.json"
117016
117197
  );
117198
+ const compatibilityDate = await getCompatibilityDate(
117199
+ wranglerJson.compatibility_date,
117200
+ ctx.project.path
117201
+ );
117017
117202
  wranglerJson = appendJSONProperty(wranglerJson, "name", ctx.project.name);
117018
117203
  wranglerJson = appendJSONProperty(
117019
117204
  wranglerJson,
117020
117205
  "compatibility_date",
117021
- await getCompatibilityDate(
117022
- wranglerJson.compatibility_date,
117023
- ctx.project.path
117024
- )
117206
+ compatibilityDate
117025
117207
  );
117026
117208
  wranglerJson = appendJSONProperty(wranglerJson, "observability", {
117027
117209
  enabled: true
@@ -117032,7 +117214,7 @@ var updateWranglerConfig = async (ctx) => {
117032
117214
  "upload_source_maps",
117033
117215
  true
117034
117216
  );
117035
- wranglerJson = addNodejsCompatFlag(wranglerJson);
117217
+ wranglerJson = applyNodejsCompatFlags(wranglerJson, compatibilityDate);
117036
117218
  }
117037
117219
  addHintsAsJsonComments(wranglerJson);
117038
117220
  writeWranglerJsonOrJsonc(ctx, wranglerJson);
@@ -117043,15 +117225,16 @@ var updateWranglerConfig = async (ctx) => {
117043
117225
  strToml = strToml.replaceAll(key, value);
117044
117226
  }
117045
117227
  const wranglerToml = dist_default4.parse(strToml);
117046
- wranglerToml.name = ctx.project.name;
117047
- wranglerToml.compatibility_date = await getCompatibilityDate(
117228
+ const compatibilityDate = await getCompatibilityDate(
117048
117229
  wranglerToml.compatibility_date,
117049
117230
  ctx.project.path
117050
117231
  );
117232
+ wranglerToml.name = ctx.project.name;
117233
+ wranglerToml.compatibility_date = compatibilityDate;
117051
117234
  wranglerToml.observability ??= { enabled: true };
117052
117235
  if (ctx.args.lang !== "python") {
117053
117236
  wranglerToml.upload_source_maps ??= true;
117054
- addNodejsCompatFlagToToml(wranglerToml);
117237
+ applyNodejsCompatFlagsToToml(wranglerToml, compatibilityDate);
117055
117238
  }
117056
117239
  writeWranglerToml(
117057
117240
  ctx,
@@ -117195,27 +117378,47 @@ function generateHintsAsTomlComments(wranglerConfig) {
117195
117378
  }
117196
117379
  return commentLines.join("\n");
117197
117380
  }
117198
- function addNodejsCompatFlag(wranglerConfig) {
117381
+ var DEFAULT_ON_NODEJS_COMPAT_FLAGS = ["nodejs_compat", "nodejs_compat_v2"];
117382
+ function reconcileNodejsCompatFlags(compatibilityDate, existingFlags) {
117383
+ if (isNodejsCompatDefaultOn(compatibilityDate)) {
117384
+ const flags = existingFlags.filter(
117385
+ (flag) => !DEFAULT_ON_NODEJS_COMPAT_FLAGS.includes(flag)
117386
+ );
117387
+ return flags.length === existingFlags.length ? void 0 : flags;
117388
+ }
117389
+ const alreadyConfigured = existingFlags.some(
117390
+ (flag) => [...DEFAULT_ON_NODEJS_COMPAT_FLAGS, "no_nodejs_compat"].includes(flag)
117391
+ );
117392
+ return alreadyConfigured ? void 0 : ["nodejs_compat", ...existingFlags];
117393
+ }
117394
+ function applyNodejsCompatFlags(wranglerConfig, compatibilityDate) {
117199
117395
  const existingFlags = Array.isArray(wranglerConfig.compatibility_flags) ? wranglerConfig.compatibility_flags : [];
117200
- if (existingFlags.includes("nodejs_compat") || existingFlags.includes("nodejs_compat_v2") || existingFlags.includes("no_nodejs_compat")) {
117396
+ const flags = reconcileNodejsCompatFlags(compatibilityDate, existingFlags);
117397
+ if (flags === void 0) {
117201
117398
  return wranglerConfig;
117202
117399
  }
117203
- return appendJSONProperty(wranglerConfig, "compatibility_flags", [
117204
- "nodejs_compat",
117205
- ...existingFlags
117206
- ]);
117400
+ if (flags.length === 0) {
117401
+ delete wranglerConfig.compatibility_flags;
117402
+ return wranglerConfig;
117403
+ }
117404
+ return appendJSONProperty(wranglerConfig, "compatibility_flags", flags);
117207
117405
  }
117208
- function addNodejsCompatFlagToToml(wranglerConfig) {
117406
+ function applyNodejsCompatFlagsToToml(wranglerConfig, compatibilityDate) {
117209
117407
  const existingFlags = Array.isArray(wranglerConfig.compatibility_flags) ? wranglerConfig.compatibility_flags : [];
117210
- if (existingFlags.includes("nodejs_compat") || existingFlags.includes("nodejs_compat_v2") || existingFlags.includes("no_nodejs_compat")) {
117408
+ const flags = reconcileNodejsCompatFlags(compatibilityDate, existingFlags);
117409
+ if (flags === void 0) {
117410
+ return;
117411
+ }
117412
+ if (flags.length === 0) {
117413
+ delete wranglerConfig.compatibility_flags;
117211
117414
  return;
117212
117415
  }
117213
- wranglerConfig.compatibility_flags = ["nodejs_compat", ...existingFlags];
117416
+ wranglerConfig.compatibility_flags = flags;
117214
117417
  }
117215
117418
 
117216
117419
  // src/deploy.ts
117217
117420
  var offerToDeploy = async (ctx) => {
117218
- const { npm: npm24 } = detectPackageManager();
117421
+ const { npm: npm25 } = detectPackageManager();
117219
117422
  startSection(`Deploy with Cloudflare`, `Step 3 of 3`);
117220
117423
  if (!await isDeployable(ctx)) {
117221
117424
  ctx.args.deploy = false;
@@ -117226,7 +117429,7 @@ var offerToDeploy = async (ctx) => {
117226
117429
  );
117227
117430
  }
117228
117431
  const label = `deploy via \`${quoteShellArgs([
117229
- npm24,
117432
+ npm25,
117230
117433
  "run",
117231
117434
  ctx.template.deployScript ?? "deploy"
117232
117435
  ])}\``;
@@ -117262,11 +117465,11 @@ var readWranglerConfig = (ctx) => {
117262
117465
  return dist_default4.parse(wranglerTomlStr.replace(/\r\n/g, "\n"));
117263
117466
  };
117264
117467
  var runDeploy = async (ctx) => {
117265
- const { npm: npm24, name: pm3 } = detectPackageManager();
117468
+ const { npm: npm25, name: pm3 } = detectPackageManager();
117266
117469
  if (!ctx.account?.id) {
117267
117470
  throw new Error("Failed to read Cloudflare account.");
117268
117471
  }
117269
- const baseDeployCmd = [npm24, "run", ctx.template.deployScript ?? "deploy"];
117472
+ const baseDeployCmd = [npm25, "run", ctx.template.deployScript ?? "deploy"];
117270
117473
  const insideGitRepo = await isInsideGitRepo(ctx.project.path);
117271
117474
  const deployCmd = [
117272
117475
  ...baseDeployCmd,
@@ -117382,9 +117585,9 @@ var printSummary = (ctx) => {
117382
117585
  const dashboardUrl = ctx.account ? `https://dash.cloudflare.com/?to=/:account/workers/services/view/${ctx.project.name}/production` : null;
117383
117586
  const relativePath = (0, import_node_path25.relative)(ctx.originalCWD, ctx.project.path);
117384
117587
  const cdCommand = relativePath ? `cd ${relativePath}` : null;
117385
- const { npm: npm24 } = detectPackageManager();
117588
+ const { npm: npm25 } = detectPackageManager();
117386
117589
  const deployCommand = quoteShellArgs([
117387
- npm24,
117590
+ npm25,
117388
117591
  "run",
117389
117592
  ctx.template.deployScript ?? "deploy"
117390
117593
  ]);
@@ -117450,8 +117653,8 @@ function indentString(string4, count = 1, options = {}) {
117450
117653
  if (count === 0) {
117451
117654
  return string4;
117452
117655
  }
117453
- const regex2 = includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
117454
- return string4.replace(regex2, indent2.repeat(count));
117656
+ const regex3 = includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
117657
+ return string4.replace(regex3, indent2.repeat(count));
117455
117658
  }
117456
117659
 
117457
117660
  // ../../node_modules/.pnpm/get-east-asian-width@1.2.0/node_modules/get-east-asian-width/lookup.js
@@ -117537,7 +117740,7 @@ var wrapWord3 = (rows, word, columns) => {
117537
117740
  const characters = [...word];
117538
117741
  let isInsideEscape = false;
117539
117742
  let isInsideLinkEscape = false;
117540
- let visible = stringWidth2(stripAnsi2(rows.at(-1)));
117743
+ let visible = stringWidth2(stripAnsi3(rows.at(-1)));
117541
117744
  for (const [index, character] of characters.entries()) {
117542
117745
  const characterLength = stringWidth2(character);
117543
117746
  if (visible + characterLength <= columns) {
@@ -119172,16 +119375,16 @@ async function addTypes(ctx) {
119172
119375
  if (!usesTypescript(ctx) || ctx.template.workersTypes === "none") {
119173
119376
  return;
119174
119377
  }
119175
- const { npm: npm24 } = detectPackageManager();
119378
+ const { npm: npm25 } = detectPackageManager();
119176
119379
  if (ctx.template.workersTypes === "installed") {
119177
- await installWorkersTypes(npm24);
119380
+ await installWorkersTypes(npm25);
119178
119381
  } else if (ctx.template.workersTypes === "generated") {
119179
- await generateWorkersTypes(ctx, npm24);
119382
+ await generateWorkersTypes(ctx, npm25);
119180
119383
  }
119181
- const usesNodeCompat = await maybeInstallNodeTypes(ctx, npm24);
119384
+ const usesNodeCompat = await maybeInstallNodeTypes(ctx, npm25);
119182
119385
  await updateTsConfig(ctx, { usesNodeCompat });
119183
119386
  }
119184
- async function generateWorkersTypes(ctx, npm24) {
119387
+ async function generateWorkersTypes(ctx, npm25) {
119185
119388
  const packageJsonPath = (0, import_node_path26.join)(ctx.project.path, "package.json");
119186
119389
  if (!(0, import_node_fs23.existsSync)(packageJsonPath)) {
119187
119390
  return;
@@ -119190,7 +119393,7 @@ async function generateWorkersTypes(ctx, npm24) {
119190
119393
  if (!packageManifest.scripts?.["cf-typegen"]) {
119191
119394
  return;
119192
119395
  }
119193
- const typesCmd = [npm24, "run", "cf-typegen"];
119396
+ const typesCmd = [npm25, "run", "cf-typegen"];
119194
119397
  await runCommand(typesCmd, {
119195
119398
  cwd: ctx.project.path,
119196
119399
  silent: true,
@@ -119202,7 +119405,7 @@ async function generateWorkersTypes(ctx, npm24) {
119202
119405
  writeFile3(packageJsonPath, JSON.stringify(packageManifest, null, 2));
119203
119406
  }
119204
119407
  }
119205
- var maybeInstallNodeTypes = async (ctx, npm24) => {
119408
+ var maybeInstallNodeTypes = async (ctx, npm25) => {
119206
119409
  let parsedConfig = {};
119207
119410
  if (wranglerJsonOrJsoncExists(ctx)) {
119208
119411
  parsedConfig = readWranglerJsonOrJsonc(ctx);
@@ -119210,12 +119413,16 @@ var maybeInstallNodeTypes = async (ctx, npm24) => {
119210
119413
  const wranglerTomlStr = readWranglerToml(ctx);
119211
119414
  parsedConfig = dist_default4.parse(wranglerTomlStr);
119212
119415
  }
119213
- const compatibilityFlags = Array.isArray(parsedConfig["compatibility_flags"]) ? parsedConfig["compatibility_flags"] : [];
119214
- if (compatibilityFlags.includes("nodejs_compat") || compatibilityFlags.includes("nodejs_compat_v2")) {
119416
+ const compatibilityFlags = Array.isArray(
119417
+ parsedConfig["compatibility_flags"]
119418
+ ) ? parsedConfig["compatibility_flags"] : [];
119419
+ const compatibilityDate = typeof parsedConfig["compatibility_date"] === "string" ? parsedConfig["compatibility_date"] : "";
119420
+ const { isNodejsCompatEnabled, isNodejsCompatV2Enabled } = resolveNodejsCompat(compatibilityDate, compatibilityFlags);
119421
+ if (isNodejsCompatEnabled || isNodejsCompatV2Enabled) {
119215
119422
  await installPackages2(["@types/node"], {
119216
119423
  dev: true,
119217
119424
  startText: "Installing @types/node",
119218
- doneText: `${brandColor("installed")} ${dim(`via ${npm24}`)}`
119425
+ doneText: `${brandColor("installed")} ${dim(`via ${npm25}`)}`
119219
119426
  });
119220
119427
  return true;
119221
119428
  }
@@ -119294,11 +119501,11 @@ function hasProjectReferences(config50) {
119294
119501
  const tsconfig = config50;
119295
119502
  return Array.isArray(tsconfig.references) && tsconfig.references.length > 0;
119296
119503
  }
119297
- async function installWorkersTypes(npm24) {
119504
+ async function installWorkersTypes(npm25) {
119298
119505
  await installPackages2(["@cloudflare/workers-types"], {
119299
119506
  dev: true,
119300
119507
  startText: "Installing @cloudflare/workers-types",
119301
- doneText: `${brandColor("installed")} ${dim(`via ${npm24}`)}`
119508
+ doneText: `${brandColor("installed")} ${dim(`via ${npm25}`)}`
119302
119509
  });
119303
119510
  }
119304
119511