fluxy-bot 0.2.14 → 0.2.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxy-bot",
3
- "version": "0.2.14",
3
+ "version": "0.2.16",
4
4
  "description": "Self-hosted AI bot — run your own AI assistant from anywhere",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -74,10 +74,13 @@ export async function startSupervisor() {
74
74
  }
75
75
 
76
76
  // Fluxy routes → proxy to fluxy Vite dev server
77
- if (req.url?.startsWith('/fluxy')) {
78
- console.log(`[supervisor] fluxy Vite :${vitePorts.fluxy} | ${req.method} ${req.url}`);
77
+ // Note: must check '/fluxy/' (with slash) to avoid matching '/fluxy_tilts.webm' etc.
78
+ if (req.url === '/fluxy' || req.url?.startsWith('/fluxy/')) {
79
+ // Rewrite bare /fluxy or /fluxy/ to /fluxy/fluxy.html — Vite dev defaults to index.html otherwise
80
+ const proxyPath = (req.url === '/fluxy' || req.url === '/fluxy/') ? '/fluxy/fluxy.html' : req.url;
81
+ console.log(`[supervisor] → fluxy Vite :${vitePorts.fluxy} | ${req.method} ${proxyPath}${proxyPath !== req.url ? ` (rewritten from ${req.url})` : ''}`);
79
82
  const proxy = http.request(
80
- { host: '127.0.0.1', port: vitePorts.fluxy, path: req.url, method: req.method, headers: req.headers },
83
+ { host: '127.0.0.1', port: vitePorts.fluxy, path: proxyPath, method: req.method, headers: req.headers },
81
84
  (proxyRes) => {
82
85
  res.writeHead(proxyRes.statusCode!, proxyRes.headers);
83
86
  proxyRes.pipe(res);
@@ -211,7 +214,7 @@ export async function startSupervisor() {
211
214
  }
212
215
 
213
216
  // Route HMR WebSocket to correct Vite dev server
214
- const isFluxy = req.url?.startsWith('/fluxy');
217
+ const isFluxy = req.url === '/fluxy' || req.url?.startsWith('/fluxy/');
215
218
  const targetPort = isFluxy ? vitePorts.fluxy : vitePorts.dashboard;
216
219
  console.log(`[supervisor] → Vite HMR (${isFluxy ? 'fluxy' : 'dashboard'}) :${targetPort}`);
217
220
 
package/vite.config.ts CHANGED
@@ -18,5 +18,11 @@ export default defineConfig({
18
18
  '/api': 'http://localhost:3000',
19
19
  },
20
20
  },
21
+ optimizeDeps: {
22
+ include: [
23
+ 'use-sync-external-store',
24
+ 'use-sync-external-store/shim',
25
+ ],
26
+ },
21
27
  plugins: [react(), tailwindcss()],
22
28
  });
@@ -16,5 +16,11 @@ export default defineConfig({
16
16
  input: path.resolve(__dirname, 'client/fluxy.html'),
17
17
  },
18
18
  },
19
+ optimizeDeps: {
20
+ include: [
21
+ 'use-sync-external-store',
22
+ 'use-sync-external-store/shim',
23
+ ],
24
+ },
19
25
  plugins: [react(), tailwindcss()],
20
26
  });