@kevisual/cli 0.0.97 → 0.0.99

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/assistant.js CHANGED
@@ -43,7 +43,7 @@ var __export = (target, all) => {
43
43
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
44
44
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
45
45
 
46
- // ../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/error.js
46
+ // ../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/error.js
47
47
  var require_error = __commonJS((exports) => {
48
48
  class CommanderError extends Error {
49
49
  constructor(exitCode, code, message) {
@@ -67,7 +67,7 @@ var require_error = __commonJS((exports) => {
67
67
  exports.InvalidArgumentError = InvalidArgumentError;
68
68
  });
69
69
 
70
- // ../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/argument.js
70
+ // ../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/argument.js
71
71
  var require_argument = __commonJS((exports) => {
72
72
  var { InvalidArgumentError } = require_error();
73
73
 
@@ -147,7 +147,7 @@ var require_argument = __commonJS((exports) => {
147
147
  exports.humanReadableArgName = humanReadableArgName;
148
148
  });
149
149
 
150
- // ../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/help.js
150
+ // ../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/help.js
151
151
  var require_help = __commonJS((exports) => {
152
152
  var { humanReadableArgName } = require_argument();
153
153
 
@@ -504,7 +504,7 @@ ${itemIndentStr}`);
504
504
  exports.stripColor = stripColor;
505
505
  });
506
506
 
507
- // ../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/option.js
507
+ // ../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/option.js
508
508
  var require_option = __commonJS((exports) => {
509
509
  var { InvalidArgumentError } = require_error();
510
510
 
@@ -688,7 +688,7 @@ var require_option = __commonJS((exports) => {
688
688
  exports.DualOptions = DualOptions;
689
689
  });
690
690
 
691
- // ../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/suggestSimilar.js
691
+ // ../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/suggestSimilar.js
692
692
  var require_suggestSimilar = __commonJS((exports) => {
693
693
  var maxDistance = 3;
694
694
  function editDistance(a, b) {
@@ -761,7 +761,7 @@ var require_suggestSimilar = __commonJS((exports) => {
761
761
  exports.suggestSimilar = suggestSimilar;
762
762
  });
763
763
 
764
- // ../node_modules/.pnpm/commander@14.0.2/node_modules/commander/lib/command.js
764
+ // ../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/command.js
765
765
  var require_command = __commonJS((exports) => {
766
766
  var EventEmitter = __require("node:events").EventEmitter;
767
767
  var childProcess = __require("node:child_process");
@@ -2116,7 +2116,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2116
2116
  exports.useColor = useColor;
2117
2117
  });
2118
2118
 
2119
- // ../node_modules/.pnpm/commander@14.0.2/node_modules/commander/index.js
2119
+ // ../node_modules/.pnpm/commander@14.0.3/node_modules/commander/index.js
2120
2120
  var require_commander = __commonJS((exports) => {
2121
2121
  var { Argument } = require_argument();
2122
2122
  var { Command } = require_command();
@@ -2755,12 +2755,12 @@ var require_depd = __commonJS((exports, module) => {
2755
2755
  if (typeof fn !== "function") {
2756
2756
  throw new TypeError("argument fn must be a function");
2757
2757
  }
2758
- var args = createArgumentsString(fn.length);
2758
+ var args2 = createArgumentsString(fn.length);
2759
2759
  var stack = getStack();
2760
2760
  var site = callSiteLocation(stack[1]);
2761
2761
  site.name = fn.name;
2762
2762
  var deprecatedfn = new Function("fn", "log", "deprecate", "message", "site", `"use strict"
2763
- ` + "return function (" + args + ") {" + `log.call(deprecate, message, site)
2763
+ ` + "return function (" + args2 + ") {" + `log.call(deprecate, message, site)
2764
2764
  ` + `return fn.apply(this, arguments)
2765
2765
  ` + "}")(fn, log, this, message, site);
2766
2766
  return deprecatedfn;
@@ -3365,7 +3365,7 @@ var require_common = __commonJS((exports, module) => {
3365
3365
  let enableOverride = null;
3366
3366
  let namespacesCache;
3367
3367
  let enabledCache;
3368
- function debug(...args) {
3368
+ function debug(...args2) {
3369
3369
  if (!debug.enabled) {
3370
3370
  return;
3371
3371
  }
@@ -3376,28 +3376,28 @@ var require_common = __commonJS((exports, module) => {
3376
3376
  self2.prev = prevTime;
3377
3377
  self2.curr = curr;
3378
3378
  prevTime = curr;
3379
- args[0] = createDebug.coerce(args[0]);
3380
- if (typeof args[0] !== "string") {
3381
- args.unshift("%O");
3379
+ args2[0] = createDebug.coerce(args2[0]);
3380
+ if (typeof args2[0] !== "string") {
3381
+ args2.unshift("%O");
3382
3382
  }
3383
3383
  let index = 0;
3384
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
3384
+ args2[0] = args2[0].replace(/%([a-zA-Z%])/g, (match, format) => {
3385
3385
  if (match === "%%") {
3386
3386
  return "%";
3387
3387
  }
3388
3388
  index++;
3389
3389
  const formatter = createDebug.formatters[format];
3390
3390
  if (typeof formatter === "function") {
3391
- const val = args[index];
3391
+ const val = args2[index];
3392
3392
  match = formatter.call(self2, val);
3393
- args.splice(index, 1);
3393
+ args2.splice(index, 1);
3394
3394
  index--;
3395
3395
  }
3396
3396
  return match;
3397
3397
  });
3398
- createDebug.formatArgs.call(self2, args);
3398
+ createDebug.formatArgs.call(self2, args2);
3399
3399
  const logFn = self2.log || createDebug.log;
3400
- logFn.apply(self2, args);
3400
+ logFn.apply(self2, args2);
3401
3401
  }
3402
3402
  debug.namespace = namespace;
3403
3403
  debug.useColors = createDebug.useColors();
@@ -3613,16 +3613,16 @@ var require_browser = __commonJS((exports, module) => {
3613
3613
  let m;
3614
3614
  return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
3615
3615
  }
3616
- function formatArgs(args) {
3617
- args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
3616
+ function formatArgs(args2) {
3617
+ args2[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args2[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
3618
3618
  if (!this.useColors) {
3619
3619
  return;
3620
3620
  }
3621
3621
  const c = "color: " + this.color;
3622
- args.splice(1, 0, c, "color: inherit");
3622
+ args2.splice(1, 0, c, "color: inherit");
3623
3623
  let index = 0;
3624
3624
  let lastC = 0;
3625
- args[0].replace(/%[a-zA-Z%]/g, (match) => {
3625
+ args2[0].replace(/%[a-zA-Z%]/g, (match) => {
3626
3626
  if (match === "%%") {
3627
3627
  return;
3628
3628
  }
@@ -3631,7 +3631,7 @@ var require_browser = __commonJS((exports, module) => {
3631
3631
  lastC = index;
3632
3632
  }
3633
3633
  });
3634
- args.splice(lastC, 0, c);
3634
+ args2.splice(lastC, 0, c);
3635
3635
  }
3636
3636
  exports.log = console.debug || console.log || (() => {});
3637
3637
  function save(namespaces) {
@@ -3933,18 +3933,18 @@ var require_node = __commonJS((exports, module) => {
3933
3933
  function useColors() {
3934
3934
  return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
3935
3935
  }
3936
- function formatArgs(args) {
3936
+ function formatArgs(args2) {
3937
3937
  const { namespace: name, useColors: useColors2 } = this;
3938
3938
  if (useColors2) {
3939
3939
  const c = this.color;
3940
3940
  const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
3941
3941
  const prefix = ` ${colorCode};1m${name} \x1B[0m`;
3942
- args[0] = prefix + args[0].split(`
3942
+ args2[0] = prefix + args2[0].split(`
3943
3943
  `).join(`
3944
3944
  ` + prefix);
3945
- args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
3945
+ args2.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
3946
3946
  } else {
3947
- args[0] = getDate() + name + " " + args[0];
3947
+ args2[0] = getDate() + name + " " + args2[0];
3948
3948
  }
3949
3949
  }
3950
3950
  function getDate() {
@@ -3953,8 +3953,8 @@ var require_node = __commonJS((exports, module) => {
3953
3953
  }
3954
3954
  return new Date().toISOString() + " ";
3955
3955
  }
3956
- function log(...args) {
3957
- return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + `
3956
+ function log(...args2) {
3957
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args2) + `
3958
3958
  `);
3959
3959
  }
3960
3960
  function save(namespaces) {
@@ -13626,11 +13626,11 @@ var require_mime_types = __commonJS((exports) => {
13626
13626
  }
13627
13627
  return exts[0];
13628
13628
  }
13629
- function lookup(path2) {
13630
- if (!path2 || typeof path2 !== "string") {
13629
+ function lookup(path3) {
13630
+ if (!path3 || typeof path3 !== "string") {
13631
13631
  return false;
13632
13632
  }
13633
- var extension2 = extname("x." + path2).toLowerCase().slice(1);
13633
+ var extension2 = extname("x." + path3).toLowerCase().slice(1);
13634
13634
  if (!extension2) {
13635
13635
  return false;
13636
13636
  }
@@ -13717,13 +13717,13 @@ var require_ee_first = __commonJS((exports, module) => {
13717
13717
  }
13718
13718
  function listener(event, done) {
13719
13719
  return function onevent(arg1) {
13720
- var args = new Array(arguments.length);
13720
+ var args2 = new Array(arguments.length);
13721
13721
  var ee = this;
13722
13722
  var err = event === "error" ? arg1 : null;
13723
- for (var i = 0;i < args.length; i++) {
13724
- args[i] = arguments[i];
13723
+ for (var i = 0;i < args2.length; i++) {
13724
+ args2[i] = arguments[i];
13725
13725
  }
13726
- done(err, ee, event, args);
13726
+ done(err, ee, event, args2);
13727
13727
  };
13728
13728
  }
13729
13729
  });
@@ -13943,27 +13943,27 @@ var require_send = __commonJS((exports, module) => {
13943
13943
  var ms = require_ms();
13944
13944
  var onFinished = require_on_finished();
13945
13945
  var parseRange = require_range_parser();
13946
- var path2 = __require("path");
13946
+ var path3 = __require("path");
13947
13947
  var statuses = require_statuses();
13948
13948
  var Stream = __require("stream");
13949
13949
  var util = __require("util");
13950
- var extname = path2.extname;
13951
- var join = path2.join;
13952
- var normalize = path2.normalize;
13953
- var resolve = path2.resolve;
13954
- var sep = path2.sep;
13950
+ var extname = path3.extname;
13951
+ var join = path3.join;
13952
+ var normalize = path3.normalize;
13953
+ var resolve = path3.resolve;
13954
+ var sep = path3.sep;
13955
13955
  var BYTES_RANGE_REGEXP = /^ *bytes=/;
13956
13956
  var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1000;
13957
13957
  var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/;
13958
13958
  module.exports = send;
13959
- function send(req, path3, options) {
13960
- return new SendStream(req, path3, options);
13959
+ function send(req, path4, options) {
13960
+ return new SendStream(req, path4, options);
13961
13961
  }
13962
- function SendStream(req, path3, options) {
13962
+ function SendStream(req, path4, options) {
13963
13963
  Stream.call(this);
13964
13964
  var opts = options || {};
13965
13965
  this.options = opts;
13966
- this.path = path3;
13966
+ this.path = path4;
13967
13967
  this.req = req;
13968
13968
  this._acceptRanges = opts.acceptRanges !== undefined ? Boolean(opts.acceptRanges) : true;
13969
13969
  this._cacheControl = opts.cacheControl !== undefined ? Boolean(opts.cacheControl) : true;
@@ -14077,10 +14077,10 @@ var require_send = __commonJS((exports, module) => {
14077
14077
  var lastModified = this.res.getHeader("Last-Modified");
14078
14078
  return parseHttpDate(lastModified) <= parseHttpDate(ifRange);
14079
14079
  };
14080
- SendStream.prototype.redirect = function redirect(path3) {
14080
+ SendStream.prototype.redirect = function redirect(path4) {
14081
14081
  var res = this.res;
14082
14082
  if (hasListeners(this, "directory")) {
14083
- this.emit("directory", res, path3);
14083
+ this.emit("directory", res, path4);
14084
14084
  return;
14085
14085
  }
14086
14086
  if (this.hasTrailingSlash()) {
@@ -14100,38 +14100,38 @@ var require_send = __commonJS((exports, module) => {
14100
14100
  SendStream.prototype.pipe = function pipe(res) {
14101
14101
  var root = this._root;
14102
14102
  this.res = res;
14103
- var path3 = decode(this.path);
14104
- if (path3 === -1) {
14103
+ var path4 = decode(this.path);
14104
+ if (path4 === -1) {
14105
14105
  this.error(400);
14106
14106
  return res;
14107
14107
  }
14108
- if (~path3.indexOf("\x00")) {
14108
+ if (~path4.indexOf("\x00")) {
14109
14109
  this.error(400);
14110
14110
  return res;
14111
14111
  }
14112
14112
  var parts;
14113
14113
  if (root !== null) {
14114
- if (path3) {
14115
- path3 = normalize("." + sep + path3);
14114
+ if (path4) {
14115
+ path4 = normalize("." + sep + path4);
14116
14116
  }
14117
- if (UP_PATH_REGEXP.test(path3)) {
14118
- debug('malicious path "%s"', path3);
14117
+ if (UP_PATH_REGEXP.test(path4)) {
14118
+ debug('malicious path "%s"', path4);
14119
14119
  this.error(403);
14120
14120
  return res;
14121
14121
  }
14122
- parts = path3.split(sep);
14123
- path3 = normalize(join(root, path3));
14122
+ parts = path4.split(sep);
14123
+ path4 = normalize(join(root, path4));
14124
14124
  } else {
14125
- if (UP_PATH_REGEXP.test(path3)) {
14126
- debug('malicious path "%s"', path3);
14125
+ if (UP_PATH_REGEXP.test(path4)) {
14126
+ debug('malicious path "%s"', path4);
14127
14127
  this.error(403);
14128
14128
  return res;
14129
14129
  }
14130
- parts = normalize(path3).split(sep);
14131
- path3 = resolve(path3);
14130
+ parts = normalize(path4).split(sep);
14131
+ path4 = resolve(path4);
14132
14132
  }
14133
14133
  if (containsDotFile(parts)) {
14134
- debug('%s dotfile "%s"', this._dotfiles, path3);
14134
+ debug('%s dotfile "%s"', this._dotfiles, path4);
14135
14135
  switch (this._dotfiles) {
14136
14136
  case "allow":
14137
14137
  break;
@@ -14145,13 +14145,13 @@ var require_send = __commonJS((exports, module) => {
14145
14145
  }
14146
14146
  }
14147
14147
  if (this._index.length && this.hasTrailingSlash()) {
14148
- this.sendIndex(path3);
14148
+ this.sendIndex(path4);
14149
14149
  return res;
14150
14150
  }
14151
- this.sendFile(path3);
14151
+ this.sendFile(path4);
14152
14152
  return res;
14153
14153
  };
14154
- SendStream.prototype.send = function send2(path3, stat) {
14154
+ SendStream.prototype.send = function send2(path4, stat) {
14155
14155
  var len = stat.size;
14156
14156
  var options = this.options;
14157
14157
  var opts = {};
@@ -14163,9 +14163,9 @@ var require_send = __commonJS((exports, module) => {
14163
14163
  this.headersAlreadySent();
14164
14164
  return;
14165
14165
  }
14166
- debug('pipe "%s"', path3);
14167
- this.setHeader(path3, stat);
14168
- this.type(path3);
14166
+ debug('pipe "%s"', path4);
14167
+ this.setHeader(path4, stat);
14168
+ this.type(path4);
14169
14169
  if (this.isConditionalGET()) {
14170
14170
  if (this.isPreconditionFailure()) {
14171
14171
  this.error(412);
@@ -14215,31 +14215,31 @@ var require_send = __commonJS((exports, module) => {
14215
14215
  res.end();
14216
14216
  return;
14217
14217
  }
14218
- this.stream(path3, opts);
14218
+ this.stream(path4, opts);
14219
14219
  };
14220
- SendStream.prototype.sendFile = function sendFile(path3) {
14220
+ SendStream.prototype.sendFile = function sendFile(path4) {
14221
14221
  var i = 0;
14222
14222
  var self2 = this;
14223
- debug('stat "%s"', path3);
14224
- fs3.stat(path3, function onstat(err, stat) {
14225
- var pathEndsWithSep = path3[path3.length - 1] === sep;
14226
- if (err && err.code === "ENOENT" && !extname(path3) && !pathEndsWithSep) {
14223
+ debug('stat "%s"', path4);
14224
+ fs3.stat(path4, function onstat(err, stat) {
14225
+ var pathEndsWithSep = path4[path4.length - 1] === sep;
14226
+ if (err && err.code === "ENOENT" && !extname(path4) && !pathEndsWithSep) {
14227
14227
  return next(err);
14228
14228
  }
14229
14229
  if (err)
14230
14230
  return self2.onStatError(err);
14231
14231
  if (stat.isDirectory())
14232
- return self2.redirect(path3);
14232
+ return self2.redirect(path4);
14233
14233
  if (pathEndsWithSep)
14234
14234
  return self2.error(404);
14235
- self2.emit("file", path3, stat);
14236
- self2.send(path3, stat);
14235
+ self2.emit("file", path4, stat);
14236
+ self2.send(path4, stat);
14237
14237
  });
14238
14238
  function next(err) {
14239
14239
  if (self2._extensions.length <= i) {
14240
14240
  return err ? self2.onStatError(err) : self2.error(404);
14241
14241
  }
14242
- var p = path3 + "." + self2._extensions[i++];
14242
+ var p = path4 + "." + self2._extensions[i++];
14243
14243
  debug('stat "%s"', p);
14244
14244
  fs3.stat(p, function(err2, stat) {
14245
14245
  if (err2)
@@ -14251,7 +14251,7 @@ var require_send = __commonJS((exports, module) => {
14251
14251
  });
14252
14252
  }
14253
14253
  };
14254
- SendStream.prototype.sendIndex = function sendIndex(path3) {
14254
+ SendStream.prototype.sendIndex = function sendIndex(path4) {
14255
14255
  var i = -1;
14256
14256
  var self2 = this;
14257
14257
  function next(err) {
@@ -14260,7 +14260,7 @@ var require_send = __commonJS((exports, module) => {
14260
14260
  return self2.onStatError(err);
14261
14261
  return self2.error(404);
14262
14262
  }
14263
- var p = join(path3, self2._index[i]);
14263
+ var p = join(path4, self2._index[i]);
14264
14264
  debug('stat "%s"', p);
14265
14265
  fs3.stat(p, function(err2, stat) {
14266
14266
  if (err2)
@@ -14273,10 +14273,10 @@ var require_send = __commonJS((exports, module) => {
14273
14273
  }
14274
14274
  next();
14275
14275
  };
14276
- SendStream.prototype.stream = function stream(path3, options) {
14276
+ SendStream.prototype.stream = function stream(path4, options) {
14277
14277
  var self2 = this;
14278
14278
  var res = this.res;
14279
- var stream2 = fs3.createReadStream(path3, options);
14279
+ var stream2 = fs3.createReadStream(path4, options);
14280
14280
  this.emit("stream", stream2);
14281
14281
  stream2.pipe(res);
14282
14282
  function cleanup() {
@@ -14291,18 +14291,18 @@ var require_send = __commonJS((exports, module) => {
14291
14291
  self2.emit("end");
14292
14292
  });
14293
14293
  };
14294
- SendStream.prototype.type = function type(path3) {
14294
+ SendStream.prototype.type = function type(path4) {
14295
14295
  var res = this.res;
14296
14296
  if (res.getHeader("Content-Type"))
14297
14297
  return;
14298
- var ext = extname(path3);
14298
+ var ext = extname(path4);
14299
14299
  var type2 = mime.contentType(ext) || "application/octet-stream";
14300
14300
  debug("content-type %s", type2);
14301
14301
  res.setHeader("Content-Type", type2);
14302
14302
  };
14303
- SendStream.prototype.setHeader = function setHeader(path3, stat) {
14303
+ SendStream.prototype.setHeader = function setHeader(path4, stat) {
14304
14304
  var res = this.res;
14305
- this.emit("headers", res, path3, stat);
14305
+ this.emit("headers", res, path4, stat);
14306
14306
  if (this._acceptRanges && !res.getHeader("Accept-Ranges")) {
14307
14307
  debug("accept ranges");
14308
14308
  res.setHeader("Accept-Ranges", "bytes");
@@ -14370,9 +14370,9 @@ var require_send = __commonJS((exports, module) => {
14370
14370
  }
14371
14371
  return err instanceof Error ? createError(status, err, { expose: false }) : createError(status, err);
14372
14372
  }
14373
- function decode(path3) {
14373
+ function decode(path4) {
14374
14374
  try {
14375
- return decodeURIComponent(path3);
14375
+ return decodeURIComponent(path4);
14376
14376
  } catch (err) {
14377
14377
  return -1;
14378
14378
  }
@@ -14492,7 +14492,7 @@ var require_path = __commonJS((exports) => {
14492
14492
  Object.defineProperty(exports, "__esModule", { value: true });
14493
14493
  exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = undefined;
14494
14494
  var os2 = __require("os");
14495
- var path5 = __require("path");
14495
+ var path6 = __require("path");
14496
14496
  var IS_WINDOWS_PLATFORM = os2.platform() === "win32";
14497
14497
  var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
14498
14498
  var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
@@ -14504,7 +14504,7 @@ var require_path = __commonJS((exports) => {
14504
14504
  }
14505
14505
  exports.unixify = unixify;
14506
14506
  function makeAbsolute(cwd, filepath) {
14507
- return path5.resolve(cwd, filepath);
14507
+ return path6.resolve(cwd, filepath);
14508
14508
  }
14509
14509
  exports.makeAbsolute = makeAbsolute;
14510
14510
  function removeLeadingDotSegment(entry2) {
@@ -14787,7 +14787,7 @@ var require_utils = __commonJS((exports) => {
14787
14787
  node.type = "text";
14788
14788
  return acc;
14789
14789
  }, []);
14790
- exports.flatten = (...args) => {
14790
+ exports.flatten = (...args2) => {
14791
14791
  const result = [];
14792
14792
  const flat = (arr) => {
14793
14793
  for (let i = 0;i < arr.length; i++) {
@@ -14802,7 +14802,7 @@ var require_utils = __commonJS((exports) => {
14802
14802
  }
14803
14803
  return result;
14804
14804
  };
14805
- flat(args);
14805
+ flat(args2);
14806
14806
  return result;
14807
14807
  };
14808
14808
  });
@@ -15167,8 +15167,8 @@ var require_fill_range = __commonJS((exports, module) => {
15167
15167
  }
15168
15168
  return toRegexRange(start3, end, options);
15169
15169
  };
15170
- var rangeError = (...args) => {
15171
- return new RangeError("Invalid range arguments: " + util.inspect(...args));
15170
+ var rangeError = (...args2) => {
15171
+ return new RangeError("Invalid range arguments: " + util.inspect(...args2));
15172
15172
  };
15173
15173
  var invalidRange = (start3, end, options) => {
15174
15174
  if (options.strictRanges === true)
@@ -15309,10 +15309,10 @@ var require_compile = __commonJS((exports, module) => {
15309
15309
  return node.value;
15310
15310
  }
15311
15311
  if (node.nodes && node.ranges > 0) {
15312
- const args = utils2.reduce(node.nodes);
15313
- const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true });
15312
+ const args2 = utils2.reduce(node.nodes);
15313
+ const range = fill(...args2, { ...options, wrap: false, toRegex: true, strictZeros: true });
15314
15314
  if (range.length !== 0) {
15315
- return args.length > 1 && range.length > 1 ? `(${range})` : range;
15315
+ return args2.length > 1 && range.length > 1 ? `(${range})` : range;
15316
15316
  }
15317
15317
  }
15318
15318
  if (node.nodes) {
@@ -15375,11 +15375,11 @@ var require_expand = __commonJS((exports, module) => {
15375
15375
  return;
15376
15376
  }
15377
15377
  if (node.nodes && node.ranges > 0) {
15378
- const args = utils2.reduce(node.nodes);
15379
- if (utils2.exceedsLimit(...args, options.step, rangeLimit)) {
15378
+ const args2 = utils2.reduce(node.nodes);
15379
+ if (utils2.exceedsLimit(...args2, options.step, rangeLimit)) {
15380
15380
  throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
15381
15381
  }
15382
- let range = fill(...args, options);
15382
+ let range = fill(...args2, options);
15383
15383
  if (range.length === 0) {
15384
15384
  range = stringify2(node, options);
15385
15385
  }
@@ -15762,7 +15762,7 @@ var require_braces = __commonJS((exports, module) => {
15762
15762
 
15763
15763
  // ../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js
15764
15764
  var require_constants2 = __commonJS((exports, module) => {
15765
- var path5 = __require("path");
15765
+ var path6 = __require("path");
15766
15766
  var WIN_SLASH = "\\\\/";
15767
15767
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
15768
15768
  var DOT_LITERAL = "\\.";
@@ -15884,7 +15884,7 @@ var require_constants2 = __commonJS((exports, module) => {
15884
15884
  CHAR_UNDERSCORE: 95,
15885
15885
  CHAR_VERTICAL_LINE: 124,
15886
15886
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
15887
- SEP: path5.sep,
15887
+ SEP: path6.sep,
15888
15888
  extglobChars(chars) {
15889
15889
  return {
15890
15890
  "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` },
@@ -15902,7 +15902,7 @@ var require_constants2 = __commonJS((exports, module) => {
15902
15902
 
15903
15903
  // ../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js
15904
15904
  var require_utils2 = __commonJS((exports) => {
15905
- var path5 = __require("path");
15905
+ var path6 = __require("path");
15906
15906
  var win32 = process.platform === "win32";
15907
15907
  var {
15908
15908
  REGEX_BACKSLASH,
@@ -15931,7 +15931,7 @@ var require_utils2 = __commonJS((exports) => {
15931
15931
  if (options && typeof options.windows === "boolean") {
15932
15932
  return options.windows;
15933
15933
  }
15934
- return win32 === true || path5.sep === "\\";
15934
+ return win32 === true || path6.sep === "\\";
15935
15935
  };
15936
15936
  exports.escapeLast = (input, char, lastIdx) => {
15937
15937
  const idx = input.lastIndexOf(char, lastIdx);
@@ -16286,16 +16286,16 @@ var require_parse2 = __commonJS((exports, module) => {
16286
16286
  REGEX_SPECIAL_CHARS_BACKREF,
16287
16287
  REPLACEMENTS
16288
16288
  } = constants2;
16289
- var expandRange = (args, options) => {
16289
+ var expandRange = (args2, options) => {
16290
16290
  if (typeof options.expandRange === "function") {
16291
- return options.expandRange(...args, options);
16291
+ return options.expandRange(...args2, options);
16292
16292
  }
16293
- args.sort();
16294
- const value = `[${args.join("-")}]`;
16293
+ args2.sort();
16294
+ const value = `[${args2.join("-")}]`;
16295
16295
  try {
16296
16296
  new RegExp(value);
16297
16297
  } catch (ex) {
16298
- return args.map((v) => utils2.escapeRegex(v)).join("..");
16298
+ return args2.map((v) => utils2.escapeRegex(v)).join("..");
16299
16299
  }
16300
16300
  return value;
16301
16301
  };
@@ -17055,7 +17055,7 @@ var require_parse2 = __commonJS((exports, module) => {
17055
17055
 
17056
17056
  // ../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js
17057
17057
  var require_picomatch = __commonJS((exports, module) => {
17058
- var path5 = __require("path");
17058
+ var path6 = __require("path");
17059
17059
  var scan = require_scan();
17060
17060
  var parse = require_parse2();
17061
17061
  var utils2 = require_utils2();
@@ -17141,7 +17141,7 @@ var require_picomatch = __commonJS((exports, module) => {
17141
17141
  };
17142
17142
  picomatch2.matchBase = (input, glob2, options, posix = utils2.isWindows(options)) => {
17143
17143
  const regex = glob2 instanceof RegExp ? glob2 : picomatch2.makeRe(glob2, options);
17144
- return regex.test(path5.basename(input));
17144
+ return regex.test(path6.basename(input));
17145
17145
  };
17146
17146
  picomatch2.isMatch = (str, patterns, options) => picomatch2(patterns, options)(str);
17147
17147
  picomatch2.parse = (pattern2, options) => {
@@ -17330,8 +17330,8 @@ var require_micromatch = __commonJS((exports, module) => {
17330
17330
  return match.slice(1).map((v) => v === undefined ? "" : v);
17331
17331
  }
17332
17332
  };
17333
- micromatch.makeRe = (...args) => picomatch2.makeRe(...args);
17334
- micromatch.scan = (...args) => picomatch2.scan(...args);
17333
+ micromatch.makeRe = (...args2) => picomatch2.makeRe(...args2);
17334
+ micromatch.scan = (...args2) => picomatch2.scan(...args2);
17335
17335
  micromatch.parse = (patterns, options) => {
17336
17336
  let res = [];
17337
17337
  for (let pattern2 of [].concat(patterns || [])) {
@@ -17362,7 +17362,7 @@ var require_micromatch = __commonJS((exports, module) => {
17362
17362
  var require_pattern = __commonJS((exports) => {
17363
17363
  Object.defineProperty(exports, "__esModule", { value: true });
17364
17364
  exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = undefined;
17365
- var path5 = __require("path");
17365
+ var path6 = __require("path");
17366
17366
  var globParent2 = require_glob_parent();
17367
17367
  var micromatch = require_micromatch();
17368
17368
  var GLOBSTAR = "**";
@@ -17457,7 +17457,7 @@ var require_pattern = __commonJS((exports) => {
17457
17457
  }
17458
17458
  exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
17459
17459
  function isAffectDepthOfReadingPattern(pattern2) {
17460
- const basename = path5.basename(pattern2);
17460
+ const basename = path6.basename(pattern2);
17461
17461
  return endsWithSlashGlobStar(pattern2) || isStaticPattern(basename);
17462
17462
  }
17463
17463
  exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
@@ -17515,7 +17515,7 @@ var require_pattern = __commonJS((exports) => {
17515
17515
  }
17516
17516
  exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
17517
17517
  function isAbsolute(pattern2) {
17518
- return path5.isAbsolute(pattern2);
17518
+ return path6.isAbsolute(pattern2);
17519
17519
  }
17520
17520
  exports.isAbsolute = isAbsolute;
17521
17521
  });
@@ -17528,11 +17528,11 @@ var require_merge2 = __commonJS((exports, module) => {
17528
17528
  module.exports = merge22;
17529
17529
  function merge22() {
17530
17530
  const streamsQueue = [];
17531
- const args = slice.call(arguments);
17531
+ const args2 = slice.call(arguments);
17532
17532
  let merging = false;
17533
- let options = args[args.length - 1];
17533
+ let options = args2[args2.length - 1];
17534
17534
  if (options && !Array.isArray(options) && options.pipe == null) {
17535
- args.pop();
17535
+ args2.pop();
17536
17536
  } else {
17537
17537
  options = {};
17538
17538
  }
@@ -17613,8 +17613,8 @@ var require_merge2 = __commonJS((exports, module) => {
17613
17613
  mergedStream.on("unpipe", function(stream2) {
17614
17614
  stream2.emit("merge2UnpipeEnd");
17615
17615
  });
17616
- if (args.length) {
17617
- addStream.apply(null, args);
17616
+ if (args2.length) {
17617
+ addStream.apply(null, args2);
17618
17618
  }
17619
17619
  return mergedStream;
17620
17620
  }
@@ -17680,8 +17680,8 @@ var require_utils3 = __commonJS((exports) => {
17680
17680
  exports.errno = errno2;
17681
17681
  var fs6 = require_fs();
17682
17682
  exports.fs = fs6;
17683
- var path5 = require_path();
17684
- exports.path = path5;
17683
+ var path6 = require_path();
17684
+ exports.path = path6;
17685
17685
  var pattern2 = require_pattern();
17686
17686
  exports.pattern = pattern2;
17687
17687
  var stream2 = require_stream();
@@ -17777,8 +17777,8 @@ var require_tasks = __commonJS((exports) => {
17777
17777
  var require_async = __commonJS((exports) => {
17778
17778
  Object.defineProperty(exports, "__esModule", { value: true });
17779
17779
  exports.read = undefined;
17780
- function read(path5, settings2, callback) {
17781
- settings2.fs.lstat(path5, (lstatError, lstat) => {
17780
+ function read(path6, settings2, callback) {
17781
+ settings2.fs.lstat(path6, (lstatError, lstat) => {
17782
17782
  if (lstatError !== null) {
17783
17783
  callFailureCallback(callback, lstatError);
17784
17784
  return;
@@ -17787,7 +17787,7 @@ var require_async = __commonJS((exports) => {
17787
17787
  callSuccessCallback(callback, lstat);
17788
17788
  return;
17789
17789
  }
17790
- settings2.fs.stat(path5, (statError, stat) => {
17790
+ settings2.fs.stat(path6, (statError, stat) => {
17791
17791
  if (statError !== null) {
17792
17792
  if (settings2.throwErrorOnBrokenSymbolicLink) {
17793
17793
  callFailureCallback(callback, statError);
@@ -17816,13 +17816,13 @@ var require_async = __commonJS((exports) => {
17816
17816
  var require_sync = __commonJS((exports) => {
17817
17817
  Object.defineProperty(exports, "__esModule", { value: true });
17818
17818
  exports.read = undefined;
17819
- function read(path5, settings2) {
17820
- const lstat = settings2.fs.lstatSync(path5);
17819
+ function read(path6, settings2) {
17820
+ const lstat = settings2.fs.lstatSync(path6);
17821
17821
  if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
17822
17822
  return lstat;
17823
17823
  }
17824
17824
  try {
17825
- const stat = settings2.fs.statSync(path5);
17825
+ const stat = settings2.fs.statSync(path6);
17826
17826
  if (settings2.markSymbolicLink) {
17827
17827
  stat.isSymbolicLink = () => true;
17828
17828
  }
@@ -17885,17 +17885,17 @@ var require_out = __commonJS((exports) => {
17885
17885
  var sync2 = require_sync();
17886
17886
  var settings_1 = require_settings();
17887
17887
  exports.Settings = settings_1.default;
17888
- function stat(path5, optionsOrSettingsOrCallback, callback) {
17888
+ function stat(path6, optionsOrSettingsOrCallback, callback) {
17889
17889
  if (typeof optionsOrSettingsOrCallback === "function") {
17890
- async2.read(path5, getSettings(), optionsOrSettingsOrCallback);
17890
+ async2.read(path6, getSettings(), optionsOrSettingsOrCallback);
17891
17891
  return;
17892
17892
  }
17893
- async2.read(path5, getSettings(optionsOrSettingsOrCallback), callback);
17893
+ async2.read(path6, getSettings(optionsOrSettingsOrCallback), callback);
17894
17894
  }
17895
17895
  exports.stat = stat;
17896
- function statSync(path5, optionsOrSettings) {
17896
+ function statSync(path6, optionsOrSettings) {
17897
17897
  const settings2 = getSettings(optionsOrSettings);
17898
- return sync2.read(path5, settings2);
17898
+ return sync2.read(path6, settings2);
17899
17899
  }
17900
17900
  exports.statSync = statSync;
17901
17901
  function getSettings(settingsOrOptions = {}) {
@@ -18098,16 +18098,16 @@ var require_async2 = __commonJS((exports) => {
18098
18098
  return;
18099
18099
  }
18100
18100
  const tasks2 = names.map((name) => {
18101
- const path5 = common2.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
18101
+ const path6 = common2.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
18102
18102
  return (done) => {
18103
- fsStat.stat(path5, settings2.fsStatSettings, (error2, stats) => {
18103
+ fsStat.stat(path6, settings2.fsStatSettings, (error2, stats) => {
18104
18104
  if (error2 !== null) {
18105
18105
  done(error2);
18106
18106
  return;
18107
18107
  }
18108
18108
  const entry2 = {
18109
18109
  name,
18110
- path: path5,
18110
+ path: path6,
18111
18111
  dirent: utils2.fs.createDirentFromStats(name, stats)
18112
18112
  };
18113
18113
  if (settings2.stats) {
@@ -18216,7 +18216,7 @@ var require_fs4 = __commonJS((exports) => {
18216
18216
  // ../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js
18217
18217
  var require_settings2 = __commonJS((exports) => {
18218
18218
  Object.defineProperty(exports, "__esModule", { value: true });
18219
- var path5 = __require("path");
18219
+ var path6 = __require("path");
18220
18220
  var fsStat = require_out();
18221
18221
  var fs6 = require_fs4();
18222
18222
 
@@ -18225,7 +18225,7 @@ var require_settings2 = __commonJS((exports) => {
18225
18225
  this._options = _options;
18226
18226
  this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
18227
18227
  this.fs = fs6.createFileSystemAdapter(this._options.fs);
18228
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path5.sep);
18228
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path6.sep);
18229
18229
  this.stats = this._getValue(this._options.stats, false);
18230
18230
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
18231
18231
  this.fsStatSettings = new fsStat.Settings({
@@ -18249,17 +18249,17 @@ var require_out2 = __commonJS((exports) => {
18249
18249
  var sync2 = require_sync2();
18250
18250
  var settings_1 = require_settings2();
18251
18251
  exports.Settings = settings_1.default;
18252
- function scandir(path5, optionsOrSettingsOrCallback, callback) {
18252
+ function scandir(path6, optionsOrSettingsOrCallback, callback) {
18253
18253
  if (typeof optionsOrSettingsOrCallback === "function") {
18254
- async2.read(path5, getSettings(), optionsOrSettingsOrCallback);
18254
+ async2.read(path6, getSettings(), optionsOrSettingsOrCallback);
18255
18255
  return;
18256
18256
  }
18257
- async2.read(path5, getSettings(optionsOrSettingsOrCallback), callback);
18257
+ async2.read(path6, getSettings(optionsOrSettingsOrCallback), callback);
18258
18258
  }
18259
18259
  exports.scandir = scandir;
18260
- function scandirSync(path5, optionsOrSettings) {
18260
+ function scandirSync(path6, optionsOrSettings) {
18261
18261
  const settings2 = getSettings(optionsOrSettings);
18262
- return sync2.read(path5, settings2);
18262
+ return sync2.read(path6, settings2);
18263
18263
  }
18264
18264
  exports.scandirSync = scandirSync;
18265
18265
  function getSettings(settingsOrOptions = {}) {
@@ -18857,7 +18857,7 @@ var require_sync4 = __commonJS((exports) => {
18857
18857
  // ../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js
18858
18858
  var require_settings3 = __commonJS((exports) => {
18859
18859
  Object.defineProperty(exports, "__esModule", { value: true });
18860
- var path5 = __require("path");
18860
+ var path6 = __require("path");
18861
18861
  var fsScandir = require_out2();
18862
18862
 
18863
18863
  class Settings {
@@ -18868,7 +18868,7 @@ var require_settings3 = __commonJS((exports) => {
18868
18868
  this.deepFilter = this._getValue(this._options.deepFilter, null);
18869
18869
  this.entryFilter = this._getValue(this._options.entryFilter, null);
18870
18870
  this.errorFilter = this._getValue(this._options.errorFilter, null);
18871
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path5.sep);
18871
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path6.sep);
18872
18872
  this.fsScandirSettings = new fsScandir.Settings({
18873
18873
  followSymbolicLinks: this._options.followSymbolicLinks,
18874
18874
  fs: this._options.fs,
@@ -18924,7 +18924,7 @@ var require_out3 = __commonJS((exports) => {
18924
18924
  // ../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js
18925
18925
  var require_reader2 = __commonJS((exports) => {
18926
18926
  Object.defineProperty(exports, "__esModule", { value: true });
18927
- var path5 = __require("path");
18927
+ var path6 = __require("path");
18928
18928
  var fsStat = require_out();
18929
18929
  var utils2 = require_utils3();
18930
18930
 
@@ -18938,7 +18938,7 @@ var require_reader2 = __commonJS((exports) => {
18938
18938
  });
18939
18939
  }
18940
18940
  _getFullEntryPath(filepath) {
18941
- return path5.resolve(this._settings.cwd, filepath);
18941
+ return path6.resolve(this._settings.cwd, filepath);
18942
18942
  }
18943
18943
  _makeEntry(stats, pattern2) {
18944
18944
  const entry2 = {
@@ -19335,7 +19335,7 @@ var require_entry2 = __commonJS((exports) => {
19335
19335
  // ../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js
19336
19336
  var require_provider = __commonJS((exports) => {
19337
19337
  Object.defineProperty(exports, "__esModule", { value: true });
19338
- var path5 = __require("path");
19338
+ var path6 = __require("path");
19339
19339
  var deep_1 = require_deep();
19340
19340
  var entry_1 = require_entry();
19341
19341
  var error_1 = require_error2();
@@ -19350,7 +19350,7 @@ var require_provider = __commonJS((exports) => {
19350
19350
  this.entryTransformer = new entry_2.default(this._settings);
19351
19351
  }
19352
19352
  _getRootDirectory(task) {
19353
- return path5.resolve(this._settings.cwd, task.base);
19353
+ return path6.resolve(this._settings.cwd, task.base);
19354
19354
  }
19355
19355
  _getReaderOptions(task) {
19356
19356
  const basePath = task.base === "." ? "" : task.base;
@@ -19745,7 +19745,7 @@ var require_eventemitter3 = __commonJS((exports, module) => {
19745
19745
  var evt = prefix ? prefix + event : event;
19746
19746
  if (!this._events[evt])
19747
19747
  return false;
19748
- var listeners = this._events[evt], len = arguments.length, args, i;
19748
+ var listeners = this._events[evt], len = arguments.length, args2, i;
19749
19749
  if (listeners.fn) {
19750
19750
  if (listeners.once)
19751
19751
  this.removeListener(event, listeners.fn, undefined, true);
@@ -19763,10 +19763,10 @@ var require_eventemitter3 = __commonJS((exports, module) => {
19763
19763
  case 6:
19764
19764
  return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
19765
19765
  }
19766
- for (i = 1, args = new Array(len - 1);i < len; i++) {
19767
- args[i - 1] = arguments[i];
19766
+ for (i = 1, args2 = new Array(len - 1);i < len; i++) {
19767
+ args2[i - 1] = arguments[i];
19768
19768
  }
19769
- listeners.fn.apply(listeners.context, args);
19769
+ listeners.fn.apply(listeners.context, args2);
19770
19770
  } else {
19771
19771
  var length = listeners.length, j;
19772
19772
  for (i = 0;i < length; i++) {
@@ -19786,11 +19786,11 @@ var require_eventemitter3 = __commonJS((exports, module) => {
19786
19786
  listeners[i].fn.call(listeners[i].context, a1, a2, a3);
19787
19787
  break;
19788
19788
  default:
19789
- if (!args)
19790
- for (j = 1, args = new Array(len - 1);j < len; j++) {
19791
- args[j - 1] = arguments[j];
19789
+ if (!args2)
19790
+ for (j = 1, args2 = new Array(len - 1);j < len; j++) {
19791
+ args2[j - 1] = arguments[j];
19792
19792
  }
19793
- listeners[i].fn.apply(listeners[i].context, args);
19793
+ listeners[i].fn.apply(listeners[i].context, args2);
19794
19794
  }
19795
19795
  }
19796
19796
  }
@@ -19920,12 +19920,12 @@ var require_lib = __commonJS((exports, module) => {
19920
19920
  }
19921
19921
  return def;
19922
19922
  }
19923
- #proxy(method, ...args) {
19923
+ #proxy(method, ...args2) {
19924
19924
  if (typeof this._dest?.[method] === "function") {
19925
- this._dest[method](...args);
19925
+ this._dest[method](...args2);
19926
19926
  }
19927
19927
  if (typeof this._src?.[method] === "function") {
19928
- this._src[method](...args);
19928
+ this._src[method](...args2);
19929
19929
  }
19930
19930
  }
19931
19931
  get isTTY() {
@@ -20003,14 +20003,14 @@ var require_lib = __commonJS((exports, module) => {
20003
20003
  }
20004
20004
  this.emit("end");
20005
20005
  }
20006
- destroy(...args) {
20007
- return this.#proxy("destroy", ...args);
20006
+ destroy(...args2) {
20007
+ return this.#proxy("destroy", ...args2);
20008
20008
  }
20009
- destroySoon(...args) {
20010
- return this.#proxy("destroySoon", ...args);
20009
+ destroySoon(...args2) {
20010
+ return this.#proxy("destroySoon", ...args2);
20011
20011
  }
20012
- close(...args) {
20013
- return this.#proxy("close", ...args);
20012
+ close(...args2) {
20013
+ return this.#proxy("close", ...args2);
20014
20014
  }
20015
20015
  }
20016
20016
  module.exports = MuteStream;
@@ -20668,9 +20668,9 @@ var require_conversions = __commonJS((exports, module) => {
20668
20668
  const b = c * Math.sin(hr);
20669
20669
  return [l, a, b];
20670
20670
  };
20671
- convert.rgb.ansi16 = function(args, saturation = null) {
20672
- const [r, g, b] = args;
20673
- let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
20671
+ convert.rgb.ansi16 = function(args2, saturation = null) {
20672
+ const [r, g, b] = args2;
20673
+ let value = saturation === null ? convert.rgb.hsv(args2)[2] : saturation;
20674
20674
  value = Math.round(value / 50);
20675
20675
  if (value === 0) {
20676
20676
  return 30;
@@ -20681,13 +20681,13 @@ var require_conversions = __commonJS((exports, module) => {
20681
20681
  }
20682
20682
  return ansi;
20683
20683
  };
20684
- convert.hsv.ansi16 = function(args) {
20685
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
20684
+ convert.hsv.ansi16 = function(args2) {
20685
+ return convert.rgb.ansi16(convert.hsv.rgb(args2), args2[2]);
20686
20686
  };
20687
- convert.rgb.ansi256 = function(args) {
20688
- const r = args[0];
20689
- const g = args[1];
20690
- const b = args[2];
20687
+ convert.rgb.ansi256 = function(args2) {
20688
+ const r = args2[0];
20689
+ const g = args2[1];
20690
+ const b = args2[2];
20691
20691
  if (r === g && g === b) {
20692
20692
  if (r < 8) {
20693
20693
  return 16;
@@ -20700,40 +20700,40 @@ var require_conversions = __commonJS((exports, module) => {
20700
20700
  const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
20701
20701
  return ansi;
20702
20702
  };
20703
- convert.ansi16.rgb = function(args) {
20704
- let color = args % 10;
20703
+ convert.ansi16.rgb = function(args2) {
20704
+ let color = args2 % 10;
20705
20705
  if (color === 0 || color === 7) {
20706
- if (args > 50) {
20706
+ if (args2 > 50) {
20707
20707
  color += 3.5;
20708
20708
  }
20709
20709
  color = color / 10.5 * 255;
20710
20710
  return [color, color, color];
20711
20711
  }
20712
- const mult = (~~(args > 50) + 1) * 0.5;
20712
+ const mult = (~~(args2 > 50) + 1) * 0.5;
20713
20713
  const r = (color & 1) * mult * 255;
20714
20714
  const g = (color >> 1 & 1) * mult * 255;
20715
20715
  const b = (color >> 2 & 1) * mult * 255;
20716
20716
  return [r, g, b];
20717
20717
  };
20718
- convert.ansi256.rgb = function(args) {
20719
- if (args >= 232) {
20720
- const c = (args - 232) * 10 + 8;
20718
+ convert.ansi256.rgb = function(args2) {
20719
+ if (args2 >= 232) {
20720
+ const c = (args2 - 232) * 10 + 8;
20721
20721
  return [c, c, c];
20722
20722
  }
20723
- args -= 16;
20723
+ args2 -= 16;
20724
20724
  let rem;
20725
- const r = Math.floor(args / 36) / 5 * 255;
20726
- const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
20725
+ const r = Math.floor(args2 / 36) / 5 * 255;
20726
+ const g = Math.floor((rem = args2 % 36) / 6) / 5 * 255;
20727
20727
  const b = rem % 6 / 5 * 255;
20728
20728
  return [r, g, b];
20729
20729
  };
20730
- convert.rgb.hex = function(args) {
20731
- const integer2 = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
20730
+ convert.rgb.hex = function(args2) {
20731
+ const integer2 = ((Math.round(args2[0]) & 255) << 16) + ((Math.round(args2[1]) & 255) << 8) + (Math.round(args2[2]) & 255);
20732
20732
  const string2 = integer2.toString(16).toUpperCase();
20733
20733
  return "000000".substring(string2.length) + string2;
20734
20734
  };
20735
- convert.hex.rgb = function(args) {
20736
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
20735
+ convert.hex.rgb = function(args2) {
20736
+ const match = args2.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
20737
20737
  if (!match) {
20738
20738
  return [0, 0, 0];
20739
20739
  }
@@ -20891,11 +20891,11 @@ var require_conversions = __commonJS((exports, module) => {
20891
20891
  convert.rgb.apple = function(rgb) {
20892
20892
  return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
20893
20893
  };
20894
- convert.gray.rgb = function(args) {
20895
- return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
20894
+ convert.gray.rgb = function(args2) {
20895
+ return [args2[0] / 100 * 255, args2[0] / 100 * 255, args2[0] / 100 * 255];
20896
20896
  };
20897
- convert.gray.hsl = function(args) {
20898
- return [0, 0, args[0]];
20897
+ convert.gray.hsl = function(args2) {
20898
+ return [0, 0, args2[0]];
20899
20899
  };
20900
20900
  convert.gray.hsv = convert.gray.hsl;
20901
20901
  convert.gray.hwb = function(gray) {
@@ -20953,20 +20953,20 @@ var require_route = __commonJS((exports, module) => {
20953
20953
  return graph;
20954
20954
  }
20955
20955
  function link(from, to) {
20956
- return function(args) {
20957
- return to(from(args));
20956
+ return function(args2) {
20957
+ return to(from(args2));
20958
20958
  };
20959
20959
  }
20960
20960
  function wrapConversion(toModel, graph) {
20961
- const path11 = [graph[toModel].parent, toModel];
20961
+ const path13 = [graph[toModel].parent, toModel];
20962
20962
  let fn = conversions[graph[toModel].parent][toModel];
20963
20963
  let cur = graph[toModel].parent;
20964
20964
  while (graph[cur].parent) {
20965
- path11.unshift(graph[cur].parent);
20965
+ path13.unshift(graph[cur].parent);
20966
20966
  fn = link(conversions[graph[cur].parent][cur], fn);
20967
20967
  cur = graph[cur].parent;
20968
20968
  }
20969
- fn.conversion = path11;
20969
+ fn.conversion = path13;
20970
20970
  return fn;
20971
20971
  }
20972
20972
  module.exports = function(fromModel) {
@@ -20992,15 +20992,15 @@ var require_color_convert = __commonJS((exports, module) => {
20992
20992
  var convert = {};
20993
20993
  var models = Object.keys(conversions);
20994
20994
  function wrapRaw(fn) {
20995
- const wrappedFn = function(...args) {
20996
- const arg0 = args[0];
20995
+ const wrappedFn = function(...args2) {
20996
+ const arg0 = args2[0];
20997
20997
  if (arg0 === undefined || arg0 === null) {
20998
20998
  return arg0;
20999
20999
  }
21000
21000
  if (arg0.length > 1) {
21001
- args = arg0;
21001
+ args2 = arg0;
21002
21002
  }
21003
- return fn(args);
21003
+ return fn(args2);
21004
21004
  };
21005
21005
  if ("conversion" in fn) {
21006
21006
  wrappedFn.conversion = fn.conversion;
@@ -21008,15 +21008,15 @@ var require_color_convert = __commonJS((exports, module) => {
21008
21008
  return wrappedFn;
21009
21009
  }
21010
21010
  function wrapRounded(fn) {
21011
- const wrappedFn = function(...args) {
21012
- const arg0 = args[0];
21011
+ const wrappedFn = function(...args2) {
21012
+ const arg0 = args2[0];
21013
21013
  if (arg0 === undefined || arg0 === null) {
21014
21014
  return arg0;
21015
21015
  }
21016
21016
  if (arg0.length > 1) {
21017
- args = arg0;
21017
+ args2 = arg0;
21018
21018
  }
21019
- const result = fn(args);
21019
+ const result = fn(args2);
21020
21020
  if (typeof result === "object") {
21021
21021
  for (let len = result.length, i = 0;i < len; i++) {
21022
21022
  result[i] = Math.round(result[i]);
@@ -21046,16 +21046,16 @@ var require_color_convert = __commonJS((exports, module) => {
21046
21046
 
21047
21047
  // ../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js
21048
21048
  var require_ansi_styles = __commonJS((exports, module) => {
21049
- var wrapAnsi163 = (fn, offset) => (...args) => {
21050
- const code = fn(...args);
21049
+ var wrapAnsi163 = (fn, offset) => (...args2) => {
21050
+ const code = fn(...args2);
21051
21051
  return `\x1B[${code + offset}m`;
21052
21052
  };
21053
- var wrapAnsi2563 = (fn, offset) => (...args) => {
21054
- const code = fn(...args);
21053
+ var wrapAnsi2563 = (fn, offset) => (...args2) => {
21054
+ const code = fn(...args2);
21055
21055
  return `\x1B[${38 + offset};5;${code}m`;
21056
21056
  };
21057
- var wrapAnsi16m3 = (fn, offset) => (...args) => {
21058
- const rgb = fn(...args);
21057
+ var wrapAnsi16m3 = (fn, offset) => (...args2) => {
21058
+ const rgb = fn(...args2);
21059
21059
  return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
21060
21060
  };
21061
21061
  var ansi2ansi = (n) => n;
@@ -25555,7 +25555,7 @@ var require_src2 = __commonJS((exports) => {
25555
25555
  __exportStar(require_api(), exports);
25556
25556
  });
25557
25557
 
25558
- // ../node_modules/.pnpm/commander@14.0.2/node_modules/commander/esm.mjs
25558
+ // ../node_modules/.pnpm/commander@14.0.3/node_modules/commander/esm.mjs
25559
25559
  var import__ = __toESM(require_commander(), 1);
25560
25560
  var {
25561
25561
  program,
@@ -25572,8 +25572,7 @@ var {
25572
25572
  } = import__.default;
25573
25573
 
25574
25574
  // src/module/assistant/config/index.ts
25575
- import path from "path";
25576
- import { homedir } from "os";
25575
+ import path2 from "path";
25577
25576
  import fs2 from "fs";
25578
25577
 
25579
25578
  // src/module/assistant/file/index.ts
@@ -25696,25 +25695,83 @@ var console2 = {
25696
25695
  debug: logger.debug
25697
25696
  };
25698
25697
 
25699
- // src/module/assistant/config/index.ts
25698
+ // src/module/assistant/config/args.ts
25699
+ import path from "path";
25700
+ import { homedir } from "os";
25700
25701
  var kevisualDir = path.join(homedir(), "kevisual");
25701
25702
  var envKevisualDir = process.env.ASSISTANT_CONFIG_DIR;
25702
25703
  if (envKevisualDir) {
25703
25704
  kevisualDir = envKevisualDir;
25704
25705
  logger.debug("使用环境变量 ASSISTANT_CONFIG_DIR 作为 kevisual 目录:", kevisualDir);
25705
25706
  }
25706
- var configDir = createDir(path.join(kevisualDir, "assistant-app"));
25707
+ var HomeConfigDir = path.join(kevisualDir, "assistant-app");
25708
+ function parseArgs(args) {
25709
+ const result = { home: true };
25710
+ for (let i = 0;i < args.length; i++) {
25711
+ const arg = args[i];
25712
+ if (arg === "--root") {
25713
+ if (i + 1 < args.length && !args[i + 1].startsWith("-")) {
25714
+ result.root = args[i + 1];
25715
+ i++;
25716
+ }
25717
+ }
25718
+ if (arg === "--help" || arg === "-h") {
25719
+ result.help = true;
25720
+ }
25721
+ }
25722
+ if (result.root) {
25723
+ result.home = false;
25724
+ }
25725
+ return result;
25726
+ }
25727
+ var parseHomeArg = (homedir2) => {
25728
+ const args = process.argv.slice(2);
25729
+ const execPath = process.execPath;
25730
+ const options = parseArgs(args);
25731
+ let _configDir = undefined;
25732
+ if (options.home && homedir2) {
25733
+ _configDir = homedir2;
25734
+ } else if (options.root) {
25735
+ _configDir = options.root;
25736
+ }
25737
+ const checkUrl = [".opencode", "bin/opencode", "opencode.exe"];
25738
+ const isOpencode = checkUrl.some((item) => execPath.includes(item));
25739
+ let isServer = false;
25740
+ const checkArgs = process.argv.slice(1);
25741
+ const isArgsServer = checkArgs.some((item) => item === "server" || item.includes("asst-server") || item.includes("run-server.ts"));
25742
+ const isDev = checkArgs.some((item) => item.includes("run-server.ts"));
25743
+ let isDaemon = false;
25744
+ if (isArgsServer) {
25745
+ if (checkArgs.includes("--daemon") || checkArgs.includes("-d")) {
25746
+ isDaemon = true;
25747
+ }
25748
+ if (checkArgs.includes("-s") || checkArgs.includes("--start")) {
25749
+ isServer = true;
25750
+ }
25751
+ }
25752
+ return {
25753
+ isOpencode,
25754
+ options,
25755
+ isDev,
25756
+ isDaemon,
25757
+ configDir: _configDir,
25758
+ isServer
25759
+ };
25760
+ };
25761
+
25762
+ // src/module/assistant/config/index.ts
25763
+ var configDir = createDir(HomeConfigDir);
25707
25764
  var initConfig = (configRootPath) => {
25708
- const configDir2 = createDir(path.join(configRootPath, "assistant-app"));
25709
- const configPath = path.join(configDir2, "assistant-config.json");
25710
- const pageConfigPath = path.join(configDir2, "assistant-page-config.json");
25711
- const pagesDir = createDir(path.join(configDir2, "pages"));
25712
- const appsDir = createDir(path.join(configDir2, "apps"));
25713
- const skillsDir = createDir(path.join(configDir2, "skills"), false);
25714
- const pluginsDir = createDir(path.join(configDir2, "plugins"), false);
25715
- const appsConfigPath = path.join(configDir2, "assistant-apps-config.json");
25716
- const appPidPath = path.join(configDir2, "assistant-app.pid");
25717
- const envConfigPath = path.join(configDir2, ".env");
25765
+ const configDir2 = createDir(path2.join(configRootPath, "assistant-app"));
25766
+ const configPath = path2.join(configDir2, "assistant-config.json");
25767
+ const pageConfigPath = path2.join(configDir2, "assistant-page-config.json");
25768
+ const pagesDir = createDir(path2.join(configDir2, "pages"));
25769
+ const appsDir = createDir(path2.join(configDir2, "apps"));
25770
+ const skillsDir = createDir(path2.join(configDir2, "skills"), false);
25771
+ const pluginsDir = createDir(path2.join(configDir2, "plugins"), false);
25772
+ const appsConfigPath = path2.join(configDir2, "assistant-apps-config.json");
25773
+ const appPidPath = path2.join(configDir2, "assistant-app.pid");
25774
+ const envConfigPath = path2.join(configDir2, ".env");
25718
25775
  return {
25719
25776
  configDir: configDir2,
25720
25777
  configPath,
@@ -25867,77 +25924,26 @@ class AssistantConfig {
25867
25924
  return envConfig;
25868
25925
  }
25869
25926
  static detectConfigDir(configDir2, deep = 3) {
25870
- const checkConfigDir = path.resolve(configDir2 || process.env.ASSISTANT_CONFIG_DIR || process.cwd());
25871
- const configPath = path.join(checkConfigDir, "assistant-app");
25927
+ const checkConfigDir = path2.resolve(configDir2 || process.env.ASSISTANT_CONFIG_DIR || process.cwd());
25928
+ const configPath = path2.join(checkConfigDir, "assistant-app");
25872
25929
  if (checkFileExists(configPath)) {
25873
- return path.join(checkConfigDir);
25930
+ return path2.join(checkConfigDir);
25874
25931
  }
25875
25932
  if (deep >= 2) {
25876
- const lastConfigPath = path.join(checkConfigDir, "..", "assistant-app");
25933
+ const lastConfigPath = path2.join(checkConfigDir, "..", "assistant-app");
25877
25934
  if (checkFileExists(lastConfigPath)) {
25878
- return path.join(checkConfigDir, "..");
25935
+ return path2.join(checkConfigDir, "..");
25879
25936
  }
25880
25937
  }
25881
25938
  if (deep >= 3) {
25882
- const lastConfigPath2 = path.join(checkConfigDir, "../..", "assistant-app");
25939
+ const lastConfigPath2 = path2.join(checkConfigDir, "../..", "assistant-app");
25883
25940
  if (checkFileExists(lastConfigPath2)) {
25884
- return path.join(checkConfigDir, "../..");
25941
+ return path2.join(checkConfigDir, "../..");
25885
25942
  }
25886
25943
  }
25887
25944
  return checkConfigDir;
25888
25945
  }
25889
25946
  }
25890
- function parseArgs(args) {
25891
- const result = { home: true };
25892
- for (let i = 0;i < args.length; i++) {
25893
- const arg = args[i];
25894
- if (arg === "--root") {
25895
- if (i + 1 < args.length && !args[i + 1].startsWith("-")) {
25896
- result.root = args[i + 1];
25897
- i++;
25898
- }
25899
- }
25900
- if (arg === "--help" || arg === "-h") {
25901
- result.help = true;
25902
- }
25903
- }
25904
- if (result.root) {
25905
- result.home = false;
25906
- }
25907
- return result;
25908
- }
25909
- var parseHomeArg = (homedir2) => {
25910
- const args = process.argv.slice(2);
25911
- const execPath = process.execPath;
25912
- const options = parseArgs(args);
25913
- let _configDir = undefined;
25914
- if (options.home && homedir2) {
25915
- _configDir = homedir2;
25916
- } else if (options.root) {
25917
- _configDir = options.root;
25918
- }
25919
- const checkUrl = [".opencode", "bin/opencode", "opencode.exe"];
25920
- const isOpencode = checkUrl.some((item) => execPath.includes(item));
25921
- let isServer = false;
25922
- console.log("parseHomeArg args:", args);
25923
- if (args.includes("server") || args.includes("assistant-server")) {
25924
- let isDaemon = false;
25925
- if (args.includes("--daemon") || args.includes("-d")) {
25926
- isDaemon = true;
25927
- }
25928
- if (!isDaemon) {
25929
- if (args.includes("-s") || args.includes("--start")) {
25930
- isServer = true;
25931
- }
25932
- }
25933
- }
25934
- return {
25935
- isOpencode,
25936
- options,
25937
- configDir: _configDir,
25938
- isServer
25939
- };
25940
- };
25941
25947
  var parseIfJson = (content) => {
25942
25948
  try {
25943
25949
  return JSON.parse(content);
@@ -26021,7 +26027,7 @@ __export(exports_manager, {
26021
26027
  // ../node_modules/.pnpm/@kevisual+use-config@1.0.28_dotenv@17.2.3/node_modules/@kevisual/use-config/dist/app.js
26022
26028
  import { createRequire as createRequire2 } from "node:module";
26023
26029
  import fs3 from "node:fs";
26024
- import path2 from "node:path";
26030
+ import path3 from "node:path";
26025
26031
  var __create2 = Object.create;
26026
26032
  var __getProtoOf2 = Object.getPrototypeOf;
26027
26033
  var __defProp2 = Object.defineProperty;
@@ -26106,7 +26112,7 @@ var require_package2 = __commonJS2((exports, module) => {
26106
26112
  });
26107
26113
  var require_main2 = __commonJS2((exports, module) => {
26108
26114
  var fs4 = __require2("fs");
26109
- var path3 = __require2("path");
26115
+ var path4 = __require2("path");
26110
26116
  var os2 = __require2("os");
26111
26117
  var crypto2 = __require2("crypto");
26112
26118
  var packageJson = require_package2();
@@ -26257,7 +26263,7 @@ var require_main2 = __commonJS2((exports, module) => {
26257
26263
  possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
26258
26264
  }
26259
26265
  } else {
26260
- possibleVaultPath = path3.resolve(process.cwd(), ".env.vault");
26266
+ possibleVaultPath = path4.resolve(process.cwd(), ".env.vault");
26261
26267
  }
26262
26268
  if (fs4.existsSync(possibleVaultPath)) {
26263
26269
  return possibleVaultPath;
@@ -26265,7 +26271,7 @@ var require_main2 = __commonJS2((exports, module) => {
26265
26271
  return null;
26266
26272
  }
26267
26273
  function _resolveHome(envPath) {
26268
- return envPath[0] === "~" ? path3.join(os2.homedir(), envPath.slice(1)) : envPath;
26274
+ return envPath[0] === "~" ? path4.join(os2.homedir(), envPath.slice(1)) : envPath;
26269
26275
  }
26270
26276
  function _configVault(options) {
26271
26277
  const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
@@ -26282,7 +26288,7 @@ var require_main2 = __commonJS2((exports, module) => {
26282
26288
  return { parsed };
26283
26289
  }
26284
26290
  function configDotenv(options) {
26285
- const dotenvPath = path3.resolve(process.cwd(), ".env");
26291
+ const dotenvPath = path4.resolve(process.cwd(), ".env");
26286
26292
  let encoding = "utf8";
26287
26293
  let processEnv = process.env;
26288
26294
  if (options && options.processEnv != null) {
@@ -26329,7 +26335,7 @@ var require_main2 = __commonJS2((exports, module) => {
26329
26335
  const shortPaths = [];
26330
26336
  for (const filePath of optionPaths) {
26331
26337
  try {
26332
- const relative = path3.relative(process.cwd(), filePath);
26338
+ const relative = path4.relative(process.cwd(), filePath);
26333
26339
  shortPaths.push(relative);
26334
26340
  } catch (e) {
26335
26341
  if (debug) {
@@ -26445,7 +26451,7 @@ var getCwdDirname = () => {
26445
26451
  };
26446
26452
  var getConfigFile = (opts) => {
26447
26453
  if (opts?.envConfigFile) {
26448
- const filePath = path2.join(opts.cwd || getCwdDirname(), opts.envConfigFile);
26454
+ const filePath = path3.join(opts.cwd || getCwdDirname(), opts.envConfigFile);
26449
26455
  if (fileIsExist(filePath)) {
26450
26456
  return filePath;
26451
26457
  }
@@ -26456,11 +26462,11 @@ var getConfigFile = (opts) => {
26456
26462
  const ben = fileIsExist(benPath);
26457
26463
  if (ben)
26458
26464
  return benPath;
26459
- const lastPath = path2.join(dirname, "../" + fileName);
26465
+ const lastPath = path3.join(dirname, "../" + fileName);
26460
26466
  const last = fileIsExist(lastPath);
26461
26467
  if (last)
26462
26468
  return lastPath;
26463
- const lastLastPath = path2.join(dirname, "../../" + fileName);
26469
+ const lastLastPath = path3.join(dirname, "../../" + fileName);
26464
26470
  const lastLast = fileIsExist(lastLastPath);
26465
26471
  if (lastLast)
26466
26472
  return lastLastPath;
@@ -26533,7 +26539,7 @@ var useKey = (key, opts) => {
26533
26539
  };
26534
26540
  var useFileStore = (str, opts) => {
26535
26541
  const publicPath = process.cwd();
26536
- const filePath = path2.join(publicPath, str);
26542
+ const filePath = path3.join(publicPath, str);
26537
26543
  if (opts?.needExists) {
26538
26544
  if (!fileIsExist(filePath)) {
26539
26545
  fs3.mkdirSync(filePath, { recursive: true });
@@ -26623,7 +26629,7 @@ function requireEventemitter3() {
26623
26629
  var evt = prefix ? prefix + event : event;
26624
26630
  if (!this._events[evt])
26625
26631
  return false;
26626
- var listeners = this._events[evt], len = arguments.length, args, i;
26632
+ var listeners = this._events[evt], len = arguments.length, args2, i;
26627
26633
  if (listeners.fn) {
26628
26634
  if (listeners.once)
26629
26635
  this.removeListener(event, listeners.fn, undefined, true);
@@ -26641,10 +26647,10 @@ function requireEventemitter3() {
26641
26647
  case 6:
26642
26648
  return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
26643
26649
  }
26644
- for (i = 1, args = new Array(len - 1);i < len; i++) {
26645
- args[i - 1] = arguments[i];
26650
+ for (i = 1, args2 = new Array(len - 1);i < len; i++) {
26651
+ args2[i - 1] = arguments[i];
26646
26652
  }
26647
- listeners.fn.apply(listeners.context, args);
26653
+ listeners.fn.apply(listeners.context, args2);
26648
26654
  } else {
26649
26655
  var length = listeners.length, j;
26650
26656
  for (i = 0;i < length; i++) {
@@ -26664,11 +26670,11 @@ function requireEventemitter3() {
26664
26670
  listeners[i].fn.call(listeners[i].context, a1, a2, a3);
26665
26671
  break;
26666
26672
  default:
26667
- if (!args)
26668
- for (j = 1, args = new Array(len - 1);j < len; j++) {
26669
- args[j - 1] = arguments[j];
26673
+ if (!args2)
26674
+ for (j = 1, args2 = new Array(len - 1);j < len; j++) {
26675
+ args2[j - 1] = arguments[j];
26670
26676
  }
26671
- listeners[i].fn.apply(listeners[i].context, args);
26677
+ listeners[i].fn.apply(listeners[i].context, args2);
26672
26678
  }
26673
26679
  }
26674
26680
  }
@@ -27277,18 +27283,18 @@ var baseCreate = function() {
27277
27283
  return result;
27278
27284
  };
27279
27285
  }();
27280
- function apply(func, thisArg, args) {
27281
- switch (args.length) {
27286
+ function apply(func, thisArg, args2) {
27287
+ switch (args2.length) {
27282
27288
  case 0:
27283
27289
  return func.call(thisArg);
27284
27290
  case 1:
27285
- return func.call(thisArg, args[0]);
27291
+ return func.call(thisArg, args2[0]);
27286
27292
  case 2:
27287
- return func.call(thisArg, args[0], args[1]);
27293
+ return func.call(thisArg, args2[0], args2[1]);
27288
27294
  case 3:
27289
- return func.call(thisArg, args[0], args[1], args[2]);
27295
+ return func.call(thisArg, args2[0], args2[1], args2[2]);
27290
27296
  }
27291
- return func.apply(thisArg, args);
27297
+ return func.apply(thisArg, args2);
27292
27298
  }
27293
27299
  function copyArray(source, array) {
27294
27300
  var index = -1, length = source.length;
@@ -27389,14 +27395,14 @@ var nativeMax = Math.max;
27389
27395
  function overRest(func, start, transform) {
27390
27396
  start = nativeMax(start === undefined ? func.length - 1 : start, 0);
27391
27397
  return function() {
27392
- var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
27398
+ var args2 = arguments, index = -1, length = nativeMax(args2.length - start, 0), array = Array(length);
27393
27399
  while (++index < length) {
27394
- array[index] = args[start + index];
27400
+ array[index] = args2[start + index];
27395
27401
  }
27396
27402
  index = -1;
27397
27403
  var otherArgs = Array(start + 1);
27398
27404
  while (++index < start) {
27399
- otherArgs[index] = args[index];
27405
+ otherArgs[index] = args2[index];
27400
27406
  }
27401
27407
  otherArgs[start] = transform(array);
27402
27408
  return apply(func, this, otherArgs);
@@ -27968,14 +27974,14 @@ function requireFs$3() {
27968
27974
  fs$3.createDirentFromStats = createDirentFromStats;
27969
27975
  return fs$3;
27970
27976
  }
27971
- var path3 = {};
27977
+ var path4 = {};
27972
27978
  var hasRequiredPath;
27973
27979
  function requirePath() {
27974
27980
  if (hasRequiredPath)
27975
- return path3;
27981
+ return path4;
27976
27982
  hasRequiredPath = 1;
27977
- Object.defineProperty(path3, "__esModule", { value: true });
27978
- path3.convertPosixPathToPattern = path3.convertWindowsPathToPattern = path3.convertPathToPattern = path3.escapePosixPath = path3.escapeWindowsPath = path3.escape = path3.removeLeadingDotSegment = path3.makeAbsolute = path3.unixify = undefined;
27983
+ Object.defineProperty(path4, "__esModule", { value: true });
27984
+ path4.convertPosixPathToPattern = path4.convertWindowsPathToPattern = path4.convertPathToPattern = path4.escapePosixPath = path4.escapeWindowsPath = path4.escape = path4.removeLeadingDotSegment = path4.makeAbsolute = path4.unixify = undefined;
27979
27985
  const os2 = require$$0;
27980
27986
  const path$12 = require$$0$1;
27981
27987
  const IS_WINDOWS_PLATFORM = os2.platform() === "win32";
@@ -27987,11 +27993,11 @@ function requirePath() {
27987
27993
  function unixify(filepath) {
27988
27994
  return filepath.replace(/\\/g, "/");
27989
27995
  }
27990
- path3.unixify = unixify;
27996
+ path4.unixify = unixify;
27991
27997
  function makeAbsolute(cwd, filepath) {
27992
27998
  return path$12.resolve(cwd, filepath);
27993
27999
  }
27994
- path3.makeAbsolute = makeAbsolute;
28000
+ path4.makeAbsolute = makeAbsolute;
27995
28001
  function removeLeadingDotSegment(entry) {
27996
28002
  if (entry.charAt(0) === ".") {
27997
28003
  const secondCharactery = entry.charAt(1);
@@ -28001,26 +28007,26 @@ function requirePath() {
28001
28007
  }
28002
28008
  return entry;
28003
28009
  }
28004
- path3.removeLeadingDotSegment = removeLeadingDotSegment;
28005
- path3.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;
28010
+ path4.removeLeadingDotSegment = removeLeadingDotSegment;
28011
+ path4.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;
28006
28012
  function escapeWindowsPath(pattern) {
28007
28013
  return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
28008
28014
  }
28009
- path3.escapeWindowsPath = escapeWindowsPath;
28015
+ path4.escapeWindowsPath = escapeWindowsPath;
28010
28016
  function escapePosixPath(pattern) {
28011
28017
  return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
28012
28018
  }
28013
- path3.escapePosixPath = escapePosixPath;
28014
- path3.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;
28019
+ path4.escapePosixPath = escapePosixPath;
28020
+ path4.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;
28015
28021
  function convertWindowsPathToPattern(filepath) {
28016
28022
  return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/");
28017
28023
  }
28018
- path3.convertWindowsPathToPattern = convertWindowsPathToPattern;
28024
+ path4.convertWindowsPathToPattern = convertWindowsPathToPattern;
28019
28025
  function convertPosixPathToPattern(filepath) {
28020
28026
  return escapePosixPath(filepath);
28021
28027
  }
28022
- path3.convertPosixPathToPattern = convertPosixPathToPattern;
28023
- return path3;
28028
+ path4.convertPosixPathToPattern = convertPosixPathToPattern;
28029
+ return path4;
28024
28030
  }
28025
28031
  var pattern = {};
28026
28032
  /*!
@@ -28290,7 +28296,7 @@ function requireUtils$3() {
28290
28296
  node.type = "text";
28291
28297
  return acc;
28292
28298
  }, []);
28293
- exports$1.flatten = (...args) => {
28299
+ exports$1.flatten = (...args2) => {
28294
28300
  const result = [];
28295
28301
  const flat = (arr) => {
28296
28302
  for (let i = 0;i < arr.length; i++) {
@@ -28305,7 +28311,7 @@ function requireUtils$3() {
28305
28311
  }
28306
28312
  return result;
28307
28313
  };
28308
- flat(args);
28314
+ flat(args2);
28309
28315
  return result;
28310
28316
  };
28311
28317
  })(utils$2);
@@ -28687,8 +28693,8 @@ function requireFillRange() {
28687
28693
  }
28688
28694
  return toRegexRange(start, end, options);
28689
28695
  };
28690
- const rangeError = (...args) => {
28691
- return new RangeError("Invalid range arguments: " + util.inspect(...args));
28696
+ const rangeError = (...args2) => {
28697
+ return new RangeError("Invalid range arguments: " + util.inspect(...args2));
28692
28698
  };
28693
28699
  const invalidRange = (start, end, options) => {
28694
28700
  if (options.strictRanges === true)
@@ -28833,10 +28839,10 @@ function requireCompile() {
28833
28839
  return node.value;
28834
28840
  }
28835
28841
  if (node.nodes && node.ranges > 0) {
28836
- const args = utils.reduce(node.nodes);
28837
- const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true });
28842
+ const args2 = utils.reduce(node.nodes);
28843
+ const range = fill(...args2, { ...options, wrap: false, toRegex: true, strictZeros: true });
28838
28844
  if (range.length !== 0) {
28839
- return args.length > 1 && range.length > 1 ? `(${range})` : range;
28845
+ return args2.length > 1 && range.length > 1 ? `(${range})` : range;
28840
28846
  }
28841
28847
  }
28842
28848
  if (node.nodes) {
@@ -28903,11 +28909,11 @@ function requireExpand() {
28903
28909
  return;
28904
28910
  }
28905
28911
  if (node.nodes && node.ranges > 0) {
28906
- const args = utils.reduce(node.nodes);
28907
- if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
28912
+ const args2 = utils.reduce(node.nodes);
28913
+ if (utils.exceedsLimit(...args2, options.step, rangeLimit)) {
28908
28914
  throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
28909
28915
  }
28910
- let range = fill(...args, options);
28916
+ let range = fill(...args2, options);
28911
28917
  if (range.length === 0) {
28912
28918
  range = stringify2(node, options);
28913
28919
  }
@@ -29307,7 +29313,7 @@ function requireConstants$1() {
29307
29313
  if (hasRequiredConstants$1)
29308
29314
  return constants$1;
29309
29315
  hasRequiredConstants$1 = 1;
29310
- const path4 = require$$0$1;
29316
+ const path5 = require$$0$1;
29311
29317
  const WIN_SLASH = "\\\\/";
29312
29318
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
29313
29319
  const DOT_LITERAL = "\\.";
@@ -29429,7 +29435,7 @@ function requireConstants$1() {
29429
29435
  CHAR_UNDERSCORE: 95,
29430
29436
  CHAR_VERTICAL_LINE: 124,
29431
29437
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
29432
- SEP: path4.sep,
29438
+ SEP: path5.sep,
29433
29439
  extglobChars(chars) {
29434
29440
  return {
29435
29441
  "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` },
@@ -29451,7 +29457,7 @@ function requireUtils$2() {
29451
29457
  return utils$1;
29452
29458
  hasRequiredUtils$2 = 1;
29453
29459
  (function(exports$1) {
29454
- const path4 = require$$0$1;
29460
+ const path5 = require$$0$1;
29455
29461
  const win32 = process.platform === "win32";
29456
29462
  const {
29457
29463
  REGEX_BACKSLASH,
@@ -29480,7 +29486,7 @@ function requireUtils$2() {
29480
29486
  if (options && typeof options.windows === "boolean") {
29481
29487
  return options.windows;
29482
29488
  }
29483
- return win32 === true || path4.sep === "\\";
29489
+ return win32 === true || path5.sep === "\\";
29484
29490
  };
29485
29491
  exports$1.escapeLast = (input, char, lastIdx) => {
29486
29492
  const idx = input.lastIndexOf(char, lastIdx);
@@ -29844,16 +29850,16 @@ function requireParse() {
29844
29850
  REGEX_SPECIAL_CHARS_BACKREF,
29845
29851
  REPLACEMENTS
29846
29852
  } = constants;
29847
- const expandRange = (args, options) => {
29853
+ const expandRange = (args2, options) => {
29848
29854
  if (typeof options.expandRange === "function") {
29849
- return options.expandRange(...args, options);
29855
+ return options.expandRange(...args2, options);
29850
29856
  }
29851
- args.sort();
29852
- const value = `[${args.join("-")}]`;
29857
+ args2.sort();
29858
+ const value = `[${args2.join("-")}]`;
29853
29859
  try {
29854
29860
  new RegExp(value);
29855
29861
  } catch (ex) {
29856
- return args.map((v) => utils.escapeRegex(v)).join("..");
29862
+ return args2.map((v) => utils.escapeRegex(v)).join("..");
29857
29863
  }
29858
29864
  return value;
29859
29865
  };
@@ -30617,7 +30623,7 @@ function requirePicomatch$1() {
30617
30623
  if (hasRequiredPicomatch$1)
30618
30624
  return picomatch_1;
30619
30625
  hasRequiredPicomatch$1 = 1;
30620
- const path4 = require$$0$1;
30626
+ const path5 = require$$0$1;
30621
30627
  const scan = requireScan();
30622
30628
  const parse = requireParse();
30623
30629
  const utils = requireUtils$2();
@@ -30703,7 +30709,7 @@ function requirePicomatch$1() {
30703
30709
  };
30704
30710
  picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
30705
30711
  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
30706
- return regex.test(path4.basename(input));
30712
+ return regex.test(path5.basename(input));
30707
30713
  };
30708
30714
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
30709
30715
  picomatch.parse = (pattern2, options) => {
@@ -30905,8 +30911,8 @@ function requireMicromatch() {
30905
30911
  return match.slice(1).map((v) => v === undefined ? "" : v);
30906
30912
  }
30907
30913
  };
30908
- micromatch.makeRe = (...args) => picomatch2.makeRe(...args);
30909
- micromatch.scan = (...args) => picomatch2.scan(...args);
30914
+ micromatch.makeRe = (...args2) => picomatch2.makeRe(...args2);
30915
+ micromatch.scan = (...args2) => picomatch2.scan(...args2);
30910
30916
  micromatch.parse = (patterns, options) => {
30911
30917
  let res = [];
30912
30918
  for (let pattern2 of [].concat(patterns || [])) {
@@ -30940,7 +30946,7 @@ function requirePattern() {
30940
30946
  hasRequiredPattern = 1;
30941
30947
  Object.defineProperty(pattern, "__esModule", { value: true });
30942
30948
  pattern.isAbsolute = pattern.partitionAbsoluteAndRelative = pattern.removeDuplicateSlashes = pattern.matchAny = pattern.convertPatternsToRe = pattern.makeRe = pattern.getPatternParts = pattern.expandBraceExpansion = pattern.expandPatternsWithBraceExpansion = pattern.isAffectDepthOfReadingPattern = pattern.endsWithSlashGlobStar = pattern.hasGlobStar = pattern.getBaseDirectory = pattern.isPatternRelatedToParentDirectory = pattern.getPatternsOutsideCurrentDirectory = pattern.getPatternsInsideCurrentDirectory = pattern.getPositivePatterns = pattern.getNegativePatterns = pattern.isPositivePattern = pattern.isNegativePattern = pattern.convertToNegativePattern = pattern.convertToPositivePattern = pattern.isDynamicPattern = pattern.isStaticPattern = undefined;
30943
- const path4 = require$$0$1;
30949
+ const path5 = require$$0$1;
30944
30950
  const globParent2 = requireGlobParent();
30945
30951
  const micromatch = requireMicromatch();
30946
30952
  const GLOBSTAR = "**";
@@ -31035,7 +31041,7 @@ function requirePattern() {
31035
31041
  }
31036
31042
  pattern.endsWithSlashGlobStar = endsWithSlashGlobStar;
31037
31043
  function isAffectDepthOfReadingPattern(pattern2) {
31038
- const basename = path4.basename(pattern2);
31044
+ const basename = path5.basename(pattern2);
31039
31045
  return endsWithSlashGlobStar(pattern2) || isStaticPattern(basename);
31040
31046
  }
31041
31047
  pattern.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
@@ -31093,7 +31099,7 @@ function requirePattern() {
31093
31099
  }
31094
31100
  pattern.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
31095
31101
  function isAbsolute(pattern2) {
31096
- return path4.isAbsolute(pattern2);
31102
+ return path5.isAbsolute(pattern2);
31097
31103
  }
31098
31104
  pattern.isAbsolute = isAbsolute;
31099
31105
  return pattern;
@@ -31111,11 +31117,11 @@ function requireMerge2() {
31111
31117
  merge2_1 = merge22;
31112
31118
  function merge22() {
31113
31119
  const streamsQueue = [];
31114
- const args = slice.call(arguments);
31120
+ const args2 = slice.call(arguments);
31115
31121
  let merging = false;
31116
- let options = args[args.length - 1];
31122
+ let options = args2[args2.length - 1];
31117
31123
  if (options && !Array.isArray(options) && options.pipe == null) {
31118
- args.pop();
31124
+ args2.pop();
31119
31125
  } else {
31120
31126
  options = {};
31121
31127
  }
@@ -31196,8 +31202,8 @@ function requireMerge2() {
31196
31202
  mergedStream.on("unpipe", function(stream) {
31197
31203
  stream.emit("merge2UnpipeEnd");
31198
31204
  });
31199
- if (args.length) {
31200
- addStream.apply(null, args);
31205
+ if (args2.length) {
31206
+ addStream.apply(null, args2);
31201
31207
  }
31202
31208
  return mergedStream;
31203
31209
  }
@@ -31273,8 +31279,8 @@ function requireUtils$1() {
31273
31279
  utils$3.errno = errno2;
31274
31280
  const fs4 = requireFs$3();
31275
31281
  utils$3.fs = fs4;
31276
- const path4 = requirePath();
31277
- utils$3.path = path4;
31282
+ const path5 = requirePath();
31283
+ utils$3.path = path5;
31278
31284
  const pattern2 = requirePattern();
31279
31285
  utils$3.pattern = pattern2;
31280
31286
  const stream = requireStream$3();
@@ -31385,8 +31391,8 @@ function requireAsync$5() {
31385
31391
  hasRequiredAsync$5 = 1;
31386
31392
  Object.defineProperty(async, "__esModule", { value: true });
31387
31393
  async.read = undefined;
31388
- function read(path4, settings, callback) {
31389
- settings.fs.lstat(path4, (lstatError, lstat) => {
31394
+ function read(path5, settings, callback) {
31395
+ settings.fs.lstat(path5, (lstatError, lstat) => {
31390
31396
  if (lstatError !== null) {
31391
31397
  callFailureCallback(callback, lstatError);
31392
31398
  return;
@@ -31395,7 +31401,7 @@ function requireAsync$5() {
31395
31401
  callSuccessCallback(callback, lstat);
31396
31402
  return;
31397
31403
  }
31398
- settings.fs.stat(path4, (statError, stat) => {
31404
+ settings.fs.stat(path5, (statError, stat) => {
31399
31405
  if (statError !== null) {
31400
31406
  if (settings.throwErrorOnBrokenSymbolicLink) {
31401
31407
  callFailureCallback(callback, statError);
@@ -31428,13 +31434,13 @@ function requireSync$5() {
31428
31434
  hasRequiredSync$5 = 1;
31429
31435
  Object.defineProperty(sync$5, "__esModule", { value: true });
31430
31436
  sync$5.read = undefined;
31431
- function read(path4, settings) {
31432
- const lstat = settings.fs.lstatSync(path4);
31437
+ function read(path5, settings) {
31438
+ const lstat = settings.fs.lstatSync(path5);
31433
31439
  if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
31434
31440
  return lstat;
31435
31441
  }
31436
31442
  try {
31437
- const stat = settings.fs.statSync(path4);
31443
+ const stat = settings.fs.statSync(path5);
31438
31444
  if (settings.markSymbolicLink) {
31439
31445
  stat.isSymbolicLink = () => true;
31440
31446
  }
@@ -31510,17 +31516,17 @@ function requireOut$3() {
31510
31516
  const sync = requireSync$5();
31511
31517
  const settings_1 = requireSettings$3();
31512
31518
  out$1.Settings = settings_1.default;
31513
- function stat(path4, optionsOrSettingsOrCallback, callback) {
31519
+ function stat(path5, optionsOrSettingsOrCallback, callback) {
31514
31520
  if (typeof optionsOrSettingsOrCallback === "function") {
31515
- async2.read(path4, getSettings(), optionsOrSettingsOrCallback);
31521
+ async2.read(path5, getSettings(), optionsOrSettingsOrCallback);
31516
31522
  return;
31517
31523
  }
31518
- async2.read(path4, getSettings(optionsOrSettingsOrCallback), callback);
31524
+ async2.read(path5, getSettings(optionsOrSettingsOrCallback), callback);
31519
31525
  }
31520
31526
  out$1.stat = stat;
31521
- function statSync(path4, optionsOrSettings) {
31527
+ function statSync(path5, optionsOrSettings) {
31522
31528
  const settings = getSettings(optionsOrSettings);
31523
- return sync.read(path4, settings);
31529
+ return sync.read(path5, settings);
31524
31530
  }
31525
31531
  out$1.statSync = statSync;
31526
31532
  function getSettings(settingsOrOptions = {}) {
@@ -31750,16 +31756,16 @@ function requireAsync$4() {
31750
31756
  return;
31751
31757
  }
31752
31758
  const tasks2 = names.map((name) => {
31753
- const path4 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
31759
+ const path5 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
31754
31760
  return (done) => {
31755
- fsStat.stat(path4, settings.fsStatSettings, (error, stats) => {
31761
+ fsStat.stat(path5, settings.fsStatSettings, (error, stats) => {
31756
31762
  if (error !== null) {
31757
31763
  done(error);
31758
31764
  return;
31759
31765
  }
31760
31766
  const entry = {
31761
31767
  name,
31762
- path: path4,
31768
+ path: path5,
31763
31769
  dirent: utils2.fs.createDirentFromStats(name, stats)
31764
31770
  };
31765
31771
  if (settings.stats) {
@@ -31882,7 +31888,7 @@ function requireSettings$2() {
31882
31888
  return settings$2;
31883
31889
  hasRequiredSettings$2 = 1;
31884
31890
  Object.defineProperty(settings$2, "__esModule", { value: true });
31885
- const path4 = require$$0$1;
31891
+ const path5 = require$$0$1;
31886
31892
  const fsStat = requireOut$3();
31887
31893
  const fs5 = requireFs();
31888
31894
 
@@ -31891,7 +31897,7 @@ function requireSettings$2() {
31891
31897
  this._options = _options;
31892
31898
  this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
31893
31899
  this.fs = fs5.createFileSystemAdapter(this._options.fs);
31894
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path4.sep);
31900
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path5.sep);
31895
31901
  this.stats = this._getValue(this._options.stats, false);
31896
31902
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
31897
31903
  this.fsStatSettings = new fsStat.Settings({
@@ -31918,17 +31924,17 @@ function requireOut$2() {
31918
31924
  const sync = requireSync$4();
31919
31925
  const settings_1 = requireSettings$2();
31920
31926
  out$2.Settings = settings_1.default;
31921
- function scandir(path4, optionsOrSettingsOrCallback, callback) {
31927
+ function scandir(path5, optionsOrSettingsOrCallback, callback) {
31922
31928
  if (typeof optionsOrSettingsOrCallback === "function") {
31923
- async2.read(path4, getSettings(), optionsOrSettingsOrCallback);
31929
+ async2.read(path5, getSettings(), optionsOrSettingsOrCallback);
31924
31930
  return;
31925
31931
  }
31926
- async2.read(path4, getSettings(optionsOrSettingsOrCallback), callback);
31932
+ async2.read(path5, getSettings(optionsOrSettingsOrCallback), callback);
31927
31933
  }
31928
31934
  out$2.scandir = scandir;
31929
- function scandirSync(path4, optionsOrSettings) {
31935
+ function scandirSync(path5, optionsOrSettings) {
31930
31936
  const settings = getSettings(optionsOrSettings);
31931
- return sync.read(path4, settings);
31937
+ return sync.read(path5, settings);
31932
31938
  }
31933
31939
  out$2.scandirSync = scandirSync;
31934
31940
  function getSettings(settingsOrOptions = {}) {
@@ -32564,7 +32570,7 @@ function requireSettings$1() {
32564
32570
  return settings$1;
32565
32571
  hasRequiredSettings$1 = 1;
32566
32572
  Object.defineProperty(settings$1, "__esModule", { value: true });
32567
- const path4 = require$$0$1;
32573
+ const path5 = require$$0$1;
32568
32574
  const fsScandir = requireOut$2();
32569
32575
 
32570
32576
  class Settings {
@@ -32575,7 +32581,7 @@ function requireSettings$1() {
32575
32581
  this.deepFilter = this._getValue(this._options.deepFilter, null);
32576
32582
  this.entryFilter = this._getValue(this._options.entryFilter, null);
32577
32583
  this.errorFilter = this._getValue(this._options.errorFilter, null);
32578
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path4.sep);
32584
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path5.sep);
32579
32585
  this.fsScandirSettings = new fsScandir.Settings({
32580
32586
  followSymbolicLinks: this._options.followSymbolicLinks,
32581
32587
  fs: this._options.fs,
@@ -32638,7 +32644,7 @@ function requireReader() {
32638
32644
  return reader;
32639
32645
  hasRequiredReader = 1;
32640
32646
  Object.defineProperty(reader, "__esModule", { value: true });
32641
- const path4 = require$$0$1;
32647
+ const path5 = require$$0$1;
32642
32648
  const fsStat = requireOut$3();
32643
32649
  const utils2 = requireUtils$1();
32644
32650
 
@@ -32652,7 +32658,7 @@ function requireReader() {
32652
32658
  });
32653
32659
  }
32654
32660
  _getFullEntryPath(filepath) {
32655
- return path4.resolve(this._settings.cwd, filepath);
32661
+ return path5.resolve(this._settings.cwd, filepath);
32656
32662
  }
32657
32663
  _makeEntry(stats, pattern2) {
32658
32664
  const entry = {
@@ -33084,7 +33090,7 @@ function requireProvider() {
33084
33090
  return provider;
33085
33091
  hasRequiredProvider = 1;
33086
33092
  Object.defineProperty(provider, "__esModule", { value: true });
33087
- const path4 = require$$0$1;
33093
+ const path5 = require$$0$1;
33088
33094
  const deep_1 = requireDeep();
33089
33095
  const entry_1 = requireEntry$1();
33090
33096
  const error_1 = requireError();
@@ -33099,7 +33105,7 @@ function requireProvider() {
33099
33105
  this.entryTransformer = new entry_2.default(this._settings);
33100
33106
  }
33101
33107
  _getRootDirectory(task) {
33102
- return path4.resolve(this._settings.cwd, task.base);
33108
+ return path5.resolve(this._settings.cwd, task.base);
33103
33109
  }
33104
33110
  _getReaderOptions(task) {
33105
33111
  const basePath = task.base === "." ? "" : task.base;
@@ -34071,12 +34077,12 @@ var reload = promisify2(pm22.reload).bind(pm22);
34071
34077
  var deleteProcess2 = promisify2(pm22.delete).bind(pm22);
34072
34078
  var list2 = promisify2(pm22.list).bind(pm22);
34073
34079
  // src/module/local-apps/src/modules/app-file.ts
34074
- import path4 from "node:path";
34080
+ import path5 from "node:path";
34075
34081
  import fs5 from "node:fs";
34076
34082
  var getAppsPath2 = () => {
34077
34083
  const appsPath = process.env.APPS_PATH;
34078
34084
  if (appsPath) {
34079
- const resolvePath = path4.resolve(appsPath);
34085
+ const resolvePath = path5.resolve(appsPath);
34080
34086
  if (fileIsExist(resolvePath)) {
34081
34087
  return resolvePath;
34082
34088
  } else {
@@ -34092,7 +34098,7 @@ var loadAppInfo2 = async (appsPath = "apps", filename = "apps.config.json") => {
34092
34098
  fileName: filename
34093
34099
  });
34094
34100
  if (!configFile) {
34095
- configFile = path4.join(appsPath, "..", filename);
34101
+ configFile = path5.join(appsPath, "..", filename);
34096
34102
  fs5.writeFileSync(configFile, JSON.stringify({ list: [] }));
34097
34103
  return { list: [] };
34098
34104
  }
@@ -34120,8 +34126,8 @@ var saveAppInfo2 = async (data, appsPath, filename = "apps.config.json") => {
34120
34126
  fs5.writeFileSync(configFile, JSON.stringify(data, null, 2));
34121
34127
  };
34122
34128
  var deleteFileAppInfo2 = async (key, appsPath) => {
34123
- const normalizedKey = key.replace(/\//g, path4.sep);
34124
- const directory = path4.join(appsPath, normalizedKey);
34129
+ const normalizedKey = key.replace(/\//g, path5.sep);
34130
+ const directory = path5.join(appsPath, normalizedKey);
34125
34131
  if (!fileIsExist(directory)) {
34126
34132
  return;
34127
34133
  }
@@ -34130,7 +34136,7 @@ var deleteFileAppInfo2 = async (key, appsPath) => {
34130
34136
 
34131
34137
  // src/module/local-apps/src/modules/manager.ts
34132
34138
  import { fork as fork2 } from "node:child_process";
34133
- import path5 from "node:path";
34139
+ import path6 from "node:path";
34134
34140
  var import_fast_glob = __toESM(require_out4(), 1);
34135
34141
  import fs6 from "node:fs";
34136
34142
 
@@ -34618,7 +34624,7 @@ var LoadApp = async (app, opts) => {
34618
34624
  console.error("app is not found");
34619
34625
  return false;
34620
34626
  }
34621
- const pathEntry = path5.join(app.path, app.entry);
34627
+ const pathEntry = path6.join(app.path, app.entry);
34622
34628
  if (!fileIsExist(pathEntry)) {
34623
34629
  console.error("file entry not found");
34624
34630
  return false;
@@ -34638,7 +34644,7 @@ var LoadApp = async (app, opts) => {
34638
34644
  });
34639
34645
  app.process = childProcess;
34640
34646
  } else if (app.type === "system-app" /* SystemApp */) {
34641
- const pathEntryAndTimestamp = path5.join(app.path, entry2);
34647
+ const pathEntryAndTimestamp = path6.join(app.path, entry2);
34642
34648
  const importPath = process.platform === "win32" ? "file:///" + pathEntryAndTimestamp.replace(/\\/g, "/") : pathEntryAndTimestamp;
34643
34649
  const module = await import(importPath);
34644
34650
  if (module.loadApp && mainApp) {
@@ -34647,7 +34653,7 @@ var LoadApp = async (app, opts) => {
34647
34653
  } else if (app.type === "gateway-app" /* GatewayApp */) {
34648
34654
  console.log("gateway app not support");
34649
34655
  } else if (app.type === "pm2-system-app" /* Pm2SystemApp */) {
34650
- const pathEntry2 = path5.join(app.path, app.entry);
34656
+ const pathEntry2 = path6.join(app.path, app.entry);
34651
34657
  const pm2Manager = new Pm2Manager2({
34652
34658
  appName: app.key,
34653
34659
  script: pathEntry2,
@@ -34665,7 +34671,7 @@ var LoadApp = async (app, opts) => {
34665
34671
  pm2Options.interpreter = pm2Options.interpreter || app?.engine;
34666
34672
  }
34667
34673
  if (!pm2Options.cwd) {
34668
- pm2Options.cwd = path5.join(app.path, "../..");
34674
+ pm2Options.cwd = path6.join(app.path, "../..");
34669
34675
  }
34670
34676
  await pm2Manager.start(pm2Options);
34671
34677
  } else if (app.type === "script-app" /* ScriptApp */) {
@@ -34700,13 +34706,13 @@ var StopApp = async (app, opts) => {
34700
34706
  }
34701
34707
  };
34702
34708
  var installAppFromKey2 = async (key, _appPath) => {
34703
- const normalizedKey = key.replace(/\//g, path5.sep);
34704
- const directory = path5.join(_appPath, normalizedKey);
34709
+ const normalizedKey = key.replace(/\//g, path6.sep);
34710
+ const directory = path6.join(_appPath, normalizedKey);
34705
34711
  if (!fileIsExist(directory)) {
34706
34712
  console.error("App not found", directory);
34707
34713
  throw new Error("App not found");
34708
34714
  }
34709
- const pkgs = path5.join(directory, "package.json");
34715
+ const pkgs = path6.join(directory, "package.json");
34710
34716
  if (!fileIsExist(pkgs)) {
34711
34717
  throw new Error("Invalid package.json, need package.json in app directory");
34712
34718
  }
@@ -34717,8 +34723,8 @@ var installAppFromKey2 = async (key, _appPath) => {
34717
34723
  console.error("need name, version and app in package.json");
34718
34724
  throw new Error("Invalid package.json format, need name, version and app");
34719
34725
  }
34720
- const readmeFile = path5.join(directory, "README.md");
34721
- const readmeFile2 = path5.join(directory, "readme.md");
34726
+ const readmeFile = path6.join(directory, "README.md");
34727
+ const readmeFile2 = path6.join(directory, "readme.md");
34722
34728
  let readmeDesc = "";
34723
34729
  if (fileIsExist(readmeFile)) {
34724
34730
  readmeDesc = fs6.readFileSync(readmeFile, "utf-8");
@@ -34738,13 +34744,13 @@ var installAppFromKey2 = async (key, _appPath) => {
34738
34744
  };
34739
34745
  app.key = key;
34740
34746
  if (app.type === "pm2-system-app") {
34741
- const pm2Cwd = path5.join(_appPath, "..");
34747
+ const pm2Cwd = path6.join(_appPath, "..");
34742
34748
  showAppInfo.pm2Options = { cwd: pm2Cwd, ...app.pm2Options };
34743
34749
  }
34744
34750
  return { pkg, showAppInfo };
34745
34751
  };
34746
34752
  var getAppPathKeys2 = async (_appPath) => {
34747
- const directory = path5.resolve(_appPath);
34753
+ const directory = path6.resolve(_appPath);
34748
34754
  const root2 = directory;
34749
34755
  const path1 = "*/package.json";
34750
34756
  const path22 = "*/*/package.json";
@@ -34755,7 +34761,7 @@ var getAppPathKeys2 = async (_appPath) => {
34755
34761
  ignore: ["**/node_modules/**"]
34756
34762
  });
34757
34763
  const appPathKeys = appsPackages.map((pkg) => {
34758
- const dir = path5.dirname(pkg);
34764
+ const dir = path6.dirname(pkg);
34759
34765
  return dir.replace(/\\/g, "/");
34760
34766
  });
34761
34767
  return appPathKeys;
@@ -34763,8 +34769,8 @@ var getAppPathKeys2 = async (_appPath) => {
34763
34769
 
34764
34770
  // src/module/assistant/local-app-manager/assistant-app.ts
34765
34771
  var import_fast_glob3 = __toESM(require_out4(), 1);
34766
- import path7 from "node:path";
34767
- import fs10 from "node:fs";
34772
+ import path9 from "node:path";
34773
+ import fs11 from "node:fs";
34768
34774
 
34769
34775
  // ../node_modules/.pnpm/eventemitter3@5.0.4/node_modules/eventemitter3/index.mjs
34770
34776
  var import__2 = __toESM(require_eventemitter3(), 1);
@@ -35280,7 +35286,7 @@ function requireEventemitter32() {
35280
35286
  var evt = prefix ? prefix + event : event;
35281
35287
  if (!this._events[evt])
35282
35288
  return false;
35283
- var listeners = this._events[evt], len = arguments.length, args, i;
35289
+ var listeners = this._events[evt], len = arguments.length, args2, i;
35284
35290
  if (listeners.fn) {
35285
35291
  if (listeners.once)
35286
35292
  this.removeListener(event, listeners.fn, undefined, true);
@@ -35298,10 +35304,10 @@ function requireEventemitter32() {
35298
35304
  case 6:
35299
35305
  return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
35300
35306
  }
35301
- for (i = 1, args = new Array(len - 1);i < len; i++) {
35302
- args[i - 1] = arguments[i];
35307
+ for (i = 1, args2 = new Array(len - 1);i < len; i++) {
35308
+ args2[i - 1] = arguments[i];
35303
35309
  }
35304
- listeners.fn.apply(listeners.context, args);
35310
+ listeners.fn.apply(listeners.context, args2);
35305
35311
  } else {
35306
35312
  var length = listeners.length, j;
35307
35313
  for (i = 0;i < length; i++) {
@@ -35321,11 +35327,11 @@ function requireEventemitter32() {
35321
35327
  listeners[i].fn.call(listeners[i].context, a1, a2, a3);
35322
35328
  break;
35323
35329
  default:
35324
- if (!args)
35325
- for (j = 1, args = new Array(len - 1);j < len; j++) {
35326
- args[j - 1] = arguments[j];
35330
+ if (!args2)
35331
+ for (j = 1, args2 = new Array(len - 1);j < len; j++) {
35332
+ args2[j - 1] = arguments[j];
35327
35333
  }
35328
- listeners[i].fn.apply(listeners[i].context, args);
35334
+ listeners[i].fn.apply(listeners[i].context, args2);
35329
35335
  }
35330
35336
  }
35331
35337
  }
@@ -35821,11 +35827,11 @@ function aborted(x, startIndex = 0) {
35821
35827
  }
35822
35828
  return false;
35823
35829
  }
35824
- function prefixIssues(path6, issues) {
35830
+ function prefixIssues(path7, issues) {
35825
35831
  return issues.map((iss) => {
35826
35832
  var _a;
35827
35833
  (_a = iss).path ?? (_a.path = []);
35828
- iss.path.unshift(path6);
35834
+ iss.path.unshift(path7);
35829
35835
  return iss;
35830
35836
  });
35831
35837
  }
@@ -35882,8 +35888,8 @@ function parsedType(data) {
35882
35888
  }
35883
35889
  return t;
35884
35890
  }
35885
- function issue(...args) {
35886
- const [iss, input, inst] = args;
35891
+ function issue(...args2) {
35892
+ const [iss, input, inst] = args2;
35887
35893
  if (typeof iss === "string") {
35888
35894
  return {
35889
35895
  message: iss,
@@ -36078,20 +36084,20 @@ var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
36078
36084
  var e164$1 = /^\+[1-9]\d{6,14}$/;
36079
36085
  var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
36080
36086
  var date$3 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
36081
- function timeSource(args) {
36087
+ function timeSource(args2) {
36082
36088
  const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
36083
- const regex = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
36089
+ const regex = typeof args2.precision === "number" ? args2.precision === -1 ? `${hhmm}` : args2.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args2.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
36084
36090
  return regex;
36085
36091
  }
36086
- function time$1(args) {
36087
- return new RegExp(`^${timeSource(args)}$`);
36092
+ function time$1(args2) {
36093
+ return new RegExp(`^${timeSource(args2)}$`);
36088
36094
  }
36089
- function datetime$1(args) {
36090
- const time = timeSource({ precision: args.precision });
36095
+ function datetime$1(args2) {
36096
+ const time = timeSource({ precision: args2.precision });
36091
36097
  const opts = ["Z"];
36092
- if (args.local)
36098
+ if (args2.local)
36093
36099
  opts.push("");
36094
- if (args.offset)
36100
+ if (args2.offset)
36095
36101
  opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);
36096
36102
  const timeRegex = `${time}(?:${opts.join("|")})`;
36097
36103
  return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
@@ -36738,11 +36744,11 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
36738
36744
  });
36739
36745
 
36740
36746
  class Doc {
36741
- constructor(args = []) {
36747
+ constructor(args2 = []) {
36742
36748
  this.content = [];
36743
36749
  this.indent = 0;
36744
36750
  if (this)
36745
- this.args = args;
36751
+ this.args = args2;
36746
36752
  }
36747
36753
  indented(fn) {
36748
36754
  this.indent += 1;
@@ -36766,10 +36772,10 @@ class Doc {
36766
36772
  }
36767
36773
  compile() {
36768
36774
  const F = Function;
36769
- const args = this?.args;
36775
+ const args2 = this?.args;
36770
36776
  const content = this?.content ?? [``];
36771
36777
  const lines = [...content.map((x) => ` ${x}`)];
36772
- return new F(...args, lines.join(`
36778
+ return new F(...args2, lines.join(`
36773
36779
  `));
36774
36780
  }
36775
36781
  }
@@ -38622,8 +38628,8 @@ var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => {
38622
38628
  if (typeof func !== "function") {
38623
38629
  throw new Error("implement() must be called with a function");
38624
38630
  }
38625
- return function(...args) {
38626
- const parsedArgs = inst._def.input ? parse$1(inst._def.input, args) : args;
38631
+ return function(...args2) {
38632
+ const parsedArgs = inst._def.input ? parse$1(inst._def.input, args2) : args2;
38627
38633
  const result = Reflect.apply(func, this, parsedArgs);
38628
38634
  if (inst._def.output) {
38629
38635
  return parse$1(inst._def.output, result);
@@ -38635,8 +38641,8 @@ var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => {
38635
38641
  if (typeof func !== "function") {
38636
38642
  throw new Error("implementAsync() must be called with a function");
38637
38643
  }
38638
- return async function(...args) {
38639
- const parsedArgs = inst._def.input ? await parseAsync$1(inst._def.input, args) : args;
38644
+ return async function(...args2) {
38645
+ const parsedArgs = inst._def.input ? await parseAsync$1(inst._def.input, args2) : args2;
38640
38646
  const result = await Reflect.apply(func, this, parsedArgs);
38641
38647
  if (inst._def.output) {
38642
38648
  return await parseAsync$1(inst._def.output, result);
@@ -38662,22 +38668,22 @@ var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => {
38662
38668
  }
38663
38669
  return payload;
38664
38670
  };
38665
- inst.input = (...args) => {
38671
+ inst.input = (...args2) => {
38666
38672
  const F = inst.constructor;
38667
- if (Array.isArray(args[0])) {
38673
+ if (Array.isArray(args2[0])) {
38668
38674
  return new F({
38669
38675
  type: "function",
38670
38676
  input: new $ZodTuple({
38671
38677
  type: "tuple",
38672
- items: args[0],
38673
- rest: args[1]
38678
+ items: args2[0],
38679
+ rest: args2[1]
38674
38680
  }),
38675
38681
  output: inst._def.output
38676
38682
  });
38677
38683
  }
38678
38684
  return new F({
38679
38685
  type: "function",
38680
- input: args[0],
38686
+ input: args2[0],
38681
38687
  output: inst._def.output
38682
38688
  });
38683
38689
  };
@@ -40610,12 +40616,12 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
40610
40616
  },
40611
40617
  configurable: true
40612
40618
  });
40613
- inst.meta = (...args) => {
40614
- if (args.length === 0) {
40619
+ inst.meta = (...args2) => {
40620
+ if (args2.length === 0) {
40615
40621
  return globalRegistry.get(inst);
40616
40622
  }
40617
40623
  const cl = inst.clone();
40618
- globalRegistry.add(cl, args[0]);
40624
+ globalRegistry.add(cl, args2[0]);
40619
40625
  return cl;
40620
40626
  };
40621
40627
  inst.isOptional = () => inst.safeParse(undefined).success;
@@ -40631,18 +40637,18 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
40631
40637
  inst.format = bag.format ?? null;
40632
40638
  inst.minLength = bag.minimum ?? null;
40633
40639
  inst.maxLength = bag.maximum ?? null;
40634
- inst.regex = (...args) => inst.check(_regex(...args));
40635
- inst.includes = (...args) => inst.check(_includes(...args));
40636
- inst.startsWith = (...args) => inst.check(_startsWith(...args));
40637
- inst.endsWith = (...args) => inst.check(_endsWith(...args));
40638
- inst.min = (...args) => inst.check(_minLength(...args));
40639
- inst.max = (...args) => inst.check(_maxLength(...args));
40640
- inst.length = (...args) => inst.check(_length(...args));
40641
- inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
40640
+ inst.regex = (...args2) => inst.check(_regex(...args2));
40641
+ inst.includes = (...args2) => inst.check(_includes(...args2));
40642
+ inst.startsWith = (...args2) => inst.check(_startsWith(...args2));
40643
+ inst.endsWith = (...args2) => inst.check(_endsWith(...args2));
40644
+ inst.min = (...args2) => inst.check(_minLength(...args2));
40645
+ inst.max = (...args2) => inst.check(_maxLength(...args2));
40646
+ inst.length = (...args2) => inst.check(_length(...args2));
40647
+ inst.nonempty = (...args2) => inst.check(_minLength(1, ...args2));
40642
40648
  inst.lowercase = (params) => inst.check(_lowercase(params));
40643
40649
  inst.uppercase = (params) => inst.check(_uppercase(params));
40644
40650
  inst.trim = () => inst.check(_trim());
40645
- inst.normalize = (...args) => inst.check(_normalize(...args));
40651
+ inst.normalize = (...args2) => inst.check(_normalize(...args2));
40646
40652
  inst.toLowerCase = () => inst.check(_toLowerCase());
40647
40653
  inst.toUpperCase = () => inst.check(_toUpperCase());
40648
40654
  inst.slugify = () => inst.check(_slugify());
@@ -41062,8 +41068,8 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
41062
41068
  inst.merge = (other) => merge3(inst, other);
41063
41069
  inst.pick = (mask) => pick(inst, mask);
41064
41070
  inst.omit = (mask) => omit(inst, mask);
41065
- inst.partial = (...args) => partial2(ZodOptional, inst, args[0]);
41066
- inst.required = (...args) => required(ZodNonOptional, inst, args[0]);
41071
+ inst.partial = (...args2) => partial2(ZodOptional, inst, args2[0]);
41072
+ inst.required = (...args2) => required(ZodNonOptional, inst, args2[0]);
41067
41073
  });
41068
41074
  function object(shape, params) {
41069
41075
  const def = {
@@ -41200,10 +41206,10 @@ var ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => {
41200
41206
  inst._zod.processJSONSchema = (ctx, json, params) => mapProcessor(inst, ctx);
41201
41207
  inst.keyType = def.keyType;
41202
41208
  inst.valueType = def.valueType;
41203
- inst.min = (...args) => inst.check(_minSize(...args));
41209
+ inst.min = (...args2) => inst.check(_minSize(...args2));
41204
41210
  inst.nonempty = (params) => inst.check(_minSize(1, params));
41205
- inst.max = (...args) => inst.check(_maxSize(...args));
41206
- inst.size = (...args) => inst.check(_size(...args));
41211
+ inst.max = (...args2) => inst.check(_maxSize(...args2));
41212
+ inst.size = (...args2) => inst.check(_size(...args2));
41207
41213
  });
41208
41214
  function map(keyType, valueType, params) {
41209
41215
  return new ZodMap({
@@ -41217,10 +41223,10 @@ var ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => {
41217
41223
  $ZodSet.init(inst, def);
41218
41224
  ZodType.init(inst, def);
41219
41225
  inst._zod.processJSONSchema = (ctx, json, params) => setProcessor(inst, ctx);
41220
- inst.min = (...args) => inst.check(_minSize(...args));
41226
+ inst.min = (...args2) => inst.check(_minSize(...args2));
41221
41227
  inst.nonempty = (params) => inst.check(_minSize(1, params));
41222
- inst.max = (...args) => inst.check(_maxSize(...args));
41223
- inst.size = (...args) => inst.check(_size(...args));
41228
+ inst.max = (...args2) => inst.check(_maxSize(...args2));
41229
+ inst.size = (...args2) => inst.check(_size(...args2));
41224
41230
  });
41225
41231
  function set(valueType, params) {
41226
41232
  return new ZodSet({
@@ -41601,11 +41607,11 @@ function _instanceof(cls, params = {}) {
41601
41607
  };
41602
41608
  return inst;
41603
41609
  }
41604
- var stringbool = (...args) => _stringbool({
41610
+ var stringbool = (...args2) => _stringbool({
41605
41611
  Codec: ZodCodec,
41606
41612
  Boolean: ZodBoolean,
41607
41613
  String: ZodString
41608
- }, ...args);
41614
+ }, ...args2);
41609
41615
  function json(params) {
41610
41616
  const jsonSchema = lazy(() => {
41611
41617
  return union([string$1(params), number$1(), boolean$1(), _null(), array2(jsonSchema), record(string$1(), jsonSchema)]);
@@ -42143,10 +42149,10 @@ class ServerBase {
42143
42149
  this.cors = opts?.cors;
42144
42150
  this.showConnected = opts?.showConnected !== false;
42145
42151
  }
42146
- listen(...args) {
42147
- this.customListen(...args);
42152
+ listen(...args2) {
42153
+ this.customListen(...args2);
42148
42154
  }
42149
- customListen(...args) {
42155
+ customListen(...args2) {
42150
42156
  console.error("Please use createServer to create server instance");
42151
42157
  }
42152
42158
  get handleServer() {
@@ -42165,7 +42171,7 @@ class ServerBase {
42165
42171
  this.handle = handle;
42166
42172
  }
42167
42173
  createCallback() {
42168
- const path6 = this.path;
42174
+ const path7 = this.path;
42169
42175
  const handle = this.handle;
42170
42176
  const cors = this.cors;
42171
42177
  const that = this;
@@ -42183,7 +42189,7 @@ class ServerBase {
42183
42189
  if (res.headersSent) {
42184
42190
  return;
42185
42191
  }
42186
- if (!req.url.startsWith(path6)) {
42192
+ if (!req.url.startsWith(path7)) {
42187
42193
  return;
42188
42194
  }
42189
42195
  if (cors) {
@@ -42196,8 +42202,8 @@ class ServerBase {
42196
42202
  }
42197
42203
  }
42198
42204
  const url2 = req.url;
42199
- if (!url2.startsWith(path6)) {
42200
- res.end(resultError(`not path:[${path6}]`));
42205
+ if (!url2.startsWith(path7)) {
42206
+ res.end(resultError(`not path:[${path7}]`));
42201
42207
  return;
42202
42208
  }
42203
42209
  const messages = await handleServer(req, res);
@@ -45443,8 +45449,8 @@ class Parser {
45443
45449
  }
45444
45450
 
45445
45451
  class Executor {
45446
- getValueByPath(obj, path6) {
45447
- return path6.split(".").reduce((acc, part) => acc?.[part], obj);
45452
+ getValueByPath(obj, path7) {
45453
+ return path7.split(".").reduce((acc, part) => acc?.[part], obj);
45448
45454
  }
45449
45455
  likeToRegex(pattern2) {
45450
45456
  let regex = "";
@@ -45594,15 +45600,15 @@ var initApi = async (opts) => {
45594
45600
  };
45595
45601
  // src/module/light-code/index.ts
45596
45602
  var import_fast_glob2 = __toESM(require_out4(), 1);
45597
- import path6 from "node:path";
45603
+ import path7 from "node:path";
45598
45604
  import fs9 from "node:fs";
45599
45605
 
45600
45606
  // src/module/light-code/run.ts
45601
45607
  import { fork as fork3 } from "node:child_process";
45602
45608
  import fs7 from "fs";
45603
- var fileExists = (path6) => {
45609
+ var fileExists = (path7) => {
45604
45610
  try {
45605
- fs7.accessSync(path6, fs7.constants.F_OK);
45611
+ fs7.accessSync(path7, fs7.constants.F_OK);
45606
45612
  return true;
45607
45613
  } catch (e) {
45608
45614
  return false;
@@ -45739,7 +45745,7 @@ var initLightCode = async (opts) => {
45739
45745
  return;
45740
45746
  }
45741
45747
  const appDir = config2.configPath.appsDir;
45742
- const lightcodeDir = path6.join(appDir, "light-code", "code");
45748
+ const lightcodeDir = path7.join(appDir, "light-code", "code");
45743
45749
  if (!fs9.existsSync(lightcodeDir)) {
45744
45750
  fs9.mkdirSync(lightcodeDir, { recursive: true });
45745
45751
  }
@@ -45749,7 +45755,7 @@ var initLightCode = async (opts) => {
45749
45755
  onlyFiles: true
45750
45756
  }).map((file2) => {
45751
45757
  return {
45752
- filepath: path6.join(lightcodeDir, file2)
45758
+ filepath: path7.join(lightcodeDir, file2)
45753
45759
  };
45754
45760
  });
45755
45761
  if (sync2) {
@@ -45762,7 +45768,7 @@ var initLightCode = async (opts) => {
45762
45768
  const lightQueryList = queryRes.data?.list || [];
45763
45769
  for (const item of lightQueryList) {
45764
45770
  const codeHash = getStringHash(item.code || "");
45765
- diffList.push({ id: item.id, code: item.code || "", hash: codeHash, filepath: path6.join(lightcodeDir, `${item.id}.ts`) });
45771
+ diffList.push({ id: item.id, code: item.code || "", hash: codeHash, filepath: path7.join(lightcodeDir, `${item.id}.ts`) });
45766
45772
  }
45767
45773
  const codeFileSet = new Set(codeFiles.map((f) => f.filepath));
45768
45774
  const toAdd = diffList.filter((d) => !codeFileSet.has(d.filepath));
@@ -45833,6 +45839,86 @@ var initLightCode = async (opts) => {
45833
45839
  console.log(`light-code 路由注册成功`, `注册${diffList.length}个路由`);
45834
45840
  };
45835
45841
 
45842
+ // src/module/assistant/local-app-manager/assistant-app-resolve.ts
45843
+ import path8 from "node:path";
45844
+ import fs10 from "node:fs";
45845
+
45846
+ class ModuleResolver {
45847
+ root;
45848
+ pkgCache = new Map;
45849
+ constructor(root2) {
45850
+ this.root = root2;
45851
+ }
45852
+ resolve(routePath) {
45853
+ if (path8.isAbsolute(routePath)) {
45854
+ return routePath;
45855
+ }
45856
+ if (routePath.startsWith("@")) {
45857
+ return this.resolveScopedPackage(routePath);
45858
+ }
45859
+ if (!routePath.startsWith(".") && !routePath.startsWith("/")) {
45860
+ const pkgPath = path8.join(this.root, "node_modules", routePath);
45861
+ if (this.fileIsExists(pkgPath)) {
45862
+ return pkgPath;
45863
+ }
45864
+ }
45865
+ const localFullPath = path8.resolve(this.root, routePath);
45866
+ return this.fileIsExists(localFullPath) ? localFullPath : routePath;
45867
+ }
45868
+ resolveScopedPackage(routePath) {
45869
+ const parts = routePath.split("/");
45870
+ const pkgName = parts.slice(0, 2).join("/");
45871
+ const subPath = parts.slice(2).join("/");
45872
+ const pkgPath = path8.join(this.root, "node_modules", pkgName);
45873
+ const pkgJsonPath = path8.join(pkgPath, "package.json");
45874
+ const pkg = this.readPackageJson(pkgJsonPath);
45875
+ if (!pkg) {
45876
+ return routePath;
45877
+ }
45878
+ const entryPath = this.resolvePackageExport(pkg, subPath);
45879
+ return path8.join(pkgPath, entryPath);
45880
+ }
45881
+ resolvePackageExport(pkg, subPath) {
45882
+ const exportsField = pkg.exports;
45883
+ if (exportsField && typeof exportsField === "object") {
45884
+ const exportKey = subPath ? `./${subPath}` : ".";
45885
+ if (exportsField[exportKey]) {
45886
+ const entry2 = exportsField[exportKey];
45887
+ if (typeof entry2 === "object") {
45888
+ return entry2.import || entry2.default || entry2;
45889
+ }
45890
+ return entry2;
45891
+ }
45892
+ }
45893
+ return pkg.main || "index.js";
45894
+ }
45895
+ readPackageJson(pkgJsonPath) {
45896
+ try {
45897
+ const cached2 = this.pkgCache.get(pkgJsonPath);
45898
+ const stats = fs10.statSync(pkgJsonPath);
45899
+ if (cached2 && cached2.mtime === stats.mtimeMs) {
45900
+ return cached2.pkg;
45901
+ }
45902
+ const pkg = JSON.parse(fs10.readFileSync(pkgJsonPath, "utf-8"));
45903
+ this.pkgCache.set(pkgJsonPath, { pkg, mtime: stats.mtimeMs });
45904
+ return pkg;
45905
+ } catch {
45906
+ return null;
45907
+ }
45908
+ }
45909
+ fileIsExists(filepath) {
45910
+ try {
45911
+ fs10.accessSync(filepath, fs10.constants.F_OK);
45912
+ return true;
45913
+ } catch {
45914
+ return false;
45915
+ }
45916
+ }
45917
+ clearCache() {
45918
+ this.pkgCache.clear();
45919
+ }
45920
+ }
45921
+
45836
45922
  // src/module/assistant/local-app-manager/assistant-app.ts
45837
45923
  class AssistantApp extends Manager2 {
45838
45924
  config;
@@ -45841,12 +45927,13 @@ class AssistantApp extends Manager2 {
45841
45927
  attemptedConnectTimes = 0;
45842
45928
  remoteApp = null;
45843
45929
  remoteUrl = null;
45930
+ resolver;
45844
45931
  constructor(config2, mainApp) {
45845
45932
  config2.checkMounted();
45846
- const appsPath = config2?.configPath?.appsDir || path7.join(process.cwd(), "apps");
45847
- const pagesPath = config2?.configPath?.pagesDir || path7.join(process.cwd(), "pages");
45933
+ const appsPath = config2?.configPath?.appsDir || path9.join(process.cwd(), "apps");
45934
+ const pagesPath = config2?.configPath?.pagesDir || path9.join(process.cwd(), "pages");
45848
45935
  const appsConfigPath = config2.configPath?.appsConfigPath;
45849
- const configFimename = path7.basename(appsConfigPath || "");
45936
+ const configFimename = path9.basename(appsConfigPath || "");
45850
45937
  super({
45851
45938
  appsPath,
45852
45939
  configFilename: configFimename,
@@ -45854,6 +45941,7 @@ class AssistantApp extends Manager2 {
45854
45941
  });
45855
45942
  this.pagesPath = pagesPath;
45856
45943
  this.config = config2;
45944
+ this.resolver = new ModuleResolver(config2.configPath.configDir);
45857
45945
  }
45858
45946
  async pageList() {
45859
45947
  const pages = await import_fast_glob3.default(["*/*/package.json"], {
@@ -45862,7 +45950,7 @@ class AssistantApp extends Manager2 {
45862
45950
  });
45863
45951
  const pagesParse = pages.map((page) => {
45864
45952
  const [user, app] = page.split("/");
45865
- const contentStr = fs10.readFileSync(path7.join(this.pagesPath, page), "utf-8");
45953
+ const contentStr = fs11.readFileSync(path9.join(this.pagesPath, page), "utf-8");
45866
45954
  const content = parseIfJson(contentStr);
45867
45955
  return {
45868
45956
  user,
@@ -45885,7 +45973,7 @@ class AssistantApp extends Manager2 {
45885
45973
  });
45886
45974
  const pagesParse = pages.map((page) => {
45887
45975
  const relativePath = page;
45888
- const contentStr = fs10.readFileSync(path7.join(root2, page), "utf-8");
45976
+ const contentStr = fs11.readFileSync(path9.join(root2, page), "utf-8");
45889
45977
  const content = parseIfJson(contentStr);
45890
45978
  if (!content.appType) {
45891
45979
  const isWeb = relativePath.startsWith("pages/");
@@ -46035,14 +46123,10 @@ class AssistantApp extends Manager2 {
46035
46123
  const routes = this.config.getConfig().routes || [];
46036
46124
  for (const route of routes) {
46037
46125
  try {
46038
- if (typeof route === "string") {
46039
- await import(route);
46040
- console.log("安装路由", route);
46041
- } else if (typeof route === "object" && route.path) {
46042
- const routePath = route.path;
46043
- await import(routePath);
46044
- console.log("安装路由", routePath);
46045
- }
46126
+ const routeStr = typeof route === "string" ? route : route.path;
46127
+ const resolvedPath = this.resolver.resolve(routeStr);
46128
+ await import(resolvedPath);
46129
+ console.log("路由已初始化", route);
46046
46130
  } catch (err) {
46047
46131
  console.error("初始化路由失败", route, err);
46048
46132
  }
@@ -46310,7 +46394,7 @@ var assistantConfig2 = new AssistantConfig({
46310
46394
  });
46311
46395
 
46312
46396
  // src/program.ts
46313
- import fs11 from "fs";
46397
+ import fs12 from "fs";
46314
46398
  var version2 = "0.0.1";
46315
46399
  try {
46316
46400
  if ("0.0.8")
@@ -46319,17 +46403,17 @@ try {
46319
46403
  program.name("asst").description("A CLI tool with envison").version(version2, "-v, --version", "output the current version");
46320
46404
  var ls = new Command("ls").description("List files in the current directory").action(() => {
46321
46405
  console.log("List files");
46322
- console.log(fs11.readdirSync(process.cwd()));
46406
+ console.log(fs12.readdirSync(process.cwd()));
46323
46407
  });
46324
46408
  program.addCommand(ls);
46325
- var runProgram = (args) => {
46409
+ var runProgram = (args2) => {
46326
46410
  const [_app, _command] = process.argv;
46327
- program.parse([_app, _command, ...args]);
46411
+ program.parse([_app, _command, ...args2]);
46328
46412
  };
46329
46413
 
46330
46414
  // src/services/init/index.ts
46331
- import fs12 from "node:fs";
46332
- import path8 from "node:path";
46415
+ import fs13 from "node:fs";
46416
+ import path10 from "node:path";
46333
46417
 
46334
46418
  // ../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
46335
46419
  var ANSI_BACKGROUND_OFFSET = 10;
@@ -46857,6 +46941,15 @@ var installDeps = async (opts) => {
46857
46941
  syncSpawn("npm", params, { cwd: appPath, stdio: "inherit", env: process.env });
46858
46942
  }
46859
46943
  };
46944
+ var execCommand = (command, options = {}) => {
46945
+ const { cwd } = options;
46946
+ return spawnSync(command, {
46947
+ stdio: "inherit",
46948
+ shell: true,
46949
+ cwd,
46950
+ env: process.env
46951
+ });
46952
+ };
46860
46953
 
46861
46954
  // src/services/init/index.ts
46862
46955
  var randomId = () => Math.random().toString(36).substring(2, 8);
@@ -46914,13 +47007,13 @@ class AssistantInit extends AssistantConfig {
46914
47007
  });
46915
47008
  }
46916
47009
  checkConfigPath() {
46917
- const assistantPath = path8.join(this.configDir, "assistant-app", "assistant-config.json");
47010
+ const assistantPath = path10.join(this.configDir, "assistant-app", "assistant-config.json");
46918
47011
  return checkFileExists(assistantPath);
46919
47012
  }
46920
47013
  createEnvConfig() {
46921
47014
  const env3 = this.configPath?.envConfigPath;
46922
47015
  if (!checkFileExists(env3, true)) {
46923
- fs12.writeFileSync(env3, `# 环境配置文件
47016
+ fs13.writeFileSync(env3, `# 环境配置文件
46924
47017
  `);
46925
47018
  console.log(chalk2.green("助手环境配置.env文件创建成功"));
46926
47019
  }
@@ -46928,7 +47021,7 @@ class AssistantInit extends AssistantConfig {
46928
47021
  createOtherConfig() {
46929
47022
  const appsConfig = this.configPath?.appsConfigPath;
46930
47023
  if (!checkFileExists(appsConfig, true)) {
46931
- fs12.writeFileSync(appsConfig, JSON.stringify({ description: "apps manager.", list: [] }));
47024
+ fs13.writeFileSync(appsConfig, JSON.stringify({ description: "apps manager.", list: [] }));
46932
47025
  console.log(chalk2.green("助手应用配置文件 apps.json 创建成功"));
46933
47026
  }
46934
47027
  }
@@ -46950,20 +47043,20 @@ class AssistantInit extends AssistantConfig {
46950
47043
  }
46951
47044
  }
46952
47045
  initPnpm() {
46953
- const pnpmPath = path8.join(this.configDir, "assistant-app", "pnpm-workspace.yaml");
47046
+ const pnpmPath = path10.join(this.configDir, "assistant-app", "pnpm-workspace.yaml");
46954
47047
  let create = false;
46955
47048
  if (!checkFileExists(pnpmPath, true)) {
46956
47049
  create = true;
46957
- fs12.writeFileSync(pnpmPath, `packages:
47050
+ fs13.writeFileSync(pnpmPath, `packages:
46958
47051
  - 'apps/**/*'
46959
47052
  - 'pages/**/*'
46960
47053
  `);
46961
47054
  console.log(chalk2.green("助手 pnpm-workspace.yaml 文件创建成功"));
46962
47055
  }
46963
- const packagePath = path8.join(this.configDir, "assistant-app", "package.json");
47056
+ const packagePath = path10.join(this.configDir, "assistant-app", "package.json");
46964
47057
  if (!checkFileExists(packagePath, true)) {
46965
47058
  create = true;
46966
- fs12.writeFileSync(packagePath, `{
47059
+ fs13.writeFileSync(packagePath, `{
46967
47060
  "name": "assistant-app",
46968
47061
  "version": "1.0.0",
46969
47062
  "description": "assistant-app package pnpm, node pkgs projects",
@@ -47005,7 +47098,7 @@ class AssistantInit extends AssistantConfig {
47005
47098
  }
47006
47099
  `);
47007
47100
  console.log(chalk2.green("助手 package.json 文件创建成功, 正在安装依赖..."));
47008
- installDeps({ appPath: path8.dirname(packagePath), isProduction: true }).then(() => {
47101
+ installDeps({ appPath: path10.dirname(packagePath), isProduction: true }).then(() => {
47009
47102
  console.log("------------------------------------------------");
47010
47103
  console.log(chalk2.green("助手依赖安装完成"));
47011
47104
  console.log("------------------------------------------------");
@@ -47016,10 +47109,10 @@ class AssistantInit extends AssistantConfig {
47016
47109
  };
47017
47110
  }
47018
47111
  initIgnore() {
47019
- const gitignorePath = path8.join(this.configDir, ".gitignore");
47112
+ const gitignorePath = path10.join(this.configDir, ".gitignore");
47020
47113
  let content = "";
47021
47114
  if (checkFileExists(gitignorePath, true)) {
47022
- content = fs12.readFileSync(gitignorePath, "utf-8");
47115
+ content = fs13.readFileSync(gitignorePath, "utf-8");
47023
47116
  }
47024
47117
  const ignoreLines = [
47025
47118
  "node_modules",
@@ -47045,7 +47138,7 @@ ${line}`;
47045
47138
  }
47046
47139
  });
47047
47140
  if (updated) {
47048
- fs12.writeFileSync(gitignorePath, content.trim() + `
47141
+ fs13.writeFileSync(gitignorePath, content.trim() + `
47049
47142
  `);
47050
47143
  console.log(chalk2.green(".gitignore 文件更新成功"));
47051
47144
  }
@@ -47070,8 +47163,8 @@ ${line}`;
47070
47163
  }
47071
47164
 
47072
47165
  // src/command/config-manager/index.ts
47073
- import path9 from "node:path";
47074
- import fs13 from "node:fs";
47166
+ import path11 from "node:path";
47167
+ import fs14 from "node:fs";
47075
47168
 
47076
47169
  // ../node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/key.js
47077
47170
  var isTabKey = (key) => key.name === "tab";
@@ -47143,14 +47236,14 @@ function readline() {
47143
47236
  return getStore().rl;
47144
47237
  }
47145
47238
  function withUpdates(fn) {
47146
- const wrapped = (...args) => {
47239
+ const wrapped = (...args2) => {
47147
47240
  const store = getStore();
47148
47241
  let shouldUpdate = false;
47149
47242
  const oldHandleChange = store.handleChange;
47150
47243
  store.handleChange = () => {
47151
47244
  shouldUpdate = true;
47152
47245
  };
47153
- const returnValue = fn(...args);
47246
+ const returnValue = fn(...args2);
47154
47247
  if (shouldUpdate) {
47155
47248
  oldHandleChange();
47156
47249
  }
@@ -48271,17 +48364,17 @@ class SignalExit extends SignalExitBase {
48271
48364
  this.#emitter.emit("exit", this.#process.exitCode, null);
48272
48365
  return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
48273
48366
  }
48274
- #processEmit(ev, ...args) {
48367
+ #processEmit(ev, ...args2) {
48275
48368
  const og = this.#originalProcessEmit;
48276
48369
  if (ev === "exit" && processOk(this.#process)) {
48277
- if (typeof args[0] === "number") {
48278
- this.#process.exitCode = args[0];
48370
+ if (typeof args2[0] === "number") {
48371
+ this.#process.exitCode = args2[0];
48279
48372
  }
48280
- const ret = og.call(this.#process, ev, ...args);
48373
+ const ret = og.call(this.#process, ev, ...args2);
48281
48374
  this.#emitter.emit("exit", this.#process.exitCode, null);
48282
48375
  return ret;
48283
48376
  } else {
48284
- return og.call(this.#process, ev, ...args);
48377
+ return og.call(this.#process, ev, ...args2);
48285
48378
  }
48286
48379
  }
48287
48380
  }
@@ -48523,9 +48616,9 @@ var dist_default2 = createPrompt((config3, done) => {
48523
48616
  // src/command/config-manager/index.ts
48524
48617
  var Init = new Command("init").description("初始化一个助手客户端,生成配置文件。").option("-w --workspace <workspace>", "助手路径,默认为执行命令的目录,如果助手路径不存在则创建。").action((opts) => {
48525
48618
  if (opts.workspace && !opts.workspace.startsWith("/")) {
48526
- opts.workspace = path9.join(process.cwd(), opts.workspace);
48619
+ opts.workspace = path11.join(process.cwd(), opts.workspace);
48527
48620
  } else if (opts.workspace) {
48528
- opts.workspace = path9.resolve(opts.workspace);
48621
+ opts.workspace = path11.resolve(opts.workspace);
48529
48622
  }
48530
48623
  const configDir3 = AssistantInit.detectConfigDir(opts.workspace);
48531
48624
  console.log("configDir", configDir3);
@@ -48537,20 +48630,20 @@ var Init = new Command("init").description("初始化一个助手客户端,生
48537
48630
  program.addCommand(Init);
48538
48631
  var removeCommand = new Command("remove").description("删除助手配置文件").option("-p --path <path>", "助手路径,默认为执行命令的目录,如果助手路径不存在则创建。").action((opts) => {
48539
48632
  if (opts.path && !opts.path.startsWith("/")) {
48540
- opts.path = path9.join(process.cwd(), opts.path);
48633
+ opts.path = path11.join(process.cwd(), opts.path);
48541
48634
  } else if (opts.path) {
48542
- opts.path = path9.resolve(opts.path);
48635
+ opts.path = path11.resolve(opts.path);
48543
48636
  }
48544
48637
  const configDir3 = AssistantInit.detectConfigDir(opts.path);
48545
- const assistantDir = path9.join(configDir3, "assistant-app");
48546
- if (fs13.existsSync(assistantDir)) {
48638
+ const assistantDir = path11.join(configDir3, "assistant-app");
48639
+ if (fs14.existsSync(assistantDir)) {
48547
48640
  dist_default2({
48548
48641
  message: `确定要删除助手配置文件吗?
48549
48642
  助手配置文件路径:${assistantDir}`,
48550
48643
  default: false
48551
48644
  }).then((confirmed) => {
48552
48645
  if (confirmed) {
48553
- fs13.rmSync(assistantDir, { recursive: true, force: true });
48646
+ fs14.rmSync(assistantDir, { recursive: true, force: true });
48554
48647
  console.log(source_default.green("助手配置文件已删除"));
48555
48648
  } else {
48556
48649
  console.log(source_default.blue("助手配置文件未删除"));
@@ -48563,9 +48656,9 @@ var removeCommand = new Command("remove").description("删除助手配置文件"
48563
48656
  program.addCommand(removeCommand);
48564
48657
  var npmCommand = new Command("pnpm").description("助手pnpm命令").option("-p --path <path>", "助手路径,默认为执行命令的目录,如果助手路径不存在则创建。").action((opts) => {
48565
48658
  if (opts.path && !opts.path.startsWith("/")) {
48566
- opts.path = path9.join(process.cwd(), opts.path);
48659
+ opts.path = path11.join(process.cwd(), opts.path);
48567
48660
  } else if (opts.path) {
48568
- opts.path = path9.resolve(opts.path);
48661
+ opts.path = path11.resolve(opts.path);
48569
48662
  }
48570
48663
  const configDir3 = AssistantInit.detectConfigDir(opts.path);
48571
48664
  console.log("configDir", configDir3);
@@ -48582,11 +48675,11 @@ var npmCommand = new Command("pnpm").description("助手pnpm命令").option("-p
48582
48675
  Init.addCommand(npmCommand);
48583
48676
 
48584
48677
  // src/services/app/index.ts
48585
- import path10 from "path";
48586
- import fs14 from "fs";
48678
+ import path12 from "path";
48679
+ import fs15 from "fs";
48587
48680
  import { spawnSync as spawnSync2 } from "child_process";
48588
- var runCommand = (command, args) => {
48589
- const result = spawnSync2(command, args, {
48681
+ var runCommand = (command, args2) => {
48682
+ const result = spawnSync2(command, args2, {
48590
48683
  stdio: "inherit",
48591
48684
  shell: true
48592
48685
  });
@@ -48619,25 +48712,25 @@ class AppDownload {
48619
48712
  throw new Error("应用名称不能为空");
48620
48713
  }
48621
48714
  const command = "ev";
48622
- const args = ["app", "download"];
48623
- args.push("-i", id);
48715
+ const args2 = ["app", "download"];
48716
+ args2.push("-i", id);
48624
48717
  if (type === "web") {
48625
- args.push("-o", pagesDir);
48718
+ args2.push("-o", pagesDir);
48626
48719
  } else if (type === "app") {
48627
- args.push("-o", path10.join(appsDir));
48720
+ args2.push("-o", path12.join(appsDir));
48628
48721
  } else {
48629
48722
  throw new Error("应用类型错误,只能是 web 或 app");
48630
48723
  }
48631
48724
  if (force) {
48632
- args.push("-f");
48725
+ args2.push("-f");
48633
48726
  if (opts.yes) {
48634
- args.push("-y");
48727
+ args2.push("-y");
48635
48728
  }
48636
48729
  }
48637
48730
  if (opts.registry) {
48638
- args.push("-r", opts.registry);
48731
+ args2.push("-r", opts.registry);
48639
48732
  }
48640
- return runCommand(command, args);
48733
+ return runCommand(command, args2);
48641
48734
  }
48642
48735
  async confirm(message) {
48643
48736
  return await dist_default2({
@@ -48657,10 +48750,10 @@ class AppDownload {
48657
48750
  let deletePath = "";
48658
48751
  let isDelete = false;
48659
48752
  if (type === "web") {
48660
- const pagePath = path10.join(pagesDir, id);
48753
+ const pagePath = path12.join(pagesDir, id);
48661
48754
  deletePath = pagePath;
48662
48755
  } else if (type === "app") {
48663
- const appPath = path10.join(appsDir, id);
48756
+ const appPath = path12.join(appsDir, id);
48664
48757
  deletePath = appPath;
48665
48758
  }
48666
48759
  if (deletePath && checkFileExists(deletePath)) {
@@ -48671,7 +48764,7 @@ class AppDownload {
48671
48764
  return;
48672
48765
  }
48673
48766
  }
48674
- fs14.rmSync(deletePath, { recursive: true });
48767
+ fs15.rmSync(deletePath, { recursive: true });
48675
48768
  isDelete = true;
48676
48769
  console.log(`删除应用成功: ${deletePath}`);
48677
48770
  }
@@ -48794,7 +48887,23 @@ var pageListCommand = new Command("page-list").alias("pl").option("-a, --all", "
48794
48887
  program.addCommand(pageListCommand);
48795
48888
 
48796
48889
  // src/command/asst-server/index.ts
48890
+ import { spawnSync as spawnSync4 } from "node:child_process";
48891
+
48892
+ // src/command/asst-server/reload.ts
48797
48893
  import { spawnSync as spawnSync3 } from "node:child_process";
48894
+ var reload3 = new Command("reload").description("重载正在运行的 Assistant Server 服务").action(() => {
48895
+ console.log("正在重载 Assistant Server 服务...");
48896
+ const cwd = "pm2 restart assistant-server";
48897
+ const child = spawnSync3("pm2", ["restart", "assistant-server"], {
48898
+ stdio: "inherit",
48899
+ shell: true,
48900
+ cwd
48901
+ });
48902
+ console.log("Assistant Server 服务重载完成。");
48903
+ });
48904
+ program.addCommand(reload3);
48905
+
48906
+ // src/command/asst-server/index.ts
48798
48907
  var command = new Command("server").description("启动服务").option("-d, --daemon", "是否以守护进程方式运行").option("-n, --name <name>", "服务名称", "assistant-server").option("-p, --port <port>", "服务端口").option("-s, --start", "是否启动服务").option("-e, --interpreter <interpreter>", "指定使用的解释器", "bun").action((options) => {
48799
48908
  const { port } = options;
48800
48909
  const [_interpreter, execPath] = process.argv;
@@ -48815,17 +48924,22 @@ var command = new Command("server").description("启动服务").option("-d, --da
48815
48924
  shellCommands.push(`-e ${options.interpreter}`);
48816
48925
  }
48817
48926
  const basename = _interpreter.split("/").pop();
48927
+ const m = parseHomeArg(HomeConfigDir);
48928
+ const cwd = m.isDev ? process.cwd() : m.configDir;
48929
+ console.log("当前工作目录:", cwd);
48818
48930
  if (basename.includes("bun")) {
48819
48931
  console.log(`Assistant server shell command: bun src/run-server.ts server ${shellCommands.join(" ")}`);
48820
- const child = spawnSync3(_interpreter, ["src/run-server.ts", ...shellCommands], {
48932
+ const child = spawnSync4(_interpreter, ["src/run-server.ts", ...shellCommands], {
48821
48933
  stdio: "inherit",
48822
- shell: true
48934
+ shell: true,
48935
+ cwd
48823
48936
  });
48824
48937
  } else {
48825
48938
  console.log(`Assistant server shell command: asst-server ${shellCommands.join(" ")}`);
48826
- const child = spawnSync3("asst-server", shellCommands, {
48939
+ const child = spawnSync4("asst-server", shellCommands, {
48827
48940
  stdio: "inherit",
48828
- shell: true
48941
+ shell: true,
48942
+ cwd
48829
48943
  });
48830
48944
  }
48831
48945
  });
@@ -48867,8 +48981,8 @@ commdands.forEach((name) => {
48867
48981
  });
48868
48982
 
48869
48983
  // src/command/run-scripts/index.ts
48870
- import path11 from "node:path";
48871
- import fs15 from "node:fs";
48984
+ import path13 from "node:path";
48985
+ import fs16 from "node:fs";
48872
48986
  var createRandomApp = (opts) => {
48873
48987
  const { app, package: packageJson, pwd } = opts;
48874
48988
  if (!app.status) {
@@ -48892,12 +49006,12 @@ var createRandomApp = (opts) => {
48892
49006
  };
48893
49007
  var start4 = new Command("start").description("获取package.json中app参数并启动对应的app").option("-s --save", "保存应用信息到assistant配置中", false).action(async (opts) => {
48894
49008
  const pwd = process.cwd();
48895
- const packageJsonPath = path11.join(pwd, "package.json");
49009
+ const packageJsonPath = path13.join(pwd, "package.json");
48896
49010
  if (checkFileExists(packageJsonPath) === false) {
48897
49011
  logger.error("package.json 在当前目录未找到,请在包含 package.json 的目录下运行此命令。");
48898
49012
  return;
48899
49013
  }
48900
- const packageJson = JSON.parse(fs15.readFileSync(packageJsonPath, "utf-8"));
49014
+ const packageJson = JSON.parse(fs16.readFileSync(packageJsonPath, "utf-8"));
48901
49015
  const appKey = packageJson.app;
48902
49016
  if (!appKey) {
48903
49017
  logger.error("package.json 中未找到 app 字段,请确保在 package.json 中正确配置 app 字段。");
@@ -48927,12 +49041,12 @@ var start4 = new Command("start").description("获取package.json中app参数并
48927
49041
  program.addCommand(start4);
48928
49042
  var stop5 = new Command("stop").description("获取package.json中app参数并停止对应的app").option("-t --todo <todo>", "停止应用,在pm2中如果为stop则停止,如果为remove则删除,默认为stop", "stop").option("-s --save", "保存应用信息到assistant配置中", false).action(async (opts) => {
48929
49043
  const pwd = process.cwd();
48930
- const packageJsonPath = path11.join(pwd, "package.json");
49044
+ const packageJsonPath = path13.join(pwd, "package.json");
48931
49045
  if (checkFileExists(packageJsonPath) === false) {
48932
49046
  logger.error("package.json 在当前目录未找到,请在包含 package.json 的目录下运行此命令。");
48933
49047
  return;
48934
49048
  }
48935
- const packageJson = JSON.parse(fs15.readFileSync(packageJsonPath, "utf-8"));
49049
+ const packageJson = JSON.parse(fs16.readFileSync(packageJsonPath, "utf-8"));
48936
49050
  const appKey = packageJson.app;
48937
49051
  if (!appKey) {
48938
49052
  logger.error("package.json 中未找到 app 字段,请确保在 package.json 中正确配置 app 字段。");
@@ -50382,26 +50496,26 @@ __export2(exports_util, {
50382
50496
  TextEncoder: () => TextEncoder,
50383
50497
  TextDecoder: () => TextDecoder2
50384
50498
  });
50385
- function format(f, ...args) {
50499
+ function format(f, ...args2) {
50386
50500
  if (!isString(f)) {
50387
50501
  var objects = [f];
50388
- for (var i2 = 0;i2 < args.length; i2++)
50389
- objects.push(inspect(args[i2]));
50502
+ for (var i2 = 0;i2 < args2.length; i2++)
50503
+ objects.push(inspect(args2[i2]));
50390
50504
  return objects.join(" ");
50391
50505
  }
50392
- var i2 = 0, len2 = args.length, str = String(f).replace(formatRegExp, function(x2) {
50506
+ var i2 = 0, len2 = args2.length, str = String(f).replace(formatRegExp, function(x2) {
50393
50507
  if (x2 === "%%")
50394
50508
  return "%";
50395
50509
  if (i2 >= len2)
50396
50510
  return x2;
50397
50511
  switch (x2) {
50398
50512
  case "%s":
50399
- return String(args[i2++]);
50513
+ return String(args2[i2++]);
50400
50514
  case "%d":
50401
- return Number(args[i2++]);
50515
+ return Number(args2[i2++]);
50402
50516
  case "%j":
50403
50517
  try {
50404
- return JSON.stringify(args[i2++]);
50518
+ return JSON.stringify(args2[i2++]);
50405
50519
  } catch (_) {
50406
50520
  return "[Circular]";
50407
50521
  }
@@ -50409,7 +50523,7 @@ function format(f, ...args) {
50409
50523
  return x2;
50410
50524
  }
50411
50525
  });
50412
- for (var x = args[i2];i2 < len2; x = args[++i2])
50526
+ for (var x = args2[i2];i2 < len2; x = args2[++i2])
50413
50527
  if (isNull(x) || !isObject3(x))
50414
50528
  str += " " + x;
50415
50529
  else
@@ -50420,7 +50534,7 @@ function deprecate(fn, msg) {
50420
50534
  if (typeof process > "u" || process?.noDeprecation === true)
50421
50535
  return fn;
50422
50536
  var warned = false;
50423
- function deprecated(...args) {
50537
+ function deprecated(...args2) {
50424
50538
  if (!warned) {
50425
50539
  if (process.throwDeprecation)
50426
50540
  throw Error(msg);
@@ -50430,7 +50544,7 @@ function deprecate(fn, msg) {
50430
50544
  console.error(msg);
50431
50545
  warned = true;
50432
50546
  }
50433
- return fn.apply(this, ...args);
50547
+ return fn.apply(this, ...args2);
50434
50548
  }
50435
50549
  return deprecated;
50436
50550
  }
@@ -50648,8 +50762,8 @@ function timestamp() {
50648
50762
  var d = new Date, time2 = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(":");
50649
50763
  return [d.getDate(), months[d.getMonth()], time2].join(" ");
50650
50764
  }
50651
- function log(...args) {
50652
- console.log("%s - %s", timestamp(), format.apply(null, args));
50765
+ function log(...args2) {
50766
+ console.log("%s - %s", timestamp(), format.apply(null, args2));
50653
50767
  }
50654
50768
  function inherits(ctor, superCtor) {
50655
50769
  if (superCtor)
@@ -50676,14 +50790,14 @@ function callbackifyOnRejected(reason, cb) {
50676
50790
  function callbackify(original) {
50677
50791
  if (typeof original !== "function")
50678
50792
  throw TypeError('The "original" argument must be of type Function');
50679
- function callbackified(...args) {
50680
- var maybeCb = args.pop();
50793
+ function callbackified(...args2) {
50794
+ var maybeCb = args2.pop();
50681
50795
  if (typeof maybeCb !== "function")
50682
50796
  throw TypeError("The last argument must be of type Function");
50683
- var self2 = this, cb = function(...args2) {
50684
- return maybeCb.apply(self2, ...args2);
50797
+ var self2 = this, cb = function(...args22) {
50798
+ return maybeCb.apply(self2, ...args22);
50685
50799
  };
50686
- original.apply(this, args).then(function(ret) {
50800
+ original.apply(this, args2).then(function(ret) {
50687
50801
  process.nextTick(cb.bind(null, null, ret));
50688
50802
  }, function(rej) {
50689
50803
  process.nextTick(callbackifyOnRejected.bind(null, rej, cb));
@@ -50705,8 +50819,8 @@ var init_util = __esm2(() => {
50705
50819
  debuglog = ((debugs = {}, debugEnvRegex = {}, debugEnv) => ((debugEnv = typeof process < "u" && false) && (debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase()), debugEnvRegex = new RegExp("^" + debugEnv + "$", "i"), (set2) => {
50706
50820
  if (set2 = set2.toUpperCase(), !debugs[set2])
50707
50821
  if (debugEnvRegex.test(set2))
50708
- debugs[set2] = function(...args) {
50709
- console.error("%s: %s", set2, pid, format.apply(null, ...args));
50822
+ debugs[set2] = function(...args2) {
50823
+ console.error("%s: %s", set2, pid, format.apply(null, ...args2));
50710
50824
  };
50711
50825
  else
50712
50826
  debugs[set2] = function() {};
@@ -50742,18 +50856,18 @@ var init_util = __esm2(() => {
50742
50856
  throw TypeError('The "nodejs.util.promisify.custom" argument must be of type Function');
50743
50857
  return Object.defineProperty(fn, kCustomPromisifiedSymbol, { value: fn, enumerable: false, writable: false, configurable: true }), fn;
50744
50858
  }
50745
- function fn(...args) {
50859
+ function fn(...args2) {
50746
50860
  var promiseResolve, promiseReject, promise2 = new Promise(function(resolve, reject) {
50747
50861
  promiseResolve = resolve, promiseReject = reject;
50748
50862
  });
50749
- args.push(function(err, value) {
50863
+ args2.push(function(err, value) {
50750
50864
  if (err)
50751
50865
  promiseReject(err);
50752
50866
  else
50753
50867
  promiseResolve(value);
50754
50868
  });
50755
50869
  try {
50756
- original.apply(this, args);
50870
+ original.apply(this, args2);
50757
50871
  } catch (err) {
50758
50872
  promiseReject(err);
50759
50873
  }
@@ -50779,29 +50893,29 @@ __export2(exports_events, {
50779
50893
  addAbortListener: () => addAbortListener,
50780
50894
  EventEmitter: () => EventEmitter4
50781
50895
  });
50782
- function emitError(emitter, args) {
50896
+ function emitError(emitter, args2) {
50783
50897
  var { _events: events } = emitter;
50784
- if (args[0] ??= Error("Unhandled error."), !events)
50785
- throw args[0];
50898
+ if (args2[0] ??= Error("Unhandled error."), !events)
50899
+ throw args2[0];
50786
50900
  var errorMonitor = events[kErrorMonitor];
50787
50901
  if (errorMonitor)
50788
50902
  for (var handler of ArrayPrototypeSlice.call(errorMonitor))
50789
- handler.apply(emitter, args);
50903
+ handler.apply(emitter, args2);
50790
50904
  var handlers = events.error;
50791
50905
  if (!handlers)
50792
- throw args[0];
50906
+ throw args2[0];
50793
50907
  for (var handler of ArrayPrototypeSlice.call(handlers))
50794
- handler.apply(emitter, args);
50908
+ handler.apply(emitter, args2);
50795
50909
  return true;
50796
50910
  }
50797
- function addCatch(emitter, promise2, type2, args) {
50911
+ function addCatch(emitter, promise2, type2, args2) {
50798
50912
  promise2.then(undefined, function(err) {
50799
- queueMicrotask(() => emitUnhandledRejectionOrErr(emitter, err, type2, args));
50913
+ queueMicrotask(() => emitUnhandledRejectionOrErr(emitter, err, type2, args2));
50800
50914
  });
50801
50915
  }
50802
- function emitUnhandledRejectionOrErr(emitter, err, type2, args) {
50916
+ function emitUnhandledRejectionOrErr(emitter, err, type2, args2) {
50803
50917
  if (typeof emitter[kRejection] === "function")
50804
- emitter[kRejection](err, type2, ...args);
50918
+ emitter[kRejection](err, type2, ...args2);
50805
50919
  else
50806
50920
  try {
50807
50921
  emitter[kCapture] = false, emitter.emit("error", err);
@@ -50814,8 +50928,8 @@ function overflowWarning(emitter, type2, handlers) {
50814
50928
  let warn = Error(`Possible EventEmitter memory leak detected. ${handlers.length} ${String(type2)} listeners added to [${emitter.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);
50815
50929
  warn.name = "MaxListenersExceededWarning", warn.emitter = emitter, warn.type = type2, warn.count = handlers.length, console.warn(warn);
50816
50930
  }
50817
- function onceWrapper(type2, listener, ...args) {
50818
- this.removeListener(type2, listener), listener.apply(this, args);
50931
+ function onceWrapper(type2, listener, ...args2) {
50932
+ this.removeListener(type2, listener), listener.apply(this, args2);
50819
50933
  }
50820
50934
  function once2(emitter, type2, options) {
50821
50935
  var signal = options?.signal;
@@ -50825,12 +50939,12 @@ function once2(emitter, type2, options) {
50825
50939
  if (emitter.removeListener(type2, resolver), signal != null)
50826
50940
  eventTargetAgnosticRemoveListener(signal, "abort", abortListener);
50827
50941
  reject(err);
50828
- }, resolver = (...args) => {
50942
+ }, resolver = (...args2) => {
50829
50943
  if (typeof emitter.removeListener === "function")
50830
50944
  emitter.removeListener("error", errorListener);
50831
50945
  if (signal != null)
50832
50946
  eventTargetAgnosticRemoveListener(signal, "abort", abortListener);
50833
- resolve(args);
50947
+ resolve(args2);
50834
50948
  };
50835
50949
  if (eventTargetAgnosticAddListener(emitter, type2, resolver, { once: true }), type2 !== "error" && typeof emitter.once === "function")
50836
50950
  emitter.once("error", errorListener);
@@ -50932,9 +51046,9 @@ var EventEmitter4 = function(opts) {
50932
51046
  this.emit = emitWithRejectionCapture;
50933
51047
  };
50934
51048
  var EventEmitterPrototype;
50935
- var emitWithoutRejectionCapture = function(type2, ...args) {
51049
+ var emitWithoutRejectionCapture = function(type2, ...args2) {
50936
51050
  if (type2 === "error")
50937
- return emitError(this, args);
51051
+ return emitError(this, args2);
50938
51052
  var { _events: events } = this;
50939
51053
  if (events === undefined)
50940
51054
  return false;
@@ -50944,29 +51058,29 @@ var emitWithoutRejectionCapture = function(type2, ...args) {
50944
51058
  let maybeClonedHandlers = handlers.length > 1 ? handlers.slice() : handlers;
50945
51059
  for (let i2 = 0, { length } = maybeClonedHandlers;i2 < length; i2++) {
50946
51060
  let handler = maybeClonedHandlers[i2];
50947
- switch (args.length) {
51061
+ switch (args2.length) {
50948
51062
  case 0:
50949
51063
  handler.call(this);
50950
51064
  break;
50951
51065
  case 1:
50952
- handler.call(this, args[0]);
51066
+ handler.call(this, args2[0]);
50953
51067
  break;
50954
51068
  case 2:
50955
- handler.call(this, args[0], args[1]);
51069
+ handler.call(this, args2[0], args2[1]);
50956
51070
  break;
50957
51071
  case 3:
50958
- handler.call(this, args[0], args[1], args[2]);
51072
+ handler.call(this, args2[0], args2[1], args2[2]);
50959
51073
  break;
50960
51074
  default:
50961
- handler.apply(this, args);
51075
+ handler.apply(this, args2);
50962
51076
  break;
50963
51077
  }
50964
51078
  }
50965
51079
  return true;
50966
51080
  };
50967
- var emitWithRejectionCapture = function(type2, ...args) {
51081
+ var emitWithRejectionCapture = function(type2, ...args2) {
50968
51082
  if (type2 === "error")
50969
- return emitError(this, args);
51083
+ return emitError(this, args2);
50970
51084
  var { _events: events } = this;
50971
51085
  if (events === undefined)
50972
51086
  return false;
@@ -50976,25 +51090,25 @@ var emitWithRejectionCapture = function(type2, ...args) {
50976
51090
  let maybeClonedHandlers = handlers.length > 1 ? handlers.slice() : handlers;
50977
51091
  for (let i2 = 0, { length } = maybeClonedHandlers;i2 < length; i2++) {
50978
51092
  let handler = maybeClonedHandlers[i2], result;
50979
- switch (args.length) {
51093
+ switch (args2.length) {
50980
51094
  case 0:
50981
51095
  result = handler.call(this);
50982
51096
  break;
50983
51097
  case 1:
50984
- result = handler.call(this, args[0]);
51098
+ result = handler.call(this, args2[0]);
50985
51099
  break;
50986
51100
  case 2:
50987
- result = handler.call(this, args[0], args[1]);
51101
+ result = handler.call(this, args2[0], args2[1]);
50988
51102
  break;
50989
51103
  case 3:
50990
- result = handler.call(this, args[0], args[1], args[2]);
51104
+ result = handler.call(this, args2[0], args2[1], args2[2]);
50991
51105
  break;
50992
51106
  default:
50993
- result = handler.apply(this, args);
51107
+ result = handler.apply(this, args2);
50994
51108
  break;
50995
51109
  }
50996
51110
  if (result !== undefined && typeof result?.then === "function" && result.then === Promise.prototype.then)
50997
- addCatch(this, result, type2, args);
51111
+ addCatch(this, result, type2, args2);
50998
51112
  }
50999
51113
  return true;
51000
51114
  };
@@ -51183,8 +51297,8 @@ var require_stream5 = __commonJS3((exports, module) => {
51183
51297
  return self2.push(el);
51184
51298
  }, ArrayPrototypeSlice(self2, start5, end) {
51185
51299
  return self2.slice(start5, end);
51186
- }, Error, FunctionPrototypeCall(fn, thisArgs, ...args) {
51187
- return fn.call(thisArgs, ...args);
51300
+ }, Error, FunctionPrototypeCall(fn, thisArgs, ...args2) {
51301
+ return fn.call(thisArgs, ...args2);
51188
51302
  }, FunctionPrototypeSymbolHasInstance(self2, instance) {
51189
51303
  return Function.prototype[Symbol.hasInstance].call(self2, instance);
51190
51304
  }, MathFloor: Math.floor, Number, NumberIsInteger: Number.isInteger, NumberIsNaN: Number.isNaN, NumberMAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER, NumberMIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER, NumberParseInt: Number.parseInt, ObjectDefineProperties(self2, props) {
@@ -51220,9 +51334,9 @@ var require_stream5 = __commonJS3((exports, module) => {
51220
51334
  }, Boolean, Uint8Array };
51221
51335
  });
51222
51336
  var require_inspect = __commonJS22((exports2, module2) => {
51223
- module2.exports = { format(format2, ...args) {
51337
+ module2.exports = { format(format2, ...args2) {
51224
51338
  return format2.replace(/%([sdifj])/g, function(...[_unused, type2]) {
51225
- let replacement = args.shift();
51339
+ let replacement = args2.shift();
51226
51340
  if (type2 === "f")
51227
51341
  return replacement.toFixed(6);
51228
51342
  else if (type2 === "j")
@@ -51270,21 +51384,21 @@ var require_stream5 = __commonJS3((exports, module) => {
51270
51384
  res = `_${val.slice(i2 - 3, i2)}${res}`;
51271
51385
  return `${val.slice(0, i2)}${res}`;
51272
51386
  }
51273
- function getMessage(key, msg, args) {
51387
+ function getMessage(key, msg, args2) {
51274
51388
  if (typeof msg === "function")
51275
- return assert(msg.length <= args.length, `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${msg.length}).`), msg(...args);
51389
+ return assert(msg.length <= args2.length, `Code: ${key}; The provided arguments length (${args2.length}) does not match the required ones (${msg.length}).`), msg(...args2);
51276
51390
  let expectedLength = (msg.match(/%[dfijoOs]/g) || []).length;
51277
- if (assert(expectedLength === args.length, `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${expectedLength}).`), args.length === 0)
51391
+ if (assert(expectedLength === args2.length, `Code: ${key}; The provided arguments length (${args2.length}) does not match the required ones (${expectedLength}).`), args2.length === 0)
51278
51392
  return msg;
51279
- return format2(msg, ...args);
51393
+ return format2(msg, ...args2);
51280
51394
  }
51281
51395
  function E2(code2, message, Base) {
51282
51396
  if (!Base)
51283
51397
  Base = Error;
51284
51398
 
51285
51399
  class NodeError extends Base {
51286
- constructor(...args) {
51287
- super(getMessage(code2, message, args));
51400
+ constructor(...args2) {
51401
+ super(getMessage(code2, message, args2));
51288
51402
  }
51289
51403
  toString() {
51290
51404
  return `${this.name} [${code2}]: ${this.message}`;
@@ -51418,20 +51532,20 @@ var require_stream5 = __commonJS3((exports, module) => {
51418
51532
  let type2 = value !== null && value !== undefined && (_value$constructor = value.constructor) !== null && _value$constructor !== undefined && _value$constructor.name ? `instance of ${value.constructor.name}` : `type ${typeof value}`;
51419
51533
  return `Expected ${input} to be returned from the "${name}" function but got ${type2}.`;
51420
51534
  }, TypeError);
51421
- E2("ERR_MISSING_ARGS", (...args) => {
51422
- assert(args.length > 0, "At least one arg needs to be specified");
51423
- let msg, len2 = args.length;
51424
- switch (args = (Array.isArray(args) ? args : [args]).map((a) => `"${a}"`).join(" or "), len2) {
51535
+ E2("ERR_MISSING_ARGS", (...args2) => {
51536
+ assert(args2.length > 0, "At least one arg needs to be specified");
51537
+ let msg, len2 = args2.length;
51538
+ switch (args2 = (Array.isArray(args2) ? args2 : [args2]).map((a) => `"${a}"`).join(" or "), len2) {
51425
51539
  case 1:
51426
- msg += `The ${args[0]} argument`;
51540
+ msg += `The ${args2[0]} argument`;
51427
51541
  break;
51428
51542
  case 2:
51429
- msg += `The ${args[0]} and ${args[1]} arguments`;
51543
+ msg += `The ${args2[0]} and ${args2[1]} arguments`;
51430
51544
  break;
51431
51545
  default:
51432
51546
  {
51433
- let last = args.pop();
51434
- msg += `The ${args.join(", ")}, and ${last} arguments`;
51547
+ let last = args2.pop();
51548
+ msg += `The ${args2.join(", ")}, and ${last} arguments`;
51435
51549
  }
51436
51550
  break;
51437
51551
  }
@@ -51824,10 +51938,10 @@ var require_stream5 = __commonJS3((exports, module) => {
51824
51938
  };
51825
51939
  module2.exports = { AggregateError: AggregateError2, kEmptyObject: Object.freeze({}), once(callback) {
51826
51940
  let called = false;
51827
- return function(...args) {
51941
+ return function(...args2) {
51828
51942
  if (called)
51829
51943
  return;
51830
- called = true, callback.apply(this, args);
51944
+ called = true, callback.apply(this, args2);
51831
51945
  };
51832
51946
  }, createDeferredPromise: function() {
51833
51947
  let resolve, reject;
@@ -51836,10 +51950,10 @@ var require_stream5 = __commonJS3((exports, module) => {
51836
51950
  }), resolve, reject };
51837
51951
  }, promisify(fn) {
51838
51952
  return new Promise((resolve, reject) => {
51839
- fn((err, ...args) => {
51953
+ fn((err, ...args2) => {
51840
51954
  if (err)
51841
51955
  return reject(err);
51842
- return resolve(...args);
51956
+ return resolve(...args2);
51843
51957
  });
51844
51958
  });
51845
51959
  }, debuglog() {
@@ -52311,8 +52425,8 @@ var require_stream5 = __commonJS3((exports, module) => {
52311
52425
  else {
52312
52426
  addAbortListener2 = addAbortListener2 || require_util().addAbortListener;
52313
52427
  let disposable = addAbortListener2(options.signal, abort), originalCallback = callback;
52314
- callback = once((...args) => {
52315
- disposable[SymbolDispose](), originalCallback.apply(stream3, args);
52428
+ callback = once((...args2) => {
52429
+ disposable[SymbolDispose](), originalCallback.apply(stream3, args2);
52316
52430
  });
52317
52431
  }
52318
52432
  }
@@ -52328,13 +52442,13 @@ var require_stream5 = __commonJS3((exports, module) => {
52328
52442
  else {
52329
52443
  addAbortListener2 = addAbortListener2 || require_util().addAbortListener;
52330
52444
  let disposable = addAbortListener2(options.signal, abort), originalCallback = callback;
52331
- callback = once((...args) => {
52332
- disposable[SymbolDispose](), originalCallback.apply(stream3, args);
52445
+ callback = once((...args2) => {
52446
+ disposable[SymbolDispose](), originalCallback.apply(stream3, args2);
52333
52447
  });
52334
52448
  }
52335
- let resolverFn = (...args) => {
52449
+ let resolverFn = (...args2) => {
52336
52450
  if (!isAborted)
52337
- process22.nextTick(() => callback.apply(stream3, args));
52451
+ process22.nextTick(() => callback.apply(stream3, args2));
52338
52452
  };
52339
52453
  return PromisePrototypeThen(stream3[kIsClosedPromise].promise, resolverFn, resolverFn), nop;
52340
52454
  }
@@ -54846,8 +54960,8 @@ var require_stream5 = __commonJS3((exports, module) => {
54846
54960
  async function every(fn, options = undefined) {
54847
54961
  if (typeof fn !== "function")
54848
54962
  throw new ERR_INVALID_ARG_TYPE3("fn", ["Function", "AsyncFunction"], fn);
54849
- return !await some.call(this, async (...args) => {
54850
- return !await fn(...args);
54963
+ return !await some.call(this, async (...args2) => {
54964
+ return !await fn(...args2);
54851
54965
  }, options);
54852
54966
  }
54853
54967
  async function find(fn, options) {
@@ -55015,18 +55129,18 @@ var require_stream5 = __commonJS3((exports, module) => {
55015
55129
  Stream.isWritable = utils2.isWritable;
55016
55130
  Stream.Readable = require_readable();
55017
55131
  for (let key of ObjectKeys(streamReturningOperators)) {
55018
- let fn = function(...args) {
55132
+ let fn = function(...args2) {
55019
55133
  if (new.target)
55020
55134
  throw ERR_ILLEGAL_CONSTRUCTOR();
55021
- return Stream.Readable.from(ReflectApply(op, this, args));
55135
+ return Stream.Readable.from(ReflectApply(op, this, args2));
55022
55136
  }, op = streamReturningOperators[key];
55023
55137
  ObjectDefineProperty2(fn, "name", { __proto__: null, value: op.name }), ObjectDefineProperty2(fn, "length", { __proto__: null, value: op.length }), ObjectDefineProperty2(Stream.Readable.prototype, key, { __proto__: null, value: fn, enumerable: false, configurable: true, writable: true });
55024
55138
  }
55025
55139
  for (let key of ObjectKeys(promiseReturningOperators)) {
55026
- let fn = function(...args) {
55140
+ let fn = function(...args2) {
55027
55141
  if (new.target)
55028
55142
  throw ERR_ILLEGAL_CONSTRUCTOR();
55029
- return ReflectApply(op, this, args);
55143
+ return ReflectApply(op, this, args2);
55030
55144
  }, op = promiseReturningOperators[key];
55031
55145
  ObjectDefineProperty2(fn, "name", { __proto__: null, value: op.name }), ObjectDefineProperty2(fn, "length", { __proto__: null, value: op.length }), ObjectDefineProperty2(Stream.Readable.prototype, key, { __proto__: null, value: fn, enumerable: false, configurable: true, writable: true });
55032
55146
  }
@@ -55573,15 +55687,15 @@ var init_crypto = __esm2(() => {
55573
55687
  var target = this;
55574
55688
  if (typeof target !== "function" || toStr.apply(target) !== funcType)
55575
55689
  throw TypeError(ERROR_MESSAGE + target);
55576
- var args = slicy(arguments, 1), bound, binder = function() {
55690
+ var args2 = slicy(arguments, 1), bound, binder = function() {
55577
55691
  if (this instanceof bound) {
55578
- var result = target.apply(this, concatty(args, arguments));
55692
+ var result = target.apply(this, concatty(args2, arguments));
55579
55693
  if (Object(result) === result)
55580
55694
  return result;
55581
55695
  return this;
55582
55696
  }
55583
- return target.apply(that, concatty(args, arguments));
55584
- }, boundLength = max(0, target.length - args.length), boundArgs = [];
55697
+ return target.apply(that, concatty(args2, arguments));
55698
+ }, boundLength = max(0, target.length - args2.length), boundArgs = [];
55585
55699
  for (var i2 = 0;i2 < boundLength; i2++)
55586
55700
  boundArgs[i2] = "$" + i2;
55587
55701
  if (bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder), target.prototype) {
@@ -55610,10 +55724,10 @@ var init_crypto = __esm2(() => {
55610
55724
  });
55611
55725
  require_call_bind_apply_helpers = __commonJS22((exports, module) => {
55612
55726
  var bind = require_function_bind(), $TypeError = require_type(), $call = require_functionCall(), $actualApply = require_actualApply();
55613
- module.exports = function(args) {
55614
- if (args.length < 1 || typeof args[0] !== "function")
55727
+ module.exports = function(args2) {
55728
+ if (args2.length < 1 || typeof args2[0] !== "function")
55615
55729
  throw new $TypeError("a function is required");
55616
- return $actualApply(bind, $call, args);
55730
+ return $actualApply(bind, $call, args2);
55617
55731
  };
55618
55732
  });
55619
55733
  require_get = __commonJS22((exports, module) => {
@@ -62874,8 +62988,8 @@ var init_crypto = __esm2(() => {
62874
62988
  return result;
62875
62989
  return { result: this.isError(result) ? null : result, errors: state.errors };
62876
62990
  };
62877
- function ReporterError(path12, msg) {
62878
- this.path = path12, this.rethrow(msg);
62991
+ function ReporterError(path14, msg) {
62992
+ this.path = path14, this.rethrow(msg);
62879
62993
  }
62880
62994
  inherits2(ReporterError, Error);
62881
62995
  ReporterError.prototype.rethrow = function(msg) {
@@ -63000,18 +63114,18 @@ var init_crypto = __esm2(() => {
63000
63114
  return child._baseState.parent === this;
63001
63115
  }, this), assert.equal(state.children.length, 1, "Root node can have only one child");
63002
63116
  };
63003
- Node.prototype._useArgs = function(args) {
63004
- var state = this._baseState, children = args.filter(function(arg) {
63117
+ Node.prototype._useArgs = function(args2) {
63118
+ var state = this._baseState, children = args2.filter(function(arg) {
63005
63119
  return arg instanceof this.constructor;
63006
63120
  }, this);
63007
- if (args = args.filter(function(arg) {
63121
+ if (args2 = args2.filter(function(arg) {
63008
63122
  return !(arg instanceof this.constructor);
63009
63123
  }, this), children.length !== 0)
63010
63124
  assert(state.children === null), state.children = children, children.forEach(function(child) {
63011
63125
  child._baseState.parent = this;
63012
63126
  }, this);
63013
- if (args.length !== 0)
63014
- assert(state.args === null), state.args = args, state.reverseArgs = args.map(function(arg) {
63127
+ if (args2.length !== 0)
63128
+ assert(state.args === null), state.args = args2, state.reverseArgs = args2.map(function(arg) {
63015
63129
  if (typeof arg !== "object" || arg.constructor !== Object)
63016
63130
  return arg;
63017
63131
  var res = {};
@@ -63031,8 +63145,8 @@ var init_crypto = __esm2(() => {
63031
63145
  });
63032
63146
  tags.forEach(function(tag) {
63033
63147
  Node.prototype[tag] = function() {
63034
- var state = this._baseState, args = Array.prototype.slice.call(arguments);
63035
- return assert(state.tag === null), state.tag = tag, this._useArgs(args), this;
63148
+ var state = this._baseState, args2 = Array.prototype.slice.call(arguments);
63149
+ return assert(state.tag === null), state.tag = tag, this._useArgs(args2), this;
63036
63150
  };
63037
63151
  });
63038
63152
  Node.prototype.use = function(item) {
@@ -63057,9 +63171,9 @@ var init_crypto = __esm2(() => {
63057
63171
  return assert(state.explicit === null && state.implicit === null), state.implicit = num, this;
63058
63172
  };
63059
63173
  Node.prototype.obj = function() {
63060
- var state = this._baseState, args = Array.prototype.slice.call(arguments);
63061
- if (state.obj = true, args.length !== 0)
63062
- this._useArgs(args);
63174
+ var state = this._baseState, args2 = Array.prototype.slice.call(arguments);
63175
+ if (state.obj = true, args2.length !== 0)
63176
+ this._useArgs(args2);
63063
63177
  return this;
63064
63178
  };
63065
63179
  Node.prototype.key = function(newKey) {
@@ -68962,6 +69076,63 @@ var runAiCommand = new Command("ai").description("AI 对话助手").option("-t,
68962
69076
  });
68963
69077
  program.addCommand(runAiCommand);
68964
69078
 
69079
+ // src/command/plugins/install.ts
69080
+ function parsePluginName(name) {
69081
+ if (name.startsWith("@") && name.includes("/")) {
69082
+ const parts = name.split("/");
69083
+ if (parts.length >= 3) {
69084
+ return {
69085
+ pkgName: parts.slice(0, 2).join("/"),
69086
+ configName: name
69087
+ };
69088
+ }
69089
+ }
69090
+ return { pkgName: name, configName: name };
69091
+ }
69092
+ var pluginCommand = new Command("plugin");
69093
+ var installCommand = new Command("install").alias("i").argument("<plugin-name>").description("安装Routes插件").action(async (name, options) => {
69094
+ const { pkgName, configName } = parsePluginName(name);
69095
+ const m = parseHomeArg(HomeConfigDir);
69096
+ const cwd = m.isDev ? process.cwd() : m.configDir;
69097
+ const shellCommand = `pnpm i ${pkgName} -w`;
69098
+ const result = execCommand(shellCommand, { cwd });
69099
+ if (result.status === 0) {
69100
+ const mount = assistantConfig2.checkMounted();
69101
+ const config3 = assistantConfig2.getConfig();
69102
+ const routes = config3.routes || [];
69103
+ if (!routes.includes(configName)) {
69104
+ routes.push(configName);
69105
+ config3.routes = routes;
69106
+ assistantConfig2.setConfig(config3);
69107
+ console.log(`插件 ${configName} 安装成功并已添加到配置中。`);
69108
+ } else {
69109
+ console.log(`插件 ${configName} 已存在于配置中。`);
69110
+ }
69111
+ }
69112
+ });
69113
+ var uninstallCommand = new Command("remove").alias("r").argument("<plugin-name>").description("卸载Routes插件").action(async (name, options) => {
69114
+ const { pkgName, configName } = parsePluginName(name);
69115
+ const m = parseHomeArg(HomeConfigDir);
69116
+ const cwd = m.isDev ? process.cwd() : m.configDir;
69117
+ const shellCommand = `pnpm remove ${pkgName} -w`;
69118
+ const result = execCommand(shellCommand, { cwd });
69119
+ assistantConfig2.checkMounted();
69120
+ const config3 = assistantConfig2.getConfig();
69121
+ let routes = config3.routes || [];
69122
+ const index = routes.findIndex((r) => r === configName);
69123
+ if (index !== -1) {
69124
+ routes.splice(index, 1);
69125
+ config3.routes = routes;
69126
+ assistantConfig2.setConfig(config3);
69127
+ console.log(`插件 ${configName} 卸载成功并已从配置中移除。`);
69128
+ } else {
69129
+ console.log(`插件 ${configName} 不存在于配置中。`);
69130
+ }
69131
+ });
69132
+ pluginCommand.addCommand(uninstallCommand);
69133
+ pluginCommand.addCommand(installCommand);
69134
+ program.addCommand(pluginCommand);
69135
+
68965
69136
  // src/index.ts
68966
69137
  var runParser = async (argv) => {
68967
69138
  try {