@bluealba/microservices-toolkit
Advanced tools
Comparing version 1.5.7 to 1.6.1
15
index.js
@@ -8,2 +8,3 @@ "use strict"; | ||
const getAuthHeaders = require("./src/middlewares/getAuthHeaders"); | ||
const logger = require("./src/middlewares/logger"); | ||
const graphqlCustomErrorFn = require("./src/error/graphqlCustomErrorFn"); | ||
@@ -14,11 +15,13 @@ const sqlUtils = require("./src/sql/sqlUtils"); | ||
const fromEnv = require("./src/utils/fromEnv"); | ||
const createLogger = require("./src/logger/createLogger"); | ||
const exportFunctions = { | ||
run, | ||
errorHandler, | ||
gatewayAuth, | ||
buildPgClient, | ||
simpleRowBodyMapper, | ||
getAuthHeaders, | ||
graphqlCustomErrorFn, | ||
errorHandler, //TODO: this should be used from the `middlewares` obj, not removing for compat | ||
gatewayAuth, //TODO: this should be used from the `middlewares` obj, not removing for compat | ||
getAuthHeaders, //TODO: this should be used from the `middlewares` obj, not removing for compat | ||
createLogger, | ||
sql: { | ||
@@ -32,4 +35,10 @@ ...sqlUtils, | ||
}, | ||
middlewares: { | ||
errorHandler, | ||
gatewayAuth, | ||
getAuthHeaders, | ||
logger, | ||
}, | ||
}; | ||
module.exports = exportFunctions; |
{ | ||
"name": "@bluealba/microservices-toolkit", | ||
"version": "1.5.7", | ||
"version": "1.6.1", | ||
"description": "Library that contains common elements used in microservices", | ||
@@ -26,6 +26,9 @@ "main": "index.js", | ||
"moment": "^2.29.1", | ||
"morgan": "^1.10.0", | ||
"pg": "^8.6.0", | ||
"pg-pool": "^3.3.0" | ||
"pg-pool": "^3.3.0", | ||
"winston": "^3.10.0" | ||
}, | ||
"devDependencies": { | ||
"@types/winston": "^2.4.4", | ||
"eslint": "^7.26.0", | ||
@@ -32,0 +35,0 @@ "jest": "^26.6.3", |
"use strict"; | ||
module.exports = (row) => ({ ...row.body, id: row.id }); | ||
/* | ||
Simpe Row mapper for the typical Massive.js object where most entity properties are inside a `body`, | ||
expect for `id` which is top-level | ||
*/ | ||
module.exports = (row) => ({ ...row.body, id: row.id }); |
21047
19
544
7
4
+ Addedmorgan@^1.10.0
+ Addedwinston@^3.10.0
+ Added@colors/colors@1.6.0(transitive)
+ Added@dabh/diagnostics@2.0.3(transitive)
+ Added@types/triple-beam@1.3.5(transitive)
+ Addedasync@3.2.6(transitive)
+ Addedbasic-auth@2.0.1(transitive)
+ Addedcolor@3.2.1(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedcolor-string@1.9.1(transitive)
+ Addedcolorspace@1.1.4(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddepd@2.0.0(transitive)
+ Addedee-first@1.1.1(transitive)
+ Addedenabled@2.0.0(transitive)
+ Addedfecha@4.2.3(transitive)
+ Addedfn.name@1.1.0(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-arrayish@0.3.2(transitive)
+ Addedis-stream@2.0.1(transitive)
+ Addedkuler@2.0.0(transitive)
+ Addedlogform@2.7.0(transitive)
+ Addedmorgan@1.10.0(transitive)
+ Addedms@2.0.0(transitive)
+ Addedon-finished@2.3.0(transitive)
+ Addedon-headers@1.0.2(transitive)
+ Addedone-time@1.0.0(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedsafe-buffer@5.1.25.2.1(transitive)
+ Addedsafe-stable-stringify@2.5.0(transitive)
+ Addedsimple-swizzle@0.2.2(transitive)
+ Addedstack-trace@0.0.10(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedtext-hex@1.0.0(transitive)
+ Addedtriple-beam@1.4.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedwinston@3.17.0(transitive)
+ Addedwinston-transport@4.9.0(transitive)