nothumanallowed 14.1.15 → 14.1.16
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/package.json +1 -1
- package/src/constants.mjs +1 -1
- package/src/server/index.mjs +19 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "14.1.
|
|
3
|
+
"version": "14.1.16",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents, 80 tools, Studio (visual agentic workflows). Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, Alexandria E2E messaging, GitHub, Notion, Slack, voice chat, free AI (Liara), 28 languages. Zero-dependency CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/constants.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'url';
|
|
|
5
5
|
const __filename = fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = path.dirname(__filename);
|
|
7
7
|
|
|
8
|
-
export const VERSION = '14.1.
|
|
8
|
+
export const VERSION = '14.1.16';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
package/src/server/index.mjs
CHANGED
|
@@ -294,8 +294,26 @@ export async function startServer({ port = 3847, host = '127.0.0.1', noBrowser =
|
|
|
294
294
|
const server = http.createServer(handleRequest);
|
|
295
295
|
setupWebSocket(server);
|
|
296
296
|
|
|
297
|
+
// If port is in use, kill the old process and retry once
|
|
297
298
|
await new Promise((resolve, reject) => {
|
|
298
|
-
server.
|
|
299
|
+
server.once('error', async (err) => {
|
|
300
|
+
if (err.code === 'EADDRINUSE') {
|
|
301
|
+
const { execSync } = await import('child_process');
|
|
302
|
+
try {
|
|
303
|
+
// Find and kill the process holding the port
|
|
304
|
+
const pid = execSync(`lsof -ti tcp:${port} 2>/dev/null || true`).toString().trim();
|
|
305
|
+
if (pid) {
|
|
306
|
+
pid.split('\n').forEach((p) => { try { process.kill(parseInt(p), 'SIGTERM'); } catch {} });
|
|
307
|
+
await new Promise((r) => setTimeout(r, 800));
|
|
308
|
+
}
|
|
309
|
+
} catch {}
|
|
310
|
+
// Retry
|
|
311
|
+
server.listen(port, host, (e) => e ? reject(e) : resolve(undefined));
|
|
312
|
+
} else {
|
|
313
|
+
reject(err);
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
server.listen(port, host, () => resolve(undefined));
|
|
299
317
|
});
|
|
300
318
|
|
|
301
319
|
const G = '\x1b[0;32m', NC = '\x1b[0m', D = '\x1b[2m', BOLD = '\x1b[1m';
|