@budibase/worker 2.8.28-alpha.0 → 2.8.28
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 +6 -6
- package/src/api/controllers/global/configs.ts +3 -3
- package/src/api/controllers/global/email.ts +3 -3
- package/src/api/controllers/global/roles.ts +1 -1
- package/src/api/controllers/global/self.ts +1 -1
- package/src/api/controllers/global/users.ts +1 -1
- package/src/api/routes/index.ts +0 -7
- package/src/api/controllers/system/logs.ts +0 -13
- package/src/api/routes/system/logs.ts +0 -9
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/worker",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "2.8.28
|
|
4
|
+
"version": "2.8.28",
|
|
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.8.28
|
|
42
|
-
"@budibase/pro": "2.8.28
|
|
43
|
-
"@budibase/string-templates": "2.8.28
|
|
44
|
-
"@budibase/types": "2.8.28
|
|
41
|
+
"@budibase/backend-core": "2.8.28",
|
|
42
|
+
"@budibase/pro": "2.8.28",
|
|
43
|
+
"@budibase/string-templates": "2.8.28",
|
|
44
|
+
"@budibase/types": "2.8.28",
|
|
45
45
|
"@koa/router": "8.0.8",
|
|
46
46
|
"@sentry/node": "6.17.7",
|
|
47
47
|
"@techpass/passport-openidconnect": "0.3.2",
|
|
@@ -118,5 +118,5 @@
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "07e0c18f914be17cfef131d6d918baa0f2d392a0"
|
|
122
122
|
}
|
|
@@ -507,17 +507,17 @@ export async function configChecklist(ctx: Ctx) {
|
|
|
507
507
|
smtp: {
|
|
508
508
|
checked: !!smtpConfig,
|
|
509
509
|
label: "Set up email",
|
|
510
|
-
link: "/builder/portal/
|
|
510
|
+
link: "/builder/portal/manage/email",
|
|
511
511
|
},
|
|
512
512
|
adminUser: {
|
|
513
513
|
checked: userExists,
|
|
514
514
|
label: "Create your first user",
|
|
515
|
-
link: "/builder/portal/
|
|
515
|
+
link: "/builder/portal/manage/users",
|
|
516
516
|
},
|
|
517
517
|
sso: {
|
|
518
518
|
checked: !!googleConfig || !!oidcConfig,
|
|
519
519
|
label: "Set up single sign-on",
|
|
520
|
-
link: "/builder/portal/
|
|
520
|
+
link: "/builder/portal/manage/auth",
|
|
521
521
|
},
|
|
522
522
|
}
|
|
523
523
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { sendEmail as sendEmailFn } from "../../../utilities/email"
|
|
2
2
|
import { tenancy } from "@budibase/backend-core"
|
|
3
|
-
import { BBContext
|
|
3
|
+
import { BBContext } from "@budibase/types"
|
|
4
4
|
|
|
5
5
|
export async function sendEmail(ctx: BBContext) {
|
|
6
6
|
let {
|
|
@@ -16,10 +16,10 @@ export async function sendEmail(ctx: BBContext) {
|
|
|
16
16
|
automation,
|
|
17
17
|
invite,
|
|
18
18
|
} = ctx.request.body
|
|
19
|
-
let user
|
|
19
|
+
let user
|
|
20
20
|
if (userId) {
|
|
21
21
|
const db = tenancy.getGlobalDB()
|
|
22
|
-
user = await db.get
|
|
22
|
+
user = await db.get(userId)
|
|
23
23
|
}
|
|
24
24
|
const response = await sendEmailFn(email, purpose, {
|
|
25
25
|
workspaceId,
|
|
@@ -35,7 +35,7 @@ export async function find(ctx: BBContext) {
|
|
|
35
35
|
const appId = ctx.params.appId
|
|
36
36
|
await context.doInAppContext(dbCore.getDevAppID(appId), async () => {
|
|
37
37
|
const db = context.getAppDB()
|
|
38
|
-
const app = await db.get
|
|
38
|
+
const app = await db.get(dbCore.DocumentType.APP_METADATA)
|
|
39
39
|
ctx.body = {
|
|
40
40
|
roles: await roles.getAllRoles(),
|
|
41
41
|
name: app.name,
|
|
@@ -412,7 +412,7 @@ export const inviteAccept = async (
|
|
|
412
412
|
|
|
413
413
|
const saved = await userSdk.save(request)
|
|
414
414
|
const db = tenancy.getGlobalDB()
|
|
415
|
-
const user = await db.get
|
|
415
|
+
const user = await db.get(saved._id)
|
|
416
416
|
await events.user.inviteAccepted(user)
|
|
417
417
|
return saved
|
|
418
418
|
})
|
package/src/api/routes/index.ts
CHANGED
|
@@ -16,9 +16,6 @@ import licenseRoutes from "./global/license"
|
|
|
16
16
|
import migrationRoutes from "./system/migrations"
|
|
17
17
|
import accountRoutes from "./system/accounts"
|
|
18
18
|
import restoreRoutes from "./system/restore"
|
|
19
|
-
import systemLogRoutes from "./system/logs"
|
|
20
|
-
|
|
21
|
-
import env from "../../environment"
|
|
22
19
|
|
|
23
20
|
export const routes: Router[] = [
|
|
24
21
|
configRoutes,
|
|
@@ -41,7 +38,3 @@ export const routes: Router[] = [
|
|
|
41
38
|
eventRoutes,
|
|
42
39
|
pro.scim,
|
|
43
40
|
]
|
|
44
|
-
|
|
45
|
-
if (env.SELF_HOSTED) {
|
|
46
|
-
routes.push(systemLogRoutes)
|
|
47
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { UserCtx } from "@budibase/types"
|
|
2
|
-
import { installation, logging } from "@budibase/backend-core"
|
|
3
|
-
|
|
4
|
-
export async function getLogs(ctx: UserCtx) {
|
|
5
|
-
const logReadStream = logging.system.getLogReadStream()
|
|
6
|
-
|
|
7
|
-
const { installId } = await installation.getInstall()
|
|
8
|
-
|
|
9
|
-
const fileName = `${installId}-${Date.now()}.log`
|
|
10
|
-
|
|
11
|
-
ctx.set("content-disposition", `attachment; filename=${fileName}`)
|
|
12
|
-
ctx.body = logReadStream
|
|
13
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import Router from "@koa/router"
|
|
2
|
-
import { middleware } from "@budibase/backend-core"
|
|
3
|
-
import * as controller from "../../controllers/system/logs"
|
|
4
|
-
|
|
5
|
-
const router: Router = new Router()
|
|
6
|
-
|
|
7
|
-
router.get("/api/system/logs", middleware.adminOnly, controller.getLogs)
|
|
8
|
-
|
|
9
|
-
export default router
|