magector 1.2.5 → 1.2.6
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/cli.js +7 -5
- package/src/init.js +7 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magector",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "Semantic code search for Magento 2 — index, search, MCP server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/mcp-server.js",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"ruvector": "^0.1.96"
|
|
32
32
|
},
|
|
33
33
|
"optionalDependencies": {
|
|
34
|
-
"@magector/cli-darwin-arm64": "1.2.
|
|
35
|
-
"@magector/cli-linux-x64": "1.2.
|
|
36
|
-
"@magector/cli-linux-arm64": "1.2.
|
|
37
|
-
"@magector/cli-win32-x64": "1.2.
|
|
34
|
+
"@magector/cli-darwin-arm64": "1.2.6",
|
|
35
|
+
"@magector/cli-linux-x64": "1.2.6",
|
|
36
|
+
"@magector/cli-linux-arm64": "1.2.6",
|
|
37
|
+
"@magector/cli-win32-x64": "1.2.6"
|
|
38
38
|
},
|
|
39
39
|
"keywords": [
|
|
40
40
|
"magento",
|
package/src/cli.js
CHANGED
|
@@ -77,17 +77,19 @@ async function runIndex(targetPath) {
|
|
|
77
77
|
console.log(`Database: ${path.resolve(config.dbPath)}\n`);
|
|
78
78
|
|
|
79
79
|
try {
|
|
80
|
-
|
|
80
|
+
execFileSync(binary, [
|
|
81
81
|
'index',
|
|
82
82
|
'-m', path.resolve(root),
|
|
83
83
|
'-d', path.resolve(config.dbPath),
|
|
84
84
|
'-c', modelPath
|
|
85
|
-
], {
|
|
86
|
-
if (output.trim()) console.log(output.trim());
|
|
85
|
+
], { timeout: 600000, stdio: 'inherit' });
|
|
87
86
|
console.log('\nIndexing complete.');
|
|
88
87
|
} catch (err) {
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
if (err.status) {
|
|
89
|
+
console.error('Indexing failed.');
|
|
90
|
+
process.exit(err.status);
|
|
91
|
+
}
|
|
92
|
+
console.error(`Indexing error: ${err.message}`);
|
|
91
93
|
process.exit(1);
|
|
92
94
|
}
|
|
93
95
|
}
|
package/src/init.js
CHANGED
|
@@ -199,18 +199,18 @@ export async function init(projectPath) {
|
|
|
199
199
|
console.log('\nIndexing codebase...');
|
|
200
200
|
const startTime = Date.now();
|
|
201
201
|
try {
|
|
202
|
-
|
|
202
|
+
execFileSync(binary, [
|
|
203
203
|
'index',
|
|
204
204
|
'-m', projectPath,
|
|
205
205
|
'-d', dbPath,
|
|
206
206
|
'-c', modelPath
|
|
207
|
-
], {
|
|
208
|
-
if (output.trim()) {
|
|
209
|
-
console.log(output.trim().split('\n').map(l => ` ${l}`).join('\n'));
|
|
210
|
-
}
|
|
207
|
+
], { timeout: 600000, stdio: 'inherit' });
|
|
211
208
|
} catch (err) {
|
|
212
|
-
|
|
213
|
-
|
|
209
|
+
if (err.status) {
|
|
210
|
+
console.error('Indexing failed.');
|
|
211
|
+
process.exit(err.status);
|
|
212
|
+
}
|
|
213
|
+
console.error(`Indexing error: ${err.message}`);
|
|
214
214
|
process.exit(1);
|
|
215
215
|
}
|
|
216
216
|
const elapsed = ((Date.now() - startTime) / 1000).toFixed(1);
|