@budibase/worker 2.13.52 → 2.14.0

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/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM node:18-alpine
1
+ FROM node:20-alpine
2
2
 
3
3
  LABEL com.centurylinklabs.watchtower.lifecycle.pre-check="scripts/watchtower-hooks/pre-check.sh"
4
4
  LABEL com.centurylinklabs.watchtower.lifecycle.pre-update="scripts/watchtower-hooks/pre-update.sh"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/worker",
3
3
  "email": "hi@budibase.com",
4
- "version": "2.13.52",
4
+ "version": "2.14.0",
5
5
  "description": "Budibase background service",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -37,10 +37,10 @@
37
37
  "author": "Budibase",
38
38
  "license": "GPL-3.0",
39
39
  "dependencies": {
40
- "@budibase/backend-core": "2.13.52",
41
- "@budibase/pro": "2.13.52",
42
- "@budibase/string-templates": "2.13.52",
43
- "@budibase/types": "2.13.52",
40
+ "@budibase/backend-core": "2.14.0",
41
+ "@budibase/pro": "2.14.0",
42
+ "@budibase/string-templates": "2.14.0",
43
+ "@budibase/types": "2.14.0",
44
44
  "@koa/router": "8.0.8",
45
45
  "@techpass/passport-openidconnect": "0.3.2",
46
46
  "@types/global-agent": "2.1.1",
@@ -79,7 +79,6 @@
79
79
  "@types/koa": "2.13.4",
80
80
  "@types/koa__router": "8.0.8",
81
81
  "@types/lodash": "4.14.200",
82
- "@types/node": "18.17.0",
83
82
  "@types/node-fetch": "2.6.4",
84
83
  "@types/server-destroy": "1.0.1",
85
84
  "@types/supertest": "2.0.14",
@@ -107,5 +106,5 @@
107
106
  }
108
107
  }
109
108
  },
110
- "gitHead": "7afc8a9d0ca42fdb13b6146f7bb93ecf18023d15"
109
+ "gitHead": "099b1b7ffa7a54a523f212f79adac1d03e805daa"
111
110
  }
@@ -30,6 +30,7 @@ async function init() {
30
30
  ENABLE_EMAIL_TEST_MODE: "1",
31
31
  HTTP_LOGGING: "0",
32
32
  VERSION: "0.0.0+local",
33
+ PASSWORD_MIN_LENGTH: "1",
33
34
  }
34
35
 
35
36
  config = { ...config, ...existingConfig }
@@ -122,10 +122,10 @@ export const resetUpdate = async (ctx: Ctx<PasswordResetUpdateRequest>) => {
122
122
  ctx.body = {
123
123
  message: "password reset successfully.",
124
124
  }
125
- } catch (err) {
125
+ } catch (err: any) {
126
126
  console.warn(err)
127
127
  // hide any details of the error for security
128
- ctx.throw(400, "Cannot reset password.")
128
+ ctx.throw(400, err.message || "Cannot reset password.")
129
129
  }
130
130
  }
131
131
 
@@ -229,7 +229,7 @@ describe("/api/global/auth", () => {
229
229
  )
230
230
 
231
231
  expect(res.body).toEqual({
232
- message: "Cannot reset password.",
232
+ message: "Password change is disabled for this user",
233
233
  status: 400,
234
234
  })
235
235
  }
@@ -261,8 +261,12 @@ describe("/api/global/auth", () => {
261
261
  )
262
262
 
263
263
  // convert to account owner now that password has been requested
264
- const account = structures.accounts.ssoAccount() as CloudAccount
265
- mocks.accounts.getAccount.mockReturnValueOnce(
264
+ const account: CloudAccount = {
265
+ ...structures.accounts.ssoAccount(),
266
+ budibaseUserId: "budibaseUserId",
267
+ email: user.email,
268
+ }
269
+ mocks.accounts.getAccountByTenantId.mockReturnValueOnce(
266
270
  Promise.resolve(account)
267
271
  )
268
272
 
@@ -45,7 +45,7 @@ class TestConfiguration {
45
45
  tenantId: string
46
46
  user?: User
47
47
  apiKey?: string
48
- userPassword = "test"
48
+ userPassword = "password"
49
49
 
50
50
  constructor(opts: { openServer: boolean } = { openServer: true }) {
51
51
  // default to cloud hosting
@@ -101,7 +101,7 @@ export class UserAPI extends TestAPI {
101
101
  if (!request) {
102
102
  request = {
103
103
  email: structures.email(),
104
- password: generator.string(),
104
+ password: generator.string({ length: 8 }),
105
105
  tenantId: structures.tenant.id(),
106
106
  }
107
107
  }