idea-manager 1.1.0 → 1.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/package.json +6 -6
- package/src/cli.ts +27 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "idea-manager",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Turn free-form brainstorming into structured task trees with AI-generated prompts. Built-in MCP Server for autonomous AI agent execution. Local-first with SQLite, cross-PC sync via Git.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"brainstorm",
|
|
@@ -57,16 +57,16 @@
|
|
|
57
57
|
"react-markdown": "^10.1.0",
|
|
58
58
|
"remark-gfm": "^4.0.1",
|
|
59
59
|
"sql.js": "^1.14.1",
|
|
60
|
-
"tsx": "^4.21.0"
|
|
61
|
-
},
|
|
62
|
-
"devDependencies": {
|
|
60
|
+
"tsx": "^4.21.0",
|
|
63
61
|
"@tailwindcss/postcss": "^4",
|
|
64
62
|
"@types/node": "^20",
|
|
65
63
|
"@types/react": "^19",
|
|
66
64
|
"@types/react-dom": "^19",
|
|
67
|
-
"eslint": "^9",
|
|
68
|
-
"eslint-config-next": "16.1.6",
|
|
69
65
|
"tailwindcss": "^4",
|
|
70
66
|
"typescript": "^5"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"eslint": "^9",
|
|
70
|
+
"eslint-config-next": "16.1.6"
|
|
71
71
|
}
|
|
72
72
|
}
|
package/src/cli.ts
CHANGED
|
@@ -111,27 +111,46 @@ program
|
|
|
111
111
|
|
|
112
112
|
program
|
|
113
113
|
.command('start')
|
|
114
|
-
.description('Start the web UI
|
|
114
|
+
.description('Start the web UI on port 3456')
|
|
115
115
|
.option('-p, --port <port>', 'Port number', '3456')
|
|
116
116
|
.action(async (opts) => {
|
|
117
117
|
const port = opts.port;
|
|
118
|
-
|
|
119
|
-
console.log(` Starting on http://localhost:${port}\n`);
|
|
118
|
+
const fs = await import('fs');
|
|
120
119
|
|
|
121
|
-
// Resolve next CLI
|
|
122
|
-
// and npm global install hoisting issues
|
|
120
|
+
// Resolve next CLI
|
|
123
121
|
let nextCli: string;
|
|
124
122
|
try {
|
|
125
123
|
nextCli = require.resolve('next/dist/bin/next', { paths: [PKG_ROOT] });
|
|
126
124
|
} catch {
|
|
127
|
-
// Fallback: try to find next package manually
|
|
128
125
|
nextCli = path.join(PKG_ROOT, 'node_modules', 'next', 'dist', 'bin', 'next');
|
|
129
126
|
}
|
|
130
127
|
|
|
131
|
-
|
|
128
|
+
// Build if not already built
|
|
129
|
+
const buildDir = path.join(PKG_ROOT, '.next');
|
|
130
|
+
if (!fs.existsSync(buildDir)) {
|
|
131
|
+
console.log('\n IM - First run: building... (this may take a minute)\n');
|
|
132
|
+
const buildResult = spawn(process.execPath, [nextCli, 'build'], {
|
|
133
|
+
cwd: PKG_ROOT,
|
|
134
|
+
stdio: 'inherit',
|
|
135
|
+
env: { ...process.env, NODE_ENV: 'production' },
|
|
136
|
+
});
|
|
137
|
+
await new Promise<void>((resolve, reject) => {
|
|
138
|
+
buildResult.on('exit', (code) => {
|
|
139
|
+
if (code !== 0) reject(new Error(`Build failed with code ${code}`));
|
|
140
|
+
else resolve();
|
|
141
|
+
});
|
|
142
|
+
buildResult.on('error', reject);
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
console.log(`\n IM - Idea Manager`);
|
|
147
|
+
console.log(` Starting on http://localhost:${port}\n`);
|
|
148
|
+
|
|
149
|
+
// Run production server (next start)
|
|
150
|
+
const child = spawn(process.execPath, [nextCli, 'start', '-p', port], {
|
|
132
151
|
cwd: PKG_ROOT,
|
|
133
152
|
stdio: 'inherit',
|
|
134
|
-
env: { ...process.env, NODE_ENV: '
|
|
153
|
+
env: { ...process.env, NODE_ENV: 'production' },
|
|
135
154
|
});
|
|
136
155
|
|
|
137
156
|
child.on('error', (err) => {
|