@budibase/worker 1.1.2 → 1.1.5

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": "1.1.2",
4
+ "version": "1.1.5",
5
5
  "description": "Budibase background service",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -34,9 +34,9 @@
34
34
  "author": "Budibase",
35
35
  "license": "GPL-3.0",
36
36
  "dependencies": {
37
- "@budibase/backend-core": "^1.1.2",
38
- "@budibase/pro": "1.0.221",
39
- "@budibase/string-templates": "^1.1.2",
37
+ "@budibase/backend-core": "^1.1.5",
38
+ "@budibase/pro": "1.1.4",
39
+ "@budibase/string-templates": "^1.1.5",
40
40
  "@koa/router": "8.0.8",
41
41
  "@sentry/node": "6.17.7",
42
42
  "@techpass/passport-openidconnect": "0.3.2",
@@ -66,7 +66,7 @@
66
66
  "server-destroy": "1.0.1"
67
67
  },
68
68
  "devDependencies": {
69
- "@budibase/types": "^1.1.2",
69
+ "@budibase/types": "^1.1.5",
70
70
  "@types/jest": "26.0.23",
71
71
  "@types/koa": "2.13.4",
72
72
  "@types/koa-router": "7.4.4",
@@ -100,5 +100,5 @@
100
100
  "./scripts/jestSetup.js"
101
101
  ]
102
102
  },
103
- "gitHead": "f55e277e69ab8eb679ef2ce5d80a506ef622c183"
103
+ "gitHead": "fb3316dd49ef6e0b1be830237682993b4a0ad5cc"
104
104
  }
@@ -75,7 +75,7 @@ function buildConfigSaveValidation() {
75
75
  { is: Configs.OIDC, then: oidcValidation() }
76
76
  ],
77
77
  }),
78
- }).required(),
78
+ }).required().unknown(true),
79
79
  )
80
80
  }
81
81
 
@@ -84,14 +84,14 @@ function buildUploadValidation() {
84
84
  return joiValidator.params(Joi.object({
85
85
  type: Joi.string().valid(...Object.values(Configs)).required(),
86
86
  name: Joi.string().required(),
87
- }).required())
87
+ }).required().unknown(true))
88
88
  }
89
89
 
90
90
  function buildConfigGetValidation() {
91
91
  // prettier-ignore
92
92
  return joiValidator.params(Joi.object({
93
93
  type: Joi.string().valid(...Object.values(Configs)).required()
94
- }).unknown(true).required())
94
+ }).required().unknown(true))
95
95
  }
96
96
 
97
97
  router
@@ -69,7 +69,7 @@ router
69
69
  )
70
70
  .get("/api/global/users/tenant/:id", controller.tenantUserLookup)
71
71
  // global endpoint but needs to come at end (blocks other endpoints otherwise)
72
- .get("/api/global/users/:id", adminOnly, controller.find)
72
+ .get("/api/global/users/:id", builderOrAdmin, controller.find)
73
73
  // DEPRECATED - use new versions with self API
74
74
  .get("/api/global/users/self", selfController.getSelf)
75
75
  .post(
@@ -19,8 +19,14 @@ describe("/api/global/email", () => {
19
19
  async function sendRealEmail(purpose) {
20
20
  let response, text
21
21
  try {
22
- await config.saveEtherealSmtpConfig()
23
- await config.saveSettingsConfig()
22
+ const timeout = () => new Promise((resolve, reject) =>
23
+ setTimeout(() => reject({
24
+ status: 301,
25
+ errno: "ETIME"
26
+ }), 20000)
27
+ )
28
+ await Promise.race([config.saveEtherealSmtpConfig(), timeout()])
29
+ await Promise.race([config.saveSettingsConfig(), timeout()])
24
30
  const user = await config.getUser("test@test.com")
25
31
  const res = await request
26
32
  .post(`/api/global/email/send`)