jazz-tools 0.13.25 → 0.13.27

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > jazz-tools@0.13.25 build /home/runner/_work/jazz/jazz/packages/jazz-tools
2
+ > jazz-tools@0.13.27 build /home/runner/_work/jazz/jazz/packages/jazz-tools
3
3
  > tsup && pnpm types
4
4
 
5
5
  CLI Building entry: {"index":"src/index.ts","testing":"src/testing.ts"}
@@ -9,14 +9,14 @@
9
9
  CLI Target: es2021
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
- ESM dist/index.js 1.48 KB
13
12
  ESM dist/testing.js 6.27 KB
14
- ESM dist/chunk-Z6IXFGH3.js 122.91 KB
13
+ ESM dist/index.js 1.48 KB
14
+ ESM dist/chunk-E4PALNK7.js 122.85 KB
15
15
  ESM dist/index.js.map 258.00 B
16
16
  ESM dist/testing.js.map 12.38 KB
17
- ESM dist/chunk-Z6IXFGH3.js.map 281.53 KB
18
- ESM ⚡️ Build success in 50ms
17
+ ESM dist/chunk-E4PALNK7.js.map 281.45 KB
18
+ ESM ⚡️ Build success in 42ms
19
19
 
20
- > jazz-tools@0.13.25 types /home/runner/_work/jazz/jazz/packages/jazz-tools
20
+ > jazz-tools@0.13.27 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.27
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [6357052]
8
+ - cojson@0.13.27
9
+
10
+ ## 0.13.26
11
+
12
+ ### Patch Changes
13
+
14
+ - ff846d9: Fix loading accounts with the new subscription engine
15
+
3
16
  ## 0.13.25
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, RawGroup } from "cojson";
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
- let owner = raw instanceof RawGroup ? raw : raw.group;
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 === "group" || owner.myRole() !== void 0;
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(
@@ -4274,4 +4273,4 @@ export {
4274
4273
  consumeInviteLink
4275
4274
  };
4276
4275
  /* istanbul ignore file -- @preserve */
4277
- //# sourceMappingURL=chunk-Z6IXFGH3.js.map
4276
+ //# sourceMappingURL=chunk-E4PALNK7.js.map