hjworktree-cli 2.4.0 → 2.5.0
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/.context-snapshots/context-snapshot-20250107-221530.md +95 -0
- package/README.md +21 -0
- package/bin/cli.js +64 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +10 -0
- package/dist/server/index.js.map +1 -1
- package/dist/shared/constants.d.ts +2 -1
- package/dist/shared/constants.d.ts.map +1 -1
- package/dist/shared/constants.js +2 -1
- package/dist/shared/constants.js.map +1 -1
- package/dist/web/assets/{index-D-hASqdI.js → index-Jm7djWxU.js} +2 -2
- package/dist/web/assets/{index-D-hASqdI.js.map → index-Jm7djWxU.js.map} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +2 -1
- package/server/index.ts +11 -0
- package/shared/constants.ts +2 -1
package/dist/web/index.html
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
9
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
|
10
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-Jm7djWxU.js"></script>
|
|
11
11
|
<link rel="stylesheet" crossorigin href="/assets/index-Dgl6wRHk.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hjworktree-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Web-based git worktree parallel AI coding agent runner",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/server/index.js",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"cors": "^2.8.5",
|
|
40
40
|
"express": "^4.21.0",
|
|
41
|
+
"get-port": "^7.1.0",
|
|
41
42
|
"node-pty": "^1.1.0",
|
|
42
43
|
"open": "^10.1.0",
|
|
43
44
|
"simple-git": "^3.27.0",
|
package/server/index.ts
CHANGED
|
@@ -55,6 +55,17 @@ process.on('SIGTERM', () => {
|
|
|
55
55
|
process.exit(0);
|
|
56
56
|
});
|
|
57
57
|
|
|
58
|
+
// Handle port in use error (race condition protection)
|
|
59
|
+
httpServer.on('error', (error: NodeJS.ErrnoException) => {
|
|
60
|
+
if (error.code === 'EADDRINUSE') {
|
|
61
|
+
console.error(`\nError: Port ${PORT} is already in use.`);
|
|
62
|
+
console.error('This may happen if another process started using the port just now.');
|
|
63
|
+
console.error('Please try again or specify a different port: PORT=4000 hjWorktree');
|
|
64
|
+
process.exit(1);
|
|
65
|
+
}
|
|
66
|
+
throw error;
|
|
67
|
+
});
|
|
68
|
+
|
|
58
69
|
// Start server
|
|
59
70
|
httpServer.listen(PORT, () => {
|
|
60
71
|
console.log(`
|
package/shared/constants.ts
CHANGED
|
@@ -5,5 +5,6 @@ export const DEFAULT_PARALLEL_COUNT = 3;
|
|
|
5
5
|
export const BRANCH_POLL_INTERVAL = 5000; // 5 seconds
|
|
6
6
|
|
|
7
7
|
export const APP_NAME = 'hjWorktree CLI';
|
|
8
|
-
export const APP_VERSION = '2.
|
|
8
|
+
export const APP_VERSION = '2.5.0';
|
|
9
9
|
export const DEFAULT_PORT = 3847;
|
|
10
|
+
export const PORT_RANGE_SIZE = 10; // Will try ports 3847-3856
|