@websolutespa/bom-mixer-store 1.0.0 → 1.0.1
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/CHANGELOG.md +7 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/src/api/api.service.ts +1 -1
- package/src/storeApi/storeApi.service.ts +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -106,7 +106,7 @@ function getApiUrl(pathname) {
|
|
|
106
106
|
const localUrl = process.env.NEXT_PUBLIC_URL === "https://" ? process.env.NEXT_PUBLIC_MOCK_FALLBACK_URL : process.env.NEXT_PUBLIC_URL;
|
|
107
107
|
const apiBase = process.env.NEXT_PUBLIC_API || "/api";
|
|
108
108
|
const url = `${localUrl}${apiBase}${pathname}`;
|
|
109
|
-
return url;
|
|
109
|
+
return url.replace("://localhost", "://127.0.0.1");
|
|
110
110
|
}
|
|
111
111
|
async function apiFetch(pathname, options = {}, serviceOptions) {
|
|
112
112
|
const url = new URL(getApiUrl(pathname));
|
|
@@ -923,7 +923,7 @@ function getApiUrl2(pathname) {
|
|
|
923
923
|
} else {
|
|
924
924
|
url = `${MOCK_API_URL}${MOCK_API_BASE}/_mock${pathname}`;
|
|
925
925
|
}
|
|
926
|
-
return url;
|
|
926
|
+
return url.replace("://localhost", "://127.0.0.1");
|
|
927
927
|
}
|
|
928
928
|
async function storeApiFetch(pathname, options = {}) {
|
|
929
929
|
const url = getApiUrl2(pathname);
|
package/dist/index.mjs
CHANGED
|
@@ -45,7 +45,7 @@ function getApiUrl(pathname) {
|
|
|
45
45
|
const localUrl = process.env.NEXT_PUBLIC_URL === "https://" ? process.env.NEXT_PUBLIC_MOCK_FALLBACK_URL : process.env.NEXT_PUBLIC_URL;
|
|
46
46
|
const apiBase = process.env.NEXT_PUBLIC_API || "/api";
|
|
47
47
|
const url = `${localUrl}${apiBase}${pathname}`;
|
|
48
|
-
return url;
|
|
48
|
+
return url.replace("://localhost", "://127.0.0.1");
|
|
49
49
|
}
|
|
50
50
|
async function apiFetch(pathname, options = {}, serviceOptions) {
|
|
51
51
|
const url = new URL(getApiUrl(pathname));
|
|
@@ -870,7 +870,7 @@ function getApiUrl2(pathname) {
|
|
|
870
870
|
} else {
|
|
871
871
|
url = `${MOCK_API_URL}${MOCK_API_BASE}/_mock${pathname}`;
|
|
872
872
|
}
|
|
873
|
-
return url;
|
|
873
|
+
return url.replace("://localhost", "://127.0.0.1");
|
|
874
874
|
}
|
|
875
875
|
async function storeApiFetch(pathname, options = {}) {
|
|
876
876
|
const url = getApiUrl2(pathname);
|
package/package.json
CHANGED
package/src/api/api.service.ts
CHANGED
|
@@ -26,7 +26,7 @@ export function getApiUrl(pathname: string): string {
|
|
|
26
26
|
'url', url,
|
|
27
27
|
);
|
|
28
28
|
*/
|
|
29
|
-
return url;
|
|
29
|
+
return url.replace('://localhost', '://127.0.0.1');
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export async function apiFetch<T = any>(pathname: string, options: FetchRequestOptions = {}, serviceOptions?: { locale: string, market: string }): Promise<T> {
|
|
@@ -24,7 +24,7 @@ function getApiUrl(pathname: string): string {
|
|
|
24
24
|
} else {
|
|
25
25
|
url = `${MOCK_API_URL}${MOCK_API_BASE}/_mock${pathname}`;
|
|
26
26
|
}
|
|
27
|
-
return url;
|
|
27
|
+
return url.replace('://localhost', '://127.0.0.1');
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export async function storeApiFetch(pathname: string, options: ApiRequestOptions = {}): Promise<any> {
|