jettypod 4.4.25 → 4.4.27

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/jettypod.js +38 -10
  2. package/package.json +1 -1
package/jettypod.js CHANGED
@@ -146,6 +146,26 @@ function ensureJettypodGitignores() {
146
146
  // File not tracked or git error - that's fine
147
147
  }
148
148
  }
149
+
150
+ // Untrack .jettypod/ directory if it's currently tracked
151
+ // This is critical for worktrees - tracked .jettypod causes "deleted" file issues
152
+ try {
153
+ const { execSync } = require('child_process');
154
+ // Check if any files in .jettypod are tracked
155
+ const trackedFiles = execSync('git ls-files .jettypod/', {
156
+ encoding: 'utf-8',
157
+ stdio: ['pipe', 'pipe', 'pipe']
158
+ }).trim();
159
+
160
+ if (trackedFiles) {
161
+ // Files are tracked - untrack the entire directory
162
+ execSync('git rm -r --cached .jettypod/', { stdio: 'pipe' });
163
+ console.log('📝 Untracked .jettypod/ directory (now gitignored)');
164
+ console.log(' Run: git commit -m "Stop tracking .jettypod"');
165
+ }
166
+ } catch (e) {
167
+ // Directory not tracked or git error - that's fine
168
+ }
149
169
  }
150
170
 
151
171
  // CLAUDE.md generation
@@ -1953,7 +1973,7 @@ switch (command) {
1953
1973
 
1954
1974
  // Launch dashboard
1955
1975
  const dashboardPath = path.join(__dirname, 'apps', 'dashboard');
1956
- const DASHBOARD_PORT = 3456;
1976
+ const BASE_PORT = 3456;
1957
1977
  const { spawn, exec } = require('child_process');
1958
1978
 
1959
1979
  // Check if a port is available
@@ -1968,12 +1988,23 @@ switch (command) {
1968
1988
  server.listen(port);
1969
1989
  });
1970
1990
 
1971
- const portAvailable = await isPortAvailable(DASHBOARD_PORT);
1991
+ // Find an available port starting from BASE_PORT
1992
+ const findAvailablePort = async (startPort, maxAttempts = 10) => {
1993
+ for (let i = 0; i < maxAttempts; i++) {
1994
+ const port = startPort + i;
1995
+ if (await isPortAvailable(port)) {
1996
+ return port;
1997
+ }
1998
+ }
1999
+ return null;
2000
+ };
2001
+
2002
+ const availablePort = await findAvailablePort(BASE_PORT);
1972
2003
 
1973
- if (portAvailable) {
2004
+ if (availablePort) {
1974
2005
  // Start dashboard in background with project path
1975
2006
  console.log('🚀 Starting dashboard...');
1976
- const dashboardProcess = spawn('npm', ['run', 'dev', '--', '-p', String(DASHBOARD_PORT)], {
2007
+ const dashboardProcess = spawn('npm', ['run', 'dev', '--', '-p', String(availablePort)], {
1977
2008
  cwd: dashboardPath,
1978
2009
  detached: true,
1979
2010
  stdio: 'ignore',
@@ -1988,14 +2019,11 @@ switch (command) {
1988
2019
  setTimeout(() => {
1989
2020
  const openCmd = process.platform === 'darwin' ? 'open' :
1990
2021
  process.platform === 'win32' ? 'start' : 'xdg-open';
1991
- exec(`${openCmd} http://localhost:${DASHBOARD_PORT}`);
2022
+ exec(`${openCmd} http://localhost:${availablePort}`);
1992
2023
  }, 2000);
1993
2024
  } else {
1994
- // Dashboard likely already running, just open browser
1995
- console.log('📊 Dashboard running');
1996
- const openCmd = process.platform === 'darwin' ? 'open' :
1997
- process.platform === 'win32' ? 'start' : 'xdg-open';
1998
- exec(`${openCmd} http://localhost:${DASHBOARD_PORT}`);
2025
+ // No ports available in range
2026
+ console.log('⚠️ Could not find available port for dashboard (tried ports 3456-3465)');
1999
2027
  }
2000
2028
 
2001
2029
  const discovery = currentConfig.project_discovery;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jettypod",
3
- "version": "4.4.25",
3
+ "version": "4.4.27",
4
4
  "description": "AI-powered development workflow manager with TDD, BDD, and automatic test generation",
5
5
  "main": "jettypod.js",
6
6
  "bin": {