jazz-tools 0.13.34 → 0.13.35

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.
@@ -10,13 +10,13 @@
10
10
  CLI Target: es2021
11
11
  CLI Cleaning output folder
12
12
  ESM Build start
13
+ ESM dist/index.js 1.48 KB
13
14
  ESM dist/testing.js 6.27 KB
14
15
  ESM dist/chunk-IJU4XPFS.js 123.33 KB
15
- ESM dist/index.js 1.48 KB
16
- ESM dist/testing.js.map 12.38 KB
17
16
  ESM dist/index.js.map 258.00 B
18
17
  ESM dist/chunk-IJU4XPFS.js.map 282.34 KB
19
- ESM ⚡️ Build success in 60ms
18
+ ESM dist/testing.js.map 12.38 KB
19
+ ESM ⚡️ Build success in 48ms
20
20
 
21
21
  > jazz-tools@0.13.34 types /Users/anselm/jazz/jazz/packages/jazz-tools
22
22
  > tsc --outDir dist
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # jazz-tools
2
2
 
3
+ ## 0.13.35
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [cea5434]
8
+ - cojson@0.13.35
9
+
3
10
  ## 0.13.34
4
11
 
5
12
  ### Patch Changes
package/package.json CHANGED
@@ -17,11 +17,11 @@
17
17
  },
18
18
  "type": "module",
19
19
  "license": "MIT",
20
- "version": "0.13.34",
20
+ "version": "0.13.35",
21
21
  "dependencies": {
22
22
  "@scure/bip39": "^1.3.0",
23
23
  "fast-myers-diff": "^3.2.0",
24
- "cojson": "0.13.34"
24
+ "cojson": "0.13.35"
25
25
  },
26
26
  "devDependencies": {
27
27
  "tsup": "8.3.5",
@@ -21,6 +21,7 @@ class Organization extends CoMap {
21
21
  statuses = co.ref(RequestsStatus);
22
22
  projects = co.ref(ProjectsList);
23
23
  mainGroup = co.ref(Group);
24
+ adminsGroup = co.ref(Group);
24
25
  }
25
26
 
26
27
  async function setup() {
@@ -66,6 +67,7 @@ async function setup() {
66
67
  // but this is the source of truth for admins
67
68
  statuses: RequestsStatus.create({}, adminsGroup),
68
69
  mainGroup: organizationGroup,
70
+ adminsGroup,
69
71
  },
70
72
  publicGroup,
71
73
  );
@@ -88,7 +90,7 @@ async function sendRequestToJoin(
88
90
  account: Account,
89
91
  ) {
90
92
  const organization = await Organization.load(organizationId, {
91
- resolve: { requests: true },
93
+ resolve: { requests: true, adminsGroup: true },
92
94
  loadAs: account,
93
95
  });
94
96
 
@@ -96,12 +98,15 @@ async function sendRequestToJoin(
96
98
  throw new Error("RequestsMap not found");
97
99
  }
98
100
 
101
+ const group = Group.create(account);
102
+ group.extend(organization.adminsGroup);
103
+
99
104
  const request = RequestToJoin.create(
100
105
  {
101
106
  account,
102
107
  status: "pending",
103
108
  },
104
- organization.requests._owner,
109
+ group,
105
110
  );
106
111
 
107
112
  organization.requests[account.id] = request;
@@ -264,8 +269,6 @@ describe("Request to join", () => {
264
269
 
265
270
  // With the writeOnly permission, the user can download the request
266
271
  // but not it's content
267
- assert(requestOnUser2);
268
- expect(requestOnUser2.status).toBe(undefined);
269
- expect(requestOnUser2.account).toBe(undefined);
272
+ expect(requestOnUser2).toBeNull();
270
273
  });
271
274
  });