wotlk-database-mcp 0.0.0 → 0.1.0-rc.4
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/bin/launcher.cjs +27 -0
- package/package.json +22 -3
package/bin/launcher.cjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
const supported = ['darwin-arm64', 'darwin-x64', 'linux-x64', 'linux-arm64', 'win32-x64'];
|
|
4
|
+
const platform = `${process.platform}-${process.arch}`;
|
|
5
|
+
if (!supported.includes(platform)) {
|
|
6
|
+
console.error(`Unsupported platform ${platform}. Supported platforms: ${supported.join(', ')} (Linux requires glibc).`);
|
|
7
|
+
process.exit(1);
|
|
8
|
+
}
|
|
9
|
+
const { spawnSync } = require('node:child_process');
|
|
10
|
+
const binary = `wotlk-database-mcp${process.platform === 'win32' ? '.exe' : ''}`;
|
|
11
|
+
let executable;
|
|
12
|
+
try {
|
|
13
|
+
executable = require.resolve(`wotlk-database-mcp-${platform}/bin/${binary}`);
|
|
14
|
+
} catch (error) {
|
|
15
|
+
console.error(`Cannot find the native binary for ${platform}. Reinstall wotlk-database-mcp with optional dependencies enabled${process.platform === 'linux' ? ' on a glibc-based distribution' : ''}. ${error.message}`);
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
const child = spawnSync(executable, process.argv.slice(2), { stdio: 'inherit' });
|
|
19
|
+
if (child.error) {
|
|
20
|
+
console.error(`Cannot start ${executable}: ${child.error.message}`);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
if (child.signal) {
|
|
24
|
+
process.kill(process.pid, child.signal);
|
|
25
|
+
} else {
|
|
26
|
+
process.exit(child.status ?? 1);
|
|
27
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wotlk-database-mcp",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0-rc.4",
|
|
4
|
+
"description": "World of Warcraft 3.3.5a database MCP server",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/denisdasilvarocha/wotlk-database-mcp.git"
|
|
8
|
+
},
|
|
9
|
+
"bin": {
|
|
10
|
+
"wotlk-database-mcp": "bin/launcher.cjs"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"bin/launcher.cjs"
|
|
14
|
+
],
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=22"
|
|
17
|
+
},
|
|
18
|
+
"optionalDependencies": {
|
|
19
|
+
"wotlk-database-mcp-darwin-arm64": "0.1.0-rc.4",
|
|
20
|
+
"wotlk-database-mcp-darwin-x64": "0.1.0-rc.4",
|
|
21
|
+
"wotlk-database-mcp-linux-x64": "0.1.0-rc.4",
|
|
22
|
+
"wotlk-database-mcp-linux-arm64": "0.1.0-rc.4",
|
|
23
|
+
"wotlk-database-mcp-win32-x64": "0.1.0-rc.4"
|
|
24
|
+
}
|
|
6
25
|
}
|