@budibase/worker 2.29.8 → 2.29.13

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/worker",
3
3
  "email": "hi@budibase.com",
4
- "version": "2.29.8",
4
+ "version": "2.29.13",
5
5
  "description": "Budibase background service",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -37,12 +37,12 @@
37
37
  "author": "Budibase",
38
38
  "license": "GPL-3.0",
39
39
  "dependencies": {
40
- "@budibase/backend-core": "2.29.8",
41
- "@budibase/pro": "2.29.8",
42
- "@budibase/string-templates": "2.29.8",
43
- "@budibase/types": "2.29.8",
40
+ "@budibase/backend-core": "2.29.13",
41
+ "@budibase/pro": "2.29.13",
42
+ "@budibase/string-templates": "2.29.13",
43
+ "@budibase/types": "2.29.13",
44
44
  "@koa/router": "8.0.8",
45
- "@techpass/passport-openidconnect": "0.3.2",
45
+ "@techpass/passport-openidconnect": "0.3.3",
46
46
  "@types/global-agent": "2.1.1",
47
47
  "aws-sdk": "2.1030.0",
48
48
  "bcrypt": "5.1.0",
@@ -69,9 +69,7 @@
69
69
  "passport-local": "1.0.0",
70
70
  "pouchdb": "7.3.0",
71
71
  "pouchdb-all-dbs": "1.1.1",
72
- "server-destroy": "1.0.1",
73
- "undici": "^6.0.1",
74
- "undici-types": "^6.0.1"
72
+ "server-destroy": "1.0.1"
75
73
  },
76
74
  "devDependencies": {
77
75
  "@swc/core": "1.3.71",
@@ -109,5 +107,5 @@
109
107
  }
110
108
  }
111
109
  },
112
- "gitHead": "bae20c501ab454a1220ffe5727013184805982ab"
110
+ "gitHead": "45bf2019957b2b038299a6a2043ea5a4c7eabfdb"
113
111
  }
@@ -574,6 +574,41 @@ describe("scim", () => {
574
574
 
575
575
  expect(events.user.updated).toHaveBeenCalledTimes(1)
576
576
  })
577
+
578
+ it("an existing user's email can be updated", async () => {
579
+ const newEmail = structures.generator.email()
580
+ const body: ScimUpdateRequest = {
581
+ schemas: ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
582
+ Operations: [
583
+ {
584
+ op: "Replace",
585
+ path: 'emails[type eq "work"].value',
586
+ value: newEmail,
587
+ },
588
+ ],
589
+ }
590
+
591
+ const response = await patchScimUser({ id: user.id, body })
592
+
593
+ const expectedScimUser: ScimUserResponse = {
594
+ ...user,
595
+ emails: [
596
+ {
597
+ value: newEmail,
598
+ type: "work",
599
+ primary: true,
600
+ },
601
+ ],
602
+ }
603
+ expect(response).toEqual(expectedScimUser)
604
+
605
+ const persistedUser = await config.api.scimUsersAPI.find(user.id)
606
+ expect(persistedUser).toEqual(expectedScimUser)
607
+
608
+ expect((await config.api.users.getUser(user.id)).body).toEqual(
609
+ expect.objectContaining({ _id: user.id, email: newEmail })
610
+ )
611
+ })
577
612
  })
578
613
 
579
614
  describe("DELETE /api/global/scim/v2/users/:id", () => {