@verdocs/js-sdk 4.2.87 → 4.2.89
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/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -3
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +2 -3
- package/package.json +2 -3
package/dist/index.mjs
CHANGED
|
@@ -1067,6 +1067,7 @@ const updateProfilePhoto = (endpoint, profileId, file, onUploadProgress) => {
|
|
|
1067
1067
|
// @credit https://derickbailey.com/2016/03/09/creating-a-true-singleton-in-node-js-with-es6-symbols/
|
|
1068
1068
|
// Also see globalThis for comments about why we're doing this in the first place.
|
|
1069
1069
|
const ENDPOINT_KEY = Symbol.for('verdocs-default-endpoint');
|
|
1070
|
+
const BETA_ORIGINS = ['https://beta.verdocs.com', 'https://stage.verdocs.com', 'http://localhost:6006', 'http://localhost:5173'];
|
|
1070
1071
|
const requestLogger = (r) => {
|
|
1071
1072
|
// tslint:disable-next-line
|
|
1072
1073
|
console.debug(`[JS-SDK] ${r.method.toUpperCase()} ${r.baseURL}${r.url}`, r.data ? JSON.stringify(r.data) : '');
|
|
@@ -1097,9 +1098,7 @@ class VerdocsEndpoint {
|
|
|
1097
1098
|
environment = 'verdocs';
|
|
1098
1099
|
sessionType = 'user';
|
|
1099
1100
|
persist = true;
|
|
1100
|
-
baseURL = (window.location.origin
|
|
1101
|
-
? 'https://stage-api.verdocs.com'
|
|
1102
|
-
: 'https://api.verdocs.com');
|
|
1101
|
+
baseURL = BETA_ORIGINS.includes(window.location.origin) ? 'https://stage-api.verdocs.com' : 'https://api.verdocs.com';
|
|
1103
1102
|
clientID = 'not-set';
|
|
1104
1103
|
timeout = 60000;
|
|
1105
1104
|
token = null;
|