Socket
Socket
Sign inDemoInstall

haraka-plugin-elasticsearch

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

haraka-plugin-elasticsearch - npm Package Compare versions

Comparing version 7.0.0 to 8.0.0

15

Changes.md
### Unreleased
### [8.0.0] - 2023-06-NN
- dep(elastic): bump dep version to 8.8
-
### [7.0.0] - 2023-06-08
- chore: update ci & packaging
- dep(elastic): bump dep version to 7.17
- bump major version to match ES major version
### [1.1.0] - 2023-06-08

@@ -67,1 +80,3 @@

[1.1.0]: https://github.com/haraka/haraka-plugin-elasticsearch/releases/tag/1.1.0
[7.0.0]: https://github.com/haraka/haraka-plugin-elasticsearch/releases/tag/7.0.0
[8.0.0]: https://github.com/haraka/haraka-plugin-elasticsearch/releases/tag/8.0.0

46

index.js

@@ -75,12 +75,13 @@ 'use strict';

plugin.es.ping({}, function (error) {
if (error) {
plugin.logerror('cluster is down!');
plugin.logerror(util.inspect(error, {depth: null}));
}
else {
plugin.lognotice('connected');
}
if (done) done(error);
});
plugin.es.ping()
.then(() => {
plugin.lognotice('connected')
})
.catch(error => {
plugin.logerror('cluster is down!')
plugin.logerror(util.inspect(error, {depth: null}))
})
.finally(() => {
if (done) done()
})
}

@@ -108,8 +109,9 @@

body: JSON.stringify(res),
}, (error, response) => {
if (error) {
})
.then((response) => {
// connection.loginfo(plugin, response);
})
.catch(error => {
connection.logerror(plugin, error.message);
}
// connection.loginfo(plugin, response);
});
})

@@ -149,9 +151,11 @@ // hook reset_transaction doesn't seem to wait for next(). If I

body: JSON.stringify(res),
}, function (error, response) {
if (error) {
})
.then((response) => {
// connection.loginfo(plugin, response);
})
.catch(error => {
connection.logerror(plugin, error.message);
}
// connection.loginfo(plugin, response);
});
next();
})
next()
}

@@ -158,0 +162,0 @@

{
"name": "haraka-plugin-elasticsearch",
"version": "7.0.0",
"version": "8.0.0",
"description": "Haraka plugin that saves logs to Elasticsearch",

@@ -28,3 +28,3 @@ "main": "index.js",

"dependencies": {
"@elastic/elasticsearch": "^7.17.0",
"@elastic/elasticsearch": "^8.8.0",
"haraka-utils": "*"

@@ -31,0 +31,0 @@ },

@@ -218,6 +218,3 @@ 'use strict';

if (err) {
done()
return;
}
if (err) { done(); return; }

@@ -235,5 +232,7 @@ fs.readFile(filePath, (err2, data) => {

body: JSON.stringify(indexMap),
},
function (err3, result) {
if (err3) {
})
.then(result => {
console.log(result);
})
.catch(err3 => {
if (err3.status !== 404) {

@@ -244,8 +243,4 @@ console.error(err3);

// stored mapping may conflict
done()
return;
}
console.log(result);
done()
})
})
.finally(done)
})

@@ -252,0 +247,0 @@ })

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