meshy-node 0.5.2 → 0.5.3

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.
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-BzTROrJe.js";/**
1
+ import{c as a}from"./index-CK-fup_F.js";/**
2
2
  * @license lucide-react v1.7.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -5,8 +5,8 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Meshy Dashboard</title>
7
7
  <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>&#x1F578;</text></svg>" />
8
- <script type="module" crossorigin src="/assets/index-BzTROrJe.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-BOC8nP24.css">
8
+ <script type="module" crossorigin src="/assets/index-CK-fup_F.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-BS822Af4.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
package/main.cjs CHANGED
@@ -2878,7 +2878,7 @@ var require_semver2 = __commonJS({
2878
2878
  "../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/index.js"(exports2, module2) {
2879
2879
  "use strict";
2880
2880
  var internalRe = require_re();
2881
- var constants = require_constants();
2881
+ var constants2 = require_constants();
2882
2882
  var SemVer = require_semver();
2883
2883
  var identifiers = require_identifiers();
2884
2884
  var parse = require_parse();
@@ -2960,8 +2960,8 @@ var require_semver2 = __commonJS({
2960
2960
  re: internalRe.re,
2961
2961
  src: internalRe.src,
2962
2962
  tokens: internalRe.t,
2963
- SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
2964
- RELEASE_TYPES: constants.RELEASE_TYPES,
2963
+ SEMVER_SPEC_VERSION: constants2.SEMVER_SPEC_VERSION,
2964
+ RELEASE_TYPES: constants2.RELEASE_TYPES,
2965
2965
  compareIdentifiers: identifiers.compareIdentifiers,
2966
2966
  rcompareIdentifiers: identifiers.rcompareIdentifiers
2967
2967
  };
@@ -6629,8 +6629,8 @@ var require_node2 = __commonJS({
6629
6629
  }
6630
6630
  break;
6631
6631
  case "FILE":
6632
- var fs23 = require("fs");
6633
- stream2 = new fs23.SyncWriteStream(fd2, { autoClose: false });
6632
+ var fs24 = require("fs");
6633
+ stream2 = new fs24.SyncWriteStream(fd2, { autoClose: false });
6634
6634
  stream2._type = "fs";
6635
6635
  break;
6636
6636
  case "PIPE":
@@ -23749,7 +23749,7 @@ var require_view = __commonJS({
23749
23749
  "use strict";
23750
23750
  var debug = require_src2()("express:view");
23751
23751
  var path23 = require("path");
23752
- var fs23 = require("fs");
23752
+ var fs24 = require("fs");
23753
23753
  var dirname8 = path23.dirname;
23754
23754
  var basename5 = path23.basename;
23755
23755
  var extname3 = path23.extname;
@@ -23815,7 +23815,7 @@ var require_view = __commonJS({
23815
23815
  function tryStat(path24) {
23816
23816
  debug('stat "%s"', path24);
23817
23817
  try {
23818
- return fs23.statSync(path24);
23818
+ return fs24.statSync(path24);
23819
23819
  } catch (e) {
23820
23820
  return void 0;
23821
23821
  }
@@ -24113,7 +24113,7 @@ var require_mime = __commonJS({
24113
24113
  "../../node_modules/.pnpm/mime@1.6.0/node_modules/mime/mime.js"(exports2, module2) {
24114
24114
  "use strict";
24115
24115
  var path23 = require("path");
24116
- var fs23 = require("fs");
24116
+ var fs24 = require("fs");
24117
24117
  function Mime() {
24118
24118
  this.types = /* @__PURE__ */ Object.create(null);
24119
24119
  this.extensions = /* @__PURE__ */ Object.create(null);
@@ -24134,7 +24134,7 @@ var require_mime = __commonJS({
24134
24134
  };
24135
24135
  Mime.prototype.load = function(file) {
24136
24136
  this._loading = file;
24137
- var map = {}, content = fs23.readFileSync(file, "ascii"), lines = content.split(/[\r\n]+/);
24137
+ var map = {}, content = fs24.readFileSync(file, "ascii"), lines = content.split(/[\r\n]+/);
24138
24138
  lines.forEach(function(line) {
24139
24139
  var fields = line.replace(/\s*#.*|^\s*|\s*$/g, "").split(/\s+/);
24140
24140
  map[fields.shift()] = fields;
@@ -24256,7 +24256,7 @@ var require_send = __commonJS({
24256
24256
  var escapeHtml2 = require_escape_html();
24257
24257
  var etag = require_etag();
24258
24258
  var fresh = require_fresh();
24259
- var fs23 = require("fs");
24259
+ var fs24 = require("fs");
24260
24260
  var mime = require_mime();
24261
24261
  var ms = require_ms();
24262
24262
  var onFinished = require_on_finished();
@@ -24589,7 +24589,7 @@ var require_send = __commonJS({
24589
24589
  var i = 0;
24590
24590
  var self2 = this;
24591
24591
  debug('stat "%s"', path24);
24592
- fs23.stat(path24, function onstat(err, stat) {
24592
+ fs24.stat(path24, function onstat(err, stat) {
24593
24593
  if (err && err.code === "ENOENT" && !extname3(path24) && path24[path24.length - 1] !== sep4) {
24594
24594
  return next(err);
24595
24595
  }
@@ -24604,7 +24604,7 @@ var require_send = __commonJS({
24604
24604
  }
24605
24605
  var p = path24 + "." + self2._extensions[i++];
24606
24606
  debug('stat "%s"', p);
24607
- fs23.stat(p, function(err2, stat) {
24607
+ fs24.stat(p, function(err2, stat) {
24608
24608
  if (err2) return next(err2);
24609
24609
  if (stat.isDirectory()) return next();
24610
24610
  self2.emit("file", p, stat);
@@ -24622,7 +24622,7 @@ var require_send = __commonJS({
24622
24622
  }
24623
24623
  var p = join17(path24, self2._index[i]);
24624
24624
  debug('stat "%s"', p);
24625
- fs23.stat(p, function(err2, stat) {
24625
+ fs24.stat(p, function(err2, stat) {
24626
24626
  if (err2) return next(err2);
24627
24627
  if (stat.isDirectory()) return next();
24628
24628
  self2.emit("file", p, stat);
@@ -24634,7 +24634,7 @@ var require_send = __commonJS({
24634
24634
  SendStream.prototype.stream = function stream(path24, options) {
24635
24635
  var self2 = this;
24636
24636
  var res = this.res;
24637
- var stream2 = fs23.createReadStream(path24, options);
24637
+ var stream2 = fs24.createReadStream(path24, options);
24638
24638
  this.emit("stream", stream2);
24639
24639
  stream2.pipe(res);
24640
24640
  function cleanup() {
@@ -43460,7 +43460,7 @@ var BatchTaskIdsBody = external_exports.object({
43460
43460
 
43461
43461
  // ../../packages/api/src/app/server.ts
43462
43462
  var path20 = __toESM(require("path"), 1);
43463
- var fs19 = __toESM(require("fs"), 1);
43463
+ var fs20 = __toESM(require("fs"), 1);
43464
43464
  var import_express14 = __toESM(require_express2(), 1);
43465
43465
 
43466
43466
  // ../../packages/api/src/middleware/auth.ts
@@ -44306,37 +44306,71 @@ function readFileContent(root, relativePath) {
44306
44306
  };
44307
44307
  }
44308
44308
 
44309
- // ../../packages/api/src/output/git-branches.ts
44309
+ // ../../packages/api/src/output/git-command.ts
44310
+ var fs15 = __toESM(require("fs"), 1);
44310
44311
  var import_node_child_process6 = require("child_process");
44312
+ var COMMON_GIT_BINARIES = [
44313
+ "/opt/homebrew/bin/git",
44314
+ "/usr/local/bin/git",
44315
+ "/usr/bin/git"
44316
+ ];
44317
+ function isExecutable(filePath) {
44318
+ try {
44319
+ fs15.accessSync(filePath, fs15.constants.X_OK);
44320
+ return true;
44321
+ } catch {
44322
+ return false;
44323
+ }
44324
+ }
44325
+ function getGitCandidates() {
44326
+ const candidates = [
44327
+ process.env.MESHY_GIT_BINARY,
44328
+ "git",
44329
+ ...COMMON_GIT_BINARIES.filter(isExecutable)
44330
+ ].filter((candidate) => Boolean(candidate));
44331
+ return [...new Set(candidates)];
44332
+ }
44333
+ function isMissingBinaryError(error) {
44334
+ return typeof error === "object" && error !== null && error.code === "ENOENT";
44335
+ }
44336
+ function execGit(args, cwd, timeout = 1e4) {
44337
+ let lastError;
44338
+ for (const command of getGitCandidates()) {
44339
+ try {
44340
+ return (0, import_node_child_process6.execFileSync)(command, ["-C", cwd, ...args], {
44341
+ encoding: "utf-8",
44342
+ timeout,
44343
+ stdio: ["pipe", "pipe", "pipe"],
44344
+ windowsHide: true
44345
+ }).trim();
44346
+ } catch (err) {
44347
+ lastError = err;
44348
+ if (!isMissingBinaryError(err)) {
44349
+ throw err;
44350
+ }
44351
+ }
44352
+ }
44353
+ throw lastError instanceof Error ? lastError : new Error("git executable not found");
44354
+ }
44355
+
44356
+ // ../../packages/api/src/output/git-branches.ts
44311
44357
  function git(args, cwd) {
44312
44358
  try {
44313
- return (0, import_node_child_process6.execFileSync)("git", ["-C", cwd, ...args], {
44314
- encoding: "utf-8",
44315
- timeout: 1e4,
44316
- stdio: ["pipe", "pipe", "pipe"]
44317
- }).trim();
44359
+ return execGit(args, cwd);
44318
44360
  } catch {
44319
44361
  return "";
44320
44362
  }
44321
44363
  }
44322
44364
  function gitSucceeds(args, cwd) {
44323
44365
  try {
44324
- (0, import_node_child_process6.execFileSync)("git", ["-C", cwd, ...args], {
44325
- encoding: "utf-8",
44326
- timeout: 1e4,
44327
- stdio: ["pipe", "pipe", "pipe"]
44328
- });
44366
+ execGit(args, cwd);
44329
44367
  return true;
44330
44368
  } catch {
44331
44369
  return false;
44332
44370
  }
44333
44371
  }
44334
44372
  function runGit(args, cwd) {
44335
- return (0, import_node_child_process6.execFileSync)("git", ["-C", cwd, ...args], {
44336
- encoding: "utf-8",
44337
- timeout: 1e4,
44338
- stdio: ["pipe", "pipe", "pipe"]
44339
- }).trim();
44373
+ return execGit(args, cwd);
44340
44374
  }
44341
44375
  function isGitRepo(dirPath) {
44342
44376
  return git(["rev-parse", "--is-inside-work-tree"], dirPath) === "true";
@@ -44490,14 +44524,9 @@ function createGitBranch(dirPath, branchName, startPoint, options) {
44490
44524
  }
44491
44525
 
44492
44526
  // ../../packages/api/src/output/git-diff.ts
44493
- var import_node_child_process7 = require("child_process");
44494
44527
  function git2(args, cwd) {
44495
44528
  try {
44496
- return (0, import_node_child_process7.execFileSync)("git", ["-C", cwd, ...args], {
44497
- encoding: "utf-8",
44498
- timeout: 1e4,
44499
- stdio: ["pipe", "pipe", "pipe"]
44500
- }).trim();
44529
+ return execGit(args, cwd);
44501
44530
  } catch {
44502
44531
  return "";
44503
44532
  }
@@ -44649,11 +44678,11 @@ function computeParentPath(rootPath, currentPath, useAbsolute) {
44649
44678
  var import_node_crypto7 = require("crypto");
44650
44679
 
44651
44680
  // ../../packages/api/src/node/agent-upgrade-service.ts
44652
- var import_node_child_process9 = require("child_process");
44681
+ var import_node_child_process8 = require("child_process");
44653
44682
 
44654
44683
  // ../../packages/api/src/app/system-info.ts
44655
44684
  var os6 = __toESM(require("os"), 1);
44656
- var import_node_child_process8 = require("child_process");
44685
+ var import_node_child_process7 = require("child_process");
44657
44686
  var RUNTIME_TOOLS = [
44658
44687
  { id: "claude", label: "Claude Code", command: "claude", packageName: "@anthropic-ai/claude-code" },
44659
44688
  { id: "codex", label: "Codex", command: "codex", packageName: "@openai/codex" }
@@ -44667,7 +44696,7 @@ function clearRuntimeToolUpdateCache(packageName) {
44667
44696
  runtimeToolUpdateCache.clear();
44668
44697
  }
44669
44698
  function runRuntimeToolCommand(command, args, platform2) {
44670
- const result = (0, import_node_child_process8.spawnSync)(command, args, {
44699
+ const result = (0, import_node_child_process7.spawnSync)(command, args, {
44671
44700
  encoding: "utf-8",
44672
44701
  shell: platform2 === "win32" && command !== "where",
44673
44702
  windowsHide: true,
@@ -44872,7 +44901,7 @@ function summarizeOutput(value) {
44872
44901
  return text.length > OUTPUT_LIMIT ? `${text.slice(0, OUTPUT_LIMIT)}\u2026` : text;
44873
44902
  }
44874
44903
  function defaultCommandRunner(command, args) {
44875
- const result = (0, import_node_child_process9.spawnSync)(command, args, {
44904
+ const result = (0, import_node_child_process8.spawnSync)(command, args, {
44876
44905
  encoding: "utf-8",
44877
44906
  shell: process.platform === "win32",
44878
44907
  windowsHide: true,
@@ -45372,7 +45401,7 @@ async function sendNodeWorkDirBranchCreateOperation(req, res, nodeId) {
45372
45401
  }
45373
45402
 
45374
45403
  // ../../packages/api/src/tasks/task-route-utils.ts
45375
- var fs15 = __toESM(require("fs"), 1);
45404
+ var fs16 = __toESM(require("fs"), 1);
45376
45405
  var import_node_stream2 = require("stream");
45377
45406
  var import_promises5 = require("stream/promises");
45378
45407
 
@@ -45434,10 +45463,10 @@ function readLocalTaskLogs(engineRegistry, taskId, after, agent) {
45434
45463
  throw new MeshyError("VALIDATION_ERROR", `Engine not registered for agent: ${agent}`, 400);
45435
45464
  }
45436
45465
  const logPath = engine.getLogPath(taskId);
45437
- if (!fs15.existsSync(logPath)) {
45466
+ if (!fs16.existsSync(logPath)) {
45438
45467
  return { logs: [], total: 0 };
45439
45468
  }
45440
- const content = fs15.readFileSync(logPath, "utf-8");
45469
+ const content = fs16.readFileSync(logPath, "utf-8");
45441
45470
  const allLines = content.trim().split("\n").filter(Boolean);
45442
45471
  const logs = [];
45443
45472
  for (let i = after; i < allLines.length; i++) {
@@ -45668,11 +45697,11 @@ async function maybeProxyReadToLeader(req, res, options = {}) {
45668
45697
  }
45669
45698
 
45670
45699
  // ../../packages/api/src/node/node-terminal-session-service.ts
45671
- var import_node_child_process10 = require("child_process");
45700
+ var import_node_child_process9 = require("child_process");
45672
45701
  var import_node_crypto8 = require("crypto");
45673
45702
 
45674
45703
  // ../../packages/api/src/node/node-terminal-service.ts
45675
- var fs16 = __toESM(require("fs"), 1);
45704
+ var fs17 = __toESM(require("fs"), 1);
45676
45705
  var path17 = __toESM(require("path"), 1);
45677
45706
  var DEFAULT_OUTPUT_LIMIT_BYTES = 64 * 1024;
45678
45707
  function isAbsolutePath2(value) {
@@ -45684,7 +45713,7 @@ function resolveNodeTerminalCwd(nodeId, rootPath, cwd) {
45684
45713
  }
45685
45714
  const requestedCwd = cwd?.trim() || ".";
45686
45715
  const resolved = isAbsolutePath2(requestedCwd) ? path17.resolve(requestedCwd) : path17.resolve(rootPath, requestedCwd);
45687
- if (!fs16.existsSync(resolved) || !fs16.statSync(resolved).isDirectory()) {
45716
+ if (!fs17.existsSync(resolved) || !fs17.statSync(resolved).isDirectory()) {
45688
45717
  throw new MeshyError("VALIDATION_ERROR", `Working directory does not exist: ${resolved}`, 400);
45689
45718
  }
45690
45719
  return resolved;
@@ -45748,7 +45777,7 @@ var NodeTerminalSessionService = class {
45748
45777
  }
45749
45778
  const cwd = resolveNodeTerminalCwd(nodeId, rootPath, options.cwd);
45750
45779
  const startedAt = Date.now();
45751
- const child = (0, import_node_child_process10.spawn)(normalizedCommand, {
45780
+ const child = (0, import_node_child_process9.spawn)(normalizedCommand, {
45752
45781
  cwd,
45753
45782
  shell: true,
45754
45783
  windowsHide: true,
@@ -45923,12 +45952,12 @@ function cancelTaskOnCurrentNode(deps, taskId, options = {}) {
45923
45952
  }
45924
45953
 
45925
45954
  // ../../packages/api/src/tasks/task-output-service.ts
45926
- var fs18 = __toESM(require("fs"), 1);
45955
+ var fs19 = __toESM(require("fs"), 1);
45927
45956
  var path19 = __toESM(require("path"), 1);
45928
45957
 
45929
45958
  // ../../packages/api/src/preview/preview-server.ts
45930
45959
  var crypto3 = __toESM(require("crypto"), 1);
45931
- var fs17 = __toESM(require("fs"), 1);
45960
+ var fs18 = __toESM(require("fs"), 1);
45932
45961
  var path18 = __toESM(require("path"), 1);
45933
45962
  var http2 = __toESM(require("http"), 1);
45934
45963
  var import_node_stream3 = require("stream");
@@ -46053,7 +46082,7 @@ function resolvePreviewPath(rootPath, relativePath) {
46053
46082
  }
46054
46083
  function resolvePreviewEntryPath(rootPath, entryPath) {
46055
46084
  const { absolutePath, normalizedPath } = resolvePreviewPath(rootPath, entryPath ?? "index.html");
46056
- if (!fs17.existsSync(absolutePath) || !fs17.statSync(absolutePath).isFile()) {
46085
+ if (!fs18.existsSync(absolutePath) || !fs18.statSync(absolutePath).isFile()) {
46057
46086
  throw new Error("Preview entry not found");
46058
46087
  }
46059
46088
  return normalizedPath;
@@ -46509,14 +46538,14 @@ async function sendPreviewAssetResponse(sessionManager, token, requestedPath, re
46509
46538
  res.end("Invalid path");
46510
46539
  return;
46511
46540
  }
46512
- if (!fs17.existsSync(resolved) || !fs17.statSync(resolved).isFile()) {
46541
+ if (!fs18.existsSync(resolved) || !fs18.statSync(resolved).isFile()) {
46513
46542
  res.writeHead(404, { "Content-Type": "text/plain" });
46514
46543
  res.end("File not found");
46515
46544
  return;
46516
46545
  }
46517
46546
  const ext = path18.extname(resolved).toLowerCase();
46518
46547
  const mime = ext === ".md" || ext === ".mdx" ? "text/html" : getMime(resolved);
46519
- const content = ext === ".md" || ext === ".mdx" ? renderMarkdownDocument(fs17.readFileSync(resolved, "utf8"), path18.basename(resolved)) : fs17.readFileSync(resolved);
46548
+ const content = ext === ".md" || ext === ".mdx" ? renderMarkdownDocument(fs18.readFileSync(resolved, "utf8"), path18.basename(resolved)) : fs18.readFileSync(resolved);
46520
46549
  res.writeHead(200, {
46521
46550
  "Content-Type": mime,
46522
46551
  "Content-Length": content.length,
@@ -46845,13 +46874,13 @@ function getLocalTaskOutputDownload(taskEngine, taskId, filePath) {
46845
46874
  const rootPath = getTaskOutputRoot(taskEngine, taskId);
46846
46875
  try {
46847
46876
  const absolutePath = resolveOutputPath(rootPath, filePath);
46848
- if (!fs18.existsSync(absolutePath) || !fs18.statSync(absolutePath).isFile()) {
46877
+ if (!fs19.existsSync(absolutePath) || !fs19.statSync(absolutePath).isFile()) {
46849
46878
  throw new MeshyError("TASK_NOT_FOUND", `File not found: ${filePath}`, 404);
46850
46879
  }
46851
46880
  const { mimeType } = classifyFile(absolutePath);
46852
46881
  const fileName = path19.basename(absolutePath).replace(/"/g, "");
46853
46882
  return {
46854
- content: fs18.readFileSync(absolutePath),
46883
+ content: fs19.readFileSync(absolutePath),
46855
46884
  headers: {
46856
46885
  "Content-Type": mimeType,
46857
46886
  "Content-Disposition": `inline; filename="${fileName}"`,
@@ -49925,7 +49954,7 @@ function hasAuthorizationHeader(req) {
49925
49954
  function resolveRuntimeBaseDir() {
49926
49955
  const entryPath = process.argv[1];
49927
49956
  if (typeof entryPath === "string" && entryPath.length > 0) {
49928
- const resolved = fs19.realpathSync(path20.resolve(entryPath));
49957
+ const resolved = fs20.realpathSync(path20.resolve(entryPath));
49929
49958
  return path20.dirname(resolved);
49930
49959
  }
49931
49960
  return process.cwd();
@@ -49945,7 +49974,7 @@ function resolveStaticDir(baseDir) {
49945
49974
  path20.resolve(process.cwd(), "packages/api/public")
49946
49975
  ].filter((value) => typeof value === "string" && value.length > 0);
49947
49976
  for (const candidate of candidateDirs) {
49948
- if (fs19.existsSync(candidate)) {
49977
+ if (fs20.existsSync(candidate)) {
49949
49978
  return candidate;
49950
49979
  }
49951
49980
  }
@@ -50051,7 +50080,7 @@ function createServer2(deps) {
50051
50080
  app.use("/api/events", createEventRoutes());
50052
50081
  if (staticDir) {
50053
50082
  const indexPath = path20.join(staticDir, "index.html");
50054
- if (fs19.existsSync(indexPath)) {
50083
+ if (fs20.existsSync(indexPath)) {
50055
50084
  app.get("*", (req, res, next) => {
50056
50085
  if (isApiRequest(req)) {
50057
50086
  next();
@@ -50135,10 +50164,10 @@ var DirectTransport = class {
50135
50164
  };
50136
50165
 
50137
50166
  // ../../packages/transport/src/devtunnel.ts
50138
- var import_node_child_process11 = require("child_process");
50167
+ var import_node_child_process10 = require("child_process");
50139
50168
  function isInstalled(cmd) {
50140
50169
  try {
50141
- (0, import_node_child_process11.execSync)(process.platform === "win32" ? `where ${cmd}` : `command -v ${cmd}`, { stdio: "pipe" });
50170
+ (0, import_node_child_process10.execSync)(process.platform === "win32" ? `where ${cmd}` : `command -v ${cmd}`, { stdio: "pipe" });
50142
50171
  return true;
50143
50172
  } catch {
50144
50173
  return false;
@@ -50161,14 +50190,14 @@ var DevTunnelTransport = class {
50161
50190
  );
50162
50191
  }
50163
50192
  try {
50164
- (0, import_node_child_process11.execSync)("devtunnel user show", { stdio: "pipe" });
50193
+ (0, import_node_child_process10.execSync)("devtunnel user show", { stdio: "pipe" });
50165
50194
  } catch {
50166
50195
  throw new Error(
50167
50196
  "Not logged in to devtunnel. Run: devtunnel user login"
50168
50197
  );
50169
50198
  }
50170
50199
  const hostArgs = this.buildHostArgs(localPort);
50171
- const child = (0, import_node_child_process11.spawn)("devtunnel", hostArgs, {
50200
+ const child = (0, import_node_child_process10.spawn)("devtunnel", hostArgs, {
50172
50201
  stdio: ["pipe", "pipe", "pipe"]
50173
50202
  });
50174
50203
  this.process = child;
@@ -50273,7 +50302,7 @@ ${lines.join("")}`
50273
50302
  return;
50274
50303
  }
50275
50304
  try {
50276
- (0, import_node_child_process11.execFileSync)("devtunnel", ["access", "create", tunnelId, "--tenant"], { stdio: "pipe" });
50305
+ (0, import_node_child_process10.execFileSync)("devtunnel", ["access", "create", tunnelId, "--tenant"], { stdio: "pipe" });
50277
50306
  } catch (err) {
50278
50307
  if (isExistingTenantAccessError(err)) {
50279
50308
  return;
@@ -50289,7 +50318,7 @@ ${lines.join("")}`
50289
50318
  return void 0;
50290
50319
  }
50291
50320
  try {
50292
- (0, import_node_child_process11.execFileSync)("devtunnel", ["show", tunnelId], { stdio: "pipe" });
50321
+ (0, import_node_child_process10.execFileSync)("devtunnel", ["show", tunnelId], { stdio: "pipe" });
50293
50322
  return tunnelId;
50294
50323
  } catch {
50295
50324
  const createArgs = ["create", tunnelId];
@@ -50297,7 +50326,7 @@ ${lines.join("")}`
50297
50326
  createArgs.push("-a");
50298
50327
  }
50299
50328
  try {
50300
- (0, import_node_child_process11.execFileSync)("devtunnel", createArgs, { stdio: "pipe" });
50329
+ (0, import_node_child_process10.execFileSync)("devtunnel", createArgs, { stdio: "pipe" });
50301
50330
  return tunnelId;
50302
50331
  } catch (err) {
50303
50332
  throw new Error(
@@ -50309,13 +50338,13 @@ ${lines.join("")}`
50309
50338
  ensureTunnelPort(tunnelId, localPort) {
50310
50339
  const ports = this.listTunnelPorts(tunnelId);
50311
50340
  for (const stalePort of ports.filter((p) => p !== localPort)) {
50312
- (0, import_node_child_process11.execFileSync)("devtunnel", ["port", "delete", tunnelId, "-p", String(stalePort)], { stdio: "pipe" });
50341
+ (0, import_node_child_process10.execFileSync)("devtunnel", ["port", "delete", tunnelId, "-p", String(stalePort)], { stdio: "pipe" });
50313
50342
  }
50314
50343
  if (ports.includes(localPort)) {
50315
50344
  return;
50316
50345
  }
50317
50346
  try {
50318
- (0, import_node_child_process11.execFileSync)(
50347
+ (0, import_node_child_process10.execFileSync)(
50319
50348
  "devtunnel",
50320
50349
  ["port", "create", tunnelId, "-p", String(localPort), "--protocol", "http"],
50321
50350
  { stdio: "pipe" }
@@ -50331,7 +50360,7 @@ ${lines.join("")}`
50331
50360
  }
50332
50361
  listTunnelPorts(tunnelId) {
50333
50362
  try {
50334
- const output = (0, import_node_child_process11.execFileSync)("devtunnel", ["port", "list", tunnelId, "-j"], { stdio: "pipe" });
50363
+ const output = (0, import_node_child_process10.execFileSync)("devtunnel", ["port", "list", tunnelId, "-j"], { stdio: "pipe" });
50335
50364
  const parsed = JSON.parse(output.toString());
50336
50365
  const items = Array.isArray(parsed) ? parsed : parsed && typeof parsed === "object" && Array.isArray(parsed.ports) ? parsed.ports : parsed && typeof parsed === "object" && Array.isArray(parsed.value) ? parsed.value : [];
50337
50366
  return items.map((item) => getPortNumber(item)).filter((value) => value !== void 0);
@@ -50343,7 +50372,7 @@ ${lines.join("")}`
50343
50372
  }
50344
50373
  hasTunnelPort(tunnelId, localPort) {
50345
50374
  try {
50346
- (0, import_node_child_process11.execFileSync)(
50375
+ (0, import_node_child_process10.execFileSync)(
50347
50376
  "devtunnel",
50348
50377
  ["port", "show", tunnelId, "-p", String(localPort), "-j"],
50349
50378
  { stdio: "pipe" }
@@ -50447,10 +50476,10 @@ var terminalWriter = {
50447
50476
  };
50448
50477
 
50449
50478
  // src/startup.ts
50450
- var fs20 = __toESM(require("fs"), 1);
50479
+ var fs21 = __toESM(require("fs"), 1);
50451
50480
  var path21 = __toESM(require("path"), 1);
50452
50481
  var readline = __toESM(require("readline/promises"), 1);
50453
- var import_node_child_process12 = require("child_process");
50482
+ var import_node_child_process11 = require("child_process");
50454
50483
  function getDefaultNodeName() {
50455
50484
  return getDeviceNodeName();
50456
50485
  }
@@ -50496,7 +50525,7 @@ function createPromptSession(prompt) {
50496
50525
  }
50497
50526
  function createDefaultCommandRunner(platform2) {
50498
50527
  return (command, args, interactive = false) => {
50499
- const result = (0, import_node_child_process12.spawnSync)(command, args, {
50528
+ const result = (0, import_node_child_process11.spawnSync)(command, args, {
50500
50529
  encoding: "utf-8",
50501
50530
  shell: platform2 === "win32",
50502
50531
  stdio: interactive ? "inherit" : "pipe"
@@ -50515,15 +50544,15 @@ function getNodeMetadataPath2(storagePath) {
50515
50544
  }
50516
50545
  function readStartupMetadataFile(storagePath) {
50517
50546
  try {
50518
- const raw = JSON.parse(fs20.readFileSync(getNodeMetadataPath2(storagePath), "utf-8"));
50547
+ const raw = JSON.parse(fs21.readFileSync(getNodeMetadataPath2(storagePath), "utf-8"));
50519
50548
  return typeof raw === "object" && raw !== null ? raw : {};
50520
50549
  } catch {
50521
50550
  return {};
50522
50551
  }
50523
50552
  }
50524
50553
  function writeStartupMetadataFile(storagePath, metadata) {
50525
- fs20.mkdirSync(storagePath, { recursive: true });
50526
- fs20.writeFileSync(getNodeMetadataPath2(storagePath), JSON.stringify(metadata, null, 2) + "\n", "utf-8");
50554
+ fs21.mkdirSync(storagePath, { recursive: true });
50555
+ fs21.writeFileSync(getNodeMetadataPath2(storagePath), JSON.stringify(metadata, null, 2) + "\n", "utf-8");
50527
50556
  }
50528
50557
  function formatLocalDate2(now) {
50529
50558
  const year = now.getFullYear();
@@ -50764,7 +50793,7 @@ async function ensureStartupRequirements(storagePath, options = {}) {
50764
50793
  }
50765
50794
  function loadConfigFile(path23) {
50766
50795
  try {
50767
- const raw = fs20.readFileSync(path23, "utf-8");
50796
+ const raw = fs21.readFileSync(path23, "utf-8");
50768
50797
  return JSON.parse(raw);
50769
50798
  } catch {
50770
50799
  return {};
@@ -50942,9 +50971,9 @@ function formatLoadedStartMetadata(info, authEnabled) {
50942
50971
  }
50943
50972
 
50944
50973
  // src/runtime-metadata.ts
50945
- var fs21 = __toESM(require("fs"), 1);
50974
+ var fs22 = __toESM(require("fs"), 1);
50946
50975
  var path22 = __toESM(require("path"), 1);
50947
- var import_node_child_process13 = require("child_process");
50976
+ var import_node_child_process12 = require("child_process");
50948
50977
  var runtimeDir = resolveRuntimeDir();
50949
50978
  var appRoot = resolveAppRoot(runtimeDir);
50950
50979
  var repoRoot = path22.resolve(appRoot, "../..");
@@ -50952,7 +50981,7 @@ function resolveRuntimeDir() {
50952
50981
  const entryPath = process.argv[1];
50953
50982
  if (typeof entryPath === "string" && entryPath.length > 0) {
50954
50983
  try {
50955
- return path22.dirname(fs21.realpathSync(path22.resolve(entryPath)));
50984
+ return path22.dirname(fs22.realpathSync(path22.resolve(entryPath)));
50956
50985
  } catch {
50957
50986
  return path22.dirname(path22.resolve(entryPath));
50958
50987
  }
@@ -50961,7 +50990,7 @@ function resolveRuntimeDir() {
50961
50990
  }
50962
50991
  function readJsonFile(filePath) {
50963
50992
  try {
50964
- return JSON.parse(fs21.readFileSync(filePath, "utf-8"));
50993
+ return JSON.parse(fs22.readFileSync(filePath, "utf-8"));
50965
50994
  } catch {
50966
50995
  return null;
50967
50996
  }
@@ -50998,7 +51027,7 @@ function resolveAppRoot(baseDir) {
50998
51027
  }
50999
51028
  }
51000
51029
  for (const candidate of candidates) {
51001
- if (fs21.existsSync(path22.join(candidate, "package.json"))) {
51030
+ if (fs22.existsSync(path22.join(candidate, "package.json"))) {
51002
51031
  return candidate;
51003
51032
  }
51004
51033
  }
@@ -51040,7 +51069,7 @@ function readRepositoryUrlFromManifest(manifest) {
51040
51069
  }
51041
51070
  function readGitValue(args) {
51042
51071
  try {
51043
- const output = (0, import_node_child_process13.execFileSync)("git", args, {
51072
+ const output = (0, import_node_child_process12.execFileSync)("git", args, {
51044
51073
  cwd: repoRoot,
51045
51074
  encoding: "utf-8",
51046
51075
  stdio: ["ignore", "pipe", "ignore"],
@@ -51086,9 +51115,9 @@ function buildRuntimeMetadata(storagePath) {
51086
51115
  }
51087
51116
 
51088
51117
  // src/bootstrap/runtime-restart.ts
51089
- var fs22 = __toESM(require("fs"), 1);
51118
+ var fs23 = __toESM(require("fs"), 1);
51090
51119
  var nodePath2 = __toESM(require("path"), 1);
51091
- var import_node_child_process14 = require("child_process");
51120
+ var import_node_child_process13 = require("child_process");
51092
51121
  function resolveRuntimeRestartStartArgs(hydratedArgs, restartArgs) {
51093
51122
  return restartArgs ? { ...restartArgs } : hydratedArgs;
51094
51123
  }
@@ -51202,7 +51231,7 @@ function compareSemver2(left, right) {
51202
51231
  return 0;
51203
51232
  }
51204
51233
  function runRuntimePackageCommand(command, args) {
51205
- const result = (0, import_node_child_process14.spawnSync)(command, args, {
51234
+ const result = (0, import_node_child_process13.spawnSync)(command, args, {
51206
51235
  encoding: "utf-8",
51207
51236
  windowsHide: true,
51208
51237
  timeout: 2500
@@ -51241,7 +51270,7 @@ function createSpawnableCommand(command, args, platform2) {
51241
51270
  }
51242
51271
  function readProcessCommand(pid, platform2) {
51243
51272
  if (platform2 === "win32") return null;
51244
- const result = (0, import_node_child_process14.spawnSync)("ps", ["-p", String(pid), "-o", "args="], {
51273
+ const result = (0, import_node_child_process13.spawnSync)("ps", ["-p", String(pid), "-o", "args="], {
51245
51274
  encoding: "utf-8",
51246
51275
  windowsHide: true,
51247
51276
  timeout: 1e3
@@ -51332,9 +51361,9 @@ function createRuntimeRestartLaunchPlan(options) {
51332
51361
  };
51333
51362
  }
51334
51363
  function scheduleRuntimeRestart(plan, options = {}) {
51335
- fs22.mkdirSync(nodePath2.dirname(plan.logPath), { recursive: true });
51336
- const logFd = fs22.openSync(plan.logPath, "a");
51337
- const spawnImpl = options.spawnImpl ?? import_node_child_process14.spawn;
51364
+ fs23.mkdirSync(nodePath2.dirname(plan.logPath), { recursive: true });
51365
+ const logFd = fs23.openSync(plan.logPath, "a");
51366
+ const spawnImpl = options.spawnImpl ?? import_node_child_process13.spawn;
51338
51367
  const env = {
51339
51368
  ...process.env,
51340
51369
  MESHY_RESTART_PARENT_PID: String(options.parentPid ?? process.pid),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meshy-node",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "private": false,
5
5
  "description": "Standalone Meshy node package with bundled runtime and dashboard assets.",
6
6
  "type": "commonjs",
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "packageName": "meshy-node",
3
- "packageVersion": "0.5.2",
3
+ "packageVersion": "0.5.3",
4
4
  "packages": {
5
5
  "workspace": {
6
6
  "name": "meshy",
7
- "version": "0.5.2"
7
+ "version": "0.5.3"
8
8
  },
9
9
  "node": {
10
10
  "name": "meshy-node",
11
- "version": "0.5.2"
11
+ "version": "0.5.3"
12
12
  },
13
13
  "core": {
14
14
  "name": "@meshy/core",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "repository": {
27
27
  "url": "https://github.com/ai-microsoft/meshy",
28
- "branch": "fixSharing",
29
- "commit": "44e4ed7"
28
+ "branch": "fixGitRepo",
29
+ "commit": "3a154f2"
30
30
  }
31
31
  }