Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cityofsurrey/woodie

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cityofsurrey/woodie - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

36

lib/index.js
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _bunyan = require('bunyan');

@@ -23,8 +27,7 @@

if (err || status >= 500) {
// server internal error or error
return 'error';
} else if (status >= 400) {
// client error
return 'warn';
}
return 'info';

@@ -39,11 +42,3 @@ };

module.exports = function () {
var logger = module.exports.errorLogger();
return function (req, res, next) {
logger(null, req, res, next);
};
};
module.exports.errorLogger = function () {
var createLogger = function createLogger() {
return function (err, req, res, next) {

@@ -54,8 +49,3 @@ var startTime = process.hrtime();

var logger = _bunyan2.default.createLogger({
name: 'express',
serializers: {
req: _bunyan2.default.stdSerializers.req,
res: _bunyan2.default.stdSerializers.res,
err: _bunyan2.default.stdSerializers.err
}
name: 'express'
});

@@ -101,4 +91,4 @@ var childLogger = requestId !== undefined ? logger.child({ req_id: requestId }) : logger;

var metaWithoutSensitiveData = (0, _omitDeep2.default)(meta, ['cvv', 'password']);
logFn.call(childLogger, metaWithoutSensitiveData);
var metaWithoutSensitiveProperties = (0, _omitDeep2.default)(meta, ['cvv', 'password', 'variables']);
logFn.call(childLogger, metaWithoutSensitiveProperties);
};

@@ -130,2 +120,10 @@

};
};
exports.default = function () {
var logger = createLogger();
return function (req, res, next) {
logger(null, req, res, next);
};
};
{
"name": "@cityofsurrey/woodie",
"version": "1.0.4",
"version": "1.0.5",
"description": "City of Surrey Logging Service",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

import omit from 'omit-deep'
import replace from './src/replace'
const meta = {
req: {
variables: '{\n \"input\": {\n \"orderId\": \"P-IPS-1-1532197587238\",\n \"card\": {\n \"name\": \"Slava\",\n \"cvv\": \"123\",\n \"expiry\": {\n \"month\": 2,\n \"year\": 2020\n },\n \"token\": \"abc\"\n }\n }\n}',
body: {

@@ -22,2 +25,5 @@ input: {

console.log(JSON.stringify(omit(meta, 'cvv')))
// const result = omit(meta, 'cvv')
const result = replace(meta, ['cvv', 'password'])
console.log(JSON.stringify(result))
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc