jazz-tools 0.18.13 → 0.18.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 +45 -43
- package/CHANGELOG.md +23 -0
- package/dist/{chunk-AEXYCCQS.js → chunk-GRN6OAUX.js} +28 -13
- package/dist/chunk-GRN6OAUX.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/testing.js +1 -1
- package/dist/tools/coValues/coMap.d.ts.map +1 -1
- package/dist/tools/subscribe/SubscriptionScope.d.ts +10 -1
- package/dist/tools/subscribe/SubscriptionScope.d.ts.map +1 -1
- package/dist/worker/edge-wasm.d.ts +2 -0
- package/dist/worker/edge-wasm.d.ts.map +1 -0
- package/dist/worker/edge-wasm.js +5 -0
- package/dist/worker/edge-wasm.js.map +1 -0
- package/package.json +9 -4
- package/src/tools/coValues/coMap.ts +0 -1
- package/src/tools/subscribe/SubscriptionScope.ts +35 -15
- package/src/tools/subscribe/index.ts +1 -1
- package/src/tools/tests/coMap.test.ts +23 -0
- package/src/worker/edge-wasm.ts +5 -0
- package/tsup.config.ts +1 -0
- package/dist/chunk-AEXYCCQS.js.map +0 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> jazz-tools@0.18.
|
2
|
+
> jazz-tools@0.18.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"}
|
@@ -28,7 +28,7 @@
|
|
28
28
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
29
29
|
[34mCLI[39m Building entry: {"index":"src/tiptap/index.ts"}
|
30
30
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
31
|
-
[34mCLI[39m Building entry: {"index":"src/worker/index.ts"}
|
31
|
+
[34mCLI[39m Building entry: {"index":"src/worker/index.ts","edge-wasm":"src/worker/edge-wasm.ts"}
|
32
32
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
33
33
|
[34mCLI[39m Building entry: {"client":"src/better-auth/auth/client.ts","server":"src/better-auth/auth/server.ts","react":"src/better-auth/auth/react.tsx"}
|
34
34
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
@@ -109,91 +109,93 @@
|
|
109
109
|
[34mESM[39m Build start
|
110
110
|
[32mESM[39m [1mdist/react/ssr.js [22m[32m688.00 B[39m
|
111
111
|
[32mESM[39m [1mdist/react/ssr.js.map [22m[32m1.12 KB[39m
|
112
|
-
[32mESM[39m ⚡️ Build success in
|
113
|
-
[32mESM[39m [1mdist/worker/index.js [22m[32m3.19 KB[39m
|
114
|
-
[32mESM[39m [1mdist/worker/index.js.map [22m[32m6.17 KB[39m
|
115
|
-
[32mESM[39m ⚡️ Build success in 19ms
|
112
|
+
[32mESM[39m ⚡️ Build success in 15ms
|
116
113
|
[32mESM[39m [1mdist/tiptap/index.js [22m[32m564.00 B[39m
|
117
114
|
[32mESM[39m [1mdist/tiptap/index.js.map [22m[32m1.21 KB[39m
|
118
|
-
[32mESM[39m ⚡️ Build success in
|
119
|
-
[32mESM[39m [1mdist/
|
120
|
-
[32mESM[39m [1mdist/
|
121
|
-
[32mESM[39m [1mdist/
|
122
|
-
[32mESM[39m [1mdist/
|
123
|
-
[32mESM[39m
|
124
|
-
[32mESM[39m [1mdist/
|
125
|
-
[32mESM[39m
|
115
|
+
[32mESM[39m ⚡️ Build success in 13ms
|
116
|
+
[32mESM[39m [1mdist/worker/index.js [22m[32m3.19 KB[39m
|
117
|
+
[32mESM[39m [1mdist/worker/edge-wasm.js [22m[32m215.00 B[39m
|
118
|
+
[32mESM[39m [1mdist/worker/index.js.map [22m[32m6.17 KB[39m
|
119
|
+
[32mESM[39m [1mdist/worker/edge-wasm.js.map [22m[32m434.00 B[39m
|
120
|
+
[32mESM[39m ⚡️ Build success in 20ms
|
121
|
+
[32mESM[39m [1mdist/better-auth/auth/client.js [22m[32m4.44 KB[39m
|
122
|
+
[32mESM[39m [1mdist/better-auth/auth/server.js [22m[32m8.36 KB[39m
|
123
|
+
[32mESM[39m [1mdist/better-auth/auth/react.js [22m[32m799.00 B[39m
|
124
|
+
[32mESM[39m [1mdist/better-auth/auth/client.js.map [22m[32m8.24 KB[39m
|
125
|
+
[32mESM[39m [1mdist/better-auth/auth/server.js.map [22m[32m15.29 KB[39m
|
126
|
+
[32mESM[39m [1mdist/better-auth/auth/react.js.map [22m[32m2.04 KB[39m
|
127
|
+
[32mESM[39m ⚡️ Build success in 20ms
|
126
128
|
[32mESM[39m [1mdist/media/index.js [22m[32m236.00 B[39m
|
127
129
|
[32mESM[39m [1mdist/media/index.browser.js [22m[32m2.79 KB[39m
|
128
|
-
[32mESM[39m [1mdist/media/index.native.js [22m[32m2.90 KB[39m
|
129
130
|
[32mESM[39m [1mdist/media/index.server.js [22m[32m2.95 KB[39m
|
131
|
+
[32mESM[39m [1mdist/media/index.native.js [22m[32m2.90 KB[39m
|
130
132
|
[32mESM[39m [1mdist/media/chunk-W3S526L3.js [22m[32m6.47 KB[39m
|
131
133
|
[32mESM[39m [1mdist/media/index.js.map [22m[32m71.00 B[39m
|
132
|
-
[32mESM[39m [1mdist/media/index.native.js.map [22m[32m6.09 KB[39m
|
133
134
|
[32mESM[39m [1mdist/media/index.browser.js.map [22m[32m6.15 KB[39m
|
134
135
|
[32mESM[39m [1mdist/media/index.server.js.map [22m[32m6.37 KB[39m
|
136
|
+
[32mESM[39m [1mdist/media/index.native.js.map [22m[32m6.09 KB[39m
|
135
137
|
[32mESM[39m [1mdist/media/chunk-W3S526L3.js.map [22m[32m16.57 KB[39m
|
136
|
-
[32mESM[39m ⚡️ Build success in
|
137
|
-
[32mESM[39m [1mdist/
|
138
|
-
[32mESM[39m [1mdist/
|
139
|
-
[32mESM[39m
|
140
|
-
[32mESM[39m [1mdist/better-auth/auth/client.js.map [22m[32m8.24 KB[39m
|
141
|
-
[32mESM[39m [1mdist/better-auth/auth/server.js.map [22m[32m15.29 KB[39m
|
142
|
-
[32mESM[39m [1mdist/better-auth/auth/react.js.map [22m[32m2.04 KB[39m
|
143
|
-
[32mESM[39m ⚡️ Build success in 25ms
|
138
|
+
[32mESM[39m ⚡️ Build success in 28ms
|
139
|
+
[32mESM[39m [1mdist/browser/index.js [22m[32m13.64 KB[39m
|
140
|
+
[32mESM[39m [1mdist/browser/index.js.map [22m[32m29.14 KB[39m
|
141
|
+
[32mESM[39m ⚡️ Build success in 31ms
|
144
142
|
[32mESM[39m [1mdist/react-native/index.js [22m[32m2.53 KB[39m
|
145
143
|
[32mESM[39m [1mdist/react-native/testing.js [22m[32m120.00 B[39m
|
146
144
|
[32mESM[39m [1mdist/react-native/crypto.js [22m[32m161.00 B[39m
|
147
145
|
[32mESM[39m [1mdist/react-native/index.js.map [22m[32m5.68 KB[39m
|
148
146
|
[32mESM[39m [1mdist/react-native/testing.js.map [22m[32m176.00 B[39m
|
149
147
|
[32mESM[39m [1mdist/react-native/crypto.js.map [22m[32m197.00 B[39m
|
150
|
-
[32mESM[39m ⚡️ Build success in
|
151
|
-
[32mESM[39m [1mdist/
|
152
|
-
[32mESM[39m [1mdist/
|
153
|
-
[32mESM[39m
|
148
|
+
[32mESM[39m ⚡️ Build success in 30ms
|
149
|
+
[32mESM[39m [1mdist/react-core/index.js [22m[32m10.72 KB[39m
|
150
|
+
[32mESM[39m [1mdist/react-core/testing.js [22m[32m1.17 KB[39m
|
151
|
+
[32mESM[39m [1mdist/react-core/chunk-7DYMJ74I.js [22m[32m279.00 B[39m
|
152
|
+
[32mESM[39m [1mdist/react-core/index.js.map [22m[32m33.90 KB[39m
|
153
|
+
[32mESM[39m [1mdist/react-core/testing.js.map [22m[32m1.82 KB[39m
|
154
|
+
[32mESM[39m [1mdist/react-core/chunk-7DYMJ74I.js.map [22m[32m533.00 B[39m
|
155
|
+
[32mESM[39m ⚡️ Build success in 33ms
|
154
156
|
[32mESM[39m [1mdist/expo/index.js [22m[32m4.68 KB[39m
|
155
157
|
[32mESM[39m [1mdist/expo/testing.js [22m[32m112.00 B[39m
|
156
158
|
[32mESM[39m [1mdist/expo/crypto.js [22m[32m153.00 B[39m
|
157
159
|
[32mESM[39m [1mdist/expo/index.js.map [22m[32m10.23 KB[39m
|
158
160
|
[32mESM[39m [1mdist/expo/testing.js.map [22m[32m168.00 B[39m
|
159
161
|
[32mESM[39m [1mdist/expo/crypto.js.map [22m[32m189.00 B[39m
|
160
|
-
[32mESM[39m ⚡️ Build success in
|
161
|
-
[32mESM[39m [1mdist/
|
162
|
+
[32mESM[39m ⚡️ Build success in 38ms
|
163
|
+
[32mESM[39m [1mdist/prosemirror/index.js [22m[32m77.76 KB[39m
|
164
|
+
[32mESM[39m [1mdist/prosemirror/index.js.map [22m[32m307.20 KB[39m
|
165
|
+
[32mESM[39m ⚡️ Build success in 46ms
|
162
166
|
[32mESM[39m [1mdist/react/index.js [22m[32m24.76 KB[39m
|
167
|
+
[32mESM[39m [1mdist/react/testing.js [22m[32m122.00 B[39m
|
163
168
|
[32mESM[39m [1mdist/react/testing.js.map [22m[32m165.00 B[39m
|
164
169
|
[32mESM[39m [1mdist/react/index.js.map [22m[32m53.56 KB[39m
|
165
|
-
[32mESM[39m ⚡️ Build success in
|
170
|
+
[32mESM[39m ⚡️ Build success in 45ms
|
166
171
|
[32mESM[39m [1mdist/react-native-core/index.js [22m[32m18.03 KB[39m
|
167
172
|
[32mESM[39m [1mdist/react-native-core/crypto.js [22m[32m2.10 KB[39m
|
168
173
|
[32mESM[39m [1mdist/react-native-core/testing.js [22m[32m119.00 B[39m
|
169
174
|
[32mESM[39m [1mdist/react-native-core/index.js.map [22m[32m36.85 KB[39m
|
170
175
|
[32mESM[39m [1mdist/react-native-core/crypto.js.map [22m[32m4.25 KB[39m
|
171
176
|
[32mESM[39m [1mdist/react-native-core/testing.js.map [22m[32m175.00 B[39m
|
172
|
-
[32mESM[39m ⚡️ Build success in
|
173
|
-
[32mESM[39m [1mdist/prosemirror/index.js [22m[32m77.76 KB[39m
|
174
|
-
[32mESM[39m [1mdist/prosemirror/index.js.map [22m[32m307.20 KB[39m
|
175
|
-
[32mESM[39m ⚡️ Build success in 55ms
|
177
|
+
[32mESM[39m ⚡️ Build success in 45ms
|
176
178
|
[32mESM[39m [1mdist/inspector/index.js [22m[32m69.71 KB[39m
|
177
179
|
[32mESM[39m [1mdist/inspector/index.js.map [22m[32m121.38 KB[39m
|
178
|
-
[32mESM[39m ⚡️ Build success in
|
180
|
+
[32mESM[39m ⚡️ Build success in 64ms
|
179
181
|
[32mESM[39m [1mdist/index.js [22m[32m26.13 KB[39m
|
180
182
|
[32mESM[39m [1mdist/testing.js [22m[32m7.17 KB[39m
|
181
|
-
[32mESM[39m [1mdist/chunk-
|
182
|
-
[32mESM[39m [1mdist/index.js.map [22m[32m52.92 KB[39m
|
183
|
+
[32mESM[39m [1mdist/chunk-GRN6OAUX.js [22m[32m174.37 KB[39m
|
183
184
|
[32mESM[39m [1mdist/testing.js.map [22m[32m14.10 KB[39m
|
184
|
-
[32mESM[39m [1mdist/
|
185
|
-
[32mESM[39m
|
185
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m52.92 KB[39m
|
186
|
+
[32mESM[39m [1mdist/chunk-GRN6OAUX.js.map [22m[32m415.70 KB[39m
|
187
|
+
[32mESM[39m ⚡️ Build success in 77ms
|
186
188
|
[32mESM[39m [1mdist/inspector/register-custom-element.js [22m[32m218.00 B[39m
|
187
189
|
[32mESM[39m [1mdist/inspector/register-custom-element.js.map [22m[32m314.00 B[39m
|
188
190
|
[32mESM[39m [1mdist/inspector/custom-element-G6SPZEBR.js [22m[32m1.54 MB[39m
|
189
191
|
[32mESM[39m [1mdist/inspector/custom-element-G6SPZEBR.js.map [22m[32m2.36 MB[39m
|
190
|
-
[32mESM[39m ⚡️ Build success in
|
192
|
+
[32mESM[39m ⚡️ Build success in 110ms
|
191
193
|
|
192
|
-
> jazz-tools@0.18.
|
194
|
+
> jazz-tools@0.18.15 types /home/runner/_work/jazz/jazz/packages/jazz-tools
|
193
195
|
> tsc --outDir dist
|
194
196
|
|
195
197
|
|
196
|
-
> jazz-tools@0.18.
|
198
|
+
> jazz-tools@0.18.15 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
|
197
199
|
> rm -rf dist/svelte && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json
|
198
200
|
|
199
201
|
src/svelte -> dist/svelte
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,28 @@
|
|
1
1
|
# jazz-tools
|
2
2
|
|
3
|
+
## 0.18.15
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- a584ab3: Add WasmCrypto support for Cloudflare Workers and edge runtimes by importing `jazz-tools/load-edge-wasm`.
|
8
|
+
|
9
|
+
- Enable WasmCrypto functionality by initializing the WebAssembly environment with the import: `import "jazz-tools/load-edge-wasm"` in edge runtimes.
|
10
|
+
- Guarantee compatibility across Cloudflare Workers and other edge runtime environments.
|
11
|
+
|
12
|
+
- Updated dependencies [a584ab3]
|
13
|
+
- cojson@0.18.15
|
14
|
+
- cojson-storage-indexeddb@0.18.15
|
15
|
+
- cojson-transport-ws@0.18.15
|
16
|
+
|
17
|
+
## 0.18.14
|
18
|
+
|
19
|
+
### Patch Changes
|
20
|
+
|
21
|
+
- a04435e: Optimized updates on large subscriptions
|
22
|
+
- cojson@0.18.14
|
23
|
+
- cojson-storage-indexeddb@0.18.14
|
24
|
+
- cojson-transport-ws@0.18.14
|
25
|
+
|
3
26
|
## 0.18.13
|
4
27
|
|
5
28
|
### Patch Changes
|
@@ -3735,6 +3735,14 @@ var SubscriptionScope = class _SubscriptionScope {
|
|
3735
3735
|
this.unstable_branch = unstable_branch;
|
3736
3736
|
this.childNodes = /* @__PURE__ */ new Map();
|
3737
3737
|
this.childValues = /* @__PURE__ */ new Map();
|
3738
|
+
/**
|
3739
|
+
* Explicitly-loaded child ids that are unloaded
|
3740
|
+
*/
|
3741
|
+
this.pendingLoadedChildren = /* @__PURE__ */ new Set();
|
3742
|
+
/**
|
3743
|
+
* Autoloaded child ids that are unloaded
|
3744
|
+
*/
|
3745
|
+
this.pendingAutoloadedChildren = /* @__PURE__ */ new Set();
|
3738
3746
|
this.childErrors = /* @__PURE__ */ new Map();
|
3739
3747
|
this.validationErrors = /* @__PURE__ */ new Map();
|
3740
3748
|
this.dirty = false;
|
@@ -3750,6 +3758,8 @@ var SubscriptionScope = class _SubscriptionScope {
|
|
3750
3758
|
if (value.type === "unloaded") {
|
3751
3759
|
return;
|
3752
3760
|
}
|
3761
|
+
this.pendingLoadedChildren.delete(id);
|
3762
|
+
this.pendingAutoloadedChildren.delete(id);
|
3753
3763
|
this.childValues.set(id, value);
|
3754
3764
|
if (value.type === "unavailable" || value.type === "unauthorized") {
|
3755
3765
|
this.childErrors.set(id, value.prependPath(key ?? id));
|
@@ -3901,12 +3911,7 @@ var SubscriptionScope = class _SubscriptionScope {
|
|
3901
3911
|
if (this.isStreaming() && !this.isFileStream()) {
|
3902
3912
|
return false;
|
3903
3913
|
}
|
3904
|
-
|
3905
|
-
if (value.type === "unloaded" && !this.autoloaded.has(value.id)) {
|
3906
|
-
return false;
|
3907
|
-
}
|
3908
|
-
}
|
3909
|
-
return true;
|
3914
|
+
return this.pendingLoadedChildren.size === 0;
|
3910
3915
|
}
|
3911
3916
|
getCurrentValue() {
|
3912
3917
|
if (this.value.type === "unauthorized" || this.value.type === "unavailable") {
|
@@ -3984,14 +3989,17 @@ var SubscriptionScope = class _SubscriptionScope {
|
|
3984
3989
|
}
|
3985
3990
|
this.silenceUpdates = false;
|
3986
3991
|
}
|
3992
|
+
isSubscribedToId(id) {
|
3993
|
+
return this.idsSubscribed.has(id) || this.childValues.has(id) || this.pendingAutoloadedChildren.has(id) || this.pendingLoadedChildren.has(id);
|
3994
|
+
}
|
3987
3995
|
subscribeToId(id, descriptor) {
|
3988
|
-
if (this.
|
3996
|
+
if (this.isSubscribedToId(id)) {
|
3989
3997
|
return;
|
3990
3998
|
}
|
3991
3999
|
this.idsSubscribed.add(id);
|
3992
4000
|
this.autoloaded.add(id);
|
3993
4001
|
this.silenceUpdates = true;
|
3994
|
-
this.
|
4002
|
+
this.pendingAutoloadedChildren.add(id);
|
3995
4003
|
const child = new _SubscriptionScope(
|
3996
4004
|
this.node,
|
3997
4005
|
true,
|
@@ -4081,6 +4089,8 @@ var SubscriptionScope = class _SubscriptionScope {
|
|
4081
4089
|
if (childNode) {
|
4082
4090
|
childNode.destroy();
|
4083
4091
|
}
|
4092
|
+
this.pendingLoadedChildren.delete(id);
|
4093
|
+
this.pendingAutoloadedChildren.delete(id);
|
4084
4094
|
this.childNodes.delete(id);
|
4085
4095
|
this.childValues.delete(id);
|
4086
4096
|
}
|
@@ -4159,10 +4169,11 @@ var SubscriptionScope = class _SubscriptionScope {
|
|
4159
4169
|
return void 0;
|
4160
4170
|
}
|
4161
4171
|
loadChildNode(id, query, descriptor, key) {
|
4162
|
-
if (this.
|
4172
|
+
if (this.isSubscribedToId(id)) {
|
4163
4173
|
return;
|
4164
4174
|
}
|
4165
|
-
|
4175
|
+
const isAutoloaded = key && this.autoloadedKeys.has(key);
|
4176
|
+
if (isAutoloaded) {
|
4166
4177
|
this.autoloaded.add(id);
|
4167
4178
|
}
|
4168
4179
|
const skipInvalid = typeof query === "object" && query.$onError === null;
|
@@ -4173,7 +4184,11 @@ var SubscriptionScope = class _SubscriptionScope {
|
|
4173
4184
|
this.skipInvalidKeys.add(id);
|
4174
4185
|
}
|
4175
4186
|
const resolve = typeof query === "object" && query !== null ? { ...query } : query;
|
4176
|
-
|
4187
|
+
if (!isAutoloaded) {
|
4188
|
+
this.pendingLoadedChildren.add(id);
|
4189
|
+
} else {
|
4190
|
+
this.pendingAutoloadedChildren.add(id);
|
4191
|
+
}
|
4177
4192
|
const child = new _SubscriptionScope(
|
4178
4193
|
this.node,
|
4179
4194
|
resolve,
|
@@ -4216,7 +4231,7 @@ function getSubscriptionScope(value) {
|
|
4216
4231
|
}
|
4217
4232
|
function accessChildByKey(parent, childId, key) {
|
4218
4233
|
const subscriptionScope = getSubscriptionScope(parent);
|
4219
|
-
if (!subscriptionScope.
|
4234
|
+
if (!subscriptionScope.isSubscribedToId(childId)) {
|
4220
4235
|
subscriptionScope.subscribeToKey(key);
|
4221
4236
|
}
|
4222
4237
|
const value = subscriptionScope.childValues.get(childId);
|
@@ -6063,4 +6078,4 @@ export {
|
|
6063
6078
|
JazzContextManager
|
6064
6079
|
};
|
6065
6080
|
/* istanbul ignore file -- @preserve */
|
6066
|
-
//# sourceMappingURL=chunk-
|
6081
|
+
//# sourceMappingURL=chunk-GRN6OAUX.js.map
|