meshy-node 0.7.12 → 0.7.13

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
@@ -10739,8 +10739,8 @@ var require_node2 = __commonJS({
10739
10739
  }
10740
10740
  break;
10741
10741
  case "FILE":
10742
- var fs24 = require("fs");
10743
- stream2 = new fs24.SyncWriteStream(fd2, { autoClose: false });
10742
+ var fs25 = require("fs");
10743
+ stream2 = new fs25.SyncWriteStream(fd2, { autoClose: false });
10744
10744
  stream2._type = "fs";
10745
10745
  break;
10746
10746
  case "PIPE":
@@ -27859,7 +27859,7 @@ var require_view = __commonJS({
27859
27859
  "use strict";
27860
27860
  var debug = require_src2()("express:view");
27861
27861
  var path23 = require("path");
27862
- var fs24 = require("fs");
27862
+ var fs25 = require("fs");
27863
27863
  var dirname7 = path23.dirname;
27864
27864
  var basename5 = path23.basename;
27865
27865
  var extname4 = path23.extname;
@@ -27925,7 +27925,7 @@ var require_view = __commonJS({
27925
27925
  function tryStat(path24) {
27926
27926
  debug('stat "%s"', path24);
27927
27927
  try {
27928
- return fs24.statSync(path24);
27928
+ return fs25.statSync(path24);
27929
27929
  } catch (e) {
27930
27930
  return void 0;
27931
27931
  }
@@ -28223,7 +28223,7 @@ 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
28225
  var path23 = require("path");
28226
- var fs24 = require("fs");
28226
+ var fs25 = 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 = fs24.readFileSync(file, "ascii"), lines = content.split(/[\r\n]+/);
28247
+ var map = {}, content = fs25.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;
@@ -28366,7 +28366,7 @@ 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 fs24 = require("fs");
28369
+ var fs25 = require("fs");
28370
28370
  var mime = require_mime();
28371
28371
  var ms = require_ms();
28372
28372
  var onFinished = require_on_finished();
@@ -28699,7 +28699,7 @@ var require_send = __commonJS({
28699
28699
  var i = 0;
28700
28700
  var self2 = this;
28701
28701
  debug('stat "%s"', path24);
28702
- fs24.stat(path24, function onstat(err, stat) {
28702
+ fs25.stat(path24, function onstat(err, stat) {
28703
28703
  if (err && err.code === "ENOENT" && !extname4(path24) && path24[path24.length - 1] !== sep5) {
28704
28704
  return next(err);
28705
28705
  }
@@ -28714,7 +28714,7 @@ var require_send = __commonJS({
28714
28714
  }
28715
28715
  var p = path24 + "." + self2._extensions[i++];
28716
28716
  debug('stat "%s"', p);
28717
- fs24.stat(p, function(err2, stat) {
28717
+ fs25.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);
@@ -28732,7 +28732,7 @@ var require_send = __commonJS({
28732
28732
  }
28733
28733
  var p = join17(path24, self2._index[i]);
28734
28734
  debug('stat "%s"', p);
28735
- fs24.stat(p, function(err2, stat) {
28735
+ fs25.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);
@@ -28744,7 +28744,7 @@ var require_send = __commonJS({
28744
28744
  SendStream.prototype.stream = function stream(path24, options) {
28745
28745
  var self2 = this;
28746
28746
  var res = this.res;
28747
- var stream2 = fs24.createReadStream(path24, options);
28747
+ var stream2 = fs25.createReadStream(path24, options);
28748
28748
  this.emit("stream", stream2);
28749
28749
  stream2.pipe(res);
28750
28750
  function cleanup() {
@@ -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, fs24, exportName) {
45721
+ function addFormats(ajv, list, fs25, 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, fs24[f]);
45726
+ ajv.addFormat(f, fs25[f]);
45727
45727
  }
45728
45728
  module2.exports = exports2 = formatsPlugin;
45729
45729
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -46549,7 +46549,7 @@ var require_windows = __commonJS({
46549
46549
  "use strict";
46550
46550
  module2.exports = isexe;
46551
46551
  isexe.sync = sync;
46552
- var fs24 = require("fs");
46552
+ var fs25 = require("fs");
46553
46553
  function checkPathExt(path23, options) {
46554
46554
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
46555
46555
  if (!pathext) {
@@ -46574,12 +46574,12 @@ var require_windows = __commonJS({
46574
46574
  return checkPathExt(path23, options);
46575
46575
  }
46576
46576
  function isexe(path23, options, cb) {
46577
- fs24.stat(path23, function(er, stat) {
46577
+ fs25.stat(path23, function(er, stat) {
46578
46578
  cb(er, er ? false : checkStat(stat, path23, options));
46579
46579
  });
46580
46580
  }
46581
46581
  function sync(path23, options) {
46582
- return checkStat(fs24.statSync(path23), path23, options);
46582
+ return checkStat(fs25.statSync(path23), path23, 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 fs24 = require("fs");
46593
+ var fs25 = require("fs");
46594
46594
  function isexe(path23, options, cb) {
46595
- fs24.stat(path23, function(er, stat) {
46595
+ fs25.stat(path23, function(er, stat) {
46596
46596
  cb(er, er ? false : checkStat(stat, options));
46597
46597
  });
46598
46598
  }
46599
46599
  function sync(path23, options) {
46600
- return checkStat(fs24.statSync(path23), options);
46600
+ return checkStat(fs25.statSync(path23), 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 fs24 = require("fs");
46625
+ var fs25 = require("fs");
46626
46626
  var core;
46627
46627
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
46628
46628
  core = require_windows();
@@ -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 fs24 = require("fs");
46890
+ var fs25 = 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 = fs24.openSync(command, "r");
46898
- fs24.readSync(fd, buffer, 0, size, 0);
46899
- fs24.closeSync(fd);
46897
+ fd = fs25.openSync(command, "r");
46898
+ fs25.readSync(fd, buffer, 0, size, 0);
46899
+ fs25.closeSync(fd);
46900
46900
  } catch (e) {
46901
46901
  }
46902
46902
  return shebangCommand(buffer.toString());
@@ -47270,6 +47270,7 @@ __export(main_exports, {
47270
47270
  closeHttpServer: () => closeHttpServer,
47271
47271
  createDefaultConfig: () => createDefaultConfig,
47272
47272
  createRuntimeDefaultConfig: () => createRuntimeDefaultConfig,
47273
+ ensureNpxStartupTools: () => ensureNpxStartupTools,
47273
47274
  ensureStartupRequirements: () => ensureStartupRequirements,
47274
47275
  formatBanner: () => formatBanner,
47275
47276
  formatFatalErrorForConsole: () => formatFatalErrorForConsole,
@@ -67338,42 +67339,22 @@ var terminalWriter = {
67338
67339
  };
67339
67340
 
67340
67341
  // src/startup.ts
67342
+ var fs22 = __toESM(require("fs"), 1);
67343
+ var readline2 = __toESM(require("readline/promises"), 1);
67344
+
67345
+ // src/startup-tools/index.ts
67341
67346
  var fs21 = __toESM(require("fs"), 1);
67342
67347
  var path21 = __toESM(require("path"), 1);
67343
67348
  var readline = __toESM(require("readline/promises"), 1);
67344
67349
  var import_node_child_process12 = require("child_process");
67345
- function getDefaultNodeName() {
67346
- return getDeviceNodeName();
67347
- }
67348
- function isDevBoxEnvironment(env = process.env) {
67349
- const value = env.IsDevbox ?? env.IsDevBox;
67350
- return typeof value === "string" && value.trim().length > 0 && value.toLowerCase() !== "false" && value !== "0";
67351
- }
67352
- var DEFAULT_NODE_NAME = getDefaultNodeName();
67353
- var SUPPORTED_TRANSPORTS = ["direct", "devtunnel"];
67354
67350
  var STARTUP_REQUIREMENTS = ["az", "devtunnel", "claude", "codex", "copilot"];
67355
- function createDefaultConfig(storagePath = resolveDefaultStoragePath(), nodeName = DEFAULT_NODE_NAME) {
67356
- return {
67357
- node: { name: nodeName, port: DEFAULT_NODE_PORT, workDir: process.cwd() },
67358
- transport: { type: "devtunnel" },
67359
- cluster: { seeds: [], heartbeatInterval: 3e3, electionTimeout: 36e3, apiKey: "" },
67360
- storage: { path: storagePath }
67361
- };
67362
- }
67363
- var DEFAULT_CONFIG3 = createDefaultConfig();
67364
- function createRuntimeDefaultConfig(fileConfig, options = {}) {
67365
- const storagePath = fileConfig.storage?.path ?? resolveDefaultStoragePath();
67366
- const nodeName = options.ignorePersistedName ? getDeviceNodeName() : resolveDefaultNodeName(storagePath);
67367
- const config2 = createDefaultConfig(storagePath, nodeName);
67368
- const devbox = resolveNodeDevBoxMetadata(storagePath);
67369
- if (devbox) config2.node.devbox = { ...devbox, enabled: devbox.enabled === true || Boolean(devbox.name) };
67370
- else if (isDevBoxEnvironment()) config2.node.devbox = { enabled: true };
67371
- return config2;
67372
- }
67373
67351
  function writeLine(stream, message = "") {
67374
67352
  stream.write(`${message}
67375
67353
  `);
67376
67354
  }
67355
+ function shouldPromptForStartupTools() {
67356
+ return Boolean(process.stdin.isTTY && process.stdout.isTTY);
67357
+ }
67377
67358
  function createPromptSession(prompt) {
67378
67359
  if (prompt) {
67379
67360
  return {
@@ -67381,7 +67362,7 @@ function createPromptSession(prompt) {
67381
67362
  close: async () => void 0
67382
67363
  };
67383
67364
  }
67384
- if (!shouldPromptForStartOptions()) {
67365
+ if (!shouldPromptForStartupTools()) {
67385
67366
  return void 0;
67386
67367
  }
67387
67368
  const rl = readline.createInterface({
@@ -67664,9 +67645,41 @@ async function ensureStartupRequirements(storagePath, options = {}) {
67664
67645
  metadata
67665
67646
  };
67666
67647
  }
67648
+ async function ensureNpxStartupTools(storagePath, options = {}) {
67649
+ return ensureStartupRequirements(storagePath, options);
67650
+ }
67651
+
67652
+ // src/startup.ts
67653
+ function getDefaultNodeName() {
67654
+ return getDeviceNodeName();
67655
+ }
67656
+ function isDevBoxEnvironment(env = process.env) {
67657
+ const value = env.IsDevbox ?? env.IsDevBox;
67658
+ return typeof value === "string" && value.trim().length > 0 && value.toLowerCase() !== "false" && value !== "0";
67659
+ }
67660
+ var DEFAULT_NODE_NAME = getDefaultNodeName();
67661
+ var SUPPORTED_TRANSPORTS = ["direct", "devtunnel"];
67662
+ function createDefaultConfig(storagePath = resolveDefaultStoragePath(), nodeName = DEFAULT_NODE_NAME) {
67663
+ return {
67664
+ node: { name: nodeName, port: DEFAULT_NODE_PORT, workDir: process.cwd() },
67665
+ transport: { type: "devtunnel" },
67666
+ cluster: { seeds: [], heartbeatInterval: 3e3, electionTimeout: 36e3, apiKey: "" },
67667
+ storage: { path: storagePath }
67668
+ };
67669
+ }
67670
+ var DEFAULT_CONFIG3 = createDefaultConfig();
67671
+ function createRuntimeDefaultConfig(fileConfig, options = {}) {
67672
+ const storagePath = fileConfig.storage?.path ?? resolveDefaultStoragePath();
67673
+ const nodeName = options.ignorePersistedName ? getDeviceNodeName() : resolveDefaultNodeName(storagePath);
67674
+ const config2 = createDefaultConfig(storagePath, nodeName);
67675
+ const devbox = resolveNodeDevBoxMetadata(storagePath);
67676
+ if (devbox) config2.node.devbox = { ...devbox, enabled: devbox.enabled === true || Boolean(devbox.name) };
67677
+ else if (isDevBoxEnvironment()) config2.node.devbox = { enabled: true };
67678
+ return config2;
67679
+ }
67667
67680
  function loadConfigFile(path23) {
67668
67681
  try {
67669
- const raw = fs21.readFileSync(path23, "utf-8");
67682
+ const raw = fs22.readFileSync(path23, "utf-8");
67670
67683
  return JSON.parse(raw);
67671
67684
  } catch {
67672
67685
  return {};
@@ -67719,7 +67732,7 @@ async function promptStartOptions(args, fileConfig, defaults, prompt) {
67719
67732
  let ask = prompt;
67720
67733
  let closePrompt;
67721
67734
  if (!ask) {
67722
- const rl = readline.createInterface({
67735
+ const rl = readline2.createInterface({
67723
67736
  input: process.stdin,
67724
67737
  output: process.stdout
67725
67738
  });
@@ -67845,7 +67858,7 @@ function formatLoadedStartMetadata(info, authEnabled) {
67845
67858
  }
67846
67859
 
67847
67860
  // src/runtime-metadata.ts
67848
- var fs22 = __toESM(require("fs"), 1);
67861
+ var fs23 = __toESM(require("fs"), 1);
67849
67862
  var path22 = __toESM(require("path"), 1);
67850
67863
  var import_node_child_process13 = require("child_process");
67851
67864
  var runtimeDir = resolveRuntimeDir();
@@ -67855,7 +67868,7 @@ function resolveRuntimeDir() {
67855
67868
  const entryPath = process.argv[1];
67856
67869
  if (typeof entryPath === "string" && entryPath.length > 0) {
67857
67870
  try {
67858
- return path22.dirname(fs22.realpathSync(path22.resolve(entryPath)));
67871
+ return path22.dirname(fs23.realpathSync(path22.resolve(entryPath)));
67859
67872
  } catch {
67860
67873
  return path22.dirname(path22.resolve(entryPath));
67861
67874
  }
@@ -67864,7 +67877,7 @@ function resolveRuntimeDir() {
67864
67877
  }
67865
67878
  function readJsonFile(filePath) {
67866
67879
  try {
67867
- return JSON.parse(fs22.readFileSync(filePath, "utf-8"));
67880
+ return JSON.parse(fs23.readFileSync(filePath, "utf-8"));
67868
67881
  } catch {
67869
67882
  return null;
67870
67883
  }
@@ -67901,7 +67914,7 @@ function resolveAppRoot(baseDir) {
67901
67914
  }
67902
67915
  }
67903
67916
  for (const candidate of candidates) {
67904
- if (fs22.existsSync(path22.join(candidate, "package.json"))) {
67917
+ if (fs23.existsSync(path22.join(candidate, "package.json"))) {
67905
67918
  return candidate;
67906
67919
  }
67907
67920
  }
@@ -67989,7 +68002,7 @@ function buildRuntimeMetadata(storagePath) {
67989
68002
  }
67990
68003
 
67991
68004
  // src/bootstrap/runtime-restart.ts
67992
- var fs23 = __toESM(require("fs"), 1);
68005
+ var fs24 = __toESM(require("fs"), 1);
67993
68006
  var nodePath2 = __toESM(require("path"), 1);
67994
68007
  var import_node_child_process14 = require("child_process");
67995
68008
  var RUNTIME_UPDATE_CHECK_INTERVAL_MS = 6 * 60 * 60 * 1e3;
@@ -68230,8 +68243,8 @@ function createRuntimeRestartLaunchPlan(options) {
68230
68243
  };
68231
68244
  }
68232
68245
  function scheduleRuntimeRestart(plan, options = {}) {
68233
- fs23.mkdirSync(nodePath2.dirname(plan.logPath), { recursive: true });
68234
- const logFd = fs23.openSync(plan.logPath, "a");
68246
+ fs24.mkdirSync(nodePath2.dirname(plan.logPath), { recursive: true });
68247
+ const logFd = fs24.openSync(plan.logPath, "a");
68235
68248
  const spawnImpl = options.spawnImpl ?? import_node_child_process14.spawn;
68236
68249
  const env = {
68237
68250
  ...process.env,
@@ -68827,7 +68840,7 @@ function registerShutdownHandlers(options) {
68827
68840
  async function startNode(args) {
68828
68841
  const { authMetadata, config: config2, hydratedArgs, runtimeMetadata, storageRoot } = await resolveStartConfig(args);
68829
68842
  terminalWriter.line("Checking startup requirements (az, devtunnel, claude, codex, copilot)...");
68830
- const startupRequirements = await ensureStartupRequirements(config2.storage.path);
68843
+ const startupRequirements = await ensureNpxStartupTools(config2.storage.path);
68831
68844
  terminalWriter.line(
68832
68845
  startupRequirements.skipped ? "Startup requirements already verified today; skipping checks." : "Startup requirements check complete."
68833
68846
  );
@@ -69059,6 +69072,7 @@ if (isDirectRun) {
69059
69072
  closeHttpServer,
69060
69073
  createDefaultConfig,
69061
69074
  createRuntimeDefaultConfig,
69075
+ ensureNpxStartupTools,
69062
69076
  ensureStartupRequirements,
69063
69077
  formatBanner,
69064
69078
  formatFatalErrorForConsole,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meshy-node",
3
- "version": "0.7.12",
3
+ "version": "0.7.13",
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.7.12",
3
+ "packageVersion": "0.7.13",
4
4
  "packages": {
5
5
  "workspace": {
6
6
  "name": "meshy",
7
- "version": "0.7.12"
7
+ "version": "0.7.13"
8
8
  },
9
9
  "node": {
10
10
  "name": "meshy-node",
11
- "version": "0.7.12"
11
+ "version": "0.7.13"
12
12
  },
13
13
  "core": {
14
14
  "name": "@meshy/core",
@@ -26,6 +26,6 @@
26
26
  "repository": {
27
27
  "url": "https://github.com/ai-microsoft/meshy",
28
28
  "branch": "main",
29
- "commit": "0328585"
29
+ "commit": "75b2394"
30
30
  }
31
31
  }