tlc-claude-code 0.7.4 → 0.7.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server/index.js +12 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tlc-claude-code",
3
- "version": "0.7.4",
3
+ "version": "0.7.5",
4
4
  "description": "TLC - Test Led Coding for Claude Code",
5
5
  "bin": {
6
6
  "tlc-claude-code": "./bin/install.js",
package/server/index.js CHANGED
@@ -283,15 +283,18 @@ app.use('/app', createProxyMiddleware({
283
283
  pathRewrite: { '^/app': '' },
284
284
  ws: true,
285
285
  onError: (err, req, res) => {
286
- res.status(502).send(`
287
- <html>
288
- <body style="font-family: system-ui; padding: 40px; background: #1a1a2e; color: #eee;">
289
- <h2>App not running</h2>
290
- <p>Waiting for app to start on port ${appPort}...</p>
291
- <script>setTimeout(() => location.reload(), 2000)</script>
292
- </body>
293
- </html>
294
- `);
286
+ // WebSocket upgrades don't have res.status
287
+ if (res && typeof res.status === 'function') {
288
+ res.status(502).send(`
289
+ <html>
290
+ <body style="font-family: system-ui; padding: 40px; background: #1a1a2e; color: #eee;">
291
+ <h2>App not running</h2>
292
+ <p>Waiting for app to start on port ${appPort}...</p>
293
+ <script>setTimeout(() => location.reload(), 2000)</script>
294
+ </body>
295
+ </html>
296
+ `);
297
+ }
295
298
  }
296
299
  }));
297
300