create-cloudflare 2.70.4 → 2.70.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +829 -758
  2. package/package.json +5 -5
package/dist/cli.js CHANGED
@@ -2740,9 +2740,9 @@ var require_dispatcher_base = __commonJS({
2740
2740
  }
2741
2741
  close(callback) {
2742
2742
  if (callback === void 0) {
2743
- return new Promise((resolve13, reject) => {
2743
+ return new Promise((resolve14, reject) => {
2744
2744
  this.close((err, data) => {
2745
- return err ? reject(err) : resolve13(data);
2745
+ return err ? reject(err) : resolve14(data);
2746
2746
  });
2747
2747
  });
2748
2748
  }
@@ -2780,9 +2780,9 @@ var require_dispatcher_base = __commonJS({
2780
2780
  err = null;
2781
2781
  }
2782
2782
  if (callback === void 0) {
2783
- return new Promise((resolve13, reject) => {
2783
+ return new Promise((resolve14, reject) => {
2784
2784
  this.destroy(err, (err2, data) => {
2785
- return err2 ? reject(err2) : resolve13(data);
2785
+ return err2 ? reject(err2) : resolve14(data);
2786
2786
  });
2787
2787
  });
2788
2788
  }
@@ -6279,8 +6279,8 @@ var require_promise = __commonJS({
6279
6279
  function createDeferredPromise() {
6280
6280
  let res;
6281
6281
  let rej;
6282
- const promise = new Promise((resolve13, reject) => {
6283
- res = resolve13;
6282
+ const promise = new Promise((resolve14, reject) => {
6283
+ res = resolve14;
6284
6284
  rej = reject;
6285
6285
  });
6286
6286
  return { promise, resolve: res, reject: rej };
@@ -7675,12 +7675,12 @@ upgrade: ${upgrade}\r
7675
7675
  cb();
7676
7676
  }
7677
7677
  }
7678
- const waitForDrain = () => new Promise((resolve13, reject) => {
7678
+ const waitForDrain = () => new Promise((resolve14, reject) => {
7679
7679
  assert7(callback === null);
7680
7680
  if (socket[kError]) {
7681
7681
  reject(socket[kError]);
7682
7682
  } else {
7683
- callback = resolve13;
7683
+ callback = resolve14;
7684
7684
  }
7685
7685
  });
7686
7686
  socket.on("close", onDrain).on("drain", onDrain);
@@ -8525,12 +8525,12 @@ var require_client_h2 = __commonJS({
8525
8525
  cb();
8526
8526
  }
8527
8527
  }
8528
- const waitForDrain = () => new Promise((resolve13, reject) => {
8528
+ const waitForDrain = () => new Promise((resolve14, reject) => {
8529
8529
  assert7(callback === null);
8530
8530
  if (socket[kError]) {
8531
8531
  reject(socket[kError]);
8532
8532
  } else {
8533
- callback = resolve13;
8533
+ callback = resolve14;
8534
8534
  }
8535
8535
  });
8536
8536
  h2stream.on("close", onDrain).on("drain", onDrain);
@@ -8846,16 +8846,16 @@ var require_client = __commonJS({
8846
8846
  return this[kNeedDrain] < 2;
8847
8847
  }
8848
8848
  [kClose]() {
8849
- return new Promise((resolve13) => {
8849
+ return new Promise((resolve14) => {
8850
8850
  if (this[kSize]) {
8851
- this[kClosedResolve] = resolve13;
8851
+ this[kClosedResolve] = resolve14;
8852
8852
  } else {
8853
- resolve13(null);
8853
+ resolve14(null);
8854
8854
  }
8855
8855
  });
8856
8856
  }
8857
8857
  [kDestroy](err) {
8858
- return new Promise((resolve13) => {
8858
+ return new Promise((resolve14) => {
8859
8859
  const requests = this[kQueue].splice(this[kPendingIdx]);
8860
8860
  for (let i = 0; i < requests.length; i++) {
8861
8861
  const request2 = requests[i];
@@ -8866,7 +8866,7 @@ var require_client = __commonJS({
8866
8866
  this[kClosedResolve]();
8867
8867
  this[kClosedResolve] = null;
8868
8868
  }
8869
- resolve13(null);
8869
+ resolve14(null);
8870
8870
  };
8871
8871
  if (this[kHTTPContext]) {
8872
8872
  this[kHTTPContext].destroy(err, callback);
@@ -9271,8 +9271,8 @@ var require_pool_base = __commonJS({
9271
9271
  }
9272
9272
  return Promise.all(closeAll);
9273
9273
  } else {
9274
- return new Promise((resolve13) => {
9275
- this[kClosedResolve] = resolve13;
9274
+ return new Promise((resolve14) => {
9275
+ this[kClosedResolve] = resolve14;
9276
9276
  });
9277
9277
  }
9278
9278
  }
@@ -10389,7 +10389,7 @@ var require_socks5_proxy_agent = __commonJS({
10389
10389
  const proxyHost = this[kProxyUrl].hostname;
10390
10390
  const proxyPort = parseInt(this[kProxyUrl].port) || 1080;
10391
10391
  debug("creating SOCKS5 connection to", proxyHost, proxyPort);
10392
- const socket = await new Promise((resolve13, reject) => {
10392
+ const socket = await new Promise((resolve14, reject) => {
10393
10393
  this[kConnector]({
10394
10394
  hostname: proxyHost,
10395
10395
  host: proxyHost,
@@ -10399,7 +10399,7 @@ var require_socks5_proxy_agent = __commonJS({
10399
10399
  if (err) {
10400
10400
  reject(err);
10401
10401
  } else {
10402
- resolve13(socket2);
10402
+ resolve14(socket2);
10403
10403
  }
10404
10404
  });
10405
10405
  });
@@ -10409,14 +10409,14 @@ var require_socks5_proxy_agent = __commonJS({
10409
10409
  socket.destroy();
10410
10410
  });
10411
10411
  await socks5Client.handshake();
10412
- await new Promise((resolve13, reject) => {
10412
+ await new Promise((resolve14, reject) => {
10413
10413
  const timeout = setTimeout(() => {
10414
10414
  reject(new Error("SOCKS5 authentication timeout"));
10415
10415
  }, 5e3);
10416
10416
  const onAuthenticated = () => {
10417
10417
  clearTimeout(timeout);
10418
10418
  socks5Client.removeListener("error", onError);
10419
- resolve13();
10419
+ resolve14();
10420
10420
  };
10421
10421
  const onError = (err) => {
10422
10422
  clearTimeout(timeout);
@@ -10425,14 +10425,14 @@ var require_socks5_proxy_agent = __commonJS({
10425
10425
  };
10426
10426
  if (socks5Client.state === STATES.AUTHENTICATED) {
10427
10427
  clearTimeout(timeout);
10428
- resolve13();
10428
+ resolve14();
10429
10429
  } else {
10430
10430
  socks5Client.once("authenticated", onAuthenticated);
10431
10431
  socks5Client.once("error", onError);
10432
10432
  }
10433
10433
  });
10434
10434
  await socks5Client.connect(targetHost, targetPort);
10435
- await new Promise((resolve13, reject) => {
10435
+ await new Promise((resolve14, reject) => {
10436
10436
  const timeout = setTimeout(() => {
10437
10437
  reject(new Error("SOCKS5 connection timeout"));
10438
10438
  }, 5e3);
@@ -10440,7 +10440,7 @@ var require_socks5_proxy_agent = __commonJS({
10440
10440
  debug("SOCKS5 tunnel established to", targetHost, targetPort, "via", info);
10441
10441
  clearTimeout(timeout);
10442
10442
  socks5Client.removeListener("error", onError);
10443
- resolve13();
10443
+ resolve14();
10444
10444
  };
10445
10445
  const onError = (err) => {
10446
10446
  clearTimeout(timeout);
@@ -10483,8 +10483,8 @@ var require_socks5_proxy_agent = __commonJS({
10483
10483
  socket,
10484
10484
  servername: this[kRequestTls]?.servername || targetHost
10485
10485
  });
10486
- await new Promise((resolve13, reject) => {
10487
- finalSocket.once("secureConnect", resolve13);
10486
+ await new Promise((resolve14, reject) => {
10487
+ finalSocket.once("secureConnect", resolve14);
10488
10488
  finalSocket.once("error", reject);
10489
10489
  });
10490
10490
  }
@@ -11521,7 +11521,7 @@ var require_readable = __commonJS({
11521
11521
  if (this._readableState.closeEmitted) {
11522
11522
  return Promise.resolve(null);
11523
11523
  }
11524
- return new Promise((resolve13, reject) => {
11524
+ return new Promise((resolve14, reject) => {
11525
11525
  if (this[kContentLength] && this[kContentLength] > limit || this[kBytesRead] > limit) {
11526
11526
  this.destroy(new AbortError());
11527
11527
  }
@@ -11535,11 +11535,11 @@ var require_readable = __commonJS({
11535
11535
  if (signal.aborted) {
11536
11536
  reject(signal.reason ?? new AbortError());
11537
11537
  } else {
11538
- resolve13(null);
11538
+ resolve14(null);
11539
11539
  }
11540
11540
  });
11541
11541
  } else {
11542
- this.on("close", resolve13);
11542
+ this.on("close", resolve14);
11543
11543
  }
11544
11544
  this.on("error", noop).on("data", () => {
11545
11545
  if (this[kBytesRead] > limit) {
@@ -11567,7 +11567,7 @@ var require_readable = __commonJS({
11567
11567
  }
11568
11568
  function consume(stream, type) {
11569
11569
  assert7(!stream[kConsume]);
11570
- return new Promise((resolve13, reject) => {
11570
+ return new Promise((resolve14, reject) => {
11571
11571
  if (isUnusable(stream)) {
11572
11572
  const rState = stream._readableState;
11573
11573
  if (rState.destroyed && rState.closeEmitted === false) {
@@ -11582,7 +11582,7 @@ var require_readable = __commonJS({
11582
11582
  stream[kConsume] = {
11583
11583
  type,
11584
11584
  stream,
11585
- resolve: resolve13,
11585
+ resolve: resolve14,
11586
11586
  reject,
11587
11587
  length: 0,
11588
11588
  body: []
@@ -11656,18 +11656,18 @@ var require_readable = __commonJS({
11656
11656
  return buffer;
11657
11657
  }
11658
11658
  function consumeEnd(consume2, encoding) {
11659
- const { type, body, resolve: resolve13, stream, length } = consume2;
11659
+ const { type, body, resolve: resolve14, stream, length } = consume2;
11660
11660
  try {
11661
11661
  if (type === "text") {
11662
- resolve13(chunksDecode(body, length, encoding));
11662
+ resolve14(chunksDecode(body, length, encoding));
11663
11663
  } else if (type === "json") {
11664
- resolve13(JSON.parse(chunksDecode(body, length, encoding)));
11664
+ resolve14(JSON.parse(chunksDecode(body, length, encoding)));
11665
11665
  } else if (type === "arrayBuffer") {
11666
- resolve13(chunksConcat(body, length).buffer);
11666
+ resolve14(chunksConcat(body, length).buffer);
11667
11667
  } else if (type === "blob") {
11668
- resolve13(new Blob(body, { type: stream[kContentType] }));
11668
+ resolve14(new Blob(body, { type: stream[kContentType] }));
11669
11669
  } else if (type === "bytes") {
11670
- resolve13(chunksConcat(body, length));
11670
+ resolve14(chunksConcat(body, length));
11671
11671
  }
11672
11672
  consumeFinish(consume2);
11673
11673
  } catch (err) {
@@ -11857,9 +11857,9 @@ var require_api_request = __commonJS({
11857
11857
  };
11858
11858
  function request2(opts, callback) {
11859
11859
  if (callback === void 0) {
11860
- return new Promise((resolve13, reject) => {
11860
+ return new Promise((resolve14, reject) => {
11861
11861
  request2.call(this, opts, (err, data) => {
11862
- return err ? reject(err) : resolve13(data);
11862
+ return err ? reject(err) : resolve14(data);
11863
11863
  });
11864
11864
  });
11865
11865
  }
@@ -12071,9 +12071,9 @@ var require_api_stream = __commonJS({
12071
12071
  };
12072
12072
  function stream(opts, factory, callback) {
12073
12073
  if (callback === void 0) {
12074
- return new Promise((resolve13, reject) => {
12074
+ return new Promise((resolve14, reject) => {
12075
12075
  stream.call(this, opts, factory, (err, data) => {
12076
- return err ? reject(err) : resolve13(data);
12076
+ return err ? reject(err) : resolve14(data);
12077
12077
  });
12078
12078
  });
12079
12079
  }
@@ -12361,9 +12361,9 @@ var require_api_upgrade = __commonJS({
12361
12361
  };
12362
12362
  function upgrade(opts, callback) {
12363
12363
  if (callback === void 0) {
12364
- return new Promise((resolve13, reject) => {
12364
+ return new Promise((resolve14, reject) => {
12365
12365
  upgrade.call(this, opts, (err, data) => {
12366
- return err ? reject(err) : resolve13(data);
12366
+ return err ? reject(err) : resolve14(data);
12367
12367
  });
12368
12368
  });
12369
12369
  }
@@ -12456,9 +12456,9 @@ var require_api_connect = __commonJS({
12456
12456
  };
12457
12457
  function connect(opts, callback) {
12458
12458
  if (callback === void 0) {
12459
- return new Promise((resolve13, reject) => {
12459
+ return new Promise((resolve14, reject) => {
12460
12460
  connect.call(this, opts, (err, data) => {
12461
- return err ? reject(err) : resolve13(data);
12461
+ return err ? reject(err) : resolve14(data);
12462
12462
  });
12463
12463
  });
12464
12464
  }
@@ -13732,7 +13732,7 @@ var require_snapshot_recorder = __commonJS({
13732
13732
  "../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/mock/snapshot-recorder.js"(exports2, module2) {
13733
13733
  "use strict";
13734
13734
  var { writeFile: writeFile4, readFile: readFile2, mkdir } = require("node:fs/promises");
13735
- var { dirname: dirname7, resolve: resolve13 } = require("node:path");
13735
+ var { dirname: dirname7, resolve: resolve14 } = require("node:path");
13736
13736
  var { setTimeout: setTimeout6, clearTimeout: clearTimeout2 } = require("node:timers");
13737
13737
  var { InvalidArgumentError, UndiciError } = require_errors();
13738
13738
  var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils();
@@ -13933,7 +13933,7 @@ var require_snapshot_recorder = __commonJS({
13933
13933
  throw new InvalidArgumentError("Snapshot path is required");
13934
13934
  }
13935
13935
  try {
13936
- const data = await readFile2(resolve13(path6), "utf8");
13936
+ const data = await readFile2(resolve14(path6), "utf8");
13937
13937
  const parsed = JSON.parse(data);
13938
13938
  if (Array.isArray(parsed)) {
13939
13939
  this.#snapshots.clear();
@@ -13962,7 +13962,7 @@ var require_snapshot_recorder = __commonJS({
13962
13962
  if (!path6) {
13963
13963
  throw new InvalidArgumentError("Snapshot path is required");
13964
13964
  }
13965
- const resolvedPath = resolve13(path6);
13965
+ const resolvedPath = resolve14(path6);
13966
13966
  await mkdir(dirname7(resolvedPath), { recursive: true });
13967
13967
  const data = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({
13968
13968
  hash,
@@ -20814,7 +20814,7 @@ var require_fetch = __commonJS({
20814
20814
  const agent = fetchParams.controller.dispatcher;
20815
20815
  const path6 = url.pathname + url.search;
20816
20816
  const hasTrailingQuestionMark = url.search.length === 0 && url.href[url.href.length - url.hash.length - 1] === "?";
20817
- return new Promise((resolve13, reject) => agent.dispatch(
20817
+ return new Promise((resolve14, reject) => agent.dispatch(
20818
20818
  {
20819
20819
  path: hasTrailingQuestionMark ? `${path6}?` : path6,
20820
20820
  origin: url.origin,
@@ -20902,7 +20902,7 @@ var require_fetch = __commonJS({
20902
20902
  }
20903
20903
  }
20904
20904
  const onError = this.onError.bind(this);
20905
- resolve13({
20905
+ resolve14({
20906
20906
  status: status2,
20907
20907
  statusText,
20908
20908
  headersList,
@@ -20955,7 +20955,7 @@ var require_fetch = __commonJS({
20955
20955
  headersList.append(headerName, String(value), true);
20956
20956
  }
20957
20957
  }
20958
- resolve13({
20958
+ resolve14({
20959
20959
  status: status2,
20960
20960
  statusText: STATUS_CODES[status2],
20961
20961
  headersList,
@@ -20979,7 +20979,7 @@ var require_fetch = __commonJS({
20979
20979
  headersList.append(nameStr, value.toString("latin1"), true);
20980
20980
  }
20981
20981
  }
20982
- resolve13({
20982
+ resolve14({
20983
20983
  status: status2,
20984
20984
  statusText: STATUS_CODES[status2],
20985
20985
  headersList,
@@ -25927,503 +25927,6 @@ var require_emoji_regex = __commonJS({
25927
25927
  }
25928
25928
  });
25929
25929
 
25930
- // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
25931
- var require_windows = __commonJS({
25932
- "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports2, module2) {
25933
- module2.exports = isexe;
25934
- isexe.sync = sync;
25935
- var fs10 = require("fs");
25936
- function checkPathExt(path6, options) {
25937
- var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
25938
- if (!pathext) {
25939
- return true;
25940
- }
25941
- pathext = pathext.split(";");
25942
- if (pathext.indexOf("") !== -1) {
25943
- return true;
25944
- }
25945
- for (var i = 0; i < pathext.length; i++) {
25946
- var p2 = pathext[i].toLowerCase();
25947
- if (p2 && path6.substr(-p2.length).toLowerCase() === p2) {
25948
- return true;
25949
- }
25950
- }
25951
- return false;
25952
- }
25953
- function checkStat(stat, path6, options) {
25954
- if (!stat.isSymbolicLink() && !stat.isFile()) {
25955
- return false;
25956
- }
25957
- return checkPathExt(path6, options);
25958
- }
25959
- function isexe(path6, options, cb) {
25960
- fs10.stat(path6, function(er, stat) {
25961
- cb(er, er ? false : checkStat(stat, path6, options));
25962
- });
25963
- }
25964
- function sync(path6, options) {
25965
- return checkStat(fs10.statSync(path6), path6, options);
25966
- }
25967
- }
25968
- });
25969
-
25970
- // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
25971
- var require_mode = __commonJS({
25972
- "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports2, module2) {
25973
- module2.exports = isexe;
25974
- isexe.sync = sync;
25975
- var fs10 = require("fs");
25976
- function isexe(path6, options, cb) {
25977
- fs10.stat(path6, function(er, stat) {
25978
- cb(er, er ? false : checkStat(stat, options));
25979
- });
25980
- }
25981
- function sync(path6, options) {
25982
- return checkStat(fs10.statSync(path6), options);
25983
- }
25984
- function checkStat(stat, options) {
25985
- return stat.isFile() && checkMode(stat, options);
25986
- }
25987
- function checkMode(stat, options) {
25988
- var mod = stat.mode;
25989
- var uid = stat.uid;
25990
- var gid = stat.gid;
25991
- var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
25992
- var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
25993
- var u2 = parseInt("100", 8);
25994
- var g = parseInt("010", 8);
25995
- var o = parseInt("001", 8);
25996
- var ug = u2 | g;
25997
- var ret = mod & o || mod & g && gid === myGid || mod & u2 && uid === myUid || mod & ug && myUid === 0;
25998
- return ret;
25999
- }
26000
- }
26001
- });
26002
-
26003
- // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
26004
- var require_isexe = __commonJS({
26005
- "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports2, module2) {
26006
- var fs10 = require("fs");
26007
- var core;
26008
- if (process.platform === "win32" || global.TESTING_WINDOWS) {
26009
- core = require_windows();
26010
- } else {
26011
- core = require_mode();
26012
- }
26013
- module2.exports = isexe;
26014
- isexe.sync = sync;
26015
- function isexe(path6, options, cb) {
26016
- if (typeof options === "function") {
26017
- cb = options;
26018
- options = {};
26019
- }
26020
- if (!cb) {
26021
- if (typeof Promise !== "function") {
26022
- throw new TypeError("callback not provided");
26023
- }
26024
- return new Promise(function(resolve13, reject) {
26025
- isexe(path6, options || {}, function(er, is) {
26026
- if (er) {
26027
- reject(er);
26028
- } else {
26029
- resolve13(is);
26030
- }
26031
- });
26032
- });
26033
- }
26034
- core(path6, options || {}, function(er, is) {
26035
- if (er) {
26036
- if (er.code === "EACCES" || options && options.ignoreErrors) {
26037
- er = null;
26038
- is = false;
26039
- }
26040
- }
26041
- cb(er, is);
26042
- });
26043
- }
26044
- function sync(path6, options) {
26045
- try {
26046
- return core.sync(path6, options || {});
26047
- } catch (er) {
26048
- if (options && options.ignoreErrors || er.code === "EACCES") {
26049
- return false;
26050
- } else {
26051
- throw er;
26052
- }
26053
- }
26054
- }
26055
- }
26056
- });
26057
-
26058
- // ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
26059
- var require_which = __commonJS({
26060
- "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module2) {
26061
- var isWindows2 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
26062
- var path6 = require("path");
26063
- var COLON = isWindows2 ? ";" : ":";
26064
- var isexe = require_isexe();
26065
- var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
26066
- var getPathInfo = (cmd, opt) => {
26067
- const colon = opt.colon || COLON;
26068
- const pathEnv = cmd.match(/\//) || isWindows2 && cmd.match(/\\/) ? [""] : [
26069
- // windows always checks the cwd first
26070
- ...isWindows2 ? [process.cwd()] : [],
26071
- ...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */
26072
- "").split(colon)
26073
- ];
26074
- const pathExtExe = isWindows2 ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
26075
- const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
26076
- if (isWindows2) {
26077
- if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
26078
- pathExt.unshift("");
26079
- }
26080
- return {
26081
- pathEnv,
26082
- pathExt,
26083
- pathExtExe
26084
- };
26085
- };
26086
- var which = (cmd, opt, cb) => {
26087
- if (typeof opt === "function") {
26088
- cb = opt;
26089
- opt = {};
26090
- }
26091
- if (!opt)
26092
- opt = {};
26093
- const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
26094
- const found = [];
26095
- const step = (i) => new Promise((resolve13, reject) => {
26096
- if (i === pathEnv.length)
26097
- return opt.all && found.length ? resolve13(found) : reject(getNotFoundError(cmd));
26098
- const ppRaw = pathEnv[i];
26099
- const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
26100
- const pCmd = path6.join(pathPart, cmd);
26101
- const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
26102
- resolve13(subStep(p2, i, 0));
26103
- });
26104
- const subStep = (p2, i, ii) => new Promise((resolve13, reject) => {
26105
- if (ii === pathExt.length)
26106
- return resolve13(step(i + 1));
26107
- const ext = pathExt[ii];
26108
- isexe(p2 + ext, { pathExt: pathExtExe }, (er, is) => {
26109
- if (!er && is) {
26110
- if (opt.all)
26111
- found.push(p2 + ext);
26112
- else
26113
- return resolve13(p2 + ext);
26114
- }
26115
- return resolve13(subStep(p2, i, ii + 1));
26116
- });
26117
- });
26118
- return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
26119
- };
26120
- var whichSync = (cmd, opt) => {
26121
- opt = opt || {};
26122
- const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
26123
- const found = [];
26124
- for (let i = 0; i < pathEnv.length; i++) {
26125
- const ppRaw = pathEnv[i];
26126
- const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
26127
- const pCmd = path6.join(pathPart, cmd);
26128
- const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
26129
- for (let j2 = 0; j2 < pathExt.length; j2++) {
26130
- const cur = p2 + pathExt[j2];
26131
- try {
26132
- const is = isexe.sync(cur, { pathExt: pathExtExe });
26133
- if (is) {
26134
- if (opt.all)
26135
- found.push(cur);
26136
- else
26137
- return cur;
26138
- }
26139
- } catch (ex) {
26140
- }
26141
- }
26142
- }
26143
- if (opt.all && found.length)
26144
- return found;
26145
- if (opt.nothrow)
26146
- return null;
26147
- throw getNotFoundError(cmd);
26148
- };
26149
- module2.exports = which;
26150
- which.sync = whichSync;
26151
- }
26152
- });
26153
-
26154
- // ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
26155
- var require_path_key = __commonJS({
26156
- "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports2, module2) {
26157
- "use strict";
26158
- var pathKey = (options = {}) => {
26159
- const environment = options.env || process.env;
26160
- const platform2 = options.platform || process.platform;
26161
- if (platform2 !== "win32") {
26162
- return "PATH";
26163
- }
26164
- return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
26165
- };
26166
- module2.exports = pathKey;
26167
- module2.exports.default = pathKey;
26168
- }
26169
- });
26170
-
26171
- // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
26172
- var require_resolveCommand = __commonJS({
26173
- "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
26174
- "use strict";
26175
- var path6 = require("path");
26176
- var which = require_which();
26177
- var getPathKey = require_path_key();
26178
- function resolveCommandAttempt(parsed, withoutPathExt) {
26179
- const env3 = parsed.options.env || process.env;
26180
- const cwd = process.cwd();
26181
- const hasCustomCwd = parsed.options.cwd != null;
26182
- const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
26183
- if (shouldSwitchCwd) {
26184
- try {
26185
- process.chdir(parsed.options.cwd);
26186
- } catch (err) {
26187
- }
26188
- }
26189
- let resolved;
26190
- try {
26191
- resolved = which.sync(parsed.command, {
26192
- path: env3[getPathKey({ env: env3 })],
26193
- pathExt: withoutPathExt ? path6.delimiter : void 0
26194
- });
26195
- } catch (e) {
26196
- } finally {
26197
- if (shouldSwitchCwd) {
26198
- process.chdir(cwd);
26199
- }
26200
- }
26201
- if (resolved) {
26202
- resolved = path6.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
26203
- }
26204
- return resolved;
26205
- }
26206
- function resolveCommand(parsed) {
26207
- return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
26208
- }
26209
- module2.exports = resolveCommand;
26210
- }
26211
- });
26212
-
26213
- // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
26214
- var require_escape = __commonJS({
26215
- "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) {
26216
- "use strict";
26217
- var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
26218
- function escapeCommand(arg) {
26219
- arg = arg.replace(metaCharsRegExp, "^$1");
26220
- return arg;
26221
- }
26222
- function escapeArgument(arg, doubleEscapeMetaChars) {
26223
- arg = `${arg}`;
26224
- arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
26225
- arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
26226
- arg = `"${arg}"`;
26227
- arg = arg.replace(metaCharsRegExp, "^$1");
26228
- if (doubleEscapeMetaChars) {
26229
- arg = arg.replace(metaCharsRegExp, "^$1");
26230
- }
26231
- return arg;
26232
- }
26233
- module2.exports.command = escapeCommand;
26234
- module2.exports.argument = escapeArgument;
26235
- }
26236
- });
26237
-
26238
- // ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
26239
- var require_shebang_regex = __commonJS({
26240
- "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports2, module2) {
26241
- "use strict";
26242
- module2.exports = /^#!(.*)/;
26243
- }
26244
- });
26245
-
26246
- // ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
26247
- var require_shebang_command = __commonJS({
26248
- "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports2, module2) {
26249
- "use strict";
26250
- var shebangRegex = require_shebang_regex();
26251
- module2.exports = (string = "") => {
26252
- const match = string.match(shebangRegex);
26253
- if (!match) {
26254
- return null;
26255
- }
26256
- const [path6, argument] = match[0].replace(/#! ?/, "").split(" ");
26257
- const binary = path6.split("/").pop();
26258
- if (binary === "env") {
26259
- return argument;
26260
- }
26261
- return argument ? `${binary} ${argument}` : binary;
26262
- };
26263
- }
26264
- });
26265
-
26266
- // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
26267
- var require_readShebang = __commonJS({
26268
- "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
26269
- "use strict";
26270
- var fs10 = require("fs");
26271
- var shebangCommand = require_shebang_command();
26272
- function readShebang(command2) {
26273
- const size = 150;
26274
- const buffer = Buffer.alloc(size);
26275
- let fd;
26276
- try {
26277
- fd = fs10.openSync(command2, "r");
26278
- fs10.readSync(fd, buffer, 0, size, 0);
26279
- fs10.closeSync(fd);
26280
- } catch (e) {
26281
- }
26282
- return shebangCommand(buffer.toString());
26283
- }
26284
- module2.exports = readShebang;
26285
- }
26286
- });
26287
-
26288
- // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
26289
- var require_parse2 = __commonJS({
26290
- "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
26291
- "use strict";
26292
- var path6 = require("path");
26293
- var resolveCommand = require_resolveCommand();
26294
- var escape = require_escape();
26295
- var readShebang = require_readShebang();
26296
- var isWin = process.platform === "win32";
26297
- var isExecutableRegExp = /\.(?:com|exe)$/i;
26298
- var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
26299
- function detectShebang(parsed) {
26300
- parsed.file = resolveCommand(parsed);
26301
- const shebang = parsed.file && readShebang(parsed.file);
26302
- if (shebang) {
26303
- parsed.args.unshift(parsed.file);
26304
- parsed.command = shebang;
26305
- return resolveCommand(parsed);
26306
- }
26307
- return parsed.file;
26308
- }
26309
- function parseNonShell(parsed) {
26310
- if (!isWin) {
26311
- return parsed;
26312
- }
26313
- const commandFile = detectShebang(parsed);
26314
- const needsShell = !isExecutableRegExp.test(commandFile);
26315
- if (parsed.options.forceShell || needsShell) {
26316
- const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
26317
- parsed.command = path6.normalize(parsed.command);
26318
- parsed.command = escape.command(parsed.command);
26319
- parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
26320
- const shellCommand = [parsed.command].concat(parsed.args).join(" ");
26321
- parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`];
26322
- parsed.command = process.env.comspec || "cmd.exe";
26323
- parsed.options.windowsVerbatimArguments = true;
26324
- }
26325
- return parsed;
26326
- }
26327
- function parse10(command2, args, options) {
26328
- if (args && !Array.isArray(args)) {
26329
- options = args;
26330
- args = null;
26331
- }
26332
- args = args ? args.slice(0) : [];
26333
- options = Object.assign({}, options);
26334
- const parsed = {
26335
- command: command2,
26336
- args,
26337
- options,
26338
- file: void 0,
26339
- original: {
26340
- command: command2,
26341
- args
26342
- }
26343
- };
26344
- return options.shell ? parsed : parseNonShell(parsed);
26345
- }
26346
- module2.exports = parse10;
26347
- }
26348
- });
26349
-
26350
- // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
26351
- var require_enoent = __commonJS({
26352
- "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
26353
- "use strict";
26354
- var isWin = process.platform === "win32";
26355
- function notFoundError(original, syscall) {
26356
- return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
26357
- code: "ENOENT",
26358
- errno: "ENOENT",
26359
- syscall: `${syscall} ${original.command}`,
26360
- path: original.command,
26361
- spawnargs: original.args
26362
- });
26363
- }
26364
- function hookChildProcess(cp3, parsed) {
26365
- if (!isWin) {
26366
- return;
26367
- }
26368
- const originalEmit = cp3.emit;
26369
- cp3.emit = function(name3, arg1) {
26370
- if (name3 === "exit") {
26371
- const err = verifyENOENT(arg1, parsed);
26372
- if (err) {
26373
- return originalEmit.call(cp3, "error", err);
26374
- }
26375
- }
26376
- return originalEmit.apply(cp3, arguments);
26377
- };
26378
- }
26379
- function verifyENOENT(status2, parsed) {
26380
- if (isWin && status2 === 1 && !parsed.file) {
26381
- return notFoundError(parsed.original, "spawn");
26382
- }
26383
- return null;
26384
- }
26385
- function verifyENOENTSync(status2, parsed) {
26386
- if (isWin && status2 === 1 && !parsed.file) {
26387
- return notFoundError(parsed.original, "spawnSync");
26388
- }
26389
- return null;
26390
- }
26391
- module2.exports = {
26392
- hookChildProcess,
26393
- verifyENOENT,
26394
- verifyENOENTSync,
26395
- notFoundError
26396
- };
26397
- }
26398
- });
26399
-
26400
- // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
26401
- var require_cross_spawn = __commonJS({
26402
- "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports2, module2) {
26403
- "use strict";
26404
- var cp3 = require("child_process");
26405
- var parse10 = require_parse2();
26406
- var enoent = require_enoent();
26407
- function spawn3(command2, args, options) {
26408
- const parsed = parse10(command2, args, options);
26409
- const spawned = cp3.spawn(parsed.command, parsed.args, parsed.options);
26410
- enoent.hookChildProcess(spawned, parsed);
26411
- return spawned;
26412
- }
26413
- function spawnSync(command2, args, options) {
26414
- const parsed = parse10(command2, args, options);
26415
- const result = cp3.spawnSync(parsed.command, parsed.args, parsed.options);
26416
- result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
26417
- return result;
26418
- }
26419
- module2.exports = spawn3;
26420
- module2.exports.spawn = spawn3;
26421
- module2.exports.sync = spawnSync;
26422
- module2.exports._parse = parse10;
26423
- module2.exports._enoent = enoent;
26424
- }
26425
- });
26426
-
26427
25930
  // ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js
26428
25931
  var require_XDGAppPaths2 = __commonJS({
26429
25932
  "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js"(exports2) {
@@ -26913,6 +26416,503 @@ var require_mod_cjs6 = __commonJS({
26913
26416
  }
26914
26417
  });
26915
26418
 
26419
+ // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
26420
+ var require_windows = __commonJS({
26421
+ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports2, module2) {
26422
+ module2.exports = isexe;
26423
+ isexe.sync = sync;
26424
+ var fs10 = require("fs");
26425
+ function checkPathExt(path6, options) {
26426
+ var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
26427
+ if (!pathext) {
26428
+ return true;
26429
+ }
26430
+ pathext = pathext.split(";");
26431
+ if (pathext.indexOf("") !== -1) {
26432
+ return true;
26433
+ }
26434
+ for (var i = 0; i < pathext.length; i++) {
26435
+ var p2 = pathext[i].toLowerCase();
26436
+ if (p2 && path6.substr(-p2.length).toLowerCase() === p2) {
26437
+ return true;
26438
+ }
26439
+ }
26440
+ return false;
26441
+ }
26442
+ function checkStat(stat, path6, options) {
26443
+ if (!stat.isSymbolicLink() && !stat.isFile()) {
26444
+ return false;
26445
+ }
26446
+ return checkPathExt(path6, options);
26447
+ }
26448
+ function isexe(path6, options, cb) {
26449
+ fs10.stat(path6, function(er, stat) {
26450
+ cb(er, er ? false : checkStat(stat, path6, options));
26451
+ });
26452
+ }
26453
+ function sync(path6, options) {
26454
+ return checkStat(fs10.statSync(path6), path6, options);
26455
+ }
26456
+ }
26457
+ });
26458
+
26459
+ // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
26460
+ var require_mode = __commonJS({
26461
+ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports2, module2) {
26462
+ module2.exports = isexe;
26463
+ isexe.sync = sync;
26464
+ var fs10 = require("fs");
26465
+ function isexe(path6, options, cb) {
26466
+ fs10.stat(path6, function(er, stat) {
26467
+ cb(er, er ? false : checkStat(stat, options));
26468
+ });
26469
+ }
26470
+ function sync(path6, options) {
26471
+ return checkStat(fs10.statSync(path6), options);
26472
+ }
26473
+ function checkStat(stat, options) {
26474
+ return stat.isFile() && checkMode(stat, options);
26475
+ }
26476
+ function checkMode(stat, options) {
26477
+ var mod = stat.mode;
26478
+ var uid = stat.uid;
26479
+ var gid = stat.gid;
26480
+ var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
26481
+ var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
26482
+ var u2 = parseInt("100", 8);
26483
+ var g = parseInt("010", 8);
26484
+ var o = parseInt("001", 8);
26485
+ var ug = u2 | g;
26486
+ var ret = mod & o || mod & g && gid === myGid || mod & u2 && uid === myUid || mod & ug && myUid === 0;
26487
+ return ret;
26488
+ }
26489
+ }
26490
+ });
26491
+
26492
+ // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
26493
+ var require_isexe = __commonJS({
26494
+ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports2, module2) {
26495
+ var fs10 = require("fs");
26496
+ var core;
26497
+ if (process.platform === "win32" || global.TESTING_WINDOWS) {
26498
+ core = require_windows();
26499
+ } else {
26500
+ core = require_mode();
26501
+ }
26502
+ module2.exports = isexe;
26503
+ isexe.sync = sync;
26504
+ function isexe(path6, options, cb) {
26505
+ if (typeof options === "function") {
26506
+ cb = options;
26507
+ options = {};
26508
+ }
26509
+ if (!cb) {
26510
+ if (typeof Promise !== "function") {
26511
+ throw new TypeError("callback not provided");
26512
+ }
26513
+ return new Promise(function(resolve14, reject) {
26514
+ isexe(path6, options || {}, function(er, is) {
26515
+ if (er) {
26516
+ reject(er);
26517
+ } else {
26518
+ resolve14(is);
26519
+ }
26520
+ });
26521
+ });
26522
+ }
26523
+ core(path6, options || {}, function(er, is) {
26524
+ if (er) {
26525
+ if (er.code === "EACCES" || options && options.ignoreErrors) {
26526
+ er = null;
26527
+ is = false;
26528
+ }
26529
+ }
26530
+ cb(er, is);
26531
+ });
26532
+ }
26533
+ function sync(path6, options) {
26534
+ try {
26535
+ return core.sync(path6, options || {});
26536
+ } catch (er) {
26537
+ if (options && options.ignoreErrors || er.code === "EACCES") {
26538
+ return false;
26539
+ } else {
26540
+ throw er;
26541
+ }
26542
+ }
26543
+ }
26544
+ }
26545
+ });
26546
+
26547
+ // ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
26548
+ var require_which = __commonJS({
26549
+ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module2) {
26550
+ var isWindows2 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
26551
+ var path6 = require("path");
26552
+ var COLON = isWindows2 ? ";" : ":";
26553
+ var isexe = require_isexe();
26554
+ var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
26555
+ var getPathInfo = (cmd, opt) => {
26556
+ const colon = opt.colon || COLON;
26557
+ const pathEnv = cmd.match(/\//) || isWindows2 && cmd.match(/\\/) ? [""] : [
26558
+ // windows always checks the cwd first
26559
+ ...isWindows2 ? [process.cwd()] : [],
26560
+ ...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */
26561
+ "").split(colon)
26562
+ ];
26563
+ const pathExtExe = isWindows2 ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
26564
+ const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
26565
+ if (isWindows2) {
26566
+ if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
26567
+ pathExt.unshift("");
26568
+ }
26569
+ return {
26570
+ pathEnv,
26571
+ pathExt,
26572
+ pathExtExe
26573
+ };
26574
+ };
26575
+ var which = (cmd, opt, cb) => {
26576
+ if (typeof opt === "function") {
26577
+ cb = opt;
26578
+ opt = {};
26579
+ }
26580
+ if (!opt)
26581
+ opt = {};
26582
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
26583
+ const found = [];
26584
+ const step = (i) => new Promise((resolve14, reject) => {
26585
+ if (i === pathEnv.length)
26586
+ return opt.all && found.length ? resolve14(found) : reject(getNotFoundError(cmd));
26587
+ const ppRaw = pathEnv[i];
26588
+ const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
26589
+ const pCmd = path6.join(pathPart, cmd);
26590
+ const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
26591
+ resolve14(subStep(p2, i, 0));
26592
+ });
26593
+ const subStep = (p2, i, ii) => new Promise((resolve14, reject) => {
26594
+ if (ii === pathExt.length)
26595
+ return resolve14(step(i + 1));
26596
+ const ext = pathExt[ii];
26597
+ isexe(p2 + ext, { pathExt: pathExtExe }, (er, is) => {
26598
+ if (!er && is) {
26599
+ if (opt.all)
26600
+ found.push(p2 + ext);
26601
+ else
26602
+ return resolve14(p2 + ext);
26603
+ }
26604
+ return resolve14(subStep(p2, i, ii + 1));
26605
+ });
26606
+ });
26607
+ return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
26608
+ };
26609
+ var whichSync = (cmd, opt) => {
26610
+ opt = opt || {};
26611
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
26612
+ const found = [];
26613
+ for (let i = 0; i < pathEnv.length; i++) {
26614
+ const ppRaw = pathEnv[i];
26615
+ const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
26616
+ const pCmd = path6.join(pathPart, cmd);
26617
+ const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
26618
+ for (let j2 = 0; j2 < pathExt.length; j2++) {
26619
+ const cur = p2 + pathExt[j2];
26620
+ try {
26621
+ const is = isexe.sync(cur, { pathExt: pathExtExe });
26622
+ if (is) {
26623
+ if (opt.all)
26624
+ found.push(cur);
26625
+ else
26626
+ return cur;
26627
+ }
26628
+ } catch (ex) {
26629
+ }
26630
+ }
26631
+ }
26632
+ if (opt.all && found.length)
26633
+ return found;
26634
+ if (opt.nothrow)
26635
+ return null;
26636
+ throw getNotFoundError(cmd);
26637
+ };
26638
+ module2.exports = which;
26639
+ which.sync = whichSync;
26640
+ }
26641
+ });
26642
+
26643
+ // ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
26644
+ var require_path_key = __commonJS({
26645
+ "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports2, module2) {
26646
+ "use strict";
26647
+ var pathKey = (options = {}) => {
26648
+ const environment = options.env || process.env;
26649
+ const platform2 = options.platform || process.platform;
26650
+ if (platform2 !== "win32") {
26651
+ return "PATH";
26652
+ }
26653
+ return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
26654
+ };
26655
+ module2.exports = pathKey;
26656
+ module2.exports.default = pathKey;
26657
+ }
26658
+ });
26659
+
26660
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
26661
+ var require_resolveCommand = __commonJS({
26662
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
26663
+ "use strict";
26664
+ var path6 = require("path");
26665
+ var which = require_which();
26666
+ var getPathKey = require_path_key();
26667
+ function resolveCommandAttempt(parsed, withoutPathExt) {
26668
+ const env3 = parsed.options.env || process.env;
26669
+ const cwd = process.cwd();
26670
+ const hasCustomCwd = parsed.options.cwd != null;
26671
+ const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
26672
+ if (shouldSwitchCwd) {
26673
+ try {
26674
+ process.chdir(parsed.options.cwd);
26675
+ } catch (err) {
26676
+ }
26677
+ }
26678
+ let resolved;
26679
+ try {
26680
+ resolved = which.sync(parsed.command, {
26681
+ path: env3[getPathKey({ env: env3 })],
26682
+ pathExt: withoutPathExt ? path6.delimiter : void 0
26683
+ });
26684
+ } catch (e) {
26685
+ } finally {
26686
+ if (shouldSwitchCwd) {
26687
+ process.chdir(cwd);
26688
+ }
26689
+ }
26690
+ if (resolved) {
26691
+ resolved = path6.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
26692
+ }
26693
+ return resolved;
26694
+ }
26695
+ function resolveCommand(parsed) {
26696
+ return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
26697
+ }
26698
+ module2.exports = resolveCommand;
26699
+ }
26700
+ });
26701
+
26702
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
26703
+ var require_escape = __commonJS({
26704
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) {
26705
+ "use strict";
26706
+ var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
26707
+ function escapeCommand(arg) {
26708
+ arg = arg.replace(metaCharsRegExp, "^$1");
26709
+ return arg;
26710
+ }
26711
+ function escapeArgument(arg, doubleEscapeMetaChars) {
26712
+ arg = `${arg}`;
26713
+ arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
26714
+ arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
26715
+ arg = `"${arg}"`;
26716
+ arg = arg.replace(metaCharsRegExp, "^$1");
26717
+ if (doubleEscapeMetaChars) {
26718
+ arg = arg.replace(metaCharsRegExp, "^$1");
26719
+ }
26720
+ return arg;
26721
+ }
26722
+ module2.exports.command = escapeCommand;
26723
+ module2.exports.argument = escapeArgument;
26724
+ }
26725
+ });
26726
+
26727
+ // ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
26728
+ var require_shebang_regex = __commonJS({
26729
+ "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports2, module2) {
26730
+ "use strict";
26731
+ module2.exports = /^#!(.*)/;
26732
+ }
26733
+ });
26734
+
26735
+ // ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
26736
+ var require_shebang_command = __commonJS({
26737
+ "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports2, module2) {
26738
+ "use strict";
26739
+ var shebangRegex = require_shebang_regex();
26740
+ module2.exports = (string = "") => {
26741
+ const match = string.match(shebangRegex);
26742
+ if (!match) {
26743
+ return null;
26744
+ }
26745
+ const [path6, argument] = match[0].replace(/#! ?/, "").split(" ");
26746
+ const binary = path6.split("/").pop();
26747
+ if (binary === "env") {
26748
+ return argument;
26749
+ }
26750
+ return argument ? `${binary} ${argument}` : binary;
26751
+ };
26752
+ }
26753
+ });
26754
+
26755
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
26756
+ var require_readShebang = __commonJS({
26757
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
26758
+ "use strict";
26759
+ var fs10 = require("fs");
26760
+ var shebangCommand = require_shebang_command();
26761
+ function readShebang(command2) {
26762
+ const size = 150;
26763
+ const buffer = Buffer.alloc(size);
26764
+ let fd;
26765
+ try {
26766
+ fd = fs10.openSync(command2, "r");
26767
+ fs10.readSync(fd, buffer, 0, size, 0);
26768
+ fs10.closeSync(fd);
26769
+ } catch (e) {
26770
+ }
26771
+ return shebangCommand(buffer.toString());
26772
+ }
26773
+ module2.exports = readShebang;
26774
+ }
26775
+ });
26776
+
26777
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
26778
+ var require_parse2 = __commonJS({
26779
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
26780
+ "use strict";
26781
+ var path6 = require("path");
26782
+ var resolveCommand = require_resolveCommand();
26783
+ var escape = require_escape();
26784
+ var readShebang = require_readShebang();
26785
+ var isWin = process.platform === "win32";
26786
+ var isExecutableRegExp = /\.(?:com|exe)$/i;
26787
+ var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
26788
+ function detectShebang(parsed) {
26789
+ parsed.file = resolveCommand(parsed);
26790
+ const shebang = parsed.file && readShebang(parsed.file);
26791
+ if (shebang) {
26792
+ parsed.args.unshift(parsed.file);
26793
+ parsed.command = shebang;
26794
+ return resolveCommand(parsed);
26795
+ }
26796
+ return parsed.file;
26797
+ }
26798
+ function parseNonShell(parsed) {
26799
+ if (!isWin) {
26800
+ return parsed;
26801
+ }
26802
+ const commandFile = detectShebang(parsed);
26803
+ const needsShell = !isExecutableRegExp.test(commandFile);
26804
+ if (parsed.options.forceShell || needsShell) {
26805
+ const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
26806
+ parsed.command = path6.normalize(parsed.command);
26807
+ parsed.command = escape.command(parsed.command);
26808
+ parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
26809
+ const shellCommand = [parsed.command].concat(parsed.args).join(" ");
26810
+ parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`];
26811
+ parsed.command = process.env.comspec || "cmd.exe";
26812
+ parsed.options.windowsVerbatimArguments = true;
26813
+ }
26814
+ return parsed;
26815
+ }
26816
+ function parse10(command2, args, options) {
26817
+ if (args && !Array.isArray(args)) {
26818
+ options = args;
26819
+ args = null;
26820
+ }
26821
+ args = args ? args.slice(0) : [];
26822
+ options = Object.assign({}, options);
26823
+ const parsed = {
26824
+ command: command2,
26825
+ args,
26826
+ options,
26827
+ file: void 0,
26828
+ original: {
26829
+ command: command2,
26830
+ args
26831
+ }
26832
+ };
26833
+ return options.shell ? parsed : parseNonShell(parsed);
26834
+ }
26835
+ module2.exports = parse10;
26836
+ }
26837
+ });
26838
+
26839
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
26840
+ var require_enoent = __commonJS({
26841
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
26842
+ "use strict";
26843
+ var isWin = process.platform === "win32";
26844
+ function notFoundError(original, syscall) {
26845
+ return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
26846
+ code: "ENOENT",
26847
+ errno: "ENOENT",
26848
+ syscall: `${syscall} ${original.command}`,
26849
+ path: original.command,
26850
+ spawnargs: original.args
26851
+ });
26852
+ }
26853
+ function hookChildProcess(cp3, parsed) {
26854
+ if (!isWin) {
26855
+ return;
26856
+ }
26857
+ const originalEmit = cp3.emit;
26858
+ cp3.emit = function(name3, arg1) {
26859
+ if (name3 === "exit") {
26860
+ const err = verifyENOENT(arg1, parsed);
26861
+ if (err) {
26862
+ return originalEmit.call(cp3, "error", err);
26863
+ }
26864
+ }
26865
+ return originalEmit.apply(cp3, arguments);
26866
+ };
26867
+ }
26868
+ function verifyENOENT(status2, parsed) {
26869
+ if (isWin && status2 === 1 && !parsed.file) {
26870
+ return notFoundError(parsed.original, "spawn");
26871
+ }
26872
+ return null;
26873
+ }
26874
+ function verifyENOENTSync(status2, parsed) {
26875
+ if (isWin && status2 === 1 && !parsed.file) {
26876
+ return notFoundError(parsed.original, "spawnSync");
26877
+ }
26878
+ return null;
26879
+ }
26880
+ module2.exports = {
26881
+ hookChildProcess,
26882
+ verifyENOENT,
26883
+ verifyENOENTSync,
26884
+ notFoundError
26885
+ };
26886
+ }
26887
+ });
26888
+
26889
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
26890
+ var require_cross_spawn = __commonJS({
26891
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports2, module2) {
26892
+ "use strict";
26893
+ var cp3 = require("child_process");
26894
+ var parse10 = require_parse2();
26895
+ var enoent = require_enoent();
26896
+ function spawn3(command2, args, options) {
26897
+ const parsed = parse10(command2, args, options);
26898
+ const spawned = cp3.spawn(parsed.command, parsed.args, parsed.options);
26899
+ enoent.hookChildProcess(spawned, parsed);
26900
+ return spawned;
26901
+ }
26902
+ function spawnSync(command2, args, options) {
26903
+ const parsed = parse10(command2, args, options);
26904
+ const result = cp3.spawnSync(parsed.command, parsed.args, parsed.options);
26905
+ result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
26906
+ return result;
26907
+ }
26908
+ module2.exports = spawn3;
26909
+ module2.exports.spawn = spawn3;
26910
+ module2.exports.sync = spawnSync;
26911
+ module2.exports._parse = parse10;
26912
+ module2.exports._enoent = enoent;
26913
+ }
26914
+ });
26915
+
26916
26916
  // ../../node_modules/.pnpm/semver@7.7.1/node_modules/semver/internal/constants.js
26917
26917
  var require_constants6 = __commonJS({
26918
26918
  "../../node_modules/.pnpm/semver@7.7.1/node_modules/semver/internal/constants.js"(exports2, module2) {
@@ -29685,9 +29685,9 @@ var require_index_688c5d50 = __commonJS({
29685
29685
  }
29686
29686
  // stream.promise().then(() => done, er => emitted error)
29687
29687
  promise() {
29688
- return new Promise((resolve14, reject) => {
29688
+ return new Promise((resolve15, reject) => {
29689
29689
  this.on(DESTROYED, () => reject(new Error("stream destroyed")));
29690
- this.on("end", () => resolve14());
29690
+ this.on("end", () => resolve15());
29691
29691
  this.on("error", (er) => reject(er));
29692
29692
  });
29693
29693
  }
@@ -29699,7 +29699,7 @@ var require_index_688c5d50 = __commonJS({
29699
29699
  return Promise.resolve({ done: false, value: res });
29700
29700
  if (this[EOF$1])
29701
29701
  return Promise.resolve({ done: true });
29702
- let resolve14 = null;
29702
+ let resolve15 = null;
29703
29703
  let reject = null;
29704
29704
  const onerr = (er) => {
29705
29705
  this.removeListener("data", ondata);
@@ -29710,17 +29710,17 @@ var require_index_688c5d50 = __commonJS({
29710
29710
  this.removeListener("error", onerr);
29711
29711
  this.removeListener("end", onend);
29712
29712
  this.pause();
29713
- resolve14({ value, done: !!this[EOF$1] });
29713
+ resolve15({ value, done: !!this[EOF$1] });
29714
29714
  };
29715
29715
  const onend = () => {
29716
29716
  this.removeListener("error", onerr);
29717
29717
  this.removeListener("data", ondata);
29718
- resolve14({ done: true });
29718
+ resolve15({ done: true });
29719
29719
  };
29720
29720
  const ondestroy = () => onerr(new Error("stream destroyed"));
29721
29721
  return new Promise((res2, rej) => {
29722
29722
  reject = rej;
29723
- resolve14 = res2;
29723
+ resolve15 = res2;
29724
29724
  this.once(DESTROYED, ondestroy);
29725
29725
  this.once("error", onerr);
29726
29726
  this.once("end", onend);
@@ -32147,9 +32147,9 @@ var require_index_688c5d50 = __commonJS({
32147
32147
  const parse11 = new parse$4(opt);
32148
32148
  const readSize = opt.maxReadSize || 16 * 1024 * 1024;
32149
32149
  const file2 = opt.file;
32150
- const p2 = new Promise((resolve14, reject) => {
32150
+ const p2 = new Promise((resolve15, reject) => {
32151
32151
  parse11.on("error", reject);
32152
- parse11.on("end", resolve14);
32152
+ parse11.on("end", resolve15);
32153
32153
  fs__default["default"].stat(file2, (er, stat) => {
32154
32154
  if (er)
32155
32155
  reject(er);
@@ -32360,7 +32360,7 @@ var require_index_688c5d50 = __commonJS({
32360
32360
  };
32361
32361
  fs__default["default"].read(fd, headBuf, 0, 512, position, onread);
32362
32362
  };
32363
- const promise = new Promise((resolve14, reject) => {
32363
+ const promise = new Promise((resolve15, reject) => {
32364
32364
  p2.on("error", reject);
32365
32365
  let flag = "r+";
32366
32366
  const onopen = (er, fd) => {
@@ -32382,7 +32382,7 @@ var require_index_688c5d50 = __commonJS({
32382
32382
  });
32383
32383
  p2.pipe(stream);
32384
32384
  stream.on("error", reject);
32385
- stream.on("close", resolve14);
32385
+ stream.on("close", resolve15);
32386
32386
  addFilesAsync(p2, files);
32387
32387
  });
32388
32388
  });
@@ -32459,7 +32459,7 @@ var require_index_688c5d50 = __commonJS({
32459
32459
  };
32460
32460
  var optsArg_1 = optsArg;
32461
32461
  var platform$2 = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;
32462
- var { resolve: resolve13, parse: parse$3 } = path__default["default"];
32462
+ var { resolve: resolve14, parse: parse$3 } = path__default["default"];
32463
32463
  var pathArg = (path7) => {
32464
32464
  if (/\0/.test(path7)) {
32465
32465
  throw Object.assign(
@@ -32470,7 +32470,7 @@ var require_index_688c5d50 = __commonJS({
32470
32470
  }
32471
32471
  );
32472
32472
  }
32473
- path7 = resolve13(path7);
32473
+ path7 = resolve14(path7);
32474
32474
  if (platform$2 === "win32") {
32475
32475
  const badWinChars = /[*|"<>?:]/;
32476
32476
  const { root } = parse$3(path7);
@@ -33549,9 +33549,9 @@ var require_index_688c5d50 = __commonJS({
33549
33549
  const u2 = new unpack(opt);
33550
33550
  const readSize = opt.maxReadSize || 16 * 1024 * 1024;
33551
33551
  const file2 = opt.file;
33552
- const p2 = new Promise((resolve14, reject) => {
33552
+ const p2 = new Promise((resolve15, reject) => {
33553
33553
  u2.on("error", reject);
33554
- u2.on("close", resolve14);
33554
+ u2.on("close", resolve15);
33555
33555
  fs__default["default"].stat(file2, (er, stat) => {
33556
33556
  if (er)
33557
33557
  reject(er);
@@ -38866,12 +38866,12 @@ var require_index_688c5d50 = __commonJS({
38866
38866
  });
38867
38867
  function promisify7(fn) {
38868
38868
  return function(req, opts) {
38869
- return new Promise((resolve14, reject) => {
38869
+ return new Promise((resolve15, reject) => {
38870
38870
  fn.call(this, req, opts, (err, rtn) => {
38871
38871
  if (err) {
38872
38872
  reject(err);
38873
38873
  } else {
38874
- resolve14(rtn);
38874
+ resolve15(rtn);
38875
38875
  }
38876
38876
  });
38877
38877
  });
@@ -39062,7 +39062,7 @@ var require_index_688c5d50 = __commonJS({
39062
39062
  var debug_1$1 = __importDefault$2(src$1);
39063
39063
  var debug$1 = debug_1$1.default("https-proxy-agent:parse-proxy-response");
39064
39064
  function parseProxyResponse(socket) {
39065
- return new Promise((resolve14, reject) => {
39065
+ return new Promise((resolve15, reject) => {
39066
39066
  let buffersLength = 0;
39067
39067
  const buffers = [];
39068
39068
  function read() {
@@ -39102,7 +39102,7 @@ var require_index_688c5d50 = __commonJS({
39102
39102
  const firstLine = buffered.toString("ascii", 0, buffered.indexOf("\r\n"));
39103
39103
  const statusCode = +firstLine.split(" ")[1];
39104
39104
  debug$1("got proxy server response: %o", firstLine);
39105
- resolve14({
39105
+ resolve15({
39106
39106
  statusCode,
39107
39107
  buffered
39108
39108
  });
@@ -39119,11 +39119,11 @@ var require_index_688c5d50 = __commonJS({
39119
39119
  }, "__esModule", { value: true });
39120
39120
  var __awaiter2 = commonjsGlobal && commonjsGlobal.__awaiter || function(thisArg, _arguments, P2, generator) {
39121
39121
  function adopt(value) {
39122
- return value instanceof P2 ? value : new P2(function(resolve14) {
39123
- resolve14(value);
39122
+ return value instanceof P2 ? value : new P2(function(resolve15) {
39123
+ resolve15(value);
39124
39124
  });
39125
39125
  }
39126
- return new (P2 || (P2 = Promise))(function(resolve14, reject) {
39126
+ return new (P2 || (P2 = Promise))(function(resolve15, reject) {
39127
39127
  function fulfilled(value) {
39128
39128
  try {
39129
39129
  step(generator.next(value));
@@ -39139,7 +39139,7 @@ var require_index_688c5d50 = __commonJS({
39139
39139
  }
39140
39140
  }
39141
39141
  function step(result) {
39142
- result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
39142
+ result.done ? resolve15(result.value) : adopt(result.value).then(fulfilled, rejected);
39143
39143
  }
39144
39144
  step((generator = generator.apply(thisArg, _arguments || [])).next());
39145
39145
  });
@@ -48390,11 +48390,11 @@ function __metadata(metadataKey, metadataValue) {
48390
48390
  }
48391
48391
  function __awaiter(thisArg, _arguments, P2, generator) {
48392
48392
  function adopt(value) {
48393
- return value instanceof P2 ? value : new P2(function(resolve13) {
48394
- resolve13(value);
48393
+ return value instanceof P2 ? value : new P2(function(resolve14) {
48394
+ resolve14(value);
48395
48395
  });
48396
48396
  }
48397
- return new (P2 || (P2 = Promise))(function(resolve13, reject) {
48397
+ return new (P2 || (P2 = Promise))(function(resolve14, reject) {
48398
48398
  function fulfilled(value) {
48399
48399
  try {
48400
48400
  step(generator.next(value));
@@ -48410,7 +48410,7 @@ function __awaiter(thisArg, _arguments, P2, generator) {
48410
48410
  }
48411
48411
  }
48412
48412
  function step(result) {
48413
- result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
48413
+ result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
48414
48414
  }
48415
48415
  step((generator = generator.apply(thisArg, _arguments || [])).next());
48416
48416
  });
@@ -48601,14 +48601,14 @@ function __asyncValues(o) {
48601
48601
  }, i);
48602
48602
  function verb(n) {
48603
48603
  i[n] = o[n] && function(v) {
48604
- return new Promise(function(resolve13, reject) {
48605
- v = o[n](v), settle(resolve13, reject, v.done, v.value);
48604
+ return new Promise(function(resolve14, reject) {
48605
+ v = o[n](v), settle(resolve14, reject, v.done, v.value);
48606
48606
  });
48607
48607
  };
48608
48608
  }
48609
- function settle(resolve13, reject, d2, v) {
48609
+ function settle(resolve14, reject, d2, v) {
48610
48610
  Promise.resolve(v).then(function(v2) {
48611
- resolve13({ value: v2, done: d2 });
48611
+ resolve14({ value: v2, done: d2 });
48612
48612
  }, reject);
48613
48613
  }
48614
48614
  }
@@ -73533,12 +73533,12 @@ var require_packet = __commonJS({
73533
73533
  let chunklen = 0;
73534
73534
  let received = false;
73535
73535
  let expected = false;
73536
- return new Promise((resolve13, reject) => {
73536
+ return new Promise((resolve14, reject) => {
73537
73537
  const processMessage = () => {
73538
73538
  if (received) return;
73539
73539
  received = true;
73540
73540
  const buffer = Buffer.concat(chunks, chunklen);
73541
- resolve13(buffer.slice(2));
73541
+ resolve14(buffer.slice(2));
73542
73542
  };
73543
73543
  socket.on("end", processMessage);
73544
73544
  socket.on("error", reject);
@@ -73600,15 +73600,15 @@ var require_udp = __commonJS({
73600
73600
  if (message instanceof Packet) {
73601
73601
  message = message.toBuffer();
73602
73602
  }
73603
- return new Promise((resolve13, reject) => {
73603
+ return new Promise((resolve14, reject) => {
73604
73604
  this.send(message, rinfo.port, rinfo.address, (err) => {
73605
73605
  if (err) return reject(err);
73606
- resolve13(message);
73606
+ resolve14(message);
73607
73607
  });
73608
73608
  });
73609
73609
  }
73610
73610
  listen(port, address) {
73611
- return new Promise((resolve13) => this.bind(port, address, resolve13));
73611
+ return new Promise((resolve14) => this.bind(port, address, resolve14));
73612
73612
  }
73613
73613
  };
73614
73614
  module2.exports = Server;
@@ -73670,11 +73670,11 @@ var require_doh = __commonJS({
73670
73670
  }
73671
73671
  return queryData;
73672
73672
  };
73673
- var readStream = (stream) => new Promise((resolve13, reject) => {
73673
+ var readStream = (stream) => new Promise((resolve14, reject) => {
73674
73674
  let buffer = "";
73675
73675
  stream.on("error", reject).on("data", (chunk) => {
73676
73676
  buffer += chunk;
73677
- }).on("end", () => resolve13(buffer));
73677
+ }).on("end", () => resolve14(buffer));
73678
73678
  });
73679
73679
  var Server = class extends EventEmitter {
73680
73680
  constructor(options) {
@@ -73800,12 +73800,12 @@ var require_dns2 = __commonJS({
73800
73800
  }
73801
73801
  const servers = Object.values(this.servers);
73802
73802
  this.closed = Promise.all(
73803
- servers.map((server) => new Promise((resolve13) => server.once("close", resolve13)))
73803
+ servers.map((server) => new Promise((resolve14) => server.once("close", resolve14)))
73804
73804
  ).then(() => {
73805
73805
  this.emit("close");
73806
73806
  });
73807
73807
  this.listening = Promise.all(
73808
- servers.map((server) => new Promise((resolve13) => server.once("listening", resolve13)))
73808
+ servers.map((server) => new Promise((resolve14) => server.once("listening", resolve14)))
73809
73809
  ).then(() => {
73810
73810
  const addresses = this.addresses();
73811
73811
  this.emit("listening", addresses);
@@ -73937,18 +73937,18 @@ var require_tcp2 = __commonJS({
73937
73937
  var require_doh2 = __commonJS({
73938
73938
  "../../node_modules/.pnpm/dns2@2.1.0/node_modules/dns2/client/doh.js"(exports2, module2) {
73939
73939
  var Packet = require_packet();
73940
- var defaultGet = (url) => new Promise((resolve13, reject) => {
73940
+ var defaultGet = (url) => new Promise((resolve14, reject) => {
73941
73941
  const headers = {
73942
73942
  accept: "application/dns-message"
73943
73943
  };
73944
73944
  const base = url.startsWith("https") ? require("https") : require("http");
73945
- const req = base.get(url, { headers }, resolve13);
73945
+ const req = base.get(url, { headers }, resolve14);
73946
73946
  req.on("error", reject);
73947
73947
  });
73948
73948
  var readStream = (stream) => {
73949
73949
  const buffer = [];
73950
- return new Promise((resolve13, reject) => {
73951
- stream.on("error", reject).on("data", (chunk) => buffer.push(chunk)).on("end", () => resolve13(Buffer.concat(buffer)));
73950
+ return new Promise((resolve14, reject) => {
73951
+ stream.on("error", reject).on("data", (chunk) => buffer.push(chunk)).on("end", () => resolve14(Buffer.concat(buffer)));
73952
73952
  });
73953
73953
  };
73954
73954
  var DOHClient = ({ dns, http, get = defaultGet } = {}) => {
@@ -74001,12 +74001,12 @@ var require_udp2 = __commonJS({
74001
74001
  type: Packet.TYPE[type]
74002
74002
  });
74003
74003
  const client = new udp.Socket(socketType);
74004
- return new Promise((resolve13, reject) => {
74004
+ return new Promise((resolve14, reject) => {
74005
74005
  client.once("message", function onMessage(message) {
74006
74006
  client.close();
74007
74007
  const response = Packet.parse(message);
74008
74008
  equal(response.header.id, query.header.id);
74009
- resolve13(response);
74009
+ resolve14(response);
74010
74010
  });
74011
74011
  debug("send", dns, query.toBuffer());
74012
74012
  client.send(query.toBuffer(), port, dns, (err) => err && reject(err));
@@ -74020,13 +74020,13 @@ var require_udp2 = __commonJS({
74020
74020
  var require_google = __commonJS({
74021
74021
  "../../node_modules/.pnpm/dns2@2.1.0/node_modules/dns2/client/google.js"(exports2, module2) {
74022
74022
  var https = require("https");
74023
- var get = (url) => new Promise((resolve13) => https.get(url, resolve13));
74023
+ var get = (url) => new Promise((resolve14) => https.get(url, resolve14));
74024
74024
  var readStream = (stream) => {
74025
74025
  const buffer = [];
74026
- return new Promise((resolve13, reject) => {
74026
+ return new Promise((resolve14, reject) => {
74027
74027
  stream.on("error", reject).on("data", (chunk) => {
74028
74028
  buffer.push(chunk);
74029
- }).on("end", () => resolve13(Buffer.concat(buffer)));
74029
+ }).on("end", () => resolve14(Buffer.concat(buffer)));
74030
74030
  });
74031
74031
  };
74032
74032
  var GoogleClient = () => (name3, type = "ANY") => {
@@ -74087,8 +74087,8 @@ var require_dns22 = __commonJS({
74087
74087
  const { port, nameServers, recursive, resolverProtocol = "UDP" } = this;
74088
74088
  const createResolver = _DNS[resolverProtocol + "Client"];
74089
74089
  return Promise.race(nameServers.map((address) => {
74090
- const resolve13 = createResolver({ dns: address, port, recursive });
74091
- return resolve13(name3, type, cls, clientIp);
74090
+ const resolve14 = createResolver({ dns: address, port, recursive });
74091
+ return resolve14(name3, type, cls, clientIp);
74092
74092
  }));
74093
74093
  }
74094
74094
  /**
@@ -74137,7 +74137,6 @@ var cli_exports = {};
74137
74137
  __export(cli_exports, {
74138
74138
  main: () => main,
74139
74139
  runCli: () => runCli,
74140
- runLatest: () => runLatest,
74141
74140
  setupProjectDirectory: () => setupProjectDirectory
74142
74141
  });
74143
74142
  module.exports = __toCommonJS(cli_exports);
@@ -78830,8 +78829,8 @@ var require_command_exists = __commonJS2({
78830
78829
  var isPathName = /[\\]/.test(s);
78831
78830
  if (isPathName) {
78832
78831
  var dirname22 = '"' + path52.dirname(s) + '"';
78833
- var basename5 = '"' + path52.basename(s) + '"';
78834
- return dirname22 + ":" + basename5;
78832
+ var basename22 = '"' + path52.basename(s) + '"';
78833
+ return dirname22 + ":" + basename22;
78835
78834
  }
78836
78835
  return '"' + s + '"';
78837
78836
  }, "cleanInput");
@@ -78839,10 +78838,10 @@ var require_command_exists = __commonJS2({
78839
78838
  module2.exports = /* @__PURE__ */ __name(function commandExists(commandName, callback) {
78840
78839
  var cleanedCommandName = cleanInput(commandName);
78841
78840
  if (!callback && typeof Promise !== "undefined") {
78842
- return new Promise(function(resolve13, reject) {
78841
+ return new Promise(function(resolve22, reject) {
78843
78842
  commandExists(commandName, function(error2, output) {
78844
78843
  if (output) {
78845
- resolve13(commandName);
78844
+ resolve22(commandName);
78846
78845
  } else {
78847
78846
  reject(error2);
78848
78847
  }
@@ -79736,7 +79735,7 @@ var require_update_check = __commonJS2({
79736
79735
  });
79737
79736
  await writeFile4(file2, content, "utf8");
79738
79737
  }, "updateCache");
79739
- var loadPackage = /* @__PURE__ */ __name((url, authInfo) => new Promise((resolve13, reject) => {
79738
+ var loadPackage = /* @__PURE__ */ __name((url, authInfo) => new Promise((resolve22, reject) => {
79740
79739
  const options = {
79741
79740
  host: url.hostname,
79742
79741
  path: url.pathname,
@@ -79767,7 +79766,7 @@ var require_update_check = __commonJS2({
79767
79766
  response.on("end", () => {
79768
79767
  try {
79769
79768
  const parsedData = JSON.parse(rawData);
79770
- resolve13(parsedData);
79769
+ resolve22(parsedData);
79771
79770
  } catch (e2) {
79772
79771
  reject(e2);
79773
79772
  }
@@ -90216,7 +90215,7 @@ function terminateCloudflared(cloudflared) {
90216
90215
  }
90217
90216
  __name(terminateCloudflared, "terminateCloudflared");
90218
90217
  function waitForQuickTunnelReady(cloudflared, timeoutMs, options) {
90219
- return new Promise((resolve13, reject) => {
90218
+ return new Promise((resolve22, reject) => {
90220
90219
  let resolved = false;
90221
90220
  let stderrOutput = "";
90222
90221
  const logger = options?.logger;
@@ -90244,7 +90243,7 @@ function waitForQuickTunnelReady(cloudflared, timeoutMs, options) {
90244
90243
  if (match && !resolved) {
90245
90244
  resolved = true;
90246
90245
  clearTimeout(timeoutId);
90247
- resolve13({ mode: "quick", publicUrl: new URL(match[0]) });
90246
+ resolve22({ mode: "quick", publicUrl: new URL(match[0]) });
90248
90247
  }
90249
90248
  });
90250
90249
  }
@@ -90744,6 +90743,67 @@ function getHostFromUrl(urlLike) {
90744
90743
  }
90745
90744
  }
90746
90745
  __name(getHostFromUrl, "getHostFromUrl");
90746
+ var invalidWorkerNameCharsRegex = /[^a-z0-9- ]/g;
90747
+ var invalidWorkerNameStartEndRegex = /^(-+)|(-+)$/g;
90748
+ var workerNameLengthLimit = 63;
90749
+ function checkWorkerNameValidity(input) {
90750
+ if (!input) {
90751
+ return {
90752
+ valid: false,
90753
+ cause: "Worker names cannot be empty."
90754
+ };
90755
+ }
90756
+ if (input.match(invalidWorkerNameStartEndRegex)) {
90757
+ return {
90758
+ valid: false,
90759
+ cause: "Worker names cannot start or end with a dash."
90760
+ };
90761
+ }
90762
+ if (input.match(invalidWorkerNameCharsRegex)) {
90763
+ return {
90764
+ valid: false,
90765
+ cause: "Project names must only contain lowercase characters, numbers, and dashes."
90766
+ };
90767
+ }
90768
+ if (input.length > workerNameLengthLimit) {
90769
+ return {
90770
+ valid: false,
90771
+ cause: "Project names must be less than 63 characters."
90772
+ };
90773
+ }
90774
+ return { valid: true };
90775
+ }
90776
+ __name(checkWorkerNameValidity, "checkWorkerNameValidity");
90777
+ function toValidWorkerName(input) {
90778
+ if (checkWorkerNameValidity(input).valid) {
90779
+ return input;
90780
+ }
90781
+ input = input.replaceAll("_", "-").replace(invalidWorkerNameCharsRegex, "-").replace(invalidWorkerNameStartEndRegex, "").slice(0, workerNameLengthLimit);
90782
+ if (!input.length) {
90783
+ return "my-worker";
90784
+ }
90785
+ return input;
90786
+ }
90787
+ __name(toValidWorkerName, "toValidWorkerName");
90788
+ function getWorkerName(projectOrWorkerName = "", projectPath) {
90789
+ const rawName = getCIOverrideName() ?? (projectOrWorkerName || (0, import_node_path2.basename)(projectPath));
90790
+ return toValidWorkerName(rawName);
90791
+ }
90792
+ __name(getWorkerName, "getWorkerName");
90793
+ function getWorkerNameFromProject(projectPath) {
90794
+ const packageJsonPath = (0, import_node_path2.resolve)(projectPath, "package.json");
90795
+ let packageJsonName;
90796
+ try {
90797
+ const packageJson = parsePackageJSON(
90798
+ readFileSync(packageJsonPath),
90799
+ packageJsonPath
90800
+ );
90801
+ packageJsonName = packageJson.name;
90802
+ } catch {
90803
+ }
90804
+ return getWorkerName(packageJsonName, projectPath);
90805
+ }
90806
+ __name(getWorkerNameFromProject, "getWorkerNameFromProject");
90747
90807
 
90748
90808
  // ../cli/dist/check-macos-version.mjs
90749
90809
  var import_ci_info = __toESM(require_ci_info(), 1);
@@ -92737,88 +92797,6 @@ function isInteractive() {
92737
92797
  }
92738
92798
  }
92739
92799
 
92740
- // ../cli/dist/command.mjs
92741
- var import_cross_spawn = __toESM(require_cross_spawn(), 1);
92742
- var runCommand = async (command2, opts = {}) => {
92743
- return printAsyncStatus({
92744
- useSpinner: opts.useSpinner ?? opts.silent,
92745
- startText: opts.startText || quoteShellArgs(command2),
92746
- doneText: opts.doneText,
92747
- promise() {
92748
- const [executable, ...args] = command2;
92749
- const abortController = new AbortController();
92750
- const cmd = (0, import_cross_spawn.spawn)(executable, [...args], {
92751
- stdio: opts.silent ? "pipe" : "inherit",
92752
- env: {
92753
- ...process.env,
92754
- ...opts.env
92755
- },
92756
- cwd: opts.cwd,
92757
- signal: abortController.signal
92758
- });
92759
- let output = ``;
92760
- if (opts.captureOutput ?? opts.silent) {
92761
- cmd.stdout?.on("data", (data) => {
92762
- output += data;
92763
- });
92764
- cmd.stderr?.on("data", (data) => {
92765
- output += data;
92766
- });
92767
- }
92768
- let cleanup = null;
92769
- return new Promise((resolvePromise, reject) => {
92770
- const cancel2 = (signal) => {
92771
- reject(new CancelError(`Command cancelled`, signal));
92772
- abortController.abort(signal ? `${signal} received` : null);
92773
- };
92774
- process.on("SIGTERM", cancel2).on("SIGINT", cancel2);
92775
- cleanup = () => {
92776
- process.off("SIGTERM", cancel2).off("SIGINT", cancel2);
92777
- };
92778
- cmd.on("close", (code) => {
92779
- try {
92780
- if (code !== 0) throw new Error(output, { cause: code });
92781
- resolvePromise((opts.transformOutput ?? ((result) => result))(stripAnsi(output)));
92782
- } catch (e) {
92783
- reject(new Error(output, { cause: e }));
92784
- }
92785
- });
92786
- cmd.on("error", (error2) => {
92787
- reject(error2);
92788
- });
92789
- }).finally(() => {
92790
- cleanup?.();
92791
- });
92792
- }
92793
- });
92794
- };
92795
- var printAsyncStatus = async ({ promise, ...opts }) => {
92796
- let s;
92797
- if (opts.useSpinner && isInteractive()) s = spinner();
92798
- s?.start(opts?.startText);
92799
- if (typeof promise === "function") promise = promise();
92800
- try {
92801
- const output = await promise;
92802
- const doneText = typeof opts.doneText === "function" ? opts.doneText(output) : opts.doneText;
92803
- s?.stop(doneText);
92804
- } catch (err) {
92805
- s?.stop(err.message);
92806
- } finally {
92807
- s?.stop();
92808
- }
92809
- return promise;
92810
- };
92811
- function quoteShellArgs(args) {
92812
- if (process.platform === "win32") {
92813
- const specialCharsMatcher = /[&<>[\]|{}^=;!'+,`~\s]/;
92814
- return args.map((arg) => arg.match(specialCharsMatcher) ? `"${arg.replaceAll(`"`, `""`)}"` : arg).join(" ");
92815
- } else return args.map((s) => {
92816
- if (/["\s]/.test(s) && !/'/.test(s)) return "'" + s.replace(/(['\\])/g, "\\$1") + "'";
92817
- if (/["'\s]/.test(s)) return '"' + s.replace(/(["\\$`!])/g, "\\$1") + '"';
92818
- return s;
92819
- }).join(" ");
92820
- }
92821
-
92822
92800
  // ../cli/dist/gitignore.mjs
92823
92801
  var import_node_fs3 = require("node:fs");
92824
92802
  var import_node_path3 = require("node:path");
@@ -96666,12 +96644,12 @@ var YargsInstance = class {
96666
96644
  async getCompletion(args, done) {
96667
96645
  argsert("<array> [function]", [args, done], arguments.length);
96668
96646
  if (!done) {
96669
- return new Promise((resolve13, reject) => {
96647
+ return new Promise((resolve14, reject) => {
96670
96648
  __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(args, (err, completions) => {
96671
96649
  if (err)
96672
96650
  reject(err);
96673
96651
  else
96674
- resolve13(completions);
96652
+ resolve14(completions);
96675
96653
  });
96676
96654
  });
96677
96655
  } else {
@@ -97711,7 +97689,7 @@ var Yargs = YargsFactory(esm_default2);
97711
97689
  var yargs_default = Yargs;
97712
97690
 
97713
97691
  // package.json
97714
- var version = "2.70.4";
97692
+ var version = "2.70.5";
97715
97693
 
97716
97694
  // src/metrics.ts
97717
97695
  var import_node_async_hooks = require("node:async_hooks");
@@ -97787,6 +97765,90 @@ function getDeviceId(config49) {
97787
97765
  // src/helpers/packageManagers.ts
97788
97766
  var import_node_fs6 = require("node:fs");
97789
97767
  var import_node_path6 = __toESM(require("node:path"));
97768
+
97769
+ // ../cli/dist/command.mjs
97770
+ var import_cross_spawn = __toESM(require_cross_spawn(), 1);
97771
+ var runCommand = async (command2, opts = {}) => {
97772
+ return printAsyncStatus({
97773
+ useSpinner: opts.useSpinner ?? opts.silent,
97774
+ startText: opts.startText || quoteShellArgs(command2),
97775
+ doneText: opts.doneText,
97776
+ promise() {
97777
+ const [executable, ...args] = command2;
97778
+ const abortController = new AbortController();
97779
+ const cmd = (0, import_cross_spawn.spawn)(executable, [...args], {
97780
+ stdio: opts.silent ? "pipe" : "inherit",
97781
+ env: {
97782
+ ...process.env,
97783
+ ...opts.env
97784
+ },
97785
+ cwd: opts.cwd,
97786
+ signal: abortController.signal
97787
+ });
97788
+ let output = ``;
97789
+ if (opts.captureOutput ?? opts.silent) {
97790
+ cmd.stdout?.on("data", (data) => {
97791
+ output += data;
97792
+ });
97793
+ cmd.stderr?.on("data", (data) => {
97794
+ output += data;
97795
+ });
97796
+ }
97797
+ let cleanup = null;
97798
+ return new Promise((resolvePromise, reject) => {
97799
+ const cancel2 = (signal) => {
97800
+ reject(new CancelError(`Command cancelled`, signal));
97801
+ abortController.abort(signal ? `${signal} received` : null);
97802
+ };
97803
+ process.on("SIGTERM", cancel2).on("SIGINT", cancel2);
97804
+ cleanup = () => {
97805
+ process.off("SIGTERM", cancel2).off("SIGINT", cancel2);
97806
+ };
97807
+ cmd.on("close", (code) => {
97808
+ try {
97809
+ if (code !== 0) throw new Error(output, { cause: code });
97810
+ resolvePromise((opts.transformOutput ?? ((result) => result))(stripAnsi(output)));
97811
+ } catch (e) {
97812
+ reject(new Error(output, { cause: e }));
97813
+ }
97814
+ });
97815
+ cmd.on("error", (error2) => {
97816
+ reject(error2);
97817
+ });
97818
+ }).finally(() => {
97819
+ cleanup?.();
97820
+ });
97821
+ }
97822
+ });
97823
+ };
97824
+ var printAsyncStatus = async ({ promise, ...opts }) => {
97825
+ let s;
97826
+ if (opts.useSpinner && isInteractive()) s = spinner();
97827
+ s?.start(opts?.startText);
97828
+ if (typeof promise === "function") promise = promise();
97829
+ try {
97830
+ const output = await promise;
97831
+ const doneText = typeof opts.doneText === "function" ? opts.doneText(output) : opts.doneText;
97832
+ s?.stop(doneText);
97833
+ } catch (err) {
97834
+ s?.stop(err.message);
97835
+ } finally {
97836
+ s?.stop();
97837
+ }
97838
+ return promise;
97839
+ };
97840
+ function quoteShellArgs(args) {
97841
+ if (process.platform === "win32") {
97842
+ const specialCharsMatcher = /[&<>[\]|{}^=;!'+,`~\s]/;
97843
+ return args.map((arg) => arg.match(specialCharsMatcher) ? `"${arg.replaceAll(`"`, `""`)}"` : arg).join(" ");
97844
+ } else return args.map((s) => {
97845
+ if (/["\s]/.test(s) && !/'/.test(s)) return "'" + s.replace(/(['\\])/g, "\\$1") + "'";
97846
+ if (/["'\s]/.test(s)) return '"' + s.replace(/(["\\$`!])/g, "\\$1") + '"';
97847
+ return s;
97848
+ }).join(" ");
97849
+ }
97850
+
97851
+ // src/helpers/packageManagers.ts
97790
97852
  var import_semver = __toESM(require_semver2());
97791
97853
  var import_which_pm_runs = __toESM(require_which_pm_runs());
97792
97854
 
@@ -97882,7 +97944,7 @@ var detectPackageManager = () => {
97882
97944
  }
97883
97945
  };
97884
97946
  var rectifyPmMismatch = async (ctx) => {
97885
- const { npm: npm25 } = detectPackageManager();
97947
+ const { npm: npm24 } = detectPackageManager();
97886
97948
  if (!detectPmMismatch(ctx)) {
97887
97949
  return;
97888
97950
  }
@@ -97899,17 +97961,17 @@ var rectifyPmMismatch = async (ctx) => {
97899
97961
  if ((0, import_node_fs6.existsSync)(lockfilePath)) {
97900
97962
  (0, import_node_fs6.rmSync)(lockfilePath);
97901
97963
  }
97902
- await runCommand([npm25, "install"], {
97964
+ await runCommand([npm24, "install"], {
97903
97965
  silent: true,
97904
97966
  cwd: ctx.project.path,
97905
97967
  startText: "Installing dependencies",
97906
- doneText: `${brandColor("installed")} ${dim(`via \`${npm25} install\``)}`
97968
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm24} install\``)}`
97907
97969
  });
97908
97970
  };
97909
97971
  var detectPmMismatch = (ctx) => {
97910
- const { npm: npm25 } = detectPackageManager();
97972
+ const { npm: npm24 } = detectPackageManager();
97911
97973
  const projectPath = ctx.project.path;
97912
- switch (npm25) {
97974
+ switch (npm24) {
97913
97975
  case "npm":
97914
97976
  return false;
97915
97977
  case "yarn":
@@ -97950,16 +98012,16 @@ async function sendEvent(payload, enableLog) {
97950
98012
 
97951
98013
  // src/metrics.ts
97952
98014
  function promiseWithResolvers() {
97953
- let resolve13;
98015
+ let resolve14;
97954
98016
  let reject;
97955
98017
  const promise = new Promise((res, rej) => {
97956
- resolve13 = res;
98018
+ resolve14 = res;
97957
98019
  reject = rej;
97958
98020
  });
97959
- if (!resolve13 || !reject) {
98021
+ if (!resolve14 || !reject) {
97960
98022
  throw new Error("Promise resolvers not set");
97961
98023
  }
97962
- return { resolve: resolve13, reject, promise };
98024
+ return { resolve: resolve14, reject, promise };
97963
98025
  }
97964
98026
  function getPlatform() {
97965
98027
  const platform2 = process.platform;
@@ -99171,8 +99233,8 @@ var hasTsConfig = (path6) => {
99171
99233
  var APPROVED_BUILDS = ["esbuild", "workerd", "sharp"];
99172
99234
  var APPROVED_BUILDS_SET = new Set(APPROVED_BUILDS);
99173
99235
  var writePnpmBuildApprovals = (projectPath) => {
99174
- const { npm: npm25 } = detectPackageManager();
99175
- if (npm25 !== "pnpm") {
99236
+ const { npm: npm24 } = detectPackageManager();
99237
+ if (npm24 !== "pnpm") {
99176
99238
  return;
99177
99239
  }
99178
99240
  const yamlPath = (0, import_node_path9.join)(projectPath, "pnpm-workspace.yaml");
@@ -99319,49 +99381,49 @@ var getPnpmIgnoredBuildsGuidance = (packages = []) => {
99319
99381
 
99320
99382
  // src/helpers/packages.ts
99321
99383
  var installPackages2 = async (packages, config49 = {}) => {
99322
- const { npm: npm25 } = detectPackageManager();
99323
- return installPackages(npm25, packages, config49);
99384
+ const { npm: npm24 } = detectPackageManager();
99385
+ return installPackages(npm24, packages, config49);
99324
99386
  };
99325
99387
  async function installWrangler2() {
99326
- const { npm: npm25 } = detectPackageManager();
99327
- return installWrangler(npm25, false);
99388
+ const { npm: npm24 } = detectPackageManager();
99389
+ return installWrangler(npm24, false);
99328
99390
  }
99329
99391
  var npmInstall = async (ctx) => {
99330
99392
  const nodeModulesPath = import_node_path10.default.join(ctx.project.path, "node_modules");
99331
99393
  if ((0, import_node_fs9.existsSync)(nodeModulesPath)) {
99332
99394
  return;
99333
99395
  }
99334
- const { npm: npm25 } = detectPackageManager();
99335
- if (npm25 === "pnpm") {
99336
- await pnpmInstallWithBuildApprovalRetry(npm25);
99396
+ const { npm: npm24 } = detectPackageManager();
99397
+ if (npm24 === "pnpm") {
99398
+ await pnpmInstallWithBuildApprovalRetry(npm24);
99337
99399
  return;
99338
99400
  }
99339
- await runCommand([npm25, "install"], {
99401
+ await runCommand([npm24, "install"], {
99340
99402
  silent: true,
99341
99403
  startText: "Installing dependencies",
99342
- doneText: `${brandColor("installed")} ${dim(`via \`${npm25} install\``)}`
99404
+ doneText: `${brandColor("installed")} ${dim(`via \`${npm24} install\``)}`
99343
99405
  });
99344
99406
  };
99345
- var runPnpmInstallQuiet = async (npm25, startText) => {
99407
+ var runPnpmInstallQuiet = async (npm24, startText) => {
99346
99408
  const s = spinner();
99347
99409
  s.start(startText);
99348
99410
  try {
99349
- await runCommand([npm25, "install"], { silent: true, useSpinner: false });
99350
- s.stop(`${brandColor("installed")} ${dim(`via \`${npm25} install\``)}`);
99411
+ await runCommand([npm24, "install"], { silent: true, useSpinner: false });
99412
+ s.stop(`${brandColor("installed")} ${dim(`via \`${npm24} install\``)}`);
99351
99413
  } catch (err) {
99352
99414
  s.stop(red("install failed"));
99353
99415
  throw err;
99354
99416
  }
99355
99417
  };
99356
- var pnpmInstallWithBuildApprovalRetry = async (npm25) => {
99418
+ var pnpmInstallWithBuildApprovalRetry = async (npm24) => {
99357
99419
  try {
99358
- await runPnpmInstallQuiet(npm25, "Installing dependencies");
99420
+ await runPnpmInstallQuiet(npm24, "Installing dependencies");
99359
99421
  return;
99360
99422
  } catch (err) {
99361
99423
  if (!isPnpmIgnoredBuildsError(err)) {
99362
99424
  throw err;
99363
99425
  }
99364
- await recoverFromIgnoredBuilds(npm25, err);
99426
+ await recoverFromIgnoredBuilds(npm24, err);
99365
99427
  }
99366
99428
  };
99367
99429
  var STDIN_EOF_MARKER = "__c3_stdin_eof__";
@@ -99393,7 +99455,7 @@ var promptOrEOF = async (packages) => {
99393
99455
  }
99394
99456
  }
99395
99457
  };
99396
- var recoverFromIgnoredBuilds = async (npm25, originalErr) => {
99458
+ var recoverFromIgnoredBuilds = async (npm24, originalErr) => {
99397
99459
  const packages = extractIgnoredBuildPackages(originalErr);
99398
99460
  if (packages.length === 0) {
99399
99461
  throw new IgnoredBuildsError([], originalErr);
@@ -99413,13 +99475,13 @@ var recoverFromIgnoredBuilds = async (npm25, originalErr) => {
99413
99475
  if (!approve) {
99414
99476
  throw new IgnoredBuildsError(packages, originalErr);
99415
99477
  }
99416
- await runCommand([npm25, "approve-builds", ...packages], {
99478
+ await runCommand([npm24, "approve-builds", ...packages], {
99417
99479
  silent: true,
99418
99480
  startText: "Approving dependency build scripts",
99419
99481
  doneText: `${brandColor("approved")} ${dim(packages.join(", "))}`
99420
99482
  });
99421
99483
  try {
99422
- await runPnpmInstallQuiet(npm25, "Re-running install");
99484
+ await runPnpmInstallQuiet(npm24, "Re-running install");
99423
99485
  } catch (retryErr) {
99424
99486
  if (isPnpmIgnoredBuildsError(retryErr)) {
99425
99487
  throw new IgnoredBuildsError(
@@ -99942,19 +100004,19 @@ var baseOpen = async (options) => {
99942
100004
  }
99943
100005
  const subprocess = import_node_child_process8.default.spawn(command2, cliArguments, childProcessOptions);
99944
100006
  if (options.wait) {
99945
- return new Promise((resolve13, reject) => {
100007
+ return new Promise((resolve14, reject) => {
99946
100008
  subprocess.once("error", reject);
99947
100009
  subprocess.once("close", (exitCode) => {
99948
100010
  if (!options.allowNonzeroExitCode && exitCode !== 0) {
99949
100011
  reject(new Error(`Exited with code ${exitCode}`));
99950
100012
  return;
99951
100013
  }
99952
- resolve13(subprocess);
100014
+ resolve14(subprocess);
99953
100015
  });
99954
100016
  });
99955
100017
  }
99956
100018
  if (isFallbackAttempt) {
99957
- return new Promise((resolve13, reject) => {
100019
+ return new Promise((resolve14, reject) => {
99958
100020
  subprocess.once("error", reject);
99959
100021
  subprocess.once("spawn", () => {
99960
100022
  subprocess.once("close", (exitCode) => {
@@ -99964,17 +100026,17 @@ var baseOpen = async (options) => {
99964
100026
  return;
99965
100027
  }
99966
100028
  subprocess.unref();
99967
- resolve13(subprocess);
100029
+ resolve14(subprocess);
99968
100030
  });
99969
100031
  });
99970
100032
  });
99971
100033
  }
99972
100034
  subprocess.unref();
99973
- return new Promise((resolve13, reject) => {
100035
+ return new Promise((resolve14, reject) => {
99974
100036
  subprocess.once("error", reject);
99975
100037
  subprocess.once("spawn", () => {
99976
100038
  subprocess.off("error", reject);
99977
- resolve13(subprocess);
100039
+ resolve14(subprocess);
99978
100040
  });
99979
100041
  });
99980
100042
  };
@@ -100075,6 +100137,19 @@ var isUpdateAvailable = async () => {
100075
100137
  s.stop();
100076
100138
  }
100077
100139
  };
100140
+ var runLatest = async () => {
100141
+ const { npm: npm24 } = detectPackageManager();
100142
+ const args = process.argv.slice(2);
100143
+ if (npm24 === "npm") {
100144
+ args.unshift("--");
100145
+ }
100146
+ await runCommand([npm24, "create", "cloudflare@latest", ...args], {
100147
+ // Mark the spawned process so it doesn't attempt to update and re-spawn
100148
+ // again, which would loop indefinitely when the package manager keeps
100149
+ // resolving the same version of `cloudflare@latest`.
100150
+ env: { CREATE_CLOUDFLARE_RELAUNCHED: "true" }
100151
+ });
100152
+ };
100078
100153
  var C3_DEFAULTS = {
100079
100154
  projectName: new import_haikunator.default().haikunate({ tokenHex: true }),
100080
100155
  category: "hello-world",
@@ -100213,9 +100288,9 @@ var getFrameworkCli = (ctx, withVersion = true) => {
100213
100288
  };
100214
100289
  var runFrameworkGenerator = async (ctx, args) => {
100215
100290
  const cli = getFrameworkCli(ctx, true);
100216
- const { npm: npm25, dlx } = detectPackageManager();
100217
- const cmd = [...npm25 === "yarn" ? ["npx"] : dlx, cli, ...args];
100218
- const env3 = npm25 === "yarn" && !process.env.npm_config_user_agent?.startsWith("yarn") ? { npm_config_user_agent: "yarn/1.22.22" } : {};
100291
+ const { npm: npm24, dlx } = detectPackageManager();
100292
+ const cmd = [...npm24 === "yarn" ? ["npx"] : dlx, cli, ...args];
100293
+ const env3 = npm24 === "yarn" && !process.env.npm_config_user_agent?.startsWith("yarn") ? { npm_config_user_agent: "yarn/1.22.22" } : {};
100219
100294
  if (ctx.args.additionalArgs?.length) {
100220
100295
  cmd.push(...ctx.args.additionalArgs);
100221
100296
  }
@@ -102665,7 +102740,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
102665
102740
  var import_node_assert6 = __toESM(require("node:assert"));
102666
102741
 
102667
102742
  // ../wrangler/package.json
102668
- var version2 = "4.102.0";
102743
+ var version2 = "4.103.0";
102669
102744
 
102670
102745
  // src/git.ts
102671
102746
  var offerGit = async (ctx) => {
@@ -104284,7 +104359,7 @@ function addNodejsCompatFlagToToml(wranglerConfig) {
104284
104359
 
104285
104360
  // src/deploy.ts
104286
104361
  var offerToDeploy = async (ctx) => {
104287
- const { npm: npm25 } = detectPackageManager();
104362
+ const { npm: npm24 } = detectPackageManager();
104288
104363
  startSection(`Deploy with Cloudflare`, `Step 3 of 3`);
104289
104364
  if (!await isDeployable(ctx)) {
104290
104365
  ctx.args.deploy = false;
@@ -104295,7 +104370,7 @@ var offerToDeploy = async (ctx) => {
104295
104370
  );
104296
104371
  }
104297
104372
  const label = `deploy via \`${quoteShellArgs([
104298
- npm25,
104373
+ npm24,
104299
104374
  "run",
104300
104375
  ctx.template.deployScript ?? "deploy"
104301
104376
  ])}\``;
@@ -104331,11 +104406,11 @@ var readWranglerConfig = (ctx) => {
104331
104406
  return dist_default4.parse(wranglerTomlStr.replace(/\r\n/g, "\n"));
104332
104407
  };
104333
104408
  var runDeploy = async (ctx) => {
104334
- const { npm: npm25, name: pm3 } = detectPackageManager();
104409
+ const { npm: npm24, name: pm3 } = detectPackageManager();
104335
104410
  if (!ctx.account?.id) {
104336
104411
  throw new Error("Failed to read Cloudflare account.");
104337
104412
  }
104338
- const baseDeployCmd = [npm25, "run", ctx.template.deployScript ?? "deploy"];
104413
+ const baseDeployCmd = [npm24, "run", ctx.template.deployScript ?? "deploy"];
104339
104414
  const insideGitRepo = await isInsideGitRepo(ctx.project.path);
104340
104415
  const deployCmd = [
104341
104416
  ...baseDeployCmd,
@@ -104451,9 +104526,9 @@ var printSummary = (ctx) => {
104451
104526
  const dashboardUrl = ctx.account ? `https://dash.cloudflare.com/?to=/:account/workers/services/view/${ctx.project.name}/production` : null;
104452
104527
  const relativePath = (0, import_node_path23.relative)(ctx.originalCWD, ctx.project.path);
104453
104528
  const cdCommand = relativePath ? `cd ${relativePath}` : null;
104454
- const { npm: npm25 } = detectPackageManager();
104529
+ const { npm: npm24 } = detectPackageManager();
104455
104530
  const deployCommand = quoteShellArgs([
104456
- npm25,
104531
+ npm24,
104457
104532
  "run",
104458
104533
  ctx.template.deployScript ?? "deploy"
104459
104534
  ]);
@@ -106241,16 +106316,16 @@ async function addTypes(ctx) {
106241
106316
  if (!usesTypescript(ctx) || ctx.template.workersTypes === "none") {
106242
106317
  return;
106243
106318
  }
106244
- const { npm: npm25 } = detectPackageManager();
106319
+ const { npm: npm24 } = detectPackageManager();
106245
106320
  if (ctx.template.workersTypes === "installed") {
106246
- await installWorkersTypes(npm25);
106321
+ await installWorkersTypes(npm24);
106247
106322
  } else if (ctx.template.workersTypes === "generated") {
106248
- await generateWorkersTypes(ctx, npm25);
106323
+ await generateWorkersTypes(ctx, npm24);
106249
106324
  }
106250
- const usesNodeCompat = await maybeInstallNodeTypes(ctx, npm25);
106325
+ const usesNodeCompat = await maybeInstallNodeTypes(ctx, npm24);
106251
106326
  await updateTsConfig(ctx, { usesNodeCompat });
106252
106327
  }
106253
- async function generateWorkersTypes(ctx, npm25) {
106328
+ async function generateWorkersTypes(ctx, npm24) {
106254
106329
  const packageJsonPath = (0, import_node_path24.join)(ctx.project.path, "package.json");
106255
106330
  if (!(0, import_node_fs21.existsSync)(packageJsonPath)) {
106256
106331
  return;
@@ -106259,7 +106334,7 @@ async function generateWorkersTypes(ctx, npm25) {
106259
106334
  if (!packageManifest.scripts?.["cf-typegen"]) {
106260
106335
  return;
106261
106336
  }
106262
- const typesCmd = [npm25, "run", "cf-typegen"];
106337
+ const typesCmd = [npm24, "run", "cf-typegen"];
106263
106338
  await runCommand(typesCmd, {
106264
106339
  cwd: ctx.project.path,
106265
106340
  silent: true,
@@ -106271,7 +106346,7 @@ async function generateWorkersTypes(ctx, npm25) {
106271
106346
  writeFile3(packageJsonPath, JSON.stringify(packageManifest, null, 2));
106272
106347
  }
106273
106348
  }
106274
- var maybeInstallNodeTypes = async (ctx, npm25) => {
106349
+ var maybeInstallNodeTypes = async (ctx, npm24) => {
106275
106350
  let parsedConfig = {};
106276
106351
  if (wranglerJsonOrJsoncExists(ctx)) {
106277
106352
  parsedConfig = readWranglerJsonOrJsonc(ctx);
@@ -106284,7 +106359,7 @@ var maybeInstallNodeTypes = async (ctx, npm25) => {
106284
106359
  await installPackages2(["@types/node"], {
106285
106360
  dev: true,
106286
106361
  startText: "Installing @types/node",
106287
- doneText: `${brandColor("installed")} ${dim(`via ${npm25}`)}`
106362
+ doneText: `${brandColor("installed")} ${dim(`via ${npm24}`)}`
106288
106363
  });
106289
106364
  return true;
106290
106365
  }
@@ -106356,16 +106431,15 @@ function hasProjectReferences(config49) {
106356
106431
  const tsconfig = config49;
106357
106432
  return Array.isArray(tsconfig.references) && tsconfig.references.length > 0;
106358
106433
  }
106359
- async function installWorkersTypes(npm25) {
106434
+ async function installWorkersTypes(npm24) {
106360
106435
  await installPackages2(["@cloudflare/workers-types"], {
106361
106436
  dev: true,
106362
106437
  startText: "Installing @cloudflare/workers-types",
106363
- doneText: `${brandColor("installed")} ${dim(`via ${npm25}`)}`
106438
+ doneText: `${brandColor("installed")} ${dim(`via ${npm24}`)}`
106364
106439
  });
106365
106440
  }
106366
106441
 
106367
106442
  // src/cli.ts
106368
- var { npm: npm24 } = detectPackageManager();
106369
106443
  var main = async (argv) => {
106370
106444
  const result = await parseArgs(argv);
106371
106445
  if (result.type === "unknown") {
@@ -106387,7 +106461,12 @@ ${result.errorMessage}`);
106387
106461
  }
106388
106462
  const { args } = result;
106389
106463
  logRaw("");
106390
- if (args.autoUpdate && !process.env.VITEST && !process.env.CI && isInteractive() && await isUpdateAvailable()) {
106464
+ if (args.autoUpdate && // If this process was already spawned by `runLatest`, don't try to update
106465
+ // again. Otherwise, package managers that resolve `cloudflare@latest` to a
106466
+ // version older than the npm `latest` tag (e.g. pnpm 11's `minimumReleaseAge`
106467
+ // supply-chain protection) would cause `isUpdateAvailable()` to stay true and
106468
+ // re-spawn C3 forever.
106469
+ !process.env.CREATE_CLOUDFLARE_RELAUNCHED && !process.env.VITEST && !process.env.CI && isInteractive() && await isUpdateAvailable()) {
106391
106470
  await runLatest();
106392
106471
  } else {
106393
106472
  await reporter.collectAsyncMetrics({
@@ -106399,13 +106478,6 @@ ${result.errorMessage}`);
106399
106478
  });
106400
106479
  }
106401
106480
  };
106402
- var runLatest = async () => {
106403
- const args = process.argv.slice(2);
106404
- if (npm24 === "npm") {
106405
- args.unshift("--");
106406
- }
106407
- await runCommand([npm24, "create", "cloudflare@latest", ...args]);
106408
- };
106409
106481
  var runCli = async (args) => {
106410
106482
  printBanner(args);
106411
106483
  checkMacOSVersion({ shouldThrow: true });
@@ -106520,7 +106592,6 @@ ${getPnpmIgnoredBuildsGuidance(e.packages)}`);
106520
106592
  0 && (module.exports = {
106521
106593
  main,
106522
106594
  runCli,
106523
- runLatest,
106524
106595
  setupProjectDirectory
106525
106596
  });
106526
106597
  /*! Bundled license information: