@contenthero/mcp 0.2.7 → 0.2.8
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/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;GASG;AAOH,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AACxD,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACtF,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AACnE,YAAY,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* effects. The stdio server only starts when this file is executed directly.
|
|
11
11
|
*/
|
|
12
12
|
import { pathToFileURL } from 'node:url';
|
|
13
|
+
import { realpathSync } from 'node:fs';
|
|
13
14
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
14
15
|
import { buildServer } from './server.js';
|
|
15
16
|
export { buildServer, registerTools } from './server.js';
|
|
@@ -22,7 +23,22 @@ async function main() {
|
|
|
22
23
|
}
|
|
23
24
|
// Only boot the stdio server when this module is the process entry point (the
|
|
24
25
|
// `contenthero-mcp` bin). When imported as a library, this is skipped.
|
|
25
|
-
|
|
26
|
+
//
|
|
27
|
+
// process.argv[1] may be a SYMLINK (npx / npm `.bin/contenthero-mcp` always is,
|
|
28
|
+
// and macOS /tmp is symlinked too), while Node sets import.meta.url to the
|
|
29
|
+
// module's REALPATH. Comparing the symlink path directly fails → the server
|
|
30
|
+
// silently no-ops on exit 0. Resolve the symlink before comparing so the bin
|
|
31
|
+
// boots under npx while the library-import path stays side-effect-free.
|
|
32
|
+
const entry = process.argv[1];
|
|
33
|
+
let entryRealUrl;
|
|
34
|
+
try {
|
|
35
|
+
entryRealUrl = entry ? pathToFileURL(realpathSync(entry)).href : undefined;
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
entryRealUrl = undefined;
|
|
39
|
+
}
|
|
40
|
+
const invokedDirectly = !!entry &&
|
|
41
|
+
(import.meta.url === pathToFileURL(entry).href || import.meta.url === entryRealUrl);
|
|
26
42
|
if (invokedDirectly) {
|
|
27
43
|
main().catch((err) => {
|
|
28
44
|
console.error('ContentHero MCP server failed to start:', err);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAExD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAGnE,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,MAAM,WAAW,EAAE,CAAA;IAClC,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAA;IAC5C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;IAC/B,OAAO,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAA;AAC1D,CAAC;AAED,8EAA8E;AAC9E,uEAAuE;AACvE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","source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AAErF,IAAI,eAAe,EAAE,CAAC;IACpB,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACnB,OAAO,CAAC,KAAK,CAAC,yCAAyC,EAAE,GAAG,CAAC,CAAA;QAC7D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contenthero/mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Official ContentHero MCP server. Generate images, video, and audio from any MCP client (Claude Code, Claude Desktop, etc.) using your ContentHero API key.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|