jazz-tools 0.13.23 → 0.13.26
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 +5 -5
- package/CHANGELOG.md +13 -0
- package/dist/{chunk-K7VKB2XQ.js → chunk-E4PALNK7.js} +5 -6
- package/dist/chunk-E4PALNK7.js.map +1 -0
- package/dist/coValues/coPlainText.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/subscribe/utils.d.ts.map +1 -1
- package/dist/testing.js +1 -1
- package/dist/tests/load.test.d.ts +2 -0
- package/dist/tests/load.test.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/coValues/coPlainText.ts +1 -1
- package/src/subscribe/SubscriptionScope.ts +3 -3
- package/src/subscribe/utils.ts +3 -3
- package/src/tests/account.test.ts +42 -1
- package/src/tests/load.test.ts +116 -0
- package/dist/chunk-K7VKB2XQ.js.map +0 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> jazz-tools@0.13.
|
2
|
+
> jazz-tools@0.13.26 build /home/runner/_work/jazz/jazz/packages/jazz-tools
|
3
3
|
> tsup && pnpm types
|
4
4
|
|
5
5
|
[34mCLI[39m Building entry: {"index":"src/index.ts","testing":"src/testing.ts"}
|
@@ -11,12 +11,12 @@
|
|
11
11
|
[34mESM[39m Build start
|
12
12
|
[32mESM[39m [1mdist/index.js [22m[32m1.48 KB[39m
|
13
13
|
[32mESM[39m [1mdist/testing.js [22m[32m6.27 KB[39m
|
14
|
-
[32mESM[39m [1mdist/chunk-
|
14
|
+
[32mESM[39m [1mdist/chunk-E4PALNK7.js [22m[32m122.85 KB[39m
|
15
15
|
[32mESM[39m [1mdist/index.js.map [22m[32m258.00 B[39m
|
16
16
|
[32mESM[39m [1mdist/testing.js.map [22m[32m12.38 KB[39m
|
17
|
-
[32mESM[39m [1mdist/chunk-
|
18
|
-
[32mESM[39m ⚡️ Build success in
|
17
|
+
[32mESM[39m [1mdist/chunk-E4PALNK7.js.map [22m[32m281.45 KB[39m
|
18
|
+
[32mESM[39m ⚡️ Build success in 57ms
|
19
19
|
|
20
|
-
> jazz-tools@0.13.
|
20
|
+
> jazz-tools@0.13.26 types /home/runner/_work/jazz/jazz/packages/jazz-tools
|
21
21
|
> tsc --outDir dist
|
22
22
|
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# jazz-tools
|
2
2
|
|
3
|
+
## 0.13.26
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- ff846d9: Fix loading accounts with the new subscription engine
|
8
|
+
|
9
|
+
## 0.13.25
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- Updated dependencies [a846e07]
|
14
|
+
- cojson@0.13.25
|
15
|
+
|
3
16
|
## 0.13.23
|
4
17
|
|
5
18
|
### Patch Changes
|
@@ -136,7 +136,7 @@ var JazzError = class _JazzError {
|
|
136
136
|
};
|
137
137
|
|
138
138
|
// src/subscribe/utils.ts
|
139
|
-
import { RawAccount
|
139
|
+
import { RawAccount } from "cojson";
|
140
140
|
|
141
141
|
// src/coValues/registeredSchemas.ts
|
142
142
|
var RegisteredSchemas = {};
|
@@ -157,7 +157,7 @@ var coValuesCache = {
|
|
157
157
|
|
158
158
|
// src/subscribe/utils.ts
|
159
159
|
function getOwnerFromRawValue(raw) {
|
160
|
-
|
160
|
+
const owner = raw.group;
|
161
161
|
return coValuesCache.get(
|
162
162
|
owner,
|
163
163
|
() => owner instanceof RawAccount ? RegisteredSchemas["Account"].fromRaw(owner) : RegisteredSchemas["Group"].fromRaw(owner)
|
@@ -245,9 +245,8 @@ var SubscriptionScope = class _SubscriptionScope {
|
|
245
245
|
this.triggerUpdate();
|
246
246
|
return;
|
247
247
|
}
|
248
|
-
const owner = getOwnerFromRawValue(update);
|
249
248
|
const ruleset = update.core.verified.header.ruleset;
|
250
|
-
const hasAccess = ruleset.type
|
249
|
+
const hasAccess = ruleset.type !== "ownedByGroup" || getOwnerFromRawValue(update).myRole() !== void 0;
|
251
250
|
if (!hasAccess) {
|
252
251
|
if (this.value.type !== "unauthorized") {
|
253
252
|
this.updateValue(
|
@@ -3508,7 +3507,7 @@ var CoPlainText = class extends String {
|
|
3508
3507
|
*
|
3509
3508
|
* The 'hint' parameter indicates the preferred type of conversion:
|
3510
3509
|
* - 'string': prefer string conversion
|
3511
|
-
* - 'number': prefer number conversion (
|
3510
|
+
* - 'number': prefer number conversion (attempt to parse the text as a number)
|
3512
3511
|
* - 'default': usually treat as string
|
3513
3512
|
*/
|
3514
3513
|
[Symbol.toPrimitive](hint) {
|
@@ -4274,4 +4273,4 @@ export {
|
|
4274
4273
|
consumeInviteLink
|
4275
4274
|
};
|
4276
4275
|
/* istanbul ignore file -- @preserve */
|
4277
|
-
//# sourceMappingURL=chunk-
|
4276
|
+
//# sourceMappingURL=chunk-E4PALNK7.js.map
|