@automattic/mcp-wordpress-remote 0.2.13 → 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.
- package/dist/proxy.d.ts +1 -2
- package/dist/proxy.js +3 -1
- package/package.json +1 -1
package/dist/proxy.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { }
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/proxy.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
@@ -38212,7 +38213,8 @@ function constructApiUrl(baseUrl, defaultEndpoint) {
|
|
|
38212
38213
|
try {
|
|
38213
38214
|
const urlObj = new URL(cleanUrl);
|
|
38214
38215
|
const hasCustomPath = urlObj.pathname && urlObj.pathname !== "/" && urlObj.pathname.length > 0;
|
|
38215
|
-
|
|
38216
|
+
const hasCustomQuery = urlObj.search && urlObj.search.length > 0;
|
|
38217
|
+
if (hasCustomPath || hasCustomQuery) {
|
|
38216
38218
|
return cleanUrl;
|
|
38217
38219
|
} else {
|
|
38218
38220
|
return new URL(`/?rest_route=${defaultEndpoint}`, cleanUrl).toString();
|