@budibase/worker 1.0.219-alpha.9 → 1.0.220-alpha.1

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/.yarnrc ADDED
@@ -0,0 +1 @@
1
+ network-timeout 100000
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/worker",
3
3
  "email": "hi@budibase.com",
4
- "version": "1.0.219-alpha.9",
4
+ "version": "1.0.220-alpha.1",
5
5
  "description": "Budibase background service",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -34,10 +34,9 @@
34
34
  "author": "Budibase",
35
35
  "license": "GPL-3.0",
36
36
  "dependencies": {
37
- "@budibase/backend-core": "^1.0.219-alpha.9",
38
- "@budibase/pro": "1.0.219-alpha.8",
39
- "@budibase/string-templates": "^1.0.219-alpha.9",
40
- "@budibase/types": "^1.0.219-alpha.9",
37
+ "@budibase/backend-core": "^1.0.220-alpha.1",
38
+ "@budibase/pro": "1.0.220-alpha.0",
39
+ "@budibase/string-templates": "^1.0.220-alpha.1",
41
40
  "@koa/router": "8.0.8",
42
41
  "@sentry/node": "6.17.7",
43
42
  "@techpass/passport-openidconnect": "0.3.2",
@@ -67,6 +66,7 @@
67
66
  "server-destroy": "1.0.1"
68
67
  },
69
68
  "devDependencies": {
69
+ "@budibase/types": "^1.0.220-alpha.1",
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": "b2f9898d0faef404230d6ae8ef5303032edd4b2b"
103
+ "gitHead": "dc59ba525353511de475acc902a4d3eae8815db1"
104
104
  }
@@ -17,6 +17,7 @@ const {
17
17
  withCache,
18
18
  CacheKeys,
19
19
  bustCache,
20
+ cache,
20
21
  } = require("@budibase/backend-core/cache")
21
22
  const { events } = require("@budibase/backend-core")
22
23
  const { checkAnyUserExists } = require("../../../utilities/users")
@@ -365,9 +366,9 @@ exports.upload = async function (ctx) {
365
366
  exports.destroy = async function (ctx) {
366
367
  const db = getGlobalDB()
367
368
  const { id, rev } = ctx.params
368
-
369
369
  try {
370
370
  await db.remove(id, rev)
371
+ await cache.delete(CacheKeys.CHECKLIST)
371
372
  ctx.body = { message: "Config deleted successfully" }
372
373
  } catch (err) {
373
374
  ctx.throw(err.status, err)
@@ -60,11 +60,13 @@ export const adminUser = async (ctx: any) => {
60
60
  tenantId,
61
61
  }
62
62
  try {
63
+ // always bust checklist beforehand, if an error occurs but can proceed, don't get
64
+ // stuck in a cycle
65
+ await cache.bustCache(cache.CacheKeys.CHECKLIST)
63
66
  const finalUser = await users.save(user, {
64
67
  hashPassword,
65
68
  requirePassword,
66
69
  })
67
- await cache.bustCache(cache.CacheKeys.CHECKLIST)
68
70
 
69
71
  // events
70
72
  let account: CloudAccount | undefined