gsd-lite 0.2.0 → 0.2.1
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/.mcp.json +5 -3
- package/install.js +14 -2
- package/package.json +1 -1
package/.mcp.json
CHANGED
package/install.js
CHANGED
|
@@ -5,6 +5,7 @@ import { existsSync, mkdirSync, cpSync, readFileSync, writeFileSync, rmSync } fr
|
|
|
5
5
|
import { join, dirname } from 'node:path';
|
|
6
6
|
import { homedir } from 'node:os';
|
|
7
7
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
8
|
+
import { execSync } from 'node:child_process';
|
|
8
9
|
|
|
9
10
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
10
11
|
const CLAUDE_DIR = join(homedir(), '.claude');
|
|
@@ -109,10 +110,21 @@ export function main() {
|
|
|
109
110
|
|
|
110
111
|
// 6. Stable runtime for MCP server
|
|
111
112
|
copyDir(join(__dirname, 'src'), join(RUNTIME_DIR, 'src'), 'runtime/src → ~/.claude/gsd-lite/src/');
|
|
112
|
-
copyDir(join(__dirname, 'node_modules'), join(RUNTIME_DIR, 'node_modules'), 'runtime/node_modules → ~/.claude/gsd-lite/node_modules/');
|
|
113
113
|
copyFile(join(__dirname, 'package.json'), join(RUNTIME_DIR, 'package.json'), 'runtime/package.json → ~/.claude/gsd-lite/package.json');
|
|
114
114
|
|
|
115
|
-
// 7.
|
|
115
|
+
// 7. Runtime dependencies — copy local node_modules or install fresh (npx hoists deps)
|
|
116
|
+
const localNM = join(__dirname, 'node_modules');
|
|
117
|
+
if (existsSync(localNM)) {
|
|
118
|
+
copyDir(localNM, join(RUNTIME_DIR, 'node_modules'), 'runtime/node_modules (copied)');
|
|
119
|
+
} else if (!DRY_RUN) {
|
|
120
|
+
log(' ⧗ Installing runtime dependencies...');
|
|
121
|
+
execSync('npm install --omit=dev', { cwd: RUNTIME_DIR, stdio: 'pipe' });
|
|
122
|
+
log(' ✓ runtime dependencies installed');
|
|
123
|
+
} else {
|
|
124
|
+
log(' [dry-run] Would install runtime dependencies');
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// 8. Register MCP server in settings.json
|
|
116
128
|
const settingsPath = join(CLAUDE_DIR, 'settings.json');
|
|
117
129
|
if (!DRY_RUN) {
|
|
118
130
|
let settings = {};
|