@kevisual/cli 0.0.59 → 0.0.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/envision.js CHANGED
@@ -18,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => {
18
18
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
19
19
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
20
20
 
21
- // node_modules/.pnpm/commander@14.0.1/node_modules/commander/lib/error.js
21
+ // node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/error.js
22
22
  var require_error = __commonJS((exports) => {
23
23
  class CommanderError extends Error {
24
24
  constructor(exitCode, code, message) {
@@ -42,7 +42,7 @@ var require_error = __commonJS((exports) => {
42
42
  exports.InvalidArgumentError = InvalidArgumentError;
43
43
  });
44
44
 
45
- // node_modules/.pnpm/commander@14.0.1/node_modules/commander/lib/argument.js
45
+ // node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/argument.js
46
46
  var require_argument = __commonJS((exports) => {
47
47
  var { InvalidArgumentError } = require_error();
48
48
 
@@ -122,7 +122,7 @@ var require_argument = __commonJS((exports) => {
122
122
  exports.humanReadableArgName = humanReadableArgName;
123
123
  });
124
124
 
125
- // node_modules/.pnpm/commander@14.0.1/node_modules/commander/lib/help.js
125
+ // node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/help.js
126
126
  var require_help = __commonJS((exports) => {
127
127
  var { humanReadableArgName } = require_argument();
128
128
 
@@ -479,7 +479,7 @@ ${itemIndentStr}`);
479
479
  exports.stripColor = stripColor;
480
480
  });
481
481
 
482
- // node_modules/.pnpm/commander@14.0.1/node_modules/commander/lib/option.js
482
+ // node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/option.js
483
483
  var require_option = __commonJS((exports) => {
484
484
  var { InvalidArgumentError } = require_error();
485
485
 
@@ -663,7 +663,7 @@ var require_option = __commonJS((exports) => {
663
663
  exports.DualOptions = DualOptions;
664
664
  });
665
665
 
666
- // node_modules/.pnpm/commander@14.0.1/node_modules/commander/lib/suggestSimilar.js
666
+ // node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/suggestSimilar.js
667
667
  var require_suggestSimilar = __commonJS((exports) => {
668
668
  var maxDistance = 3;
669
669
  function editDistance(a, b) {
@@ -736,7 +736,7 @@ var require_suggestSimilar = __commonJS((exports) => {
736
736
  exports.suggestSimilar = suggestSimilar;
737
737
  });
738
738
 
739
- // node_modules/.pnpm/commander@14.0.1/node_modules/commander/lib/command.js
739
+ // node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/command.js
740
740
  var require_command = __commonJS((exports) => {
741
741
  var EventEmitter = __require("node:events").EventEmitter;
742
742
  var childProcess = __require("node:child_process");
@@ -1595,7 +1595,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1595
1595
  return arg.length > 1 && arg[0] === "-";
1596
1596
  }
1597
1597
  const negativeNumberArg = (arg) => {
1598
- if (!/^-\d*\.?\d+(e[+-]?\d+)?$/.test(arg))
1598
+ if (!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(arg))
1599
1599
  return false;
1600
1600
  return !this._getCommandAndAncestors().some((cmd) => cmd.options.map((opt) => opt.short).some((short) => /^-\d$/.test(short)));
1601
1601
  };
@@ -2091,7 +2091,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2091
2091
  exports.useColor = useColor;
2092
2092
  });
2093
2093
 
2094
- // node_modules/.pnpm/commander@14.0.1/node_modules/commander/index.js
2094
+ // node_modules/.pnpm/commander@14.0.2/node_modules/commander/index.js
2095
2095
  var require_commander = __commonJS((exports) => {
2096
2096
  var { Argument } = require_argument();
2097
2097
  var { Command } = require_command();
@@ -2111,7 +2111,7 @@ var require_commander = __commonJS((exports) => {
2111
2111
  exports.InvalidOptionArgumentError = InvalidArgumentError;
2112
2112
  });
2113
2113
 
2114
- // node_modules/.pnpm/yoctocolors-cjs@2.1.2/node_modules/yoctocolors-cjs/index.js
2114
+ // node_modules/.pnpm/yoctocolors-cjs@2.1.3/node_modules/yoctocolors-cjs/index.js
2115
2115
  var require_yoctocolors_cjs = __commonJS((exports, module) => {
2116
2116
  var tty = __require("node:tty");
2117
2117
  var hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;
@@ -2129,8 +2129,10 @@ var require_yoctocolors_cjs = __commonJS((exports, module) => {
2129
2129
  }
2130
2130
  let result = openCode;
2131
2131
  let lastIndex = 0;
2132
+ const reopenOnNestedClose = close === 22;
2133
+ const replaceCode = (reopenOnNestedClose ? closeCode : "") + openCode;
2132
2134
  while (index !== -1) {
2133
- result += string.slice(lastIndex, index) + openCode;
2135
+ result += string.slice(lastIndex, index) + replaceCode;
2134
2136
  lastIndex = index + closeCode.length;
2135
2137
  index = string.indexOf(closeCode, lastIndex);
2136
2138
  }
@@ -3516,7 +3518,7 @@ var require_wrap_ansi = __commonJS((exports, module) => {
3516
3518
  };
3517
3519
  });
3518
3520
 
3519
- // node_modules/.pnpm/mute-stream@2.0.0/node_modules/mute-stream/lib/index.js
3521
+ // node_modules/.pnpm/mute-stream@3.0.0/node_modules/mute-stream/lib/index.js
3520
3522
  var require_lib = __commonJS((exports, module) => {
3521
3523
  var Stream = __require("stream");
3522
3524
 
@@ -3636,7 +3638,7 @@ var require_lib = __commonJS((exports, module) => {
3636
3638
  module.exports = MuteStream;
3637
3639
  });
3638
3640
 
3639
- // node_modules/.pnpm/chardet@2.1.0/node_modules/chardet/lib/fs/node.js
3641
+ // node_modules/.pnpm/chardet@2.1.1/node_modules/chardet/lib/fs/node.js
3640
3642
  var require_node = __commonJS((exports, module) => {
3641
3643
  Object.defineProperty(exports, "__esModule", { value: true });
3642
3644
  var fsModule;
@@ -3649,7 +3651,7 @@ var require_node = __commonJS((exports, module) => {
3649
3651
  };
3650
3652
  });
3651
3653
 
3652
- // node_modules/.pnpm/chardet@2.1.0/node_modules/chardet/lib/match.js
3654
+ // node_modules/.pnpm/chardet@2.1.1/node_modules/chardet/lib/match.js
3653
3655
  var require_match = __commonJS((exports) => {
3654
3656
  Object.defineProperty(exports, "__esModule", { value: true });
3655
3657
  exports.default = (ctx, rec, confidence) => ({
@@ -3659,7 +3661,7 @@ var require_match = __commonJS((exports) => {
3659
3661
  });
3660
3662
  });
3661
3663
 
3662
- // node_modules/.pnpm/chardet@2.1.0/node_modules/chardet/lib/encoding/ascii.js
3664
+ // node_modules/.pnpm/chardet@2.1.1/node_modules/chardet/lib/encoding/ascii.js
3663
3665
  var require_ascii = __commonJS((exports) => {
3664
3666
  var __importDefault = exports && exports.__importDefault || function(mod) {
3665
3667
  return mod && mod.__esModule ? mod : { default: mod };
@@ -3685,7 +3687,7 @@ var require_ascii = __commonJS((exports) => {
3685
3687
  exports.default = Ascii;
3686
3688
  });
3687
3689
 
3688
- // node_modules/.pnpm/chardet@2.1.0/node_modules/chardet/lib/encoding/utf8.js
3690
+ // node_modules/.pnpm/chardet@2.1.1/node_modules/chardet/lib/encoding/utf8.js
3689
3691
  var require_utf8 = __commonJS((exports) => {
3690
3692
  var __importDefault = exports && exports.__importDefault || function(mod) {
3691
3693
  return mod && mod.__esModule ? mod : { default: mod };
@@ -3754,7 +3756,7 @@ var require_utf8 = __commonJS((exports) => {
3754
3756
  exports.default = Utf8;
3755
3757
  });
3756
3758
 
3757
- // node_modules/.pnpm/chardet@2.1.0/node_modules/chardet/lib/encoding/unicode.js
3759
+ // node_modules/.pnpm/chardet@2.1.1/node_modules/chardet/lib/encoding/unicode.js
3758
3760
  var require_unicode = __commonJS((exports) => {
3759
3761
  var __importDefault = exports && exports.__importDefault || function(mod) {
3760
3762
  return mod && mod.__esModule ? mod : { default: mod };
@@ -3855,7 +3857,7 @@ var require_unicode = __commonJS((exports) => {
3855
3857
  exports.UTF_32LE = UTF_32LE;
3856
3858
  });
3857
3859
 
3858
- // node_modules/.pnpm/chardet@2.1.0/node_modules/chardet/lib/encoding/mbcs.js
3860
+ // node_modules/.pnpm/chardet@2.1.1/node_modules/chardet/lib/encoding/mbcs.js
3859
3861
  var require_mbcs = __commonJS((exports) => {
3860
3862
  var __importDefault = exports && exports.__importDefault || function(mod) {
3861
3863
  return mod && mod.__esModule ? mod : { default: mod };
@@ -4604,7 +4606,7 @@ var require_mbcs = __commonJS((exports) => {
4604
4606
  exports.gb_18030 = gb_18030;
4605
4607
  });
4606
4608
 
4607
- // node_modules/.pnpm/chardet@2.1.0/node_modules/chardet/lib/encoding/sbcs.js
4609
+ // node_modules/.pnpm/chardet@2.1.1/node_modules/chardet/lib/encoding/sbcs.js
4608
4610
  var require_sbcs = __commonJS((exports) => {
4609
4611
  var __importDefault = exports && exports.__importDefault || function(mod) {
4610
4612
  return mod && mod.__esModule ? mod : { default: mod };
@@ -8965,7 +8967,7 @@ var require_sbcs = __commonJS((exports) => {
8965
8967
  exports.KOI8_R = KOI8_R;
8966
8968
  });
8967
8969
 
8968
- // node_modules/.pnpm/chardet@2.1.0/node_modules/chardet/lib/encoding/iso2022.js
8970
+ // node_modules/.pnpm/chardet@2.1.1/node_modules/chardet/lib/encoding/iso2022.js
8969
8971
  var require_iso2022 = __commonJS((exports) => {
8970
8972
  var __importDefault = exports && exports.__importDefault || function(mod) {
8971
8973
  return mod && mod.__esModule ? mod : { default: mod };
@@ -9087,7 +9089,7 @@ var require_iso2022 = __commonJS((exports) => {
9087
9089
  exports.ISO_2022_CN = ISO_2022_CN;
9088
9090
  });
9089
9091
 
9090
- // node_modules/.pnpm/chardet@2.1.0/node_modules/chardet/lib/utils.js
9092
+ // node_modules/.pnpm/chardet@2.1.1/node_modules/chardet/lib/utils.js
9091
9093
  var require_utils = __commonJS((exports) => {
9092
9094
  Object.defineProperty(exports, "__esModule", { value: true });
9093
9095
  exports.isByteArray = undefined;
@@ -9099,7 +9101,7 @@ var require_utils = __commonJS((exports) => {
9099
9101
  exports.isByteArray = isByteArray;
9100
9102
  });
9101
9103
 
9102
- // node_modules/.pnpm/chardet@2.1.0/node_modules/chardet/lib/index.js
9104
+ // node_modules/.pnpm/chardet@2.1.1/node_modules/chardet/lib/index.js
9103
9105
  var require_lib2 = __commonJS((exports) => {
9104
9106
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
9105
9107
  if (k2 === undefined)
@@ -9232,15 +9234,25 @@ var require_lib2 = __commonJS((exports) => {
9232
9234
  }
9233
9235
  if (err) {
9234
9236
  reject(err);
9235
- } else {
9237
+ } else if (buffer) {
9236
9238
  resolve((0, exports.detect)(buffer));
9239
+ } else {
9240
+ reject(new Error("No error and no buffer received"));
9237
9241
  }
9238
9242
  };
9239
- if (opts && opts.sampleSize) {
9243
+ const sampleSize = (opts === null || opts === undefined ? undefined : opts.sampleSize) || 0;
9244
+ if (sampleSize > 0) {
9240
9245
  fd = fs3.openSync(filepath, "r");
9241
- const sample = Buffer.allocUnsafe(opts.sampleSize);
9242
- fs3.read(fd, sample, 0, opts.sampleSize, opts.offset, (err) => {
9243
- handler(err, sample);
9246
+ let sample = Buffer.allocUnsafe(sampleSize);
9247
+ fs3.read(fd, sample, 0, sampleSize, opts.offset, (err, bytesRead) => {
9248
+ if (err) {
9249
+ handler(err, null);
9250
+ } else {
9251
+ if (bytesRead < sampleSize) {
9252
+ sample = sample.subarray(0, bytesRead);
9253
+ }
9254
+ handler(null, sample);
9255
+ }
9244
9256
  });
9245
9257
  return;
9246
9258
  }
@@ -9251,8 +9263,11 @@ var require_lib2 = __commonJS((exports) => {
9251
9263
  const fs3 = (0, node_1.default)();
9252
9264
  if (opts && opts.sampleSize) {
9253
9265
  const fd = fs3.openSync(filepath, "r");
9254
- const sample = Buffer.allocUnsafe(opts.sampleSize);
9255
- fs3.readSync(fd, sample, 0, opts.sampleSize, opts.offset);
9266
+ let sample = Buffer.allocUnsafe(opts.sampleSize);
9267
+ const bytesRead = fs3.readSync(fd, sample, 0, opts.sampleSize, opts.offset);
9268
+ if (bytesRead < opts.sampleSize) {
9269
+ sample = sample.subarray(0, bytesRead);
9270
+ }
9256
9271
  fs3.closeSync(fd);
9257
9272
  return (0, exports.detect)(sample);
9258
9273
  }
@@ -9272,21 +9287,21 @@ var require_safer = __commonJS((exports, module) => {
9272
9287
  var buffer = __require("buffer");
9273
9288
  var Buffer2 = buffer.Buffer;
9274
9289
  var safer = {};
9275
- var key2;
9276
- for (key2 in buffer) {
9277
- if (!buffer.hasOwnProperty(key2))
9290
+ var key;
9291
+ for (key in buffer) {
9292
+ if (!buffer.hasOwnProperty(key))
9278
9293
  continue;
9279
- if (key2 === "SlowBuffer" || key2 === "Buffer")
9294
+ if (key === "SlowBuffer" || key === "Buffer")
9280
9295
  continue;
9281
- safer[key2] = buffer[key2];
9296
+ safer[key] = buffer[key];
9282
9297
  }
9283
9298
  var Safer = safer.Buffer = {};
9284
- for (key2 in Buffer2) {
9285
- if (!Buffer2.hasOwnProperty(key2))
9299
+ for (key in Buffer2) {
9300
+ if (!Buffer2.hasOwnProperty(key))
9286
9301
  continue;
9287
- if (key2 === "allocUnsafe" || key2 === "allocUnsafeSlow")
9302
+ if (key === "allocUnsafe" || key === "allocUnsafeSlow")
9288
9303
  continue;
9289
- Safer[key2] = Buffer2[key2];
9304
+ Safer[key] = Buffer2[key];
9290
9305
  }
9291
9306
  safer.Buffer.prototype = Buffer2.prototype;
9292
9307
  if (!Safer.from || Safer.from === Uint8Array.from) {
@@ -9382,9 +9397,9 @@ var require_bom_handling = __commonJS((exports) => {
9382
9397
  var require_merge_exports = __commonJS((exports, module) => {
9383
9398
  var hasOwn = typeof Object.hasOwn === "undefined" ? Function.call.bind(Object.prototype.hasOwnProperty) : Object.hasOwn;
9384
9399
  function mergeModules(target, module2) {
9385
- for (var key2 in module2) {
9386
- if (hasOwn(module2, key2)) {
9387
- target[key2] = module2[key2];
9400
+ for (var key in module2) {
9401
+ if (hasOwn(module2, key)) {
9402
+ target[key] = module2[key];
9388
9403
  }
9389
9404
  }
9390
9405
  }
@@ -12857,8 +12872,8 @@ var require_lib3 = __commonJS((exports, module) => {
12857
12872
  enc = codecDef;
12858
12873
  break;
12859
12874
  case "object":
12860
- for (var key2 in codecDef) {
12861
- codecOptions[key2] = codecDef[key2];
12875
+ for (var key in codecDef) {
12876
+ codecOptions[key] = codecDef[key];
12862
12877
  }
12863
12878
  if (!codecOptions.encodingName) {
12864
12879
  codecOptions.encodingName = enc;
@@ -16745,8 +16760,8 @@ var require_argsArgArrayOrObject = __commonJS((exports) => {
16745
16760
  if (isPOJO(first_1)) {
16746
16761
  var keys = getKeys(first_1);
16747
16762
  return {
16748
- args: keys.map(function(key2) {
16749
- return first_1[key2];
16763
+ args: keys.map(function(key) {
16764
+ return first_1[key];
16750
16765
  }),
16751
16766
  keys
16752
16767
  };
@@ -16765,8 +16780,8 @@ var require_createObject = __commonJS((exports) => {
16765
16780
  Object.defineProperty(exports, "__esModule", { value: true });
16766
16781
  exports.createObject = undefined;
16767
16782
  function createObject(keys, values) {
16768
- return keys.reduce(function(result, key2, i) {
16769
- return result[key2] = values[i], result;
16783
+ return keys.reduce(function(result, key, i) {
16784
+ return result[key] = values[i], result;
16770
16785
  }, {});
16771
16786
  }
16772
16787
  exports.createObject = createObject;
@@ -18761,9 +18776,9 @@ var require_distinct = __commonJS((exports) => {
18761
18776
  return lift_1.operate(function(source, subscriber) {
18762
18777
  var distinctKeys = new Set;
18763
18778
  source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) {
18764
- var key2 = keySelector ? keySelector(value) : value;
18765
- if (!distinctKeys.has(key2)) {
18766
- distinctKeys.add(key2);
18779
+ var key = keySelector ? keySelector(value) : value;
18780
+ if (!distinctKeys.has(key)) {
18781
+ distinctKeys.add(key);
18767
18782
  subscriber.next(value);
18768
18783
  }
18769
18784
  }));
@@ -18811,9 +18826,9 @@ var require_distinctUntilKeyChanged = __commonJS((exports) => {
18811
18826
  Object.defineProperty(exports, "__esModule", { value: true });
18812
18827
  exports.distinctUntilKeyChanged = undefined;
18813
18828
  var distinctUntilChanged_1 = require_distinctUntilChanged();
18814
- function distinctUntilKeyChanged(key2, compare) {
18829
+ function distinctUntilKeyChanged(key, compare) {
18815
18830
  return distinctUntilChanged_1.distinctUntilChanged(function(x, y) {
18816
- return compare ? compare(x[key2], y[key2]) : x[key2] === y[key2];
18831
+ return compare ? compare(x[key], y[key]) : x[key] === y[key];
18817
18832
  });
18818
18833
  }
18819
18834
  exports.distinctUntilKeyChanged = distinctUntilKeyChanged;
@@ -19158,7 +19173,7 @@ var require_groupBy = __commonJS((exports) => {
19158
19173
  return activeGroups === 0;
19159
19174
  });
19160
19175
  source.subscribe(groupBySourceSubscriber);
19161
- function createGroupedObservable(key2, groupSubject) {
19176
+ function createGroupedObservable(key, groupSubject) {
19162
19177
  var result = new Observable_1.Observable(function(groupSubscriber) {
19163
19178
  activeGroups++;
19164
19179
  var innerSub = groupSubject.subscribe(groupSubscriber);
@@ -19167,7 +19182,7 @@ var require_groupBy = __commonJS((exports) => {
19167
19182
  --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe();
19168
19183
  };
19169
19184
  });
19170
- result.key = key2;
19185
+ result.key = key;
19171
19186
  return result;
19172
19187
  }
19173
19188
  });
@@ -21862,7 +21877,7 @@ var require_cjs = __commonJS((exports) => {
21862
21877
  } });
21863
21878
  });
21864
21879
 
21865
- // node_modules/.pnpm/run-async@4.0.5/node_modules/run-async/index.js
21880
+ // node_modules/.pnpm/run-async@4.0.6/node_modules/run-async/index.js
21866
21881
  var require_run_async = __commonJS((exports, module) => {
21867
21882
  function isPromise(obj) {
21868
21883
  return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function";
@@ -22233,8 +22248,8 @@ var require_core = __commonJS((exports, module) => {
22233
22248
  };
22234
22249
  },
22235
22250
  _createHmacHelper: function(hasher) {
22236
- return function(message, key2) {
22237
- return new C_algo.HMAC.init(hasher, key2).finalize(message);
22251
+ return function(message, key) {
22252
+ return new C_algo.HMAC.init(hasher, key).finalize(message);
22238
22253
  };
22239
22254
  }
22240
22255
  });
@@ -22428,8 +22443,8 @@ var require_safe_buffer = __commonJS((exports, module) => {
22428
22443
  var buffer = __require("buffer");
22429
22444
  var Buffer2 = buffer.Buffer;
22430
22445
  function copyProps(src, dst) {
22431
- for (var key2 in src) {
22432
- dst[key2] = src[key2];
22446
+ for (var key in src) {
22447
+ dst[key] = src[key];
22433
22448
  }
22434
22449
  }
22435
22450
  if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) {
@@ -22732,58 +22747,58 @@ var require_jwa = __commonJS((exports, module) => {
22732
22747
  MSG_INVALID_VERIFIER_KEY += " or a KeyObject";
22733
22748
  MSG_INVALID_SECRET += "or a KeyObject";
22734
22749
  }
22735
- function checkIsPublicKey(key2) {
22736
- if (Buffer2.isBuffer(key2)) {
22750
+ function checkIsPublicKey(key) {
22751
+ if (Buffer2.isBuffer(key)) {
22737
22752
  return;
22738
22753
  }
22739
- if (typeof key2 === "string") {
22754
+ if (typeof key === "string") {
22740
22755
  return;
22741
22756
  }
22742
22757
  if (!supportsKeyObjects) {
22743
22758
  throw typeError(MSG_INVALID_VERIFIER_KEY);
22744
22759
  }
22745
- if (typeof key2 !== "object") {
22760
+ if (typeof key !== "object") {
22746
22761
  throw typeError(MSG_INVALID_VERIFIER_KEY);
22747
22762
  }
22748
- if (typeof key2.type !== "string") {
22763
+ if (typeof key.type !== "string") {
22749
22764
  throw typeError(MSG_INVALID_VERIFIER_KEY);
22750
22765
  }
22751
- if (typeof key2.asymmetricKeyType !== "string") {
22766
+ if (typeof key.asymmetricKeyType !== "string") {
22752
22767
  throw typeError(MSG_INVALID_VERIFIER_KEY);
22753
22768
  }
22754
- if (typeof key2.export !== "function") {
22769
+ if (typeof key.export !== "function") {
22755
22770
  throw typeError(MSG_INVALID_VERIFIER_KEY);
22756
22771
  }
22757
22772
  }
22758
- function checkIsPrivateKey(key2) {
22759
- if (Buffer2.isBuffer(key2)) {
22773
+ function checkIsPrivateKey(key) {
22774
+ if (Buffer2.isBuffer(key)) {
22760
22775
  return;
22761
22776
  }
22762
- if (typeof key2 === "string") {
22777
+ if (typeof key === "string") {
22763
22778
  return;
22764
22779
  }
22765
- if (typeof key2 === "object") {
22780
+ if (typeof key === "object") {
22766
22781
  return;
22767
22782
  }
22768
22783
  throw typeError(MSG_INVALID_SIGNER_KEY);
22769
22784
  }
22770
- function checkIsSecretKey(key2) {
22771
- if (Buffer2.isBuffer(key2)) {
22785
+ function checkIsSecretKey(key) {
22786
+ if (Buffer2.isBuffer(key)) {
22772
22787
  return;
22773
22788
  }
22774
- if (typeof key2 === "string") {
22775
- return key2;
22789
+ if (typeof key === "string") {
22790
+ return key;
22776
22791
  }
22777
22792
  if (!supportsKeyObjects) {
22778
22793
  throw typeError(MSG_INVALID_SECRET);
22779
22794
  }
22780
- if (typeof key2 !== "object") {
22795
+ if (typeof key !== "object") {
22781
22796
  throw typeError(MSG_INVALID_SECRET);
22782
22797
  }
22783
- if (key2.type !== "secret") {
22798
+ if (key.type !== "secret") {
22784
22799
  throw typeError(MSG_INVALID_SECRET);
22785
22800
  }
22786
- if (typeof key2.export !== "function") {
22801
+ if (typeof key.export !== "function") {
22787
22802
  throw typeError(MSG_INVALID_SECRET);
22788
22803
  }
22789
22804
  }
@@ -24051,27 +24066,27 @@ var require_lrucache = __commonJS((exports, module) => {
24051
24066
  this.max = 1000;
24052
24067
  this.map = new Map;
24053
24068
  }
24054
- get(key2) {
24055
- const value = this.map.get(key2);
24069
+ get(key) {
24070
+ const value = this.map.get(key);
24056
24071
  if (value === undefined) {
24057
24072
  return;
24058
24073
  } else {
24059
- this.map.delete(key2);
24060
- this.map.set(key2, value);
24074
+ this.map.delete(key);
24075
+ this.map.set(key, value);
24061
24076
  return value;
24062
24077
  }
24063
24078
  }
24064
- delete(key2) {
24065
- return this.map.delete(key2);
24079
+ delete(key) {
24080
+ return this.map.delete(key);
24066
24081
  }
24067
- set(key2, value) {
24068
- const deleted = this.delete(key2);
24082
+ set(key, value) {
24083
+ const deleted = this.delete(key);
24069
24084
  if (!deleted && value !== undefined) {
24070
24085
  if (this.map.size >= this.max) {
24071
24086
  const firstKey = this.map.keys().next().value;
24072
24087
  this.delete(firstKey);
24073
24088
  }
24074
- this.map.set(key2, value);
24089
+ this.map.set(key, value);
24075
24090
  }
24076
24091
  return this;
24077
24092
  }
@@ -25119,10 +25134,10 @@ var require_validateAsymmetricKey = __commonJS((exports, module) => {
25119
25134
  ES384: "secp384r1",
25120
25135
  ES512: "secp521r1"
25121
25136
  };
25122
- module.exports = function(algorithm, key2) {
25123
- if (!algorithm || !key2)
25137
+ module.exports = function(algorithm, key) {
25138
+ if (!algorithm || !key)
25124
25139
  return;
25125
- const keyType = key2.asymmetricKeyType;
25140
+ const keyType = key.asymmetricKeyType;
25126
25141
  if (!keyType)
25127
25142
  return;
25128
25143
  const allowedAlgorithms = allowedAlgorithmsForKeys[keyType];
@@ -25135,7 +25150,7 @@ var require_validateAsymmetricKey = __commonJS((exports, module) => {
25135
25150
  if (ASYMMETRIC_KEY_DETAILS_SUPPORTED) {
25136
25151
  switch (keyType) {
25137
25152
  case "ec":
25138
- const keyCurve = key2.asymmetricKeyDetails.namedCurve;
25153
+ const keyCurve = key.asymmetricKeyDetails.namedCurve;
25139
25154
  const allowedCurve = allowedCurves[algorithm];
25140
25155
  if (keyCurve !== allowedCurve) {
25141
25156
  throw new Error(`"alg" parameter "${algorithm}" requires curve "${allowedCurve}".`);
@@ -25144,7 +25159,7 @@ var require_validateAsymmetricKey = __commonJS((exports, module) => {
25144
25159
  case "rsa-pss":
25145
25160
  if (RSA_PSS_KEY_DETAILS_SUPPORTED) {
25146
25161
  const length = parseInt(algorithm.slice(-3), 10);
25147
- const { hashAlgorithm, mgf1HashAlgorithm, saltLength } = key2.asymmetricKeyDetails;
25162
+ const { hashAlgorithm, mgf1HashAlgorithm, saltLength } = key.asymmetricKeyDetails;
25148
25163
  if (hashAlgorithm !== `sha${length}` || mgf1HashAlgorithm !== hashAlgorithm) {
25149
25164
  throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${algorithm}.`);
25150
25165
  }
@@ -25434,8 +25449,8 @@ var require_lodash = __commonJS((exports, module) => {
25434
25449
  return result;
25435
25450
  }
25436
25451
  function baseValues(object, props) {
25437
- return arrayMap(props, function(key2) {
25438
- return object[key2];
25452
+ return arrayMap(props, function(key) {
25453
+ return object[key];
25439
25454
  });
25440
25455
  }
25441
25456
  function overArg(func, transform) {
@@ -25452,9 +25467,9 @@ var require_lodash = __commonJS((exports, module) => {
25452
25467
  function arrayLikeKeys(value, inherited) {
25453
25468
  var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
25454
25469
  var length = result.length, skipIndexes = !!length;
25455
- for (var key2 in value) {
25456
- if ((inherited || hasOwnProperty.call(value, key2)) && !(skipIndexes && (key2 == "length" || isIndex(key2, length)))) {
25457
- result.push(key2);
25470
+ for (var key in value) {
25471
+ if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) {
25472
+ result.push(key);
25458
25473
  }
25459
25474
  }
25460
25475
  return result;
@@ -25464,9 +25479,9 @@ var require_lodash = __commonJS((exports, module) => {
25464
25479
  return nativeKeys(object);
25465
25480
  }
25466
25481
  var result = [];
25467
- for (var key2 in Object(object)) {
25468
- if (hasOwnProperty.call(object, key2) && key2 != "constructor") {
25469
- result.push(key2);
25482
+ for (var key in Object(object)) {
25483
+ if (hasOwnProperty.call(object, key) && key != "constructor") {
25484
+ result.push(key);
25470
25485
  }
25471
25486
  }
25472
25487
  return result;
@@ -25834,15 +25849,15 @@ var require_sign = __commonJS((exports, module) => {
25834
25849
  if (!isPlainObject2(object)) {
25835
25850
  throw new Error('Expected "' + parameterName + '" to be a plain object.');
25836
25851
  }
25837
- Object.keys(object).forEach(function(key2) {
25838
- const validator = schema[key2];
25852
+ Object.keys(object).forEach(function(key) {
25853
+ const validator = schema[key];
25839
25854
  if (!validator) {
25840
25855
  if (!allowUnknown) {
25841
- throw new Error('"' + key2 + '" is not allowed in "' + parameterName + '"');
25856
+ throw new Error('"' + key + '" is not allowed in "' + parameterName + '"');
25842
25857
  }
25843
25858
  return;
25844
25859
  }
25845
- if (!validator.isValid(object[key2])) {
25860
+ if (!validator.isValid(object[key])) {
25846
25861
  throw new Error(validator.message);
25847
25862
  }
25848
25863
  });
@@ -25974,13 +25989,13 @@ var require_sign = __commonJS((exports, module) => {
25974
25989
  return failure(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));
25975
25990
  }
25976
25991
  }
25977
- Object.keys(options_to_payload).forEach(function(key2) {
25978
- const claim = options_to_payload[key2];
25979
- if (typeof options[key2] !== "undefined") {
25992
+ Object.keys(options_to_payload).forEach(function(key) {
25993
+ const claim = options_to_payload[key];
25994
+ if (typeof options[key] !== "undefined") {
25980
25995
  if (typeof payload[claim] !== "undefined") {
25981
- return failure(new Error('Bad "options.' + key2 + '" option. The payload already has an "' + claim + '" property.'));
25996
+ return failure(new Error('Bad "options.' + key + '" option. The payload already has an "' + claim + '" property.'));
25982
25997
  }
25983
- payload[claim] = options[key2];
25998
+ payload[claim] = options[key];
25984
25999
  }
25985
26000
  });
25986
26001
  const encoding = options.encoding || "utf8";
@@ -26613,8 +26628,8 @@ var require_to_regex_range = __commonJS((exports, module) => {
26613
26628
  function compare(a, b) {
26614
26629
  return a > b ? 1 : b > a ? -1 : 0;
26615
26630
  }
26616
- function contains(arr, key2, val) {
26617
- return arr.some((ele) => ele[key2] === val);
26631
+ function contains(arr, key, val) {
26632
+ return arr.some((ele) => ele[key] === val);
26618
26633
  }
26619
26634
  function countNines(min, len) {
26620
26635
  return Number(String(min).slice(0, -len) + "9".repeat(len));
@@ -28881,8 +28896,8 @@ var require_micromatch = __commonJS((exports, module) => {
28881
28896
  }
28882
28897
  let keys = micromatch(Object.keys(obj), patterns, options);
28883
28898
  let res = {};
28884
- for (let key2 of keys)
28885
- res[key2] = obj[key2];
28899
+ for (let key of keys)
28900
+ res[key] = obj[key];
28886
28901
  return res;
28887
28902
  };
28888
28903
  micromatch.some = (list, patterns, options) => {
@@ -29540,9 +29555,9 @@ var require_run_parallel = __commonJS((exports, module) => {
29540
29555
  if (!pending) {
29541
29556
  done(null);
29542
29557
  } else if (keys) {
29543
- keys.forEach(function(key2) {
29544
- tasks[key2](function(err, result) {
29545
- each(key2, err, result);
29558
+ keys.forEach(function(key) {
29559
+ tasks[key](function(err, result) {
29560
+ each(key, err, result);
29546
29561
  });
29547
29562
  });
29548
29563
  } else {
@@ -40186,9 +40201,9 @@ var require_abort = __commonJS((exports, module) => {
40186
40201
  Object.keys(state.jobs).forEach(clean.bind(state));
40187
40202
  state.jobs = {};
40188
40203
  }
40189
- function clean(key2) {
40190
- if (typeof this.jobs[key2] == "function") {
40191
- this.jobs[key2]();
40204
+ function clean(key) {
40205
+ if (typeof this.jobs[key] == "function") {
40206
+ this.jobs[key]();
40192
40207
  }
40193
40208
  }
40194
40209
  });
@@ -40199,26 +40214,26 @@ var require_iterate = __commonJS((exports, module) => {
40199
40214
  var abort = require_abort();
40200
40215
  module.exports = iterate;
40201
40216
  function iterate(list, iterator, state, callback) {
40202
- var key2 = state["keyedList"] ? state["keyedList"][state.index] : state.index;
40203
- state.jobs[key2] = runJob(iterator, key2, list[key2], function(error, output) {
40204
- if (!(key2 in state.jobs)) {
40217
+ var key = state["keyedList"] ? state["keyedList"][state.index] : state.index;
40218
+ state.jobs[key] = runJob(iterator, key, list[key], function(error, output) {
40219
+ if (!(key in state.jobs)) {
40205
40220
  return;
40206
40221
  }
40207
- delete state.jobs[key2];
40222
+ delete state.jobs[key];
40208
40223
  if (error) {
40209
40224
  abort(state);
40210
40225
  } else {
40211
- state.results[key2] = output;
40226
+ state.results[key] = output;
40212
40227
  }
40213
40228
  callback(error, state.results);
40214
40229
  });
40215
40230
  }
40216
- function runJob(iterator, key2, item, callback) {
40231
+ function runJob(iterator, key, item, callback) {
40217
40232
  var aborter;
40218
40233
  if (iterator.length == 2) {
40219
40234
  aborter = iterator(item, async(callback));
40220
40235
  } else {
40221
- aborter = iterator(item, key2, async(callback));
40236
+ aborter = iterator(item, key, async(callback));
40222
40237
  }
40223
40238
  return aborter;
40224
40239
  }
@@ -41399,8 +41414,8 @@ var require_ignore = __commonJS((exports, module) => {
41399
41414
  TMP_KEY_IGNORE = Symbol.for("node-ignore");
41400
41415
  }
41401
41416
  var KEY_IGNORE = TMP_KEY_IGNORE;
41402
- var define2 = (object, key2, value) => {
41403
- Object.defineProperty(object, key2, { value });
41417
+ var define2 = (object, key, value) => {
41418
+ Object.defineProperty(object, key, { value });
41404
41419
  return value;
41405
41420
  };
41406
41421
  var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g;
@@ -41509,23 +41524,23 @@ var require_ignore = __commonJS((exports, module) => {
41509
41524
  define2(this, "regexPrefix", prefix);
41510
41525
  }
41511
41526
  get regex() {
41512
- const key2 = UNDERSCORE + MODE_IGNORE;
41513
- if (this[key2]) {
41514
- return this[key2];
41527
+ const key = UNDERSCORE + MODE_IGNORE;
41528
+ if (this[key]) {
41529
+ return this[key];
41515
41530
  }
41516
- return this._make(MODE_IGNORE, key2);
41531
+ return this._make(MODE_IGNORE, key);
41517
41532
  }
41518
41533
  get checkRegex() {
41519
- const key2 = UNDERSCORE + MODE_CHECK_IGNORE;
41520
- if (this[key2]) {
41521
- return this[key2];
41534
+ const key = UNDERSCORE + MODE_CHECK_IGNORE;
41535
+ if (this[key]) {
41536
+ return this[key];
41522
41537
  }
41523
- return this._make(MODE_CHECK_IGNORE, key2);
41538
+ return this._make(MODE_CHECK_IGNORE, key);
41524
41539
  }
41525
- _make(mode, key2) {
41540
+ _make(mode, key) {
41526
41541
  const str = this.regexPrefix.replace(REGEX_REPLACE_TRAILING_WILDCARD, TRAILING_WILD_CARD_REPLACERS[mode]);
41527
41542
  const regex = this.ignoreCase ? new RegExp(str, "i") : new RegExp(str);
41528
- return define2(this, key2, regex);
41543
+ return define2(this, key, regex);
41529
41544
  }
41530
41545
  }
41531
41546
  var createRule = ({
@@ -41704,7 +41719,7 @@ var require_ignore = __commonJS((exports, module) => {
41704
41719
  define2(module.exports, Symbol.for("setupWindows"), setupWindows);
41705
41720
  });
41706
41721
 
41707
- // node_modules/.pnpm/commander@14.0.1/node_modules/commander/esm.mjs
41722
+ // node_modules/.pnpm/commander@14.0.2/node_modules/commander/esm.mjs
41708
41723
  var import__ = __toESM(require_commander(), 1);
41709
41724
  var {
41710
41725
  program,
@@ -41724,8 +41739,8 @@ var {
41724
41739
  import fs from "fs";
41725
41740
  var version = "0.0.1";
41726
41741
  try {
41727
- if ("0.0.59")
41728
- version = "0.0.59";
41742
+ if ("0.0.61")
41743
+ version = "0.0.61";
41729
41744
  } catch (e) {}
41730
41745
  program.name("app").description("A CLI tool with envison").version(version, "-V, --version");
41731
41746
  var ls = new Command("ls").description("List files in the current directory").action(() => {
@@ -41770,15 +41785,15 @@ var writeConfig = (config) => {
41770
41785
  return config;
41771
41786
  };
41772
41787
 
41773
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/key.js
41774
- var isUpKey = (key) => key.name === "up";
41775
- var isDownKey = (key) => key.name === "down";
41788
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/key.js
41789
+ var isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
41790
+ var isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
41776
41791
  var isSpaceKey = (key) => key.name === "space";
41777
41792
  var isBackspaceKey = (key) => key.name === "backspace";
41778
41793
  var isTabKey = (key) => key.name === "tab";
41779
41794
  var isNumberKey = (key) => "1234567890".includes(key.name);
41780
41795
  var isEnterKey = (key) => key.name === "enter" || key.name === "return";
41781
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/errors.js
41796
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/errors.js
41782
41797
  class AbortPromptError extends Error {
41783
41798
  name = "AbortPromptError";
41784
41799
  message = "Prompt was aborted";
@@ -41804,10 +41819,10 @@ class HookError extends Error {
41804
41819
  class ValidationError extends Error {
41805
41820
  name = "ValidationError";
41806
41821
  }
41807
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/use-state.js
41822
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/use-state.js
41808
41823
  import { AsyncResource as AsyncResource2 } from "node:async_hooks";
41809
41824
 
41810
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
41825
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
41811
41826
  import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
41812
41827
  var hookStorage = new AsyncLocalStorage;
41813
41828
  function createStore(rl) {
@@ -41912,7 +41927,7 @@ var effectScheduler = {
41912
41927
  }
41913
41928
  };
41914
41929
 
41915
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/use-state.js
41930
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/use-state.js
41916
41931
  function useState(defaultValue) {
41917
41932
  return withPointer((pointer) => {
41918
41933
  const setState = AsyncResource2.bind(function setState(newValue) {
@@ -41930,7 +41945,7 @@ function useState(defaultValue) {
41930
41945
  });
41931
41946
  }
41932
41947
 
41933
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
41948
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
41934
41949
  function useEffect(cb, depArray) {
41935
41950
  withPointer((pointer) => {
41936
41951
  const oldDeps = pointer.get();
@@ -41942,10 +41957,10 @@ function useEffect(cb, depArray) {
41942
41957
  });
41943
41958
  }
41944
41959
 
41945
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/theme.js
41960
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/theme.js
41946
41961
  var import_yoctocolors_cjs = __toESM(require_yoctocolors_cjs(), 1);
41947
41962
 
41948
- // node_modules/.pnpm/@inquirer+figures@1.0.13/node_modules/@inquirer/figures/dist/esm/index.js
41963
+ // node_modules/.pnpm/@inquirer+figures@1.0.15/node_modules/@inquirer/figures/dist/esm/index.js
41949
41964
  import process2 from "node:process";
41950
41965
  function isUnicodeSupported() {
41951
41966
  if (process2.platform !== "win32") {
@@ -42221,7 +42236,10 @@ var specialFallbackSymbols = {
42221
42236
  oneNinth: "1/9",
42222
42237
  oneTenth: "1/10"
42223
42238
  };
42224
- var mainSymbols = { ...common, ...specialMainSymbols };
42239
+ var mainSymbols = {
42240
+ ...common,
42241
+ ...specialMainSymbols
42242
+ };
42225
42243
  var fallbackSymbols = {
42226
42244
  ...common,
42227
42245
  ...specialFallbackSymbols
@@ -42231,7 +42249,7 @@ var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
42231
42249
  var esm_default = figures;
42232
42250
  var replacements = Object.entries(specialMainSymbols);
42233
42251
 
42234
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/theme.js
42252
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/theme.js
42235
42253
  var defaultTheme = {
42236
42254
  prefix: {
42237
42255
  idle: import_yoctocolors_cjs.default.blue("?"),
@@ -42252,7 +42270,7 @@ var defaultTheme = {
42252
42270
  }
42253
42271
  };
42254
42272
 
42255
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
42273
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
42256
42274
  function isPlainObject(value) {
42257
42275
  if (typeof value !== "object" || value === null)
42258
42276
  return false;
@@ -42280,7 +42298,7 @@ function makeTheme(...themes) {
42280
42298
  return deepMerge(...themesToMerge);
42281
42299
  }
42282
42300
 
42283
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
42301
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
42284
42302
  function usePrefix({ status = "idle", theme }) {
42285
42303
  const [showLoader, setShowLoader] = useState(false);
42286
42304
  const [tick, setTick] = useState(0);
@@ -42310,7 +42328,7 @@ function usePrefix({ status = "idle", theme }) {
42310
42328
  const iconName = status === "loading" ? "idle" : status;
42311
42329
  return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
42312
42330
  }
42313
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
42331
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
42314
42332
  function useMemo(fn, dependencies) {
42315
42333
  return withPointer((pointer) => {
42316
42334
  const prev = pointer.get();
@@ -42322,11 +42340,11 @@ function useMemo(fn, dependencies) {
42322
42340
  return prev.value;
42323
42341
  });
42324
42342
  }
42325
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
42343
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
42326
42344
  function useRef(val) {
42327
42345
  return useState({ current: val })[0];
42328
42346
  }
42329
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
42347
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
42330
42348
  function useKeypress(userHandler) {
42331
42349
  const signal = useRef(userHandler);
42332
42350
  signal.current = userHandler;
@@ -42344,7 +42362,7 @@ function useKeypress(userHandler) {
42344
42362
  };
42345
42363
  }, []);
42346
42364
  }
42347
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/utils.js
42365
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/utils.js
42348
42366
  var import_cli_width = __toESM(require_cli_width(), 1);
42349
42367
  var import_wrap_ansi = __toESM(require_wrap_ansi(), 1);
42350
42368
  function breakLines(content, width) {
@@ -42357,7 +42375,7 @@ function readlineWidth() {
42357
42375
  return import_cli_width.default({ defaultWidth: 80, output: readline().output });
42358
42376
  }
42359
42377
 
42360
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
42378
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
42361
42379
  function usePointerPosition({ active, renderedItems, pageSize, loop }) {
42362
42380
  const state = useRef({
42363
42381
  lastPointer: active,
@@ -42423,7 +42441,7 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
42423
42441
  return pageBuffer.filter((line) => typeof line === "string").join(`
42424
42442
  `);
42425
42443
  }
42426
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
42444
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
42427
42445
  var import_mute_stream = __toESM(require_lib(), 1);
42428
42446
  import * as readline2 from "node:readline";
42429
42447
  import { AsyncResource as AsyncResource3 } from "node:async_hooks";
@@ -42636,10 +42654,10 @@ var {
42636
42654
  unload
42637
42655
  } = signalExitWrap(processOk(process3) ? new SignalExit(process3) : new SignalExitFallback);
42638
42656
 
42639
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
42657
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
42640
42658
  import { stripVTControlCharacters } from "node:util";
42641
42659
 
42642
- // node_modules/.pnpm/@inquirer+ansi@1.0.0/node_modules/@inquirer/ansi/dist/esm/index.js
42660
+ // node_modules/.pnpm/@inquirer+ansi@1.0.2/node_modules/@inquirer/ansi/dist/esm/index.js
42643
42661
  var ESC = "\x1B[";
42644
42662
  var cursorLeft = ESC + "G";
42645
42663
  var cursorHide = ESC + "?25l";
@@ -42655,7 +42673,7 @@ var cursorTo = (x, y) => {
42655
42673
  var eraseLine = ESC + "2K";
42656
42674
  var eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + eraseLine + cursorLeft : "";
42657
42675
 
42658
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
42676
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
42659
42677
  var height = (content) => content.split(`
42660
42678
  `).length;
42661
42679
  var lastLine = (content) => content.split(`
@@ -42720,7 +42738,7 @@ class ScreenManager {
42720
42738
  }
42721
42739
  }
42722
42740
 
42723
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
42741
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
42724
42742
  class PromisePolyfill extends Promise {
42725
42743
  static withResolver() {
42726
42744
  let resolve;
@@ -42733,7 +42751,7 @@ class PromisePolyfill extends Promise {
42733
42751
  }
42734
42752
  }
42735
42753
 
42736
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
42754
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
42737
42755
  function getCallSites() {
42738
42756
  const _prepareStackTrace = Error.prepareStackTrace;
42739
42757
  let result = [];
@@ -42819,7 +42837,7 @@ function createPrompt(view) {
42819
42837
  };
42820
42838
  return prompt;
42821
42839
  }
42822
- // node_modules/.pnpm/@inquirer+core@10.2.2_@types+node@24.7.2/node_modules/@inquirer/core/dist/esm/lib/Separator.js
42840
+ // node_modules/.pnpm/@inquirer+core@10.3.1_@types+node@24.10.0/node_modules/@inquirer/core/dist/esm/lib/Separator.js
42823
42841
  var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
42824
42842
  class Separator {
42825
42843
  separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
@@ -42833,7 +42851,7 @@ class Separator {
42833
42851
  return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
42834
42852
  }
42835
42853
  }
42836
- // node_modules/.pnpm/@inquirer+checkbox@4.2.4_@types+node@24.7.2/node_modules/@inquirer/checkbox/dist/esm/index.js
42854
+ // node_modules/.pnpm/@inquirer+checkbox@4.3.1_@types+node@24.10.0/node_modules/@inquirer/checkbox/dist/esm/index.js
42837
42855
  var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
42838
42856
  var checkboxTheme = {
42839
42857
  icon: {
@@ -42844,9 +42862,11 @@ var checkboxTheme = {
42844
42862
  style: {
42845
42863
  disabledChoice: (text) => import_yoctocolors_cjs3.default.dim(`- ${text}`),
42846
42864
  renderSelectedChoices: (selectedChoices) => selectedChoices.map((choice) => choice.short).join(", "),
42847
- description: (text) => import_yoctocolors_cjs3.default.cyan(text)
42865
+ description: (text) => import_yoctocolors_cjs3.default.cyan(text),
42866
+ keysHelpTip: (keys) => keys.map(([key, action]) => `${import_yoctocolors_cjs3.default.bold(key)} ${import_yoctocolors_cjs3.default.dim(action)}`).join(import_yoctocolors_cjs3.default.dim(" • "))
42848
42867
  },
42849
- helpMode: "auto"
42868
+ helpMode: "always",
42869
+ keybindings: []
42850
42870
  };
42851
42871
  function isSelectable(item) {
42852
42872
  return !Separator.isSeparator(item) && !item.disabled;
@@ -42871,6 +42891,7 @@ function normalizeChoices(choices) {
42871
42891
  value: choice,
42872
42892
  name: choice,
42873
42893
  short: choice,
42894
+ checkedName: choice,
42874
42895
  disabled: false,
42875
42896
  checked: false
42876
42897
  };
@@ -42880,6 +42901,7 @@ function normalizeChoices(choices) {
42880
42901
  value: choice.value,
42881
42902
  name,
42882
42903
  short: choice.short ?? name,
42904
+ checkedName: choice.checkedName ?? name,
42883
42905
  disabled: choice.disabled ?? false,
42884
42906
  checked: choice.checked ?? false
42885
42907
  };
@@ -42890,10 +42912,16 @@ function normalizeChoices(choices) {
42890
42912
  });
42891
42913
  }
42892
42914
  var esm_default2 = createPrompt((config, done) => {
42893
- const { instructions, pageSize = 7, loop = true, required, validate = () => true } = config;
42915
+ const {
42916
+ instructions,
42917
+ pageSize = 7,
42918
+ loop = true,
42919
+ required,
42920
+ validate = () => true
42921
+ } = config;
42894
42922
  const shortcuts = { all: "a", invert: "i", ...config.shortcuts };
42895
42923
  const theme = makeTheme(checkboxTheme, config.theme);
42896
- const firstRender = useRef(true);
42924
+ const { keybindings } = theme;
42897
42925
  const [status, setStatus] = useState("idle");
42898
42926
  const prefix = usePrefix({ status, theme });
42899
42927
  const [items, setItems] = useState(normalizeChoices(config.choices));
@@ -42906,10 +42934,9 @@ var esm_default2 = createPrompt((config, done) => {
42906
42934
  return { first, last };
42907
42935
  }, [items]);
42908
42936
  const [active, setActive] = useState(bounds.first);
42909
- const [showHelpTip, setShowHelpTip] = useState(true);
42910
42937
  const [errorMsg, setError] = useState();
42911
- useKeypress(async (key2) => {
42912
- if (isEnterKey(key2)) {
42938
+ useKeypress(async (key) => {
42939
+ if (isEnterKey(key)) {
42913
42940
  const selection = items.filter(isChecked);
42914
42941
  const isValid = await validate([...selection]);
42915
42942
  if (required && !items.some(isChecked)) {
@@ -42920,26 +42947,25 @@ var esm_default2 = createPrompt((config, done) => {
42920
42947
  } else {
42921
42948
  setError(isValid || "You must select a valid value");
42922
42949
  }
42923
- } else if (isUpKey(key2) || isDownKey(key2)) {
42924
- if (loop || isUpKey(key2) && active !== bounds.first || isDownKey(key2) && active !== bounds.last) {
42925
- const offset = isUpKey(key2) ? -1 : 1;
42950
+ } else if (isUpKey(key, keybindings) || isDownKey(key, keybindings)) {
42951
+ if (loop || isUpKey(key, keybindings) && active !== bounds.first || isDownKey(key, keybindings) && active !== bounds.last) {
42952
+ const offset = isUpKey(key, keybindings) ? -1 : 1;
42926
42953
  let next = active;
42927
42954
  do {
42928
42955
  next = (next + offset + items.length) % items.length;
42929
42956
  } while (!isSelectable(items[next]));
42930
42957
  setActive(next);
42931
42958
  }
42932
- } else if (isSpaceKey(key2)) {
42959
+ } else if (isSpaceKey(key)) {
42933
42960
  setError(undefined);
42934
- setShowHelpTip(false);
42935
42961
  setItems(items.map((choice, i) => i === active ? toggle(choice) : choice));
42936
- } else if (key2.name === shortcuts.all) {
42962
+ } else if (key.name === shortcuts.all) {
42937
42963
  const selectAll = items.some((choice) => isSelectable(choice) && !choice.checked);
42938
42964
  setItems(items.map(check(selectAll)));
42939
- } else if (key2.name === shortcuts.invert) {
42965
+ } else if (key.name === shortcuts.invert) {
42940
42966
  setItems(items.map(toggle));
42941
- } else if (isNumberKey(key2)) {
42942
- const selectedIndex = Number(key2.name) - 1;
42967
+ } else if (isNumberKey(key)) {
42968
+ const selectedIndex = Number(key.name) - 1;
42943
42969
  let selectableIndex = -1;
42944
42970
  const position = items.findIndex((item) => {
42945
42971
  if (Separator.isSeparator(item))
@@ -42971,9 +42997,10 @@ var esm_default2 = createPrompt((config, done) => {
42971
42997
  description = item.description;
42972
42998
  }
42973
42999
  const checkbox = item.checked ? theme.icon.checked : theme.icon.unchecked;
43000
+ const name = item.checked ? item.checkedName : item.name;
42974
43001
  const color = isActive ? theme.style.highlight : (x) => x;
42975
43002
  const cursor = isActive ? theme.icon.cursor : " ";
42976
- return color(`${cursor}${checkbox} ${item.name}`);
43003
+ return color(`${cursor}${checkbox} ${name}`);
42977
43004
  },
42978
43005
  pageSize,
42979
43006
  loop
@@ -42981,39 +43008,37 @@ var esm_default2 = createPrompt((config, done) => {
42981
43008
  if (status === "done") {
42982
43009
  const selection = items.filter(isChecked);
42983
43010
  const answer = theme.style.answer(theme.style.renderSelectedChoices(selection, items));
42984
- return `${prefix} ${message} ${answer}`;
43011
+ return [prefix, message, answer].filter(Boolean).join(" ");
42985
43012
  }
42986
- let helpTipTop = "";
42987
- let helpTipBottom = "";
42988
- if (theme.helpMode === "always" || theme.helpMode === "auto" && showHelpTip && (instructions === undefined || instructions)) {
43013
+ let helpLine;
43014
+ if (theme.helpMode !== "never" && instructions !== false) {
42989
43015
  if (typeof instructions === "string") {
42990
- helpTipTop = instructions;
43016
+ helpLine = instructions;
42991
43017
  } else {
42992
43018
  const keys = [
42993
- `${theme.style.key("space")} to select`,
42994
- shortcuts.all ? `${theme.style.key(shortcuts.all)} to toggle all` : "",
42995
- shortcuts.invert ? `${theme.style.key(shortcuts.invert)} to invert selection` : "",
42996
- `and ${theme.style.key("enter")} to proceed`
43019
+ ["↑↓", "navigate"],
43020
+ ["space", "select"]
42997
43021
  ];
42998
- helpTipTop = ` (Press ${keys.filter((key2) => key2 !== "").join(", ")})`;
42999
- }
43000
- if (items.length > pageSize && (theme.helpMode === "always" || theme.helpMode === "auto" && firstRender.current)) {
43001
- helpTipBottom = `
43002
- ${theme.style.help("(Use arrow keys to reveal more choices)")}`;
43003
- firstRender.current = false;
43004
- }
43005
- }
43006
- const choiceDescription = description ? `
43007
- ${theme.style.description(description)}` : ``;
43008
- let error = "";
43009
- if (errorMsg) {
43010
- error = `
43011
- ${theme.style.error(errorMsg)}`;
43012
- }
43013
- return `${prefix} ${message}${helpTipTop}
43014
- ${page}${helpTipBottom}${choiceDescription}${error}${cursorHide}`;
43015
- });
43016
- // node_modules/.pnpm/@inquirer+external-editor@1.0.2_@types+node@24.7.2/node_modules/@inquirer/external-editor/dist/esm/index.js
43022
+ if (shortcuts.all)
43023
+ keys.push([shortcuts.all, "all"]);
43024
+ if (shortcuts.invert)
43025
+ keys.push([shortcuts.invert, "invert"]);
43026
+ keys.push(["⏎", "submit"]);
43027
+ helpLine = theme.style.keysHelpTip(keys);
43028
+ }
43029
+ }
43030
+ const lines = [
43031
+ [prefix, message].filter(Boolean).join(" "),
43032
+ page,
43033
+ " ",
43034
+ description ? theme.style.description(description) : "",
43035
+ errorMsg ? theme.style.error(errorMsg) : "",
43036
+ helpLine
43037
+ ].filter(Boolean).join(`
43038
+ `).trimEnd();
43039
+ return `${lines}${cursorHide}`;
43040
+ });
43041
+ // node_modules/.pnpm/@inquirer+external-editor@1.0.3_@types+node@24.10.0/node_modules/@inquirer/external-editor/dist/esm/index.js
43017
43042
  var import_chardet = __toESM(require_lib2(), 1);
43018
43043
  var import_iconv_lite = __toESM(require_lib3(), 1);
43019
43044
  import { spawn, spawnSync } from "child_process";
@@ -43022,7 +43047,7 @@ import path2 from "node:path";
43022
43047
  import os2 from "node:os";
43023
43048
  import { randomUUID } from "node:crypto";
43024
43049
 
43025
- // node_modules/.pnpm/@inquirer+external-editor@1.0.2_@types+node@24.7.2/node_modules/@inquirer/external-editor/dist/esm/errors/CreateFileError.js
43050
+ // node_modules/.pnpm/@inquirer+external-editor@1.0.3_@types+node@24.10.0/node_modules/@inquirer/external-editor/dist/esm/errors/CreateFileError.js
43026
43051
  class CreateFileError extends Error {
43027
43052
  originalError;
43028
43053
  constructor(originalError) {
@@ -43031,7 +43056,7 @@ class CreateFileError extends Error {
43031
43056
  }
43032
43057
  }
43033
43058
 
43034
- // node_modules/.pnpm/@inquirer+external-editor@1.0.2_@types+node@24.7.2/node_modules/@inquirer/external-editor/dist/esm/errors/LaunchEditorError.js
43059
+ // node_modules/.pnpm/@inquirer+external-editor@1.0.3_@types+node@24.10.0/node_modules/@inquirer/external-editor/dist/esm/errors/LaunchEditorError.js
43035
43060
  class LaunchEditorError extends Error {
43036
43061
  originalError;
43037
43062
  constructor(originalError) {
@@ -43040,7 +43065,7 @@ class LaunchEditorError extends Error {
43040
43065
  }
43041
43066
  }
43042
43067
 
43043
- // node_modules/.pnpm/@inquirer+external-editor@1.0.2_@types+node@24.7.2/node_modules/@inquirer/external-editor/dist/esm/errors/ReadFileError.js
43068
+ // node_modules/.pnpm/@inquirer+external-editor@1.0.3_@types+node@24.10.0/node_modules/@inquirer/external-editor/dist/esm/errors/ReadFileError.js
43044
43069
  class ReadFileError extends Error {
43045
43070
  originalError;
43046
43071
  constructor(originalError) {
@@ -43049,7 +43074,7 @@ class ReadFileError extends Error {
43049
43074
  }
43050
43075
  }
43051
43076
 
43052
- // node_modules/.pnpm/@inquirer+external-editor@1.0.2_@types+node@24.7.2/node_modules/@inquirer/external-editor/dist/esm/errors/RemoveFileError.js
43077
+ // node_modules/.pnpm/@inquirer+external-editor@1.0.3_@types+node@24.10.0/node_modules/@inquirer/external-editor/dist/esm/errors/RemoveFileError.js
43053
43078
  class RemoveFileError extends Error {
43054
43079
  originalError;
43055
43080
  constructor(originalError) {
@@ -43058,7 +43083,7 @@ class RemoveFileError extends Error {
43058
43083
  }
43059
43084
  }
43060
43085
 
43061
- // node_modules/.pnpm/@inquirer+external-editor@1.0.2_@types+node@24.7.2/node_modules/@inquirer/external-editor/dist/esm/index.js
43086
+ // node_modules/.pnpm/@inquirer+external-editor@1.0.3_@types+node@24.10.0/node_modules/@inquirer/external-editor/dist/esm/index.js
43062
43087
  function editAsync(text = "", callback, fileOptions) {
43063
43088
  const editor = new ExternalEditor(text, fileOptions);
43064
43089
  editor.runAsync((err, result) => {
@@ -43213,12 +43238,12 @@ class ExternalEditor {
43213
43238
  }
43214
43239
  }
43215
43240
 
43216
- // node_modules/.pnpm/@inquirer+editor@4.2.20_@types+node@24.7.2/node_modules/@inquirer/editor/dist/esm/index.js
43241
+ // node_modules/.pnpm/@inquirer+editor@4.2.22_@types+node@24.10.0/node_modules/@inquirer/editor/dist/esm/index.js
43217
43242
  var editorTheme = {
43218
43243
  validationFailureMode: "keep"
43219
43244
  };
43220
43245
  var esm_default3 = createPrompt((config, done) => {
43221
- const { waitForUseInput = true, file: { postfix = config.postfix ?? ".txt", ...fileProps } = {}, validate = () => true } = config;
43246
+ const { waitForUserInput = true, file: { postfix = config.postfix ?? ".txt", ...fileProps } = {}, validate = () => true } = config;
43222
43247
  const theme = makeTheme(editorTheme, config.theme);
43223
43248
  const [status, setStatus] = useState("idle");
43224
43249
  const [value = "", setValue] = useState(config.default);
@@ -43255,15 +43280,15 @@ var esm_default3 = createPrompt((config, done) => {
43255
43280
  });
43256
43281
  }
43257
43282
  useEffect((rl) => {
43258
- if (!waitForUseInput) {
43283
+ if (!waitForUserInput) {
43259
43284
  startEditor(rl);
43260
43285
  }
43261
43286
  }, []);
43262
- useKeypress((key2, rl) => {
43287
+ useKeypress((key, rl) => {
43263
43288
  if (status !== "idle") {
43264
43289
  return;
43265
43290
  }
43266
- if (isEnterKey(key2)) {
43291
+ if (isEnterKey(key)) {
43267
43292
  startEditor(rl);
43268
43293
  }
43269
43294
  });
@@ -43281,7 +43306,7 @@ var esm_default3 = createPrompt((config, done) => {
43281
43306
  }
43282
43307
  return [[prefix, message, helpTip].filter(Boolean).join(" "), error];
43283
43308
  });
43284
- // node_modules/.pnpm/@inquirer+confirm@5.1.18_@types+node@24.7.2/node_modules/@inquirer/confirm/dist/esm/index.js
43309
+ // node_modules/.pnpm/@inquirer+confirm@5.1.20_@types+node@24.10.0/node_modules/@inquirer/confirm/dist/esm/index.js
43285
43310
  function getBooleanValue(value, defaultValue) {
43286
43311
  let answer = defaultValue !== false;
43287
43312
  if (/^(y|yes)/i.test(value))
@@ -43299,15 +43324,15 @@ var esm_default4 = createPrompt((config, done) => {
43299
43324
  const [value, setValue] = useState("");
43300
43325
  const theme = makeTheme(config.theme);
43301
43326
  const prefix = usePrefix({ status, theme });
43302
- useKeypress((key2, rl) => {
43327
+ useKeypress((key, rl) => {
43303
43328
  if (status !== "idle")
43304
43329
  return;
43305
- if (isEnterKey(key2)) {
43330
+ if (isEnterKey(key)) {
43306
43331
  const answer = getBooleanValue(value, config.default);
43307
43332
  setValue(transformer(answer));
43308
43333
  setStatus("done");
43309
43334
  done(answer);
43310
- } else if (isTabKey(key2)) {
43335
+ } else if (isTabKey(key)) {
43311
43336
  const answer = boolToString(!getBooleanValue(value, config.default));
43312
43337
  rl.clearLine(0);
43313
43338
  rl.write(answer);
@@ -43326,26 +43351,39 @@ var esm_default4 = createPrompt((config, done) => {
43326
43351
  const message = theme.style.message(config.message, status);
43327
43352
  return `${prefix} ${message}${defaultValue} ${formattedValue}`;
43328
43353
  });
43329
- // node_modules/.pnpm/@inquirer+input@4.2.4_@types+node@24.7.2/node_modules/@inquirer/input/dist/esm/index.js
43354
+ // node_modules/.pnpm/@inquirer+input@4.3.0_@types+node@24.10.0/node_modules/@inquirer/input/dist/esm/index.js
43330
43355
  var inputTheme = {
43331
43356
  validationFailureMode: "keep"
43332
43357
  };
43333
43358
  var esm_default5 = createPrompt((config, done) => {
43334
- const { required, validate = () => true, prefill = "tab" } = config;
43359
+ const { prefill = "tab" } = config;
43335
43360
  const theme = makeTheme(inputTheme, config.theme);
43336
43361
  const [status, setStatus] = useState("idle");
43337
43362
  const [defaultValue = "", setDefaultValue] = useState(config.default);
43338
43363
  const [errorMsg, setError] = useState();
43339
43364
  const [value, setValue] = useState("");
43340
43365
  const prefix = usePrefix({ status, theme });
43341
- useKeypress(async (key2, rl) => {
43366
+ async function validate(value2) {
43367
+ const { required, pattern, patternError = "Invalid input" } = config;
43368
+ if (required && !value2) {
43369
+ return "You must provide a value";
43370
+ }
43371
+ if (pattern && !pattern.test(value2)) {
43372
+ return patternError;
43373
+ }
43374
+ if (typeof config.validate === "function") {
43375
+ return await config.validate(value2) || "You must provide a valid value";
43376
+ }
43377
+ return true;
43378
+ }
43379
+ useKeypress(async (key, rl) => {
43342
43380
  if (status !== "idle") {
43343
43381
  return;
43344
43382
  }
43345
- if (isEnterKey(key2)) {
43383
+ if (isEnterKey(key)) {
43346
43384
  const answer = value || defaultValue;
43347
43385
  setStatus("loading");
43348
- const isValid = required && !answer ? "You must provide a value" : await validate(answer);
43386
+ const isValid = await validate(answer);
43349
43387
  if (isValid === true) {
43350
43388
  setValue(answer);
43351
43389
  setStatus("done");
@@ -43356,12 +43394,12 @@ var esm_default5 = createPrompt((config, done) => {
43356
43394
  } else {
43357
43395
  rl.write(value);
43358
43396
  }
43359
- setError(isValid || "You must provide a valid value");
43397
+ setError(isValid);
43360
43398
  setStatus("idle");
43361
43399
  }
43362
- } else if (isBackspaceKey(key2) && !value) {
43400
+ } else if (isBackspaceKey(key) && !value) {
43363
43401
  setDefaultValue(undefined);
43364
- } else if (isTabKey(key2) && !value) {
43402
+ } else if (isTabKey(key) && !value) {
43365
43403
  setDefaultValue(undefined);
43366
43404
  rl.clearLine(0);
43367
43405
  rl.write(defaultValue);
@@ -43397,7 +43435,7 @@ var esm_default5 = createPrompt((config, done) => {
43397
43435
  error
43398
43436
  ];
43399
43437
  });
43400
- // node_modules/.pnpm/@inquirer+number@3.0.20_@types+node@24.7.2/node_modules/@inquirer/number/dist/esm/index.js
43438
+ // node_modules/.pnpm/@inquirer+number@3.0.22_@types+node@24.10.0/node_modules/@inquirer/number/dist/esm/index.js
43401
43439
  function isStepOf(value, step, min) {
43402
43440
  const valuePow = value * Math.pow(10, 6);
43403
43441
  const stepPow = step * Math.pow(10, 6);
@@ -43423,11 +43461,11 @@ var esm_default6 = createPrompt((config, done) => {
43423
43461
  const [defaultValue = "", setDefaultValue] = useState(validDefault);
43424
43462
  const [errorMsg, setError] = useState();
43425
43463
  const prefix = usePrefix({ status, theme });
43426
- useKeypress(async (key2, rl) => {
43464
+ useKeypress(async (key, rl) => {
43427
43465
  if (status !== "idle") {
43428
43466
  return;
43429
43467
  }
43430
- if (isEnterKey(key2)) {
43468
+ if (isEnterKey(key)) {
43431
43469
  const input = value || defaultValue;
43432
43470
  const answer = input === "" ? undefined : Number(input);
43433
43471
  setStatus("loading");
@@ -43447,9 +43485,9 @@ var esm_default6 = createPrompt((config, done) => {
43447
43485
  setError(isValid || "You must provide a valid numeric value");
43448
43486
  setStatus("idle");
43449
43487
  }
43450
- } else if (isBackspaceKey(key2) && !value) {
43488
+ } else if (isBackspaceKey(key) && !value) {
43451
43489
  setDefaultValue(undefined);
43452
- } else if (isTabKey(key2) && !value) {
43490
+ } else if (isTabKey(key) && !value) {
43453
43491
  setDefaultValue(undefined);
43454
43492
  rl.clearLine(0);
43455
43493
  rl.write(defaultValue);
@@ -43477,7 +43515,7 @@ var esm_default6 = createPrompt((config, done) => {
43477
43515
  error
43478
43516
  ];
43479
43517
  });
43480
- // node_modules/.pnpm/@inquirer+expand@4.0.20_@types+node@24.7.2/node_modules/@inquirer/expand/dist/esm/index.js
43518
+ // node_modules/.pnpm/@inquirer+expand@4.0.22_@types+node@24.10.0/node_modules/@inquirer/expand/dist/esm/index.js
43481
43519
  var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
43482
43520
  function normalizeChoices2(choices) {
43483
43521
  return choices.map((choice) => {
@@ -43574,7 +43612,7 @@ var esm_default7 = createPrompt((config, done) => {
43574
43612
  `)
43575
43613
  ];
43576
43614
  });
43577
- // node_modules/.pnpm/@inquirer+rawlist@4.1.8_@types+node@24.7.2/node_modules/@inquirer/rawlist/dist/esm/index.js
43615
+ // node_modules/.pnpm/@inquirer+rawlist@4.1.10_@types+node@24.10.0/node_modules/@inquirer/rawlist/dist/esm/index.js
43578
43616
  var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
43579
43617
  var numberRegex = /\d+/;
43580
43618
  function isSelectableChoice(choice) {
@@ -43629,8 +43667,8 @@ var esm_default8 = createPrompt((config, done) => {
43629
43667
  }
43630
43668
  return { first, last };
43631
43669
  }, [choices]);
43632
- useKeypress((key2, rl) => {
43633
- if (isEnterKey(key2)) {
43670
+ useKeypress((key, rl) => {
43671
+ if (isEnterKey(key)) {
43634
43672
  const [selectedChoice] = getSelectedChoice(value, choices);
43635
43673
  if (isSelectableChoice(selectedChoice)) {
43636
43674
  setValue(selectedChoice.short);
@@ -43641,14 +43679,14 @@ var esm_default8 = createPrompt((config, done) => {
43641
43679
  } else {
43642
43680
  setError(`"${import_yoctocolors_cjs5.default.red(value)}" isn't an available option`);
43643
43681
  }
43644
- } else if (isUpKey(key2) || isDownKey(key2)) {
43682
+ } else if (isUpKey(key) || isDownKey(key)) {
43645
43683
  rl.clearLine(0);
43646
43684
  const [selectedChoice, active] = getSelectedChoice(value, choices);
43647
43685
  if (!selectedChoice) {
43648
- const firstChoice = isDownKey(key2) ? choices.find(isSelectableChoice) : choices.findLast(isSelectableChoice);
43686
+ const firstChoice = isDownKey(key) ? choices.find(isSelectableChoice) : choices.findLast(isSelectableChoice);
43649
43687
  setValue(firstChoice.key);
43650
- } else if (loop || isUpKey(key2) && active !== bounds.first || isDownKey(key2) && active !== bounds.last) {
43651
- const offset = isUpKey(key2) ? -1 : 1;
43688
+ } else if (loop || isUpKey(key) && active !== bounds.first || isDownKey(key) && active !== bounds.last) {
43689
+ const offset = isUpKey(key) ? -1 : 1;
43652
43690
  let next = active;
43653
43691
  do {
43654
43692
  next = (next + offset + choices.length) % choices.length;
@@ -43685,7 +43723,7 @@ var esm_default8 = createPrompt((config, done) => {
43685
43723
  `)
43686
43724
  ];
43687
43725
  });
43688
- // node_modules/.pnpm/@inquirer+password@4.0.20_@types+node@24.7.2/node_modules/@inquirer/password/dist/esm/index.js
43726
+ // node_modules/.pnpm/@inquirer+password@4.0.22_@types+node@24.10.0/node_modules/@inquirer/password/dist/esm/index.js
43689
43727
  var esm_default9 = createPrompt((config, done) => {
43690
43728
  const { validate = () => true } = config;
43691
43729
  const theme = makeTheme(config.theme);
@@ -43693,11 +43731,11 @@ var esm_default9 = createPrompt((config, done) => {
43693
43731
  const [errorMsg, setError] = useState();
43694
43732
  const [value, setValue] = useState("");
43695
43733
  const prefix = usePrefix({ status, theme });
43696
- useKeypress(async (key2, rl) => {
43734
+ useKeypress(async (key, rl) => {
43697
43735
  if (status !== "idle") {
43698
43736
  return;
43699
43737
  }
43700
- if (isEnterKey(key2)) {
43738
+ if (isEnterKey(key)) {
43701
43739
  const answer = value;
43702
43740
  setStatus("loading");
43703
43741
  const isValid = await validate(answer);
@@ -43733,16 +43771,17 @@ var esm_default9 = createPrompt((config, done) => {
43733
43771
  }
43734
43772
  return [[prefix, message, config.mask ? formattedValue : helpTip].join(" "), error];
43735
43773
  });
43736
- // node_modules/.pnpm/@inquirer+search@3.1.3_@types+node@24.7.2/node_modules/@inquirer/search/dist/esm/index.js
43774
+ // node_modules/.pnpm/@inquirer+search@3.2.1_@types+node@24.10.0/node_modules/@inquirer/search/dist/esm/index.js
43737
43775
  var import_yoctocolors_cjs6 = __toESM(require_yoctocolors_cjs(), 1);
43738
43776
  var searchTheme = {
43739
43777
  icon: { cursor: esm_default.pointer },
43740
43778
  style: {
43741
43779
  disabled: (text) => import_yoctocolors_cjs6.default.dim(`- ${text}`),
43742
43780
  searchTerm: (text) => import_yoctocolors_cjs6.default.cyan(text),
43743
- description: (text) => import_yoctocolors_cjs6.default.cyan(text)
43781
+ description: (text) => import_yoctocolors_cjs6.default.cyan(text),
43782
+ keysHelpTip: (keys) => keys.map(([key, action]) => `${import_yoctocolors_cjs6.default.bold(key)} ${import_yoctocolors_cjs6.default.dim(action)}`).join(import_yoctocolors_cjs6.default.dim(" • "))
43744
43783
  },
43745
- helpMode: "auto"
43784
+ helpMode: "always"
43746
43785
  };
43747
43786
  function isSelectable2(item) {
43748
43787
  return !Separator.isSeparator(item) && !item.disabled;
@@ -43775,7 +43814,6 @@ function normalizeChoices4(choices) {
43775
43814
  var esm_default10 = createPrompt((config, done) => {
43776
43815
  const { pageSize = 7, validate = () => true } = config;
43777
43816
  const theme = makeTheme(searchTheme, config.theme);
43778
- const firstRender = useRef(true);
43779
43817
  const [status, setStatus] = useState("loading");
43780
43818
  const [searchTerm, setSearchTerm] = useState("");
43781
43819
  const [searchResults, setSearchResults] = useState([]);
@@ -43814,8 +43852,8 @@ var esm_default10 = createPrompt((config, done) => {
43814
43852
  };
43815
43853
  }, [searchTerm]);
43816
43854
  const selectedChoice = searchResults[active];
43817
- useKeypress(async (key2, rl) => {
43818
- if (isEnterKey(key2)) {
43855
+ useKeypress(async (key, rl) => {
43856
+ if (isEnterKey(key)) {
43819
43857
  if (selectedChoice) {
43820
43858
  setStatus("loading");
43821
43859
  const isValid = await validate(selectedChoice.value);
@@ -43832,14 +43870,14 @@ var esm_default10 = createPrompt((config, done) => {
43832
43870
  } else {
43833
43871
  rl.write(searchTerm);
43834
43872
  }
43835
- } else if (isTabKey(key2) && selectedChoice) {
43873
+ } else if (isTabKey(key) && selectedChoice) {
43836
43874
  rl.clearLine(0);
43837
43875
  rl.write(selectedChoice.name);
43838
43876
  setSearchTerm(selectedChoice.name);
43839
- } else if (status !== "loading" && (isUpKey(key2) || isDownKey(key2))) {
43877
+ } else if (status !== "loading" && (isUpKey(key) || isDownKey(key))) {
43840
43878
  rl.clearLine(0);
43841
- if (isUpKey(key2) && active !== bounds.first || isDownKey(key2) && active !== bounds.last) {
43842
- const offset = isUpKey(key2) ? -1 : 1;
43879
+ if (isUpKey(key) && active !== bounds.first || isDownKey(key) && active !== bounds.last) {
43880
+ const offset = isUpKey(key) ? -1 : 1;
43843
43881
  let next = active;
43844
43882
  do {
43845
43883
  next = (next + offset + searchResults.length) % searchResults.length;
@@ -43851,14 +43889,17 @@ var esm_default10 = createPrompt((config, done) => {
43851
43889
  }
43852
43890
  });
43853
43891
  const message = theme.style.message(config.message, status);
43854
- if (active > 0) {
43855
- firstRender.current = false;
43856
- }
43857
- let helpTip = "";
43858
- if (searchResults.length > 1 && (theme.helpMode === "always" || theme.helpMode === "auto" && firstRender.current)) {
43859
- helpTip = searchResults.length > pageSize ? `
43860
- ${theme.style.help(`(${config.instructions?.pager ?? "Use arrow keys to reveal more choices"})`)}` : `
43861
- ${theme.style.help(`(${config.instructions?.navigation ?? "Use arrow keys"})`)}`;
43892
+ let helpLine;
43893
+ if (theme.helpMode !== "never") {
43894
+ if (config.instructions) {
43895
+ const { pager, navigation } = config.instructions;
43896
+ helpLine = theme.style.help(searchResults.length > pageSize ? pager : navigation);
43897
+ } else {
43898
+ helpLine = theme.style.keysHelpTip([
43899
+ ["↑↓", "navigate"],
43900
+ ["⏎", "select"]
43901
+ ]);
43902
+ }
43862
43903
  }
43863
43904
  const page = usePagination({
43864
43905
  items: searchResults,
@@ -43886,28 +43927,33 @@ ${theme.style.help(`(${config.instructions?.navigation ?? "Use arrow keys"})`)}`
43886
43927
  }
43887
43928
  let searchStr;
43888
43929
  if (status === "done" && selectedChoice) {
43889
- const answer = selectedChoice.short;
43890
- return `${prefix} ${message} ${theme.style.answer(answer)}`;
43930
+ return [prefix, message, theme.style.answer(selectedChoice.short)].filter(Boolean).join(" ").trimEnd();
43891
43931
  } else {
43892
43932
  searchStr = theme.style.searchTerm(searchTerm);
43893
43933
  }
43894
- const choiceDescription = selectedChoice?.description ? `
43895
- ${theme.style.description(selectedChoice.description)}` : ``;
43896
- return [
43897
- [prefix, message, searchStr].filter(Boolean).join(" "),
43898
- `${error ?? page}${helpTip}${choiceDescription}`
43899
- ];
43900
- });
43901
- // node_modules/.pnpm/@inquirer+select@4.3.4_@types+node@24.7.2/node_modules/@inquirer/select/dist/esm/index.js
43934
+ const description = selectedChoice?.description;
43935
+ const header = [prefix, message, searchStr].filter(Boolean).join(" ").trimEnd();
43936
+ const body = [
43937
+ error ?? page,
43938
+ " ",
43939
+ description ? theme.style.description(description) : "",
43940
+ helpLine
43941
+ ].filter(Boolean).join(`
43942
+ `).trimEnd();
43943
+ return [header, body];
43944
+ });
43945
+ // node_modules/.pnpm/@inquirer+select@4.4.1_@types+node@24.10.0/node_modules/@inquirer/select/dist/esm/index.js
43902
43946
  var import_yoctocolors_cjs7 = __toESM(require_yoctocolors_cjs(), 1);
43903
43947
  var selectTheme = {
43904
43948
  icon: { cursor: esm_default.pointer },
43905
43949
  style: {
43906
43950
  disabled: (text) => import_yoctocolors_cjs7.default.dim(`- ${text}`),
43907
- description: (text) => import_yoctocolors_cjs7.default.cyan(text)
43951
+ description: (text) => import_yoctocolors_cjs7.default.cyan(text),
43952
+ keysHelpTip: (keys) => keys.map(([key, action]) => `${import_yoctocolors_cjs7.default.bold(key)} ${import_yoctocolors_cjs7.default.dim(action)}`).join(import_yoctocolors_cjs7.default.dim(" • "))
43908
43953
  },
43909
- helpMode: "auto",
43910
- indexMode: "hidden"
43954
+ helpMode: "always",
43955
+ indexMode: "hidden",
43956
+ keybindings: []
43911
43957
  };
43912
43958
  function isSelectable3(item) {
43913
43959
  return !Separator.isSeparator(item) && !item.disabled;
@@ -43939,11 +43985,12 @@ function normalizeChoices5(choices) {
43939
43985
  }
43940
43986
  var esm_default11 = createPrompt((config, done) => {
43941
43987
  const { loop = true, pageSize = 7 } = config;
43942
- const firstRender = useRef(true);
43943
43988
  const theme = makeTheme(selectTheme, config.theme);
43989
+ const { keybindings } = theme;
43944
43990
  const [status, setStatus] = useState("idle");
43945
43991
  const prefix = usePrefix({ status, theme });
43946
43992
  const searchTimeoutRef = useRef();
43993
+ const searchEnabled = !keybindings.includes("vim");
43947
43994
  const items = useMemo(() => normalizeChoices5(config.choices), [config.choices]);
43948
43995
  const bounds = useMemo(() => {
43949
43996
  const first = items.findIndex(isSelectable3);
@@ -43960,22 +44007,22 @@ var esm_default11 = createPrompt((config, done) => {
43960
44007
  }, [config.default, items]);
43961
44008
  const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
43962
44009
  const selectedChoice = items[active];
43963
- useKeypress((key2, rl) => {
44010
+ useKeypress((key, rl) => {
43964
44011
  clearTimeout(searchTimeoutRef.current);
43965
- if (isEnterKey(key2)) {
44012
+ if (isEnterKey(key)) {
43966
44013
  setStatus("done");
43967
44014
  done(selectedChoice.value);
43968
- } else if (isUpKey(key2) || isDownKey(key2)) {
44015
+ } else if (isUpKey(key, keybindings) || isDownKey(key, keybindings)) {
43969
44016
  rl.clearLine(0);
43970
- if (loop || isUpKey(key2) && active !== bounds.first || isDownKey(key2) && active !== bounds.last) {
43971
- const offset = isUpKey(key2) ? -1 : 1;
44017
+ if (loop || isUpKey(key, keybindings) && active !== bounds.first || isDownKey(key, keybindings) && active !== bounds.last) {
44018
+ const offset = isUpKey(key, keybindings) ? -1 : 1;
43972
44019
  let next = active;
43973
44020
  do {
43974
44021
  next = (next + offset + items.length) % items.length;
43975
44022
  } while (!isSelectable3(items[next]));
43976
44023
  setActive(next);
43977
44024
  }
43978
- } else if (isNumberKey(key2) && !Number.isNaN(Number(rl.line))) {
44025
+ } else if (isNumberKey(key) && !Number.isNaN(Number(rl.line))) {
43979
44026
  const selectedIndex = Number(rl.line) - 1;
43980
44027
  let selectableIndex = -1;
43981
44028
  const position = items.findIndex((item2) => {
@@ -43991,9 +44038,9 @@ var esm_default11 = createPrompt((config, done) => {
43991
44038
  searchTimeoutRef.current = setTimeout(() => {
43992
44039
  rl.clearLine(0);
43993
44040
  }, 700);
43994
- } else if (isBackspaceKey(key2)) {
44041
+ } else if (isBackspaceKey(key)) {
43995
44042
  rl.clearLine(0);
43996
- } else {
44043
+ } else if (searchEnabled) {
43997
44044
  const searchTerm = rl.line.toLowerCase();
43998
44045
  const matchIndex = items.findIndex((item) => {
43999
44046
  if (Separator.isSeparator(item) || !isSelectable3(item))
@@ -44012,15 +44059,16 @@ var esm_default11 = createPrompt((config, done) => {
44012
44059
  clearTimeout(searchTimeoutRef.current);
44013
44060
  }, []);
44014
44061
  const message = theme.style.message(config.message, status);
44015
- let helpTipTop = "";
44016
- let helpTipBottom = "";
44017
- if (theme.helpMode === "always" || theme.helpMode === "auto" && firstRender.current) {
44018
- firstRender.current = false;
44019
- if (items.length > pageSize) {
44020
- helpTipBottom = `
44021
- ${theme.style.help(`(${config.instructions?.pager ?? "Use arrow keys to reveal more choices"})`)}`;
44062
+ let helpLine;
44063
+ if (theme.helpMode !== "never") {
44064
+ if (config.instructions) {
44065
+ const { pager, navigation } = config.instructions;
44066
+ helpLine = theme.style.help(items.length > pageSize ? pager : navigation);
44022
44067
  } else {
44023
- helpTipTop = theme.style.help(`(${config.instructions?.navigation ?? "Use arrow keys"})`);
44068
+ helpLine = theme.style.keysHelpTip([
44069
+ ["↑↓", "navigate"],
44070
+ ["⏎", "select"]
44071
+ ]);
44024
44072
  }
44025
44073
  }
44026
44074
  let separatorCount = 0;
@@ -44045,14 +44093,20 @@ ${theme.style.help(`(${config.instructions?.pager ?? "Use arrow keys to reveal m
44045
44093
  loop
44046
44094
  });
44047
44095
  if (status === "done") {
44048
- return `${prefix} ${message} ${theme.style.answer(selectedChoice.short)}`;
44049
- }
44050
- const choiceDescription = selectedChoice.description ? `
44051
- ${theme.style.description(selectedChoice.description)}` : ``;
44052
- return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
44053
- ${page}${helpTipBottom}${choiceDescription}${cursorHide}`;
44054
- });
44055
- // node_modules/.pnpm/inquirer@12.9.6_@types+node@24.7.2/node_modules/inquirer/dist/esm/ui/prompt.js
44096
+ return [prefix, message, theme.style.answer(selectedChoice.short)].filter(Boolean).join(" ");
44097
+ }
44098
+ const { description } = selectedChoice;
44099
+ const lines = [
44100
+ [prefix, message].filter(Boolean).join(" "),
44101
+ page,
44102
+ " ",
44103
+ description ? theme.style.description(description) : "",
44104
+ helpLine
44105
+ ].filter(Boolean).join(`
44106
+ `).trimEnd();
44107
+ return `${lines}${cursorHide}`;
44108
+ });
44109
+ // node_modules/.pnpm/inquirer@12.11.0_@types+node@24.10.0/node_modules/inquirer/dist/esm/ui/prompt.js
44056
44110
  var import_rxjs = __toESM(require_cjs(), 1);
44057
44111
  var import_run_async = __toESM(require_run_async(), 1);
44058
44112
  var import_mute_stream2 = __toESM(require_lib(), 1);
@@ -44060,19 +44114,19 @@ import readline3 from "node:readline";
44060
44114
  var _ = {
44061
44115
  set: (obj, path3 = "", value) => {
44062
44116
  let pointer = obj;
44063
- path3.split(".").forEach((key2, index, arr) => {
44064
- if (key2 === "__proto__" || key2 === "constructor")
44117
+ path3.split(".").forEach((key, index, arr) => {
44118
+ if (key === "__proto__" || key === "constructor")
44065
44119
  return;
44066
44120
  if (index === arr.length - 1) {
44067
- pointer[key2] = value;
44068
- } else if (!(key2 in pointer) || typeof pointer[key2] !== "object") {
44069
- pointer[key2] = {};
44121
+ pointer[key] = value;
44122
+ } else if (!(key in pointer) || typeof pointer[key] !== "object") {
44123
+ pointer[key] = {};
44070
44124
  }
44071
- pointer = pointer[key2];
44125
+ pointer = pointer[key];
44072
44126
  });
44073
44127
  },
44074
44128
  get: (obj, path3 = "", defaultValue) => {
44075
- const travel = (regexp) => String.prototype.split.call(path3, regexp).filter(Boolean).reduce((res, key2) => res == null ? res : res[key2], obj);
44129
+ const travel = (regexp) => String.prototype.split.call(path3, regexp).filter(Boolean).reduce((res, key) => res == null ? res : res[key], obj);
44076
44130
  const result = travel(/[,[\]]+?/) || travel(/[,.[\]]+?/);
44077
44131
  return result === undefined || result === obj ? defaultValue : result;
44078
44132
  }
@@ -44263,7 +44317,7 @@ class PromptsRunner {
44263
44317
  };
44264
44318
  }
44265
44319
 
44266
- // node_modules/.pnpm/inquirer@12.9.6_@types+node@24.7.2/node_modules/inquirer/dist/esm/index.js
44320
+ // node_modules/.pnpm/inquirer@12.11.0_@types+node@24.10.0/node_modules/inquirer/dist/esm/index.js
44267
44321
  var builtInPrompts = {
44268
44322
  input: esm_default5,
44269
44323
  select: esm_default11,
@@ -45214,15 +45268,15 @@ var StorageNode = class {
45214
45268
  get length() {
45215
45269
  return Object.keys(this.cacheData).length;
45216
45270
  }
45217
- getItem(key2) {
45218
- return this.cacheData[key2];
45271
+ getItem(key) {
45272
+ return this.cacheData[key];
45219
45273
  }
45220
- setItem(key2, value) {
45221
- this.cacheData[key2] = value;
45274
+ setItem(key, value) {
45275
+ this.cacheData[key] = value;
45222
45276
  writeFile(this.filePath, JSON.stringify(this.cacheData, null, 2));
45223
45277
  }
45224
- removeItem(key2) {
45225
- delete this.cacheData[key2];
45278
+ removeItem(key) {
45279
+ delete this.cacheData[key];
45226
45280
  writeFile(this.filePath, JSON.stringify(this.cacheData, null, 2));
45227
45281
  }
45228
45282
  clear() {
@@ -45597,7 +45651,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
45597
45651
  return 1;
45598
45652
  }
45599
45653
  if ("CI" in env) {
45600
- if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key2) => (key2 in env))) {
45654
+ if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env))) {
45601
45655
  return 3;
45602
45656
  }
45603
45657
  if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
@@ -46098,11 +46152,11 @@ class BaseLoad {
46098
46152
  this.event = new EventEmitter;
46099
46153
  this.loading = false;
46100
46154
  }
46101
- listenKey(key2, listenOpts) {
46155
+ listenKey(key, listenOpts) {
46102
46156
  const timeout = listenOpts?.timeout ?? this.timeout;
46103
46157
  return new Promise((resolve) => {
46104
46158
  const timeoutId = setTimeout(() => {
46105
- this.event.removeListener(key2, onEvent);
46159
+ this.event.removeListener(key, onEvent);
46106
46160
  resolve({
46107
46161
  code: 500,
46108
46162
  message: "timeout"
@@ -46116,37 +46170,37 @@ class BaseLoad {
46116
46170
  message: error
46117
46171
  });
46118
46172
  }
46119
- const data = this.modules.get(key2);
46173
+ const data = this.modules.get(key);
46120
46174
  if (data?.loadSuccessClear) {
46121
- this.remove(key2);
46175
+ this.remove(key);
46122
46176
  }
46123
46177
  resolve({
46124
46178
  code: 200,
46125
46179
  data: data?.modules
46126
46180
  });
46127
46181
  };
46128
- this.event.once(key2, onEvent);
46182
+ this.event.once(key, onEvent);
46129
46183
  });
46130
46184
  }
46131
- async hasLoaded(key2, hasLoadOpts) {
46132
- if (!key2) {
46185
+ async hasLoaded(key, hasLoadOpts) {
46186
+ if (!key) {
46133
46187
  return {
46134
46188
  code: 404,
46135
46189
  message: "key is required"
46136
46190
  };
46137
46191
  }
46138
- const has = this.modules.has(key2);
46192
+ const has = this.modules.has(key);
46139
46193
  if (!has) {
46140
46194
  const isExist = hasLoadOpts?.isExist ?? true;
46141
46195
  const timeout = hasLoadOpts?.timeout ?? this.timeout;
46142
46196
  if (isExist) {
46143
- return await this.listenKey(key2, { timeout });
46197
+ return await this.listenKey(key, { timeout });
46144
46198
  }
46145
46199
  return {
46146
46200
  code: 404
46147
46201
  };
46148
46202
  }
46149
- const data = this.modules.get(key2);
46203
+ const data = this.modules.get(key);
46150
46204
  if (data?.status === "loaded") {
46151
46205
  return {
46152
46206
  code: 200,
@@ -46154,7 +46208,7 @@ class BaseLoad {
46154
46208
  };
46155
46209
  }
46156
46210
  if (data?.status === "loading") {
46157
- return await this.listenKey(key2, { timeout: hasLoadOpts?.timeout ?? this.timeout });
46211
+ return await this.listenKey(key, { timeout: hasLoadOpts?.timeout ?? this.timeout });
46158
46212
  }
46159
46213
  if (data?.status === "error") {
46160
46214
  return {
@@ -46173,8 +46227,8 @@ class BaseLoad {
46173
46227
  };
46174
46228
  }
46175
46229
  async loadFn(loadContent, opts) {
46176
- const key2 = opts.key;
46177
- if (!key2) {
46230
+ const key = opts.key;
46231
+ if (!key) {
46178
46232
  return {
46179
46233
  code: 404,
46180
46234
  message: "key is required"
@@ -46191,12 +46245,12 @@ class BaseLoad {
46191
46245
  const isReRun = opts.isReRun ?? false;
46192
46246
  let res;
46193
46247
  if (!isReRun) {
46194
- this.modules.set(key2, newModule);
46248
+ this.modules.set(key, newModule);
46195
46249
  res = await loadContent();
46196
46250
  } else {
46197
46251
  newModule.controller = new AbortController;
46198
46252
  const signal = newModule.controller.signal;
46199
- this.modules.set(key2, newModule);
46253
+ this.modules.set(key, newModule);
46200
46254
  const data = await reRunFn({
46201
46255
  timeout: opts.timeout,
46202
46256
  interval: opts.interval,
@@ -46242,57 +46296,57 @@ class BaseLoad {
46242
46296
  }
46243
46297
  async load(loadContent, opts) {
46244
46298
  this.loading = true;
46245
- const key2 = opts.key;
46246
- if (!key2) {
46299
+ const key = opts.key;
46300
+ if (!key) {
46247
46301
  return {
46248
46302
  code: 404,
46249
46303
  message: "key is required"
46250
46304
  };
46251
46305
  }
46252
46306
  if (opts?.force) {
46253
- this.remove(key2);
46307
+ this.remove(key);
46254
46308
  }
46255
- const has = this.modules.has(key2);
46309
+ const has = this.modules.has(key);
46256
46310
  if (has) {
46257
- return await this.hasLoaded(key2);
46311
+ return await this.hasLoaded(key);
46258
46312
  }
46259
46313
  if (typeof loadContent === "function") {
46260
46314
  return this.loadFn(loadContent, opts);
46261
46315
  }
46262
46316
  console.error("loadContent is not a function and not has loaded");
46263
46317
  }
46264
- remove(key2) {
46265
- const has = this.modules.has(key2);
46318
+ remove(key) {
46319
+ const has = this.modules.has(key);
46266
46320
  if (has) {
46267
- this.checkRemoveController(key2);
46268
- this.modules.delete(key2);
46321
+ this.checkRemoveController(key);
46322
+ this.modules.delete(key);
46269
46323
  }
46270
46324
  }
46271
- emitLoaded(key2) {
46272
- this.checkRemoveController(key2);
46273
- this.event.emit(key2);
46325
+ emitLoaded(key) {
46326
+ this.checkRemoveController(key);
46327
+ this.event.emit(key);
46274
46328
  }
46275
- setModule(key2, data, loadData) {
46329
+ setModule(key, data, loadData) {
46276
46330
  const newModule = {
46277
- key: key2,
46331
+ key,
46278
46332
  status: "loaded",
46279
46333
  loading: false,
46280
46334
  modules: data || {},
46281
46335
  ...loadData
46282
46336
  };
46283
- this.modules.set(key2, newModule);
46284
- this.emitLoaded(key2);
46337
+ this.modules.set(key, newModule);
46338
+ this.emitLoaded(key);
46285
46339
  return newModule;
46286
46340
  }
46287
- cancel(key2) {
46288
- this.checkRemoveController(key2);
46341
+ cancel(key) {
46342
+ this.checkRemoveController(key);
46289
46343
  }
46290
- checkRemoveController(key2) {
46291
- const data = this.modules.get(key2);
46344
+ checkRemoveController(key) {
46345
+ const data = this.modules.get(key);
46292
46346
  if (data?.controller) {
46293
46347
  data.controller?.abort?.();
46294
46348
  delete data.controller;
46295
- this.modules.set(key2, data);
46349
+ this.modules.set(key, data);
46296
46350
  }
46297
46351
  }
46298
46352
  }
@@ -46338,8 +46392,8 @@ var loginInCommand = async () => {
46338
46392
  // src/command/login.ts
46339
46393
  import util from "util";
46340
46394
  var pick = (obj, keys) => {
46341
- return keys.reduce((acc, key2) => {
46342
- acc[key2] = obj[key2];
46395
+ return keys.reduce((acc, key) => {
46396
+ acc[key] = obj[key];
46343
46397
  return acc;
46344
46398
  }, {});
46345
46399
  };
@@ -47698,14 +47752,14 @@ class WriteStreamSync extends WriteStream {
47698
47752
  }
47699
47753
  }
47700
47754
 
47701
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/create.js
47755
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/create.js
47702
47756
  import path5 from "node:path";
47703
47757
 
47704
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/list.js
47758
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/list.js
47705
47759
  import fs5 from "node:fs";
47706
47760
  import { dirname as dirname2, parse as parse2 } from "path";
47707
47761
 
47708
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/options.js
47762
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/options.js
47709
47763
  var argmap = new Map([
47710
47764
  ["C", "cwd"],
47711
47765
  ["f", "file"],
@@ -47743,8 +47797,8 @@ var dealias = (opt = {}) => {
47743
47797
  if (!opt)
47744
47798
  return {};
47745
47799
  const result = {};
47746
- for (const [key2, v] of Object.entries(opt)) {
47747
- const k = dealiasKey(key2);
47800
+ for (const [key, v] of Object.entries(opt)) {
47801
+ const k = dealiasKey(key);
47748
47802
  result[k] = v;
47749
47803
  }
47750
47804
  if (result.chmod === undefined && result.noChmod === false) {
@@ -47754,7 +47808,7 @@ var dealias = (opt = {}) => {
47754
47808
  return result;
47755
47809
  };
47756
47810
 
47757
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/make-command.js
47811
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/make-command.js
47758
47812
  var makeCommand = (syncFile, asyncFile, syncNoFile, asyncNoFile, validate) => {
47759
47813
  return Object.assign((opt_ = [], entries, cb) => {
47760
47814
  if (Array.isArray(opt_)) {
@@ -47803,7 +47857,7 @@ var makeCommand = (syncFile, asyncFile, syncNoFile, asyncNoFile, validate) => {
47803
47857
  });
47804
47858
  };
47805
47859
 
47806
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/parse.js
47860
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/parse.js
47807
47861
  import { EventEmitter as EE2 } from "events";
47808
47862
 
47809
47863
  // node_modules/.pnpm/minizlib@3.1.0/node_modules/minizlib/dist/esm/index.js
@@ -48195,10 +48249,10 @@ class ZstdDecompress extends Zstd {
48195
48249
  }
48196
48250
  }
48197
48251
 
48198
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/header.js
48252
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/header.js
48199
48253
  import { posix as pathModule } from "node:path";
48200
48254
 
48201
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/large-numbers.js
48255
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/large-numbers.js
48202
48256
  var encode = (num, buf) => {
48203
48257
  if (!Number.isSafeInteger(num)) {
48204
48258
  throw Error("cannot encode number outside of javascript safe integer range");
@@ -48279,7 +48333,7 @@ var pos = (buf) => {
48279
48333
  var onesComp = (byte) => (255 ^ byte) & 255;
48280
48334
  var twosComp = (byte) => (255 ^ byte) + 1 & 255;
48281
48335
 
48282
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/types.js
48336
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/types.js
48283
48337
  var isCode = (c) => name.has(c);
48284
48338
  var name = new Map([
48285
48339
  ["0", "File"],
@@ -48306,7 +48360,7 @@ var name = new Map([
48306
48360
  ]);
48307
48361
  var code = new Map(Array.from(name).map((kv2) => [kv2[1], kv2[0]]));
48308
48362
 
48309
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/header.js
48363
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/header.js
48310
48364
  class Header {
48311
48365
  cksumValid = false;
48312
48366
  needPax = false;
@@ -48343,12 +48397,12 @@ class Header {
48343
48397
  if (!buf || !(buf.length >= off + 512)) {
48344
48398
  throw new Error("need 512 bytes for header");
48345
48399
  }
48346
- this.path = decString(buf, off, 100);
48347
- this.mode = decNumber(buf, off + 100, 8);
48348
- this.uid = decNumber(buf, off + 108, 8);
48349
- this.gid = decNumber(buf, off + 116, 8);
48350
- this.size = decNumber(buf, off + 124, 12);
48351
- this.mtime = decDate(buf, off + 136, 12);
48400
+ this.path = ex?.path ?? decString(buf, off, 100);
48401
+ this.mode = ex?.mode ?? gex?.mode ?? decNumber(buf, off + 100, 8);
48402
+ this.uid = ex?.uid ?? gex?.uid ?? decNumber(buf, off + 108, 8);
48403
+ this.gid = ex?.gid ?? gex?.gid ?? decNumber(buf, off + 116, 8);
48404
+ this.size = ex?.size ?? gex?.size ?? decNumber(buf, off + 124, 12);
48405
+ this.mtime = ex?.mtime ?? gex?.mtime ?? decDate(buf, off + 136, 12);
48352
48406
  this.cksum = decNumber(buf, off + 148, 12);
48353
48407
  if (gex)
48354
48408
  this.#slurp(gex, true);
@@ -48366,10 +48420,10 @@ class Header {
48366
48420
  }
48367
48421
  this.linkpath = decString(buf, off + 157, 100);
48368
48422
  if (buf.subarray(off + 257, off + 265).toString() === "ustar\x0000") {
48369
- this.uname = decString(buf, off + 265, 32);
48370
- this.gname = decString(buf, off + 297, 32);
48371
- this.devmaj = decNumber(buf, off + 329, 8) ?? 0;
48372
- this.devmin = decNumber(buf, off + 337, 8) ?? 0;
48423
+ this.uname = ex?.uname ?? gex?.uname ?? decString(buf, off + 265, 32);
48424
+ this.gname = ex?.gname ?? gex?.gname ?? decString(buf, off + 297, 32);
48425
+ this.devmaj = ex?.devmaj ?? gex?.devmaj ?? decNumber(buf, off + 329, 8) ?? 0;
48426
+ this.devmin = ex?.devmin ?? gex?.devmin ?? decNumber(buf, off + 337, 8) ?? 0;
48373
48427
  if (buf[off + 475] !== 0) {
48374
48428
  const prefix = decString(buf, off + 345, 155);
48375
48429
  this.path = prefix + "/" + this.path;
@@ -48378,8 +48432,8 @@ class Header {
48378
48432
  if (prefix) {
48379
48433
  this.path = prefix + "/" + this.path;
48380
48434
  }
48381
- this.atime = decDate(buf, off + 476, 12);
48382
- this.ctime = decDate(buf, off + 488, 12);
48435
+ this.atime = ex?.atime ?? gex?.atime ?? decDate(buf, off + 476, 12);
48436
+ this.ctime = ex?.ctime ?? gex?.ctime ?? decDate(buf, off + 488, 12);
48383
48437
  }
48384
48438
  }
48385
48439
  let sum = 8 * 32;
@@ -48509,7 +48563,7 @@ var encDate = (buf, off, size, date) => date === undefined ? false : encNumber(b
48509
48563
  var NULLS = new Array(156).join("\x00");
48510
48564
  var encString = (buf, off, size, str) => str === undefined ? false : (buf.write(str + NULLS, off, size, "utf8"), str.length !== Buffer.byteLength(str) || str.length > size);
48511
48565
 
48512
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/pax.js
48566
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/pax.js
48513
48567
  import { basename } from "node:path";
48514
48568
  class Pax {
48515
48569
  atime;
@@ -48623,11 +48677,11 @@ var parseKVLine = (set, line) => {
48623
48677
  return set;
48624
48678
  };
48625
48679
 
48626
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/normalize-windows-path.js
48680
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/normalize-windows-path.js
48627
48681
  var platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
48628
48682
  var normalizeWindowsPath = platform !== "win32" ? (p) => p : (p) => p && p.replace(/\\/g, "/");
48629
48683
 
48630
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/read-entry.js
48684
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/read-entry.js
48631
48685
  class ReadEntry extends Minipass {
48632
48686
  extended;
48633
48687
  globalExtended;
@@ -48742,7 +48796,7 @@ class ReadEntry extends Minipass {
48742
48796
  }
48743
48797
  }
48744
48798
 
48745
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/warn-method.js
48799
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/warn-method.js
48746
48800
  var warnMethod = (self2, code2, message, data = {}) => {
48747
48801
  if (self2.file) {
48748
48802
  data.file = self2.file;
@@ -48765,7 +48819,7 @@ var warnMethod = (self2, code2, message, data = {}) => {
48765
48819
  }
48766
48820
  };
48767
48821
 
48768
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/parse.js
48822
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/parse.js
48769
48823
  var maxMetaEntrySize = 1024 * 1024;
48770
48824
  var gzipHeader = Buffer.from([31, 139]);
48771
48825
  var zstdHeader = Buffer.from([40, 181, 47, 253]);
@@ -49247,7 +49301,7 @@ class Parser extends EE2 {
49247
49301
  }
49248
49302
  }
49249
49303
 
49250
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/strip-trailing-slashes.js
49304
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/strip-trailing-slashes.js
49251
49305
  var stripTrailingSlashes = (str) => {
49252
49306
  let i = str.length - 1;
49253
49307
  let slashesStart = -1;
@@ -49258,7 +49312,7 @@ var stripTrailingSlashes = (str) => {
49258
49312
  return slashesStart === -1 ? str : str.slice(0, slashesStart);
49259
49313
  };
49260
49314
 
49261
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/list.js
49315
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/list.js
49262
49316
  var onReadEntryFunction = (opt) => {
49263
49317
  const onReadEntry = opt.onReadEntry;
49264
49318
  opt.onReadEntry = onReadEntry ? (e) => {
@@ -49297,13 +49351,15 @@ var listFileSync = (opt) => {
49297
49351
  const readSize = opt.maxReadSize || 16 * 1024 * 1024;
49298
49352
  if (stat.size < readSize) {
49299
49353
  const buf = Buffer.allocUnsafe(stat.size);
49300
- fs5.readSync(fd, buf, 0, stat.size, 0);
49301
- p.end(buf);
49354
+ const read = fs5.readSync(fd, buf, 0, stat.size, 0);
49355
+ p.end(read === buf.byteLength ? buf : buf.subarray(0, read));
49302
49356
  } else {
49303
49357
  let pos2 = 0;
49304
49358
  const buf = Buffer.allocUnsafe(readSize);
49305
49359
  while (pos2 < stat.size) {
49306
49360
  const bytesRead = fs5.readSync(fd, buf, 0, readSize, pos2);
49361
+ if (bytesRead === 0)
49362
+ break;
49307
49363
  pos2 += bytesRead;
49308
49364
  p.write(buf.subarray(0, bytesRead));
49309
49365
  }
@@ -49346,14 +49402,14 @@ var list = makeCommand(listFileSync, listFile, (opt) => new Parser(opt), (opt) =
49346
49402
  onReadEntryFunction(opt);
49347
49403
  });
49348
49404
 
49349
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/pack.js
49405
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/pack.js
49350
49406
  import fs7 from "fs";
49351
49407
 
49352
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/write-entry.js
49408
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/write-entry.js
49353
49409
  import fs6 from "fs";
49354
49410
  import path3 from "path";
49355
49411
 
49356
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/mode-fix.js
49412
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/mode-fix.js
49357
49413
  var modeFix = (mode, isDir, portable) => {
49358
49414
  mode &= 4095;
49359
49415
  if (portable) {
@@ -49373,7 +49429,7 @@ var modeFix = (mode, isDir, portable) => {
49373
49429
  return mode;
49374
49430
  };
49375
49431
 
49376
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/strip-absolute-path.js
49432
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/strip-absolute-path.js
49377
49433
  import { win32 } from "node:path";
49378
49434
  var { isAbsolute, parse: parse3 } = win32;
49379
49435
  var stripAbsolutePath = (path3) => {
@@ -49388,7 +49444,7 @@ var stripAbsolutePath = (path3) => {
49388
49444
  return [r, path3];
49389
49445
  };
49390
49446
 
49391
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/winchars.js
49447
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/winchars.js
49392
49448
  var raw = ["|", "<", ">", "?", ":"];
49393
49449
  var win = raw.map((char) => String.fromCharCode(61440 + char.charCodeAt(0)));
49394
49450
  var toWin = new Map(raw.map((char, i) => [char, win[i]]));
@@ -49396,7 +49452,7 @@ var toRaw = new Map(win.map((char, i) => [char, raw[i]]));
49396
49452
  var encode2 = (s) => raw.reduce((s2, c) => s2.split(c).join(toWin.get(c)), s);
49397
49453
  var decode = (s) => win.reduce((s2, c) => s2.split(c).join(toRaw.get(c)), s);
49398
49454
 
49399
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/write-entry.js
49455
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/write-entry.js
49400
49456
  var prefixPath = (path4, prefix) => {
49401
49457
  if (!prefix) {
49402
49458
  return normalizeWindowsPath(path4);
@@ -50333,7 +50389,7 @@ class Node {
50333
50389
  }
50334
50390
  }
50335
50391
 
50336
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/pack.js
50392
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/pack.js
50337
50393
  import path4 from "path";
50338
50394
  class PackJob {
50339
50395
  path;
@@ -50740,7 +50796,7 @@ class PackSync extends Pack {
50740
50796
  }
50741
50797
  }
50742
50798
 
50743
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/create.js
50799
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/create.js
50744
50800
  var createFileSync = (opt, files) => {
50745
50801
  const p = new PackSync(opt);
50746
50802
  const stream = new WriteStreamSync(opt.file, {
@@ -50810,16 +50866,16 @@ var create = makeCommand(createFileSync, createFile, createSync, createAsync, (_
50810
50866
  throw new TypeError("no paths specified to add to archive");
50811
50867
  }
50812
50868
  });
50813
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/extract.js
50869
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/extract.js
50814
50870
  import fs12 from "node:fs";
50815
50871
 
50816
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/unpack.js
50872
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/unpack.js
50817
50873
  import assert2 from "node:assert";
50818
50874
  import { randomBytes } from "node:crypto";
50819
50875
  import fs11 from "node:fs";
50820
50876
  import path8 from "node:path";
50821
50877
 
50822
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/get-write-flag.js
50878
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/get-write-flag.js
50823
50879
  import fs8 from "fs";
50824
50880
  var platform2 = process.env.__FAKE_PLATFORM__ || process.platform;
50825
50881
  var isWindows = platform2 === "win32";
@@ -50908,12 +50964,12 @@ var chownrSync = (p, uid, gid) => {
50908
50964
  return lchownSync(p, uid, gid);
50909
50965
  };
50910
50966
 
50911
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/mkdir.js
50967
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/mkdir.js
50912
50968
  import fs10 from "node:fs";
50913
50969
  import fsp from "node:fs/promises";
50914
50970
  import path7 from "node:path";
50915
50971
 
50916
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/cwd-error.js
50972
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/cwd-error.js
50917
50973
  class CwdError extends Error {
50918
50974
  path;
50919
50975
  code;
@@ -50928,7 +50984,7 @@ class CwdError extends Error {
50928
50984
  }
50929
50985
  }
50930
50986
 
50931
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/symlink-error.js
50987
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/symlink-error.js
50932
50988
  class SymlinkError extends Error {
50933
50989
  path;
50934
50990
  symlink;
@@ -50944,7 +51000,7 @@ class SymlinkError extends Error {
50944
51000
  }
50945
51001
  }
50946
51002
 
50947
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/mkdir.js
51003
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/mkdir.js
50948
51004
  var checkCwd = (dir, cb) => {
50949
51005
  fs10.stat(dir, (er, st) => {
50950
51006
  if (er || !st.isDirectory()) {
@@ -51085,10 +51141,10 @@ var mkdirSync = (dir, opt) => {
51085
51141
  return done(created);
51086
51142
  };
51087
51143
 
51088
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/path-reservations.js
51144
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/path-reservations.js
51089
51145
  import { join as join2 } from "node:path";
51090
51146
 
51091
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/normalize-unicode.js
51147
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/normalize-unicode.js
51092
51148
  var normalizeCache = Object.create(null);
51093
51149
  var MAX = 1e4;
51094
51150
  var cache = new Set;
@@ -51112,7 +51168,7 @@ var normalizeUnicode = (s) => {
51112
51168
  return ret;
51113
51169
  };
51114
51170
 
51115
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/path-reservations.js
51171
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/path-reservations.js
51116
51172
  var platform3 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
51117
51173
  var isWindows2 = platform3 === "win32";
51118
51174
  var getDirs = (path8) => {
@@ -51235,7 +51291,7 @@ class PathReservations {
51235
51291
  }
51236
51292
  }
51237
51293
 
51238
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/unpack.js
51294
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/unpack.js
51239
51295
  var ONENTRY = Symbol("onEntry");
51240
51296
  var CHECKFS = Symbol("checkFs");
51241
51297
  var CHECKFS2 = Symbol("checkFs2");
@@ -51887,7 +51943,7 @@ class UnpackSync extends Unpack {
51887
51943
  }
51888
51944
  }
51889
51945
 
51890
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/extract.js
51946
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/extract.js
51891
51947
  var extractFileSync = (opt) => {
51892
51948
  const u = new UnpackSync(opt);
51893
51949
  const file = opt.file;
@@ -51925,7 +51981,7 @@ var extract = makeCommand(extractFileSync, extractFile, (opt) => new UnpackSync(
51925
51981
  if (files?.length)
51926
51982
  filesFilter(opt, files);
51927
51983
  });
51928
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/replace.js
51984
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/replace.js
51929
51985
  import fs13 from "node:fs";
51930
51986
  import path9 from "node:path";
51931
51987
  var replaceSync = (opt, files) => {
@@ -52117,7 +52173,7 @@ var replace = makeCommand(replaceSync, replaceAsync, () => {
52117
52173
  throw new TypeError("no paths specified to add/replace");
52118
52174
  }
52119
52175
  });
52120
- // node_modules/.pnpm/tar@7.5.1/node_modules/tar/dist/esm/update.js
52176
+ // node_modules/.pnpm/tar@7.5.2/node_modules/tar/dist/esm/update.js
52121
52177
  var update = makeCommand(replace.syncFile, replace.asyncFile, replace.syncNoFile, replace.asyncNoFile, (opt, entries = []) => {
52122
52178
  replace.validate?.(opt, entries);
52123
52179
  mtimeFilter(opt);
@@ -52425,9 +52481,9 @@ var unpackLib = async (filePath, cwd) => {
52425
52481
  }
52426
52482
  };
52427
52483
  var publishCommand = new Command("publish").description("发布应用").option("-k, --key <key>", "应用 key").option("-v, --version <version>", "应用版本").action(async (options) => {
52428
- const { key: key2, version: version2 } = options;
52484
+ const { key, version: version2 } = options;
52429
52485
  const config2 = await getConfig();
52430
- console.log("发布逻辑实现", { key: key2, version: version2, config: config2 });
52486
+ console.log("发布逻辑实现", { key, version: version2, config: config2 });
52431
52487
  });
52432
52488
  var deployLoadFn = async (id, fileKey, force = false, install = false) => {
52433
52489
  if (!id) {
@@ -52537,19 +52593,19 @@ var packCommand = new Command("pack").description("打包应用, 默认使用 pa
52537
52593
  }
52538
52594
  });
52539
52595
  var packDeployCommand = new Command("pack-deploy").argument("<id>", "id").option("-k, --key <key>", "fileKey, 服务器的部署文件夹的列表").option("-f --force", "force").option("-i, --install ", "install dependencies").action(async (id, opts) => {
52540
- let { force, key: key2, install } = opts || {};
52541
- if (!key2) {
52596
+ let { force, key, install } = opts || {};
52597
+ if (!key) {
52542
52598
  const answers = await esm_default12.prompt([
52543
52599
  {
52544
52600
  type: "input",
52545
52601
  name: "key",
52546
52602
  message: "Enter your deploy to services fileKey:",
52547
- when: () => !key2
52603
+ when: () => !key
52548
52604
  }
52549
52605
  ]);
52550
- key2 = answers.key || key2;
52606
+ key = answers.key || key;
52551
52607
  }
52552
- const res = await deployLoadFn(id, key2, force, install);
52608
+ const res = await deployLoadFn(id, key, force, install);
52553
52609
  });
52554
52610
  program.addCommand(packDeployCommand);
52555
52611
  program.addCommand(publishCommand);
@@ -53040,7 +53096,7 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
53040
53096
  return 1;
53041
53097
  }
53042
53098
  if ("CI" in env2) {
53043
- if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key2) => (key2 in env2))) {
53099
+ if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env2))) {
53044
53100
  return 3;
53045
53101
  }
53046
53102
  if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env2)) || env2.CI_NAME === "codeship") {
@@ -53435,18 +53491,18 @@ var getPackageJson = (opts) => {
53435
53491
  };
53436
53492
  var command2 = new Command("deploy").description("把前端文件传到服务器").argument("<filePath>", "Path to the file to be uploaded, filepath or directory").option("-v, --version <version>", "verbose").option("-k, --key <key>", "key").option("-y, --yes <yes>", "yes").option("-o, --org <org>", "org").option("-u, --update", "load current app. set current version in product。 redis 缓存更新").option("-s, --showBackend", "show backend url, 部署的后端应用,显示执行的cli命令").option("-c, --noCheck", "是否受app manager控制的模块。默认检测").option("-d, --dot", "是否上传隐藏文件").option("--dir, --directory <directory>", "上传的默认路径").action(async (filePath, options) => {
53437
53493
  try {
53438
- let { version: version2, key: key2, yes, update: update3, org, showBackend } = options;
53494
+ let { version: version2, key, yes, update: update3, org, showBackend } = options;
53439
53495
  const noCheck = !options.noCheck;
53440
53496
  const dot = !!options.dot;
53441
- const pkgInfo = getPackageJson({ version: version2, appKey: key2 });
53497
+ const pkgInfo = getPackageJson({ version: version2, appKey: key });
53442
53498
  if (!version2 && pkgInfo?.version) {
53443
53499
  version2 = pkgInfo?.version || "";
53444
53500
  }
53445
- if (!key2 && pkgInfo?.appKey) {
53446
- key2 = pkgInfo?.appKey || "";
53501
+ if (!key && pkgInfo?.appKey) {
53502
+ key = pkgInfo?.appKey || "";
53447
53503
  }
53448
53504
  console.log("start deploy");
53449
- if (!version2 || !key2) {
53505
+ if (!version2 || !key) {
53450
53506
  const answers = await esm_default12.prompt([
53451
53507
  {
53452
53508
  type: "input",
@@ -53458,11 +53514,11 @@ var command2 = new Command("deploy").description("把前端文件传到服务器
53458
53514
  type: "input",
53459
53515
  name: "key",
53460
53516
  message: "Enter your key:",
53461
- when: () => !key2
53517
+ when: () => !key
53462
53518
  }
53463
53519
  ]);
53464
53520
  version2 = answers.version || version2;
53465
- key2 = answers.key || key2;
53521
+ key = answers.key || key;
53466
53522
  }
53467
53523
  const pwd = process.cwd();
53468
53524
  const directory = path11.join(pwd, filePath);
@@ -53491,7 +53547,7 @@ var command2 = new Command("deploy").description("把前端文件传到服务器
53491
53547
  _relativeFiles = [filename];
53492
53548
  }
53493
53549
  console.log("upload Files", _relativeFiles);
53494
- console.log("upload Files Key", key2, version2);
53550
+ console.log("upload Files Key", key, version2);
53495
53551
  if (!yes) {
53496
53552
  const confirm = await esm_default12.prompt([
53497
53553
  {
@@ -53505,18 +53561,18 @@ var command2 = new Command("deploy").description("把前端文件传到服务器
53505
53561
  }
53506
53562
  }
53507
53563
  const uploadDirectory = isDirectory ? directory : path11.dirname(directory);
53508
- const res = await uploadFiles(_relativeFiles, uploadDirectory, { key: key2, version: version2, username: org, noCheckAppFiles: !noCheck, directory: options.directory });
53564
+ const res = await uploadFiles(_relativeFiles, uploadDirectory, { key, version: version2, username: org, noCheckAppFiles: !noCheck, directory: options.directory });
53509
53565
  if (res?.code === 200) {
53510
53566
  console.log("File uploaded successfully!");
53511
53567
  res.data?.upload?.map?.((d) => {
53512
53568
  console.log(source_default.green("uploaded file", d?.name, d?.path));
53513
53569
  });
53514
53570
  const res2 = await queryAppVersion({
53515
- key: key2,
53571
+ key,
53516
53572
  version: version2
53517
53573
  });
53518
53574
  if (res2.code !== 200) {
53519
- console.error(source_default.red("查询应用版本失败"), res2.message, key2);
53575
+ console.error(source_default.red("查询应用版本失败"), res2.message, key);
53520
53576
  return;
53521
53577
  }
53522
53578
  const { id, data, ...rest } = res2.data || {};
@@ -53553,7 +53609,7 @@ var command2 = new Command("deploy").description("把前端文件传到服务器
53553
53609
  }
53554
53610
  });
53555
53611
  var uploadFiles = async (files, directory, opts) => {
53556
- const { key: key2, version: version2, username } = opts || {};
53612
+ const { key, version: version2, username } = opts || {};
53557
53613
  const form = new import_form_data2.default;
53558
53614
  const data = { files: [] };
53559
53615
  for (const file of files) {
@@ -53565,9 +53621,9 @@ var uploadFiles = async (files, directory, opts) => {
53565
53621
  }
53566
53622
  data.files.push({ path: file, hash });
53567
53623
  }
53568
- data.appKey = key2;
53624
+ data.appKey = key;
53569
53625
  data.version = version2;
53570
- form.append("appKey", key2);
53626
+ form.append("appKey", key);
53571
53627
  form.append("version", version2);
53572
53628
  if (username) {
53573
53629
  form.append("username", username);
@@ -53642,9 +53698,9 @@ var deployLoadFn2 = async (id, org) => {
53642
53698
  if (res.code === 200) {
53643
53699
  console.log(source_default.green("deploy-load success. current version:", res.data?.version));
53644
53700
  try {
53645
- const { user, key: key2 } = res.data;
53701
+ const { user, key } = res.data;
53646
53702
  const baseURL3 = getBaseURL();
53647
- const deployURL = new URL(`/${user}/${key2}/`, baseURL3);
53703
+ const deployURL = new URL(`/${user}/${key}/`, baseURL3);
53648
53704
  console.log(source_default.blue("deployURL", deployURL.href));
53649
53705
  } catch (error) {}
53650
53706
  } else {
@@ -53655,16 +53711,16 @@ var deployLoad = new Command("deploy-load").description("部署加载").argument
53655
53711
  deployLoadFn2(id, opts?.org);
53656
53712
  });
53657
53713
  program.addCommand(deployLoad);
53658
- var local2 = new Command("local").description("本地部署").argument("<key>", "key").option("-i, --ignore", "使用 .npmignore 文件模式去忽略文件进行打包, 不需要package.json中的files字段").option("-u, --update", "query查询 127.0.0.1:11015/api/router?path=local-apps&key=detect").action(async (key2, opts) => {
53714
+ var local2 = new Command("local").description("本地部署").argument("<key>", "key").option("-i, --ignore", "使用 .npmignore 文件模式去忽略文件进行打包, 不需要package.json中的files字段").option("-u, --update", "query查询 127.0.0.1:11015/api/router?path=local-apps&key=detect").action(async (key, opts) => {
53659
53715
  console.log("local deploy");
53660
53716
  const { outputFilePath } = await packLib(opts?.ignore);
53661
53717
  const mainAppPath = getConfig().mainAppPath;
53662
53718
  const appsPath = getConfig().appsPath || path11.join(mainAppPath, "apps");
53663
- if (!key2) {
53719
+ if (!key) {
53664
53720
  console.error(source_default.red("key is required"));
53665
53721
  return;
53666
53722
  }
53667
- const appPath = path11.join(appsPath, key2);
53723
+ const appPath = path11.join(appsPath, key);
53668
53724
  if (!fs17.existsSync(appPath)) {
53669
53725
  fs17.mkdirSync(appPath, { recursive: true });
53670
53726
  }
@@ -53768,36 +53824,36 @@ var command3 = new Command("config").description("").option("-d, --dev <dev>", "
53768
53824
  }
53769
53825
  }
53770
53826
  if (options.set) {
53771
- const key2 = options.set;
53827
+ const key = options.set;
53772
53828
  let value = options.value;
53773
53829
  const answer = await esm_default12.prompt([
53774
53830
  {
53775
53831
  type: "input",
53776
53832
  name: "value",
53777
- message: `Enter your ${key2}:(current: ${config2[key2]})`,
53833
+ message: `Enter your ${key}:(current: ${config2[key]})`,
53778
53834
  when: () => !value
53779
53835
  }
53780
53836
  ]);
53781
53837
  value = answer.value || value;
53782
- if (key2 && value) {
53838
+ if (key && value) {
53783
53839
  flag = true;
53784
- config2[key2] = value;
53840
+ config2[key] = value;
53785
53841
  }
53786
53842
  }
53787
53843
  if (options.remove) {
53788
- const key2 = options.remove;
53789
- if (key2) {
53844
+ const key = options.remove;
53845
+ if (key) {
53790
53846
  flag = true;
53791
- delete config2[key2];
53847
+ delete config2[key];
53792
53848
  }
53793
53849
  }
53794
53850
  if (flag) {
53795
53851
  writeConfig(config2);
53796
53852
  }
53797
53853
  });
53798
- var setCommand = new Command("set").argument("<key>").argument("[value]", "value", "not_input").description("set config").action(async (key2, value) => {
53854
+ var setCommand = new Command("set").argument("<key>").argument("[value]", "value", "not_input").description("set config").action(async (key, value) => {
53799
53855
  const config2 = getConfig();
53800
- if (!key2) {
53856
+ if (!key) {
53801
53857
  console.log("key is empty");
53802
53858
  return;
53803
53859
  }
@@ -53806,14 +53862,14 @@ var setCommand = new Command("set").argument("<key>").argument("[value]", "value
53806
53862
  {
53807
53863
  type: "input",
53808
53864
  name: "value",
53809
- message: `Enter your ${key2}:(current: ${config2[key2]})`,
53865
+ message: `Enter your ${key}:(current: ${config2[key]})`,
53810
53866
  when: () => value === "not_input"
53811
53867
  }
53812
53868
  ]);
53813
53869
  if (value === "not_input" && !answer.value) {
53814
53870
  value = "";
53815
53871
  }
53816
- if (key2 === "workdir") {
53872
+ if (key === "workdir") {
53817
53873
  await setWorkdir({ workdir: value });
53818
53874
  return;
53819
53875
  }
@@ -53830,25 +53886,25 @@ var setCommand = new Command("set").argument("<key>").argument("[value]", "value
53830
53886
  return value2;
53831
53887
  };
53832
53888
  const newValue = transformValue(value);
53833
- if (key2 && value) {
53889
+ if (key && value) {
53834
53890
  flag = true;
53835
- if (key2 === "dev") {
53891
+ if (key === "dev") {
53836
53892
  if (value === "true") {
53837
53893
  config2.dev = true;
53838
53894
  } else {
53839
53895
  config2.dev = false;
53840
53896
  }
53841
53897
  } else {
53842
- config2[key2] = value;
53898
+ config2[key] = value;
53843
53899
  }
53844
- console.log(chalk2.green(`set ${key2} success:`, config2.key));
53900
+ console.log(chalk2.green(`set ${key} success:`, config2.key));
53845
53901
  }
53846
53902
  if (flag) {
53847
53903
  writeConfig(config2);
53848
53904
  }
53849
53905
  });
53850
53906
  command3.addCommand(setCommand);
53851
- var getCommand = new Command("get").argument("[key]", "key").description("get config").action(async (key2) => {
53907
+ var getCommand = new Command("get").argument("[key]", "key").description("get config").action(async (key) => {
53852
53908
  const config2 = getConfig();
53853
53909
  const keys = Object.keys(config2);
53854
53910
  const answer = await esm_default12.prompt([
@@ -53856,24 +53912,24 @@ var getCommand = new Command("get").argument("[key]", "key").description("get co
53856
53912
  type: "input",
53857
53913
  name: "key",
53858
53914
  message: `Enter your key:(keys: ${JSON.stringify(keys)})`,
53859
- when: () => !key2
53915
+ when: () => !key
53860
53916
  }
53861
53917
  ]);
53862
- key2 = answer.key || key2;
53863
- if (config2[key2]) {
53864
- console.log(chalk2.green(`get ${key2}:`));
53865
- console.log(config2[key2]);
53918
+ key = answer.key || key;
53919
+ if (config2[key]) {
53920
+ console.log(chalk2.green(`get ${key}:`));
53921
+ console.log(config2[key]);
53866
53922
  } else {
53867
- console.log(chalk2.red(`not found ${key2}`));
53923
+ console.log(chalk2.red(`not found ${key}`));
53868
53924
  }
53869
53925
  });
53870
53926
  command3.addCommand(getCommand);
53871
- var removeCommand = new Command("remove").argument("<key>").description("remove config").action(async (key2) => {
53927
+ var removeCommand = new Command("remove").argument("<key>").description("remove config").action(async (key) => {
53872
53928
  const config2 = getConfig();
53873
- if (key2) {
53874
- delete config2[key2];
53929
+ if (key) {
53930
+ delete config2[key];
53875
53931
  writeConfig(config2);
53876
- console.log(chalk2.green(`remove ${key2} success`));
53932
+ console.log(chalk2.green(`remove ${key} success`));
53877
53933
  }
53878
53934
  });
53879
53935
  command3.addCommand(removeCommand);
@@ -53889,7 +53945,7 @@ import util3 from "util";
53889
53945
  var router = new Command("router").description("router get");
53890
53946
  program.addCommand(router);
53891
53947
  var command4 = new Command("service").description("router services get").option("-p, --path <path>", "第一路径 path").option("-k, --key <key>", "第二路径 key").action(async (options) => {
53892
- let { path: path13, key: key2 } = options;
53948
+ let { path: path13, key } = options;
53893
53949
  if (!path13) {
53894
53950
  const answers = await esm_default12.prompt([
53895
53951
  {
@@ -53902,7 +53958,7 @@ var command4 = new Command("service").description("router services get").option(
53902
53958
  ]);
53903
53959
  path13 = answers.path || path13;
53904
53960
  }
53905
- if (!key2) {
53961
+ if (!key) {
53906
53962
  const answers = await esm_default12.prompt([
53907
53963
  {
53908
53964
  type: "input",
@@ -53911,9 +53967,9 @@ var command4 = new Command("service").description("router services get").option(
53911
53967
  message: "Enter your key:"
53912
53968
  }
53913
53969
  ]);
53914
- key2 = answers.key || key2;
53970
+ key = answers.key || key;
53915
53971
  }
53916
- const res = await query.post({ path: path13, key: key2 });
53972
+ const res = await query.post({ path: path13, key });
53917
53973
  if (res?.code === 200) {
53918
53974
  console.log("query success");
53919
53975
  const _list = res.data?.list || res.data;
@@ -53993,11 +54049,11 @@ var publish = new Command("publish").argument("[registry]").option("-p --proxy",
53993
54049
  break;
53994
54050
  }
53995
54051
  if (fileIsExist(packageJson)) {
53996
- const keys = Object.keys(config2).filter((key2) => key2.includes("NPM_TOKEN"));
53997
- const tokenEnv = keys.reduce((prev, key2) => {
54052
+ const keys = Object.keys(config2).filter((key) => key.includes("NPM_TOKEN"));
54053
+ const tokenEnv = keys.reduce((prev, key) => {
53998
54054
  return {
53999
54055
  ...prev,
54000
- [key2]: config2[key2]
54056
+ [key]: config2[key]
54001
54057
  };
54002
54058
  }, {});
54003
54059
  const pkg = fs19.readFileSync(packageJson, "utf-8");
@@ -54392,10 +54448,10 @@ class SyncBase {
54392
54448
  const sync = config2.sync || {};
54393
54449
  const keys = Object.keys(sync);
54394
54450
  const newConfigSync = {};
54395
- for (let key2 of keys) {
54396
- const keyPath = path15.join(dir, key2);
54451
+ for (let key of keys) {
54452
+ const keyPath = path15.join(dir, key);
54397
54453
  const newKey = path15.relative(dir, keyPath);
54398
- newConfigSync[newKey] = sync[key2];
54454
+ newConfigSync[newKey] = sync[key];
54399
54455
  }
54400
54456
  config2.sync = newConfigSync;
54401
54457
  this.config = config2;
@@ -54436,14 +54492,14 @@ class SyncBase {
54436
54492
  sync = this.getMergeSync(sync, syncDirectory.sync);
54437
54493
  const syncKeys = Object.keys(sync);
54438
54494
  const baseURL3 = this.baseURL;
54439
- const syncList = syncKeys.map((key2) => {
54440
- const value = sync[key2];
54441
- const filepath = path15.join(this.#dir, key2);
54495
+ const syncList = syncKeys.map((key) => {
54496
+ const value = sync[key];
54497
+ const filepath = path15.join(this.#dir, key);
54442
54498
  if (typeof value === "string") {
54443
54499
  const auth2 = checkAuth(value, baseURL3);
54444
54500
  const type2 = auth2 ? "sync" : "none";
54445
54501
  return {
54446
- key: key2,
54502
+ key,
54447
54503
  type: type2,
54448
54504
  filepath,
54449
54505
  url: value,
@@ -54453,7 +54509,7 @@ class SyncBase {
54453
54509
  const auth = checkAuth(value.url, baseURL3);
54454
54510
  const type = auth ? "sync" : "none";
54455
54511
  return {
54456
- key: key2,
54512
+ key,
54457
54513
  filepath,
54458
54514
  ...value,
54459
54515
  type: value?.type ?? type,
@@ -54468,8 +54524,8 @@ class SyncBase {
54468
54524
  async getCheckList() {
54469
54525
  const checkDir = this.config?.checkDir || {};
54470
54526
  const dirKeys = Object.keys(checkDir);
54471
- const files = dirKeys.map((key2) => {
54472
- return { key: key2, ...this.getRelativePath(key2) };
54527
+ const files = dirKeys.map((key) => {
54528
+ return { key, ...this.getRelativePath(key) };
54473
54529
  });
54474
54530
  return files.map((item) => {
54475
54531
  if (!item)
@@ -54488,9 +54544,9 @@ class SyncBase {
54488
54544
  const syncKeys = Object.keys(sync);
54489
54545
  const keys = [...syncKeys, ...syncFileSyncKeys];
54490
54546
  const obj = {};
54491
- for (let key2 of keys) {
54492
- const value = sync[key2] ?? fileSync[key2];
54493
- obj[key2] = value;
54547
+ for (let key of keys) {
54548
+ const value = sync[key] ?? fileSync[key];
54549
+ obj[key] = value;
54494
54550
  }
54495
54551
  return obj;
54496
54552
  }
@@ -54515,21 +54571,21 @@ class SyncBase {
54515
54571
  continue;
54516
54572
  }
54517
54573
  for (let file of glob_files) {
54518
- const key2 = path15.relative(cwd, file);
54574
+ const key = path15.relative(cwd, file);
54519
54575
  const _registryURL = new URL(registyURL);
54520
54576
  const replaceKeys = Object.keys(replace3);
54521
- let newKey = key2;
54577
+ let newKey = key;
54522
54578
  for (let replaceKey of replaceKeys) {
54523
54579
  if (newKey.startsWith(replaceKey)) {
54524
- newKey = key2.replace(replaceKey, replace3[replaceKey]);
54580
+ newKey = key.replace(replaceKey, replace3[replaceKey]);
54525
54581
  }
54526
54582
  }
54527
54583
  const pathname = path15.join(_registryURL.pathname, newKey);
54528
54584
  _registryURL.pathname = pathname;
54529
- keys.push(key2);
54530
- obj[key2] = { url: _registryURL.toString() };
54585
+ keys.push(key);
54586
+ obj[key] = { url: _registryURL.toString() };
54531
54587
  if (metadata) {
54532
- obj[key2] = { ...obj[key2], metadata };
54588
+ obj[key] = { ...obj[key], metadata };
54533
54589
  }
54534
54590
  }
54535
54591
  }
@@ -54655,24 +54711,21 @@ var rewritePkg = (packagePath, pkg) => {
54655
54711
  return pkg;
54656
54712
  };
54657
54713
  var installApp = async (app, opts = {}) => {
54658
- const { appDir = "", kevisualUrl = "https://kevisual.cn", isClient = false, appType = "web" } = opts;
54714
+ const { appDir = "", kevisualUrl = "https://kevisual.cn" } = opts;
54659
54715
  const _app = app;
54660
54716
  try {
54661
54717
  let files = _app.data.files || [];
54662
54718
  const version2 = _app.version;
54663
54719
  const user = _app.user;
54664
- const key2 = _app.key;
54665
- const downloadDirPath = appType === "web" ? path16.join(appDir, user, key2) : path16.join(appDir);
54720
+ const key = _app.key;
54721
+ const downloadDirPath = path16.join(appDir, user, key);
54666
54722
  await checkDelete({ force: opts?.force, yes: opts?.yes, dir: downloadDirPath });
54667
- const packagePath = path16.join(appDir, appType === "app" ? "package.json" : `${user}/${key2}/package.json`);
54723
+ const packagePath = path16.join(appDir, `${user}/${key}/package.json`);
54668
54724
  const downFiles = files.filter((file) => file?.path).map((file) => {
54669
54725
  const name2 = file?.name || "";
54670
54726
  const noVersionPath = file.path.replace(`/${version2}`, "");
54671
54727
  let downloadPath = noVersionPath;
54672
54728
  let downloadUrl = "";
54673
- if (appType === "app") {
54674
- downloadPath = noVersionPath.replace(`${user}/${key2}/`, "");
54675
- }
54676
54729
  if (file.path.startsWith("http")) {
54677
54730
  downloadUrl = file.path;
54678
54731
  } else {
@@ -54693,7 +54746,7 @@ var installApp = async (app, opts = {}) => {
54693
54746
  if (!fs22.existsSync(dir)) {
54694
54747
  fs22.mkdirSync(dir, { recursive: true });
54695
54748
  }
54696
- console.log("downloadUrwl", downloadUrl);
54749
+ console.log("downloadUrl", downloadUrl);
54697
54750
  const { blob, type } = await fetchLink(downloadUrl);
54698
54751
  if (type.includes("text/html")) {
54699
54752
  const html = await blob.text();
@@ -54737,10 +54790,10 @@ var checkFileExists2 = (path17) => {
54737
54790
  }
54738
54791
  };
54739
54792
  var uninstallApp = async (app, opts = {}) => {
54740
- const { appDir = "", type = "web" } = opts;
54793
+ const { appDir = "" } = opts;
54741
54794
  try {
54742
- const { user, key: key2 } = app;
54743
- const keyDir = path16.join(appDir, user, key2);
54795
+ const { user, key } = app;
54796
+ const keyDir = path16.join(appDir, user, key);
54744
54797
  const parentDir = path16.join(appDir, user);
54745
54798
  if (!checkFileExists2(appDir) || !checkFileExists2(keyDir)) {
54746
54799
  return {
@@ -54753,7 +54806,7 @@ var uninstallApp = async (app, opts = {}) => {
54753
54806
  } catch (error) {
54754
54807
  console.error(error);
54755
54808
  }
54756
- type === "web" && checkAppDir(parentDir);
54809
+ checkAppDir(parentDir);
54757
54810
  return {
54758
54811
  code: 200,
54759
54812
  message: "Uninstall app success"
@@ -54994,7 +55047,7 @@ var appCommand = new Command("app").description("app 命令").action(() => {
54994
55047
  });
54995
55048
  program.addCommand(appCommand);
54996
55049
  var downloadAppCommand = new Command("download").description(`下载 app serve client的包.
54997
- app download -i root/code-center`).option("-i, --id <id>", "下载 app serve client的包, id 或者user/key").option("-o, --output <output>", "下载 app serve client的包, 输出路径, 默认是当前目录").option("-t, --type <type>", "下载 app serve client的包, 类型, app,或者web, 默认为web").option("-r, --registry <registry>", "下载 app serve client的包, 使用私有源").option("-f, --force ", "强制覆盖").option("-y, --yes ", "覆盖的时候不提示").action(async (options) => {
55050
+ app download -i root/code-center`).option("-i, --id <id>", "下载 app serve client的包, id 或者user/key").option("-o, --output <output>", "下载 app serve client的包, 输出路径, 默认是当前目录").option("-r, --registry <registry>", "下载 app serve client的包, 使用私有源").option("-f, --force ", "强制覆盖").option("-y, --yes ", "覆盖的时候不提示").action(async (options) => {
54998
55051
  const id = options.id || "";
54999
55052
  const output = options.output || "";
55000
55053
  if (!id) {
@@ -55007,11 +55060,11 @@ app download -i root/code-center`).option("-i, --id <id>", "下载 app serve cli
55007
55060
  fs24.mkdirSync(output, { recursive: true });
55008
55061
  }
55009
55062
  }
55010
- const [user, key2] = id.split("/");
55063
+ const [user, key] = id.split("/");
55011
55064
  const data = {};
55012
- if (user && key2) {
55065
+ if (user && key) {
55013
55066
  data.user = user;
55014
- data.key = key2;
55067
+ data.key = key;
55015
55068
  } else {
55016
55069
  data.id = id;
55017
55070
  }
@@ -55026,16 +55079,9 @@ app download -i root/code-center`).option("-i, --id <id>", "下载 app serve cli
55026
55079
  console.log("registry", registry, data, options.type);
55027
55080
  if (res.code === 200) {
55028
55081
  const app = res.data;
55029
- let appType = "web";
55030
- if (options.type === "app") {
55031
- appType = "app";
55032
- } else if (options.type === "web") {
55033
- appType = "web";
55034
- }
55035
55082
  const result = await installApp(app, {
55036
55083
  appDir: output,
55037
55084
  kevisualUrl: registry,
55038
- appType,
55039
55085
  force: options.force,
55040
55086
  yes: options.yes
55041
55087
  });
@@ -55048,7 +55094,7 @@ app download -i root/code-center`).option("-i, --id <id>", "下载 app serve cli
55048
55094
  console.error(chalk2.red(res.message || "下载失败"));
55049
55095
  }
55050
55096
  });
55051
- var uninstallAppCommand = new Command("uninstall").alias("remove").description("卸载 app serve client的包。 手动删除更简单。").option("-i, --id <id>", "user/key").option("-t, --type <type>", "app,或者web, 默认为web", "web").option("-p, --path <path>", "删除的路径, 如果存在,则优先执行,不会去判断 id 和 type 。").action(async (options) => {
55097
+ var uninstallAppCommand = new Command("uninstall").alias("remove").description("卸载 app serve client的包。 手动删除更简单。").option("-i, --id <id>", "user/key").option("-p, --path <path>", "删除的路径, 如果存在,则优先执行,不会去判断 id 和 type 。").action(async (options) => {
55052
55098
  if (options.path) {
55053
55099
  const _path2 = path18.resolve(options.path);
55054
55100
  try {
@@ -55079,24 +55125,24 @@ var uninstallAppCommand = new Command("uninstall").alias("remove").description("
55079
55125
  console.error(chalk2.red("id is required"));
55080
55126
  return;
55081
55127
  }
55082
- const [user, key2] = id.split("/");
55128
+ const [user, key] = id.split("/");
55083
55129
  const data = {};
55084
- if (user && key2) {
55130
+ if (user && key) {
55085
55131
  data.user = user;
55086
- data.key = key2;
55132
+ data.key = key;
55087
55133
  } else {
55088
55134
  console.error(chalk2.red("id is required user/key"));
55089
55135
  return;
55090
55136
  }
55091
55137
  const result = await uninstallApp({
55092
55138
  user,
55093
- key: key2
55139
+ key
55094
55140
  }, {
55095
55141
  appDir: "",
55096
55142
  type: options.type
55097
55143
  });
55098
55144
  if (result.code === 200) {
55099
- console.log(chalk2.green("卸载成功", user, key2));
55145
+ console.log(chalk2.green("卸载成功", user, key));
55100
55146
  } else {
55101
55147
  console.error(chalk2.red(result.message || "卸载失败"));
55102
55148
  }