eddev 2.0.0-beta.182 → 2.0.0-beta.184

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.
@@ -63,7 +63,7 @@ export class ServerContext {
63
63
  delete fetchOps.replaceUrls;
64
64
  delete fetchOps.newOrigin;
65
65
  const response = await fetchWP(url, {
66
- ...opts,
66
+ ...fetchOps,
67
67
  });
68
68
  if (!response.ok) {
69
69
  console.debug("fetchOrigin NOT OK", response.status, response.statusText);
@@ -303,7 +303,7 @@ export class ServerContext {
303
303
  return headers;
304
304
  }
305
305
  async fetchNamedQuery(req) {
306
- const url = `/wp-json/ed/v1/query/${req.name}?params=${encodeURIComponent(JSON.stringify(req.params))}`;
306
+ const url = `/wp-json/ed/v1/query/${req.name.replace(/^\//, "")}?params=${encodeURIComponent(JSON.stringify(req.params))}`;
307
307
  const key = `fetchNamedQuery:${req.name}:${JSON.stringify(req.params)}`;
308
308
  const fetch = async () => {
309
309
  console.debug("fetching");
@@ -14,7 +14,7 @@ export async function fetchWP(url, args = {}) {
14
14
  }
15
15
  // Allow self-signed certificates when using a local development domain
16
16
  let allowSelfSigned = isDevelopmentDomain(url);
17
- console.debug("fetching from origin", { url, args, allowSelfSigned });
17
+ console.debug("fetching from origin", { url, args, allowSelfSigned, headers });
18
18
  const response = (await fetch(url, {
19
19
  ...args,
20
20
  dispatcher: allowSelfSigned ? agent : undefined,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eddev",
3
- "version": "2.0.0-beta.182",
3
+ "version": "2.0.0-beta.184",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",