@budibase/worker 2.5.3 → 2.5.5-alpha.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/worker",
3
3
  "email": "hi@budibase.com",
4
- "version": "2.5.3",
4
+ "version": "2.5.5-alpha.0",
5
5
  "description": "Budibase background service",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -22,6 +22,7 @@
22
22
  "build:docker": "docker build . -t worker-service --label version=$BUDIBASE_RELEASE_VERSION",
23
23
  "dev:stack:init": "node ./scripts/dev/manage.js init",
24
24
  "dev:builder": "npm run dev:stack:init && nodemon",
25
+ "dev:built": "yarn run dev:stack:init && yarn run run:docker",
25
26
  "test": "bash scripts/test.sh",
26
27
  "test:watch": "jest --watch",
27
28
  "env:multi:enable": "node scripts/multiTenancy.js enable",
@@ -36,10 +37,10 @@
36
37
  "author": "Budibase",
37
38
  "license": "GPL-3.0",
38
39
  "dependencies": {
39
- "@budibase/backend-core": "^2.5.3",
40
- "@budibase/pro": "2.5.2",
41
- "@budibase/string-templates": "^2.5.3",
42
- "@budibase/types": "^2.5.3",
40
+ "@budibase/backend-core": "2.5.5-alpha.0",
41
+ "@budibase/pro": "2.5.4",
42
+ "@budibase/string-templates": "2.5.5-alpha.0",
43
+ "@budibase/types": "2.5.5-alpha.0",
43
44
  "@koa/router": "8.0.8",
44
45
  "@sentry/node": "6.17.7",
45
46
  "@techpass/passport-openidconnect": "0.3.2",
@@ -56,7 +57,6 @@
56
57
  "koa-body": "4.2.0",
57
58
  "koa-compress": "4.0.1",
58
59
  "koa-passport": "4.1.4",
59
- "koa-pino-logger": "3.0.0",
60
60
  "koa-send": "5.0.1",
61
61
  "koa-session": "5.13.1",
62
62
  "koa-static": "5.0.0",
@@ -66,7 +66,6 @@
66
66
  "passport-google-oauth": "2.0.0",
67
67
  "passport-jwt": "4.0.0",
68
68
  "passport-local": "1.0.0",
69
- "pino-pretty": "4.8.0",
70
69
  "pouchdb": "7.3.0",
71
70
  "pouchdb-all-dbs": "1.1.1",
72
71
  "server-destroy": "1.0.1"
@@ -79,6 +78,7 @@
79
78
  "@types/jsonwebtoken": "8.5.1",
80
79
  "@types/koa": "2.13.4",
81
80
  "@types/koa__router": "8.0.8",
81
+ "@types/lodash": "^4.14.191",
82
82
  "@types/node": "14.18.20",
83
83
  "@types/node-fetch": "2.6.1",
84
84
  "@types/pouchdb": "6.4.0",
@@ -89,6 +89,7 @@
89
89
  "copyfiles": "2.4.1",
90
90
  "eslint": "6.8.0",
91
91
  "jest": "28.1.1",
92
+ "lodash": "4.17.21",
92
93
  "nodemon": "2.0.15",
93
94
  "pouchdb-adapter-memory": "7.2.2",
94
95
  "prettier": "2.3.1",
@@ -101,5 +102,5 @@
101
102
  "typescript": "4.7.3",
102
103
  "update-dotenv": "1.1.1"
103
104
  },
104
- "gitHead": "468a300cda385b3fe87ed7f1f51749282015612a"
105
+ "gitHead": "84e8cc00315e223433e388b72fae3bd048ff5760"
105
106
  }
@@ -30,6 +30,7 @@ async function init() {
30
30
  DEPLOYMENT_ENVIRONMENT: "development",
31
31
  TENANT_FEATURE_FLAGS: "*:LICENSING,*:USER_GROUPS,*:ONBOARDING_TOUR",
32
32
  ENABLE_EMAIL_TEST_MODE: 1,
33
+ HTTP_LOGGING: 0,
33
34
  }
34
35
  let envFile = ""
35
36
  Object.keys(envFileJson).forEach(key => {
@@ -177,7 +177,7 @@ export const destroy = async (ctx: any) => {
177
177
  ctx.throw(400, "Unable to delete self.")
178
178
  }
179
179
 
180
- await userSdk.destroy(id, ctx.user)
180
+ await userSdk.destroy(id)
181
181
 
182
182
  ctx.body = {
183
183
  message: `User ${id} deleted.`,
@@ -197,7 +197,7 @@ export const search = async (ctx: any) => {
197
197
  if (body.paginated === false) {
198
198
  await getAppUsers(ctx)
199
199
  } else {
200
- const paginated = await userSdk.paginatedUsers(body)
200
+ const paginated = await userSdk.core.paginatedUsers(body)
201
201
  // user hashed password shouldn't ever be returned
202
202
  for (let user of paginated.data) {
203
203
  if (user) {
@@ -58,6 +58,13 @@ function oidcValidation() {
58
58
  }).unknown(true)
59
59
  }
60
60
 
61
+ function scimValidation() {
62
+ // prettier-ignore
63
+ return Joi.object({
64
+ enabled: Joi.boolean().required(),
65
+ }).unknown(true)
66
+ }
67
+
61
68
  function buildConfigSaveValidation() {
62
69
  // prettier-ignore
63
70
  return auth.joiValidator.body(Joi.object({
@@ -74,7 +81,8 @@ function buildConfigSaveValidation() {
74
81
  { is: ConfigType.SETTINGS, then: settingValidation() },
75
82
  { is: ConfigType.ACCOUNT, then: Joi.object().unknown(true) },
76
83
  { is: ConfigType.GOOGLE, then: googleValidation() },
77
- { is: ConfigType.OIDC, then: oidcValidation() }
84
+ { is: ConfigType.OIDC, then: oidcValidation() },
85
+ { is: ConfigType.SCIM, then: scimValidation() }
78
86
  ],
79
87
  }),
80
88
  }).required().unknown(true),