jettypod 4.4.13 → 4.4.14
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/jettypod.js +44 -1
- package/package.json +1 -1
package/jettypod.js
CHANGED
|
@@ -1944,10 +1944,53 @@ switch (command) {
|
|
|
1944
1944
|
// New project - auto-initialize
|
|
1945
1945
|
await initializeProject();
|
|
1946
1946
|
} else {
|
|
1947
|
-
// Project exists -
|
|
1947
|
+
// Project exists - launch dashboard and regenerate CLAUDE.md
|
|
1948
1948
|
const currentConfig = config.read();
|
|
1949
1949
|
await generateClaude();
|
|
1950
1950
|
|
|
1951
|
+
// Launch dashboard
|
|
1952
|
+
const dashboardPath = path.join(__dirname, 'apps', 'dashboard');
|
|
1953
|
+
const DASHBOARD_PORT = 3456;
|
|
1954
|
+
const { spawn, exec } = require('child_process');
|
|
1955
|
+
|
|
1956
|
+
// Check if a port is available
|
|
1957
|
+
const isPortAvailable = (port) => new Promise((resolve) => {
|
|
1958
|
+
const net = require('net');
|
|
1959
|
+
const server = net.createServer();
|
|
1960
|
+
server.once('error', () => resolve(false)); // Port in use
|
|
1961
|
+
server.once('listening', () => {
|
|
1962
|
+
server.close();
|
|
1963
|
+
resolve(true); // Port available
|
|
1964
|
+
});
|
|
1965
|
+
server.listen(port);
|
|
1966
|
+
});
|
|
1967
|
+
|
|
1968
|
+
const portAvailable = await isPortAvailable(DASHBOARD_PORT);
|
|
1969
|
+
|
|
1970
|
+
if (portAvailable) {
|
|
1971
|
+
// Start dashboard in background
|
|
1972
|
+
console.log('🚀 Starting dashboard...');
|
|
1973
|
+
const dashboardProcess = spawn('npm', ['run', 'dev', '--', '-p', String(DASHBOARD_PORT)], {
|
|
1974
|
+
cwd: dashboardPath,
|
|
1975
|
+
detached: true,
|
|
1976
|
+
stdio: 'ignore'
|
|
1977
|
+
});
|
|
1978
|
+
dashboardProcess.unref();
|
|
1979
|
+
|
|
1980
|
+
// Wait a moment for server to start, then open browser
|
|
1981
|
+
setTimeout(() => {
|
|
1982
|
+
const openCmd = process.platform === 'darwin' ? 'open' :
|
|
1983
|
+
process.platform === 'win32' ? 'start' : 'xdg-open';
|
|
1984
|
+
exec(`${openCmd} http://localhost:${DASHBOARD_PORT}`);
|
|
1985
|
+
}, 2000);
|
|
1986
|
+
} else {
|
|
1987
|
+
// Dashboard likely already running, just open browser
|
|
1988
|
+
console.log('📊 Dashboard running');
|
|
1989
|
+
const openCmd = process.platform === 'darwin' ? 'open' :
|
|
1990
|
+
process.platform === 'win32' ? 'start' : 'xdg-open';
|
|
1991
|
+
exec(`${openCmd} http://localhost:${DASHBOARD_PORT}`);
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1951
1994
|
const discovery = currentConfig.project_discovery;
|
|
1952
1995
|
|
|
1953
1996
|
if (discovery && discovery.status === 'in_progress') {
|