meshy-node 0.4.6 → 0.4.7

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-D2UnB_kx.js";/**
1
+ import{c as a}from"./index-BTOpELYB.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-D2UnB_kx.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-BTOpELYB.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-BOC8nP24.css">
10
10
  </head>
11
11
  <body>
package/main.cjs CHANGED
@@ -33909,6 +33909,10 @@ function isJoinTaskSnapshot(task) {
33909
33909
  function nodeSupportsAgent(node, agent) {
33910
33910
  return !node.supportedAgents || node.supportedAgents.length === 0 || node.supportedAgents.includes(agent);
33911
33911
  }
33912
+ function normalizePaginationBound(value) {
33913
+ if (value === void 0 || !Number.isFinite(value)) return void 0;
33914
+ return Math.max(0, Math.trunc(value));
33915
+ }
33912
33916
  function getPublicTaskUpdates(updates, updatedAt) {
33913
33917
  const publicUpdates = { updatedAt };
33914
33918
  if (updates.title !== void 0) publicUpdates.title = updates.title;
@@ -33987,8 +33991,19 @@ var TaskEngine = class {
33987
33991
  return this.store.getTask(id);
33988
33992
  }
33989
33993
  listTasks(filter) {
33990
- const tasks = this.store.getAllTasks(filter);
33991
- return { tasks, total: tasks.length };
33994
+ const { limit, offset, ...storeFilter } = filter ?? {};
33995
+ const tasks = this.store.getAllTasks(storeFilter);
33996
+ const ordered = [...tasks].sort((left, right) => {
33997
+ const updatedDelta = right.updatedAt - left.updatedAt;
33998
+ if (updatedDelta !== 0) return updatedDelta;
33999
+ const createdDelta = right.createdAt - left.createdAt;
34000
+ if (createdDelta !== 0) return createdDelta;
34001
+ return left.id.localeCompare(right.id);
34002
+ });
34003
+ const normalizedOffset = normalizePaginationBound(offset) ?? 0;
34004
+ const normalizedLimit = normalizePaginationBound(limit);
34005
+ const paged = normalizedLimit === void 0 ? ordered.slice(normalizedOffset) : ordered.slice(normalizedOffset, normalizedOffset + normalizedLimit);
34006
+ return { tasks: paged, total: paged.length };
33992
34007
  }
33993
34008
  importTasks(tasks) {
33994
34009
  let created = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meshy-node",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
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.4.6",
3
+ "packageVersion": "0.4.7",
4
4
  "packages": {
5
5
  "workspace": {
6
6
  "name": "meshy",
7
- "version": "0.4.6"
7
+ "version": "0.4.7"
8
8
  },
9
9
  "node": {
10
10
  "name": "meshy-node",
11
- "version": "0.4.6"
11
+ "version": "0.4.7"
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": "fixNodeJoin",
29
- "commit": "ea67bf5"
28
+ "branch": "fixTaskCount",
29
+ "commit": "ba555ae"
30
30
  }
31
31
  }