@budibase/worker 2.33.12 → 2.33.14

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
@@ -24,7 +24,8 @@ COPY packages/worker/dist/yarn.lock .
24
24
 
25
25
  RUN ../scripts/removeWorkspaceDependencies.sh package.json
26
26
 
27
- RUN yarn install --production=true --network-timeout 1000000
27
+ ARG TARGETPLATFORM
28
+ RUN --mount=type=cache,target=/root/.yarn/${TARGETPLATFORM} YARN_CACHE_FOLDER=/root/.yarn/${TARGETPLATFORM} yarn install --production
28
29
  # Remove unneeded data from file system to reduce image size
29
30
  RUN apk del .gyp \
30
31
  && yarn cache clean
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/worker",
3
3
  "email": "hi@budibase.com",
4
- "version": "2.33.12",
4
+ "version": "2.33.14",
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.33.12",
41
- "@budibase/pro": "2.33.12",
42
- "@budibase/string-templates": "2.33.12",
43
- "@budibase/types": "2.33.12",
40
+ "@budibase/backend-core": "2.33.14",
41
+ "@budibase/pro": "2.33.14",
42
+ "@budibase/string-templates": "2.33.14",
43
+ "@budibase/types": "2.33.14",
44
44
  "@koa/router": "8.0.8",
45
45
  "@techpass/passport-openidconnect": "0.3.3",
46
46
  "@types/global-agent": "2.1.1",
@@ -107,5 +107,5 @@
107
107
  }
108
108
  }
109
109
  },
110
- "gitHead": "d595f52ef64af41573e814ccf4125c5f1b13e14b"
110
+ "gitHead": "0d3a15ef70e538e0f7bb85b651ca676e1c33b621"
111
111
  }
@@ -312,16 +312,21 @@ export const tenantUserLookup = async (ctx: any) => {
312
312
  * So the account holder may not be found until further pagination has occurred
313
313
  */
314
314
  export const accountHolderLookup = async (ctx: Ctx) => {
315
- const users = await userSdk.core.getAllUsers()
316
- const response = await userSdk.core.getExistingAccounts(
317
- users.map(u => u.email)
318
- )
319
- const holder = response[0]
320
- if (!holder) {
321
- return
315
+ try {
316
+ const users = await userSdk.core.getAllUsers()
317
+ const response = await userSdk.core.getExistingAccounts(
318
+ users.map(u => u.email)
319
+ )
320
+ const holder = response[0]
321
+ if (!holder) {
322
+ ctx.body = null
323
+ return
324
+ }
325
+ holder._id = users.find(u => u.email === holder.email)?._id
326
+ ctx.body = holder
327
+ } catch (e) {
328
+ ctx.body = null
322
329
  }
323
- holder._id = users.find(u => u.email === holder.email)?._id
324
- ctx.body = holder
325
330
  }
326
331
 
327
332
  /*