create-cloudflare 2.70.4 → 2.70.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -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((resolve15, reject) => {
2744
2744
  this.close((err, data) => {
2745
- return err ? reject(err) : resolve13(data);
2745
+ return err ? reject(err) : resolve15(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((resolve15, reject) => {
2784
2784
  this.destroy(err, (err2, data) => {
2785
- return err2 ? reject(err2) : resolve13(data);
2785
+ return err2 ? reject(err2) : resolve15(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((resolve15, reject) => {
6283
+ res = resolve15;
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((resolve15, reject) => {
7679
7679
  assert7(callback === null);
7680
7680
  if (socket[kError]) {
7681
7681
  reject(socket[kError]);
7682
7682
  } else {
7683
- callback = resolve13;
7683
+ callback = resolve15;
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((resolve15, reject) => {
8529
8529
  assert7(callback === null);
8530
8530
  if (socket[kError]) {
8531
8531
  reject(socket[kError]);
8532
8532
  } else {
8533
- callback = resolve13;
8533
+ callback = resolve15;
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((resolve15) => {
8850
8850
  if (this[kSize]) {
8851
- this[kClosedResolve] = resolve13;
8851
+ this[kClosedResolve] = resolve15;
8852
8852
  } else {
8853
- resolve13(null);
8853
+ resolve15(null);
8854
8854
  }
8855
8855
  });
8856
8856
  }
8857
8857
  [kDestroy](err) {
8858
- return new Promise((resolve13) => {
8858
+ return new Promise((resolve15) => {
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
+ resolve15(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((resolve15) => {
9275
+ this[kClosedResolve] = resolve15;
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((resolve15, 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
+ resolve15(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((resolve15, 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
+ resolve15();
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
+ resolve15();
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((resolve15, 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
+ resolve15();
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((resolve15, reject) => {
10487
+ finalSocket.once("secureConnect", resolve15);
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((resolve15, 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
+ resolve15(null);
11539
11539
  }
11540
11540
  });
11541
11541
  } else {
11542
- this.on("close", resolve13);
11542
+ this.on("close", resolve15);
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((resolve15, 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: resolve15,
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: resolve15, stream, length } = consume2;
11660
11660
  try {
11661
11661
  if (type === "text") {
11662
- resolve13(chunksDecode(body, length, encoding));
11662
+ resolve15(chunksDecode(body, length, encoding));
11663
11663
  } else if (type === "json") {
11664
- resolve13(JSON.parse(chunksDecode(body, length, encoding)));
11664
+ resolve15(JSON.parse(chunksDecode(body, length, encoding)));
11665
11665
  } else if (type === "arrayBuffer") {
11666
- resolve13(chunksConcat(body, length).buffer);
11666
+ resolve15(chunksConcat(body, length).buffer);
11667
11667
  } else if (type === "blob") {
11668
- resolve13(new Blob(body, { type: stream[kContentType] }));
11668
+ resolve15(new Blob(body, { type: stream[kContentType] }));
11669
11669
  } else if (type === "bytes") {
11670
- resolve13(chunksConcat(body, length));
11670
+ resolve15(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((resolve15, reject) => {
11861
11861
  request2.call(this, opts, (err, data) => {
11862
- return err ? reject(err) : resolve13(data);
11862
+ return err ? reject(err) : resolve15(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((resolve15, reject) => {
12075
12075
  stream.call(this, opts, factory, (err, data) => {
12076
- return err ? reject(err) : resolve13(data);
12076
+ return err ? reject(err) : resolve15(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((resolve15, reject) => {
12365
12365
  upgrade.call(this, opts, (err, data) => {
12366
- return err ? reject(err) : resolve13(data);
12366
+ return err ? reject(err) : resolve15(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((resolve15, reject) => {
12460
12460
  connect.call(this, opts, (err, data) => {
12461
- return err ? reject(err) : resolve13(data);
12461
+ return err ? reject(err) : resolve15(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: resolve15 } = 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(resolve15(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 = resolve15(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((resolve15, 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
+ resolve15({
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
+ resolve15({
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
+ resolve15({
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) {
@@ -26781,135 +26284,632 @@ var require_node4 = __commonJS({
26781
26284
  }
26782
26285
  });
26783
26286
 
26784
- // ../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/mod.cjs.js
26785
- var require_mod_cjs4 = __commonJS({
26786
- "../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/mod.cjs.js"(exports2, module2) {
26287
+ // ../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/mod.cjs.js
26288
+ var require_mod_cjs4 = __commonJS({
26289
+ "../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/mod.cjs.js"(exports2, module2) {
26290
+ "use strict";
26291
+ var OSPaths_js_1 = require_OSPaths2();
26292
+ var node_js_1 = require_node4();
26293
+ module2.exports = OSPaths_js_1.Adapt(node_js_1.adapter).OSPaths;
26294
+ }
26295
+ });
26296
+
26297
+ // ../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js
26298
+ var require_node5 = __commonJS({
26299
+ "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js"(exports2) {
26300
+ "use strict";
26301
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
26302
+ if (k2 === void 0) k2 = k;
26303
+ Object.defineProperty(o, k2, { enumerable: true, get: function() {
26304
+ return m[k];
26305
+ } });
26306
+ }) : (function(o, m, k, k2) {
26307
+ if (k2 === void 0) k2 = k;
26308
+ o[k2] = m[k];
26309
+ }));
26310
+ var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
26311
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26312
+ }) : function(o, v) {
26313
+ o["default"] = v;
26314
+ });
26315
+ var __importStar2 = exports2 && exports2.__importStar || function(mod) {
26316
+ if (mod && mod.__esModule) return mod;
26317
+ var result = {};
26318
+ if (mod != null) {
26319
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
26320
+ }
26321
+ __setModuleDefault2(result, mod);
26322
+ return result;
26323
+ };
26324
+ var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
26325
+ return mod && mod.__esModule ? mod : { "default": mod };
26326
+ };
26327
+ exports2.__esModule = true;
26328
+ exports2.adapter = void 0;
26329
+ var path6 = __importStar2(require("path"));
26330
+ var os_paths_1 = __importDefault2(require_mod_cjs4());
26331
+ exports2.adapter = {
26332
+ atImportPermissions: { env: true },
26333
+ env: {
26334
+ get: function(s) {
26335
+ return process.env[s];
26336
+ }
26337
+ },
26338
+ osPaths: os_paths_1["default"],
26339
+ path: path6,
26340
+ process
26341
+ };
26342
+ }
26343
+ });
26344
+
26345
+ // ../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/mod.cjs.js
26346
+ var require_mod_cjs5 = __commonJS({
26347
+ "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/mod.cjs.js"(exports2, module2) {
26348
+ "use strict";
26349
+ var XDG_js_1 = require_XDG2();
26350
+ var node_js_1 = require_node5();
26351
+ module2.exports = XDG_js_1.Adapt(node_js_1.adapter).XDG;
26352
+ }
26353
+ });
26354
+
26355
+ // ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js
26356
+ var require_node6 = __commonJS({
26357
+ "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js"(exports2) {
26358
+ "use strict";
26359
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
26360
+ if (k2 === void 0) k2 = k;
26361
+ Object.defineProperty(o, k2, { enumerable: true, get: function() {
26362
+ return m[k];
26363
+ } });
26364
+ }) : (function(o, m, k, k2) {
26365
+ if (k2 === void 0) k2 = k;
26366
+ o[k2] = m[k];
26367
+ }));
26368
+ var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
26369
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26370
+ }) : function(o, v) {
26371
+ o["default"] = v;
26372
+ });
26373
+ var __importStar2 = exports2 && exports2.__importStar || function(mod) {
26374
+ if (mod && mod.__esModule) return mod;
26375
+ var result = {};
26376
+ if (mod != null) {
26377
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
26378
+ }
26379
+ __setModuleDefault2(result, mod);
26380
+ return result;
26381
+ };
26382
+ var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
26383
+ return mod && mod.__esModule ? mod : { "default": mod };
26384
+ };
26385
+ exports2.__esModule = true;
26386
+ exports2.adapter = void 0;
26387
+ var path6 = __importStar2(require("path"));
26388
+ var xdg_portable_1 = __importDefault2(require_mod_cjs5());
26389
+ exports2.adapter = {
26390
+ atImportPermissions: { env: true, read: true },
26391
+ meta: {
26392
+ mainFilename: function() {
26393
+ var requireMain = typeof require !== "undefined" && require !== null && require.main ? require.main : { filename: void 0 };
26394
+ var requireMainFilename = requireMain.filename;
26395
+ var filename = (requireMainFilename !== process.execArgv[0] ? requireMainFilename : void 0) || (typeof process._eval === "undefined" ? process.argv[1] : void 0);
26396
+ return filename;
26397
+ },
26398
+ pkgMainFilename: function() {
26399
+ return process.pkg ? process.execPath : void 0;
26400
+ }
26401
+ },
26402
+ path: path6,
26403
+ process,
26404
+ xdg: xdg_portable_1["default"]
26405
+ };
26406
+ }
26407
+ });
26408
+
26409
+ // ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/mod.cjs.js
26410
+ var require_mod_cjs6 = __commonJS({
26411
+ "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/mod.cjs.js"(exports2, module2) {
26412
+ "use strict";
26413
+ var XDGAppPaths_js_1 = require_XDGAppPaths2();
26414
+ var node_js_1 = require_node6();
26415
+ module2.exports = XDGAppPaths_js_1.Adapt(node_js_1.adapter).XDGAppPaths;
26416
+ }
26417
+ });
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(resolve15, reject) {
26514
+ isexe(path6, options || {}, function(er, is) {
26515
+ if (er) {
26516
+ reject(er);
26517
+ } else {
26518
+ resolve15(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((resolve15, reject) => {
26585
+ if (i === pathEnv.length)
26586
+ return opt.all && found.length ? resolve15(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
+ resolve15(subStep(p2, i, 0));
26592
+ });
26593
+ const subStep = (p2, i, ii) => new Promise((resolve15, reject) => {
26594
+ if (ii === pathExt.length)
26595
+ return resolve15(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 resolve15(p2 + ext);
26603
+ }
26604
+ return resolve15(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) {
26787
26730
  "use strict";
26788
- var OSPaths_js_1 = require_OSPaths2();
26789
- var node_js_1 = require_node4();
26790
- module2.exports = OSPaths_js_1.Adapt(node_js_1.adapter).OSPaths;
26731
+ module2.exports = /^#!(.*)/;
26791
26732
  }
26792
26733
  });
26793
26734
 
26794
- // ../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js
26795
- var require_node5 = __commonJS({
26796
- "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js"(exports2) {
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) {
26797
26738
  "use strict";
26798
- var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
26799
- if (k2 === void 0) k2 = k;
26800
- Object.defineProperty(o, k2, { enumerable: true, get: function() {
26801
- return m[k];
26802
- } });
26803
- }) : (function(o, m, k, k2) {
26804
- if (k2 === void 0) k2 = k;
26805
- o[k2] = m[k];
26806
- }));
26807
- var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
26808
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26809
- }) : function(o, v) {
26810
- o["default"] = v;
26811
- });
26812
- var __importStar2 = exports2 && exports2.__importStar || function(mod) {
26813
- if (mod && mod.__esModule) return mod;
26814
- var result = {};
26815
- if (mod != null) {
26816
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
26739
+ var shebangRegex = require_shebang_regex();
26740
+ module2.exports = (string = "") => {
26741
+ const match = string.match(shebangRegex);
26742
+ if (!match) {
26743
+ return null;
26817
26744
  }
26818
- __setModuleDefault2(result, mod);
26819
- return result;
26820
- };
26821
- var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
26822
- return mod && mod.__esModule ? mod : { "default": mod };
26823
- };
26824
- exports2.__esModule = true;
26825
- exports2.adapter = void 0;
26826
- var path6 = __importStar2(require("path"));
26827
- var os_paths_1 = __importDefault2(require_mod_cjs4());
26828
- exports2.adapter = {
26829
- atImportPermissions: { env: true },
26830
- env: {
26831
- get: function(s) {
26832
- return process.env[s];
26833
- }
26834
- },
26835
- osPaths: os_paths_1["default"],
26836
- path: path6,
26837
- process
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;
26838
26751
  };
26839
26752
  }
26840
26753
  });
26841
26754
 
26842
- // ../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/mod.cjs.js
26843
- var require_mod_cjs5 = __commonJS({
26844
- "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/mod.cjs.js"(exports2, module2) {
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) {
26845
26758
  "use strict";
26846
- var XDG_js_1 = require_XDG2();
26847
- var node_js_1 = require_node5();
26848
- module2.exports = XDG_js_1.Adapt(node_js_1.adapter).XDG;
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;
26849
26774
  }
26850
26775
  });
26851
26776
 
26852
- // ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js
26853
- var require_node6 = __commonJS({
26854
- "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js"(exports2) {
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) {
26855
26780
  "use strict";
26856
- var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
26857
- if (k2 === void 0) k2 = k;
26858
- Object.defineProperty(o, k2, { enumerable: true, get: function() {
26859
- return m[k];
26860
- } });
26861
- }) : (function(o, m, k, k2) {
26862
- if (k2 === void 0) k2 = k;
26863
- o[k2] = m[k];
26864
- }));
26865
- var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
26866
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26867
- }) : function(o, v) {
26868
- o["default"] = v;
26869
- });
26870
- var __importStar2 = exports2 && exports2.__importStar || function(mod) {
26871
- if (mod && mod.__esModule) return mod;
26872
- var result = {};
26873
- if (mod != null) {
26874
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
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);
26875
26795
  }
26876
- __setModuleDefault2(result, mod);
26877
- return result;
26878
- };
26879
- var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
26880
- return mod && mod.__esModule ? mod : { "default": mod };
26881
- };
26882
- exports2.__esModule = true;
26883
- exports2.adapter = void 0;
26884
- var path6 = __importStar2(require("path"));
26885
- var xdg_portable_1 = __importDefault2(require_mod_cjs5());
26886
- exports2.adapter = {
26887
- atImportPermissions: { env: true, read: true },
26888
- meta: {
26889
- mainFilename: function() {
26890
- var requireMain = typeof require !== "undefined" && require !== null && require.main ? require.main : { filename: void 0 };
26891
- var requireMainFilename = requireMain.filename;
26892
- var filename = (requireMainFilename !== process.execArgv[0] ? requireMainFilename : void 0) || (typeof process._eval === "undefined" ? process.argv[1] : void 0);
26893
- return filename;
26894
- },
26895
- pkgMainFilename: function() {
26896
- return process.pkg ? process.execPath : void 0;
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
26897
26831
  }
26898
- },
26899
- path: path6,
26900
- process,
26901
- xdg: xdg_portable_1["default"]
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
26902
26885
  };
26903
26886
  }
26904
26887
  });
26905
26888
 
26906
- // ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/mod.cjs.js
26907
- var require_mod_cjs6 = __commonJS({
26908
- "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/mod.cjs.js"(exports2, module2) {
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) {
26909
26892
  "use strict";
26910
- var XDGAppPaths_js_1 = require_XDGAppPaths2();
26911
- var node_js_1 = require_node6();
26912
- module2.exports = XDGAppPaths_js_1.Adapt(node_js_1.adapter).XDGAppPaths;
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
26913
  }
26914
26914
  });
26915
26915
 
@@ -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((resolve16, reject) => {
29689
29689
  this.on(DESTROYED, () => reject(new Error("stream destroyed")));
29690
- this.on("end", () => resolve14());
29690
+ this.on("end", () => resolve16());
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 resolve16 = 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
+ resolve16({ 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
+ resolve16({ 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
+ resolve16 = 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((resolve16, reject) => {
32151
32151
  parse11.on("error", reject);
32152
- parse11.on("end", resolve14);
32152
+ parse11.on("end", resolve16);
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((resolve16, 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", resolve16);
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: resolve15, 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 = resolve15(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((resolve16, reject) => {
33553
33553
  u2.on("error", reject);
33554
- u2.on("close", resolve14);
33554
+ u2.on("close", resolve16);
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((resolve16, 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
+ resolve16(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((resolve16, 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
+ resolve16({
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(resolve16) {
39123
+ resolve16(value);
39124
39124
  });
39125
39125
  }
39126
- return new (P2 || (P2 = Promise))(function(resolve14, reject) {
39126
+ return new (P2 || (P2 = Promise))(function(resolve16, 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 ? resolve16(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(resolve15) {
48394
+ resolve15(value);
48395
48395
  });
48396
48396
  }
48397
- return new (P2 || (P2 = Promise))(function(resolve13, reject) {
48397
+ return new (P2 || (P2 = Promise))(function(resolve15, 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 ? resolve15(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(resolve15, reject) {
48605
+ v = o[n](v), settle(resolve15, reject, v.done, v.value);
48606
48606
  });
48607
48607
  };
48608
48608
  }
48609
- function settle(resolve13, reject, d2, v) {
48609
+ function settle(resolve15, reject, d2, v) {
48610
48610
  Promise.resolve(v).then(function(v2) {
48611
- resolve13({ value: v2, done: d2 });
48611
+ resolve15({ 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((resolve15, 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
+ resolve15(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((resolve15, reject) => {
73604
73604
  this.send(message, rinfo.port, rinfo.address, (err) => {
73605
73605
  if (err) return reject(err);
73606
- resolve13(message);
73606
+ resolve15(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((resolve15) => this.bind(port, address, resolve15));
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((resolve15, 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", () => resolve15(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((resolve15) => server.once("close", resolve15)))
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((resolve15) => server.once("listening", resolve15)))
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((resolve15, 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 }, resolve15);
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((resolve15, reject) => {
73951
+ stream.on("error", reject).on("data", (chunk) => buffer.push(chunk)).on("end", () => resolve15(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((resolve15, 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
+ resolve15(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((resolve15) => https.get(url, resolve15));
74024
74024
  var readStream = (stream) => {
74025
74025
  const buffer = [];
74026
- return new Promise((resolve13, reject) => {
74026
+ return new Promise((resolve15, 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", () => resolve15(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 resolve15 = createResolver({ dns: address, port, recursive });
74091
+ return resolve15(name3, type, cls, clientIp);
74092
74092
  }));
74093
74093
  }
74094
74094
  /**
@@ -74137,12 +74137,11 @@ 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);
74144
74143
  var import_node_fs22 = require("node:fs");
74145
- var import_node_path25 = require("node:path");
74144
+ var import_node_path26 = require("node:path");
74146
74145
  var import_node_process14 = require("node:process");
74147
74146
 
74148
74147
  // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
@@ -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((resolve15, 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
+ resolve15(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.6";
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 resolve15;
97954
98016
  let reject;
97955
98017
  const promise = new Promise((res, rej) => {
97956
- resolve13 = res;
98018
+ resolve15 = res;
97957
98019
  reject = rej;
97958
98020
  });
97959
- if (!resolve13 || !reject) {
98021
+ if (!resolve15 || !reject) {
97960
98022
  throw new Error("Promise resolvers not set");
97961
98023
  }
97962
- return { resolve: resolve13, reject, promise };
98024
+ return { resolve: resolve15, reject, promise };
97963
98025
  }
97964
98026
  function getPlatform() {
97965
98027
  const platform2 = process.platform;
@@ -98163,7 +98225,7 @@ var runTelemetryCommand = (action) => {
98163
98225
  var import_node_fs19 = require("node:fs");
98164
98226
  var import_promises7 = require("node:fs/promises");
98165
98227
  var import_node_os7 = require("node:os");
98166
- var import_node_path20 = require("node:path");
98228
+ var import_node_path21 = require("node:path");
98167
98229
  var import_deepmerge = __toESM(require_cjs());
98168
98230
  var import_degit = __toESM(require_dist());
98169
98231
 
@@ -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((resolve15, 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
+ resolve15(subprocess);
99953
100015
  });
99954
100016
  });
99955
100017
  }
99956
100018
  if (isFallbackAttempt) {
99957
- return new Promise((resolve13, reject) => {
100019
+ return new Promise((resolve15, 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
+ resolve15(subprocess);
99968
100030
  });
99969
100031
  });
99970
100032
  });
99971
100033
  }
99972
100034
  subprocess.unref();
99973
- return new Promise((resolve13, reject) => {
100035
+ return new Promise((resolve15, reject) => {
99974
100036
  subprocess.once("error", reject);
99975
100037
  subprocess.once("spawn", () => {
99976
100038
  subprocess.off("error", reject);
99977
- resolve13(subprocess);
100039
+ resolve15(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",
@@ -100177,7 +100252,7 @@ __name2(getPropertyName, "getPropertyName");
100177
100252
  var package_default = {
100178
100253
  name: "frameworks_clis_info",
100179
100254
  dependencies: {
100180
- "@angular/create": "22.0.1",
100255
+ "@angular/create": "22.0.3",
100181
100256
  "@tanstack/cli": "0.69.3",
100182
100257
  "create-analog": "2.6.1",
100183
100258
  "create-astro": "5.0.6",
@@ -100185,12 +100260,12 @@ var package_default = {
100185
100260
  "create-hono": "0.19.4",
100186
100261
  "create-next-app": "16.2.9",
100187
100262
  "create-qwik": "1.20.0",
100188
- "create-react-router": "8.0.0",
100263
+ "create-react-router": "8.0.1",
100189
100264
  "create-rwsdk": "3.1.3",
100190
100265
  "create-solid": "0.7.0",
100191
- "create-vike": "0.0.651",
100266
+ "create-vike": "0.0.654",
100192
100267
  "create-vite": "9.0.7",
100193
- "create-vue": "3.22.3",
100268
+ "create-vue": "3.22.4",
100194
100269
  "create-waku": "0.12.5-1.0.0-alpha.10-0",
100195
100270
  gatsby: "5.16.1",
100196
100271
  nuxi: "3.35.2",
@@ -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
  }
@@ -101498,7 +101573,7 @@ var config26 = {
101498
101573
  };
101499
101574
  var c3_default29 = config26;
101500
101575
  function buildConfigure(params) {
101501
- return async function configure17(ctx) {
101576
+ return async function configure18(ctx) {
101502
101577
  const loginSuccess = await params.login(ctx);
101503
101578
  if (!loginSuccess) {
101504
101579
  throw new Error("Failed to login to Cloudflare");
@@ -102563,14 +102638,32 @@ var config46 = {
102563
102638
  var c3_default48 = config46;
102564
102639
 
102565
102640
  // templates/waku/c3.ts
102641
+ var import_node_path19 = require("node:path");
102566
102642
  var { npm: npm22 } = detectPackageManager();
102567
102643
  var generate30 = async (ctx) => {
102568
102644
  await runFrameworkGenerator(ctx, [
102569
102645
  "--project-name",
102570
102646
  ctx.project.name,
102571
- "--template",
102572
- "07_cloudflare"
102647
+ // c3 installs dependencies itself once the template files have been copied over
102648
+ "--skip-install"
102573
102649
  ]);
102650
+ logRaw("");
102651
+ };
102652
+ var configure16 = async (ctx) => {
102653
+ await installPackages2(
102654
+ ["@cloudflare/vite-plugin", "miniflare", "@types/node"],
102655
+ {
102656
+ dev: true,
102657
+ startText: "Installing Cloudflare build dependencies",
102658
+ doneText: `${brandColor("installed")} ${dim(
102659
+ "@cloudflare/vite-plugin, miniflare, @types/node"
102660
+ )}`
102661
+ }
102662
+ );
102663
+ const s = spinner();
102664
+ s.start("Removing non-Cloudflare artifacts from template");
102665
+ removeFile((0, import_node_path19.resolve)(ctx.project.path, "src/middleware/no-trailing-slash.ts"));
102666
+ s.stop(`${brandColor("removed")} ${dim("trailing-slash dev middleware")}`);
102574
102667
  };
102575
102668
  var config47 = {
102576
102669
  configVersion: 1,
@@ -102578,12 +102671,18 @@ var config47 = {
102578
102671
  frameworkCli: "create-waku",
102579
102672
  platform: "workers",
102580
102673
  displayName: "Waku",
102674
+ copyFiles: {
102675
+ path: "./templates"
102676
+ },
102581
102677
  path: "templates/waku",
102582
102678
  generate: generate30,
102679
+ configure: configure16,
102583
102680
  transformPackageJson: async () => ({
102584
102681
  scripts: {
102585
102682
  deploy: `${npm22} run build && wrangler deploy`,
102586
- preview: `NODE_ENV=production ${npm22} run build && wrangler dev`
102683
+ preview: `NODE_ENV=production ${npm22} run build && wrangler dev`,
102684
+ start: `wrangler dev`,
102685
+ "cf-typegen": `wrangler types`
102587
102686
  }
102588
102687
  }),
102589
102688
  devScript: "dev",
@@ -102665,7 +102764,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
102665
102764
  var import_node_assert6 = __toESM(require("node:assert"));
102666
102765
 
102667
102766
  // ../wrangler/package.json
102668
- var version2 = "4.102.0";
102767
+ var version2 = "4.104.0";
102669
102768
 
102670
102769
  // src/git.ts
102671
102770
  var offerGit = async (ctx) => {
@@ -102854,7 +102953,7 @@ async function getProductionBranch(cwd) {
102854
102953
 
102855
102954
  // src/validators.ts
102856
102955
  var import_node_fs18 = require("node:fs");
102857
- var import_node_path19 = require("node:path");
102956
+ var import_node_path20 = require("node:path");
102858
102957
  var TEMPLATE_REGEX = /^(?:(?:https:\/\/)?(?<httpsUrl>[^:/]+\.[^:/]+)\/|git@(?<gitUrl>[^:/]+)[:/]|(?<shorthandUrl>[^/]+):)?(?<user>[^/\s]+)\/(?<repository>[^/\s#]+)(?:(?<subdirectoryPath>(?:\/[^/\s#]+)+))?(?:\/)?(?:#(?<tag>.+))?/;
102859
102958
  var validateTemplateUrl = (value) => {
102860
102959
  if (!String(value).match(TEMPLATE_REGEX)) {
@@ -102862,7 +102961,7 @@ var validateTemplateUrl = (value) => {
102862
102961
  }
102863
102962
  };
102864
102963
  var validateProjectDirectory = (relativePath, args) => {
102865
- const path6 = (0, import_node_path19.resolve)(relativePath);
102964
+ const path6 = (0, import_node_path20.resolve)(relativePath);
102866
102965
  const existsAlready = (0, import_node_fs18.existsSync)(path6);
102867
102966
  if (existsAlready) {
102868
102967
  for (const file2 of (0, import_node_fs18.readdirSync)(path6)) {
@@ -102872,7 +102971,7 @@ var validateProjectDirectory = (relativePath, args) => {
102872
102971
  }
102873
102972
  }
102874
102973
  if (!args.existingScript) {
102875
- const projectName = (0, import_node_path19.basename)(path6);
102974
+ const projectName = (0, import_node_path20.basename)(path6);
102876
102975
  const invalidChars = /[^a-z0-9-]/;
102877
102976
  const invalidStartEnd = /^-|-$/;
102878
102977
  if (projectName.match(invalidStartEnd)) {
@@ -103326,7 +103425,7 @@ var createContext = async (args, prevArgs) => {
103326
103425
  envInterfaceName: "Env",
103327
103426
  ...template
103328
103427
  };
103329
- const path6 = (0, import_node_path20.resolve)(projectName);
103428
+ const path6 = (0, import_node_path21.resolve)(projectName);
103330
103429
  const languageVariants = template.copyFiles && !isVariantInfo(template.copyFiles) && !template.copyFiles.selectVariant ? Object.keys(template.copyFiles.variants) : [];
103331
103430
  if (languageVariants.length > 0) {
103332
103431
  if (hasTsConfig(path6)) {
@@ -103352,8 +103451,8 @@ var createContext = async (args, prevArgs) => {
103352
103451
  }
103353
103452
  }
103354
103453
  }
103355
- const name3 = (0, import_node_path20.basename)(path6);
103356
- const directory = (0, import_node_path20.dirname)(path6);
103454
+ const name3 = (0, import_node_path21.basename)(path6);
103455
+ const directory = (0, import_node_path21.dirname)(path6);
103357
103456
  const originalCWD = process.cwd();
103358
103457
  return {
103359
103458
  project: { name: name3, path: path6 },
@@ -103373,7 +103472,7 @@ async function copyTemplateFiles(ctx) {
103373
103472
  const { copyFiles } = ctx.template;
103374
103473
  let srcdir;
103375
103474
  if (isVariantInfo(copyFiles)) {
103376
- srcdir = (0, import_node_path20.join)(getTemplatePath(ctx), copyFiles.path);
103475
+ srcdir = (0, import_node_path21.join)(getTemplatePath(ctx), copyFiles.path);
103377
103476
  } else {
103378
103477
  const selectVariant = copyFiles.selectVariant ?? defaultSelectVariant;
103379
103478
  const variant = await selectVariant(ctx);
@@ -103383,21 +103482,21 @@ async function copyTemplateFiles(ctx) {
103383
103482
  `Unknown variant provided: ${JSON.stringify(variant ?? "")}`
103384
103483
  );
103385
103484
  }
103386
- srcdir = (0, import_node_path20.join)(getTemplatePath(ctx), variantInfo.path);
103485
+ srcdir = (0, import_node_path21.join)(getTemplatePath(ctx), variantInfo.path);
103387
103486
  }
103388
103487
  const copyDestDir = getCopyFilesDestinationDir(ctx);
103389
- const destdir = (0, import_node_path20.join)(ctx.project.path, ...copyDestDir ? [copyDestDir] : []);
103488
+ const destdir = (0, import_node_path21.join)(ctx.project.path, ...copyDestDir ? [copyDestDir] : []);
103390
103489
  const s = spinner();
103391
103490
  s.start(`Copying template files`);
103392
103491
  await (0, import_promises7.cp)(srcdir, destdir, { recursive: true, force: true });
103393
- const dummyGitIgnorePath = (0, import_node_path20.join)(destdir, "__dot__gitignore");
103492
+ const dummyGitIgnorePath = (0, import_node_path21.join)(destdir, "__dot__gitignore");
103394
103493
  if ((0, import_node_fs19.existsSync)(dummyGitIgnorePath)) {
103395
- await (0, import_promises7.rename)(dummyGitIgnorePath, (0, import_node_path20.join)(destdir, ".gitignore"));
103494
+ await (0, import_promises7.rename)(dummyGitIgnorePath, (0, import_node_path21.join)(destdir, ".gitignore"));
103396
103495
  }
103397
103496
  s.stop(`${brandColor("files")} ${dim("copied to project directory")}`);
103398
103497
  }
103399
103498
  function writeAgentsMd(projectPath) {
103400
- const agentsMdPath = (0, import_node_path20.join)(projectPath, "AGENTS.md");
103499
+ const agentsMdPath = (0, import_node_path21.join)(projectPath, "AGENTS.md");
103401
103500
  if ((0, import_node_fs19.existsSync)(agentsMdPath)) {
103402
103501
  return;
103403
103502
  }
@@ -103427,25 +103526,25 @@ var validateTemplate = (path6, config49) => {
103427
103526
  return;
103428
103527
  }
103429
103528
  if (isVariantInfo(config49.copyFiles)) {
103430
- validateTemplateSrcDirectory((0, import_node_path20.resolve)(path6, config49.copyFiles.path), config49);
103529
+ validateTemplateSrcDirectory((0, import_node_path21.resolve)(path6, config49.copyFiles.path), config49);
103431
103530
  } else {
103432
103531
  for (const variant of Object.values(config49.copyFiles.variants)) {
103433
- validateTemplateSrcDirectory((0, import_node_path20.resolve)(path6, variant.path), config49);
103532
+ validateTemplateSrcDirectory((0, import_node_path21.resolve)(path6, variant.path), config49);
103434
103533
  }
103435
103534
  }
103436
103535
  };
103437
103536
  var validateTemplateSrcDirectory = (path6, config49) => {
103438
103537
  if (config49.platform === "workers") {
103439
- const wranglerTomlPath = (0, import_node_path20.resolve)(path6, "wrangler.toml");
103440
- const wranglerJsonPath = (0, import_node_path20.resolve)(path6, "wrangler.json");
103441
- const wranglerJsoncPath = (0, import_node_path20.resolve)(path6, "wrangler.jsonc");
103538
+ const wranglerTomlPath = (0, import_node_path21.resolve)(path6, "wrangler.toml");
103539
+ const wranglerJsonPath = (0, import_node_path21.resolve)(path6, "wrangler.json");
103540
+ const wranglerJsoncPath = (0, import_node_path21.resolve)(path6, "wrangler.jsonc");
103442
103541
  if (!(0, import_node_fs19.existsSync)(wranglerTomlPath) && !(0, import_node_fs19.existsSync)(wranglerJsonPath) && !(0, import_node_fs19.existsSync)(wranglerJsoncPath)) {
103443
103542
  throw new Error(
103444
103543
  `create-cloudflare templates must contain a "wrangler.toml" or "wrangler.json(c)" file.`
103445
103544
  );
103446
103545
  }
103447
103546
  }
103448
- const pkgJsonPath = (0, import_node_path20.resolve)(path6, "package.json");
103547
+ const pkgJsonPath = (0, import_node_path21.resolve)(path6, "package.json");
103449
103548
  if (!(0, import_node_fs19.existsSync)(pkgJsonPath)) {
103450
103549
  throw new Error(
103451
103550
  `create-cloudflare templates must contain a "package.json" file.`
@@ -103463,10 +103562,10 @@ var inferTemplateConfig = (path6) => {
103463
103562
  };
103464
103563
  var inferCopyFilesDefinition = (path6) => {
103465
103564
  const variants = {};
103466
- if ((0, import_node_fs19.existsSync)((0, import_node_path20.join)(path6, "js"))) {
103565
+ if ((0, import_node_fs19.existsSync)((0, import_node_path21.join)(path6, "js"))) {
103467
103566
  variants["js"] = { path: "./js" };
103468
103567
  }
103469
- if ((0, import_node_fs19.existsSync)((0, import_node_path20.join)(path6, "ts"))) {
103568
+ if ((0, import_node_fs19.existsSync)((0, import_node_path21.join)(path6, "ts"))) {
103470
103569
  variants["ts"] = { path: "./ts" };
103471
103570
  }
103472
103571
  const copyFiles = Object.keys(variants).length !== 0 ? { variants } : { path: "." };
@@ -103501,7 +103600,7 @@ Use the format "github:<owner>/<repo>/sub/directory[#<branch>]" to clone a speci
103501
103600
  force: true,
103502
103601
  mode: options.mode
103503
103602
  });
103504
- const tmpDir = options.intoFolder ?? await (0, import_promises7.mkdtemp)((0, import_node_path20.join)((0, import_node_os7.tmpdir)(), "c3-template"));
103603
+ const tmpDir = options.intoFolder ?? await (0, import_promises7.mkdtemp)((0, import_node_path21.join)((0, import_node_os7.tmpdir)(), "c3-template"));
103505
103604
  await emitter.clone(tmpDir);
103506
103605
  return tmpDir;
103507
103606
  } catch {
@@ -103510,7 +103609,7 @@ Use the format "github:<owner>/<repo>/sub/directory[#<branch>]" to clone a speci
103510
103609
  }
103511
103610
  }
103512
103611
  function updatePythonPackageName(path6, projectName) {
103513
- const pyProjectFile = (0, import_node_path20.resolve)(path6, "pyproject.toml");
103612
+ const pyProjectFile = (0, import_node_path21.resolve)(path6, "pyproject.toml");
103514
103613
  if (!(0, import_node_fs19.existsSync)(pyProjectFile)) {
103515
103614
  return;
103516
103615
  }
@@ -103523,7 +103622,7 @@ function updatePythonPackageName(path6, projectName) {
103523
103622
  }
103524
103623
  var updatePackageName = (ctx) => {
103525
103624
  const placeholderNames = ["<PACKAGE_NAME>", "<TBD>", "TBD", ""];
103526
- const pkgJsonPath = (0, import_node_path20.resolve)(ctx.project.path, "package.json");
103625
+ const pkgJsonPath = (0, import_node_path21.resolve)(ctx.project.path, "package.json");
103527
103626
  const pkgJson = readJSON(pkgJsonPath);
103528
103627
  if (!placeholderNames.includes(pkgJson.name)) {
103529
103628
  return;
@@ -103541,7 +103640,7 @@ var updatePackageScripts = async (ctx) => {
103541
103640
  }
103542
103641
  const s = spinner();
103543
103642
  s.start("Updating `package.json` scripts");
103544
- const pkgJsonPath = (0, import_node_path20.resolve)(ctx.project.path, "package.json");
103643
+ const pkgJsonPath = (0, import_node_path21.resolve)(ctx.project.path, "package.json");
103545
103644
  let pkgJson = readJSON(pkgJsonPath);
103546
103645
  const transformed = await ctx.template.transformPackageJson(pkgJson, ctx);
103547
103646
  pkgJson = (0, import_deepmerge.default)(pkgJson, transformed);
@@ -103550,9 +103649,9 @@ var updatePackageScripts = async (ctx) => {
103550
103649
  };
103551
103650
  var getTemplatePath = (ctx) => {
103552
103651
  if (ctx.template.path) {
103553
- return (0, import_node_path20.resolve)(__dirname, "..", ctx.template.path);
103652
+ return (0, import_node_path21.resolve)(__dirname, "..", ctx.template.path);
103554
103653
  }
103555
- return (0, import_node_path20.resolve)(__dirname, "..", "templates", ctx.template.id);
103654
+ return (0, import_node_path21.resolve)(__dirname, "..", "templates", ctx.template.id);
103556
103655
  };
103557
103656
  var isVariantInfo = (copyFiles) => {
103558
103657
  return "path" in copyFiles;
@@ -103929,7 +104028,7 @@ var processArgument = async (args, key, promptConfig) => {
103929
104028
  // src/deploy.ts
103930
104029
  var import_promises9 = require("node:fs/promises");
103931
104030
  var import_node_os8 = require("node:os");
103932
- var import_node_path22 = require("node:path");
104031
+ var import_node_path23 = require("node:path");
103933
104032
 
103934
104033
  // src/helpers/poll.ts
103935
104034
  var import_promises8 = require("node:timers/promises");
@@ -104022,7 +104121,7 @@ function secondsSince(start) {
104022
104121
 
104023
104122
  // src/wrangler/config.ts
104024
104123
  var import_node_fs20 = require("node:fs");
104025
- var import_node_path21 = require("node:path");
104124
+ var import_node_path22 = require("node:path");
104026
104125
 
104027
104126
  // src/helpers/json.ts
104028
104127
  var import_comment_json2 = __toESM(require_src3());
@@ -104134,13 +104233,13 @@ ${generateHintsAsTomlComments(wranglerToml)}
104134
104233
  }
104135
104234
  };
104136
104235
  var getWranglerTomlPath = (ctx) => {
104137
- return (0, import_node_path21.resolve)(ctx.project.path, "wrangler.toml");
104236
+ return (0, import_node_path22.resolve)(ctx.project.path, "wrangler.toml");
104138
104237
  };
104139
104238
  var getWranglerJsonPath = (ctx) => {
104140
- return (0, import_node_path21.resolve)(ctx.project.path, "wrangler.json");
104239
+ return (0, import_node_path22.resolve)(ctx.project.path, "wrangler.json");
104141
104240
  };
104142
104241
  var getWranglerJsoncPath = (ctx) => {
104143
- return (0, import_node_path21.resolve)(ctx.project.path, "wrangler.jsonc");
104242
+ return (0, import_node_path22.resolve)(ctx.project.path, "wrangler.jsonc");
104144
104243
  };
104145
104244
  var wranglerTomlExists = (ctx) => {
104146
104245
  const wranglerTomlPath = getWranglerTomlPath(ctx);
@@ -104284,7 +104383,7 @@ function addNodejsCompatFlagToToml(wranglerConfig) {
104284
104383
 
104285
104384
  // src/deploy.ts
104286
104385
  var offerToDeploy = async (ctx) => {
104287
- const { npm: npm25 } = detectPackageManager();
104386
+ const { npm: npm24 } = detectPackageManager();
104288
104387
  startSection(`Deploy with Cloudflare`, `Step 3 of 3`);
104289
104388
  if (!await isDeployable(ctx)) {
104290
104389
  ctx.args.deploy = false;
@@ -104295,7 +104394,7 @@ var offerToDeploy = async (ctx) => {
104295
104394
  );
104296
104395
  }
104297
104396
  const label = `deploy via \`${quoteShellArgs([
104298
- npm25,
104397
+ npm24,
104299
104398
  "run",
104300
104399
  ctx.template.deployScript ?? "deploy"
104301
104400
  ])}\``;
@@ -104331,11 +104430,11 @@ var readWranglerConfig = (ctx) => {
104331
104430
  return dist_default4.parse(wranglerTomlStr.replace(/\r\n/g, "\n"));
104332
104431
  };
104333
104432
  var runDeploy = async (ctx) => {
104334
- const { npm: npm25, name: pm3 } = detectPackageManager();
104433
+ const { npm: npm24, name: pm3 } = detectPackageManager();
104335
104434
  if (!ctx.account?.id) {
104336
104435
  throw new Error("Failed to read Cloudflare account.");
104337
104436
  }
104338
- const baseDeployCmd = [npm25, "run", ctx.template.deployScript ?? "deploy"];
104437
+ const baseDeployCmd = [npm24, "run", ctx.template.deployScript ?? "deploy"];
104339
104438
  const insideGitRepo = await isInsideGitRepo(ctx.project.path);
104340
104439
  const deployCmd = [
104341
104440
  ...baseDeployCmd,
@@ -104346,8 +104445,8 @@ var runDeploy = async (ctx) => {
104346
104445
  JSON.stringify(ctx.commitMessage)
104347
104446
  ] : []
104348
104447
  ];
104349
- const outputFile = (0, import_node_path22.join)(
104350
- await (0, import_promises9.mkdtemp)((0, import_node_path22.join)((0, import_node_os8.tmpdir)(), "c3-wrangler-deploy-")),
104448
+ const outputFile = (0, import_node_path23.join)(
104449
+ await (0, import_promises9.mkdtemp)((0, import_node_path23.join)((0, import_node_os8.tmpdir)(), "c3-wrangler-deploy-")),
104351
104450
  "output.json"
104352
104451
  );
104353
104452
  await runCommand(deployCmd, {
@@ -104409,7 +104508,7 @@ var hasBinding = (node) => {
104409
104508
  };
104410
104509
 
104411
104510
  // src/dialog.ts
104412
- var import_node_path23 = require("node:path");
104511
+ var import_node_path24 = require("node:path");
104413
104512
  function createDialog(lines) {
104414
104513
  const screenWidth = process.stdout.columns;
104415
104514
  const maxLineWidth = Math.max(
@@ -104449,11 +104548,11 @@ function printWelcomeMessage(version3, telemetryEnabled, args) {
104449
104548
  }
104450
104549
  var printSummary = (ctx) => {
104451
104550
  const dashboardUrl = ctx.account ? `https://dash.cloudflare.com/?to=/:account/workers/services/view/${ctx.project.name}/production` : null;
104452
- const relativePath = (0, import_node_path23.relative)(ctx.originalCWD, ctx.project.path);
104551
+ const relativePath = (0, import_node_path24.relative)(ctx.originalCWD, ctx.project.path);
104453
104552
  const cdCommand = relativePath ? `cd ${relativePath}` : null;
104454
- const { npm: npm25 } = detectPackageManager();
104553
+ const { npm: npm24 } = detectPackageManager();
104455
104554
  const deployCommand = quoteShellArgs([
104456
- npm25,
104555
+ npm24,
104457
104556
  "run",
104458
104557
  ctx.template.deployScript ?? "deploy"
104459
104558
  ]);
@@ -104921,7 +105020,7 @@ var createProject = async (ctx) => {
104921
105020
 
104922
105021
  // src/workers.ts
104923
105022
  var import_node_fs21 = require("node:fs");
104924
- var import_node_path24 = require("node:path");
105023
+ var import_node_path25 = require("node:path");
104925
105024
 
104926
105025
  // ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/scanner.js
104927
105026
  function createScanner2(text, ignoreTrivia = false) {
@@ -106241,17 +106340,17 @@ async function addTypes(ctx) {
106241
106340
  if (!usesTypescript(ctx) || ctx.template.workersTypes === "none") {
106242
106341
  return;
106243
106342
  }
106244
- const { npm: npm25 } = detectPackageManager();
106343
+ const { npm: npm24 } = detectPackageManager();
106245
106344
  if (ctx.template.workersTypes === "installed") {
106246
- await installWorkersTypes(npm25);
106345
+ await installWorkersTypes(npm24);
106247
106346
  } else if (ctx.template.workersTypes === "generated") {
106248
- await generateWorkersTypes(ctx, npm25);
106347
+ await generateWorkersTypes(ctx, npm24);
106249
106348
  }
106250
- const usesNodeCompat = await maybeInstallNodeTypes(ctx, npm25);
106349
+ const usesNodeCompat = await maybeInstallNodeTypes(ctx, npm24);
106251
106350
  await updateTsConfig(ctx, { usesNodeCompat });
106252
106351
  }
106253
- async function generateWorkersTypes(ctx, npm25) {
106254
- const packageJsonPath = (0, import_node_path24.join)(ctx.project.path, "package.json");
106352
+ async function generateWorkersTypes(ctx, npm24) {
106353
+ const packageJsonPath = (0, import_node_path25.join)(ctx.project.path, "package.json");
106255
106354
  if (!(0, import_node_fs21.existsSync)(packageJsonPath)) {
106256
106355
  return;
106257
106356
  }
@@ -106259,7 +106358,7 @@ async function generateWorkersTypes(ctx, npm25) {
106259
106358
  if (!packageManifest.scripts?.["cf-typegen"]) {
106260
106359
  return;
106261
106360
  }
106262
- const typesCmd = [npm25, "run", "cf-typegen"];
106361
+ const typesCmd = [npm24, "run", "cf-typegen"];
106263
106362
  await runCommand(typesCmd, {
106264
106363
  cwd: ctx.project.path,
106265
106364
  silent: true,
@@ -106271,7 +106370,7 @@ async function generateWorkersTypes(ctx, npm25) {
106271
106370
  writeFile3(packageJsonPath, JSON.stringify(packageManifest, null, 2));
106272
106371
  }
106273
106372
  }
106274
- var maybeInstallNodeTypes = async (ctx, npm25) => {
106373
+ var maybeInstallNodeTypes = async (ctx, npm24) => {
106275
106374
  let parsedConfig = {};
106276
106375
  if (wranglerJsonOrJsoncExists(ctx)) {
106277
106376
  parsedConfig = readWranglerJsonOrJsonc(ctx);
@@ -106284,14 +106383,14 @@ var maybeInstallNodeTypes = async (ctx, npm25) => {
106284
106383
  await installPackages2(["@types/node"], {
106285
106384
  dev: true,
106286
106385
  startText: "Installing @types/node",
106287
- doneText: `${brandColor("installed")} ${dim(`via ${npm25}`)}`
106386
+ doneText: `${brandColor("installed")} ${dim(`via ${npm24}`)}`
106288
106387
  });
106289
106388
  return true;
106290
106389
  }
106291
106390
  return false;
106292
106391
  };
106293
106392
  async function updateTsConfig(ctx, { usesNodeCompat }) {
106294
- const tsconfigPath = (0, import_node_path24.join)(ctx.project.path, "tsconfig.json");
106393
+ const tsconfigPath = (0, import_node_path25.join)(ctx.project.path, "tsconfig.json");
106295
106394
  if (!(0, import_node_fs21.existsSync)(tsconfigPath)) {
106296
106395
  return;
106297
106396
  }
@@ -106356,16 +106455,15 @@ function hasProjectReferences(config49) {
106356
106455
  const tsconfig = config49;
106357
106456
  return Array.isArray(tsconfig.references) && tsconfig.references.length > 0;
106358
106457
  }
106359
- async function installWorkersTypes(npm25) {
106458
+ async function installWorkersTypes(npm24) {
106360
106459
  await installPackages2(["@cloudflare/workers-types"], {
106361
106460
  dev: true,
106362
106461
  startText: "Installing @cloudflare/workers-types",
106363
- doneText: `${brandColor("installed")} ${dim(`via ${npm25}`)}`
106462
+ doneText: `${brandColor("installed")} ${dim(`via ${npm24}`)}`
106364
106463
  });
106365
106464
  }
106366
106465
 
106367
106466
  // src/cli.ts
106368
- var { npm: npm24 } = detectPackageManager();
106369
106467
  var main = async (argv) => {
106370
106468
  const result = await parseArgs(argv);
106371
106469
  if (result.type === "unknown") {
@@ -106387,7 +106485,12 @@ ${result.errorMessage}`);
106387
106485
  }
106388
106486
  const { args } = result;
106389
106487
  logRaw("");
106390
- if (args.autoUpdate && !process.env.VITEST && !process.env.CI && isInteractive() && await isUpdateAvailable()) {
106488
+ if (args.autoUpdate && // If this process was already spawned by `runLatest`, don't try to update
106489
+ // again. Otherwise, package managers that resolve `cloudflare@latest` to a
106490
+ // version older than the npm `latest` tag (e.g. pnpm 11's `minimumReleaseAge`
106491
+ // supply-chain protection) would cause `isUpdateAvailable()` to stay true and
106492
+ // re-spawn C3 forever.
106493
+ !process.env.CREATE_CLOUDFLARE_RELAUNCHED && !process.env.VITEST && !process.env.CI && isInteractive() && await isUpdateAvailable()) {
106391
106494
  await runLatest();
106392
106495
  } else {
106393
106496
  await reporter.collectAsyncMetrics({
@@ -106399,19 +106502,12 @@ ${result.errorMessage}`);
106399
106502
  });
106400
106503
  }
106401
106504
  };
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
106505
  var runCli = async (args) => {
106410
106506
  printBanner(args);
106411
106507
  checkMacOSVersion({ shouldThrow: true });
106412
106508
  const ctx = await createContext(args);
106413
106509
  await create(ctx);
106414
- await configure16(ctx);
106510
+ await configure17(ctx);
106415
106511
  await deploy(ctx);
106416
106512
  printSummary(ctx);
106417
106513
  logRaw("");
@@ -106422,7 +106518,7 @@ var setupProjectDirectory = (ctx) => {
106422
106518
  if (err) {
106423
106519
  throw new Error(err);
106424
106520
  }
106425
- const directory = (0, import_node_path25.dirname)(path6);
106521
+ const directory = (0, import_node_path26.dirname)(path6);
106426
106522
  (0, import_node_fs22.mkdirSync)(directory, { recursive: true });
106427
106523
  (0, import_node_process14.chdir)(directory);
106428
106524
  };
@@ -106445,7 +106541,7 @@ var create = async (ctx) => {
106445
106541
  }
106446
106542
  endSection(`Application created`);
106447
106543
  };
106448
- var configure16 = async (ctx) => {
106544
+ var configure17 = async (ctx) => {
106449
106545
  startSection(
106450
106546
  `Configuring your application for Cloudflare${ctx.args.experimental ? ` via \`wrangler setup\`` : ""}`,
106451
106547
  "Step 2 of 3"
@@ -106520,7 +106616,6 @@ ${getPnpmIgnoredBuildsGuidance(e.packages)}`);
106520
106616
  0 && (module.exports = {
106521
106617
  main,
106522
106618
  runCli,
106523
- runLatest,
106524
106619
  setupProjectDirectory
106525
106620
  });
106526
106621
  /*! Bundled license information: