This commit is contained in:
Martin McKeaveney 2020-05-18 15:46:38 +01:00
parent 2c49206af5
commit b0644b2234
4 changed files with 12 additions and 9 deletions

View File

@ -10,6 +10,7 @@
"build": { "build": {
"appId": "com.budibase.builder", "appId": "com.budibase.builder",
"productName": "Budibase Builder", "productName": "Budibase Builder",
"afterSign": "electron-builder-notarize",
"mac": { "mac": {
"category": "public.app-category.developer-tools", "category": "public.app-category.developer-tools",
"hardenedRuntime": true "hardenedRuntime": true
@ -29,7 +30,7 @@
"budi": "node ../cli/bin/budi", "budi": "node ../cli/bin/budi",
"dev:builder": "nodemon ../cli/bin/budi run", "dev:builder": "nodemon ../cli/bin/budi run",
"electron": "electron src/electron.js", "electron": "electron src/electron.js",
"build:electron": "electron-builder", "build:electron": "electron-builder --dir",
"publish:electron": "electron-builder -mwl --publish always", "publish:electron": "electron-builder -mwl --publish always",
"postinstall": "electron-builder install-app-deps", "postinstall": "electron-builder install-app-deps",
"lint": "eslint --fix src/" "lint": "eslint --fix src/"

View File

@ -4,4 +4,4 @@ process.env.NODE_ENV = "jest"
process.env.JWT_SECRET = "test-jwtsecret" process.env.JWT_SECRET = "test-jwtsecret"
process.env.CLIENT_ID = "test-client-id" process.env.CLIENT_ID = "test-client-id"
process.env.BUDIBASE_DIR = tmpdir("budibase-unittests") process.env.BUDIBASE_DIR = tmpdir("budibase-unittests")
process.env.ADMIN_SECRET = "test-admin-secret" process.env.ADMIN_SECRET = "test-admin-secret"

View File

@ -48,7 +48,7 @@ router.use(async (ctx, next) => {
try { try {
await next() await next()
} catch (err) { } catch (err) {
ctx.log.error(err); ctx.log.error(err)
ctx.status = err.status || err.statusCode || 500 ctx.status = err.status || err.statusCode || 500
ctx.body = { ctx.body = {
message: err.message, message: err.message,

View File

@ -10,12 +10,14 @@ const app = new Koa()
// set up top level koa middleware // set up top level koa middleware
app.use(koaBody({ multipart: true })) app.use(koaBody({ multipart: true }))
app.use(logger({ app.use(
prettyPrint: { logger({
levelFirst: true prettyPrint: {
}, levelFirst: true,
level: process.env.NODE_ENV === "jest" ? "silent" : "info" },
})) level: process.env.NODE_ENV === "jest" ? "silent" : "info",
})
)
// api routes // api routes
app.use(api.routes()) app.use(api.routes())