@nicmeriano/spool-server 0.0.4 → 0.0.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/dist/bin.js CHANGED
@@ -59,8 +59,6 @@ function updateAnnotationInState(state, annotationId, updates) {
59
59
  // src/orchestrator/routes/events.ts
60
60
  import { Hono } from "hono";
61
61
  import { streamSSE } from "hono/streaming";
62
- import { execFile } from "child_process";
63
- import { platform } from "os";
64
62
  var sseClients = /* @__PURE__ */ new Map();
65
63
  var clientIdCounter = 0;
66
64
  function broadcast(message) {
@@ -115,13 +113,6 @@ function createEventsRoutes(ctx) {
115
113
  app.post("/app-url", async (c) => {
116
114
  const body = await c.req.json();
117
115
  console.error(`[spool] Received app URL: ${body.url}`);
118
- if (!ctx.noOpen) {
119
- const host = c.req.header("host") || "localhost:3142";
120
- const shellUrl = `http://${host}`;
121
- console.error(`[spool] Opening ${shellUrl}`);
122
- const cmd = platform() === "darwin" ? "open" : platform() === "win32" ? "start" : "xdg-open";
123
- execFile(cmd, [shellUrl]);
124
- }
125
116
  let state = ctx.getState();
126
117
  state = { ...state, appUrl: body.url };
127
118
  ctx.setState(state);
@@ -2052,7 +2043,7 @@ async function startServer(options = {}) {
2052
2043
  }
2053
2044
  }
2054
2045
  }));
2055
- app.route("/api", createEventsRoutes({ ...routeCtx, noOpen: options.noOpen ?? false }));
2046
+ app.route("/api", createEventsRoutes(routeCtx));
2056
2047
  app.route("/api/annotations", createAnnotationsRoutes(routeCtx));
2057
2048
  app.route("/api/changes", createChangesRoutes(routeCtx));
2058
2049
  app.route("/api/tasks", createTasksRoutes(routeCtx));