eddev 0.2.0-beta.1 → 0.2.0-beta.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eddev",
3
- "version": "0.2.0-beta.1",
3
+ "version": "0.2.0-beta.5",
4
4
  "main": "./index.js",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -2,12 +2,14 @@ export async function fetchWordpressProps(pathname: string) {
2
2
  const origin = (process.env.SITE_URL as string).replace(/\/$/, "")
3
3
  pathname = pathname.replace(/(^\/|\/$)/g, "")
4
4
 
5
- let response = await fetch(origin + "/" + pathname + "/?_props=all")
5
+ const propsURL = origin + ("/" + pathname + "/?_props=all").replace(/\/+/, "/")
6
+ let response = await fetch(propsURL)
6
7
  let text = await response.text()
7
8
 
8
9
  // Convert absolute site URL details to relative paths
9
10
  // console.log("WAS", text)
10
- console.log("REPLACING", origin)
11
+ console.log("REPLACING", origin, propsURL, response.status, response.statusText, text)
12
+ console.log("RESPONSE", response)
11
13
  text = text.replaceAll(origin, "")
12
14
  console.log("NOW", text)
13
15