unofficial-ravensburger-playhub-mcp 1.0.1 → 1.0.2

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 +15 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { resolve } from "node:path";
2
+ import { realpathSync } from "node:fs";
3
3
  import { fileURLToPath } from "node:url";
4
4
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
5
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
@@ -7,8 +7,19 @@ import { loadFilterOptions } from "./lib/api.js";
7
7
  import { registerEventTools } from "./tools/events.js";
8
8
  import { registerFilterTools } from "./tools/filters.js";
9
9
  import { registerStoreTools } from "./tools/stores.js";
10
- const isEntryModule = process.argv[1] != null &&
11
- resolve(process.argv[1]) === resolve(fileURLToPath(import.meta.url));
10
+ // Resolve symlinks so we detect entry when run via npm/npx bin (which uses a symlink)
11
+ function isEntryModule() {
12
+ if (process.argv[1] == null)
13
+ return false;
14
+ try {
15
+ const argvPath = realpathSync(process.argv[1]);
16
+ const selfPath = realpathSync(fileURLToPath(import.meta.url));
17
+ return argvPath === selfPath;
18
+ }
19
+ catch {
20
+ return false;
21
+ }
22
+ }
12
23
  const server = new McpServer({
13
24
  name: "lorcana-event-finder",
14
25
  version: "1.0.0",
@@ -24,7 +35,7 @@ async function main() {
24
35
  // (Cursor and other clients time out if the server doesn't respond to initialize quickly)
25
36
  loadFilterOptions().catch((err) => console.error("Failed to load filter options:", err));
26
37
  }
27
- if (isEntryModule) {
38
+ if (isEntryModule()) {
28
39
  main().catch((error) => {
29
40
  console.error("Fatal error:", error);
30
41
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unofficial-ravensburger-playhub-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "MCP server for finding Disney Lorcana TCG events",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",