@nicmeriano/spool-server 0.0.2 → 0.0.3
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 +0 -7
- package/dist/bin.js.map +1 -1
- package/dist/index.js +0 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -70,8 +70,6 @@ import { createRequire } from "module";
|
|
|
70
70
|
// src/orchestrator/routes/events.ts
|
|
71
71
|
import { Hono } from "hono";
|
|
72
72
|
import { streamSSE } from "hono/streaming";
|
|
73
|
-
import { execFile } from "child_process";
|
|
74
|
-
import { platform } from "os";
|
|
75
73
|
var sseClients = /* @__PURE__ */ new Map();
|
|
76
74
|
var clientIdCounter = 0;
|
|
77
75
|
function broadcast(message) {
|
|
@@ -126,11 +124,6 @@ function createEventsRoutes(ctx) {
|
|
|
126
124
|
app.post("/app-url", async (c) => {
|
|
127
125
|
const body = await c.req.json();
|
|
128
126
|
console.error(`[spool] Received app URL: ${body.url}`);
|
|
129
|
-
const host = c.req.header("host") || "localhost:3142";
|
|
130
|
-
const shellUrl = `http://${host}`;
|
|
131
|
-
console.error(`[spool] Opening ${shellUrl}`);
|
|
132
|
-
const cmd = platform() === "darwin" ? "open" : platform() === "win32" ? "start" : "xdg-open";
|
|
133
|
-
execFile(cmd, [shellUrl]);
|
|
134
127
|
let state = ctx.getState();
|
|
135
128
|
state = { ...state, appUrl: body.url };
|
|
136
129
|
ctx.setState(state);
|