@hmduc16031996/claude-mb-bridge 2.4.4 → 2.4.5

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/index.js CHANGED
@@ -6,7 +6,7 @@ const program = new Command();
6
6
  program
7
7
  .name('claude-mobile-bridge')
8
8
  .description('Bridge Claude Code CLI to mobile via WebView')
9
- .version('2.4.1')
9
+ .version('2.4.5')
10
10
  .option('--token <token>', 'Pairing token from mobile app')
11
11
  .option('--server <url>', 'Backend server URL', 'http://127.0.0.1:3110')
12
12
  .option('--path <path>', 'Working directory', process.cwd())
package/dist/server.js CHANGED
@@ -92,6 +92,12 @@ export function startTerminalServer(port, workingDir, terminalToken, ide = 'clau
92
92
  app.get('/health', (req, res) => {
93
93
  res.json({ status: 'ok' });
94
94
  });
95
+ // Catch-all: serve index.html for any non-API route (SPA fallback)
96
+ app.get('*', (req, res, next) => {
97
+ if (req.path.startsWith('/api/'))
98
+ return next();
99
+ res.sendFile(path.join(publicPath, 'index.html'));
100
+ });
95
101
  // Session Info endpoint (used by frontend to know which IDE it is bridging)
96
102
  app.get('/api/session-info', (req, res) => {
97
103
  res.json({ ide });
@@ -316,7 +322,7 @@ export function startTerminalServer(port, workingDir, terminalToken, ide = 'clau
316
322
  reject(err);
317
323
  }
318
324
  });
319
- server.listen(port, () => {
325
+ server.listen(port, '0.0.0.0', () => {
320
326
  const address = server.address();
321
327
  const actualPort = typeof address === 'string' ? 0 : address?.port || 0;
322
328
  resolve({ server, actualPort });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hmduc16031996/claude-mb-bridge",
3
- "version": "2.4.4",
3
+ "version": "2.4.5",
4
4
  "description": "Bridge between Claude Code CLI and your mobile app via WebView",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",