mcp-wordpress 2.5.0 → 2.5.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 (30) hide show
  1. package/README.md +19 -15
  2. package/bin/status.js +1 -1
  3. package/dist/config/ServerConfiguration.d.ts.map +1 -1
  4. package/dist/config/ServerConfiguration.js +23 -2
  5. package/dist/config/ServerConfiguration.js.map +1 -1
  6. package/docs/INSTALLATION.md +4 -2
  7. package/docs/TROUBLESHOOTING.md +2 -1
  8. package/docs/developer/TESTING.md +24 -19
  9. package/docs/integrations/claude-desktop.md +9 -4
  10. package/docs/user-guides/DXT_INSTALLATION.md +2 -1
  11. package/package.json +28 -29
  12. package/src/config/ServerConfiguration.ts +22 -2
  13. package/dist/ajv-patch.js +0 -34
  14. package/dist/cache/__tests__/CacheInvalidation.test.d.ts +0 -5
  15. package/dist/cache/__tests__/CacheInvalidation.test.d.ts.map +0 -1
  16. package/dist/cache/__tests__/CacheInvalidation.test.js +0 -238
  17. package/dist/cache/__tests__/CacheInvalidation.test.js.map +0 -1
  18. package/dist/cache/__tests__/CacheManager.test.d.ts +0 -5
  19. package/dist/cache/__tests__/CacheManager.test.d.ts.map +0 -1
  20. package/dist/cache/__tests__/CacheManager.test.js +0 -233
  21. package/dist/cache/__tests__/CacheManager.test.js.map +0 -1
  22. package/dist/cache/__tests__/CachedWordPressClient.test.d.ts +0 -5
  23. package/dist/cache/__tests__/CachedWordPressClient.test.d.ts.map +0 -1
  24. package/dist/cache/__tests__/CachedWordPressClient.test.js +0 -231
  25. package/dist/cache/__tests__/CachedWordPressClient.test.js.map +0 -1
  26. package/dist/cache/__tests__/HttpCacheWrapper.test.d.ts +0 -5
  27. package/dist/cache/__tests__/HttpCacheWrapper.test.d.ts.map +0 -1
  28. package/dist/cache/__tests__/HttpCacheWrapper.test.js +0 -300
  29. package/dist/cache/__tests__/HttpCacheWrapper.test.js.map +0 -1
  30. package/dist/dxt-entry.cjs +0 -81
@@ -1,81 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * CommonJS entry point for DXT package - ensures compatibility with Claude Desktop
4
- */
5
-
6
- // Load AJV patch before any other modules
7
- try {
8
- const fs = require('fs');
9
- const path = require('path');
10
- const Module = require('module');
11
-
12
- // Patch the AJV module to use our embedded schema files
13
- const originalResolveFilename = Module._resolveFilename;
14
- Module._resolveFilename = function(request, parent, isMain) {
15
- // Intercept requests for AJV refs
16
- if (request.includes('refs/json-schema-draft-07.json')) {
17
- return path.join(__dirname, 'ajv-refs', 'json-schema-draft-07.json');
18
- }
19
- if (request.includes('refs/json-schema-draft-04.json')) {
20
- return path.join(__dirname, 'ajv-refs', 'json-schema-draft-04.json');
21
- }
22
- if (request.includes('refs/json-schema-draft-06.json')) {
23
- return path.join(__dirname, 'ajv-refs', 'json-schema-draft-06.json');
24
- }
25
- if (request.includes('refs/json-schema-secure.json')) {
26
- return path.join(__dirname, 'ajv-refs', 'json-schema-secure.json');
27
- }
28
- if (request.includes('refs/data.json')) {
29
- return path.join(__dirname, 'ajv-refs', 'data.json');
30
- }
31
-
32
- return originalResolveFilename.call(this, request, parent, isMain);
33
- };
34
-
35
- console.error("DEBUG: AJV patch applied successfully");
36
- } catch (error) {
37
- console.error("DEBUG: AJV patch failed to load:", error.message);
38
- }
39
-
40
- console.error("DEBUG: DXT CommonJS entry point starting...");
41
- console.error(`DEBUG: Current working directory: ${process.cwd()}`);
42
- console.error(`DEBUG: __dirname: ${__dirname}`);
43
- console.error(`DEBUG: Node version: ${process.version}`);
44
-
45
- console.error("DEBUG: Environment variables passed from DXT:");
46
- console.error(` WORDPRESS_SITE_URL: ${process.env.WORDPRESS_SITE_URL ? 'SET' : 'NOT SET'}`);
47
- console.error(` WORDPRESS_USERNAME: ${process.env.WORDPRESS_USERNAME ? 'SET' : 'NOT SET'}`);
48
- console.error(` WORDPRESS_APP_PASSWORD: ${process.env.WORDPRESS_APP_PASSWORD ? 'SET' : 'NOT SET'}`);
49
-
50
- // Import and run the main server using dynamic import
51
- async function startDXTServer() {
52
- try {
53
- console.error("DEBUG: Attempting to import ES module...");
54
- const { MCPWordPressServer } = await import("./index.js");
55
-
56
- console.error("DEBUG: Creating MCPWordPressServer instance from DXT entry point...");
57
- const server = new MCPWordPressServer();
58
-
59
- console.error("DEBUG: Starting server...");
60
- await server.run();
61
-
62
- // Handle graceful shutdown
63
- const shutdown = async () => {
64
- console.error("DEBUG: Received shutdown signal in DXT entry point");
65
- await server.shutdown();
66
- process.exit(0);
67
- };
68
-
69
- process.on("SIGINT", shutdown);
70
- process.on("SIGTERM", shutdown);
71
-
72
- } catch (error) {
73
- console.error(`FATAL: DXT server failed to start: ${error instanceof Error ? error.message : String(error)}`);
74
- console.error(`FATAL: Stack trace: ${error instanceof Error ? error.stack : 'No stack trace available'}`);
75
- process.exit(1);
76
- }
77
- }
78
-
79
- // Always run when loaded as DXT entry point
80
- console.error("DEBUG: Calling startDXTServer...");
81
- startDXTServer();