reddit-mcp-server 1.4.0 → 1.4.1

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,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  //#region src/bin.ts
3
- if (!process.env.TRANSPORT_TYPE) process.env.TRANSPORT_TYPE = "stdio";
3
+ process.env.TRANSPORT_TYPE ??= "stdio";
4
4
  const args = process.argv.slice(2);
5
5
  if (args.includes("--version") || args.includes("-v")) {
6
- console.log("1.4.0");
6
+ console.log("1.4.1");
7
7
  process.exit(0);
8
8
  }
9
9
  if (args.includes("--help") || args.includes("-h")) {
10
10
  console.log(`
11
- Reddit MCP Server v1.4.0
11
+ Reddit MCP Server v1.4.1
12
12
 
13
13
  Usage: reddit-mcp-server [options]
14
14
 
@@ -34,7 +34,7 @@ For more information, visit: https://github.com/jordanburke/reddit-mcp-server
34
34
  async function main() {
35
35
  await import("./index.js");
36
36
  }
37
- main().then();
37
+ main().catch(console.error);
38
38
 
39
39
  //#endregion
40
40
  export { };
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\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 (optional, for OAuth)\n REDDIT_CLIENT_SECRET Reddit API client secret (optional, for OAuth)\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 REDDIT_AUTH_MODE Authentication mode: auto, authenticated, anonymous (default: auto)\n REDDIT_SAFE_MODE Spam protection: off, standard, strict (default: standard)\n REDDIT_BOT_DISCLOSURE Bot disclosure footer: auto, off (default: off)\n REDDIT_BOT_FOOTER Custom bot footer text (optional, used with REDDIT_BOT_DISCLOSURE=auto)\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;;;;;;;;;;;;;;;;;;;;;EAqBZ;AACA,SAAQ,KAAK,EAAE;;AAIjB,eAAe,OAAO;AAEpB,OAAM,OAAO;;AAKf,MAAM,CAAC,MAAM"}
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)\n// eslint-disable-next-line functional/immutable-data\nprocess.env.TRANSPORT_TYPE ??= \"stdio\"\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 (optional, for OAuth)\n REDDIT_CLIENT_SECRET Reddit API client secret (optional, for OAuth)\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 REDDIT_AUTH_MODE Authentication mode: auto, authenticated, anonymous (default: auto)\n REDDIT_SAFE_MODE Spam protection: off, standard, strict (default: standard)\n REDDIT_BOT_DISCLOSURE Bot disclosure footer: auto, off (default: off)\n REDDIT_BOT_FOOTER Custom bot footer text (optional, used with REDDIT_BOT_DISCLOSURE=auto)\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 await import(\"./index.js\")\n}\n\nvoid main().catch(console.error)\n"],"mappings":";;AAMA,QAAQ,IAAI,mBAAmB;AAG/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;;;;;;;;;;;;;;;;;;;;;EAqBZ;AACA,SAAQ,KAAK,EAAE;;AAIjB,eAAe,OAAO;AACpB,OAAM,OAAO;;AAGV,MAAM,CAAC,MAAM,QAAQ,MAAM"}