Skip to content

Commit cde83df

Browse files
committed
Minor code tweaks. Migrated from manual URI parsing to using the node uri module. Updated README.md to include snyk badge. v0.3.0.
1 parent 2a8483b commit cde83df

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
# ArangoDB stream for Bunyan
22

3-
This module has been tested with the following:
3+
[![Known Vulnerabilities](https://snyk.io/test/github/kurtkincaid/bunyan-arangodb/badge.svg)](https://snyk.io/test/github/kurtkincaid/bunyan-arangodb)
44

5-
* bunyan 1.5.1
6-
* aqb 2.0.2
7-
* arrangojs 4.1.0
8-
* ArangoDB 2.8.4 and 2.8.5
5+
A simple and configurable ArangoDB for Bunyan.
96

10-
The module itself is very simple, so presumably it would work with versions other than those shown above.
7+
Please note: This module will not create the database and/or collection for you. These must already exist in your ArangoDB instance when your code is run.
118

129
# Installation
1310

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @fileOverview Bunyan stream for ArangoDB
33
* @author Kurt Kincaid
4-
* @version 0.2.0
4+
* @version 0.3.0
55
*/
66

77
var url = require( 'url' );
@@ -51,12 +51,12 @@ function bunyanArangoDB( opts ) {
5151
* @param {Object} entry Raw Bunyan log data
5252
*/
5353
bunyanArangoDB.prototype.write = function( entry ) {
54-
this.arangodb.query( this.aqlQuery `INSERT ${JSON.parse( entry )} IN ${this.collection}`
55-
).then( r => {
54+
this.arangodb.query( this.aqlQuery `INSERT ${JSON.parse( entry )} IN ${this.collection}`
55+
).then( ( r ) => {
5656
// Not doing anything with the results. Return them, maybe?
5757
debug( `Write successful: ${JSON.stringify( r, null, 2 )}` );
5858
return null;
59-
} ).catch( e => {
59+
} ).catch( ( e ) => {
6060
debug( `ERROR: ${e}` );
6161
return e;
6262
} );

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bunyan-arangodb",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"description": "Bunyan stream for ArangoDB",
55
"main": "index.js",
66
"keywords": [

0 commit comments

Comments
 (0)