meshy-node 0.8.9 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/main.cjs CHANGED
@@ -4649,8 +4649,8 @@ var require_helpers = __commonJS({
4649
4649
  function req(url, opts = {}) {
4650
4650
  const href = typeof url === "string" ? url : url.href;
4651
4651
  const req2 = (href.startsWith("https:") ? https2 : http3).request(url, opts);
4652
- const promise = new Promise((resolve21, reject) => {
4653
- req2.once("response", resolve21).once("error", reject).end();
4652
+ const promise = new Promise((resolve22, reject) => {
4653
+ req2.once("response", resolve22).once("error", reject).end();
4654
4654
  });
4655
4655
  req2.then = promise.then.bind(promise);
4656
4656
  return req2;
@@ -4827,7 +4827,7 @@ var require_parse_proxy_response = __commonJS({
4827
4827
  var debug_1 = __importDefault(require_src());
4828
4828
  var debug = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
4829
4829
  function parseProxyResponse(socket) {
4830
- return new Promise((resolve21, reject) => {
4830
+ return new Promise((resolve22, reject) => {
4831
4831
  let buffersLength = 0;
4832
4832
  const buffers = [];
4833
4833
  function read() {
@@ -4893,7 +4893,7 @@ var require_parse_proxy_response = __commonJS({
4893
4893
  }
4894
4894
  debug("got proxy server response: %o %o", firstLine, headers);
4895
4895
  cleanup();
4896
- resolve21({
4896
+ resolve22({
4897
4897
  connect: {
4898
4898
  statusCode,
4899
4899
  statusText,
@@ -5782,8 +5782,8 @@ var init_parseUtil = __esm({
5782
5782
  init_errors();
5783
5783
  init_en();
5784
5784
  makeIssue = (params) => {
5785
- const { data, path: path31, errorMaps, issueData } = params;
5786
- const fullPath = [...path31, ...issueData.path || []];
5785
+ const { data, path: path32, errorMaps, issueData } = params;
5786
+ const fullPath = [...path32, ...issueData.path || []];
5787
5787
  const fullIssue = {
5788
5788
  ...issueData,
5789
5789
  path: fullPath
@@ -6094,11 +6094,11 @@ var init_types = __esm({
6094
6094
  init_parseUtil();
6095
6095
  init_util();
6096
6096
  ParseInputLazyPath = class {
6097
- constructor(parent, value, path31, key) {
6097
+ constructor(parent, value, path32, key) {
6098
6098
  this._cachedPath = [];
6099
6099
  this.parent = parent;
6100
6100
  this.data = value;
6101
- this._path = path31;
6101
+ this._path = path32;
6102
6102
  this._key = key;
6103
6103
  }
6104
6104
  get path() {
@@ -10739,8 +10739,8 @@ var require_node2 = __commonJS({
10739
10739
  }
10740
10740
  break;
10741
10741
  case "FILE":
10742
- var fs30 = require("fs");
10743
- stream2 = new fs30.SyncWriteStream(fd2, { autoClose: false });
10742
+ var fs31 = require("fs");
10743
+ stream2 = new fs31.SyncWriteStream(fd2, { autoClose: false });
10744
10744
  stream2._type = "fs";
10745
10745
  break;
10746
10746
  case "PIPE":
@@ -14393,10 +14393,10 @@ var require_raw_body = __commonJS({
14393
14393
  if (done) {
14394
14394
  return readStream(stream, encoding, length, limit, wrap(done));
14395
14395
  }
14396
- return new Promise(function executor(resolve21, reject) {
14396
+ return new Promise(function executor(resolve22, reject) {
14397
14397
  readStream(stream, encoding, length, limit, function onRead(err, buf) {
14398
14398
  if (err) return reject(err);
14399
- resolve21(buf);
14399
+ resolve22(buf);
14400
14400
  });
14401
14401
  });
14402
14402
  }
@@ -23530,11 +23530,11 @@ var require_mime_types = __commonJS({
23530
23530
  }
23531
23531
  return exts[0];
23532
23532
  }
23533
- function lookup(path31) {
23534
- if (!path31 || typeof path31 !== "string") {
23533
+ function lookup(path32) {
23534
+ if (!path32 || typeof path32 !== "string") {
23535
23535
  return false;
23536
23536
  }
23537
- var extension2 = extname4("x." + path31).toLowerCase().substr(1);
23537
+ var extension2 = extname4("x." + path32).toLowerCase().substr(1);
23538
23538
  if (!extension2) {
23539
23539
  return false;
23540
23540
  }
@@ -27052,7 +27052,7 @@ var require_path_to_regexp = __commonJS({
27052
27052
  "use strict";
27053
27053
  module2.exports = pathToRegexp;
27054
27054
  var MATCHING_GROUP_REGEXP = /\\.|\((?:\?<(.*?)>)?(?!\?)/g;
27055
- function pathToRegexp(path31, keys, options) {
27055
+ function pathToRegexp(path32, keys, options) {
27056
27056
  options = options || {};
27057
27057
  keys = keys || [];
27058
27058
  var strict = options.strict;
@@ -27066,8 +27066,8 @@ var require_path_to_regexp = __commonJS({
27066
27066
  var pos = 0;
27067
27067
  var backtrack = "";
27068
27068
  var m;
27069
- if (path31 instanceof RegExp) {
27070
- while (m = MATCHING_GROUP_REGEXP.exec(path31.source)) {
27069
+ if (path32 instanceof RegExp) {
27070
+ while (m = MATCHING_GROUP_REGEXP.exec(path32.source)) {
27071
27071
  if (m[0][0] === "\\") continue;
27072
27072
  keys.push({
27073
27073
  name: m[1] || name2++,
@@ -27075,18 +27075,18 @@ var require_path_to_regexp = __commonJS({
27075
27075
  offset: m.index
27076
27076
  });
27077
27077
  }
27078
- return path31;
27078
+ return path32;
27079
27079
  }
27080
- if (Array.isArray(path31)) {
27081
- path31 = path31.map(function(value) {
27080
+ if (Array.isArray(path32)) {
27081
+ path32 = path32.map(function(value) {
27082
27082
  return pathToRegexp(value, keys, options).source;
27083
27083
  });
27084
- return new RegExp(path31.join("|"), flags);
27084
+ return new RegExp(path32.join("|"), flags);
27085
27085
  }
27086
- if (typeof path31 !== "string") {
27086
+ if (typeof path32 !== "string") {
27087
27087
  throw new TypeError("path must be a string, array of strings, or regular expression");
27088
27088
  }
27089
- path31 = path31.replace(
27089
+ path32 = path32.replace(
27090
27090
  /\\.|(\/)?(\.)?:(\w+)(\(.*?\))?(\*)?(\?)?|[.*]|\/\(/g,
27091
27091
  function(match, slash, format, key, capture, star, optional2, offset) {
27092
27092
  if (match[0] === "\\") {
@@ -27103,7 +27103,7 @@ var require_path_to_regexp = __commonJS({
27103
27103
  if (slash || format) {
27104
27104
  backtrack = "";
27105
27105
  } else {
27106
- backtrack += path31.slice(pos, offset);
27106
+ backtrack += path32.slice(pos, offset);
27107
27107
  }
27108
27108
  pos = offset + match.length;
27109
27109
  if (match === "*") {
@@ -27133,7 +27133,7 @@ var require_path_to_regexp = __commonJS({
27133
27133
  return result;
27134
27134
  }
27135
27135
  );
27136
- while (m = MATCHING_GROUP_REGEXP.exec(path31)) {
27136
+ while (m = MATCHING_GROUP_REGEXP.exec(path32)) {
27137
27137
  if (m[0][0] === "\\") continue;
27138
27138
  if (keysOffset + i === keys.length || keys[keysOffset + i].offset > m.index) {
27139
27139
  keys.splice(keysOffset + i, 0, {
@@ -27145,13 +27145,13 @@ var require_path_to_regexp = __commonJS({
27145
27145
  }
27146
27146
  i++;
27147
27147
  }
27148
- path31 += strict ? "" : path31[path31.length - 1] === "/" ? "?" : "/?";
27148
+ path32 += strict ? "" : path32[path32.length - 1] === "/" ? "?" : "/?";
27149
27149
  if (end) {
27150
- path31 += "$";
27151
- } else if (path31[path31.length - 1] !== "/") {
27152
- path31 += lookahead ? "(?=/|$)" : "(?:/|$)";
27150
+ path32 += "$";
27151
+ } else if (path32[path32.length - 1] !== "/") {
27152
+ path32 += lookahead ? "(?=/|$)" : "(?:/|$)";
27153
27153
  }
27154
- return new RegExp("^" + path31, flags);
27154
+ return new RegExp("^" + path32, flags);
27155
27155
  }
27156
27156
  }
27157
27157
  });
@@ -27164,19 +27164,19 @@ var require_layer = __commonJS({
27164
27164
  var debug = require_src2()("express:router:layer");
27165
27165
  var hasOwnProperty = Object.prototype.hasOwnProperty;
27166
27166
  module2.exports = Layer;
27167
- function Layer(path31, options, fn) {
27167
+ function Layer(path32, options, fn) {
27168
27168
  if (!(this instanceof Layer)) {
27169
- return new Layer(path31, options, fn);
27169
+ return new Layer(path32, options, fn);
27170
27170
  }
27171
- debug("new %o", path31);
27171
+ debug("new %o", path32);
27172
27172
  var opts = options || {};
27173
27173
  this.handle = fn;
27174
27174
  this.name = fn.name || "<anonymous>";
27175
27175
  this.params = void 0;
27176
27176
  this.path = void 0;
27177
- this.regexp = pathRegexp(path31, this.keys = [], opts);
27178
- this.regexp.fast_star = path31 === "*";
27179
- this.regexp.fast_slash = path31 === "/" && opts.end === false;
27177
+ this.regexp = pathRegexp(path32, this.keys = [], opts);
27178
+ this.regexp.fast_star = path32 === "*";
27179
+ this.regexp.fast_slash = path32 === "/" && opts.end === false;
27180
27180
  }
27181
27181
  Layer.prototype.handle_error = function handle_error(error2, req, res, next) {
27182
27182
  var fn = this.handle;
@@ -27200,20 +27200,20 @@ var require_layer = __commonJS({
27200
27200
  next(err);
27201
27201
  }
27202
27202
  };
27203
- Layer.prototype.match = function match(path31) {
27203
+ Layer.prototype.match = function match(path32) {
27204
27204
  var match2;
27205
- if (path31 != null) {
27205
+ if (path32 != null) {
27206
27206
  if (this.regexp.fast_slash) {
27207
27207
  this.params = {};
27208
27208
  this.path = "";
27209
27209
  return true;
27210
27210
  }
27211
27211
  if (this.regexp.fast_star) {
27212
- this.params = { "0": decode_param(path31) };
27213
- this.path = path31;
27212
+ this.params = { "0": decode_param(path32) };
27213
+ this.path = path32;
27214
27214
  return true;
27215
27215
  }
27216
- match2 = this.regexp.exec(path31);
27216
+ match2 = this.regexp.exec(path32);
27217
27217
  }
27218
27218
  if (!match2) {
27219
27219
  this.params = void 0;
@@ -27306,10 +27306,10 @@ var require_route = __commonJS({
27306
27306
  var slice = Array.prototype.slice;
27307
27307
  var toString = Object.prototype.toString;
27308
27308
  module2.exports = Route;
27309
- function Route(path31) {
27310
- this.path = path31;
27309
+ function Route(path32) {
27310
+ this.path = path32;
27311
27311
  this.stack = [];
27312
- debug("new %o", path31);
27312
+ debug("new %o", path32);
27313
27313
  this.methods = {};
27314
27314
  }
27315
27315
  Route.prototype._handles_method = function _handles_method(method) {
@@ -27522,8 +27522,8 @@ var require_router = __commonJS({
27522
27522
  if (++sync > 100) {
27523
27523
  return setImmediate(next, err);
27524
27524
  }
27525
- var path31 = getPathname(req);
27526
- if (path31 == null) {
27525
+ var path32 = getPathname(req);
27526
+ if (path32 == null) {
27527
27527
  return done(layerError);
27528
27528
  }
27529
27529
  var layer;
@@ -27531,7 +27531,7 @@ var require_router = __commonJS({
27531
27531
  var route;
27532
27532
  while (match !== true && idx < stack.length) {
27533
27533
  layer = stack[idx++];
27534
- match = matchLayer(layer, path31);
27534
+ match = matchLayer(layer, path32);
27535
27535
  route = layer.route;
27536
27536
  if (typeof match !== "boolean") {
27537
27537
  layerError = layerError || match;
@@ -27569,18 +27569,18 @@ var require_router = __commonJS({
27569
27569
  } else if (route) {
27570
27570
  layer.handle_request(req, res, next);
27571
27571
  } else {
27572
- trim_prefix(layer, layerError, layerPath, path31);
27572
+ trim_prefix(layer, layerError, layerPath, path32);
27573
27573
  }
27574
27574
  sync = 0;
27575
27575
  });
27576
27576
  }
27577
- function trim_prefix(layer, layerError, layerPath, path31) {
27577
+ function trim_prefix(layer, layerError, layerPath, path32) {
27578
27578
  if (layerPath.length !== 0) {
27579
- if (layerPath !== path31.slice(0, layerPath.length)) {
27579
+ if (layerPath !== path32.slice(0, layerPath.length)) {
27580
27580
  next(layerError);
27581
27581
  return;
27582
27582
  }
27583
- var c = path31[layerPath.length];
27583
+ var c = path32[layerPath.length];
27584
27584
  if (c && c !== "/" && c !== ".") return next(layerError);
27585
27585
  debug("trim prefix (%s) from url %s", layerPath, req.url);
27586
27586
  removed = layerPath;
@@ -27658,7 +27658,7 @@ var require_router = __commonJS({
27658
27658
  };
27659
27659
  proto.use = function use(fn) {
27660
27660
  var offset = 0;
27661
- var path31 = "/";
27661
+ var path32 = "/";
27662
27662
  if (typeof fn !== "function") {
27663
27663
  var arg = fn;
27664
27664
  while (Array.isArray(arg) && arg.length !== 0) {
@@ -27666,7 +27666,7 @@ var require_router = __commonJS({
27666
27666
  }
27667
27667
  if (typeof arg !== "function") {
27668
27668
  offset = 1;
27669
- path31 = fn;
27669
+ path32 = fn;
27670
27670
  }
27671
27671
  }
27672
27672
  var callbacks = flatten(slice.call(arguments, offset));
@@ -27678,8 +27678,8 @@ var require_router = __commonJS({
27678
27678
  if (typeof fn !== "function") {
27679
27679
  throw new TypeError("Router.use() requires a middleware function but got a " + gettype(fn));
27680
27680
  }
27681
- debug("use %o %s", path31, fn.name || "<anonymous>");
27682
- var layer = new Layer(path31, {
27681
+ debug("use %o %s", path32, fn.name || "<anonymous>");
27682
+ var layer = new Layer(path32, {
27683
27683
  sensitive: this.caseSensitive,
27684
27684
  strict: false,
27685
27685
  end: false
@@ -27689,9 +27689,9 @@ var require_router = __commonJS({
27689
27689
  }
27690
27690
  return this;
27691
27691
  };
27692
- proto.route = function route(path31) {
27693
- var route2 = new Route(path31);
27694
- var layer = new Layer(path31, {
27692
+ proto.route = function route(path32) {
27693
+ var route2 = new Route(path32);
27694
+ var layer = new Layer(path32, {
27695
27695
  sensitive: this.caseSensitive,
27696
27696
  strict: this.strict,
27697
27697
  end: true
@@ -27701,8 +27701,8 @@ var require_router = __commonJS({
27701
27701
  return route2;
27702
27702
  };
27703
27703
  methods.concat("all").forEach(function(method) {
27704
- proto[method] = function(path31) {
27705
- var route = this.route(path31);
27704
+ proto[method] = function(path32) {
27705
+ var route = this.route(path32);
27706
27706
  route[method].apply(route, slice.call(arguments, 1));
27707
27707
  return this;
27708
27708
  };
@@ -27738,9 +27738,9 @@ var require_router = __commonJS({
27738
27738
  }
27739
27739
  return toString.call(obj).replace(objectRegExp, "$1");
27740
27740
  }
27741
- function matchLayer(layer, path31) {
27741
+ function matchLayer(layer, path32) {
27742
27742
  try {
27743
- return layer.match(path31);
27743
+ return layer.match(path32);
27744
27744
  } catch (err) {
27745
27745
  return err;
27746
27746
  }
@@ -27858,13 +27858,13 @@ var require_view = __commonJS({
27858
27858
  "../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/view.js"(exports2, module2) {
27859
27859
  "use strict";
27860
27860
  var debug = require_src2()("express:view");
27861
- var path31 = require("path");
27862
- var fs30 = require("fs");
27863
- var dirname9 = path31.dirname;
27864
- var basename5 = path31.basename;
27865
- var extname4 = path31.extname;
27866
- var join22 = path31.join;
27867
- var resolve21 = path31.resolve;
27861
+ var path32 = require("path");
27862
+ var fs31 = require("fs");
27863
+ var dirname9 = path32.dirname;
27864
+ var basename5 = path32.basename;
27865
+ var extname4 = path32.extname;
27866
+ var join22 = path32.join;
27867
+ var resolve22 = path32.resolve;
27868
27868
  module2.exports = View;
27869
27869
  function View(name2, options) {
27870
27870
  var opts = options || {};
@@ -27893,39 +27893,39 @@ var require_view = __commonJS({
27893
27893
  this.path = this.lookup(fileName);
27894
27894
  }
27895
27895
  View.prototype.lookup = function lookup(name2) {
27896
- var path32;
27896
+ var path33;
27897
27897
  var roots = [].concat(this.root);
27898
27898
  debug('lookup "%s"', name2);
27899
- for (var i = 0; i < roots.length && !path32; i++) {
27899
+ for (var i = 0; i < roots.length && !path33; i++) {
27900
27900
  var root = roots[i];
27901
- var loc = resolve21(root, name2);
27901
+ var loc = resolve22(root, name2);
27902
27902
  var dir = dirname9(loc);
27903
27903
  var file = basename5(loc);
27904
- path32 = this.resolve(dir, file);
27904
+ path33 = this.resolve(dir, file);
27905
27905
  }
27906
- return path32;
27906
+ return path33;
27907
27907
  };
27908
27908
  View.prototype.render = function render(options, callback) {
27909
27909
  debug('render "%s"', this.path);
27910
27910
  this.engine(this.path, options, callback);
27911
27911
  };
27912
- View.prototype.resolve = function resolve22(dir, file) {
27912
+ View.prototype.resolve = function resolve23(dir, file) {
27913
27913
  var ext = this.ext;
27914
- var path32 = join22(dir, file);
27915
- var stat = tryStat(path32);
27914
+ var path33 = join22(dir, file);
27915
+ var stat = tryStat(path33);
27916
27916
  if (stat && stat.isFile()) {
27917
- return path32;
27917
+ return path33;
27918
27918
  }
27919
- path32 = join22(dir, basename5(file, ext), "index" + ext);
27920
- stat = tryStat(path32);
27919
+ path33 = join22(dir, basename5(file, ext), "index" + ext);
27920
+ stat = tryStat(path33);
27921
27921
  if (stat && stat.isFile()) {
27922
- return path32;
27922
+ return path33;
27923
27923
  }
27924
27924
  };
27925
- function tryStat(path32) {
27926
- debug('stat "%s"', path32);
27925
+ function tryStat(path33) {
27926
+ debug('stat "%s"', path33);
27927
27927
  try {
27928
- return fs30.statSync(path32);
27928
+ return fs31.statSync(path33);
27929
27929
  } catch (e) {
27930
27930
  return void 0;
27931
27931
  }
@@ -28222,8 +28222,8 @@ var require_types = __commonJS({
28222
28222
  var require_mime = __commonJS({
28223
28223
  "../../node_modules/.pnpm/mime@1.6.0/node_modules/mime/mime.js"(exports2, module2) {
28224
28224
  "use strict";
28225
- var path31 = require("path");
28226
- var fs30 = require("fs");
28225
+ var path32 = require("path");
28226
+ var fs31 = require("fs");
28227
28227
  function Mime() {
28228
28228
  this.types = /* @__PURE__ */ Object.create(null);
28229
28229
  this.extensions = /* @__PURE__ */ Object.create(null);
@@ -28244,7 +28244,7 @@ var require_mime = __commonJS({
28244
28244
  };
28245
28245
  Mime.prototype.load = function(file) {
28246
28246
  this._loading = file;
28247
- var map = {}, content = fs30.readFileSync(file, "ascii"), lines = content.split(/[\r\n]+/);
28247
+ var map = {}, content = fs31.readFileSync(file, "ascii"), lines = content.split(/[\r\n]+/);
28248
28248
  lines.forEach(function(line) {
28249
28249
  var fields = line.replace(/\s*#.*|^\s*|\s*$/g, "").split(/\s+/);
28250
28250
  map[fields.shift()] = fields;
@@ -28252,8 +28252,8 @@ var require_mime = __commonJS({
28252
28252
  this.define(map);
28253
28253
  this._loading = null;
28254
28254
  };
28255
- Mime.prototype.lookup = function(path32, fallback) {
28256
- var ext = path32.replace(/^.*[\.\/\\]/, "").toLowerCase();
28255
+ Mime.prototype.lookup = function(path33, fallback) {
28256
+ var ext = path33.replace(/^.*[\.\/\\]/, "").toLowerCase();
28257
28257
  return this.types[ext] || fallback || this.default_type;
28258
28258
  };
28259
28259
  Mime.prototype.extension = function(mimeType) {
@@ -28366,33 +28366,33 @@ var require_send = __commonJS({
28366
28366
  var escapeHtml2 = require_escape_html();
28367
28367
  var etag = require_etag();
28368
28368
  var fresh = require_fresh();
28369
- var fs30 = require("fs");
28369
+ var fs31 = require("fs");
28370
28370
  var mime = require_mime();
28371
28371
  var ms = require_ms();
28372
28372
  var onFinished = require_on_finished();
28373
28373
  var parseRange = require_range_parser();
28374
- var path31 = require("path");
28374
+ var path32 = require("path");
28375
28375
  var statuses = require_statuses();
28376
28376
  var Stream = require("stream");
28377
28377
  var util3 = require("util");
28378
- var extname4 = path31.extname;
28379
- var join22 = path31.join;
28380
- var normalize = path31.normalize;
28381
- var resolve21 = path31.resolve;
28382
- var sep7 = path31.sep;
28378
+ var extname4 = path32.extname;
28379
+ var join22 = path32.join;
28380
+ var normalize = path32.normalize;
28381
+ var resolve22 = path32.resolve;
28382
+ var sep8 = path32.sep;
28383
28383
  var BYTES_RANGE_REGEXP = /^ *bytes=/;
28384
28384
  var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1e3;
28385
28385
  var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/;
28386
28386
  module2.exports = send;
28387
28387
  module2.exports.mime = mime;
28388
- function send(req, path32, options) {
28389
- return new SendStream(req, path32, options);
28388
+ function send(req, path33, options) {
28389
+ return new SendStream(req, path33, options);
28390
28390
  }
28391
- function SendStream(req, path32, options) {
28391
+ function SendStream(req, path33, options) {
28392
28392
  Stream.call(this);
28393
28393
  var opts = options || {};
28394
28394
  this.options = opts;
28395
- this.path = path32;
28395
+ this.path = path33;
28396
28396
  this.req = req;
28397
28397
  this._acceptRanges = opts.acceptRanges !== void 0 ? Boolean(opts.acceptRanges) : true;
28398
28398
  this._cacheControl = opts.cacheControl !== void 0 ? Boolean(opts.cacheControl) : true;
@@ -28415,7 +28415,7 @@ var require_send = __commonJS({
28415
28415
  this._maxage = opts.maxAge || opts.maxage;
28416
28416
  this._maxage = typeof this._maxage === "string" ? ms(this._maxage) : Number(this._maxage);
28417
28417
  this._maxage = !isNaN(this._maxage) ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) : 0;
28418
- this._root = opts.root ? resolve21(opts.root) : null;
28418
+ this._root = opts.root ? resolve22(opts.root) : null;
28419
28419
  if (!this._root && opts.from) {
28420
28420
  this.from(opts.from);
28421
28421
  }
@@ -28438,8 +28438,8 @@ var require_send = __commonJS({
28438
28438
  this._index = index2;
28439
28439
  return this;
28440
28440
  }, "send.index: pass index as option");
28441
- SendStream.prototype.root = function root(path32) {
28442
- this._root = resolve21(String(path32));
28441
+ SendStream.prototype.root = function root(path33) {
28442
+ this._root = resolve22(String(path33));
28443
28443
  debug("root %s", this._root);
28444
28444
  return this;
28445
28445
  };
@@ -28552,10 +28552,10 @@ var require_send = __commonJS({
28552
28552
  var lastModified = this.res.getHeader("Last-Modified");
28553
28553
  return parseHttpDate(lastModified) <= parseHttpDate(ifRange);
28554
28554
  };
28555
- SendStream.prototype.redirect = function redirect(path32) {
28555
+ SendStream.prototype.redirect = function redirect(path33) {
28556
28556
  var res = this.res;
28557
28557
  if (hasListeners(this, "directory")) {
28558
- this.emit("directory", res, path32);
28558
+ this.emit("directory", res, path33);
28559
28559
  return;
28560
28560
  }
28561
28561
  if (this.hasTrailingSlash()) {
@@ -28575,42 +28575,42 @@ var require_send = __commonJS({
28575
28575
  SendStream.prototype.pipe = function pipe2(res) {
28576
28576
  var root = this._root;
28577
28577
  this.res = res;
28578
- var path32 = decode(this.path);
28579
- if (path32 === -1) {
28578
+ var path33 = decode(this.path);
28579
+ if (path33 === -1) {
28580
28580
  this.error(400);
28581
28581
  return res;
28582
28582
  }
28583
- if (~path32.indexOf("\0")) {
28583
+ if (~path33.indexOf("\0")) {
28584
28584
  this.error(400);
28585
28585
  return res;
28586
28586
  }
28587
28587
  var parts;
28588
28588
  if (root !== null) {
28589
- if (path32) {
28590
- path32 = normalize("." + sep7 + path32);
28589
+ if (path33) {
28590
+ path33 = normalize("." + sep8 + path33);
28591
28591
  }
28592
- if (UP_PATH_REGEXP.test(path32)) {
28593
- debug('malicious path "%s"', path32);
28592
+ if (UP_PATH_REGEXP.test(path33)) {
28593
+ debug('malicious path "%s"', path33);
28594
28594
  this.error(403);
28595
28595
  return res;
28596
28596
  }
28597
- parts = path32.split(sep7);
28598
- path32 = normalize(join22(root, path32));
28597
+ parts = path33.split(sep8);
28598
+ path33 = normalize(join22(root, path33));
28599
28599
  } else {
28600
- if (UP_PATH_REGEXP.test(path32)) {
28601
- debug('malicious path "%s"', path32);
28600
+ if (UP_PATH_REGEXP.test(path33)) {
28601
+ debug('malicious path "%s"', path33);
28602
28602
  this.error(403);
28603
28603
  return res;
28604
28604
  }
28605
- parts = normalize(path32).split(sep7);
28606
- path32 = resolve21(path32);
28605
+ parts = normalize(path33).split(sep8);
28606
+ path33 = resolve22(path33);
28607
28607
  }
28608
28608
  if (containsDotFile(parts)) {
28609
28609
  var access = this._dotfiles;
28610
28610
  if (access === void 0) {
28611
28611
  access = parts[parts.length - 1][0] === "." ? this._hidden ? "allow" : "ignore" : "allow";
28612
28612
  }
28613
- debug('%s dotfile "%s"', access, path32);
28613
+ debug('%s dotfile "%s"', access, path33);
28614
28614
  switch (access) {
28615
28615
  case "allow":
28616
28616
  break;
@@ -28624,13 +28624,13 @@ var require_send = __commonJS({
28624
28624
  }
28625
28625
  }
28626
28626
  if (this._index.length && this.hasTrailingSlash()) {
28627
- this.sendIndex(path32);
28627
+ this.sendIndex(path33);
28628
28628
  return res;
28629
28629
  }
28630
- this.sendFile(path32);
28630
+ this.sendFile(path33);
28631
28631
  return res;
28632
28632
  };
28633
- SendStream.prototype.send = function send2(path32, stat) {
28633
+ SendStream.prototype.send = function send2(path33, stat) {
28634
28634
  var len = stat.size;
28635
28635
  var options = this.options;
28636
28636
  var opts = {};
@@ -28642,9 +28642,9 @@ var require_send = __commonJS({
28642
28642
  this.headersAlreadySent();
28643
28643
  return;
28644
28644
  }
28645
- debug('pipe "%s"', path32);
28646
- this.setHeader(path32, stat);
28647
- this.type(path32);
28645
+ debug('pipe "%s"', path33);
28646
+ this.setHeader(path33, stat);
28647
+ this.type(path33);
28648
28648
  if (this.isConditionalGET()) {
28649
28649
  if (this.isPreconditionFailure()) {
28650
28650
  this.error(412);
@@ -28693,28 +28693,28 @@ var require_send = __commonJS({
28693
28693
  res.end();
28694
28694
  return;
28695
28695
  }
28696
- this.stream(path32, opts);
28696
+ this.stream(path33, opts);
28697
28697
  };
28698
- SendStream.prototype.sendFile = function sendFile(path32) {
28698
+ SendStream.prototype.sendFile = function sendFile(path33) {
28699
28699
  var i = 0;
28700
28700
  var self2 = this;
28701
- debug('stat "%s"', path32);
28702
- fs30.stat(path32, function onstat(err, stat) {
28703
- if (err && err.code === "ENOENT" && !extname4(path32) && path32[path32.length - 1] !== sep7) {
28701
+ debug('stat "%s"', path33);
28702
+ fs31.stat(path33, function onstat(err, stat) {
28703
+ if (err && err.code === "ENOENT" && !extname4(path33) && path33[path33.length - 1] !== sep8) {
28704
28704
  return next(err);
28705
28705
  }
28706
28706
  if (err) return self2.onStatError(err);
28707
- if (stat.isDirectory()) return self2.redirect(path32);
28708
- self2.emit("file", path32, stat);
28709
- self2.send(path32, stat);
28707
+ if (stat.isDirectory()) return self2.redirect(path33);
28708
+ self2.emit("file", path33, stat);
28709
+ self2.send(path33, stat);
28710
28710
  });
28711
28711
  function next(err) {
28712
28712
  if (self2._extensions.length <= i) {
28713
28713
  return err ? self2.onStatError(err) : self2.error(404);
28714
28714
  }
28715
- var p = path32 + "." + self2._extensions[i++];
28715
+ var p = path33 + "." + self2._extensions[i++];
28716
28716
  debug('stat "%s"', p);
28717
- fs30.stat(p, function(err2, stat) {
28717
+ fs31.stat(p, function(err2, stat) {
28718
28718
  if (err2) return next(err2);
28719
28719
  if (stat.isDirectory()) return next();
28720
28720
  self2.emit("file", p, stat);
@@ -28722,7 +28722,7 @@ var require_send = __commonJS({
28722
28722
  });
28723
28723
  }
28724
28724
  };
28725
- SendStream.prototype.sendIndex = function sendIndex(path32) {
28725
+ SendStream.prototype.sendIndex = function sendIndex(path33) {
28726
28726
  var i = -1;
28727
28727
  var self2 = this;
28728
28728
  function next(err) {
@@ -28730,9 +28730,9 @@ var require_send = __commonJS({
28730
28730
  if (err) return self2.onStatError(err);
28731
28731
  return self2.error(404);
28732
28732
  }
28733
- var p = join22(path32, self2._index[i]);
28733
+ var p = join22(path33, self2._index[i]);
28734
28734
  debug('stat "%s"', p);
28735
- fs30.stat(p, function(err2, stat) {
28735
+ fs31.stat(p, function(err2, stat) {
28736
28736
  if (err2) return next(err2);
28737
28737
  if (stat.isDirectory()) return next();
28738
28738
  self2.emit("file", p, stat);
@@ -28741,10 +28741,10 @@ var require_send = __commonJS({
28741
28741
  }
28742
28742
  next();
28743
28743
  };
28744
- SendStream.prototype.stream = function stream(path32, options) {
28744
+ SendStream.prototype.stream = function stream(path33, options) {
28745
28745
  var self2 = this;
28746
28746
  var res = this.res;
28747
- var stream2 = fs30.createReadStream(path32, options);
28747
+ var stream2 = fs31.createReadStream(path33, options);
28748
28748
  this.emit("stream", stream2);
28749
28749
  stream2.pipe(res);
28750
28750
  function cleanup() {
@@ -28759,10 +28759,10 @@ var require_send = __commonJS({
28759
28759
  self2.emit("end");
28760
28760
  });
28761
28761
  };
28762
- SendStream.prototype.type = function type(path32) {
28762
+ SendStream.prototype.type = function type(path33) {
28763
28763
  var res = this.res;
28764
28764
  if (res.getHeader("Content-Type")) return;
28765
- var type2 = mime.lookup(path32);
28765
+ var type2 = mime.lookup(path33);
28766
28766
  if (!type2) {
28767
28767
  debug("no content-type");
28768
28768
  return;
@@ -28771,9 +28771,9 @@ var require_send = __commonJS({
28771
28771
  debug("content-type %s", type2);
28772
28772
  res.setHeader("Content-Type", type2 + (charset ? "; charset=" + charset : ""));
28773
28773
  };
28774
- SendStream.prototype.setHeader = function setHeader(path32, stat) {
28774
+ SendStream.prototype.setHeader = function setHeader(path33, stat) {
28775
28775
  var res = this.res;
28776
- this.emit("headers", res, path32, stat);
28776
+ this.emit("headers", res, path33, stat);
28777
28777
  if (this._acceptRanges && !res.getHeader("Accept-Ranges")) {
28778
28778
  debug("accept ranges");
28779
28779
  res.setHeader("Accept-Ranges", "bytes");
@@ -28832,9 +28832,9 @@ var require_send = __commonJS({
28832
28832
  }
28833
28833
  return err instanceof Error ? createError(status, err, { expose: false }) : createError(status, err);
28834
28834
  }
28835
- function decode(path32) {
28835
+ function decode(path33) {
28836
28836
  try {
28837
- return decodeURIComponent(path32);
28837
+ return decodeURIComponent(path33);
28838
28838
  } catch (err) {
28839
28839
  return -1;
28840
28840
  }
@@ -29744,10 +29744,10 @@ var require_utils2 = __commonJS({
29744
29744
  var querystring = require("querystring");
29745
29745
  exports2.etag = createETagGenerator({ weak: false });
29746
29746
  exports2.wetag = createETagGenerator({ weak: true });
29747
- exports2.isAbsolute = function(path31) {
29748
- if ("/" === path31[0]) return true;
29749
- if (":" === path31[1] && ("\\" === path31[2] || "/" === path31[2])) return true;
29750
- if ("\\\\" === path31.substring(0, 2)) return true;
29747
+ exports2.isAbsolute = function(path32) {
29748
+ if ("/" === path32[0]) return true;
29749
+ if (":" === path32[1] && ("\\" === path32[2] || "/" === path32[2])) return true;
29750
+ if ("\\\\" === path32.substring(0, 2)) return true;
29751
29751
  };
29752
29752
  exports2.flatten = deprecate.function(
29753
29753
  flatten,
@@ -29883,7 +29883,7 @@ var require_application = __commonJS({
29883
29883
  var deprecate = require_depd()("express");
29884
29884
  var flatten = require_array_flatten();
29885
29885
  var merge2 = require_utils_merge();
29886
- var resolve21 = require("path").resolve;
29886
+ var resolve22 = require("path").resolve;
29887
29887
  var setPrototypeOf = require_setprototypeof();
29888
29888
  var hasOwnProperty = Object.prototype.hasOwnProperty;
29889
29889
  var slice = Array.prototype.slice;
@@ -29922,7 +29922,7 @@ var require_application = __commonJS({
29922
29922
  this.mountpath = "/";
29923
29923
  this.locals.settings = this.settings;
29924
29924
  this.set("view", View);
29925
- this.set("views", resolve21("views"));
29925
+ this.set("views", resolve22("views"));
29926
29926
  this.set("jsonp callback name", "callback");
29927
29927
  if (env === "production") {
29928
29928
  this.enable("view cache");
@@ -29958,7 +29958,7 @@ var require_application = __commonJS({
29958
29958
  };
29959
29959
  app.use = function use(fn) {
29960
29960
  var offset = 0;
29961
- var path31 = "/";
29961
+ var path32 = "/";
29962
29962
  if (typeof fn !== "function") {
29963
29963
  var arg = fn;
29964
29964
  while (Array.isArray(arg) && arg.length !== 0) {
@@ -29966,7 +29966,7 @@ var require_application = __commonJS({
29966
29966
  }
29967
29967
  if (typeof arg !== "function") {
29968
29968
  offset = 1;
29969
- path31 = fn;
29969
+ path32 = fn;
29970
29970
  }
29971
29971
  }
29972
29972
  var fns = flatten(slice.call(arguments, offset));
@@ -29977,12 +29977,12 @@ var require_application = __commonJS({
29977
29977
  var router = this._router;
29978
29978
  fns.forEach(function(fn2) {
29979
29979
  if (!fn2 || !fn2.handle || !fn2.set) {
29980
- return router.use(path31, fn2);
29980
+ return router.use(path32, fn2);
29981
29981
  }
29982
- debug(".use app under %s", path31);
29983
- fn2.mountpath = path31;
29982
+ debug(".use app under %s", path32);
29983
+ fn2.mountpath = path32;
29984
29984
  fn2.parent = this;
29985
- router.use(path31, function mounted_app(req, res, next) {
29985
+ router.use(path32, function mounted_app(req, res, next) {
29986
29986
  var orig = req.app;
29987
29987
  fn2.handle(req, res, function(err) {
29988
29988
  setPrototypeOf(req, orig.request);
@@ -29994,9 +29994,9 @@ var require_application = __commonJS({
29994
29994
  }, this);
29995
29995
  return this;
29996
29996
  };
29997
- app.route = function route(path31) {
29997
+ app.route = function route(path32) {
29998
29998
  this.lazyrouter();
29999
- return this._router.route(path31);
29999
+ return this._router.route(path32);
30000
30000
  };
30001
30001
  app.engine = function engine(ext, fn) {
30002
30002
  if (typeof fn !== "function") {
@@ -30047,7 +30047,7 @@ var require_application = __commonJS({
30047
30047
  }
30048
30048
  return this;
30049
30049
  };
30050
- app.path = function path31() {
30050
+ app.path = function path32() {
30051
30051
  return this.parent ? this.parent.path() + this.mountpath : "";
30052
30052
  };
30053
30053
  app.enabled = function enabled2(setting) {
@@ -30063,19 +30063,19 @@ var require_application = __commonJS({
30063
30063
  return this.set(setting, false);
30064
30064
  };
30065
30065
  methods.forEach(function(method) {
30066
- app[method] = function(path31) {
30066
+ app[method] = function(path32) {
30067
30067
  if (method === "get" && arguments.length === 1) {
30068
- return this.set(path31);
30068
+ return this.set(path32);
30069
30069
  }
30070
30070
  this.lazyrouter();
30071
- var route = this._router.route(path31);
30071
+ var route = this._router.route(path32);
30072
30072
  route[method].apply(route, slice.call(arguments, 1));
30073
30073
  return this;
30074
30074
  };
30075
30075
  });
30076
- app.all = function all(path31) {
30076
+ app.all = function all(path32) {
30077
30077
  this.lazyrouter();
30078
- var route = this._router.route(path31);
30078
+ var route = this._router.route(path32);
30079
30079
  var args = slice.call(arguments, 1);
30080
30080
  for (var i = 0; i < methods.length; i++) {
30081
30081
  route[methods[i]].apply(route, args);
@@ -30834,7 +30834,7 @@ var require_request = __commonJS({
30834
30834
  var subdomains2 = !isIP(hostname4) ? hostname4.split(".").reverse() : [hostname4];
30835
30835
  return subdomains2.slice(offset);
30836
30836
  });
30837
- defineGetter(req, "path", function path31() {
30837
+ defineGetter(req, "path", function path32() {
30838
30838
  return parse3(this).pathname;
30839
30839
  });
30840
30840
  defineGetter(req, "hostname", function hostname4() {
@@ -31157,7 +31157,7 @@ var require_response = __commonJS({
31157
31157
  var http3 = require("http");
31158
31158
  var isAbsolute8 = require_utils2().isAbsolute;
31159
31159
  var onFinished = require_on_finished();
31160
- var path31 = require("path");
31160
+ var path32 = require("path");
31161
31161
  var statuses = require_statuses();
31162
31162
  var merge2 = require_utils_merge();
31163
31163
  var sign = require_cookie_signature().sign;
@@ -31166,9 +31166,9 @@ var require_response = __commonJS({
31166
31166
  var setCharset = require_utils2().setCharset;
31167
31167
  var cookie = require_cookie();
31168
31168
  var send = require_send();
31169
- var extname4 = path31.extname;
31169
+ var extname4 = path32.extname;
31170
31170
  var mime = send.mime;
31171
- var resolve21 = path31.resolve;
31171
+ var resolve22 = path32.resolve;
31172
31172
  var vary = require_vary();
31173
31173
  var res = Object.create(http3.ServerResponse.prototype);
31174
31174
  module2.exports = res;
@@ -31345,26 +31345,26 @@ var require_response = __commonJS({
31345
31345
  this.type("txt");
31346
31346
  return this.send(body);
31347
31347
  };
31348
- res.sendFile = function sendFile(path32, options, callback) {
31348
+ res.sendFile = function sendFile(path33, options, callback) {
31349
31349
  var done = callback;
31350
31350
  var req = this.req;
31351
31351
  var res2 = this;
31352
31352
  var next = req.next;
31353
31353
  var opts = options || {};
31354
- if (!path32) {
31354
+ if (!path33) {
31355
31355
  throw new TypeError("path argument is required to res.sendFile");
31356
31356
  }
31357
- if (typeof path32 !== "string") {
31357
+ if (typeof path33 !== "string") {
31358
31358
  throw new TypeError("path must be a string to res.sendFile");
31359
31359
  }
31360
31360
  if (typeof options === "function") {
31361
31361
  done = options;
31362
31362
  opts = {};
31363
31363
  }
31364
- if (!opts.root && !isAbsolute8(path32)) {
31364
+ if (!opts.root && !isAbsolute8(path33)) {
31365
31365
  throw new TypeError("path must be absolute or specify root to res.sendFile");
31366
31366
  }
31367
- var pathname = encodeURI(path32);
31367
+ var pathname = encodeURI(path33);
31368
31368
  var file = send(req, pathname, opts);
31369
31369
  sendfile(res2, file, opts, function(err) {
31370
31370
  if (done) return done(err);
@@ -31374,7 +31374,7 @@ var require_response = __commonJS({
31374
31374
  }
31375
31375
  });
31376
31376
  };
31377
- res.sendfile = function(path32, options, callback) {
31377
+ res.sendfile = function(path33, options, callback) {
31378
31378
  var done = callback;
31379
31379
  var req = this.req;
31380
31380
  var res2 = this;
@@ -31384,7 +31384,7 @@ var require_response = __commonJS({
31384
31384
  done = options;
31385
31385
  opts = {};
31386
31386
  }
31387
- var file = send(req, path32, opts);
31387
+ var file = send(req, path33, opts);
31388
31388
  sendfile(res2, file, opts, function(err) {
31389
31389
  if (done) return done(err);
31390
31390
  if (err && err.code === "EISDIR") return next();
@@ -31397,7 +31397,7 @@ var require_response = __commonJS({
31397
31397
  res.sendfile,
31398
31398
  "res.sendfile: Use res.sendFile instead"
31399
31399
  );
31400
- res.download = function download(path32, filename, options, callback) {
31400
+ res.download = function download(path33, filename, options, callback) {
31401
31401
  var done = callback;
31402
31402
  var name2 = filename;
31403
31403
  var opts = options || null;
@@ -31414,7 +31414,7 @@ var require_response = __commonJS({
31414
31414
  opts = filename;
31415
31415
  }
31416
31416
  var headers = {
31417
- "Content-Disposition": contentDisposition(name2 || path32)
31417
+ "Content-Disposition": contentDisposition(name2 || path33)
31418
31418
  };
31419
31419
  if (opts && opts.headers) {
31420
31420
  var keys = Object.keys(opts.headers);
@@ -31427,7 +31427,7 @@ var require_response = __commonJS({
31427
31427
  }
31428
31428
  opts = Object.create(opts);
31429
31429
  opts.headers = headers;
31430
- var fullPath = !opts.root ? resolve21(path32) : path32;
31430
+ var fullPath = !opts.root ? resolve22(path33) : path33;
31431
31431
  return this.sendFile(fullPath, opts, done);
31432
31432
  };
31433
31433
  res.contentType = res.type = function contentType(type) {
@@ -31693,7 +31693,7 @@ var require_serve_static = __commonJS({
31693
31693
  var encodeUrl = require_encodeurl();
31694
31694
  var escapeHtml2 = require_escape_html();
31695
31695
  var parseUrl = require_parseurl();
31696
- var resolve21 = require("path").resolve;
31696
+ var resolve22 = require("path").resolve;
31697
31697
  var send = require_send();
31698
31698
  var url = require("url");
31699
31699
  module2.exports = serveStatic;
@@ -31713,7 +31713,7 @@ var require_serve_static = __commonJS({
31713
31713
  throw new TypeError("option setHeaders must be function");
31714
31714
  }
31715
31715
  opts.maxage = opts.maxage || opts.maxAge || 0;
31716
- opts.root = resolve21(root);
31716
+ opts.root = resolve22(root);
31717
31717
  var onDirectory = redirect ? createRedirectDirectoryListener() : createNotFoundDirectoryListener();
31718
31718
  return function serveStatic2(req, res, next) {
31719
31719
  if (req.method !== "GET" && req.method !== "HEAD") {
@@ -31728,11 +31728,11 @@ var require_serve_static = __commonJS({
31728
31728
  }
31729
31729
  var forwardError = !fallthrough;
31730
31730
  var originalUrl = parseUrl.original(req);
31731
- var path31 = parseUrl(req).pathname;
31732
- if (path31 === "/" && originalUrl.pathname.substr(-1) !== "/") {
31733
- path31 = "";
31731
+ var path32 = parseUrl(req).pathname;
31732
+ if (path32 === "/" && originalUrl.pathname.substr(-1) !== "/") {
31733
+ path32 = "";
31734
31734
  }
31735
- var stream = send(req, path31, opts);
31735
+ var stream = send(req, path32, opts);
31736
31736
  stream.on("directory", onDirectory);
31737
31737
  if (setHeaders) {
31738
31738
  stream.on("headers", setHeaders);
@@ -32069,10 +32069,10 @@ function assignProp(target, prop, value) {
32069
32069
  configurable: true
32070
32070
  });
32071
32071
  }
32072
- function getElementAtPath(obj, path31) {
32073
- if (!path31)
32072
+ function getElementAtPath(obj, path32) {
32073
+ if (!path32)
32074
32074
  return obj;
32075
- return path31.reduce((acc, key) => acc?.[key], obj);
32075
+ return path32.reduce((acc, key) => acc?.[key], obj);
32076
32076
  }
32077
32077
  function promiseAllObject(promisesObj) {
32078
32078
  const keys = Object.keys(promisesObj);
@@ -32321,11 +32321,11 @@ function aborted(x, startIndex = 0) {
32321
32321
  }
32322
32322
  return false;
32323
32323
  }
32324
- function prefixIssues(path31, issues) {
32324
+ function prefixIssues(path32, issues) {
32325
32325
  return issues.map((iss) => {
32326
32326
  var _a;
32327
32327
  (_a = iss).path ?? (_a.path = []);
32328
- iss.path.unshift(path31);
32328
+ iss.path.unshift(path32);
32329
32329
  return iss;
32330
32330
  });
32331
32331
  }
@@ -38438,7 +38438,7 @@ var init_protocol = __esm({
38438
38438
  return;
38439
38439
  }
38440
38440
  const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1e3;
38441
- await new Promise((resolve21) => setTimeout(resolve21, pollInterval));
38441
+ await new Promise((resolve22) => setTimeout(resolve22, pollInterval));
38442
38442
  options?.signal?.throwIfAborted();
38443
38443
  }
38444
38444
  } catch (error2) {
@@ -38455,7 +38455,7 @@ var init_protocol = __esm({
38455
38455
  */
38456
38456
  request(request, resultSchema, options) {
38457
38457
  const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
38458
- return new Promise((resolve21, reject) => {
38458
+ return new Promise((resolve22, reject) => {
38459
38459
  const earlyReject = (error2) => {
38460
38460
  reject(error2);
38461
38461
  };
@@ -38533,7 +38533,7 @@ var init_protocol = __esm({
38533
38533
  if (!parseResult.success) {
38534
38534
  reject(parseResult.error);
38535
38535
  } else {
38536
- resolve21(parseResult.data);
38536
+ resolve22(parseResult.data);
38537
38537
  }
38538
38538
  } catch (error2) {
38539
38539
  reject(error2);
@@ -38794,12 +38794,12 @@ var init_protocol = __esm({
38794
38794
  }
38795
38795
  } catch {
38796
38796
  }
38797
- return new Promise((resolve21, reject) => {
38797
+ return new Promise((resolve22, reject) => {
38798
38798
  if (signal.aborted) {
38799
38799
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
38800
38800
  return;
38801
38801
  }
38802
- const timeoutId = setTimeout(resolve21, interval);
38802
+ const timeoutId = setTimeout(resolve22, interval);
38803
38803
  signal.addEventListener("abort", () => {
38804
38804
  clearTimeout(timeoutId);
38805
38805
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
@@ -41826,7 +41826,7 @@ var require_compile = __commonJS({
41826
41826
  const schOrFunc = root.refs[ref];
41827
41827
  if (schOrFunc)
41828
41828
  return schOrFunc;
41829
- let _sch = resolve21.call(this, root, ref);
41829
+ let _sch = resolve22.call(this, root, ref);
41830
41830
  if (_sch === void 0) {
41831
41831
  const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref];
41832
41832
  const { schemaId } = this.opts;
@@ -41853,7 +41853,7 @@ var require_compile = __commonJS({
41853
41853
  function sameSchemaEnv(s1, s2) {
41854
41854
  return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
41855
41855
  }
41856
- function resolve21(root, ref) {
41856
+ function resolve22(root, ref) {
41857
41857
  let sch;
41858
41858
  while (typeof (sch = this.refs[ref]) == "string")
41859
41859
  ref = sch;
@@ -42071,8 +42071,8 @@ var require_utils3 = __commonJS({
42071
42071
  }
42072
42072
  return ind;
42073
42073
  }
42074
- function removeDotSegments(path31) {
42075
- let input = path31;
42074
+ function removeDotSegments(path32) {
42075
+ let input = path32;
42076
42076
  const output = [];
42077
42077
  let nextSlash = -1;
42078
42078
  let len = 0;
@@ -42324,8 +42324,8 @@ var require_schemes = __commonJS({
42324
42324
  wsComponent.secure = void 0;
42325
42325
  }
42326
42326
  if (wsComponent.resourceName) {
42327
- const [path31, query] = wsComponent.resourceName.split("?");
42328
- wsComponent.path = path31 && path31 !== "/" ? path31 : void 0;
42327
+ const [path32, query] = wsComponent.resourceName.split("?");
42328
+ wsComponent.path = path32 && path32 !== "/" ? path32 : void 0;
42329
42329
  wsComponent.query = query;
42330
42330
  wsComponent.resourceName = void 0;
42331
42331
  }
@@ -42484,7 +42484,7 @@ var require_fast_uri = __commonJS({
42484
42484
  }
42485
42485
  return uri;
42486
42486
  }
42487
- function resolve21(baseURI, relativeURI, options) {
42487
+ function resolve22(baseURI, relativeURI, options) {
42488
42488
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
42489
42489
  const resolved = resolveComponent(parse3(baseURI, schemelessOptions), parse3(relativeURI, schemelessOptions), schemelessOptions, true);
42490
42490
  schemelessOptions.skipEscape = true;
@@ -42742,7 +42742,7 @@ var require_fast_uri = __commonJS({
42742
42742
  var fastUri = {
42743
42743
  SCHEMES,
42744
42744
  normalize,
42745
- resolve: resolve21,
42745
+ resolve: resolve22,
42746
42746
  resolveComponent,
42747
42747
  equal,
42748
42748
  serialize,
@@ -45718,12 +45718,12 @@ var require_dist4 = __commonJS({
45718
45718
  throw new Error(`Unknown format "${name2}"`);
45719
45719
  return f;
45720
45720
  };
45721
- function addFormats(ajv, list, fs30, exportName) {
45721
+ function addFormats(ajv, list, fs31, exportName) {
45722
45722
  var _a;
45723
45723
  var _b;
45724
45724
  (_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
45725
45725
  for (const f of list)
45726
- ajv.addFormat(f, fs30[f]);
45726
+ ajv.addFormat(f, fs31[f]);
45727
45727
  }
45728
45728
  module2.exports = exports2 = formatsPlugin;
45729
45729
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -46549,8 +46549,8 @@ var require_windows = __commonJS({
46549
46549
  "use strict";
46550
46550
  module2.exports = isexe;
46551
46551
  isexe.sync = sync;
46552
- var fs30 = require("fs");
46553
- function checkPathExt(path31, options) {
46552
+ var fs31 = require("fs");
46553
+ function checkPathExt(path32, options) {
46554
46554
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
46555
46555
  if (!pathext) {
46556
46556
  return true;
@@ -46561,25 +46561,25 @@ var require_windows = __commonJS({
46561
46561
  }
46562
46562
  for (var i = 0; i < pathext.length; i++) {
46563
46563
  var p = pathext[i].toLowerCase();
46564
- if (p && path31.substr(-p.length).toLowerCase() === p) {
46564
+ if (p && path32.substr(-p.length).toLowerCase() === p) {
46565
46565
  return true;
46566
46566
  }
46567
46567
  }
46568
46568
  return false;
46569
46569
  }
46570
- function checkStat(stat, path31, options) {
46570
+ function checkStat(stat, path32, options) {
46571
46571
  if (!stat.isSymbolicLink() && !stat.isFile()) {
46572
46572
  return false;
46573
46573
  }
46574
- return checkPathExt(path31, options);
46574
+ return checkPathExt(path32, options);
46575
46575
  }
46576
- function isexe(path31, options, cb) {
46577
- fs30.stat(path31, function(er, stat) {
46578
- cb(er, er ? false : checkStat(stat, path31, options));
46576
+ function isexe(path32, options, cb) {
46577
+ fs31.stat(path32, function(er, stat) {
46578
+ cb(er, er ? false : checkStat(stat, path32, options));
46579
46579
  });
46580
46580
  }
46581
- function sync(path31, options) {
46582
- return checkStat(fs30.statSync(path31), path31, options);
46581
+ function sync(path32, options) {
46582
+ return checkStat(fs31.statSync(path32), path32, options);
46583
46583
  }
46584
46584
  }
46585
46585
  });
@@ -46590,14 +46590,14 @@ var require_mode = __commonJS({
46590
46590
  "use strict";
46591
46591
  module2.exports = isexe;
46592
46592
  isexe.sync = sync;
46593
- var fs30 = require("fs");
46594
- function isexe(path31, options, cb) {
46595
- fs30.stat(path31, function(er, stat) {
46593
+ var fs31 = require("fs");
46594
+ function isexe(path32, options, cb) {
46595
+ fs31.stat(path32, function(er, stat) {
46596
46596
  cb(er, er ? false : checkStat(stat, options));
46597
46597
  });
46598
46598
  }
46599
- function sync(path31, options) {
46600
- return checkStat(fs30.statSync(path31), options);
46599
+ function sync(path32, options) {
46600
+ return checkStat(fs31.statSync(path32), options);
46601
46601
  }
46602
46602
  function checkStat(stat, options) {
46603
46603
  return stat.isFile() && checkMode(stat, options);
@@ -46622,7 +46622,7 @@ var require_mode = __commonJS({
46622
46622
  var require_isexe = __commonJS({
46623
46623
  "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports2, module2) {
46624
46624
  "use strict";
46625
- var fs30 = require("fs");
46625
+ var fs31 = require("fs");
46626
46626
  var core;
46627
46627
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
46628
46628
  core = require_windows();
@@ -46631,7 +46631,7 @@ var require_isexe = __commonJS({
46631
46631
  }
46632
46632
  module2.exports = isexe;
46633
46633
  isexe.sync = sync;
46634
- function isexe(path31, options, cb) {
46634
+ function isexe(path32, options, cb) {
46635
46635
  if (typeof options === "function") {
46636
46636
  cb = options;
46637
46637
  options = {};
@@ -46640,17 +46640,17 @@ var require_isexe = __commonJS({
46640
46640
  if (typeof Promise !== "function") {
46641
46641
  throw new TypeError("callback not provided");
46642
46642
  }
46643
- return new Promise(function(resolve21, reject) {
46644
- isexe(path31, options || {}, function(er, is) {
46643
+ return new Promise(function(resolve22, reject) {
46644
+ isexe(path32, options || {}, function(er, is) {
46645
46645
  if (er) {
46646
46646
  reject(er);
46647
46647
  } else {
46648
- resolve21(is);
46648
+ resolve22(is);
46649
46649
  }
46650
46650
  });
46651
46651
  });
46652
46652
  }
46653
- core(path31, options || {}, function(er, is) {
46653
+ core(path32, options || {}, function(er, is) {
46654
46654
  if (er) {
46655
46655
  if (er.code === "EACCES" || options && options.ignoreErrors) {
46656
46656
  er = null;
@@ -46660,9 +46660,9 @@ var require_isexe = __commonJS({
46660
46660
  cb(er, is);
46661
46661
  });
46662
46662
  }
46663
- function sync(path31, options) {
46663
+ function sync(path32, options) {
46664
46664
  try {
46665
- return core.sync(path31, options || {});
46665
+ return core.sync(path32, options || {});
46666
46666
  } catch (er) {
46667
46667
  if (options && options.ignoreErrors || er.code === "EACCES") {
46668
46668
  return false;
@@ -46679,7 +46679,7 @@ var require_which = __commonJS({
46679
46679
  "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module2) {
46680
46680
  "use strict";
46681
46681
  var isWindows2 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
46682
- var path31 = require("path");
46682
+ var path32 = require("path");
46683
46683
  var COLON = isWindows2 ? ";" : ":";
46684
46684
  var isexe = require_isexe();
46685
46685
  var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -46712,27 +46712,27 @@ var require_which = __commonJS({
46712
46712
  opt = {};
46713
46713
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
46714
46714
  const found = [];
46715
- const step = (i) => new Promise((resolve21, reject) => {
46715
+ const step = (i) => new Promise((resolve22, reject) => {
46716
46716
  if (i === pathEnv.length)
46717
- return opt.all && found.length ? resolve21(found) : reject(getNotFoundError(cmd));
46717
+ return opt.all && found.length ? resolve22(found) : reject(getNotFoundError(cmd));
46718
46718
  const ppRaw = pathEnv[i];
46719
46719
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
46720
- const pCmd = path31.join(pathPart, cmd);
46720
+ const pCmd = path32.join(pathPart, cmd);
46721
46721
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
46722
- resolve21(subStep(p, i, 0));
46722
+ resolve22(subStep(p, i, 0));
46723
46723
  });
46724
- const subStep = (p, i, ii) => new Promise((resolve21, reject) => {
46724
+ const subStep = (p, i, ii) => new Promise((resolve22, reject) => {
46725
46725
  if (ii === pathExt.length)
46726
- return resolve21(step(i + 1));
46726
+ return resolve22(step(i + 1));
46727
46727
  const ext = pathExt[ii];
46728
46728
  isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
46729
46729
  if (!er && is) {
46730
46730
  if (opt.all)
46731
46731
  found.push(p + ext);
46732
46732
  else
46733
- return resolve21(p + ext);
46733
+ return resolve22(p + ext);
46734
46734
  }
46735
- return resolve21(subStep(p, i, ii + 1));
46735
+ return resolve22(subStep(p, i, ii + 1));
46736
46736
  });
46737
46737
  });
46738
46738
  return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
@@ -46744,7 +46744,7 @@ var require_which = __commonJS({
46744
46744
  for (let i = 0; i < pathEnv.length; i++) {
46745
46745
  const ppRaw = pathEnv[i];
46746
46746
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
46747
- const pCmd = path31.join(pathPart, cmd);
46747
+ const pCmd = path32.join(pathPart, cmd);
46748
46748
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
46749
46749
  for (let j = 0; j < pathExt.length; j++) {
46750
46750
  const cur = p + pathExt[j];
@@ -46792,7 +46792,7 @@ var require_path_key = __commonJS({
46792
46792
  var require_resolveCommand = __commonJS({
46793
46793
  "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
46794
46794
  "use strict";
46795
- var path31 = require("path");
46795
+ var path32 = require("path");
46796
46796
  var which = require_which();
46797
46797
  var getPathKey = require_path_key();
46798
46798
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -46810,7 +46810,7 @@ var require_resolveCommand = __commonJS({
46810
46810
  try {
46811
46811
  resolved = which.sync(parsed.command, {
46812
46812
  path: env[getPathKey({ env })],
46813
- pathExt: withoutPathExt ? path31.delimiter : void 0
46813
+ pathExt: withoutPathExt ? path32.delimiter : void 0
46814
46814
  });
46815
46815
  } catch (e) {
46816
46816
  } finally {
@@ -46819,7 +46819,7 @@ var require_resolveCommand = __commonJS({
46819
46819
  }
46820
46820
  }
46821
46821
  if (resolved) {
46822
- resolved = path31.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
46822
+ resolved = path32.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
46823
46823
  }
46824
46824
  return resolved;
46825
46825
  }
@@ -46873,8 +46873,8 @@ var require_shebang_command = __commonJS({
46873
46873
  if (!match) {
46874
46874
  return null;
46875
46875
  }
46876
- const [path31, argument] = match[0].replace(/#! ?/, "").split(" ");
46877
- const binary = path31.split("/").pop();
46876
+ const [path32, argument] = match[0].replace(/#! ?/, "").split(" ");
46877
+ const binary = path32.split("/").pop();
46878
46878
  if (binary === "env") {
46879
46879
  return argument;
46880
46880
  }
@@ -46887,16 +46887,16 @@ var require_shebang_command = __commonJS({
46887
46887
  var require_readShebang = __commonJS({
46888
46888
  "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
46889
46889
  "use strict";
46890
- var fs30 = require("fs");
46890
+ var fs31 = require("fs");
46891
46891
  var shebangCommand = require_shebang_command();
46892
46892
  function readShebang(command) {
46893
46893
  const size = 150;
46894
46894
  const buffer = Buffer.alloc(size);
46895
46895
  let fd;
46896
46896
  try {
46897
- fd = fs30.openSync(command, "r");
46898
- fs30.readSync(fd, buffer, 0, size, 0);
46899
- fs30.closeSync(fd);
46897
+ fd = fs31.openSync(command, "r");
46898
+ fs31.readSync(fd, buffer, 0, size, 0);
46899
+ fs31.closeSync(fd);
46900
46900
  } catch (e) {
46901
46901
  }
46902
46902
  return shebangCommand(buffer.toString());
@@ -46909,7 +46909,7 @@ var require_readShebang = __commonJS({
46909
46909
  var require_parse3 = __commonJS({
46910
46910
  "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
46911
46911
  "use strict";
46912
- var path31 = require("path");
46912
+ var path32 = require("path");
46913
46913
  var resolveCommand = require_resolveCommand();
46914
46914
  var escape2 = require_escape();
46915
46915
  var readShebang = require_readShebang();
@@ -46934,7 +46934,7 @@ var require_parse3 = __commonJS({
46934
46934
  const needsShell = !isExecutableRegExp.test(commandFile);
46935
46935
  if (parsed.options.forceShell || needsShell) {
46936
46936
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
46937
- parsed.command = path31.normalize(parsed.command);
46937
+ parsed.command = path32.normalize(parsed.command);
46938
46938
  parsed.command = escape2.command(parsed.command);
46939
46939
  parsed.args = parsed.args.map((arg) => escape2.argument(arg, needsDoubleEscapeMetaChars));
46940
46940
  const shellCommand = [parsed.command].concat(parsed.args).join(" ");
@@ -47141,7 +47141,7 @@ var init_stdio2 = __esm({
47141
47141
  if (this._process) {
47142
47142
  throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");
47143
47143
  }
47144
- return new Promise((resolve21, reject) => {
47144
+ return new Promise((resolve22, reject) => {
47145
47145
  this._process = (0, import_cross_spawn.default)(this._serverParams.command, this._serverParams.args ?? [], {
47146
47146
  // merge default env with server env because mcp server needs some env vars
47147
47147
  env: {
@@ -47158,7 +47158,7 @@ var init_stdio2 = __esm({
47158
47158
  this.onerror?.(error2);
47159
47159
  });
47160
47160
  this._process.on("spawn", () => {
47161
- resolve21();
47161
+ resolve22();
47162
47162
  });
47163
47163
  this._process.on("close", (_code) => {
47164
47164
  this._process = void 0;
@@ -47217,22 +47217,22 @@ var init_stdio2 = __esm({
47217
47217
  if (this._process) {
47218
47218
  const processToClose = this._process;
47219
47219
  this._process = void 0;
47220
- const closePromise = new Promise((resolve21) => {
47220
+ const closePromise = new Promise((resolve22) => {
47221
47221
  processToClose.once("close", () => {
47222
- resolve21();
47222
+ resolve22();
47223
47223
  });
47224
47224
  });
47225
47225
  try {
47226
47226
  processToClose.stdin?.end();
47227
47227
  } catch {
47228
47228
  }
47229
- await Promise.race([closePromise, new Promise((resolve21) => setTimeout(resolve21, 2e3).unref())]);
47229
+ await Promise.race([closePromise, new Promise((resolve22) => setTimeout(resolve22, 2e3).unref())]);
47230
47230
  if (processToClose.exitCode === null) {
47231
47231
  try {
47232
47232
  processToClose.kill("SIGTERM");
47233
47233
  } catch {
47234
47234
  }
47235
- await Promise.race([closePromise, new Promise((resolve21) => setTimeout(resolve21, 2e3).unref())]);
47235
+ await Promise.race([closePromise, new Promise((resolve22) => setTimeout(resolve22, 2e3).unref())]);
47236
47236
  }
47237
47237
  if (processToClose.exitCode === null) {
47238
47238
  try {
@@ -47244,15 +47244,15 @@ var init_stdio2 = __esm({
47244
47244
  this._readBuffer.clear();
47245
47245
  }
47246
47246
  send(message) {
47247
- return new Promise((resolve21) => {
47247
+ return new Promise((resolve22) => {
47248
47248
  if (!this._process?.stdin) {
47249
47249
  throw new Error("Not connected");
47250
47250
  }
47251
47251
  const json = serializeMessage(message);
47252
47252
  if (this._process.stdin.write(json)) {
47253
- resolve21();
47253
+ resolve22();
47254
47254
  } else {
47255
- this._process.stdin.once("drain", resolve21);
47255
+ this._process.stdin.once("drain", resolve22);
47256
47256
  }
47257
47257
  });
47258
47258
  }
@@ -48065,7 +48065,7 @@ async function closeHttpServer(server, options = {}) {
48065
48065
  return;
48066
48066
  }
48067
48067
  const forceAfterMs = options.forceAfterMs ?? 1e3;
48068
- await new Promise((resolve21, reject) => {
48068
+ await new Promise((resolve22, reject) => {
48069
48069
  const forceTimer = setTimeout(() => {
48070
48070
  server.closeAllConnections?.();
48071
48071
  server.closeIdleConnections?.();
@@ -48077,7 +48077,7 @@ async function closeHttpServer(server, options = {}) {
48077
48077
  reject(err);
48078
48078
  return;
48079
48079
  }
48080
- resolve21();
48080
+ resolve22();
48081
48081
  });
48082
48082
  server.closeIdleConnections?.();
48083
48083
  });
@@ -50118,7 +50118,7 @@ function wasClockTurnedBack(cachedAt) {
50118
50118
  return cachedAtSec > nowSeconds();
50119
50119
  }
50120
50120
  function delay(t, value) {
50121
- return new Promise((resolve21) => setTimeout(() => resolve21(value), t));
50121
+ return new Promise((resolve22) => setTimeout(() => resolve22(value), t));
50122
50122
  }
50123
50123
 
50124
50124
  // ../../node_modules/.pnpm/@azure+msal-common@16.5.0/node_modules/@azure/msal-common/dist/cache/utils/CacheHelpers.mjs
@@ -51612,7 +51612,7 @@ var developerCliCredentialInternals = {
51612
51612
  const encodedClaims = btoa(claims);
51613
51613
  claimsSections = ["--claims", encodedClaims];
51614
51614
  }
51615
- return new Promise((resolve21, reject) => {
51615
+ return new Promise((resolve22, reject) => {
51616
51616
  try {
51617
51617
  const args = [
51618
51618
  "auth",
@@ -51629,7 +51629,7 @@ var developerCliCredentialInternals = {
51629
51629
  cwd: developerCliCredentialInternals.getSafeWorkingDir(),
51630
51630
  timeout
51631
51631
  }, (error2, stdout, stderr) => {
51632
- resolve21({ stdout, stderr, error: error2 });
51632
+ resolve22({ stdout, stderr, error: error2 });
51633
51633
  });
51634
51634
  } catch (err) {
51635
51635
  reject(err);
@@ -51777,7 +51777,7 @@ var cliCredentialInternals = {
51777
51777
  if (subscription) {
51778
51778
  subscriptionSection = ["--subscription", `"${subscription}"`];
51779
51779
  }
51780
- return new Promise((resolve21, reject) => {
51780
+ return new Promise((resolve22, reject) => {
51781
51781
  try {
51782
51782
  const args = [
51783
51783
  "account",
@@ -51791,7 +51791,7 @@ var cliCredentialInternals = {
51791
51791
  ];
51792
51792
  const command = ["az", ...args].join(" ");
51793
51793
  import_child_process2.default.exec(command, { cwd: cliCredentialInternals.getSafeWorkingDir(), timeout }, (error2, stdout, stderr) => {
51794
- resolve21({ stdout, stderr, error: error2 });
51794
+ resolve22({ stdout, stderr, error: error2 });
51795
51795
  });
51796
51796
  } catch (err) {
51797
51797
  reject(err);
@@ -51932,7 +51932,7 @@ var processUtils = {
51932
51932
  * @internal
51933
51933
  */
51934
51934
  execFile(file, params, options) {
51935
- return new Promise((resolve21, reject) => {
51935
+ return new Promise((resolve22, reject) => {
51936
51936
  import_node_child_process.default.execFile(file, params, options, (error2, stdout, stderr) => {
51937
51937
  if (Buffer.isBuffer(stdout)) {
51938
51938
  stdout = stdout.toString("utf8");
@@ -51943,7 +51943,7 @@ var processUtils = {
51943
51943
  if (stderr || error2) {
51944
51944
  reject(stderr ? new Error(stderr) : error2);
51945
51945
  } else {
51946
- resolve21(stdout);
51946
+ resolve22(stdout);
51947
51947
  }
51948
51948
  });
51949
51949
  });
@@ -53389,19 +53389,19 @@ async function fetchWithTimeout(url, init, timeoutMs = DEFAULT_NODE_REQUEST_TIME
53389
53389
  cleanup();
53390
53390
  }
53391
53391
  }
53392
- async function fetchNodeWithFallback(node, path31, init, timeoutMs = DEFAULT_NODE_REQUEST_TIMEOUT_MS, trace, options) {
53392
+ async function fetchNodeWithFallback(node, path32, init, timeoutMs = DEFAULT_NODE_REQUEST_TIMEOUT_MS, trace, options) {
53393
53393
  let lastError;
53394
53394
  const endpoints = getNodeRequestEndpoints(node, options);
53395
53395
  for (const [index, endpoint] of endpoints.entries()) {
53396
53396
  const attempt = index + 1;
53397
- trace?.onAttempt?.({ attempt, endpoint, path: path31, timeoutMs, totalEndpoints: endpoints.length });
53397
+ trace?.onAttempt?.({ attempt, endpoint, path: path32, timeoutMs, totalEndpoints: endpoints.length });
53398
53398
  try {
53399
- const response = await fetchWithTimeout(`${endpoint}${path31}`, init, timeoutMs);
53400
- trace?.onResponse?.({ attempt, endpoint, path: path31, response, timeoutMs, totalEndpoints: endpoints.length });
53399
+ const response = await fetchWithTimeout(`${endpoint}${path32}`, init, timeoutMs);
53400
+ trace?.onResponse?.({ attempt, endpoint, path: path32, response, timeoutMs, totalEndpoints: endpoints.length });
53401
53401
  return { endpoint, response };
53402
53402
  } catch (error2) {
53403
53403
  lastError = error2;
53404
- trace?.onError?.({ attempt, endpoint, error: error2, path: path31, timeoutMs, totalEndpoints: endpoints.length });
53404
+ trace?.onError?.({ attempt, endpoint, error: error2, path: path32, timeoutMs, totalEndpoints: endpoints.length });
53405
53405
  }
53406
53406
  }
53407
53407
  throw lastError instanceof Error ? lastError : new Error("No reachable node endpoint");
@@ -54719,7 +54719,7 @@ var KeepaliveNodeMessageQueue = class {
54719
54719
  queued.push(requestMessage);
54720
54720
  this.queuedMessages.set(nodeId, queued);
54721
54721
  this.log.info("queued keepalive node message request", { nodeId, ...describeNodeMessage(requestMessage) });
54722
- return new Promise((resolve21, reject) => {
54722
+ return new Promise((resolve22, reject) => {
54723
54723
  const timeoutId = setTimeout(() => {
54724
54724
  this.pendingResponses.delete(requestMessage.id);
54725
54725
  reject(new Error(`Timed out waiting for ${requestMessage.kind} response from ${nodeId}`));
@@ -54727,7 +54727,7 @@ var KeepaliveNodeMessageQueue = class {
54727
54727
  this.pendingResponses.set(requestMessage.id, {
54728
54728
  nodeId,
54729
54729
  kind: requestMessage.kind,
54730
- resolve: resolve21,
54730
+ resolve: resolve22,
54731
54731
  reject,
54732
54732
  timeoutId
54733
54733
  });
@@ -55625,9 +55625,9 @@ var DataRouter = class {
55625
55625
  /**
55626
55626
  * Returns true if the request should be proxied to the leader.
55627
55627
  */
55628
- shouldProxy(method, path31) {
55628
+ shouldProxy(method, path32) {
55629
55629
  if (this.election.isLeader()) return false;
55630
- if (this.isExcludedPath(path31)) return false;
55630
+ if (this.isExcludedPath(path32)) return false;
55631
55631
  if (method.toUpperCase() === "GET") return false;
55632
55632
  return WRITE_METHODS.has(method.toUpperCase());
55633
55633
  }
@@ -55731,8 +55731,8 @@ var DataRouter = class {
55731
55731
  };
55732
55732
  }
55733
55733
  // ── Helpers ───────────────────────────────────────────────────────────
55734
- isExcludedPath(path31) {
55735
- return EXCLUDED_PATH_PREFIXES.some((prefix) => path31.startsWith(prefix)) || EXCLUDED_PATH_SUFFIXES.some((suffix) => path31.endsWith(suffix));
55734
+ isExcludedPath(path32) {
55735
+ return EXCLUDED_PATH_PREFIXES.some((prefix) => path32.startsWith(prefix)) || EXCLUDED_PATH_SUFFIXES.some((suffix) => path32.endsWith(suffix));
55736
55736
  }
55737
55737
  };
55738
55738
 
@@ -57033,7 +57033,7 @@ var LiteAgentRunner = class {
57033
57033
  }
57034
57034
  };
57035
57035
  function runProcessForOutput(command, args, prompt, cwd, extractOutput) {
57036
- return new Promise((resolve21, reject) => {
57036
+ return new Promise((resolve22, reject) => {
57037
57037
  const proc = (0, import_node_child_process3.spawn)(command, args, {
57038
57038
  cwd: cwd ?? process.cwd(),
57039
57039
  stdio: ["pipe", "pipe", "pipe"]
@@ -57053,7 +57053,7 @@ function runProcessForOutput(command, args, prompt, cwd, extractOutput) {
57053
57053
  return;
57054
57054
  }
57055
57055
  try {
57056
- resolve21(extractOutput ? extractOutput(stdout) : stdout.trim());
57056
+ resolve22(extractOutput ? extractOutput(stdout) : stdout.trim());
57057
57057
  } catch (error2) {
57058
57058
  reject(error2);
57059
57059
  }
@@ -60852,8 +60852,8 @@ var BatchTaskIdsBody = external_exports.object({
60852
60852
  });
60853
60853
 
60854
60854
  // ../../packages/api/src/app/server.ts
60855
- var path28 = __toESM(require("path"), 1);
60856
- var fs25 = __toESM(require("fs"), 1);
60855
+ var path29 = __toESM(require("path"), 1);
60856
+ var fs26 = __toESM(require("fs"), 1);
60857
60857
  var import_express16 = __toESM(require_express2(), 1);
60858
60858
 
60859
60859
  // ../../packages/api/src/middleware/auth.ts
@@ -60990,8 +60990,8 @@ function decodePathSegment(value) {
60990
60990
  return value;
60991
60991
  }
60992
60992
  }
60993
- function getSingleTaskDeleteId(path31) {
60994
- const match = /^\/api\/tasks\/([^/]+)$/.exec(path31);
60993
+ function getSingleTaskDeleteId(path32) {
60994
+ const match = /^\/api\/tasks\/([^/]+)$/.exec(path32);
60995
60995
  return match ? decodePathSegment(match[1]) : null;
60996
60996
  }
60997
60997
  function getSuccessfulBatchDeleteIds(body) {
@@ -61253,8 +61253,8 @@ function normalizeDevBoxStatus(status) {
61253
61253
  return status?.trim().toLowerCase().replace(/[\s_-]+/gu, "");
61254
61254
  }
61255
61255
  function sleep(ms) {
61256
- return new Promise((resolve21) => {
61257
- const timer = setTimeout(resolve21, ms);
61256
+ return new Promise((resolve22) => {
61257
+ const timer = setTimeout(resolve22, ms);
61258
61258
  if (typeof timer === "object" && timer !== null && "unref" in timer && typeof timer.unref === "function") {
61259
61259
  timer.unref();
61260
61260
  }
@@ -61689,12 +61689,14 @@ function assertCanChangeNodeDevTunnel(taskEngine, nodeId) {
61689
61689
  var import_express3 = __toESM(require_express2(), 1);
61690
61690
 
61691
61691
  // ../../packages/api/src/node/node-workdir-service.ts
61692
- var path23 = __toESM(require("path"), 1);
61692
+ var path24 = __toESM(require("path"), 1);
61693
61693
 
61694
61694
  // ../../packages/api/src/output/helpers.ts
61695
61695
  var fs18 = __toESM(require("fs"), 1);
61696
61696
  var path22 = __toESM(require("path"), 1);
61697
61697
  var MAX_INLINE_SIZE = 512 * 1024;
61698
+ var HTML_FILE_EXTENSION = /\.html?$/i;
61699
+ var HTML_PREVIEW_IGNORED_DIRS = /* @__PURE__ */ new Set(["node_modules"]);
61698
61700
  var TEXT_EXTENSIONS = /* @__PURE__ */ new Set([
61699
61701
  ".txt",
61700
61702
  ".log",
@@ -61889,33 +61891,30 @@ function listResolvedDirectory(absPath, relativeBase, options = {}) {
61889
61891
  }
61890
61892
  function detectHtmlEntries(root) {
61891
61893
  const entries = [];
61892
- if (fs18.existsSync(path22.join(root, "index.html"))) {
61893
- entries.push({ path: "index.html", label: "index.html" });
61894
- }
61895
61894
  try {
61896
61895
  const topLevel = fs18.readdirSync(root, { withFileTypes: true });
61897
- const htmlFiles = topLevel.filter(
61898
- (e) => e.isFile() && e.name.endsWith(".html") && !e.name.startsWith(".")
61899
- );
61900
- for (const f of htmlFiles) {
61901
- if (f.name !== "index.html") {
61902
- entries.push({ path: f.name, label: f.name });
61903
- }
61904
- }
61905
- const subdirs = topLevel.filter((e) => e.isDirectory() && !e.name.startsWith("."));
61896
+ entries.push(...collectHtmlPreviewEntries(topLevel, ""));
61897
+ const subdirs = topLevel.filter((e) => e.isDirectory() && !e.name.startsWith(".") && !HTML_PREVIEW_IGNORED_DIRS.has(e.name)).sort((a, b) => a.name.localeCompare(b.name));
61906
61898
  for (const dir of subdirs) {
61907
- const subIndex = path22.join(root, dir.name, "index.html");
61908
- if (fs18.existsSync(subIndex)) {
61909
- entries.push({
61910
- path: `${dir.name}/index.html`,
61911
- label: `${dir.name}/index.html`
61912
- });
61913
- }
61899
+ const dirEntries = fs18.readdirSync(path22.join(root, dir.name), { withFileTypes: true });
61900
+ entries.push(...collectHtmlPreviewEntries(dirEntries, dir.name));
61914
61901
  }
61915
61902
  } catch {
61916
61903
  }
61917
61904
  return entries;
61918
61905
  }
61906
+ function collectHtmlPreviewEntries(entries, relativeDir) {
61907
+ return entries.filter((entry) => entry.isFile() && !entry.name.startsWith(".") && HTML_FILE_EXTENSION.test(entry.name)).sort(comparePreviewEntryNames).map((entry) => {
61908
+ const entryPath = relativeDir ? `${relativeDir}/${entry.name}` : entry.name;
61909
+ return { path: entryPath, label: entryPath };
61910
+ });
61911
+ }
61912
+ function comparePreviewEntryNames(a, b) {
61913
+ const aIsIndex = /^index\.html?$/i.test(a.name);
61914
+ const bIsIndex = /^index\.html?$/i.test(b.name);
61915
+ if (aIsIndex !== bIsIndex) return aIsIndex ? -1 : 1;
61916
+ return a.name.localeCompare(b.name);
61917
+ }
61919
61918
  function detectMarkdownEntries(root) {
61920
61919
  const entries = [];
61921
61920
  try {
@@ -62018,16 +62017,15 @@ function getGitCandidates() {
62018
62017
  function isMissingBinaryError(error2) {
62019
62018
  return typeof error2 === "object" && error2 !== null && error2.code === "ENOENT";
62020
62019
  }
62021
- function execGit(args, cwd, timeout = 1e4) {
62020
+ function execGitBuffer(args, cwd, timeout = 1e4) {
62022
62021
  let lastError;
62023
62022
  for (const command of getGitCandidates()) {
62024
62023
  try {
62025
62024
  return (0, import_node_child_process7.execFileSync)(command, ["-C", cwd, ...args], {
62026
- encoding: "utf-8",
62027
62025
  timeout,
62028
62026
  stdio: ["pipe", "pipe", "pipe"],
62029
62027
  windowsHide: true
62030
- }).trim();
62028
+ });
62031
62029
  } catch (err) {
62032
62030
  lastError = err;
62033
62031
  if (!isMissingBinaryError(err)) {
@@ -62037,6 +62035,12 @@ function execGit(args, cwd, timeout = 1e4) {
62037
62035
  }
62038
62036
  throw lastError instanceof Error ? lastError : new Error("git executable not found");
62039
62037
  }
62038
+ function execGitRaw(args, cwd, timeout = 1e4) {
62039
+ return execGitBuffer(args, cwd, timeout).toString("utf-8");
62040
+ }
62041
+ function execGit(args, cwd, timeout = 1e4) {
62042
+ return execGitRaw(args, cwd, timeout).trim();
62043
+ }
62040
62044
 
62041
62045
  // ../../packages/api/src/output/git-branches.ts
62042
62046
  function git(args, cwd) {
@@ -62209,6 +62213,9 @@ function createGitBranch(dirPath, branchName, startPoint, options) {
62209
62213
  }
62210
62214
 
62211
62215
  // ../../packages/api/src/output/git-diff.ts
62216
+ var fs20 = __toESM(require("fs"), 1);
62217
+ var path23 = __toESM(require("path"), 1);
62218
+ var MAX_DIFF_INLINE_SIZE = 512 * 1024;
62212
62219
  function git2(args, cwd) {
62213
62220
  try {
62214
62221
  return execGit(args, cwd);
@@ -62220,15 +62227,148 @@ function isGitRepo2(dirPath) {
62220
62227
  const result = git2(["rev-parse", "--is-inside-work-tree"], dirPath);
62221
62228
  return result === "true";
62222
62229
  }
62230
+ function missingSnapshot() {
62231
+ return {
62232
+ exists: false,
62233
+ content: "",
62234
+ truncated: false,
62235
+ binary: false
62236
+ };
62237
+ }
62238
+ function createSnapshot(buffer) {
62239
+ const truncated = buffer.length > MAX_DIFF_INLINE_SIZE;
62240
+ const sample = truncated ? buffer.subarray(0, MAX_DIFF_INLINE_SIZE) : buffer;
62241
+ const binary = sample.includes(0);
62242
+ return {
62243
+ exists: true,
62244
+ content: binary ? "" : sample.toString("utf-8"),
62245
+ truncated,
62246
+ binary
62247
+ };
62248
+ }
62249
+ function readGitObjectSnapshot(repoRoot2, objectSpec) {
62250
+ try {
62251
+ return createSnapshot(execGitBuffer(["show", objectSpec], repoRoot2));
62252
+ } catch {
62253
+ return missingSnapshot();
62254
+ }
62255
+ }
62256
+ function resolveRepoPath(repoRoot2, filePath) {
62257
+ const normalizedRoot = path23.resolve(repoRoot2);
62258
+ const resolved = path23.resolve(normalizedRoot, filePath);
62259
+ if (!resolved.startsWith(normalizedRoot + path23.sep) && resolved !== normalizedRoot) {
62260
+ throw new Error("Path traversal detected");
62261
+ }
62262
+ return resolved;
62263
+ }
62264
+ function readWorktreeSnapshot(repoRoot2, filePath) {
62265
+ try {
62266
+ const absolutePath = resolveRepoPath(repoRoot2, filePath);
62267
+ const stats = fs20.lstatSync(absolutePath);
62268
+ if (stats.isSymbolicLink()) {
62269
+ return createSnapshot(Buffer.from(fs20.readlinkSync(absolutePath)));
62270
+ }
62271
+ if (!stats.isFile()) {
62272
+ return missingSnapshot();
62273
+ }
62274
+ return createSnapshot(fs20.readFileSync(absolutePath));
62275
+ } catch {
62276
+ return missingSnapshot();
62277
+ }
62278
+ }
62279
+ function parseUnifiedDiffFiles(patch) {
62280
+ if (!patch?.trim()) {
62281
+ return [];
62282
+ }
62283
+ const items = [];
62284
+ let current = [];
62285
+ const flush = () => {
62286
+ if (current.length === 0) {
62287
+ return;
62288
+ }
62289
+ const normalizedPatch = current.join("\n").trim();
62290
+ const filePath = resolvePatchedFilePath(current);
62291
+ if (normalizedPatch && filePath) {
62292
+ items.push({
62293
+ path: filePath,
62294
+ status: inferPatchStatus(current),
62295
+ patch: normalizedPatch
62296
+ });
62297
+ }
62298
+ current = [];
62299
+ };
62300
+ for (const line of patch.split("\n")) {
62301
+ if (line.startsWith("diff --git ") && current.length > 0) {
62302
+ flush();
62303
+ }
62304
+ current.push(line);
62305
+ }
62306
+ flush();
62307
+ return items;
62308
+ }
62309
+ function resolvePatchedFilePath(lines) {
62310
+ const newPath = lines.find((line) => line.startsWith("+++ "))?.slice(4).trim();
62311
+ if (newPath && newPath !== "/dev/null") {
62312
+ return stripGitPrefix(newPath);
62313
+ }
62314
+ const oldPath = lines.find((line) => line.startsWith("--- "))?.slice(4).trim();
62315
+ if (oldPath && oldPath !== "/dev/null") {
62316
+ return stripGitPrefix(oldPath);
62317
+ }
62318
+ const header = lines.find((line) => line.startsWith("diff --git "));
62319
+ if (!header) {
62320
+ return null;
62321
+ }
62322
+ const match = header.match(/^diff --git a\/(.+?) b\/(.+)$/);
62323
+ if (!match) {
62324
+ return null;
62325
+ }
62326
+ return stripGitPrefix(match[2] || match[1] || "");
62327
+ }
62328
+ function stripGitPrefix(value) {
62329
+ return value.replace(/^[ab]\//, "");
62330
+ }
62331
+ function inferPatchStatus(lines) {
62332
+ if (lines.some((line) => line.startsWith("new file mode "))) return "A";
62333
+ if (lines.some((line) => line.startsWith("deleted file mode "))) return "D";
62334
+ if (lines.some((line) => line.startsWith("rename from "))) return "R";
62335
+ return "M";
62336
+ }
62337
+ function hydrateDiffFiles(patches, section, repoRoot2) {
62338
+ return patches.map((file) => {
62339
+ const oldSnapshot = section === "staged" ? readGitObjectSnapshot(repoRoot2, `HEAD:${file.path}`) : readGitObjectSnapshot(repoRoot2, `:${file.path}`);
62340
+ const newSnapshot = section === "staged" ? readGitObjectSnapshot(repoRoot2, `:${file.path}`) : readWorktreeSnapshot(repoRoot2, file.path);
62341
+ return {
62342
+ path: file.path,
62343
+ section,
62344
+ status: file.status,
62345
+ patch: file.patch,
62346
+ oldExists: oldSnapshot.exists,
62347
+ newExists: newSnapshot.exists,
62348
+ oldContent: oldSnapshot.content,
62349
+ newContent: newSnapshot.content,
62350
+ oldTruncated: oldSnapshot.truncated,
62351
+ newTruncated: newSnapshot.truncated,
62352
+ binary: oldSnapshot.binary || newSnapshot.binary || /^Binary files /m.test(file.patch)
62353
+ };
62354
+ });
62355
+ }
62223
62356
  function getGitDiff(dirPath) {
62224
62357
  if (!isGitRepo2(dirPath)) {
62225
62358
  return { available: false };
62226
62359
  }
62227
62360
  const repoRoot2 = git2(["rev-parse", "--show-toplevel"], dirPath);
62228
62361
  const branch = git2(["rev-parse", "--abbrev-ref", "HEAD"], dirPath) || null;
62229
- const staged = git2(["diff", "--cached"], dirPath);
62230
- const unstaged = git2(["diff"], dirPath);
62231
- const statusOutput = git2(["status", "--porcelain", "-uall"], dirPath);
62362
+ const gitRoot = repoRoot2 || dirPath;
62363
+ const staged = git2(["diff", "--cached"], gitRoot);
62364
+ const unstaged = git2(["diff"], gitRoot);
62365
+ const stagedPatches = parseUnifiedDiffFiles(staged);
62366
+ const unstagedPatches = parseUnifiedDiffFiles(unstaged);
62367
+ const files = [
62368
+ ...hydrateDiffFiles(stagedPatches, "staged", gitRoot),
62369
+ ...hydrateDiffFiles(unstagedPatches, "unstaged", gitRoot)
62370
+ ];
62371
+ const statusOutput = git2(["status", "--porcelain", "-uall"], gitRoot);
62232
62372
  const changedFiles = [];
62233
62373
  const untrackedFiles = [];
62234
62374
  for (const line of statusOutput.split("\n")) {
@@ -62247,6 +62387,7 @@ function getGitDiff(dirPath) {
62247
62387
  branch,
62248
62388
  staged: staged || void 0,
62249
62389
  unstaged: unstaged || void 0,
62390
+ files,
62250
62391
  changedFiles,
62251
62392
  untrackedFiles
62252
62393
  };
@@ -62254,14 +62395,14 @@ function getGitDiff(dirPath) {
62254
62395
 
62255
62396
  // ../../packages/api/src/node/node-workdir-service.ts
62256
62397
  function isAbsolutePath(p) {
62257
- return path23.isAbsolute(p) || /^[A-Za-z]:[\\/]/.test(p);
62398
+ return path24.isAbsolute(p) || /^[A-Za-z]:[\\/]/.test(p);
62258
62399
  }
62259
62400
  function resolveNodeWorkDirTarget(nodeId, rootPath, currentPath, allowAbsolute) {
62260
62401
  if (!rootPath) {
62261
62402
  throw new MeshyError("VALIDATION_ERROR", `Node ${nodeId} does not expose a working directory`, 400);
62262
62403
  }
62263
62404
  const useAbsolute = allowAbsolute && isAbsolutePath(currentPath);
62264
- const resolvedPath = useAbsolute ? path23.resolve(currentPath) : currentPath;
62405
+ const resolvedPath = useAbsolute ? path24.resolve(currentPath) : currentPath;
62265
62406
  const targetPath = useAbsolute ? resolvedPath : resolveRelativeNodeWorkDirTarget(rootPath, resolvedPath);
62266
62407
  return {
62267
62408
  rootPath,
@@ -62271,9 +62412,9 @@ function resolveNodeWorkDirTarget(nodeId, rootPath, currentPath, allowAbsolute)
62271
62412
  };
62272
62413
  }
62273
62414
  function resolveRelativeNodeWorkDirTarget(rootPath, relativePath) {
62274
- const resolvedRoot = path23.resolve(rootPath);
62275
- const resolved = path23.resolve(resolvedRoot, relativePath);
62276
- if (!resolved.startsWith(resolvedRoot + path23.sep) && resolved !== resolvedRoot) {
62415
+ const resolvedRoot = path24.resolve(rootPath);
62416
+ const resolved = path24.resolve(resolvedRoot, relativePath);
62417
+ if (!resolved.startsWith(resolvedRoot + path24.sep) && resolved !== resolvedRoot) {
62277
62418
  throw new MeshyError("VALIDATION_ERROR", "Invalid directory path", 400);
62278
62419
  }
62279
62420
  return resolved;
@@ -62356,13 +62497,13 @@ function createLocalNodeWorkDirBranch(nodeId, rootPath, currentPath, options) {
62356
62497
  }
62357
62498
  function computeParentPath(rootPath, currentPath, useAbsolute) {
62358
62499
  if (useAbsolute) {
62359
- const parent = path23.dirname(currentPath);
62500
+ const parent = path24.dirname(currentPath);
62360
62501
  return parent === currentPath ? null : parent;
62361
62502
  }
62362
62503
  const normalized = currentPath.replace(/\\/g, "/").replace(/\/+$/, "");
62363
62504
  if (normalized === "" || normalized === ".") {
62364
- const absParent = path23.dirname(path23.resolve(rootPath));
62365
- return absParent === path23.resolve(rootPath) ? null : absParent;
62505
+ const absParent = path24.dirname(path24.resolve(rootPath));
62506
+ return absParent === path24.resolve(rootPath) ? null : absParent;
62366
62507
  }
62367
62508
  const segments = normalized.split("/").filter(Boolean);
62368
62509
  segments.pop();
@@ -63144,7 +63285,7 @@ async function sendNodeWorkDirBranchCreateOperation(req, res, nodeId) {
63144
63285
  }
63145
63286
 
63146
63287
  // ../../packages/api/src/tasks/task-route-utils.ts
63147
- var fs20 = __toESM(require("fs"), 1);
63288
+ var fs21 = __toESM(require("fs"), 1);
63148
63289
  var import_node_stream3 = require("stream");
63149
63290
  var import_promises5 = require("stream/promises");
63150
63291
 
@@ -63206,10 +63347,10 @@ function readLocalTaskLogs(engineRegistry, taskId, after, agent) {
63206
63347
  throw new MeshyError("VALIDATION_ERROR", `Engine not registered for agent: ${agent}`, 400);
63207
63348
  }
63208
63349
  const logPath = engine.getLogPath(taskId);
63209
- if (!fs20.existsSync(logPath)) {
63350
+ if (!fs21.existsSync(logPath)) {
63210
63351
  return { logs: [], total: 0 };
63211
63352
  }
63212
- const content = fs20.readFileSync(logPath, "utf-8");
63353
+ const content = fs21.readFileSync(logPath, "utf-8");
63213
63354
  const allLines = content.trim().split("\n").filter(Boolean);
63214
63355
  const logs = [];
63215
63356
  for (let i = after; i < allLines.length; i++) {
@@ -63444,19 +63585,19 @@ var import_node_child_process10 = require("child_process");
63444
63585
  var import_node_crypto8 = require("crypto");
63445
63586
 
63446
63587
  // ../../packages/api/src/node/node-terminal-service.ts
63447
- var fs21 = __toESM(require("fs"), 1);
63448
- var path24 = __toESM(require("path"), 1);
63588
+ var fs22 = __toESM(require("fs"), 1);
63589
+ var path25 = __toESM(require("path"), 1);
63449
63590
  var DEFAULT_OUTPUT_LIMIT_BYTES = 64 * 1024;
63450
63591
  function isAbsolutePath2(value) {
63451
- return path24.isAbsolute(value) || /^[A-Za-z]:[\/]/.test(value);
63592
+ return path25.isAbsolute(value) || /^[A-Za-z]:[\/]/.test(value);
63452
63593
  }
63453
63594
  function resolveNodeTerminalCwd(nodeId, rootPath, cwd) {
63454
63595
  if (!rootPath) {
63455
63596
  throw new MeshyError("VALIDATION_ERROR", `Node ${nodeId} does not expose a working directory`, 400);
63456
63597
  }
63457
63598
  const requestedCwd = cwd?.trim() || ".";
63458
- const resolved = isAbsolutePath2(requestedCwd) ? path24.resolve(requestedCwd) : path24.resolve(rootPath, requestedCwd);
63459
- if (!fs21.existsSync(resolved) || !fs21.statSync(resolved).isDirectory()) {
63599
+ const resolved = isAbsolutePath2(requestedCwd) ? path25.resolve(requestedCwd) : path25.resolve(rootPath, requestedCwd);
63600
+ if (!fs22.existsSync(resolved) || !fs22.statSync(resolved).isDirectory()) {
63460
63601
  throw new MeshyError("VALIDATION_ERROR", `Working directory does not exist: ${resolved}`, 400);
63461
63602
  }
63462
63603
  return resolved;
@@ -63695,13 +63836,13 @@ function cancelTaskOnCurrentNode(deps, taskId, options = {}) {
63695
63836
  }
63696
63837
 
63697
63838
  // ../../packages/api/src/tasks/task-output-service.ts
63698
- var fs23 = __toESM(require("fs"), 1);
63699
- var path26 = __toESM(require("path"), 1);
63839
+ var fs24 = __toESM(require("fs"), 1);
63840
+ var path27 = __toESM(require("path"), 1);
63700
63841
 
63701
63842
  // ../../packages/api/src/preview/preview-server.ts
63702
63843
  var crypto4 = __toESM(require("crypto"), 1);
63703
- var fs22 = __toESM(require("fs"), 1);
63704
- var path25 = __toESM(require("path"), 1);
63844
+ var fs23 = __toESM(require("fs"), 1);
63845
+ var path26 = __toESM(require("path"), 1);
63705
63846
  var http2 = __toESM(require("http"), 1);
63706
63847
  var import_node_stream4 = require("stream");
63707
63848
  var import_promises6 = require("stream/promises");
@@ -63813,19 +63954,19 @@ function buildPreviewWorkerProxyHeaders(req) {
63813
63954
  // ../../packages/api/src/preview/preview-server.ts
63814
63955
  function resolvePreviewPath(rootPath, relativePath) {
63815
63956
  const sanitizedPath = relativePath.replace(/\\/g, "/");
63816
- const resolvedPath = path25.resolve(rootPath, sanitizedPath);
63817
- const normalizedRoot = path25.resolve(rootPath);
63818
- if (!resolvedPath.startsWith(normalizedRoot + path25.sep) && resolvedPath !== normalizedRoot) {
63957
+ const resolvedPath = path26.resolve(rootPath, sanitizedPath);
63958
+ const normalizedRoot = path26.resolve(rootPath);
63959
+ if (!resolvedPath.startsWith(normalizedRoot + path26.sep) && resolvedPath !== normalizedRoot) {
63819
63960
  throw new Error("Invalid preview path");
63820
63961
  }
63821
63962
  return {
63822
63963
  absolutePath: resolvedPath,
63823
- normalizedPath: path25.relative(normalizedRoot, resolvedPath).split(path25.sep).join("/")
63964
+ normalizedPath: path26.relative(normalizedRoot, resolvedPath).split(path26.sep).join("/")
63824
63965
  };
63825
63966
  }
63826
63967
  function resolvePreviewEntryPath(rootPath, entryPath) {
63827
63968
  const { absolutePath, normalizedPath } = resolvePreviewPath(rootPath, entryPath ?? "index.html");
63828
- if (!fs22.existsSync(absolutePath) || !fs22.statSync(absolutePath).isFile()) {
63969
+ if (!fs23.existsSync(absolutePath) || !fs23.statSync(absolutePath).isFile()) {
63829
63970
  throw new Error("Preview entry not found");
63830
63971
  }
63831
63972
  return normalizedPath;
@@ -63927,7 +64068,7 @@ var MIME_MAP2 = {
63927
64068
  ".mdx": "text/markdown"
63928
64069
  };
63929
64070
  function getMime(filePath) {
63930
- return MIME_MAP2[path25.extname(filePath).toLowerCase()] ?? "application/octet-stream";
64071
+ return MIME_MAP2[path26.extname(filePath).toLowerCase()] ?? "application/octet-stream";
63931
64072
  }
63932
64073
  function escapeHtml(value) {
63933
64074
  return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
@@ -64281,14 +64422,14 @@ async function sendPreviewAssetResponse(sessionManager, token, requestedPath, re
64281
64422
  res.end("Invalid path");
64282
64423
  return;
64283
64424
  }
64284
- if (!fs22.existsSync(resolved) || !fs22.statSync(resolved).isFile()) {
64425
+ if (!fs23.existsSync(resolved) || !fs23.statSync(resolved).isFile()) {
64285
64426
  res.writeHead(404, { "Content-Type": "text/plain" });
64286
64427
  res.end("File not found");
64287
64428
  return;
64288
64429
  }
64289
- const ext = path25.extname(resolved).toLowerCase();
64430
+ const ext = path26.extname(resolved).toLowerCase();
64290
64431
  const mime = ext === ".md" || ext === ".mdx" ? "text/html" : getMime(resolved);
64291
- const content = ext === ".md" || ext === ".mdx" ? renderMarkdownDocument(fs22.readFileSync(resolved, "utf8"), path25.basename(resolved)) : fs22.readFileSync(resolved);
64432
+ const content = ext === ".md" || ext === ".mdx" ? renderMarkdownDocument(fs23.readFileSync(resolved, "utf8"), path26.basename(resolved)) : fs23.readFileSync(resolved);
64292
64433
  res.writeHead(200, {
64293
64434
  "Content-Type": mime,
64294
64435
  "Content-Length": content.length,
@@ -64617,13 +64758,13 @@ function getLocalTaskOutputDownload(taskEngine, taskId, filePath) {
64617
64758
  const rootPath = getTaskOutputRoot(taskEngine, taskId);
64618
64759
  try {
64619
64760
  const absolutePath = resolveOutputPath(rootPath, filePath);
64620
- if (!fs23.existsSync(absolutePath) || !fs23.statSync(absolutePath).isFile()) {
64761
+ if (!fs24.existsSync(absolutePath) || !fs24.statSync(absolutePath).isFile()) {
64621
64762
  throw new MeshyError("TASK_NOT_FOUND", `File not found: ${filePath}`, 404);
64622
64763
  }
64623
64764
  const { mimeType } = classifyFile(absolutePath);
64624
- const fileName = path26.basename(absolutePath).replace(/"/g, "");
64765
+ const fileName = path27.basename(absolutePath).replace(/"/g, "");
64625
64766
  return {
64626
- content: fs23.readFileSync(absolutePath),
64767
+ content: fs24.readFileSync(absolutePath),
64627
64768
  headers: {
64628
64769
  "Content-Type": mimeType,
64629
64770
  "Content-Disposition": `inline; filename="${fileName}"`,
@@ -64675,8 +64816,8 @@ async function createPreviewSessionPayload(deps, taskId, optionsOrPath, requestO
64675
64816
  }
64676
64817
 
64677
64818
  // ../../packages/api/src/node/capability-service.ts
64678
- var fs24 = __toESM(require("fs"), 1);
64679
- var path27 = __toESM(require("path"), 1);
64819
+ var fs25 = __toESM(require("fs"), 1);
64820
+ var path28 = __toESM(require("path"), 1);
64680
64821
  function getCapabilityService(deps) {
64681
64822
  if (deps.capabilityService) return deps.capabilityService;
64682
64823
  deps.capabilityService = createDefaultCapabilityService({
@@ -64686,8 +64827,8 @@ function getCapabilityService(deps) {
64686
64827
  }
64687
64828
  function createKnownProjectPredicate(deps) {
64688
64829
  return (projectPath) => {
64689
- const resolved = path27.resolve(projectPath);
64690
- if (collectKnownProjectPaths(deps).has(resolved)) return fs24.existsSync(resolved);
64830
+ const resolved = path28.resolve(projectPath);
64831
+ if (collectKnownProjectPaths(deps).has(resolved)) return fs25.existsSync(resolved);
64691
64832
  const self2 = deps.nodeRegistry.getSelf();
64692
64833
  const workDir = self2.workDir ?? deps.workDir;
64693
64834
  if (!workDir) return false;
@@ -64702,15 +64843,15 @@ function collectKnownProjectPaths(deps) {
64702
64843
  const paths = /* @__PURE__ */ new Set();
64703
64844
  const workDir = self2.workDir ?? deps.workDir;
64704
64845
  if (workDir) {
64705
- const resolvedWorkDir = path27.resolve(workDir);
64846
+ const resolvedWorkDir = path28.resolve(workDir);
64706
64847
  paths.add(resolvedWorkDir);
64707
64848
  for (const folder of self2.workDirFolders ?? []) {
64708
- paths.add(path27.resolve(resolvedWorkDir, folder));
64849
+ paths.add(path28.resolve(resolvedWorkDir, folder));
64709
64850
  }
64710
64851
  }
64711
64852
  const tasks = safeListTasks(deps);
64712
64853
  for (const task of tasks) {
64713
- if (task.effectiveProjectPath) paths.add(path27.resolve(task.effectiveProjectPath));
64854
+ if (task.effectiveProjectPath) paths.add(path28.resolve(task.effectiveProjectPath));
64714
64855
  }
64715
64856
  return paths;
64716
64857
  }
@@ -64722,13 +64863,13 @@ function safeListTasks(deps) {
64722
64863
  }
64723
64864
  }
64724
64865
  function isPathInsideOrEqual(parentPath, childPath) {
64725
- const relative6 = path27.relative(parentPath, childPath);
64726
- return relative6 === "" || !!relative6 && !relative6.startsWith("..") && !path27.isAbsolute(relative6);
64866
+ const relative6 = path28.relative(parentPath, childPath);
64867
+ return relative6 === "" || !!relative6 && !relative6.startsWith("..") && !path28.isAbsolute(relative6);
64727
64868
  }
64728
64869
  function realpathExistingDirectory(value) {
64729
64870
  try {
64730
- if (!fs24.statSync(value).isDirectory()) return null;
64731
- return fs24.realpathSync(value);
64871
+ if (!fs25.statSync(value).isDirectory()) return null;
64872
+ return fs25.realpathSync(value);
64732
64873
  } catch {
64733
64874
  return null;
64734
64875
  }
@@ -68321,8 +68462,8 @@ function hasAuthorizationHeader(req) {
68321
68462
  function resolveRuntimeBaseDir() {
68322
68463
  const entryPath = process.argv[1];
68323
68464
  if (typeof entryPath === "string" && entryPath.length > 0) {
68324
- const resolved = fs25.realpathSync(path28.resolve(entryPath));
68325
- return path28.dirname(resolved);
68465
+ const resolved = fs26.realpathSync(path29.resolve(entryPath));
68466
+ return path29.dirname(resolved);
68326
68467
  }
68327
68468
  return process.cwd();
68328
68469
  }
@@ -68330,18 +68471,18 @@ function resolveStaticDir(baseDir) {
68330
68471
  const envStaticDir = process.env.MESHY_STATIC_DIR;
68331
68472
  const candidateDirs = [
68332
68473
  envStaticDir,
68333
- path28.resolve(baseDir, "dashboard"),
68334
- path28.resolve(baseDir, "../dashboard"),
68335
- path28.resolve(baseDir, "../../dashboard/dist"),
68336
- path28.resolve(baseDir, "../../../packages/dashboard/dist"),
68337
- path28.resolve(baseDir, "../public"),
68338
- path28.resolve(baseDir, "../../packages/api/public"),
68339
- path28.resolve(baseDir, "../../../packages/api/public"),
68340
- path28.resolve(process.cwd(), "packages/dashboard/dist"),
68341
- path28.resolve(process.cwd(), "packages/api/public")
68474
+ path29.resolve(baseDir, "dashboard"),
68475
+ path29.resolve(baseDir, "../dashboard"),
68476
+ path29.resolve(baseDir, "../../dashboard/dist"),
68477
+ path29.resolve(baseDir, "../../../packages/dashboard/dist"),
68478
+ path29.resolve(baseDir, "../public"),
68479
+ path29.resolve(baseDir, "../../packages/api/public"),
68480
+ path29.resolve(baseDir, "../../../packages/api/public"),
68481
+ path29.resolve(process.cwd(), "packages/dashboard/dist"),
68482
+ path29.resolve(process.cwd(), "packages/api/public")
68342
68483
  ].filter((value) => typeof value === "string" && value.length > 0);
68343
68484
  for (const candidate of candidateDirs) {
68344
- if (fs25.existsSync(candidate)) {
68485
+ if (fs26.existsSync(candidate)) {
68345
68486
  return candidate;
68346
68487
  }
68347
68488
  }
@@ -68451,8 +68592,8 @@ function createServer2(deps) {
68451
68592
  app.use("/api/node-operations", createNodeOperationRoutes());
68452
68593
  app.use("/api/events", createEventRoutes());
68453
68594
  if (staticDir) {
68454
- const indexPath = path28.join(staticDir, "index.html");
68455
- if (fs25.existsSync(indexPath)) {
68595
+ const indexPath = path29.join(staticDir, "index.html");
68596
+ if (fs26.existsSync(indexPath)) {
68456
68597
  app.get("*", (req, res, next) => {
68457
68598
  if (isApiRequest(req)) {
68458
68599
  next();
@@ -68566,12 +68707,12 @@ function detectLocalIp() {
68566
68707
  return "127.0.0.1";
68567
68708
  }
68568
68709
  function detectAvailablePort() {
68569
- return new Promise((resolve21, reject) => {
68710
+ return new Promise((resolve22, reject) => {
68570
68711
  const srv = (0, import_node_http2.createServer)();
68571
68712
  srv.listen(0, () => {
68572
68713
  const addr = srv.address();
68573
68714
  const port = addr && typeof addr !== "string" ? addr.port : 0;
68574
- srv.close((err) => err ? reject(err) : resolve21(port));
68715
+ srv.close((err) => err ? reject(err) : resolve22(port));
68575
68716
  });
68576
68717
  srv.on("error", reject);
68577
68718
  });
@@ -68657,7 +68798,7 @@ var DevTunnelTransport = class {
68657
68798
  const hostArgs = this.buildHostArgs(localPort);
68658
68799
  const child = (0, import_node_child_process11.spawn)("devtunnel", hostArgs, hiddenSpawnOptions());
68659
68800
  this.process = child;
68660
- this.publicUrl = await new Promise((resolve21, reject) => {
68801
+ this.publicUrl = await new Promise((resolve22, reject) => {
68661
68802
  const timeout = setTimeout(() => {
68662
68803
  child.kill();
68663
68804
  this.process = null;
@@ -68680,7 +68821,7 @@ var DevTunnelTransport = class {
68680
68821
  clearTimeout(timeout);
68681
68822
  child.stdout?.removeListener("data", onData);
68682
68823
  child.stderr?.removeListener("data", onErrData);
68683
- resolve21(url.replace(/\/+$/, ""));
68824
+ resolve22(url.replace(/\/+$/, ""));
68684
68825
  };
68685
68826
  child.stdout?.on("data", onData);
68686
68827
  child.stderr?.on("data", onErrData);
@@ -68712,14 +68853,14 @@ ${lines.join("")}`
68712
68853
  this.publicUrl = null;
68713
68854
  if (child.exitCode === null) {
68714
68855
  child.kill("SIGTERM");
68715
- await new Promise((resolve21) => {
68856
+ await new Promise((resolve22) => {
68716
68857
  const killTimer = setTimeout(() => {
68717
68858
  child.kill("SIGKILL");
68718
- resolve21();
68859
+ resolve22();
68719
68860
  }, 5e3);
68720
68861
  child.on("close", () => {
68721
68862
  clearTimeout(killTimer);
68722
- resolve21();
68863
+ resolve22();
68723
68864
  });
68724
68865
  });
68725
68866
  }
@@ -68932,12 +69073,12 @@ var terminalWriter = {
68932
69073
  };
68933
69074
 
68934
69075
  // src/startup.ts
68935
- var fs27 = __toESM(require("fs"), 1);
69076
+ var fs28 = __toESM(require("fs"), 1);
68936
69077
  var readline2 = __toESM(require("readline/promises"), 1);
68937
69078
 
68938
69079
  // src/startup-tools/index.ts
68939
- var fs26 = __toESM(require("fs"), 1);
68940
- var path29 = __toESM(require("path"), 1);
69080
+ var fs27 = __toESM(require("fs"), 1);
69081
+ var path30 = __toESM(require("path"), 1);
68941
69082
  var readline = __toESM(require("readline/promises"), 1);
68942
69083
  var import_node_child_process12 = require("child_process");
68943
69084
  var STARTUP_REQUIREMENTS = ["az", "devtunnel", "claude", "codex", "copilot"];
@@ -68985,19 +69126,19 @@ function createDefaultCommandRunner(platform2) {
68985
69126
  };
68986
69127
  }
68987
69128
  function getNodeMetadataPath2(storagePath) {
68988
- return path29.join(storagePath, "metadata.json");
69129
+ return path30.join(storagePath, "metadata.json");
68989
69130
  }
68990
69131
  function readStartupMetadataFile(storagePath) {
68991
69132
  try {
68992
- const raw = JSON.parse(fs26.readFileSync(getNodeMetadataPath2(storagePath), "utf-8"));
69133
+ const raw = JSON.parse(fs27.readFileSync(getNodeMetadataPath2(storagePath), "utf-8"));
68993
69134
  return typeof raw === "object" && raw !== null ? raw : {};
68994
69135
  } catch {
68995
69136
  return {};
68996
69137
  }
68997
69138
  }
68998
69139
  function writeStartupMetadataFile(storagePath, metadata) {
68999
- fs26.mkdirSync(storagePath, { recursive: true });
69000
- fs26.writeFileSync(getNodeMetadataPath2(storagePath), JSON.stringify(metadata, null, 2) + "\n", "utf-8");
69140
+ fs27.mkdirSync(storagePath, { recursive: true });
69141
+ fs27.writeFileSync(getNodeMetadataPath2(storagePath), JSON.stringify(metadata, null, 2) + "\n", "utf-8");
69001
69142
  }
69002
69143
  function formatLocalDate2(now) {
69003
69144
  const year = now.getFullYear();
@@ -69081,7 +69222,7 @@ function isRequirementSatisfied(requirement, status) {
69081
69222
  return true;
69082
69223
  }
69083
69224
  function sleep2(ms) {
69084
- return new Promise((resolve21) => setTimeout(resolve21, ms));
69225
+ return new Promise((resolve22) => setTimeout(resolve22, ms));
69085
69226
  }
69086
69227
  function areCachedAuthRequirementsCurrent(commandRunner) {
69087
69228
  return isAuthenticated("az", commandRunner) && isAuthenticated("devtunnel", commandRunner);
@@ -69270,9 +69411,9 @@ function createRuntimeDefaultConfig(fileConfig, options = {}) {
69270
69411
  else if (isDevBoxEnvironment()) config2.node.devbox = { enabled: true };
69271
69412
  return config2;
69272
69413
  }
69273
- function loadConfigFile(path31) {
69414
+ function loadConfigFile(path32) {
69274
69415
  try {
69275
- const raw = fs27.readFileSync(path31, "utf-8");
69416
+ const raw = fs28.readFileSync(path32, "utf-8");
69276
69417
  return JSON.parse(raw);
69277
69418
  } catch {
69278
69419
  return {};
@@ -69451,26 +69592,26 @@ function formatLoadedStartMetadata(info, authEnabled) {
69451
69592
  }
69452
69593
 
69453
69594
  // src/runtime-metadata.ts
69454
- var fs28 = __toESM(require("fs"), 1);
69455
- var path30 = __toESM(require("path"), 1);
69595
+ var fs29 = __toESM(require("fs"), 1);
69596
+ var path31 = __toESM(require("path"), 1);
69456
69597
  var import_node_child_process13 = require("child_process");
69457
69598
  var runtimeDir = resolveRuntimeDir();
69458
69599
  var appRoot = resolveAppRoot(runtimeDir);
69459
- var repoRoot = path30.resolve(appRoot, "../..");
69600
+ var repoRoot = path31.resolve(appRoot, "../..");
69460
69601
  function resolveRuntimeDir() {
69461
69602
  const entryPath = process.argv[1];
69462
69603
  if (typeof entryPath === "string" && entryPath.length > 0) {
69463
69604
  try {
69464
- return path30.dirname(fs28.realpathSync(path30.resolve(entryPath)));
69605
+ return path31.dirname(fs29.realpathSync(path31.resolve(entryPath)));
69465
69606
  } catch {
69466
- return path30.dirname(path30.resolve(entryPath));
69607
+ return path31.dirname(path31.resolve(entryPath));
69467
69608
  }
69468
69609
  }
69469
69610
  return process.cwd();
69470
69611
  }
69471
69612
  function readJsonFile(filePath) {
69472
69613
  try {
69473
- return JSON.parse(fs28.readFileSync(filePath, "utf-8"));
69614
+ return JSON.parse(fs29.readFileSync(filePath, "utf-8"));
69474
69615
  } catch {
69475
69616
  return null;
69476
69617
  }
@@ -69480,9 +69621,9 @@ function readPackageManifest(filePath) {
69480
69621
  }
69481
69622
  function readEmbeddedRuntimeMetadata() {
69482
69623
  const candidates = [
69483
- path30.join(appRoot, "runtime-metadata.json"),
69484
- path30.join(runtimeDir, "runtime-metadata.json"),
69485
- path30.resolve(process.cwd(), "apps/node/dist/runtime-metadata.json")
69624
+ path31.join(appRoot, "runtime-metadata.json"),
69625
+ path31.join(runtimeDir, "runtime-metadata.json"),
69626
+ path31.resolve(process.cwd(), "apps/node/dist/runtime-metadata.json")
69486
69627
  ];
69487
69628
  for (const candidate of candidates) {
69488
69629
  const metadata = readJsonFile(candidate);
@@ -69495,23 +69636,23 @@ function readEmbeddedRuntimeMetadata() {
69495
69636
  function resolveAppRoot(baseDir) {
69496
69637
  const candidates = [
69497
69638
  baseDir,
69498
- path30.resolve(baseDir, ".."),
69499
- path30.resolve(process.cwd(), "apps/node/dist"),
69500
- path30.resolve(process.cwd(), "apps/node"),
69639
+ path31.resolve(baseDir, ".."),
69640
+ path31.resolve(process.cwd(), "apps/node/dist"),
69641
+ path31.resolve(process.cwd(), "apps/node"),
69501
69642
  process.cwd()
69502
69643
  ];
69503
69644
  for (const candidate of candidates) {
69504
- const manifest = readPackageManifest(path30.join(candidate, "package.json"));
69645
+ const manifest = readPackageManifest(path31.join(candidate, "package.json"));
69505
69646
  if (manifest?.name === "@meshy/node" || manifest?.name === "meshy-node") {
69506
69647
  return candidate;
69507
69648
  }
69508
69649
  }
69509
69650
  for (const candidate of candidates) {
69510
- if (fs28.existsSync(path30.join(candidate, "package.json"))) {
69651
+ if (fs29.existsSync(path31.join(candidate, "package.json"))) {
69511
69652
  return candidate;
69512
69653
  }
69513
69654
  }
69514
- return path30.resolve(baseDir, "..");
69655
+ return path31.resolve(baseDir, "..");
69515
69656
  }
69516
69657
  function toPackageInfo(filePath) {
69517
69658
  const manifest = readPackageManifest(filePath);
@@ -69571,8 +69712,8 @@ function buildRuntimeMetadata(storagePath) {
69571
69712
  components: startupRequirements.components
69572
69713
  };
69573
69714
  }
69574
- const appPackage = toPackageInfo(path30.join(appRoot, "package.json"));
69575
- const workspaceManifest = readPackageManifest(path30.join(repoRoot, "package.json"));
69715
+ const appPackage = toPackageInfo(path31.join(appRoot, "package.json"));
69716
+ const workspaceManifest = readPackageManifest(path31.join(repoRoot, "package.json"));
69576
69717
  return {
69577
69718
  packageName: appPackage?.name ?? "meshy",
69578
69719
  packageVersion: appPackage?.version ?? "0.1.0",
@@ -69580,11 +69721,11 @@ function buildRuntimeMetadata(storagePath) {
69580
69721
  startupRequirementsLastCheckedOn: startupRequirements.lastCheckedOn,
69581
69722
  components: startupRequirements.components,
69582
69723
  packages: {
69583
- workspace: toPackageInfo(path30.join(repoRoot, "package.json")),
69724
+ workspace: toPackageInfo(path31.join(repoRoot, "package.json")),
69584
69725
  node: appPackage,
69585
- core: toPackageInfo(path30.join(repoRoot, "packages/core/package.json")),
69586
- dashboard: toPackageInfo(path30.join(repoRoot, "packages/dashboard/package.json")),
69587
- api: toPackageInfo(path30.join(repoRoot, "packages/api/package.json"))
69726
+ core: toPackageInfo(path31.join(repoRoot, "packages/core/package.json")),
69727
+ dashboard: toPackageInfo(path31.join(repoRoot, "packages/dashboard/package.json")),
69728
+ api: toPackageInfo(path31.join(repoRoot, "packages/api/package.json"))
69588
69729
  },
69589
69730
  repository: {
69590
69731
  url: normalizeRepositoryUrl(readGitValue(["config", "--get", "remote.upstream.url"])) ?? normalizeRepositoryUrl(readGitValue(["config", "--get", "remote.origin.url"])) ?? readRepositoryUrlFromManifest(workspaceManifest),
@@ -69595,7 +69736,7 @@ function buildRuntimeMetadata(storagePath) {
69595
69736
  }
69596
69737
 
69597
69738
  // src/bootstrap/runtime-restart.ts
69598
- var fs29 = __toESM(require("fs"), 1);
69739
+ var fs30 = __toESM(require("fs"), 1);
69599
69740
  var nodePath2 = __toESM(require("path"), 1);
69600
69741
  var import_node_child_process14 = require("child_process");
69601
69742
  var RUNTIME_UPDATE_CHECK_INTERVAL_MS = 6 * 60 * 60 * 1e3;
@@ -69836,8 +69977,8 @@ function createRuntimeRestartLaunchPlan(options) {
69836
69977
  };
69837
69978
  }
69838
69979
  function scheduleRuntimeRestart(plan, options = {}) {
69839
- fs29.mkdirSync(nodePath2.dirname(plan.logPath), { recursive: true });
69840
- const logFd = fs29.openSync(plan.logPath, "a");
69980
+ fs30.mkdirSync(nodePath2.dirname(plan.logPath), { recursive: true });
69981
+ const logFd = fs30.openSync(plan.logPath, "a");
69841
69982
  const spawnImpl = options.spawnImpl ?? import_node_child_process14.spawn;
69842
69983
  const env = {
69843
69984
  ...process.env,