@reidelsaltres/pureper 0.1.94 → 0.1.95
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HOSTING_ORIGIN } from "../index.js";
|
|
1
|
+
import { HOSTING, HOSTING_ORIGIN } from "../index.js";
|
|
2
2
|
export default class Fetcher {
|
|
3
3
|
static async fetchText(url) {
|
|
4
4
|
const response = await this.internalFetch(url);
|
|
@@ -9,7 +9,7 @@ export default class Fetcher {
|
|
|
9
9
|
return await response.json();
|
|
10
10
|
}
|
|
11
11
|
static async internalFetch(url) {
|
|
12
|
-
const URLObj = new URL(url, HOSTING_ORIGIN);
|
|
12
|
+
const URLObj = new URL(HOSTING.substring(0, HOSTING.length - 1) + url, HOSTING_ORIGIN);
|
|
13
13
|
const response = await fetch(URLObj.href, { cache: 'default' });
|
|
14
14
|
if (!response.ok) {
|
|
15
15
|
throw new Error(`HTTP error! status: ${response.status}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fetcher.js","sourceRoot":"","sources":["../../src/foundation/Fetcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Fetcher.js","sourceRoot":"","sources":["../../src/foundation/Fetcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,CAAC,OAAO,OAAO,OAAO;IACxB,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,GAAW;QAC9B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAE/C,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IACjC,CAAC;IACD,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,GAAW;QAC9B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAE/C,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IACjC,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,GAAW;QAC1C,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,cAAc,CAAC,CAAC;QACvF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAChE,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,uBAAuB,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HOSTING_ORIGIN } from "../index.js";
|
|
1
|
+
import { HOSTING, HOSTING_ORIGIN } from "../index.js";
|
|
2
2
|
|
|
3
3
|
export default class Fetcher {
|
|
4
4
|
static async fetchText(url: string): Promise<string> {
|
|
@@ -13,7 +13,7 @@ export default class Fetcher {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
private static async internalFetch(url: string): Promise<Response> {
|
|
16
|
-
const URLObj = new URL(url, HOSTING_ORIGIN);
|
|
16
|
+
const URLObj = new URL(HOSTING.substring(0, HOSTING.length - 1) + url, HOSTING_ORIGIN);
|
|
17
17
|
const response = await fetch(URLObj.href, { cache: 'default' });
|
|
18
18
|
if (!response.ok) {
|
|
19
19
|
throw new Error(`HTTP error! status: ${response.status}`);
|