@packt/audit-sdk
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -37,3 +37,8 @@ 'use strict'; | ||
constructor(config = {}) { | ||
const options = Object.assign({}, config); | ||
const options = Object.assign({ | ||
maxRetries: 1, | ||
requestTimeout: 500, | ||
deadTimeout: 500, | ||
pingTimeout: 500 | ||
}, config); | ||
@@ -51,5 +56,3 @@ // Check a host is set | ||
this.elasticIndex = options.indexName || `${date.getUTCFullYear()}-${`0${date.getUTCDate()}`.slice(-2)}`; | ||
this.elasticClient = new _elasticsearch2.default.Client({ | ||
host: options.host | ||
}); | ||
this.elasticClient = new _elasticsearch2.default.Client(options); | ||
this.defineJoiSchema(); | ||
@@ -56,0 +59,0 @@ } |
{ | ||
"name": "@packt/audit-sdk", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "An SDK to send audit log data to elasticsearch", | ||
@@ -38,7 +38,7 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@packt/error-custom": "0.1.1", | ||
"aws-sdk": "2.259.1", | ||
"elasticsearch": "15.0.0", | ||
"joi": "13.4.0", | ||
"uuid": "3.2.1" | ||
"@packt/error-custom": "0.1.2", | ||
"aws-sdk": "2.296.0", | ||
"elasticsearch": "15.1.1", | ||
"joi": "13.6.0", | ||
"uuid": "3.3.2" | ||
}, | ||
@@ -45,0 +45,0 @@ "devDependencies": { |
@@ -21,3 +21,8 @@ import ElasticSearch from 'elasticsearch'; | ||
constructor(config = {}) { | ||
const options = Object.assign({}, config); | ||
const options = Object.assign({ | ||
maxRetries: 1, | ||
requestTimeout: 500, | ||
deadTimeout: 500, | ||
pingTimeout: 500, | ||
}, config); | ||
@@ -35,5 +40,3 @@ // Check a host is set | ||
this.elasticIndex = options.indexName || `${date.getUTCFullYear()}-${(`0${date.getUTCDate()}`).slice(-2)}`; | ||
this.elasticClient = new ElasticSearch.Client({ | ||
host: options.host, | ||
}); | ||
this.elasticClient = new ElasticSearch.Client(options); | ||
this.defineJoiSchema(); | ||
@@ -40,0 +43,0 @@ } |
Sorry, the diff of this file is not supported yet
45654
1214
+ Added@packt/error-custom@0.1.2(transitive)
+ Addedaws-sdk@2.296.0(transitive)
+ Addedelasticsearch@15.1.1(transitive)
+ Addedjoi@13.6.0(transitive)
+ Addeduuid@3.3.2(transitive)
+ Addedxml2js@0.4.19(transitive)
+ Addedxmlbuilder@9.0.7(transitive)
- Removed@packt/error-custom@0.1.1(transitive)
- Removedaws-sdk@2.259.1(transitive)
- Removedelasticsearch@15.0.0(transitive)
- Removeduuid@3.2.1(transitive)
- Removedxml2js@0.4.17(transitive)
- Removedxmlbuilder@4.2.1(transitive)
Updated@packt/error-custom@0.1.2
Updatedaws-sdk@2.296.0
Updatedelasticsearch@15.1.1
Updatedjoi@13.6.0
Updateduuid@3.3.2