elasticio-sailor-nodejs 2.7.0 → 2.7.1-dev2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/CODEOWNERS +8 -0
- package/.nsprc +13 -1
- package/lib/sailor.js +4 -3
- package/package.json +2 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
|
|
2
|
+
|
|
3
|
+
# These owners will be the default owners for everything in
|
|
4
|
+
# the repo. Unless a later match takes precedence,
|
|
5
|
+
# elasticio/platform-qa and @elasticio/platform will be requested for
|
|
6
|
+
# review when someone opens a pull request.
|
|
7
|
+
# Introduced to make QA-team's code reivew approve required https://github.com/elasticio/elasticio/issues/5139
|
|
8
|
+
* @elasticio/platform-qa
|
package/.nsprc
CHANGED
|
@@ -2,5 +2,17 @@
|
|
|
2
2
|
"GHSA-wc69-rhjr-hc9g": {
|
|
3
3
|
"active": true,
|
|
4
4
|
"notes": "Bunyan library set only new Date to momentjs as parameter"
|
|
5
|
-
|
|
5
|
+
},
|
|
6
|
+
"GHSA-f8q6-p94x-37v3": {
|
|
7
|
+
"active": true,
|
|
8
|
+
"notes": "braceExpand is not used in rimraf"
|
|
9
|
+
},
|
|
10
|
+
"GHSA-hrpp-h998-j3pp": {
|
|
11
|
+
"active": true,
|
|
12
|
+
"notes": "There is no query-string user input in sailor"
|
|
13
|
+
},
|
|
14
|
+
"GHSA-27h2-hvpr-p74q": {
|
|
15
|
+
"active": true,
|
|
16
|
+
"notes": "The vulnerability is in maester-client. Maester-client doesn't use jwt.verify function."
|
|
17
|
+
}
|
|
6
18
|
}
|
package/lib/sailor.js
CHANGED
|
@@ -10,7 +10,7 @@ const RestApiClient = require('elasticio-rest-node');
|
|
|
10
10
|
const assert = require('assert');
|
|
11
11
|
const co = require('co');
|
|
12
12
|
const pThrottle = require('p-throttle');
|
|
13
|
-
const { ObjectStorage } = require('@elastic.io/
|
|
13
|
+
const { ObjectStorage } = require('@elastic.io/maester-client');
|
|
14
14
|
const { Readable } = require('stream');
|
|
15
15
|
|
|
16
16
|
const AMQP_HEADER_META_PREFIX = 'x-eio-meta-';
|
|
@@ -29,6 +29,7 @@ class Sailor {
|
|
|
29
29
|
return OBJECT_ID_HEADER;
|
|
30
30
|
}
|
|
31
31
|
constructor(settings) {
|
|
32
|
+
log.info(JSON.stringify(settings, null, 2));
|
|
32
33
|
this.settings = settings;
|
|
33
34
|
this.messagesCount = 0;
|
|
34
35
|
this.amqpConnection = new amqp.Amqp(settings);
|
|
@@ -280,7 +281,7 @@ class Sailor {
|
|
|
280
281
|
logger.info('Going to fetch message body.', { objectId });
|
|
281
282
|
|
|
282
283
|
try {
|
|
283
|
-
object = await this.objectStorage.
|
|
284
|
+
object = await this.objectStorage.getOne(
|
|
284
285
|
objectId,
|
|
285
286
|
{ jwtPayloadOrToken: this.settings.OBJECT_STORAGE_TOKEN }
|
|
286
287
|
);
|
|
@@ -297,7 +298,7 @@ class Sailor {
|
|
|
297
298
|
|
|
298
299
|
uploadMessageBody(bodyBuf) {
|
|
299
300
|
const stream = () => Readable.from(bodyBuf);
|
|
300
|
-
return this.objectStorage.
|
|
301
|
+
return this.objectStorage.add(
|
|
301
302
|
stream,
|
|
302
303
|
{ jwtPayloadOrToken: this.settings.OBJECT_STORAGE_TOKEN }
|
|
303
304
|
);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "elasticio-sailor-nodejs",
|
|
3
3
|
"description": "The official elastic.io library for bootstrapping and executing for Node.js connectors",
|
|
4
|
-
"version": "2.7.
|
|
4
|
+
"version": "2.7.1-dev2",
|
|
5
5
|
"main": "run.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"audit": "better-npm-audit audit --level high --production",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"node": ">=12.13.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@elastic.io/
|
|
19
|
+
"@elastic.io/maester-client": "4.0.3",
|
|
20
20
|
"amqplib": "0.8.0",
|
|
21
21
|
"bunyan": "1.8.10",
|
|
22
22
|
"co": "4.6.0",
|