magector 2.2.1 → 2.2.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 +5 -5
- package/src/mcp-server.js +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magector",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "Semantic code search for Magento 2 — index, search, MCP server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/mcp-server.js",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"ruvector": "^0.1.96"
|
|
40
40
|
},
|
|
41
41
|
"optionalDependencies": {
|
|
42
|
-
"@magector/cli-darwin-arm64": "2.2.
|
|
43
|
-
"@magector/cli-linux-x64": "2.2.
|
|
44
|
-
"@magector/cli-linux-arm64": "2.2.
|
|
45
|
-
"@magector/cli-win32-x64": "2.2.
|
|
42
|
+
"@magector/cli-darwin-arm64": "2.2.2",
|
|
43
|
+
"@magector/cli-linux-x64": "2.2.2",
|
|
44
|
+
"@magector/cli-linux-arm64": "2.2.2",
|
|
45
|
+
"@magector/cli-win32-x64": "2.2.2"
|
|
46
46
|
},
|
|
47
47
|
"keywords": [
|
|
48
48
|
"magento",
|
package/src/mcp-server.js
CHANGED
|
@@ -3525,6 +3525,17 @@ process.on('SIGTERM', () => { cleanup('SIGTERM'); process.exit(0); });
|
|
|
3525
3525
|
process.on('SIGINT', () => { cleanup('SIGINT'); process.exit(0); });
|
|
3526
3526
|
process.on('SIGHUP', () => { cleanup('SIGHUP'); process.exit(0); });
|
|
3527
3527
|
|
|
3528
|
+
// Exit when parent (Claude Code) closes stdin — prevents orphaned processes
|
|
3529
|
+
process.stdin.on('end', () => {
|
|
3530
|
+
logToFile('INFO', 'stdin closed (parent disconnected) — shutting down');
|
|
3531
|
+
cleanup('stdin end');
|
|
3532
|
+
process.exit(0);
|
|
3533
|
+
});
|
|
3534
|
+
process.stdin.on('error', () => {
|
|
3535
|
+
cleanup('stdin error');
|
|
3536
|
+
process.exit(0);
|
|
3537
|
+
});
|
|
3538
|
+
|
|
3528
3539
|
main().catch((err) => {
|
|
3529
3540
|
logToFile('FATAL', `Startup failed: ${err.message}\n${err.stack}`);
|
|
3530
3541
|
console.error(err);
|