meshy-node 0.5.7 → 0.5.8

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-DX2JBoPo.js";/**
1
+ import{c as a}from"./index-C8QVuMfU.js";/**
2
2
  * @license lucide-react v1.7.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -5,7 +5,7 @@
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-DX2JBoPo.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-C8QVuMfU.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-BlCzIaoB.css">
10
10
  </head>
11
11
  <body>
package/main.cjs CHANGED
@@ -65456,7 +65456,7 @@ function createSystemRoutes() {
65456
65456
  path: req.originalUrl || req.url,
65457
65457
  remoteAddress: req.ip || req.socket.remoteAddress
65458
65458
  });
65459
- res.json({ status: "ok", timestamp: Date.now() });
65459
+ res.json({ status: "ok", timestamp: Date.now(), pid: process.pid });
65460
65460
  }));
65461
65461
  router.get("/info", asyncHandler10(async (req, res) => {
65462
65462
  const {
@@ -65468,6 +65468,7 @@ function createSystemRoutes() {
65468
65468
  storagePath,
65469
65469
  inspectRuntimeTools: inspectTools,
65470
65470
  runtimeMetadata,
65471
+ getRuntimeUpdate,
65471
65472
  runtimeUpdate
65472
65473
  } = req.app.locals.deps;
65473
65474
  const self2 = nodeRegistry.getSelf();
@@ -65481,7 +65482,7 @@ function createSystemRoutes() {
65481
65482
  inspectRuntimeTools: inspectTools,
65482
65483
  localDashboardOrigin,
65483
65484
  runtimeMetadata,
65484
- runtimeUpdate,
65485
+ runtimeUpdate: getRuntimeUpdate?.() ?? runtimeUpdate,
65485
65486
  storagePath,
65486
65487
  workDir: self2.workDir
65487
65488
  });
@@ -66992,6 +66993,7 @@ function buildRuntimeMetadata(storagePath) {
66992
66993
  var fs22 = __toESM(require("fs"), 1);
66993
66994
  var nodePath2 = __toESM(require("path"), 1);
66994
66995
  var import_node_child_process13 = require("child_process");
66996
+ var RUNTIME_UPDATE_CHECK_INTERVAL_MS = 6 * 60 * 60 * 1e3;
66995
66997
  function resolveRuntimeRestartStartArgs(hydratedArgs, restartArgs) {
66996
66998
  return restartArgs ? { ...restartArgs } : hydratedArgs;
66997
66999
  }
@@ -67074,12 +67076,6 @@ async function waitForEndpointDown() {
67074
67076
  process.exit(1);
67075
67077
  });
67076
67078
  `;
67077
- function formatLocalDate3(date3) {
67078
- const year = date3.getFullYear();
67079
- const month = String(date3.getMonth() + 1).padStart(2, "0");
67080
- const day = String(date3.getDate()).padStart(2, "0");
67081
- return `${year}-${month}-${day}`;
67082
- }
67083
67079
  function normalizeOutput2(output) {
67084
67080
  if (!output) return null;
67085
67081
  const firstLine = output.split(/\r?\n/).map((line) => line.trim()).find(Boolean);
@@ -67268,18 +67264,18 @@ function createRuntimeUpdateSnapshot(options) {
67268
67264
  };
67269
67265
  }
67270
67266
  const cache = options.updateCache ?? runtimeUpdateCache;
67271
- const checkedOn = formatLocalDate3(now);
67267
+ const nowMs = now.getTime();
67272
67268
  const cached2 = cache.get(packageName);
67273
67269
  let latestVersion = cached2?.latestVersion ?? null;
67274
67270
  let detail = cached2?.detail ?? null;
67275
67271
  let updateCheckedAt = cached2?.checkedAt ?? checkedAt;
67276
- if (cached2?.checkedOn !== checkedOn) {
67272
+ if (!cached2 || nowMs - cached2.checkedAtMs >= RUNTIME_UPDATE_CHECK_INTERVAL_MS) {
67277
67273
  const runner = options.commandRunner ?? runRuntimePackageCommand;
67278
67274
  const result = runner("npm", ["view", `${packageName}@latest`, "version", "--json"]);
67279
67275
  latestVersion = result.status === 0 ? normalizePackageVersion2(result.stdout) : null;
67280
67276
  detail = result.status === 0 ? null : normalizeOutput2(result.stderr) ?? result.error ?? "Runtime update check failed";
67281
67277
  updateCheckedAt = checkedAt;
67282
- cache.set(packageName, { checkedOn, checkedAt, latestVersion, detail });
67278
+ cache.set(packageName, { checkedAt, checkedAtMs: nowMs, latestVersion, detail });
67283
67279
  }
67284
67280
  return {
67285
67281
  packageName,
@@ -67857,11 +67853,12 @@ async function startNode(args) {
67857
67853
  } else {
67858
67854
  setRequestAuthHeadersProvider(null);
67859
67855
  }
67856
+ const runtimeRestartMode = detectRuntimeRestartMode();
67860
67857
  const settingsSnapshotProvider = createSettingsSnapshotProvider({
67861
67858
  authMetadata,
67862
67859
  localDashboardOrigin,
67863
67860
  runtimeMetadata,
67864
- runtimeRestartMode: detectRuntimeRestartMode(),
67861
+ runtimeRestartMode,
67865
67862
  storagePath: config2.storage.path,
67866
67863
  workDir: nodePath3.resolve(config2.node.workDir ?? process.cwd())
67867
67864
  });
@@ -67985,8 +67982,8 @@ async function startNode(args) {
67985
67982
  return { ok: true, pid };
67986
67983
  },
67987
67984
  refreshSettingsSnapshot,
67988
- runtimeUpdate: createRuntimeUpdateSnapshot({
67989
- mode: detectRuntimeRestartMode(),
67985
+ getRuntimeUpdate: () => createRuntimeUpdateSnapshot({
67986
+ mode: runtimeRestartMode,
67990
67987
  runtimeMetadata
67991
67988
  }),
67992
67989
  dashboardOrigin: tunnelManager.getDashboardOrigin(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meshy-node",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
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.7",
3
+ "packageVersion": "0.5.8",
4
4
  "packages": {
5
5
  "workspace": {
6
6
  "name": "meshy",
7
- "version": "0.5.7"
7
+ "version": "0.5.8"
8
8
  },
9
9
  "node": {
10
10
  "name": "meshy-node",
11
- "version": "0.5.7"
11
+ "version": "0.5.8"
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": "DevBoxAlwaysOnline",
29
- "commit": "9635e1a"
28
+ "branch": "RestartOpt",
29
+ "commit": "160a1d3"
30
30
  }
31
31
  }