@budibase/worker 2.9.33-alpha.1 → 2.9.33

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:14-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.9.33-alpha.1",
4
+ "version": "2.9.33",
5
5
  "description": "Budibase background service",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -38,10 +38,10 @@
38
38
  "author": "Budibase",
39
39
  "license": "GPL-3.0",
40
40
  "dependencies": {
41
- "@budibase/backend-core": "2.9.33-alpha.1",
42
- "@budibase/pro": "2.9.33-alpha.1",
43
- "@budibase/string-templates": "2.9.33-alpha.1",
44
- "@budibase/types": "2.9.33-alpha.1",
41
+ "@budibase/backend-core": "2.9.33",
42
+ "@budibase/pro": "2.9.33",
43
+ "@budibase/string-templates": "2.9.33",
44
+ "@budibase/types": "2.9.33",
45
45
  "@koa/router": "8.0.8",
46
46
  "@sentry/node": "6.17.7",
47
47
  "@techpass/passport-openidconnect": "0.3.2",
@@ -103,20 +103,5 @@
103
103
  "typescript": "4.7.3",
104
104
  "update-dotenv": "1.1.1"
105
105
  },
106
- "nx": {
107
- "targets": {
108
- "dev:builder": {
109
- "dependsOn": [
110
- {
111
- "comment": "Required for pro usage when submodule not loaded",
112
- "projects": [
113
- "@budibase/backend-core"
114
- ],
115
- "target": "build"
116
- }
117
- ]
118
- }
119
- }
120
- },
121
- "gitHead": "0523660bd2e224d1dc5f077cad6ab958540c6583"
106
+ "gitHead": "4e465ce84f0d2fb3391981fcfc2d6bee3cbff77e"
122
107
  }
@@ -48,7 +48,7 @@ export async function generateAPIKey(ctx: any) {
48
48
  } catch (err) {
49
49
  devInfo = { _id: id, userId }
50
50
  }
51
- devInfo.apiKey = apiKey
51
+ devInfo.apiKey = await apiKey
52
52
  await db.put(devInfo)
53
53
  ctx.body = cleanupDevInfo(devInfo)
54
54
  }
@@ -63,7 +63,7 @@ export async function fetchAPIKey(ctx: any) {
63
63
  devInfo = {
64
64
  _id: id,
65
65
  userId: ctx.user._id,
66
- apiKey: newApiKey(),
66
+ apiKey: await newApiKey(),
67
67
  }
68
68
  await db.put(devInfo)
69
69
  }
@@ -25,11 +25,11 @@ import {
25
25
  import {
26
26
  accounts,
27
27
  cache,
28
- ErrorCode,
29
28
  events,
30
29
  migrations,
31
- platform,
32
30
  tenancy,
31
+ platform,
32
+ ErrorCode,
33
33
  } from "@budibase/backend-core"
34
34
  import { checkAnyUserExists } from "../../../utilities/users"
35
35
  import { isEmailConfigured } from "../../../utilities/email"
@@ -280,7 +280,7 @@ export const onboardUsers = async (ctx: Ctx<InviteUsersRequest>) => {
280
280
  let bulkCreateReponse = await userSdk.db.bulkCreate(users, [])
281
281
 
282
282
  // Apply temporary credentials
283
- ctx.body = {
283
+ let createWithCredentials = {
284
284
  ...bulkCreateReponse,
285
285
  successful: bulkCreateReponse?.successful.map(user => {
286
286
  return {
@@ -290,6 +290,8 @@ export const onboardUsers = async (ctx: Ctx<InviteUsersRequest>) => {
290
290
  }),
291
291
  created: true,
292
292
  }
293
+
294
+ ctx.body = createWithCredentials
293
295
  } else {
294
296
  ctx.throw(400, "User onboarding failed")
295
297
  }
@@ -33,9 +33,7 @@ describe("/api/global/users/:userId/app/builder", () => {
33
33
  MOCK_APP_ID,
34
34
  400
35
35
  )
36
- expect(resp.body.message).toContain(
37
- "appBuilders are not currently enabled"
38
- )
36
+ expect(resp.body.message).toContain("Feature not enabled")
39
37
  })
40
38
  })
41
39
 
@@ -10,8 +10,6 @@ import {
10
10
  import { TestConfiguration } from "../../../../tests"
11
11
  import { events } from "@budibase/backend-core"
12
12
 
13
- jest.setTimeout(30000)
14
-
15
13
  mocks.licenses.useScimIntegration()
16
14
 
17
15
  describe("scim", () => {
@@ -31,8 +31,6 @@ function parseIntSafe(number: any) {
31
31
  }
32
32
 
33
33
  const environment = {
34
- // features
35
- WORKER_FEATURES: process.env.WORKER_FEATURES,
36
34
  // auth
37
35
  MINIO_ACCESS_KEY: process.env.MINIO_ACCESS_KEY,
38
36
  MINIO_SECRET_KEY: process.env.MINIO_SECRET_KEY,
@@ -9,4 +9,4 @@ process.env.MINIO_SECRET_KEY = "test"
9
9
  process.env.PLATFORM_URL = "http://localhost:10000"
10
10
  process.env.INTERNAL_API_KEY = "tet"
11
11
  process.env.DISABLE_ACCOUNT_PORTAL = "0"
12
- process.env.MOCK_REDIS = "1"
12
+ process.env.REDIS_PASSWORD = "budibase"
package/src/features.ts DELETED
@@ -1,13 +0,0 @@
1
- import { features } from "@budibase/backend-core"
2
- import env from "./environment"
3
-
4
- enum WorkerFeature {}
5
-
6
- const featureList: WorkerFeature[] = features.processFeatureEnvVar(
7
- Object.values(WorkerFeature),
8
- env.WORKER_FEATURES
9
- )
10
-
11
- export function isFeatureEnabled(feature: WorkerFeature) {
12
- return featureList.includes(feature)
13
- }