jazz-tools 0.19.14 → 0.19.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 +55 -55
- package/CHANGELOG.md +15 -0
- package/dist/{chunk-GAPMDNJY.js → chunk-R3KIZG4P.js} +47 -27
- package/dist/chunk-R3KIZG4P.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/react-native/index.js +18 -0
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native-core/ReactNativeSessionProvider.d.ts.map +1 -1
- package/dist/react-native-core/index.js +18 -0
- package/dist/react-native-core/index.js.map +1 -1
- package/dist/testing.js +1 -1
- package/dist/tools/coValues/CoValueBase.d.ts +13 -0
- package/dist/tools/coValues/CoValueBase.d.ts.map +1 -1
- package/dist/tools/subscribe/SubscriptionScope.d.ts +33 -35
- package/dist/tools/subscribe/SubscriptionScope.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/react-native-core/ReactNativeSessionProvider.ts +29 -3
- package/src/react-native-core/tests/ReactNativeSessionProvider.test.ts +175 -3
- package/src/tools/coValues/CoValueBase.ts +24 -0
- package/src/tools/coValues/coMap.ts +1 -1
- package/src/tools/implementation/createContext.ts +2 -2
- package/src/tools/subscribe/SubscriptionScope.ts +43 -34
- package/src/tools/tests/account.test.ts +19 -0
- package/src/tools/tests/coMap.record.test.ts +43 -0
- package/src/tools/tests/coMap.test.ts +67 -1
- package/dist/chunk-GAPMDNJY.js.map +0 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> jazz-tools@0.19.
|
|
2
|
+
> jazz-tools@0.19.15 build /home/runner/_work/jazz/jazz/packages/jazz-tools
|
|
3
3
|
> tsup && pnpm types && pnpm build:svelte
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: {"index":"src/index.ts","testing":"src/testing.ts","tools/ssr":"src/tools/ssr/index.ts"}
|
|
@@ -109,21 +109,21 @@
|
|
|
109
109
|
[34mESM[39m Build start
|
|
110
110
|
[32mESM[39m [1mdist/tiptap/index.js [22m[32m564.00 B[39m
|
|
111
111
|
[32mESM[39m [1mdist/tiptap/index.js.map [22m[32m1.21 KB[39m
|
|
112
|
-
[32mESM[39m ⚡️ Build success in
|
|
112
|
+
[32mESM[39m ⚡️ Build success in 84ms
|
|
113
113
|
[32mESM[39m [1mdist/worker/index.js [22m[32m3.19 KB[39m
|
|
114
114
|
[32mESM[39m [1mdist/worker/edge-wasm.js [22m[32m215.00 B[39m
|
|
115
115
|
[32mESM[39m [1mdist/worker/napi-crypto.js [22m[32m110.00 B[39m
|
|
116
|
-
[32mESM[39m [1mdist/worker/index.js.map [22m[32m6.26 KB[39m
|
|
117
116
|
[32mESM[39m [1mdist/worker/edge-wasm.js.map [22m[32m434.00 B[39m
|
|
117
|
+
[32mESM[39m [1mdist/worker/index.js.map [22m[32m6.26 KB[39m
|
|
118
118
|
[32mESM[39m [1mdist/worker/napi-crypto.js.map [22m[32m162.00 B[39m
|
|
119
|
-
[32mESM[39m ⚡️ Build success in
|
|
119
|
+
[32mESM[39m ⚡️ Build success in 81ms
|
|
120
120
|
[32mESM[39m [1mdist/better-auth/auth/client.js [22m[32m4.50 KB[39m
|
|
121
121
|
[32mESM[39m [1mdist/better-auth/auth/server.js [22m[32m8.36 KB[39m
|
|
122
122
|
[32mESM[39m [1mdist/better-auth/auth/react.js [22m[32m799.00 B[39m
|
|
123
123
|
[32mESM[39m [1mdist/better-auth/auth/client.js.map [22m[32m8.32 KB[39m
|
|
124
124
|
[32mESM[39m [1mdist/better-auth/auth/server.js.map [22m[32m15.31 KB[39m
|
|
125
125
|
[32mESM[39m [1mdist/better-auth/auth/react.js.map [22m[32m2.04 KB[39m
|
|
126
|
-
[32mESM[39m ⚡️ Build success in
|
|
126
|
+
[32mESM[39m ⚡️ Build success in 74ms
|
|
127
127
|
[32mESM[39m [1mdist/media/index.js [22m[32m236.00 B[39m
|
|
128
128
|
[32mESM[39m [1mdist/media/index.browser.js [22m[32m2.79 KB[39m
|
|
129
129
|
[32mESM[39m [1mdist/media/index.native.js [22m[32m4.01 KB[39m
|
|
@@ -134,88 +134,88 @@
|
|
|
134
134
|
[32mESM[39m [1mdist/media/index.native.js.map [22m[32m8.10 KB[39m
|
|
135
135
|
[32mESM[39m [1mdist/media/index.server.js.map [22m[32m6.37 KB[39m
|
|
136
136
|
[32mESM[39m [1mdist/media/chunk-3LKBM3G3.js.map [22m[32m16.99 KB[39m
|
|
137
|
-
[32mESM[39m ⚡️ Build success in
|
|
138
|
-
[32mESM[39m [1mdist/react-core/index.js [22m[32m17.05 KB[39m
|
|
139
|
-
[32mESM[39m [1mdist/react-core/testing.js [22m[32m1.22 KB[39m
|
|
140
|
-
[32mESM[39m [1mdist/react-core/chunk-7DYMJ74I.js [22m[32m279.00 B[39m
|
|
141
|
-
[32mESM[39m [1mdist/react-core/testing.js.map [22m[32m1.86 KB[39m
|
|
142
|
-
[32mESM[39m [1mdist/react-core/index.js.map [22m[32m49.77 KB[39m
|
|
143
|
-
[32mESM[39m [1mdist/react-core/chunk-7DYMJ74I.js.map [22m[32m533.00 B[39m
|
|
144
|
-
[32mESM[39m ⚡️ Build success in 45ms
|
|
137
|
+
[32mESM[39m ⚡️ Build success in 80ms
|
|
145
138
|
[32mESM[39m [1mdist/expo/index.js [22m[32m4.68 KB[39m
|
|
146
139
|
[32mESM[39m [1mdist/expo/crypto.js [22m[32m153.00 B[39m
|
|
147
140
|
[32mESM[39m [1mdist/expo/testing.js [22m[32m112.00 B[39m
|
|
148
141
|
[32mESM[39m [1mdist/expo/polyfills.js [22m[32m858.00 B[39m
|
|
149
|
-
[32mESM[39m [1mdist/expo/crypto.js.map [22m[32m189.00 B[39m
|
|
150
142
|
[32mESM[39m [1mdist/expo/index.js.map [22m[32m10.23 KB[39m
|
|
143
|
+
[32mESM[39m [1mdist/expo/crypto.js.map [22m[32m189.00 B[39m
|
|
151
144
|
[32mESM[39m [1mdist/expo/testing.js.map [22m[32m168.00 B[39m
|
|
152
145
|
[32mESM[39m [1mdist/expo/polyfills.js.map [22m[32m1.61 KB[39m
|
|
153
|
-
[32mESM[39m ⚡️ Build success in
|
|
154
|
-
[32mESM[39m [1mdist/browser/index.js [22m[32m16.14 KB[39m
|
|
155
|
-
[32mESM[39m [1mdist/browser/index.js.map [22m[32m34.66 KB[39m
|
|
156
|
-
[32mESM[39m ⚡️ Build success in 54ms
|
|
157
|
-
[32mESM[39m [1mdist/better-auth/database-adapter/index.js [22m[32m26.65 KB[39m
|
|
158
|
-
[32mESM[39m [1mdist/better-auth/database-adapter/index.js.map [22m[32m58.26 KB[39m
|
|
159
|
-
[32mESM[39m ⚡️ Build success in 46ms
|
|
146
|
+
[32mESM[39m ⚡️ Build success in 98ms
|
|
160
147
|
[32mESM[39m [1mdist/prosemirror/index.js [22m[32m77.76 KB[39m
|
|
161
148
|
[32mESM[39m [1mdist/prosemirror/index.js.map [22m[32m307.20 KB[39m
|
|
162
|
-
[32mESM[39m ⚡️ Build success in
|
|
149
|
+
[32mESM[39m ⚡️ Build success in 117ms
|
|
150
|
+
[32mESM[39m [1mdist/react-core/index.js [22m[32m17.05 KB[39m
|
|
151
|
+
[32mESM[39m [1mdist/react-core/testing.js [22m[32m1.22 KB[39m
|
|
152
|
+
[32mESM[39m [1mdist/react-core/chunk-7DYMJ74I.js [22m[32m279.00 B[39m
|
|
153
|
+
[32mESM[39m [1mdist/react-core/index.js.map [22m[32m49.77 KB[39m
|
|
154
|
+
[32mESM[39m [1mdist/react-core/testing.js.map [22m[32m1.86 KB[39m
|
|
155
|
+
[32mESM[39m [1mdist/react-core/chunk-7DYMJ74I.js.map [22m[32m533.00 B[39m
|
|
156
|
+
[32mESM[39m ⚡️ Build success in 119ms
|
|
157
|
+
[32mESM[39m [1mdist/better-auth/database-adapter/index.js [22m[32m26.65 KB[39m
|
|
158
|
+
[32mESM[39m [1mdist/better-auth/database-adapter/index.js.map [22m[32m58.26 KB[39m
|
|
159
|
+
[32mESM[39m ⚡️ Build success in 111ms
|
|
160
|
+
[32mESM[39m [1mdist/browser/index.js [22m[32m16.14 KB[39m
|
|
161
|
+
[32mESM[39m [1mdist/browser/index.js.map [22m[32m34.66 KB[39m
|
|
162
|
+
[32mESM[39m ⚡️ Build success in 130ms
|
|
163
|
+
[32mESM[39m [1mdist/react-native-core/index.js [22m[32m20.57 KB[39m
|
|
164
|
+
[32mESM[39m [1mdist/react-native-core/testing.js [22m[32m119.00 B[39m
|
|
165
|
+
[32mESM[39m [1mdist/react-native-core/crypto.js [22m[32m2.58 KB[39m
|
|
166
|
+
[32mESM[39m [1mdist/react-native-core/crypto/RNCrypto.js [22m[32m120.00 B[39m
|
|
167
|
+
[32mESM[39m [1mdist/react-native-core/index.js.map [22m[32m41.80 KB[39m
|
|
168
|
+
[32mESM[39m [1mdist/react-native-core/testing.js.map [22m[32m175.00 B[39m
|
|
169
|
+
[32mESM[39m [1mdist/react-native-core/crypto.js.map [22m[32m5.25 KB[39m
|
|
170
|
+
[32mESM[39m [1mdist/react-native-core/crypto/RNCrypto.js.map [22m[32m178.00 B[39m
|
|
171
|
+
[32mESM[39m ⚡️ Build success in 130ms
|
|
172
|
+
[32mESM[39m [1mdist/react/index.js [22m[32m25.96 KB[39m
|
|
163
173
|
[32mESM[39m [1mdist/react/testing.js [22m[32m122.00 B[39m
|
|
164
174
|
[32mESM[39m [1mdist/react/ssr.js [22m[32m697.00 B[39m
|
|
165
|
-
[32mESM[39m [1mdist/react/index.js
|
|
175
|
+
[32mESM[39m [1mdist/react/index.js.map [22m[32m55.44 KB[39m
|
|
166
176
|
[32mESM[39m [1mdist/react/testing.js.map [22m[32m165.00 B[39m
|
|
167
177
|
[32mESM[39m [1mdist/react/ssr.js.map [22m[32m1.11 KB[39m
|
|
168
|
-
[32mESM[39m
|
|
169
|
-
[32mESM[39m
|
|
170
|
-
[32mESM[39m [1mdist/react-native/index.js [22m[32m22.50 KB[39m
|
|
171
|
-
[32mESM[39m [1mdist/react-native/crypto.js [22m[32m161.00 B[39m
|
|
178
|
+
[32mESM[39m ⚡️ Build success in 121ms
|
|
179
|
+
[32mESM[39m [1mdist/react-native/index.js [22m[32m23.11 KB[39m
|
|
172
180
|
[32mESM[39m [1mdist/react-native/testing.js [22m[32m120.00 B[39m
|
|
181
|
+
[32mESM[39m [1mdist/react-native/crypto.js [22m[32m161.00 B[39m
|
|
173
182
|
[32mESM[39m [1mdist/react-native/polyfills.js [22m[32m858.00 B[39m
|
|
174
|
-
[32mESM[39m [1mdist/react-native/index.js.map [22m[
|
|
175
|
-
[32mESM[39m [1mdist/react-native/crypto.js.map [22m[32m197.00 B[39m
|
|
183
|
+
[32mESM[39m [1mdist/react-native/index.js.map [22m[32m47.35 KB[39m
|
|
176
184
|
[32mESM[39m [1mdist/react-native/testing.js.map [22m[32m176.00 B[39m
|
|
185
|
+
[32mESM[39m [1mdist/react-native/crypto.js.map [22m[32m197.00 B[39m
|
|
177
186
|
[32mESM[39m [1mdist/react-native/polyfills.js.map [22m[32m1.61 KB[39m
|
|
178
|
-
[32mESM[39m ⚡️ Build success in
|
|
179
|
-
[32mESM[39m [1mdist/react-native-core/testing.js [22m[32m119.00 B[39m
|
|
180
|
-
[32mESM[39m [1mdist/react-native-core/crypto.js [22m[32m2.58 KB[39m
|
|
181
|
-
[32mESM[39m [1mdist/react-native-core/index.js [22m[32m19.96 KB[39m
|
|
182
|
-
[32mESM[39m [1mdist/react-native-core/crypto/RNCrypto.js [22m[32m120.00 B[39m
|
|
183
|
-
[32mESM[39m [1mdist/react-native-core/testing.js.map [22m[32m175.00 B[39m
|
|
184
|
-
[32mESM[39m [1mdist/react-native-core/crypto.js.map [22m[32m5.25 KB[39m
|
|
185
|
-
[32mESM[39m [1mdist/react-native-core/index.js.map [22m[32m40.58 KB[39m
|
|
186
|
-
[32mESM[39m [1mdist/react-native-core/crypto/RNCrypto.js.map [22m[32m178.00 B[39m
|
|
187
|
-
[32mESM[39m ⚡️ Build success in 59ms
|
|
187
|
+
[32mESM[39m ⚡️ Build success in 134ms
|
|
188
188
|
[32mESM[39m [1mdist/inspector/index.js [22m[32m6.29 KB[39m
|
|
189
189
|
[32mESM[39m [1mdist/inspector/standalone.js [22m[32m12.61 KB[39m
|
|
190
190
|
[32mESM[39m [1mdist/inspector/chunk-YQNK5Y7B.js [22m[32m127.21 KB[39m
|
|
191
191
|
[32mESM[39m [1mdist/inspector/index.js.map [22m[32m9.65 KB[39m
|
|
192
192
|
[32mESM[39m [1mdist/inspector/standalone.js.map [22m[32m20.11 KB[39m
|
|
193
193
|
[32mESM[39m [1mdist/inspector/chunk-YQNK5Y7B.js.map [22m[32m221.30 KB[39m
|
|
194
|
-
[32mESM[39m ⚡️ Build success in
|
|
194
|
+
[32mESM[39m ⚡️ Build success in 186ms
|
|
195
|
+
[32mESM[39m [1mdist/inspector/register-custom-element.js [22m[32m218.00 B[39m
|
|
196
|
+
[32mESM[39m [1mdist/inspector/register-custom-element.js.map [22m[32m314.00 B[39m
|
|
197
|
+
[32mESM[39m [1mdist/inspector/custom-element-KYV64IOC.js [22m[32m1.60 MB[39m
|
|
198
|
+
[32mESM[39m [1mdist/inspector/custom-element-KYV64IOC.js.map [22m[32m2.47 MB[39m
|
|
199
|
+
[32mESM[39m ⚡️ Build success in 251ms
|
|
195
200
|
[32mESM[39m [1mdist/index.js [22m[32m29.82 KB[39m
|
|
196
|
-
[32mESM[39m [1mdist/
|
|
197
|
-
[32mESM[39m [1mdist/tools/ssr.js [22m[32m156.00 B[39m
|
|
201
|
+
[32mESM[39m [1mdist/testing.js [22m[32m8.56 KB[39m
|
|
198
202
|
[32mESM[39m [1mdist/chunk-M2HGBOXS.js [22m[32m694.00 B[39m
|
|
203
|
+
[32mESM[39m [1mdist/tools/ssr.js [22m[32m156.00 B[39m
|
|
199
204
|
[32mESM[39m [1mdist/chunk-PZ5AY32C.js [22m[32m233.00 B[39m
|
|
200
|
-
[32mESM[39m [1mdist/
|
|
201
|
-
[32mESM[39m [1mdist/tools/ssr.js.map [22m[32m71.00 B[39m
|
|
202
|
-
[32mESM[39m [1mdist/chunk-PZ5AY32C.js.map [22m[32m71.00 B[39m
|
|
203
|
-
[32mESM[39m [1mdist/chunk-M2HGBOXS.js.map [22m[32m1.10 KB[39m
|
|
205
|
+
[32mESM[39m [1mdist/chunk-R3KIZG4P.js [22m[32m226.01 KB[39m
|
|
204
206
|
[32mESM[39m [1mdist/testing.js.map [22m[32m16.21 KB[39m
|
|
205
207
|
[32mESM[39m [1mdist/index.js.map [22m[32m60.59 KB[39m
|
|
206
|
-
[32mESM[39m [1mdist/chunk-
|
|
207
|
-
[32mESM[39m
|
|
208
|
-
[32mESM[39m [1mdist/
|
|
209
|
-
[32mESM[39m [1mdist/
|
|
210
|
-
[32mESM[39m
|
|
211
|
-
[32mESM[39m [1mdist/inspector/custom-element-KYV64IOC.js.map [22m[32m2.47 MB[39m
|
|
212
|
-
[32mESM[39m ⚡️ Build success in 122ms
|
|
208
|
+
[32mESM[39m [1mdist/chunk-M2HGBOXS.js.map [22m[32m1.10 KB[39m
|
|
209
|
+
[32mESM[39m [1mdist/tools/ssr.js.map [22m[32m71.00 B[39m
|
|
210
|
+
[32mESM[39m [1mdist/chunk-PZ5AY32C.js.map [22m[32m71.00 B[39m
|
|
211
|
+
[32mESM[39m [1mdist/chunk-R3KIZG4P.js.map [22m[32m531.93 KB[39m
|
|
212
|
+
[32mESM[39m ⚡️ Build success in 236ms
|
|
213
213
|
|
|
214
|
-
> jazz-tools@0.19.
|
|
214
|
+
> jazz-tools@0.19.15 types /home/runner/_work/jazz/jazz/packages/jazz-tools
|
|
215
215
|
> tsc --outDir dist
|
|
216
216
|
|
|
217
217
|
|
|
218
|
-
> jazz-tools@0.19.
|
|
218
|
+
> jazz-tools@0.19.15 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
|
|
219
219
|
> rm -rf dist/svelte && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json
|
|
220
220
|
|
|
221
221
|
src/svelte -> dist/svelte
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# jazz-tools
|
|
2
2
|
|
|
3
|
+
## 0.19.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 94012a1: Added a locking system for session IDs in React Native
|
|
8
|
+
|
|
9
|
+
Now it should be safer to mount multiple JazzProviders, but still not advised as it is really expensive
|
|
10
|
+
|
|
11
|
+
- 86f9676: Adds a createdBy getter
|
|
12
|
+
- b27dbc2: Fix Object.keys(coMap.getEdits()) to return also deleted keys
|
|
13
|
+
- Updated dependencies [71ed9d6]
|
|
14
|
+
- cojson@0.19.15
|
|
15
|
+
- cojson-storage-indexeddb@0.19.15
|
|
16
|
+
- cojson-transport-ws@0.19.15
|
|
17
|
+
|
|
3
18
|
## 0.19.14
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -203,6 +203,26 @@ var CoValueJazzApi = class {
|
|
|
203
203
|
}
|
|
204
204
|
return this.raw.core.earliestTxMadeAt;
|
|
205
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* Returns the account ID of the user who created this CoValue.
|
|
208
|
+
*
|
|
209
|
+
* Creation is determined by inspecting the earliest valid transaction,
|
|
210
|
+
* Note: Where the author is a sealer/signer identifiers (e.g. accounts)
|
|
211
|
+
* nothing is returned intentionally
|
|
212
|
+
*
|
|
213
|
+
* @returns {string | undefined} The creating user's account ID, or
|
|
214
|
+
* `undefined` if no author can be determined
|
|
215
|
+
*
|
|
216
|
+
* @category Content
|
|
217
|
+
*/
|
|
218
|
+
get createdBy() {
|
|
219
|
+
const createdBy = this.raw.core.getValidSortedTransactions({
|
|
220
|
+
ignorePrivateTransactions: false
|
|
221
|
+
})[0]?.author;
|
|
222
|
+
if (typeof createdBy === "string" && createdBy.startsWith("co_z"))
|
|
223
|
+
return createdBy;
|
|
224
|
+
return void 0;
|
|
225
|
+
}
|
|
206
226
|
/**
|
|
207
227
|
* The timestamp of the last updated time of the CoValue
|
|
208
228
|
*
|
|
@@ -739,7 +759,7 @@ var CoMapJazzApi = class extends CoValueJazzApi {
|
|
|
739
759
|
};
|
|
740
760
|
},
|
|
741
761
|
ownKeys(_target) {
|
|
742
|
-
return map.$jazz.raw.
|
|
762
|
+
return Object.keys(map.$jazz.raw.ops);
|
|
743
763
|
},
|
|
744
764
|
getOwnPropertyDescriptor(target, key) {
|
|
745
765
|
return {
|
|
@@ -4290,29 +4310,6 @@ var SubscriptionScope = class _SubscriptionScope {
|
|
|
4290
4310
|
this.migrating = false;
|
|
4291
4311
|
this.closed = false;
|
|
4292
4312
|
this.silenceUpdates = false;
|
|
4293
|
-
this.handleChildUpdate = (id, value, key) => {
|
|
4294
|
-
if (value.type === CoValueLoadingState.LOADING) {
|
|
4295
|
-
return;
|
|
4296
|
-
}
|
|
4297
|
-
this.pendingLoadedChildren.delete(id);
|
|
4298
|
-
this.pendingAutoloadedChildren.delete(id);
|
|
4299
|
-
this.childValues.set(id, value);
|
|
4300
|
-
if (value.type === CoValueLoadingState.UNAVAILABLE || value.type === CoValueLoadingState.UNAUTHORIZED) {
|
|
4301
|
-
this.childErrors.set(id, value.prependPath(key ?? id));
|
|
4302
|
-
this.errorFromChildren = this.computeChildErrors();
|
|
4303
|
-
} else if (this.errorFromChildren && this.childErrors.has(id)) {
|
|
4304
|
-
this.childErrors.delete(id);
|
|
4305
|
-
this.errorFromChildren = this.computeChildErrors();
|
|
4306
|
-
}
|
|
4307
|
-
if (this.shouldSendUpdates()) {
|
|
4308
|
-
if (this.value.type === CoValueLoadingState.LOADED) {
|
|
4309
|
-
this.updateValue(
|
|
4310
|
-
createCoValue(this.schema, this.value.value.$jazz.raw, this)
|
|
4311
|
-
);
|
|
4312
|
-
}
|
|
4313
|
-
}
|
|
4314
|
-
this.triggerUpdate();
|
|
4315
|
-
};
|
|
4316
4313
|
this.subscribers = /* @__PURE__ */ new Set();
|
|
4317
4314
|
this.subscriberChangeCallbacks = /* @__PURE__ */ new Set();
|
|
4318
4315
|
this.callerStack = callerStack;
|
|
@@ -4438,6 +4435,29 @@ var SubscriptionScope = class _SubscriptionScope {
|
|
|
4438
4435
|
}
|
|
4439
4436
|
return void 0;
|
|
4440
4437
|
}
|
|
4438
|
+
handleChildUpdate(id, value, key) {
|
|
4439
|
+
if (value.type === CoValueLoadingState.LOADING) {
|
|
4440
|
+
return;
|
|
4441
|
+
}
|
|
4442
|
+
this.pendingLoadedChildren.delete(id);
|
|
4443
|
+
this.pendingAutoloadedChildren.delete(id);
|
|
4444
|
+
this.childValues.set(id, value);
|
|
4445
|
+
if (value.type === CoValueLoadingState.UNAVAILABLE || value.type === CoValueLoadingState.UNAUTHORIZED) {
|
|
4446
|
+
this.childErrors.set(id, value.prependPath(key ?? id));
|
|
4447
|
+
this.errorFromChildren = this.computeChildErrors();
|
|
4448
|
+
} else if (this.errorFromChildren && this.childErrors.has(id)) {
|
|
4449
|
+
this.childErrors.delete(id);
|
|
4450
|
+
this.errorFromChildren = this.computeChildErrors();
|
|
4451
|
+
}
|
|
4452
|
+
if (this.shouldSendUpdates()) {
|
|
4453
|
+
if (this.value.type === CoValueLoadingState.LOADED) {
|
|
4454
|
+
this.updateValue(
|
|
4455
|
+
createCoValue(this.schema, this.value.value.$jazz.raw, this)
|
|
4456
|
+
);
|
|
4457
|
+
}
|
|
4458
|
+
}
|
|
4459
|
+
this.triggerUpdate();
|
|
4460
|
+
}
|
|
4441
4461
|
shouldSendUpdates() {
|
|
4442
4462
|
if (this.value.type === CoValueLoadingState.LOADING) return false;
|
|
4443
4463
|
if (this.value.type !== CoValueLoadingState.LOADED) return true;
|
|
@@ -5096,8 +5116,8 @@ async function createJazzContext(options) {
|
|
|
5096
5116
|
crypto,
|
|
5097
5117
|
AccountSchema: options.AccountSchema,
|
|
5098
5118
|
sessionProvider: options.sessionProvider,
|
|
5099
|
-
onLogOut: () => {
|
|
5100
|
-
authSecretStorage.clearWithoutNotify();
|
|
5119
|
+
onLogOut: async () => {
|
|
5120
|
+
await authSecretStorage.clearWithoutNotify();
|
|
5101
5121
|
},
|
|
5102
5122
|
storage: options.storage,
|
|
5103
5123
|
asActiveAccount: true
|
|
@@ -7782,4 +7802,4 @@ export {
|
|
|
7782
7802
|
JazzContextManager
|
|
7783
7803
|
};
|
|
7784
7804
|
/* istanbul ignore file -- @preserve */
|
|
7785
|
-
//# sourceMappingURL=chunk-
|
|
7805
|
+
//# sourceMappingURL=chunk-R3KIZG4P.js.map
|