create-cloudflare 2.68.4 → 2.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -2696,9 +2696,9 @@ var require_dispatcher_base = __commonJS({
2696
2696
  }
2697
2697
  close(callback) {
2698
2698
  if (callback === void 0) {
2699
- return new Promise((resolve12, reject) => {
2699
+ return new Promise((resolve13, reject) => {
2700
2700
  this.close((err, data) => {
2701
- return err ? reject(err) : resolve12(data);
2701
+ return err ? reject(err) : resolve13(data);
2702
2702
  });
2703
2703
  });
2704
2704
  }
@@ -2736,9 +2736,9 @@ var require_dispatcher_base = __commonJS({
2736
2736
  err = null;
2737
2737
  }
2738
2738
  if (callback === void 0) {
2739
- return new Promise((resolve12, reject) => {
2739
+ return new Promise((resolve13, reject) => {
2740
2740
  this.destroy(err, (err2, data) => {
2741
- return err2 ? reject(err2) : resolve12(data);
2741
+ return err2 ? reject(err2) : resolve13(data);
2742
2742
  });
2743
2743
  });
2744
2744
  }
@@ -5730,7 +5730,7 @@ var require_formdata = __commonJS({
5730
5730
  var { kEnumerableProperty } = require_util();
5731
5731
  var { webidl } = require_webidl();
5732
5732
  var nodeUtil = require("node:util");
5733
- var FormData = class _FormData {
5733
+ var FormData2 = class _FormData {
5734
5734
  #state = [];
5735
5735
  constructor(form = void 0) {
5736
5736
  webidl.util.markAsUncloneable(this);
@@ -5847,11 +5847,11 @@ var require_formdata = __commonJS({
5847
5847
  formData.#state = newState;
5848
5848
  }
5849
5849
  };
5850
- var { getFormDataState, setFormDataState } = FormData;
5851
- Reflect.deleteProperty(FormData, "getFormDataState");
5852
- Reflect.deleteProperty(FormData, "setFormDataState");
5853
- iteratorMixin("FormData", FormData, getFormDataState, "name", "value");
5854
- Object.defineProperties(FormData.prototype, {
5850
+ var { getFormDataState, setFormDataState } = FormData2;
5851
+ Reflect.deleteProperty(FormData2, "getFormDataState");
5852
+ Reflect.deleteProperty(FormData2, "setFormDataState");
5853
+ iteratorMixin("FormData", FormData2, getFormDataState, "name", "value");
5854
+ Object.defineProperties(FormData2.prototype, {
5855
5855
  append: kEnumerableProperty,
5856
5856
  delete: kEnumerableProperty,
5857
5857
  get: kEnumerableProperty,
@@ -5879,8 +5879,8 @@ var require_formdata = __commonJS({
5879
5879
  }
5880
5880
  return { name: name3, value };
5881
5881
  }
5882
- webidl.is.FormData = webidl.util.MakeTypeAssertion(FormData);
5883
- module2.exports = { FormData, makeEntry, setFormDataState };
5882
+ webidl.is.FormData = webidl.util.MakeTypeAssertion(FormData2);
5883
+ module2.exports = { FormData: FormData2, makeEntry, setFormDataState };
5884
5884
  }
5885
5885
  });
5886
5886
 
@@ -6215,8 +6215,8 @@ var require_promise = __commonJS({
6215
6215
  function createDeferredPromise() {
6216
6216
  let res;
6217
6217
  let rej;
6218
- const promise = new Promise((resolve12, reject) => {
6219
- res = resolve12;
6218
+ const promise = new Promise((resolve13, reject) => {
6219
+ res = resolve13;
6220
6220
  rej = reject;
6221
6221
  });
6222
6222
  return { promise, resolve: res, reject: rej };
@@ -6238,7 +6238,7 @@ var require_body = __commonJS({
6238
6238
  fullyReadBody,
6239
6239
  extractMimeType
6240
6240
  } = require_util2();
6241
- var { FormData, setFormDataState } = require_formdata();
6241
+ var { FormData: FormData2, setFormDataState } = require_formdata();
6242
6242
  var { webidl } = require_webidl();
6243
6243
  var assert7 = require("node:assert");
6244
6244
  var { isErrored, isDisturbed } = require("node:stream");
@@ -6431,13 +6431,13 @@ Content-Type: ${value.type || "application/octet-stream"}\r
6431
6431
  switch (mimeType.essence) {
6432
6432
  case "multipart/form-data": {
6433
6433
  const parsed = multipartFormDataParser(value, mimeType);
6434
- const fd = new FormData();
6434
+ const fd = new FormData2();
6435
6435
  setFormDataState(fd, parsed);
6436
6436
  return fd;
6437
6437
  }
6438
6438
  case "application/x-www-form-urlencoded": {
6439
6439
  const entries = new URLSearchParams(value.toString());
6440
- const fd = new FormData();
6440
+ const fd = new FormData2();
6441
6441
  for (const [name3, value2] of entries) {
6442
6442
  fd.append(name3, value2);
6443
6443
  }
@@ -7517,12 +7517,12 @@ upgrade: ${upgrade}\r
7517
7517
  cb();
7518
7518
  }
7519
7519
  }
7520
- const waitForDrain = () => new Promise((resolve12, reject) => {
7520
+ const waitForDrain = () => new Promise((resolve13, reject) => {
7521
7521
  assert7(callback === null);
7522
7522
  if (socket[kError]) {
7523
7523
  reject(socket[kError]);
7524
7524
  } else {
7525
- callback = resolve12;
7525
+ callback = resolve13;
7526
7526
  }
7527
7527
  });
7528
7528
  socket.on("close", onDrain).on("drain", onDrain);
@@ -8367,12 +8367,12 @@ var require_client_h2 = __commonJS({
8367
8367
  cb();
8368
8368
  }
8369
8369
  }
8370
- const waitForDrain = () => new Promise((resolve12, reject) => {
8370
+ const waitForDrain = () => new Promise((resolve13, reject) => {
8371
8371
  assert7(callback === null);
8372
8372
  if (socket[kError]) {
8373
8373
  reject(socket[kError]);
8374
8374
  } else {
8375
- callback = resolve12;
8375
+ callback = resolve13;
8376
8376
  }
8377
8377
  });
8378
8378
  h2stream.on("close", onDrain).on("drain", onDrain);
@@ -8683,16 +8683,16 @@ var require_client = __commonJS({
8683
8683
  return this[kNeedDrain] < 2;
8684
8684
  }
8685
8685
  [kClose]() {
8686
- return new Promise((resolve12) => {
8686
+ return new Promise((resolve13) => {
8687
8687
  if (this[kSize]) {
8688
- this[kClosedResolve] = resolve12;
8688
+ this[kClosedResolve] = resolve13;
8689
8689
  } else {
8690
- resolve12(null);
8690
+ resolve13(null);
8691
8691
  }
8692
8692
  });
8693
8693
  }
8694
8694
  [kDestroy](err) {
8695
- return new Promise((resolve12) => {
8695
+ return new Promise((resolve13) => {
8696
8696
  const requests = this[kQueue].splice(this[kPendingIdx]);
8697
8697
  for (let i = 0; i < requests.length; i++) {
8698
8698
  const request2 = requests[i];
@@ -8703,7 +8703,7 @@ var require_client = __commonJS({
8703
8703
  this[kClosedResolve]();
8704
8704
  this[kClosedResolve] = null;
8705
8705
  }
8706
- resolve12(null);
8706
+ resolve13(null);
8707
8707
  };
8708
8708
  if (this[kHTTPContext]) {
8709
8709
  this[kHTTPContext].destroy(err, callback);
@@ -9108,8 +9108,8 @@ var require_pool_base = __commonJS({
9108
9108
  }
9109
9109
  return Promise.all(closeAll);
9110
9110
  } else {
9111
- return new Promise((resolve12) => {
9112
- this[kClosedResolve] = resolve12;
9111
+ return new Promise((resolve13) => {
9112
+ this[kClosedResolve] = resolve13;
9113
9113
  });
9114
9114
  }
9115
9115
  }
@@ -10201,10 +10201,10 @@ var require_socks5_proxy_agent = __commonJS({
10201
10201
  const proxyHost = this[kProxyUrl].hostname;
10202
10202
  const proxyPort = parseInt(this[kProxyUrl].port) || 1080;
10203
10203
  debug("creating SOCKS5 connection to", proxyHost, proxyPort);
10204
- const socket = await new Promise((resolve12, reject) => {
10204
+ const socket = await new Promise((resolve13, reject) => {
10205
10205
  const onConnect = () => {
10206
10206
  socket2.removeListener("error", onError);
10207
- resolve12(socket2);
10207
+ resolve13(socket2);
10208
10208
  };
10209
10209
  const onError = (err) => {
10210
10210
  socket2.removeListener("connect", onConnect);
@@ -10223,14 +10223,14 @@ var require_socks5_proxy_agent = __commonJS({
10223
10223
  socket.destroy();
10224
10224
  });
10225
10225
  await socks5Client.handshake();
10226
- await new Promise((resolve12, reject) => {
10226
+ await new Promise((resolve13, reject) => {
10227
10227
  const timeout = setTimeout(() => {
10228
10228
  reject(new Error("SOCKS5 authentication timeout"));
10229
10229
  }, 5e3);
10230
10230
  const onAuthenticated = () => {
10231
10231
  clearTimeout(timeout);
10232
10232
  socks5Client.removeListener("error", onError);
10233
- resolve12();
10233
+ resolve13();
10234
10234
  };
10235
10235
  const onError = (err) => {
10236
10236
  clearTimeout(timeout);
@@ -10239,14 +10239,14 @@ var require_socks5_proxy_agent = __commonJS({
10239
10239
  };
10240
10240
  if (socks5Client.state === "authenticated") {
10241
10241
  clearTimeout(timeout);
10242
- resolve12();
10242
+ resolve13();
10243
10243
  } else {
10244
10244
  socks5Client.once("authenticated", onAuthenticated);
10245
10245
  socks5Client.once("error", onError);
10246
10246
  }
10247
10247
  });
10248
10248
  await socks5Client.connect(targetHost, targetPort);
10249
- await new Promise((resolve12, reject) => {
10249
+ await new Promise((resolve13, reject) => {
10250
10250
  const timeout = setTimeout(() => {
10251
10251
  reject(new Error("SOCKS5 connection timeout"));
10252
10252
  }, 5e3);
@@ -10254,7 +10254,7 @@ var require_socks5_proxy_agent = __commonJS({
10254
10254
  debug("SOCKS5 tunnel established to", targetHost, targetPort, "via", info);
10255
10255
  clearTimeout(timeout);
10256
10256
  socks5Client.removeListener("error", onError);
10257
- resolve12();
10257
+ resolve13();
10258
10258
  };
10259
10259
  const onError = (err) => {
10260
10260
  clearTimeout(timeout);
@@ -10295,8 +10295,8 @@ var require_socks5_proxy_agent = __commonJS({
10295
10295
  servername: targetHost,
10296
10296
  ...connectOpts.tls || {}
10297
10297
  });
10298
- await new Promise((resolve12, reject) => {
10299
- finalSocket.once("secureConnect", resolve12);
10298
+ await new Promise((resolve13, reject) => {
10299
+ finalSocket.once("secureConnect", resolve13);
10300
10300
  finalSocket.once("error", reject);
10301
10301
  });
10302
10302
  }
@@ -11321,7 +11321,7 @@ var require_readable = __commonJS({
11321
11321
  if (this._readableState.closeEmitted) {
11322
11322
  return Promise.resolve(null);
11323
11323
  }
11324
- return new Promise((resolve12, reject) => {
11324
+ return new Promise((resolve13, reject) => {
11325
11325
  if (this[kContentLength] && this[kContentLength] > limit || this[kBytesRead] > limit) {
11326
11326
  this.destroy(new AbortError());
11327
11327
  }
@@ -11335,11 +11335,11 @@ var require_readable = __commonJS({
11335
11335
  if (signal.aborted) {
11336
11336
  reject(signal.reason ?? new AbortError());
11337
11337
  } else {
11338
- resolve12(null);
11338
+ resolve13(null);
11339
11339
  }
11340
11340
  });
11341
11341
  } else {
11342
- this.on("close", resolve12);
11342
+ this.on("close", resolve13);
11343
11343
  }
11344
11344
  this.on("error", noop).on("data", () => {
11345
11345
  if (this[kBytesRead] > limit) {
@@ -11367,7 +11367,7 @@ var require_readable = __commonJS({
11367
11367
  }
11368
11368
  function consume(stream, type) {
11369
11369
  assert7(!stream[kConsume]);
11370
- return new Promise((resolve12, reject) => {
11370
+ return new Promise((resolve13, reject) => {
11371
11371
  if (isUnusable(stream)) {
11372
11372
  const rState = stream._readableState;
11373
11373
  if (rState.destroyed && rState.closeEmitted === false) {
@@ -11382,7 +11382,7 @@ var require_readable = __commonJS({
11382
11382
  stream[kConsume] = {
11383
11383
  type,
11384
11384
  stream,
11385
- resolve: resolve12,
11385
+ resolve: resolve13,
11386
11386
  reject,
11387
11387
  length: 0,
11388
11388
  body: []
@@ -11456,18 +11456,18 @@ var require_readable = __commonJS({
11456
11456
  return buffer;
11457
11457
  }
11458
11458
  function consumeEnd(consume2, encoding) {
11459
- const { type, body, resolve: resolve12, stream, length } = consume2;
11459
+ const { type, body, resolve: resolve13, stream, length } = consume2;
11460
11460
  try {
11461
11461
  if (type === "text") {
11462
- resolve12(chunksDecode(body, length, encoding));
11462
+ resolve13(chunksDecode(body, length, encoding));
11463
11463
  } else if (type === "json") {
11464
- resolve12(JSON.parse(chunksDecode(body, length, encoding)));
11464
+ resolve13(JSON.parse(chunksDecode(body, length, encoding)));
11465
11465
  } else if (type === "arrayBuffer") {
11466
- resolve12(chunksConcat(body, length).buffer);
11466
+ resolve13(chunksConcat(body, length).buffer);
11467
11467
  } else if (type === "blob") {
11468
- resolve12(new Blob(body, { type: stream[kContentType] }));
11468
+ resolve13(new Blob(body, { type: stream[kContentType] }));
11469
11469
  } else if (type === "bytes") {
11470
- resolve12(chunksConcat(body, length));
11470
+ resolve13(chunksConcat(body, length));
11471
11471
  }
11472
11472
  consumeFinish(consume2);
11473
11473
  } catch (err) {
@@ -11657,9 +11657,9 @@ var require_api_request = __commonJS({
11657
11657
  };
11658
11658
  function request2(opts, callback) {
11659
11659
  if (callback === void 0) {
11660
- return new Promise((resolve12, reject) => {
11660
+ return new Promise((resolve13, reject) => {
11661
11661
  request2.call(this, opts, (err, data) => {
11662
- return err ? reject(err) : resolve12(data);
11662
+ return err ? reject(err) : resolve13(data);
11663
11663
  });
11664
11664
  });
11665
11665
  }
@@ -11871,9 +11871,9 @@ var require_api_stream = __commonJS({
11871
11871
  };
11872
11872
  function stream(opts, factory, callback) {
11873
11873
  if (callback === void 0) {
11874
- return new Promise((resolve12, reject) => {
11874
+ return new Promise((resolve13, reject) => {
11875
11875
  stream.call(this, opts, factory, (err, data) => {
11876
- return err ? reject(err) : resolve12(data);
11876
+ return err ? reject(err) : resolve13(data);
11877
11877
  });
11878
11878
  });
11879
11879
  }
@@ -12161,9 +12161,9 @@ var require_api_upgrade = __commonJS({
12161
12161
  };
12162
12162
  function upgrade(opts, callback) {
12163
12163
  if (callback === void 0) {
12164
- return new Promise((resolve12, reject) => {
12164
+ return new Promise((resolve13, reject) => {
12165
12165
  upgrade.call(this, opts, (err, data) => {
12166
- return err ? reject(err) : resolve12(data);
12166
+ return err ? reject(err) : resolve13(data);
12167
12167
  });
12168
12168
  });
12169
12169
  }
@@ -12256,9 +12256,9 @@ var require_api_connect = __commonJS({
12256
12256
  };
12257
12257
  function connect(opts, callback) {
12258
12258
  if (callback === void 0) {
12259
- return new Promise((resolve12, reject) => {
12259
+ return new Promise((resolve13, reject) => {
12260
12260
  connect.call(this, opts, (err, data) => {
12261
- return err ? reject(err) : resolve12(data);
12261
+ return err ? reject(err) : resolve13(data);
12262
12262
  });
12263
12263
  });
12264
12264
  }
@@ -13532,8 +13532,8 @@ var require_snapshot_recorder = __commonJS({
13532
13532
  "../../node_modules/.pnpm/undici@7.24.8/node_modules/undici/lib/mock/snapshot-recorder.js"(exports2, module2) {
13533
13533
  "use strict";
13534
13534
  var { writeFile: writeFile4, readFile: readFile2, mkdir } = require("node:fs/promises");
13535
- var { dirname: dirname7, resolve: resolve12 } = require("node:path");
13536
- var { setTimeout: setTimeout5, clearTimeout: clearTimeout2 } = require("node:timers");
13535
+ var { dirname: dirname7, resolve: resolve13 } = require("node:path");
13536
+ var { setTimeout: setTimeout6, clearTimeout: clearTimeout2 } = require("node:timers");
13537
13537
  var { InvalidArgumentError, UndiciError } = require_errors();
13538
13538
  var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils();
13539
13539
  function formatRequestKey(opts, headerFilters, matchOptions = {}) {
@@ -13733,7 +13733,7 @@ var require_snapshot_recorder = __commonJS({
13733
13733
  throw new InvalidArgumentError("Snapshot path is required");
13734
13734
  }
13735
13735
  try {
13736
- const data = await readFile2(resolve12(path6), "utf8");
13736
+ const data = await readFile2(resolve13(path6), "utf8");
13737
13737
  const parsed = JSON.parse(data);
13738
13738
  if (Array.isArray(parsed)) {
13739
13739
  this.#snapshots.clear();
@@ -13762,7 +13762,7 @@ var require_snapshot_recorder = __commonJS({
13762
13762
  if (!path6) {
13763
13763
  throw new InvalidArgumentError("Snapshot path is required");
13764
13764
  }
13765
- const resolvedPath = resolve12(path6);
13765
+ const resolvedPath = resolve13(path6);
13766
13766
  await mkdir(dirname7(resolvedPath), { recursive: true });
13767
13767
  const data = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({
13768
13768
  hash,
@@ -13867,7 +13867,7 @@ var require_snapshot_recorder = __commonJS({
13867
13867
  * Schedules a flush (debounced to avoid excessive writes)
13868
13868
  */
13869
13869
  #scheduleFlush() {
13870
- this.#flushTimeout = setTimeout5(() => {
13870
+ this.#flushTimeout = setTimeout6(() => {
13871
13871
  this.saveSnapshots().catch(() => {
13872
13872
  });
13873
13873
  if (this.#autoFlush) {
@@ -18133,7 +18133,7 @@ var require_headers = __commonJS({
18133
18133
  }
18134
18134
  }
18135
18135
  };
18136
- var Headers = class _Headers {
18136
+ var Headers2 = class _Headers {
18137
18137
  #guard;
18138
18138
  /**
18139
18139
  * @type {HeadersList}
@@ -18274,13 +18274,13 @@ var require_headers = __commonJS({
18274
18274
  target.#headersList = list;
18275
18275
  }
18276
18276
  };
18277
- var { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers;
18278
- Reflect.deleteProperty(Headers, "getHeadersGuard");
18279
- Reflect.deleteProperty(Headers, "setHeadersGuard");
18280
- Reflect.deleteProperty(Headers, "getHeadersList");
18281
- Reflect.deleteProperty(Headers, "setHeadersList");
18282
- iteratorMixin("Headers", Headers, headersListSortAndCombine, 0, 1);
18283
- Object.defineProperties(Headers.prototype, {
18277
+ var { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers2;
18278
+ Reflect.deleteProperty(Headers2, "getHeadersGuard");
18279
+ Reflect.deleteProperty(Headers2, "setHeadersGuard");
18280
+ Reflect.deleteProperty(Headers2, "getHeadersList");
18281
+ Reflect.deleteProperty(Headers2, "setHeadersList");
18282
+ iteratorMixin("Headers", Headers2, headersListSortAndCombine, 0, 1);
18283
+ Object.defineProperties(Headers2.prototype, {
18284
18284
  append: kEnumerableProperty,
18285
18285
  delete: kEnumerableProperty,
18286
18286
  get: kEnumerableProperty,
@@ -18298,7 +18298,7 @@ var require_headers = __commonJS({
18298
18298
  webidl.converters.HeadersInit = function(V2, prefix, argument) {
18299
18299
  if (webidl.util.Type(V2) === webidl.util.Types.OBJECT) {
18300
18300
  const iterator = Reflect.get(V2, Symbol.iterator);
18301
- if (!util2.types.isProxy(V2) && iterator === Headers.prototype.entries) {
18301
+ if (!util2.types.isProxy(V2) && iterator === Headers2.prototype.entries) {
18302
18302
  try {
18303
18303
  return getHeadersList(V2).entriesList;
18304
18304
  } catch {
@@ -18319,7 +18319,7 @@ var require_headers = __commonJS({
18319
18319
  fill,
18320
18320
  // for test.
18321
18321
  compareHeaderName,
18322
- Headers,
18322
+ Headers: Headers2,
18323
18323
  HeadersList,
18324
18324
  getHeadersGuard,
18325
18325
  setHeadersGuard,
@@ -18333,7 +18333,7 @@ var require_headers = __commonJS({
18333
18333
  var require_response = __commonJS({
18334
18334
  "../../node_modules/.pnpm/undici@7.24.8/node_modules/undici/lib/web/fetch/response.js"(exports2, module2) {
18335
18335
  "use strict";
18336
- var { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers();
18336
+ var { Headers: Headers2, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers();
18337
18337
  var { extractBody, cloneBody, mixinBody, streamRegistry, bodyUnusable } = require_body();
18338
18338
  var util2 = require_util();
18339
18339
  var nodeUtil = require("node:util");
@@ -18355,7 +18355,7 @@ var require_response = __commonJS({
18355
18355
  var assert7 = require("node:assert");
18356
18356
  var { isomorphicEncode, serializeJavascriptValueToJSONString } = require_infra();
18357
18357
  var textEncoder = new TextEncoder("utf-8");
18358
- var Response = class _Response {
18358
+ var Response2 = class _Response {
18359
18359
  /** @type {Headers} */
18360
18360
  #headers;
18361
18361
  #state;
@@ -18409,7 +18409,7 @@ var require_response = __commonJS({
18409
18409
  }
18410
18410
  init = webidl.converters.ResponseInit(init);
18411
18411
  this.#state = makeResponse({});
18412
- this.#headers = new Headers(kConstruct);
18412
+ this.#headers = new Headers2(kConstruct);
18413
18413
  setHeadersGuard(this.#headers, "response");
18414
18414
  setHeadersList(this.#headers, this.#state.headersList);
18415
18415
  let bodyWithType = null;
@@ -18527,13 +18527,13 @@ var require_response = __commonJS({
18527
18527
  response.#state = newState;
18528
18528
  }
18529
18529
  };
18530
- var { getResponseHeaders, setResponseHeaders, getResponseState, setResponseState } = Response;
18531
- Reflect.deleteProperty(Response, "getResponseHeaders");
18532
- Reflect.deleteProperty(Response, "setResponseHeaders");
18533
- Reflect.deleteProperty(Response, "getResponseState");
18534
- Reflect.deleteProperty(Response, "setResponseState");
18535
- mixinBody(Response, getResponseState);
18536
- Object.defineProperties(Response.prototype, {
18530
+ var { getResponseHeaders, setResponseHeaders, getResponseState, setResponseState } = Response2;
18531
+ Reflect.deleteProperty(Response2, "getResponseHeaders");
18532
+ Reflect.deleteProperty(Response2, "setResponseHeaders");
18533
+ Reflect.deleteProperty(Response2, "getResponseState");
18534
+ Reflect.deleteProperty(Response2, "setResponseState");
18535
+ mixinBody(Response2, getResponseState);
18536
+ Object.defineProperties(Response2.prototype, {
18537
18537
  type: kEnumerableProperty,
18538
18538
  url: kEnumerableProperty,
18539
18539
  status: kEnumerableProperty,
@@ -18549,7 +18549,7 @@ var require_response = __commonJS({
18549
18549
  configurable: true
18550
18550
  }
18551
18551
  });
18552
- Object.defineProperties(Response, {
18552
+ Object.defineProperties(Response2, {
18553
18553
  json: kEnumerableProperty,
18554
18554
  redirect: kEnumerableProperty,
18555
18555
  error: kEnumerableProperty
@@ -18682,9 +18682,9 @@ var require_response = __commonJS({
18682
18682
  }
18683
18683
  }
18684
18684
  function fromInnerResponse(innerResponse, guard) {
18685
- const response = new Response(kConstruct);
18685
+ const response = new Response2(kConstruct);
18686
18686
  setResponseState(response, innerResponse);
18687
- const headers = new Headers(kConstruct);
18687
+ const headers = new Headers2(kConstruct);
18688
18688
  setResponseHeaders(response, headers);
18689
18689
  setHeadersList(headers, innerResponse.headersList);
18690
18690
  setHeadersGuard(headers, guard);
@@ -18736,14 +18736,14 @@ var require_response = __commonJS({
18736
18736
  converter: webidl.converters.HeadersInit
18737
18737
  }
18738
18738
  ]);
18739
- webidl.is.Response = webidl.util.MakeTypeAssertion(Response);
18739
+ webidl.is.Response = webidl.util.MakeTypeAssertion(Response2);
18740
18740
  module2.exports = {
18741
18741
  isNetworkError,
18742
18742
  makeNetworkError,
18743
18743
  makeResponse,
18744
18744
  makeAppropriateNetworkError,
18745
18745
  filterResponse,
18746
- Response,
18746
+ Response: Response2,
18747
18747
  cloneResponse,
18748
18748
  fromInnerResponse,
18749
18749
  getResponseState
@@ -18756,7 +18756,7 @@ var require_request2 = __commonJS({
18756
18756
  "../../node_modules/.pnpm/undici@7.24.8/node_modules/undici/lib/web/fetch/request.js"(exports2, module2) {
18757
18757
  "use strict";
18758
18758
  var { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body();
18759
- var { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers();
18759
+ var { Headers: Headers2, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers();
18760
18760
  var util2 = require_util();
18761
18761
  var nodeUtil = require("node:util");
18762
18762
  var {
@@ -19025,7 +19025,7 @@ var require_request2 = __commonJS({
19025
19025
  requestFinalizer.register(ac, { signal, abort }, abort);
19026
19026
  }
19027
19027
  }
19028
- this.#headers = new Headers(kConstruct);
19028
+ this.#headers = new Headers2(kConstruct);
19029
19029
  setHeadersList(this.#headers, request2.headersList);
19030
19030
  setHeadersGuard(this.#headers, "request");
19031
19031
  if (mode === "no-cors") {
@@ -19366,7 +19366,7 @@ var require_request2 = __commonJS({
19366
19366
  setRequestState(request2, innerRequest);
19367
19367
  setRequestDispatcher(request2, dispatcher);
19368
19368
  setRequestSignal(request2, signal);
19369
- const headers = new Headers(kConstruct);
19369
+ const headers = new Headers2(kConstruct);
19370
19370
  setRequestHeaders(request2, headers);
19371
19371
  setHeadersList(headers, innerRequest.headersList);
19372
19372
  setHeadersGuard(headers, guard);
@@ -20604,7 +20604,7 @@ var require_fetch = __commonJS({
20604
20604
  const agent = fetchParams.controller.dispatcher;
20605
20605
  const path6 = url.pathname + url.search;
20606
20606
  const hasTrailingQuestionMark = url.search.length === 0 && url.href[url.href.length - url.hash.length - 1] === "?";
20607
- return new Promise((resolve12, reject) => agent.dispatch(
20607
+ return new Promise((resolve13, reject) => agent.dispatch(
20608
20608
  {
20609
20609
  path: hasTrailingQuestionMark ? `${path6}?` : path6,
20610
20610
  origin: url.origin,
@@ -20692,7 +20692,7 @@ var require_fetch = __commonJS({
20692
20692
  }
20693
20693
  }
20694
20694
  const onError = this.onError.bind(this);
20695
- resolve12({
20695
+ resolve13({
20696
20696
  status: status2,
20697
20697
  statusText,
20698
20698
  headersList,
@@ -20745,7 +20745,7 @@ var require_fetch = __commonJS({
20745
20745
  headersList.append(headerName, String(value), true);
20746
20746
  }
20747
20747
  }
20748
- resolve12({
20748
+ resolve13({
20749
20749
  status: status2,
20750
20750
  statusText: STATUS_CODES[status2],
20751
20751
  headersList,
@@ -20769,7 +20769,7 @@ var require_fetch = __commonJS({
20769
20769
  headersList.append(nameStr, value.toString("latin1"), true);
20770
20770
  }
20771
20771
  }
20772
- resolve12({
20772
+ resolve13({
20773
20773
  status: status2,
20774
20774
  statusText: STATUS_CODES[status2],
20775
20775
  headersList,
@@ -21810,8 +21810,8 @@ var require_cookies = __commonJS({
21810
21810
  var { parseSetCookie } = require_parse();
21811
21811
  var { stringify: stringify5 } = require_util4();
21812
21812
  var { webidl } = require_webidl();
21813
- var { Headers } = require_headers();
21814
- var brandChecks = webidl.brandCheckMultiple([Headers, globalThis.Headers].filter(Boolean));
21813
+ var { Headers: Headers2 } = require_headers();
21814
+ var brandChecks = webidl.brandCheckMultiple([Headers2, globalThis.Headers].filter(Boolean));
21815
21815
  function getCookies(headers) {
21816
21816
  webidl.argumentLengthCheck(arguments, 1, "getCookies");
21817
21817
  brandChecks(headers);
@@ -22552,7 +22552,7 @@ var require_connection = __commonJS({
22552
22552
  var { parseExtensions, isClosed, isClosing, isEstablished, isConnecting, validateCloseCodeAndReason } = require_util5();
22553
22553
  var { makeRequest } = require_request2();
22554
22554
  var { fetching } = require_fetch();
22555
- var { Headers, getHeadersList } = require_headers();
22555
+ var { Headers: Headers2, getHeadersList } = require_headers();
22556
22556
  var { getDecodeSplit } = require_util2();
22557
22557
  var { WebsocketFrameSend } = require_frame();
22558
22558
  var assert7 = require("node:assert");
@@ -22574,7 +22574,7 @@ var require_connection = __commonJS({
22574
22574
  useURLCredentials: true
22575
22575
  });
22576
22576
  if (options.headers) {
22577
- const headersList = getHeadersList(new Headers(options.headers));
22577
+ const headersList = getHeadersList(new Headers2(options.headers));
22578
22578
  request2.headersList = headersList;
22579
22579
  }
22580
22580
  const keyValue = crypto.randomBytes(16).toString("base64");
@@ -25782,12 +25782,12 @@ var require_isexe = __commonJS({
25782
25782
  if (typeof Promise !== "function") {
25783
25783
  throw new TypeError("callback not provided");
25784
25784
  }
25785
- return new Promise(function(resolve12, reject) {
25785
+ return new Promise(function(resolve13, reject) {
25786
25786
  isexe(path6, options || {}, function(er, is) {
25787
25787
  if (er) {
25788
25788
  reject(er);
25789
25789
  } else {
25790
- resolve12(is);
25790
+ resolve13(is);
25791
25791
  }
25792
25792
  });
25793
25793
  });
@@ -25853,27 +25853,27 @@ var require_which = __commonJS({
25853
25853
  opt = {};
25854
25854
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
25855
25855
  const found = [];
25856
- const step = (i) => new Promise((resolve12, reject) => {
25856
+ const step = (i) => new Promise((resolve13, reject) => {
25857
25857
  if (i === pathEnv.length)
25858
- return opt.all && found.length ? resolve12(found) : reject(getNotFoundError(cmd));
25858
+ return opt.all && found.length ? resolve13(found) : reject(getNotFoundError(cmd));
25859
25859
  const ppRaw = pathEnv[i];
25860
25860
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
25861
25861
  const pCmd = path6.join(pathPart, cmd);
25862
25862
  const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
25863
- resolve12(subStep(p2, i, 0));
25863
+ resolve13(subStep(p2, i, 0));
25864
25864
  });
25865
- const subStep = (p2, i, ii) => new Promise((resolve12, reject) => {
25865
+ const subStep = (p2, i, ii) => new Promise((resolve13, reject) => {
25866
25866
  if (ii === pathExt.length)
25867
- return resolve12(step(i + 1));
25867
+ return resolve13(step(i + 1));
25868
25868
  const ext = pathExt[ii];
25869
25869
  isexe(p2 + ext, { pathExt: pathExtExe }, (er, is) => {
25870
25870
  if (!er && is) {
25871
25871
  if (opt.all)
25872
25872
  found.push(p2 + ext);
25873
25873
  else
25874
- return resolve12(p2 + ext);
25874
+ return resolve13(p2 + ext);
25875
25875
  }
25876
- return resolve12(subStep(p2, i, ii + 1));
25876
+ return resolve13(subStep(p2, i, ii + 1));
25877
25877
  });
25878
25878
  });
25879
25879
  return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
@@ -29446,9 +29446,9 @@ var require_index_688c5d50 = __commonJS({
29446
29446
  }
29447
29447
  // stream.promise().then(() => done, er => emitted error)
29448
29448
  promise() {
29449
- return new Promise((resolve13, reject) => {
29449
+ return new Promise((resolve14, reject) => {
29450
29450
  this.on(DESTROYED, () => reject(new Error("stream destroyed")));
29451
- this.on("end", () => resolve13());
29451
+ this.on("end", () => resolve14());
29452
29452
  this.on("error", (er) => reject(er));
29453
29453
  });
29454
29454
  }
@@ -29460,7 +29460,7 @@ var require_index_688c5d50 = __commonJS({
29460
29460
  return Promise.resolve({ done: false, value: res });
29461
29461
  if (this[EOF$1])
29462
29462
  return Promise.resolve({ done: true });
29463
- let resolve13 = null;
29463
+ let resolve14 = null;
29464
29464
  let reject = null;
29465
29465
  const onerr = (er) => {
29466
29466
  this.removeListener("data", ondata);
@@ -29471,17 +29471,17 @@ var require_index_688c5d50 = __commonJS({
29471
29471
  this.removeListener("error", onerr);
29472
29472
  this.removeListener("end", onend);
29473
29473
  this.pause();
29474
- resolve13({ value, done: !!this[EOF$1] });
29474
+ resolve14({ value, done: !!this[EOF$1] });
29475
29475
  };
29476
29476
  const onend = () => {
29477
29477
  this.removeListener("error", onerr);
29478
29478
  this.removeListener("data", ondata);
29479
- resolve13({ done: true });
29479
+ resolve14({ done: true });
29480
29480
  };
29481
29481
  const ondestroy = () => onerr(new Error("stream destroyed"));
29482
29482
  return new Promise((res2, rej) => {
29483
29483
  reject = rej;
29484
- resolve13 = res2;
29484
+ resolve14 = res2;
29485
29485
  this.once(DESTROYED, ondestroy);
29486
29486
  this.once("error", onerr);
29487
29487
  this.once("end", onend);
@@ -31908,9 +31908,9 @@ var require_index_688c5d50 = __commonJS({
31908
31908
  const parse11 = new parse$4(opt);
31909
31909
  const readSize = opt.maxReadSize || 16 * 1024 * 1024;
31910
31910
  const file2 = opt.file;
31911
- const p2 = new Promise((resolve13, reject) => {
31911
+ const p2 = new Promise((resolve14, reject) => {
31912
31912
  parse11.on("error", reject);
31913
- parse11.on("end", resolve13);
31913
+ parse11.on("end", resolve14);
31914
31914
  fs__default["default"].stat(file2, (er, stat) => {
31915
31915
  if (er)
31916
31916
  reject(er);
@@ -32121,7 +32121,7 @@ var require_index_688c5d50 = __commonJS({
32121
32121
  };
32122
32122
  fs__default["default"].read(fd, headBuf, 0, 512, position, onread);
32123
32123
  };
32124
- const promise = new Promise((resolve13, reject) => {
32124
+ const promise = new Promise((resolve14, reject) => {
32125
32125
  p2.on("error", reject);
32126
32126
  let flag = "r+";
32127
32127
  const onopen = (er, fd) => {
@@ -32143,7 +32143,7 @@ var require_index_688c5d50 = __commonJS({
32143
32143
  });
32144
32144
  p2.pipe(stream);
32145
32145
  stream.on("error", reject);
32146
- stream.on("close", resolve13);
32146
+ stream.on("close", resolve14);
32147
32147
  addFilesAsync(p2, files);
32148
32148
  });
32149
32149
  });
@@ -32220,7 +32220,7 @@ var require_index_688c5d50 = __commonJS({
32220
32220
  };
32221
32221
  var optsArg_1 = optsArg;
32222
32222
  var platform$2 = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;
32223
- var { resolve: resolve12, parse: parse$3 } = path__default["default"];
32223
+ var { resolve: resolve13, parse: parse$3 } = path__default["default"];
32224
32224
  var pathArg = (path7) => {
32225
32225
  if (/\0/.test(path7)) {
32226
32226
  throw Object.assign(
@@ -32231,7 +32231,7 @@ var require_index_688c5d50 = __commonJS({
32231
32231
  }
32232
32232
  );
32233
32233
  }
32234
- path7 = resolve12(path7);
32234
+ path7 = resolve13(path7);
32235
32235
  if (platform$2 === "win32") {
32236
32236
  const badWinChars = /[*|"<>?:]/;
32237
32237
  const { root } = parse$3(path7);
@@ -33310,9 +33310,9 @@ var require_index_688c5d50 = __commonJS({
33310
33310
  const u2 = new unpack(opt);
33311
33311
  const readSize = opt.maxReadSize || 16 * 1024 * 1024;
33312
33312
  const file2 = opt.file;
33313
- const p2 = new Promise((resolve13, reject) => {
33313
+ const p2 = new Promise((resolve14, reject) => {
33314
33314
  u2.on("error", reject);
33315
- u2.on("close", resolve13);
33315
+ u2.on("close", resolve14);
33316
33316
  fs__default["default"].stat(file2, (er, stat) => {
33317
33317
  if (er)
33318
33318
  reject(er);
@@ -34623,9 +34623,9 @@ var require_index_688c5d50 = __commonJS({
34623
34623
  const styles5 = [];
34624
34624
  const chunks = [];
34625
34625
  let chunk = [];
34626
- temporary.replace(TEMPLATE_REGEX2, (m2, escapeCharacter, inverse, style, close, character) => {
34627
- if (escapeCharacter) {
34628
- chunk.push(unescape(escapeCharacter));
34626
+ temporary.replace(TEMPLATE_REGEX2, (m2, escapeCharacter2, inverse, style, close, character) => {
34627
+ if (escapeCharacter2) {
34628
+ chunk.push(unescape(escapeCharacter2));
34629
34629
  } else if (style) {
34630
34630
  const string = chunk.join("");
34631
34631
  chunk = [];
@@ -38627,12 +38627,12 @@ var require_index_688c5d50 = __commonJS({
38627
38627
  });
38628
38628
  function promisify7(fn) {
38629
38629
  return function(req, opts) {
38630
- return new Promise((resolve13, reject) => {
38630
+ return new Promise((resolve14, reject) => {
38631
38631
  fn.call(this, req, opts, (err, rtn) => {
38632
38632
  if (err) {
38633
38633
  reject(err);
38634
38634
  } else {
38635
- resolve13(rtn);
38635
+ resolve14(rtn);
38636
38636
  }
38637
38637
  });
38638
38638
  });
@@ -38823,7 +38823,7 @@ var require_index_688c5d50 = __commonJS({
38823
38823
  var debug_1$1 = __importDefault$2(src$1);
38824
38824
  var debug$1 = debug_1$1.default("https-proxy-agent:parse-proxy-response");
38825
38825
  function parseProxyResponse(socket) {
38826
- return new Promise((resolve13, reject) => {
38826
+ return new Promise((resolve14, reject) => {
38827
38827
  let buffersLength = 0;
38828
38828
  const buffers = [];
38829
38829
  function read() {
@@ -38863,7 +38863,7 @@ var require_index_688c5d50 = __commonJS({
38863
38863
  const firstLine = buffered.toString("ascii", 0, buffered.indexOf("\r\n"));
38864
38864
  const statusCode = +firstLine.split(" ")[1];
38865
38865
  debug$1("got proxy server response: %o", firstLine);
38866
- resolve13({
38866
+ resolve14({
38867
38867
  statusCode,
38868
38868
  buffered
38869
38869
  });
@@ -38880,11 +38880,11 @@ var require_index_688c5d50 = __commonJS({
38880
38880
  }, "__esModule", { value: true });
38881
38881
  var __awaiter2 = commonjsGlobal && commonjsGlobal.__awaiter || function(thisArg, _arguments, P2, generator) {
38882
38882
  function adopt(value) {
38883
- return value instanceof P2 ? value : new P2(function(resolve13) {
38884
- resolve13(value);
38883
+ return value instanceof P2 ? value : new P2(function(resolve14) {
38884
+ resolve14(value);
38885
38885
  });
38886
38886
  }
38887
- return new (P2 || (P2 = Promise))(function(resolve13, reject) {
38887
+ return new (P2 || (P2 = Promise))(function(resolve14, reject) {
38888
38888
  function fulfilled(value) {
38889
38889
  try {
38890
38890
  step(generator.next(value));
@@ -38900,7 +38900,7 @@ var require_index_688c5d50 = __commonJS({
38900
38900
  }
38901
38901
  }
38902
38902
  function step(result) {
38903
- result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
38903
+ result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
38904
38904
  }
38905
38905
  step((generator = generator.apply(thisArg, _arguments || [])).next());
38906
38906
  });
@@ -48151,11 +48151,11 @@ function __metadata(metadataKey, metadataValue) {
48151
48151
  }
48152
48152
  function __awaiter(thisArg, _arguments, P2, generator) {
48153
48153
  function adopt(value) {
48154
- return value instanceof P2 ? value : new P2(function(resolve12) {
48155
- resolve12(value);
48154
+ return value instanceof P2 ? value : new P2(function(resolve13) {
48155
+ resolve13(value);
48156
48156
  });
48157
48157
  }
48158
- return new (P2 || (P2 = Promise))(function(resolve12, reject) {
48158
+ return new (P2 || (P2 = Promise))(function(resolve13, reject) {
48159
48159
  function fulfilled(value) {
48160
48160
  try {
48161
48161
  step(generator.next(value));
@@ -48171,7 +48171,7 @@ function __awaiter(thisArg, _arguments, P2, generator) {
48171
48171
  }
48172
48172
  }
48173
48173
  function step(result) {
48174
- result.done ? resolve12(result.value) : adopt(result.value).then(fulfilled, rejected);
48174
+ result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
48175
48175
  }
48176
48176
  step((generator = generator.apply(thisArg, _arguments || [])).next());
48177
48177
  });
@@ -48362,14 +48362,14 @@ function __asyncValues(o) {
48362
48362
  }, i);
48363
48363
  function verb(n) {
48364
48364
  i[n] = o[n] && function(v) {
48365
- return new Promise(function(resolve12, reject) {
48366
- v = o[n](v), settle(resolve12, reject, v.done, v.value);
48365
+ return new Promise(function(resolve13, reject) {
48366
+ v = o[n](v), settle(resolve13, reject, v.done, v.value);
48367
48367
  });
48368
48368
  };
48369
48369
  }
48370
- function settle(resolve12, reject, d2, v) {
48370
+ function settle(resolve13, reject, d2, v) {
48371
48371
  Promise.resolve(v).then(function(v2) {
48372
- resolve12({ value: v2, done: d2 });
48372
+ resolve13({ value: v2, done: d2 });
48373
48373
  }, reject);
48374
48374
  }
48375
48375
  }
@@ -52043,7 +52043,7 @@ var require_tiny_invariant_cjs = __commonJS({
52043
52043
  });
52044
52044
 
52045
52045
  // ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js
52046
- var require_base64 = __commonJS({
52046
+ var require_base642 = __commonJS({
52047
52047
  "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js"(exports2) {
52048
52048
  var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
52049
52049
  exports2.encode = function(number) {
@@ -52086,7 +52086,7 @@ var require_base64 = __commonJS({
52086
52086
  // ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js
52087
52087
  var require_base64_vlq = __commonJS({
52088
52088
  "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js"(exports2) {
52089
- var base64 = require_base64();
52089
+ var base64 = require_base642();
52090
52090
  var VLQ_BASE_SHIFT = 5;
52091
52091
  var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
52092
52092
  var VLQ_BASE_MASK = VLQ_BASE - 1;
@@ -73294,12 +73294,12 @@ var require_packet = __commonJS({
73294
73294
  let chunklen = 0;
73295
73295
  let received = false;
73296
73296
  let expected = false;
73297
- return new Promise((resolve12, reject) => {
73297
+ return new Promise((resolve13, reject) => {
73298
73298
  const processMessage = () => {
73299
73299
  if (received) return;
73300
73300
  received = true;
73301
73301
  const buffer = Buffer.concat(chunks, chunklen);
73302
- resolve12(buffer.slice(2));
73302
+ resolve13(buffer.slice(2));
73303
73303
  };
73304
73304
  socket.on("end", processMessage);
73305
73305
  socket.on("error", reject);
@@ -73361,15 +73361,15 @@ var require_udp = __commonJS({
73361
73361
  if (message instanceof Packet) {
73362
73362
  message = message.toBuffer();
73363
73363
  }
73364
- return new Promise((resolve12, reject) => {
73364
+ return new Promise((resolve13, reject) => {
73365
73365
  this.send(message, rinfo.port, rinfo.address, (err) => {
73366
73366
  if (err) return reject(err);
73367
- resolve12(message);
73367
+ resolve13(message);
73368
73368
  });
73369
73369
  });
73370
73370
  }
73371
73371
  listen(port, address) {
73372
- return new Promise((resolve12) => this.bind(port, address, resolve12));
73372
+ return new Promise((resolve13) => this.bind(port, address, resolve13));
73373
73373
  }
73374
73374
  };
73375
73375
  module2.exports = Server;
@@ -73431,11 +73431,11 @@ var require_doh = __commonJS({
73431
73431
  }
73432
73432
  return queryData;
73433
73433
  };
73434
- var readStream = (stream) => new Promise((resolve12, reject) => {
73434
+ var readStream = (stream) => new Promise((resolve13, reject) => {
73435
73435
  let buffer = "";
73436
73436
  stream.on("error", reject).on("data", (chunk) => {
73437
73437
  buffer += chunk;
73438
- }).on("end", () => resolve12(buffer));
73438
+ }).on("end", () => resolve13(buffer));
73439
73439
  });
73440
73440
  var Server = class extends EventEmitter {
73441
73441
  constructor(options) {
@@ -73561,12 +73561,12 @@ var require_dns2 = __commonJS({
73561
73561
  }
73562
73562
  const servers = Object.values(this.servers);
73563
73563
  this.closed = Promise.all(
73564
- servers.map((server) => new Promise((resolve12) => server.once("close", resolve12)))
73564
+ servers.map((server) => new Promise((resolve13) => server.once("close", resolve13)))
73565
73565
  ).then(() => {
73566
73566
  this.emit("close");
73567
73567
  });
73568
73568
  this.listening = Promise.all(
73569
- servers.map((server) => new Promise((resolve12) => server.once("listening", resolve12)))
73569
+ servers.map((server) => new Promise((resolve13) => server.once("listening", resolve13)))
73570
73570
  ).then(() => {
73571
73571
  const addresses = this.addresses();
73572
73572
  this.emit("listening", addresses);
@@ -73698,18 +73698,18 @@ var require_tcp2 = __commonJS({
73698
73698
  var require_doh2 = __commonJS({
73699
73699
  "../../node_modules/.pnpm/dns2@2.1.0/node_modules/dns2/client/doh.js"(exports2, module2) {
73700
73700
  var Packet = require_packet();
73701
- var defaultGet = (url) => new Promise((resolve12, reject) => {
73701
+ var defaultGet = (url) => new Promise((resolve13, reject) => {
73702
73702
  const headers = {
73703
73703
  accept: "application/dns-message"
73704
73704
  };
73705
73705
  const base = url.startsWith("https") ? require("https") : require("http");
73706
- const req = base.get(url, { headers }, resolve12);
73706
+ const req = base.get(url, { headers }, resolve13);
73707
73707
  req.on("error", reject);
73708
73708
  });
73709
73709
  var readStream = (stream) => {
73710
73710
  const buffer = [];
73711
- return new Promise((resolve12, reject) => {
73712
- stream.on("error", reject).on("data", (chunk) => buffer.push(chunk)).on("end", () => resolve12(Buffer.concat(buffer)));
73711
+ return new Promise((resolve13, reject) => {
73712
+ stream.on("error", reject).on("data", (chunk) => buffer.push(chunk)).on("end", () => resolve13(Buffer.concat(buffer)));
73713
73713
  });
73714
73714
  };
73715
73715
  var DOHClient = ({ dns, http, get = defaultGet } = {}) => {
@@ -73762,12 +73762,12 @@ var require_udp2 = __commonJS({
73762
73762
  type: Packet.TYPE[type]
73763
73763
  });
73764
73764
  const client = new udp.Socket(socketType);
73765
- return new Promise((resolve12, reject) => {
73765
+ return new Promise((resolve13, reject) => {
73766
73766
  client.once("message", function onMessage(message) {
73767
73767
  client.close();
73768
73768
  const response = Packet.parse(message);
73769
73769
  equal(response.header.id, query.header.id);
73770
- resolve12(response);
73770
+ resolve13(response);
73771
73771
  });
73772
73772
  debug("send", dns, query.toBuffer());
73773
73773
  client.send(query.toBuffer(), port, dns, (err) => err && reject(err));
@@ -73781,13 +73781,13 @@ var require_udp2 = __commonJS({
73781
73781
  var require_google = __commonJS({
73782
73782
  "../../node_modules/.pnpm/dns2@2.1.0/node_modules/dns2/client/google.js"(exports2, module2) {
73783
73783
  var https = require("https");
73784
- var get = (url) => new Promise((resolve12) => https.get(url, resolve12));
73784
+ var get = (url) => new Promise((resolve13) => https.get(url, resolve13));
73785
73785
  var readStream = (stream) => {
73786
73786
  const buffer = [];
73787
- return new Promise((resolve12, reject) => {
73787
+ return new Promise((resolve13, reject) => {
73788
73788
  stream.on("error", reject).on("data", (chunk) => {
73789
73789
  buffer.push(chunk);
73790
- }).on("end", () => resolve12(Buffer.concat(buffer)));
73790
+ }).on("end", () => resolve13(Buffer.concat(buffer)));
73791
73791
  });
73792
73792
  };
73793
73793
  var GoogleClient = () => (name3, type = "ANY") => {
@@ -73848,8 +73848,8 @@ var require_dns22 = __commonJS({
73848
73848
  const { port, nameServers, recursive, resolverProtocol = "UDP" } = this;
73849
73849
  const createResolver = _DNS[resolverProtocol + "Client"];
73850
73850
  return Promise.race(nameServers.map((address) => {
73851
- const resolve12 = createResolver({ dns: address, port, recursive });
73852
- return resolve12(name3, type, cls, clientIp);
73851
+ const resolve13 = createResolver({ dns: address, port, recursive });
73852
+ return resolve13(name3, type, cls, clientIp);
73853
73853
  }));
73854
73854
  }
73855
73855
  /**
@@ -73903,7 +73903,7 @@ __export(cli_exports, {
73903
73903
  });
73904
73904
  module.exports = __toCommonJS(cli_exports);
73905
73905
  var import_node_fs21 = require("node:fs");
73906
- var import_node_path23 = require("node:path");
73906
+ var import_node_path24 = require("node:path");
73907
73907
  var import_node_process14 = require("node:process");
73908
73908
 
73909
73909
  // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
@@ -74459,7 +74459,7 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__
74459
74459
  mod
74460
74460
  ));
74461
74461
 
74462
- // ../workers-utils/dist/chunk-BLWXWFJK.mjs
74462
+ // ../workers-utils/dist/chunk-UFU4JGIG.mjs
74463
74463
  var import_node_assert = __toESM(require("node:assert"), 1);
74464
74464
  function isCompatDate(str) {
74465
74465
  return /^\d{4}-\d{2}-\d{2}$/.test(str);
@@ -74493,8 +74493,7 @@ function mapWorkerMetadataBindings(bindings) {
74493
74493
  {
74494
74494
  configObj.vars = {
74495
74495
  ...configObj.vars ?? {},
74496
- name: binding.name,
74497
- json: binding.json
74496
+ [binding.name]: binding.json
74498
74497
  };
74499
74498
  }
74500
74499
  break;
@@ -74755,6 +74754,23 @@ function mapWorkerMetadataBindings(bindings) {
74755
74754
  }
74756
74755
  ];
74757
74756
  break;
74757
+ case "web_search":
74758
+ {
74759
+ configObj.web_search = {
74760
+ binding: binding.name
74761
+ };
74762
+ }
74763
+ break;
74764
+ case "agent_memory": {
74765
+ configObj.agent_memory = [
74766
+ ...configObj.agent_memory ?? [],
74767
+ {
74768
+ binding: binding.name,
74769
+ namespace: binding.namespace
74770
+ }
74771
+ ];
74772
+ break;
74773
+ }
74758
74774
  case "hyperdrive":
74759
74775
  configObj.hyperdrive = [
74760
74776
  ...configObj.hyperdrive ?? [],
@@ -74778,7 +74794,9 @@ function mapWorkerMetadataBindings(bindings) {
74778
74794
  ...configObj.pipelines ?? [],
74779
74795
  {
74780
74796
  binding: binding.name,
74781
- pipeline: binding.pipeline
74797
+ // NOTE: stream is the primary field, but we also support pipeline for backward compatibility
74798
+ ...binding.stream && { stream: binding.stream },
74799
+ ...binding.pipeline && { pipeline: binding.pipeline }
74782
74800
  }
74783
74801
  ];
74784
74802
  break;
@@ -77820,6 +77838,8 @@ var import_node_os2 = __toESM(require("node:os"), 1);
77820
77838
  var import_node_child_process = require("node:child_process");
77821
77839
  var import_node_crypto = require("node:crypto");
77822
77840
  var import_undici = __toESM(require_undici(), 1);
77841
+ var import_node_url = require("node:url");
77842
+ var timersPromises = __toESM(require("node:timers/promises"), 1);
77823
77843
  var require_XDGAppPaths = __commonJS2({
77824
77844
  "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js"(exports2) {
77825
77845
  exports2.__esModule = true;
@@ -78355,7 +78375,7 @@ var require_signal_exit = __commonJS2({
78355
78375
  };
78356
78376
  };
78357
78377
  } else {
78358
- assert22 = __require("assert");
78378
+ assert32 = __require("assert");
78359
78379
  signals = require_signals();
78360
78380
  isWin = /^win/i.test(process22.platform);
78361
78381
  EE = __require("events");
@@ -78378,7 +78398,7 @@ var require_signal_exit = __commonJS2({
78378
78398
  return function() {
78379
78399
  };
78380
78400
  }
78381
- assert22.equal(typeof cb, "function", "a callback must be provided for exit handler");
78401
+ assert32.equal(typeof cb, "function", "a callback must be provided for exit handler");
78382
78402
  if (loaded === false) {
78383
78403
  load();
78384
78404
  }
@@ -78484,7 +78504,7 @@ var require_signal_exit = __commonJS2({
78484
78504
  }
78485
78505
  }, "processEmit");
78486
78506
  }
78487
- var assert22;
78507
+ var assert32;
78488
78508
  var signals;
78489
78509
  var isWin;
78490
78510
  var EE;
@@ -78619,10 +78639,10 @@ var require_command_exists = __commonJS2({
78619
78639
  module2.exports = /* @__PURE__ */ __name(function commandExists(commandName, callback) {
78620
78640
  var cleanedCommandName = cleanInput(commandName);
78621
78641
  if (!callback && typeof Promise !== "undefined") {
78622
- return new Promise(function(resolve12, reject) {
78642
+ return new Promise(function(resolve13, reject) {
78623
78643
  commandExists(commandName, function(error2, output) {
78624
78644
  if (output) {
78625
- resolve12(commandName);
78645
+ resolve13(commandName);
78626
78646
  } else {
78627
78647
  reject(error2);
78628
78648
  }
@@ -78650,6 +78670,975 @@ var require_command_exists2 = __commonJS2({
78650
78670
  module2.exports = require_command_exists();
78651
78671
  }
78652
78672
  });
78673
+ var require_ini = __commonJS2({
78674
+ "../../node_modules/.pnpm/ini@1.3.8/node_modules/ini/ini.js"(exports2) {
78675
+ exports2.parse = exports2.decode = decode;
78676
+ exports2.stringify = exports2.encode = encode;
78677
+ exports2.safe = safe;
78678
+ exports2.unsafe = unsafe;
78679
+ var eol = typeof process !== "undefined" && process.platform === "win32" ? "\r\n" : "\n";
78680
+ function encode(obj, opt) {
78681
+ var children = [];
78682
+ var out = "";
78683
+ if (typeof opt === "string") {
78684
+ opt = {
78685
+ section: opt,
78686
+ whitespace: false
78687
+ };
78688
+ } else {
78689
+ opt = opt || {};
78690
+ opt.whitespace = opt.whitespace === true;
78691
+ }
78692
+ var separator = opt.whitespace ? " = " : "=";
78693
+ Object.keys(obj).forEach(function(k, _2, __) {
78694
+ var val = obj[k];
78695
+ if (val && Array.isArray(val)) {
78696
+ val.forEach(function(item) {
78697
+ out += safe(k + "[]") + separator + safe(item) + "\n";
78698
+ });
78699
+ } else if (val && typeof val === "object")
78700
+ children.push(k);
78701
+ else
78702
+ out += safe(k) + separator + safe(val) + eol;
78703
+ });
78704
+ if (opt.section && out.length)
78705
+ out = "[" + safe(opt.section) + "]" + eol + out;
78706
+ children.forEach(function(k, _2, __) {
78707
+ var nk = dotSplit(k).join("\\.");
78708
+ var section = (opt.section ? opt.section + "." : "") + nk;
78709
+ var child = encode(obj[k], {
78710
+ section,
78711
+ whitespace: opt.whitespace
78712
+ });
78713
+ if (out.length && child.length)
78714
+ out += eol;
78715
+ out += child;
78716
+ });
78717
+ return out;
78718
+ }
78719
+ __name(encode, "encode");
78720
+ function dotSplit(str) {
78721
+ return str.replace(/\1/g, "LITERAL\\1LITERAL").replace(/\\\./g, "").split(/\./).map(function(part) {
78722
+ return part.replace(/\1/g, "\\.").replace(/\2LITERAL\\1LITERAL\2/g, "");
78723
+ });
78724
+ }
78725
+ __name(dotSplit, "dotSplit");
78726
+ function decode(str) {
78727
+ var out = {};
78728
+ var p2 = out;
78729
+ var section = null;
78730
+ var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;
78731
+ var lines = str.split(/[\r\n]+/g);
78732
+ lines.forEach(function(line, _2, __) {
78733
+ if (!line || line.match(/^\s*[;#]/))
78734
+ return;
78735
+ var match = line.match(re);
78736
+ if (!match)
78737
+ return;
78738
+ if (match[1] !== void 0) {
78739
+ section = unsafe(match[1]);
78740
+ if (section === "__proto__") {
78741
+ p2 = {};
78742
+ return;
78743
+ }
78744
+ p2 = out[section] = out[section] || {};
78745
+ return;
78746
+ }
78747
+ var key = unsafe(match[2]);
78748
+ if (key === "__proto__")
78749
+ return;
78750
+ var value = match[3] ? unsafe(match[4]) : true;
78751
+ switch (value) {
78752
+ case "true":
78753
+ case "false":
78754
+ case "null":
78755
+ value = JSON.parse(value);
78756
+ }
78757
+ if (key.length > 2 && key.slice(-2) === "[]") {
78758
+ key = key.substring(0, key.length - 2);
78759
+ if (key === "__proto__")
78760
+ return;
78761
+ if (!p2[key])
78762
+ p2[key] = [];
78763
+ else if (!Array.isArray(p2[key]))
78764
+ p2[key] = [p2[key]];
78765
+ }
78766
+ if (Array.isArray(p2[key]))
78767
+ p2[key].push(value);
78768
+ else
78769
+ p2[key] = value;
78770
+ });
78771
+ Object.keys(out).filter(function(k, _2, __) {
78772
+ if (!out[k] || typeof out[k] !== "object" || Array.isArray(out[k]))
78773
+ return false;
78774
+ var parts = dotSplit(k);
78775
+ var p22 = out;
78776
+ var l = parts.pop();
78777
+ var nl = l.replace(/\\\./g, ".");
78778
+ parts.forEach(function(part, _3, __2) {
78779
+ if (part === "__proto__")
78780
+ return;
78781
+ if (!p22[part] || typeof p22[part] !== "object")
78782
+ p22[part] = {};
78783
+ p22 = p22[part];
78784
+ });
78785
+ if (p22 === out && nl === l)
78786
+ return false;
78787
+ p22[nl] = out[k];
78788
+ return true;
78789
+ }).forEach(function(del, _2, __) {
78790
+ delete out[del];
78791
+ });
78792
+ return out;
78793
+ }
78794
+ __name(decode, "decode");
78795
+ function isQuoted(val) {
78796
+ return val.charAt(0) === '"' && val.slice(-1) === '"' || val.charAt(0) === "'" && val.slice(-1) === "'";
78797
+ }
78798
+ __name(isQuoted, "isQuoted");
78799
+ function safe(val) {
78800
+ return typeof val !== "string" || val.match(/[=\r\n]/) || val.match(/^\[/) || val.length > 1 && isQuoted(val) || val !== val.trim() ? JSON.stringify(val) : val.replace(/;/g, "\\;").replace(/#/g, "\\#");
78801
+ }
78802
+ __name(safe, "safe");
78803
+ function unsafe(val, doUnesc) {
78804
+ val = (val || "").trim();
78805
+ if (isQuoted(val)) {
78806
+ if (val.charAt(0) === "'")
78807
+ val = val.substr(1, val.length - 2);
78808
+ try {
78809
+ val = JSON.parse(val);
78810
+ } catch (_2) {
78811
+ }
78812
+ } else {
78813
+ var esc = false;
78814
+ var unesc = "";
78815
+ for (var i = 0, l = val.length; i < l; i++) {
78816
+ var c2 = val.charAt(i);
78817
+ if (esc) {
78818
+ if ("\\;#".indexOf(c2) !== -1)
78819
+ unesc += c2;
78820
+ else
78821
+ unesc += "\\" + c2;
78822
+ esc = false;
78823
+ } else if (";#".indexOf(c2) !== -1)
78824
+ break;
78825
+ else if (c2 === "\\")
78826
+ esc = true;
78827
+ else
78828
+ unesc += c2;
78829
+ }
78830
+ if (esc)
78831
+ unesc += "\\";
78832
+ return unesc.trim();
78833
+ }
78834
+ return val;
78835
+ }
78836
+ __name(unsafe, "unsafe");
78837
+ }
78838
+ });
78839
+ var require_strip_json_comments = __commonJS2({
78840
+ "../../node_modules/.pnpm/strip-json-comments@2.0.1/node_modules/strip-json-comments/index.js"(exports2, module2) {
78841
+ var singleComment = 1;
78842
+ var multiComment = 2;
78843
+ function stripWithoutWhitespace() {
78844
+ return "";
78845
+ }
78846
+ __name(stripWithoutWhitespace, "stripWithoutWhitespace");
78847
+ function stripWithWhitespace(str, start, end) {
78848
+ return str.slice(start, end).replace(/\S/g, " ");
78849
+ }
78850
+ __name(stripWithWhitespace, "stripWithWhitespace");
78851
+ module2.exports = function(str, opts) {
78852
+ opts = opts || {};
78853
+ var currentChar;
78854
+ var nextChar;
78855
+ var insideString = false;
78856
+ var insideComment = false;
78857
+ var offset = 0;
78858
+ var ret = "";
78859
+ var strip = opts.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace;
78860
+ for (var i = 0; i < str.length; i++) {
78861
+ currentChar = str[i];
78862
+ nextChar = str[i + 1];
78863
+ if (!insideComment && currentChar === '"') {
78864
+ var escaped = str[i - 1] === "\\" && str[i - 2] !== "\\";
78865
+ if (!escaped) {
78866
+ insideString = !insideString;
78867
+ }
78868
+ }
78869
+ if (insideString) {
78870
+ continue;
78871
+ }
78872
+ if (!insideComment && currentChar + nextChar === "//") {
78873
+ ret += str.slice(offset, i);
78874
+ offset = i;
78875
+ insideComment = singleComment;
78876
+ i++;
78877
+ } else if (insideComment === singleComment && currentChar + nextChar === "\r\n") {
78878
+ i++;
78879
+ insideComment = false;
78880
+ ret += strip(str, offset, i);
78881
+ offset = i;
78882
+ continue;
78883
+ } else if (insideComment === singleComment && currentChar === "\n") {
78884
+ insideComment = false;
78885
+ ret += strip(str, offset, i);
78886
+ offset = i;
78887
+ } else if (!insideComment && currentChar + nextChar === "/*") {
78888
+ ret += str.slice(offset, i);
78889
+ offset = i;
78890
+ insideComment = multiComment;
78891
+ i++;
78892
+ continue;
78893
+ } else if (insideComment === multiComment && currentChar + nextChar === "*/") {
78894
+ i++;
78895
+ insideComment = false;
78896
+ ret += strip(str, offset, i + 1);
78897
+ offset = i + 1;
78898
+ continue;
78899
+ }
78900
+ }
78901
+ return ret + (insideComment ? strip(str.substr(offset)) : str.substr(offset));
78902
+ };
78903
+ }
78904
+ });
78905
+ var require_utils2 = __commonJS2({
78906
+ "../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/lib/utils.js"(exports2) {
78907
+ var fs32 = __require("fs");
78908
+ var ini = require_ini();
78909
+ var path52 = __require("path");
78910
+ var stripJsonComments = require_strip_json_comments();
78911
+ var parse10 = exports2.parse = function(content) {
78912
+ if (/^\s*{/.test(content))
78913
+ return JSON.parse(stripJsonComments(content));
78914
+ return ini.parse(content);
78915
+ };
78916
+ var file2 = exports2.file = function() {
78917
+ var args = [].slice.call(arguments).filter(function(arg) {
78918
+ return arg != null;
78919
+ });
78920
+ for (var i in args)
78921
+ if ("string" !== typeof args[i])
78922
+ return;
78923
+ var file22 = path52.join.apply(null, args);
78924
+ try {
78925
+ return fs32.readFileSync(file22, "utf-8");
78926
+ } catch (err) {
78927
+ return;
78928
+ }
78929
+ };
78930
+ exports2.json = function() {
78931
+ var content = file2.apply(null, arguments);
78932
+ return content ? parse10(content) : null;
78933
+ };
78934
+ exports2.env = function(prefix, env22) {
78935
+ env22 = env22 || process.env;
78936
+ var obj = {};
78937
+ var l = prefix.length;
78938
+ for (var k in env22) {
78939
+ if (k.toLowerCase().indexOf(prefix.toLowerCase()) === 0) {
78940
+ var keypath = k.substring(l).split("__");
78941
+ var _emptyStringIndex;
78942
+ while ((_emptyStringIndex = keypath.indexOf("")) > -1) {
78943
+ keypath.splice(_emptyStringIndex, 1);
78944
+ }
78945
+ var cursor = obj;
78946
+ keypath.forEach(/* @__PURE__ */ __name(function _buildSubObj(_subkey, i) {
78947
+ if (!_subkey || typeof cursor !== "object")
78948
+ return;
78949
+ if (i === keypath.length - 1)
78950
+ cursor[_subkey] = env22[k];
78951
+ if (cursor[_subkey] === void 0)
78952
+ cursor[_subkey] = {};
78953
+ cursor = cursor[_subkey];
78954
+ }, "_buildSubObj"));
78955
+ }
78956
+ }
78957
+ return obj;
78958
+ };
78959
+ exports2.find = function() {
78960
+ var rel = path52.join.apply(null, [].slice.call(arguments));
78961
+ function find2(start, rel2) {
78962
+ var file22 = path52.join(start, rel2);
78963
+ try {
78964
+ fs32.statSync(file22);
78965
+ return file22;
78966
+ } catch (err) {
78967
+ if (path52.dirname(start) !== start)
78968
+ return find2(path52.dirname(start), rel2);
78969
+ }
78970
+ }
78971
+ __name(find2, "find");
78972
+ return find2(process.cwd(), rel);
78973
+ };
78974
+ }
78975
+ });
78976
+ var require_deep_extend = __commonJS2({
78977
+ "../../node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/lib/deep-extend.js"(exports2, module2) {
78978
+ function isSpecificValue(val) {
78979
+ return val instanceof Buffer || val instanceof Date || val instanceof RegExp ? true : false;
78980
+ }
78981
+ __name(isSpecificValue, "isSpecificValue");
78982
+ function cloneSpecificValue(val) {
78983
+ if (val instanceof Buffer) {
78984
+ var x = Buffer.alloc ? Buffer.alloc(val.length) : new Buffer(val.length);
78985
+ val.copy(x);
78986
+ return x;
78987
+ } else if (val instanceof Date) {
78988
+ return new Date(val.getTime());
78989
+ } else if (val instanceof RegExp) {
78990
+ return new RegExp(val);
78991
+ } else {
78992
+ throw new Error("Unexpected situation");
78993
+ }
78994
+ }
78995
+ __name(cloneSpecificValue, "cloneSpecificValue");
78996
+ function deepCloneArray(arr) {
78997
+ var clone = [];
78998
+ arr.forEach(function(item, index) {
78999
+ if (typeof item === "object" && item !== null) {
79000
+ if (Array.isArray(item)) {
79001
+ clone[index] = deepCloneArray(item);
79002
+ } else if (isSpecificValue(item)) {
79003
+ clone[index] = cloneSpecificValue(item);
79004
+ } else {
79005
+ clone[index] = deepExtend({}, item);
79006
+ }
79007
+ } else {
79008
+ clone[index] = item;
79009
+ }
79010
+ });
79011
+ return clone;
79012
+ }
79013
+ __name(deepCloneArray, "deepCloneArray");
79014
+ function safeGetProperty(object, property) {
79015
+ return property === "__proto__" ? void 0 : object[property];
79016
+ }
79017
+ __name(safeGetProperty, "safeGetProperty");
79018
+ var deepExtend = module2.exports = function() {
79019
+ if (arguments.length < 1 || typeof arguments[0] !== "object") {
79020
+ return false;
79021
+ }
79022
+ if (arguments.length < 2) {
79023
+ return arguments[0];
79024
+ }
79025
+ var target = arguments[0];
79026
+ var args = Array.prototype.slice.call(arguments, 1);
79027
+ var val, src;
79028
+ args.forEach(function(obj) {
79029
+ if (typeof obj !== "object" || obj === null || Array.isArray(obj)) {
79030
+ return;
79031
+ }
79032
+ Object.keys(obj).forEach(function(key) {
79033
+ src = safeGetProperty(target, key);
79034
+ val = safeGetProperty(obj, key);
79035
+ if (val === target) {
79036
+ return;
79037
+ } else if (typeof val !== "object" || val === null) {
79038
+ target[key] = val;
79039
+ return;
79040
+ } else if (Array.isArray(val)) {
79041
+ target[key] = deepCloneArray(val);
79042
+ return;
79043
+ } else if (isSpecificValue(val)) {
79044
+ target[key] = cloneSpecificValue(val);
79045
+ return;
79046
+ } else if (typeof src !== "object" || src === null || Array.isArray(src)) {
79047
+ target[key] = deepExtend({}, val);
79048
+ return;
79049
+ } else {
79050
+ target[key] = deepExtend(src, val);
79051
+ return;
79052
+ }
79053
+ });
79054
+ });
79055
+ return target;
79056
+ };
79057
+ }
79058
+ });
79059
+ var require_minimist = __commonJS2({
79060
+ "../../node_modules/.pnpm/minimist@1.2.6/node_modules/minimist/index.js"(exports2, module2) {
79061
+ module2.exports = function(args, opts) {
79062
+ if (!opts) opts = {};
79063
+ var flags = { bools: {}, strings: {}, unknownFn: null };
79064
+ if (typeof opts["unknown"] === "function") {
79065
+ flags.unknownFn = opts["unknown"];
79066
+ }
79067
+ if (typeof opts["boolean"] === "boolean" && opts["boolean"]) {
79068
+ flags.allBools = true;
79069
+ } else {
79070
+ [].concat(opts["boolean"]).filter(Boolean).forEach(function(key2) {
79071
+ flags.bools[key2] = true;
79072
+ });
79073
+ }
79074
+ var aliases = {};
79075
+ Object.keys(opts.alias || {}).forEach(function(key2) {
79076
+ aliases[key2] = [].concat(opts.alias[key2]);
79077
+ aliases[key2].forEach(function(x) {
79078
+ aliases[x] = [key2].concat(aliases[key2].filter(function(y2) {
79079
+ return x !== y2;
79080
+ }));
79081
+ });
79082
+ });
79083
+ [].concat(opts.string).filter(Boolean).forEach(function(key2) {
79084
+ flags.strings[key2] = true;
79085
+ if (aliases[key2]) {
79086
+ flags.strings[aliases[key2]] = true;
79087
+ }
79088
+ });
79089
+ var defaults = opts["default"] || {};
79090
+ var argv = { _: [] };
79091
+ Object.keys(flags.bools).forEach(function(key2) {
79092
+ setArg(key2, defaults[key2] === void 0 ? false : defaults[key2]);
79093
+ });
79094
+ var notFlags = [];
79095
+ if (args.indexOf("--") !== -1) {
79096
+ notFlags = args.slice(args.indexOf("--") + 1);
79097
+ args = args.slice(0, args.indexOf("--"));
79098
+ }
79099
+ function argDefined(key2, arg2) {
79100
+ return flags.allBools && /^--[^=]+$/.test(arg2) || flags.strings[key2] || flags.bools[key2] || aliases[key2];
79101
+ }
79102
+ __name(argDefined, "argDefined");
79103
+ function setArg(key2, val, arg2) {
79104
+ if (arg2 && flags.unknownFn && !argDefined(key2, arg2)) {
79105
+ if (flags.unknownFn(arg2) === false) return;
79106
+ }
79107
+ var value2 = !flags.strings[key2] && isNumber(val) ? Number(val) : val;
79108
+ setKey(argv, key2.split("."), value2);
79109
+ (aliases[key2] || []).forEach(function(x) {
79110
+ setKey(argv, x.split("."), value2);
79111
+ });
79112
+ }
79113
+ __name(setArg, "setArg");
79114
+ function setKey(obj, keys, value2) {
79115
+ var o = obj;
79116
+ for (var i2 = 0; i2 < keys.length - 1; i2++) {
79117
+ var key2 = keys[i2];
79118
+ if (isConstructorOrProto(o, key2)) return;
79119
+ if (o[key2] === void 0) o[key2] = {};
79120
+ if (o[key2] === Object.prototype || o[key2] === Number.prototype || o[key2] === String.prototype) o[key2] = {};
79121
+ if (o[key2] === Array.prototype) o[key2] = [];
79122
+ o = o[key2];
79123
+ }
79124
+ var key2 = keys[keys.length - 1];
79125
+ if (isConstructorOrProto(o, key2)) return;
79126
+ if (o === Object.prototype || o === Number.prototype || o === String.prototype) o = {};
79127
+ if (o === Array.prototype) o = [];
79128
+ if (o[key2] === void 0 || flags.bools[key2] || typeof o[key2] === "boolean") {
79129
+ o[key2] = value2;
79130
+ } else if (Array.isArray(o[key2])) {
79131
+ o[key2].push(value2);
79132
+ } else {
79133
+ o[key2] = [o[key2], value2];
79134
+ }
79135
+ }
79136
+ __name(setKey, "setKey");
79137
+ function aliasIsBoolean(key2) {
79138
+ return aliases[key2].some(function(x) {
79139
+ return flags.bools[x];
79140
+ });
79141
+ }
79142
+ __name(aliasIsBoolean, "aliasIsBoolean");
79143
+ for (var i = 0; i < args.length; i++) {
79144
+ var arg = args[i];
79145
+ if (/^--.+=/.test(arg)) {
79146
+ var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
79147
+ var key = m[1];
79148
+ var value = m[2];
79149
+ if (flags.bools[key]) {
79150
+ value = value !== "false";
79151
+ }
79152
+ setArg(key, value, arg);
79153
+ } else if (/^--no-.+/.test(arg)) {
79154
+ var key = arg.match(/^--no-(.+)/)[1];
79155
+ setArg(key, false, arg);
79156
+ } else if (/^--.+/.test(arg)) {
79157
+ var key = arg.match(/^--(.+)/)[1];
79158
+ var next = args[i + 1];
79159
+ if (next !== void 0 && !/^-/.test(next) && !flags.bools[key] && !flags.allBools && (aliases[key] ? !aliasIsBoolean(key) : true)) {
79160
+ setArg(key, next, arg);
79161
+ i++;
79162
+ } else if (/^(true|false)$/.test(next)) {
79163
+ setArg(key, next === "true", arg);
79164
+ i++;
79165
+ } else {
79166
+ setArg(key, flags.strings[key] ? "" : true, arg);
79167
+ }
79168
+ } else if (/^-[^-]+/.test(arg)) {
79169
+ var letters = arg.slice(1, -1).split("");
79170
+ var broken = false;
79171
+ for (var j2 = 0; j2 < letters.length; j2++) {
79172
+ var next = arg.slice(j2 + 2);
79173
+ if (next === "-") {
79174
+ setArg(letters[j2], next, arg);
79175
+ continue;
79176
+ }
79177
+ if (/[A-Za-z]/.test(letters[j2]) && /=/.test(next)) {
79178
+ setArg(letters[j2], next.split("=")[1], arg);
79179
+ broken = true;
79180
+ break;
79181
+ }
79182
+ if (/[A-Za-z]/.test(letters[j2]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
79183
+ setArg(letters[j2], next, arg);
79184
+ broken = true;
79185
+ break;
79186
+ }
79187
+ if (letters[j2 + 1] && letters[j2 + 1].match(/\W/)) {
79188
+ setArg(letters[j2], arg.slice(j2 + 2), arg);
79189
+ broken = true;
79190
+ break;
79191
+ } else {
79192
+ setArg(letters[j2], flags.strings[letters[j2]] ? "" : true, arg);
79193
+ }
79194
+ }
79195
+ var key = arg.slice(-1)[0];
79196
+ if (!broken && key !== "-") {
79197
+ if (args[i + 1] && !/^(-|--)[^-]/.test(args[i + 1]) && !flags.bools[key] && (aliases[key] ? !aliasIsBoolean(key) : true)) {
79198
+ setArg(key, args[i + 1], arg);
79199
+ i++;
79200
+ } else if (args[i + 1] && /^(true|false)$/.test(args[i + 1])) {
79201
+ setArg(key, args[i + 1] === "true", arg);
79202
+ i++;
79203
+ } else {
79204
+ setArg(key, flags.strings[key] ? "" : true, arg);
79205
+ }
79206
+ }
79207
+ } else {
79208
+ if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
79209
+ argv._.push(
79210
+ flags.strings["_"] || !isNumber(arg) ? arg : Number(arg)
79211
+ );
79212
+ }
79213
+ if (opts.stopEarly) {
79214
+ argv._.push.apply(argv._, args.slice(i + 1));
79215
+ break;
79216
+ }
79217
+ }
79218
+ }
79219
+ Object.keys(defaults).forEach(function(key2) {
79220
+ if (!hasKey(argv, key2.split("."))) {
79221
+ setKey(argv, key2.split("."), defaults[key2]);
79222
+ (aliases[key2] || []).forEach(function(x) {
79223
+ setKey(argv, x.split("."), defaults[key2]);
79224
+ });
79225
+ }
79226
+ });
79227
+ if (opts["--"]) {
79228
+ argv["--"] = new Array();
79229
+ notFlags.forEach(function(key2) {
79230
+ argv["--"].push(key2);
79231
+ });
79232
+ } else {
79233
+ notFlags.forEach(function(key2) {
79234
+ argv._.push(key2);
79235
+ });
79236
+ }
79237
+ return argv;
79238
+ };
79239
+ function hasKey(obj, keys) {
79240
+ var o = obj;
79241
+ keys.slice(0, -1).forEach(function(key2) {
79242
+ o = o[key2] || {};
79243
+ });
79244
+ var key = keys[keys.length - 1];
79245
+ return key in o;
79246
+ }
79247
+ __name(hasKey, "hasKey");
79248
+ function isNumber(x) {
79249
+ if (typeof x === "number") return true;
79250
+ if (/^0x[0-9a-f]+$/i.test(x)) return true;
79251
+ return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
79252
+ }
79253
+ __name(isNumber, "isNumber");
79254
+ function isConstructorOrProto(obj, key) {
79255
+ return key === "constructor" && typeof obj[key] === "function" || key === "__proto__";
79256
+ }
79257
+ __name(isConstructorOrProto, "isConstructorOrProto");
79258
+ }
79259
+ });
79260
+ var require_rc = __commonJS2({
79261
+ "../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/index.js"(exports2, module2) {
79262
+ var cc = require_utils2();
79263
+ var join22 = __require("path").join;
79264
+ var deepExtend = require_deep_extend();
79265
+ var etc = "/etc";
79266
+ var win = process.platform === "win32";
79267
+ var home = win ? process.env.USERPROFILE : process.env.HOME;
79268
+ module2.exports = function(name3, defaults, argv, parse10) {
79269
+ if ("string" !== typeof name3)
79270
+ throw new Error("rc(name): name *must* be string");
79271
+ if (!argv)
79272
+ argv = require_minimist()(process.argv.slice(2));
79273
+ defaults = ("string" === typeof defaults ? cc.json(defaults) : defaults) || {};
79274
+ parse10 = parse10 || cc.parse;
79275
+ var env3 = cc.env(name3 + "_");
79276
+ var configs = [defaults];
79277
+ var configFiles = [];
79278
+ function addConfigFile(file2) {
79279
+ if (configFiles.indexOf(file2) >= 0) return;
79280
+ var fileConfig = cc.file(file2);
79281
+ if (fileConfig) {
79282
+ configs.push(parse10(fileConfig));
79283
+ configFiles.push(file2);
79284
+ }
79285
+ }
79286
+ __name(addConfigFile, "addConfigFile");
79287
+ if (!win)
79288
+ [
79289
+ join22(etc, name3, "config"),
79290
+ join22(etc, name3 + "rc")
79291
+ ].forEach(addConfigFile);
79292
+ if (home)
79293
+ [
79294
+ join22(home, ".config", name3, "config"),
79295
+ join22(home, ".config", name3),
79296
+ join22(home, "." + name3, "config"),
79297
+ join22(home, "." + name3 + "rc")
79298
+ ].forEach(addConfigFile);
79299
+ addConfigFile(cc.find("." + name3 + "rc"));
79300
+ if (env3.config) addConfigFile(env3.config);
79301
+ if (argv.config) addConfigFile(argv.config);
79302
+ return deepExtend.apply(null, configs.concat([
79303
+ env3,
79304
+ argv,
79305
+ configFiles.length ? { configs: configFiles, config: configFiles[configFiles.length - 1] } : void 0
79306
+ ]));
79307
+ };
79308
+ }
79309
+ });
79310
+ var require_registry_url = __commonJS2({
79311
+ "../../node_modules/.pnpm/registry-url@3.1.0/node_modules/registry-url/index.js"(exports2, module2) {
79312
+ module2.exports = function(scope) {
79313
+ var rc = require_rc()("npm", { registry: "https://registry.npmjs.org/" });
79314
+ var url = rc[scope + ":registry"] || rc.registry;
79315
+ return url.slice(-1) === "/" ? url : url + "/";
79316
+ };
79317
+ }
79318
+ });
79319
+ var require_safe_buffer = __commonJS2({
79320
+ "../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js"(exports2, module2) {
79321
+ var buffer = __require("buffer");
79322
+ var Buffer22 = buffer.Buffer;
79323
+ function copyProps(src, dst) {
79324
+ for (var key in src) {
79325
+ dst[key] = src[key];
79326
+ }
79327
+ }
79328
+ __name(copyProps, "copyProps");
79329
+ if (Buffer22.from && Buffer22.alloc && Buffer22.allocUnsafe && Buffer22.allocUnsafeSlow) {
79330
+ module2.exports = buffer;
79331
+ } else {
79332
+ copyProps(buffer, exports2);
79333
+ exports2.Buffer = SafeBuffer;
79334
+ }
79335
+ function SafeBuffer(arg, encodingOrOffset, length) {
79336
+ return Buffer22(arg, encodingOrOffset, length);
79337
+ }
79338
+ __name(SafeBuffer, "SafeBuffer");
79339
+ SafeBuffer.prototype = Object.create(Buffer22.prototype);
79340
+ copyProps(Buffer22, SafeBuffer);
79341
+ SafeBuffer.from = function(arg, encodingOrOffset, length) {
79342
+ if (typeof arg === "number") {
79343
+ throw new TypeError("Argument must not be a number");
79344
+ }
79345
+ return Buffer22(arg, encodingOrOffset, length);
79346
+ };
79347
+ SafeBuffer.alloc = function(size, fill, encoding) {
79348
+ if (typeof size !== "number") {
79349
+ throw new TypeError("Argument must be a number");
79350
+ }
79351
+ var buf = Buffer22(size);
79352
+ if (fill !== void 0) {
79353
+ if (typeof encoding === "string") {
79354
+ buf.fill(fill, encoding);
79355
+ } else {
79356
+ buf.fill(fill);
79357
+ }
79358
+ } else {
79359
+ buf.fill(0);
79360
+ }
79361
+ return buf;
79362
+ };
79363
+ SafeBuffer.allocUnsafe = function(size) {
79364
+ if (typeof size !== "number") {
79365
+ throw new TypeError("Argument must be a number");
79366
+ }
79367
+ return Buffer22(size);
79368
+ };
79369
+ SafeBuffer.allocUnsafeSlow = function(size) {
79370
+ if (typeof size !== "number") {
79371
+ throw new TypeError("Argument must be a number");
79372
+ }
79373
+ return buffer.SlowBuffer(size);
79374
+ };
79375
+ }
79376
+ });
79377
+ var require_base64 = __commonJS2({
79378
+ "../../node_modules/.pnpm/registry-auth-token@3.3.2/node_modules/registry-auth-token/base64.js"(exports2, module2) {
79379
+ var safeBuffer = require_safe_buffer().Buffer;
79380
+ function decodeBase64(base64) {
79381
+ return safeBuffer.from(base64, "base64").toString("utf8");
79382
+ }
79383
+ __name(decodeBase64, "decodeBase64");
79384
+ function encodeBase64(string) {
79385
+ return safeBuffer.from(string, "utf8").toString("base64");
79386
+ }
79387
+ __name(encodeBase64, "encodeBase64");
79388
+ module2.exports = {
79389
+ decodeBase64,
79390
+ encodeBase64
79391
+ };
79392
+ }
79393
+ });
79394
+ var require_registry_auth_token = __commonJS2({
79395
+ "../../node_modules/.pnpm/registry-auth-token@3.3.2/node_modules/registry-auth-token/index.js"(exports2, module2) {
79396
+ var url = __require("url");
79397
+ var base64 = require_base64();
79398
+ var decodeBase64 = base64.decodeBase64;
79399
+ var encodeBase64 = base64.encodeBase64;
79400
+ var tokenKey = ":_authToken";
79401
+ var userKey = ":username";
79402
+ var passwordKey = ":_password";
79403
+ module2.exports = function() {
79404
+ var checkUrl;
79405
+ var options;
79406
+ if (arguments.length >= 2) {
79407
+ checkUrl = arguments[0];
79408
+ options = arguments[1];
79409
+ } else if (typeof arguments[0] === "string") {
79410
+ checkUrl = arguments[0];
79411
+ } else {
79412
+ options = arguments[0];
79413
+ }
79414
+ options = options || {};
79415
+ options.npmrc = options.npmrc || require_rc()("npm", { registry: "https://registry.npmjs.org/" });
79416
+ checkUrl = checkUrl || options.npmrc.registry;
79417
+ return getRegistryAuthInfo(checkUrl, options) || getLegacyAuthInfo(options.npmrc);
79418
+ };
79419
+ function getRegistryAuthInfo(checkUrl, options) {
79420
+ var parsed = url.parse(checkUrl, false, true);
79421
+ var pathname;
79422
+ while (pathname !== "/" && parsed.pathname !== pathname) {
79423
+ pathname = parsed.pathname || "/";
79424
+ var regUrl = "//" + parsed.host + pathname.replace(/\/$/, "");
79425
+ var authInfo = getAuthInfoForUrl(regUrl, options.npmrc);
79426
+ if (authInfo) {
79427
+ return authInfo;
79428
+ }
79429
+ if (!options.recursive) {
79430
+ return /\/$/.test(checkUrl) ? void 0 : getRegistryAuthInfo(url.resolve(checkUrl, "."), options);
79431
+ }
79432
+ parsed.pathname = url.resolve(normalizePath(pathname), "..") || "/";
79433
+ }
79434
+ return void 0;
79435
+ }
79436
+ __name(getRegistryAuthInfo, "getRegistryAuthInfo");
79437
+ function getLegacyAuthInfo(npmrc) {
79438
+ if (npmrc._auth) {
79439
+ return { token: npmrc._auth, type: "Basic" };
79440
+ }
79441
+ return void 0;
79442
+ }
79443
+ __name(getLegacyAuthInfo, "getLegacyAuthInfo");
79444
+ function normalizePath(path52) {
79445
+ return path52[path52.length - 1] === "/" ? path52 : path52 + "/";
79446
+ }
79447
+ __name(normalizePath, "normalizePath");
79448
+ function getAuthInfoForUrl(regUrl, npmrc) {
79449
+ var bearerAuth = getBearerToken(npmrc[regUrl + tokenKey] || npmrc[regUrl + "/" + tokenKey]);
79450
+ if (bearerAuth) {
79451
+ return bearerAuth;
79452
+ }
79453
+ var username = npmrc[regUrl + userKey] || npmrc[regUrl + "/" + userKey];
79454
+ var password = npmrc[regUrl + passwordKey] || npmrc[regUrl + "/" + passwordKey];
79455
+ var basicAuth = getTokenForUsernameAndPassword(username, password);
79456
+ if (basicAuth) {
79457
+ return basicAuth;
79458
+ }
79459
+ return void 0;
79460
+ }
79461
+ __name(getAuthInfoForUrl, "getAuthInfoForUrl");
79462
+ function getBearerToken(tok) {
79463
+ if (!tok) {
79464
+ return void 0;
79465
+ }
79466
+ var token = tok.replace(/^\$\{?([^}]*)\}?$/, function(fullMatch, envVar) {
79467
+ return process.env[envVar];
79468
+ });
79469
+ return { token, type: "Bearer" };
79470
+ }
79471
+ __name(getBearerToken, "getBearerToken");
79472
+ function getTokenForUsernameAndPassword(username, password) {
79473
+ if (!username || !password) {
79474
+ return void 0;
79475
+ }
79476
+ var pass = decodeBase64(password.replace(/^\$\{?([^}]*)\}?$/, function(fullMatch, envVar) {
79477
+ return process.env[envVar];
79478
+ }));
79479
+ var token = encodeBase64(username + ":" + pass);
79480
+ return {
79481
+ token,
79482
+ type: "Basic",
79483
+ password: pass,
79484
+ username
79485
+ };
79486
+ }
79487
+ __name(getTokenForUsernameAndPassword, "getTokenForUsernameAndPassword");
79488
+ }
79489
+ });
79490
+ var require_update_check = __commonJS2({
79491
+ "../../node_modules/.pnpm/update-check@1.5.4/node_modules/update-check/index.js"(exports2, module2) {
79492
+ var { URL: URL2 } = __require("url");
79493
+ var { join: join22 } = __require("path");
79494
+ var fs32 = __require("fs");
79495
+ var { promisify: promisify7 } = __require("util");
79496
+ var { tmpdir: tmpdir4 } = __require("os");
79497
+ var registryUrl = require_registry_url();
79498
+ var writeFile4 = promisify7(fs32.writeFile);
79499
+ var mkdir = promisify7(fs32.mkdir);
79500
+ var readFile2 = promisify7(fs32.readFile);
79501
+ var compareVersions = /* @__PURE__ */ __name((a, b2) => a.localeCompare(b2, "en-US", { numeric: true }), "compareVersions");
79502
+ var encode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/^%40/, "@"), "encode");
79503
+ var getFile = /* @__PURE__ */ __name(async (details, distTag) => {
79504
+ const rootDir = tmpdir4();
79505
+ const subDir = join22(rootDir, "update-check");
79506
+ if (!fs32.existsSync(subDir)) {
79507
+ await mkdir(subDir);
79508
+ }
79509
+ let name3 = `${details.name}-${distTag}.json`;
79510
+ if (details.scope) {
79511
+ name3 = `${details.scope}-${name3}`;
79512
+ }
79513
+ return join22(subDir, name3);
79514
+ }, "getFile");
79515
+ var evaluateCache = /* @__PURE__ */ __name(async (file2, time, interval) => {
79516
+ if (fs32.existsSync(file2)) {
79517
+ const content = await readFile2(file2, "utf8");
79518
+ const { lastUpdate, latest } = JSON.parse(content);
79519
+ const nextCheck = lastUpdate + interval;
79520
+ if (nextCheck > time) {
79521
+ return {
79522
+ shouldCheck: false,
79523
+ latest
79524
+ };
79525
+ }
79526
+ }
79527
+ return {
79528
+ shouldCheck: true,
79529
+ latest: null
79530
+ };
79531
+ }, "evaluateCache");
79532
+ var updateCache = /* @__PURE__ */ __name(async (file2, latest, lastUpdate) => {
79533
+ const content = JSON.stringify({
79534
+ latest,
79535
+ lastUpdate
79536
+ });
79537
+ await writeFile4(file2, content, "utf8");
79538
+ }, "updateCache");
79539
+ var loadPackage = /* @__PURE__ */ __name((url, authInfo) => new Promise((resolve13, reject) => {
79540
+ const options = {
79541
+ host: url.hostname,
79542
+ path: url.pathname,
79543
+ port: url.port,
79544
+ headers: {
79545
+ accept: "application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"
79546
+ },
79547
+ timeout: 2e3
79548
+ };
79549
+ if (authInfo) {
79550
+ options.headers.authorization = `${authInfo.type} ${authInfo.token}`;
79551
+ }
79552
+ const { get } = url.protocol === "https:" ? __require("https") : __require("http");
79553
+ get(options, (response) => {
79554
+ const { statusCode } = response;
79555
+ if (statusCode !== 200) {
79556
+ const error2 = new Error(`Request failed with code ${statusCode}`);
79557
+ error2.code = statusCode;
79558
+ reject(error2);
79559
+ response.resume();
79560
+ return;
79561
+ }
79562
+ let rawData = "";
79563
+ response.setEncoding("utf8");
79564
+ response.on("data", (chunk) => {
79565
+ rawData += chunk;
79566
+ });
79567
+ response.on("end", () => {
79568
+ try {
79569
+ const parsedData = JSON.parse(rawData);
79570
+ resolve13(parsedData);
79571
+ } catch (e2) {
79572
+ reject(e2);
79573
+ }
79574
+ });
79575
+ }).on("error", reject).on("timeout", reject);
79576
+ }), "loadPackage");
79577
+ var getMostRecent = /* @__PURE__ */ __name(async ({ full, scope }, distTag) => {
79578
+ const regURL = registryUrl(scope);
79579
+ const url = new URL2(full, regURL);
79580
+ let spec = null;
79581
+ try {
79582
+ spec = await loadPackage(url);
79583
+ } catch (err) {
79584
+ if (err.code && String(err.code).startsWith(4)) {
79585
+ const registryAuthToken = require_registry_auth_token();
79586
+ const authInfo = registryAuthToken(regURL, { recursive: true });
79587
+ spec = await loadPackage(url, authInfo);
79588
+ } else {
79589
+ throw err;
79590
+ }
79591
+ }
79592
+ const version3 = spec["dist-tags"][distTag];
79593
+ if (!version3) {
79594
+ throw new Error(`Distribution tag ${distTag} is not available`);
79595
+ }
79596
+ return version3;
79597
+ }, "getMostRecent");
79598
+ var defaultConfig = {
79599
+ interval: 36e5,
79600
+ distTag: "latest"
79601
+ };
79602
+ var getDetails = /* @__PURE__ */ __name((name3) => {
79603
+ const spec = {
79604
+ full: encode(name3)
79605
+ };
79606
+ if (name3.includes("/")) {
79607
+ const parts = name3.split("/");
79608
+ spec.scope = parts[0];
79609
+ spec.name = parts[1];
79610
+ } else {
79611
+ spec.scope = null;
79612
+ spec.name = name3;
79613
+ }
79614
+ return spec;
79615
+ }, "getDetails");
79616
+ module2.exports = async (pkg, config49) => {
79617
+ if (typeof pkg !== "object") {
79618
+ throw new Error("The first parameter should be your package.json file content");
79619
+ }
79620
+ const details = getDetails(pkg.name);
79621
+ const time = Date.now();
79622
+ const { distTag, interval } = Object.assign({}, defaultConfig, config49);
79623
+ const file2 = await getFile(details, distTag);
79624
+ let latest = null;
79625
+ let shouldCheck = true;
79626
+ ({ shouldCheck, latest } = await evaluateCache(file2, time, interval));
79627
+ if (shouldCheck) {
79628
+ latest = await getMostRecent(details, distTag);
79629
+ await updateCache(file2, latest, time);
79630
+ }
79631
+ const comparision = compareVersions(pkg.version, latest);
79632
+ if (comparision === -1) {
79633
+ return {
79634
+ latest,
79635
+ fromCache: !shouldCheck
79636
+ };
79637
+ }
79638
+ return null;
79639
+ };
79640
+ }
79641
+ });
78653
79642
  var defaultWranglerConfig = {
78654
79643
  /* COMPUTED_FIELDS */
78655
79644
  configPath: void 0,
@@ -78699,6 +79688,8 @@ var defaultWranglerConfig = {
78699
79688
  vectorize: [],
78700
79689
  ai_search_namespaces: [],
78701
79690
  ai_search: [],
79691
+ web_search: void 0,
79692
+ agent_memory: [],
78702
79693
  hyperdrive: [],
78703
79694
  workflows: [],
78704
79695
  secrets_store_secrets: [],
@@ -82737,7 +83728,8 @@ var getWranglerSendMetricsFromEnv = getBooleanEnvironmentVariableFactory({
82737
83728
  variableName: "WRANGLER_SEND_METRICS"
82738
83729
  });
82739
83730
  var getWranglerSendErrorReportsFromEnv = getBooleanEnvironmentVariableFactory({
82740
- variableName: "WRANGLER_SEND_ERROR_REPORTS"
83731
+ variableName: "WRANGLER_SEND_ERROR_REPORTS",
83732
+ defaultValue: false
82741
83733
  });
82742
83734
  var getCloudflareApiEnvironmentFromEnv = getEnvironmentVariableFactory(
82743
83735
  {
@@ -82768,6 +83760,7 @@ var getCloudflareApiBaseUrlFromEnv = getEnvironmentVariableFactory({
82768
83760
  variableName: "CLOUDFLARE_API_BASE_URL",
82769
83761
  deprecatedName: "CF_API_BASE_URL"
82770
83762
  });
83763
+ var getCloudflareApiBaseUrl = /* @__PURE__ */ __name((complianceConfig) => getCloudflareApiBaseUrlFromEnv() ?? `https://api${getComplianceRegionSubdomain(complianceConfig)}${getStagingSubdomain()}.cloudflare.com/client/v4`, "getCloudflareApiBaseUrl");
82771
83764
  function getComplianceRegionSubdomain(complianceConfig) {
82772
83765
  return getCloudflareComplianceRegion(complianceConfig) === "fedramp_high" ? ".fed" : "";
82773
83766
  }
@@ -83300,6 +84293,8 @@ var friendlyBindingNames = {
83300
84293
  vectorize: "Vectorize Index",
83301
84294
  ai_search_namespaces: "AI Search Namespace",
83302
84295
  ai_search: "AI Search Instance",
84296
+ web_search: "Web Search",
84297
+ agent_memory: "Agent Memory",
83303
84298
  hyperdrive: "Hyperdrive Config",
83304
84299
  r2_buckets: "R2 Bucket",
83305
84300
  logfwdr: "logfwdr",
@@ -83352,6 +84347,8 @@ var bindingTypeFriendlyNames = {
83352
84347
  vectorize: "Vectorize Index",
83353
84348
  ai_search_namespace: "AI Search Namespace",
83354
84349
  ai_search: "AI Search Instance",
84350
+ web_search: "Web Search",
84351
+ agent_memory: "Agent Memory",
83355
84352
  hyperdrive: "Hyperdrive Config",
83356
84353
  service: "Worker",
83357
84354
  fetcher: "Service Binding",
@@ -84546,6 +85543,26 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
84546
85543
  validateBindingArray(envName, validateAISearchBinding),
84547
85544
  []
84548
85545
  ),
85546
+ web_search: notInheritable(
85547
+ diagnostics,
85548
+ topLevelEnv,
85549
+ rawConfig,
85550
+ rawEnv,
85551
+ envName,
85552
+ "web_search",
85553
+ validateNamedSimpleBinding(envName),
85554
+ void 0
85555
+ ),
85556
+ agent_memory: notInheritable(
85557
+ diagnostics,
85558
+ topLevelEnv,
85559
+ rawConfig,
85560
+ rawEnv,
85561
+ envName,
85562
+ "agent_memory",
85563
+ validateBindingArray(envName, validateAgentMemoryBinding),
85564
+ []
85565
+ ),
84549
85566
  hyperdrive: notInheritable(
84550
85567
  diagnostics,
84551
85568
  topLevelEnv,
@@ -85629,6 +86646,8 @@ var validateUnsafeBinding = /* @__PURE__ */ __name((diagnostics, field, value) =
85629
86646
  "ai",
85630
86647
  "ai_search_namespace",
85631
86648
  "ai_search",
86649
+ "web_search",
86650
+ "agent_memory",
85632
86651
  "kv_namespace",
85633
86652
  "durable_object_namespace",
85634
86653
  "d1_database",
@@ -86544,6 +87563,36 @@ var validateAISearchBinding = /* @__PURE__ */ __name((diagnostics, field, value)
86544
87563
  ]);
86545
87564
  return isValid2;
86546
87565
  }, "validateAISearchBinding");
87566
+ var validateAgentMemoryBinding = /* @__PURE__ */ __name((diagnostics, field, value) => {
87567
+ if (typeof value !== "object" || value === null) {
87568
+ diagnostics.errors.push(
87569
+ `"agent_memory" bindings should be objects, but got ${JSON.stringify(value)}`
87570
+ );
87571
+ return false;
87572
+ }
87573
+ let isValid2 = true;
87574
+ if (!isRequiredProperty(value, "binding", "string")) {
87575
+ diagnostics.errors.push(
87576
+ `"${field}" bindings should have a string "binding" field but got ${JSON.stringify(value)}.`
87577
+ );
87578
+ isValid2 = false;
87579
+ }
87580
+ if (!isRequiredProperty(value, "namespace", "string")) {
87581
+ diagnostics.errors.push(
87582
+ `"${field}" bindings must have a "namespace" field but got ${JSON.stringify(value)}.`
87583
+ );
87584
+ isValid2 = false;
87585
+ }
87586
+ if (!isRemoteValid(value, field, diagnostics)) {
87587
+ isValid2 = false;
87588
+ }
87589
+ validateAdditionalProperties(diagnostics, field, Object.keys(value), [
87590
+ "binding",
87591
+ "namespace",
87592
+ "remote"
87593
+ ]);
87594
+ return isValid2;
87595
+ }, "validateAgentMemoryBinding");
86547
87596
  var validateHyperdriveBinding = /* @__PURE__ */ __name((diagnostics, field, value) => {
86548
87597
  if (typeof value !== "object" || value === null) {
86549
87598
  diagnostics.errors.push(
@@ -87043,9 +88092,17 @@ var validatePipelineBinding = /* @__PURE__ */ __name((diagnostics, field, value)
87043
88092
  );
87044
88093
  isValid2 = false;
87045
88094
  }
87046
- if (!isRequiredProperty(value, "pipeline", "string")) {
88095
+ const hasStream = isOptionalProperty(value, "stream", "string");
88096
+ const hasPipeline = isOptionalProperty(value, "pipeline", "string");
88097
+ const v = value;
88098
+ if (hasStream && v.stream) ;
88099
+ else if (hasPipeline && v.pipeline) {
88100
+ diagnostics.warnings.push(
88101
+ `The "pipeline" field in "${field}" bindings is deprecated. Use "stream" instead.`
88102
+ );
88103
+ } else {
87047
88104
  diagnostics.errors.push(
87048
- `"${field}" bindings must have a string "pipeline" field but got ${JSON.stringify(
88105
+ `"${field}" bindings must have a string "stream" field but got ${JSON.stringify(
87049
88106
  value
87050
88107
  )}.`
87051
88108
  );
@@ -87056,6 +88113,7 @@ var validatePipelineBinding = /* @__PURE__ */ __name((diagnostics, field, value)
87056
88113
  }
87057
88114
  validateAdditionalProperties(diagnostics, field, Object.keys(value), [
87058
88115
  "binding",
88116
+ "stream",
87059
88117
  "pipeline",
87060
88118
  "remote"
87061
88119
  ]);
@@ -87995,7 +89053,9 @@ var BINDING_LOCAL_SUPPORT = {
87995
89053
  artifacts: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
87996
89054
  flagship: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
87997
89055
  vpc_service: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
87998
- vpc_network: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator"
89056
+ vpc_network: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
89057
+ web_search: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
89058
+ agent_memory: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator"
87999
89059
  };
88000
89060
  function getBindingLocalSupport(type) {
88001
89061
  if (type in BINDING_LOCAL_SUPPORT) {
@@ -88564,18 +89624,6 @@ __name(downloadCloudflared, "downloadCloudflared");
88564
89624
  async function downloadAndExtractTarball(response, expectedChecksum, binPath, cacheDir) {
88565
89625
  const tempTarPath = (0, import_node_path2.join)(cacheDir, "cloudflared.tgz");
88566
89626
  const buffer = Buffer.from(await response.arrayBuffer());
88567
- if (expectedChecksum) {
88568
- const actualSha256 = sha256Hex(buffer);
88569
- if (actualSha256 !== expectedChecksum) {
88570
- throw new UserError(
88571
- `[cloudflared] SHA256 mismatch for downloaded cloudflared tarball.
88572
-
88573
- Expected: ${expectedChecksum}
88574
- Actual: ${actualSha256}`,
88575
- { telemetryMessage: "tunnel cloudflared tarball checksum mismatch" }
88576
- );
88577
- }
88578
- }
88579
89627
  (0, import_node_fs2.writeFileSync)(tempTarPath, buffer);
88580
89628
  try {
88581
89629
  (0, import_node_child_process.execFileSync)("tar", ["-xzf", tempTarPath, "-C", cacheDir], {
@@ -88585,6 +89633,21 @@ Actual: ${actualSha256}`,
88585
89633
  if (extractedPath !== binPath && (0, import_node_fs2.existsSync)(extractedPath)) {
88586
89634
  (0, import_node_fs2.renameSync)(extractedPath, binPath);
88587
89635
  }
89636
+ if (expectedChecksum) {
89637
+ const extractedBinary = (0, import_node_fs2.readFileSync)(binPath);
89638
+ const actualSha256 = sha256Hex(extractedBinary);
89639
+ if (actualSha256 !== expectedChecksum) {
89640
+ throw new UserError(
89641
+ `[cloudflared] SHA256 mismatch for downloaded cloudflared binary.
89642
+
89643
+ Expected: ${expectedChecksum}
89644
+ Actual: ${actualSha256}`,
89645
+ {
89646
+ telemetryMessage: "tunnel cloudflared extracted binary checksum mismatch"
89647
+ }
89648
+ );
89649
+ }
89650
+ }
88588
89651
  } finally {
88589
89652
  try {
88590
89653
  if ((0, import_node_fs2.existsSync)(tempTarPath)) {
@@ -88781,7 +89844,7 @@ function startTunnel(options) {
88781
89844
  return;
88782
89845
  }
88783
89846
  logger?.log(
88784
- `${publicURL ? `The tunnel is still open at ${publicURL}.` : "The tunnel is still open."} It expires in ${formatTunnelDuration(remainingMs)}. ${options.extendHint ?? ""}`
89847
+ `${publicURL ? `Tunnel still open, expires in ${formatTunnelDuration(remainingMs)}: ${publicURL}` : `The tunnel is still open. It expires in ${formatTunnelDuration(remainingMs)}.`}${options.extendHint ? ` ${options.extendHint}` : ""}`
88785
89848
  );
88786
89849
  }, reminderIntervalMs);
88787
89850
  reminderInterval.unref?.();
@@ -88868,7 +89931,7 @@ function terminateCloudflared(cloudflared) {
88868
89931
  }
88869
89932
  __name(terminateCloudflared, "terminateCloudflared");
88870
89933
  function waitForQuickTunnelReady(cloudflared, timeoutMs, options) {
88871
- return new Promise((resolve12, reject) => {
89934
+ return new Promise((resolve13, reject) => {
88872
89935
  let resolved = false;
88873
89936
  let stderrOutput = "";
88874
89937
  const logger = options?.logger;
@@ -88896,7 +89959,7 @@ function waitForQuickTunnelReady(cloudflared, timeoutMs, options) {
88896
89959
  if (match && !resolved) {
88897
89960
  resolved = true;
88898
89961
  clearTimeout(timeoutId);
88899
- resolve12({ mode: "quick", publicUrl: new URL(match[0]) });
89962
+ resolve13({ mode: "quick", publicUrl: new URL(match[0]) });
88900
89963
  }
88901
89964
  });
88902
89965
  }
@@ -88932,7 +89995,7 @@ function createTunnelStartupError(message, stderrOutput, origin) {
88932
89995
  cloudflared output:
88933
89996
  ${stderrOutput || "(no output)"}
88934
89997
 
88935
- The local dev server started at ${origin.href}.
89998
+ The local dev server started at ${origin.href}
88936
89999
  ` + (isQuickTunnelRateLimited ? "Cloudflare Quick Tunnel creation was rate limited. Try again in a few minutes, or use a named tunnel if you need more reliable access." : `Check the cloudflared output above for more details, and verify that ${origin.href} is reachable from this machine if this keeps happening.`);
88937
90000
  if (isQuickTunnelRateLimited) {
88938
90001
  return new UserError(errorMessage, { telemetryMessage: false });
@@ -88940,6 +90003,373 @@ The local dev server started at ${origin.href}.
88940
90003
  return new Error(errorMessage);
88941
90004
  }
88942
90005
  __name(createTunnelStartupError, "createTunnelStartupError");
90006
+ function buildDetailedError(message, ...extra) {
90007
+ return new ParseError({
90008
+ text: message,
90009
+ notes: extra.map((text) => ({ text })),
90010
+ telemetryMessage: false
90011
+ });
90012
+ }
90013
+ __name(buildDetailedError, "buildDetailedError");
90014
+ function maybeThrowFriendlyError(error2) {
90015
+ if (error2.message === "workers.api.error.email_verification_required") {
90016
+ throw buildDetailedError(
90017
+ "Please verify your account's email address and try again.",
90018
+ "Check your email for a verification link, or login to https://dash.cloudflare.com and request a new one."
90019
+ );
90020
+ }
90021
+ }
90022
+ __name(maybeThrowFriendlyError, "maybeThrowFriendlyError");
90023
+ function logHeaders(headers, logger) {
90024
+ const clone = cloneHeaders(headers);
90025
+ clone.delete("Authorization");
90026
+ logger.debugWithSanitization(
90027
+ "HEADERS:",
90028
+ JSON.stringify(Object.fromEntries(clone), null, 2)
90029
+ );
90030
+ }
90031
+ __name(logHeaders, "logHeaders");
90032
+ async function performApiFetchBase(complianceConfig, resource, init = {}, userAgent, logger, queryParams, abortSignal, credentials) {
90033
+ (0, import_node_assert2.default)(credentials, "credentials are required for performApiFetch");
90034
+ const method = init.method ?? "GET";
90035
+ (0, import_node_assert2.default)(
90036
+ resource.startsWith("/"),
90037
+ `CF API fetch - resource path must start with a "/" but got "${resource}"`
90038
+ );
90039
+ const headers = cloneHeaders(new import_undici.Headers(init.headers));
90040
+ addAuthorizationHeader(headers, credentials);
90041
+ headers.set("User-Agent", userAgent);
90042
+ maybeAddTraceHeader(headers);
90043
+ const queryString = queryParams ? `?${queryParams.toString()}` : "";
90044
+ logger.debug(
90045
+ `-- START CF API REQUEST: ${method} ${getCloudflareApiBaseUrl(complianceConfig)}${resource}`
90046
+ );
90047
+ logger.debugWithSanitization("QUERY STRING:", queryString);
90048
+ logHeaders(headers, logger);
90049
+ logger.debugWithSanitization("INIT:", JSON.stringify({ ...init }, null, 2));
90050
+ if (init.body instanceof import_undici.FormData) {
90051
+ logger.debugWithSanitization(
90052
+ "BODY:",
90053
+ await new import_undici.Response(init.body).text(),
90054
+ null,
90055
+ 2
90056
+ );
90057
+ }
90058
+ logger.debug("-- END CF API REQUEST");
90059
+ return await (0, import_undici.fetch)(
90060
+ `${getCloudflareApiBaseUrl(complianceConfig)}${resource}${queryString}`,
90061
+ {
90062
+ method,
90063
+ ...init,
90064
+ headers,
90065
+ signal: abortSignal
90066
+ }
90067
+ );
90068
+ }
90069
+ __name(performApiFetchBase, "performApiFetchBase");
90070
+ async function fetchInternalBase(complianceConfig, resource, init = {}, userAgent, logger, queryParams, abortSignal, credentials) {
90071
+ const method = init.method ?? "GET";
90072
+ const response = await performApiFetchBase(
90073
+ complianceConfig,
90074
+ resource,
90075
+ init,
90076
+ userAgent,
90077
+ logger,
90078
+ queryParams,
90079
+ abortSignal,
90080
+ credentials
90081
+ );
90082
+ const jsonText = await response.text();
90083
+ logger.debug(
90084
+ "-- START CF API RESPONSE:",
90085
+ response.statusText,
90086
+ response.status
90087
+ );
90088
+ logHeaders(response.headers, logger);
90089
+ logger.debugWithSanitization("RESPONSE:", jsonText);
90090
+ logger.debug("-- END CF API RESPONSE");
90091
+ if (!jsonText && (response.status === 204 || response.status === 205)) {
90092
+ return {
90093
+ response: {
90094
+ result: {},
90095
+ success: true,
90096
+ errors: [],
90097
+ messages: []
90098
+ },
90099
+ status: response.status
90100
+ };
90101
+ }
90102
+ if (isWAFBlockResponse(response.headers)) {
90103
+ throwWAFBlockError(
90104
+ response.headers,
90105
+ method,
90106
+ resource,
90107
+ response.status,
90108
+ response.statusText
90109
+ );
90110
+ }
90111
+ try {
90112
+ const json = parseJSON(jsonText);
90113
+ return { response: json, status: response.status };
90114
+ } catch {
90115
+ const rayId = extractWAFBlockRayId(response.headers);
90116
+ throw new APIError({
90117
+ text: "Received a malformed response from the API",
90118
+ notes: [
90119
+ {
90120
+ text: truncate(jsonText, 100)
90121
+ },
90122
+ {
90123
+ text: `${method} ${resource} -> ${response.status} ${response.statusText}`
90124
+ },
90125
+ ...rayId ? [{ text: `Cloudflare Ray ID: ${rayId}` }] : []
90126
+ ],
90127
+ status: response.status,
90128
+ telemetryMessage: false
90129
+ });
90130
+ }
90131
+ }
90132
+ __name(fetchInternalBase, "fetchInternalBase");
90133
+ async function fetchResultBase(complianceConfig, resource, init = {}, userAgent, logger, queryParams, abortSignal, credentials) {
90134
+ const { response: json, status: status2 } = await fetchInternalBase(
90135
+ complianceConfig,
90136
+ resource,
90137
+ init,
90138
+ userAgent,
90139
+ logger,
90140
+ queryParams,
90141
+ abortSignal,
90142
+ credentials
90143
+ );
90144
+ if (json.success) {
90145
+ return json.result;
90146
+ } else {
90147
+ throwFetchError(resource, json, status2);
90148
+ }
90149
+ }
90150
+ __name(fetchResultBase, "fetchResultBase");
90151
+ async function fetchListResultBase(complianceConfig, resource, init = {}, userAgent, logger, queryParams, credentials) {
90152
+ const results = [];
90153
+ let getMoreResults = true;
90154
+ let cursor;
90155
+ while (getMoreResults) {
90156
+ if (cursor) {
90157
+ queryParams = new import_node_url.URLSearchParams(queryParams);
90158
+ queryParams.set("cursor", cursor);
90159
+ }
90160
+ const { response: json, status: status2 } = await fetchInternalBase(
90161
+ complianceConfig,
90162
+ resource,
90163
+ init,
90164
+ userAgent,
90165
+ logger,
90166
+ queryParams,
90167
+ void 0,
90168
+ credentials
90169
+ );
90170
+ if (json.success) {
90171
+ results.push(...json.result);
90172
+ if (hasCursor(json.result_info)) {
90173
+ cursor = json.result_info?.cursor;
90174
+ } else {
90175
+ getMoreResults = false;
90176
+ }
90177
+ } else {
90178
+ throwFetchError(resource, json, status2);
90179
+ }
90180
+ }
90181
+ return results;
90182
+ }
90183
+ __name(fetchListResultBase, "fetchListResultBase");
90184
+ function truncate(text, maxLength) {
90185
+ const { length } = text;
90186
+ if (length <= maxLength) {
90187
+ return text;
90188
+ }
90189
+ return `${text.substring(0, maxLength)}... (length = ${length})`;
90190
+ }
90191
+ __name(truncate, "truncate");
90192
+ function isWAFBlockResponse(headers) {
90193
+ return headers.get("cf-mitigated") === "challenge";
90194
+ }
90195
+ __name(isWAFBlockResponse, "isWAFBlockResponse");
90196
+ function extractWAFBlockRayId(headers) {
90197
+ return headers.get("cf-ray") ?? void 0;
90198
+ }
90199
+ __name(extractWAFBlockRayId, "extractWAFBlockRayId");
90200
+ function extractAccountTag(resource) {
90201
+ const re = new RegExp("/accounts/([a-zA-Z0-9]+)/?");
90202
+ const matches = re.exec(resource);
90203
+ return matches?.[1];
90204
+ }
90205
+ __name(extractAccountTag, "extractAccountTag");
90206
+ function hasMorePages(result_info) {
90207
+ const page = result_info?.page;
90208
+ const per_page = result_info?.per_page;
90209
+ const total = result_info?.total_count;
90210
+ return page !== void 0 && per_page !== void 0 && total !== void 0 && page * per_page < total;
90211
+ }
90212
+ __name(hasMorePages, "hasMorePages");
90213
+ function renderError(err, level = 0) {
90214
+ const indent2 = " ".repeat(level);
90215
+ const message = err.message ?? "";
90216
+ const chainedMessages = "error_chain" in err ? err.error_chain?.map(
90217
+ (chainedError) => `
90218
+
90219
+ ${indent2}- ${renderError(chainedError, level + 1)}`
90220
+ ).join("\n") ?? "" : "";
90221
+ return (err.code ? `${message} [code: ${err.code}]` : message) + (err.documentation_url ? `
90222
+ ${indent2}To learn more about this error, visit: ${err.documentation_url}` : "") + chainedMessages;
90223
+ }
90224
+ __name(renderError, "renderError");
90225
+ function addAuthorizationHeader(headers, auth, overrideExisting = false) {
90226
+ if (!headers.has("Authorization") || overrideExisting) {
90227
+ if ("apiToken" in auth) {
90228
+ const authorizationHeader = `Bearer ${auth.apiToken}`;
90229
+ validateAuthorizationHeaderValue(authorizationHeader);
90230
+ headers.set("Authorization", authorizationHeader);
90231
+ } else {
90232
+ headers.set("X-Auth-Key", auth.authKey);
90233
+ headers.set("X-Auth-Email", auth.authEmail);
90234
+ }
90235
+ }
90236
+ }
90237
+ __name(addAuthorizationHeader, "addAuthorizationHeader");
90238
+ function validateAuthorizationHeaderValue(value) {
90239
+ for (const character of value) {
90240
+ const codePoint = character.codePointAt(0);
90241
+ if (codePoint === void 0 || codePoint > 255) {
90242
+ throw new UserError(
90243
+ `The configured Cloudflare API token contains a character that cannot be used in an HTTP Authorization header: ${formatAuthorizationHeaderCharacter(character, codePoint)}. Recreate or copy the token again, making sure it does not include characters such as ellipses.`,
90244
+ {
90245
+ telemetryMessage: "cfetch auth invalid authorization header"
90246
+ }
90247
+ );
90248
+ }
90249
+ }
90250
+ }
90251
+ __name(validateAuthorizationHeaderValue, "validateAuthorizationHeaderValue");
90252
+ function formatAuthorizationHeaderCharacter(character, codePoint) {
90253
+ if (codePoint === void 0) {
90254
+ return '"\\u{unknown}"';
90255
+ }
90256
+ const codePointLabel = `U+${codePoint.toString(16).toUpperCase().padStart(4, "0")}`;
90257
+ const characterLabel = isPrintableCharacter(character) ? `"${character}"` : `"${escapeCharacter(character)}"`;
90258
+ return `${characterLabel} (${codePointLabel})`;
90259
+ }
90260
+ __name(formatAuthorizationHeaderCharacter, "formatAuthorizationHeaderCharacter");
90261
+ function isPrintableCharacter(character) {
90262
+ return !/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u.test(character);
90263
+ }
90264
+ __name(isPrintableCharacter, "isPrintableCharacter");
90265
+ function escapeCharacter(character) {
90266
+ return Array.from(character).map((c2) => {
90267
+ const codePoint = c2.codePointAt(0);
90268
+ if (codePoint === void 0) {
90269
+ return "";
90270
+ }
90271
+ return codePoint <= 65535 ? `\\u${codePoint.toString(16).toUpperCase().padStart(4, "0")}` : `\\u{${codePoint.toString(16).toUpperCase()}}`;
90272
+ }).join("");
90273
+ }
90274
+ __name(escapeCharacter, "escapeCharacter");
90275
+ function throwFetchError(resource, response, status2) {
90276
+ const errors = response.errors ?? [];
90277
+ for (const error22 of errors) {
90278
+ maybeThrowFriendlyError(error22);
90279
+ }
90280
+ const notes = [
90281
+ ...errors.map((err) => ({ text: renderError(err) })),
90282
+ ...response.messages?.map((msg) => ({
90283
+ text: typeof msg === "string" ? msg : msg.message ?? String(msg)
90284
+ })) ?? []
90285
+ ];
90286
+ if (notes.length === 0) {
90287
+ const raw = response;
90288
+ const fallbackMessage = typeof raw.error === "string" ? `${raw.error}${raw.code ? ` [code: ${raw.code}]` : ""}` : void 0;
90289
+ if (fallbackMessage) {
90290
+ notes.push({ text: fallbackMessage });
90291
+ }
90292
+ }
90293
+ const error2 = new APIError({
90294
+ text: `A request to the Cloudflare API (${resource}) failed.`,
90295
+ notes,
90296
+ status: status2,
90297
+ telemetryMessage: false
90298
+ });
90299
+ const code = errors[0]?.code;
90300
+ if (code) {
90301
+ error2.code = code;
90302
+ }
90303
+ error2.accountTag = extractAccountTag(resource);
90304
+ throw error2;
90305
+ }
90306
+ __name(throwFetchError, "throwFetchError");
90307
+ function throwWAFBlockError(headers, method, resource, status2, statusText) {
90308
+ const rayId = extractWAFBlockRayId(headers);
90309
+ throw new APIError({
90310
+ text: "The Cloudflare API responded with a WAF block page instead of the expected JSON response",
90311
+ notes: [
90312
+ {
90313
+ text: "Cloudflare's firewall (WAF) blocked this API request. This is usually a false positive."
90314
+ },
90315
+ ...rayId ? [{ text: `Cloudflare Ray ID: ${rayId}` }] : [],
90316
+ {
90317
+ text: rayId ? "If the issue persists, please open a Cloudflare Support ticket and include the Ray ID above." : "If the issue persists, please open a Cloudflare Support ticket. You can find the Cloudflare Ray ID on the block page in your browser."
90318
+ },
90319
+ {
90320
+ text: `${method} ${resource} -> ${status2} ${statusText}`
90321
+ }
90322
+ ],
90323
+ status: status2,
90324
+ telemetryMessage: false
90325
+ });
90326
+ }
90327
+ __name(throwWAFBlockError, "throwWAFBlockError");
90328
+ function hasCursor(result_info) {
90329
+ const cursor = result_info?.cursor;
90330
+ return cursor !== void 0 && cursor !== null && cursor !== "";
90331
+ }
90332
+ __name(hasCursor, "hasCursor");
90333
+ function maybeAddTraceHeader(headers) {
90334
+ const traceHeader = getTraceHeader();
90335
+ if (traceHeader) {
90336
+ headers.set("Cf-Trace-Id", traceHeader);
90337
+ }
90338
+ }
90339
+ __name(maybeAddTraceHeader, "maybeAddTraceHeader");
90340
+ function cloneHeaders(headers) {
90341
+ return new import_undici.Headers(headers);
90342
+ }
90343
+ __name(cloneHeaders, "cloneHeaders");
90344
+ var import_update_check = __toESM2(require_update_check());
90345
+ var UPDATE_CHECK_TIMEOUT_MS = 3e3;
90346
+ var TIMED_OUT = /* @__PURE__ */ Symbol("timed_out");
90347
+ async function fetchLatestNpmVersion(name3, version3) {
90348
+ let result = null;
90349
+ try {
90350
+ result = await Promise.race([
90351
+ (0, import_update_check.default)(
90352
+ { name: name3, version: version3 },
90353
+ {
90354
+ distTag: version3.startsWith("0.0.0") ? "beta" : "latest"
90355
+ }
90356
+ ),
90357
+ timersPromises.setTimeout(UPDATE_CHECK_TIMEOUT_MS, TIMED_OUT, {
90358
+ ref: false
90359
+ })
90360
+ ]);
90361
+ } catch {
90362
+ return { status: "failed" };
90363
+ }
90364
+ if (result === TIMED_OUT) {
90365
+ return { status: "failed" };
90366
+ }
90367
+ if (result === null) {
90368
+ return { status: "up-to-date" };
90369
+ }
90370
+ return { status: "update-available", latest: result.latest };
90371
+ }
90372
+ __name(fetchLatestNpmVersion, "fetchLatestNpmVersion");
88943
90373
 
88944
90374
  // ../cli/dist/check-macos-version.mjs
88945
90375
  var import_ci_info = __toESM(require_ci_info(), 1);
@@ -94862,12 +96292,12 @@ var YargsInstance = class {
94862
96292
  async getCompletion(args, done) {
94863
96293
  argsert("<array> [function]", [args, done], arguments.length);
94864
96294
  if (!done) {
94865
- return new Promise((resolve12, reject) => {
96295
+ return new Promise((resolve13, reject) => {
94866
96296
  __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(args, (err, completions) => {
94867
96297
  if (err)
94868
96298
  reject(err);
94869
96299
  else
94870
- resolve12(completions);
96300
+ resolve13(completions);
94871
96301
  });
94872
96302
  });
94873
96303
  } else {
@@ -95907,7 +97337,7 @@ var Yargs = YargsFactory(esm_default2);
95907
97337
  var yargs_default = Yargs;
95908
97338
 
95909
97339
  // package.json
95910
- var version = "2.68.4";
97340
+ var version = "2.70.0";
95911
97341
 
95912
97342
  // src/metrics.ts
95913
97343
  var import_node_async_hooks = require("node:async_hooks");
@@ -96146,16 +97576,16 @@ async function sendEvent(payload, enableLog) {
96146
97576
 
96147
97577
  // src/metrics.ts
96148
97578
  function promiseWithResolvers() {
96149
- let resolve12;
97579
+ let resolve13;
96150
97580
  let reject;
96151
97581
  const promise = new Promise((res, rej) => {
96152
- resolve12 = res;
97582
+ resolve13 = res;
96153
97583
  reject = rej;
96154
97584
  });
96155
- if (!resolve12 || !reject) {
97585
+ if (!resolve13 || !reject) {
96156
97586
  throw new Error("Promise resolvers not set");
96157
97587
  }
96158
- return { resolve: resolve12, reject, promise };
97588
+ return { resolve: resolve13, reject, promise };
96159
97589
  }
96160
97590
  function getPlatform() {
96161
97591
  const platform2 = process.platform;
@@ -96359,7 +97789,7 @@ var runTelemetryCommand = (action) => {
96359
97789
  var import_node_fs18 = require("node:fs");
96360
97790
  var import_promises6 = require("node:fs/promises");
96361
97791
  var import_node_os7 = require("node:os");
96362
- var import_node_path18 = require("node:path");
97792
+ var import_node_path19 = require("node:path");
96363
97793
  var import_deepmerge = __toESM(require_cjs());
96364
97794
  var import_degit = __toESM(require_dist());
96365
97795
 
@@ -96501,7 +97931,7 @@ async function getLatestPackageVersion(packageSpecifier) {
96501
97931
  // ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js
96502
97932
  var import_node_process13 = __toESM(require("node:process"), 1);
96503
97933
  var import_node_path9 = __toESM(require("node:path"), 1);
96504
- var import_node_url = require("node:url");
97934
+ var import_node_url2 = require("node:url");
96505
97935
  var import_node_child_process8 = __toESM(require("node:child_process"), 1);
96506
97936
  var import_promises4 = __toESM(require("node:fs/promises"), 1);
96507
97937
 
@@ -96832,7 +98262,7 @@ var is_in_ssh_default = isInSsh;
96832
98262
  // ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js
96833
98263
  var import_meta2 = {};
96834
98264
  var fallbackAttemptSymbol = /* @__PURE__ */ Symbol("fallbackAttempt");
96835
- var __dirname3 = import_meta2.url ? import_node_path9.default.dirname((0, import_node_url.fileURLToPath)(import_meta2.url)) : "";
98265
+ var __dirname3 = import_meta2.url ? import_node_path9.default.dirname((0, import_node_url2.fileURLToPath)(import_meta2.url)) : "";
96836
98266
  var localXdgOpenPath = import_node_path9.default.join(__dirname3, "xdg-open");
96837
98267
  var { platform, arch: arch2 } = import_node_process13.default;
96838
98268
  var tryEachApp = async (apps2, opener) => {
@@ -97004,19 +98434,19 @@ var baseOpen = async (options) => {
97004
98434
  }
97005
98435
  const subprocess = import_node_child_process8.default.spawn(command2, cliArguments, childProcessOptions);
97006
98436
  if (options.wait) {
97007
- return new Promise((resolve12, reject) => {
98437
+ return new Promise((resolve13, reject) => {
97008
98438
  subprocess.once("error", reject);
97009
98439
  subprocess.once("close", (exitCode) => {
97010
98440
  if (!options.allowNonzeroExitCode && exitCode !== 0) {
97011
98441
  reject(new Error(`Exited with code ${exitCode}`));
97012
98442
  return;
97013
98443
  }
97014
- resolve12(subprocess);
98444
+ resolve13(subprocess);
97015
98445
  });
97016
98446
  });
97017
98447
  }
97018
98448
  if (isFallbackAttempt) {
97019
- return new Promise((resolve12, reject) => {
98449
+ return new Promise((resolve13, reject) => {
97020
98450
  subprocess.once("error", reject);
97021
98451
  subprocess.once("spawn", () => {
97022
98452
  subprocess.once("close", (exitCode) => {
@@ -97026,17 +98456,17 @@ var baseOpen = async (options) => {
97026
98456
  return;
97027
98457
  }
97028
98458
  subprocess.unref();
97029
- resolve12(subprocess);
98459
+ resolve13(subprocess);
97030
98460
  });
97031
98461
  });
97032
98462
  });
97033
98463
  }
97034
98464
  subprocess.unref();
97035
- return new Promise((resolve12, reject) => {
98465
+ return new Promise((resolve13, reject) => {
97036
98466
  subprocess.once("error", reject);
97037
98467
  subprocess.once("spawn", () => {
97038
98468
  subprocess.off("error", reject);
97039
- resolve12(subprocess);
98469
+ resolve13(subprocess);
97040
98470
  });
97041
98471
  });
97042
98472
  };
@@ -98022,6 +99452,13 @@ var readFile = (path6) => {
98022
99452
  throw new Error(error2);
98023
99453
  }
98024
99454
  };
99455
+ var removeFile = (path6) => {
99456
+ try {
99457
+ import_node_fs11.default.rmSync(path6, { force: true });
99458
+ } catch (error2) {
99459
+ throw new Error(`Remove file failed: ${path6}`, { cause: error2 });
99460
+ }
99461
+ };
98025
99462
  var readJSON = (path6) => {
98026
99463
  const contents = readFile(path6);
98027
99464
  return contents ? (0, import_comment_json.parse)(contents) : contents;
@@ -98118,15 +99555,15 @@ __name2(getPropertyName, "getPropertyName");
98118
99555
  var package_default = {
98119
99556
  name: "frameworks_clis_info",
98120
99557
  dependencies: {
98121
- "@angular/create": "21.2.12",
98122
- "@tanstack/create-start": "0.59.32",
99558
+ "@angular/create": "21.2.13",
99559
+ "@tanstack/cli": "0.68.0",
98123
99560
  "create-analog": "2.5.2",
98124
99561
  "create-astro": "5.0.6",
98125
99562
  "create-docusaurus": "3.10.1",
98126
99563
  "create-hono": "0.19.4",
98127
99564
  "create-next-app": "16.2.6",
98128
99565
  "create-qwik": "1.20.0",
98129
- "create-react-router": "7.15.1",
99566
+ "create-react-router": "7.16.0",
98130
99567
  "create-rwsdk": "3.1.3",
98131
99568
  "create-solid": "0.7.0",
98132
99569
  "create-vike": "0.0.627",
@@ -99439,7 +100876,7 @@ var config26 = {
99439
100876
  };
99440
100877
  var c3_default29 = config26;
99441
100878
  function buildConfigure(params) {
99442
- return async function configure16(ctx) {
100879
+ return async function configure17(ctx) {
99443
100880
  const loginSuccess = await params.login(ctx);
99444
100881
  if (!loginSuccess) {
99445
100882
  throw new Error("Failed to login to Cloudflare");
@@ -99685,21 +101122,35 @@ var config30 = {
99685
101122
  var c3_default33 = config30;
99686
101123
 
99687
101124
  // templates/react-router/c3.ts
101125
+ var import_node_path17 = require("node:path");
99688
101126
  var { npm: npm12 } = detectPackageManager();
99689
101127
  var generate18 = async (ctx) => {
99690
101128
  await runFrameworkGenerator(ctx, [
99691
101129
  ctx.project.name,
99692
- ...ctx.args.experimental ? [] : [
99693
- "--template",
99694
- // React-router deleted the template here
99695
- "https://github.com/remix-run/react-router-templates/tree/29ac272b9532fe26463a2d2693fc73ff3c1e884b/cloudflare"
99696
- ],
99697
101130
  // to prevent asking about git twice, just let c3 do it
99698
101131
  "--no-git-init",
99699
101132
  "--no-install"
99700
101133
  ]);
99701
101134
  logRaw("");
99702
101135
  };
101136
+ var configure10 = async (ctx) => {
101137
+ await installPackages2(["@cloudflare/vite-plugin"], {
101138
+ dev: true,
101139
+ startText: "Installing the Cloudflare Vite plugin",
101140
+ doneText: `${brandColor("installed")} ${dim("@cloudflare/vite-plugin")}`
101141
+ });
101142
+ const s = spinner();
101143
+ s.start("Removing non-Cloudflare artifacts from template");
101144
+ removeFile((0, import_node_path17.resolve)(ctx.project.path, "Dockerfile"));
101145
+ removeFile((0, import_node_path17.resolve)(ctx.project.path, ".dockerignore"));
101146
+ const pkgJsonPath = (0, import_node_path17.resolve)(ctx.project.path, "package.json");
101147
+ const pkgJson = readJSON(pkgJsonPath);
101148
+ delete pkgJson.dependencies?.["@react-router/node"];
101149
+ delete pkgJson.dependencies?.["@react-router/serve"];
101150
+ delete pkgJson.scripts?.start;
101151
+ writeJSON(pkgJsonPath, pkgJson);
101152
+ s.stop(`${brandColor("removed")} ${dim("Node-server template artifacts")}`);
101153
+ };
99703
101154
  var config31 = {
99704
101155
  configVersion: 1,
99705
101156
  id: "react-router",
@@ -99710,6 +101161,7 @@ var config31 = {
99710
101161
  path: "./ts"
99711
101162
  },
99712
101163
  generate: generate18,
101164
+ configure: configure10,
99713
101165
  transformPackageJson: async () => ({
99714
101166
  dependencies: {
99715
101167
  "react-router": "^7.10.0"
@@ -99720,7 +101172,9 @@ var config31 = {
99720
101172
  scripts: {
99721
101173
  deploy: `${npm12} run build && wrangler deploy`,
99722
101174
  preview: `${npm12} run build && vite preview`,
99723
- "cf-typegen": `wrangler types`
101175
+ "cf-typegen": `wrangler types`,
101176
+ typecheck: `wrangler types && react-router typegen && tsc -b`,
101177
+ postinstall: `wrangler types`
99724
101178
  }
99725
101179
  }),
99726
101180
  devScript: "dev",
@@ -99818,7 +101272,7 @@ var generate20 = async (ctx) => {
99818
101272
  ]);
99819
101273
  logRaw("");
99820
101274
  };
99821
- var configure10 = async (ctx) => {
101275
+ var configure11 = async (ctx) => {
99822
101276
  await installPackages2(["@cloudflare/vite-plugin"], {
99823
101277
  dev: true,
99824
101278
  startText: "Installing the Cloudflare Vite plugin",
@@ -99937,7 +101391,7 @@ var config33 = {
99937
101391
  }
99938
101392
  },
99939
101393
  generate: generate20,
99940
- configure: configure10,
101394
+ configure: configure11,
99941
101395
  transformPackageJson: async (_2, ctx) => ({
99942
101396
  scripts: {
99943
101397
  deploy: `${npm14} run build && wrangler deploy`,
@@ -100011,7 +101465,7 @@ var generate22 = async (ctx) => {
100011
101465
  await runFrameworkGenerator(ctx, ["-p", ctx.project.name, "-s"]);
100012
101466
  logRaw("");
100013
101467
  };
100014
- var configure11 = async (ctx) => {
101468
+ var configure12 = async (ctx) => {
100015
101469
  usesTypescript(ctx);
100016
101470
  const filePath = `vite.config.${usesTypescript(ctx) ? "ts" : "js"}`;
100017
101471
  updateStatus(`Updating configuration in ${blue(filePath)}`);
@@ -100049,7 +101503,7 @@ var config37 = {
100049
101503
  },
100050
101504
  path: "templates/solid",
100051
101505
  generate: generate22,
100052
- configure: configure11,
101506
+ configure: configure12,
100053
101507
  transformPackageJson: async () => ({
100054
101508
  scripts: {
100055
101509
  preview: `${npm16} run build && npx wrangler dev`,
@@ -100071,7 +101525,7 @@ var generate23 = async (ctx) => {
100071
101525
  await runFrameworkGenerator(ctx, ["create", ctx.project.name]);
100072
101526
  logRaw("");
100073
101527
  };
100074
- var configure12 = async (ctx) => {
101528
+ var configure13 = async (ctx) => {
100075
101529
  const pkg = `@sveltejs/adapter-cloudflare`;
100076
101530
  await installPackages2([pkg], {
100077
101531
  dev: true,
@@ -100166,7 +101620,7 @@ var config38 = {
100166
101620
  },
100167
101621
  path: "templates/svelte/pages",
100168
101622
  generate: generate23,
100169
- configure: configure12,
101623
+ configure: configure13,
100170
101624
  transformPackageJson: async (original, ctx) => {
100171
101625
  let scripts = {
100172
101626
  preview: `${npm17} run build && wrangler pages dev`,
@@ -100194,7 +101648,7 @@ var generate24 = async (ctx) => {
100194
101648
  await runFrameworkGenerator(ctx, ["create", ctx.project.name]);
100195
101649
  logRaw("");
100196
101650
  };
100197
- var configure13 = async (ctx) => {
101651
+ var configure14 = async (ctx) => {
100198
101652
  const pkg = `@sveltejs/adapter-cloudflare`;
100199
101653
  await installPackages2([pkg], {
100200
101654
  dev: true,
@@ -100265,7 +101719,7 @@ var config39 = {
100265
101719
  },
100266
101720
  path: "templates/svelte/workers",
100267
101721
  generate: generate24,
100268
- configure: configure13,
101722
+ configure: configure14,
100269
101723
  transformPackageJson: async (original, ctx) => {
100270
101724
  let scripts = {
100271
101725
  preview: `${npm18} run build && wrangler dev`,
@@ -100297,6 +101751,8 @@ var c3_default43 = config40;
100297
101751
  var { npm: npm19 } = detectPackageManager();
100298
101752
  var generate25 = async (ctx) => {
100299
101753
  await runFrameworkGenerator(ctx, [
101754
+ // @tanstack/cli uses `create` as a subcommand
101755
+ "create",
100300
101756
  ctx.project.name,
100301
101757
  "--deployment",
100302
101758
  "cloudflare",
@@ -100311,7 +101767,7 @@ var config41 = {
100311
101767
  configVersion: 1,
100312
101768
  id: "tanstack-start",
100313
101769
  platform: "workers",
100314
- frameworkCli: "@tanstack/create-start",
101770
+ frameworkCli: "@tanstack/cli",
100315
101771
  displayName: "TanStack Start",
100316
101772
  generate: generate25,
100317
101773
  transformPackageJson: async () => ({
@@ -100427,7 +101883,7 @@ var generate29 = async (ctx) => {
100427
101883
  ]);
100428
101884
  logRaw("");
100429
101885
  };
100430
- var configure14 = async (ctx) => {
101886
+ var configure15 = async (ctx) => {
100431
101887
  await installPackages2(["@cloudflare/vite-plugin"], {
100432
101888
  dev: true,
100433
101889
  startText: "Installing the Cloudflare Vite plugin",
@@ -100468,7 +101924,7 @@ var config45 = {
100468
101924
  }
100469
101925
  }
100470
101926
  },
100471
- configure: configure14,
101927
+ configure: configure15,
100472
101928
  generate: generate29,
100473
101929
  transformPackageJson: async (_2, ctx) => ({
100474
101930
  scripts: {
@@ -100593,7 +102049,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
100593
102049
  var import_node_assert6 = __toESM(require("node:assert"));
100594
102050
 
100595
102051
  // ../wrangler/package.json
100596
- var version2 = "4.95.0";
102052
+ var version2 = "4.97.0";
100597
102053
 
100598
102054
  // src/git.ts
100599
102055
  var offerGit = async (ctx) => {
@@ -100782,7 +102238,7 @@ async function getProductionBranch(cwd) {
100782
102238
 
100783
102239
  // src/validators.ts
100784
102240
  var import_node_fs17 = require("node:fs");
100785
- var import_node_path17 = require("node:path");
102241
+ var import_node_path18 = require("node:path");
100786
102242
  var TEMPLATE_REGEX = /^(?:(?:https:\/\/)?(?<httpsUrl>[^:/]+\.[^:/]+)\/|git@(?<gitUrl>[^:/]+)[:/]|(?<shorthandUrl>[^/]+):)?(?<user>[^/\s]+)\/(?<repository>[^/\s#]+)(?:(?<subdirectoryPath>(?:\/[^/\s#]+)+))?(?:\/)?(?:#(?<tag>.+))?/;
100787
102243
  var validateTemplateUrl = (value) => {
100788
102244
  if (!String(value).match(TEMPLATE_REGEX)) {
@@ -100790,7 +102246,7 @@ var validateTemplateUrl = (value) => {
100790
102246
  }
100791
102247
  };
100792
102248
  var validateProjectDirectory = (relativePath, args) => {
100793
- const path6 = (0, import_node_path17.resolve)(relativePath);
102249
+ const path6 = (0, import_node_path18.resolve)(relativePath);
100794
102250
  const existsAlready = (0, import_node_fs17.existsSync)(path6);
100795
102251
  if (existsAlready) {
100796
102252
  for (const file2 of (0, import_node_fs17.readdirSync)(path6)) {
@@ -100800,7 +102256,7 @@ var validateProjectDirectory = (relativePath, args) => {
100800
102256
  }
100801
102257
  }
100802
102258
  if (!args.existingScript) {
100803
- const projectName = (0, import_node_path17.basename)(path6);
102259
+ const projectName = (0, import_node_path18.basename)(path6);
100804
102260
  const invalidChars = /[^a-z0-9-]/;
100805
102261
  const invalidStartEnd = /^-|-$/;
100806
102262
  if (projectName.match(invalidStartEnd)) {
@@ -101083,7 +102539,7 @@ var createContext = async (args, prevArgs) => {
101083
102539
  format: (val) => `./${val}`
101084
102540
  });
101085
102541
  const categoryOptions = [];
101086
- if (Object.keys(helloWorldTemplateMap).length) {
102542
+ if (args.platform !== "pages" && Object.keys(helloWorldTemplateMap).length) {
101087
102543
  categoryOptions.push({
101088
102544
  label: "Hello World example",
101089
102545
  value: "hello-world",
@@ -101097,7 +102553,7 @@ var createContext = async (args, prevArgs) => {
101097
102553
  description: "Select from the most popular full-stack web frameworks"
101098
102554
  });
101099
102555
  }
101100
- if (Object.keys(otherTemplateMap).length) {
102556
+ if (args.platform !== "pages" && Object.keys(otherTemplateMap).length) {
101101
102557
  categoryOptions.push({
101102
102558
  label: "Application Starter",
101103
102559
  value: "demo",
@@ -101105,6 +102561,9 @@ var createContext = async (args, prevArgs) => {
101105
102561
  });
101106
102562
  }
101107
102563
  categoryOptions.push(
102564
+ // TODO: hide "Template from a GitHub repo" when a --platform arg is
102565
+ // provided (whether workers or pages), since remote templates have no
102566
+ // platform validation and would ignore the user's platform choice
101108
102567
  {
101109
102568
  label: "Template from a GitHub repo",
101110
102569
  value: "remote-template",
@@ -101125,11 +102584,22 @@ var createContext = async (args, prevArgs) => {
101125
102584
  if (category === BACK_VALUE) {
101126
102585
  return goBack("category");
101127
102586
  }
102587
+ if (args.platform === "pages" && category !== "web-framework" && category !== "remote-template") {
102588
+ throw new Error(
102589
+ `The "${category}" category is not available for the "pages" platform`
102590
+ );
102591
+ }
101128
102592
  let template;
101129
102593
  if (category === "web-framework") {
101130
102594
  const frameworkOptions = Object.entries(frameworkMap).reduce(
101131
102595
  (acc, [key, config49]) => {
101132
102596
  if (!config49.hidden || args.framework) {
102597
+ if (args.platform && !args.framework) {
102598
+ const supportsTargetPlatform = "platformVariants" in config49 ? args.platform in config49.platformVariants : config49.platform === args.platform;
102599
+ if (!supportsTargetPlatform) {
102600
+ return acc;
102601
+ }
102602
+ }
101133
102603
  acc.push({
101134
102604
  label: config49.displayName,
101135
102605
  value: key
@@ -101240,7 +102710,7 @@ var createContext = async (args, prevArgs) => {
101240
102710
  envInterfaceName: "Env",
101241
102711
  ...template
101242
102712
  };
101243
- const path6 = (0, import_node_path18.resolve)(projectName);
102713
+ const path6 = (0, import_node_path19.resolve)(projectName);
101244
102714
  const languageVariants = template.copyFiles && !isVariantInfo(template.copyFiles) && !template.copyFiles.selectVariant ? Object.keys(template.copyFiles.variants) : [];
101245
102715
  if (languageVariants.length > 0) {
101246
102716
  if (hasTsConfig(path6)) {
@@ -101266,8 +102736,8 @@ var createContext = async (args, prevArgs) => {
101266
102736
  }
101267
102737
  }
101268
102738
  }
101269
- const name3 = (0, import_node_path18.basename)(path6);
101270
- const directory = (0, import_node_path18.dirname)(path6);
102739
+ const name3 = (0, import_node_path19.basename)(path6);
102740
+ const directory = (0, import_node_path19.dirname)(path6);
101271
102741
  const originalCWD = process.cwd();
101272
102742
  return {
101273
102743
  project: { name: name3, path: path6 },
@@ -101287,7 +102757,7 @@ async function copyTemplateFiles(ctx) {
101287
102757
  const { copyFiles } = ctx.template;
101288
102758
  let srcdir;
101289
102759
  if (isVariantInfo(copyFiles)) {
101290
- srcdir = (0, import_node_path18.join)(getTemplatePath(ctx), copyFiles.path);
102760
+ srcdir = (0, import_node_path19.join)(getTemplatePath(ctx), copyFiles.path);
101291
102761
  } else {
101292
102762
  const selectVariant = copyFiles.selectVariant ?? defaultSelectVariant;
101293
102763
  const variant = await selectVariant(ctx);
@@ -101297,21 +102767,21 @@ async function copyTemplateFiles(ctx) {
101297
102767
  `Unknown variant provided: ${JSON.stringify(variant ?? "")}`
101298
102768
  );
101299
102769
  }
101300
- srcdir = (0, import_node_path18.join)(getTemplatePath(ctx), variantInfo.path);
102770
+ srcdir = (0, import_node_path19.join)(getTemplatePath(ctx), variantInfo.path);
101301
102771
  }
101302
102772
  const copyDestDir = getCopyFilesDestinationDir(ctx);
101303
- const destdir = (0, import_node_path18.join)(ctx.project.path, ...copyDestDir ? [copyDestDir] : []);
102773
+ const destdir = (0, import_node_path19.join)(ctx.project.path, ...copyDestDir ? [copyDestDir] : []);
101304
102774
  const s = spinner();
101305
102775
  s.start(`Copying template files`);
101306
102776
  await (0, import_promises6.cp)(srcdir, destdir, { recursive: true, force: true });
101307
- const dummyGitIgnorePath = (0, import_node_path18.join)(destdir, "__dot__gitignore");
102777
+ const dummyGitIgnorePath = (0, import_node_path19.join)(destdir, "__dot__gitignore");
101308
102778
  if ((0, import_node_fs18.existsSync)(dummyGitIgnorePath)) {
101309
- await (0, import_promises6.rename)(dummyGitIgnorePath, (0, import_node_path18.join)(destdir, ".gitignore"));
102779
+ await (0, import_promises6.rename)(dummyGitIgnorePath, (0, import_node_path19.join)(destdir, ".gitignore"));
101310
102780
  }
101311
102781
  s.stop(`${brandColor("files")} ${dim("copied to project directory")}`);
101312
102782
  }
101313
102783
  function writeAgentsMd(projectPath) {
101314
- const agentsMdPath = (0, import_node_path18.join)(projectPath, "AGENTS.md");
102784
+ const agentsMdPath = (0, import_node_path19.join)(projectPath, "AGENTS.md");
101315
102785
  if ((0, import_node_fs18.existsSync)(agentsMdPath)) {
101316
102786
  return;
101317
102787
  }
@@ -101341,25 +102811,25 @@ var validateTemplate = (path6, config49) => {
101341
102811
  return;
101342
102812
  }
101343
102813
  if (isVariantInfo(config49.copyFiles)) {
101344
- validateTemplateSrcDirectory((0, import_node_path18.resolve)(path6, config49.copyFiles.path), config49);
102814
+ validateTemplateSrcDirectory((0, import_node_path19.resolve)(path6, config49.copyFiles.path), config49);
101345
102815
  } else {
101346
102816
  for (const variant of Object.values(config49.copyFiles.variants)) {
101347
- validateTemplateSrcDirectory((0, import_node_path18.resolve)(path6, variant.path), config49);
102817
+ validateTemplateSrcDirectory((0, import_node_path19.resolve)(path6, variant.path), config49);
101348
102818
  }
101349
102819
  }
101350
102820
  };
101351
102821
  var validateTemplateSrcDirectory = (path6, config49) => {
101352
102822
  if (config49.platform === "workers") {
101353
- const wranglerTomlPath = (0, import_node_path18.resolve)(path6, "wrangler.toml");
101354
- const wranglerJsonPath = (0, import_node_path18.resolve)(path6, "wrangler.json");
101355
- const wranglerJsoncPath = (0, import_node_path18.resolve)(path6, "wrangler.jsonc");
102823
+ const wranglerTomlPath = (0, import_node_path19.resolve)(path6, "wrangler.toml");
102824
+ const wranglerJsonPath = (0, import_node_path19.resolve)(path6, "wrangler.json");
102825
+ const wranglerJsoncPath = (0, import_node_path19.resolve)(path6, "wrangler.jsonc");
101356
102826
  if (!(0, import_node_fs18.existsSync)(wranglerTomlPath) && !(0, import_node_fs18.existsSync)(wranglerJsonPath) && !(0, import_node_fs18.existsSync)(wranglerJsoncPath)) {
101357
102827
  throw new Error(
101358
102828
  `create-cloudflare templates must contain a "wrangler.toml" or "wrangler.json(c)" file.`
101359
102829
  );
101360
102830
  }
101361
102831
  }
101362
- const pkgJsonPath = (0, import_node_path18.resolve)(path6, "package.json");
102832
+ const pkgJsonPath = (0, import_node_path19.resolve)(path6, "package.json");
101363
102833
  if (!(0, import_node_fs18.existsSync)(pkgJsonPath)) {
101364
102834
  throw new Error(
101365
102835
  `create-cloudflare templates must contain a "package.json" file.`
@@ -101377,10 +102847,10 @@ var inferTemplateConfig = (path6) => {
101377
102847
  };
101378
102848
  var inferCopyFilesDefinition = (path6) => {
101379
102849
  const variants = {};
101380
- if ((0, import_node_fs18.existsSync)((0, import_node_path18.join)(path6, "js"))) {
102850
+ if ((0, import_node_fs18.existsSync)((0, import_node_path19.join)(path6, "js"))) {
101381
102851
  variants["js"] = { path: "./js" };
101382
102852
  }
101383
- if ((0, import_node_fs18.existsSync)((0, import_node_path18.join)(path6, "ts"))) {
102853
+ if ((0, import_node_fs18.existsSync)((0, import_node_path19.join)(path6, "ts"))) {
101384
102854
  variants["ts"] = { path: "./ts" };
101385
102855
  }
101386
102856
  const copyFiles = Object.keys(variants).length !== 0 ? { variants } : { path: "." };
@@ -101415,7 +102885,7 @@ Use the format "github:<owner>/<repo>/sub/directory[#<branch>]" to clone a speci
101415
102885
  force: true,
101416
102886
  mode: options.mode
101417
102887
  });
101418
- const tmpDir = options.intoFolder ?? await (0, import_promises6.mkdtemp)((0, import_node_path18.join)((0, import_node_os7.tmpdir)(), "c3-template"));
102888
+ const tmpDir = options.intoFolder ?? await (0, import_promises6.mkdtemp)((0, import_node_path19.join)((0, import_node_os7.tmpdir)(), "c3-template"));
101419
102889
  await emitter.clone(tmpDir);
101420
102890
  return tmpDir;
101421
102891
  } catch {
@@ -101424,7 +102894,7 @@ Use the format "github:<owner>/<repo>/sub/directory[#<branch>]" to clone a speci
101424
102894
  }
101425
102895
  }
101426
102896
  function updatePythonPackageName(path6, projectName) {
101427
- const pyProjectFile = (0, import_node_path18.resolve)(path6, "pyproject.toml");
102897
+ const pyProjectFile = (0, import_node_path19.resolve)(path6, "pyproject.toml");
101428
102898
  if (!(0, import_node_fs18.existsSync)(pyProjectFile)) {
101429
102899
  return;
101430
102900
  }
@@ -101437,7 +102907,7 @@ function updatePythonPackageName(path6, projectName) {
101437
102907
  }
101438
102908
  var updatePackageName = (ctx) => {
101439
102909
  const placeholderNames = ["<PACKAGE_NAME>", "<TBD>", "TBD", ""];
101440
- const pkgJsonPath = (0, import_node_path18.resolve)(ctx.project.path, "package.json");
102910
+ const pkgJsonPath = (0, import_node_path19.resolve)(ctx.project.path, "package.json");
101441
102911
  const pkgJson = readJSON(pkgJsonPath);
101442
102912
  if (!placeholderNames.includes(pkgJson.name)) {
101443
102913
  return;
@@ -101455,7 +102925,7 @@ var updatePackageScripts = async (ctx) => {
101455
102925
  }
101456
102926
  const s = spinner();
101457
102927
  s.start("Updating `package.json` scripts");
101458
- const pkgJsonPath = (0, import_node_path18.resolve)(ctx.project.path, "package.json");
102928
+ const pkgJsonPath = (0, import_node_path19.resolve)(ctx.project.path, "package.json");
101459
102929
  let pkgJson = readJSON(pkgJsonPath);
101460
102930
  const transformed = await ctx.template.transformPackageJson(pkgJson, ctx);
101461
102931
  pkgJson = (0, import_deepmerge.default)(pkgJson, transformed);
@@ -101464,9 +102934,9 @@ var updatePackageScripts = async (ctx) => {
101464
102934
  };
101465
102935
  var getTemplatePath = (ctx) => {
101466
102936
  if (ctx.template.path) {
101467
- return (0, import_node_path18.resolve)(__dirname, "..", ctx.template.path);
102937
+ return (0, import_node_path19.resolve)(__dirname, "..", ctx.template.path);
101468
102938
  }
101469
- return (0, import_node_path18.resolve)(__dirname, "..", "templates", ctx.template.id);
102939
+ return (0, import_node_path19.resolve)(__dirname, "..", "templates", ctx.template.id);
101470
102940
  };
101471
102941
  var isVariantInfo = (copyFiles) => {
101472
102942
  return "path" in copyFiles;
@@ -101510,8 +102980,17 @@ var cliDefinition = {
101510
102980
  description: `Specifies the kind of templates that should be created`,
101511
102981
  values(args) {
101512
102982
  const experimental2 = Boolean(args?.["experimental"]);
102983
+ const platform2 = args?.["platform"];
101513
102984
  if (experimental2) {
101514
102985
  return [{ name: "web-framework", description: "Framework Starter" }];
102986
+ } else if (platform2 === "pages") {
102987
+ return [
102988
+ { name: "web-framework", description: "Framework Starter" },
102989
+ {
102990
+ name: "remote-template",
102991
+ description: "Template from a GitHub repo"
102992
+ }
102993
+ ];
101515
102994
  } else {
101516
102995
  return [
101517
102996
  { name: "hello-world", description: "Hello World Starter" },
@@ -101834,7 +103313,7 @@ var processArgument = async (args, key, promptConfig) => {
101834
103313
  // src/deploy.ts
101835
103314
  var import_promises8 = require("node:fs/promises");
101836
103315
  var import_node_os8 = require("node:os");
101837
- var import_node_path20 = require("node:path");
103316
+ var import_node_path21 = require("node:path");
101838
103317
 
101839
103318
  // src/helpers/poll.ts
101840
103319
  var import_promises7 = require("node:timers/promises");
@@ -101927,7 +103406,7 @@ function secondsSince(start) {
101927
103406
 
101928
103407
  // src/wrangler/config.ts
101929
103408
  var import_node_fs19 = require("node:fs");
101930
- var import_node_path19 = require("node:path");
103409
+ var import_node_path20 = require("node:path");
101931
103410
 
101932
103411
  // src/helpers/json.ts
101933
103412
  var import_comment_json2 = __toESM(require_src3());
@@ -102039,13 +103518,13 @@ ${generateHintsAsTomlComments(wranglerToml)}
102039
103518
  }
102040
103519
  };
102041
103520
  var getWranglerTomlPath = (ctx) => {
102042
- return (0, import_node_path19.resolve)(ctx.project.path, "wrangler.toml");
103521
+ return (0, import_node_path20.resolve)(ctx.project.path, "wrangler.toml");
102043
103522
  };
102044
103523
  var getWranglerJsonPath = (ctx) => {
102045
- return (0, import_node_path19.resolve)(ctx.project.path, "wrangler.json");
103524
+ return (0, import_node_path20.resolve)(ctx.project.path, "wrangler.json");
102046
103525
  };
102047
103526
  var getWranglerJsoncPath = (ctx) => {
102048
- return (0, import_node_path19.resolve)(ctx.project.path, "wrangler.jsonc");
103527
+ return (0, import_node_path20.resolve)(ctx.project.path, "wrangler.jsonc");
102049
103528
  };
102050
103529
  var wranglerTomlExists = (ctx) => {
102051
103530
  const wranglerTomlPath = getWranglerTomlPath(ctx);
@@ -102251,8 +103730,8 @@ var runDeploy = async (ctx) => {
102251
103730
  JSON.stringify(ctx.commitMessage)
102252
103731
  ] : []
102253
103732
  ];
102254
- const outputFile = (0, import_node_path20.join)(
102255
- await (0, import_promises8.mkdtemp)((0, import_node_path20.join)((0, import_node_os8.tmpdir)(), "c3-wrangler-deploy-")),
103733
+ const outputFile = (0, import_node_path21.join)(
103734
+ await (0, import_promises8.mkdtemp)((0, import_node_path21.join)((0, import_node_os8.tmpdir)(), "c3-wrangler-deploy-")),
102256
103735
  "output.json"
102257
103736
  );
102258
103737
  await runCommand(deployCmd, {
@@ -102314,7 +103793,7 @@ var hasBinding = (node) => {
102314
103793
  };
102315
103794
 
102316
103795
  // src/dialog.ts
102317
- var import_node_path21 = require("node:path");
103796
+ var import_node_path22 = require("node:path");
102318
103797
  function createDialog(lines) {
102319
103798
  const screenWidth = process.stdout.columns;
102320
103799
  const maxLineWidth = Math.max(
@@ -102354,7 +103833,7 @@ function printWelcomeMessage(version3, telemetryEnabled, args) {
102354
103833
  }
102355
103834
  var printSummary = (ctx) => {
102356
103835
  const dashboardUrl = ctx.account ? `https://dash.cloudflare.com/?to=/:account/workers/services/view/${ctx.project.name}/production` : null;
102357
- const relativePath = (0, import_node_path21.relative)(ctx.originalCWD, ctx.project.path);
103836
+ const relativePath = (0, import_node_path22.relative)(ctx.originalCWD, ctx.project.path);
102358
103837
  const cdCommand = relativePath ? `cd ${relativePath}` : null;
102359
103838
  const { npm: npm25 } = detectPackageManager();
102360
103839
  const deployCommand = quoteShellArgs([
@@ -102826,7 +104305,7 @@ var createProject = async (ctx) => {
102826
104305
 
102827
104306
  // src/workers.ts
102828
104307
  var import_node_fs20 = require("node:fs");
102829
- var import_node_path22 = require("node:path");
104308
+ var import_node_path23 = require("node:path");
102830
104309
 
102831
104310
  // ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/scanner.js
102832
104311
  function createScanner2(text, ignoreTrivia = false) {
@@ -104156,7 +105635,7 @@ async function addTypes(ctx) {
104156
105635
  await updateTsConfig(ctx, { usesNodeCompat });
104157
105636
  }
104158
105637
  async function generateWorkersTypes(ctx, npm25) {
104159
- const packageJsonPath = (0, import_node_path22.join)(ctx.project.path, "package.json");
105638
+ const packageJsonPath = (0, import_node_path23.join)(ctx.project.path, "package.json");
104160
105639
  if (!(0, import_node_fs20.existsSync)(packageJsonPath)) {
104161
105640
  return;
104162
105641
  }
@@ -104196,7 +105675,7 @@ var maybeInstallNodeTypes = async (ctx, npm25) => {
104196
105675
  return false;
104197
105676
  };
104198
105677
  async function updateTsConfig(ctx, { usesNodeCompat }) {
104199
- const tsconfigPath = (0, import_node_path22.join)(ctx.project.path, "tsconfig.json");
105678
+ const tsconfigPath = (0, import_node_path23.join)(ctx.project.path, "tsconfig.json");
104200
105679
  if (!(0, import_node_fs20.existsSync)(tsconfigPath)) {
104201
105680
  return;
104202
105681
  }
@@ -104316,7 +105795,7 @@ var runCli = async (args) => {
104316
105795
  checkMacOSVersion({ shouldThrow: true });
104317
105796
  const ctx = await createContext(args);
104318
105797
  await create(ctx);
104319
- await configure15(ctx);
105798
+ await configure16(ctx);
104320
105799
  await deploy(ctx);
104321
105800
  printSummary(ctx);
104322
105801
  logRaw("");
@@ -104327,7 +105806,7 @@ var setupProjectDirectory = (ctx) => {
104327
105806
  if (err) {
104328
105807
  throw new Error(err);
104329
105808
  }
104330
- const directory = (0, import_node_path23.dirname)(path6);
105809
+ const directory = (0, import_node_path24.dirname)(path6);
104331
105810
  (0, import_node_fs21.mkdirSync)(directory, { recursive: true });
104332
105811
  (0, import_node_process14.chdir)(directory);
104333
105812
  };
@@ -104349,7 +105828,7 @@ var create = async (ctx) => {
104349
105828
  }
104350
105829
  endSection(`Application created`);
104351
105830
  };
104352
- var configure15 = async (ctx) => {
105831
+ var configure16 = async (ctx) => {
104353
105832
  startSection(
104354
105833
  `Configuring your application for Cloudflare${ctx.args.experimental ? ` via \`wrangler setup\`` : ""}`,
104355
105834
  "Step 2 of 3"
@@ -104685,6 +106164,39 @@ smol-toml/dist/index.js:
104685
106164
  */
104686
106165
  /*! Bundled license information:
104687
106166
 
106167
+ deep-extend/lib/deep-extend.js:
106168
+ (*!
106169
+ * @description Recursive object extending
106170
+ * @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
106171
+ * @license MIT
106172
+ *
106173
+ * The MIT License (MIT)
106174
+ *
106175
+ * Copyright (c) 2013-2018 Viacheslav Lotsmanov
106176
+ *
106177
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
106178
+ * this software and associated documentation files (the "Software"), to deal in
106179
+ * the Software without restriction, including without limitation the rights to
106180
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
106181
+ * the Software, and to permit persons to whom the Software is furnished to do so,
106182
+ * subject to the following conditions:
106183
+ *
106184
+ * The above copyright notice and this permission notice shall be included in all
106185
+ * copies or substantial portions of the Software.
106186
+ *
106187
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
106188
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
106189
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
106190
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
106191
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
106192
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
106193
+ *)
106194
+
106195
+ safe-buffer/index.js:
106196
+ (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
106197
+ */
106198
+ /*! Bundled license information:
106199
+
104688
106200
  undici/lib/web/fetch/body.js:
104689
106201
  (*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
104690
106202