lsp-intelligence 0.3.2 → 0.3.3
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lsp-intelligence",
|
|
3
3
|
"description": "Local code intelligence for TypeScript/JavaScript — Find code, explain failures, guard API contracts, simulate changes.",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.3",
|
|
5
5
|
"mcpServers": {
|
|
6
6
|
"lsp-intelligence": {
|
|
7
7
|
"command": "node",
|
package/hooks/hooks.json
CHANGED
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
"hooks": [
|
|
6
6
|
{
|
|
7
7
|
"type": "command",
|
|
8
|
-
"command": "node -e \"const v
|
|
8
|
+
"command": "node -e \"const v=process.version.slice(1).split('.').map(Number);if(v[0]<20){console.error('lsp-intelligence requires Node 20+, found '+process.version);process.exit(1)}\""
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"type": "command",
|
|
12
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/ensure-deps.mjs\""
|
|
9
13
|
}
|
|
10
14
|
]
|
|
11
15
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Ensure the plugin's npm dependencies are installed.
|
|
4
|
+
*
|
|
5
|
+
* Claude Code extracts the npm tarball but does not run `npm install`
|
|
6
|
+
* for the package's dependencies. This script fills that gap — it runs
|
|
7
|
+
* once on first SessionStart and is a no-op on every subsequent start.
|
|
8
|
+
*
|
|
9
|
+
* Marker: node_modules/@modelcontextprotocol (core dep, always present
|
|
10
|
+
* after a successful install).
|
|
11
|
+
*/
|
|
12
|
+
import { existsSync } from 'fs';
|
|
13
|
+
import { join, dirname } from 'path';
|
|
14
|
+
import { fileURLToPath } from 'url';
|
|
15
|
+
import { execSync } from 'child_process';
|
|
16
|
+
|
|
17
|
+
const pluginRoot = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
18
|
+
const marker = join(pluginRoot, 'node_modules', '@modelcontextprotocol');
|
|
19
|
+
|
|
20
|
+
if (!existsSync(marker)) {
|
|
21
|
+
console.error('[lsp-intelligence] Installing dependencies (first run)...');
|
|
22
|
+
execSync('npm install --ignore-scripts', { cwd: pluginRoot, stdio: 'inherit' });
|
|
23
|
+
console.error('[lsp-intelligence] Dependencies ready.');
|
|
24
|
+
}
|