fluxy-bot 0.5.38 → 0.5.39

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/bin/cli.js CHANGED
@@ -69,8 +69,9 @@ ExecStart=${nodePath} --import tsx/esm ${dataDir}/supervisor/index.ts
69
69
  Restart=on-failure
70
70
  RestartSec=5
71
71
  Environment=HOME=${home}
72
- Environment=NODE_ENV=production
73
- Environment=PATH=${nodeBinDir}:/usr/local/bin:/usr/bin:/bin
72
+ Environment=NODE_ENV=development
73
+ Environment=NODE_PATH=${dataDir}/node_modules
74
+ Environment=PATH=${nodeBinDir}:${dataDir}/node_modules/.bin:/usr/local/bin:/usr/bin:/bin
74
75
  StandardOutput=journal
75
76
  StandardError=journal
76
77
  SyslogIdentifier=fluxy
@@ -434,7 +435,7 @@ async function init() {
434
435
  if (hasSystemd) {
435
436
  child.removeAllListeners('exit');
436
437
  child.kill('SIGTERM');
437
- await new Promise((r) => setTimeout(r, 2000));
438
+ await new Promise((r) => setTimeout(r, 4000));
438
439
  const nodePath = process.execPath;
439
440
  const realHome = os.homedir();
440
441
  const res = spawnSync(process.execPath, [process.argv[1], 'daemon', 'install'], {
@@ -512,7 +513,7 @@ async function start() {
512
513
  if (needsDaemon) {
513
514
  child.removeAllListeners('exit');
514
515
  child.kill('SIGTERM');
515
- await new Promise((r) => setTimeout(r, 2000));
516
+ await new Promise((r) => setTimeout(r, 4000));
516
517
  const nodePath = process.execPath;
517
518
  const realHome = os.homedir();
518
519
  const res = spawnSync(process.execPath, [process.argv[1], 'daemon', 'install'], {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxy-bot",
3
- "version": "0.5.38",
3
+ "version": "0.5.39",
4
4
  "description": "Self-hosted, self-evolving AI agent with its own dashboard.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -37,6 +37,16 @@ app.use((_req, res) => {
37
37
  res.status(404).json({ error: 'Not found' });
38
38
  });
39
39
 
40
- app.listen(PORT, () => {
40
+ const server = app.listen(PORT, () => {
41
41
  console.log(`[backend] Listening on port ${PORT}`);
42
42
  });
43
+
44
+ server.on('error', (err: NodeJS.ErrnoException) => {
45
+ console.error(`[backend] Server error: ${err.message}`);
46
+ process.exit(1);
47
+ });
48
+
49
+ // Keep process alive — prevent exit on unhandled rejection
50
+ process.on('unhandledRejection', (err) => {
51
+ console.error('[backend] Unhandled rejection:', err);
52
+ });