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

@aerogear/apollo-voyager-audit

Package Overview
Dependencies
Maintainers
9
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aerogear/apollo-voyager-audit - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

dist/auditLog.d.ts

3

dist/index.d.ts

@@ -1,2 +0,1 @@

import { GraphQLResolveInfo } from 'graphql';
export declare function auditLog(success: boolean, request: any, info: GraphQLResolveInfo, parent: any, args: any, msg: string): void;
export { auditLog } from './auditLog';
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const apollo_voyager_tools_1 = require("@aerogear/apollo-voyager-tools");
const pino_1 = __importDefault(require("pino"));
const log = pino_1.default();
const auditLogger = log.child({ tag: 'AUDIT' });
function auditLog(success, request, info, parent, args, msg) {
auditLogger.info({
msg: msg || '',
requestId: request ? request.id : '',
operationType: info.operation.operation,
fieldName: info.fieldName,
parentTypeName: info.parentType.name,
path: apollo_voyager_tools_1.buildPath(info.path),
success,
parent,
arguments: args
});
}
exports.auditLog = auditLog;
var auditLog_1 = require("./auditLog");
exports.auditLog = auditLog_1.auditLog;
//# sourceMappingURL=index.js.map
{
"name": "@aerogear/apollo-voyager-audit",
"version": "0.1.2",
"version": "0.1.3",
"description": "Adds audit logging capabilities to Apollo Voyager Server.",

@@ -24,3 +24,3 @@ "author": "AeroGear Team<aerogear@googlegroups.com>",

"dependencies": {
"@aerogear/apollo-voyager-tools": "^0.1.2",
"@aerogear/apollo-voyager-tools": "^0.1.3",
"graphql-tools": "^4.0.3",

@@ -43,4 +43,3 @@ "pino": "^5.9.0"

]
},
"gitHead": "35968e3f449ce3b95aaf86f9f4a43a75269ca594"
}
}

@@ -1,34 +0,1 @@

import { buildPath } from '@aerogear/apollo-voyager-tools'
import { GraphQLResolveInfo } from 'graphql'
import pino from 'pino'
interface AuditLogger {
info (log: {
msg: string
requestId: string
operationType: string
fieldName: string
parentTypeName: string
path: string
success: boolean
parent: any
arguments: any
}): void
}
const log = pino()
const auditLogger: AuditLogger = log.child({tag: 'AUDIT'})
export function auditLog (success: boolean, request: any, info: GraphQLResolveInfo, parent: any, args: any, msg: string) {
auditLogger.info({
msg: msg || '',
requestId: request ? request.id : '',
operationType: info.operation.operation,
fieldName: info.fieldName,
parentTypeName: info.parentType.name,
path: buildPath(info.path),
success,
parent,
arguments: args
})
}
export { auditLog } from './auditLog'

Sorry, the diff of this file is not supported yet

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