reddit-mcp-server 1.2.0 → 1.3.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.
package/dist/bin.js CHANGED
@@ -1,23 +1,14 @@
1
1
  #!/usr/bin/env node
2
- const require_chunk = require('./chunk-kSYXY2_d.js');
3
- let fs = require("fs");
4
- fs = require_chunk.__toESM(fs);
5
- let path = require("path");
6
- path = require_chunk.__toESM(path);
7
-
8
2
  //#region src/bin.ts
9
- const packageJsonPath = path.default.join(__dirname, "..", "package.json");
10
- const packageJson = JSON.parse(fs.default.readFileSync(packageJsonPath, "utf-8"));
11
3
  if (!process.env.TRANSPORT_TYPE) process.env.TRANSPORT_TYPE = "stdio";
12
4
  const args = process.argv.slice(2);
13
5
  if (args.includes("--version") || args.includes("-v")) {
14
- console.log(packageJson.version);
6
+ console.log("1.3.2");
15
7
  process.exit(0);
16
8
  }
17
- main().then();
18
9
  if (args.includes("--help") || args.includes("-h")) {
19
10
  console.log(`
20
- Reddit MCP Server v${packageJson.version}
11
+ Reddit MCP Server v1.3.2
21
12
 
22
13
  Usage: reddit-mcp-server [options]
23
14
 
@@ -37,8 +28,10 @@ For more information, visit: https://github.com/jordanburke/reddit-mcp-server
37
28
  process.exit(0);
38
29
  }
39
30
  async function main() {
40
- await Promise.resolve().then(() => require("./index.js"));
31
+ await import("./index.js");
41
32
  }
33
+ main().then();
42
34
 
43
35
  //#endregion
36
+ export { };
44
37
  //# sourceMappingURL=bin.js.map
package/dist/bin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bin.js","names":[],"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\n\n// Read package.json dynamically\nimport fs from \"fs\"\nimport path from \"path\"\n\ninterface PackageJson {\n version: string\n}\n\nconst packageJsonPath = path.join(__dirname, \"..\", \"package.json\")\nconst packageJson = JSON.parse(fs.readFileSync(packageJsonPath, \"utf-8\")) as PackageJson\n\n// Force stdio mode for CLI/npx usage (unless explicitly overridden)\nif (!process.env.TRANSPORT_TYPE) {\n process.env.TRANSPORT_TYPE = \"stdio\"\n}\n\n// Handle command line arguments BEFORE any other imports\nconst args = process.argv.slice(2)\n\nif (args.includes(\"--version\") || args.includes(\"-v\")) {\n console.log(packageJson.version)\n process.exit(0)\n}\n\n// Only import and start server if not showing version/help\nmain().then()\n\nif (args.includes(\"--help\") || args.includes(\"-h\")) {\n console.log(`\nReddit MCP Server v${packageJson.version}\n\nUsage: reddit-mcp-server [options]\n\nOptions:\n -v, --version Show version number\n -h, --help Show help\n\nEnvironment Variables:\n REDDIT_CLIENT_ID Reddit API client ID (required)\n REDDIT_CLIENT_SECRET Reddit API client secret (required)\n REDDIT_USERNAME Reddit username (optional, for write operations)\n REDDIT_PASSWORD Reddit password (optional, for write operations)\n REDDIT_USER_AGENT Custom user agent (optional)\n\nFor more information, visit: https://github.com/jordanburke/reddit-mcp-server\n`)\n process.exit(0)\n}\n\n// Import and start server if not showing version/help\nasync function main() {\n // Import and run the main function from the FastMCP server\n await import(\"./index.js\")\n // The index.js exports main() directly, so we just need to execute the file\n // The main() is already executed when the module is imported\n}\n"],"mappings":";;;;;;;;AAUA,MAAM,kBAAkB,aAAK,KAAK,WAAW,MAAM,eAAe;AAClE,MAAM,cAAc,KAAK,MAAM,WAAG,aAAa,iBAAiB,QAAQ,CAAC;AAGzE,IAAI,CAAC,QAAQ,IAAI,eACf,SAAQ,IAAI,iBAAiB;AAI/B,MAAM,OAAO,QAAQ,KAAK,MAAM,EAAE;AAElC,IAAI,KAAK,SAAS,YAAY,IAAI,KAAK,SAAS,KAAK,EAAE;AACrD,SAAQ,IAAI,YAAY,QAAQ;AAChC,SAAQ,KAAK,EAAE;;AAIjB,MAAM,CAAC,MAAM;AAEb,IAAI,KAAK,SAAS,SAAS,IAAI,KAAK,SAAS,KAAK,EAAE;AAClD,SAAQ,IAAI;qBACO,YAAY,QAAQ;;;;;;;;;;;;;;;;EAgBvC;AACA,SAAQ,KAAK,EAAE;;AAIjB,eAAe,OAAO;AAEpB,4CAAM"}
1
+ {"version":3,"file":"bin.js","names":[],"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\n\ndeclare const __VERSION__: string\n\n// Force stdio mode for CLI/npx usage (unless explicitly overridden)\nif (!process.env.TRANSPORT_TYPE) {\n process.env.TRANSPORT_TYPE = \"stdio\"\n}\n\n// Handle command line arguments BEFORE any other imports\nconst args = process.argv.slice(2)\n\nif (args.includes(\"--version\") || args.includes(\"-v\")) {\n console.log(__VERSION__)\n process.exit(0)\n}\n\nif (args.includes(\"--help\") || args.includes(\"-h\")) {\n console.log(`\nReddit MCP Server v${__VERSION__}\n\nUsage: reddit-mcp-server [options]\n\nOptions:\n -v, --version Show version number\n -h, --help Show help\n\nEnvironment Variables:\n REDDIT_CLIENT_ID Reddit API client ID (required)\n REDDIT_CLIENT_SECRET Reddit API client secret (required)\n REDDIT_USERNAME Reddit username (optional, for write operations)\n REDDIT_PASSWORD Reddit password (optional, for write operations)\n REDDIT_USER_AGENT Custom user agent (optional)\n\nFor more information, visit: https://github.com/jordanburke/reddit-mcp-server\n`)\n process.exit(0)\n}\n\n// Import and start server if not showing version/help\nasync function main() {\n // Import and run the main function from the FastMCP server\n await import(\"./index.js\")\n // The index.js exports main() directly, so we just need to execute the file\n // The main() is already executed when the module is imported\n}\n\nmain().then()\n"],"mappings":";;AAKA,IAAI,CAAC,QAAQ,IAAI,eACf,SAAQ,IAAI,iBAAiB;AAI/B,MAAM,OAAO,QAAQ,KAAK,MAAM,EAAE;AAElC,IAAI,KAAK,SAAS,YAAY,IAAI,KAAK,SAAS,KAAK,EAAE;AACrD,SAAQ,YAAgB;AACxB,SAAQ,KAAK,EAAE;;AAGjB,IAAI,KAAK,SAAS,SAAS,IAAI,KAAK,SAAS,KAAK,EAAE;AAClD,SAAQ,IAAI;;;;;;;;;;;;;;;;;EAiBZ;AACA,SAAQ,KAAK,EAAE;;AAIjB,eAAe,OAAO;AAEpB,OAAM,OAAO;;AAKf,MAAM,CAAC,MAAM"}