@formant/data-sdk 1.73.0 → 1.75.0
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/data-sdk.es6.js
CHANGED
|
@@ -43,13 +43,16 @@ function whichFormantApiUrl(e, t, n) {
|
|
|
43
43
|
}
|
|
44
44
|
return typeof e != "undefined" && "FORMANT_API_URL" in e && typeof e.FORMANT_API_URL == "string" ? e.FORMANT_API_URL : DEFAULT_FORMANT_API_URL;
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
let FORMANT_API_URL = whichFormantApiUrl(
|
|
47
47
|
typeof window != "undefined" ? window : globalThis,
|
|
48
48
|
new URLSearchParams(
|
|
49
49
|
typeof window != "undefined" && window.location ? window.location.search : void 0
|
|
50
50
|
),
|
|
51
51
|
typeof window != "undefined" && window.location ? window.location.host : void 0
|
|
52
52
|
);
|
|
53
|
+
const setFormantApiUrl = (e) => {
|
|
54
|
+
FORMANT_API_URL = e;
|
|
55
|
+
};
|
|
53
56
|
var commonjsGlobal = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
|
|
54
57
|
function getDefaultExportFromCjs(e) {
|
|
55
58
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -136,7 +139,7 @@ class AuthenticationStore {
|
|
|
136
139
|
this._apiUrl = t, this._refreshAuthToken = n, this._addAccessTokenRefreshListener = r;
|
|
137
140
|
}
|
|
138
141
|
set apiUrl(t) {
|
|
139
|
-
this._apiUrl = t;
|
|
142
|
+
this._apiUrl = t, setFormantApiUrl(t);
|
|
140
143
|
}
|
|
141
144
|
get apiUrl() {
|
|
142
145
|
return this._apiUrl;
|