meshy-node 0.2.5 → 0.2.6

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # meshy-node
2
2
 
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
 
5
5
  This package contains the built Meshy standalone node runtime only.
6
6
  It intentionally excludes repository source files and TypeScript sources.
package/main.cjs CHANGED
@@ -44140,7 +44140,6 @@ async function handleTaskMessage(deps, message) {
44140
44140
 
44141
44141
  // ../../packages/api/src/routes/tasks.ts
44142
44142
  var import_express7 = __toESM(require_express2(), 1);
44143
- var import_node_crypto7 = require("crypto");
44144
44143
 
44145
44144
  // ../../packages/api/src/tasks/task-remote-cancellation.ts
44146
44145
  async function cancelRemoteTaskExecution(deps) {
@@ -44813,8 +44812,9 @@ function createTaskRoutes() {
44813
44812
  throw new MeshyError("VALIDATION_ERROR", "Share tunnel is not available", 503);
44814
44813
  }
44815
44814
  const shareOrigin = await ensureShareTunnel();
44815
+ const shareId = task.id;
44816
44816
  const existing = taskEngine.getTaskShareByTaskId(task.id);
44817
- if (existing) {
44817
+ if (existing?.id === shareId) {
44818
44818
  const updated = taskEngine.updateTaskShare(existing.id, {
44819
44819
  tenant: body.tenant,
44820
44820
  scope: body.scope
@@ -44822,14 +44822,17 @@ function createTaskRoutes() {
44822
44822
  res.json({ shareId: updated.id, tenant: updated.tenant, scope: updated.scope, url: buildShareUrl(shareOrigin, updated.id) });
44823
44823
  return;
44824
44824
  }
44825
+ if (existing) {
44826
+ taskEngine.updateTaskShare(existing.id, { revokedAt: Date.now() });
44827
+ }
44825
44828
  const share = taskEngine.createTaskShare({
44826
- id: (0, import_node_crypto7.randomUUID)(),
44829
+ id: shareId,
44827
44830
  taskId: task.id,
44828
44831
  tenant: body.tenant,
44829
44832
  scope: body.scope,
44830
44833
  createdAt: Date.now()
44831
44834
  });
44832
- res.status(201).json({ shareId: share.id, tenant: share.tenant, scope: share.scope, url: buildShareUrl(shareOrigin, share.id) });
44835
+ res.status(existing ? 200 : 201).json({ shareId: share.id, tenant: share.tenant, scope: share.scope, url: buildShareUrl(shareOrigin, share.id) });
44833
44836
  }));
44834
44837
  router.delete("/:id/share", asyncHandler6(async (req, res) => {
44835
44838
  const { taskEngine } = req.app.locals.deps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meshy-node",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
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.2.5",
3
+ "packageVersion": "0.2.6",
4
4
  "packages": {
5
5
  "workspace": {
6
6
  "name": "meshy",
7
- "version": "0.2.5"
7
+ "version": "0.2.6"
8
8
  },
9
9
  "node": {
10
10
  "name": "meshy-node",
11
- "version": "0.2.5"
11
+ "version": "0.2.6"
12
12
  },
13
13
  "core": {
14
14
  "name": "@meshy/core",
@@ -26,6 +26,6 @@
26
26
  "repository": {
27
27
  "url": "https://github.com/penwa_microsoft/meshy",
28
28
  "branch": "shareChat",
29
- "commit": "b60443c"
29
+ "commit": "3fef626"
30
30
  }
31
31
  }