lint
This commit is contained in:
parent
2c49206af5
commit
b0644b2234
|
@ -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/"
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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(
|
||||||
|
logger({
|
||||||
prettyPrint: {
|
prettyPrint: {
|
||||||
levelFirst: true
|
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())
|
||||||
|
|
Loading…
Reference in New Issue