claude-mem-lite 2.53.1 → 2.53.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
CHANGED
|
@@ -34,6 +34,12 @@ export function detectMissingImports(installRoot) {
|
|
|
34
34
|
return ['server.mjs'];
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
// Strip line + block comments so example strings in docblocks (e.g. the very
|
|
38
|
+
// patterns this regex enumerates) can't false-fire as "missing files".
|
|
39
|
+
src = src
|
|
40
|
+
.replace(/\/\*[\s\S]*?\*\//g, '')
|
|
41
|
+
.replace(/(^|\s)\/\/[^\n]*/g, '$1');
|
|
42
|
+
|
|
37
43
|
const missing = new Set();
|
|
38
44
|
for (const re of [FROM_RE, IMPORT_RE]) {
|
|
39
45
|
re.lastIndex = 0;
|
package/scripts/launch.mjs
CHANGED
|
@@ -12,12 +12,22 @@ const ROOT = process.env.CLAUDE_PLUGIN_ROOT || join(__dirname, '..');
|
|
|
12
12
|
|
|
13
13
|
if (!existsSync(join(ROOT, 'node_modules', 'better-sqlite3'))) {
|
|
14
14
|
process.stderr.write('[claude-mem-lite] Installing dependencies...\n');
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
try {
|
|
16
|
+
execSync('npm install --omit=dev', {
|
|
17
|
+
cwd: ROOT,
|
|
18
|
+
stdio: ['ignore', 'pipe', 'inherit'], // stdout piped (discard), stderr inherit
|
|
19
|
+
timeout: 120_000,
|
|
20
|
+
});
|
|
21
|
+
process.stderr.write('[claude-mem-lite] Dependencies installed\n');
|
|
22
|
+
} catch (e) {
|
|
23
|
+
// Plugin-cache / multi-user / disk-full installs can fail here. Without this
|
|
24
|
+
// catch the user sees a Node stack trace; with it they get an actionable line.
|
|
25
|
+
const detail = e.message?.split('\n')[0] || e.code || 'unknown error';
|
|
26
|
+
process.stderr.write(`[claude-mem-lite] npm install failed in ${ROOT} — ${detail}\n`);
|
|
27
|
+
process.stderr.write(`[claude-mem-lite] Likely cause: read-only directory, disk full, or network blocked.\n`);
|
|
28
|
+
process.stderr.write(`[claude-mem-lite] Repair: cd "${ROOT}" && npm install --omit=dev\n`);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
21
31
|
}
|
|
22
32
|
|
|
23
33
|
// Verify MCP SDK is importable (exports mapping intact).
|