@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.
@@ -662,12 +662,12 @@ var require_depd = __commonJS((exports, module) => {
662
662
  if (typeof fn !== "function") {
663
663
  throw new TypeError("argument fn must be a function");
664
664
  }
665
- var args = createArgumentsString(fn.length);
665
+ var args2 = createArgumentsString(fn.length);
666
666
  var stack = getStack();
667
667
  var site = callSiteLocation(stack[1]);
668
668
  site.name = fn.name;
669
669
  var deprecatedfn = new Function("fn", "log", "deprecate", "message", "site", `"use strict"
670
- ` + "return function (" + args + ") {" + `log.call(deprecate, message, site)
670
+ ` + "return function (" + args2 + ") {" + `log.call(deprecate, message, site)
671
671
  ` + `return fn.apply(this, arguments)
672
672
  ` + "}")(fn, log, this, message, site);
673
673
  return deprecatedfn;
@@ -1272,7 +1272,7 @@ var require_common = __commonJS((exports, module) => {
1272
1272
  let enableOverride = null;
1273
1273
  let namespacesCache;
1274
1274
  let enabledCache;
1275
- function debug(...args) {
1275
+ function debug(...args2) {
1276
1276
  if (!debug.enabled) {
1277
1277
  return;
1278
1278
  }
@@ -1283,28 +1283,28 @@ var require_common = __commonJS((exports, module) => {
1283
1283
  self2.prev = prevTime;
1284
1284
  self2.curr = curr;
1285
1285
  prevTime = curr;
1286
- args[0] = createDebug.coerce(args[0]);
1287
- if (typeof args[0] !== "string") {
1288
- args.unshift("%O");
1286
+ args2[0] = createDebug.coerce(args2[0]);
1287
+ if (typeof args2[0] !== "string") {
1288
+ args2.unshift("%O");
1289
1289
  }
1290
1290
  let index2 = 0;
1291
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
1291
+ args2[0] = args2[0].replace(/%([a-zA-Z%])/g, (match, format) => {
1292
1292
  if (match === "%%") {
1293
1293
  return "%";
1294
1294
  }
1295
1295
  index2++;
1296
1296
  const formatter = createDebug.formatters[format];
1297
1297
  if (typeof formatter === "function") {
1298
- const val = args[index2];
1298
+ const val = args2[index2];
1299
1299
  match = formatter.call(self2, val);
1300
- args.splice(index2, 1);
1300
+ args2.splice(index2, 1);
1301
1301
  index2--;
1302
1302
  }
1303
1303
  return match;
1304
1304
  });
1305
- createDebug.formatArgs.call(self2, args);
1305
+ createDebug.formatArgs.call(self2, args2);
1306
1306
  const logFn = self2.log || createDebug.log;
1307
- logFn.apply(self2, args);
1307
+ logFn.apply(self2, args2);
1308
1308
  }
1309
1309
  debug.namespace = namespace;
1310
1310
  debug.useColors = createDebug.useColors();
@@ -1520,16 +1520,16 @@ var require_browser = __commonJS((exports, module) => {
1520
1520
  let m;
1521
1521
  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+)/);
1522
1522
  }
1523
- function formatArgs(args) {
1524
- args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
1523
+ function formatArgs(args2) {
1524
+ args2[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args2[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
1525
1525
  if (!this.useColors) {
1526
1526
  return;
1527
1527
  }
1528
1528
  const c = "color: " + this.color;
1529
- args.splice(1, 0, c, "color: inherit");
1529
+ args2.splice(1, 0, c, "color: inherit");
1530
1530
  let index2 = 0;
1531
1531
  let lastC = 0;
1532
- args[0].replace(/%[a-zA-Z%]/g, (match) => {
1532
+ args2[0].replace(/%[a-zA-Z%]/g, (match) => {
1533
1533
  if (match === "%%") {
1534
1534
  return;
1535
1535
  }
@@ -1538,7 +1538,7 @@ var require_browser = __commonJS((exports, module) => {
1538
1538
  lastC = index2;
1539
1539
  }
1540
1540
  });
1541
- args.splice(lastC, 0, c);
1541
+ args2.splice(lastC, 0, c);
1542
1542
  }
1543
1543
  exports.log = console.debug || console.log || (() => {});
1544
1544
  function save(namespaces) {
@@ -1840,18 +1840,18 @@ var require_node = __commonJS((exports, module) => {
1840
1840
  function useColors() {
1841
1841
  return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
1842
1842
  }
1843
- function formatArgs(args) {
1843
+ function formatArgs(args2) {
1844
1844
  const { namespace: name, useColors: useColors2 } = this;
1845
1845
  if (useColors2) {
1846
1846
  const c = this.color;
1847
1847
  const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
1848
1848
  const prefix = ` ${colorCode};1m${name} \x1B[0m`;
1849
- args[0] = prefix + args[0].split(`
1849
+ args2[0] = prefix + args2[0].split(`
1850
1850
  `).join(`
1851
1851
  ` + prefix);
1852
- args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
1852
+ args2.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
1853
1853
  } else {
1854
- args[0] = getDate() + name + " " + args[0];
1854
+ args2[0] = getDate() + name + " " + args2[0];
1855
1855
  }
1856
1856
  }
1857
1857
  function getDate() {
@@ -1860,8 +1860,8 @@ var require_node = __commonJS((exports, module) => {
1860
1860
  }
1861
1861
  return new Date().toISOString() + " ";
1862
1862
  }
1863
- function log(...args) {
1864
- return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + `
1863
+ function log(...args2) {
1864
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args2) + `
1865
1865
  `);
1866
1866
  }
1867
1867
  function save(namespaces) {
@@ -11533,11 +11533,11 @@ var require_mime_types = __commonJS((exports) => {
11533
11533
  }
11534
11534
  return exts[0];
11535
11535
  }
11536
- function lookup(path2) {
11537
- if (!path2 || typeof path2 !== "string") {
11536
+ function lookup(path3) {
11537
+ if (!path3 || typeof path3 !== "string") {
11538
11538
  return false;
11539
11539
  }
11540
- var extension3 = extname("x." + path2).toLowerCase().slice(1);
11540
+ var extension3 = extname("x." + path3).toLowerCase().slice(1);
11541
11541
  if (!extension3) {
11542
11542
  return false;
11543
11543
  }
@@ -11624,13 +11624,13 @@ var require_ee_first = __commonJS((exports, module) => {
11624
11624
  }
11625
11625
  function listener(event, done) {
11626
11626
  return function onevent(arg1) {
11627
- var args = new Array(arguments.length);
11627
+ var args2 = new Array(arguments.length);
11628
11628
  var ee = this;
11629
11629
  var err = event === "error" ? arg1 : null;
11630
- for (var i = 0;i < args.length; i++) {
11631
- args[i] = arguments[i];
11630
+ for (var i = 0;i < args2.length; i++) {
11631
+ args2[i] = arguments[i];
11632
11632
  }
11633
- done(err, ee, event, args);
11633
+ done(err, ee, event, args2);
11634
11634
  };
11635
11635
  }
11636
11636
  });
@@ -11850,27 +11850,27 @@ var require_send = __commonJS((exports, module) => {
11850
11850
  var ms2 = require_ms();
11851
11851
  var onFinished = require_on_finished();
11852
11852
  var parseRange = require_range_parser();
11853
- var path2 = __require("path");
11853
+ var path3 = __require("path");
11854
11854
  var statuses = require_statuses();
11855
11855
  var Stream = __require("stream");
11856
11856
  var util = __require("util");
11857
- var extname = path2.extname;
11858
- var join = path2.join;
11859
- var normalize = path2.normalize;
11860
- var resolve = path2.resolve;
11861
- var sep = path2.sep;
11857
+ var extname = path3.extname;
11858
+ var join = path3.join;
11859
+ var normalize = path3.normalize;
11860
+ var resolve = path3.resolve;
11861
+ var sep = path3.sep;
11862
11862
  var BYTES_RANGE_REGEXP = /^ *bytes=/;
11863
11863
  var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1000;
11864
11864
  var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/;
11865
11865
  module.exports = send;
11866
- function send(req, path3, options) {
11867
- return new SendStream(req, path3, options);
11866
+ function send(req, path4, options) {
11867
+ return new SendStream(req, path4, options);
11868
11868
  }
11869
- function SendStream(req, path3, options) {
11869
+ function SendStream(req, path4, options) {
11870
11870
  Stream.call(this);
11871
11871
  var opts = options || {};
11872
11872
  this.options = opts;
11873
- this.path = path3;
11873
+ this.path = path4;
11874
11874
  this.req = req;
11875
11875
  this._acceptRanges = opts.acceptRanges !== undefined ? Boolean(opts.acceptRanges) : true;
11876
11876
  this._cacheControl = opts.cacheControl !== undefined ? Boolean(opts.cacheControl) : true;
@@ -11984,10 +11984,10 @@ var require_send = __commonJS((exports, module) => {
11984
11984
  var lastModified = this.res.getHeader("Last-Modified");
11985
11985
  return parseHttpDate(lastModified) <= parseHttpDate(ifRange);
11986
11986
  };
11987
- SendStream.prototype.redirect = function redirect(path3) {
11987
+ SendStream.prototype.redirect = function redirect(path4) {
11988
11988
  var res = this.res;
11989
11989
  if (hasListeners(this, "directory")) {
11990
- this.emit("directory", res, path3);
11990
+ this.emit("directory", res, path4);
11991
11991
  return;
11992
11992
  }
11993
11993
  if (this.hasTrailingSlash()) {
@@ -12007,38 +12007,38 @@ var require_send = __commonJS((exports, module) => {
12007
12007
  SendStream.prototype.pipe = function pipe2(res) {
12008
12008
  var root = this._root;
12009
12009
  this.res = res;
12010
- var path3 = decode2(this.path);
12011
- if (path3 === -1) {
12010
+ var path4 = decode2(this.path);
12011
+ if (path4 === -1) {
12012
12012
  this.error(400);
12013
12013
  return res;
12014
12014
  }
12015
- if (~path3.indexOf("\x00")) {
12015
+ if (~path4.indexOf("\x00")) {
12016
12016
  this.error(400);
12017
12017
  return res;
12018
12018
  }
12019
12019
  var parts;
12020
12020
  if (root !== null) {
12021
- if (path3) {
12022
- path3 = normalize("." + sep + path3);
12021
+ if (path4) {
12022
+ path4 = normalize("." + sep + path4);
12023
12023
  }
12024
- if (UP_PATH_REGEXP.test(path3)) {
12025
- debug('malicious path "%s"', path3);
12024
+ if (UP_PATH_REGEXP.test(path4)) {
12025
+ debug('malicious path "%s"', path4);
12026
12026
  this.error(403);
12027
12027
  return res;
12028
12028
  }
12029
- parts = path3.split(sep);
12030
- path3 = normalize(join(root, path3));
12029
+ parts = path4.split(sep);
12030
+ path4 = normalize(join(root, path4));
12031
12031
  } else {
12032
- if (UP_PATH_REGEXP.test(path3)) {
12033
- debug('malicious path "%s"', path3);
12032
+ if (UP_PATH_REGEXP.test(path4)) {
12033
+ debug('malicious path "%s"', path4);
12034
12034
  this.error(403);
12035
12035
  return res;
12036
12036
  }
12037
- parts = normalize(path3).split(sep);
12038
- path3 = resolve(path3);
12037
+ parts = normalize(path4).split(sep);
12038
+ path4 = resolve(path4);
12039
12039
  }
12040
12040
  if (containsDotFile(parts)) {
12041
- debug('%s dotfile "%s"', this._dotfiles, path3);
12041
+ debug('%s dotfile "%s"', this._dotfiles, path4);
12042
12042
  switch (this._dotfiles) {
12043
12043
  case "allow":
12044
12044
  break;
@@ -12052,13 +12052,13 @@ var require_send = __commonJS((exports, module) => {
12052
12052
  }
12053
12053
  }
12054
12054
  if (this._index.length && this.hasTrailingSlash()) {
12055
- this.sendIndex(path3);
12055
+ this.sendIndex(path4);
12056
12056
  return res;
12057
12057
  }
12058
- this.sendFile(path3);
12058
+ this.sendFile(path4);
12059
12059
  return res;
12060
12060
  };
12061
- SendStream.prototype.send = function send2(path3, stat) {
12061
+ SendStream.prototype.send = function send2(path4, stat) {
12062
12062
  var len = stat.size;
12063
12063
  var options = this.options;
12064
12064
  var opts = {};
@@ -12070,9 +12070,9 @@ var require_send = __commonJS((exports, module) => {
12070
12070
  this.headersAlreadySent();
12071
12071
  return;
12072
12072
  }
12073
- debug('pipe "%s"', path3);
12074
- this.setHeader(path3, stat);
12075
- this.type(path3);
12073
+ debug('pipe "%s"', path4);
12074
+ this.setHeader(path4, stat);
12075
+ this.type(path4);
12076
12076
  if (this.isConditionalGET()) {
12077
12077
  if (this.isPreconditionFailure()) {
12078
12078
  this.error(412);
@@ -12122,31 +12122,31 @@ var require_send = __commonJS((exports, module) => {
12122
12122
  res.end();
12123
12123
  return;
12124
12124
  }
12125
- this.stream(path3, opts);
12125
+ this.stream(path4, opts);
12126
12126
  };
12127
- SendStream.prototype.sendFile = function sendFile(path3) {
12127
+ SendStream.prototype.sendFile = function sendFile(path4) {
12128
12128
  var i = 0;
12129
12129
  var self2 = this;
12130
- debug('stat "%s"', path3);
12131
- fs3.stat(path3, function onstat(err, stat) {
12132
- var pathEndsWithSep = path3[path3.length - 1] === sep;
12133
- if (err && err.code === "ENOENT" && !extname(path3) && !pathEndsWithSep) {
12130
+ debug('stat "%s"', path4);
12131
+ fs3.stat(path4, function onstat(err, stat) {
12132
+ var pathEndsWithSep = path4[path4.length - 1] === sep;
12133
+ if (err && err.code === "ENOENT" && !extname(path4) && !pathEndsWithSep) {
12134
12134
  return next(err);
12135
12135
  }
12136
12136
  if (err)
12137
12137
  return self2.onStatError(err);
12138
12138
  if (stat.isDirectory())
12139
- return self2.redirect(path3);
12139
+ return self2.redirect(path4);
12140
12140
  if (pathEndsWithSep)
12141
12141
  return self2.error(404);
12142
- self2.emit("file", path3, stat);
12143
- self2.send(path3, stat);
12142
+ self2.emit("file", path4, stat);
12143
+ self2.send(path4, stat);
12144
12144
  });
12145
12145
  function next(err) {
12146
12146
  if (self2._extensions.length <= i) {
12147
12147
  return err ? self2.onStatError(err) : self2.error(404);
12148
12148
  }
12149
- var p = path3 + "." + self2._extensions[i++];
12149
+ var p = path4 + "." + self2._extensions[i++];
12150
12150
  debug('stat "%s"', p);
12151
12151
  fs3.stat(p, function(err2, stat) {
12152
12152
  if (err2)
@@ -12158,7 +12158,7 @@ var require_send = __commonJS((exports, module) => {
12158
12158
  });
12159
12159
  }
12160
12160
  };
12161
- SendStream.prototype.sendIndex = function sendIndex(path3) {
12161
+ SendStream.prototype.sendIndex = function sendIndex(path4) {
12162
12162
  var i = -1;
12163
12163
  var self2 = this;
12164
12164
  function next(err) {
@@ -12167,7 +12167,7 @@ var require_send = __commonJS((exports, module) => {
12167
12167
  return self2.onStatError(err);
12168
12168
  return self2.error(404);
12169
12169
  }
12170
- var p = join(path3, self2._index[i]);
12170
+ var p = join(path4, self2._index[i]);
12171
12171
  debug('stat "%s"', p);
12172
12172
  fs3.stat(p, function(err2, stat) {
12173
12173
  if (err2)
@@ -12180,10 +12180,10 @@ var require_send = __commonJS((exports, module) => {
12180
12180
  }
12181
12181
  next();
12182
12182
  };
12183
- SendStream.prototype.stream = function stream2(path3, options) {
12183
+ SendStream.prototype.stream = function stream2(path4, options) {
12184
12184
  var self2 = this;
12185
12185
  var res = this.res;
12186
- var stream3 = fs3.createReadStream(path3, options);
12186
+ var stream3 = fs3.createReadStream(path4, options);
12187
12187
  this.emit("stream", stream3);
12188
12188
  stream3.pipe(res);
12189
12189
  function cleanup() {
@@ -12198,18 +12198,18 @@ var require_send = __commonJS((exports, module) => {
12198
12198
  self2.emit("end");
12199
12199
  });
12200
12200
  };
12201
- SendStream.prototype.type = function type(path3) {
12201
+ SendStream.prototype.type = function type(path4) {
12202
12202
  var res = this.res;
12203
12203
  if (res.getHeader("Content-Type"))
12204
12204
  return;
12205
- var ext = extname(path3);
12205
+ var ext = extname(path4);
12206
12206
  var type2 = mime.contentType(ext) || "application/octet-stream";
12207
12207
  debug("content-type %s", type2);
12208
12208
  res.setHeader("Content-Type", type2);
12209
12209
  };
12210
- SendStream.prototype.setHeader = function setHeader(path3, stat) {
12210
+ SendStream.prototype.setHeader = function setHeader(path4, stat) {
12211
12211
  var res = this.res;
12212
- this.emit("headers", res, path3, stat);
12212
+ this.emit("headers", res, path4, stat);
12213
12213
  if (this._acceptRanges && !res.getHeader("Accept-Ranges")) {
12214
12214
  debug("accept ranges");
12215
12215
  res.setHeader("Accept-Ranges", "bytes");
@@ -12277,9 +12277,9 @@ var require_send = __commonJS((exports, module) => {
12277
12277
  }
12278
12278
  return err instanceof Error ? createError(status, err, { expose: false }) : createError(status, err);
12279
12279
  }
12280
- function decode2(path3) {
12280
+ function decode2(path4) {
12281
12281
  try {
12282
- return decodeURIComponent(path3);
12282
+ return decodeURIComponent(path4);
12283
12283
  } catch (err) {
12284
12284
  return -1;
12285
12285
  }
@@ -12399,7 +12399,7 @@ var require_path = __commonJS((exports) => {
12399
12399
  Object.defineProperty(exports, "__esModule", { value: true });
12400
12400
  exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = undefined;
12401
12401
  var os2 = __require("os");
12402
- var path5 = __require("path");
12402
+ var path6 = __require("path");
12403
12403
  var IS_WINDOWS_PLATFORM = os2.platform() === "win32";
12404
12404
  var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
12405
12405
  var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
@@ -12411,7 +12411,7 @@ var require_path = __commonJS((exports) => {
12411
12411
  }
12412
12412
  exports.unixify = unixify;
12413
12413
  function makeAbsolute(cwd, filepath) {
12414
- return path5.resolve(cwd, filepath);
12414
+ return path6.resolve(cwd, filepath);
12415
12415
  }
12416
12416
  exports.makeAbsolute = makeAbsolute;
12417
12417
  function removeLeadingDotSegment(entry2) {
@@ -12694,7 +12694,7 @@ var require_utils = __commonJS((exports) => {
12694
12694
  node.type = "text";
12695
12695
  return acc;
12696
12696
  }, []);
12697
- exports.flatten = (...args) => {
12697
+ exports.flatten = (...args2) => {
12698
12698
  const result = [];
12699
12699
  const flat = (arr) => {
12700
12700
  for (let i = 0;i < arr.length; i++) {
@@ -12709,7 +12709,7 @@ var require_utils = __commonJS((exports) => {
12709
12709
  }
12710
12710
  return result;
12711
12711
  };
12712
- flat(args);
12712
+ flat(args2);
12713
12713
  return result;
12714
12714
  };
12715
12715
  });
@@ -13074,8 +13074,8 @@ var require_fill_range = __commonJS((exports, module) => {
13074
13074
  }
13075
13075
  return toRegexRange(start3, end, options);
13076
13076
  };
13077
- var rangeError = (...args) => {
13078
- return new RangeError("Invalid range arguments: " + util.inspect(...args));
13077
+ var rangeError = (...args2) => {
13078
+ return new RangeError("Invalid range arguments: " + util.inspect(...args2));
13079
13079
  };
13080
13080
  var invalidRange = (start3, end, options) => {
13081
13081
  if (options.strictRanges === true)
@@ -13216,10 +13216,10 @@ var require_compile = __commonJS((exports, module) => {
13216
13216
  return node.value;
13217
13217
  }
13218
13218
  if (node.nodes && node.ranges > 0) {
13219
- const args = utils2.reduce(node.nodes);
13220
- const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true });
13219
+ const args2 = utils2.reduce(node.nodes);
13220
+ const range = fill(...args2, { ...options, wrap: false, toRegex: true, strictZeros: true });
13221
13221
  if (range.length !== 0) {
13222
- return args.length > 1 && range.length > 1 ? `(${range})` : range;
13222
+ return args2.length > 1 && range.length > 1 ? `(${range})` : range;
13223
13223
  }
13224
13224
  }
13225
13225
  if (node.nodes) {
@@ -13282,11 +13282,11 @@ var require_expand = __commonJS((exports, module) => {
13282
13282
  return;
13283
13283
  }
13284
13284
  if (node.nodes && node.ranges > 0) {
13285
- const args = utils2.reduce(node.nodes);
13286
- if (utils2.exceedsLimit(...args, options.step, rangeLimit)) {
13285
+ const args2 = utils2.reduce(node.nodes);
13286
+ if (utils2.exceedsLimit(...args2, options.step, rangeLimit)) {
13287
13287
  throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
13288
13288
  }
13289
- let range = fill(...args, options);
13289
+ let range = fill(...args2, options);
13290
13290
  if (range.length === 0) {
13291
13291
  range = stringify2(node, options);
13292
13292
  }
@@ -13669,7 +13669,7 @@ var require_braces = __commonJS((exports, module) => {
13669
13669
 
13670
13670
  // ../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js
13671
13671
  var require_constants2 = __commonJS((exports, module) => {
13672
- var path5 = __require("path");
13672
+ var path6 = __require("path");
13673
13673
  var WIN_SLASH = "\\\\/";
13674
13674
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
13675
13675
  var DOT_LITERAL = "\\.";
@@ -13791,7 +13791,7 @@ var require_constants2 = __commonJS((exports, module) => {
13791
13791
  CHAR_UNDERSCORE: 95,
13792
13792
  CHAR_VERTICAL_LINE: 124,
13793
13793
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
13794
- SEP: path5.sep,
13794
+ SEP: path6.sep,
13795
13795
  extglobChars(chars) {
13796
13796
  return {
13797
13797
  "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` },
@@ -13809,7 +13809,7 @@ var require_constants2 = __commonJS((exports, module) => {
13809
13809
 
13810
13810
  // ../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js
13811
13811
  var require_utils2 = __commonJS((exports) => {
13812
- var path5 = __require("path");
13812
+ var path6 = __require("path");
13813
13813
  var win32 = process.platform === "win32";
13814
13814
  var {
13815
13815
  REGEX_BACKSLASH,
@@ -13838,7 +13838,7 @@ var require_utils2 = __commonJS((exports) => {
13838
13838
  if (options && typeof options.windows === "boolean") {
13839
13839
  return options.windows;
13840
13840
  }
13841
- return win32 === true || path5.sep === "\\";
13841
+ return win32 === true || path6.sep === "\\";
13842
13842
  };
13843
13843
  exports.escapeLast = (input, char, lastIdx) => {
13844
13844
  const idx = input.lastIndexOf(char, lastIdx);
@@ -14193,16 +14193,16 @@ var require_parse2 = __commonJS((exports, module) => {
14193
14193
  REGEX_SPECIAL_CHARS_BACKREF,
14194
14194
  REPLACEMENTS
14195
14195
  } = constants3;
14196
- var expandRange = (args, options) => {
14196
+ var expandRange = (args2, options) => {
14197
14197
  if (typeof options.expandRange === "function") {
14198
- return options.expandRange(...args, options);
14198
+ return options.expandRange(...args2, options);
14199
14199
  }
14200
- args.sort();
14201
- const value = `[${args.join("-")}]`;
14200
+ args2.sort();
14201
+ const value = `[${args2.join("-")}]`;
14202
14202
  try {
14203
14203
  new RegExp(value);
14204
14204
  } catch (ex) {
14205
- return args.map((v) => utils2.escapeRegex(v)).join("..");
14205
+ return args2.map((v) => utils2.escapeRegex(v)).join("..");
14206
14206
  }
14207
14207
  return value;
14208
14208
  };
@@ -14962,7 +14962,7 @@ var require_parse2 = __commonJS((exports, module) => {
14962
14962
 
14963
14963
  // ../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js
14964
14964
  var require_picomatch = __commonJS((exports, module) => {
14965
- var path5 = __require("path");
14965
+ var path6 = __require("path");
14966
14966
  var scan = require_scan();
14967
14967
  var parse2 = require_parse2();
14968
14968
  var utils2 = require_utils2();
@@ -15048,7 +15048,7 @@ var require_picomatch = __commonJS((exports, module) => {
15048
15048
  };
15049
15049
  picomatch2.matchBase = (input, glob2, options, posix = utils2.isWindows(options)) => {
15050
15050
  const regex = glob2 instanceof RegExp ? glob2 : picomatch2.makeRe(glob2, options);
15051
- return regex.test(path5.basename(input));
15051
+ return regex.test(path6.basename(input));
15052
15052
  };
15053
15053
  picomatch2.isMatch = (str, patterns, options) => picomatch2(patterns, options)(str);
15054
15054
  picomatch2.parse = (pattern2, options) => {
@@ -15237,8 +15237,8 @@ var require_micromatch = __commonJS((exports, module) => {
15237
15237
  return match.slice(1).map((v) => v === undefined ? "" : v);
15238
15238
  }
15239
15239
  };
15240
- micromatch.makeRe = (...args) => picomatch2.makeRe(...args);
15241
- micromatch.scan = (...args) => picomatch2.scan(...args);
15240
+ micromatch.makeRe = (...args2) => picomatch2.makeRe(...args2);
15241
+ micromatch.scan = (...args2) => picomatch2.scan(...args2);
15242
15242
  micromatch.parse = (patterns, options) => {
15243
15243
  let res = [];
15244
15244
  for (let pattern2 of [].concat(patterns || [])) {
@@ -15269,7 +15269,7 @@ var require_micromatch = __commonJS((exports, module) => {
15269
15269
  var require_pattern = __commonJS((exports) => {
15270
15270
  Object.defineProperty(exports, "__esModule", { value: true });
15271
15271
  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;
15272
- var path5 = __require("path");
15272
+ var path6 = __require("path");
15273
15273
  var globParent2 = require_glob_parent();
15274
15274
  var micromatch = require_micromatch();
15275
15275
  var GLOBSTAR = "**";
@@ -15364,7 +15364,7 @@ var require_pattern = __commonJS((exports) => {
15364
15364
  }
15365
15365
  exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
15366
15366
  function isAffectDepthOfReadingPattern(pattern2) {
15367
- const basename = path5.basename(pattern2);
15367
+ const basename = path6.basename(pattern2);
15368
15368
  return endsWithSlashGlobStar(pattern2) || isStaticPattern(basename);
15369
15369
  }
15370
15370
  exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
@@ -15422,7 +15422,7 @@ var require_pattern = __commonJS((exports) => {
15422
15422
  }
15423
15423
  exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
15424
15424
  function isAbsolute(pattern2) {
15425
- return path5.isAbsolute(pattern2);
15425
+ return path6.isAbsolute(pattern2);
15426
15426
  }
15427
15427
  exports.isAbsolute = isAbsolute;
15428
15428
  });
@@ -15435,11 +15435,11 @@ var require_merge2 = __commonJS((exports, module) => {
15435
15435
  module.exports = merge22;
15436
15436
  function merge22() {
15437
15437
  const streamsQueue = [];
15438
- const args = slice.call(arguments);
15438
+ const args2 = slice.call(arguments);
15439
15439
  let merging = false;
15440
- let options = args[args.length - 1];
15440
+ let options = args2[args2.length - 1];
15441
15441
  if (options && !Array.isArray(options) && options.pipe == null) {
15442
- args.pop();
15442
+ args2.pop();
15443
15443
  } else {
15444
15444
  options = {};
15445
15445
  }
@@ -15520,8 +15520,8 @@ var require_merge2 = __commonJS((exports, module) => {
15520
15520
  mergedStream.on("unpipe", function(stream3) {
15521
15521
  stream3.emit("merge2UnpipeEnd");
15522
15522
  });
15523
- if (args.length) {
15524
- addStream.apply(null, args);
15523
+ if (args2.length) {
15524
+ addStream.apply(null, args2);
15525
15525
  }
15526
15526
  return mergedStream;
15527
15527
  }
@@ -15587,8 +15587,8 @@ var require_utils3 = __commonJS((exports) => {
15587
15587
  exports.errno = errno2;
15588
15588
  var fs6 = require_fs();
15589
15589
  exports.fs = fs6;
15590
- var path5 = require_path();
15591
- exports.path = path5;
15590
+ var path6 = require_path();
15591
+ exports.path = path6;
15592
15592
  var pattern2 = require_pattern();
15593
15593
  exports.pattern = pattern2;
15594
15594
  var stream3 = require_stream();
@@ -15684,8 +15684,8 @@ var require_tasks = __commonJS((exports) => {
15684
15684
  var require_async = __commonJS((exports) => {
15685
15685
  Object.defineProperty(exports, "__esModule", { value: true });
15686
15686
  exports.read = undefined;
15687
- function read(path5, settings2, callback) {
15688
- settings2.fs.lstat(path5, (lstatError, lstat) => {
15687
+ function read(path6, settings2, callback) {
15688
+ settings2.fs.lstat(path6, (lstatError, lstat) => {
15689
15689
  if (lstatError !== null) {
15690
15690
  callFailureCallback(callback, lstatError);
15691
15691
  return;
@@ -15694,7 +15694,7 @@ var require_async = __commonJS((exports) => {
15694
15694
  callSuccessCallback(callback, lstat);
15695
15695
  return;
15696
15696
  }
15697
- settings2.fs.stat(path5, (statError, stat) => {
15697
+ settings2.fs.stat(path6, (statError, stat) => {
15698
15698
  if (statError !== null) {
15699
15699
  if (settings2.throwErrorOnBrokenSymbolicLink) {
15700
15700
  callFailureCallback(callback, statError);
@@ -15723,13 +15723,13 @@ var require_async = __commonJS((exports) => {
15723
15723
  var require_sync = __commonJS((exports) => {
15724
15724
  Object.defineProperty(exports, "__esModule", { value: true });
15725
15725
  exports.read = undefined;
15726
- function read(path5, settings2) {
15727
- const lstat = settings2.fs.lstatSync(path5);
15726
+ function read(path6, settings2) {
15727
+ const lstat = settings2.fs.lstatSync(path6);
15728
15728
  if (!lstat.isSymbolicLink() || !settings2.followSymbolicLink) {
15729
15729
  return lstat;
15730
15730
  }
15731
15731
  try {
15732
- const stat = settings2.fs.statSync(path5);
15732
+ const stat = settings2.fs.statSync(path6);
15733
15733
  if (settings2.markSymbolicLink) {
15734
15734
  stat.isSymbolicLink = () => true;
15735
15735
  }
@@ -15792,17 +15792,17 @@ var require_out = __commonJS((exports) => {
15792
15792
  var sync2 = require_sync();
15793
15793
  var settings_1 = require_settings();
15794
15794
  exports.Settings = settings_1.default;
15795
- function stat(path5, optionsOrSettingsOrCallback, callback) {
15795
+ function stat(path6, optionsOrSettingsOrCallback, callback) {
15796
15796
  if (typeof optionsOrSettingsOrCallback === "function") {
15797
- async2.read(path5, getSettings(), optionsOrSettingsOrCallback);
15797
+ async2.read(path6, getSettings(), optionsOrSettingsOrCallback);
15798
15798
  return;
15799
15799
  }
15800
- async2.read(path5, getSettings(optionsOrSettingsOrCallback), callback);
15800
+ async2.read(path6, getSettings(optionsOrSettingsOrCallback), callback);
15801
15801
  }
15802
15802
  exports.stat = stat;
15803
- function statSync(path5, optionsOrSettings) {
15803
+ function statSync(path6, optionsOrSettings) {
15804
15804
  const settings2 = getSettings(optionsOrSettings);
15805
- return sync2.read(path5, settings2);
15805
+ return sync2.read(path6, settings2);
15806
15806
  }
15807
15807
  exports.statSync = statSync;
15808
15808
  function getSettings(settingsOrOptions = {}) {
@@ -16005,16 +16005,16 @@ var require_async2 = __commonJS((exports) => {
16005
16005
  return;
16006
16006
  }
16007
16007
  const tasks2 = names.map((name) => {
16008
- const path5 = common2.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
16008
+ const path6 = common2.joinPathSegments(directory, name, settings2.pathSegmentSeparator);
16009
16009
  return (done) => {
16010
- fsStat.stat(path5, settings2.fsStatSettings, (error3, stats) => {
16010
+ fsStat.stat(path6, settings2.fsStatSettings, (error3, stats) => {
16011
16011
  if (error3 !== null) {
16012
16012
  done(error3);
16013
16013
  return;
16014
16014
  }
16015
16015
  const entry2 = {
16016
16016
  name,
16017
- path: path5,
16017
+ path: path6,
16018
16018
  dirent: utils2.fs.createDirentFromStats(name, stats)
16019
16019
  };
16020
16020
  if (settings2.stats) {
@@ -16123,7 +16123,7 @@ var require_fs4 = __commonJS((exports) => {
16123
16123
  // ../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js
16124
16124
  var require_settings2 = __commonJS((exports) => {
16125
16125
  Object.defineProperty(exports, "__esModule", { value: true });
16126
- var path5 = __require("path");
16126
+ var path6 = __require("path");
16127
16127
  var fsStat = require_out();
16128
16128
  var fs6 = require_fs4();
16129
16129
 
@@ -16132,7 +16132,7 @@ var require_settings2 = __commonJS((exports) => {
16132
16132
  this._options = _options;
16133
16133
  this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
16134
16134
  this.fs = fs6.createFileSystemAdapter(this._options.fs);
16135
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path5.sep);
16135
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path6.sep);
16136
16136
  this.stats = this._getValue(this._options.stats, false);
16137
16137
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
16138
16138
  this.fsStatSettings = new fsStat.Settings({
@@ -16156,17 +16156,17 @@ var require_out2 = __commonJS((exports) => {
16156
16156
  var sync2 = require_sync2();
16157
16157
  var settings_1 = require_settings2();
16158
16158
  exports.Settings = settings_1.default;
16159
- function scandir(path5, optionsOrSettingsOrCallback, callback) {
16159
+ function scandir(path6, optionsOrSettingsOrCallback, callback) {
16160
16160
  if (typeof optionsOrSettingsOrCallback === "function") {
16161
- async2.read(path5, getSettings(), optionsOrSettingsOrCallback);
16161
+ async2.read(path6, getSettings(), optionsOrSettingsOrCallback);
16162
16162
  return;
16163
16163
  }
16164
- async2.read(path5, getSettings(optionsOrSettingsOrCallback), callback);
16164
+ async2.read(path6, getSettings(optionsOrSettingsOrCallback), callback);
16165
16165
  }
16166
16166
  exports.scandir = scandir;
16167
- function scandirSync(path5, optionsOrSettings) {
16167
+ function scandirSync(path6, optionsOrSettings) {
16168
16168
  const settings2 = getSettings(optionsOrSettings);
16169
- return sync2.read(path5, settings2);
16169
+ return sync2.read(path6, settings2);
16170
16170
  }
16171
16171
  exports.scandirSync = scandirSync;
16172
16172
  function getSettings(settingsOrOptions = {}) {
@@ -16764,7 +16764,7 @@ var require_sync4 = __commonJS((exports) => {
16764
16764
  // ../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js
16765
16765
  var require_settings3 = __commonJS((exports) => {
16766
16766
  Object.defineProperty(exports, "__esModule", { value: true });
16767
- var path5 = __require("path");
16767
+ var path6 = __require("path");
16768
16768
  var fsScandir = require_out2();
16769
16769
 
16770
16770
  class Settings {
@@ -16775,7 +16775,7 @@ var require_settings3 = __commonJS((exports) => {
16775
16775
  this.deepFilter = this._getValue(this._options.deepFilter, null);
16776
16776
  this.entryFilter = this._getValue(this._options.entryFilter, null);
16777
16777
  this.errorFilter = this._getValue(this._options.errorFilter, null);
16778
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path5.sep);
16778
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path6.sep);
16779
16779
  this.fsScandirSettings = new fsScandir.Settings({
16780
16780
  followSymbolicLinks: this._options.followSymbolicLinks,
16781
16781
  fs: this._options.fs,
@@ -16831,7 +16831,7 @@ var require_out3 = __commonJS((exports) => {
16831
16831
  // ../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js
16832
16832
  var require_reader2 = __commonJS((exports) => {
16833
16833
  Object.defineProperty(exports, "__esModule", { value: true });
16834
- var path5 = __require("path");
16834
+ var path6 = __require("path");
16835
16835
  var fsStat = require_out();
16836
16836
  var utils2 = require_utils3();
16837
16837
 
@@ -16845,7 +16845,7 @@ var require_reader2 = __commonJS((exports) => {
16845
16845
  });
16846
16846
  }
16847
16847
  _getFullEntryPath(filepath) {
16848
- return path5.resolve(this._settings.cwd, filepath);
16848
+ return path6.resolve(this._settings.cwd, filepath);
16849
16849
  }
16850
16850
  _makeEntry(stats, pattern2) {
16851
16851
  const entry2 = {
@@ -17242,7 +17242,7 @@ var require_entry2 = __commonJS((exports) => {
17242
17242
  // ../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js
17243
17243
  var require_provider = __commonJS((exports) => {
17244
17244
  Object.defineProperty(exports, "__esModule", { value: true });
17245
- var path5 = __require("path");
17245
+ var path6 = __require("path");
17246
17246
  var deep_1 = require_deep();
17247
17247
  var entry_1 = require_entry();
17248
17248
  var error_1 = require_error();
@@ -17257,7 +17257,7 @@ var require_provider = __commonJS((exports) => {
17257
17257
  this.entryTransformer = new entry_2.default(this._settings);
17258
17258
  }
17259
17259
  _getRootDirectory(task) {
17260
- return path5.resolve(this._settings.cwd, task.base);
17260
+ return path6.resolve(this._settings.cwd, task.base);
17261
17261
  }
17262
17262
  _getReaderOptions(task) {
17263
17263
  const basePath = task.base === "." ? "" : task.base;
@@ -17652,7 +17652,7 @@ var require_eventemitter3 = __commonJS((exports, module) => {
17652
17652
  var evt = prefix ? prefix + event : event;
17653
17653
  if (!this._events[evt])
17654
17654
  return false;
17655
- var listeners = this._events[evt], len = arguments.length, args, i;
17655
+ var listeners = this._events[evt], len = arguments.length, args2, i;
17656
17656
  if (listeners.fn) {
17657
17657
  if (listeners.once)
17658
17658
  this.removeListener(event, listeners.fn, undefined, true);
@@ -17670,10 +17670,10 @@ var require_eventemitter3 = __commonJS((exports, module) => {
17670
17670
  case 6:
17671
17671
  return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
17672
17672
  }
17673
- for (i = 1, args = new Array(len - 1);i < len; i++) {
17674
- args[i - 1] = arguments[i];
17673
+ for (i = 1, args2 = new Array(len - 1);i < len; i++) {
17674
+ args2[i - 1] = arguments[i];
17675
17675
  }
17676
- listeners.fn.apply(listeners.context, args);
17676
+ listeners.fn.apply(listeners.context, args2);
17677
17677
  } else {
17678
17678
  var length = listeners.length, j;
17679
17679
  for (i = 0;i < length; i++) {
@@ -17693,11 +17693,11 @@ var require_eventemitter3 = __commonJS((exports, module) => {
17693
17693
  listeners[i].fn.call(listeners[i].context, a1, a2, a3);
17694
17694
  break;
17695
17695
  default:
17696
- if (!args)
17697
- for (j = 1, args = new Array(len - 1);j < len; j++) {
17698
- args[j - 1] = arguments[j];
17696
+ if (!args2)
17697
+ for (j = 1, args2 = new Array(len - 1);j < len; j++) {
17698
+ args2[j - 1] = arguments[j];
17699
17699
  }
17700
- listeners[i].fn.apply(listeners[i].context, args);
17700
+ listeners[i].fn.apply(listeners[i].context, args2);
17701
17701
  }
17702
17702
  }
17703
17703
  }
@@ -17827,12 +17827,12 @@ var require_lib = __commonJS((exports, module) => {
17827
17827
  }
17828
17828
  return def;
17829
17829
  }
17830
- #proxy(method, ...args) {
17830
+ #proxy(method, ...args2) {
17831
17831
  if (typeof this._dest?.[method] === "function") {
17832
- this._dest[method](...args);
17832
+ this._dest[method](...args2);
17833
17833
  }
17834
17834
  if (typeof this._src?.[method] === "function") {
17835
- this._src[method](...args);
17835
+ this._src[method](...args2);
17836
17836
  }
17837
17837
  }
17838
17838
  get isTTY() {
@@ -17910,14 +17910,14 @@ var require_lib = __commonJS((exports, module) => {
17910
17910
  }
17911
17911
  this.emit("end");
17912
17912
  }
17913
- destroy(...args) {
17914
- return this.#proxy("destroy", ...args);
17913
+ destroy(...args2) {
17914
+ return this.#proxy("destroy", ...args2);
17915
17915
  }
17916
- destroySoon(...args) {
17917
- return this.#proxy("destroySoon", ...args);
17916
+ destroySoon(...args2) {
17917
+ return this.#proxy("destroySoon", ...args2);
17918
17918
  }
17919
- close(...args) {
17920
- return this.#proxy("close", ...args);
17919
+ close(...args2) {
17920
+ return this.#proxy("close", ...args2);
17921
17921
  }
17922
17922
  }
17923
17923
  module.exports = MuteStream;
@@ -18292,18 +18292,18 @@ var require_utils6 = __commonJS((exports, module) => {
18292
18292
  if (decode3)
18293
18293
  return decode3(data, hint);
18294
18294
  }
18295
- function basename(path10) {
18296
- if (typeof path10 !== "string")
18295
+ function basename(path12) {
18296
+ if (typeof path12 !== "string")
18297
18297
  return "";
18298
- for (let i2 = path10.length - 1;i2 >= 0; --i2) {
18299
- switch (path10.charCodeAt(i2)) {
18298
+ for (let i2 = path12.length - 1;i2 >= 0; --i2) {
18299
+ switch (path12.charCodeAt(i2)) {
18300
18300
  case 47:
18301
18301
  case 92:
18302
- path10 = path10.slice(i2 + 1);
18303
- return path10 === ".." || path10 === "." ? "" : path10;
18302
+ path12 = path12.slice(i2 + 1);
18303
+ return path12 === ".." || path12 === "." ? "" : path12;
18304
18304
  }
18305
18305
  }
18306
- return path10 === ".." || path10 === "." ? "" : path10;
18306
+ return path12 === ".." || path12 === "." ? "" : path12;
18307
18307
  }
18308
18308
  var TOKEN = [
18309
18309
  0,
@@ -40316,12 +40316,11 @@ class HttpChain {
40316
40316
  }
40317
40317
 
40318
40318
  // src/services/init/index.ts
40319
- import fs11 from "node:fs";
40320
- import path8 from "node:path";
40319
+ import fs12 from "node:fs";
40320
+ import path10 from "node:path";
40321
40321
 
40322
40322
  // src/module/assistant/config/index.ts
40323
- import path from "path";
40324
- import { homedir } from "os";
40323
+ import path2 from "path";
40325
40324
  import fs2 from "fs";
40326
40325
 
40327
40326
  // src/module/assistant/file/index.ts
@@ -40444,25 +40443,83 @@ var console2 = {
40444
40443
  debug: logger.debug
40445
40444
  };
40446
40445
 
40447
- // src/module/assistant/config/index.ts
40446
+ // src/module/assistant/config/args.ts
40447
+ import path from "path";
40448
+ import { homedir } from "os";
40448
40449
  var kevisualDir = path.join(homedir(), "kevisual");
40449
40450
  var envKevisualDir = process.env.ASSISTANT_CONFIG_DIR;
40450
40451
  if (envKevisualDir) {
40451
40452
  kevisualDir = envKevisualDir;
40452
40453
  logger.debug("使用环境变量 ASSISTANT_CONFIG_DIR 作为 kevisual 目录:", kevisualDir);
40453
40454
  }
40454
- var configDir = createDir(path.join(kevisualDir, "assistant-app"));
40455
+ var HomeConfigDir = path.join(kevisualDir, "assistant-app");
40456
+ function parseArgs(args) {
40457
+ const result = { home: true };
40458
+ for (let i = 0;i < args.length; i++) {
40459
+ const arg = args[i];
40460
+ if (arg === "--root") {
40461
+ if (i + 1 < args.length && !args[i + 1].startsWith("-")) {
40462
+ result.root = args[i + 1];
40463
+ i++;
40464
+ }
40465
+ }
40466
+ if (arg === "--help" || arg === "-h") {
40467
+ result.help = true;
40468
+ }
40469
+ }
40470
+ if (result.root) {
40471
+ result.home = false;
40472
+ }
40473
+ return result;
40474
+ }
40475
+ var parseHomeArg = (homedir2) => {
40476
+ const args = process.argv.slice(2);
40477
+ const execPath = process.execPath;
40478
+ const options = parseArgs(args);
40479
+ let _configDir = undefined;
40480
+ if (options.home && homedir2) {
40481
+ _configDir = homedir2;
40482
+ } else if (options.root) {
40483
+ _configDir = options.root;
40484
+ }
40485
+ const checkUrl = [".opencode", "bin/opencode", "opencode.exe"];
40486
+ const isOpencode = checkUrl.some((item) => execPath.includes(item));
40487
+ let isServer = false;
40488
+ const checkArgs = process.argv.slice(1);
40489
+ const isArgsServer = checkArgs.some((item) => item === "server" || item.includes("asst-server") || item.includes("run-server.ts"));
40490
+ const isDev = checkArgs.some((item) => item.includes("run-server.ts"));
40491
+ let isDaemon = false;
40492
+ if (isArgsServer) {
40493
+ if (checkArgs.includes("--daemon") || checkArgs.includes("-d")) {
40494
+ isDaemon = true;
40495
+ }
40496
+ if (checkArgs.includes("-s") || checkArgs.includes("--start")) {
40497
+ isServer = true;
40498
+ }
40499
+ }
40500
+ return {
40501
+ isOpencode,
40502
+ options,
40503
+ isDev,
40504
+ isDaemon,
40505
+ configDir: _configDir,
40506
+ isServer
40507
+ };
40508
+ };
40509
+
40510
+ // src/module/assistant/config/index.ts
40511
+ var configDir = createDir(HomeConfigDir);
40455
40512
  var initConfig = (configRootPath) => {
40456
- const configDir2 = createDir(path.join(configRootPath, "assistant-app"));
40457
- const configPath = path.join(configDir2, "assistant-config.json");
40458
- const pageConfigPath = path.join(configDir2, "assistant-page-config.json");
40459
- const pagesDir = createDir(path.join(configDir2, "pages"));
40460
- const appsDir = createDir(path.join(configDir2, "apps"));
40461
- const skillsDir = createDir(path.join(configDir2, "skills"), false);
40462
- const pluginsDir = createDir(path.join(configDir2, "plugins"), false);
40463
- const appsConfigPath = path.join(configDir2, "assistant-apps-config.json");
40464
- const appPidPath = path.join(configDir2, "assistant-app.pid");
40465
- const envConfigPath = path.join(configDir2, ".env");
40513
+ const configDir2 = createDir(path2.join(configRootPath, "assistant-app"));
40514
+ const configPath = path2.join(configDir2, "assistant-config.json");
40515
+ const pageConfigPath = path2.join(configDir2, "assistant-page-config.json");
40516
+ const pagesDir = createDir(path2.join(configDir2, "pages"));
40517
+ const appsDir = createDir(path2.join(configDir2, "apps"));
40518
+ const skillsDir = createDir(path2.join(configDir2, "skills"), false);
40519
+ const pluginsDir = createDir(path2.join(configDir2, "plugins"), false);
40520
+ const appsConfigPath = path2.join(configDir2, "assistant-apps-config.json");
40521
+ const appPidPath = path2.join(configDir2, "assistant-app.pid");
40522
+ const envConfigPath = path2.join(configDir2, ".env");
40466
40523
  return {
40467
40524
  configDir: configDir2,
40468
40525
  configPath,
@@ -40615,77 +40672,26 @@ class AssistantConfig {
40615
40672
  return envConfig;
40616
40673
  }
40617
40674
  static detectConfigDir(configDir2, deep = 3) {
40618
- const checkConfigDir = path.resolve(configDir2 || process.env.ASSISTANT_CONFIG_DIR || process.cwd());
40619
- const configPath = path.join(checkConfigDir, "assistant-app");
40675
+ const checkConfigDir = path2.resolve(configDir2 || process.env.ASSISTANT_CONFIG_DIR || process.cwd());
40676
+ const configPath = path2.join(checkConfigDir, "assistant-app");
40620
40677
  if (checkFileExists(configPath)) {
40621
- return path.join(checkConfigDir);
40678
+ return path2.join(checkConfigDir);
40622
40679
  }
40623
40680
  if (deep >= 2) {
40624
- const lastConfigPath = path.join(checkConfigDir, "..", "assistant-app");
40681
+ const lastConfigPath = path2.join(checkConfigDir, "..", "assistant-app");
40625
40682
  if (checkFileExists(lastConfigPath)) {
40626
- return path.join(checkConfigDir, "..");
40683
+ return path2.join(checkConfigDir, "..");
40627
40684
  }
40628
40685
  }
40629
40686
  if (deep >= 3) {
40630
- const lastConfigPath2 = path.join(checkConfigDir, "../..", "assistant-app");
40687
+ const lastConfigPath2 = path2.join(checkConfigDir, "../..", "assistant-app");
40631
40688
  if (checkFileExists(lastConfigPath2)) {
40632
- return path.join(checkConfigDir, "../..");
40689
+ return path2.join(checkConfigDir, "../..");
40633
40690
  }
40634
40691
  }
40635
40692
  return checkConfigDir;
40636
40693
  }
40637
40694
  }
40638
- function parseArgs(args) {
40639
- const result = { home: true };
40640
- for (let i = 0;i < args.length; i++) {
40641
- const arg = args[i];
40642
- if (arg === "--root") {
40643
- if (i + 1 < args.length && !args[i + 1].startsWith("-")) {
40644
- result.root = args[i + 1];
40645
- i++;
40646
- }
40647
- }
40648
- if (arg === "--help" || arg === "-h") {
40649
- result.help = true;
40650
- }
40651
- }
40652
- if (result.root) {
40653
- result.home = false;
40654
- }
40655
- return result;
40656
- }
40657
- var parseHomeArg = (homedir2) => {
40658
- const args = process.argv.slice(2);
40659
- const execPath = process.execPath;
40660
- const options = parseArgs(args);
40661
- let _configDir = undefined;
40662
- if (options.home && homedir2) {
40663
- _configDir = homedir2;
40664
- } else if (options.root) {
40665
- _configDir = options.root;
40666
- }
40667
- const checkUrl = [".opencode", "bin/opencode", "opencode.exe"];
40668
- const isOpencode = checkUrl.some((item) => execPath.includes(item));
40669
- let isServer = false;
40670
- console.log("parseHomeArg args:", args);
40671
- if (args.includes("server") || args.includes("assistant-server")) {
40672
- let isDaemon = false;
40673
- if (args.includes("--daemon") || args.includes("-d")) {
40674
- isDaemon = true;
40675
- }
40676
- if (!isDaemon) {
40677
- if (args.includes("-s") || args.includes("--start")) {
40678
- isServer = true;
40679
- }
40680
- }
40681
- }
40682
- return {
40683
- isOpencode,
40684
- options,
40685
- configDir: _configDir,
40686
- isServer
40687
- };
40688
- };
40689
40695
  var parseIfJson2 = (content) => {
40690
40696
  try {
40691
40697
  return JSON.parse(content);
@@ -40781,7 +40787,7 @@ __export(exports_manager, {
40781
40787
  // ../node_modules/.pnpm/@kevisual+use-config@1.0.28_dotenv@17.2.3/node_modules/@kevisual/use-config/dist/app.js
40782
40788
  import { createRequire as createRequire2 } from "node:module";
40783
40789
  import fs3 from "node:fs";
40784
- import path2 from "node:path";
40790
+ import path3 from "node:path";
40785
40791
  var __create2 = Object.create;
40786
40792
  var __getProtoOf2 = Object.getPrototypeOf;
40787
40793
  var __defProp2 = Object.defineProperty;
@@ -40866,7 +40872,7 @@ var require_package2 = __commonJS2((exports, module) => {
40866
40872
  });
40867
40873
  var require_main2 = __commonJS2((exports, module) => {
40868
40874
  var fs4 = __require2("fs");
40869
- var path3 = __require2("path");
40875
+ var path4 = __require2("path");
40870
40876
  var os2 = __require2("os");
40871
40877
  var crypto2 = __require2("crypto");
40872
40878
  var packageJson = require_package2();
@@ -41017,7 +41023,7 @@ var require_main2 = __commonJS2((exports, module) => {
41017
41023
  possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
41018
41024
  }
41019
41025
  } else {
41020
- possibleVaultPath = path3.resolve(process.cwd(), ".env.vault");
41026
+ possibleVaultPath = path4.resolve(process.cwd(), ".env.vault");
41021
41027
  }
41022
41028
  if (fs4.existsSync(possibleVaultPath)) {
41023
41029
  return possibleVaultPath;
@@ -41025,7 +41031,7 @@ var require_main2 = __commonJS2((exports, module) => {
41025
41031
  return null;
41026
41032
  }
41027
41033
  function _resolveHome(envPath) {
41028
- return envPath[0] === "~" ? path3.join(os2.homedir(), envPath.slice(1)) : envPath;
41034
+ return envPath[0] === "~" ? path4.join(os2.homedir(), envPath.slice(1)) : envPath;
41029
41035
  }
41030
41036
  function _configVault(options) {
41031
41037
  const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
@@ -41042,7 +41048,7 @@ var require_main2 = __commonJS2((exports, module) => {
41042
41048
  return { parsed };
41043
41049
  }
41044
41050
  function configDotenv(options) {
41045
- const dotenvPath = path3.resolve(process.cwd(), ".env");
41051
+ const dotenvPath = path4.resolve(process.cwd(), ".env");
41046
41052
  let encoding = "utf8";
41047
41053
  let processEnv = process.env;
41048
41054
  if (options && options.processEnv != null) {
@@ -41089,7 +41095,7 @@ var require_main2 = __commonJS2((exports, module) => {
41089
41095
  const shortPaths = [];
41090
41096
  for (const filePath of optionPaths) {
41091
41097
  try {
41092
- const relative = path3.relative(process.cwd(), filePath);
41098
+ const relative = path4.relative(process.cwd(), filePath);
41093
41099
  shortPaths.push(relative);
41094
41100
  } catch (e) {
41095
41101
  if (debug) {
@@ -41205,7 +41211,7 @@ var getCwdDirname = () => {
41205
41211
  };
41206
41212
  var getConfigFile = (opts) => {
41207
41213
  if (opts?.envConfigFile) {
41208
- const filePath = path2.join(opts.cwd || getCwdDirname(), opts.envConfigFile);
41214
+ const filePath = path3.join(opts.cwd || getCwdDirname(), opts.envConfigFile);
41209
41215
  if (fileIsExist(filePath)) {
41210
41216
  return filePath;
41211
41217
  }
@@ -41216,11 +41222,11 @@ var getConfigFile = (opts) => {
41216
41222
  const ben = fileIsExist(benPath);
41217
41223
  if (ben)
41218
41224
  return benPath;
41219
- const lastPath = path2.join(dirname, "../" + fileName);
41225
+ const lastPath = path3.join(dirname, "../" + fileName);
41220
41226
  const last = fileIsExist(lastPath);
41221
41227
  if (last)
41222
41228
  return lastPath;
41223
- const lastLastPath = path2.join(dirname, "../../" + fileName);
41229
+ const lastLastPath = path3.join(dirname, "../../" + fileName);
41224
41230
  const lastLast = fileIsExist(lastLastPath);
41225
41231
  if (lastLast)
41226
41232
  return lastLastPath;
@@ -41293,7 +41299,7 @@ var useKey = (key, opts) => {
41293
41299
  };
41294
41300
  var useFileStore = (str, opts) => {
41295
41301
  const publicPath = process.cwd();
41296
- const filePath = path2.join(publicPath, str);
41302
+ const filePath = path3.join(publicPath, str);
41297
41303
  if (opts?.needExists) {
41298
41304
  if (!fileIsExist(filePath)) {
41299
41305
  fs3.mkdirSync(filePath, { recursive: true });
@@ -41383,7 +41389,7 @@ function requireEventemitter32() {
41383
41389
  var evt = prefix ? prefix + event : event;
41384
41390
  if (!this._events[evt])
41385
41391
  return false;
41386
- var listeners = this._events[evt], len = arguments.length, args, i;
41392
+ var listeners = this._events[evt], len = arguments.length, args2, i;
41387
41393
  if (listeners.fn) {
41388
41394
  if (listeners.once)
41389
41395
  this.removeListener(event, listeners.fn, undefined, true);
@@ -41401,10 +41407,10 @@ function requireEventemitter32() {
41401
41407
  case 6:
41402
41408
  return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
41403
41409
  }
41404
- for (i = 1, args = new Array(len - 1);i < len; i++) {
41405
- args[i - 1] = arguments[i];
41410
+ for (i = 1, args2 = new Array(len - 1);i < len; i++) {
41411
+ args2[i - 1] = arguments[i];
41406
41412
  }
41407
- listeners.fn.apply(listeners.context, args);
41413
+ listeners.fn.apply(listeners.context, args2);
41408
41414
  } else {
41409
41415
  var length = listeners.length, j;
41410
41416
  for (i = 0;i < length; i++) {
@@ -41424,11 +41430,11 @@ function requireEventemitter32() {
41424
41430
  listeners[i].fn.call(listeners[i].context, a1, a2, a3);
41425
41431
  break;
41426
41432
  default:
41427
- if (!args)
41428
- for (j = 1, args = new Array(len - 1);j < len; j++) {
41429
- args[j - 1] = arguments[j];
41433
+ if (!args2)
41434
+ for (j = 1, args2 = new Array(len - 1);j < len; j++) {
41435
+ args2[j - 1] = arguments[j];
41430
41436
  }
41431
- listeners[i].fn.apply(listeners[i].context, args);
41437
+ listeners[i].fn.apply(listeners[i].context, args2);
41432
41438
  }
41433
41439
  }
41434
41440
  }
@@ -42037,18 +42043,18 @@ var baseCreate = function() {
42037
42043
  return result;
42038
42044
  };
42039
42045
  }();
42040
- function apply(func, thisArg, args) {
42041
- switch (args.length) {
42046
+ function apply(func, thisArg, args2) {
42047
+ switch (args2.length) {
42042
42048
  case 0:
42043
42049
  return func.call(thisArg);
42044
42050
  case 1:
42045
- return func.call(thisArg, args[0]);
42051
+ return func.call(thisArg, args2[0]);
42046
42052
  case 2:
42047
- return func.call(thisArg, args[0], args[1]);
42053
+ return func.call(thisArg, args2[0], args2[1]);
42048
42054
  case 3:
42049
- return func.call(thisArg, args[0], args[1], args[2]);
42055
+ return func.call(thisArg, args2[0], args2[1], args2[2]);
42050
42056
  }
42051
- return func.apply(thisArg, args);
42057
+ return func.apply(thisArg, args2);
42052
42058
  }
42053
42059
  function copyArray(source, array2) {
42054
42060
  var index2 = -1, length = source.length;
@@ -42149,14 +42155,14 @@ var nativeMax = Math.max;
42149
42155
  function overRest(func, start, transform2) {
42150
42156
  start = nativeMax(start === undefined ? func.length - 1 : start, 0);
42151
42157
  return function() {
42152
- var args = arguments, index2 = -1, length = nativeMax(args.length - start, 0), array2 = Array(length);
42158
+ var args2 = arguments, index2 = -1, length = nativeMax(args2.length - start, 0), array2 = Array(length);
42153
42159
  while (++index2 < length) {
42154
- array2[index2] = args[start + index2];
42160
+ array2[index2] = args2[start + index2];
42155
42161
  }
42156
42162
  index2 = -1;
42157
42163
  var otherArgs = Array(start + 1);
42158
42164
  while (++index2 < start) {
42159
- otherArgs[index2] = args[index2];
42165
+ otherArgs[index2] = args2[index2];
42160
42166
  }
42161
42167
  otherArgs[start] = transform2(array2);
42162
42168
  return apply(func, this, otherArgs);
@@ -42728,14 +42734,14 @@ function requireFs$3() {
42728
42734
  fs$3.createDirentFromStats = createDirentFromStats;
42729
42735
  return fs$3;
42730
42736
  }
42731
- var path3 = {};
42737
+ var path4 = {};
42732
42738
  var hasRequiredPath;
42733
42739
  function requirePath() {
42734
42740
  if (hasRequiredPath)
42735
- return path3;
42741
+ return path4;
42736
42742
  hasRequiredPath = 1;
42737
- Object.defineProperty(path3, "__esModule", { value: true });
42738
- path3.convertPosixPathToPattern = path3.convertWindowsPathToPattern = path3.convertPathToPattern = path3.escapePosixPath = path3.escapeWindowsPath = path3.escape = path3.removeLeadingDotSegment = path3.makeAbsolute = path3.unixify = undefined;
42743
+ Object.defineProperty(path4, "__esModule", { value: true });
42744
+ path4.convertPosixPathToPattern = path4.convertWindowsPathToPattern = path4.convertPathToPattern = path4.escapePosixPath = path4.escapeWindowsPath = path4.escape = path4.removeLeadingDotSegment = path4.makeAbsolute = path4.unixify = undefined;
42739
42745
  const os2 = require$$02;
42740
42746
  const path$12 = require$$0$12;
42741
42747
  const IS_WINDOWS_PLATFORM = os2.platform() === "win32";
@@ -42747,11 +42753,11 @@ function requirePath() {
42747
42753
  function unixify(filepath) {
42748
42754
  return filepath.replace(/\\/g, "/");
42749
42755
  }
42750
- path3.unixify = unixify;
42756
+ path4.unixify = unixify;
42751
42757
  function makeAbsolute(cwd, filepath) {
42752
42758
  return path$12.resolve(cwd, filepath);
42753
42759
  }
42754
- path3.makeAbsolute = makeAbsolute;
42760
+ path4.makeAbsolute = makeAbsolute;
42755
42761
  function removeLeadingDotSegment(entry) {
42756
42762
  if (entry.charAt(0) === ".") {
42757
42763
  const secondCharactery = entry.charAt(1);
@@ -42761,26 +42767,26 @@ function requirePath() {
42761
42767
  }
42762
42768
  return entry;
42763
42769
  }
42764
- path3.removeLeadingDotSegment = removeLeadingDotSegment;
42765
- path3.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;
42770
+ path4.removeLeadingDotSegment = removeLeadingDotSegment;
42771
+ path4.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;
42766
42772
  function escapeWindowsPath(pattern) {
42767
42773
  return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
42768
42774
  }
42769
- path3.escapeWindowsPath = escapeWindowsPath;
42775
+ path4.escapeWindowsPath = escapeWindowsPath;
42770
42776
  function escapePosixPath(pattern) {
42771
42777
  return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
42772
42778
  }
42773
- path3.escapePosixPath = escapePosixPath;
42774
- path3.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;
42779
+ path4.escapePosixPath = escapePosixPath;
42780
+ path4.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;
42775
42781
  function convertWindowsPathToPattern(filepath) {
42776
42782
  return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/");
42777
42783
  }
42778
- path3.convertWindowsPathToPattern = convertWindowsPathToPattern;
42784
+ path4.convertWindowsPathToPattern = convertWindowsPathToPattern;
42779
42785
  function convertPosixPathToPattern(filepath) {
42780
42786
  return escapePosixPath(filepath);
42781
42787
  }
42782
- path3.convertPosixPathToPattern = convertPosixPathToPattern;
42783
- return path3;
42788
+ path4.convertPosixPathToPattern = convertPosixPathToPattern;
42789
+ return path4;
42784
42790
  }
42785
42791
  var pattern = {};
42786
42792
  /*!
@@ -43050,7 +43056,7 @@ function requireUtils$3() {
43050
43056
  node.type = "text";
43051
43057
  return acc;
43052
43058
  }, []);
43053
- exports$1.flatten = (...args) => {
43059
+ exports$1.flatten = (...args2) => {
43054
43060
  const result = [];
43055
43061
  const flat = (arr) => {
43056
43062
  for (let i = 0;i < arr.length; i++) {
@@ -43065,7 +43071,7 @@ function requireUtils$3() {
43065
43071
  }
43066
43072
  return result;
43067
43073
  };
43068
- flat(args);
43074
+ flat(args2);
43069
43075
  return result;
43070
43076
  };
43071
43077
  })(utils$2);
@@ -43447,8 +43453,8 @@ function requireFillRange() {
43447
43453
  }
43448
43454
  return toRegexRange(start, end, options);
43449
43455
  };
43450
- const rangeError = (...args) => {
43451
- return new RangeError("Invalid range arguments: " + util.inspect(...args));
43456
+ const rangeError = (...args2) => {
43457
+ return new RangeError("Invalid range arguments: " + util.inspect(...args2));
43452
43458
  };
43453
43459
  const invalidRange = (start, end, options) => {
43454
43460
  if (options.strictRanges === true)
@@ -43593,10 +43599,10 @@ function requireCompile() {
43593
43599
  return node.value;
43594
43600
  }
43595
43601
  if (node.nodes && node.ranges > 0) {
43596
- const args = utils.reduce(node.nodes);
43597
- const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true });
43602
+ const args2 = utils.reduce(node.nodes);
43603
+ const range = fill(...args2, { ...options, wrap: false, toRegex: true, strictZeros: true });
43598
43604
  if (range.length !== 0) {
43599
- return args.length > 1 && range.length > 1 ? `(${range})` : range;
43605
+ return args2.length > 1 && range.length > 1 ? `(${range})` : range;
43600
43606
  }
43601
43607
  }
43602
43608
  if (node.nodes) {
@@ -43663,11 +43669,11 @@ function requireExpand() {
43663
43669
  return;
43664
43670
  }
43665
43671
  if (node.nodes && node.ranges > 0) {
43666
- const args = utils.reduce(node.nodes);
43667
- if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
43672
+ const args2 = utils.reduce(node.nodes);
43673
+ if (utils.exceedsLimit(...args2, options.step, rangeLimit)) {
43668
43674
  throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
43669
43675
  }
43670
- let range = fill(...args, options);
43676
+ let range = fill(...args2, options);
43671
43677
  if (range.length === 0) {
43672
43678
  range = stringify2(node, options);
43673
43679
  }
@@ -44067,7 +44073,7 @@ function requireConstants$1() {
44067
44073
  if (hasRequiredConstants$1)
44068
44074
  return constants$1;
44069
44075
  hasRequiredConstants$1 = 1;
44070
- const path4 = require$$0$12;
44076
+ const path5 = require$$0$12;
44071
44077
  const WIN_SLASH = "\\\\/";
44072
44078
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
44073
44079
  const DOT_LITERAL = "\\.";
@@ -44189,7 +44195,7 @@ function requireConstants$1() {
44189
44195
  CHAR_UNDERSCORE: 95,
44190
44196
  CHAR_VERTICAL_LINE: 124,
44191
44197
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
44192
- SEP: path4.sep,
44198
+ SEP: path5.sep,
44193
44199
  extglobChars(chars) {
44194
44200
  return {
44195
44201
  "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` },
@@ -44211,7 +44217,7 @@ function requireUtils$2() {
44211
44217
  return utils$1;
44212
44218
  hasRequiredUtils$2 = 1;
44213
44219
  (function(exports$1) {
44214
- const path4 = require$$0$12;
44220
+ const path5 = require$$0$12;
44215
44221
  const win32 = process.platform === "win32";
44216
44222
  const {
44217
44223
  REGEX_BACKSLASH,
@@ -44240,7 +44246,7 @@ function requireUtils$2() {
44240
44246
  if (options && typeof options.windows === "boolean") {
44241
44247
  return options.windows;
44242
44248
  }
44243
- return win32 === true || path4.sep === "\\";
44249
+ return win32 === true || path5.sep === "\\";
44244
44250
  };
44245
44251
  exports$1.escapeLast = (input, char, lastIdx) => {
44246
44252
  const idx = input.lastIndexOf(char, lastIdx);
@@ -44604,16 +44610,16 @@ function requireParse() {
44604
44610
  REGEX_SPECIAL_CHARS_BACKREF,
44605
44611
  REPLACEMENTS
44606
44612
  } = constants2;
44607
- const expandRange = (args, options) => {
44613
+ const expandRange = (args2, options) => {
44608
44614
  if (typeof options.expandRange === "function") {
44609
- return options.expandRange(...args, options);
44615
+ return options.expandRange(...args2, options);
44610
44616
  }
44611
- args.sort();
44612
- const value = `[${args.join("-")}]`;
44617
+ args2.sort();
44618
+ const value = `[${args2.join("-")}]`;
44613
44619
  try {
44614
44620
  new RegExp(value);
44615
44621
  } catch (ex) {
44616
- return args.map((v) => utils.escapeRegex(v)).join("..");
44622
+ return args2.map((v) => utils.escapeRegex(v)).join("..");
44617
44623
  }
44618
44624
  return value;
44619
44625
  };
@@ -45377,7 +45383,7 @@ function requirePicomatch$1() {
45377
45383
  if (hasRequiredPicomatch$1)
45378
45384
  return picomatch_1;
45379
45385
  hasRequiredPicomatch$1 = 1;
45380
- const path4 = require$$0$12;
45386
+ const path5 = require$$0$12;
45381
45387
  const scan = requireScan();
45382
45388
  const parse2 = requireParse();
45383
45389
  const utils = requireUtils$2();
@@ -45463,7 +45469,7 @@ function requirePicomatch$1() {
45463
45469
  };
45464
45470
  picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
45465
45471
  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
45466
- return regex.test(path4.basename(input));
45472
+ return regex.test(path5.basename(input));
45467
45473
  };
45468
45474
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
45469
45475
  picomatch.parse = (pattern2, options) => {
@@ -45665,8 +45671,8 @@ function requireMicromatch() {
45665
45671
  return match.slice(1).map((v) => v === undefined ? "" : v);
45666
45672
  }
45667
45673
  };
45668
- micromatch.makeRe = (...args) => picomatch2.makeRe(...args);
45669
- micromatch.scan = (...args) => picomatch2.scan(...args);
45674
+ micromatch.makeRe = (...args2) => picomatch2.makeRe(...args2);
45675
+ micromatch.scan = (...args2) => picomatch2.scan(...args2);
45670
45676
  micromatch.parse = (patterns, options) => {
45671
45677
  let res = [];
45672
45678
  for (let pattern2 of [].concat(patterns || [])) {
@@ -45700,7 +45706,7 @@ function requirePattern() {
45700
45706
  hasRequiredPattern = 1;
45701
45707
  Object.defineProperty(pattern, "__esModule", { value: true });
45702
45708
  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;
45703
- const path4 = require$$0$12;
45709
+ const path5 = require$$0$12;
45704
45710
  const globParent2 = requireGlobParent();
45705
45711
  const micromatch = requireMicromatch();
45706
45712
  const GLOBSTAR = "**";
@@ -45795,7 +45801,7 @@ function requirePattern() {
45795
45801
  }
45796
45802
  pattern.endsWithSlashGlobStar = endsWithSlashGlobStar;
45797
45803
  function isAffectDepthOfReadingPattern(pattern2) {
45798
- const basename = path4.basename(pattern2);
45804
+ const basename = path5.basename(pattern2);
45799
45805
  return endsWithSlashGlobStar(pattern2) || isStaticPattern(basename);
45800
45806
  }
45801
45807
  pattern.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
@@ -45853,7 +45859,7 @@ function requirePattern() {
45853
45859
  }
45854
45860
  pattern.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
45855
45861
  function isAbsolute(pattern2) {
45856
- return path4.isAbsolute(pattern2);
45862
+ return path5.isAbsolute(pattern2);
45857
45863
  }
45858
45864
  pattern.isAbsolute = isAbsolute;
45859
45865
  return pattern;
@@ -45871,11 +45877,11 @@ function requireMerge2() {
45871
45877
  merge2_1 = merge22;
45872
45878
  function merge22() {
45873
45879
  const streamsQueue = [];
45874
- const args = slice.call(arguments);
45880
+ const args2 = slice.call(arguments);
45875
45881
  let merging = false;
45876
- let options = args[args.length - 1];
45882
+ let options = args2[args2.length - 1];
45877
45883
  if (options && !Array.isArray(options) && options.pipe == null) {
45878
- args.pop();
45884
+ args2.pop();
45879
45885
  } else {
45880
45886
  options = {};
45881
45887
  }
@@ -45956,8 +45962,8 @@ function requireMerge2() {
45956
45962
  mergedStream.on("unpipe", function(stream2) {
45957
45963
  stream2.emit("merge2UnpipeEnd");
45958
45964
  });
45959
- if (args.length) {
45960
- addStream.apply(null, args);
45965
+ if (args2.length) {
45966
+ addStream.apply(null, args2);
45961
45967
  }
45962
45968
  return mergedStream;
45963
45969
  }
@@ -46033,8 +46039,8 @@ function requireUtils$1() {
46033
46039
  utils$3.errno = errno2;
46034
46040
  const fs4 = requireFs$3();
46035
46041
  utils$3.fs = fs4;
46036
- const path4 = requirePath();
46037
- utils$3.path = path4;
46042
+ const path5 = requirePath();
46043
+ utils$3.path = path5;
46038
46044
  const pattern2 = requirePattern();
46039
46045
  utils$3.pattern = pattern2;
46040
46046
  const stream2 = requireStream$3();
@@ -46145,8 +46151,8 @@ function requireAsync$5() {
46145
46151
  hasRequiredAsync$5 = 1;
46146
46152
  Object.defineProperty(async, "__esModule", { value: true });
46147
46153
  async.read = undefined;
46148
- function read(path4, settings, callback) {
46149
- settings.fs.lstat(path4, (lstatError, lstat) => {
46154
+ function read(path5, settings, callback) {
46155
+ settings.fs.lstat(path5, (lstatError, lstat) => {
46150
46156
  if (lstatError !== null) {
46151
46157
  callFailureCallback(callback, lstatError);
46152
46158
  return;
@@ -46155,7 +46161,7 @@ function requireAsync$5() {
46155
46161
  callSuccessCallback(callback, lstat);
46156
46162
  return;
46157
46163
  }
46158
- settings.fs.stat(path4, (statError, stat) => {
46164
+ settings.fs.stat(path5, (statError, stat) => {
46159
46165
  if (statError !== null) {
46160
46166
  if (settings.throwErrorOnBrokenSymbolicLink) {
46161
46167
  callFailureCallback(callback, statError);
@@ -46188,13 +46194,13 @@ function requireSync$5() {
46188
46194
  hasRequiredSync$5 = 1;
46189
46195
  Object.defineProperty(sync$5, "__esModule", { value: true });
46190
46196
  sync$5.read = undefined;
46191
- function read(path4, settings) {
46192
- const lstat = settings.fs.lstatSync(path4);
46197
+ function read(path5, settings) {
46198
+ const lstat = settings.fs.lstatSync(path5);
46193
46199
  if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
46194
46200
  return lstat;
46195
46201
  }
46196
46202
  try {
46197
- const stat = settings.fs.statSync(path4);
46203
+ const stat = settings.fs.statSync(path5);
46198
46204
  if (settings.markSymbolicLink) {
46199
46205
  stat.isSymbolicLink = () => true;
46200
46206
  }
@@ -46270,17 +46276,17 @@ function requireOut$3() {
46270
46276
  const sync = requireSync$5();
46271
46277
  const settings_1 = requireSettings$3();
46272
46278
  out$1.Settings = settings_1.default;
46273
- function stat(path4, optionsOrSettingsOrCallback, callback) {
46279
+ function stat(path5, optionsOrSettingsOrCallback, callback) {
46274
46280
  if (typeof optionsOrSettingsOrCallback === "function") {
46275
- async2.read(path4, getSettings(), optionsOrSettingsOrCallback);
46281
+ async2.read(path5, getSettings(), optionsOrSettingsOrCallback);
46276
46282
  return;
46277
46283
  }
46278
- async2.read(path4, getSettings(optionsOrSettingsOrCallback), callback);
46284
+ async2.read(path5, getSettings(optionsOrSettingsOrCallback), callback);
46279
46285
  }
46280
46286
  out$1.stat = stat;
46281
- function statSync(path4, optionsOrSettings) {
46287
+ function statSync(path5, optionsOrSettings) {
46282
46288
  const settings = getSettings(optionsOrSettings);
46283
- return sync.read(path4, settings);
46289
+ return sync.read(path5, settings);
46284
46290
  }
46285
46291
  out$1.statSync = statSync;
46286
46292
  function getSettings(settingsOrOptions = {}) {
@@ -46510,16 +46516,16 @@ function requireAsync$4() {
46510
46516
  return;
46511
46517
  }
46512
46518
  const tasks2 = names.map((name) => {
46513
- const path4 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
46519
+ const path5 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
46514
46520
  return (done) => {
46515
- fsStat.stat(path4, settings.fsStatSettings, (error2, stats) => {
46521
+ fsStat.stat(path5, settings.fsStatSettings, (error2, stats) => {
46516
46522
  if (error2 !== null) {
46517
46523
  done(error2);
46518
46524
  return;
46519
46525
  }
46520
46526
  const entry = {
46521
46527
  name,
46522
- path: path4,
46528
+ path: path5,
46523
46529
  dirent: utils2.fs.createDirentFromStats(name, stats)
46524
46530
  };
46525
46531
  if (settings.stats) {
@@ -46642,7 +46648,7 @@ function requireSettings$2() {
46642
46648
  return settings$2;
46643
46649
  hasRequiredSettings$2 = 1;
46644
46650
  Object.defineProperty(settings$2, "__esModule", { value: true });
46645
- const path4 = require$$0$12;
46651
+ const path5 = require$$0$12;
46646
46652
  const fsStat = requireOut$3();
46647
46653
  const fs5 = requireFs();
46648
46654
 
@@ -46651,7 +46657,7 @@ function requireSettings$2() {
46651
46657
  this._options = _options;
46652
46658
  this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
46653
46659
  this.fs = fs5.createFileSystemAdapter(this._options.fs);
46654
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path4.sep);
46660
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path5.sep);
46655
46661
  this.stats = this._getValue(this._options.stats, false);
46656
46662
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
46657
46663
  this.fsStatSettings = new fsStat.Settings({
@@ -46678,17 +46684,17 @@ function requireOut$2() {
46678
46684
  const sync = requireSync$4();
46679
46685
  const settings_1 = requireSettings$2();
46680
46686
  out$2.Settings = settings_1.default;
46681
- function scandir(path4, optionsOrSettingsOrCallback, callback) {
46687
+ function scandir(path5, optionsOrSettingsOrCallback, callback) {
46682
46688
  if (typeof optionsOrSettingsOrCallback === "function") {
46683
- async2.read(path4, getSettings(), optionsOrSettingsOrCallback);
46689
+ async2.read(path5, getSettings(), optionsOrSettingsOrCallback);
46684
46690
  return;
46685
46691
  }
46686
- async2.read(path4, getSettings(optionsOrSettingsOrCallback), callback);
46692
+ async2.read(path5, getSettings(optionsOrSettingsOrCallback), callback);
46687
46693
  }
46688
46694
  out$2.scandir = scandir;
46689
- function scandirSync(path4, optionsOrSettings) {
46695
+ function scandirSync(path5, optionsOrSettings) {
46690
46696
  const settings = getSettings(optionsOrSettings);
46691
- return sync.read(path4, settings);
46697
+ return sync.read(path5, settings);
46692
46698
  }
46693
46699
  out$2.scandirSync = scandirSync;
46694
46700
  function getSettings(settingsOrOptions = {}) {
@@ -47324,7 +47330,7 @@ function requireSettings$1() {
47324
47330
  return settings$1;
47325
47331
  hasRequiredSettings$1 = 1;
47326
47332
  Object.defineProperty(settings$1, "__esModule", { value: true });
47327
- const path4 = require$$0$12;
47333
+ const path5 = require$$0$12;
47328
47334
  const fsScandir = requireOut$2();
47329
47335
 
47330
47336
  class Settings {
@@ -47335,7 +47341,7 @@ function requireSettings$1() {
47335
47341
  this.deepFilter = this._getValue(this._options.deepFilter, null);
47336
47342
  this.entryFilter = this._getValue(this._options.entryFilter, null);
47337
47343
  this.errorFilter = this._getValue(this._options.errorFilter, null);
47338
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path4.sep);
47344
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path5.sep);
47339
47345
  this.fsScandirSettings = new fsScandir.Settings({
47340
47346
  followSymbolicLinks: this._options.followSymbolicLinks,
47341
47347
  fs: this._options.fs,
@@ -47398,7 +47404,7 @@ function requireReader() {
47398
47404
  return reader;
47399
47405
  hasRequiredReader = 1;
47400
47406
  Object.defineProperty(reader, "__esModule", { value: true });
47401
- const path4 = require$$0$12;
47407
+ const path5 = require$$0$12;
47402
47408
  const fsStat = requireOut$3();
47403
47409
  const utils2 = requireUtils$1();
47404
47410
 
@@ -47412,7 +47418,7 @@ function requireReader() {
47412
47418
  });
47413
47419
  }
47414
47420
  _getFullEntryPath(filepath) {
47415
- return path4.resolve(this._settings.cwd, filepath);
47421
+ return path5.resolve(this._settings.cwd, filepath);
47416
47422
  }
47417
47423
  _makeEntry(stats, pattern2) {
47418
47424
  const entry = {
@@ -47844,7 +47850,7 @@ function requireProvider() {
47844
47850
  return provider;
47845
47851
  hasRequiredProvider = 1;
47846
47852
  Object.defineProperty(provider, "__esModule", { value: true });
47847
- const path4 = require$$0$12;
47853
+ const path5 = require$$0$12;
47848
47854
  const deep_1 = requireDeep();
47849
47855
  const entry_1 = requireEntry$1();
47850
47856
  const error_1 = requireError();
@@ -47859,7 +47865,7 @@ function requireProvider() {
47859
47865
  this.entryTransformer = new entry_2.default(this._settings);
47860
47866
  }
47861
47867
  _getRootDirectory(task) {
47862
- return path4.resolve(this._settings.cwd, task.base);
47868
+ return path5.resolve(this._settings.cwd, task.base);
47863
47869
  }
47864
47870
  _getReaderOptions(task) {
47865
47871
  const basePath = task.base === "." ? "" : task.base;
@@ -48831,12 +48837,12 @@ var reload = promisify2(pm22.reload).bind(pm22);
48831
48837
  var deleteProcess2 = promisify2(pm22.delete).bind(pm22);
48832
48838
  var list2 = promisify2(pm22.list).bind(pm22);
48833
48839
  // src/module/local-apps/src/modules/app-file.ts
48834
- import path4 from "node:path";
48840
+ import path5 from "node:path";
48835
48841
  import fs5 from "node:fs";
48836
48842
  var getAppsPath2 = () => {
48837
48843
  const appsPath = process.env.APPS_PATH;
48838
48844
  if (appsPath) {
48839
- const resolvePath = path4.resolve(appsPath);
48845
+ const resolvePath = path5.resolve(appsPath);
48840
48846
  if (fileIsExist(resolvePath)) {
48841
48847
  return resolvePath;
48842
48848
  } else {
@@ -48852,7 +48858,7 @@ var loadAppInfo2 = async (appsPath = "apps", filename = "apps.config.json") => {
48852
48858
  fileName: filename
48853
48859
  });
48854
48860
  if (!configFile) {
48855
- configFile = path4.join(appsPath, "..", filename);
48861
+ configFile = path5.join(appsPath, "..", filename);
48856
48862
  fs5.writeFileSync(configFile, JSON.stringify({ list: [] }));
48857
48863
  return { list: [] };
48858
48864
  }
@@ -48880,8 +48886,8 @@ var saveAppInfo2 = async (data, appsPath, filename = "apps.config.json") => {
48880
48886
  fs5.writeFileSync(configFile, JSON.stringify(data, null, 2));
48881
48887
  };
48882
48888
  var deleteFileAppInfo2 = async (key, appsPath) => {
48883
- const normalizedKey = key.replace(/\//g, path4.sep);
48884
- const directory = path4.join(appsPath, normalizedKey);
48889
+ const normalizedKey = key.replace(/\//g, path5.sep);
48890
+ const directory = path5.join(appsPath, normalizedKey);
48885
48891
  if (!fileIsExist(directory)) {
48886
48892
  return;
48887
48893
  }
@@ -48890,7 +48896,7 @@ var deleteFileAppInfo2 = async (key, appsPath) => {
48890
48896
 
48891
48897
  // src/module/local-apps/src/modules/manager.ts
48892
48898
  import { fork as fork2 } from "node:child_process";
48893
- import path5 from "node:path";
48899
+ import path6 from "node:path";
48894
48900
  var import_fast_glob = __toESM(require_out4(), 1);
48895
48901
  import fs6 from "node:fs";
48896
48902
 
@@ -49378,7 +49384,7 @@ var LoadApp = async (app, opts) => {
49378
49384
  console.error("app is not found");
49379
49385
  return false;
49380
49386
  }
49381
- const pathEntry = path5.join(app.path, app.entry);
49387
+ const pathEntry = path6.join(app.path, app.entry);
49382
49388
  if (!fileIsExist(pathEntry)) {
49383
49389
  console.error("file entry not found");
49384
49390
  return false;
@@ -49398,7 +49404,7 @@ var LoadApp = async (app, opts) => {
49398
49404
  });
49399
49405
  app.process = childProcess;
49400
49406
  } else if (app.type === "system-app" /* SystemApp */) {
49401
- const pathEntryAndTimestamp = path5.join(app.path, entry2);
49407
+ const pathEntryAndTimestamp = path6.join(app.path, entry2);
49402
49408
  const importPath = process.platform === "win32" ? "file:///" + pathEntryAndTimestamp.replace(/\\/g, "/") : pathEntryAndTimestamp;
49403
49409
  const module = await import(importPath);
49404
49410
  if (module.loadApp && mainApp) {
@@ -49407,7 +49413,7 @@ var LoadApp = async (app, opts) => {
49407
49413
  } else if (app.type === "gateway-app" /* GatewayApp */) {
49408
49414
  console.log("gateway app not support");
49409
49415
  } else if (app.type === "pm2-system-app" /* Pm2SystemApp */) {
49410
- const pathEntry2 = path5.join(app.path, app.entry);
49416
+ const pathEntry2 = path6.join(app.path, app.entry);
49411
49417
  const pm2Manager = new Pm2Manager2({
49412
49418
  appName: app.key,
49413
49419
  script: pathEntry2,
@@ -49425,7 +49431,7 @@ var LoadApp = async (app, opts) => {
49425
49431
  pm2Options.interpreter = pm2Options.interpreter || app?.engine;
49426
49432
  }
49427
49433
  if (!pm2Options.cwd) {
49428
- pm2Options.cwd = path5.join(app.path, "../..");
49434
+ pm2Options.cwd = path6.join(app.path, "../..");
49429
49435
  }
49430
49436
  await pm2Manager.start(pm2Options);
49431
49437
  } else if (app.type === "script-app" /* ScriptApp */) {
@@ -49460,13 +49466,13 @@ var StopApp = async (app, opts) => {
49460
49466
  }
49461
49467
  };
49462
49468
  var installAppFromKey2 = async (key, _appPath) => {
49463
- const normalizedKey = key.replace(/\//g, path5.sep);
49464
- const directory = path5.join(_appPath, normalizedKey);
49469
+ const normalizedKey = key.replace(/\//g, path6.sep);
49470
+ const directory = path6.join(_appPath, normalizedKey);
49465
49471
  if (!fileIsExist(directory)) {
49466
49472
  console.error("App not found", directory);
49467
49473
  throw new Error("App not found");
49468
49474
  }
49469
- const pkgs = path5.join(directory, "package.json");
49475
+ const pkgs = path6.join(directory, "package.json");
49470
49476
  if (!fileIsExist(pkgs)) {
49471
49477
  throw new Error("Invalid package.json, need package.json in app directory");
49472
49478
  }
@@ -49477,8 +49483,8 @@ var installAppFromKey2 = async (key, _appPath) => {
49477
49483
  console.error("need name, version and app in package.json");
49478
49484
  throw new Error("Invalid package.json format, need name, version and app");
49479
49485
  }
49480
- const readmeFile = path5.join(directory, "README.md");
49481
- const readmeFile2 = path5.join(directory, "readme.md");
49486
+ const readmeFile = path6.join(directory, "README.md");
49487
+ const readmeFile2 = path6.join(directory, "readme.md");
49482
49488
  let readmeDesc = "";
49483
49489
  if (fileIsExist(readmeFile)) {
49484
49490
  readmeDesc = fs6.readFileSync(readmeFile, "utf-8");
@@ -49498,13 +49504,13 @@ var installAppFromKey2 = async (key, _appPath) => {
49498
49504
  };
49499
49505
  app.key = key;
49500
49506
  if (app.type === "pm2-system-app") {
49501
- const pm2Cwd = path5.join(_appPath, "..");
49507
+ const pm2Cwd = path6.join(_appPath, "..");
49502
49508
  showAppInfo.pm2Options = { cwd: pm2Cwd, ...app.pm2Options };
49503
49509
  }
49504
49510
  return { pkg, showAppInfo };
49505
49511
  };
49506
49512
  var getAppPathKeys2 = async (_appPath) => {
49507
- const directory = path5.resolve(_appPath);
49513
+ const directory = path6.resolve(_appPath);
49508
49514
  const root2 = directory;
49509
49515
  const path1 = "*/package.json";
49510
49516
  const path22 = "*/*/package.json";
@@ -49515,7 +49521,7 @@ var getAppPathKeys2 = async (_appPath) => {
49515
49521
  ignore: ["**/node_modules/**"]
49516
49522
  });
49517
49523
  const appPathKeys = appsPackages.map((pkg) => {
49518
- const dir = path5.dirname(pkg);
49524
+ const dir = path6.dirname(pkg);
49519
49525
  return dir.replace(/\\/g, "/");
49520
49526
  });
49521
49527
  return appPathKeys;
@@ -49523,8 +49529,8 @@ var getAppPathKeys2 = async (_appPath) => {
49523
49529
 
49524
49530
  // src/module/assistant/local-app-manager/assistant-app.ts
49525
49531
  var import_fast_glob3 = __toESM(require_out4(), 1);
49526
- import path7 from "node:path";
49527
- import fs10 from "node:fs";
49532
+ import path9 from "node:path";
49533
+ import fs11 from "node:fs";
49528
49534
 
49529
49535
  // ../node_modules/.pnpm/eventemitter3@5.0.4/node_modules/eventemitter3/index.mjs
49530
49536
  var import__ = __toESM(require_eventemitter3(), 1);
@@ -50191,8 +50197,8 @@ class Parser {
50191
50197
  }
50192
50198
 
50193
50199
  class Executor {
50194
- getValueByPath(obj, path6) {
50195
- return path6.split(".").reduce((acc, part) => acc?.[part], obj);
50200
+ getValueByPath(obj, path7) {
50201
+ return path7.split(".").reduce((acc, part) => acc?.[part], obj);
50196
50202
  }
50197
50203
  likeToRegex(pattern2) {
50198
50204
  let regex = "";
@@ -50342,15 +50348,15 @@ var initApi = async (opts) => {
50342
50348
  };
50343
50349
  // src/module/light-code/index.ts
50344
50350
  var import_fast_glob2 = __toESM(require_out4(), 1);
50345
- import path6 from "node:path";
50351
+ import path7 from "node:path";
50346
50352
  import fs9 from "node:fs";
50347
50353
 
50348
50354
  // src/module/light-code/run.ts
50349
50355
  import { fork as fork3 } from "node:child_process";
50350
50356
  import fs7 from "fs";
50351
- var fileExists = (path6) => {
50357
+ var fileExists = (path7) => {
50352
50358
  try {
50353
- fs7.accessSync(path6, fs7.constants.F_OK);
50359
+ fs7.accessSync(path7, fs7.constants.F_OK);
50354
50360
  return true;
50355
50361
  } catch (e) {
50356
50362
  return false;
@@ -50487,7 +50493,7 @@ var initLightCode = async (opts) => {
50487
50493
  return;
50488
50494
  }
50489
50495
  const appDir = config2.configPath.appsDir;
50490
- const lightcodeDir = path6.join(appDir, "light-code", "code");
50496
+ const lightcodeDir = path7.join(appDir, "light-code", "code");
50491
50497
  if (!fs9.existsSync(lightcodeDir)) {
50492
50498
  fs9.mkdirSync(lightcodeDir, { recursive: true });
50493
50499
  }
@@ -50497,7 +50503,7 @@ var initLightCode = async (opts) => {
50497
50503
  onlyFiles: true
50498
50504
  }).map((file2) => {
50499
50505
  return {
50500
- filepath: path6.join(lightcodeDir, file2)
50506
+ filepath: path7.join(lightcodeDir, file2)
50501
50507
  };
50502
50508
  });
50503
50509
  if (sync2) {
@@ -50510,7 +50516,7 @@ var initLightCode = async (opts) => {
50510
50516
  const lightQueryList = queryRes.data?.list || [];
50511
50517
  for (const item of lightQueryList) {
50512
50518
  const codeHash = getStringHash(item.code || "");
50513
- diffList.push({ id: item.id, code: item.code || "", hash: codeHash, filepath: path6.join(lightcodeDir, `${item.id}.ts`) });
50519
+ diffList.push({ id: item.id, code: item.code || "", hash: codeHash, filepath: path7.join(lightcodeDir, `${item.id}.ts`) });
50514
50520
  }
50515
50521
  const codeFileSet = new Set(codeFiles.map((f) => f.filepath));
50516
50522
  const toAdd = diffList.filter((d) => !codeFileSet.has(d.filepath));
@@ -50581,6 +50587,86 @@ var initLightCode = async (opts) => {
50581
50587
  console.log(`light-code 路由注册成功`, `注册${diffList.length}个路由`);
50582
50588
  };
50583
50589
 
50590
+ // src/module/assistant/local-app-manager/assistant-app-resolve.ts
50591
+ import path8 from "node:path";
50592
+ import fs10 from "node:fs";
50593
+
50594
+ class ModuleResolver {
50595
+ root;
50596
+ pkgCache = new Map;
50597
+ constructor(root2) {
50598
+ this.root = root2;
50599
+ }
50600
+ resolve(routePath) {
50601
+ if (path8.isAbsolute(routePath)) {
50602
+ return routePath;
50603
+ }
50604
+ if (routePath.startsWith("@")) {
50605
+ return this.resolveScopedPackage(routePath);
50606
+ }
50607
+ if (!routePath.startsWith(".") && !routePath.startsWith("/")) {
50608
+ const pkgPath = path8.join(this.root, "node_modules", routePath);
50609
+ if (this.fileIsExists(pkgPath)) {
50610
+ return pkgPath;
50611
+ }
50612
+ }
50613
+ const localFullPath = path8.resolve(this.root, routePath);
50614
+ return this.fileIsExists(localFullPath) ? localFullPath : routePath;
50615
+ }
50616
+ resolveScopedPackage(routePath) {
50617
+ const parts = routePath.split("/");
50618
+ const pkgName = parts.slice(0, 2).join("/");
50619
+ const subPath = parts.slice(2).join("/");
50620
+ const pkgPath = path8.join(this.root, "node_modules", pkgName);
50621
+ const pkgJsonPath = path8.join(pkgPath, "package.json");
50622
+ const pkg = this.readPackageJson(pkgJsonPath);
50623
+ if (!pkg) {
50624
+ return routePath;
50625
+ }
50626
+ const entryPath = this.resolvePackageExport(pkg, subPath);
50627
+ return path8.join(pkgPath, entryPath);
50628
+ }
50629
+ resolvePackageExport(pkg, subPath) {
50630
+ const exportsField = pkg.exports;
50631
+ if (exportsField && typeof exportsField === "object") {
50632
+ const exportKey = subPath ? `./${subPath}` : ".";
50633
+ if (exportsField[exportKey]) {
50634
+ const entry2 = exportsField[exportKey];
50635
+ if (typeof entry2 === "object") {
50636
+ return entry2.import || entry2.default || entry2;
50637
+ }
50638
+ return entry2;
50639
+ }
50640
+ }
50641
+ return pkg.main || "index.js";
50642
+ }
50643
+ readPackageJson(pkgJsonPath) {
50644
+ try {
50645
+ const cached2 = this.pkgCache.get(pkgJsonPath);
50646
+ const stats = fs10.statSync(pkgJsonPath);
50647
+ if (cached2 && cached2.mtime === stats.mtimeMs) {
50648
+ return cached2.pkg;
50649
+ }
50650
+ const pkg = JSON.parse(fs10.readFileSync(pkgJsonPath, "utf-8"));
50651
+ this.pkgCache.set(pkgJsonPath, { pkg, mtime: stats.mtimeMs });
50652
+ return pkg;
50653
+ } catch {
50654
+ return null;
50655
+ }
50656
+ }
50657
+ fileIsExists(filepath) {
50658
+ try {
50659
+ fs10.accessSync(filepath, fs10.constants.F_OK);
50660
+ return true;
50661
+ } catch {
50662
+ return false;
50663
+ }
50664
+ }
50665
+ clearCache() {
50666
+ this.pkgCache.clear();
50667
+ }
50668
+ }
50669
+
50584
50670
  // src/module/assistant/local-app-manager/assistant-app.ts
50585
50671
  class AssistantApp extends Manager2 {
50586
50672
  config;
@@ -50589,12 +50675,13 @@ class AssistantApp extends Manager2 {
50589
50675
  attemptedConnectTimes = 0;
50590
50676
  remoteApp = null;
50591
50677
  remoteUrl = null;
50678
+ resolver;
50592
50679
  constructor(config2, mainApp) {
50593
50680
  config2.checkMounted();
50594
- const appsPath = config2?.configPath?.appsDir || path7.join(process.cwd(), "apps");
50595
- const pagesPath = config2?.configPath?.pagesDir || path7.join(process.cwd(), "pages");
50681
+ const appsPath = config2?.configPath?.appsDir || path9.join(process.cwd(), "apps");
50682
+ const pagesPath = config2?.configPath?.pagesDir || path9.join(process.cwd(), "pages");
50596
50683
  const appsConfigPath = config2.configPath?.appsConfigPath;
50597
- const configFimename = path7.basename(appsConfigPath || "");
50684
+ const configFimename = path9.basename(appsConfigPath || "");
50598
50685
  super({
50599
50686
  appsPath,
50600
50687
  configFilename: configFimename,
@@ -50602,6 +50689,7 @@ class AssistantApp extends Manager2 {
50602
50689
  });
50603
50690
  this.pagesPath = pagesPath;
50604
50691
  this.config = config2;
50692
+ this.resolver = new ModuleResolver(config2.configPath.configDir);
50605
50693
  }
50606
50694
  async pageList() {
50607
50695
  const pages = await import_fast_glob3.default(["*/*/package.json"], {
@@ -50610,7 +50698,7 @@ class AssistantApp extends Manager2 {
50610
50698
  });
50611
50699
  const pagesParse = pages.map((page) => {
50612
50700
  const [user, app] = page.split("/");
50613
- const contentStr = fs10.readFileSync(path7.join(this.pagesPath, page), "utf-8");
50701
+ const contentStr = fs11.readFileSync(path9.join(this.pagesPath, page), "utf-8");
50614
50702
  const content = parseIfJson2(contentStr);
50615
50703
  return {
50616
50704
  user,
@@ -50633,7 +50721,7 @@ class AssistantApp extends Manager2 {
50633
50721
  });
50634
50722
  const pagesParse = pages.map((page) => {
50635
50723
  const relativePath = page;
50636
- const contentStr = fs10.readFileSync(path7.join(root2, page), "utf-8");
50724
+ const contentStr = fs11.readFileSync(path9.join(root2, page), "utf-8");
50637
50725
  const content = parseIfJson2(contentStr);
50638
50726
  if (!content.appType) {
50639
50727
  const isWeb = relativePath.startsWith("pages/");
@@ -50783,14 +50871,10 @@ class AssistantApp extends Manager2 {
50783
50871
  const routes = this.config.getConfig().routes || [];
50784
50872
  for (const route of routes) {
50785
50873
  try {
50786
- if (typeof route === "string") {
50787
- await import(route);
50788
- console.log("安装路由", route);
50789
- } else if (typeof route === "object" && route.path) {
50790
- const routePath = route.path;
50791
- await import(routePath);
50792
- console.log("安装路由", routePath);
50793
- }
50874
+ const routeStr = typeof route === "string" ? route : route.path;
50875
+ const resolvedPath = this.resolver.resolve(routeStr);
50876
+ await import(resolvedPath);
50877
+ console.log("路由已初始化", route);
50794
50878
  } catch (err) {
50795
50879
  console.error("初始化路由失败", route, err);
50796
50880
  }
@@ -51648,13 +51732,13 @@ class AssistantInit extends AssistantConfig {
51648
51732
  });
51649
51733
  }
51650
51734
  checkConfigPath() {
51651
- const assistantPath = path8.join(this.configDir, "assistant-app", "assistant-config.json");
51735
+ const assistantPath = path10.join(this.configDir, "assistant-app", "assistant-config.json");
51652
51736
  return checkFileExists(assistantPath);
51653
51737
  }
51654
51738
  createEnvConfig() {
51655
51739
  const env3 = this.configPath?.envConfigPath;
51656
51740
  if (!checkFileExists(env3, true)) {
51657
- fs11.writeFileSync(env3, `# 环境配置文件
51741
+ fs12.writeFileSync(env3, `# 环境配置文件
51658
51742
  `);
51659
51743
  console.log(chalk2.green("助手环境配置.env文件创建成功"));
51660
51744
  }
@@ -51662,7 +51746,7 @@ class AssistantInit extends AssistantConfig {
51662
51746
  createOtherConfig() {
51663
51747
  const appsConfig = this.configPath?.appsConfigPath;
51664
51748
  if (!checkFileExists(appsConfig, true)) {
51665
- fs11.writeFileSync(appsConfig, JSON.stringify({ description: "apps manager.", list: [] }));
51749
+ fs12.writeFileSync(appsConfig, JSON.stringify({ description: "apps manager.", list: [] }));
51666
51750
  console.log(chalk2.green("助手应用配置文件 apps.json 创建成功"));
51667
51751
  }
51668
51752
  }
@@ -51684,20 +51768,20 @@ class AssistantInit extends AssistantConfig {
51684
51768
  }
51685
51769
  }
51686
51770
  initPnpm() {
51687
- const pnpmPath = path8.join(this.configDir, "assistant-app", "pnpm-workspace.yaml");
51771
+ const pnpmPath = path10.join(this.configDir, "assistant-app", "pnpm-workspace.yaml");
51688
51772
  let create = false;
51689
51773
  if (!checkFileExists(pnpmPath, true)) {
51690
51774
  create = true;
51691
- fs11.writeFileSync(pnpmPath, `packages:
51775
+ fs12.writeFileSync(pnpmPath, `packages:
51692
51776
  - 'apps/**/*'
51693
51777
  - 'pages/**/*'
51694
51778
  `);
51695
51779
  console.log(chalk2.green("助手 pnpm-workspace.yaml 文件创建成功"));
51696
51780
  }
51697
- const packagePath = path8.join(this.configDir, "assistant-app", "package.json");
51781
+ const packagePath = path10.join(this.configDir, "assistant-app", "package.json");
51698
51782
  if (!checkFileExists(packagePath, true)) {
51699
51783
  create = true;
51700
- fs11.writeFileSync(packagePath, `{
51784
+ fs12.writeFileSync(packagePath, `{
51701
51785
  "name": "assistant-app",
51702
51786
  "version": "1.0.0",
51703
51787
  "description": "assistant-app package pnpm, node pkgs projects",
@@ -51739,7 +51823,7 @@ class AssistantInit extends AssistantConfig {
51739
51823
  }
51740
51824
  `);
51741
51825
  console.log(chalk2.green("助手 package.json 文件创建成功, 正在安装依赖..."));
51742
- installDeps({ appPath: path8.dirname(packagePath), isProduction: true }).then(() => {
51826
+ installDeps({ appPath: path10.dirname(packagePath), isProduction: true }).then(() => {
51743
51827
  console.log("------------------------------------------------");
51744
51828
  console.log(chalk2.green("助手依赖安装完成"));
51745
51829
  console.log("------------------------------------------------");
@@ -51750,10 +51834,10 @@ class AssistantInit extends AssistantConfig {
51750
51834
  };
51751
51835
  }
51752
51836
  initIgnore() {
51753
- const gitignorePath = path8.join(this.configDir, ".gitignore");
51837
+ const gitignorePath = path10.join(this.configDir, ".gitignore");
51754
51838
  let content = "";
51755
51839
  if (checkFileExists(gitignorePath, true)) {
51756
- content = fs11.readFileSync(gitignorePath, "utf-8");
51840
+ content = fs12.readFileSync(gitignorePath, "utf-8");
51757
51841
  }
51758
51842
  const ignoreLines = [
51759
51843
  "node_modules",
@@ -51779,7 +51863,7 @@ ${line}`;
51779
51863
  }
51780
51864
  });
51781
51865
  if (updated) {
51782
- fs11.writeFileSync(gitignorePath, content.trim() + `
51866
+ fs12.writeFileSync(gitignorePath, content.trim() + `
51783
51867
  `);
51784
51868
  console.log(chalk2.green(".gitignore 文件更新成功"));
51785
51869
  }
@@ -51935,7 +52019,7 @@ function requireEventemitter3$1() {
51935
52019
  var evt = prefix ? prefix + event : event;
51936
52020
  if (!this._events[evt])
51937
52021
  return false;
51938
- var listeners = this._events[evt], len = arguments.length, args, i;
52022
+ var listeners = this._events[evt], len = arguments.length, args2, i;
51939
52023
  if (listeners.fn) {
51940
52024
  if (listeners.once)
51941
52025
  this.removeListener(event, listeners.fn, undefined, true);
@@ -51953,10 +52037,10 @@ function requireEventemitter3$1() {
51953
52037
  case 6:
51954
52038
  return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
51955
52039
  }
51956
- for (i = 1, args = new Array(len - 1);i < len; i++) {
51957
- args[i - 1] = arguments[i];
52040
+ for (i = 1, args2 = new Array(len - 1);i < len; i++) {
52041
+ args2[i - 1] = arguments[i];
51958
52042
  }
51959
- listeners.fn.apply(listeners.context, args);
52043
+ listeners.fn.apply(listeners.context, args2);
51960
52044
  } else {
51961
52045
  var length = listeners.length, j;
51962
52046
  for (i = 0;i < length; i++) {
@@ -51976,11 +52060,11 @@ function requireEventemitter3$1() {
51976
52060
  listeners[i].fn.call(listeners[i].context, a1, a2, a3);
51977
52061
  break;
51978
52062
  default:
51979
- if (!args)
51980
- for (j = 1, args = new Array(len - 1);j < len; j++) {
51981
- args[j - 1] = arguments[j];
52063
+ if (!args2)
52064
+ for (j = 1, args2 = new Array(len - 1);j < len; j++) {
52065
+ args2[j - 1] = arguments[j];
51982
52066
  }
51983
- listeners[i].fn.apply(listeners[i].context, args);
52067
+ listeners[i].fn.apply(listeners[i].context, args2);
51984
52068
  }
51985
52069
  }
51986
52070
  }
@@ -52479,7 +52563,7 @@ function requireEventemitter33() {
52479
52563
  var evt = prefix ? prefix + event : event;
52480
52564
  if (!this._events[evt])
52481
52565
  return false;
52482
- var listeners = this._events[evt], len = arguments.length, args, i;
52566
+ var listeners = this._events[evt], len = arguments.length, args2, i;
52483
52567
  if (listeners.fn) {
52484
52568
  if (listeners.once)
52485
52569
  this.removeListener(event, listeners.fn, undefined, true);
@@ -52497,10 +52581,10 @@ function requireEventemitter33() {
52497
52581
  case 6:
52498
52582
  return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
52499
52583
  }
52500
- for (i = 1, args = new Array(len - 1);i < len; i++) {
52501
- args[i - 1] = arguments[i];
52584
+ for (i = 1, args2 = new Array(len - 1);i < len; i++) {
52585
+ args2[i - 1] = arguments[i];
52502
52586
  }
52503
- listeners.fn.apply(listeners.context, args);
52587
+ listeners.fn.apply(listeners.context, args2);
52504
52588
  } else {
52505
52589
  var length = listeners.length, j;
52506
52590
  for (i = 0;i < length; i++) {
@@ -52520,11 +52604,11 @@ function requireEventemitter33() {
52520
52604
  listeners[i].fn.call(listeners[i].context, a1, a2, a3);
52521
52605
  break;
52522
52606
  default:
52523
- if (!args)
52524
- for (j = 1, args = new Array(len - 1);j < len; j++) {
52525
- args[j - 1] = arguments[j];
52607
+ if (!args2)
52608
+ for (j = 1, args2 = new Array(len - 1);j < len; j++) {
52609
+ args2[j - 1] = arguments[j];
52526
52610
  }
52527
- listeners[i].fn.apply(listeners[i].context, args);
52611
+ listeners[i].fn.apply(listeners[i].context, args2);
52528
52612
  }
52529
52613
  }
52530
52614
  }
@@ -52762,10 +52846,10 @@ function mergeDefs2(...defs) {
52762
52846
  function cloneDef2(schema) {
52763
52847
  return mergeDefs2(schema._zod.def);
52764
52848
  }
52765
- function getElementAtPath2(obj, path9) {
52766
- if (!path9)
52849
+ function getElementAtPath2(obj, path11) {
52850
+ if (!path11)
52767
52851
  return obj;
52768
- return path9.reduce((acc, key) => acc?.[key], obj);
52852
+ return path11.reduce((acc, key) => acc?.[key], obj);
52769
52853
  }
52770
52854
  function promiseAllObject2(promisesObj) {
52771
52855
  const keys = Object.keys(promisesObj);
@@ -53146,11 +53230,11 @@ function aborted2(x, startIndex = 0) {
53146
53230
  }
53147
53231
  return false;
53148
53232
  }
53149
- function prefixIssues2(path9, issues) {
53233
+ function prefixIssues2(path11, issues) {
53150
53234
  return issues.map((iss) => {
53151
53235
  var _a2;
53152
53236
  (_a2 = iss).path ?? (_a2.path = []);
53153
- iss.path.unshift(path9);
53237
+ iss.path.unshift(path11);
53154
53238
  return iss;
53155
53239
  });
53156
53240
  }
@@ -53207,8 +53291,8 @@ function parsedType2(data) {
53207
53291
  }
53208
53292
  return t;
53209
53293
  }
53210
- function issue2(...args) {
53211
- const [iss, input, inst] = args;
53294
+ function issue2(...args2) {
53295
+ const [iss, input, inst] = args2;
53212
53296
  if (typeof iss === "string") {
53213
53297
  return {
53214
53298
  message: iss,
@@ -53396,7 +53480,7 @@ function formatError2(error3, mapper = (issue3) => issue3.message) {
53396
53480
  }
53397
53481
  function treeifyError2(error3, mapper = (issue3) => issue3.message) {
53398
53482
  const result = { errors: [] };
53399
- const processError = (error4, path9 = []) => {
53483
+ const processError = (error4, path11 = []) => {
53400
53484
  var _a2, _b;
53401
53485
  for (const issue3 of error4.issues) {
53402
53486
  if (issue3.code === "invalid_union" && issue3.errors.length) {
@@ -53406,7 +53490,7 @@ function treeifyError2(error3, mapper = (issue3) => issue3.message) {
53406
53490
  } else if (issue3.code === "invalid_element") {
53407
53491
  processError({ issues: issue3.issues }, issue3.path);
53408
53492
  } else {
53409
- const fullpath = [...path9, ...issue3.path];
53493
+ const fullpath = [...path11, ...issue3.path];
53410
53494
  if (fullpath.length === 0) {
53411
53495
  result.errors.push(mapper(issue3));
53412
53496
  continue;
@@ -53438,8 +53522,8 @@ function treeifyError2(error3, mapper = (issue3) => issue3.message) {
53438
53522
  }
53439
53523
  function toDotPath2(_path) {
53440
53524
  const segs = [];
53441
- const path9 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
53442
- for (const seg of path9) {
53525
+ const path11 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
53526
+ for (const seg of path11) {
53443
53527
  if (typeof seg === "number")
53444
53528
  segs.push(`[${seg}]`);
53445
53529
  else if (typeof seg === "symbol")
@@ -53593,20 +53677,20 @@ var domain2 = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/
53593
53677
  var e164$12 = /^\+[1-9]\d{6,14}$/;
53594
53678
  var dateSource2 = `(?:(?:\\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])))`;
53595
53679
  var date$32 = /* @__PURE__ */ new RegExp(`^${dateSource2}$`);
53596
- function timeSource2(args) {
53680
+ function timeSource2(args2) {
53597
53681
  const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
53598
- 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+)?)?`;
53682
+ 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+)?)?`;
53599
53683
  return regex;
53600
53684
  }
53601
- function time$12(args) {
53602
- return new RegExp(`^${timeSource2(args)}$`);
53685
+ function time$12(args2) {
53686
+ return new RegExp(`^${timeSource2(args2)}$`);
53603
53687
  }
53604
- function datetime$12(args) {
53605
- const time2 = timeSource2({ precision: args.precision });
53688
+ function datetime$12(args2) {
53689
+ const time2 = timeSource2({ precision: args2.precision });
53606
53690
  const opts = ["Z"];
53607
- if (args.local)
53691
+ if (args2.local)
53608
53692
  opts.push("");
53609
- if (args.offset)
53693
+ if (args2.offset)
53610
53694
  opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);
53611
53695
  const timeRegex = `${time2}(?:${opts.join("|")})`;
53612
53696
  return new RegExp(`^${dateSource2}T(?:${timeRegex})$`);
@@ -54253,11 +54337,11 @@ var $ZodCheckOverwrite2 = /* @__PURE__ */ $constructor2("$ZodCheckOverwrite", (i
54253
54337
  });
54254
54338
 
54255
54339
  class Doc2 {
54256
- constructor(args = []) {
54340
+ constructor(args2 = []) {
54257
54341
  this.content = [];
54258
54342
  this.indent = 0;
54259
54343
  if (this)
54260
- this.args = args;
54344
+ this.args = args2;
54261
54345
  }
54262
54346
  indented(fn) {
54263
54347
  this.indent += 1;
@@ -54281,10 +54365,10 @@ class Doc2 {
54281
54365
  }
54282
54366
  compile() {
54283
54367
  const F = Function;
54284
- const args = this?.args;
54368
+ const args2 = this?.args;
54285
54369
  const content = this?.content ?? [``];
54286
54370
  const lines = [...content.map((x) => ` ${x}`)];
54287
- return new F(...args, lines.join(`
54371
+ return new F(...args2, lines.join(`
54288
54372
  `));
54289
54373
  }
54290
54374
  }
@@ -56137,8 +56221,8 @@ var $ZodFunction2 = /* @__PURE__ */ $constructor2("$ZodFunction", (inst, def) =>
56137
56221
  if (typeof func !== "function") {
56138
56222
  throw new Error("implement() must be called with a function");
56139
56223
  }
56140
- return function(...args) {
56141
- const parsedArgs = inst._def.input ? parse$12(inst._def.input, args) : args;
56224
+ return function(...args2) {
56225
+ const parsedArgs = inst._def.input ? parse$12(inst._def.input, args2) : args2;
56142
56226
  const result = Reflect.apply(func, this, parsedArgs);
56143
56227
  if (inst._def.output) {
56144
56228
  return parse$12(inst._def.output, result);
@@ -56150,8 +56234,8 @@ var $ZodFunction2 = /* @__PURE__ */ $constructor2("$ZodFunction", (inst, def) =>
56150
56234
  if (typeof func !== "function") {
56151
56235
  throw new Error("implementAsync() must be called with a function");
56152
56236
  }
56153
- return async function(...args) {
56154
- const parsedArgs = inst._def.input ? await parseAsync$12(inst._def.input, args) : args;
56237
+ return async function(...args2) {
56238
+ const parsedArgs = inst._def.input ? await parseAsync$12(inst._def.input, args2) : args2;
56155
56239
  const result = await Reflect.apply(func, this, parsedArgs);
56156
56240
  if (inst._def.output) {
56157
56241
  return await parseAsync$12(inst._def.output, result);
@@ -56177,22 +56261,22 @@ var $ZodFunction2 = /* @__PURE__ */ $constructor2("$ZodFunction", (inst, def) =>
56177
56261
  }
56178
56262
  return payload;
56179
56263
  };
56180
- inst.input = (...args) => {
56264
+ inst.input = (...args2) => {
56181
56265
  const F = inst.constructor;
56182
- if (Array.isArray(args[0])) {
56266
+ if (Array.isArray(args2[0])) {
56183
56267
  return new F({
56184
56268
  type: "function",
56185
56269
  input: new $ZodTuple2({
56186
56270
  type: "tuple",
56187
- items: args[0],
56188
- rest: args[1]
56271
+ items: args2[0],
56272
+ rest: args2[1]
56189
56273
  }),
56190
56274
  output: inst._def.output
56191
56275
  });
56192
56276
  }
56193
56277
  return new F({
56194
56278
  type: "function",
56195
- input: args[0],
56279
+ input: args2[0],
56196
56280
  output: inst._def.output
56197
56281
  });
56198
56282
  };
@@ -64114,12 +64198,12 @@ var ZodType2 = /* @__PURE__ */ $constructor2("ZodType", (inst, def) => {
64114
64198
  },
64115
64199
  configurable: true
64116
64200
  });
64117
- inst.meta = (...args) => {
64118
- if (args.length === 0) {
64201
+ inst.meta = (...args2) => {
64202
+ if (args2.length === 0) {
64119
64203
  return globalRegistry2.get(inst);
64120
64204
  }
64121
64205
  const cl = inst.clone();
64122
- globalRegistry2.add(cl, args[0]);
64206
+ globalRegistry2.add(cl, args2[0]);
64123
64207
  return cl;
64124
64208
  };
64125
64209
  inst.isOptional = () => inst.safeParse(undefined).success;
@@ -64135,18 +64219,18 @@ var _ZodString2 = /* @__PURE__ */ $constructor2("_ZodString", (inst, def) => {
64135
64219
  inst.format = bag.format ?? null;
64136
64220
  inst.minLength = bag.minimum ?? null;
64137
64221
  inst.maxLength = bag.maximum ?? null;
64138
- inst.regex = (...args) => inst.check(_regex2(...args));
64139
- inst.includes = (...args) => inst.check(_includes2(...args));
64140
- inst.startsWith = (...args) => inst.check(_startsWith2(...args));
64141
- inst.endsWith = (...args) => inst.check(_endsWith2(...args));
64142
- inst.min = (...args) => inst.check(_minLength2(...args));
64143
- inst.max = (...args) => inst.check(_maxLength2(...args));
64144
- inst.length = (...args) => inst.check(_length2(...args));
64145
- inst.nonempty = (...args) => inst.check(_minLength2(1, ...args));
64222
+ inst.regex = (...args2) => inst.check(_regex2(...args2));
64223
+ inst.includes = (...args2) => inst.check(_includes2(...args2));
64224
+ inst.startsWith = (...args2) => inst.check(_startsWith2(...args2));
64225
+ inst.endsWith = (...args2) => inst.check(_endsWith2(...args2));
64226
+ inst.min = (...args2) => inst.check(_minLength2(...args2));
64227
+ inst.max = (...args2) => inst.check(_maxLength2(...args2));
64228
+ inst.length = (...args2) => inst.check(_length2(...args2));
64229
+ inst.nonempty = (...args2) => inst.check(_minLength2(1, ...args2));
64146
64230
  inst.lowercase = (params) => inst.check(_lowercase2(params));
64147
64231
  inst.uppercase = (params) => inst.check(_uppercase2(params));
64148
64232
  inst.trim = () => inst.check(_trim2());
64149
- inst.normalize = (...args) => inst.check(_normalize2(...args));
64233
+ inst.normalize = (...args2) => inst.check(_normalize2(...args2));
64150
64234
  inst.toLowerCase = () => inst.check(_toLowerCase2());
64151
64235
  inst.toUpperCase = () => inst.check(_toUpperCase2());
64152
64236
  inst.slugify = () => inst.check(_slugify2());
@@ -64566,8 +64650,8 @@ var ZodObject2 = /* @__PURE__ */ $constructor2("ZodObject", (inst, def) => {
64566
64650
  inst.merge = (other) => merge4(inst, other);
64567
64651
  inst.pick = (mask) => pick2(inst, mask);
64568
64652
  inst.omit = (mask) => omit2(inst, mask);
64569
- inst.partial = (...args) => partial3(ZodOptional2, inst, args[0]);
64570
- inst.required = (...args) => required2(ZodNonOptional2, inst, args[0]);
64653
+ inst.partial = (...args2) => partial3(ZodOptional2, inst, args2[0]);
64654
+ inst.required = (...args2) => required2(ZodNonOptional2, inst, args2[0]);
64571
64655
  });
64572
64656
  function object2(shape, params) {
64573
64657
  const def = {
@@ -64704,10 +64788,10 @@ var ZodMap2 = /* @__PURE__ */ $constructor2("ZodMap", (inst, def) => {
64704
64788
  inst._zod.processJSONSchema = (ctx, json2, params) => mapProcessor2(inst, ctx);
64705
64789
  inst.keyType = def.keyType;
64706
64790
  inst.valueType = def.valueType;
64707
- inst.min = (...args) => inst.check(_minSize2(...args));
64791
+ inst.min = (...args2) => inst.check(_minSize2(...args2));
64708
64792
  inst.nonempty = (params) => inst.check(_minSize2(1, params));
64709
- inst.max = (...args) => inst.check(_maxSize2(...args));
64710
- inst.size = (...args) => inst.check(_size2(...args));
64793
+ inst.max = (...args2) => inst.check(_maxSize2(...args2));
64794
+ inst.size = (...args2) => inst.check(_size2(...args2));
64711
64795
  });
64712
64796
  function map2(keyType, valueType, params) {
64713
64797
  return new ZodMap2({
@@ -64721,10 +64805,10 @@ var ZodSet2 = /* @__PURE__ */ $constructor2("ZodSet", (inst, def) => {
64721
64805
  $ZodSet2.init(inst, def);
64722
64806
  ZodType2.init(inst, def);
64723
64807
  inst._zod.processJSONSchema = (ctx, json2, params) => setProcessor2(inst, ctx);
64724
- inst.min = (...args) => inst.check(_minSize2(...args));
64808
+ inst.min = (...args2) => inst.check(_minSize2(...args2));
64725
64809
  inst.nonempty = (params) => inst.check(_minSize2(1, params));
64726
- inst.max = (...args) => inst.check(_maxSize2(...args));
64727
- inst.size = (...args) => inst.check(_size2(...args));
64810
+ inst.max = (...args2) => inst.check(_maxSize2(...args2));
64811
+ inst.size = (...args2) => inst.check(_size2(...args2));
64728
64812
  });
64729
64813
  function set2(valueType, params) {
64730
64814
  return new ZodSet2({
@@ -65105,11 +65189,11 @@ function _instanceof2(cls, params = {}) {
65105
65189
  };
65106
65190
  return inst;
65107
65191
  }
65108
- var stringbool2 = (...args) => _stringbool2({
65192
+ var stringbool2 = (...args2) => _stringbool2({
65109
65193
  Codec: ZodCodec2,
65110
65194
  Boolean: ZodBoolean2,
65111
65195
  String: ZodString2
65112
- }, ...args);
65196
+ }, ...args2);
65113
65197
  function json2(params) {
65114
65198
  const jsonSchema3 = lazy2(() => {
65115
65199
  return union2([string$12(params), number$12(), boolean$12(), _null2(), array3(jsonSchema3), record2(string$12(), jsonSchema3)]);
@@ -65390,13 +65474,13 @@ function resolveRef2(ref, ctx) {
65390
65474
  if (!ref.startsWith("#")) {
65391
65475
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
65392
65476
  }
65393
- const path9 = ref.slice(1).split("/").filter(Boolean);
65394
- if (path9.length === 0) {
65477
+ const path11 = ref.slice(1).split("/").filter(Boolean);
65478
+ if (path11.length === 0) {
65395
65479
  return ctx.rootSchema;
65396
65480
  }
65397
65481
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
65398
- if (path9[0] === defsKey) {
65399
- const key = path9[1];
65482
+ if (path11[0] === defsKey) {
65483
+ const key = path11[1];
65400
65484
  if (!key || !ctx.defs[key]) {
65401
65485
  throw new Error(`Reference not found: ${ref}`);
65402
65486
  }
@@ -66286,8 +66370,8 @@ class Parser2 {
66286
66370
  }
66287
66371
 
66288
66372
  class Executor2 {
66289
- getValueByPath(obj, path9) {
66290
- return path9.split(".").reduce((acc, part) => acc?.[part], obj);
66373
+ getValueByPath(obj, path11) {
66374
+ return path11.split(".").reduce((acc, part) => acc?.[part], obj);
66291
66375
  }
66292
66376
  likeToRegex(pattern2) {
66293
66377
  let regex = "";
@@ -66405,11 +66489,11 @@ var addCallFn = (app2) => {
66405
66489
  })
66406
66490
  }
66407
66491
  }).define(async (ctx) => {
66408
- const { path: path9, key = "" } = ctx.query;
66409
- if (!path9) {
66492
+ const { path: path11, key = "" } = ctx.query;
66493
+ if (!path11) {
66410
66494
  ctx.throw("路径path不能为空");
66411
66495
  }
66412
- const res = await ctx.run({ path: path9, key, payload: ctx.query.payload || {} }, {
66496
+ const res = await ctx.run({ path: path11, key, payload: ctx.query.payload || {} }, {
66413
66497
  ...ctx
66414
66498
  });
66415
66499
  ctx.forward(res);
@@ -66450,11 +66534,11 @@ var createRouterAgentPluginFn = (opts) => {
66450
66534
  name: metadata.title || metadata.skill,
66451
66535
  description: metadata.summary || "",
66452
66536
  args: metadata.args || {},
66453
- async execute(args) {
66537
+ async execute(args2) {
66454
66538
  const res = await router.run({
66455
66539
  path: route.path,
66456
66540
  key: route.key,
66457
- payload: args
66541
+ payload: args2
66458
66542
  }, { appId: router.appId });
66459
66543
  if (res.code === 200) {
66460
66544
  if (res.data?.content) {
@@ -66535,8 +66619,8 @@ app.route({
66535
66619
  }).addTo(app);
66536
66620
 
66537
66621
  // src/services/app/index.ts
66538
- import path9 from "path";
66539
- import fs12 from "fs";
66622
+ import path11 from "path";
66623
+ import fs13 from "fs";
66540
66624
 
66541
66625
  // ../node_modules/.pnpm/@inquirer+core@11.1.1_@types+node@25.1.0/node_modules/@inquirer/core/dist/lib/key.js
66542
66626
  var isTabKey = (key) => key.name === "tab";
@@ -66608,14 +66692,14 @@ function readline() {
66608
66692
  return getStore().rl;
66609
66693
  }
66610
66694
  function withUpdates(fn) {
66611
- const wrapped = (...args) => {
66695
+ const wrapped = (...args2) => {
66612
66696
  const store = getStore();
66613
66697
  let shouldUpdate = false;
66614
66698
  const oldHandleChange = store.handleChange;
66615
66699
  store.handleChange = () => {
66616
66700
  shouldUpdate = true;
66617
66701
  };
66618
- const returnValue = fn(...args);
66702
+ const returnValue = fn(...args2);
66619
66703
  if (shouldUpdate) {
66620
66704
  oldHandleChange();
66621
66705
  }
@@ -67736,17 +67820,17 @@ class SignalExit extends SignalExitBase {
67736
67820
  this.#emitter.emit("exit", this.#process.exitCode, null);
67737
67821
  return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
67738
67822
  }
67739
- #processEmit(ev, ...args) {
67823
+ #processEmit(ev, ...args2) {
67740
67824
  const og = this.#originalProcessEmit;
67741
67825
  if (ev === "exit" && processOk(this.#process)) {
67742
- if (typeof args[0] === "number") {
67743
- this.#process.exitCode = args[0];
67826
+ if (typeof args2[0] === "number") {
67827
+ this.#process.exitCode = args2[0];
67744
67828
  }
67745
- const ret = og.call(this.#process, ev, ...args);
67829
+ const ret = og.call(this.#process, ev, ...args2);
67746
67830
  this.#emitter.emit("exit", this.#process.exitCode, null);
67747
67831
  return ret;
67748
67832
  } else {
67749
- return og.call(this.#process, ev, ...args);
67833
+ return og.call(this.#process, ev, ...args2);
67750
67834
  }
67751
67835
  }
67752
67836
  }
@@ -67987,8 +68071,8 @@ var dist_default2 = createPrompt((config4, done) => {
67987
68071
  });
67988
68072
  // src/services/app/index.ts
67989
68073
  import { spawnSync as spawnSync2 } from "child_process";
67990
- var runCommand = (command, args) => {
67991
- const result = spawnSync2(command, args, {
68074
+ var runCommand = (command, args2) => {
68075
+ const result = spawnSync2(command, args2, {
67992
68076
  stdio: "inherit",
67993
68077
  shell: true
67994
68078
  });
@@ -68021,25 +68105,25 @@ class AppDownload {
68021
68105
  throw new Error("应用名称不能为空");
68022
68106
  }
68023
68107
  const command = "ev";
68024
- const args = ["app", "download"];
68025
- args.push("-i", id3);
68108
+ const args2 = ["app", "download"];
68109
+ args2.push("-i", id3);
68026
68110
  if (type === "web") {
68027
- args.push("-o", pagesDir);
68111
+ args2.push("-o", pagesDir);
68028
68112
  } else if (type === "app") {
68029
- args.push("-o", path9.join(appsDir));
68113
+ args2.push("-o", path11.join(appsDir));
68030
68114
  } else {
68031
68115
  throw new Error("应用类型错误,只能是 web 或 app");
68032
68116
  }
68033
68117
  if (force) {
68034
- args.push("-f");
68118
+ args2.push("-f");
68035
68119
  if (opts.yes) {
68036
- args.push("-y");
68120
+ args2.push("-y");
68037
68121
  }
68038
68122
  }
68039
68123
  if (opts.registry) {
68040
- args.push("-r", opts.registry);
68124
+ args2.push("-r", opts.registry);
68041
68125
  }
68042
- return runCommand(command, args);
68126
+ return runCommand(command, args2);
68043
68127
  }
68044
68128
  async confirm(message) {
68045
68129
  return await dist_default2({
@@ -68059,10 +68143,10 @@ class AppDownload {
68059
68143
  let deletePath = "";
68060
68144
  let isDelete = false;
68061
68145
  if (type === "web") {
68062
- const pagePath = path9.join(pagesDir, id3);
68146
+ const pagePath = path11.join(pagesDir, id3);
68063
68147
  deletePath = pagePath;
68064
68148
  } else if (type === "app") {
68065
- const appPath = path9.join(appsDir, id3);
68149
+ const appPath = path11.join(appsDir, id3);
68066
68150
  deletePath = appPath;
68067
68151
  }
68068
68152
  if (deletePath && checkFileExists(deletePath)) {
@@ -68073,7 +68157,7 @@ class AppDownload {
68073
68157
  return;
68074
68158
  }
68075
68159
  }
68076
- fs12.rmSync(deletePath, { recursive: true });
68160
+ fs13.rmSync(deletePath, { recursive: true });
68077
68161
  isDelete = true;
68078
68162
  console.log(`删除应用成功: ${deletePath}`);
68079
68163
  }
@@ -69582,26 +69666,26 @@ __export2(exports_util, {
69582
69666
  TextEncoder: () => TextEncoder,
69583
69667
  TextDecoder: () => TextDecoder2
69584
69668
  });
69585
- function format(f, ...args) {
69669
+ function format(f, ...args2) {
69586
69670
  if (!isString(f)) {
69587
69671
  var objects = [f];
69588
- for (var i2 = 0;i2 < args.length; i2++)
69589
- objects.push(inspect(args[i2]));
69672
+ for (var i2 = 0;i2 < args2.length; i2++)
69673
+ objects.push(inspect(args2[i2]));
69590
69674
  return objects.join(" ");
69591
69675
  }
69592
- var i2 = 0, len2 = args.length, str = String(f).replace(formatRegExp, function(x2) {
69676
+ var i2 = 0, len2 = args2.length, str = String(f).replace(formatRegExp, function(x2) {
69593
69677
  if (x2 === "%%")
69594
69678
  return "%";
69595
69679
  if (i2 >= len2)
69596
69680
  return x2;
69597
69681
  switch (x2) {
69598
69682
  case "%s":
69599
- return String(args[i2++]);
69683
+ return String(args2[i2++]);
69600
69684
  case "%d":
69601
- return Number(args[i2++]);
69685
+ return Number(args2[i2++]);
69602
69686
  case "%j":
69603
69687
  try {
69604
- return JSON.stringify(args[i2++]);
69688
+ return JSON.stringify(args2[i2++]);
69605
69689
  } catch (_) {
69606
69690
  return "[Circular]";
69607
69691
  }
@@ -69609,7 +69693,7 @@ function format(f, ...args) {
69609
69693
  return x2;
69610
69694
  }
69611
69695
  });
69612
- for (var x = args[i2];i2 < len2; x = args[++i2])
69696
+ for (var x = args2[i2];i2 < len2; x = args2[++i2])
69613
69697
  if (isNull(x) || !isObject4(x))
69614
69698
  str += " " + x;
69615
69699
  else
@@ -69620,7 +69704,7 @@ function deprecate(fn, msg) {
69620
69704
  if (typeof process > "u" || process?.noDeprecation === true)
69621
69705
  return fn;
69622
69706
  var warned = false;
69623
- function deprecated(...args) {
69707
+ function deprecated(...args2) {
69624
69708
  if (!warned) {
69625
69709
  if (process.throwDeprecation)
69626
69710
  throw Error(msg);
@@ -69630,7 +69714,7 @@ function deprecate(fn, msg) {
69630
69714
  console.error(msg);
69631
69715
  warned = true;
69632
69716
  }
69633
- return fn.apply(this, ...args);
69717
+ return fn.apply(this, ...args2);
69634
69718
  }
69635
69719
  return deprecated;
69636
69720
  }
@@ -69848,8 +69932,8 @@ function timestamp() {
69848
69932
  var d = new Date, time3 = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(":");
69849
69933
  return [d.getDate(), months[d.getMonth()], time3].join(" ");
69850
69934
  }
69851
- function log(...args) {
69852
- console.log("%s - %s", timestamp(), format.apply(null, args));
69935
+ function log(...args2) {
69936
+ console.log("%s - %s", timestamp(), format.apply(null, args2));
69853
69937
  }
69854
69938
  function inherits(ctor, superCtor) {
69855
69939
  if (superCtor)
@@ -69876,14 +69960,14 @@ function callbackifyOnRejected(reason, cb) {
69876
69960
  function callbackify(original) {
69877
69961
  if (typeof original !== "function")
69878
69962
  throw TypeError('The "original" argument must be of type Function');
69879
- function callbackified(...args) {
69880
- var maybeCb = args.pop();
69963
+ function callbackified(...args2) {
69964
+ var maybeCb = args2.pop();
69881
69965
  if (typeof maybeCb !== "function")
69882
69966
  throw TypeError("The last argument must be of type Function");
69883
- var self2 = this, cb = function(...args2) {
69884
- return maybeCb.apply(self2, ...args2);
69967
+ var self2 = this, cb = function(...args22) {
69968
+ return maybeCb.apply(self2, ...args22);
69885
69969
  };
69886
- original.apply(this, args).then(function(ret) {
69970
+ original.apply(this, args2).then(function(ret) {
69887
69971
  process.nextTick(cb.bind(null, null, ret));
69888
69972
  }, function(rej) {
69889
69973
  process.nextTick(callbackifyOnRejected.bind(null, rej, cb));
@@ -69905,8 +69989,8 @@ var init_util = __esm2(() => {
69905
69989
  debuglog = ((debugs = {}, debugEnvRegex = {}, debugEnv) => ((debugEnv = typeof process < "u" && false) && (debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase()), debugEnvRegex = new RegExp("^" + debugEnv + "$", "i"), (set3) => {
69906
69990
  if (set3 = set3.toUpperCase(), !debugs[set3])
69907
69991
  if (debugEnvRegex.test(set3))
69908
- debugs[set3] = function(...args) {
69909
- console.error("%s: %s", set3, pid, format.apply(null, ...args));
69992
+ debugs[set3] = function(...args2) {
69993
+ console.error("%s: %s", set3, pid, format.apply(null, ...args2));
69910
69994
  };
69911
69995
  else
69912
69996
  debugs[set3] = function() {};
@@ -69942,18 +70026,18 @@ var init_util = __esm2(() => {
69942
70026
  throw TypeError('The "nodejs.util.promisify.custom" argument must be of type Function');
69943
70027
  return Object.defineProperty(fn, kCustomPromisifiedSymbol, { value: fn, enumerable: false, writable: false, configurable: true }), fn;
69944
70028
  }
69945
- function fn(...args) {
70029
+ function fn(...args2) {
69946
70030
  var promiseResolve, promiseReject, promise3 = new Promise(function(resolve, reject) {
69947
70031
  promiseResolve = resolve, promiseReject = reject;
69948
70032
  });
69949
- args.push(function(err, value) {
70033
+ args2.push(function(err, value) {
69950
70034
  if (err)
69951
70035
  promiseReject(err);
69952
70036
  else
69953
70037
  promiseResolve(value);
69954
70038
  });
69955
70039
  try {
69956
- original.apply(this, args);
70040
+ original.apply(this, args2);
69957
70041
  } catch (err) {
69958
70042
  promiseReject(err);
69959
70043
  }
@@ -69979,29 +70063,29 @@ __export2(exports_events, {
69979
70063
  addAbortListener: () => addAbortListener,
69980
70064
  EventEmitter: () => EventEmitter5
69981
70065
  });
69982
- function emitError(emitter, args) {
70066
+ function emitError(emitter, args2) {
69983
70067
  var { _events: events } = emitter;
69984
- if (args[0] ??= Error("Unhandled error."), !events)
69985
- throw args[0];
70068
+ if (args2[0] ??= Error("Unhandled error."), !events)
70069
+ throw args2[0];
69986
70070
  var errorMonitor = events[kErrorMonitor];
69987
70071
  if (errorMonitor)
69988
70072
  for (var handler of ArrayPrototypeSlice.call(errorMonitor))
69989
- handler.apply(emitter, args);
70073
+ handler.apply(emitter, args2);
69990
70074
  var handlers = events.error;
69991
70075
  if (!handlers)
69992
- throw args[0];
70076
+ throw args2[0];
69993
70077
  for (var handler of ArrayPrototypeSlice.call(handlers))
69994
- handler.apply(emitter, args);
70078
+ handler.apply(emitter, args2);
69995
70079
  return true;
69996
70080
  }
69997
- function addCatch(emitter, promise3, type2, args) {
70081
+ function addCatch(emitter, promise3, type2, args2) {
69998
70082
  promise3.then(undefined, function(err) {
69999
- queueMicrotask(() => emitUnhandledRejectionOrErr(emitter, err, type2, args));
70083
+ queueMicrotask(() => emitUnhandledRejectionOrErr(emitter, err, type2, args2));
70000
70084
  });
70001
70085
  }
70002
- function emitUnhandledRejectionOrErr(emitter, err, type2, args) {
70086
+ function emitUnhandledRejectionOrErr(emitter, err, type2, args2) {
70003
70087
  if (typeof emitter[kRejection] === "function")
70004
- emitter[kRejection](err, type2, ...args);
70088
+ emitter[kRejection](err, type2, ...args2);
70005
70089
  else
70006
70090
  try {
70007
70091
  emitter[kCapture] = false, emitter.emit("error", err);
@@ -70014,8 +70098,8 @@ function overflowWarning(emitter, type2, handlers) {
70014
70098
  let warn = Error(`Possible EventEmitter memory leak detected. ${handlers.length} ${String(type2)} listeners added to [${emitter.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);
70015
70099
  warn.name = "MaxListenersExceededWarning", warn.emitter = emitter, warn.type = type2, warn.count = handlers.length, console.warn(warn);
70016
70100
  }
70017
- function onceWrapper(type2, listener, ...args) {
70018
- this.removeListener(type2, listener), listener.apply(this, args);
70101
+ function onceWrapper(type2, listener, ...args2) {
70102
+ this.removeListener(type2, listener), listener.apply(this, args2);
70019
70103
  }
70020
70104
  function once2(emitter, type2, options) {
70021
70105
  var signal = options?.signal;
@@ -70025,12 +70109,12 @@ function once2(emitter, type2, options) {
70025
70109
  if (emitter.removeListener(type2, resolver), signal != null)
70026
70110
  eventTargetAgnosticRemoveListener(signal, "abort", abortListener);
70027
70111
  reject(err);
70028
- }, resolver = (...args) => {
70112
+ }, resolver = (...args2) => {
70029
70113
  if (typeof emitter.removeListener === "function")
70030
70114
  emitter.removeListener("error", errorListener);
70031
70115
  if (signal != null)
70032
70116
  eventTargetAgnosticRemoveListener(signal, "abort", abortListener);
70033
- resolve(args);
70117
+ resolve(args2);
70034
70118
  };
70035
70119
  if (eventTargetAgnosticAddListener(emitter, type2, resolver, { once: true }), type2 !== "error" && typeof emitter.once === "function")
70036
70120
  emitter.once("error", errorListener);
@@ -70132,9 +70216,9 @@ var EventEmitter5 = function(opts) {
70132
70216
  this.emit = emitWithRejectionCapture;
70133
70217
  };
70134
70218
  var EventEmitterPrototype;
70135
- var emitWithoutRejectionCapture = function(type2, ...args) {
70219
+ var emitWithoutRejectionCapture = function(type2, ...args2) {
70136
70220
  if (type2 === "error")
70137
- return emitError(this, args);
70221
+ return emitError(this, args2);
70138
70222
  var { _events: events } = this;
70139
70223
  if (events === undefined)
70140
70224
  return false;
@@ -70144,29 +70228,29 @@ var emitWithoutRejectionCapture = function(type2, ...args) {
70144
70228
  let maybeClonedHandlers = handlers.length > 1 ? handlers.slice() : handlers;
70145
70229
  for (let i2 = 0, { length } = maybeClonedHandlers;i2 < length; i2++) {
70146
70230
  let handler = maybeClonedHandlers[i2];
70147
- switch (args.length) {
70231
+ switch (args2.length) {
70148
70232
  case 0:
70149
70233
  handler.call(this);
70150
70234
  break;
70151
70235
  case 1:
70152
- handler.call(this, args[0]);
70236
+ handler.call(this, args2[0]);
70153
70237
  break;
70154
70238
  case 2:
70155
- handler.call(this, args[0], args[1]);
70239
+ handler.call(this, args2[0], args2[1]);
70156
70240
  break;
70157
70241
  case 3:
70158
- handler.call(this, args[0], args[1], args[2]);
70242
+ handler.call(this, args2[0], args2[1], args2[2]);
70159
70243
  break;
70160
70244
  default:
70161
- handler.apply(this, args);
70245
+ handler.apply(this, args2);
70162
70246
  break;
70163
70247
  }
70164
70248
  }
70165
70249
  return true;
70166
70250
  };
70167
- var emitWithRejectionCapture = function(type2, ...args) {
70251
+ var emitWithRejectionCapture = function(type2, ...args2) {
70168
70252
  if (type2 === "error")
70169
- return emitError(this, args);
70253
+ return emitError(this, args2);
70170
70254
  var { _events: events } = this;
70171
70255
  if (events === undefined)
70172
70256
  return false;
@@ -70176,25 +70260,25 @@ var emitWithRejectionCapture = function(type2, ...args) {
70176
70260
  let maybeClonedHandlers = handlers.length > 1 ? handlers.slice() : handlers;
70177
70261
  for (let i2 = 0, { length } = maybeClonedHandlers;i2 < length; i2++) {
70178
70262
  let handler = maybeClonedHandlers[i2], result;
70179
- switch (args.length) {
70263
+ switch (args2.length) {
70180
70264
  case 0:
70181
70265
  result = handler.call(this);
70182
70266
  break;
70183
70267
  case 1:
70184
- result = handler.call(this, args[0]);
70268
+ result = handler.call(this, args2[0]);
70185
70269
  break;
70186
70270
  case 2:
70187
- result = handler.call(this, args[0], args[1]);
70271
+ result = handler.call(this, args2[0], args2[1]);
70188
70272
  break;
70189
70273
  case 3:
70190
- result = handler.call(this, args[0], args[1], args[2]);
70274
+ result = handler.call(this, args2[0], args2[1], args2[2]);
70191
70275
  break;
70192
70276
  default:
70193
- result = handler.apply(this, args);
70277
+ result = handler.apply(this, args2);
70194
70278
  break;
70195
70279
  }
70196
70280
  if (result !== undefined && typeof result?.then === "function" && result.then === Promise.prototype.then)
70197
- addCatch(this, result, type2, args);
70281
+ addCatch(this, result, type2, args2);
70198
70282
  }
70199
70283
  return true;
70200
70284
  };
@@ -70383,8 +70467,8 @@ var require_stream5 = __commonJS3((exports, module) => {
70383
70467
  return self2.push(el);
70384
70468
  }, ArrayPrototypeSlice(self2, start4, end) {
70385
70469
  return self2.slice(start4, end);
70386
- }, Error, FunctionPrototypeCall(fn, thisArgs, ...args) {
70387
- return fn.call(thisArgs, ...args);
70470
+ }, Error, FunctionPrototypeCall(fn, thisArgs, ...args2) {
70471
+ return fn.call(thisArgs, ...args2);
70388
70472
  }, FunctionPrototypeSymbolHasInstance(self2, instance) {
70389
70473
  return Function.prototype[Symbol.hasInstance].call(self2, instance);
70390
70474
  }, 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) {
@@ -70420,9 +70504,9 @@ var require_stream5 = __commonJS3((exports, module) => {
70420
70504
  }, Boolean, Uint8Array };
70421
70505
  });
70422
70506
  var require_inspect = __commonJS22((exports2, module2) => {
70423
- module2.exports = { format(format2, ...args) {
70507
+ module2.exports = { format(format2, ...args2) {
70424
70508
  return format2.replace(/%([sdifj])/g, function(...[_unused, type2]) {
70425
- let replacement = args.shift();
70509
+ let replacement = args2.shift();
70426
70510
  if (type2 === "f")
70427
70511
  return replacement.toFixed(6);
70428
70512
  else if (type2 === "j")
@@ -70470,21 +70554,21 @@ var require_stream5 = __commonJS3((exports, module) => {
70470
70554
  res = `_${val.slice(i2 - 3, i2)}${res}`;
70471
70555
  return `${val.slice(0, i2)}${res}`;
70472
70556
  }
70473
- function getMessage(key, msg, args) {
70557
+ function getMessage(key, msg, args2) {
70474
70558
  if (typeof msg === "function")
70475
- return assert3(msg.length <= args.length, `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${msg.length}).`), msg(...args);
70559
+ return assert3(msg.length <= args2.length, `Code: ${key}; The provided arguments length (${args2.length}) does not match the required ones (${msg.length}).`), msg(...args2);
70476
70560
  let expectedLength = (msg.match(/%[dfijoOs]/g) || []).length;
70477
- if (assert3(expectedLength === args.length, `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${expectedLength}).`), args.length === 0)
70561
+ if (assert3(expectedLength === args2.length, `Code: ${key}; The provided arguments length (${args2.length}) does not match the required ones (${expectedLength}).`), args2.length === 0)
70478
70562
  return msg;
70479
- return format2(msg, ...args);
70563
+ return format2(msg, ...args2);
70480
70564
  }
70481
70565
  function E2(code2, message, Base) {
70482
70566
  if (!Base)
70483
70567
  Base = Error;
70484
70568
 
70485
70569
  class NodeError extends Base {
70486
- constructor(...args) {
70487
- super(getMessage(code2, message, args));
70570
+ constructor(...args2) {
70571
+ super(getMessage(code2, message, args2));
70488
70572
  }
70489
70573
  toString() {
70490
70574
  return `${this.name} [${code2}]: ${this.message}`;
@@ -70618,20 +70702,20 @@ var require_stream5 = __commonJS3((exports, module) => {
70618
70702
  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}`;
70619
70703
  return `Expected ${input} to be returned from the "${name}" function but got ${type2}.`;
70620
70704
  }, TypeError);
70621
- E2("ERR_MISSING_ARGS", (...args) => {
70622
- assert3(args.length > 0, "At least one arg needs to be specified");
70623
- let msg, len2 = args.length;
70624
- switch (args = (Array.isArray(args) ? args : [args]).map((a) => `"${a}"`).join(" or "), len2) {
70705
+ E2("ERR_MISSING_ARGS", (...args2) => {
70706
+ assert3(args2.length > 0, "At least one arg needs to be specified");
70707
+ let msg, len2 = args2.length;
70708
+ switch (args2 = (Array.isArray(args2) ? args2 : [args2]).map((a) => `"${a}"`).join(" or "), len2) {
70625
70709
  case 1:
70626
- msg += `The ${args[0]} argument`;
70710
+ msg += `The ${args2[0]} argument`;
70627
70711
  break;
70628
70712
  case 2:
70629
- msg += `The ${args[0]} and ${args[1]} arguments`;
70713
+ msg += `The ${args2[0]} and ${args2[1]} arguments`;
70630
70714
  break;
70631
70715
  default:
70632
70716
  {
70633
- let last = args.pop();
70634
- msg += `The ${args.join(", ")}, and ${last} arguments`;
70717
+ let last = args2.pop();
70718
+ msg += `The ${args2.join(", ")}, and ${last} arguments`;
70635
70719
  }
70636
70720
  break;
70637
70721
  }
@@ -71024,10 +71108,10 @@ var require_stream5 = __commonJS3((exports, module) => {
71024
71108
  };
71025
71109
  module2.exports = { AggregateError: AggregateError2, kEmptyObject: Object.freeze({}), once(callback) {
71026
71110
  let called = false;
71027
- return function(...args) {
71111
+ return function(...args2) {
71028
71112
  if (called)
71029
71113
  return;
71030
- called = true, callback.apply(this, args);
71114
+ called = true, callback.apply(this, args2);
71031
71115
  };
71032
71116
  }, createDeferredPromise: function() {
71033
71117
  let resolve, reject;
@@ -71036,10 +71120,10 @@ var require_stream5 = __commonJS3((exports, module) => {
71036
71120
  }), resolve, reject };
71037
71121
  }, promisify(fn) {
71038
71122
  return new Promise((resolve, reject) => {
71039
- fn((err, ...args) => {
71123
+ fn((err, ...args2) => {
71040
71124
  if (err)
71041
71125
  return reject(err);
71042
- return resolve(...args);
71126
+ return resolve(...args2);
71043
71127
  });
71044
71128
  });
71045
71129
  }, debuglog() {
@@ -71511,8 +71595,8 @@ var require_stream5 = __commonJS3((exports, module) => {
71511
71595
  else {
71512
71596
  addAbortListener2 = addAbortListener2 || require_util().addAbortListener;
71513
71597
  let disposable = addAbortListener2(options.signal, abort), originalCallback = callback;
71514
- callback = once((...args) => {
71515
- disposable[SymbolDispose](), originalCallback.apply(stream3, args);
71598
+ callback = once((...args2) => {
71599
+ disposable[SymbolDispose](), originalCallback.apply(stream3, args2);
71516
71600
  });
71517
71601
  }
71518
71602
  }
@@ -71528,13 +71612,13 @@ var require_stream5 = __commonJS3((exports, module) => {
71528
71612
  else {
71529
71613
  addAbortListener2 = addAbortListener2 || require_util().addAbortListener;
71530
71614
  let disposable = addAbortListener2(options.signal, abort), originalCallback = callback;
71531
- callback = once((...args) => {
71532
- disposable[SymbolDispose](), originalCallback.apply(stream3, args);
71615
+ callback = once((...args2) => {
71616
+ disposable[SymbolDispose](), originalCallback.apply(stream3, args2);
71533
71617
  });
71534
71618
  }
71535
- let resolverFn = (...args) => {
71619
+ let resolverFn = (...args2) => {
71536
71620
  if (!isAborted)
71537
- process22.nextTick(() => callback.apply(stream3, args));
71621
+ process22.nextTick(() => callback.apply(stream3, args2));
71538
71622
  };
71539
71623
  return PromisePrototypeThen(stream3[kIsClosedPromise].promise, resolverFn, resolverFn), nop;
71540
71624
  }
@@ -74046,8 +74130,8 @@ var require_stream5 = __commonJS3((exports, module) => {
74046
74130
  async function every(fn, options = undefined) {
74047
74131
  if (typeof fn !== "function")
74048
74132
  throw new ERR_INVALID_ARG_TYPE3("fn", ["Function", "AsyncFunction"], fn);
74049
- return !await some.call(this, async (...args) => {
74050
- return !await fn(...args);
74133
+ return !await some.call(this, async (...args2) => {
74134
+ return !await fn(...args2);
74051
74135
  }, options);
74052
74136
  }
74053
74137
  async function find(fn, options) {
@@ -74215,18 +74299,18 @@ var require_stream5 = __commonJS3((exports, module) => {
74215
74299
  Stream.isWritable = utils2.isWritable;
74216
74300
  Stream.Readable = require_readable();
74217
74301
  for (let key of ObjectKeys(streamReturningOperators)) {
74218
- let fn = function(...args) {
74302
+ let fn = function(...args2) {
74219
74303
  if (new.target)
74220
74304
  throw ERR_ILLEGAL_CONSTRUCTOR();
74221
- return Stream.Readable.from(ReflectApply(op, this, args));
74305
+ return Stream.Readable.from(ReflectApply(op, this, args2));
74222
74306
  }, op = streamReturningOperators[key];
74223
74307
  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 });
74224
74308
  }
74225
74309
  for (let key of ObjectKeys(promiseReturningOperators)) {
74226
- let fn = function(...args) {
74310
+ let fn = function(...args2) {
74227
74311
  if (new.target)
74228
74312
  throw ERR_ILLEGAL_CONSTRUCTOR();
74229
- return ReflectApply(op, this, args);
74313
+ return ReflectApply(op, this, args2);
74230
74314
  }, op = promiseReturningOperators[key];
74231
74315
  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 });
74232
74316
  }
@@ -74773,15 +74857,15 @@ var init_crypto = __esm2(() => {
74773
74857
  var target = this;
74774
74858
  if (typeof target !== "function" || toStr.apply(target) !== funcType)
74775
74859
  throw TypeError(ERROR_MESSAGE + target);
74776
- var args = slicy(arguments, 1), bound, binder = function() {
74860
+ var args2 = slicy(arguments, 1), bound, binder = function() {
74777
74861
  if (this instanceof bound) {
74778
- var result = target.apply(this, concatty(args, arguments));
74862
+ var result = target.apply(this, concatty(args2, arguments));
74779
74863
  if (Object(result) === result)
74780
74864
  return result;
74781
74865
  return this;
74782
74866
  }
74783
- return target.apply(that, concatty(args, arguments));
74784
- }, boundLength = max(0, target.length - args.length), boundArgs = [];
74867
+ return target.apply(that, concatty(args2, arguments));
74868
+ }, boundLength = max(0, target.length - args2.length), boundArgs = [];
74785
74869
  for (var i2 = 0;i2 < boundLength; i2++)
74786
74870
  boundArgs[i2] = "$" + i2;
74787
74871
  if (bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder), target.prototype) {
@@ -74810,10 +74894,10 @@ var init_crypto = __esm2(() => {
74810
74894
  });
74811
74895
  require_call_bind_apply_helpers = __commonJS22((exports, module) => {
74812
74896
  var bind = require_function_bind(), $TypeError = require_type(), $call = require_functionCall(), $actualApply = require_actualApply();
74813
- module.exports = function(args) {
74814
- if (args.length < 1 || typeof args[0] !== "function")
74897
+ module.exports = function(args2) {
74898
+ if (args2.length < 1 || typeof args2[0] !== "function")
74815
74899
  throw new $TypeError("a function is required");
74816
- return $actualApply(bind, $call, args);
74900
+ return $actualApply(bind, $call, args2);
74817
74901
  };
74818
74902
  });
74819
74903
  require_get = __commonJS22((exports, module) => {
@@ -82074,8 +82158,8 @@ var init_crypto = __esm2(() => {
82074
82158
  return result;
82075
82159
  return { result: this.isError(result) ? null : result, errors: state.errors };
82076
82160
  };
82077
- function ReporterError(path10, msg) {
82078
- this.path = path10, this.rethrow(msg);
82161
+ function ReporterError(path12, msg) {
82162
+ this.path = path12, this.rethrow(msg);
82079
82163
  }
82080
82164
  inherits2(ReporterError, Error);
82081
82165
  ReporterError.prototype.rethrow = function(msg) {
@@ -82200,18 +82284,18 @@ var init_crypto = __esm2(() => {
82200
82284
  return child._baseState.parent === this;
82201
82285
  }, this), assert3.equal(state.children.length, 1, "Root node can have only one child");
82202
82286
  };
82203
- Node.prototype._useArgs = function(args) {
82204
- var state = this._baseState, children = args.filter(function(arg) {
82287
+ Node.prototype._useArgs = function(args2) {
82288
+ var state = this._baseState, children = args2.filter(function(arg) {
82205
82289
  return arg instanceof this.constructor;
82206
82290
  }, this);
82207
- if (args = args.filter(function(arg) {
82291
+ if (args2 = args2.filter(function(arg) {
82208
82292
  return !(arg instanceof this.constructor);
82209
82293
  }, this), children.length !== 0)
82210
82294
  assert3(state.children === null), state.children = children, children.forEach(function(child) {
82211
82295
  child._baseState.parent = this;
82212
82296
  }, this);
82213
- if (args.length !== 0)
82214
- assert3(state.args === null), state.args = args, state.reverseArgs = args.map(function(arg) {
82297
+ if (args2.length !== 0)
82298
+ assert3(state.args === null), state.args = args2, state.reverseArgs = args2.map(function(arg) {
82215
82299
  if (typeof arg !== "object" || arg.constructor !== Object)
82216
82300
  return arg;
82217
82301
  var res = {};
@@ -82231,8 +82315,8 @@ var init_crypto = __esm2(() => {
82231
82315
  });
82232
82316
  tags.forEach(function(tag) {
82233
82317
  Node.prototype[tag] = function() {
82234
- var state = this._baseState, args = Array.prototype.slice.call(arguments);
82235
- return assert3(state.tag === null), state.tag = tag, this._useArgs(args), this;
82318
+ var state = this._baseState, args2 = Array.prototype.slice.call(arguments);
82319
+ return assert3(state.tag === null), state.tag = tag, this._useArgs(args2), this;
82236
82320
  };
82237
82321
  });
82238
82322
  Node.prototype.use = function(item) {
@@ -82257,9 +82341,9 @@ var init_crypto = __esm2(() => {
82257
82341
  return assert3(state.explicit === null && state.implicit === null), state.implicit = num, this;
82258
82342
  };
82259
82343
  Node.prototype.obj = function() {
82260
- var state = this._baseState, args = Array.prototype.slice.call(arguments);
82261
- if (state.obj = true, args.length !== 0)
82262
- this._useArgs(args);
82344
+ var state = this._baseState, args2 = Array.prototype.slice.call(arguments);
82345
+ if (state.obj = true, args2.length !== 0)
82346
+ this._useArgs(args2);
82263
82347
  return this;
82264
82348
  };
82265
82349
  Node.prototype.key = function(newKey) {
@@ -88261,16 +88345,16 @@ app.route({
88261
88345
  })
88262
88346
  }
88263
88347
  }).define(async (ctx) => {
88264
- const { path: path10, key = "" } = ctx.query;
88265
- if (!path10) {
88348
+ const { path: path12, key = "" } = ctx.query;
88349
+ if (!path12) {
88266
88350
  ctx.throw("路径path不能为空");
88267
88351
  }
88268
- const res = await ctx.run({ path: path10, key, payload: ctx.query.payload || {} }, {
88352
+ const res = await ctx.run({ path: path12, key, payload: ctx.query.payload || {} }, {
88269
88353
  ...ctx
88270
88354
  });
88271
88355
  ctx.forward(res);
88272
88356
  }).addTo(app);
88273
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.44/node_modules/@opencode-ai/sdk/dist/gen/core/serverSentEvents.gen.js
88357
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.47/node_modules/@opencode-ai/sdk/dist/gen/core/serverSentEvents.gen.js
88274
88358
  var createSseClient = ({ onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url: url4, ...options }) => {
88275
88359
  let lastEventId;
88276
88360
  const sleep = sseSleepFn ?? ((ms3) => new Promise((resolve) => setTimeout(resolve, ms3)));
@@ -88379,7 +88463,7 @@ var createSseClient = ({ onSseError, onSseEvent, responseTransformer, responseVa
88379
88463
  return { stream: stream3 };
88380
88464
  };
88381
88465
 
88382
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.44/node_modules/@opencode-ai/sdk/dist/gen/core/auth.gen.js
88466
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.47/node_modules/@opencode-ai/sdk/dist/gen/core/auth.gen.js
88383
88467
  var getAuthToken = async (auth, callback) => {
88384
88468
  const token = typeof callback === "function" ? await callback(auth) : callback;
88385
88469
  if (!token) {
@@ -88394,12 +88478,12 @@ var getAuthToken = async (auth, callback) => {
88394
88478
  return token;
88395
88479
  };
88396
88480
 
88397
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.44/node_modules/@opencode-ai/sdk/dist/gen/core/bodySerializer.gen.js
88481
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.47/node_modules/@opencode-ai/sdk/dist/gen/core/bodySerializer.gen.js
88398
88482
  var jsonBodySerializer = {
88399
88483
  bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
88400
88484
  };
88401
88485
 
88402
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.44/node_modules/@opencode-ai/sdk/dist/gen/core/pathSerializer.gen.js
88486
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.47/node_modules/@opencode-ai/sdk/dist/gen/core/pathSerializer.gen.js
88403
88487
  var separatorArrayExplode = (style) => {
88404
88488
  switch (style) {
88405
88489
  case "label":
@@ -88502,9 +88586,9 @@ var serializeObjectParam = ({ allowReserved, explode, name, style, value, valueO
88502
88586
  return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
88503
88587
  };
88504
88588
 
88505
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.44/node_modules/@opencode-ai/sdk/dist/gen/core/utils.gen.js
88589
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.47/node_modules/@opencode-ai/sdk/dist/gen/core/utils.gen.js
88506
88590
  var PATH_PARAM_RE = /\{[^{}]+\}/g;
88507
- var defaultPathSerializer = ({ path: path10, url: _url3 }) => {
88591
+ var defaultPathSerializer = ({ path: path12, url: _url3 }) => {
88508
88592
  let url4 = _url3;
88509
88593
  const matches = _url3.match(PATH_PARAM_RE);
88510
88594
  if (matches) {
@@ -88523,7 +88607,7 @@ var defaultPathSerializer = ({ path: path10, url: _url3 }) => {
88523
88607
  name = name.substring(1);
88524
88608
  style = "matrix";
88525
88609
  }
88526
- const value = path10[name];
88610
+ const value = path12[name];
88527
88611
  if (value === undefined || value === null) {
88528
88612
  continue;
88529
88613
  }
@@ -88554,11 +88638,11 @@ var defaultPathSerializer = ({ path: path10, url: _url3 }) => {
88554
88638
  }
88555
88639
  return url4;
88556
88640
  };
88557
- var getUrl = ({ baseUrl, path: path10, query: query3, querySerializer, url: _url3 }) => {
88641
+ var getUrl = ({ baseUrl, path: path12, query: query3, querySerializer, url: _url3 }) => {
88558
88642
  const pathUrl = _url3.startsWith("/") ? _url3 : `/${_url3}`;
88559
88643
  let url4 = (baseUrl ?? "") + pathUrl;
88560
- if (path10) {
88561
- url4 = defaultPathSerializer({ path: path10, url: url4 });
88644
+ if (path12) {
88645
+ url4 = defaultPathSerializer({ path: path12, url: url4 });
88562
88646
  }
88563
88647
  let search = query3 ? querySerializer(query3) : "";
88564
88648
  if (search.startsWith("?")) {
@@ -88570,7 +88654,7 @@ var getUrl = ({ baseUrl, path: path10, query: query3, querySerializer, url: _url
88570
88654
  return url4;
88571
88655
  };
88572
88656
 
88573
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.44/node_modules/@opencode-ai/sdk/dist/gen/client/utils.gen.js
88657
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.47/node_modules/@opencode-ai/sdk/dist/gen/client/utils.gen.js
88574
88658
  var createQuerySerializer = ({ allowReserved, array: array4, object: object3 } = {}) => {
88575
88659
  const querySerializer = (queryParams) => {
88576
88660
  const search = [];
@@ -88778,7 +88862,7 @@ var createConfig = (override = {}) => ({
88778
88862
  ...override
88779
88863
  });
88780
88864
 
88781
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.44/node_modules/@opencode-ai/sdk/dist/gen/client/client.gen.js
88865
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.47/node_modules/@opencode-ai/sdk/dist/gen/client/client.gen.js
88782
88866
  var createClient = (config4 = {}) => {
88783
88867
  let _config = mergeConfigs(createConfig(), config4);
88784
88868
  const getConfig2 = () => ({ ..._config });
@@ -88925,7 +89009,7 @@ var createClient = (config4 = {}) => {
88925
89009
  trace: makeMethod("TRACE")
88926
89010
  };
88927
89011
  };
88928
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.44/node_modules/@opencode-ai/sdk/dist/gen/core/params.gen.js
89012
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.47/node_modules/@opencode-ai/sdk/dist/gen/core/params.gen.js
88929
89013
  var extraPrefixesMap = {
88930
89014
  $body_: "body",
88931
89015
  $headers_: "headers",
@@ -88933,17 +89017,17 @@ var extraPrefixesMap = {
88933
89017
  $query_: "query"
88934
89018
  };
88935
89019
  var extraPrefixes = Object.entries(extraPrefixesMap);
88936
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.44/node_modules/@opencode-ai/sdk/dist/gen/client.gen.js
89020
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.47/node_modules/@opencode-ai/sdk/dist/gen/client.gen.js
88937
89021
  var client = createClient(createConfig({
88938
89022
  baseUrl: "http://localhost:4096"
88939
89023
  }));
88940
89024
 
88941
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.44/node_modules/@opencode-ai/sdk/dist/gen/sdk.gen.js
89025
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.47/node_modules/@opencode-ai/sdk/dist/gen/sdk.gen.js
88942
89026
  class _HeyApiClient {
88943
89027
  _client = client;
88944
- constructor(args) {
88945
- if (args?.client) {
88946
- this._client = args.client;
89028
+ constructor(args2) {
89029
+ if (args2?.client) {
89030
+ this._client = args2.client;
88947
89031
  }
88948
89032
  }
88949
89033
  }
@@ -89608,7 +89692,7 @@ class OpencodeClient extends _HeyApiClient {
89608
89692
  event = new Event({ client: this._client });
89609
89693
  }
89610
89694
 
89611
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.44/node_modules/@opencode-ai/sdk/dist/client.js
89695
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.47/node_modules/@opencode-ai/sdk/dist/client.js
89612
89696
  function createOpencodeClient(config4) {
89613
89697
  if (!config4?.fetch) {
89614
89698
  const customFetch = (req) => {
@@ -89629,7 +89713,7 @@ function createOpencodeClient(config4) {
89629
89713
  const client2 = createClient(config4);
89630
89714
  return new OpencodeClient({ client: client2 });
89631
89715
  }
89632
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.44/node_modules/@opencode-ai/sdk/dist/server.js
89716
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.47/node_modules/@opencode-ai/sdk/dist/server.js
89633
89717
  import { spawn as spawn3 } from "node:child_process";
89634
89718
  async function createOpencodeServer(options) {
89635
89719
  options = Object.assign({
@@ -89637,10 +89721,10 @@ async function createOpencodeServer(options) {
89637
89721
  port: 4096,
89638
89722
  timeout: 5000
89639
89723
  }, options ?? {});
89640
- const args = [`serve`, `--hostname=${options.hostname}`, `--port=${options.port}`];
89724
+ const args2 = [`serve`, `--hostname=${options.hostname}`, `--port=${options.port}`];
89641
89725
  if (options.config?.logLevel)
89642
- args.push(`--log-level=${options.config.logLevel}`);
89643
- const proc = spawn3(`opencode`, args, {
89726
+ args2.push(`--log-level=${options.config.logLevel}`);
89727
+ const proc = spawn3(`opencode`, args2, {
89644
89728
  signal: options.signal,
89645
89729
  env: {
89646
89730
  ...process.env,
@@ -89698,7 +89782,7 @@ Server output: ${output}`;
89698
89782
  }
89699
89783
  };
89700
89784
  }
89701
- // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.44/node_modules/@opencode-ai/sdk/dist/index.js
89785
+ // ../node_modules/.pnpm/@opencode-ai+sdk@1.1.47/node_modules/@opencode-ai/sdk/dist/index.js
89702
89786
  async function createOpencode(options) {
89703
89787
  const server2 = await createOpencodeServer({
89704
89788
  ...options
@@ -90159,7 +90243,7 @@ function requireEventemitter34() {
90159
90243
  var evt = prefix ? prefix + event : event;
90160
90244
  if (!this._events[evt])
90161
90245
  return false;
90162
- var listeners = this._events[evt], len2 = arguments.length, args, i2;
90246
+ var listeners = this._events[evt], len2 = arguments.length, args2, i2;
90163
90247
  if (listeners.fn) {
90164
90248
  if (listeners.once)
90165
90249
  this.removeListener(event, listeners.fn, undefined, true);
@@ -90177,10 +90261,10 @@ function requireEventemitter34() {
90177
90261
  case 6:
90178
90262
  return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
90179
90263
  }
90180
- for (i2 = 1, args = new Array(len2 - 1);i2 < len2; i2++) {
90181
- args[i2 - 1] = arguments[i2];
90264
+ for (i2 = 1, args2 = new Array(len2 - 1);i2 < len2; i2++) {
90265
+ args2[i2 - 1] = arguments[i2];
90182
90266
  }
90183
- listeners.fn.apply(listeners.context, args);
90267
+ listeners.fn.apply(listeners.context, args2);
90184
90268
  } else {
90185
90269
  var length = listeners.length, j;
90186
90270
  for (i2 = 0;i2 < length; i2++) {
@@ -90200,11 +90284,11 @@ function requireEventemitter34() {
90200
90284
  listeners[i2].fn.call(listeners[i2].context, a1, a2, a3);
90201
90285
  break;
90202
90286
  default:
90203
- if (!args)
90204
- for (j = 1, args = new Array(len2 - 1);j < len2; j++) {
90205
- args[j - 1] = arguments[j];
90287
+ if (!args2)
90288
+ for (j = 1, args2 = new Array(len2 - 1);j < len2; j++) {
90289
+ args2[j - 1] = arguments[j];
90206
90290
  }
90207
- listeners[i2].fn.apply(listeners[i2].context, args);
90291
+ listeners[i2].fn.apply(listeners[i2].context, args2);
90208
90292
  }
90209
90293
  }
90210
90294
  }
@@ -90684,8 +90768,8 @@ var runCmd = (opts) => {
90684
90768
  return new Promise((resolve) => {
90685
90769
  const parts = cmd.split(" ");
90686
90770
  const command = parts[0];
90687
- const args = parts.slice(1);
90688
- const proc = spawn4(command, args, {
90771
+ const args2 = parts.slice(1);
90772
+ const proc = spawn4(command, args2, {
90689
90773
  cwd: cwd || process.cwd(),
90690
90774
  shell: true,
90691
90775
  env: { ...process.env, ...opts?.env }
@@ -92063,8 +92147,8 @@ app.route({
92063
92147
 
92064
92148
  // src/routes-simple/upload.ts
92065
92149
  var import_busboy = __toESM(require_lib2(), 1);
92066
- import path12 from "path";
92067
- import fs15 from "fs";
92150
+ import path14 from "path";
92151
+ import fs16 from "fs";
92068
92152
 
92069
92153
  // ../node_modules/.pnpm/@kevisual+router@0.0.64_typescript@5.8.2/node_modules/@kevisual/router/src/server/cookie.ts
92070
92154
  var NullObject2 = /* @__PURE__ */ (() => {
@@ -92149,11 +92233,11 @@ var getTokenFromRequest = (req) => {
92149
92233
 
92150
92234
  // src/routes-simple/router.ts
92151
92235
  import os5 from "node:os";
92152
- import path10 from "node:path";
92153
- import fs13 from "node:fs";
92154
- var defaultCachePath = path10.join(os5.homedir(), ".envision", "cache-file");
92155
- if (!fs13.existsSync(defaultCachePath)) {
92156
- fs13.mkdirSync(defaultCachePath, { recursive: true });
92236
+ import path12 from "node:path";
92237
+ import fs14 from "node:fs";
92238
+ var defaultCachePath = path12.join(os5.homedir(), ".envision", "cache-file");
92239
+ if (!fs14.existsSync(defaultCachePath)) {
92240
+ fs14.mkdirSync(defaultCachePath, { recursive: true });
92157
92241
  }
92158
92242
  var cacheFilePath = defaultCachePath;
92159
92243
  var eventClientsInit = () => {
@@ -92220,8 +92304,8 @@ var validateDirectory = (directory) => {
92220
92304
  };
92221
92305
 
92222
92306
  // src/module/upload/mv.ts
92223
- import fs14 from "node:fs";
92224
- import path11 from "node:path";
92307
+ import fs15 from "node:fs";
92308
+ import path13 from "node:path";
92225
92309
 
92226
92310
  class UploadManager {
92227
92311
  config;
@@ -92234,12 +92318,12 @@ class UploadManager {
92234
92318
  const appsDir = this.config.configPath?.appsDir;
92235
92319
  let dir = type === "app-file" ? appsDir : pageDir;
92236
92320
  if (type === "file" || type === "app-file") {
92237
- const fullTargetPath = targetPath.startsWith("/") ? targetPath : path11.join(dir, targetPath);
92321
+ const fullTargetPath = targetPath.startsWith("/") ? targetPath : path13.join(dir, targetPath);
92238
92322
  const targetDir = fullTargetPath.substring(0, fullTargetPath.lastIndexOf("/"));
92239
- if (!fs14.existsSync(targetDir)) {
92240
- fs14.mkdirSync(targetDir, { recursive: true });
92323
+ if (!fs15.existsSync(targetDir)) {
92324
+ fs15.mkdirSync(targetDir, { recursive: true });
92241
92325
  }
92242
- fs14.renameSync(temppath, fullTargetPath);
92326
+ fs15.renameSync(temppath, fullTargetPath);
92243
92327
  return fullTargetPath;
92244
92328
  }
92245
92329
  }
@@ -92294,8 +92378,8 @@ var uploadResources = async (req, res) => {
92294
92378
  });
92295
92379
  busboy.on("file", (fieldname, fileStream, info) => {
92296
92380
  const { filename, encoding, mimeType } = info;
92297
- const tempPath = path12.join(cacheFilePath, `${Date.now()}-${Math.random().toString(36).substring(7)}`);
92298
- const writeStream = fs15.createWriteStream(tempPath);
92381
+ const tempPath = path14.join(cacheFilePath, `${Date.now()}-${Math.random().toString(36).substring(7)}`);
92382
+ const writeStream = fs16.createWriteStream(tempPath);
92299
92383
  const filePromise = new Promise((resolve, reject) => {
92300
92384
  fileStream.on("data", (chunk) => {
92301
92385
  bytesReceived += chunk.length;
@@ -92334,8 +92418,8 @@ var uploadResources = async (req, res) => {
92334
92418
  }
92335
92419
  const clearFiles = () => {
92336
92420
  files.forEach((file4) => {
92337
- if (file4?.filepath && fs15.existsSync(file4.filepath)) {
92338
- fs15.unlinkSync(file4.filepath);
92421
+ if (file4?.filepath && fs16.existsSync(file4.filepath)) {
92422
+ fs16.unlinkSync(file4.filepath);
92339
92423
  }
92340
92424
  });
92341
92425
  };
@@ -92377,7 +92461,7 @@ var uploadResources = async (req, res) => {
92377
92461
  targetPath: minioPath
92378
92462
  });
92379
92463
  if (type !== "file") {
92380
- fs15.unlinkSync(tempPath);
92464
+ fs16.unlinkSync(tempPath);
92381
92465
  }
92382
92466
  }
92383
92467
  res.writeHead(200, { "Content-Type": "application/json" });