@budibase/worker 2.9.13 → 2.9.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/worker",
3
3
  "email": "hi@budibase.com",
4
- "version": "2.9.13",
4
+ "version": "2.9.15",
5
5
  "description": "Budibase background service",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -38,10 +38,10 @@
38
38
  "author": "Budibase",
39
39
  "license": "GPL-3.0",
40
40
  "dependencies": {
41
- "@budibase/backend-core": "2.9.13",
42
- "@budibase/pro": "2.9.13",
43
- "@budibase/string-templates": "2.9.13",
44
- "@budibase/types": "2.9.13",
41
+ "@budibase/backend-core": "2.9.15",
42
+ "@budibase/pro": "2.9.15",
43
+ "@budibase/string-templates": "2.9.15",
44
+ "@budibase/types": "2.9.15",
45
45
  "@koa/router": "8.0.8",
46
46
  "@sentry/node": "6.17.7",
47
47
  "@techpass/passport-openidconnect": "0.3.2",
@@ -103,5 +103,5 @@
103
103
  "typescript": "4.7.3",
104
104
  "update-dotenv": "1.1.1"
105
105
  },
106
- "gitHead": "08e7e022d61cdac720b7c1a32784393ad0f50f50"
106
+ "gitHead": "8b5f0417917254f2468b52e9519666c2e1fdf4ce"
107
107
  }
@@ -1,12 +1,14 @@
1
1
  import { auth } from "@budibase/backend-core"
2
2
  import Joi from "joi"
3
3
 
4
+ const OPTIONAL_STRING = Joi.string().allow(null, "")
5
+
4
6
  let schema: any = {
5
- email: Joi.string().allow(null, ""),
6
- password: Joi.string().allow(null, ""),
7
+ email: OPTIONAL_STRING,
8
+ password: OPTIONAL_STRING,
7
9
  forceResetPassword: Joi.boolean().optional(),
8
- firstName: Joi.string().allow(null, ""),
9
- lastName: Joi.string().allow(null, ""),
10
+ firstName: OPTIONAL_STRING,
11
+ lastName: OPTIONAL_STRING,
10
12
  builder: Joi.object({
11
13
  global: Joi.boolean().optional(),
12
14
  apps: Joi.array().optional(),
@@ -21,8 +23,8 @@ export const buildSelfSaveValidation = () => {
21
23
  schema = {
22
24
  password: Joi.string().optional(),
23
25
  forceResetPassword: Joi.boolean().optional(),
24
- firstName: Joi.string().allow("").optional(),
25
- lastName: Joi.string().allow("").optional(),
26
+ firstName: OPTIONAL_STRING,
27
+ lastName: OPTIONAL_STRING,
26
28
  onboardedAt: Joi.string().optional(),
27
29
  }
28
30
  return auth.joiValidator.body(Joi.object(schema).required().unknown(false))