@yamada-ui/cli 2.0.6 → 2.0.7-dev-20260216073817

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.
@@ -45,19 +45,19 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
45
45
  var __getOwnPropNames = Object.getOwnPropertyNames;
46
46
  var __getProtoOf = Object.getPrototypeOf;
47
47
  var __hasOwnProp = Object.prototype.hasOwnProperty;
48
- var __esm = (fn, res) => function() {
49
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
50
- };
51
- var __commonJS = (cb, mod) => function() {
52
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
53
- };
48
+ var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
49
+ var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
54
50
  var __copyProps = (to, from, except, desc) => {
55
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
56
- key = keys[i];
57
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
58
- get: ((k) => from[k]).bind(null, key),
59
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
60
- });
51
+ if (from && typeof from === "object" || typeof from === "function") {
52
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
53
+ key = keys[i];
54
+ if (!__hasOwnProp.call(to, key) && key !== except) {
55
+ __defProp(to, key, {
56
+ get: ((k) => from[k]).bind(null, key),
57
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
58
+ });
59
+ }
60
+ }
61
61
  }
62
62
  return to;
63
63
  };
@@ -69,28 +69,28 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
69
69
 
70
70
  //#endregion
71
71
  //#region ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js
72
- var require_polyfills$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js": ((exports, module) => {
72
+ var require_polyfills$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
73
73
  var constants$1 = __require("constants");
74
- var origCwd$1 = process.cwd;
75
- var cwd$2 = null;
76
- var platform$1 = process.env.GRACEFUL_FS_PLATFORM || process.platform;
74
+ var origCwd = process.cwd;
75
+ var cwd = null;
76
+ var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
77
77
  process.cwd = function() {
78
- if (!cwd$2) cwd$2 = origCwd$1.call(process);
79
- return cwd$2;
78
+ if (!cwd) cwd = origCwd.call(process);
79
+ return cwd;
80
80
  };
81
81
  try {
82
82
  process.cwd();
83
83
  } catch (er) {}
84
84
  if (typeof process.chdir === "function") {
85
- var chdir$1 = process.chdir;
85
+ var chdir = process.chdir;
86
86
  process.chdir = function(d) {
87
- cwd$2 = null;
88
- chdir$1.call(process, d);
87
+ cwd = null;
88
+ chdir.call(process, d);
89
89
  };
90
- if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir$1);
90
+ if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
91
91
  }
92
- module.exports = patch$3;
93
- function patch$3(fs$9) {
92
+ module.exports = patch;
93
+ function patch(fs$9) {
94
94
  if (constants$1.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) patchLchmod(fs$9);
95
95
  if (!fs$9.lutimes) patchLutimes(fs$9);
96
96
  fs$9.chown = chownFix(fs$9.chown);
@@ -123,7 +123,7 @@ var require_polyfills$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
123
123
  };
124
124
  fs$9.lchownSync = function() {};
125
125
  }
126
- if (platform$1 === "win32") fs$9.rename = typeof fs$9.rename !== "function" ? fs$9.rename : (function(fs$rename) {
126
+ if (platform === "win32") fs$9.rename = typeof fs$9.rename !== "function" ? fs$9.rename : (function(fs$rename) {
127
127
  function rename(from, to, cb) {
128
128
  var start = Date.now();
129
129
  var backoff = 0;
@@ -318,14 +318,14 @@ var require_polyfills$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
318
318
  return false;
319
319
  }
320
320
  }
321
- }) });
321
+ }));
322
322
 
323
323
  //#endregion
324
324
  //#region ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js
325
- var require_legacy_streams$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js": ((exports, module) => {
325
+ var require_legacy_streams$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
326
326
  var Stream$2 = __require("stream").Stream;
327
- module.exports = legacy$3;
328
- function legacy$3(fs$9) {
327
+ module.exports = legacy;
328
+ function legacy(fs$9) {
329
329
  return {
330
330
  ReadStream,
331
331
  WriteStream
@@ -408,92 +408,92 @@ var require_legacy_streams$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/
408
408
  }
409
409
  }
410
410
  }
411
- }) });
411
+ }));
412
412
 
413
413
  //#endregion
414
414
  //#region ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js
415
- var require_clone$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js": ((exports, module) => {
416
- module.exports = clone$3;
417
- var getPrototypeOf$1 = Object.getPrototypeOf || function(obj) {
415
+ var require_clone$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
416
+ module.exports = clone;
417
+ var getPrototypeOf = Object.getPrototypeOf || function(obj) {
418
418
  return obj.__proto__;
419
419
  };
420
- function clone$3(obj) {
420
+ function clone(obj) {
421
421
  if (obj === null || typeof obj !== "object") return obj;
422
- if (obj instanceof Object) var copy = { __proto__: getPrototypeOf$1(obj) };
422
+ if (obj instanceof Object) var copy = { __proto__: getPrototypeOf(obj) };
423
423
  else var copy = Object.create(null);
424
424
  Object.getOwnPropertyNames(obj).forEach(function(key) {
425
425
  Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
426
426
  });
427
427
  return copy;
428
428
  }
429
- }) });
429
+ }));
430
430
 
431
431
  //#endregion
432
432
  //#region ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
433
- var require_graceful_fs$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js": ((exports, module) => {
433
+ var require_graceful_fs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
434
434
  var fs$8 = __require("fs");
435
- var polyfills$1 = require_polyfills$1();
436
- var legacy$2 = require_legacy_streams$1();
437
- var clone$2 = require_clone$1();
438
- var util$2 = __require("util");
435
+ var polyfills = require_polyfills$1();
436
+ var legacy = require_legacy_streams$1();
437
+ var clone = require_clone$1();
438
+ var util$1 = __require("util");
439
439
  /* istanbul ignore next - node 0.x polyfill */
440
- var gracefulQueue$1;
441
- var previousSymbol$1;
440
+ var gracefulQueue;
441
+ var previousSymbol;
442
442
  /* istanbul ignore else - node 0.x polyfill */
443
443
  if (typeof Symbol === "function" && typeof Symbol.for === "function") {
444
- gracefulQueue$1 = Symbol.for("graceful-fs.queue");
445
- previousSymbol$1 = Symbol.for("graceful-fs.previous");
444
+ gracefulQueue = Symbol.for("graceful-fs.queue");
445
+ previousSymbol = Symbol.for("graceful-fs.previous");
446
446
  } else {
447
- gracefulQueue$1 = "___graceful-fs.queue";
448
- previousSymbol$1 = "___graceful-fs.previous";
447
+ gracefulQueue = "___graceful-fs.queue";
448
+ previousSymbol = "___graceful-fs.previous";
449
449
  }
450
- function noop$1() {}
451
- function publishQueue$1(context, queue) {
452
- Object.defineProperty(context, gracefulQueue$1, { get: function() {
450
+ function noop() {}
451
+ function publishQueue(context, queue) {
452
+ Object.defineProperty(context, gracefulQueue, { get: function() {
453
453
  return queue;
454
454
  } });
455
455
  }
456
- var debug$1 = noop$1;
457
- if (util$2.debuglog) debug$1 = util$2.debuglog("gfs4");
458
- else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) debug$1 = function() {
459
- var m = util$2.format.apply(util$2, arguments);
456
+ var debug = noop;
457
+ if (util$1.debuglog) debug = util$1.debuglog("gfs4");
458
+ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) debug = function() {
459
+ var m = util$1.format.apply(util$1, arguments);
460
460
  m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
461
461
  console.error(m);
462
462
  };
463
- if (!fs$8[gracefulQueue$1]) {
464
- publishQueue$1(fs$8, global[gracefulQueue$1] || []);
463
+ if (!fs$8[gracefulQueue]) {
464
+ publishQueue(fs$8, global[gracefulQueue] || []);
465
465
  fs$8.close = (function(fs$close) {
466
466
  function close(fd, cb) {
467
467
  return fs$close.call(fs$8, fd, function(err) {
468
- if (!err) resetQueue$1();
468
+ if (!err) resetQueue();
469
469
  if (typeof cb === "function") cb.apply(this, arguments);
470
470
  });
471
471
  }
472
- Object.defineProperty(close, previousSymbol$1, { value: fs$close });
472
+ Object.defineProperty(close, previousSymbol, { value: fs$close });
473
473
  return close;
474
474
  })(fs$8.close);
475
475
  fs$8.closeSync = (function(fs$closeSync) {
476
476
  function closeSync(fd) {
477
477
  fs$closeSync.apply(fs$8, arguments);
478
- resetQueue$1();
478
+ resetQueue();
479
479
  }
480
- Object.defineProperty(closeSync, previousSymbol$1, { value: fs$closeSync });
480
+ Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync });
481
481
  return closeSync;
482
482
  })(fs$8.closeSync);
483
483
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) process.on("exit", function() {
484
- debug$1(fs$8[gracefulQueue$1]);
485
- __require("assert").equal(fs$8[gracefulQueue$1].length, 0);
484
+ debug(fs$8[gracefulQueue]);
485
+ __require("assert").equal(fs$8[gracefulQueue].length, 0);
486
486
  });
487
487
  }
488
- if (!global[gracefulQueue$1]) publishQueue$1(global, fs$8[gracefulQueue$1]);
489
- module.exports = patch$2(clone$2(fs$8));
488
+ if (!global[gracefulQueue]) publishQueue(global, fs$8[gracefulQueue]);
489
+ module.exports = patch(clone(fs$8));
490
490
  if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$8.__patched) {
491
- module.exports = patch$2(fs$8);
491
+ module.exports = patch(fs$8);
492
492
  fs$8.__patched = true;
493
493
  }
494
- function patch$2(fs$9) {
495
- polyfills$1(fs$9);
496
- fs$9.gracefulify = patch$2;
494
+ function patch(fs$9) {
495
+ polyfills(fs$9);
496
+ fs$9.gracefulify = patch;
497
497
  fs$9.createReadStream = createReadStream;
498
498
  fs$9.createWriteStream = createWriteStream;
499
499
  var fs$readFile = fs$9.readFile;
@@ -503,7 +503,7 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
503
503
  return go$readFile(path$9, options, cb);
504
504
  function go$readFile(path$10, options$1, cb$1, startTime) {
505
505
  return fs$readFile(path$10, options$1, function(err) {
506
- if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue$1([
506
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([
507
507
  go$readFile,
508
508
  [
509
509
  path$10,
@@ -525,7 +525,7 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
525
525
  return go$writeFile(path$9, data, options, cb);
526
526
  function go$writeFile(path$10, data$1, options$1, cb$1, startTime) {
527
527
  return fs$writeFile(path$10, data$1, options$1, function(err) {
528
- if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue$1([
528
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([
529
529
  go$writeFile,
530
530
  [
531
531
  path$10,
@@ -548,7 +548,7 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
548
548
  return go$appendFile(path$9, data, options, cb);
549
549
  function go$appendFile(path$10, data$1, options$1, cb$1, startTime) {
550
550
  return fs$appendFile(path$10, data$1, options$1, function(err) {
551
- if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue$1([
551
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([
552
552
  go$appendFile,
553
553
  [
554
554
  path$10,
@@ -574,7 +574,7 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
574
574
  return go$copyFile(src, dest, flags, cb);
575
575
  function go$copyFile(src$1, dest$1, flags$1, cb$1, startTime) {
576
576
  return fs$copyFile(src$1, dest$1, flags$1, function(err) {
577
- if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue$1([
577
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([
578
578
  go$copyFile,
579
579
  [
580
580
  src$1,
@@ -603,7 +603,7 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
603
603
  return go$readdir(path$9, options, cb);
604
604
  function fs$readdirCallback(path$10, options$1, cb$1, startTime) {
605
605
  return function(err, files$1) {
606
- if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue$1([
606
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([
607
607
  go$readdir,
608
608
  [
609
609
  path$10,
@@ -622,7 +622,7 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
622
622
  }
623
623
  }
624
624
  if (process.version.substr(0, 4) === "v0.8") {
625
- var legStreams = legacy$2(fs$9);
625
+ var legStreams = legacy(fs$9);
626
626
  ReadStream = legStreams.ReadStream;
627
627
  WriteStream = legStreams.WriteStream;
628
628
  }
@@ -724,7 +724,7 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
724
724
  return go$open(path$9, flags, mode, cb);
725
725
  function go$open(path$10, flags$1, mode$1, cb$1, startTime) {
726
726
  return fs$open(path$10, flags$1, mode$1, function(err, fd) {
727
- if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue$1([
727
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([
728
728
  go$open,
729
729
  [
730
730
  path$10,
@@ -742,48 +742,48 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
742
742
  }
743
743
  return fs$9;
744
744
  }
745
- function enqueue$1(elem) {
746
- debug$1("ENQUEUE", elem[0].name, elem[1]);
747
- fs$8[gracefulQueue$1].push(elem);
748
- retry$1();
745
+ function enqueue(elem) {
746
+ debug("ENQUEUE", elem[0].name, elem[1]);
747
+ fs$8[gracefulQueue].push(elem);
748
+ retry();
749
749
  }
750
- var retryTimer$1;
751
- function resetQueue$1() {
750
+ var retryTimer;
751
+ function resetQueue() {
752
752
  var now = Date.now();
753
- for (var i = 0; i < fs$8[gracefulQueue$1].length; ++i) if (fs$8[gracefulQueue$1][i].length > 2) {
754
- fs$8[gracefulQueue$1][i][3] = now;
755
- fs$8[gracefulQueue$1][i][4] = now;
753
+ for (var i = 0; i < fs$8[gracefulQueue].length; ++i) if (fs$8[gracefulQueue][i].length > 2) {
754
+ fs$8[gracefulQueue][i][3] = now;
755
+ fs$8[gracefulQueue][i][4] = now;
756
756
  }
757
- retry$1();
757
+ retry();
758
758
  }
759
- function retry$1() {
760
- clearTimeout(retryTimer$1);
761
- retryTimer$1 = void 0;
762
- if (fs$8[gracefulQueue$1].length === 0) return;
763
- var elem = fs$8[gracefulQueue$1].shift();
759
+ function retry() {
760
+ clearTimeout(retryTimer);
761
+ retryTimer = void 0;
762
+ if (fs$8[gracefulQueue].length === 0) return;
763
+ var elem = fs$8[gracefulQueue].shift();
764
764
  var fn = elem[0];
765
765
  var args = elem[1];
766
766
  var err = elem[2];
767
767
  var startTime = elem[3];
768
768
  var lastTime = elem[4];
769
769
  if (startTime === void 0) {
770
- debug$1("RETRY", fn.name, args);
770
+ debug("RETRY", fn.name, args);
771
771
  fn.apply(null, args);
772
772
  } else if (Date.now() - startTime >= 6e4) {
773
- debug$1("TIMEOUT", fn.name, args);
773
+ debug("TIMEOUT", fn.name, args);
774
774
  var cb = args.pop();
775
775
  if (typeof cb === "function") cb.call(null, err);
776
776
  } else {
777
777
  var sinceAttempt = Date.now() - lastTime;
778
778
  var sinceStart = Math.max(lastTime - startTime, 1);
779
779
  if (sinceAttempt >= Math.min(sinceStart * 1.2, 100)) {
780
- debug$1("RETRY", fn.name, args);
780
+ debug("RETRY", fn.name, args);
781
781
  fn.apply(null, args.concat([startTime]));
782
- } else fs$8[gracefulQueue$1].push(elem);
782
+ } else fs$8[gracefulQueue].push(elem);
783
783
  }
784
- if (retryTimer$1 === void 0) retryTimer$1 = setTimeout(retry$1, 0);
784
+ if (retryTimer === void 0) retryTimer = setTimeout(retry, 0);
785
785
  }
786
- }) });
786
+ }));
787
787
 
788
788
  //#endregion
789
789
  //#region ../../node_modules/.pnpm/xdg-basedir@5.1.0/node_modules/xdg-basedir/index.js
@@ -947,7 +947,7 @@ const FS = {
947
947
  var dist_default = FS;
948
948
 
949
949
  //#endregion
950
- //#region ../../node_modules/.pnpm/atomically@2.1.0/node_modules/atomically/dist/constants.js
950
+ //#region ../../node_modules/.pnpm/atomically@2.1.1/node_modules/atomically/dist/constants.js
951
951
  const DEFAULT_ENCODING = "utf8";
952
952
  const DEFAULT_FILE_MODE = 438;
953
953
  const DEFAULT_FOLDER_MODE = 511;
@@ -960,7 +960,7 @@ const IS_USER_ROOT = process$1.getuid ? !process$1.getuid() : false;
960
960
  const LIMIT_BASENAME_LENGTH = 128;
961
961
 
962
962
  //#endregion
963
- //#region ../../node_modules/.pnpm/atomically@2.1.0/node_modules/atomically/dist/utils/lang.js
963
+ //#region ../../node_modules/.pnpm/atomically@2.1.1/node_modules/atomically/dist/utils/lang.js
964
964
  const isException = (value) => {
965
965
  return value instanceof Error && "code" in value;
966
966
  };
@@ -1023,7 +1023,7 @@ const whenExit = interceptor_default.register;
1023
1023
  var node_default = whenExit;
1024
1024
 
1025
1025
  //#endregion
1026
- //#region ../../node_modules/.pnpm/atomically@2.1.0/node_modules/atomically/dist/utils/temp.js
1026
+ //#region ../../node_modules/.pnpm/atomically@2.1.1/node_modules/atomically/dist/utils/temp.js
1027
1027
  const Temp = {
1028
1028
  store: {},
1029
1029
  create: (filePath) => {
@@ -1063,7 +1063,7 @@ node_default(Temp.purgeSyncAll);
1063
1063
  var temp_default = Temp;
1064
1064
 
1065
1065
  //#endregion
1066
- //#region ../../node_modules/.pnpm/atomically@2.1.0/node_modules/atomically/dist/index.js
1066
+ //#region ../../node_modules/.pnpm/atomically@2.1.1/node_modules/atomically/dist/index.js
1067
1067
  function writeFileSync(filePath, data, options = DEFAULT_WRITE_OPTIONS) {
1068
1068
  if (isString$1(options)) return writeFileSync(filePath, data, { encoding: options });
1069
1069
  const retryOptions = { timeout: options.timeout ?? DEFAULT_TIMEOUT_SYNC };
@@ -1291,11 +1291,11 @@ function handlePermissionError(error) {
1291
1291
  throw error;
1292
1292
  }
1293
1293
  var Configstore = class {
1294
- constructor(id, defaults$1, options = {}) {
1294
+ constructor(id, defaults, options = {}) {
1295
1295
  this._path = options.configPath ?? getConfigDirectory(id, options.globalConfigPath);
1296
1296
  this._clearInvalidConfig = options.clearInvalidConfig ?? true;
1297
- if (defaults$1) this.all = {
1298
- ...defaults$1,
1297
+ if (defaults) this.all = {
1298
+ ...defaults,
1299
1299
  ...this.all
1300
1300
  };
1301
1301
  }
@@ -1762,7 +1762,7 @@ const chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
1762
1762
  var source_default = chalk;
1763
1763
 
1764
1764
  //#endregion
1765
- //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/errors/HTTPError.js
1765
+ //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/errors/HTTPError.js
1766
1766
  var HTTPError = class extends Error {
1767
1767
  response;
1768
1768
  request;
@@ -1779,7 +1779,7 @@ var HTTPError = class extends Error {
1779
1779
  };
1780
1780
 
1781
1781
  //#endregion
1782
- //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/errors/NonError.js
1782
+ //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/errors/NonError.js
1783
1783
  /**
1784
1784
  Wrapper for non-Error values that were thrown.
1785
1785
 
@@ -1800,7 +1800,27 @@ var NonError = class extends Error {
1800
1800
  };
1801
1801
 
1802
1802
  //#endregion
1803
- //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/core/constants.js
1803
+ //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/errors/ForceRetryError.js
1804
+ /**
1805
+ Internal error used to signal a forced retry from afterResponse hooks.
1806
+ This is thrown when a user returns ky.retry() from an afterResponse hook.
1807
+ */
1808
+ var ForceRetryError = class extends Error {
1809
+ name = "ForceRetryError";
1810
+ customDelay;
1811
+ code;
1812
+ customRequest;
1813
+ constructor(options) {
1814
+ const cause = options?.cause ? options.cause instanceof Error ? options.cause : new NonError(options.cause) : void 0;
1815
+ super(options?.code ? `Forced retry: ${options.code}` : "Forced retry", cause ? { cause } : void 0);
1816
+ this.customDelay = options?.delay;
1817
+ this.code = options?.code;
1818
+ this.customRequest = options?.request;
1819
+ }
1820
+ };
1821
+
1822
+ //#endregion
1823
+ //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/core/constants.js
1804
1824
  const supportsRequestStreams = (() => {
1805
1825
  let duplexAccessed = false;
1806
1826
  let hasContentType = false;
@@ -1846,6 +1866,99 @@ const responseTypes = {
1846
1866
  const maxSafeTimeout = 2147483647;
1847
1867
  const usualFormBoundarySize = new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length;
1848
1868
  const stop = Symbol("stop");
1869
+ /**
1870
+ Marker returned by ky.retry() to signal a forced retry from afterResponse hooks.
1871
+ */
1872
+ var RetryMarker = class {
1873
+ options;
1874
+ constructor(options) {
1875
+ this.options = options;
1876
+ }
1877
+ };
1878
+ /**
1879
+ Force a retry from an `afterResponse` hook.
1880
+
1881
+ This allows you to retry a request based on the response content, even if the response has a successful status code. The retry will respect the `retry.limit` option and skip the `shouldRetry` check. The forced retry is observable in `beforeRetry` hooks, where the error will be a `ForceRetryError`.
1882
+
1883
+ @param options - Optional configuration for the retry.
1884
+
1885
+ @example
1886
+ ```
1887
+ import ky, {isForceRetryError} from 'ky';
1888
+
1889
+ const api = ky.extend({
1890
+ hooks: {
1891
+ afterResponse: [
1892
+ async (request, options, response) => {
1893
+ // Retry based on response body content
1894
+ if (response.status === 200) {
1895
+ const data = await response.clone().json();
1896
+
1897
+ // Simple retry with default delay
1898
+ if (data.error?.code === 'TEMPORARY_ERROR') {
1899
+ return ky.retry();
1900
+ }
1901
+
1902
+ // Retry with custom delay from API response
1903
+ if (data.error?.code === 'RATE_LIMIT') {
1904
+ return ky.retry({
1905
+ delay: data.error.retryAfter * 1000,
1906
+ code: 'RATE_LIMIT'
1907
+ });
1908
+ }
1909
+
1910
+ // Retry with a modified request (e.g., fallback endpoint)
1911
+ if (data.error?.code === 'FALLBACK_TO_BACKUP') {
1912
+ return ky.retry({
1913
+ request: new Request('https://backup-api.com/endpoint', {
1914
+ method: request.method,
1915
+ headers: request.headers,
1916
+ }),
1917
+ code: 'BACKUP_ENDPOINT'
1918
+ });
1919
+ }
1920
+
1921
+ // Retry with refreshed authentication
1922
+ if (data.error?.code === 'TOKEN_REFRESH' && data.newToken) {
1923
+ return ky.retry({
1924
+ request: new Request(request, {
1925
+ headers: {
1926
+ ...Object.fromEntries(request.headers),
1927
+ 'Authorization': `Bearer ${data.newToken}`
1928
+ }
1929
+ }),
1930
+ code: 'TOKEN_REFRESHED'
1931
+ });
1932
+ }
1933
+
1934
+ // Retry with cause to preserve error chain
1935
+ try {
1936
+ validateResponse(data);
1937
+ } catch (error) {
1938
+ return ky.retry({
1939
+ code: 'VALIDATION_FAILED',
1940
+ cause: error
1941
+ });
1942
+ }
1943
+ }
1944
+ }
1945
+ ],
1946
+ beforeRetry: [
1947
+ ({error, retryCount}) => {
1948
+ // Observable in beforeRetry hooks
1949
+ if (isForceRetryError(error)) {
1950
+ console.log(`Forced retry #${retryCount}: ${error.message}`);
1951
+ // Example output: "Forced retry #1: Forced retry: RATE_LIMIT"
1952
+ }
1953
+ }
1954
+ ]
1955
+ }
1956
+ });
1957
+
1958
+ const response = await api.get('https://example.com/api');
1959
+ ```
1960
+ */
1961
+ const retry = (options) => new RetryMarker(options);
1849
1962
  const kyOptionKeys = {
1850
1963
  json: true,
1851
1964
  parseJson: true,
@@ -1880,7 +1993,7 @@ const requestOptionsRegistry = {
1880
1993
  };
1881
1994
 
1882
1995
  //#endregion
1883
- //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/utils/body.js
1996
+ //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/utils/body.js
1884
1997
  const getBodySize = (body) => {
1885
1998
  if (!body) return 0;
1886
1999
  if (body instanceof FormData) {
@@ -1959,11 +2072,11 @@ const streamRequest = (request, onUploadProgress, originalBody) => {
1959
2072
  };
1960
2073
 
1961
2074
  //#endregion
1962
- //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/utils/is.js
2075
+ //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/utils/is.js
1963
2076
  const isObject$1 = (value) => value !== null && typeof value === "object";
1964
2077
 
1965
2078
  //#endregion
1966
- //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/utils/merge.js
2079
+ //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/utils/merge.js
1967
2080
  const validateAndMerge = (...sources) => {
1968
2081
  for (const source of sources) if ((!isObject$1(source) || Array.isArray(source)) && source !== void 0) throw new TypeError("The `options` argument must be an object");
1969
2082
  return deepMerge({}, ...sources);
@@ -2053,12 +2166,11 @@ const deepMerge = (...sources) => {
2053
2166
  if (signals.length > 0) if (signals.length === 1) returnValue.signal = signals[0];
2054
2167
  else if (supportsAbortSignal) returnValue.signal = AbortSignal.any(signals);
2055
2168
  else returnValue.signal = signals.at(-1);
2056
- if (returnValue.context === void 0) returnValue.context = {};
2057
2169
  return returnValue;
2058
2170
  };
2059
2171
 
2060
2172
  //#endregion
2061
- //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/utils/normalize.js
2173
+ //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/utils/normalize.js
2062
2174
  const normalizeRequestMethod = (input) => requestMethods.includes(input) ? input.toUpperCase() : input;
2063
2175
  const defaultRetryOptions = {
2064
2176
  limit: 2,
@@ -2090,21 +2202,23 @@ const defaultRetryOptions = {
2090
2202
  jitter: void 0,
2091
2203
  retryOnTimeout: false
2092
2204
  };
2093
- const normalizeRetryOptions = (retry$2 = {}) => {
2094
- if (typeof retry$2 === "number") return {
2205
+ const normalizeRetryOptions = (retry$1 = {}) => {
2206
+ if (typeof retry$1 === "number") return {
2095
2207
  ...defaultRetryOptions,
2096
- limit: retry$2
2208
+ limit: retry$1
2097
2209
  };
2098
- if (retry$2.methods && !Array.isArray(retry$2.methods)) throw new Error("retry.methods must be an array");
2099
- if (retry$2.statusCodes && !Array.isArray(retry$2.statusCodes)) throw new Error("retry.statusCodes must be an array");
2210
+ if (retry$1.methods && !Array.isArray(retry$1.methods)) throw new Error("retry.methods must be an array");
2211
+ retry$1.methods &&= retry$1.methods.map((method) => method.toLowerCase());
2212
+ if (retry$1.statusCodes && !Array.isArray(retry$1.statusCodes)) throw new Error("retry.statusCodes must be an array");
2213
+ const normalizedRetry = Object.fromEntries(Object.entries(retry$1).filter(([, value]) => value !== void 0));
2100
2214
  return {
2101
2215
  ...defaultRetryOptions,
2102
- ...retry$2
2216
+ ...normalizedRetry
2103
2217
  };
2104
2218
  };
2105
2219
 
2106
2220
  //#endregion
2107
- //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/errors/TimeoutError.js
2221
+ //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/errors/TimeoutError.js
2108
2222
  var TimeoutError = class extends Error {
2109
2223
  request;
2110
2224
  constructor(request) {
@@ -2115,7 +2229,7 @@ var TimeoutError = class extends Error {
2115
2229
  };
2116
2230
 
2117
2231
  //#endregion
2118
- //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/utils/timeout.js
2232
+ //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/utils/timeout.js
2119
2233
  async function timeout(request, init$1, abortController, options) {
2120
2234
  return new Promise((resolve, reject) => {
2121
2235
  const timeoutId = setTimeout(() => {
@@ -2129,7 +2243,7 @@ async function timeout(request, init$1, abortController, options) {
2129
2243
  }
2130
2244
 
2131
2245
  //#endregion
2132
- //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/utils/delay.js
2246
+ //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/utils/delay.js
2133
2247
  async function delay(ms, { signal }) {
2134
2248
  return new Promise((resolve, reject) => {
2135
2249
  if (signal) {
@@ -2148,7 +2262,7 @@ async function delay(ms, { signal }) {
2148
2262
  }
2149
2263
 
2150
2264
  //#endregion
2151
- //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/utils/options.js
2265
+ //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/utils/options.js
2152
2266
  const findUnknownOptions = (request, options) => {
2153
2267
  const unknownOptions = {};
2154
2268
  for (const key in options) {
@@ -2167,7 +2281,7 @@ const hasSearchParameters = (search) => {
2167
2281
  };
2168
2282
 
2169
2283
  //#endregion
2170
- //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/utils/type-guards.js
2284
+ //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/utils/type-guards.js
2171
2285
  /**
2172
2286
  Type guard to check if an error is an HTTPError.
2173
2287
 
@@ -2212,7 +2326,7 @@ function isTimeoutError(error) {
2212
2326
  }
2213
2327
 
2214
2328
  //#endregion
2215
- //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/core/Ky.js
2329
+ //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/core/Ky.js
2216
2330
  var Ky = class Ky {
2217
2331
  static create(input, options) {
2218
2332
  const ky$1 = new Ky(input, options);
@@ -2221,11 +2335,27 @@ var Ky = class Ky {
2221
2335
  await Promise.resolve();
2222
2336
  let response = await ky$1.#fetch();
2223
2337
  for (const hook of ky$1.#options.hooks.afterResponse) {
2224
- const modifiedResponse = await hook(ky$1.request, ky$1.#getNormalizedOptions(), ky$1.#decorateResponse(response.clone()), { retryCount: ky$1.#retryCount });
2225
- if (modifiedResponse instanceof globalThis.Response) response = modifiedResponse;
2338
+ const clonedResponse = ky$1.#decorateResponse(response.clone());
2339
+ let modifiedResponse;
2340
+ try {
2341
+ modifiedResponse = await hook(ky$1.request, ky$1.#getNormalizedOptions(), clonedResponse, { retryCount: ky$1.#retryCount });
2342
+ } catch (error) {
2343
+ ky$1.#cancelResponseBody(clonedResponse);
2344
+ ky$1.#cancelResponseBody(response);
2345
+ throw error;
2346
+ }
2347
+ if (modifiedResponse instanceof RetryMarker) {
2348
+ ky$1.#cancelResponseBody(clonedResponse);
2349
+ ky$1.#cancelResponseBody(response);
2350
+ throw new ForceRetryError(modifiedResponse.options);
2351
+ }
2352
+ const nextResponse = modifiedResponse instanceof globalThis.Response ? modifiedResponse : response;
2353
+ if (clonedResponse !== nextResponse) ky$1.#cancelResponseBody(clonedResponse);
2354
+ if (response !== nextResponse) ky$1.#cancelResponseBody(response);
2355
+ response = nextResponse;
2226
2356
  }
2227
2357
  ky$1.#decorateResponse(response);
2228
- if (!response.ok && ky$1.#options.throwHttpErrors) {
2358
+ if (!response.ok && (typeof ky$1.#options.throwHttpErrors === "function" ? ky$1.#options.throwHttpErrors(response.status) : ky$1.#options.throwHttpErrors)) {
2229
2359
  let error = new HTTPError(response, ky$1.request, ky$1.#getNormalizedOptions());
2230
2360
  for (const hook of ky$1.#options.hooks.beforeError) error = await hook(error, { retryCount: ky$1.#retryCount });
2231
2361
  throw error;
@@ -2233,16 +2363,16 @@ var Ky = class Ky {
2233
2363
  if (ky$1.#options.onDownloadProgress) {
2234
2364
  if (typeof ky$1.#options.onDownloadProgress !== "function") throw new TypeError("The `onDownloadProgress` option must be a function");
2235
2365
  if (!supportsResponseStreams) throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");
2236
- return streamResponse(response.clone(), ky$1.#options.onDownloadProgress);
2366
+ const progressResponse = response.clone();
2367
+ ky$1.#cancelResponseBody(response);
2368
+ return streamResponse(progressResponse, ky$1.#options.onDownloadProgress);
2237
2369
  }
2238
2370
  return response;
2239
2371
  };
2240
- const result = (ky$1.#options.retry.methods.includes(ky$1.request.method.toLowerCase()) ? ky$1.#retry(function_) : function_()).finally(async () => {
2372
+ const result = ky$1.#retry(function_).finally(() => {
2241
2373
  const originalRequest = ky$1.#originalRequest;
2242
- const cleanupPromises = [];
2243
- if (originalRequest && !originalRequest.bodyUsed) cleanupPromises.push(originalRequest.body?.cancel());
2244
- if (!ky$1.request.bodyUsed) cleanupPromises.push(ky$1.request.body?.cancel());
2245
- await Promise.all(cleanupPromises);
2374
+ ky$1.#cancelBody(originalRequest?.body ?? void 0);
2375
+ ky$1.#cancelBody(ky$1.request.body ?? void 0);
2246
2376
  });
2247
2377
  for (const [type$1, mimeType] of Object.entries(responseTypes)) {
2248
2378
  if (type$1 === "bytes" && typeof globalThis.Response?.prototype?.bytes !== "function") continue;
@@ -2287,7 +2417,7 @@ var Ky = class Ky {
2287
2417
  method: normalizeRequestMethod(options.method ?? this.#input.method ?? "GET"),
2288
2418
  prefixUrl: String(options.prefixUrl || ""),
2289
2419
  retry: normalizeRetryOptions(options.retry),
2290
- throwHttpErrors: options.throwHttpErrors !== false,
2420
+ throwHttpErrors: options.throwHttpErrors ?? true,
2291
2421
  timeout: options.timeout ?? 1e4,
2292
2422
  fetch: options.fetch ?? globalThis.fetch.bind(globalThis),
2293
2423
  context: options.context ?? {}
@@ -2314,12 +2444,12 @@ var Ky = class Ky {
2314
2444
  if (hasSearchParameters(this.#options.searchParams)) {
2315
2445
  const searchParams = "?" + (typeof this.#options.searchParams === "string" ? this.#options.searchParams.replace(/^\?/, "") : new URLSearchParams(Ky.#normalizeSearchParams(this.#options.searchParams)).toString());
2316
2446
  const url$2 = this.request.url.replace(/(?:\?.*?)?(?=#|$)/, searchParams);
2317
- this.request = new globalThis.Request(new globalThis.Request(url$2, { ...this.request }), this.#options);
2447
+ this.request = new globalThis.Request(url$2, this.#options);
2318
2448
  }
2319
2449
  if (this.#options.onUploadProgress) {
2320
2450
  if (typeof this.#options.onUploadProgress !== "function") throw new TypeError("The `onUploadProgress` option must be a function");
2321
2451
  if (!supportsRequestStreams) throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");
2322
- if (this.request.body) this.request = streamRequest(this.request, this.#options.onUploadProgress, this.#options.body);
2452
+ this.request = this.#wrapRequestWithUploadProgress(this.request, this.#options.body ?? void 0);
2323
2453
  }
2324
2454
  }
2325
2455
  #calculateDelay() {
@@ -2330,12 +2460,15 @@ var Ky = class Ky {
2330
2460
  jitteredDelay = this.#options.retry.jitter(retryDelay);
2331
2461
  if (!Number.isFinite(jitteredDelay) || jitteredDelay < 0) jitteredDelay = retryDelay;
2332
2462
  }
2333
- return Math.min(this.#options.retry.backoffLimit, jitteredDelay);
2463
+ const backoffLimit = this.#options.retry.backoffLimit ?? Number.POSITIVE_INFINITY;
2464
+ return Math.min(backoffLimit, jitteredDelay);
2334
2465
  }
2335
2466
  async #calculateRetryDelay(error) {
2336
2467
  this.#retryCount++;
2337
2468
  if (this.#retryCount > this.#options.retry.limit) throw error;
2338
2469
  const errorObject = error instanceof Error ? error : new NonError(error);
2470
+ if (errorObject instanceof ForceRetryError) return errorObject.customDelay ?? this.#calculateDelay();
2471
+ if (!this.#options.retry.methods.includes(this.request.method.toLowerCase())) throw error;
2339
2472
  if (this.#options.retry.shouldRetry !== void 0) {
2340
2473
  const result = await this.#options.retry.shouldRetry({
2341
2474
  error: errorObject,
@@ -2363,6 +2496,13 @@ var Ky = class Ky {
2363
2496
  if (this.#options.parseJson) response.json = async () => this.#options.parseJson(await response.text());
2364
2497
  return response;
2365
2498
  }
2499
+ #cancelBody(body) {
2500
+ if (!body) return;
2501
+ body.cancel().catch(() => void 0);
2502
+ }
2503
+ #cancelResponseBody(response) {
2504
+ this.#cancelBody(response.body ?? void 0);
2505
+ }
2366
2506
  async #retry(function_) {
2367
2507
  try {
2368
2508
  return await function_();
@@ -2370,6 +2510,10 @@ var Ky = class Ky {
2370
2510
  const ms = Math.min(await this.#calculateRetryDelay(error), maxSafeTimeout);
2371
2511
  if (this.#retryCount < 1) throw error;
2372
2512
  await delay(ms, this.#userProvidedAbortSignal ? { signal: this.#userProvidedAbortSignal } : {});
2513
+ if (error instanceof ForceRetryError && error.customRequest) {
2514
+ const managedRequest = this.#options.signal ? new globalThis.Request(error.customRequest, { signal: this.#options.signal }) : new globalThis.Request(error.customRequest);
2515
+ this.#assignRequest(managedRequest);
2516
+ }
2373
2517
  for (const hook of this.#options.hooks.beforeRetry) {
2374
2518
  const hookResult = await hook({
2375
2519
  request: this.request,
@@ -2378,7 +2522,7 @@ var Ky = class Ky {
2378
2522
  retryCount: this.#retryCount
2379
2523
  });
2380
2524
  if (hookResult instanceof globalThis.Request) {
2381
- this.request = hookResult;
2525
+ this.#assignRequest(hookResult);
2382
2526
  break;
2383
2527
  }
2384
2528
  if (hookResult instanceof globalThis.Response) return hookResult;
@@ -2395,11 +2539,11 @@ var Ky = class Ky {
2395
2539
  }
2396
2540
  for (const hook of this.#options.hooks.beforeRequest) {
2397
2541
  const result = await hook(this.request, this.#getNormalizedOptions(), { retryCount: this.#retryCount });
2398
- if (result instanceof Request) {
2399
- this.request = result;
2542
+ if (result instanceof Response) return result;
2543
+ if (result instanceof globalThis.Request) {
2544
+ this.#assignRequest(result);
2400
2545
  break;
2401
2546
  }
2402
- if (result instanceof Response) return result;
2403
2547
  }
2404
2548
  const nonRequestOptions = findUnknownOptions(this.request, this.#options);
2405
2549
  this.#originalRequest = this.request;
@@ -2409,24 +2553,34 @@ var Ky = class Ky {
2409
2553
  }
2410
2554
  #getNormalizedOptions() {
2411
2555
  if (!this.#cachedNormalizedOptions) {
2412
- const { hooks,...normalizedOptions } = this.#options;
2556
+ const { hooks, ...normalizedOptions } = this.#options;
2413
2557
  this.#cachedNormalizedOptions = Object.freeze(normalizedOptions);
2414
2558
  }
2415
2559
  return this.#cachedNormalizedOptions;
2416
2560
  }
2561
+ #assignRequest(request) {
2562
+ this.#cachedNormalizedOptions = void 0;
2563
+ this.request = this.#wrapRequestWithUploadProgress(request);
2564
+ }
2565
+ #wrapRequestWithUploadProgress(request, originalBody) {
2566
+ if (!this.#options.onUploadProgress || !request.body) return request;
2567
+ return streamRequest(request, this.#options.onUploadProgress, originalBody ?? this.#options.body ?? void 0);
2568
+ }
2417
2569
  };
2418
2570
 
2419
2571
  //#endregion
2420
- //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/index.js
2421
- const createInstance = (defaults$1) => {
2422
- const ky$1 = (input, options) => Ky.create(input, validateAndMerge(defaults$1, options));
2423
- for (const method of requestMethods) ky$1[method] = (input, options) => Ky.create(input, validateAndMerge(defaults$1, options, { method }));
2572
+ //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/index.js
2573
+ /*! MIT License © Sindre Sorhus */
2574
+ const createInstance = (defaults) => {
2575
+ const ky$1 = (input, options) => Ky.create(input, validateAndMerge(defaults, options));
2576
+ for (const method of requestMethods) ky$1[method] = (input, options) => Ky.create(input, validateAndMerge(defaults, options, { method }));
2424
2577
  ky$1.create = (newDefaults) => createInstance(validateAndMerge(newDefaults));
2425
2578
  ky$1.extend = (newDefaults) => {
2426
- if (typeof newDefaults === "function") newDefaults = newDefaults(defaults$1 ?? {});
2427
- return createInstance(validateAndMerge(defaults$1, newDefaults));
2579
+ if (typeof newDefaults === "function") newDefaults = newDefaults(defaults ?? {});
2580
+ return createInstance(validateAndMerge(defaults, newDefaults));
2428
2581
  };
2429
2582
  ky$1.stop = stop;
2583
+ ky$1.retry = retry;
2430
2584
  return ky$1;
2431
2585
  };
2432
2586
  const ky = createInstance();
@@ -2434,13 +2588,13 @@ var distribution_default = ky;
2434
2588
 
2435
2589
  //#endregion
2436
2590
  //#region ../../node_modules/.pnpm/ini@1.3.8/node_modules/ini/ini.js
2437
- var require_ini$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ini@1.3.8/node_modules/ini/ini.js": ((exports) => {
2438
- exports.parse = exports.decode = decode$1;
2439
- exports.stringify = exports.encode = encode$1;
2440
- exports.safe = safe$1;
2441
- exports.unsafe = unsafe$1;
2591
+ var require_ini$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2592
+ exports.parse = exports.decode = decode;
2593
+ exports.stringify = exports.encode = encode;
2594
+ exports.safe = safe;
2595
+ exports.unsafe = unsafe;
2442
2596
  var eol = typeof process !== "undefined" && process.platform === "win32" ? "\r\n" : "\n";
2443
- function encode$1(obj, opt) {
2597
+ function encode(obj, opt) {
2444
2598
  var children = [];
2445
2599
  var out = "";
2446
2600
  if (typeof opt === "string") opt = {
@@ -2455,16 +2609,16 @@ var require_ini$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ini@1
2455
2609
  Object.keys(obj).forEach(function(k, _, __) {
2456
2610
  var val = obj[k];
2457
2611
  if (val && Array.isArray(val)) val.forEach(function(item) {
2458
- out += safe$1(k + "[]") + separator + safe$1(item) + "\n";
2612
+ out += safe(k + "[]") + separator + safe(item) + "\n";
2459
2613
  });
2460
2614
  else if (val && typeof val === "object") children.push(k);
2461
- else out += safe$1(k) + separator + safe$1(val) + eol;
2615
+ else out += safe(k) + separator + safe(val) + eol;
2462
2616
  });
2463
- if (opt.section && out.length) out = "[" + safe$1(opt.section) + "]" + eol + out;
2617
+ if (opt.section && out.length) out = "[" + safe(opt.section) + "]" + eol + out;
2464
2618
  children.forEach(function(k, _, __) {
2465
2619
  var nk = dotSplit(k).join("\\.");
2466
2620
  var section = (opt.section ? opt.section + "." : "") + nk;
2467
- var child = encode$1(obj[k], {
2621
+ var child = encode(obj[k], {
2468
2622
  section,
2469
2623
  whitespace: opt.whitespace
2470
2624
  });
@@ -2478,7 +2632,7 @@ var require_ini$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ini@1
2478
2632
  return part.replace(/\1/g, "\\.").replace(/\2LITERAL\\1LITERAL\2/g, "");
2479
2633
  });
2480
2634
  }
2481
- function decode$1(str) {
2635
+ function decode(str) {
2482
2636
  var out = {};
2483
2637
  var p = out;
2484
2638
  var section = null;
@@ -2488,7 +2642,7 @@ var require_ini$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ini@1
2488
2642
  var match = line.match(re);
2489
2643
  if (!match) return;
2490
2644
  if (match[1] !== void 0) {
2491
- section = unsafe$1(match[1]);
2645
+ section = unsafe(match[1]);
2492
2646
  if (section === "__proto__") {
2493
2647
  p = {};
2494
2648
  return;
@@ -2496,9 +2650,9 @@ var require_ini$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ini@1
2496
2650
  p = out[section] = out[section] || {};
2497
2651
  return;
2498
2652
  }
2499
- var key = unsafe$1(match[2]);
2653
+ var key = unsafe(match[2]);
2500
2654
  if (key === "__proto__") return;
2501
- var value = match[3] ? unsafe$1(match[4]) : true;
2655
+ var value = match[3] ? unsafe(match[4]) : true;
2502
2656
  switch (value) {
2503
2657
  case "true":
2504
2658
  case "false":
@@ -2532,15 +2686,15 @@ var require_ini$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ini@1
2532
2686
  });
2533
2687
  return out;
2534
2688
  }
2535
- function isQuoted$1(val) {
2689
+ function isQuoted(val) {
2536
2690
  return val.charAt(0) === "\"" && val.slice(-1) === "\"" || val.charAt(0) === "'" && val.slice(-1) === "'";
2537
2691
  }
2538
- function safe$1(val) {
2539
- return typeof val !== "string" || val.match(/[=\r\n]/) || val.match(/^\[/) || val.length > 1 && isQuoted$1(val) || val !== val.trim() ? JSON.stringify(val) : val.replace(/;/g, "\\;").replace(/#/g, "\\#");
2692
+ function safe(val) {
2693
+ return typeof val !== "string" || val.match(/[=\r\n]/) || val.match(/^\[/) || val.length > 1 && isQuoted(val) || val !== val.trim() ? JSON.stringify(val) : val.replace(/;/g, "\\;").replace(/#/g, "\\#");
2540
2694
  }
2541
- function unsafe$1(val, doUnesc) {
2695
+ function unsafe(val, doUnesc) {
2542
2696
  val = (val || "").trim();
2543
- if (isQuoted$1(val)) {
2697
+ if (isQuoted(val)) {
2544
2698
  if (val.charAt(0) === "'") val = val.substr(1, val.length - 2);
2545
2699
  try {
2546
2700
  val = JSON.parse(val);
@@ -2563,11 +2717,11 @@ var require_ini$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ini@1
2563
2717
  }
2564
2718
  return val;
2565
2719
  }
2566
- }) });
2720
+ }));
2567
2721
 
2568
2722
  //#endregion
2569
2723
  //#region ../../node_modules/.pnpm/strip-json-comments@2.0.1/node_modules/strip-json-comments/index.js
2570
- var require_strip_json_comments = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/strip-json-comments@2.0.1/node_modules/strip-json-comments/index.js": ((exports, module) => {
2724
+ var require_strip_json_comments = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2571
2725
  var singleComment = 1;
2572
2726
  var multiComment = 2;
2573
2727
  function stripWithoutWhitespace() {
@@ -2623,34 +2777,34 @@ var require_strip_json_comments = /* @__PURE__ */ __commonJS({ "../../node_modul
2623
2777
  }
2624
2778
  return ret + (insideComment ? strip(str.substr(offset)) : str.substr(offset));
2625
2779
  };
2626
- }) });
2780
+ }));
2627
2781
 
2628
2782
  //#endregion
2629
2783
  //#region ../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/lib/utils.js
2630
- var require_utils = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/lib/utils.js": ((exports) => {
2784
+ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
2631
2785
  var fs$6 = __require("fs");
2632
- var ini$2 = require_ini$1();
2786
+ var ini = require_ini$1();
2633
2787
  var path$8 = __require("path");
2634
2788
  var stripJsonComments = require_strip_json_comments();
2635
- var parse$1 = exports.parse = function(content) {
2789
+ var parse = exports.parse = function(content) {
2636
2790
  if (/^\s*{/.test(content)) return JSON.parse(stripJsonComments(content));
2637
- return ini$2.parse(content);
2791
+ return ini.parse(content);
2638
2792
  };
2639
2793
  var file = exports.file = function() {
2640
2794
  var args = [].slice.call(arguments).filter(function(arg) {
2641
2795
  return arg != null;
2642
2796
  });
2643
2797
  for (var i in args) if ("string" !== typeof args[i]) return;
2644
- var file$1 = path$8.join.apply(null, args);
2798
+ var file = path$8.join.apply(null, args);
2645
2799
  try {
2646
- return fs$6.readFileSync(file$1, "utf-8");
2800
+ return fs$6.readFileSync(file, "utf-8");
2647
2801
  } catch (err) {
2648
2802
  return;
2649
2803
  }
2650
2804
  };
2651
2805
  exports.json = function() {
2652
2806
  var content = file.apply(null, arguments);
2653
- return content ? parse$1(content) : null;
2807
+ return content ? parse(content) : null;
2654
2808
  };
2655
2809
  exports.env = function(prefix, env$3) {
2656
2810
  env$3 = env$3 || process.env;
@@ -2673,21 +2827,47 @@ var require_utils = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/rc@1.
2673
2827
  exports.find = function() {
2674
2828
  var rel = path$8.join.apply(null, [].slice.call(arguments));
2675
2829
  function find(start, rel$1) {
2676
- var file$1 = path$8.join(start, rel$1);
2830
+ var file = path$8.join(start, rel$1);
2677
2831
  try {
2678
- fs$6.statSync(file$1);
2679
- return file$1;
2832
+ fs$6.statSync(file);
2833
+ return file;
2680
2834
  } catch (err) {
2681
2835
  if (path$8.dirname(start) !== start) return find(path$8.dirname(start), rel$1);
2682
2836
  }
2683
2837
  }
2684
2838
  return find(process.cwd(), rel);
2685
2839
  };
2686
- }) });
2840
+ }));
2687
2841
 
2688
2842
  //#endregion
2689
2843
  //#region ../../node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/lib/deep-extend.js
2690
- var require_deep_extend = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/lib/deep-extend.js": ((exports, module) => {
2844
+ /*!
2845
+ * @description Recursive object extending
2846
+ * @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
2847
+ * @license MIT
2848
+ *
2849
+ * The MIT License (MIT)
2850
+ *
2851
+ * Copyright (c) 2013-2018 Viacheslav Lotsmanov
2852
+ *
2853
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
2854
+ * this software and associated documentation files (the "Software"), to deal in
2855
+ * the Software without restriction, including without limitation the rights to
2856
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
2857
+ * the Software, and to permit persons to whom the Software is furnished to do so,
2858
+ * subject to the following conditions:
2859
+ *
2860
+ * The above copyright notice and this permission notice shall be included in all
2861
+ * copies or substantial portions of the Software.
2862
+ *
2863
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2864
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
2865
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
2866
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
2867
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2868
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2869
+ */
2870
+ var require_deep_extend = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2691
2871
  function isSpecificValue(val) {
2692
2872
  return val instanceof Buffer || val instanceof Date || val instanceof RegExp ? true : false;
2693
2873
  }
@@ -2704,14 +2884,14 @@ var require_deep_extend = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
2704
2884
  * Recursive cloning array.
2705
2885
  */
2706
2886
  function deepCloneArray(arr) {
2707
- var clone$4 = [];
2887
+ var clone = [];
2708
2888
  arr.forEach(function(item, index) {
2709
- if (typeof item === "object" && item !== null) if (Array.isArray(item)) clone$4[index] = deepCloneArray(item);
2710
- else if (isSpecificValue(item)) clone$4[index] = cloneSpecificValue(item);
2711
- else clone$4[index] = deepExtend$1({}, item);
2712
- else clone$4[index] = item;
2889
+ if (typeof item === "object" && item !== null) if (Array.isArray(item)) clone[index] = deepCloneArray(item);
2890
+ else if (isSpecificValue(item)) clone[index] = cloneSpecificValue(item);
2891
+ else clone[index] = deepExtend({}, item);
2892
+ else clone[index] = item;
2713
2893
  });
2714
- return clone$4;
2894
+ return clone;
2715
2895
  }
2716
2896
  function safeGetProperty(object, property) {
2717
2897
  return property === "__proto__" ? void 0 : object[property];
@@ -2725,7 +2905,7 @@ var require_deep_extend = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
2725
2905
  * object as first argument, like this:
2726
2906
  * deepExtend({}, yourObj_1, [yourObj_N]);
2727
2907
  */
2728
- var deepExtend$1 = module.exports = function() {
2908
+ var deepExtend = module.exports = function() {
2729
2909
  if (arguments.length < 1 || typeof arguments[0] !== "object") return false;
2730
2910
  if (arguments.length < 2) return arguments[0];
2731
2911
  var target = arguments[0];
@@ -2746,21 +2926,21 @@ var require_deep_extend = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
2746
2926
  target[key] = cloneSpecificValue(val);
2747
2927
  return;
2748
2928
  } else if (typeof src !== "object" || src === null || Array.isArray(src)) {
2749
- target[key] = deepExtend$1({}, val);
2929
+ target[key] = deepExtend({}, val);
2750
2930
  return;
2751
2931
  } else {
2752
- target[key] = deepExtend$1(src, val);
2932
+ target[key] = deepExtend(src, val);
2753
2933
  return;
2754
2934
  }
2755
2935
  });
2756
2936
  });
2757
2937
  return target;
2758
2938
  };
2759
- }) });
2939
+ }));
2760
2940
 
2761
2941
  //#endregion
2762
2942
  //#region ../../node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/index.js
2763
- var require_minimist = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/index.js": ((exports, module) => {
2943
+ var require_minimist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2764
2944
  function hasKey(obj, keys) {
2765
2945
  var o = obj;
2766
2946
  keys.slice(0, -1).forEach(function(key) {
@@ -2808,7 +2988,7 @@ var require_minimist = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/mi
2808
2988
  flags.strings[k] = true;
2809
2989
  });
2810
2990
  });
2811
- var defaults$1 = opts.default || {};
2991
+ var defaults = opts.default || {};
2812
2992
  var argv = { _: [] };
2813
2993
  function argDefined(key$1, arg$1) {
2814
2994
  return flags.allBools && /^--[^=]+$/.test(arg$1) || flags.strings[key$1] || flags.bools[key$1] || aliases[key$1];
@@ -2842,7 +3022,7 @@ var require_minimist = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/mi
2842
3022
  });
2843
3023
  }
2844
3024
  Object.keys(flags.bools).forEach(function(key$1) {
2845
- setArg(key$1, defaults$1[key$1] === void 0 ? false : defaults$1[key$1]);
3025
+ setArg(key$1, defaults[key$1] === void 0 ? false : defaults[key$1]);
2846
3026
  });
2847
3027
  var notFlags = [];
2848
3028
  if (args.indexOf("--") !== -1) {
@@ -2913,11 +3093,11 @@ var require_minimist = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/mi
2913
3093
  }
2914
3094
  }
2915
3095
  }
2916
- Object.keys(defaults$1).forEach(function(k) {
3096
+ Object.keys(defaults).forEach(function(k) {
2917
3097
  if (!hasKey(argv, k.split("."))) {
2918
- setKey(argv, k.split("."), defaults$1[k]);
3098
+ setKey(argv, k.split("."), defaults[k]);
2919
3099
  (aliases[k] || []).forEach(function(x) {
2920
- setKey(argv, x.split("."), defaults$1[k]);
3100
+ setKey(argv, x.split("."), defaults[k]);
2921
3101
  });
2922
3102
  }
2923
3103
  });
@@ -2927,39 +3107,39 @@ var require_minimist = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/mi
2927
3107
  });
2928
3108
  return argv;
2929
3109
  };
2930
- }) });
3110
+ }));
2931
3111
 
2932
3112
  //#endregion
2933
3113
  //#region ../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/index.js
2934
- var require_rc = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/index.js": ((exports, module) => {
3114
+ var require_rc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2935
3115
  var cc = require_utils();
2936
3116
  var join = __require("path").join;
2937
3117
  var deepExtend = require_deep_extend();
2938
3118
  var etc = "/etc";
2939
3119
  var win = process.platform === "win32";
2940
- var home$1 = win ? process.env.USERPROFILE : process.env.HOME;
2941
- module.exports = function(name$1, defaults$1, argv, parse$2) {
3120
+ var home = win ? process.env.USERPROFILE : process.env.HOME;
3121
+ module.exports = function(name$1, defaults, argv, parse) {
2942
3122
  if ("string" !== typeof name$1) throw new Error("rc(name): name *must* be string");
2943
3123
  if (!argv) argv = require_minimist()(process.argv.slice(2));
2944
- defaults$1 = ("string" === typeof defaults$1 ? cc.json(defaults$1) : defaults$1) || {};
2945
- parse$2 = parse$2 || cc.parse;
3124
+ defaults = ("string" === typeof defaults ? cc.json(defaults) : defaults) || {};
3125
+ parse = parse || cc.parse;
2946
3126
  var env$3 = cc.env(name$1 + "_");
2947
- var configs = [defaults$1];
3127
+ var configs = [defaults];
2948
3128
  var configFiles = [];
2949
- function addConfigFile(file$1) {
2950
- if (configFiles.indexOf(file$1) >= 0) return;
2951
- var fileConfig = cc.file(file$1);
3129
+ function addConfigFile(file) {
3130
+ if (configFiles.indexOf(file) >= 0) return;
3131
+ var fileConfig = cc.file(file);
2952
3132
  if (fileConfig) {
2953
- configs.push(parse$2(fileConfig));
2954
- configFiles.push(file$1);
3133
+ configs.push(parse(fileConfig));
3134
+ configFiles.push(file);
2955
3135
  }
2956
3136
  }
2957
3137
  if (!win) [join(etc, name$1, "config"), join(etc, name$1 + "rc")].forEach(addConfigFile);
2958
- if (home$1) [
2959
- join(home$1, ".config", name$1, "config"),
2960
- join(home$1, ".config", name$1),
2961
- join(home$1, "." + name$1, "config"),
2962
- join(home$1, "." + name$1 + "rc")
3138
+ if (home) [
3139
+ join(home, ".config", name$1, "config"),
3140
+ join(home, ".config", name$1),
3141
+ join(home, "." + name$1, "config"),
3142
+ join(home, "." + name$1 + "rc")
2963
3143
  ].forEach(addConfigFile);
2964
3144
  addConfigFile(cc.find("." + name$1 + "rc"));
2965
3145
  if (env$3.config) addConfigFile(env$3.config);
@@ -2973,7 +3153,7 @@ var require_rc = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/rc@1.2.8
2973
3153
  } : void 0
2974
3154
  ]));
2975
3155
  };
2976
- }) });
3156
+ }));
2977
3157
 
2978
3158
  //#endregion
2979
3159
  //#region ../../node_modules/.pnpm/registry-url@6.0.1/node_modules/registry-url/index.js
@@ -2986,14 +3166,14 @@ function registryUrl(scope) {
2986
3166
 
2987
3167
  //#endregion
2988
3168
  //#region ../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js
2989
- var require_polyfills = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js": ((exports, module) => {
3169
+ var require_polyfills = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2990
3170
  var constants = __require("constants");
2991
3171
  var origCwd = process.cwd;
2992
- var cwd$1 = null;
3172
+ var cwd = null;
2993
3173
  var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
2994
3174
  process.cwd = function() {
2995
- if (!cwd$1) cwd$1 = origCwd.call(process);
2996
- return cwd$1;
3175
+ if (!cwd) cwd = origCwd.call(process);
3176
+ return cwd;
2997
3177
  };
2998
3178
  try {
2999
3179
  process.cwd();
@@ -3001,13 +3181,13 @@ var require_polyfills = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/g
3001
3181
  if (typeof process.chdir === "function") {
3002
3182
  var chdir = process.chdir;
3003
3183
  process.chdir = function(d) {
3004
- cwd$1 = null;
3184
+ cwd = null;
3005
3185
  chdir.call(process, d);
3006
3186
  };
3007
3187
  if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
3008
3188
  }
3009
- module.exports = patch$1;
3010
- function patch$1(fs$9) {
3189
+ module.exports = patch;
3190
+ function patch(fs$9) {
3011
3191
  if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) patchLchmod(fs$9);
3012
3192
  if (!fs$9.lutimes) patchLutimes(fs$9);
3013
3193
  fs$9.chown = chownFix(fs$9.chown);
@@ -3235,14 +3415,14 @@ var require_polyfills = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/g
3235
3415
  return false;
3236
3416
  }
3237
3417
  }
3238
- }) });
3418
+ }));
3239
3419
 
3240
3420
  //#endregion
3241
3421
  //#region ../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js
3242
- var require_legacy_streams = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js": ((exports, module) => {
3422
+ var require_legacy_streams = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3243
3423
  var Stream$1 = __require("stream").Stream;
3244
- module.exports = legacy$1;
3245
- function legacy$1(fs$9) {
3424
+ module.exports = legacy;
3425
+ function legacy(fs$9) {
3246
3426
  return {
3247
3427
  ReadStream,
3248
3428
  WriteStream
@@ -3325,16 +3505,16 @@ var require_legacy_streams = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
3325
3505
  }
3326
3506
  }
3327
3507
  }
3328
- }) });
3508
+ }));
3329
3509
 
3330
3510
  //#endregion
3331
3511
  //#region ../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js
3332
- var require_clone = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js": ((exports, module) => {
3333
- module.exports = clone$1;
3512
+ var require_clone = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3513
+ module.exports = clone;
3334
3514
  var getPrototypeOf = Object.getPrototypeOf || function(obj) {
3335
3515
  return obj.__proto__;
3336
3516
  };
3337
- function clone$1(obj) {
3517
+ function clone(obj) {
3338
3518
  if (obj === null || typeof obj !== "object") return obj;
3339
3519
  if (obj instanceof Object) var copy = { __proto__: getPrototypeOf(obj) };
3340
3520
  else var copy = Object.create(null);
@@ -3343,16 +3523,16 @@ var require_clone = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/grace
3343
3523
  });
3344
3524
  return copy;
3345
3525
  }
3346
- }) });
3526
+ }));
3347
3527
 
3348
3528
  //#endregion
3349
3529
  //#region ../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js
3350
- var require_graceful_fs = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js": ((exports, module) => {
3530
+ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3351
3531
  var fs$5 = __require("fs");
3352
3532
  var polyfills = require_polyfills();
3353
3533
  var legacy = require_legacy_streams();
3354
3534
  var clone = require_clone();
3355
- var util$1 = __require("util");
3535
+ var util = __require("util");
3356
3536
  /* istanbul ignore next - node 0.x polyfill */
3357
3537
  var gracefulQueue;
3358
3538
  var previousSymbol;
@@ -3371,9 +3551,9 @@ var require_graceful_fs = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
3371
3551
  } });
3372
3552
  }
3373
3553
  var debug = noop;
3374
- if (util$1.debuglog) debug = util$1.debuglog("gfs4");
3554
+ if (util.debuglog) debug = util.debuglog("gfs4");
3375
3555
  else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) debug = function() {
3376
- var m = util$1.format.apply(util$1, arguments);
3556
+ var m = util.format.apply(util, arguments);
3377
3557
  m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
3378
3558
  console.error(m);
3379
3559
  };
@@ -3700,18 +3880,18 @@ var require_graceful_fs = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
3700
3880
  }
3701
3881
  if (retryTimer === void 0) retryTimer = setTimeout(retry, 0);
3702
3882
  }
3703
- }) });
3883
+ }));
3704
3884
 
3705
3885
  //#endregion
3706
3886
  //#region ../../node_modules/.pnpm/@pnpm+network.ca-file@1.0.2/node_modules/@pnpm/network.ca-file/dist/ca-file.js
3707
- var require_ca_file = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+network.ca-file@1.0.2/node_modules/@pnpm/network.ca-file/dist/ca-file.js": ((exports) => {
3887
+ var require_ca_file = /* @__PURE__ */ __commonJSMin(((exports) => {
3708
3888
  var __importDefault = exports && exports.__importDefault || function(mod) {
3709
3889
  return mod && mod.__esModule ? mod : { "default": mod };
3710
3890
  };
3711
3891
  Object.defineProperty(exports, "__esModule", { value: true });
3712
3892
  exports.readCAFileSync = void 0;
3713
3893
  const graceful_fs_1 = __importDefault(require_graceful_fs());
3714
- function readCAFileSync$1(filePath) {
3894
+ function readCAFileSync(filePath) {
3715
3895
  try {
3716
3896
  const contents = graceful_fs_1.default.readFileSync(filePath, "utf8");
3717
3897
  const delim = "-----END CERTIFICATE-----";
@@ -3721,12 +3901,12 @@ var require_ca_file = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pn
3721
3901
  throw err;
3722
3902
  }
3723
3903
  }
3724
- exports.readCAFileSync = readCAFileSync$1;
3725
- }) });
3904
+ exports.readCAFileSync = readCAFileSync;
3905
+ }));
3726
3906
 
3727
3907
  //#endregion
3728
3908
  //#region ../../node_modules/.pnpm/@pnpm+network.ca-file@1.0.2/node_modules/@pnpm/network.ca-file/dist/index.js
3729
- var require_dist$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+network.ca-file@1.0.2/node_modules/@pnpm/network.ca-file/dist/index.js": ((exports) => {
3909
+ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3730
3910
  var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
3731
3911
  if (k2 === void 0) k2 = k;
3732
3912
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -3741,31 +3921,31 @@ var require_dist$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnp
3741
3921
  if (k2 === void 0) k2 = k;
3742
3922
  o[k2] = m[k];
3743
3923
  }));
3744
- var __exportStar = exports && exports.__exportStar || function(m, exports$2) {
3745
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$2, p)) __createBinding(exports$2, m, p);
3924
+ var __exportStar = exports && exports.__exportStar || function(m, exports$1) {
3925
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
3746
3926
  };
3747
3927
  Object.defineProperty(exports, "__esModule", { value: true });
3748
3928
  __exportStar(require_ca_file(), exports);
3749
- }) });
3929
+ }));
3750
3930
 
3751
3931
  //#endregion
3752
- //#region ../../node_modules/.pnpm/tsdown@0.15.12_typescript@5.9.3/node_modules/tsdown/esm-shims.js
3932
+ //#region ../../node_modules/.pnpm/tsdown@0.18.4_synckit@0.11.12_typescript@5.9.3/node_modules/tsdown/esm-shims.js
3753
3933
  var getFilename, getDirname, __dirname$2;
3754
- var init_esm_shims = __esm({ "../../node_modules/.pnpm/tsdown@0.15.12_typescript@5.9.3/node_modules/tsdown/esm-shims.js": (() => {
3934
+ var init_esm_shims = __esmMin((() => {
3755
3935
  getFilename = () => fileURLToPath(import.meta.url);
3756
3936
  getDirname = () => path.dirname(getFilename());
3757
3937
  __dirname$2 = /* @__PURE__ */ getDirname();
3758
- }) });
3938
+ }));
3759
3939
 
3760
3940
  //#endregion
3761
3941
  //#region ../../node_modules/.pnpm/proto-list@1.2.4/node_modules/proto-list/proto-list.js
3762
- var require_proto_list = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/proto-list@1.2.4/node_modules/proto-list/proto-list.js": ((exports, module) => {
3763
- module.exports = ProtoList$1;
3942
+ var require_proto_list = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3943
+ module.exports = ProtoList;
3764
3944
  function setProto(obj, proto$1) {
3765
3945
  if (typeof Object.setPrototypeOf === "function") return Object.setPrototypeOf(obj, proto$1);
3766
3946
  else obj.__proto__ = proto$1;
3767
3947
  }
3768
- function ProtoList$1() {
3948
+ function ProtoList() {
3769
3949
  this.list = [];
3770
3950
  var root = null;
3771
3951
  Object.defineProperty(this, "root", {
@@ -3780,7 +3960,7 @@ var require_proto_list = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
3780
3960
  configurable: true
3781
3961
  });
3782
3962
  }
3783
- ProtoList$1.prototype = {
3963
+ ProtoList.prototype = {
3784
3964
  get length() {
3785
3965
  return this.list.length;
3786
3966
  },
@@ -3837,35 +4017,35 @@ var require_proto_list = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
3837
4017
  return ret;
3838
4018
  }
3839
4019
  };
3840
- }) });
4020
+ }));
3841
4021
 
3842
4022
  //#endregion
3843
4023
  //#region ../../node_modules/.pnpm/config-chain@1.1.13/node_modules/config-chain/index.js
3844
- var require_config_chain = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/config-chain@1.1.13/node_modules/config-chain/index.js": ((exports, module) => {
4024
+ var require_config_chain = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3845
4025
  init_esm_shims();
3846
4026
  var ProtoList = require_proto_list(), path$7 = __require("path"), fs$4 = __require("fs"), ini$1 = require_ini$1(), EE = __require("events").EventEmitter, url$1 = __require("url"), http = __require("http");
3847
- var exports$1 = module.exports = function() {
3848
- var args = [].slice.call(arguments), conf = new ConfigChain$1();
4027
+ var exports = module.exports = function() {
4028
+ var args = [].slice.call(arguments), conf = new ConfigChain();
3849
4029
  while (args.length) {
3850
4030
  var a = args.shift();
3851
4031
  if (a) conf.push("string" === typeof a ? json(a) : a);
3852
4032
  }
3853
4033
  return conf;
3854
4034
  };
3855
- exports$1.find = function() {
4035
+ exports.find = function() {
3856
4036
  var rel = path$7.join.apply(null, [].slice.call(arguments));
3857
4037
  function find(start, rel$1) {
3858
- var file$1 = path$7.join(start, rel$1);
4038
+ var file = path$7.join(start, rel$1);
3859
4039
  try {
3860
- fs$4.statSync(file$1);
3861
- return file$1;
4040
+ fs$4.statSync(file);
4041
+ return file;
3862
4042
  } catch (err) {
3863
4043
  if (path$7.dirname(start) !== start) return find(path$7.dirname(start), rel$1);
3864
4044
  }
3865
4045
  }
3866
4046
  return find(__dirname$2, rel);
3867
4047
  };
3868
- var parse = exports$1.parse = function(content, file$1, type$1) {
4048
+ var parse = exports.parse = function(content, file, type$1) {
3869
4049
  content = "" + content;
3870
4050
  if (!type$1) try {
3871
4051
  return JSON.parse(content);
@@ -3880,40 +4060,40 @@ var require_config_chain = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
3880
4060
  else return JSON.parse(content);
3881
4061
  else return ini$1.parse(content);
3882
4062
  };
3883
- var json = exports$1.json = function() {
4063
+ var json = exports.json = function() {
3884
4064
  var args = [].slice.call(arguments).filter(function(arg) {
3885
4065
  return arg != null;
3886
4066
  });
3887
- var file$1 = path$7.join.apply(null, args);
4067
+ var file = path$7.join.apply(null, args);
3888
4068
  var content;
3889
4069
  try {
3890
- content = fs$4.readFileSync(file$1, "utf-8");
4070
+ content = fs$4.readFileSync(file, "utf-8");
3891
4071
  } catch (err) {
3892
4072
  return;
3893
4073
  }
3894
- return parse(content, file$1, "json");
4074
+ return parse(content, file, "json");
3895
4075
  };
3896
- exports$1.env = function(prefix, env$3) {
4076
+ exports.env = function(prefix, env$3) {
3897
4077
  env$3 = env$3 || process.env;
3898
4078
  var obj = {};
3899
4079
  var l = prefix.length;
3900
4080
  for (var k in env$3) if (k.indexOf(prefix) === 0) obj[k.substring(l)] = env$3[k];
3901
4081
  return obj;
3902
4082
  };
3903
- exports$1.ConfigChain = ConfigChain$1;
3904
- function ConfigChain$1() {
4083
+ exports.ConfigChain = ConfigChain;
4084
+ function ConfigChain() {
3905
4085
  EE.apply(this);
3906
4086
  ProtoList.apply(this, arguments);
3907
4087
  this._awaiting = 0;
3908
4088
  this._saving = 0;
3909
4089
  this.sources = {};
3910
4090
  }
3911
- var extras = { constructor: { value: ConfigChain$1 } };
4091
+ var extras = { constructor: { value: ConfigChain } };
3912
4092
  Object.keys(EE.prototype).forEach(function(k) {
3913
4093
  extras[k] = Object.getOwnPropertyDescriptor(EE.prototype, k);
3914
4094
  });
3915
- ConfigChain$1.prototype = Object.create(ProtoList.prototype, extras);
3916
- ConfigChain$1.prototype.del = function(key, where) {
4095
+ ConfigChain.prototype = Object.create(ProtoList.prototype, extras);
4096
+ ConfigChain.prototype.del = function(key, where) {
3917
4097
  if (where) {
3918
4098
  var target = this.sources[where];
3919
4099
  target = target && target.data;
@@ -3922,7 +4102,7 @@ var require_config_chain = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
3922
4102
  } else for (var i = 0, l = this.list.length; i < l; i++) delete this.list[i][key];
3923
4103
  return this;
3924
4104
  };
3925
- ConfigChain$1.prototype.set = function(key, value, where) {
4105
+ ConfigChain.prototype.set = function(key, value, where) {
3926
4106
  var target;
3927
4107
  if (where) {
3928
4108
  target = this.sources[where];
@@ -3935,7 +4115,7 @@ var require_config_chain = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
3935
4115
  target[key] = value;
3936
4116
  return this;
3937
4117
  };
3938
- ConfigChain$1.prototype.get = function(key, where) {
4118
+ ConfigChain.prototype.get = function(key, where) {
3939
4119
  if (where) {
3940
4120
  where = this.sources[where];
3941
4121
  if (where) where = where.data;
@@ -3944,7 +4124,7 @@ var require_config_chain = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
3944
4124
  }
3945
4125
  return this.list[0][key];
3946
4126
  };
3947
- ConfigChain$1.prototype.save = function(where, type$1, cb) {
4127
+ ConfigChain.prototype.save = function(where, type$1, cb) {
3948
4128
  if (typeof type$1 === "function") cb = type$1, type$1 = null;
3949
4129
  var target = this.sources[where];
3950
4130
  if (!target || !(target.path || target.source) || !target.data) return this.emit("error", /* @__PURE__ */ new Error("bad save target: " + where));
@@ -3971,24 +4151,24 @@ var require_config_chain = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
3971
4151
  }.bind(this));
3972
4152
  return this;
3973
4153
  };
3974
- ConfigChain$1.prototype.addFile = function(file$1, type$1, name$1) {
3975
- name$1 = name$1 || file$1;
4154
+ ConfigChain.prototype.addFile = function(file, type$1, name$1) {
4155
+ name$1 = name$1 || file;
3976
4156
  var marker = { __source__: name$1 };
3977
4157
  this.sources[name$1] = {
3978
- path: file$1,
4158
+ path: file,
3979
4159
  type: type$1
3980
4160
  };
3981
4161
  this.push(marker);
3982
4162
  this._await();
3983
- fs$4.readFile(file$1, "utf8", function(er, data) {
4163
+ fs$4.readFile(file, "utf8", function(er, data) {
3984
4164
  if (er) this.emit("error", er);
3985
- this.addString(data, file$1, type$1, marker);
4165
+ this.addString(data, file, type$1, marker);
3986
4166
  }.bind(this));
3987
4167
  return this;
3988
4168
  };
3989
- ConfigChain$1.prototype.addEnv = function(prefix, env$3, name$1) {
4169
+ ConfigChain.prototype.addEnv = function(prefix, env$3, name$1) {
3990
4170
  name$1 = name$1 || "env";
3991
- var data = exports$1.env(prefix, env$3);
4171
+ var data = exports.env(prefix, env$3);
3992
4172
  this.sources[name$1] = {
3993
4173
  data,
3994
4174
  source: env$3,
@@ -3996,7 +4176,7 @@ var require_config_chain = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
3996
4176
  };
3997
4177
  return this.add(data, name$1);
3998
4178
  };
3999
- ConfigChain$1.prototype.addUrl = function(req, type$1, name$1) {
4179
+ ConfigChain.prototype.addUrl = function(req, type$1, name$1) {
4000
4180
  this._await();
4001
4181
  var href = url$1.format(req);
4002
4182
  name$1 = name$1 || href;
@@ -4019,12 +4199,12 @@ var require_config_chain = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
4019
4199
  }.bind(this)).on("error", this.emit.bind(this, "error")).end();
4020
4200
  return this;
4021
4201
  };
4022
- ConfigChain$1.prototype.addString = function(data, file$1, type$1, marker) {
4023
- data = this.parse(data, file$1, type$1);
4202
+ ConfigChain.prototype.addString = function(data, file, type$1, marker) {
4203
+ data = this.parse(data, file, type$1);
4024
4204
  this.add(data, marker);
4025
4205
  return this;
4026
4206
  };
4027
- ConfigChain$1.prototype.add = function(data, marker) {
4207
+ ConfigChain.prototype.add = function(data, marker) {
4028
4208
  if (marker && typeof marker === "object") {
4029
4209
  var i = this.list.indexOf(marker);
4030
4210
  if (i === -1) return this.emit("error", /* @__PURE__ */ new Error("bad marker"));
@@ -4044,25 +4224,23 @@ var require_config_chain = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
4044
4224
  }
4045
4225
  return this;
4046
4226
  };
4047
- ConfigChain$1.prototype.parse = exports$1.parse;
4048
- ConfigChain$1.prototype._await = function() {
4227
+ ConfigChain.prototype.parse = exports.parse;
4228
+ ConfigChain.prototype._await = function() {
4049
4229
  this._awaiting++;
4050
4230
  };
4051
- ConfigChain$1.prototype._resolve = function() {
4231
+ ConfigChain.prototype._resolve = function() {
4052
4232
  this._awaiting--;
4053
4233
  if (this._awaiting === 0) this.emit("load", this);
4054
4234
  };
4055
- }) });
4235
+ }));
4056
4236
 
4057
4237
  //#endregion
4058
- //#region ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js
4059
- var require_envKeyToSetting = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js": ((exports, module) => {
4238
+ //#region ../../node_modules/.pnpm/@pnpm+npm-conf@3.0.2/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js
4239
+ var require_envKeyToSetting = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4060
4240
  module.exports = function(x) {
4061
4241
  const colonIndex = x.indexOf(":");
4062
4242
  if (colonIndex === -1) return normalize(x);
4063
- const firstPart = x.substr(0, colonIndex);
4064
- const secondPart = x.substr(colonIndex + 1);
4065
- return `${normalize(firstPart)}:${normalize(secondPart)}`;
4243
+ return `${x.substr(0, colonIndex)}:${normalize(x.substr(colonIndex + 1))}`;
4066
4244
  };
4067
4245
  function normalize(s) {
4068
4246
  s = s.toLowerCase();
@@ -4071,18 +4249,18 @@ var require_envKeyToSetting = /* @__PURE__ */ __commonJS({ "../../node_modules/.
4071
4249
  for (let i = 1; i < s.length; i++) r += s[i] === "_" ? "-" : s[i];
4072
4250
  return r;
4073
4251
  }
4074
- }) });
4252
+ }));
4075
4253
 
4076
4254
  //#endregion
4077
4255
  //#region ../../node_modules/.pnpm/@pnpm+config.env-replace@1.1.0/node_modules/@pnpm/config.env-replace/dist/env-replace.js
4078
- var require_env_replace = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+config.env-replace@1.1.0/node_modules/@pnpm/config.env-replace/dist/env-replace.js": ((exports) => {
4256
+ var require_env_replace = /* @__PURE__ */ __commonJSMin(((exports) => {
4079
4257
  Object.defineProperty(exports, "__esModule", { value: true });
4080
4258
  exports.envReplace = void 0;
4081
4259
  const ENV_EXPR = /(?<!\\)(\\*)\$\{([^${}]+)\}/g;
4082
- function envReplace$1(settingValue, env$3) {
4260
+ function envReplace(settingValue, env$3) {
4083
4261
  return settingValue.replace(ENV_EXPR, replaceEnvMatch.bind(null, env$3));
4084
4262
  }
4085
- exports.envReplace = envReplace$1;
4263
+ exports.envReplace = envReplace;
4086
4264
  function replaceEnvMatch(env$3, orig, escape, name$1) {
4087
4265
  if (escape.length % 2) return orig.slice((escape.length + 1) / 2);
4088
4266
  const envValue = getEnvValue(env$3, name$1);
@@ -4097,11 +4275,11 @@ var require_env_replace = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
4097
4275
  if (Object.prototype.hasOwnProperty.call(env$3, variableName)) return !env$3[variableName] && colon ? fallback : env$3[variableName];
4098
4276
  return fallback;
4099
4277
  }
4100
- }) });
4278
+ }));
4101
4279
 
4102
4280
  //#endregion
4103
4281
  //#region ../../node_modules/.pnpm/@pnpm+config.env-replace@1.1.0/node_modules/@pnpm/config.env-replace/dist/index.js
4104
- var require_dist = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+config.env-replace@1.1.0/node_modules/@pnpm/config.env-replace/dist/index.js": ((exports) => {
4282
+ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
4105
4283
  Object.defineProperty(exports, "__esModule", { value: true });
4106
4284
  exports.envReplace = void 0;
4107
4285
  var env_replace_1 = require_env_replace();
@@ -4111,11 +4289,11 @@ var require_dist = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+
4111
4289
  return env_replace_1.envReplace;
4112
4290
  }
4113
4291
  });
4114
- }) });
4292
+ }));
4115
4293
 
4116
4294
  //#endregion
4117
- //#region ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/util.js
4118
- var require_util = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/util.js": ((exports) => {
4295
+ //#region ../../node_modules/.pnpm/@pnpm+npm-conf@3.0.2/node_modules/@pnpm/npm-conf/lib/util.js
4296
+ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
4119
4297
  const fs$3 = __require("fs");
4120
4298
  const path$6 = __require("path");
4121
4299
  const { envReplace } = require_dist();
@@ -4129,7 +4307,7 @@ var require_util = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+
4129
4307
  const isPath = typeList.indexOf(path$6) !== -1;
4130
4308
  const isBool = typeList.indexOf(Boolean) !== -1;
4131
4309
  const isString$2 = typeList.indexOf(String) !== -1;
4132
- const isNumber$1 = typeList.indexOf(Number) !== -1;
4310
+ const isNumber = typeList.indexOf(Number) !== -1;
4133
4311
  field = `${field}`.trim();
4134
4312
  if (/^".*"$/.test(field)) try {
4135
4313
  field = JSON.parse(field);
@@ -4143,12 +4321,14 @@ var require_util = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+
4143
4321
  case "null": return null;
4144
4322
  case "undefined": return;
4145
4323
  }
4146
- field = envReplace(field, process.env);
4324
+ const processedField = envReplace(field, process.env);
4325
+ if ((key.endsWith(":tokenHelper") || key === "tokenHelper") && processedField !== field) throw new Error(`It is not allowed to use environment variables in the value of the ${key} setting.`);
4326
+ else field = processedField;
4147
4327
  if (isPath) {
4148
4328
  if ((process.platform === "win32" ? /^~(\/|\\)/ : /^~\//).test(field) && process.env.HOME) field = path$6.resolve(process.env.HOME, field.substr(2));
4149
4329
  field = path$6.resolve(field);
4150
4330
  }
4151
- if (isNumber$1 && !isNaN(field)) field = Number(field);
4331
+ if (isNumber && !isNaN(field)) field = Number(field);
4152
4332
  return field;
4153
4333
  };
4154
4334
  const findPrefix = (name$1) => {
@@ -4181,17 +4361,17 @@ var require_util = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+
4181
4361
  exports.findPrefix = findPrefix;
4182
4362
  exports.parseField = parseField;
4183
4363
  exports.parseKey = parseKey;
4184
- }) });
4364
+ }));
4185
4365
 
4186
4366
  //#endregion
4187
- //#region ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/types.js
4188
- var require_types = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/types.js": ((exports) => {
4367
+ //#region ../../node_modules/.pnpm/@pnpm+npm-conf@3.0.2/node_modules/@pnpm/npm-conf/lib/types.js
4368
+ var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
4189
4369
  const path$5 = __require("path");
4190
4370
  const Stream = __require("stream").Stream;
4191
4371
  const url = __require("url");
4192
4372
  const Umask = () => {};
4193
4373
  const getLocalAddresses = () => [];
4194
- const semver$1 = () => {};
4374
+ const semver = () => {};
4195
4375
  exports.types = {
4196
4376
  access: [
4197
4377
  null,
@@ -4263,7 +4443,7 @@ var require_types = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm
4263
4443
  "init-author-email": String,
4264
4444
  "init-author-url": ["", url],
4265
4445
  "init-license": String,
4266
- "init-version": semver$1,
4446
+ "init-version": semver,
4267
4447
  json: Boolean,
4268
4448
  key: [null, String],
4269
4449
  "legacy-bundling": Boolean,
@@ -4287,7 +4467,7 @@ var require_types = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm
4287
4467
  message: String,
4288
4468
  "metrics-registry": [null, String],
4289
4469
  "node-options": [null, String],
4290
- "node-version": [null, semver$1],
4470
+ "node-version": [null, semver],
4291
4471
  "no-proxy": [
4292
4472
  null,
4293
4473
  String,
@@ -4367,18 +4547,18 @@ var require_types = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm
4367
4547
  viewer: String,
4368
4548
  _exit: Boolean
4369
4549
  };
4370
- }) });
4550
+ }));
4371
4551
 
4372
4552
  //#endregion
4373
- //#region ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/conf.js
4374
- var require_conf = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/conf.js": ((exports, module) => {
4553
+ //#region ../../node_modules/.pnpm/@pnpm+npm-conf@3.0.2/node_modules/@pnpm/npm-conf/lib/conf.js
4554
+ var require_conf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4375
4555
  const { readCAFileSync } = require_dist$1();
4376
4556
  const fs$2 = __require("fs");
4377
4557
  const path$4 = __require("path");
4378
4558
  const { ConfigChain } = require_config_chain();
4379
4559
  const envKeyToSetting = require_envKeyToSetting();
4380
4560
  const util = require_util();
4381
- var Conf$1 = class extends ConfigChain {
4561
+ var Conf = class extends ConfigChain {
4382
4562
  constructor(base, types) {
4383
4563
  super(base);
4384
4564
  this.root = base;
@@ -4396,21 +4576,21 @@ var require_conf = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+
4396
4576
  }
4397
4577
  return super.add(data, marker);
4398
4578
  }
4399
- addFile(file$1, name$1) {
4400
- name$1 = name$1 || file$1;
4579
+ addFile(file, name$1) {
4580
+ name$1 = name$1 || file;
4401
4581
  const marker = { __source__: name$1 };
4402
4582
  this.sources[name$1] = {
4403
- path: file$1,
4583
+ path: file,
4404
4584
  type: "ini"
4405
4585
  };
4406
4586
  this.push(marker);
4407
4587
  this._await();
4408
4588
  try {
4409
- const contents = fs$2.readFileSync(file$1, "utf8");
4410
- this.addString(contents, file$1, "ini", marker);
4589
+ const contents = fs$2.readFileSync(file, "utf8");
4590
+ this.addString(contents, file, "ini", marker);
4411
4591
  } catch (error) {
4412
4592
  if (error.code === "ENOENT") this.add({}, marker);
4413
- else if (error.code !== "EISDIR") return `Issue while reading "${file$1}". ${error.message}`;
4593
+ else if (error.code !== "EISDIR") return `Issue while reading "${file}". ${error.message}`;
4414
4594
  }
4415
4595
  }
4416
4596
  addEnv(env$3) {
@@ -4463,9 +4643,9 @@ var require_conf = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+
4463
4643
  }
4464
4644
  return p;
4465
4645
  }
4466
- loadCAFile(file$1) {
4467
- if (!file$1) return;
4468
- const ca = readCAFileSync(file$1);
4646
+ loadCAFile(file) {
4647
+ if (!file) return;
4648
+ const ca = readCAFileSync(file);
4469
4649
  if (ca) this.set("ca", ca);
4470
4650
  }
4471
4651
  loadUser() {
@@ -4496,21 +4676,21 @@ var require_conf = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+
4496
4676
  }
4497
4677
  return envValue;
4498
4678
  }
4499
- module.exports = Conf$1;
4500
- }) });
4679
+ module.exports = Conf;
4680
+ }));
4501
4681
 
4502
4682
  //#endregion
4503
- //#region ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/defaults.js
4504
- var require_defaults = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/defaults.js": ((exports) => {
4683
+ //#region ../../node_modules/.pnpm/@pnpm+npm-conf@3.0.2/node_modules/@pnpm/npm-conf/lib/defaults.js
4684
+ var require_defaults = /* @__PURE__ */ __commonJSMin(((exports) => {
4505
4685
  const os$2 = __require("os");
4506
4686
  const path$3 = __require("path");
4507
4687
  const temp = os$2.tmpdir();
4508
4688
  const uidOrPid = process.getuid ? process.getuid() : process.pid;
4509
4689
  const hasUnicode = () => true;
4510
- const isWindows$1 = process.platform === "win32";
4690
+ const isWindows = process.platform === "win32";
4511
4691
  const osenv = {
4512
- editor: () => process.env.EDITOR || process.env.VISUAL || (isWindows$1 ? "notepad.exe" : "vi"),
4513
- shell: () => isWindows$1 ? process.env.COMSPEC || "cmd.exe" : process.env.SHELL || "/bin/bash"
4692
+ editor: () => process.env.EDITOR || process.env.VISUAL || (isWindows ? "notepad.exe" : "vi"),
4693
+ shell: () => isWindows ? process.env.COMSPEC || "cmd.exe" : process.env.SHELL || "/bin/bash"
4514
4694
  };
4515
4695
  const umask = { fromString: () => process.umask() };
4516
4696
  let home = os$2.homedir();
@@ -4602,7 +4782,7 @@ var require_defaults = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@p
4602
4782
  "prefer-offline": false,
4603
4783
  "prefer-online": false,
4604
4784
  prefix: globalPrefix,
4605
- production: process.env.NODE_ENV === "production",
4785
+ production: false,
4606
4786
  "progress": !process.env.TRAVIS && !process.env.CI,
4607
4787
  provenance: false,
4608
4788
  proxy: null,
@@ -4651,16 +4831,16 @@ var require_defaults = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@p
4651
4831
  };
4652
4832
  return defaults;
4653
4833
  } });
4654
- }) });
4834
+ }));
4655
4835
 
4656
4836
  //#endregion
4657
- //#region ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/index.js
4658
- var require_npm_conf = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/index.js": ((exports, module) => {
4837
+ //#region ../../node_modules/.pnpm/@pnpm+npm-conf@3.0.2/node_modules/@pnpm/npm-conf/index.js
4838
+ var require_npm_conf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4659
4839
  const path$2 = __require("path");
4660
4840
  const Conf = require_conf();
4661
4841
  const _defaults = require_defaults();
4662
- module.exports = (opts, types, defaults$1) => {
4663
- const conf = new Conf(Object.assign({}, _defaults.defaults, defaults$1), types);
4842
+ module.exports = (opts, types, defaults) => {
4843
+ const conf = new Conf(Object.assign({}, _defaults.defaults, defaults), types);
4664
4844
  conf.add(Object.assign({}, opts), "cli");
4665
4845
  const warnings = [];
4666
4846
  let failedToLoadBuiltInConfig = false;
@@ -4691,9 +4871,9 @@ var require_npm_conf = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@p
4691
4871
  }
4692
4872
  warnings.push(conf.addFile(conf.get("userconfig"), "user"));
4693
4873
  if (conf.get("prefix")) {
4694
- const etc$1 = path$2.resolve(conf.get("prefix"), "etc");
4695
- conf.root.globalconfig = path$2.resolve(etc$1, "npmrc");
4696
- conf.root.globalignorefile = path$2.resolve(etc$1, "npmignore");
4874
+ const etc = path$2.resolve(conf.get("prefix"), "etc");
4875
+ conf.root.globalconfig = path$2.resolve(etc, "npmrc");
4876
+ conf.root.globalignorefile = path$2.resolve(etc, "npmignore");
4697
4877
  }
4698
4878
  warnings.push(conf.addFile(conf.get("globalconfig"), "global"));
4699
4879
  conf.loadUser();
@@ -4711,11 +4891,11 @@ var require_npm_conf = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@p
4711
4891
  },
4712
4892
  enumerable: true
4713
4893
  });
4714
- }) });
4894
+ }));
4715
4895
 
4716
4896
  //#endregion
4717
- //#region ../../node_modules/.pnpm/registry-auth-token@5.1.0/node_modules/registry-auth-token/index.js
4718
- var require_registry_auth_token = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/registry-auth-token@5.1.0/node_modules/registry-auth-token/index.js": ((exports, module) => {
4897
+ //#region ../../node_modules/.pnpm/registry-auth-token@5.1.1/node_modules/registry-auth-token/index.js
4898
+ var require_registry_auth_token = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4719
4899
  const npmConf = require_npm_conf();
4720
4900
  const tokenKey = ":_authToken";
4721
4901
  const legacyTokenKey = ":_auth";
@@ -4801,7 +4981,7 @@ var require_registry_auth_token = /* @__PURE__ */ __commonJS({ "../../node_modul
4801
4981
  type: "Basic"
4802
4982
  };
4803
4983
  }
4804
- }) });
4984
+ }));
4805
4985
 
4806
4986
  //#endregion
4807
4987
  //#region ../../node_modules/.pnpm/package-json@10.0.1/node_modules/package-json/index.js
@@ -4881,7 +5061,7 @@ const isNpmOrYarn = isNpm || isYarn;
4881
5061
 
4882
5062
  //#endregion
4883
5063
  //#region ../../node_modules/.pnpm/ini@4.1.1/node_modules/ini/lib/ini.js
4884
- var require_ini = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ini@4.1.1/node_modules/ini/lib/ini.js": ((exports, module) => {
5064
+ var require_ini = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4885
5065
  const { hasOwnProperty } = Object.prototype;
4886
5066
  const encode = (obj, opt = {}) => {
4887
5067
  if (typeof opt === "string") opt = { section: opt };
@@ -4893,7 +5073,7 @@ var require_ini = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ini@4.1
4893
5073
  opt.platform = opt.platform || typeof process !== "undefined" && process.platform;
4894
5074
  opt.bracketedArray = opt.bracketedArray !== false;
4895
5075
  /* istanbul ignore next */
4896
- const eol$1 = opt.platform === "win32" ? "\r\n" : "\n";
5076
+ const eol = opt.platform === "win32" ? "\r\n" : "\n";
4897
5077
  const separator = opt.whitespace ? " = " : "=";
4898
5078
  const children = [];
4899
5079
  const keys = opt.sort ? Object.keys(obj).sort() : Object.keys(obj);
@@ -4903,11 +5083,11 @@ var require_ini = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ini@4.1
4903
5083
  const arraySuffix = opt.bracketedArray ? "[]" : "";
4904
5084
  for (const k of keys) {
4905
5085
  const val = obj[k];
4906
- if (val && Array.isArray(val)) for (const item of val) out += safe(`${k}${arraySuffix}`).padEnd(padToChars, " ") + separator + safe(item) + eol$1;
5086
+ if (val && Array.isArray(val)) for (const item of val) out += safe(`${k}${arraySuffix}`).padEnd(padToChars, " ") + separator + safe(item) + eol;
4907
5087
  else if (val && typeof val === "object") children.push(k);
4908
- else out += safe(k).padEnd(padToChars, " ") + separator + safe(val) + eol$1;
5088
+ else out += safe(k).padEnd(padToChars, " ") + separator + safe(val) + eol;
4909
5089
  }
4910
- if (opt.section && out.length) out = "[" + safe(opt.section) + "]" + (opt.newline ? eol$1 + eol$1 : eol$1) + out;
5090
+ if (opt.section && out.length) out = "[" + safe(opt.section) + "]" + (opt.newline ? eol + eol : eol) + out;
4911
5091
  for (const k of children) {
4912
5092
  const nk = splitSections(k, ".").join("\\.");
4913
5093
  const section = (opt.section ? opt.section + "." : "") + nk;
@@ -4915,7 +5095,7 @@ var require_ini = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ini@4.1
4915
5095
  ...opt,
4916
5096
  section
4917
5097
  });
4918
- if (out.length && child.length) out += eol$1;
5098
+ if (out.length && child.length) out += eol;
4919
5099
  out += child;
4920
5100
  }
4921
5101
  return out;
@@ -5035,7 +5215,7 @@ var require_ini = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ini@4.1
5035
5215
  safe,
5036
5216
  unsafe
5037
5217
  };
5038
- }) });
5218
+ }));
5039
5219
 
5040
5220
  //#endregion
5041
5221
  //#region ../../node_modules/.pnpm/global-directory@4.0.1/node_modules/global-directory/index.js
@@ -5071,8 +5251,8 @@ const getNpmPrefix = () => {
5071
5251
  const homePrefix = readRc(path.join(os.homedir(), ".npmrc"));
5072
5252
  if (homePrefix) return homePrefix;
5073
5253
  if (process$1.env.PREFIX) return process$1.env.PREFIX;
5074
- const globalPrefix$1 = readRc(getGlobalNpmrc());
5075
- if (globalPrefix$1) return globalPrefix$1;
5254
+ const globalPrefix = readRc(getGlobalNpmrc());
5255
+ if (globalPrefix) return globalPrefix;
5076
5256
  return getDefaultNpmPrefix();
5077
5257
  };
5078
5258
  const npmPrefix = path.resolve(getNpmPrefix());
@@ -5360,24 +5540,24 @@ var package_default = {
5360
5540
  "@yamada-ui/utils": "workspace:*",
5361
5541
  "boxen": "^8.0.1",
5362
5542
  "cli-check-node": "^1.3.4",
5363
- "commander": "^14.0.1",
5364
- "diff": "^8.0.2",
5365
- "esbuild": "^0.25.11",
5366
- "eslint": "^9.38.0",
5543
+ "commander": "^14.0.3",
5544
+ "diff": "^8.0.3",
5545
+ "esbuild": "^0.27.3",
5546
+ "eslint": "^9.39.2",
5367
5547
  "execa": "9.3.1",
5368
- "glob": "^11.0.3",
5548
+ "glob": "^13.0.3",
5369
5549
  "https-proxy-agent": "^7.0.6",
5370
- "listr2": "^9.0.5",
5550
+ "listr2": "^10.1.0",
5371
5551
  "node-eval": "^2.0.0",
5372
5552
  "node-fetch": "^3.3.2",
5373
- "ora": "^9.0.0",
5553
+ "ora": "^9.3.0",
5374
5554
  "picocolors": "^1.1.1",
5375
- "prettier": "^3.6.2",
5555
+ "prettier": "^3.8.1",
5376
5556
  "prompts": "^2.4.2",
5377
- "rimraf": "^6.0.1",
5378
- "semver": "^7.7.3",
5379
- "sucrase": "^3.35.0",
5380
- "validate-npm-package-name": "^6.0.2",
5557
+ "rimraf": "^6.1.2",
5558
+ "semver": "^7.7.4",
5559
+ "sucrase": "^3.35.1",
5560
+ "validate-npm-package-name": "^7.0.2",
5381
5561
  "yamljs": "^0.3.0"
5382
5562
  },
5383
5563
  devDependencies: {
@@ -5387,7 +5567,7 @@ var package_default = {
5387
5567
  "@types/validate-npm-package-name": "^4.0.2",
5388
5568
  "@types/yamljs": "^0.2.34",
5389
5569
  "clean-package": "2.2.0",
5390
- "tsx": "^4.20.6",
5570
+ "tsx": "^4.21.0",
5391
5571
  "typescript": "^5.9.3",
5392
5572
  "update-notifier": "^7.3.1"
5393
5573
  },
@@ -5498,11 +5678,11 @@ const TSCONFIG_JSON = {
5498
5678
 
5499
5679
  //#endregion
5500
5680
  //#region src/utils/lint.ts
5501
- async function lintText(content, { cwd: cwd$3, enabled = true, filePath } = {}) {
5681
+ async function lintText(content, { cwd: cwd$1, enabled = true, filePath } = {}) {
5502
5682
  if (!enabled) return content;
5503
5683
  try {
5504
5684
  const [result] = await new ESLint({
5505
- cwd: cwd$3,
5685
+ cwd: cwd$1,
5506
5686
  fix: true
5507
5687
  }).lintText(content, { filePath });
5508
5688
  if (result?.output) content = result.output;
@@ -5511,11 +5691,11 @@ async function lintText(content, { cwd: cwd$3, enabled = true, filePath } = {})
5511
5691
  return content;
5512
5692
  }
5513
5693
  }
5514
- async function lintFiles(patterns, { cwd: cwd$3, enabled = true } = {}) {
5694
+ async function lintFiles(patterns, { cwd: cwd$1, enabled = true } = {}) {
5515
5695
  if (!enabled) return;
5516
5696
  try {
5517
5697
  const results = await new ESLint({
5518
- cwd: cwd$3,
5698
+ cwd: cwd$1,
5519
5699
  fix: true
5520
5700
  }).lintFiles(patterns);
5521
5701
  await ESLint.outputFixes(results);
@@ -5524,7 +5704,7 @@ async function lintFiles(patterns, { cwd: cwd$3, enabled = true } = {}) {
5524
5704
 
5525
5705
  //#endregion
5526
5706
  //#region src/utils/prettier.ts
5527
- async function formatText(content, { configPath, enabled = true,...options } = {}) {
5707
+ async function formatText(content, { configPath, enabled = true, ...options } = {}) {
5528
5708
  if (!enabled) return content;
5529
5709
  try {
5530
5710
  configPath ??= await resolveConfigFile();
@@ -5537,7 +5717,7 @@ async function formatText(content, { configPath, enabled = true,...options } = {
5537
5717
  return content;
5538
5718
  }
5539
5719
  }
5540
- async function formatFiles(patterns, { enabled = true,...options } = {}) {
5720
+ async function formatFiles(patterns, { enabled = true, ...options } = {}) {
5541
5721
  if (!enabled) return;
5542
5722
  patterns = toArray(patterns);
5543
5723
  await Promise.all(patterns.map(async (pattern) => {
@@ -5621,9 +5801,9 @@ function getPackageManager() {
5621
5801
  if (userAgent$1.startsWith("bun")) return "bun";
5622
5802
  return "npm";
5623
5803
  }
5624
- async function getPackageJson(cwd$3) {
5804
+ async function getPackageJson(cwd$1) {
5625
5805
  try {
5626
- const packageJson$2 = await readFile(path$1.resolve(cwd$3, "package.json"), "utf8");
5806
+ const packageJson$2 = await readFile(path$1.resolve(cwd$1, "package.json"), "utf8");
5627
5807
  return JSON.parse(packageJson$2);
5628
5808
  } catch {
5629
5809
  throw new Error(`No package.json found. Please run ${c.cyan(`${getPackageManager()} init`)}.`);
@@ -5693,48 +5873,48 @@ function packageExecuteCommands(packageManager) {
5693
5873
  };
5694
5874
  }
5695
5875
  }
5696
- async function installDependencies(dependencies$1, { cwd: cwd$3, dev, exact = true } = {}) {
5876
+ async function installDependencies(dependencies$1, { cwd: cwd$1, dev, exact = true } = {}) {
5697
5877
  const packageManager = getPackageManager();
5698
5878
  if (dependencies$1?.length) await execa(packageManager, [...packageAddArgs(packageManager, {
5699
5879
  dev,
5700
5880
  exact
5701
5881
  }), ...dependencies$1], {
5702
- cwd: cwd$3,
5882
+ cwd: cwd$1,
5703
5883
  stdout: "ignore"
5704
5884
  });
5705
5885
  else await execa(packageManager, ["install"], {
5706
- cwd: cwd$3,
5886
+ cwd: cwd$1,
5707
5887
  stdout: "ignore"
5708
5888
  });
5709
5889
  }
5710
- async function uninstallDependencies(dependencies$1, { cwd: cwd$3 } = {}) {
5890
+ async function uninstallDependencies(dependencies$1, { cwd: cwd$1 } = {}) {
5711
5891
  const packageManager = getPackageManager();
5712
5892
  if (dependencies$1.length) await execa(packageManager, [packageManager === "npm" ? "uninstall" : "remove", ...dependencies$1], {
5713
- cwd: cwd$3,
5893
+ cwd: cwd$1,
5714
5894
  stdout: "ignore"
5715
5895
  });
5716
5896
  }
5717
- async function addWorkspace(cwd$3, workspacePath, config$1) {
5897
+ async function addWorkspace(cwd$1, workspacePath, config$1) {
5718
5898
  switch (getPackageManager()) {
5719
5899
  case "pnpm": {
5720
- const targetPath = path$1.resolve(cwd$3, "pnpm-workspace.yaml");
5900
+ const targetPath = path$1.resolve(cwd$1, "pnpm-workspace.yaml");
5721
5901
  if (existsSync(targetPath)) {
5722
5902
  const content = await readFile(targetPath, "utf8");
5723
- const json$1 = YAML.parse(content);
5724
- json$1.packages ??= [];
5725
- if (!json$1.packages.includes(workspacePath)) {
5726
- json$1.packages.push(workspacePath);
5727
- await writeFileSafe(targetPath, YAML.stringify(json$1), merge(config$1, { format: { parser: "yaml" } }));
5903
+ const json = YAML.parse(content);
5904
+ json.packages ??= [];
5905
+ if (!json.packages.includes(workspacePath)) {
5906
+ json.packages.push(workspacePath);
5907
+ await writeFileSafe(targetPath, YAML.stringify(json), merge(config$1, { format: { parser: "yaml" } }));
5728
5908
  }
5729
5909
  } else await writeFileSafe(targetPath, YAML.stringify({ packages: [workspacePath] }), merge(config$1, { format: { parser: "yaml" } }));
5730
5910
  break;
5731
5911
  }
5732
5912
  default: {
5733
- const packageJson$2 = await getPackageJson(cwd$3);
5913
+ const packageJson$2 = await getPackageJson(cwd$1);
5734
5914
  packageJson$2.workspaces ??= [];
5735
5915
  if (!packageJson$2.workspaces.includes(workspacePath)) {
5736
5916
  packageJson$2.workspaces.push(workspacePath);
5737
- await writeFileSafe(path$1.resolve(cwd$3, "package.json"), JSON.stringify(packageJson$2), merge(config$1, { format: { parser: "json" } }));
5917
+ await writeFileSafe(path$1.resolve(cwd$1, "package.json"), JSON.stringify(packageJson$2), merge(config$1, { format: { parser: "json" } }));
5738
5918
  }
5739
5919
  break;
5740
5920
  }
@@ -5777,21 +5957,21 @@ function getPaths(rootPath, jsx) {
5777
5957
  root: rootPath
5778
5958
  };
5779
5959
  }
5780
- async function getConfig(cwd$3, configPath, { format: format$2, jsx, lint } = {}) {
5960
+ async function getConfig(cwd$1, configPath, { format: format$2, jsx, lint } = {}) {
5781
5961
  try {
5782
- const data = await readFile(path$1.resolve(cwd$3, configPath), "utf-8");
5962
+ const data = await readFile(path$1.resolve(cwd$1, configPath), "utf-8");
5783
5963
  const userConfig = JSON.parse(data);
5784
5964
  if (!isUndefined(format$2)) userConfig.format = { enabled: format$2 };
5785
5965
  if (!isUndefined(lint)) userConfig.lint = { enabled: lint };
5786
5966
  if (!isUndefined(jsx)) userConfig.jsx = jsx;
5787
5967
  const paths = {
5788
- theme: getPaths(path$1.resolve(cwd$3, userConfig.theme?.path ?? (userConfig.monorepo ? DEFAULT_PATH.theme.monorepo : DEFAULT_PATH.theme.polyrepo)), userConfig.jsx),
5789
- ui: getPaths(path$1.resolve(cwd$3, userConfig.path ?? (userConfig.monorepo ? DEFAULT_PATH.ui.monorepo : DEFAULT_PATH.ui.polyrepo)), userConfig.jsx)
5968
+ theme: getPaths(path$1.resolve(cwd$1, userConfig.theme?.path ?? (userConfig.monorepo ? DEFAULT_PATH.theme.monorepo : DEFAULT_PATH.theme.polyrepo)), userConfig.jsx),
5969
+ ui: getPaths(path$1.resolve(cwd$1, userConfig.path ?? (userConfig.monorepo ? DEFAULT_PATH.ui.monorepo : DEFAULT_PATH.ui.polyrepo)), userConfig.jsx)
5790
5970
  };
5791
5971
  const sectionMap = Object.fromEntries(SECTION_NAMES.map((section) => {
5792
5972
  return [section, (userConfig[section]?.path ?? DEFAULT_PATH[section]).replace(/(\.\.\/|\.\/)/g, "").replace(/(^\/|\/$)/g, "")];
5793
5973
  }));
5794
- if (userConfig.theme?.path) userConfig.theme.path = path$1.resolve(cwd$3, userConfig.theme.path);
5974
+ if (userConfig.theme?.path) userConfig.theme.path = path$1.resolve(cwd$1, userConfig.theme.path);
5795
5975
  function isSection(section) {
5796
5976
  return SECTION_NAMES.includes(section);
5797
5977
  }
@@ -5828,7 +6008,7 @@ async function getConfig(cwd$3, configPath, { format: format$2, jsx, lint } = {}
5828
6008
  }
5829
6009
  return {
5830
6010
  ...userConfig,
5831
- cwd: cwd$3,
6011
+ cwd: cwd$1,
5832
6012
  getSection,
5833
6013
  getSectionPath,
5834
6014
  getSectionResolvedPath,
@@ -5844,11 +6024,11 @@ async function getConfig(cwd$3, configPath, { format: format$2, jsx, lint } = {}
5844
6024
 
5845
6025
  //#endregion
5846
6026
  //#region src/utils/module.ts
5847
- async function getModule(file$1, cwd$3) {
6027
+ async function getModule(file, cwd$1) {
5848
6028
  const result = await build({
5849
- absWorkingDir: cwd$3,
6029
+ absWorkingDir: cwd$1,
5850
6030
  bundle: true,
5851
- entryPoints: [file$1],
6031
+ entryPoints: [file],
5852
6032
  format: "cjs",
5853
6033
  mainFields: ["module", "main"],
5854
6034
  metafile: true,
@@ -5860,7 +6040,7 @@ async function getModule(file$1, cwd$3) {
5860
6040
  const { text: code } = result.outputFiles[0] ?? {};
5861
6041
  const dependencies$1 = isObject(result.metafile) ? Object.keys(result.metafile.inputs) : [];
5862
6042
  try {
5863
- const realFileName = realpathSync.native(file$1);
6043
+ const realFileName = realpathSync.native(file);
5864
6044
  if (!code) throw new Error("code is undefined");
5865
6045
  const script = new Script(code, { filename: realFileName });
5866
6046
  const mod = { exports: {} };
@@ -5903,13 +6083,13 @@ async function fetchRegistryNames() {
5903
6083
  }
5904
6084
  return registryNames;
5905
6085
  }
5906
- async function fetchRegistry(name$1, { cache: cache$1 = true } = {}) {
6086
+ async function fetchRegistry(name$1, { cache = true } = {}) {
5907
6087
  const url$2 = getRegistryUrl(name$1);
5908
- if (cache$1 && registryStore.has(url$2)) return registryStore.get(url$2);
6088
+ if (cache && registryStore.has(url$2)) return registryStore.get(url$2);
5909
6089
  const res = await fetch(url$2, { agent });
5910
6090
  if (res.ok) {
5911
6091
  const registry = await res.json();
5912
- if (cache$1) registryStore.set(url$2, registry);
6092
+ if (cache) registryStore.set(url$2, registry);
5913
6093
  return registry;
5914
6094
  } else switch (res.status) {
5915
6095
  case 400:
@@ -5923,12 +6103,12 @@ async function fetchRegistry(name$1, { cache: cache$1 = true } = {}) {
5923
6103
  default: throw new Error(`An error occurred while fetching the registry at ${c.red(name$1)}. Please try again later.`);
5924
6104
  }
5925
6105
  }
5926
- async function fetchRegistries(names, config$1, { cache: cache$1 = true, dependencies: withDependencies = true, dependents: withDependents = true, omit = [] } = {}) {
6106
+ async function fetchRegistries(names, config$1, { cache = true, dependencies: withDependencies = true, dependents: withDependents = true, omit = [] } = {}) {
5927
6107
  const results = {};
5928
6108
  async function fetch$1(names$1) {
5929
6109
  await Promise.all(names$1.map(async (name$1) => {
5930
6110
  if (results[name$1] || omit.includes(name$1)) return;
5931
- results[name$1] = fetchRegistry(name$1, { cache: cache$1 });
6111
+ results[name$1] = fetchRegistry(name$1, { cache });
5932
6112
  results[name$1] = await results[name$1];
5933
6113
  const { dependencies: dependencies$1, dependents, section } = results[name$1];
5934
6114
  const target = [];
@@ -6004,12 +6184,12 @@ function transformContent(targetSection, content, { getSection }, generatedNames
6004
6184
  return content;
6005
6185
  }
6006
6186
  async function transformContentWithFormatAndLint(filePath, section, content, config$1, generatedNames) {
6007
- const { cwd: cwd$3, format: format$2, jsx, lint } = config$1;
6187
+ const { cwd: cwd$1, format: format$2, jsx, lint } = config$1;
6008
6188
  content = transformContent(section, content, config$1, generatedNames);
6009
6189
  if (jsx) content = isJsx(filePath) ? transformTsxToJsx(content) : transformTsToJs(content);
6010
6190
  content = await lintText(content, {
6011
6191
  ...lint,
6012
- cwd: cwd$3,
6192
+ cwd: cwd$1,
6013
6193
  filePath
6014
6194
  });
6015
6195
  content = await formatText(content, format$2);
@@ -6062,7 +6242,7 @@ async function generateSource(dirPath, section, { name: fileName, content, data,
6062
6242
  content = transformContent(section, content, config$1, generatedNames);
6063
6243
  if (config$1.jsx) content = isJsx(fileName) ? transformTsxToJsx(content) : transformTsToJs(content);
6064
6244
  await writeFileSafe(targetPath, content, config$1);
6065
- } else if (template && data) await Promise.all(data.map(async ({ name: fileName$1,...rest }) => {
6245
+ } else if (template && data) await Promise.all(data.map(async ({ name: fileName$1, ...rest }) => {
6066
6246
  fileName$1 = transformExtension(fileName$1, config$1.jsx);
6067
6247
  let content$1 = transformTemplateContent(template, rest);
6068
6248
  content$1 = transformContent(section, content$1, config$1, generatedNames);
@@ -6076,15 +6256,15 @@ async function generateSources(dirPath, registry, config$1, generatedNames = [])
6076
6256
 
6077
6257
  //#endregion
6078
6258
  //#region src/commands/add/index.ts
6079
- const add = new Command("add").description("add a component to your project").argument("[components...]", "components to add").option("--cwd <path>", "current working directory", cwd).option("-c, --config <path>", "path to the config file", CONFIG_FILE_NAME).option("-o, --overwrite", "overwrite existing files.", false).option("-i, --install", "install dependencies", false).option("-s, --sequential", "run tasks sequentially.", false).option("-f, --format", "format the output files.").option("-l, --lint", "lint the output files.").action(async function(componentNames, { config: configPath, cwd: cwd$3, format: format$2, install, lint, overwrite, sequential }) {
6259
+ const add = new Command("add").description("add a component to your project").argument("[components...]", "components to add").option("--cwd <path>", "current working directory", cwd).option("-c, --config <path>", "path to the config file", CONFIG_FILE_NAME).option("-o, --overwrite", "overwrite existing files.", false).option("-i, --install", "install dependencies", false).option("-s, --sequential", "run tasks sequentially.", false).option("-f, --format", "format the output files.").option("-l, --lint", "lint the output files.").action(async function(componentNames, { config: configPath, cwd: cwd$1, format: format$2, install, lint, overwrite, sequential }) {
6080
6260
  const spinner = ora();
6081
6261
  try {
6082
6262
  const { end } = timer();
6083
6263
  spinner.start("Validating directory");
6084
- await validateDir(cwd$3);
6264
+ await validateDir(cwd$1);
6085
6265
  spinner.succeed("Validated directory");
6086
6266
  spinner.start("Fetching config");
6087
- const config$1 = await getConfig(cwd$3, configPath, {
6267
+ const config$1 = await getConfig(cwd$1, configPath, {
6088
6268
  format: format$2,
6089
6269
  lint
6090
6270
  });
@@ -6230,7 +6410,7 @@ const add = new Command("add").description("add a component to your project").ar
6230
6410
  title: `Generating ${c.cyan(indexFileName)}`
6231
6411
  });
6232
6412
  if (dependencies$1.length) {
6233
- const targetPath = config$1.monorepo ? config$1.paths.ui.root : cwd$3;
6413
+ const targetPath = config$1.monorepo ? config$1.paths.ui.root : cwd$1;
6234
6414
  spinner.start(`Checking ${c.cyan("package.json")} dependencies`);
6235
6415
  const notInstalledDependencies = getNotInstalledDependencies(await getPackageJson(targetPath), dependencies$1);
6236
6416
  spinner.succeed(`Checked ${c.cyan("package.json")} dependencies`);
@@ -6355,12 +6535,12 @@ async function getDiff(generatedNames, { locale, remote }, config$1, concurrent
6355
6535
  remote: remote$1
6356
6536
  };
6357
6537
  }
6358
- else if (template && data) await Promise.all(data.map(async ({ name: fileName,...remoteRest }) => {
6538
+ else if (template && data) await Promise.all(data.map(async ({ name: fileName, ...remoteRest }) => {
6359
6539
  const localeData = source?.data?.find(({ name: name$2 }) => name$2 === fileName);
6360
6540
  fileName = transformExtension(fileName, config$1.jsx);
6361
6541
  if (localeData) {
6362
6542
  if (template === source?.template) return;
6363
- const { name: _name,...localeRest } = localeData;
6543
+ const { name: _name, ...localeRest } = localeData;
6364
6544
  const [remote$1, locale$1] = await Promise.all([transformContentWithFormatAndLint(path$1.join(targetPath, fileName), section, transformTemplateContent(template, remoteRest), config$1, generatedNames), transformContentWithFormatAndLint(path$1.join(targetPath, fileName), section, transformTemplateContent(source.template, localeRest), config$1, generatedNames)]);
6365
6545
  const diff$1 = diffLines(locale$1, remote$1);
6366
6546
  if (diff$1.length < 2) return;
@@ -6402,7 +6582,7 @@ async function getDiff(generatedNames, { locale, remote }, config$1, concurrent
6402
6582
  diff: diff$1,
6403
6583
  locale: locale$1
6404
6584
  };
6405
- } else if (template && data) data.forEach(({ name: fileName,...remoteRest }) => {
6585
+ } else if (template && data) data.forEach(({ name: fileName, ...remoteRest }) => {
6406
6586
  let locale$1 = transformContent(section, transformTemplateContent(template, remoteRest), config$1, generatedNames);
6407
6587
  if (config$1.jsx) locale$1 = isJsx(fileName) ? transformTsxToJsx(locale$1) : transformTsToJs(locale$1);
6408
6588
  const diff$1 = [{
@@ -6514,11 +6694,11 @@ async function updateFiles(changeMap, { add: add$1, remove, update: update$1 },
6514
6694
  });
6515
6695
  if (!install$1) return conflictMap;
6516
6696
  }
6517
- const cwd$3 = config$1.monorepo ? config$1.paths.ui.root : config$1.cwd;
6697
+ const cwd$1 = config$1.monorepo ? config$1.paths.ui.root : config$1.cwd;
6518
6698
  remove.push(...update$1.map(({ name: name$1 }) => name$1));
6519
6699
  add$1.push(...update$1.map(getPackageNameWithVersion));
6520
- if (remove.length) await uninstallDependencies(remove.map(getPackageName), { cwd: cwd$3 });
6521
- if (add$1.length) await installDependencies(add$1, { cwd: cwd$3 });
6700
+ if (remove.length) await uninstallDependencies(remove.map(getPackageName), { cwd: cwd$1 });
6701
+ if (add$1.length) await installDependencies(add$1, { cwd: cwd$1 });
6522
6702
  return conflictMap;
6523
6703
  }
6524
6704
 
@@ -6645,7 +6825,7 @@ function printDiffDependencies({ add: add$1, remove, update: update$1 }) {
6645
6825
 
6646
6826
  //#endregion
6647
6827
  //#region src/commands/diff/index.ts
6648
- const diff = new Command("diff").description("check for updates against the registry").argument("[component]", "component to check").option("--cwd <path>", "current working directory", cwd).option("-c, --config <path>", "path to the config file", CONFIG_FILE_NAME).option("-s, --sequential", "run tasks sequentially.", false).option("-d, --detail", "show detailed changes", false).action(async function(targetName, { config: configPath, cwd: cwd$3, detail, sequential }) {
6828
+ const diff = new Command("diff").description("check for updates against the registry").argument("[component]", "component to check").option("--cwd <path>", "current working directory", cwd).option("-c, --config <path>", "path to the config file", CONFIG_FILE_NAME).option("-s, --sequential", "run tasks sequentially.", false).option("-d, --detail", "show detailed changes", false).action(async function(targetName, { config: configPath, cwd: cwd$1, detail, sequential }) {
6649
6829
  const spinner = ora();
6650
6830
  try {
6651
6831
  const { end } = timer();
@@ -6653,10 +6833,10 @@ const diff = new Command("diff").description("check for updates against the regi
6653
6833
  const prefix = `${command}${args.length ? ` ${args.join(" ")}` : ""}`;
6654
6834
  const getCommand = (command$1) => c.cyan(`${prefix} ${name}@latest ${command$1}`);
6655
6835
  spinner.start("Validating directory");
6656
- await validateDir(cwd$3);
6836
+ await validateDir(cwd$1);
6657
6837
  spinner.succeed("Validated directory");
6658
6838
  spinner.start("Fetching config");
6659
- const config$1 = await getConfig(cwd$3, configPath);
6839
+ const config$1 = await getConfig(cwd$1, configPath);
6660
6840
  spinner.succeed("Fetched config");
6661
6841
  spinner.start("Getting generated components");
6662
6842
  const componentNames = [];
@@ -6738,15 +6918,15 @@ const diff = new Command("diff").description("check for updates against the regi
6738
6918
 
6739
6919
  //#endregion
6740
6920
  //#region src/commands/init/index.ts
6741
- const init = new Command("init").description("initialize your project and install dependencies").option("--cwd <path>", "current working directory", cwd).option("-c, --config <path>", "path to the config file", CONFIG_FILE_NAME).option("-o, --overwrite", "overwrite existing files.", false).option("-j, --jsx", "use jsx instead of tsx", false).action(async function({ config: configPath, cwd: cwd$3, jsx, overwrite }) {
6921
+ const init = new Command("init").description("initialize your project and install dependencies").option("--cwd <path>", "current working directory", cwd).option("-c, --config <path>", "path to the config file", CONFIG_FILE_NAME).option("-o, --overwrite", "overwrite existing files.", false).option("-j, --jsx", "use jsx instead of tsx", false).action(async function({ config: configPath, cwd: cwd$1, jsx, overwrite }) {
6742
6922
  const spinner = ora();
6743
6923
  try {
6744
6924
  const { end } = timer();
6745
- await validateDir(cwd$3);
6925
+ await validateDir(cwd$1);
6746
6926
  const indexFileName = transformExtension("index.ts", jsx);
6747
6927
  const configFileName = configPath.includes("/") ? configPath.split("/").at(-1) : configPath;
6748
6928
  const config$1 = { ...DEFAULT_CONFIG };
6749
- configPath = path$1.resolve(cwd$3, configPath);
6929
+ configPath = path$1.resolve(cwd$1, configPath);
6750
6930
  let dependencies$1;
6751
6931
  let devDependencies$1;
6752
6932
  let { src = true, format: format$2 = true, lint = true, monorepo = true, outdir = "", packageName = "" } = await prompts([
@@ -6823,7 +7003,7 @@ const init = new Command("init").description("initialize your project and instal
6823
7003
  spinner.start(`Generating ${c.cyan(configFileName)}`);
6824
7004
  await writeFileSafe(configPath, JSON.stringify(config$1), merge(config$1, { format: { parser: "json" } }));
6825
7005
  spinner.succeed(`Generated ${c.cyan(configFileName)}`);
6826
- const outdirPath = path$1.resolve(cwd$3, outdir);
7006
+ const outdirPath = path$1.resolve(cwd$1, outdir);
6827
7007
  if (!overwrite && existsSync(outdirPath)) {
6828
7008
  const { overwrite: overwrite$1 } = await prompts({
6829
7009
  type: "confirm",
@@ -6849,13 +7029,13 @@ const init = new Command("init").description("initialize your project and instal
6849
7029
  task: async (_, task) => {
6850
7030
  const targetPath = path$1.resolve(outdirPath, "package.json");
6851
7031
  const defaultExports = DEFAULT_PACKAGE_JSON_EXPORTS.ui[jsx ? "jsx" : "tsx"];
6852
- const exports$2 = src ? defaultExports : Object.fromEntries(Object.entries(defaultExports).map(([key, value]) => [key, value.replace(/src\//, "")]));
7032
+ const exports$1 = src ? defaultExports : Object.fromEntries(Object.entries(defaultExports).map(([key, value]) => [key, value.replace(/src\//, "")]));
6853
7033
  await writeFileSafe(targetPath, JSON.stringify({
6854
7034
  name: packageName,
6855
7035
  ...DEFAULT_PACKAGE_JSON,
6856
7036
  dependencies: Object.fromEntries(REQUIRED_DEPENDENCIES.ui.map((dependency) => splitVersion(dependency))),
6857
7037
  devDependencies: Object.fromEntries(REQUIRED_DEV_DEPENDENCIES.ui.map((dependency) => splitVersion(dependency))),
6858
- exports: exports$2
7038
+ exports: exports$1
6859
7039
  }), merge(config$1, { format: { parser: "json" } }));
6860
7040
  task.title = `Generated ${c.cyan("package.json")}`;
6861
7041
  },
@@ -6874,8 +7054,8 @@ const init = new Command("init").description("initialize your project and instal
6874
7054
  },
6875
7055
  {
6876
7056
  task: async (_, task) => {
6877
- if (outdir.includes("/")) await addWorkspace(cwd$3, `${outdir.replace(/^\.\//, "").split("/")[0]}/**`, config$1);
6878
- else await addWorkspace(cwd$3, outdir, config$1);
7057
+ if (outdir.includes("/")) await addWorkspace(cwd$1, `${outdir.replace(/^\.\//, "").split("/")[0]}/**`, config$1);
7058
+ else await addWorkspace(cwd$1, outdir, config$1);
6879
7059
  task.title = "Added workspace";
6880
7060
  },
6881
7061
  title: "Adding workspace"
@@ -6904,7 +7084,7 @@ const init = new Command("init").description("initialize your project and instal
6904
7084
  const notInstalledDevDependencies = [];
6905
7085
  await new Listr([{
6906
7086
  task: async (_, task) => {
6907
- const packageJson$2 = await getPackageJson(cwd$3);
7087
+ const packageJson$2 = await getPackageJson(cwd$1);
6908
7088
  notInstalledDependencies.push(...getNotInstalledDependencies(packageJson$2, REQUIRED_DEPENDENCIES.ui));
6909
7089
  notInstalledDevDependencies.push(...getNotInstalledDependencies(packageJson$2, REQUIRED_DEV_DEPENDENCIES.ui));
6910
7090
  task.title = `Checked ${c.cyan("package.json")} dependencies`;
@@ -6936,9 +7116,9 @@ const init = new Command("init").description("initialize your project and instal
6936
7116
  }
6937
7117
  if (dependencies$1 || devDependencies$1) {
6938
7118
  spinner.start("Installing dependencies");
6939
- if (dependencies$1) await installDependencies(dependencies$1, { cwd: cwd$3 });
7119
+ if (dependencies$1) await installDependencies(dependencies$1, { cwd: cwd$1 });
6940
7120
  if (devDependencies$1) await installDependencies(devDependencies$1, {
6941
- cwd: cwd$3,
7121
+ cwd: cwd$1,
6942
7122
  dev: true
6943
7123
  });
6944
7124
  spinner.succeed("Installed dependencies");
@@ -6967,15 +7147,15 @@ const init = new Command("init").description("initialize your project and instal
6967
7147
 
6968
7148
  //#endregion
6969
7149
  //#region src/commands/theme/index.ts
6970
- const theme = new Command("theme").description("generate theme to your project").argument("[path]", "path to the theme directory").option("--cwd <path>", "current working directory", cwd).option("-c, --config <path>", "path to the config file", CONFIG_FILE_NAME).option("-o, --overwrite", "overwrite existing directory.", false).option("-j, --js", "use js instead of ts").option("-f, --format", "format the output files.").option("-l, --lint", "lint the output files.").action(async function(themePath, { config: configPath, cwd: cwd$3, format: format$2, js, lint, overwrite }) {
7150
+ const theme = new Command("theme").description("generate theme to your project").argument("[path]", "path to the theme directory").option("--cwd <path>", "current working directory", cwd).option("-c, --config <path>", "path to the config file", CONFIG_FILE_NAME).option("-o, --overwrite", "overwrite existing directory.", false).option("-j, --js", "use js instead of ts").option("-f, --format", "format the output files.").option("-l, --lint", "lint the output files.").action(async function(themePath, { config: configPath, cwd: cwd$1, format: format$2, js, lint, overwrite }) {
6971
7151
  const spinner = ora();
6972
7152
  try {
6973
7153
  const { end } = timer();
6974
7154
  spinner.start("Validating directory");
6975
- await validateDir(cwd$3);
7155
+ await validateDir(cwd$1);
6976
7156
  spinner.succeed("Validated directory");
6977
7157
  spinner.start("Fetching config");
6978
- const config$1 = await getConfig(cwd$3, configPath, {
7158
+ const config$1 = await getConfig(cwd$1, configPath, {
6979
7159
  format: format$2,
6980
7160
  jsx: js,
6981
7161
  lint
@@ -7017,7 +7197,7 @@ const theme = new Command("theme").description("generate theme to your project")
7017
7197
  monorepoConfig.src = src;
7018
7198
  monorepoConfig.packageName = packageName;
7019
7199
  }
7020
- const outdirPath = path$1.resolve(cwd$3, themePath);
7200
+ const outdirPath = path$1.resolve(cwd$1, themePath);
7021
7201
  if (!overwrite && existsSync(outdirPath)) {
7022
7202
  const { overwrite: overwrite$1 } = await prompts({
7023
7203
  type: "confirm",
@@ -7047,7 +7227,7 @@ const theme = new Command("theme").description("generate theme to your project")
7047
7227
  title: `Generating theme`
7048
7228
  }, {
7049
7229
  task: async (_, task) => {
7050
- const targetPath = path$1.resolve(cwd$3, configPath);
7230
+ const targetPath = path$1.resolve(cwd$1, configPath);
7051
7231
  const data = await readFile(targetPath, "utf-8");
7052
7232
  const userConfig = JSON.parse(data);
7053
7233
  userConfig.theme ??= {};
@@ -7061,13 +7241,13 @@ const theme = new Command("theme").description("generate theme to your project")
7061
7241
  task: async (_, task) => {
7062
7242
  const targetPath = path$1.resolve(outdirPath, "package.json");
7063
7243
  const defaultExports = DEFAULT_PACKAGE_JSON_EXPORTS.theme[config$1.jsx ? "jsx" : "tsx"];
7064
- const exports$2 = monorepoConfig.src ? defaultExports : Object.fromEntries(Object.entries(defaultExports).map(([key, value]) => [key, value.replace(/src\//, "")]));
7244
+ const exports$1 = monorepoConfig.src ? defaultExports : Object.fromEntries(Object.entries(defaultExports).map(([key, value]) => [key, value.replace(/src\//, "")]));
7065
7245
  await writeFileSafe(targetPath, JSON.stringify({
7066
7246
  name: monorepoConfig.packageName,
7067
7247
  ...DEFAULT_PACKAGE_JSON,
7068
7248
  dependencies: Object.fromEntries(REQUIRED_DEPENDENCIES.theme.map((dependency) => splitVersion(dependency))),
7069
7249
  devDependencies: Object.fromEntries(REQUIRED_DEV_DEPENDENCIES.theme.map((dependency) => splitVersion(dependency))),
7070
- exports: exports$2
7250
+ exports: exports$1
7071
7251
  }), merge(config$1, { format: { parser: "json" } }));
7072
7252
  task.title = `Generated ${c.cyan("package.json")}`;
7073
7253
  },
@@ -7093,7 +7273,7 @@ const theme = new Command("theme").description("generate theme to your project")
7093
7273
  });
7094
7274
  if (install) {
7095
7275
  spinner.start("Installing dependencies");
7096
- await installDependencies([], { cwd: cwd$3 });
7276
+ await installDependencies([], { cwd: cwd$1 });
7097
7277
  spinner.succeed("Installed dependencies");
7098
7278
  }
7099
7279
  const packageManager = getPackageManager();
@@ -7296,8 +7476,8 @@ function generateThemeTokens(theme$1, { internal = false, theme: { responsive =
7296
7476
  `}`
7297
7477
  ].join("\n");
7298
7478
  }
7299
- async function getTheme(path$9, cwd$3) {
7300
- const { dependencies: dependencies$1, mod } = await getModule(path$9, cwd$3);
7479
+ async function getTheme(path$9, cwd$1) {
7480
+ const { dependencies: dependencies$1, mod } = await getModule(path$9, cwd$1);
7301
7481
  const theme$1 = mod?.default ?? mod?.theme ?? mod?.customTheme ?? mod?.defaultTheme ?? {};
7302
7482
  return {
7303
7483
  config: mod?.config ?? mod?.customConfig ?? mod?.defaultConfig ?? {},
@@ -7305,17 +7485,17 @@ async function getTheme(path$9, cwd$3) {
7305
7485
  theme: theme$1
7306
7486
  };
7307
7487
  }
7308
- const tokens = new Command("tokens").description("generate theme typings").argument("[path]", "path to the theme file").option("--cwd <path>", "current working directory", cwd).option("-c, --config <path>", "path to the config file", CONFIG_FILE_NAME).option("-o, --out <path>", `output path`).option("-f, --format", "format the output file").option("-l, --lint", "lint the output file").option("--internal", "generate internal tokens", false).action(async function(inputPath, { config: configPath, cwd: cwd$3, format: format$2, internal, lint, out: outPath }) {
7488
+ const tokens = new Command("tokens").description("generate theme typings").argument("[path]", "path to the theme file").option("--cwd <path>", "current working directory", cwd).option("-c, --config <path>", "path to the config file", CONFIG_FILE_NAME).option("-o, --out <path>", `output path`).option("-f, --format", "format the output file").option("-l, --lint", "lint the output file").option("--internal", "generate internal tokens", false).action(async function(inputPath, { config: configPath, cwd: cwd$1, format: format$2, internal, lint, out: outPath }) {
7309
7489
  const spinner = ora();
7310
7490
  try {
7311
7491
  const { end } = timer();
7312
7492
  spinner.start("Validating directory");
7313
- await validateDir(cwd$3);
7493
+ await validateDir(cwd$1);
7314
7494
  spinner.succeed("Validated directory");
7315
7495
  let config$1;
7316
7496
  if (!internal) {
7317
7497
  spinner.start("Fetching config");
7318
- config$1 = await getConfig(cwd$3, configPath, {
7498
+ config$1 = await getConfig(cwd$1, configPath, {
7319
7499
  format: format$2,
7320
7500
  lint
7321
7501
  });
@@ -7324,14 +7504,14 @@ const tokens = new Command("tokens").description("generate theme typings").argum
7324
7504
  }
7325
7505
  if (!inputPath) throw new Error("No input path provided");
7326
7506
  spinner.start(`Getting theme`);
7327
- cwd$3 = path$1.resolve(cwd$3);
7328
- inputPath = path$1.resolve(cwd$3, inputPath);
7329
- if (outPath) outPath = path$1.resolve(cwd$3, outPath);
7507
+ cwd$1 = path$1.resolve(cwd$1);
7508
+ inputPath = path$1.resolve(cwd$1, inputPath);
7509
+ if (outPath) outPath = path$1.resolve(cwd$1, outPath);
7330
7510
  else if (inputPath.includes("/")) {
7331
7511
  const dirPath = inputPath.split("/").slice(0, -1).join("/");
7332
7512
  outPath = path$1.join(dirPath, "index.types.ts");
7333
- } else outPath = path$1.join(cwd$3, "index.types.ts");
7334
- const { config: themeConfig, theme: theme$1 } = await getTheme(inputPath, cwd$3);
7513
+ } else outPath = path$1.join(cwd$1, "index.types.ts");
7514
+ const { config: themeConfig, theme: theme$1 } = await getTheme(inputPath, cwd$1);
7335
7515
  spinner.succeed(`Got theme`);
7336
7516
  spinner.start(`Generating theme typings`);
7337
7517
  const content = generateThemeTokens(theme$1, {
@@ -7339,7 +7519,7 @@ const tokens = new Command("tokens").description("generate theme typings").argum
7339
7519
  internal
7340
7520
  });
7341
7521
  await writeFileSafe(outPath, content, config$1 ? merge(config$1, { lint: { filePath: inputPath } }) : {
7342
- cwd: cwd$3,
7522
+ cwd: cwd$1,
7343
7523
  format: { enabled: format$2 },
7344
7524
  lint: {
7345
7525
  enabled: lint,
@@ -7356,7 +7536,7 @@ const tokens = new Command("tokens").description("generate theme typings").argum
7356
7536
 
7357
7537
  //#endregion
7358
7538
  //#region src/commands/update/index.ts
7359
- const update = new Command("update").description("update components in your project").argument("[components...]", "components to update").option("--cwd <path>", "current working directory", cwd).option("-c, --config <path>", "path to the config file", CONFIG_FILE_NAME).option("-i, --install", "install dependencies", false).option("-s, --sequential", "run tasks sequentially.", false).option("-f, --format", "format the output files.").option("-l, --lint", "lint the output files.").action(async function(targetNames, { config: configPath, cwd: cwd$3, format: format$2, install, lint, sequential }) {
7539
+ const update = new Command("update").description("update components in your project").argument("[components...]", "components to update").option("--cwd <path>", "current working directory", cwd).option("-c, --config <path>", "path to the config file", CONFIG_FILE_NAME).option("-i, --install", "install dependencies", false).option("-s, --sequential", "run tasks sequentially.", false).option("-f, --format", "format the output files.").option("-l, --lint", "lint the output files.").action(async function(targetNames, { config: configPath, cwd: cwd$1, format: format$2, install, lint, sequential }) {
7360
7540
  const spinner = ora();
7361
7541
  try {
7362
7542
  const { end } = timer();
@@ -7364,13 +7544,13 @@ const update = new Command("update").description("update components in your proj
7364
7544
  const prefix = `${command}${args.length ? ` ${args.join(" ")}` : ""}`;
7365
7545
  const getCommand = (command$1) => c.cyan(`${prefix} ${name}@latest ${command$1}`);
7366
7546
  spinner.start("Validating directory");
7367
- await validateDir(cwd$3);
7547
+ await validateDir(cwd$1);
7368
7548
  spinner.succeed("Validated directory");
7369
7549
  spinner.start("Validating methods");
7370
7550
  await validateDiff3();
7371
7551
  spinner.succeed("Validated methods");
7372
7552
  spinner.start("Fetching config");
7373
- const config$1 = await getConfig(cwd$3, configPath, {
7553
+ const config$1 = await getConfig(cwd$1, configPath, {
7374
7554
  format: format$2,
7375
7555
  lint
7376
7556
  });