@budibase/worker 3.4.15 → 3.4.16
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": "3.4.
|
|
4
|
+
"version": "3.4.16",
|
|
5
5
|
"description": "Budibase background service",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -62,7 +62,6 @@
|
|
|
62
62
|
"koa-body": "4.2.0",
|
|
63
63
|
"koa-compress": "4.0.1",
|
|
64
64
|
"koa-passport": "4.1.4",
|
|
65
|
-
"koa-redis": "^4.0.1",
|
|
66
65
|
"koa-send": "5.0.1",
|
|
67
66
|
"koa-session": "5.13.1",
|
|
68
67
|
"koa-static": "5.0.0",
|
|
@@ -114,5 +113,5 @@
|
|
|
114
113
|
}
|
|
115
114
|
}
|
|
116
115
|
},
|
|
117
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "4af1b3e6233038fe22c0c752d3a21ab4b1567a69"
|
|
118
117
|
}
|
|
@@ -311,7 +311,7 @@ describe("/api/global/auth", () => {
|
|
|
311
311
|
})
|
|
312
312
|
})
|
|
313
313
|
|
|
314
|
-
describe
|
|
314
|
+
describe("GET /api/global/auth/:tenantId/oidc/callback", () => {
|
|
315
315
|
it("logs in", async () => {
|
|
316
316
|
const email = `${generator.guid()}@example.com`
|
|
317
317
|
|
package/src/index.ts
CHANGED
|
@@ -4,7 +4,7 @@ if (process.env.DD_APM_ENABLED) {
|
|
|
4
4
|
|
|
5
5
|
// need to load environment first
|
|
6
6
|
import env from "./environment"
|
|
7
|
-
import Application
|
|
7
|
+
import Application from "koa"
|
|
8
8
|
import { bootstrap } from "global-agent"
|
|
9
9
|
import * as db from "./db"
|
|
10
10
|
import { sdk as proSdk } from "@budibase/pro"
|
|
@@ -20,7 +20,6 @@ import {
|
|
|
20
20
|
cache,
|
|
21
21
|
features,
|
|
22
22
|
} from "@budibase/backend-core"
|
|
23
|
-
import RedisStore from "koa-redis"
|
|
24
23
|
|
|
25
24
|
db.init()
|
|
26
25
|
import koaBody from "koa-body"
|
|
@@ -53,28 +52,7 @@ app.proxy = true
|
|
|
53
52
|
app.use(handleScimBody)
|
|
54
53
|
app.use(koaBody({ multipart: true }))
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
const redisClient = await new redis.Client(
|
|
58
|
-
redis.utils.Databases.SESSIONS
|
|
59
|
-
).init()
|
|
60
|
-
return koaSession(
|
|
61
|
-
{
|
|
62
|
-
// @ts-ignore
|
|
63
|
-
store: new RedisStore({ client: redisClient.getClient() }),
|
|
64
|
-
key: "koa:sess",
|
|
65
|
-
maxAge: 86400000, // one day
|
|
66
|
-
httpOnly: true,
|
|
67
|
-
secure: process.env.NODE_ENV === "production",
|
|
68
|
-
sameSite: "strict",
|
|
69
|
-
rolling: true,
|
|
70
|
-
renew: true,
|
|
71
|
-
},
|
|
72
|
-
app
|
|
73
|
-
)(ctx, next)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
app.use(sessionMiddleware)
|
|
77
|
-
|
|
55
|
+
app.use(koaSession(app))
|
|
78
56
|
app.use(middleware.correlation)
|
|
79
57
|
app.use(middleware.pino)
|
|
80
58
|
app.use(middleware.ip)
|
package/src/koa-redis.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module "koa-redis" {}
|