@axah/koa
Advanced tools
Comparing version 2.2.6 to 2.2.7
@@ -15,3 +15,4 @@ export declare enum UserRole { | ||
PARASHIFT = "PARASHIFT", | ||
EMR = "EMR" | ||
EMR = "EMR", | ||
CLAIMS_EXPERT = "CLAIMS_EXPERT" | ||
} | ||
@@ -18,0 +19,0 @@ export declare type Authentication = { |
@@ -20,2 +20,3 @@ "use strict"; | ||
UserRole["EMR"] = "EMR"; | ||
UserRole["CLAIMS_EXPERT"] = "CLAIMS_EXPERT"; | ||
})(UserRole = exports.UserRole || (exports.UserRole = {})); | ||
@@ -22,0 +23,0 @@ function notEmpty(value) { |
@@ -10,3 +10,3 @@ "use strict"; | ||
function createApiMethod({ allowedRoles, body: bodyValidator, query: queryValidator, params: paramsValidator, files: allowFiles = false, }, executor) { | ||
const parseBody = koa_body_1.default({ | ||
const parseBody = (0, koa_body_1.default)({ | ||
json: true, | ||
@@ -22,3 +22,3 @@ multipart: allowFiles, | ||
try { | ||
auth = auth_1.default(ctx.req.headers); | ||
auth = (0, auth_1.default)(ctx.req.headers); | ||
} | ||
@@ -25,0 +25,0 @@ catch (e) { |
@@ -19,2 +19,4 @@ "use strict"; | ||
if (process.env.NODE_ENV !== 'production') { | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
ctx.body.stack = e.stack; | ||
@@ -21,0 +23,0 @@ } |
@@ -24,3 +24,3 @@ "use strict"; | ||
// custom uuid when nothing else is present | ||
`custom-${uuid_1.v4()}`); | ||
`custom-${(0, uuid_1.v4)()}`); | ||
} | ||
@@ -97,6 +97,6 @@ function parseInitialMessageIdFromHeaders(headers) { | ||
const mdc = parseMdcFromHeaders(logger, ctx.req.headers); | ||
return log_1.runWithMdc(mdc, async () => { | ||
return (0, log_1.runWithMdc)(mdc, async () => { | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
const logDoNotUse = (ctx.log = ctx.req.log = ctx.res.log = ctx.request.log = ctx.response.log = logger); // eslint-disable-line no-multi-assign, max-len | ||
const logDoNotUse = (ctx.log = ctx.req.log = ctx.res.log = ctx.request.log = ctx.response.log = logger); // eslint-disable-line no-multi-assign, max-len, prettier/prettier | ||
const startTime = Date.now(); | ||
@@ -103,0 +103,0 @@ const requestLogger = logDoNotUse.child({ |
{ | ||
"name": "@axah/koa", | ||
"version": "2.2.6", | ||
"version": "2.2.7", | ||
"main": "lib/index.js", | ||
@@ -21,23 +21,23 @@ "license": "UNLICENSED", | ||
"devDependencies": { | ||
"@shopify/jest-koa-mocks": "^2.3.4", | ||
"@types/jest": "^26.0.23", | ||
"@types/koa": "^2.11.8", | ||
"@types/node": "^15.0.1", | ||
"@types/pino": "^6.3.8", | ||
"@types/uuid": "^8.3.0", | ||
"@typescript-eslint/eslint-plugin": "^4.22.0", | ||
"@typescript-eslint/parser": "^4.22.0", | ||
"eslint": "^7.25.0", | ||
"@shopify/jest-koa-mocks": "^3.0.4", | ||
"@types/jest": "^27.0.1", | ||
"@types/koa": "^2.13.4", | ||
"@types/node": "^16.9.1", | ||
"@types/pino": "^6.3.11", | ||
"@types/uuid": "^8.3.1", | ||
"@typescript-eslint/eslint-plugin": "^4.31.0", | ||
"@typescript-eslint/parser": "^4.31.0", | ||
"eslint": "^7.32.0", | ||
"eslint-config-airbnb-base": "^14.2.1", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-import": "^2.22.0", | ||
"eslint-plugin-prettier": "^3.4.0", | ||
"eslint-plugin-import": "^2.24.2", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"flowgen": "^1.14.1", | ||
"jest": "^26.6.3", | ||
"jest": "^27.1.1", | ||
"koa": "^2.13.1", | ||
"nodemon": "^2.0.7", | ||
"pino": "^6.11.3", | ||
"prettier": "^2.2.1", | ||
"ts-jest": "^26.5.5", | ||
"typescript": "^4.2.4" | ||
"nodemon": "^2.0.12", | ||
"pino": "^6.13.2", | ||
"prettier": "^2.4.0", | ||
"ts-jest": "^27.0.5", | ||
"typescript": "^4.4.2" | ||
}, | ||
@@ -49,3 +49,3 @@ "dependencies": { | ||
"uuid": "^8.3.2", | ||
"zod": "2.0.0-beta.29" | ||
"zod": "3.8.2" | ||
}, | ||
@@ -52,0 +52,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
29252
423
+ Added@types/node@22.13.5(transitive)
+ Addedzod@3.8.2(transitive)
- Removed@types/node@22.13.4(transitive)
- Removedzod@2.0.0-beta.29(transitive)
Updatedzod@3.8.2