jazz-react-native 0.10.14 → 0.10.15
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/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# jazz-browser
|
2
2
|
|
3
|
+
## 0.10.15
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- Updated dependencies [2f99de0]
|
8
|
+
- Updated dependencies [f86e278]
|
9
|
+
- jazz-tools@0.10.15
|
10
|
+
- cojson@0.10.15
|
11
|
+
- jazz-react-core@0.10.12
|
12
|
+
- cojson-storage-rn-sqlite@0.8.67
|
13
|
+
- cojson-transport-ws@0.10.15
|
14
|
+
|
3
15
|
## 0.10.14
|
4
16
|
|
5
17
|
### Patch Changes
|
@@ -2,13 +2,9 @@ import { JazzContextManager, } from "jazz-tools";
|
|
2
2
|
import { createJazzReactNativeContext, createJazzReactNativeGuestContext, } from "./platform.js";
|
3
3
|
import { KvStoreContext } from "./storage/kv-store-context.js";
|
4
4
|
export class ReactNativeContextManager extends JazzContextManager {
|
5
|
-
async
|
6
|
-
let currentContext;
|
7
|
-
// We need to store the props here to block the double effect execution
|
8
|
-
// on React. Otherwise when calling propsChanged this.props is undefined.
|
9
|
-
this.props = props;
|
5
|
+
async getNewContext(props, authProps) {
|
10
6
|
if (props.guestMode) {
|
11
|
-
|
7
|
+
return createJazzReactNativeGuestContext({
|
12
8
|
sync: props.sync,
|
13
9
|
storage: props.storage,
|
14
10
|
authSecretStorage: this.authSecretStorage,
|
@@ -16,7 +12,7 @@ export class ReactNativeContextManager extends JazzContextManager {
|
|
16
12
|
});
|
17
13
|
}
|
18
14
|
else {
|
19
|
-
|
15
|
+
return createJazzReactNativeContext({
|
20
16
|
sync: props.sync,
|
21
17
|
storage: props.storage,
|
22
18
|
AccountSchema: props.AccountSchema,
|
@@ -27,7 +23,6 @@ export class ReactNativeContextManager extends JazzContextManager {
|
|
27
23
|
CryptoProvider: props.CryptoProvider,
|
28
24
|
});
|
29
25
|
}
|
30
|
-
await this.updateContext(props, currentContext, authProps);
|
31
26
|
}
|
32
27
|
getKvStore() {
|
33
28
|
return KvStoreContext.getInstance().getStorage();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ReactNativeContextManager.js","sourceRoot":"","sources":["../src/ReactNativeContextManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,GAGnB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAEL,4BAA4B,EAC5B,iCAAiC,GAClC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAa/D,MAAM,OAAO,yBAEX,SAAQ,kBAAqD;IAC7D,KAAK,CAAC,aAAa,CACjB,KAAmC,EACnC,SAAuC;QAEvC,IAAI,
|
1
|
+
{"version":3,"file":"ReactNativeContextManager.js","sourceRoot":"","sources":["../src/ReactNativeContextManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,GAGnB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAEL,4BAA4B,EAC5B,iCAAiC,GAClC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAa/D,MAAM,OAAO,yBAEX,SAAQ,kBAAqD;IAC7D,KAAK,CAAC,aAAa,CACjB,KAAmC,EACnC,SAAuC;QAEvC,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;YACpB,OAAO,iCAAiC,CAAC;gBACvC,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;gBACzC,cAAc,EAAE,KAAK,CAAC,cAAc;aACrC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,OAAO,4BAA4B,CAAM;gBACvC,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,aAAa,EAAE,KAAK,CAAC,aAAa;gBAClC,WAAW,EAAE,SAAS,EAAE,WAAW;gBACnC,eAAe,EAAE,SAAS,EAAE,eAAe;gBAC3C,kBAAkB,EAAE,KAAK,CAAC,kBAAkB;gBAC5C,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;gBACzC,cAAc,EAAE,KAAK,CAAC,cAAc;aACrC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,UAAU;QACR,OAAO,cAAc,CAAC,WAAW,EAAE,CAAC,UAAU,EAAE,CAAC;IACnD,CAAC;IAED,YAAY,CAAC,KAAmC;QAC9C,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,CACL,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI;YACxC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI;YACxC,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,CACzC,CAAC;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "jazz-react-native",
|
3
|
-
"version": "0.10.
|
3
|
+
"version": "0.10.15",
|
4
4
|
"type": "module",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"module": "./dist/index.js",
|
@@ -28,11 +28,11 @@
|
|
28
28
|
"@scure/base": "1.2.1",
|
29
29
|
"react-native-nitro-modules": "0.21.0",
|
30
30
|
"react-native-quick-crypto": "1.0.0-beta.12",
|
31
|
-
"cojson": "0.10.
|
32
|
-
"cojson-storage-rn-sqlite": "0.8.
|
33
|
-
"cojson-transport-ws": "0.10.
|
34
|
-
"jazz-react-core": "0.10.
|
35
|
-
"jazz-tools": "0.10.
|
31
|
+
"cojson": "0.10.15",
|
32
|
+
"cojson-storage-rn-sqlite": "0.8.67",
|
33
|
+
"cojson-transport-ws": "0.10.15",
|
34
|
+
"jazz-react-core": "0.10.12",
|
35
|
+
"jazz-tools": "0.10.15"
|
36
36
|
},
|
37
37
|
"peerDependencies": {
|
38
38
|
"@react-native-community/netinfo": "*",
|
@@ -27,25 +27,19 @@ export type JazzContextManagerProps<Acc extends Account> = {
|
|
27
27
|
export class ReactNativeContextManager<
|
28
28
|
Acc extends Account,
|
29
29
|
> extends JazzContextManager<Acc, JazzContextManagerProps<Acc>> {
|
30
|
-
async
|
30
|
+
async getNewContext(
|
31
31
|
props: JazzContextManagerProps<Acc>,
|
32
32
|
authProps?: JazzContextManagerAuthProps,
|
33
33
|
) {
|
34
|
-
let currentContext;
|
35
|
-
|
36
|
-
// We need to store the props here to block the double effect execution
|
37
|
-
// on React. Otherwise when calling propsChanged this.props is undefined.
|
38
|
-
this.props = props;
|
39
|
-
|
40
34
|
if (props.guestMode) {
|
41
|
-
|
35
|
+
return createJazzReactNativeGuestContext({
|
42
36
|
sync: props.sync,
|
43
37
|
storage: props.storage,
|
44
38
|
authSecretStorage: this.authSecretStorage,
|
45
39
|
CryptoProvider: props.CryptoProvider,
|
46
40
|
});
|
47
41
|
} else {
|
48
|
-
|
42
|
+
return createJazzReactNativeContext<Acc>({
|
49
43
|
sync: props.sync,
|
50
44
|
storage: props.storage,
|
51
45
|
AccountSchema: props.AccountSchema,
|
@@ -56,8 +50,6 @@ export class ReactNativeContextManager<
|
|
56
50
|
CryptoProvider: props.CryptoProvider,
|
57
51
|
});
|
58
52
|
}
|
59
|
-
|
60
|
-
await this.updateContext(props, currentContext, authProps);
|
61
53
|
}
|
62
54
|
|
63
55
|
getKvStore(): KvStore {
|