@automattic/mcp-wordpress-remote 0.2.14 → 0.2.15

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/proxy.js +2 -1
  2. package/package.json +1 -1
package/dist/proxy.js CHANGED
@@ -38213,7 +38213,8 @@ function constructApiUrl(baseUrl, defaultEndpoint) {
38213
38213
  try {
38214
38214
  const urlObj = new URL(cleanUrl);
38215
38215
  const hasCustomPath = urlObj.pathname && urlObj.pathname !== "/" && urlObj.pathname.length > 0;
38216
- if (hasCustomPath) {
38216
+ const hasCustomQuery = urlObj.search && urlObj.search.length > 0;
38217
+ if (hasCustomPath || hasCustomQuery) {
38217
38218
  return cleanUrl;
38218
38219
  } else {
38219
38220
  return new URL(`/?rest_route=${defaultEndpoint}`, cleanUrl).toString();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/mcp-wordpress-remote",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
4
4
  "description": "MCP WordPress Remote proxy server",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"