@khanglvm/tool-hub-mcp 1.1.4 → 1.1.5
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 +6 -6
- package/postinstall.js +10 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanglvm/tool-hub-mcp",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "Serverless MCP Aggregator - Reduce AI context token consumption by 38%",
|
|
5
5
|
"bin": {
|
|
6
6
|
"tool-hub-mcp": "./cli.js"
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"postinstall": "node postinstall.js"
|
|
15
15
|
},
|
|
16
16
|
"optionalDependencies": {
|
|
17
|
-
"@khanglvm/tool-hub-mcp-darwin-arm64": "1.1.
|
|
18
|
-
"@khanglvm/tool-hub-mcp-darwin-x64": "1.1.
|
|
19
|
-
"@khanglvm/tool-hub-mcp-linux-x64": "1.1.
|
|
20
|
-
"@khanglvm/tool-hub-mcp-linux-arm64": "1.1.
|
|
21
|
-
"@khanglvm/tool-hub-mcp-win32-x64": "1.1.
|
|
17
|
+
"@khanglvm/tool-hub-mcp-darwin-arm64": "1.1.5",
|
|
18
|
+
"@khanglvm/tool-hub-mcp-darwin-x64": "1.1.5",
|
|
19
|
+
"@khanglvm/tool-hub-mcp-linux-x64": "1.1.5",
|
|
20
|
+
"@khanglvm/tool-hub-mcp-linux-arm64": "1.1.5",
|
|
21
|
+
"@khanglvm/tool-hub-mcp-win32-x64": "1.1.5"
|
|
22
22
|
},
|
|
23
23
|
"keywords": [
|
|
24
24
|
"mcp",
|
package/postinstall.js
CHANGED
|
@@ -200,33 +200,23 @@ async function main() {
|
|
|
200
200
|
* Create .bin symlink for the CLI wrapper.
|
|
201
201
|
* This is needed because npm sometimes doesn't create symlinks properly
|
|
202
202
|
* when packages are installed via npx or when optionalDependencies are used.
|
|
203
|
+
*
|
|
204
|
+
* __dirname is: node_modules/@khanglvm/tool-hub-mcp/
|
|
205
|
+
* We need to create: node_modules/.bin/tool-hub-mcp
|
|
206
|
+
* So we need: ../../.bin from __dirname
|
|
203
207
|
*/
|
|
204
208
|
function createBinSymlink(binaryName) {
|
|
205
209
|
try {
|
|
206
210
|
const fs = require('fs');
|
|
207
211
|
const path = require('path');
|
|
208
212
|
|
|
209
|
-
//
|
|
210
|
-
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
for (const dir of searchLevels) {
|
|
214
|
-
const testPath = path.join(__dirname, dir);
|
|
215
|
-
// Check if path exists or if we can create it
|
|
216
|
-
const parentDir = path.dirname(testPath);
|
|
217
|
-
if (fs.existsSync(parentDir)) {
|
|
218
|
-
// Create .bin directory if it doesn't exist
|
|
219
|
-
if (!fs.existsSync(testPath)) {
|
|
220
|
-
fs.mkdirSync(testPath, { recursive: true });
|
|
221
|
-
}
|
|
222
|
-
binDir = testPath;
|
|
223
|
-
break;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
213
|
+
// __dirname = node_modules/@khanglvm/tool-hub-mcp/
|
|
214
|
+
// We need: node_modules/.bin/ = ../../.bin
|
|
215
|
+
const binDir = path.join(__dirname, '../../.bin');
|
|
226
216
|
|
|
227
|
-
if
|
|
228
|
-
|
|
229
|
-
|
|
217
|
+
// Create .bin directory if it doesn't exist
|
|
218
|
+
if (!fs.existsSync(binDir)) {
|
|
219
|
+
fs.mkdirSync(binDir, { recursive: true });
|
|
230
220
|
}
|
|
231
221
|
|
|
232
222
|
const linkPath = path.join(binDir, binaryName);
|