@opexa/portal-sdk 0.59.93 → 0.59.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.
- package/README.md +1634 -1634
- package/dist/{chunk-5WRVWQBT.js → chunk-7APXFZ5G.js} +3 -3
- package/dist/chunk-7APXFZ5G.js.map +1 -0
- package/dist/{chunk-4TI5IXXM.js → chunk-RCMZBLLX.js} +3 -3
- package/dist/chunk-RCMZBLLX.js.map +1 -0
- package/dist/{chunk-ROBGEUSE.js → chunk-WVFSGB7Y.js} +2 -2
- package/dist/chunk-WVFSGB7Y.js.map +1 -0
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.js +2 -2
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-4TI5IXXM.js.map +0 -1
- package/dist/chunk-5WRVWQBT.js.map +0 -1
- package/dist/chunk-ROBGEUSE.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CmsPortalService, GameService, ExtensionService, FileService, WalletService, AccountService, ReportService, PortalService, TriggerService, AuthService, getFingerPrint } from './chunk-
|
|
2
|
-
import { GraphQLClient, isPlainObject } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { CmsPortalService, GameService, ExtensionService, FileService, WalletService, AccountService, ReportService, PortalService, TriggerService, AuthService, getFingerPrint } from './chunk-RCMZBLLX.js';
|
|
2
|
+
import { GraphQLClient, isPlainObject } from './chunk-7APXFZ5G.js';
|
|
3
|
+
import './chunk-WVFSGB7Y.js';
|
|
4
4
|
import { ObjectId } from '@opexa/object-id';
|
|
5
5
|
export { ObjectId } from '@opexa/object-id';
|
|
6
6
|
import { App } from '@capacitor/app';
|
|
@@ -3529,12 +3529,14 @@ var Sdk = class {
|
|
|
3529
3529
|
}
|
|
3530
3530
|
watchSession(input) {
|
|
3531
3531
|
const interval = clamp(input.interval ?? 3e4, 5e3, 6e4);
|
|
3532
|
+
let counter = 0;
|
|
3532
3533
|
let timeout = null;
|
|
3533
3534
|
let isForeground = true;
|
|
3534
3535
|
const listener = App.addListener("appStateChange", ({ isActive }) => {
|
|
3535
3536
|
isForeground = isActive;
|
|
3536
3537
|
});
|
|
3537
3538
|
const assignTimeout = () => {
|
|
3539
|
+
const duration = counter <= 0 ? interval * 0.5 : interval;
|
|
3538
3540
|
return setTimeout(async () => {
|
|
3539
3541
|
if (isForeground) {
|
|
3540
3542
|
let res;
|
|
@@ -3547,8 +3549,9 @@ var Sdk = class {
|
|
|
3547
3549
|
await input.onInvalid(res.reason ?? "INVALID_SESSION");
|
|
3548
3550
|
}
|
|
3549
3551
|
}
|
|
3552
|
+
counter += 1;
|
|
3550
3553
|
timeout = assignTimeout();
|
|
3551
|
-
},
|
|
3554
|
+
}, duration);
|
|
3552
3555
|
};
|
|
3553
3556
|
timeout = assignTimeout();
|
|
3554
3557
|
return function unsubscribe() {
|