@opexa/portal-sdk 0.59.12 → 0.59.13
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.cjs +11 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6360,24 +6360,24 @@ function parseFbCxd(input) {
|
|
|
6360
6360
|
return { cxd, fbAdditionalCxd };
|
|
6361
6361
|
}
|
|
6362
6362
|
var thumbmark_instance;
|
|
6363
|
-
async function getFingerprint() {
|
|
6363
|
+
async function getFingerprint(environment) {
|
|
6364
6364
|
if (typeof window === "undefined") return null;
|
|
6365
6365
|
if (!thumbmark_instance) {
|
|
6366
6366
|
thumbmark_instance = new thumbmarkjs.Thumbmark({
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6367
|
+
logging: true,
|
|
6368
|
+
...environment === "production" && {
|
|
6369
|
+
api_key: "8294c227c5194f96e4deb022e8e76293",
|
|
6370
|
+
logging: false,
|
|
6371
|
+
timeout: 3e4,
|
|
6372
|
+
cache_lifetime_in_ms: 24 * 60 * 60 * 1e3
|
|
6373
|
+
}
|
|
6372
6374
|
});
|
|
6373
6375
|
}
|
|
6374
6376
|
try {
|
|
6375
|
-
const cached = sessionStorage.getItem("fingerprint");
|
|
6376
|
-
if (cached) return cached;
|
|
6377
6377
|
const result = await thumbmark_instance.get();
|
|
6378
|
-
sessionStorage.setItem("fingerprint", result.thumbmark);
|
|
6379
6378
|
return result.thumbmark;
|
|
6380
|
-
} catch {
|
|
6379
|
+
} catch (e) {
|
|
6380
|
+
console.warn(e);
|
|
6381
6381
|
return null;
|
|
6382
6382
|
}
|
|
6383
6383
|
}
|
|
@@ -9257,7 +9257,7 @@ var Sdk = class {
|
|
|
9257
9257
|
};
|
|
9258
9258
|
}
|
|
9259
9259
|
async fingerprint() {
|
|
9260
|
-
return await getFingerprint();
|
|
9260
|
+
return await getFingerprint(this.config.environment ?? "development");
|
|
9261
9261
|
}
|
|
9262
9262
|
get miscMiddleware() {
|
|
9263
9263
|
return async (request) => {
|