@mcma/api
Advanced tools
Comparing version 0.13.0 to 0.13.1
@@ -20,3 +20,2 @@ "use strict"; | ||
async handleRequest(requestContext) { | ||
var _a; | ||
const request = requestContext.request; | ||
@@ -112,3 +111,3 @@ const response = requestContext.response; | ||
const logger = requestContext.getLogger(); | ||
(_a = logger) === null || _a === void 0 ? void 0 : _a.error(error); | ||
logger === null || logger === void 0 ? void 0 : logger.error(error); | ||
response.statusCode = http_statuses_1.HttpStatusCode.InternalServerError; | ||
@@ -115,0 +114,0 @@ response.headers = getDefaultResponseHeaders(); |
@@ -6,13 +6,13 @@ "use strict"; | ||
constructor(config) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; | ||
var _a, _b, _c, _d, _e, _f, _g; | ||
super(); | ||
this.id = (_b = (_a = config) === null || _a === void 0 ? void 0 : _a.id, (_b !== null && _b !== void 0 ? _b : null)); | ||
this.path = (_d = (_c = config) === null || _c === void 0 ? void 0 : _c.path, (_d !== null && _d !== void 0 ? _d : null)); | ||
this.httpMethod = (_f = (_e = config) === null || _e === void 0 ? void 0 : _e.httpMethod, (_f !== null && _f !== void 0 ? _f : null)); | ||
this.headers = (_h = (_g = config) === null || _g === void 0 ? void 0 : _g.headers, (_h !== null && _h !== void 0 ? _h : {})); | ||
this.pathVariables = (_k = (_j = config) === null || _j === void 0 ? void 0 : _j.pathVariables, (_k !== null && _k !== void 0 ? _k : {})); | ||
this.queryStringParameters = (_m = (_l = config) === null || _l === void 0 ? void 0 : _l.queryStringParameters, (_m !== null && _m !== void 0 ? _m : {})); | ||
this.body = (_p = (_o = config) === null || _o === void 0 ? void 0 : _o.body, (_p !== null && _p !== void 0 ? _p : null)); | ||
this.id = (_a = config === null || config === void 0 ? void 0 : config.id) !== null && _a !== void 0 ? _a : null; | ||
this.path = (_b = config === null || config === void 0 ? void 0 : config.path) !== null && _b !== void 0 ? _b : null; | ||
this.httpMethod = (_c = config === null || config === void 0 ? void 0 : config.httpMethod) !== null && _c !== void 0 ? _c : null; | ||
this.headers = (_d = config === null || config === void 0 ? void 0 : config.headers) !== null && _d !== void 0 ? _d : {}; | ||
this.pathVariables = (_e = config === null || config === void 0 ? void 0 : config.pathVariables) !== null && _e !== void 0 ? _e : {}; | ||
this.queryStringParameters = (_f = config === null || config === void 0 ? void 0 : config.queryStringParameters) !== null && _f !== void 0 ? _f : {}; | ||
this.body = (_g = config === null || config === void 0 ? void 0 : config.body) !== null && _g !== void 0 ? _g : null; | ||
} | ||
} | ||
exports.McmaApiRequest = McmaApiRequest; |
@@ -19,5 +19,5 @@ "use strict"; | ||
defaultBuildQuery(requestContext) { | ||
var _a, _b; | ||
var _a; | ||
const customQueryFactory = this.customQueryFactories.find(x => x.isMatch(requestContext)); | ||
return _b = (_a = customQueryFactory) === null || _a === void 0 ? void 0 : _a.create(requestContext), (_b !== null && _b !== void 0 ? _b : this.buildStandardQuery(requestContext)); | ||
return (_a = customQueryFactory === null || customQueryFactory === void 0 ? void 0 : customQueryFactory.create(requestContext)) !== null && _a !== void 0 ? _a : this.buildStandardQuery(requestContext); | ||
} | ||
@@ -24,0 +24,0 @@ buildStandardQuery(requestContext) { |
{ | ||
"name": "@mcma/api", | ||
"version": "0.13.0", | ||
"version": "0.13.1", | ||
"description": "Node module for building APIs based on the EBU MCMA framework", | ||
@@ -40,10 +40,10 @@ "engines": { | ||
"peerDependencies": { | ||
"@mcma/client": "0.13.0", | ||
"@mcma/core": "0.13.0", | ||
"@mcma/data": "0.13.0" | ||
"@mcma/client": "0.13.1", | ||
"@mcma/core": "0.13.1", | ||
"@mcma/data": "0.13.1" | ||
}, | ||
"devDependencies": { | ||
"@mcma/client": "0.13.0", | ||
"@mcma/core": "0.13.0", | ||
"@mcma/data": "0.13.0", | ||
"@mcma/client": "0.13.1", | ||
"@mcma/core": "0.13.1", | ||
"@mcma/data": "0.13.1", | ||
"@types/node": "^13.7.4", | ||
@@ -50,0 +50,0 @@ "@types/pluralize": "0.0.29", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12
56783
1202