@kevisual/cli 0.1.38 → 0.1.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -4,25 +4,43 @@ var __getProtoOf = Object.getPrototypeOf;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ function __accessProp(key) {
8
+ return this[key];
9
+ }
10
+ var __toESMCache_node;
11
+ var __toESMCache_esm;
7
12
  var __toESM = (mod, isNodeMode, target) => {
13
+ var canCache = mod != null && typeof mod === "object";
14
+ if (canCache) {
15
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
+ var cached = cache.get(mod);
17
+ if (cached)
18
+ return cached;
19
+ }
8
20
  target = mod != null ? __create(__getProtoOf(mod)) : {};
9
21
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
10
22
  for (let key of __getOwnPropNames(mod))
11
23
  if (!__hasOwnProp.call(to, key))
12
24
  __defProp(to, key, {
13
- get: () => mod[key],
25
+ get: __accessProp.bind(mod, key),
14
26
  enumerable: true
15
27
  });
28
+ if (canCache)
29
+ cache.set(mod, to);
16
30
  return to;
17
31
  };
18
32
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
33
+ var __returnValue = (v) => v;
34
+ function __exportSetter(name, newValue) {
35
+ this[name] = __returnValue.bind(null, newValue);
36
+ }
19
37
  var __export = (target, all) => {
20
38
  for (var name in all)
21
39
  __defProp(target, name, {
22
40
  get: all[name],
23
41
  enumerable: true,
24
42
  configurable: true,
25
- set: (newValue) => all[name] = () => newValue
43
+ set: __exportSetter.bind(all, name)
26
44
  });
27
45
  };
28
46
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
@@ -10475,15 +10493,15 @@ ${itemIndentStr}`);
10475
10493
  }
10476
10494
  let sumChunks = [chunks.shift()];
10477
10495
  let sumWidth = this.displayWidth(sumChunks[0]);
10478
- chunks.forEach((chunk) => {
10479
- const visibleWidth = this.displayWidth(chunk);
10496
+ chunks.forEach((chunk2) => {
10497
+ const visibleWidth = this.displayWidth(chunk2);
10480
10498
  if (sumWidth + visibleWidth <= width) {
10481
- sumChunks.push(chunk);
10499
+ sumChunks.push(chunk2);
10482
10500
  sumWidth += visibleWidth;
10483
10501
  return;
10484
10502
  }
10485
10503
  wrappedLines.push(sumChunks.join(""));
10486
- const nextChunk = chunk.trimStart();
10504
+ const nextChunk = chunk2.trimStart();
10487
10505
  sumChunks = [nextChunk];
10488
10506
  sumWidth = this.displayWidth(nextChunk);
10489
10507
  });
@@ -21567,7 +21585,7 @@ var require_get_intrinsic = __commonJS((exports, module) => {
21567
21585
  var max = require_max();
21568
21586
  var min = require_min();
21569
21587
  var pow = require_pow();
21570
- var round = require_round();
21588
+ var round2 = require_round();
21571
21589
  var sign2 = require_sign2();
21572
21590
  var $Function = Function;
21573
21591
  var getEvalledConstructor = function(expressionSyntax) {
@@ -21679,7 +21697,7 @@ var require_get_intrinsic = __commonJS((exports, module) => {
21679
21697
  "%Math.max%": max,
21680
21698
  "%Math.min%": min,
21681
21699
  "%Math.pow%": pow,
21682
- "%Math.round%": round,
21700
+ "%Math.round%": round2,
21683
21701
  "%Math.sign%": sign2,
21684
21702
  "%Reflect.getPrototypeOf%": $ReflectGPO
21685
21703
  };
@@ -21779,10 +21797,10 @@ var require_get_intrinsic = __commonJS((exports, module) => {
21779
21797
  var reEscapeChar = /\\(\\)?/g;
21780
21798
  var stringToPath = function stringToPath2(string5) {
21781
21799
  var first = $strSlice(string5, 0, 1);
21782
- var last = $strSlice(string5, -1);
21783
- if (first === "%" && last !== "%") {
21800
+ var last2 = $strSlice(string5, -1);
21801
+ if (first === "%" && last2 !== "%") {
21784
21802
  throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
21785
- } else if (last === "%" && first !== "%") {
21803
+ } else if (last2 === "%" && first !== "%") {
21786
21804
  throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
21787
21805
  }
21788
21806
  var result = [];
@@ -21838,8 +21856,8 @@ var require_get_intrinsic = __commonJS((exports, module) => {
21838
21856
  for (var i = 1, isOwn = true;i < parts.length; i += 1) {
21839
21857
  var part = parts[i];
21840
21858
  var first = $strSlice(part, 0, 1);
21841
- var last = $strSlice(part, -1);
21842
- if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
21859
+ var last2 = $strSlice(part, -1);
21860
+ if ((first === '"' || first === "'" || first === "`" || (last2 === '"' || last2 === "'" || last2 === "`")) && first !== last2) {
21843
21861
  throw new $SyntaxError("property names with quotes must have matching quotes");
21844
21862
  }
21845
21863
  if (part === "constructor" || !isOwn) {
@@ -22261,13 +22279,13 @@ var require_kind_of = __commonJS((exports, module) => {
22261
22279
  }
22262
22280
  if (isArray(val))
22263
22281
  return "array";
22264
- if (isBuffer(val))
22282
+ if (isBuffer2(val))
22265
22283
  return "buffer";
22266
22284
  if (isArguments(val))
22267
22285
  return "arguments";
22268
- if (isDate(val))
22286
+ if (isDate3(val))
22269
22287
  return "date";
22270
- if (isError(val))
22288
+ if (isError2(val))
22271
22289
  return "error";
22272
22290
  if (isRegexp(val))
22273
22291
  return "regexp";
@@ -22329,10 +22347,10 @@ var require_kind_of = __commonJS((exports, module) => {
22329
22347
  return Array.isArray(val);
22330
22348
  return val instanceof Array;
22331
22349
  }
22332
- function isError(val) {
22350
+ function isError2(val) {
22333
22351
  return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number";
22334
22352
  }
22335
- function isDate(val) {
22353
+ function isDate3(val) {
22336
22354
  if (val instanceof Date)
22337
22355
  return true;
22338
22356
  return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function";
@@ -22360,7 +22378,7 @@ var require_kind_of = __commonJS((exports, module) => {
22360
22378
  }
22361
22379
  return false;
22362
22380
  }
22363
- function isBuffer(val) {
22381
+ function isBuffer2(val) {
22364
22382
  if (val.constructor && typeof val.constructor.isBuffer === "function") {
22365
22383
  return val.constructor.isBuffer(val);
22366
22384
  }
@@ -22418,7 +22436,7 @@ var require_section_matter = __commonJS((exports, module) => {
22418
22436
  options2 = { parse: options2 };
22419
22437
  }
22420
22438
  var file3 = toObject(input);
22421
- var defaults = { section_delimiter: "---", parse: identity };
22439
+ var defaults = { section_delimiter: "---", parse: identity2 };
22422
22440
  var opts = extend3({}, defaults, options2);
22423
22441
  var delim = opts.section_delimiter;
22424
22442
  var lines = file3.content.split(/\r?\n/);
@@ -22494,7 +22512,7 @@ var require_section_matter = __commonJS((exports, module) => {
22494
22512
  if (typeOf(input) !== "object") {
22495
22513
  input = { content: input };
22496
22514
  }
22497
- if (typeof input.content !== "string" && !isBuffer(input.content)) {
22515
+ if (typeof input.content !== "string" && !isBuffer2(input.content)) {
22498
22516
  throw new TypeError("expected a buffer or string");
22499
22517
  }
22500
22518
  input.content = input.content.toString();
@@ -22507,10 +22525,10 @@ var require_section_matter = __commonJS((exports, module) => {
22507
22525
  function createSection() {
22508
22526
  return { key: "", data: "", content: "" };
22509
22527
  }
22510
- function identity(val) {
22528
+ function identity2(val) {
22511
22529
  return val;
22512
22530
  }
22513
- function isBuffer(val) {
22531
+ function isBuffer2(val) {
22514
22532
  if (val && val.constructor && typeof val.constructor.isBuffer === "function") {
22515
22533
  return val.constructor.isBuffer(val);
22516
22534
  }
@@ -22578,10 +22596,10 @@ var require_exception = __commonJS((exports, module) => {
22578
22596
  }
22579
22597
  YAMLException.prototype = Object.create(Error.prototype);
22580
22598
  YAMLException.prototype.constructor = YAMLException;
22581
- YAMLException.prototype.toString = function toString(compact) {
22599
+ YAMLException.prototype.toString = function toString(compact2) {
22582
22600
  var result = this.name + ": ";
22583
22601
  result += this.reason || "(unknown reason)";
22584
- if (!compact && this.mark) {
22602
+ if (!compact2 && this.mark) {
22585
22603
  result += " " + this.mark.toString();
22586
22604
  }
22587
22605
  return result;
@@ -22600,44 +22618,44 @@ var require_mark = __commonJS((exports, module) => {
22600
22618
  this.column = column;
22601
22619
  }
22602
22620
  Mark.prototype.getSnippet = function getSnippet(indent, maxLength) {
22603
- var head, start, tail, end, snippet;
22621
+ var head2, start, tail2, end, snippet;
22604
22622
  if (!this.buffer)
22605
22623
  return null;
22606
22624
  indent = indent || 4;
22607
22625
  maxLength = maxLength || 75;
22608
- head = "";
22626
+ head2 = "";
22609
22627
  start = this.position;
22610
22628
  while (start > 0 && `\x00\r
22611
22629
  …\u2028\u2029`.indexOf(this.buffer.charAt(start - 1)) === -1) {
22612
22630
  start -= 1;
22613
22631
  if (this.position - start > maxLength / 2 - 1) {
22614
- head = " ... ";
22632
+ head2 = " ... ";
22615
22633
  start += 5;
22616
22634
  break;
22617
22635
  }
22618
22636
  }
22619
- tail = "";
22637
+ tail2 = "";
22620
22638
  end = this.position;
22621
22639
  while (end < this.buffer.length && `\x00\r
22622
22640
  …\u2028\u2029`.indexOf(this.buffer.charAt(end)) === -1) {
22623
22641
  end += 1;
22624
22642
  if (end - this.position > maxLength / 2 - 1) {
22625
- tail = " ... ";
22643
+ tail2 = " ... ";
22626
22644
  end -= 5;
22627
22645
  break;
22628
22646
  }
22629
22647
  }
22630
22648
  snippet = this.buffer.slice(start, end);
22631
- return common2.repeat(" ", indent) + head + snippet + tail + `
22632
- ` + common2.repeat(" ", indent + this.position - start + head.length) + "^";
22649
+ return common2.repeat(" ", indent) + head2 + snippet + tail2 + `
22650
+ ` + common2.repeat(" ", indent + this.position - start + head2.length) + "^";
22633
22651
  };
22634
- Mark.prototype.toString = function toString(compact) {
22652
+ Mark.prototype.toString = function toString(compact2) {
22635
22653
  var snippet, where = "";
22636
22654
  if (this.name) {
22637
22655
  where += 'in "' + this.name + '" ';
22638
22656
  }
22639
22657
  where += "at line " + (this.line + 1) + ", column " + (this.column + 1);
22640
- if (!compact) {
22658
+ if (!compact2) {
22641
22659
  snippet = this.getSnippet();
22642
22660
  if (snippet) {
22643
22661
  where += `:
@@ -22847,14 +22865,14 @@ var require_null = __commonJS((exports, module) => {
22847
22865
  function constructYamlNull() {
22848
22866
  return null;
22849
22867
  }
22850
- function isNull(object3) {
22868
+ function isNull2(object3) {
22851
22869
  return object3 === null;
22852
22870
  }
22853
22871
  module.exports = new Type("tag:yaml.org,2002:null", {
22854
22872
  kind: "scalar",
22855
22873
  resolve: resolveYamlNull,
22856
22874
  construct: constructYamlNull,
22857
- predicate: isNull,
22875
+ predicate: isNull2,
22858
22876
  represent: {
22859
22877
  canonical: function() {
22860
22878
  return "~";
@@ -22885,14 +22903,14 @@ var require_bool = __commonJS((exports, module) => {
22885
22903
  function constructYamlBoolean(data) {
22886
22904
  return data === "true" || data === "True" || data === "TRUE";
22887
22905
  }
22888
- function isBoolean(object3) {
22906
+ function isBoolean2(object3) {
22889
22907
  return Object.prototype.toString.call(object3) === "[object Boolean]";
22890
22908
  }
22891
22909
  module.exports = new Type("tag:yaml.org,2002:bool", {
22892
22910
  kind: "scalar",
22893
22911
  resolve: resolveYamlBoolean,
22894
22912
  construct: constructYamlBoolean,
22895
- predicate: isBoolean,
22913
+ predicate: isBoolean2,
22896
22914
  represent: {
22897
22915
  lowercase: function(object3) {
22898
22916
  return object3 ? "true" : "false";
@@ -23294,7 +23312,7 @@ var require_binary = __commonJS((exports, module) => {
23294
23312
  return result;
23295
23313
  }
23296
23314
  function representYamlBinary(object3) {
23297
- var result = "", bits = 0, idx, tail, max = object3.length, map3 = BASE64_MAP;
23315
+ var result = "", bits = 0, idx, tail2, max = object3.length, map3 = BASE64_MAP;
23298
23316
  for (idx = 0;idx < max; idx++) {
23299
23317
  if (idx % 3 === 0 && idx) {
23300
23318
  result += map3[bits >> 18 & 63];
@@ -23304,18 +23322,18 @@ var require_binary = __commonJS((exports, module) => {
23304
23322
  }
23305
23323
  bits = (bits << 8) + object3[idx];
23306
23324
  }
23307
- tail = max % 3;
23308
- if (tail === 0) {
23325
+ tail2 = max % 3;
23326
+ if (tail2 === 0) {
23309
23327
  result += map3[bits >> 18 & 63];
23310
23328
  result += map3[bits >> 12 & 63];
23311
23329
  result += map3[bits >> 6 & 63];
23312
23330
  result += map3[bits & 63];
23313
- } else if (tail === 2) {
23331
+ } else if (tail2 === 2) {
23314
23332
  result += map3[bits >> 10 & 63];
23315
23333
  result += map3[bits >> 4 & 63];
23316
23334
  result += map3[bits << 2 & 63];
23317
23335
  result += map3[64];
23318
- } else if (tail === 1) {
23336
+ } else if (tail2 === 1) {
23319
23337
  result += map3[bits >> 2 & 63];
23320
23338
  result += map3[bits << 4 & 63];
23321
23339
  result += map3[64];
@@ -23473,14 +23491,14 @@ var require_undefined = __commonJS((exports, module) => {
23473
23491
  function representJavascriptUndefined() {
23474
23492
  return "";
23475
23493
  }
23476
- function isUndefined(object3) {
23494
+ function isUndefined2(object3) {
23477
23495
  return typeof object3 === "undefined";
23478
23496
  }
23479
23497
  module.exports = new Type("tag:yaml.org,2002:js/undefined", {
23480
23498
  kind: "scalar",
23481
23499
  resolve: resolveJavascriptUndefined,
23482
23500
  construct: constructJavascriptUndefined,
23483
- predicate: isUndefined,
23501
+ predicate: isUndefined2,
23484
23502
  represent: representJavascriptUndefined
23485
23503
  });
23486
23504
  });
@@ -23493,10 +23511,10 @@ var require_regexp = __commonJS((exports, module) => {
23493
23511
  return false;
23494
23512
  if (data.length === 0)
23495
23513
  return false;
23496
- var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = "";
23514
+ var regexp = data, tail2 = /\/([gim]*)$/.exec(data), modifiers = "";
23497
23515
  if (regexp[0] === "/") {
23498
- if (tail)
23499
- modifiers = tail[1];
23516
+ if (tail2)
23517
+ modifiers = tail2[1];
23500
23518
  if (modifiers.length > 3)
23501
23519
  return false;
23502
23520
  if (regexp[regexp.length - modifiers.length - 1] !== "/")
@@ -23505,10 +23523,10 @@ var require_regexp = __commonJS((exports, module) => {
23505
23523
  return true;
23506
23524
  }
23507
23525
  function constructJavascriptRegExp(data) {
23508
- var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = "";
23526
+ var regexp = data, tail2 = /\/([gim]*)$/.exec(data), modifiers = "";
23509
23527
  if (regexp[0] === "/") {
23510
- if (tail)
23511
- modifiers = tail[1];
23528
+ if (tail2)
23529
+ modifiers = tail2[1];
23512
23530
  regexp = regexp.slice(1, regexp.length - modifiers.length - 1);
23513
23531
  }
23514
23532
  return new RegExp(regexp, modifiers);
@@ -23523,14 +23541,14 @@ var require_regexp = __commonJS((exports, module) => {
23523
23541
  result += "i";
23524
23542
  return result;
23525
23543
  }
23526
- function isRegExp(object3) {
23544
+ function isRegExp2(object3) {
23527
23545
  return Object.prototype.toString.call(object3) === "[object RegExp]";
23528
23546
  }
23529
23547
  module.exports = new Type("tag:yaml.org,2002:js/regexp", {
23530
23548
  kind: "scalar",
23531
23549
  resolve: resolveJavascriptRegExp,
23532
23550
  construct: constructJavascriptRegExp,
23533
- predicate: isRegExp,
23551
+ predicate: isRegExp2,
23534
23552
  represent: representJavascriptRegExp
23535
23553
  });
23536
23554
  });
@@ -23577,14 +23595,14 @@ var require_function = __commonJS((exports, module) => {
23577
23595
  function representJavascriptFunction(object3) {
23578
23596
  return object3.toString();
23579
23597
  }
23580
- function isFunction(object3) {
23598
+ function isFunction2(object3) {
23581
23599
  return Object.prototype.toString.call(object3) === "[object Function]";
23582
23600
  }
23583
23601
  module.exports = new Type("tag:yaml.org,2002:js/function", {
23584
23602
  kind: "scalar",
23585
23603
  resolve: resolveJavascriptFunction,
23586
23604
  construct: constructJavascriptFunction,
23587
- predicate: isFunction,
23605
+ predicate: isFunction2,
23588
23606
  represent: representJavascriptFunction
23589
23607
  });
23590
23608
  });
@@ -25074,11 +25092,11 @@ var require_dumper = __commonJS((exports, module) => {
25074
25092
  state.tag = _tag;
25075
25093
  state.dump = "[" + _result + "]";
25076
25094
  }
25077
- function writeBlockSequence(state, level2, object3, compact) {
25095
+ function writeBlockSequence(state, level2, object3, compact2) {
25078
25096
  var _result = "", _tag = state.tag, index, length;
25079
25097
  for (index = 0, length = object3.length;index < length; index += 1) {
25080
25098
  if (writeNode(state, level2 + 1, object3[index], true, true)) {
25081
- if (!compact || index !== 0) {
25099
+ if (!compact2 || index !== 0) {
25082
25100
  _result += generateNextLine(state, level2);
25083
25101
  }
25084
25102
  if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
@@ -25117,7 +25135,7 @@ var require_dumper = __commonJS((exports, module) => {
25117
25135
  state.tag = _tag;
25118
25136
  state.dump = "{" + _result + "}";
25119
25137
  }
25120
- function writeBlockMapping(state, level2, object3, compact) {
25138
+ function writeBlockMapping(state, level2, object3, compact2) {
25121
25139
  var _result = "", _tag = state.tag, objectKeyList = Object.keys(object3), index, length, objectKey, objectValue, explicitPair, pairBuffer;
25122
25140
  if (state.sortKeys === true) {
25123
25141
  objectKeyList.sort();
@@ -25128,7 +25146,7 @@ var require_dumper = __commonJS((exports, module) => {
25128
25146
  }
25129
25147
  for (index = 0, length = objectKeyList.length;index < length; index += 1) {
25130
25148
  pairBuffer = "";
25131
- if (!compact || index !== 0) {
25149
+ if (!compact2 || index !== 0) {
25132
25150
  pairBuffer += generateNextLine(state, level2);
25133
25151
  }
25134
25152
  objectKey = objectKeyList[index];
@@ -25185,7 +25203,7 @@ var require_dumper = __commonJS((exports, module) => {
25185
25203
  }
25186
25204
  return false;
25187
25205
  }
25188
- function writeNode(state, level2, object3, block, compact, iskey) {
25206
+ function writeNode(state, level2, object3, block, compact2, iskey) {
25189
25207
  state.tag = null;
25190
25208
  state.dump = object3;
25191
25209
  if (!detectType(state, object3, false)) {
@@ -25201,7 +25219,7 @@ var require_dumper = __commonJS((exports, module) => {
25201
25219
  duplicate = duplicateIndex !== -1;
25202
25220
  }
25203
25221
  if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level2 > 0) {
25204
- compact = false;
25222
+ compact2 = false;
25205
25223
  }
25206
25224
  if (duplicate && state.usedDuplicates[duplicateIndex]) {
25207
25225
  state.dump = "*ref_" + duplicateIndex;
@@ -25211,7 +25229,7 @@ var require_dumper = __commonJS((exports, module) => {
25211
25229
  }
25212
25230
  if (type === "[object Object]") {
25213
25231
  if (block && Object.keys(state.dump).length !== 0) {
25214
- writeBlockMapping(state, level2, state.dump, compact);
25232
+ writeBlockMapping(state, level2, state.dump, compact2);
25215
25233
  if (duplicate) {
25216
25234
  state.dump = "&ref_" + duplicateIndex + state.dump;
25217
25235
  }
@@ -25224,7 +25242,7 @@ var require_dumper = __commonJS((exports, module) => {
25224
25242
  } else if (type === "[object Array]") {
25225
25243
  var arrayLevel = state.noArrayIndent && level2 > 0 ? level2 - 1 : level2;
25226
25244
  if (block && state.dump.length !== 0) {
25227
- writeBlockSequence(state, arrayLevel, state.dump, compact);
25245
+ writeBlockSequence(state, arrayLevel, state.dump, compact2);
25228
25246
  if (duplicate) {
25229
25247
  state.dump = "&ref_" + duplicateIndex + state.dump;
25230
25248
  }
@@ -25724,15 +25742,15 @@ var __getProtoOf2 = Object.getPrototypeOf;
25724
25742
  var __defProp2 = Object.defineProperty;
25725
25743
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
25726
25744
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
25727
- function __accessProp(key) {
25745
+ function __accessProp2(key) {
25728
25746
  return this[key];
25729
25747
  }
25730
- var __toESMCache_node;
25731
- var __toESMCache_esm;
25748
+ var __toESMCache_node2;
25749
+ var __toESMCache_esm2;
25732
25750
  var __toESM2 = (mod, isNodeMode, target) => {
25733
25751
  var canCache = mod != null && typeof mod === "object";
25734
25752
  if (canCache) {
25735
- var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
25753
+ var cache = isNodeMode ? __toESMCache_node2 ??= new WeakMap : __toESMCache_esm2 ??= new WeakMap;
25736
25754
  var cached = cache.get(mod);
25737
25755
  if (cached)
25738
25756
  return cached;
@@ -25742,7 +25760,7 @@ var __toESM2 = (mod, isNodeMode, target) => {
25742
25760
  for (let key of __getOwnPropNames2(mod))
25743
25761
  if (!__hasOwnProp2.call(to, key))
25744
25762
  __defProp2(to, key, {
25745
- get: __accessProp.bind(mod, key),
25763
+ get: __accessProp2.bind(mod, key),
25746
25764
  enumerable: true
25747
25765
  });
25748
25766
  if (canCache)
@@ -25750,9 +25768,9 @@ var __toESM2 = (mod, isNodeMode, target) => {
25750
25768
  return to;
25751
25769
  };
25752
25770
  var __commonJS2 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
25753
- var __returnValue = (v) => v;
25754
- function __exportSetter(name, newValue) {
25755
- this[name] = __returnValue.bind(null, newValue);
25771
+ var __returnValue2 = (v) => v;
25772
+ function __exportSetter2(name, newValue) {
25773
+ this[name] = __returnValue2.bind(null, newValue);
25756
25774
  }
25757
25775
  var __export2 = (target, all) => {
25758
25776
  for (var name in all)
@@ -25760,7 +25778,7 @@ var __export2 = (target, all) => {
25760
25778
  get: all[name],
25761
25779
  enumerable: true,
25762
25780
  configurable: true,
25763
- set: __exportSetter.bind(all, name)
25781
+ set: __exportSetter2.bind(all, name)
25764
25782
  });
25765
25783
  };
25766
25784
  var __require2 = /* @__PURE__ */ createRequire2(import.meta.url);
@@ -62622,7 +62640,6 @@ var normalizeScriptPath = (scriptPath) => {
62622
62640
 
62623
62641
  // src/module/download/install.ts
62624
62642
  var import_fast_glob = __toESM(require_out4(), 1);
62625
-
62626
62643
  // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/key.js
62627
62644
  var isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
62628
62645
  var isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
@@ -67950,17 +67967,6 @@ var loginInCommand = async () => {
67950
67967
 
67951
67968
  // src/routes/login.ts
67952
67969
  import util2 from "util";
67953
-
67954
- // node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
67955
- function isPrimitive(value) {
67956
- return value == null || typeof value !== "object" && typeof value !== "function";
67957
- }
67958
-
67959
- // node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
67960
- function isTypedArray(x) {
67961
- return ArrayBuffer.isView(x) && !(x instanceof DataView);
67962
- }
67963
-
67964
67970
  // node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
67965
67971
  function getSymbols(object3) {
67966
67972
  return Object.getOwnPropertySymbols(object3).filter((symbol3) => Object.prototype.propertyIsEnumerable.call(object3, symbol3));
@@ -67998,6 +68004,16 @@ var int32ArrayTag = "[object Int32Array]";
67998
68004
  var float32ArrayTag = "[object Float32Array]";
67999
68005
  var float64ArrayTag = "[object Float64Array]";
68000
68006
 
68007
+ // node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
68008
+ function isPrimitive(value) {
68009
+ return value == null || typeof value !== "object" && typeof value !== "function";
68010
+ }
68011
+
68012
+ // node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
68013
+ function isTypedArray(x) {
68014
+ return ArrayBuffer.isView(x) && !(x instanceof DataView);
68015
+ }
68016
+
68001
68017
  // node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
68002
68018
  function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = new Map, cloneValue = undefined) {
68003
68019
  const cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);
@@ -68394,10 +68410,10 @@ var adapter3 = async (opts = {}, overloadOpts) => {
68394
68410
  } else if (opts.isText) {
68395
68411
  responseType = "text";
68396
68412
  }
68397
- const timeout = opts.timeout || 60000 * 3;
68413
+ const timeout2 = opts.timeout || 60000 * 3;
68398
68414
  const timer = setTimeout(() => {
68399
68415
  controller.abort();
68400
- }, timeout);
68416
+ }, timeout2);
68401
68417
  let method = overloadOpts?.method || opts?.method || "POST";
68402
68418
  let headers = { ...opts?.headers, ...overloadOpts?.headers };
68403
68419
  let origin = "";
@@ -68536,18 +68552,18 @@ class Query3 {
68536
68552
  }
68537
68553
  async post(body, options2) {
68538
68554
  const url4 = options2?.url || this.url;
68539
- const { headers, adapter: adapter22, beforeRequest, afterResponse, timeout, ...rest } = options2 || {};
68555
+ const { headers, adapter: adapter22, beforeRequest, afterResponse, timeout: timeout2, ...rest2 } = options2 || {};
68540
68556
  const _headers = { ...this.headers, ...headers };
68541
68557
  const _adapter = adapter22 || this.adapter;
68542
68558
  const _beforeRequest = beforeRequest || this.beforeRequest;
68543
68559
  const _afterResponse = afterResponse || this.afterResponse;
68544
- const _timeout = timeout || this.timeout;
68560
+ const _timeout = timeout2 || this.timeout;
68545
68561
  const req = {
68546
68562
  url: url4,
68547
68563
  headers: _headers,
68548
68564
  body,
68549
68565
  timeout: _timeout,
68550
- ...rest
68566
+ ...rest2
68551
68567
  };
68552
68568
  try {
68553
68569
  if (_beforeRequest) {
@@ -68834,10 +68850,10 @@ var adapter4 = async (opts = {}, overloadOpts) => {
68834
68850
  } else if (opts.isText) {
68835
68851
  responseType = "text";
68836
68852
  }
68837
- const timeout = opts.timeout || 60000 * 3;
68853
+ const timeout2 = opts.timeout || 60000 * 3;
68838
68854
  const timer = setTimeout(() => {
68839
68855
  controller.abort();
68840
- }, timeout);
68856
+ }, timeout2);
68841
68857
  let method = overloadOpts?.method || opts?.method || "POST";
68842
68858
  let headers = { ...opts?.headers, ...overloadOpts?.headers };
68843
68859
  let origin = "";
@@ -68976,18 +68992,18 @@ class Query4 {
68976
68992
  }
68977
68993
  async post(body, options2) {
68978
68994
  const url4 = options2?.url || this.url;
68979
- const { headers, adapter: adapter22, beforeRequest, afterResponse, timeout, ...rest } = options2 || {};
68995
+ const { headers, adapter: adapter22, beforeRequest, afterResponse, timeout: timeout2, ...rest2 } = options2 || {};
68980
68996
  const _headers = { ...this.headers, ...headers };
68981
68997
  const _adapter = adapter22 || this.adapter;
68982
68998
  const _beforeRequest = beforeRequest || this.beforeRequest;
68983
68999
  const _afterResponse = afterResponse || this.afterResponse;
68984
- const _timeout = timeout || this.timeout;
69000
+ const _timeout = timeout2 || this.timeout;
68985
69001
  const req = {
68986
69002
  url: url4,
68987
69003
  headers: _headers,
68988
69004
  body,
68989
69005
  timeout: _timeout,
68990
- ...rest
69006
+ ...rest2
68991
69007
  };
68992
69008
  try {
68993
69009
  if (_beforeRequest) {
@@ -69303,7 +69319,7 @@ app.route({
69303
69319
  }
69304
69320
  }
69305
69321
  }).define(async (ctx) => {
69306
- let { add, remove, set: set3, list, clear } = ctx.args;
69322
+ let { add, remove: remove2, set: set3, list, clear } = ctx.args;
69307
69323
  let config4 = getConfig2();
69308
69324
  let baseList = config4.baseURLList || [];
69309
69325
  if (!config4.baseURL) {
@@ -69335,8 +69351,8 @@ app.route({
69335
69351
  showList(baseList);
69336
69352
  }
69337
69353
  }
69338
- if (remove !== undefined) {
69339
- const index = remove - 1;
69354
+ if (remove2 !== undefined) {
69355
+ const index = remove2 - 1;
69340
69356
  if (index < 0 || index >= baseList.length) {
69341
69357
  console.log("index out of range");
69342
69358
  return;
@@ -69349,8 +69365,8 @@ app.route({
69349
69365
  return;
69350
69366
  }
69351
69367
  if (set3 !== undefined) {
69352
- const isNumber = isNumeric(String(set3));
69353
- if (isNumber) {
69368
+ const isNumber2 = isNumeric(String(set3));
69369
+ if (isNumber2) {
69354
69370
  const index = Number(set3) - 1;
69355
69371
  if (index < 0 || index >= baseList.length) {
69356
69372
  console.log("index out of range");
@@ -69415,8 +69431,8 @@ app.route({
69415
69431
  return;
69416
69432
  }
69417
69433
  if (set3) {
69418
- const isNumber = isNumeric(set3);
69419
- if (isNumber) {
69434
+ const isNumber2 = isNumeric(set3);
69435
+ if (isNumber2) {
69420
69436
  const index = Number(set3) - 1;
69421
69437
  if (index < 0 || index >= defaultRegistry.length) {
69422
69438
  console.log("index out of range");
@@ -69614,7 +69630,7 @@ function fillPool2(bytes) {
69614
69630
  }
69615
69631
  poolOffset2 += bytes;
69616
69632
  }
69617
- function random(bytes) {
69633
+ function random3(bytes) {
69618
69634
  fillPool2(bytes |= 0);
69619
69635
  return pool2.subarray(poolOffset2 - bytes, poolOffset2);
69620
69636
  }
@@ -69637,7 +69653,7 @@ function customRandom2(alphabet, defaultSize, getRandom) {
69637
69653
  };
69638
69654
  }
69639
69655
  function customAlphabet2(alphabet, size = 21) {
69640
- return customRandom2(alphabet, size, random);
69656
+ return customRandom2(alphabet, size, random3);
69641
69657
  }
69642
69658
 
69643
69659
  // src/routes/id.ts
@@ -70322,8 +70338,8 @@ var handleResponse = async (err, res, opts) => {
70322
70338
  return;
70323
70339
  }
70324
70340
  let body = "";
70325
- res.on("data", (chunk) => {
70326
- body += chunk;
70341
+ res.on("data", (chunk2) => {
70342
+ body += chunk2;
70327
70343
  });
70328
70344
  res.on("end", () => {
70329
70345
  if (noResponse) {
@@ -70485,7 +70501,7 @@ var command2 = new Command("deploy").description("把前端文件传到服务器
70485
70501
  console.error(source_default.red("查询应用版本失败"), res2.message, key);
70486
70502
  return;
70487
70503
  }
70488
- const { id, data, ...rest } = res2.data || {};
70504
+ const { id, data, ...rest2 } = res2.data || {};
70489
70505
  if (id && !update) {
70490
70506
  if (!org) {
70491
70507
  console.log(source_default.green(`更新为最新版本: envision deploy-load ${id}`));
@@ -70766,7 +70782,7 @@ var npmrc = new Command("set").description("set .npmrc").option("-f <force>").ac
70766
70782
  }
70767
70783
  });
70768
70784
  command3.addCommand(npmrc);
70769
- var remove = new Command("remove").description("remove .npmrc").action(async () => {
70785
+ var remove2 = new Command("remove").description("remove .npmrc").action(async () => {
70770
70786
  const execPath = process.cwd();
70771
70787
  const npmrcPath = path14.resolve(execPath, ".npmrc");
70772
70788
  if (fileIsExist2(npmrcPath)) {
@@ -70776,7 +70792,7 @@ var remove = new Command("remove").description("remove .npmrc").action(async ()
70776
70792
  console.log(chalk2.green(".npmrc success"));
70777
70793
  }
70778
70794
  });
70779
- command3.addCommand(remove);
70795
+ command3.addCommand(remove2);
70780
70796
  var install = new Command("install").option("-n, --noproxy", "no proxy").description("npm install 使用 proxy代理去下载").action(async (options2) => {
70781
70797
  const cwd = process.cwd();
70782
70798
  const config4 = getConfig2();
@@ -70976,7 +70992,7 @@ var pack = async (opts) => {
70976
70992
  allFiles.forEach((file3) => {
70977
70993
  logger.debug(`${file3.size}B ${file3.path}`);
70978
70994
  });
70979
- const totalSize = allFiles.reduce((sum, file3) => sum + file3.size, 0);
70995
+ const totalSize = allFiles.reduce((sum2, file3) => sum2 + file3.size, 0);
70980
70996
  collection.files = allFiles;
70981
70997
  collection.packageJson = packageJson;
70982
70998
  collection.totalSize = totalSize;
@@ -71618,7 +71634,7 @@ var syncCreateList = new Command("create").option("-d --dir <dir>", "配置目
71618
71634
  logger.info(newJson);
71619
71635
  }
71620
71636
  });
71621
- var clone3 = new Command("clone").option("-d --dir <dir>", "配置目录").option("-c --config <config>", "配置文件的名字", "kevisual.json").option("-i --link <link>", "克隆链接, 比 kevisual.json 优先级更高").option("-l --local", "值对sync的列表进行clone处理,只对sync列表处理").description("检查目录").action(async (opts) => {
71637
+ var clone5 = new Command("clone").option("-d --dir <dir>", "配置目录").option("-c --config <config>", "配置文件的名字", "kevisual.json").option("-i --link <link>", "克隆链接, 比 kevisual.json 优先级更高").option("-l --local", "值对sync的列表进行clone处理,只对sync列表处理").description("检查目录").action(async (opts) => {
71622
71638
  let link = opts.link || "";
71623
71639
  const local = opts.local || false;
71624
71640
  const sync = new SyncBase({ dir: opts.dir, baseURL, configFilename: opts.config });
@@ -71712,7 +71728,7 @@ command4.addCommand(syncUpload);
71712
71728
  command4.addCommand(syncDownload);
71713
71729
  command4.addCommand(syncList);
71714
71730
  command4.addCommand(syncCreateList);
71715
- command4.addCommand(clone3);
71731
+ command4.addCommand(clone5);
71716
71732
  program.addCommand(command4);
71717
71733
 
71718
71734
  // src/command/coding-plan/cc.ts
@@ -71929,9 +71945,14 @@ import crypto6 from "node:crypto";
71929
71945
  var hashFile = (content) => {
71930
71946
  return crypto6.createHash("sha1").update(content).digest("hex");
71931
71947
  };
71948
+ var statSync = (filepath) => {
71949
+ const stat = fs24.statSync(filepath);
71950
+ stat.mtimeMs = floorMs(stat.mtimeMs);
71951
+ return stat;
71952
+ };
71932
71953
 
71933
71954
  class MarkLocalManager {
71934
- filename = "readme.md";
71955
+ filename = "index";
71935
71956
  constructor(options2) {
71936
71957
  this.setRoot(options2?.root);
71937
71958
  }
@@ -71951,11 +71972,11 @@ class MarkLocalManager {
71951
71972
  if (!fileIsExist3(fullPath)) {
71952
71973
  return null;
71953
71974
  }
71954
- const stat = fs24.statSync(fullPath);
71975
+ const stat = statSync(fullPath);
71955
71976
  if (!stat.isDirectory()) {
71956
71977
  return null;
71957
71978
  }
71958
- const files = import_fast_glob6.default.sync(`*/${this.filename}`, {
71979
+ const files = import_fast_glob6.default.sync(`*/${this.filename}.{md,mdx}`, {
71959
71980
  cwd: fullPath,
71960
71981
  ignore: ["node_modules", "**/node_modules/**", ".git", "**/.git/**"],
71961
71982
  onlyFiles: true
@@ -72034,18 +72055,18 @@ class MarkLocalManager {
72034
72055
  const newFiles = [];
72035
72056
  for (const file3 of fileList) {
72036
72057
  try {
72037
- const statSync = fs24.statSync(path20.resolve(config4.root, file3));
72058
+ const statInfo = statSync(path20.resolve(config4.root, file3));
72038
72059
  const existFile = hasFiles.find((f) => f.name === file3);
72039
72060
  if (!existFile) {
72040
72061
  newFiles.push({
72041
72062
  name: file3,
72042
- updatedAt: statSync.mtimeMs
72063
+ updatedAt: statInfo.mtimeMs
72043
72064
  });
72044
72065
  continue;
72045
72066
  }
72046
- let needUpdate = !existFile.updatedAt || statSync.mtimeMs > existFile.updatedAt;
72067
+ let needUpdate = !existFile.updatedAt || statInfo.mtimeMs > existFile.updatedAt;
72047
72068
  if (needUpdate) {
72048
- existFile.updatedAt = statSync.mtimeMs;
72069
+ existFile.updatedAt = statInfo.mtimeMs;
72049
72070
  const content = fs24.readFileSync(path20.resolve(config4.root, file3), "utf-8");
72050
72071
  const matterContent = import_gray_matter.default(content);
72051
72072
  existFile.title = matterContent.data?.title || "";
@@ -72101,7 +72122,7 @@ class MarkLocalManager {
72101
72122
  }
72102
72123
  fs24.writeFileSync(path20.join(markDir, "data.json"), JSON.stringify(mark, null, 2), "utf-8");
72103
72124
  if (opts?.stat) {
72104
- const statInfo = fs24.statSync(markPath);
72125
+ const statInfo = statSync(markPath);
72105
72126
  const resources = mark.data?.resources || [];
72106
72127
  let resourceSize = 0;
72107
72128
  for (let resource of resources) {
@@ -72109,7 +72130,7 @@ class MarkLocalManager {
72109
72130
  const filePath = path20.resolve(markDir, resource.name);
72110
72131
  console.log(`Calculating size for resource: ${filePath}`);
72111
72132
  try {
72112
- const resStat = fs24.statSync(filePath);
72133
+ const resStat = statSync(filePath);
72113
72134
  resourceSize += resStat.size;
72114
72135
  } catch (error49) {
72115
72136
  console.error(`Failed to get stat for resource: ${resource.name}`, error49);
@@ -72163,6 +72184,9 @@ var fileIsExist3 = (filepath) => {
72163
72184
  return false;
72164
72185
  }
72165
72186
  };
72187
+ var floorMs = (ms) => {
72188
+ return Math.floor(ms / 1000) * 1000;
72189
+ };
72166
72190
 
72167
72191
  // src/command/mark.ts
72168
72192
  var markCmd = new Command("mark").alias("m").description("mark相关命令");
@@ -72245,15 +72269,15 @@ var __getProtoOf4 = Object.getPrototypeOf;
72245
72269
  var __defProp5 = Object.defineProperty;
72246
72270
  var __getOwnPropNames4 = Object.getOwnPropertyNames;
72247
72271
  var __hasOwnProp4 = Object.prototype.hasOwnProperty;
72248
- function __accessProp2(key) {
72272
+ function __accessProp3(key) {
72249
72273
  return this[key];
72250
72274
  }
72251
- var __toESMCache_node2;
72252
- var __toESMCache_esm2;
72275
+ var __toESMCache_node3;
72276
+ var __toESMCache_esm3;
72253
72277
  var __toESM4 = (mod, isNodeMode, target) => {
72254
72278
  var canCache = mod != null && typeof mod === "object";
72255
72279
  if (canCache) {
72256
- var cache3 = isNodeMode ? __toESMCache_node2 ??= new WeakMap : __toESMCache_esm2 ??= new WeakMap;
72280
+ var cache3 = isNodeMode ? __toESMCache_node3 ??= new WeakMap : __toESMCache_esm3 ??= new WeakMap;
72257
72281
  var cached3 = cache3.get(mod);
72258
72282
  if (cached3)
72259
72283
  return cached3;
@@ -72263,7 +72287,7 @@ var __toESM4 = (mod, isNodeMode, target) => {
72263
72287
  for (let key of __getOwnPropNames4(mod))
72264
72288
  if (!__hasOwnProp4.call(to, key))
72265
72289
  __defProp5(to, key, {
72266
- get: __accessProp2.bind(mod, key),
72290
+ get: __accessProp3.bind(mod, key),
72267
72291
  enumerable: true
72268
72292
  });
72269
72293
  if (canCache)
@@ -72271,9 +72295,9 @@ var __toESM4 = (mod, isNodeMode, target) => {
72271
72295
  return to;
72272
72296
  };
72273
72297
  var __commonJS4 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
72274
- var __returnValue2 = (v) => v;
72275
- function __exportSetter2(name, newValue) {
72276
- this[name] = __returnValue2.bind(null, newValue);
72298
+ var __returnValue3 = (v) => v;
72299
+ function __exportSetter3(name, newValue) {
72300
+ this[name] = __returnValue3.bind(null, newValue);
72277
72301
  }
72278
72302
  var __export4 = (target, all) => {
72279
72303
  for (var name in all)
@@ -72281,7 +72305,7 @@ var __export4 = (target, all) => {
72281
72305
  get: all[name],
72282
72306
  enumerable: true,
72283
72307
  configurable: true,
72284
- set: __exportSetter2.bind(all, name)
72308
+ set: __exportSetter3.bind(all, name)
72285
72309
  });
72286
72310
  };
72287
72311
  var __require4 = /* @__PURE__ */ createRequire4(import.meta.url);
@@ -72716,15 +72740,15 @@ ${itemIndentStr}`);
72716
72740
  }
72717
72741
  let sumChunks = [chunks.shift()];
72718
72742
  let sumWidth = this.displayWidth(sumChunks[0]);
72719
- chunks.forEach((chunk) => {
72720
- const visibleWidth = this.displayWidth(chunk);
72743
+ chunks.forEach((chunk2) => {
72744
+ const visibleWidth = this.displayWidth(chunk2);
72721
72745
  if (sumWidth + visibleWidth <= width) {
72722
- sumChunks.push(chunk);
72746
+ sumChunks.push(chunk2);
72723
72747
  sumWidth += visibleWidth;
72724
72748
  return;
72725
72749
  }
72726
72750
  wrappedLines.push(sumChunks.join(""));
72727
- const nextChunk = chunk.trimStart();
72751
+ const nextChunk = chunk2.trimStart();
72728
72752
  sumChunks = [nextChunk];
72729
72753
  sumWidth = this.displayWidth(nextChunk);
72730
72754
  });
@@ -74405,16 +74429,16 @@ var require_eventemitter33 = __commonJS22((exports, module) => {
74405
74429
  if (!new Events().__proto__)
74406
74430
  prefix = false;
74407
74431
  }
74408
- function EE(fn, context, once) {
74432
+ function EE(fn, context, once2) {
74409
74433
  this.fn = fn;
74410
74434
  this.context = context;
74411
- this.once = once || false;
74435
+ this.once = once2 || false;
74412
74436
  }
74413
- function addListener(emitter, event, fn, context, once) {
74437
+ function addListener(emitter, event, fn, context, once2) {
74414
74438
  if (typeof fn !== "function") {
74415
74439
  throw new TypeError("The listener must be a function");
74416
74440
  }
74417
- var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;
74441
+ var listener = new EE(fn, context || emitter, once2), evt = prefix ? prefix + event : event;
74418
74442
  if (!emitter._events[evt])
74419
74443
  emitter._events[evt] = listener, emitter._eventsCount++;
74420
74444
  else if (!emitter._events[evt].fn)
@@ -74523,10 +74547,10 @@ var require_eventemitter33 = __commonJS22((exports, module) => {
74523
74547
  EventEmitter5.prototype.on = function on(event, fn, context) {
74524
74548
  return addListener(this, event, fn, context, false);
74525
74549
  };
74526
- EventEmitter5.prototype.once = function once(event, fn, context) {
74550
+ EventEmitter5.prototype.once = function once2(event, fn, context) {
74527
74551
  return addListener(this, event, fn, context, true);
74528
74552
  };
74529
- EventEmitter5.prototype.removeListener = function removeListener(event, fn, context, once) {
74553
+ EventEmitter5.prototype.removeListener = function removeListener(event, fn, context, once2) {
74530
74554
  var evt = prefix ? prefix + event : event;
74531
74555
  if (!this._events[evt])
74532
74556
  return this;
@@ -74536,12 +74560,12 @@ var require_eventemitter33 = __commonJS22((exports, module) => {
74536
74560
  }
74537
74561
  var listeners = this._events[evt];
74538
74562
  if (listeners.fn) {
74539
- if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) {
74563
+ if (listeners.fn === fn && (!once2 || listeners.once) && (!context || listeners.context === context)) {
74540
74564
  clearEvent(this, evt);
74541
74565
  }
74542
74566
  } else {
74543
74567
  for (var i = 0, events = [], length = listeners.length;i < length; i++) {
74544
- if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) {
74568
+ if (listeners[i].fn !== fn || once2 && !listeners[i].once || context && listeners[i].context !== context) {
74545
74569
  events.push(listeners[i]);
74546
74570
  }
74547
74571
  }
@@ -74629,12 +74653,12 @@ class RemoteApp {
74629
74653
  console.log(`远程应用 ${this.id} 正在重连中...`);
74630
74654
  }
74631
74655
  return new Promise((resolve) => {
74632
- const timeout = setTimeout(() => {
74656
+ const timeout2 = setTimeout(() => {
74633
74657
  resolve(false);
74634
74658
  that.emitter.off("open", listenOnce);
74635
74659
  }, 5000);
74636
74660
  const listenOnce = () => {
74637
- clearTimeout(timeout);
74661
+ clearTimeout(timeout2);
74638
74662
  that.isConnected = true;
74639
74663
  that.remoteIsConnected = true;
74640
74664
  resolve(true);
@@ -74734,8 +74758,8 @@ class RemoteApp {
74734
74758
  if (!this.enableBackoff) {
74735
74759
  return this.reconnectDelay;
74736
74760
  }
74737
- const delay = this.reconnectDelay * Math.pow(2, this.reconnectAttempts);
74738
- return Math.min(delay, this.maxReconnectDelay);
74761
+ const delay2 = this.reconnectDelay * Math.pow(2, this.reconnectAttempts);
74762
+ return Math.min(delay2, this.maxReconnectDelay);
74739
74763
  }
74740
74764
  scheduleReconnect() {
74741
74765
  if (this.reconnectAttempts >= this.maxReconnectAttempts) {
@@ -74746,9 +74770,9 @@ class RemoteApp {
74746
74770
  if (this.reconnectTimer) {
74747
74771
  clearTimeout(this.reconnectTimer);
74748
74772
  }
74749
- const delay = this.calculateReconnectDelay();
74773
+ const delay2 = this.calculateReconnectDelay();
74750
74774
  this.reconnectAttempts++;
74751
- console.log(`远程应用 ${this.id} 将在 ${delay}ms 后尝试第 ${this.reconnectAttempts} 次重连`);
74775
+ console.log(`远程应用 ${this.id} 将在 ${delay2}ms 后尝试第 ${this.reconnectAttempts} 次重连`);
74752
74776
  this.reconnectTimer = setTimeout(() => {
74753
74777
  this.reconnectTimer = null;
74754
74778
  try {
@@ -74758,7 +74782,7 @@ class RemoteApp {
74758
74782
  this.emitter.emit("reconnectFailed", { id: this.id, attempt: this.reconnectAttempts, error: error49 });
74759
74783
  this.scheduleReconnect();
74760
74784
  }
74761
- }, delay);
74785
+ }, delay2);
74762
74786
  }
74763
74787
  disconnect() {
74764
74788
  this.isManuallyClosed = true;
@@ -74863,7 +74887,7 @@ class RemoteApp {
74863
74887
  }
74864
74888
  var exports_external3 = {};
74865
74889
  __export4(exports_external3, {
74866
- xor: () => xor3,
74890
+ xor: () => xor5,
74867
74891
  xid: () => xid22,
74868
74892
  void: () => _void22,
74869
74893
  uuidv7: () => uuidv73,
@@ -74874,7 +74898,7 @@ __export4(exports_external3, {
74874
74898
  url: () => url5,
74875
74899
  uppercase: () => _uppercase3,
74876
74900
  unknown: () => unknown3,
74877
- union: () => union3,
74901
+ union: () => union5,
74878
74902
  undefined: () => _undefined32,
74879
74903
  ulid: () => ulid22,
74880
74904
  uint64: () => uint643,
@@ -74962,7 +74986,7 @@ __export4(exports_external3, {
74962
74986
  iso: () => exports_iso3,
74963
74987
  ipv6: () => ipv622,
74964
74988
  ipv4: () => ipv422,
74965
- intersection: () => intersection3,
74989
+ intersection: () => intersection5,
74966
74990
  int64: () => int643,
74967
74991
  int32: () => int323,
74968
74992
  int: () => int3,
@@ -75004,7 +75028,7 @@ __export4(exports_external3, {
75004
75028
  config: () => config4,
75005
75029
  coerce: () => exports_coerce3,
75006
75030
  codec: () => codec3,
75007
- clone: () => clone5,
75031
+ clone: () => clone6,
75008
75032
  cidrv6: () => cidrv622,
75009
75033
  cidrv4: () => cidrv422,
75010
75034
  check: () => check3,
@@ -75139,7 +75163,7 @@ __export4(exports_core22, {
75139
75163
  createToJSONSchemaMethod: () => createToJSONSchemaMethod3,
75140
75164
  createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod3,
75141
75165
  config: () => config4,
75142
- clone: () => clone5,
75166
+ clone: () => clone6,
75143
75167
  _xor: () => _xor3,
75144
75168
  _xid: () => _xid3,
75145
75169
  _void: () => _void6,
@@ -75468,20 +75492,20 @@ __export4(exports_util3, {
75468
75492
  primitiveTypes: () => primitiveTypes3,
75469
75493
  prefixIssues: () => prefixIssues3,
75470
75494
  pick: () => pick7,
75471
- partial: () => partial3,
75495
+ partial: () => partial5,
75472
75496
  parsedType: () => parsedType3,
75473
75497
  optionalKeys: () => optionalKeys3,
75474
- omit: () => omit3,
75498
+ omit: () => omit5,
75475
75499
  objectClone: () => objectClone3,
75476
75500
  numKeys: () => numKeys3,
75477
75501
  nullish: () => nullish6,
75478
75502
  normalizeParams: () => normalizeParams3,
75479
75503
  mergeDefs: () => mergeDefs3,
75480
- merge: () => merge5,
75504
+ merge: () => merge6,
75481
75505
  jsonStringifyReplacer: () => jsonStringifyReplacer3,
75482
75506
  joinValues: () => joinValues3,
75483
75507
  issue: () => issue3,
75484
- isPlainObject: () => isPlainObject6,
75508
+ isPlainObject: () => isPlainObject7,
75485
75509
  isObject: () => isObject4,
75486
75510
  hexToUint8Array: () => hexToUint8Array3,
75487
75511
  getSizableOrigin: () => getSizableOrigin3,
@@ -75497,7 +75521,7 @@ __export4(exports_util3, {
75497
75521
  defineLazy: () => defineLazy3,
75498
75522
  createTransparentProxy: () => createTransparentProxy3,
75499
75523
  cloneDef: () => cloneDef3,
75500
- clone: () => clone5,
75524
+ clone: () => clone6,
75501
75525
  cleanRegex: () => cleanRegex3,
75502
75526
  cleanEnum: () => cleanEnum3,
75503
75527
  captureStackTrace: () => captureStackTrace3,
@@ -75666,7 +75690,7 @@ var allowsEval3 = cached3(() => {
75666
75690
  return false;
75667
75691
  }
75668
75692
  });
75669
- function isPlainObject6(o) {
75693
+ function isPlainObject7(o) {
75670
75694
  if (isObject4(o) === false)
75671
75695
  return false;
75672
75696
  const ctor = o.constructor;
@@ -75683,7 +75707,7 @@ function isPlainObject6(o) {
75683
75707
  return true;
75684
75708
  }
75685
75709
  function shallowClone3(o) {
75686
- if (isPlainObject6(o))
75710
+ if (isPlainObject7(o))
75687
75711
  return { ...o };
75688
75712
  if (Array.isArray(o))
75689
75713
  return [...o];
@@ -75747,7 +75771,7 @@ var primitiveTypes3 = new Set(["string", "number", "bigint", "boolean", "symbol"
75747
75771
  function escapeRegex3(str2) {
75748
75772
  return str2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
75749
75773
  }
75750
- function clone5(inst, def, params) {
75774
+ function clone6(inst, def, params) {
75751
75775
  const cl = new inst._zod.constr(def ?? inst._zod.def);
75752
75776
  if (!def || params?.parent)
75753
75777
  cl._zod.parent = inst;
@@ -75848,9 +75872,9 @@ function pick7(schema, mask) {
75848
75872
  },
75849
75873
  checks: []
75850
75874
  });
75851
- return clone5(schema, def);
75875
+ return clone6(schema, def);
75852
75876
  }
75853
- function omit3(schema, mask) {
75877
+ function omit5(schema, mask) {
75854
75878
  const currDef = schema._zod.def;
75855
75879
  const checks3 = currDef.checks;
75856
75880
  const hasChecks = checks3 && checks3.length > 0;
@@ -75873,10 +75897,10 @@ function omit3(schema, mask) {
75873
75897
  },
75874
75898
  checks: []
75875
75899
  });
75876
- return clone5(schema, def);
75900
+ return clone6(schema, def);
75877
75901
  }
75878
75902
  function extend3(schema, shape) {
75879
- if (!isPlainObject6(shape)) {
75903
+ if (!isPlainObject7(shape)) {
75880
75904
  throw new Error("Invalid input to extend: expected a plain object");
75881
75905
  }
75882
75906
  const checks3 = schema._zod.def.checks;
@@ -75896,10 +75920,10 @@ function extend3(schema, shape) {
75896
75920
  return _shape;
75897
75921
  }
75898
75922
  });
75899
- return clone5(schema, def);
75923
+ return clone6(schema, def);
75900
75924
  }
75901
75925
  function safeExtend3(schema, shape) {
75902
- if (!isPlainObject6(shape)) {
75926
+ if (!isPlainObject7(shape)) {
75903
75927
  throw new Error("Invalid input to safeExtend: expected a plain object");
75904
75928
  }
75905
75929
  const def = mergeDefs3(schema._zod.def, {
@@ -75909,9 +75933,9 @@ function safeExtend3(schema, shape) {
75909
75933
  return _shape;
75910
75934
  }
75911
75935
  });
75912
- return clone5(schema, def);
75936
+ return clone6(schema, def);
75913
75937
  }
75914
- function merge5(a, b) {
75938
+ function merge6(a, b) {
75915
75939
  const def = mergeDefs3(a._zod.def, {
75916
75940
  get shape() {
75917
75941
  const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
@@ -75923,9 +75947,9 @@ function merge5(a, b) {
75923
75947
  },
75924
75948
  checks: []
75925
75949
  });
75926
- return clone5(a, def);
75950
+ return clone6(a, def);
75927
75951
  }
75928
- function partial3(Class3, schema, mask) {
75952
+ function partial5(Class3, schema, mask) {
75929
75953
  const currDef = schema._zod.def;
75930
75954
  const checks3 = currDef.checks;
75931
75955
  const hasChecks = checks3 && checks3.length > 0;
@@ -75961,7 +75985,7 @@ function partial3(Class3, schema, mask) {
75961
75985
  },
75962
75986
  checks: []
75963
75987
  });
75964
- return clone5(schema, def);
75988
+ return clone6(schema, def);
75965
75989
  }
75966
75990
  function required3(Class3, schema, mask) {
75967
75991
  const def = mergeDefs3(schema._zod.def, {
@@ -75992,7 +76016,7 @@ function required3(Class3, schema, mask) {
75992
76016
  return shape;
75993
76017
  }
75994
76018
  });
75995
- return clone5(schema, def);
76019
+ return clone6(schema, def);
75996
76020
  }
75997
76021
  function aborted3(x, startIndex = 0) {
75998
76022
  if (x.aborted === true)
@@ -77669,15 +77693,15 @@ var $ZodDate3 = /* @__PURE__ */ $constructor3("$ZodDate", (inst, def) => {
77669
77693
  } catch (_err) {}
77670
77694
  }
77671
77695
  const input = payload.value;
77672
- const isDate = input instanceof Date;
77673
- const isValidDate = isDate && !Number.isNaN(input.getTime());
77696
+ const isDate3 = input instanceof Date;
77697
+ const isValidDate = isDate3 && !Number.isNaN(input.getTime());
77674
77698
  if (isValidDate)
77675
77699
  return payload;
77676
77700
  payload.issues.push({
77677
77701
  expected: "date",
77678
77702
  code: "invalid_type",
77679
77703
  input,
77680
- ...isDate ? { received: "Invalid Date" } : {},
77704
+ ...isDate3 ? { received: "Invalid Date" } : {},
77681
77705
  inst
77682
77706
  });
77683
77707
  return payload;
@@ -78157,7 +78181,7 @@ function mergeValues3(a, b) {
78157
78181
  if (a instanceof Date && b instanceof Date && +a === +b) {
78158
78182
  return { valid: true, data: a };
78159
78183
  }
78160
- if (isPlainObject6(a) && isPlainObject6(b)) {
78184
+ if (isPlainObject7(a) && isPlainObject7(b)) {
78161
78185
  const bKeys = Object.keys(b);
78162
78186
  const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
78163
78187
  const newObj = { ...a, ...b };
@@ -78282,8 +78306,8 @@ var $ZodTuple3 = /* @__PURE__ */ $constructor3("$ZodTuple", (inst, def) => {
78282
78306
  }
78283
78307
  }
78284
78308
  if (def.rest) {
78285
- const rest = input.slice(items.length);
78286
- for (const el of rest) {
78309
+ const rest2 = input.slice(items.length);
78310
+ for (const el of rest2) {
78287
78311
  i++;
78288
78312
  const result = def.rest._zod.run({
78289
78313
  value: el,
@@ -78311,7 +78335,7 @@ var $ZodRecord3 = /* @__PURE__ */ $constructor3("$ZodRecord", (inst, def) => {
78311
78335
  $ZodType3.init(inst, def);
78312
78336
  inst._zod.parse = (payload, ctx) => {
78313
78337
  const input = payload.value;
78314
- if (!isPlainObject6(input)) {
78338
+ if (!isPlainObject7(input)) {
78315
78339
  payload.issues.push({
78316
78340
  expected: "record",
78317
78341
  code: "invalid_type",
@@ -82009,11 +82033,11 @@ var capitalizeFirstCharacter3 = (text) => {
82009
82033
  };
82010
82034
  function getUnitTypeFromNumber3(number22) {
82011
82035
  const abs = Math.abs(number22);
82012
- const last = abs % 10;
82013
- const last2 = abs % 100;
82014
- if (last2 >= 11 && last2 <= 19 || last === 0)
82036
+ const last2 = abs % 10;
82037
+ const last22 = abs % 100;
82038
+ if (last22 >= 11 && last22 <= 19 || last2 === 0)
82015
82039
  return "many";
82016
- if (last === 1)
82040
+ if (last2 === 1)
82017
82041
  return "one";
82018
82042
  return "few";
82019
82043
  }
@@ -85214,11 +85238,11 @@ function _intersection3(Class22, left, right) {
85214
85238
  function _tuple3(Class22, items, _paramsOrRest, _params) {
85215
85239
  const hasRest = _paramsOrRest instanceof $ZodType3;
85216
85240
  const params = hasRest ? _params : _paramsOrRest;
85217
- const rest = hasRest ? _paramsOrRest : null;
85241
+ const rest2 = hasRest ? _paramsOrRest : null;
85218
85242
  return new Class22({
85219
85243
  type: "tuple",
85220
85244
  items,
85221
- rest,
85245
+ rest: rest2,
85222
85246
  ...normalizeParams3(params)
85223
85247
  });
85224
85248
  }
@@ -86156,30 +86180,30 @@ var tupleProcessor3 = (schema, ctx, _json, params) => {
86156
86180
  ...params,
86157
86181
  path: [...params.path, prefixPath, i]
86158
86182
  }));
86159
- const rest = def.rest ? process22(def.rest, ctx, {
86183
+ const rest2 = def.rest ? process22(def.rest, ctx, {
86160
86184
  ...params,
86161
86185
  path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []]
86162
86186
  }) : null;
86163
86187
  if (ctx.target === "draft-2020-12") {
86164
86188
  json3.prefixItems = prefixItems;
86165
- if (rest) {
86166
- json3.items = rest;
86189
+ if (rest2) {
86190
+ json3.items = rest2;
86167
86191
  }
86168
86192
  } else if (ctx.target === "openapi-3.0") {
86169
86193
  json3.items = {
86170
86194
  anyOf: prefixItems
86171
86195
  };
86172
- if (rest) {
86173
- json3.items.anyOf.push(rest);
86196
+ if (rest2) {
86197
+ json3.items.anyOf.push(rest2);
86174
86198
  }
86175
86199
  json3.minItems = prefixItems.length;
86176
- if (!rest) {
86200
+ if (!rest2) {
86177
86201
  json3.maxItems = prefixItems.length;
86178
86202
  }
86179
86203
  } else {
86180
86204
  json3.items = prefixItems;
86181
- if (rest) {
86182
- json3.additionalItems = rest;
86205
+ if (rest2) {
86206
+ json3.additionalItems = rest2;
86183
86207
  }
86184
86208
  }
86185
86209
  const { minimum, maximum } = schema._zod.bag;
@@ -86438,7 +86462,7 @@ class JSONSchemaGenerator3 {
86438
86462
  var exports_json_schema3 = {};
86439
86463
  var exports_schemas22 = {};
86440
86464
  __export4(exports_schemas22, {
86441
- xor: () => xor3,
86465
+ xor: () => xor5,
86442
86466
  xid: () => xid22,
86443
86467
  void: () => _void22,
86444
86468
  uuidv7: () => uuidv73,
@@ -86447,7 +86471,7 @@ __export4(exports_schemas22, {
86447
86471
  uuid: () => uuid22,
86448
86472
  url: () => url5,
86449
86473
  unknown: () => unknown3,
86450
- union: () => union3,
86474
+ union: () => union5,
86451
86475
  undefined: () => _undefined32,
86452
86476
  ulid: () => ulid22,
86453
86477
  uint64: () => uint643,
@@ -86495,7 +86519,7 @@ __export4(exports_schemas22, {
86495
86519
  json: () => json3,
86496
86520
  ipv6: () => ipv622,
86497
86521
  ipv4: () => ipv422,
86498
- intersection: () => intersection3,
86522
+ intersection: () => intersection5,
86499
86523
  int64: () => int643,
86500
86524
  int32: () => int323,
86501
86525
  int: () => int3,
@@ -86742,7 +86766,7 @@ var ZodType3 = /* @__PURE__ */ $constructor3("ZodType", (inst, def) => {
86742
86766
  });
86743
86767
  };
86744
86768
  inst.with = inst.check;
86745
- inst.clone = (def2, params) => clone5(inst, def2, params);
86769
+ inst.clone = (def2, params) => clone6(inst, def2, params);
86746
86770
  inst.brand = () => inst;
86747
86771
  inst.register = (reg, meta22) => {
86748
86772
  reg.add(inst, meta22);
@@ -86770,8 +86794,8 @@ var ZodType3 = /* @__PURE__ */ $constructor3("ZodType", (inst, def) => {
86770
86794
  inst.nullish = () => optional3(nullable3(inst));
86771
86795
  inst.nonoptional = (params) => nonoptional3(inst, params);
86772
86796
  inst.array = () => array3(inst);
86773
- inst.or = (arg) => union3([inst, arg]);
86774
- inst.and = (arg) => intersection3(inst, arg);
86797
+ inst.or = (arg) => union5([inst, arg]);
86798
+ inst.and = (arg) => intersection5(inst, arg);
86775
86799
  inst.transform = (tx) => pipe3(inst, transform3(tx));
86776
86800
  inst.default = (def2) => _default22(inst, def2);
86777
86801
  inst.prefault = (def2) => prefault3(inst, def2);
@@ -87274,7 +87298,7 @@ var ZodUnion3 = /* @__PURE__ */ $constructor3("ZodUnion", (inst, def) => {
87274
87298
  inst._zod.processJSONSchema = (ctx, json3, params) => unionProcessor3(inst, ctx, json3, params);
87275
87299
  inst.options = def.options;
87276
87300
  });
87277
- function union3(options2, params) {
87301
+ function union5(options2, params) {
87278
87302
  return new ZodUnion3({
87279
87303
  type: "union",
87280
87304
  options: options2,
@@ -87287,7 +87311,7 @@ var ZodXor3 = /* @__PURE__ */ $constructor3("ZodXor", (inst, def) => {
87287
87311
  inst._zod.processJSONSchema = (ctx, json3, params) => unionProcessor3(inst, ctx, json3, params);
87288
87312
  inst.options = def.options;
87289
87313
  });
87290
- function xor3(options2, params) {
87314
+ function xor5(options2, params) {
87291
87315
  return new ZodXor3({
87292
87316
  type: "union",
87293
87317
  options: options2,
@@ -87312,7 +87336,7 @@ var ZodIntersection3 = /* @__PURE__ */ $constructor3("ZodIntersection", (inst, d
87312
87336
  ZodType3.init(inst, def);
87313
87337
  inst._zod.processJSONSchema = (ctx, json3, params) => intersectionProcessor3(inst, ctx, json3, params);
87314
87338
  });
87315
- function intersection3(left, right) {
87339
+ function intersection5(left, right) {
87316
87340
  return new ZodIntersection3({
87317
87341
  type: "intersection",
87318
87342
  left,
@@ -87323,19 +87347,19 @@ var ZodTuple3 = /* @__PURE__ */ $constructor3("ZodTuple", (inst, def) => {
87323
87347
  $ZodTuple3.init(inst, def);
87324
87348
  ZodType3.init(inst, def);
87325
87349
  inst._zod.processJSONSchema = (ctx, json3, params) => tupleProcessor3(inst, ctx, json3, params);
87326
- inst.rest = (rest) => inst.clone({
87350
+ inst.rest = (rest2) => inst.clone({
87327
87351
  ...inst._zod.def,
87328
- rest
87352
+ rest: rest2
87329
87353
  });
87330
87354
  });
87331
87355
  function tuple3(items, _paramsOrRest, _params) {
87332
87356
  const hasRest = _paramsOrRest instanceof $ZodType3;
87333
87357
  const params = hasRest ? _params : _paramsOrRest;
87334
- const rest = hasRest ? _paramsOrRest : null;
87358
+ const rest2 = hasRest ? _paramsOrRest : null;
87335
87359
  return new ZodTuple3({
87336
87360
  type: "tuple",
87337
87361
  items,
87338
- rest,
87362
+ rest: rest2,
87339
87363
  ...exports_util3.normalizeParams(params)
87340
87364
  });
87341
87365
  }
@@ -87355,7 +87379,7 @@ function record3(keyType, valueType, params) {
87355
87379
  });
87356
87380
  }
87357
87381
  function partialRecord3(keyType, valueType, params) {
87358
- const k = clone5(keyType);
87382
+ const k = clone6(keyType);
87359
87383
  k._zod.values = undefined;
87360
87384
  return new ZodRecord3({
87361
87385
  type: "record",
@@ -87787,7 +87811,7 @@ var stringbool3 = (...args) => _stringbool3({
87787
87811
  }, ...args);
87788
87812
  function json3(params) {
87789
87813
  const jsonSchema = lazy3(() => {
87790
- return union3([string22(params), number22(), boolean22(), _null32(), array3(jsonSchema), record3(string22(), jsonSchema)]);
87814
+ return union5([string22(params), number22(), boolean22(), _null32(), array3(jsonSchema), record3(string22(), jsonSchema)]);
87791
87815
  });
87792
87816
  return jsonSchema;
87793
87817
  }
@@ -88152,9 +88176,9 @@ function convertBaseSchema3(schema, ctx) {
88152
88176
  const items = schema.items;
88153
88177
  if (prefixItems && Array.isArray(prefixItems)) {
88154
88178
  const tupleItems = prefixItems.map((item) => convertSchema3(item, ctx));
88155
- const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema3(items, ctx) : undefined;
88156
- if (rest) {
88157
- zodSchema = z3.tuple(tupleItems).rest(rest);
88179
+ const rest2 = items && typeof items === "object" && !Array.isArray(items) ? convertSchema3(items, ctx) : undefined;
88180
+ if (rest2) {
88181
+ zodSchema = z3.tuple(tupleItems).rest(rest2);
88158
88182
  } else {
88159
88183
  zodSchema = z3.tuple(tupleItems);
88160
88184
  }
@@ -88166,9 +88190,9 @@ function convertBaseSchema3(schema, ctx) {
88166
88190
  }
88167
88191
  } else if (Array.isArray(items)) {
88168
88192
  const tupleItems = items.map((item) => convertSchema3(item, ctx));
88169
- const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema3(schema.additionalItems, ctx) : undefined;
88170
- if (rest) {
88171
- zodSchema = z3.tuple(tupleItems).rest(rest);
88193
+ const rest2 = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema3(schema.additionalItems, ctx) : undefined;
88194
+ if (rest2) {
88195
+ zodSchema = z3.tuple(tupleItems).rest(rest2);
88172
88196
  } else {
88173
88197
  zodSchema = z3.tuple(tupleItems);
88174
88198
  }
@@ -88683,19 +88707,19 @@ import * as fs25 from "fs";
88683
88707
 
88684
88708
  // assistant/src/module/assistant/proxy/utils.ts
88685
88709
  var isBun2 = typeof Bun !== "undefined" && Bun?.version != null;
88686
- var isNode = typeof process !== "undefined" && process?.versions != null && process.versions?.node != null;
88710
+ var isNode3 = typeof process !== "undefined" && process?.versions != null && process.versions?.node != null;
88687
88711
  var isDeno2 = typeof Deno !== "undefined" && Deno?.version != null && Deno?.version?.deno != null;
88688
88712
 
88689
88713
  // node_modules/.pnpm/@kevisual+logger@0.0.4/node_modules/@kevisual/logger/dist/logger.mjs
88690
88714
  var showTime2 = (time4, format = "hh:mm:ss") => {
88691
88715
  const date6 = new Date(time4);
88692
- const pad = (n) => n.toString().padStart(2, "0");
88716
+ const pad2 = (n) => n.toString().padStart(2, "0");
88693
88717
  const year2 = date6.getFullYear();
88694
- const month = pad(date6.getMonth() + 1);
88695
- const day2 = pad(date6.getDate());
88696
- const hours = pad(date6.getHours());
88697
- const minutes = pad(date6.getMinutes());
88698
- const seconds = pad(date6.getSeconds());
88718
+ const month = pad2(date6.getMonth() + 1);
88719
+ const day2 = pad2(date6.getDate());
88720
+ const hours = pad2(date6.getHours());
88721
+ const minutes = pad2(date6.getMinutes());
88722
+ const seconds = pad2(date6.getSeconds());
88699
88723
  if (format === "YYYY-MM-DD hh:mm:ss") {
88700
88724
  return `${year2}-${month}-${day2} ${hours}:${minutes}:${seconds}`;
88701
88725
  }
@@ -89083,20 +89107,23 @@ app.route({
89083
89107
  args: {
89084
89108
  dir: exports_external2.string().optional().describe("目录"),
89085
89109
  title: exports_external2.string().optional().describe("标题"),
89086
- id: exports_external2.string().optional().describe("id")
89110
+ id: exports_external2.string().optional().describe("id"),
89111
+ ext: exports_external2.string().optional().describe("mdx或者md,默认为md")
89087
89112
  }
89088
89113
  }
89089
89114
  }).define(async (ctx) => {
89090
- let { dir, title, id } = ctx.args;
89115
+ let { dir, title, id, ext } = ctx.args;
89091
89116
  const markLocalManager2 = new MarkLocalManager({ root: dir });
89092
89117
  await markLocalManager2.mount();
89093
89118
  const config5 = markLocalManager2.getConfig();
89094
- const dirname2 = `${id || import_dayjs2.default().format("YYYYMMDDHHmmss")}`;
89119
+ const dayId = "x" + import_dayjs2.default().format("YYYYMMDDHHmm");
89120
+ const dirname2 = `${id || dayId}`;
89095
89121
  const dirpath = path25.resolve(config5.root, dirname2);
89096
89122
  if (!fileIsExist3(dirpath)) {
89097
89123
  fs27.mkdirSync(dirpath, { recursive: true });
89098
89124
  }
89099
- const filepath = path25.resolve(config5.root, dirname2, "readme.md");
89125
+ const filename = markLocalManager2.filename;
89126
+ const filepath = path25.resolve(config5.root, dirname2, `${filename}.${ext || "md"}`);
89100
89127
  const data = {
89101
89128
  title: title || dirname2,
89102
89129
  updateAt: Date.now()