wrangler 4.24.4 → 4.25.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.
@@ -2723,7 +2723,7 @@ var require_util = __commonJS({
2723
2723
  "../../node_modules/.pnpm/undici@7.11.0/node_modules/undici/lib/core/util.js"(exports2, module3) {
2724
2724
  "use strict";
2725
2725
  init_import_meta_url();
2726
- var assert41 = require("assert");
2726
+ var assert42 = require("assert");
2727
2727
  var { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols();
2728
2728
  var { IncomingMessage } = require("http");
2729
2729
  var stream2 = require("stream");
@@ -2745,7 +2745,7 @@ var require_util = __commonJS({
2745
2745
  this[kBodyUsed] = false;
2746
2746
  }
2747
2747
  async *[Symbol.asyncIterator]() {
2748
- assert41(!this[kBodyUsed], "disturbed");
2748
+ assert42(!this[kBodyUsed], "disturbed");
2749
2749
  this[kBodyUsed] = true;
2750
2750
  yield* this[kBody];
2751
2751
  }
@@ -2757,7 +2757,7 @@ var require_util = __commonJS({
2757
2757
  if (isStream2(body)) {
2758
2758
  if (bodyLength(body) === 0) {
2759
2759
  body.on("data", function() {
2760
- assert41(false);
2760
+ assert42(false);
2761
2761
  });
2762
2762
  }
2763
2763
  if (typeof body.readableDidRead !== "boolean") {
@@ -2871,7 +2871,7 @@ var require_util = __commonJS({
2871
2871
  function getHostname(host) {
2872
2872
  if (host[0] === "[") {
2873
2873
  const idx2 = host.indexOf("]");
2874
- assert41(idx2 !== -1);
2874
+ assert42(idx2 !== -1);
2875
2875
  return host.substring(1, idx2);
2876
2876
  }
2877
2877
  const idx = host.indexOf(":");
@@ -2883,7 +2883,7 @@ var require_util = __commonJS({
2883
2883
  if (!host) {
2884
2884
  return null;
2885
2885
  }
2886
- assert41(typeof host === "string");
2886
+ assert42(typeof host === "string");
2887
2887
  const servername = getHostname(host);
2888
2888
  if (net2.isIP(servername)) {
2889
2889
  return "";
@@ -3190,7 +3190,7 @@ var require_util = __commonJS({
3190
3190
  function errorRequest(client, request4, err) {
3191
3191
  try {
3192
3192
  request4.onError(err);
3193
- assert41(request4.aborted);
3193
+ assert42(request4.aborted);
3194
3194
  } catch (err2) {
3195
3195
  client.emit("error", err2);
3196
3196
  }
@@ -3566,7 +3566,7 @@ var require_request = __commonJS({
3566
3566
  InvalidArgumentError,
3567
3567
  NotSupportedError
3568
3568
  } = require_errors();
3569
- var assert41 = require("assert");
3569
+ var assert42 = require("assert");
3570
3570
  var {
3571
3571
  isValidHTTPToken,
3572
3572
  isValidHeaderValue,
@@ -3740,8 +3740,8 @@ var require_request = __commonJS({
3740
3740
  }
3741
3741
  }
3742
3742
  onConnect(abort) {
3743
- assert41(!this.aborted);
3744
- assert41(!this.completed);
3743
+ assert42(!this.aborted);
3744
+ assert42(!this.completed);
3745
3745
  if (this.error) {
3746
3746
  abort(this.error);
3747
3747
  } else {
@@ -3753,8 +3753,8 @@ var require_request = __commonJS({
3753
3753
  return this[kHandler].onResponseStarted?.();
3754
3754
  }
3755
3755
  onHeaders(statusCode, headers, resume, statusText) {
3756
- assert41(!this.aborted);
3757
- assert41(!this.completed);
3756
+ assert42(!this.aborted);
3757
+ assert42(!this.completed);
3758
3758
  if (channels.headers.hasSubscribers) {
3759
3759
  channels.headers.publish({ request: this, response: { statusCode, headers, statusText } });
3760
3760
  }
@@ -3765,8 +3765,8 @@ var require_request = __commonJS({
3765
3765
  }
3766
3766
  }
3767
3767
  onData(chunk) {
3768
- assert41(!this.aborted);
3769
- assert41(!this.completed);
3768
+ assert42(!this.aborted);
3769
+ assert42(!this.completed);
3770
3770
  if (channels.bodyChunkReceived.hasSubscribers) {
3771
3771
  channels.bodyChunkReceived.publish({ request: this, chunk });
3772
3772
  }
@@ -3778,14 +3778,14 @@ var require_request = __commonJS({
3778
3778
  }
3779
3779
  }
3780
3780
  onUpgrade(statusCode, headers, socket) {
3781
- assert41(!this.aborted);
3782
- assert41(!this.completed);
3781
+ assert42(!this.aborted);
3782
+ assert42(!this.completed);
3783
3783
  return this[kHandler].onUpgrade(statusCode, headers, socket);
3784
3784
  }
3785
3785
  onComplete(trailers) {
3786
3786
  this.onFinally();
3787
- assert41(!this.aborted);
3788
- assert41(!this.completed);
3787
+ assert42(!this.aborted);
3788
+ assert42(!this.completed);
3789
3789
  this.completed = true;
3790
3790
  if (channels.trailers.hasSubscribers) {
3791
3791
  channels.trailers.publish({ request: this, trailers });
@@ -4255,7 +4255,7 @@ var require_connect = __commonJS({
4255
4255
  "use strict";
4256
4256
  init_import_meta_url();
4257
4257
  var net2 = require("net");
4258
- var assert41 = require("assert");
4258
+ var assert42 = require("assert");
4259
4259
  var util5 = require_util();
4260
4260
  var { InvalidArgumentError } = require_errors();
4261
4261
  var tls;
@@ -4304,7 +4304,7 @@ var require_connect = __commonJS({
4304
4304
  }
4305
4305
  servername = servername || options.servername || util5.getServerName(host) || null;
4306
4306
  const sessionKey = servername || hostname2;
4307
- assert41(sessionKey);
4307
+ assert42(sessionKey);
4308
4308
  const session = customSession || sessionCache.get(sessionKey) || null;
4309
4309
  port = port || 443;
4310
4310
  socket = tls.connect({
@@ -4324,7 +4324,7 @@ var require_connect = __commonJS({
4324
4324
  sessionCache.set(sessionKey, session2);
4325
4325
  });
4326
4326
  } else {
4327
- assert41(!httpSocket, "httpSocket can only be sent on TLS update");
4327
+ assert42(!httpSocket, "httpSocket can only be sent on TLS update");
4328
4328
  port = port || 80;
4329
4329
  socket = net2.connect({
4330
4330
  highWaterMark: 64 * 1024,
@@ -5274,14 +5274,14 @@ var require_data_url = __commonJS({
5274
5274
  "../../node_modules/.pnpm/undici@7.11.0/node_modules/undici/lib/web/fetch/data-url.js"(exports2, module3) {
5275
5275
  "use strict";
5276
5276
  init_import_meta_url();
5277
- var assert41 = require("assert");
5277
+ var assert42 = require("assert");
5278
5278
  var encoder = new TextEncoder();
5279
5279
  var HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/;
5280
5280
  var HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/;
5281
5281
  var ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g;
5282
5282
  var HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;
5283
5283
  function dataURLProcessor(dataURL) {
5284
- assert41(dataURL.protocol === "data:");
5284
+ assert42(dataURL.protocol === "data:");
5285
5285
  let input = URLSerializer(dataURL, true);
5286
5286
  input = input.slice(5);
5287
5287
  const position = { position: 0 };
@@ -5492,7 +5492,7 @@ var require_data_url = __commonJS({
5492
5492
  function collectAnHTTPQuotedString(input, position, extractValue = false) {
5493
5493
  const positionStart = position.position;
5494
5494
  let value = "";
5495
- assert41(input[position.position] === '"');
5495
+ assert42(input[position.position] === '"');
5496
5496
  position.position++;
5497
5497
  while (true) {
5498
5498
  value += collectASequenceOfCodePoints(
@@ -5513,7 +5513,7 @@ var require_data_url = __commonJS({
5513
5513
  value += input[position.position];
5514
5514
  position.position++;
5515
5515
  } else {
5516
- assert41(quoteOrBackslash === '"');
5516
+ assert42(quoteOrBackslash === '"');
5517
5517
  break;
5518
5518
  }
5519
5519
  }
@@ -5524,7 +5524,7 @@ var require_data_url = __commonJS({
5524
5524
  }
5525
5525
  __name(collectAnHTTPQuotedString, "collectAnHTTPQuotedString");
5526
5526
  function serializeAMimeType(mimeType) {
5527
- assert41(mimeType !== "failure");
5527
+ assert42(mimeType !== "failure");
5528
5528
  const { parameters, essence } = mimeType;
5529
5529
  let serialization = essence;
5530
5530
  for (let [name2, value] of parameters.entries()) {
@@ -6128,7 +6128,7 @@ var require_util2 = __commonJS({
6128
6128
  var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url();
6129
6129
  var { performance: performance2 } = require("perf_hooks");
6130
6130
  var { ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util();
6131
- var assert41 = require("assert");
6131
+ var assert42 = require("assert");
6132
6132
  var { isUint8Array } = require("util/types");
6133
6133
  var { webidl } = require_webidl();
6134
6134
  var supportedHashes = [];
@@ -6339,7 +6339,7 @@ var require_util2 = __commonJS({
6339
6339
  __name(clonePolicyContainer, "clonePolicyContainer");
6340
6340
  function determineRequestsReferrer(request4) {
6341
6341
  const policy = request4.referrerPolicy;
6342
- assert41(policy);
6342
+ assert42(policy);
6343
6343
  let referrerSource = null;
6344
6344
  if (request4.referrer === "client") {
6345
6345
  const globalOrigin = getGlobalOrigin();
@@ -6403,7 +6403,7 @@ var require_util2 = __commonJS({
6403
6403
  }
6404
6404
  __name(determineRequestsReferrer, "determineRequestsReferrer");
6405
6405
  function stripURLForReferrer(url4, originOnly = false) {
6406
- assert41(webidl.is.URL(url4));
6406
+ assert42(webidl.is.URL(url4));
6407
6407
  url4 = new URL(url4);
6408
6408
  if (urlIsLocal(url4)) {
6409
6409
  return "no-referrer";
@@ -6605,7 +6605,7 @@ var require_util2 = __commonJS({
6605
6605
  if (result === void 0) {
6606
6606
  throw new TypeError("Value is not JSON serializable");
6607
6607
  }
6608
- assert41(typeof result === "string");
6608
+ assert42(typeof result === "string");
6609
6609
  return result;
6610
6610
  }
6611
6611
  __name(serializeJavascriptValueToJSONString, "serializeJavascriptValueToJSONString");
@@ -6767,7 +6767,7 @@ var require_util2 = __commonJS({
6767
6767
  __name(readableStreamClose, "readableStreamClose");
6768
6768
  var invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/;
6769
6769
  function isomorphicEncode(input) {
6770
- assert41(!invalidIsomorphicEncodeValueRegex.test(input));
6770
+ assert42(!invalidIsomorphicEncodeValueRegex.test(input));
6771
6771
  return input;
6772
6772
  }
6773
6773
  __name(isomorphicEncode, "isomorphicEncode");
@@ -6794,7 +6794,7 @@ var require_util2 = __commonJS({
6794
6794
  }
6795
6795
  __name(readAllBytes, "readAllBytes");
6796
6796
  function urlIsLocal(url4) {
6797
- assert41("protocol" in url4);
6797
+ assert42("protocol" in url4);
6798
6798
  const protocol = url4.protocol;
6799
6799
  return protocol === "about:" || protocol === "blob:" || protocol === "data:";
6800
6800
  }
@@ -6804,7 +6804,7 @@ var require_util2 = __commonJS({
6804
6804
  }
6805
6805
  __name(urlHasHttpsScheme, "urlHasHttpsScheme");
6806
6806
  function urlIsHttpHttpsScheme(url4) {
6807
- assert41("protocol" in url4);
6807
+ assert42("protocol" in url4);
6808
6808
  const protocol = url4.protocol;
6809
6809
  return protocol === "http:" || protocol === "https:";
6810
6810
  }
@@ -6977,7 +6977,7 @@ var require_util2 = __commonJS({
6977
6977
  continue;
6978
6978
  }
6979
6979
  } else {
6980
- assert41(input.charCodeAt(position.position) === 44);
6980
+ assert42(input.charCodeAt(position.position) === 44);
6981
6981
  position.position++;
6982
6982
  }
6983
6983
  }
@@ -7261,7 +7261,7 @@ var require_formdata_parser = __commonJS({
7261
7261
  var { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url();
7262
7262
  var { makeEntry } = require_formdata();
7263
7263
  var { webidl } = require_webidl();
7264
- var assert41 = require("assert");
7264
+ var assert42 = require("assert");
7265
7265
  var { File: NodeFile } = require("buffer");
7266
7266
  var File2 = globalThis.File ?? NodeFile;
7267
7267
  var formDataNameBuffer = Buffer.from('form-data; name="');
@@ -7292,7 +7292,7 @@ var require_formdata_parser = __commonJS({
7292
7292
  }
7293
7293
  __name(validateBoundary, "validateBoundary");
7294
7294
  function multipartFormDataParser(input, mimeType) {
7295
- assert41(mimeType !== "failure" && mimeType.essence === "multipart/form-data");
7295
+ assert42(mimeType !== "failure" && mimeType.essence === "multipart/form-data");
7296
7296
  const boundaryString = mimeType.parameters.get("boundary");
7297
7297
  if (boundaryString === void 0) {
7298
7298
  throw parsingError("missing boundary in content-type header");
@@ -7353,8 +7353,8 @@ var require_formdata_parser = __commonJS({
7353
7353
  } else {
7354
7354
  value = utf8DecodeBytes(Buffer.from(body));
7355
7355
  }
7356
- assert41(webidl.is.USVString(name2));
7357
- assert41(typeof value === "string" && webidl.is.USVString(value) || webidl.is.File(value));
7356
+ assert42(webidl.is.USVString(name2));
7357
+ assert42(typeof value === "string" && webidl.is.USVString(value) || webidl.is.File(value));
7358
7358
  entryList.push(makeEntry(name2, value, filename));
7359
7359
  }
7360
7360
  }
@@ -7473,7 +7473,7 @@ var require_formdata_parser = __commonJS({
7473
7473
  }
7474
7474
  __name(parseMultipartFormDataHeaders, "parseMultipartFormDataHeaders");
7475
7475
  function parseMultipartFormDataName(input, position) {
7476
- assert41(input[position.position - 1] === 34);
7476
+ assert42(input[position.position - 1] === 34);
7477
7477
  let name2 = collectASequenceOfBytes(
7478
7478
  (char) => char !== 10 && char !== 13 && char !== 34,
7479
7479
  input,
@@ -7548,7 +7548,7 @@ var require_body = __commonJS({
7548
7548
  var { FormData: FormData11, setFormDataState } = require_formdata();
7549
7549
  var { webidl } = require_webidl();
7550
7550
  var { Blob: Blob6 } = require("buffer");
7551
- var assert41 = require("assert");
7551
+ var assert42 = require("assert");
7552
7552
  var { isErrored, isDisturbed } = require("stream");
7553
7553
  var { isArrayBuffer: isArrayBuffer3 } = require("util/types");
7554
7554
  var { serializeAMimeType } = require_data_url();
@@ -7594,7 +7594,7 @@ var require_body = __commonJS({
7594
7594
  type: "bytes"
7595
7595
  });
7596
7596
  }
7597
- assert41(webidl.is.ReadableStream(stream2));
7597
+ assert42(webidl.is.ReadableStream(stream2));
7598
7598
  let action = null;
7599
7599
  let source = null;
7600
7600
  let length = null;
@@ -7713,8 +7713,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r
7713
7713
  __name(extractBody, "extractBody");
7714
7714
  function safelyExtractBody(object, keepalive = false) {
7715
7715
  if (webidl.is.ReadableStream(object)) {
7716
- assert41(!util5.isDisturbed(object), "The body has already been consumed.");
7717
- assert41(!object.locked, "The stream is locked.");
7716
+ assert42(!util5.isDisturbed(object), "The body has already been consumed.");
7717
+ assert42(!object.locked, "The stream is locked.");
7718
7718
  }
7719
7719
  return extractBody(object, keepalive);
7720
7720
  }
@@ -7860,7 +7860,7 @@ var require_client_h1 = __commonJS({
7860
7860
  "../../node_modules/.pnpm/undici@7.11.0/node_modules/undici/lib/dispatcher/client-h1.js"(exports2, module3) {
7861
7861
  "use strict";
7862
7862
  init_import_meta_url();
7863
- var assert41 = require("assert");
7863
+ var assert42 = require("assert");
7864
7864
  var util5 = require_util();
7865
7865
  var { channels } = require_diagnostics();
7866
7866
  var timers = require_timers();
@@ -7941,7 +7941,7 @@ var require_client_h1 = __commonJS({
7941
7941
  * @returns {number}
7942
7942
  */
7943
7943
  wasm_on_status: /* @__PURE__ */ __name((p6, at2, len) => {
7944
- assert41(currentParser.ptr === p6);
7944
+ assert42(currentParser.ptr === p6);
7945
7945
  const start = at2 - currentBufferPtr + currentBufferRef.byteOffset;
7946
7946
  return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len));
7947
7947
  }, "wasm_on_status"),
@@ -7950,7 +7950,7 @@ var require_client_h1 = __commonJS({
7950
7950
  * @returns {number}
7951
7951
  */
7952
7952
  wasm_on_message_begin: /* @__PURE__ */ __name((p6) => {
7953
- assert41(currentParser.ptr === p6);
7953
+ assert42(currentParser.ptr === p6);
7954
7954
  return currentParser.onMessageBegin();
7955
7955
  }, "wasm_on_message_begin"),
7956
7956
  /**
@@ -7960,7 +7960,7 @@ var require_client_h1 = __commonJS({
7960
7960
  * @returns {number}
7961
7961
  */
7962
7962
  wasm_on_header_field: /* @__PURE__ */ __name((p6, at2, len) => {
7963
- assert41(currentParser.ptr === p6);
7963
+ assert42(currentParser.ptr === p6);
7964
7964
  const start = at2 - currentBufferPtr + currentBufferRef.byteOffset;
7965
7965
  return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len));
7966
7966
  }, "wasm_on_header_field"),
@@ -7971,7 +7971,7 @@ var require_client_h1 = __commonJS({
7971
7971
  * @returns {number}
7972
7972
  */
7973
7973
  wasm_on_header_value: /* @__PURE__ */ __name((p6, at2, len) => {
7974
- assert41(currentParser.ptr === p6);
7974
+ assert42(currentParser.ptr === p6);
7975
7975
  const start = at2 - currentBufferPtr + currentBufferRef.byteOffset;
7976
7976
  return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len));
7977
7977
  }, "wasm_on_header_value"),
@@ -7983,7 +7983,7 @@ var require_client_h1 = __commonJS({
7983
7983
  * @returns {number}
7984
7984
  */
7985
7985
  wasm_on_headers_complete: /* @__PURE__ */ __name((p6, statusCode, upgrade, shouldKeepAlive) => {
7986
- assert41(currentParser.ptr === p6);
7986
+ assert42(currentParser.ptr === p6);
7987
7987
  return currentParser.onHeadersComplete(statusCode, upgrade === 1, shouldKeepAlive === 1);
7988
7988
  }, "wasm_on_headers_complete"),
7989
7989
  /**
@@ -7993,7 +7993,7 @@ var require_client_h1 = __commonJS({
7993
7993
  * @returns {number}
7994
7994
  */
7995
7995
  wasm_on_body: /* @__PURE__ */ __name((p6, at2, len) => {
7996
- assert41(currentParser.ptr === p6);
7996
+ assert42(currentParser.ptr === p6);
7997
7997
  const start = at2 - currentBufferPtr + currentBufferRef.byteOffset;
7998
7998
  return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len));
7999
7999
  }, "wasm_on_body"),
@@ -8002,7 +8002,7 @@ var require_client_h1 = __commonJS({
8002
8002
  * @returns {number}
8003
8003
  */
8004
8004
  wasm_on_message_complete: /* @__PURE__ */ __name((p6) => {
8005
- assert41(currentParser.ptr === p6);
8005
+ assert42(currentParser.ptr === p6);
8006
8006
  return currentParser.onMessageComplete();
8007
8007
  }, "wasm_on_message_complete")
8008
8008
  }
@@ -8079,10 +8079,10 @@ var require_client_h1 = __commonJS({
8079
8079
  if (this.socket.destroyed || !this.paused) {
8080
8080
  return;
8081
8081
  }
8082
- assert41(this.ptr != null);
8083
- assert41(currentParser === null);
8082
+ assert42(this.ptr != null);
8083
+ assert42(currentParser === null);
8084
8084
  this.llhttp.llhttp_resume(this.ptr);
8085
- assert41(this.timeoutType === TIMEOUT_BODY);
8085
+ assert42(this.timeoutType === TIMEOUT_BODY);
8086
8086
  if (this.timeout) {
8087
8087
  if (this.timeout.refresh) {
8088
8088
  this.timeout.refresh();
@@ -8105,9 +8105,9 @@ var require_client_h1 = __commonJS({
8105
8105
  * @param {Buffer} chunk
8106
8106
  */
8107
8107
  execute(chunk) {
8108
- assert41(currentParser === null);
8109
- assert41(this.ptr != null);
8110
- assert41(!this.paused);
8108
+ assert42(currentParser === null);
8109
+ assert42(this.ptr != null);
8110
+ assert42(!this.paused);
8111
8111
  const { socket, llhttp } = this;
8112
8112
  if (chunk.length > currentBufferSize) {
8113
8113
  if (currentBufferPtr) {
@@ -8151,8 +8151,8 @@ var require_client_h1 = __commonJS({
8151
8151
  }
8152
8152
  }
8153
8153
  destroy() {
8154
- assert41(currentParser === null);
8155
- assert41(this.ptr != null);
8154
+ assert42(currentParser === null);
8155
+ assert42(this.ptr != null);
8156
8156
  this.llhttp.llhttp_free(this.ptr);
8157
8157
  this.ptr = null;
8158
8158
  this.timeout && timers.clearTimeout(this.timeout);
@@ -8238,14 +8238,14 @@ var require_client_h1 = __commonJS({
8238
8238
  */
8239
8239
  onUpgrade(head) {
8240
8240
  const { upgrade, client, socket, headers, statusCode } = this;
8241
- assert41(upgrade);
8242
- assert41(client[kSocket] === socket);
8243
- assert41(!socket.destroyed);
8244
- assert41(!this.paused);
8245
- assert41((headers.length & 1) === 0);
8241
+ assert42(upgrade);
8242
+ assert42(client[kSocket] === socket);
8243
+ assert42(!socket.destroyed);
8244
+ assert42(!this.paused);
8245
+ assert42((headers.length & 1) === 0);
8246
8246
  const request4 = client[kQueue][client[kRunningIdx]];
8247
- assert41(request4);
8248
- assert41(request4.upgrade || request4.method === "CONNECT");
8247
+ assert42(request4);
8248
+ assert42(request4.upgrade || request4.method === "CONNECT");
8249
8249
  this.statusCode = 0;
8250
8250
  this.statusText = "";
8251
8251
  this.shouldKeepAlive = false;
@@ -8283,8 +8283,8 @@ var require_client_h1 = __commonJS({
8283
8283
  if (!request4) {
8284
8284
  return -1;
8285
8285
  }
8286
- assert41(!this.upgrade);
8287
- assert41(this.statusCode < 200);
8286
+ assert42(!this.upgrade);
8287
+ assert42(this.statusCode < 200);
8288
8288
  if (statusCode === 100) {
8289
8289
  util5.destroy(socket, new SocketError("bad response", util5.getSocketInfo(socket)));
8290
8290
  return -1;
@@ -8293,7 +8293,7 @@ var require_client_h1 = __commonJS({
8293
8293
  util5.destroy(socket, new SocketError("bad upgrade", util5.getSocketInfo(socket)));
8294
8294
  return -1;
8295
8295
  }
8296
- assert41(this.timeoutType === TIMEOUT_HEADERS);
8296
+ assert42(this.timeoutType === TIMEOUT_HEADERS);
8297
8297
  this.statusCode = statusCode;
8298
8298
  this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD.
8299
8299
  request4.method === "HEAD" && !socket[kReset2] && this.connection.toLowerCase() === "keep-alive";
@@ -8306,16 +8306,16 @@ var require_client_h1 = __commonJS({
8306
8306
  }
8307
8307
  }
8308
8308
  if (request4.method === "CONNECT") {
8309
- assert41(client[kRunning] === 1);
8309
+ assert42(client[kRunning] === 1);
8310
8310
  this.upgrade = true;
8311
8311
  return 2;
8312
8312
  }
8313
8313
  if (upgrade) {
8314
- assert41(client[kRunning] === 1);
8314
+ assert42(client[kRunning] === 1);
8315
8315
  this.upgrade = true;
8316
8316
  return 2;
8317
8317
  }
8318
- assert41((this.headers.length & 1) === 0);
8318
+ assert42((this.headers.length & 1) === 0);
8319
8319
  this.headers = [];
8320
8320
  this.headersSize = 0;
8321
8321
  if (this.shouldKeepAlive && client[kPipelining]) {
@@ -8362,14 +8362,14 @@ var require_client_h1 = __commonJS({
8362
8362
  return -1;
8363
8363
  }
8364
8364
  const request4 = client[kQueue][client[kRunningIdx]];
8365
- assert41(request4);
8366
- assert41(this.timeoutType === TIMEOUT_BODY);
8365
+ assert42(request4);
8366
+ assert42(this.timeoutType === TIMEOUT_BODY);
8367
8367
  if (this.timeout) {
8368
8368
  if (this.timeout.refresh) {
8369
8369
  this.timeout.refresh();
8370
8370
  }
8371
8371
  }
8372
- assert41(statusCode >= 200);
8372
+ assert42(statusCode >= 200);
8373
8373
  if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) {
8374
8374
  util5.destroy(socket, new ResponseExceededMaxSizeError());
8375
8375
  return -1;
@@ -8391,10 +8391,10 @@ var require_client_h1 = __commonJS({
8391
8391
  if (upgrade) {
8392
8392
  return 0;
8393
8393
  }
8394
- assert41(statusCode >= 100);
8395
- assert41((this.headers.length & 1) === 0);
8394
+ assert42(statusCode >= 100);
8395
+ assert42((this.headers.length & 1) === 0);
8396
8396
  const request4 = client[kQueue][client[kRunningIdx]];
8397
- assert41(request4);
8397
+ assert42(request4);
8398
8398
  this.statusCode = 0;
8399
8399
  this.statusText = "";
8400
8400
  this.bytesRead = 0;
@@ -8413,7 +8413,7 @@ var require_client_h1 = __commonJS({
8413
8413
  request4.onComplete(headers);
8414
8414
  client[kQueue][client[kRunningIdx]++] = null;
8415
8415
  if (socket[kWriting]) {
8416
- assert41(client[kRunning] === 0);
8416
+ assert42(client[kRunning] === 0);
8417
8417
  util5.destroy(socket, new InformationalError("reset"));
8418
8418
  return constants4.ERROR.PAUSED;
8419
8419
  } else if (!shouldKeepAlive) {
@@ -8434,7 +8434,7 @@ var require_client_h1 = __commonJS({
8434
8434
  const { socket, timeoutType, client, paused } = parser2.deref();
8435
8435
  if (timeoutType === TIMEOUT_HEADERS) {
8436
8436
  if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) {
8437
- assert41(!paused, "cannot be paused while waiting for headers");
8437
+ assert42(!paused, "cannot be paused while waiting for headers");
8438
8438
  util5.destroy(socket, new HeadersTimeoutError());
8439
8439
  }
8440
8440
  } else if (timeoutType === TIMEOUT_BODY) {
@@ -8442,7 +8442,7 @@ var require_client_h1 = __commonJS({
8442
8442
  util5.destroy(socket, new BodyTimeoutError());
8443
8443
  }
8444
8444
  } else if (timeoutType === TIMEOUT_KEEP_ALIVE) {
8445
- assert41(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]);
8445
+ assert42(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]);
8446
8446
  util5.destroy(socket, new InformationalError("socket idle timeout"));
8447
8447
  }
8448
8448
  }
@@ -8526,7 +8526,7 @@ var require_client_h1 = __commonJS({
8526
8526
  }
8527
8527
  __name(connectH1, "connectH1");
8528
8528
  function onHttpSocketError(err) {
8529
- assert41(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
8529
+ assert42(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
8530
8530
  const parser2 = this[kParser];
8531
8531
  if (err.code === "ECONNRESET" && parser2.statusCode && !parser2.shouldKeepAlive) {
8532
8532
  parser2.onMessageComplete();
@@ -8563,7 +8563,7 @@ var require_client_h1 = __commonJS({
8563
8563
  client[kSocket] = null;
8564
8564
  client[kHTTPContext] = null;
8565
8565
  if (client.destroyed) {
8566
- assert41(client[kPending] === 0);
8566
+ assert42(client[kPending] === 0);
8567
8567
  const requests = client[kQueue].splice(client[kRunningIdx]);
8568
8568
  for (let i5 = 0; i5 < requests.length; i5++) {
8569
8569
  const request4 = requests[i5];
@@ -8575,7 +8575,7 @@ var require_client_h1 = __commonJS({
8575
8575
  util5.errorRequest(client, request4, err);
8576
8576
  }
8577
8577
  client[kPendingIdx] = client[kRunningIdx];
8578
- assert41(client[kRunning] === 0);
8578
+ assert42(client[kRunning] === 0);
8579
8579
  client.emit("disconnect", client[kUrl], [client], err);
8580
8580
  client[kResume]();
8581
8581
  }
@@ -8731,13 +8731,13 @@ upgrade: ${upgrade}\r
8731
8731
  } else if (util5.isIterable(body)) {
8732
8732
  writeIterable(abort, body, client, request4, socket, contentLength, header, expectsPayload);
8733
8733
  } else {
8734
- assert41(false);
8734
+ assert42(false);
8735
8735
  }
8736
8736
  return true;
8737
8737
  }
8738
8738
  __name(writeH1, "writeH1");
8739
8739
  function writeStream(abort, body, client, request4, socket, contentLength, header, expectsPayload) {
8740
- assert41(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
8740
+ assert42(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
8741
8741
  let finished = false;
8742
8742
  const writer = new AsyncWriter({ abort, socket, request: request4, contentLength, client, expectsPayload, header });
8743
8743
  const onData = /* @__PURE__ */ __name(function(chunk) {
@@ -8774,7 +8774,7 @@ upgrade: ${upgrade}\r
8774
8774
  return;
8775
8775
  }
8776
8776
  finished = true;
8777
- assert41(socket.destroyed || socket[kWriting] && client[kRunning] <= 1);
8777
+ assert42(socket.destroyed || socket[kWriting] && client[kRunning] <= 1);
8778
8778
  socket.off("drain", onDrain).off("error", onFinished);
8779
8779
  body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose);
8780
8780
  if (!err) {
@@ -8814,12 +8814,12 @@ upgrade: ${upgrade}\r
8814
8814
  \r
8815
8815
  `, "latin1");
8816
8816
  } else {
8817
- assert41(contentLength === null, "no body must not have content length");
8817
+ assert42(contentLength === null, "no body must not have content length");
8818
8818
  socket.write(`${header}\r
8819
8819
  `, "latin1");
8820
8820
  }
8821
8821
  } else if (util5.isBuffer(body)) {
8822
- assert41(contentLength === body.byteLength, "buffer body must have content length");
8822
+ assert42(contentLength === body.byteLength, "buffer body must have content length");
8823
8823
  socket.cork();
8824
8824
  socket.write(`${header}content-length: ${contentLength}\r
8825
8825
  \r
@@ -8839,7 +8839,7 @@ upgrade: ${upgrade}\r
8839
8839
  }
8840
8840
  __name(writeBuffer, "writeBuffer");
8841
8841
  async function writeBlob(abort, body, client, request4, socket, contentLength, header, expectsPayload) {
8842
- assert41(contentLength === body.size, "blob body must have content length");
8842
+ assert42(contentLength === body.size, "blob body must have content length");
8843
8843
  try {
8844
8844
  if (contentLength != null && contentLength !== body.size) {
8845
8845
  throw new RequestContentLengthMismatchError();
@@ -8863,7 +8863,7 @@ upgrade: ${upgrade}\r
8863
8863
  }
8864
8864
  __name(writeBlob, "writeBlob");
8865
8865
  async function writeIterable(abort, body, client, request4, socket, contentLength, header, expectsPayload) {
8866
- assert41(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
8866
+ assert42(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
8867
8867
  let callback = null;
8868
8868
  function onDrain() {
8869
8869
  if (callback) {
@@ -8874,7 +8874,7 @@ upgrade: ${upgrade}\r
8874
8874
  }
8875
8875
  __name(onDrain, "onDrain");
8876
8876
  const waitForDrain = /* @__PURE__ */ __name(() => new Promise((resolve24, reject) => {
8877
- assert41(callback === null);
8877
+ assert42(callback === null);
8878
8878
  if (socket[kError]) {
8879
8879
  reject(socket[kError]);
8880
8880
  } else {
@@ -9027,7 +9027,7 @@ ${len.toString(16)}\r
9027
9027
  const { socket, client, abort } = this;
9028
9028
  socket[kWriting] = false;
9029
9029
  if (err) {
9030
- assert41(client[kRunning] <= 1, "pipeline should only contain this request");
9030
+ assert42(client[kRunning] <= 1, "pipeline should only contain this request");
9031
9031
  abort(err);
9032
9032
  }
9033
9033
  }
@@ -9041,7 +9041,7 @@ var require_client_h2 = __commonJS({
9041
9041
  "../../node_modules/.pnpm/undici@7.11.0/node_modules/undici/lib/dispatcher/client-h2.js"(exports2, module3) {
9042
9042
  "use strict";
9043
9043
  init_import_meta_url();
9044
- var assert41 = require("assert");
9044
+ var assert42 = require("assert");
9045
9045
  var { pipeline } = require("stream");
9046
9046
  var util5 = require_util();
9047
9047
  var {
@@ -9171,7 +9171,7 @@ var require_client_h2 = __commonJS({
9171
9171
  }
9172
9172
  __name(resumeH2, "resumeH2");
9173
9173
  function onHttp2SessionError(err) {
9174
- assert41(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
9174
+ assert42(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
9175
9175
  this[kSocket][kError] = err;
9176
9176
  this[kClient][kOnError](err);
9177
9177
  }
@@ -9204,7 +9204,7 @@ var require_client_h2 = __commonJS({
9204
9204
  util5.errorRequest(client, request4, err);
9205
9205
  client[kPendingIdx] = client[kRunningIdx];
9206
9206
  }
9207
- assert41(client[kRunning] === 0);
9207
+ assert42(client[kRunning] === 0);
9208
9208
  client.emit("disconnect", client[kUrl], [client], err);
9209
9209
  client.emit("connectionError", client[kUrl], [client], err);
9210
9210
  client[kResume]();
@@ -9217,7 +9217,7 @@ var require_client_h2 = __commonJS({
9217
9217
  client[kSocket] = null;
9218
9218
  client[kHTTPContext] = null;
9219
9219
  if (client.destroyed) {
9220
- assert41(client[kPending] === 0);
9220
+ assert42(client[kPending] === 0);
9221
9221
  const requests = client[kQueue].splice(client[kRunningIdx]);
9222
9222
  for (let i5 = 0; i5 < requests.length; i5++) {
9223
9223
  const request4 = requests[i5];
@@ -9235,13 +9235,13 @@ var require_client_h2 = __commonJS({
9235
9235
  this[kHTTP2Session].destroy(err);
9236
9236
  }
9237
9237
  client[kPendingIdx] = client[kRunningIdx];
9238
- assert41(client[kRunning] === 0);
9238
+ assert42(client[kRunning] === 0);
9239
9239
  client.emit("disconnect", client[kUrl], [client], err);
9240
9240
  client[kResume]();
9241
9241
  }
9242
9242
  __name(onHttp2SocketClose, "onHttp2SocketClose");
9243
9243
  function onHttp2SocketError(err) {
9244
- assert41(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
9244
+ assert42(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
9245
9245
  this[kError] = err;
9246
9246
  this[kClient][kOnError](err);
9247
9247
  }
@@ -9360,7 +9360,7 @@ var require_client_h2 = __commonJS({
9360
9360
  process.emitWarning(new RequestContentLengthMismatchError());
9361
9361
  }
9362
9362
  if (contentLength != null) {
9363
- assert41(body, "no body must not have content length");
9363
+ assert42(body, "no body must not have content length");
9364
9364
  headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`;
9365
9365
  }
9366
9366
  session.ref();
@@ -9525,7 +9525,7 @@ var require_client_h2 = __commonJS({
9525
9525
  expectsPayload
9526
9526
  );
9527
9527
  } else {
9528
- assert41(false);
9528
+ assert42(false);
9529
9529
  }
9530
9530
  }
9531
9531
  __name(writeBodyH2, "writeBodyH2");
@@ -9534,7 +9534,7 @@ var require_client_h2 = __commonJS({
9534
9534
  function writeBuffer(abort, h2stream, body, client, request4, socket, contentLength, expectsPayload) {
9535
9535
  try {
9536
9536
  if (body != null && util5.isBuffer(body)) {
9537
- assert41(contentLength === body.byteLength, "buffer body must have content length");
9537
+ assert42(contentLength === body.byteLength, "buffer body must have content length");
9538
9538
  h2stream.cork();
9539
9539
  h2stream.write(body);
9540
9540
  h2stream.uncork();
@@ -9552,7 +9552,7 @@ var require_client_h2 = __commonJS({
9552
9552
  }
9553
9553
  __name(writeBuffer, "writeBuffer");
9554
9554
  function writeStream(abort, socket, expectsPayload, h2stream, body, client, request4, contentLength) {
9555
- assert41(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
9555
+ assert42(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
9556
9556
  const pipe = pipeline(
9557
9557
  body,
9558
9558
  h2stream,
@@ -9578,7 +9578,7 @@ var require_client_h2 = __commonJS({
9578
9578
  }
9579
9579
  __name(writeStream, "writeStream");
9580
9580
  async function writeBlob(abort, h2stream, body, client, request4, socket, contentLength, expectsPayload) {
9581
- assert41(contentLength === body.size, "blob body must have content length");
9581
+ assert42(contentLength === body.size, "blob body must have content length");
9582
9582
  try {
9583
9583
  if (contentLength != null && contentLength !== body.size) {
9584
9584
  throw new RequestContentLengthMismatchError();
@@ -9600,7 +9600,7 @@ var require_client_h2 = __commonJS({
9600
9600
  }
9601
9601
  __name(writeBlob, "writeBlob");
9602
9602
  async function writeIterable(abort, h2stream, body, client, request4, socket, contentLength, expectsPayload) {
9603
- assert41(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
9603
+ assert42(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
9604
9604
  let callback = null;
9605
9605
  function onDrain() {
9606
9606
  if (callback) {
@@ -9611,7 +9611,7 @@ var require_client_h2 = __commonJS({
9611
9611
  }
9612
9612
  __name(onDrain, "onDrain");
9613
9613
  const waitForDrain = /* @__PURE__ */ __name(() => new Promise((resolve24, reject) => {
9614
- assert41(callback === null);
9614
+ assert42(callback === null);
9615
9615
  if (socket[kError]) {
9616
9616
  reject(socket[kError]);
9617
9617
  } else {
@@ -9652,7 +9652,7 @@ var require_client = __commonJS({
9652
9652
  "../../node_modules/.pnpm/undici@7.11.0/node_modules/undici/lib/dispatcher/client.js"(exports2, module3) {
9653
9653
  "use strict";
9654
9654
  init_import_meta_url();
9655
- var assert41 = require("assert");
9655
+ var assert42 = require("assert");
9656
9656
  var net2 = require("net");
9657
9657
  var http5 = require("http");
9658
9658
  var util5 = require_util();
@@ -9942,25 +9942,25 @@ var require_client = __commonJS({
9942
9942
  };
9943
9943
  function onError(client, err) {
9944
9944
  if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") {
9945
- assert41(client[kPendingIdx] === client[kRunningIdx]);
9945
+ assert42(client[kPendingIdx] === client[kRunningIdx]);
9946
9946
  const requests = client[kQueue].splice(client[kRunningIdx]);
9947
9947
  for (let i5 = 0; i5 < requests.length; i5++) {
9948
9948
  const request4 = requests[i5];
9949
9949
  util5.errorRequest(client, request4, err);
9950
9950
  }
9951
- assert41(client[kSize] === 0);
9951
+ assert42(client[kSize] === 0);
9952
9952
  }
9953
9953
  }
9954
9954
  __name(onError, "onError");
9955
9955
  async function connect(client) {
9956
- assert41(!client[kConnecting]);
9957
- assert41(!client[kHTTPContext]);
9956
+ assert42(!client[kConnecting]);
9957
+ assert42(!client[kHTTPContext]);
9958
9958
  let { host, hostname: hostname2, protocol, port } = client[kUrl];
9959
9959
  if (hostname2[0] === "[") {
9960
9960
  const idx = hostname2.indexOf("]");
9961
- assert41(idx !== -1);
9961
+ assert42(idx !== -1);
9962
9962
  const ip = hostname2.substring(1, idx);
9963
- assert41(net2.isIPv6(ip));
9963
+ assert42(net2.isIPv6(ip));
9964
9964
  hostname2 = ip;
9965
9965
  }
9966
9966
  client[kConnecting] = true;
@@ -9999,7 +9999,7 @@ var require_client = __commonJS({
9999
9999
  util5.destroy(socket.on("error", noop), new ClientDestroyedError());
10000
10000
  return;
10001
10001
  }
10002
- assert41(socket);
10002
+ assert42(socket);
10003
10003
  try {
10004
10004
  client[kHTTPContext] = socket.alpnProtocol === "h2" ? await connectH2(client, socket) : await connectH1(client, socket);
10005
10005
  } catch (err) {
@@ -10048,7 +10048,7 @@ var require_client = __commonJS({
10048
10048
  });
10049
10049
  }
10050
10050
  if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") {
10051
- assert41(client[kRunning] === 0);
10051
+ assert42(client[kRunning] === 0);
10052
10052
  while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) {
10053
10053
  const request4 = client[kQueue][client[kPendingIdx]++];
10054
10054
  util5.errorRequest(client, request4, err);
@@ -10083,7 +10083,7 @@ var require_client = __commonJS({
10083
10083
  function _resume(client, sync) {
10084
10084
  while (true) {
10085
10085
  if (client.destroyed) {
10086
- assert41(client[kPending] === 0);
10086
+ assert42(client[kPending] === 0);
10087
10087
  return;
10088
10088
  }
10089
10089
  if (client[kClosedResolve] && !client[kSize]) {
@@ -11142,7 +11142,7 @@ var require_retry_handler = __commonJS({
11142
11142
  "../../node_modules/.pnpm/undici@7.11.0/node_modules/undici/lib/handler/retry-handler.js"(exports2, module3) {
11143
11143
  "use strict";
11144
11144
  init_import_meta_url();
11145
- var assert41 = require("assert");
11145
+ var assert42 = require("assert");
11146
11146
  var { kRetryHandlerDefaultRetry } = require_symbols();
11147
11147
  var { RequestRetryError } = require_errors();
11148
11148
  var WrapHandler = require_wrap_handler();
@@ -11330,8 +11330,8 @@ var require_retry_handler = __commonJS({
11330
11330
  });
11331
11331
  }
11332
11332
  const { start, size, end = size ? size - 1 : null } = contentRange;
11333
- assert41(this.start === start, "content-range mismatch");
11334
- assert41(this.end == null || this.end === end, "content-range mismatch");
11333
+ assert42(this.start === start, "content-range mismatch");
11334
+ assert42(this.end == null || this.end === end, "content-range mismatch");
11335
11335
  return;
11336
11336
  }
11337
11337
  if (this.end == null) {
@@ -11348,11 +11348,11 @@ var require_retry_handler = __commonJS({
11348
11348
  return;
11349
11349
  }
11350
11350
  const { start, size, end = size ? size - 1 : null } = range;
11351
- assert41(
11351
+ assert42(
11352
11352
  start != null && Number.isFinite(start),
11353
11353
  "content-range mismatch"
11354
11354
  );
11355
- assert41(end != null && Number.isFinite(end), "invalid content-length");
11355
+ assert42(end != null && Number.isFinite(end), "invalid content-length");
11356
11356
  this.start = start;
11357
11357
  this.end = end;
11358
11358
  }
@@ -11360,8 +11360,8 @@ var require_retry_handler = __commonJS({
11360
11360
  const contentLength = headers["content-length"];
11361
11361
  this.end = contentLength != null ? Number(contentLength) - 1 : null;
11362
11362
  }
11363
- assert41(Number.isFinite(this.start));
11364
- assert41(
11363
+ assert42(Number.isFinite(this.start));
11364
+ assert42(
11365
11365
  this.end == null || Number.isFinite(this.end),
11366
11366
  "invalid content-length"
11367
11367
  );
@@ -11597,7 +11597,7 @@ var require_readable = __commonJS({
11597
11597
  "../../node_modules/.pnpm/undici@7.11.0/node_modules/undici/lib/api/readable.js"(exports2, module3) {
11598
11598
  "use strict";
11599
11599
  init_import_meta_url();
11600
- var assert41 = require("assert");
11600
+ var assert42 = require("assert");
11601
11601
  var { Readable: Readable8 } = require("stream");
11602
11602
  var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError: AbortError2 } = require_errors();
11603
11603
  var util5 = require_util();
@@ -11794,7 +11794,7 @@ var require_readable = __commonJS({
11794
11794
  this[kBody] = ReadableStreamFrom(this);
11795
11795
  if (this[kConsume]) {
11796
11796
  this[kBody].getReader();
11797
- assert41(this[kBody].locked);
11797
+ assert42(this[kBody].locked);
11798
11798
  }
11799
11799
  }
11800
11800
  return this[kBody];
@@ -11863,7 +11863,7 @@ var require_readable = __commonJS({
11863
11863
  }
11864
11864
  __name(isUnusable, "isUnusable");
11865
11865
  function consume(stream2, type) {
11866
- assert41(!stream2[kConsume]);
11866
+ assert42(!stream2[kConsume]);
11867
11867
  return new Promise((resolve24, reject) => {
11868
11868
  if (isUnusable(stream2)) {
11869
11869
  const rState = stream2._readableState;
@@ -12012,7 +12012,7 @@ var require_api_request = __commonJS({
12012
12012
  "../../node_modules/.pnpm/undici@7.11.0/node_modules/undici/lib/api/api-request.js"(exports2, module3) {
12013
12013
  "use strict";
12014
12014
  init_import_meta_url();
12015
- var assert41 = require("assert");
12015
+ var assert42 = require("assert");
12016
12016
  var { AsyncResource } = require("async_hooks");
12017
12017
  var { Readable: Readable8 } = require_readable();
12018
12018
  var { InvalidArgumentError, RequestAbortedError } = require_errors();
@@ -12083,7 +12083,7 @@ var require_api_request = __commonJS({
12083
12083
  abort(this.reason);
12084
12084
  return;
12085
12085
  }
12086
- assert41(this.callback);
12086
+ assert42(this.callback);
12087
12087
  this.abort = abort;
12088
12088
  this.context = context2;
12089
12089
  }
@@ -12243,7 +12243,7 @@ var require_api_stream = __commonJS({
12243
12243
  "../../node_modules/.pnpm/undici@7.11.0/node_modules/undici/lib/api/api-stream.js"(exports2, module3) {
12244
12244
  "use strict";
12245
12245
  init_import_meta_url();
12246
- var assert41 = require("assert");
12246
+ var assert42 = require("assert");
12247
12247
  var { finished } = require("stream");
12248
12248
  var { AsyncResource } = require("async_hooks");
12249
12249
  var { InvalidArgumentError, InvalidReturnValueError } = require_errors();
@@ -12306,7 +12306,7 @@ var require_api_stream = __commonJS({
12306
12306
  abort(this.reason);
12307
12307
  return;
12308
12308
  }
12309
- assert41(this.callback);
12309
+ assert42(this.callback);
12310
12310
  this.abort = abort;
12311
12311
  this.context = context2;
12312
12312
  }
@@ -12415,7 +12415,7 @@ var require_api_pipeline = __commonJS({
12415
12415
  Duplex: Duplex2,
12416
12416
  PassThrough: PassThrough3
12417
12417
  } = require("stream");
12418
- var assert41 = require("assert");
12418
+ var assert42 = require("assert");
12419
12419
  var { AsyncResource } = require("async_hooks");
12420
12420
  var {
12421
12421
  InvalidArgumentError,
@@ -12539,7 +12539,7 @@ var require_api_pipeline = __commonJS({
12539
12539
  abort(this.reason);
12540
12540
  return;
12541
12541
  }
12542
- assert41(!res, "pipeline cannot be retried");
12542
+ assert42(!res, "pipeline cannot be retried");
12543
12543
  this.abort = abort;
12544
12544
  this.context = context2;
12545
12545
  }
@@ -12625,7 +12625,7 @@ var require_api_upgrade = __commonJS({
12625
12625
  init_import_meta_url();
12626
12626
  var { InvalidArgumentError, SocketError } = require_errors();
12627
12627
  var { AsyncResource } = require("async_hooks");
12628
- var assert41 = require("assert");
12628
+ var assert42 = require("assert");
12629
12629
  var util5 = require_util();
12630
12630
  var { addSignal, removeSignal } = require_abort_signal();
12631
12631
  var UpgradeHandler = class extends AsyncResource {
@@ -12656,7 +12656,7 @@ var require_api_upgrade = __commonJS({
12656
12656
  abort(this.reason);
12657
12657
  return;
12658
12658
  }
12659
- assert41(this.callback);
12659
+ assert42(this.callback);
12660
12660
  this.abort = abort;
12661
12661
  this.context = null;
12662
12662
  }
@@ -12664,7 +12664,7 @@ var require_api_upgrade = __commonJS({
12664
12664
  throw new SocketError("bad upgrade", null);
12665
12665
  }
12666
12666
  onUpgrade(statusCode, rawHeaders, socket) {
12667
- assert41(statusCode === 101);
12667
+ assert42(statusCode === 101);
12668
12668
  const { callback, opaque, context: context2 } = this;
12669
12669
  removeSignal(this);
12670
12670
  this.callback = null;
@@ -12721,7 +12721,7 @@ var require_api_connect = __commonJS({
12721
12721
  "../../node_modules/.pnpm/undici@7.11.0/node_modules/undici/lib/api/api-connect.js"(exports2, module3) {
12722
12722
  "use strict";
12723
12723
  init_import_meta_url();
12724
- var assert41 = require("assert");
12724
+ var assert42 = require("assert");
12725
12725
  var { AsyncResource } = require("async_hooks");
12726
12726
  var { InvalidArgumentError, SocketError } = require_errors();
12727
12727
  var util5 = require_util();
@@ -12753,7 +12753,7 @@ var require_api_connect = __commonJS({
12753
12753
  abort(this.reason);
12754
12754
  return;
12755
12755
  }
12756
- assert41(this.callback);
12756
+ assert42(this.callback);
12757
12757
  this.abort = abort;
12758
12758
  this.context = context2;
12759
12759
  }
@@ -14030,7 +14030,7 @@ var require_decorator_handler = __commonJS({
14030
14030
  "../../node_modules/.pnpm/undici@7.11.0/node_modules/undici/lib/handler/decorator-handler.js"(exports2, module3) {
14031
14031
  "use strict";
14032
14032
  init_import_meta_url();
14033
- var assert41 = require("assert");
14033
+ var assert42 = require("assert");
14034
14034
  var WrapHandler = require_wrap_handler();
14035
14035
  module3.exports = class DecoratorHandler {
14036
14036
  static {
@@ -14050,25 +14050,25 @@ var require_decorator_handler = __commonJS({
14050
14050
  this.#handler.onRequestStart?.(...args);
14051
14051
  }
14052
14052
  onRequestUpgrade(...args) {
14053
- assert41(!this.#onCompleteCalled);
14054
- assert41(!this.#onErrorCalled);
14053
+ assert42(!this.#onCompleteCalled);
14054
+ assert42(!this.#onErrorCalled);
14055
14055
  return this.#handler.onRequestUpgrade?.(...args);
14056
14056
  }
14057
14057
  onResponseStart(...args) {
14058
- assert41(!this.#onCompleteCalled);
14059
- assert41(!this.#onErrorCalled);
14060
- assert41(!this.#onResponseStartCalled);
14058
+ assert42(!this.#onCompleteCalled);
14059
+ assert42(!this.#onErrorCalled);
14060
+ assert42(!this.#onResponseStartCalled);
14061
14061
  this.#onResponseStartCalled = true;
14062
14062
  return this.#handler.onResponseStart?.(...args);
14063
14063
  }
14064
14064
  onResponseData(...args) {
14065
- assert41(!this.#onCompleteCalled);
14066
- assert41(!this.#onErrorCalled);
14065
+ assert42(!this.#onCompleteCalled);
14066
+ assert42(!this.#onErrorCalled);
14067
14067
  return this.#handler.onResponseData?.(...args);
14068
14068
  }
14069
14069
  onResponseEnd(...args) {
14070
- assert41(!this.#onCompleteCalled);
14071
- assert41(!this.#onErrorCalled);
14070
+ assert42(!this.#onCompleteCalled);
14071
+ assert42(!this.#onErrorCalled);
14072
14072
  this.#onCompleteCalled = true;
14073
14073
  return this.#handler.onResponseEnd?.(...args);
14074
14074
  }
@@ -14092,7 +14092,7 @@ var require_redirect_handler = __commonJS({
14092
14092
  init_import_meta_url();
14093
14093
  var util5 = require_util();
14094
14094
  var { kBodyUsed } = require_symbols();
14095
- var assert41 = require("assert");
14095
+ var assert42 = require("assert");
14096
14096
  var { InvalidArgumentError } = require_errors();
14097
14097
  var EE = require("events");
14098
14098
  var redirectableStatusCodes = [300, 301, 302, 303, 307, 308];
@@ -14108,7 +14108,7 @@ var require_redirect_handler = __commonJS({
14108
14108
  this[kBodyUsed] = false;
14109
14109
  }
14110
14110
  async *[Symbol.asyncIterator]() {
14111
- assert41(!this[kBodyUsed], "disturbed");
14111
+ assert42(!this[kBodyUsed], "disturbed");
14112
14112
  this[kBodyUsed] = true;
14113
14113
  yield* this[kBody];
14114
14114
  }
@@ -14137,7 +14137,7 @@ var require_redirect_handler = __commonJS({
14137
14137
  if (util5.isStream(this.opts.body)) {
14138
14138
  if (util5.bodyLength(this.opts.body) === 0) {
14139
14139
  this.opts.body.on("data", function() {
14140
- assert41(false);
14140
+ assert42(false);
14141
14141
  });
14142
14142
  }
14143
14143
  if (typeof this.opts.body.readableDidRead !== "boolean") {
@@ -14239,7 +14239,7 @@ var require_redirect_handler = __commonJS({
14239
14239
  }
14240
14240
  }
14241
14241
  } else {
14242
- assert41(headers == null, "headers must be an object or an array");
14242
+ assert42(headers == null, "headers must be an object or an array");
14243
14243
  }
14244
14244
  return ret;
14245
14245
  }
@@ -15764,7 +15764,7 @@ var require_cache_revalidation_handler = __commonJS({
15764
15764
  "../../node_modules/.pnpm/undici@7.11.0/node_modules/undici/lib/handler/cache-revalidation-handler.js"(exports2, module3) {
15765
15765
  "use strict";
15766
15766
  init_import_meta_url();
15767
- var assert41 = require("assert");
15767
+ var assert42 = require("assert");
15768
15768
  var CacheRevalidationHandler = class {
15769
15769
  static {
15770
15770
  __name(this, "CacheRevalidationHandler");
@@ -15804,7 +15804,7 @@ var require_cache_revalidation_handler = __commonJS({
15804
15804
  this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket);
15805
15805
  }
15806
15806
  onResponseStart(controller, statusCode, headers, statusMessage) {
15807
- assert41(this.#callback != null);
15807
+ assert42(this.#callback != null);
15808
15808
  this.#successful = statusCode === 304 || this.#allowErrorStatusCodes && statusCode >= 500 && statusCode <= 504;
15809
15809
  this.#callback(this.#successful, this.#context);
15810
15810
  this.#callback = null;
@@ -15855,7 +15855,7 @@ var require_cache2 = __commonJS({
15855
15855
  "../../node_modules/.pnpm/undici@7.11.0/node_modules/undici/lib/interceptor/cache.js"(exports2, module3) {
15856
15856
  "use strict";
15857
15857
  init_import_meta_url();
15858
- var assert41 = require("assert");
15858
+ var assert42 = require("assert");
15859
15859
  var { Readable: Readable8 } = require("stream");
15860
15860
  var util5 = require_util();
15861
15861
  var CacheHandler = require_cache_handler();
@@ -15920,8 +15920,8 @@ var require_cache2 = __commonJS({
15920
15920
  __name(handleUncachedResponse, "handleUncachedResponse");
15921
15921
  function sendCachedValue(handler, opts, result, age, context2, isStale) {
15922
15922
  const stream2 = util5.isStream(result.body) ? result.body : Readable8.from(result.body ?? []);
15923
- assert41(!stream2.destroyed, "stream should not be destroyed");
15924
- assert41(!stream2.readableDidRead, "stream should not be readableDidRead");
15923
+ assert42(!stream2.destroyed, "stream should not be destroyed");
15924
+ assert42(!stream2.readableDidRead, "stream should not be readableDidRead");
15925
15925
  const controller = {
15926
15926
  resume() {
15927
15927
  stream2.resume();
@@ -16480,7 +16480,7 @@ var require_headers = __commonJS({
16480
16480
  isValidHeaderValue
16481
16481
  } = require_util2();
16482
16482
  var { webidl } = require_webidl();
16483
- var assert41 = require("assert");
16483
+ var assert42 = require("assert");
16484
16484
  var util5 = require("util");
16485
16485
  function isHTTPWhiteSpaceCharCode(code) {
16486
16486
  return code === 10 || code === 13 || code === 9 || code === 32;
@@ -16705,11 +16705,11 @@ var require_headers = __commonJS({
16705
16705
  const iterator = this.headersMap[Symbol.iterator]();
16706
16706
  const firstValue = iterator.next().value;
16707
16707
  array[0] = [firstValue[0], firstValue[1].value];
16708
- assert41(firstValue[1].value !== null);
16708
+ assert42(firstValue[1].value !== null);
16709
16709
  for (let i5 = 1, j6 = 0, right2 = 0, left2 = 0, pivot = 0, x6, value; i5 < size; ++i5) {
16710
16710
  value = iterator.next().value;
16711
16711
  x6 = array[i5] = [value[0], value[1].value];
16712
- assert41(x6[1] !== null);
16712
+ assert42(x6[1] !== null);
16713
16713
  left2 = 0;
16714
16714
  right2 = i5;
16715
16715
  while (left2 < right2) {
@@ -16736,7 +16736,7 @@ var require_headers = __commonJS({
16736
16736
  let i5 = 0;
16737
16737
  for (const { 0: name2, 1: { value } } of this.headersMap) {
16738
16738
  array[i5++] = [name2, value];
16739
- assert41(value !== null);
16739
+ assert42(value !== null);
16740
16740
  }
16741
16741
  return array.sort(compareHeaderName);
16742
16742
  }
@@ -16967,7 +16967,7 @@ var require_response = __commonJS({
16967
16967
  var { webidl } = require_webidl();
16968
16968
  var { URLSerializer } = require_data_url();
16969
16969
  var { kConstruct } = require_symbols();
16970
- var assert41 = require("assert");
16970
+ var assert42 = require("assert");
16971
16971
  var { types } = require("util");
16972
16972
  var textEncoder = new TextEncoder("utf-8");
16973
16973
  var Response13 = class _Response {
@@ -17228,7 +17228,7 @@ var require_response = __commonJS({
17228
17228
  return p6 in state2 ? state2[p6] : target[p6];
17229
17229
  },
17230
17230
  set(target, p6, value) {
17231
- assert41(!(p6 in state2));
17231
+ assert42(!(p6 in state2));
17232
17232
  target[p6] = value;
17233
17233
  return true;
17234
17234
  }
@@ -17263,12 +17263,12 @@ var require_response = __commonJS({
17263
17263
  body: null
17264
17264
  });
17265
17265
  } else {
17266
- assert41(false);
17266
+ assert42(false);
17267
17267
  }
17268
17268
  }
17269
17269
  __name(filterResponse, "filterResponse");
17270
17270
  function makeAppropriateNetworkError(fetchParams, err = null) {
17271
- assert41(isCancelled(fetchParams));
17271
+ assert42(isCancelled(fetchParams));
17272
17272
  return isAborted2(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err }));
17273
17273
  }
17274
17274
  __name(makeAppropriateNetworkError, "makeAppropriateNetworkError");
@@ -17415,7 +17415,7 @@ var require_request2 = __commonJS({
17415
17415
  var { webidl } = require_webidl();
17416
17416
  var { URLSerializer } = require_data_url();
17417
17417
  var { kConstruct } = require_symbols();
17418
- var assert41 = require("assert");
17418
+ var assert42 = require("assert");
17419
17419
  var { getMaxListeners, setMaxListeners, defaultMaxListeners } = require("events");
17420
17420
  var kAbortController = Symbol("abortController");
17421
17421
  var requestFinalizer = new FinalizationRegistry2(({ signal, abort }) => {
@@ -17496,7 +17496,7 @@ var require_request2 = __commonJS({
17496
17496
  request4 = makeRequest({ urlList: [parsedURL] });
17497
17497
  fallbackMode = "cors";
17498
17498
  } else {
17499
- assert41(webidl.is.Request(input));
17499
+ assert42(webidl.is.Request(input));
17500
17500
  request4 = input.#state;
17501
17501
  signal = input.#signal;
17502
17502
  this.#dispatcher = init3.dispatcher || input.#dispatcher;
@@ -18194,7 +18194,7 @@ var require_fetch = __commonJS({
18194
18194
  createInflate,
18195
18195
  extractMimeType
18196
18196
  } = require_util2();
18197
- var assert41 = require("assert");
18197
+ var assert42 = require("assert");
18198
18198
  var { safelyExtractBody, extractBody } = require_body();
18199
18199
  var {
18200
18200
  redirectStatusSet,
@@ -18276,7 +18276,7 @@ var require_fetch = __commonJS({
18276
18276
  requestObject.signal,
18277
18277
  () => {
18278
18278
  locallyAborted = true;
18279
- assert41(controller != null);
18279
+ assert42(controller != null);
18280
18280
  controller.abort(requestObject.signal.reason);
18281
18281
  const realResponse = responseObject?.deref();
18282
18282
  abortFetch(p6, request4, realResponse, requestObject.signal.reason);
@@ -18382,7 +18382,7 @@ var require_fetch = __commonJS({
18382
18382
  dispatcher = getGlobalDispatcher2()
18383
18383
  // undici
18384
18384
  }) {
18385
- assert41(dispatcher);
18385
+ assert42(dispatcher);
18386
18386
  let taskDestination = null;
18387
18387
  let crossOriginIsolatedCapability = false;
18388
18388
  if (request4.client != null) {
@@ -18405,7 +18405,7 @@ var require_fetch = __commonJS({
18405
18405
  taskDestination,
18406
18406
  crossOriginIsolatedCapability
18407
18407
  };
18408
- assert41(!request4.body || request4.body.stream);
18408
+ assert42(!request4.body || request4.body.stream);
18409
18409
  if (request4.window === "client") {
18410
18410
  request4.window = request4.client?.globalObject?.constructor?.name === "Window" ? request4.client : "no-window";
18411
18411
  }
@@ -18496,7 +18496,7 @@ var require_fetch = __commonJS({
18496
18496
  } else if (request4.responseTainting === "opaque") {
18497
18497
  response = filterResponse(response, "opaque");
18498
18498
  } else {
18499
- assert41(false);
18499
+ assert42(false);
18500
18500
  }
18501
18501
  }
18502
18502
  let internalResponse = response.status === 0 ? response : response.internalResponse;
@@ -18727,7 +18727,7 @@ var require_fetch = __commonJS({
18727
18727
  } else if (request4.redirect === "follow") {
18728
18728
  response = await httpRedirectFetch(fetchParams, response);
18729
18729
  } else {
18730
- assert41(false);
18730
+ assert42(false);
18731
18731
  }
18732
18732
  }
18733
18733
  response.timingInfo = timingInfo;
@@ -18781,7 +18781,7 @@ var require_fetch = __commonJS({
18781
18781
  request4.headersList.delete("host", true);
18782
18782
  }
18783
18783
  if (request4.body != null) {
18784
- assert41(request4.body.source != null);
18784
+ assert42(request4.body.source != null);
18785
18785
  request4.body = safelyExtractBody(request4.body.source)[0];
18786
18786
  }
18787
18787
  const timingInfo = fetchParams.timingInfo;
@@ -18916,7 +18916,7 @@ var require_fetch = __commonJS({
18916
18916
  }
18917
18917
  __name(httpNetworkOrCacheFetch, "httpNetworkOrCacheFetch");
18918
18918
  async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) {
18919
- assert41(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed);
18919
+ assert42(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed);
18920
18920
  fetchParams.controller.connection = {
18921
18921
  abort: null,
18922
18922
  destroyed: false,
@@ -19235,7 +19235,7 @@ var require_util3 = __commonJS({
19235
19235
  "../../node_modules/.pnpm/undici@7.11.0/node_modules/undici/lib/web/cache/util.js"(exports2, module3) {
19236
19236
  "use strict";
19237
19237
  init_import_meta_url();
19238
- var assert41 = require("assert");
19238
+ var assert42 = require("assert");
19239
19239
  var { URLSerializer } = require_data_url();
19240
19240
  var { isValidHeaderName } = require_util2();
19241
19241
  function urlEquals(A3, B3, excludeFragment = false) {
@@ -19245,7 +19245,7 @@ var require_util3 = __commonJS({
19245
19245
  }
19246
19246
  __name(urlEquals, "urlEquals");
19247
19247
  function getFieldValues(header) {
19248
- assert41(header !== null);
19248
+ assert42(header !== null);
19249
19249
  const values = [];
19250
19250
  for (let value of header.split(",")) {
19251
19251
  value = value.trim();
@@ -19276,7 +19276,7 @@ var require_cache3 = __commonJS({
19276
19276
  var { Request: Request4, fromInnerRequest, getRequestState } = require_request2();
19277
19277
  var { fetching } = require_fetch();
19278
19278
  var { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util2();
19279
- var assert41 = require("assert");
19279
+ var assert42 = require("assert");
19280
19280
  var Cache2 = class _Cache {
19281
19281
  static {
19282
19282
  __name(this, "Cache");
@@ -19520,7 +19520,7 @@ var require_cache3 = __commonJS({
19520
19520
  return false;
19521
19521
  }
19522
19522
  } else {
19523
- assert41(typeof request4 === "string");
19523
+ assert42(typeof request4 === "string");
19524
19524
  r7 = getRequestState(new Request4(request4));
19525
19525
  }
19526
19526
  const operations = [];
@@ -19631,7 +19631,7 @@ var require_cache3 = __commonJS({
19631
19631
  }
19632
19632
  for (const requestResponse of requestResponses) {
19633
19633
  const idx = cache6.indexOf(requestResponse);
19634
- assert41(idx !== -1);
19634
+ assert42(idx !== -1);
19635
19635
  cache6.splice(idx, 1);
19636
19636
  }
19637
19637
  } else if (operation.type === "put") {
@@ -19663,7 +19663,7 @@ var require_cache3 = __commonJS({
19663
19663
  requestResponses = this.#queryCache(operation.request);
19664
19664
  for (const requestResponse of requestResponses) {
19665
19665
  const idx = cache6.indexOf(requestResponse);
19666
- assert41(idx !== -1);
19666
+ assert42(idx !== -1);
19667
19667
  cache6.splice(idx, 1);
19668
19668
  }
19669
19669
  cache6.push([operation.request, operation.response]);
@@ -20130,7 +20130,7 @@ var require_parse = __commonJS({
20130
20130
  var { maxNameValuePairSize, maxAttributeValueSize } = require_constants4();
20131
20131
  var { isCTLExcludingHtab } = require_util4();
20132
20132
  var { collectASequenceOfCodePointsFast } = require_data_url();
20133
- var assert41 = require("assert");
20133
+ var assert42 = require("assert");
20134
20134
  var { unescape: unescape2 } = require("querystring");
20135
20135
  function parseSetCookie(header) {
20136
20136
  if (isCTLExcludingHtab(header)) {
@@ -20174,7 +20174,7 @@ var require_parse = __commonJS({
20174
20174
  if (unparsedAttributes.length === 0) {
20175
20175
  return cookieAttributeList;
20176
20176
  }
20177
- assert41(unparsedAttributes[0] === ";");
20177
+ assert42(unparsedAttributes[0] === ";");
20178
20178
  unparsedAttributes = unparsedAttributes.slice(1);
20179
20179
  let cookieAv = "";
20180
20180
  if (unparsedAttributes.includes(";")) {
@@ -21062,7 +21062,7 @@ var require_connection = __commonJS({
21062
21062
  var { Headers: Headers5, getHeadersList } = require_headers();
21063
21063
  var { getDecodeSplit } = require_util2();
21064
21064
  var { WebsocketFrameSend } = require_frame();
21065
- var assert41 = require("assert");
21065
+ var assert42 = require("assert");
21066
21066
  var crypto8;
21067
21067
  try {
21068
21068
  crypto8 = require("crypto");
@@ -21170,7 +21170,7 @@ var require_connection = __commonJS({
21170
21170
  if (reason.length !== 0 && code === null) {
21171
21171
  code = 1e3;
21172
21172
  }
21173
- assert41(code === null || Number.isInteger(code));
21173
+ assert42(code === null || Number.isInteger(code));
21174
21174
  if (code === null && reason.length === 0) {
21175
21175
  frame.frameData = emptyBuffer;
21176
21176
  } else if (code !== null && reason === null) {
@@ -21275,7 +21275,7 @@ var require_receiver = __commonJS({
21275
21275
  "use strict";
21276
21276
  init_import_meta_url();
21277
21277
  var { Writable: Writable5 } = require("stream");
21278
- var assert41 = require("assert");
21278
+ var assert42 = require("assert");
21279
21279
  var { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants5();
21280
21280
  var { channels } = require_diagnostics();
21281
21281
  var {
@@ -21516,7 +21516,7 @@ var require_receiver = __commonJS({
21516
21516
  return output;
21517
21517
  }
21518
21518
  parseCloseBody(data) {
21519
- assert41(data.length !== 1);
21519
+ assert42(data.length !== 1);
21520
21520
  let code;
21521
21521
  if (data.length >= 2) {
21522
21522
  code = data.readUInt16BE(0);
@@ -32128,6 +32128,25 @@ var require_cli_table3 = __commonJS({
32128
32128
  });
32129
32129
 
32130
32130
  // src/environment-variables/factory.ts
32131
+ function getBooleanEnvironmentVariableFactory(options) {
32132
+ return () => {
32133
+ if (!(options.variableName in process.env) || process.env[options.variableName] === void 0) {
32134
+ return typeof options.defaultValue === "function" ? options.defaultValue() : options.defaultValue;
32135
+ }
32136
+ switch (process.env[options.variableName]?.toLowerCase()) {
32137
+ case "true":
32138
+ return true;
32139
+ case "false":
32140
+ return false;
32141
+ default:
32142
+ throw new UserError(
32143
+ `Expected ${options.variableName} to be "true" or "false", but got ${JSON.stringify(
32144
+ process.env[options.variableName]
32145
+ )}`
32146
+ );
32147
+ }
32148
+ };
32149
+ }
32131
32150
  function getEnvironmentVariableFactory({
32132
32151
  variableName,
32133
32152
  deprecatedName,
@@ -32166,6 +32185,7 @@ var init_factory = __esm({
32166
32185
  "src/environment-variables/factory.ts"() {
32167
32186
  init_import_meta_url();
32168
32187
  init_errors();
32188
+ __name(getBooleanEnvironmentVariableFactory, "getBooleanEnvironmentVariableFactory");
32169
32189
  __name(getEnvironmentVariableFactory, "getEnvironmentVariableFactory");
32170
32190
  __name(getProcessEnv, "getProcessEnv");
32171
32191
  __name(assertOneOf, "assertOneOf");
@@ -32761,7 +32781,7 @@ var init_misc_variables = __esm({
32761
32781
  variableName: "WRANGLER_C3_COMMAND",
32762
32782
  defaultValue: /* @__PURE__ */ __name(() => "create cloudflare@^2.5.0", "defaultValue")
32763
32783
  });
32764
- getWranglerSendMetricsFromEnv = getEnvironmentVariableFactory({
32784
+ getWranglerSendMetricsFromEnv = getBooleanEnvironmentVariableFactory({
32765
32785
  variableName: "WRANGLER_SEND_METRICS"
32766
32786
  });
32767
32787
  getCloudflareApiEnvironmentFromEnv = getEnvironmentVariableFactory(
@@ -32799,10 +32819,10 @@ var init_misc_variables = __esm({
32799
32819
  getCloudflareApiBaseUrl = /* @__PURE__ */ __name((complianceConfig) => getCloudflareApiBaseUrlFromEnv() ?? `https://api${getComplianceRegionSubdomain(complianceConfig)}${getStagingSubdomain()}.cloudflare.com/client/v4`, "getCloudflareApiBaseUrl");
32800
32820
  __name(getComplianceRegionSubdomain, "getComplianceRegionSubdomain");
32801
32821
  __name(getStagingSubdomain, "getStagingSubdomain");
32802
- getSanitizeLogs = getEnvironmentVariableFactory({
32822
+ getSanitizeLogs = getBooleanEnvironmentVariableFactory({
32803
32823
  variableName: "WRANGLER_LOG_SANITIZE",
32804
32824
  defaultValue() {
32805
- return "true";
32825
+ return true;
32806
32826
  }
32807
32827
  });
32808
32828
  getOutputFileDirectoryFromEnv = getEnvironmentVariableFactory({
@@ -32910,7 +32930,7 @@ var require_signal_exit = __commonJS({
32910
32930
  };
32911
32931
  };
32912
32932
  } else {
32913
- assert41 = require("assert");
32933
+ assert42 = require("assert");
32914
32934
  signals = require_signals();
32915
32935
  isWin = /^win/i.test(process11.platform);
32916
32936
  EE = require("events");
@@ -32933,7 +32953,7 @@ var require_signal_exit = __commonJS({
32933
32953
  return function() {
32934
32954
  };
32935
32955
  }
32936
- assert41.equal(typeof cb2, "function", "a callback must be provided for exit handler");
32956
+ assert42.equal(typeof cb2, "function", "a callback must be provided for exit handler");
32937
32957
  if (loaded === false) {
32938
32958
  load();
32939
32959
  }
@@ -33039,7 +33059,7 @@ var require_signal_exit = __commonJS({
33039
33059
  }
33040
33060
  }, "processEmit");
33041
33061
  }
33042
- var assert41;
33062
+ var assert42;
33043
33063
  var signals;
33044
33064
  var isWin;
33045
33065
  var EE;
@@ -33243,13 +33263,13 @@ var init_logger = __esm({
33243
33263
  }, "json");
33244
33264
  debug = /* @__PURE__ */ __name((...args) => this.doLog("debug", args), "debug");
33245
33265
  debugWithSanitization = /* @__PURE__ */ __name((label, ...args) => {
33246
- if (getSanitizeLogs() === "false") {
33247
- this.doLog("debug", [label, ...args]);
33248
- } else {
33266
+ if (getSanitizeLogs()) {
33249
33267
  this.doLog("debug", [
33250
33268
  label,
33251
33269
  "omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data"
33252
33270
  ]);
33271
+ } else {
33272
+ this.doLog("debug", [label, ...args]);
33253
33273
  }
33254
33274
  }, "debugWithSanitization");
33255
33275
  info = /* @__PURE__ */ __name((...args) => this.doLog("info", args), "info");
@@ -33647,7 +33667,7 @@ var name, version;
33647
33667
  var init_package = __esm({
33648
33668
  "package.json"() {
33649
33669
  name = "wrangler";
33650
- version = "4.24.4";
33670
+ version = "4.25.0";
33651
33671
  }
33652
33672
  });
33653
33673
 
@@ -42774,6 +42794,11 @@ function validateContainerApp(envName, topLevelName) {
42774
42794
  `"containers.image" field must be defined for each container app. This should be the path to your Dockerfile or a image URI pointing to the Cloudflare registry.`
42775
42795
  );
42776
42796
  }
42797
+ if ("configuration" in containerAppOptional) {
42798
+ diagnostics.warnings.push(
42799
+ `"containers.configuration" is deprecated. Use top level "containers" fields instead. "configuration.image" should be "image", "configuration.disk" should be set via "instance_type".`
42800
+ );
42801
+ }
42777
42802
  if ("image" in containerAppOptional && containerAppOptional.image !== void 0) {
42778
42803
  if (containerAppOptional.configuration?.image !== void 0) {
42779
42804
  diagnostics.errors.push(
@@ -42794,26 +42819,98 @@ function validateContainerApp(envName, topLevelName) {
42794
42819
  `"containers.rollout_step_percentage" field should be a number between 25 and 100, but got ${containerAppOptional.rollout_step_percentage}`
42795
42820
  );
42796
42821
  }
42797
- if (!isOptionalProperty(containerAppOptional, "rollout_kind", "string") && "rollout_kind" in containerAppOptional && !["full_auto", "full_manual", "none"].includes(
42798
- containerAppOptional.rollout_kind
42799
- )) {
42822
+ if (Array.isArray(containerAppOptional.configuration)) {
42800
42823
  diagnostics.errors.push(
42801
- `"containers.rollout_kind" field should be either 'full_auto', 'full_manual' or 'none', but got ${containerAppOptional.rollout_kind}`
42824
+ `"containers.configuration" is defined as an array, it should be an object`
42802
42825
  );
42803
42826
  }
42804
- if (Array.isArray(containerAppOptional.configuration)) {
42827
+ validateOptionalProperty(
42828
+ diagnostics,
42829
+ field,
42830
+ "rollout_kind",
42831
+ containerAppOptional.rollout_kind,
42832
+ "string",
42833
+ ["full_auto", "full_manual", "none"]
42834
+ );
42835
+ validateOptionalProperty(
42836
+ diagnostics,
42837
+ field,
42838
+ "instance_type",
42839
+ containerAppOptional.instance_type,
42840
+ "string",
42841
+ ["dev", "basic", "standard"]
42842
+ );
42843
+ validateOptionalProperty(
42844
+ diagnostics,
42845
+ field,
42846
+ "max_instances",
42847
+ containerAppOptional.max_instances,
42848
+ "number"
42849
+ );
42850
+ if (containerAppOptional.max_instances !== void 0 && containerAppOptional.max_instances < 0) {
42805
42851
  diagnostics.errors.push(
42806
- `"containers.configuration" is defined as an array, it should be an object`
42852
+ `"containers.max_instances" field should be a positive number, but got ${containerAppOptional.max_instances}`
42807
42853
  );
42808
42854
  }
42809
- if ("instance_type" in containerAppOptional) {
42810
- validateOptionalProperty(
42811
- diagnostics,
42812
- field,
42855
+ validateOptionalProperty(
42856
+ diagnostics,
42857
+ field,
42858
+ "image_build_context",
42859
+ containerAppOptional.image_build_context,
42860
+ "string"
42861
+ );
42862
+ validateOptionalProperty(
42863
+ diagnostics,
42864
+ field,
42865
+ "image_vars",
42866
+ containerAppOptional.image_vars,
42867
+ "object"
42868
+ );
42869
+ validateOptionalProperty(
42870
+ diagnostics,
42871
+ field,
42872
+ "scheduling_policy",
42873
+ containerAppOptional.scheduling_policy,
42874
+ "string",
42875
+ ["regional", "moon", "default"]
42876
+ );
42877
+ if ("instances" in containerAppOptional) {
42878
+ diagnostics.warnings.push(
42879
+ `"containers.instances" is deprecated. Use "containers.max_instances" instead.`
42880
+ );
42881
+ }
42882
+ if ("durable_objects" in containerAppOptional) {
42883
+ diagnostics.warnings.push(
42884
+ `"containers.durable_objects" is deprecated. Use the "class_name" field instead.`
42885
+ );
42886
+ }
42887
+ validateAdditionalProperties(
42888
+ diagnostics,
42889
+ field,
42890
+ Object.keys(containerAppOptional),
42891
+ [
42892
+ "name",
42893
+ "instances",
42894
+ "max_instances",
42895
+ "image",
42896
+ "image_build_context",
42897
+ "image_vars",
42898
+ "class_name",
42899
+ "scheduling_policy",
42813
42900
  "instance_type",
42814
- containerAppOptional.instance_type,
42815
- "string",
42816
- ["dev", "basic", "standard"]
42901
+ "configuration",
42902
+ "constraints",
42903
+ "rollout_step_percentage",
42904
+ "rollout_kind",
42905
+ "durable_objects"
42906
+ ]
42907
+ );
42908
+ if ("configuration" in containerAppOptional) {
42909
+ validateAdditionalProperties(
42910
+ diagnostics,
42911
+ `${field}.configuration`,
42912
+ Object.keys(containerAppOptional.configuration),
42913
+ ["image", "secrets", "labels", "disk", "vcpu", "memory_mib"]
42817
42914
  );
42818
42915
  }
42819
42916
  }
@@ -68854,6 +68951,21 @@ async function listKVNamespaceKeys(complianceConfig, accountId, namespaceId, pre
68854
68951
  new import_node_url8.URLSearchParams({ prefix })
68855
68952
  );
68856
68953
  }
68954
+ async function updateKVNamespace(complianceConfig, accountId, namespaceId, title) {
68955
+ return await fetchResult(
68956
+ complianceConfig,
68957
+ `/accounts/${accountId}/storage/kv/namespaces/${namespaceId}`,
68958
+ {
68959
+ method: "PUT",
68960
+ headers: {
68961
+ "Content-Type": "application/json"
68962
+ },
68963
+ body: JSON.stringify({
68964
+ title
68965
+ })
68966
+ }
68967
+ );
68968
+ }
68857
68969
  async function deleteKVNamespace(complianceConfig, accountId, namespaceId) {
68858
68970
  return await fetchResult(
68859
68971
  complianceConfig,
@@ -69079,6 +69191,7 @@ var init_helpers4 = __esm({
69079
69191
  __name(createKVNamespace, "createKVNamespace");
69080
69192
  __name(listKVNamespaces, "listKVNamespaces");
69081
69193
  __name(listKVNamespaceKeys, "listKVNamespaceKeys");
69194
+ __name(updateKVNamespace, "updateKVNamespace");
69082
69195
  __name(deleteKVNamespace, "deleteKVNamespace");
69083
69196
  KeyValueKeys = /* @__PURE__ */ new Set([
69084
69197
  "key",
@@ -69250,7 +69363,7 @@ function getMetricsConfig({
69250
69363
  const sendMetricsEnv = getWranglerSendMetricsFromEnv();
69251
69364
  if (sendMetricsEnv !== void 0) {
69252
69365
  return {
69253
- enabled: sendMetricsEnv.toLowerCase() === "true",
69366
+ enabled: sendMetricsEnv,
69254
69367
  deviceId
69255
69368
  };
69256
69369
  }
@@ -87782,10 +87895,11 @@ var init_getValidBindingName = __esm({
87782
87895
  });
87783
87896
 
87784
87897
  // src/kv/index.ts
87785
- var import_node_buffer4, import_consumers, import_node_string_decoder, kvNamespace, kvNamespaceNamespace, kvKeyNamespace, kvBulkNamespace, kvNamespaceCreateCommand, kvNamespaceListCommand, kvNamespaceDeleteCommand, kvKeyPutCommand, kvKeyListCommand, kvKeyGetCommand, kvKeyDeleteCommand, kvBulkGetCommand, kvBulkPutCommand, kvBulkDeleteCommand;
87898
+ var import_node_assert20, import_node_buffer4, import_consumers, import_node_string_decoder, kvNamespace, kvNamespaceNamespace, kvKeyNamespace, kvBulkNamespace, kvNamespaceCreateCommand, kvNamespaceListCommand, kvNamespaceDeleteCommand, kvNamespaceRenameCommand, kvKeyPutCommand, kvKeyListCommand, kvKeyGetCommand, kvKeyDeleteCommand, kvBulkGetCommand, kvBulkPutCommand, kvBulkDeleteCommand;
87786
87899
  var init_kv = __esm({
87787
87900
  "src/kv/index.ts"() {
87788
87901
  init_import_meta_url();
87902
+ import_node_assert20 = require("assert");
87789
87903
  import_node_buffer4 = require("buffer");
87790
87904
  import_consumers = require("stream/consumers");
87791
87905
  import_node_string_decoder = require("string_decoder");
@@ -87944,6 +88058,73 @@ var init_kv = __esm({
87944
88058
  });
87945
88059
  }
87946
88060
  });
88061
+ kvNamespaceRenameCommand = createCommand({
88062
+ metadata: {
88063
+ description: "Rename a KV namespace",
88064
+ status: "stable",
88065
+ owner: "Product: KV"
88066
+ },
88067
+ positionalArgs: ["old-name"],
88068
+ args: {
88069
+ "old-name": {
88070
+ type: "string",
88071
+ describe: "The current name (title) of the namespace to rename"
88072
+ },
88073
+ "namespace-id": {
88074
+ type: "string",
88075
+ describe: "The id of the namespace to rename"
88076
+ },
88077
+ "new-name": {
88078
+ type: "string",
88079
+ describe: "The new name for the namespace",
88080
+ demandOption: true
88081
+ }
88082
+ },
88083
+ validateArgs(args) {
88084
+ if (args.oldName && args.namespaceId) {
88085
+ throw new CommandLineArgsError(
88086
+ "Cannot specify both old-name and --namespace-id. Use either old-name (as first argument) or --namespace-id flag, not both."
88087
+ );
88088
+ }
88089
+ if (!args.namespaceId && !args.oldName) {
88090
+ throw new CommandLineArgsError(
88091
+ "Either old-name (as first argument) or --namespace-id must be specified"
88092
+ );
88093
+ }
88094
+ if (args.newName && args.newName.length > 512) {
88095
+ throw new CommandLineArgsError(
88096
+ `new-name must be 512 characters or less (current: ${args.newName.length})`
88097
+ );
88098
+ }
88099
+ },
88100
+ async handler(args) {
88101
+ const config = readConfig(args);
88102
+ printResourceLocation("remote");
88103
+ const accountId = await requireAuth(config);
88104
+ let namespaceId = args.namespaceId;
88105
+ if (!namespaceId && args.oldName) {
88106
+ const namespaces = await listKVNamespaces(config, accountId);
88107
+ const namespace = namespaces.find((ns) => ns.title === args.oldName);
88108
+ if (!namespace) {
88109
+ throw new UserError(
88110
+ `No namespace found with the name "${args.oldName}". Use --namespace-id instead or check available namespaces with "wrangler kv namespace list".`
88111
+ );
88112
+ }
88113
+ namespaceId = namespace.id;
88114
+ }
88115
+ (0, import_node_assert20.strict)(namespaceId, "namespaceId should be defined");
88116
+ logger.log(`Renaming KV namespace ${namespaceId} to "${args.newName}".`);
88117
+ const updatedNamespace = await updateKVNamespace(
88118
+ config,
88119
+ accountId,
88120
+ namespaceId,
88121
+ args.newName
88122
+ );
88123
+ logger.log(
88124
+ `\u2728 Successfully renamed namespace to "${updatedNamespace.title}"`
88125
+ );
88126
+ }
88127
+ });
87947
88128
  kvKeyPutCommand = createCommand({
87948
88129
  metadata: {
87949
88130
  description: "Write a single key/value pair to the given namespace",
@@ -88751,7 +88932,7 @@ var init_commands = __esm({
88751
88932
  const savedConfig = readMetricsConfig();
88752
88933
  const sendMetricsEnv = getWranglerSendMetricsFromEnv();
88753
88934
  if (config.send_metrics !== void 0 || sendMetricsEnv !== void 0) {
88754
- const resolvedPermission = sendMetricsEnv !== void 0 ? sendMetricsEnv === "true" : config.send_metrics;
88935
+ const resolvedPermission = sendMetricsEnv ?? config.send_metrics;
88755
88936
  logger.log(
88756
88937
  `Status: ${resolvedPermission ? source_default.green("Enabled") : source_default.red("Disabled")} (set by ${sendMetricsEnv !== void 0 ? "environment variable" : "wrangler.toml"})
88757
88938
  `
@@ -129754,7 +129935,7 @@ async function generateR2ServiceToken(accountId, bucketName, pipelineName) {
129754
129935
  const timeoutPromise = (0, import_promises26.setTimeout)(12e4, "timeout", { signal });
129755
129936
  const serverPromise = new Promise((resolve24, reject) => {
129756
129937
  const server = import_node_http2.default.createServer(async (request4, response) => {
129757
- (0, import_node_assert20.default)(request4.url, "This request doesn't have a URL");
129938
+ (0, import_node_assert21.default)(request4.url, "This request doesn't have a URL");
129758
129939
  if (request4.method !== "GET") {
129759
129940
  response.writeHead(405);
129760
129941
  response.end("Method not allowed.");
@@ -129856,11 +130037,11 @@ async function deletePipeline(complianceConfig, accountId, name2) {
129856
130037
  }
129857
130038
  );
129858
130039
  }
129859
- var import_node_assert20, import_node_crypto10, import_node_http2, import_promises26, API_HEADERS;
130040
+ var import_node_assert21, import_node_crypto10, import_node_http2, import_promises26, API_HEADERS;
129860
130041
  var init_client7 = __esm({
129861
130042
  "src/pipelines/client.ts"() {
129862
130043
  init_import_meta_url();
129863
- import_node_assert20 = __toESM(require("assert"));
130044
+ import_node_assert21 = __toESM(require("assert"));
129864
130045
  import_node_crypto10 = require("crypto");
129865
130046
  import_node_http2 = __toESM(require("http"));
129866
130047
  import_promises26 = require("timers/promises");
@@ -151392,7 +151573,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
151392
151573
  workerBundle = createWorkerUploadForm(worker);
151393
151574
  printBindings({ ...bindings, vars: maskedVars }, config.tail_consumers);
151394
151575
  } else {
151395
- (0, import_node_assert21.default)(accountId, "Missing accountId");
151576
+ (0, import_node_assert22.default)(accountId, "Missing accountId");
151396
151577
  if (getFlag("RESOURCES_PROVISION")) {
151397
151578
  await provisionBindings(
151398
151579
  bindings,
@@ -151542,11 +151723,11 @@ function generatePreviewAlias(scriptName) {
151542
151723
  }
151543
151724
  return sanitizedAlias;
151544
151725
  }
151545
- var import_node_assert21, import_node_child_process7, import_node_fs31, import_node_path54, import_undici19, versionsUploadCommand;
151726
+ var import_node_assert22, import_node_child_process7, import_node_fs31, import_node_path54, import_undici19, versionsUploadCommand;
151546
151727
  var init_upload2 = __esm({
151547
151728
  "src/versions/upload.ts"() {
151548
151729
  init_import_meta_url();
151549
- import_node_assert21 = __toESM(require("assert"));
151730
+ import_node_assert22 = __toESM(require("assert"));
151550
151731
  import_node_child_process7 = require("child_process");
151551
151732
  import_node_fs31 = require("fs");
151552
151733
  import_node_path54 = __toESM(require("path"));
@@ -151814,7 +151995,7 @@ var init_upload2 = __esm({
151814
151995
  }
151815
151996
  const previewAlias = args.previewAlias ?? (getCIGeneratePreviewAlias() === "true" ? generatePreviewAlias(name2) : void 0);
151816
151997
  if (!args.dryRun) {
151817
- (0, import_node_assert21.default)(accountId, "Missing account ID");
151998
+ (0, import_node_assert22.default)(accountId, "Missing account ID");
151818
151999
  await verifyWorkerMatchesCITag(
151819
152000
  config,
151820
152001
  accountId,
@@ -155978,6 +156159,10 @@ function createCLIParser(argv) {
155978
156159
  command: "wrangler kv namespace delete",
155979
156160
  definition: kvNamespaceDeleteCommand
155980
156161
  },
156162
+ {
156163
+ command: "wrangler kv namespace rename",
156164
+ definition: kvNamespaceRenameCommand
156165
+ },
155981
156166
  { command: "wrangler kv key put", definition: kvKeyPutCommand },
155982
156167
  { command: "wrangler kv key list", definition: kvKeyListCommand },
155983
156168
  { command: "wrangler kv key get", definition: kvKeyGetCommand },
@@ -156809,7 +156994,7 @@ async function main(argv) {
156809
156994
  if (e7.cause instanceof ApiError) {
156810
156995
  logger.error(e7.cause);
156811
156996
  } else {
156812
- (0, import_node_assert22.default)(isAuthenticationError(e7));
156997
+ (0, import_node_assert23.default)(isAuthenticationError(e7));
156813
156998
  logger.log(formatMessage(e7));
156814
156999
  }
156815
157000
  const envAuth = getAuthFromEnv();
@@ -156914,11 +157099,11 @@ ${tryRunningItIn}${oneOfThese}`
156914
157099
  }
156915
157100
  }
156916
157101
  }
156917
- var import_node_assert22, import_node_os7, import_promises31, import_undici20;
157102
+ var import_node_assert23, import_node_os7, import_promises31, import_undici20;
156918
157103
  var init_src = __esm({
156919
157104
  "src/index.ts"() {
156920
157105
  init_import_meta_url();
156921
- import_node_assert22 = __toESM(require("assert"));
157106
+ import_node_assert23 = __toESM(require("assert"));
156922
157107
  import_node_os7 = __toESM(require("os"));
156923
157108
  import_promises31 = require("timers/promises");
156924
157109
  init_containers_shared();
@@ -157541,7 +157726,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
157541
157726
  );
157542
157727
  }
157543
157728
  const scriptName = props.name;
157544
- (0, import_node_assert23.default)(
157729
+ (0, import_node_assert24.default)(
157545
157730
  !config.site || config.site.bucket,
157546
157731
  "A [site] definition requires a `bucket` field with a path to the site's assets directory."
157547
157732
  );
@@ -157805,7 +157990,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
157805
157990
  { warnIfNoBindings: true }
157806
157991
  );
157807
157992
  } else {
157808
- (0, import_node_assert23.default)(accountId, "Missing accountId");
157993
+ (0, import_node_assert24.default)(accountId, "Missing accountId");
157809
157994
  if (getFlag("RESOURCES_PROVISION")) {
157810
157995
  await provisionBindings(
157811
157996
  bindings,
@@ -157973,7 +158158,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
157973
158158
  return { versionId, workerTag };
157974
158159
  }
157975
158160
  if (config.containers) {
157976
- (0, import_node_assert23.default)(versionId && accountId);
158161
+ (0, import_node_assert24.default)(versionId && accountId);
157977
158162
  await deployContainers(config, {
157978
158163
  versionId,
157979
158164
  accountId,
@@ -158219,11 +158404,11 @@ async function updateQueueConsumers(scriptName, config) {
158219
158404
  }
158220
158405
  return updateConsumers;
158221
158406
  }
158222
- var import_node_assert23, import_node_fs32, import_node_path56, import_node_url9, import_undici21, validateRoutes3;
158407
+ var import_node_assert24, import_node_fs32, import_node_path56, import_node_url9, import_undici21, validateRoutes3;
158223
158408
  var init_deploy8 = __esm({
158224
158409
  "src/deploy/deploy.ts"() {
158225
158410
  init_import_meta_url();
158226
- import_node_assert23 = __toESM(require("assert"));
158411
+ import_node_assert24 = __toESM(require("assert"));
158227
158412
  import_node_fs32 = require("fs");
158228
158413
  import_node_path56 = __toESM(require("path"));
158229
158414
  import_node_url9 = require("url");
@@ -158467,11 +158652,11 @@ function errorOnLegacyPagesWorkerJSAsset(file, hasAssetsIgnoreFile) {
158467
158652
  }
158468
158653
  }
158469
158654
  }
158470
- var import_node_assert24, import_node_fs33, import_promises35, path60, import_undici22, BULK_UPLOAD_CONCURRENCY2, MAX_UPLOAD_ATTEMPTS2, MAX_UPLOAD_GATEWAY_ERRORS2, MAX_DIFF_LINES2, syncAssets, buildAssetManifest, NonExistentAssetsDirError, WORKER_JS_FILENAME;
158655
+ var import_node_assert25, import_node_fs33, import_promises35, path60, import_undici22, BULK_UPLOAD_CONCURRENCY2, MAX_UPLOAD_ATTEMPTS2, MAX_UPLOAD_GATEWAY_ERRORS2, MAX_DIFF_LINES2, syncAssets, buildAssetManifest, NonExistentAssetsDirError, WORKER_JS_FILENAME;
158471
158656
  var init_assets = __esm({
158472
158657
  "src/assets.ts"() {
158473
158658
  init_import_meta_url();
158474
- import_node_assert24 = __toESM(require("assert"));
158659
+ import_node_assert25 = __toESM(require("assert"));
158475
158660
  import_node_fs33 = require("fs");
158476
158661
  import_promises35 = require("fs/promises");
158477
158662
  path60 = __toESM(require("path"));
@@ -158496,7 +158681,7 @@ var init_assets = __esm({
158496
158681
  MAX_UPLOAD_GATEWAY_ERRORS2 = 5;
158497
158682
  MAX_DIFF_LINES2 = 100;
158498
158683
  syncAssets = /* @__PURE__ */ __name(async (complianceConfig, accountId, assetDirectory, scriptName, dispatchNamespace) => {
158499
- (0, import_node_assert24.default)(accountId, "Missing accountId");
158684
+ (0, import_node_assert25.default)(accountId, "Missing accountId");
158500
158685
  logger.info("\u{1F300} Building list of assets...");
158501
158686
  const manifest = await buildAssetManifest(assetDirectory);
158502
158687
  const url4 = dispatchNamespace ? `/accounts/${accountId}/workers/dispatch/namespaces/${dispatchNamespace}/scripts/${scriptName}/assets-upload-session` : `/accounts/${accountId}/workers/scripts/${scriptName}/assets-upload-session`;
@@ -158876,7 +159061,7 @@ async function resolveDevConfig(config, input) {
158876
159061
  );
158877
159062
  if (input.dev?.remote) {
158878
159063
  const { accountId } = await auth();
158879
- (0, import_node_assert25.default)(accountId, "Account ID must be provided for remote dev");
159064
+ (0, import_node_assert26.default)(accountId, "Account ID must be provided for remote dev");
158880
159065
  await getZoneIdForPreview(config, { host, routes, accountId });
158881
159066
  }
158882
159067
  const initialIp = input.dev?.server?.hostname ?? config.dev.ip;
@@ -159114,11 +159299,11 @@ If you are trying to develop Pages and Workers together, please use \`wrangler p
159114
159299
  }
159115
159300
  return resolved;
159116
159301
  }
159117
- var import_node_assert25, import_node_path57, getInspectorPort, getLocalPort, ConfigController;
159302
+ var import_node_assert26, import_node_path57, getInspectorPort, getLocalPort, ConfigController;
159118
159303
  var init_ConfigController = __esm({
159119
159304
  "src/api/startDevWorker/ConfigController.ts"() {
159120
159305
  init_import_meta_url();
159121
- import_node_assert25 = __toESM(require("assert"));
159306
+ import_node_assert26 = __toESM(require("assert"));
159122
159307
  import_node_path57 = __toESM(require("path"));
159123
159308
  init_containers_shared();
159124
159309
  init_esm4();
@@ -159169,7 +159354,7 @@ var init_ConfigController = __esm({
159169
159354
  ignoreInitial: true
159170
159355
  }).on("change", async (_event) => {
159171
159356
  logger.debug(`${import_node_path57.default.basename(configPath)} changed...`);
159172
- (0, import_node_assert25.default)(
159357
+ (0, import_node_assert26.default)(
159173
159358
  this.latestInput,
159174
159359
  "Cannot be watching config without having first set an input"
159175
159360
  );
@@ -159184,7 +159369,7 @@ var init_ConfigController = __esm({
159184
159369
  );
159185
159370
  }
159186
159371
  patch(input) {
159187
- (0, import_node_assert25.default)(
159372
+ (0, import_node_assert26.default)(
159188
159373
  this.latestInput,
159189
159374
  "Cannot call updateConfig without previously calling setConfig"
159190
159375
  );
@@ -159335,7 +159520,7 @@ function maybeGetSourceMappingURL(sourcePath) {
159335
159520
  return;
159336
159521
  }
159337
159522
  const sourceMappingURLMatch = source.substring(sourceMappingURLIndex).match(/^\/\/# sourceMappingURL=(.+)/);
159338
- (0, import_node_assert26.default)(sourceMappingURLMatch !== null);
159523
+ (0, import_node_assert27.default)(sourceMappingURLMatch !== null);
159339
159524
  const sourceMappingURLSpecifier = sourceMappingURLMatch[1];
159340
159525
  const sourceURL = (0, import_node_url10.pathToFileURL)(sourcePath);
159341
159526
  try {
@@ -159347,11 +159532,11 @@ function maybeGetSourceMappingURL(sourcePath) {
159347
159532
  } catch {
159348
159533
  }
159349
159534
  }
159350
- var import_node_assert26, import_node_fs34, import_node_path60, import_node_url10, bundleReferencedPathsCache;
159535
+ var import_node_assert27, import_node_fs34, import_node_path60, import_node_url10, bundleReferencedPathsCache;
159351
159536
  var init_bundle_allowed_paths = __esm({
159352
159537
  "src/api/startDevWorker/bundle-allowed-paths.ts"() {
159353
159538
  init_import_meta_url();
159354
- import_node_assert26 = __toESM(require("assert"));
159539
+ import_node_assert27 = __toESM(require("assert"));
159355
159540
  import_node_fs34 = __toESM(require("fs"));
159356
159541
  import_node_path60 = __toESM(require("path"));
159357
159542
  import_node_url10 = require("url");
@@ -177905,11 +178090,11 @@ function didMiniflareOptionsChange(prev, next) {
177905
178090
  }
177906
178091
  return !deepEquality(prev, next);
177907
178092
  }
177908
- var import_node_assert27, import_node_crypto12, import_node_events4, import_node_path61, import_miniflare23, ProxyController, ProxyControllerLogger;
178093
+ var import_node_assert28, import_node_crypto12, import_node_events4, import_node_path61, import_miniflare23, ProxyController, ProxyControllerLogger;
177909
178094
  var init_ProxyController = __esm({
177910
178095
  "src/api/startDevWorker/ProxyController.ts"() {
177911
178096
  init_import_meta_url();
177912
- import_node_assert27 = __toESM(require("assert"));
178097
+ import_node_assert28 = __toESM(require("assert"));
177913
178098
  import_node_crypto12 = require("crypto");
177914
178099
  import_node_events4 = __toESM(require("events"));
177915
178100
  import_node_path61 = __toESM(require("path"));
@@ -177940,7 +178125,7 @@ var init_ProxyController = __esm({
177940
178125
  if (this._torndown) {
177941
178126
  return;
177942
178127
  }
177943
- (0, import_node_assert27.default)(this.latestConfig !== void 0);
178128
+ (0, import_node_assert28.default)(this.latestConfig !== void 0);
177944
178129
  const inVscodeJsDebugTerminal = !!process.env.VSCODE_INSPECTOR_OPTIONS;
177945
178130
  const cert = this.latestConfig.dev?.server?.secure || this.latestConfig.dev.inspector !== false && this.latestConfig.dev?.inspector?.secure ? getHttpsOptions(
177946
178131
  this.latestConfig.dev.server?.httpsKeyPath,
@@ -178058,7 +178243,7 @@ var init_ProxyController = __esm({
178058
178243
  inspectorUrl
178059
178244
  ]);
178060
178245
  }).then(([url4, inspectorUrl]) => {
178061
- (0, import_node_assert27.default)(url4);
178246
+ (0, import_node_assert28.default)(url4);
178062
178247
  this.emitReadyEvent(proxyWorker, url4, inspectorUrl);
178063
178248
  }).catch((error2) => {
178064
178249
  if (this._torndown) {
@@ -178075,7 +178260,7 @@ var init_ProxyController = __esm({
178075
178260
  if (this._torndown) {
178076
178261
  return;
178077
178262
  }
178078
- (0, import_node_assert27.default)(
178263
+ (0, import_node_assert28.default)(
178079
178264
  this.latestConfig?.dev.inspector !== false,
178080
178265
  "Trying to reconnect with inspector proxy worker when inspector is disabled"
178081
178266
  );
@@ -178086,7 +178271,7 @@ var init_ProxyController = __esm({
178086
178271
  this.inspectorProxyWorkerWebSocket = createDeferred();
178087
178272
  let webSocket = null;
178088
178273
  try {
178089
- (0, import_node_assert27.default)(this.proxyWorker);
178274
+ (0, import_node_assert28.default)(this.proxyWorker);
178090
178275
  const inspectorProxyWorkerUrl = await this.proxyWorker.unsafeGetDirectURL(
178091
178276
  "InspectorProxyWorker"
178092
178277
  );
@@ -178105,12 +178290,12 @@ var init_ProxyController = __esm({
178105
178290
  this.emitErrorEvent("Could not connect to InspectorProxyWorker", error2);
178106
178291
  return;
178107
178292
  }
178108
- (0, import_node_assert27.default)(
178293
+ (0, import_node_assert28.default)(
178109
178294
  webSocket,
178110
178295
  "Expected webSocket on response from inspectorProxyWorker"
178111
178296
  );
178112
178297
  webSocket.addEventListener("message", (event) => {
178113
- (0, import_node_assert27.default)(typeof event.data === "string");
178298
+ (0, import_node_assert28.default)(typeof event.data === "string");
178114
178299
  this.onInspectorProxyWorkerMessage(JSON.parse(event.data));
178115
178300
  });
178116
178301
  webSocket.addEventListener("close", () => {
@@ -178165,13 +178350,13 @@ var init_ProxyController = __esm({
178165
178350
  if (this._torndown) {
178166
178351
  return;
178167
178352
  }
178168
- (0, import_node_assert27.default)(
178353
+ (0, import_node_assert28.default)(
178169
178354
  this.latestConfig?.dev.inspector !== false,
178170
178355
  "Trying to send message to inspector proxy worker when inspector is disabled"
178171
178356
  );
178172
178357
  try {
178173
178358
  const websocket = await this.reconnectInspectorProxyWorker();
178174
- (0, import_node_assert27.default)(websocket);
178359
+ (0, import_node_assert28.default)(websocket);
178175
178360
  websocket.send(JSON.stringify(message));
178176
178361
  } catch (cause) {
178177
178362
  if (this._torndown) {
@@ -178238,7 +178423,7 @@ var init_ProxyController = __esm({
178238
178423
  }
178239
178424
  }
178240
178425
  onInspectorProxyWorkerMessage(message) {
178241
- (0, import_node_assert27.default)(
178426
+ (0, import_node_assert28.default)(
178242
178427
  this.latestConfig?.dev.inspector !== false,
178243
178428
  "Trying to handle inspector message when inspector is disabled"
178244
178429
  );
@@ -178264,7 +178449,7 @@ var init_ProxyController = __esm({
178264
178449
  }
178265
178450
  }
178266
178451
  async onInspectorProxyWorkerRequest(message) {
178267
- (0, import_node_assert27.default)(
178452
+ (0, import_node_assert28.default)(
178268
178453
  this.latestConfig?.dev.inspector !== false,
178269
178454
  "Trying to handle inspector request when inspector is disabled"
178270
178455
  );
@@ -178285,8 +178470,8 @@ var init_ProxyController = __esm({
178285
178470
  logger.debug("[InspectorProxyWorker]", ...message.args);
178286
178471
  break;
178287
178472
  case "load-network-resource": {
178288
- (0, import_node_assert27.default)(this.latestConfig !== void 0);
178289
- (0, import_node_assert27.default)(this.latestBundle !== void 0);
178473
+ (0, import_node_assert28.default)(this.latestConfig !== void 0);
178474
+ (0, import_node_assert28.default)(this.latestBundle !== void 0);
178290
178475
  let maybeContents;
178291
178476
  if (message.url.startsWith("wrangler-file:")) {
178292
178477
  maybeContents = maybeHandleNetworkLoadResource(
@@ -178542,7 +178727,7 @@ var init_create_worker_preview = __esm({
178542
178727
 
178543
178728
  // src/dev/remote.ts
178544
178729
  function handlePreviewSessionUploadError(err, accountId) {
178545
- (0, import_node_assert28.default)(err && typeof err === "object");
178730
+ (0, import_node_assert29.default)(err && typeof err === "object");
178546
178731
  if (isAbortError(err)) {
178547
178732
  if ("code" in err && err.code === 10049) {
178548
178733
  logger.log("Preview token expired, fetching a new one");
@@ -178554,7 +178739,7 @@ function handlePreviewSessionUploadError(err, accountId) {
178554
178739
  return false;
178555
178740
  }
178556
178741
  function handlePreviewSessionCreationError(err, accountId) {
178557
- (0, import_node_assert28.default)(err && typeof err === "object");
178742
+ (0, import_node_assert29.default)(err && typeof err === "object");
178558
178743
  if ("code" in err && err.code === 10063) {
178559
178744
  const errorMessage = "Error: You need to register a workers.dev subdomain before running the dev command in remote mode";
178560
178745
  const solutionMessage = "You can either enable local mode by pressing l, or register a workers.dev subdomain here:";
@@ -178713,11 +178898,11 @@ ${onboardingLink}`);
178713
178898
  }
178714
178899
  }
178715
178900
  }
178716
- var import_node_assert28, import_node_path62;
178901
+ var import_node_assert29, import_node_path62;
178717
178902
  var init_remote = __esm({
178718
178903
  "src/dev/remote.ts"() {
178719
178904
  init_import_meta_url();
178720
- import_node_assert28 = __toESM(require("assert"));
178905
+ import_node_assert29 = __toESM(require("assert"));
178721
178906
  import_node_path62 = __toESM(require("path"));
178722
178907
  init_assets();
178723
178908
  init_bundle_reporter();
@@ -179043,7 +179228,7 @@ function createWorkerObject(devEnv) {
179043
179228
  return devEnv.proxy.ready.promise.then((ev) => ev.inspectorUrl);
179044
179229
  },
179045
179230
  get config() {
179046
- (0, import_node_assert29.default)(devEnv.config.latestConfig);
179231
+ (0, import_node_assert30.default)(devEnv.config.latestConfig);
179047
179232
  return devEnv.config.latestConfig;
179048
179233
  },
179049
179234
  async setConfig(config, throwErrors) {
@@ -179058,7 +179243,7 @@ function createWorkerObject(devEnv) {
179058
179243
  return proxyWorker.dispatchFetch(...args);
179059
179244
  },
179060
179245
  async queue(...args) {
179061
- (0, import_node_assert29.default)(
179246
+ (0, import_node_assert30.default)(
179062
179247
  this.config.name,
179063
179248
  "Worker name must be defined to use `Worker.queue()`"
179064
179249
  );
@@ -179067,7 +179252,7 @@ function createWorkerObject(devEnv) {
179067
179252
  return w6.queue(...args);
179068
179253
  },
179069
179254
  async scheduled(...args) {
179070
- (0, import_node_assert29.default)(
179255
+ (0, import_node_assert30.default)(
179071
179256
  this.config.name,
179072
179257
  "Worker name must be defined to use `Worker.scheduled()`"
179073
179258
  );
@@ -179081,11 +179266,11 @@ function createWorkerObject(devEnv) {
179081
179266
  raw: devEnv
179082
179267
  };
179083
179268
  }
179084
- var import_node_assert29, import_node_events5, DevEnv;
179269
+ var import_node_assert30, import_node_events5, DevEnv;
179085
179270
  var init_DevEnv = __esm({
179086
179271
  "src/api/startDevWorker/DevEnv.ts"() {
179087
179272
  init_import_meta_url();
179088
- import_node_assert29 = __toESM(require("assert"));
179273
+ import_node_assert30 = __toESM(require("assert"));
179089
179274
  import_node_events5 = require("events");
179090
179275
  init_logger();
179091
179276
  init_parse();
@@ -179290,7 +179475,7 @@ async function maybeStartOrUpdateRemoteProxySession(configPathOrWorkerConfig, pr
179290
179475
  if (typeof configPathOrWorkerConfig === "string") {
179291
179476
  const configPath = configPathOrWorkerConfig;
179292
179477
  const config = readConfig({ config: configPath });
179293
- (0, import_node_assert30.default)(config.name);
179478
+ (0, import_node_assert31.default)(config.name);
179294
179479
  configPathOrWorkerConfig = {
179295
179480
  name: config.name,
179296
179481
  complianceRegion: getCloudflareComplianceRegion(config),
@@ -179327,17 +179512,17 @@ async function maybeStartOrUpdateRemoteProxySession(configPathOrWorkerConfig, pr
179327
179512
  }
179328
179513
  function deepStrictEqual(source, target) {
179329
179514
  try {
179330
- import_node_assert30.default.deepStrictEqual(source, target);
179515
+ import_node_assert31.default.deepStrictEqual(source, target);
179331
179516
  return true;
179332
179517
  } catch {
179333
179518
  return false;
179334
179519
  }
179335
179520
  }
179336
- var import_node_assert30, import_node_path63;
179521
+ var import_node_assert31, import_node_path63;
179337
179522
  var init_remoteBindings = __esm({
179338
179523
  "src/api/remoteBindings/index.ts"() {
179339
179524
  init_import_meta_url();
179340
- import_node_assert30 = __toESM(require("assert"));
179525
+ import_node_assert31 = __toESM(require("assert"));
179341
179526
  import_node_path63 = __toESM(require("path"));
179342
179527
  init_get_port();
179343
179528
  init_config2();
@@ -179462,7 +179647,7 @@ async function getContainerOptions(config) {
179462
179647
  if (!config.containers?.length || config.dev.enableContainers === false) {
179463
179648
  return void 0;
179464
179649
  }
179465
- (0, import_node_assert31.default)(
179650
+ (0, import_node_assert32.default)(
179466
179651
  config.dev.containerBuildId,
179467
179652
  "Build ID should be set if containers are enabled and defined"
179468
179653
  );
@@ -179481,11 +179666,11 @@ async function getContainerOptions(config) {
179481
179666
  }
179482
179667
  return containers2;
179483
179668
  }
179484
- var import_node_assert31, import_node_crypto14, import_promises36, import_miniflare26, LocalRuntimeController;
179669
+ var import_node_assert32, import_node_crypto14, import_promises36, import_miniflare26, LocalRuntimeController;
179485
179670
  var init_LocalRuntimeController = __esm({
179486
179671
  "src/api/startDevWorker/LocalRuntimeController.ts"() {
179487
179672
  init_import_meta_url();
179488
- import_node_assert31 = __toESM(require("assert"));
179673
+ import_node_assert32 = __toESM(require("assert"));
179489
179674
  import_node_crypto14 = require("crypto");
179490
179675
  import_promises36 = require("fs/promises");
179491
179676
  init_containers_shared();
@@ -179663,7 +179848,7 @@ var init_LocalRuntimeController = __esm({
179663
179848
  onPreviewTokenExpired(_4) {
179664
179849
  }
179665
179850
  cleanupContainers = /* @__PURE__ */ __name(async () => {
179666
- (0, import_node_assert31.default)(
179851
+ (0, import_node_assert32.default)(
179667
179852
  this.#dockerPath,
179668
179853
  "Docker path should have been set if containers are enabled"
179669
179854
  );
@@ -179732,11 +179917,11 @@ function ensureMatchingSql(options) {
179732
179917
  }
179733
179918
  return options;
179734
179919
  }
179735
- var import_node_assert32, import_node_crypto15, import_miniflare27, MultiworkerRuntimeController;
179920
+ var import_node_assert33, import_node_crypto15, import_miniflare27, MultiworkerRuntimeController;
179736
179921
  var init_MultiworkerRuntimeController = __esm({
179737
179922
  "src/api/startDevWorker/MultiworkerRuntimeController.ts"() {
179738
179923
  init_import_meta_url();
179739
- import_node_assert32 = __toESM(require("assert"));
179924
+ import_node_assert33 = __toESM(require("assert"));
179740
179925
  import_node_crypto15 = require("crypto");
179741
179926
  init_source();
179742
179927
  import_miniflare27 = require("miniflare");
@@ -179775,7 +179960,7 @@ var init_MultiworkerRuntimeController = __esm({
179775
179960
  }
179776
179961
  #mergedMfOptions() {
179777
179962
  const primary = [...this.#options.values()].find((o5) => o5.primary);
179778
- (0, import_node_assert32.default)(primary !== void 0);
179963
+ (0, import_node_assert33.default)(primary !== void 0);
179779
179964
  const secondary = [...this.#options.values()].filter((o5) => !o5.primary);
179780
179965
  return {
179781
179966
  ...primary.options,
@@ -182621,11 +182806,11 @@ async function generateAssetsFetch(directory, log2) {
182621
182806
  return await generateResponse(request4);
182622
182807
  };
182623
182808
  }
182624
- var import_node_assert33, import_node_fs36, import_node_path66, import_mime3, import_miniflare29, import_undici24, ProxyDispatcher, invalidAssetsFetch;
182809
+ var import_node_assert34, import_node_fs36, import_node_path66, import_mime3, import_miniflare29, import_undici24, ProxyDispatcher, invalidAssetsFetch;
182625
182810
  var init_assets2 = __esm({
182626
182811
  "src/miniflare-cli/assets.ts"() {
182627
182812
  init_import_meta_url();
182628
- import_node_assert33 = __toESM(require("assert"));
182813
+ import_node_assert34 = __toESM(require("assert"));
182629
182814
  import_node_fs36 = require("fs");
182630
182815
  import_node_path66 = require("path");
182631
182816
  init_createMetadataObject();
@@ -182663,12 +182848,12 @@ var init_assets2 = __esm({
182663
182848
  * by the `fetch()` function before calling `dispatcher.dispatch()`.
182664
182849
  */
182665
182850
  static reinstateHostHeader(headers, host) {
182666
- (0, import_node_assert33.default)(headers, "Expected all proxy requests to contain headers.");
182667
- (0, import_node_assert33.default)(
182851
+ (0, import_node_assert34.default)(headers, "Expected all proxy requests to contain headers.");
182852
+ (0, import_node_assert34.default)(
182668
182853
  !Array.isArray(headers),
182669
182854
  "Expected proxy request headers to be a hash object"
182670
182855
  );
182671
- (0, import_node_assert33.default)(
182856
+ (0, import_node_assert34.default)(
182672
182857
  Object.keys(headers).every((h6) => h6.toLowerCase() !== "host"),
182673
182858
  "Expected Host header to have been deleted."
182674
182859
  );
@@ -182868,7 +183053,7 @@ async function startDev(args) {
182868
183053
  unregisterHotKeys?.();
182869
183054
  accountId = await requireAuth(config);
182870
183055
  if (hotkeysDisplayed) {
182871
- (0, import_node_assert34.default)(devEnv !== void 0);
183056
+ (0, import_node_assert35.default)(devEnv !== void 0);
182872
183057
  unregisterHotKeys = registerDevHotKeys(
182873
183058
  Array.isArray(devEnv) ? devEnv[0] : devEnv,
182874
183059
  args
@@ -182940,7 +183125,7 @@ async function startDev(args) {
182940
183125
  });
182941
183126
  if (!args.disableDevRegistry) {
182942
183127
  teardownRegistryPromise = devRegistry2((registry) => {
182943
- (0, import_node_assert34.default)(devEnv !== void 0 && !Array.isArray(devEnv));
183128
+ (0, import_node_assert35.default)(devEnv !== void 0 && !Array.isArray(devEnv));
182944
183129
  void updateDevEnvRegistry(devEnv, registry);
182945
183130
  });
182946
183131
  devEnv.runtimes.forEach((runtime) => {
@@ -182948,7 +183133,7 @@ async function startDev(args) {
182948
183133
  "reloadComplete",
182949
183134
  async (reloadEvent) => {
182950
183135
  if (!reloadEvent.config.dev?.remote) {
182951
- (0, import_node_assert34.default)(devEnv !== void 0 && !Array.isArray(devEnv));
183136
+ (0, import_node_assert35.default)(devEnv !== void 0 && !Array.isArray(devEnv));
182952
183137
  const { url: url4 } = await devEnv.proxy.ready.promise;
182953
183138
  await maybeRegisterLocalWorker(
182954
183139
  url4,
@@ -182979,7 +183164,7 @@ async function startDev(args) {
182979
183164
  ...Array.isArray(devEnv) ? devEnv.map((d6) => d6.teardown()) : [devEnv?.teardown()],
182980
183165
  (async () => {
182981
183166
  if (teardownRegistryPromise) {
182982
- (0, import_node_assert34.default)(devEnv === void 0 || !Array.isArray(devEnv));
183167
+ (0, import_node_assert35.default)(devEnv === void 0 || !Array.isArray(devEnv));
182983
183168
  const teardownRegistry = await teardownRegistryPromise;
182984
183169
  await teardownRegistry(devEnv?.config.latestConfig?.name);
182985
183170
  }
@@ -183215,11 +183400,11 @@ function getAssetChangeMessage(eventName, assetPath) {
183215
183400
  }
183216
183401
  return message;
183217
183402
  }
183218
- var import_node_assert34, import_node_crypto16, import_node_events6, import_node_path67, import_node_util3, import_env2, dev;
183403
+ var import_node_assert35, import_node_crypto16, import_node_events6, import_node_path67, import_node_util3, import_env2, dev;
183219
183404
  var init_dev2 = __esm({
183220
183405
  "src/dev.ts"() {
183221
183406
  init_import_meta_url();
183222
- import_node_assert34 = __toESM(require("assert"));
183407
+ import_node_assert35 = __toESM(require("assert"));
183223
183408
  import_node_crypto16 = require("crypto");
183224
183409
  import_node_events6 = __toESM(require("events"));
183225
183410
  import_node_path67 = __toESM(require("path"));
@@ -183500,7 +183685,7 @@ var init_dev2 = __esm({
183500
183685
  },
183501
183686
  async handler(args) {
183502
183687
  const devInstance = await startDev(args);
183503
- (0, import_node_assert34.default)(devInstance.devEnv !== void 0);
183688
+ (0, import_node_assert35.default)(devInstance.devEnv !== void 0);
183504
183689
  await import_node_events6.default.once(devInstance.devEnv, "teardown");
183505
183690
  await Promise.all(devInstance.secondary.map((d6) => d6.teardown()));
183506
183691
  if (devInstance.teardownRegistryPromise) {