blueprint-extractor-mcp 7.0.6 → 7.0.7

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.
Files changed (2) hide show
  1. package/dist/index.js +16 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { pathToFileURL } from 'node:url';
2
+ import { realpathSync } from 'node:fs';
3
+ import { fileURLToPath } from 'node:url';
3
4
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
5
  import { createBlueprintExtractorServer } from './server-factory.js';
5
6
  export { createBlueprintExtractorServer } from './server-factory.js';
@@ -10,7 +11,20 @@ async function main() {
10
11
  const transport = new StdioServerTransport();
11
12
  await server.connect(transport);
12
13
  }
13
- if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
14
+ function isCliEntrypoint() {
15
+ const entryPath = process.argv[1];
16
+ if (!entryPath) {
17
+ return false;
18
+ }
19
+ try {
20
+ // npm/npx launch the package via a symlink in node_modules/.bin.
21
+ return realpathSync(entryPath) === realpathSync(fileURLToPath(import.meta.url));
22
+ }
23
+ catch {
24
+ return false;
25
+ }
26
+ }
27
+ if (isCliEntrypoint()) {
14
28
  main().catch((error) => {
15
29
  console.error('Fatal:', error);
16
30
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blueprint-extractor-mcp",
3
- "version": "7.0.6",
3
+ "version": "7.0.7",
4
4
  "description": "MCP server for the Unreal Engine BlueprintExtractor plugin over Remote Control",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",