claude-code-inspector 0.1.1 → 0.1.2
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 +4 -0
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
const path = require('path');
|
|
3
4
|
const { createServer } = require('http');
|
|
4
5
|
const next = require('next');
|
|
5
6
|
const { WebSocketServer } = require('ws');
|
|
6
7
|
const { parse } = require('url');
|
|
7
8
|
|
|
9
|
+
// 切换到包的安装目录,确保 Next.js 能正确找到文件
|
|
10
|
+
process.chdir(path.resolve(__dirname, '..'));
|
|
11
|
+
|
|
8
12
|
const port = parseInt(process.env.PORT || '3000', 10);
|
|
9
13
|
const dev = process.env.NODE_ENV !== 'production';
|
|
10
14
|
|