react-native-appwrite 0.24.0 → 0.24.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 +4 -0
- package/dist/cjs/sdk.js +7 -2
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +7 -2
- package/dist/esm/sdk.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +7 -2
package/dist/esm/sdk.js
CHANGED
|
@@ -57,6 +57,8 @@ const JSONbigParser = JSONbigModule({ storeAsString: false });
|
|
|
57
57
|
const JSONbigSerializer = JSONbigModule({ useNativeBigInt: true });
|
|
58
58
|
const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
|
|
59
59
|
const MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
|
|
60
|
+
const MAX_INT64 = BigInt('9223372036854775807');
|
|
61
|
+
const MIN_INT64 = BigInt('-9223372036854775808');
|
|
60
62
|
function isBigNumber(value) {
|
|
61
63
|
return value !== null
|
|
62
64
|
&& typeof value === 'object'
|
|
@@ -73,7 +75,10 @@ function reviver(_key, value) {
|
|
|
73
75
|
if (bi >= MIN_SAFE && bi <= MAX_SAFE) {
|
|
74
76
|
return Number(str);
|
|
75
77
|
}
|
|
76
|
-
|
|
78
|
+
if (bi >= MIN_INT64 && bi <= MAX_INT64) {
|
|
79
|
+
return bi;
|
|
80
|
+
}
|
|
81
|
+
return value.toNumber();
|
|
77
82
|
}
|
|
78
83
|
return value.toNumber();
|
|
79
84
|
}
|
|
@@ -109,7 +114,7 @@ class Client {
|
|
|
109
114
|
'x-sdk-name': 'React Native',
|
|
110
115
|
'x-sdk-platform': 'client',
|
|
111
116
|
'x-sdk-language': 'reactnative',
|
|
112
|
-
'x-sdk-version': '0.24.
|
|
117
|
+
'x-sdk-version': '0.24.1',
|
|
113
118
|
'X-Appwrite-Response-Format': '1.8.0',
|
|
114
119
|
};
|
|
115
120
|
this.realtime = {
|