Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d9bb46b

Browse files
authoredMar 22, 2024··
maester-client updated (#207)
1 parent 0621814 commit d9bb46b

File tree

5 files changed

+4933
-3901
lines changed

5 files changed

+4933
-3901
lines changed
 

‎CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 2.7.2 (March 22, 2024)
2+
3+
* @elastic.io/maester-client updated to 5.0.2 ([#206](https://github.com/elasticio/sailor-nodejs/issues/206))
4+
5+
## 2.7.1 (October 20, 2022)
6+
7+
* Replaced `object-storage-client` with `maester-client`
8+
19
## 2.7.0 (September 15, 2022)
210

311
* Add AMQP_PERSISTENT_MESSAGES configuration env var to enable persistent delivery mode.
@@ -142,3 +150,4 @@
142150
## 2.3.0 (October 19, 2018)
143151

144152
* Sailor now handles RabbitMQ disconnects correctly
153+

‎lib/sailor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class Sailor {
292292
logger.info('Successfully obtained message body.', { objectId });
293293
logger.trace('Message body object received');
294294

295-
return object;
295+
return object.data;
296296
}
297297

298298
uploadMessageBody(bodyBuf) {

‎mocha_spec/unit/sailor.spec.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -971,10 +971,14 @@ describe('Sailor', () => {
971971
bodyObjectId = 'body-object-id';
972972
passthroughObjectId = 'passthrough-object-id';
973973
body = {
974-
some: 'body'
974+
data: {
975+
some: 'body'
976+
}
975977
};
976978
passThroughBody = {
977-
passThrough: 'body'
979+
data: {
980+
some: 'body'
981+
}
978982
};
979983
payload = {
980984
headers: {
@@ -1084,8 +1088,8 @@ describe('Sailor', () => {
10841088
runExecSpy,
10851089
sinon.match.object,
10861090
sinon.match
1087-
.hasNested('body', body)
1088-
.and(sinon.match.hasNested('passthrough.step_4.body', passThroughBody)),
1091+
.hasNested('body', body.data)
1092+
.and(sinon.match.hasNested('passthrough.step_4.body', passThroughBody.data)),
10891093
message,
10901094
sinon.match.object,
10911095
sinon.match.object,
@@ -1112,7 +1116,7 @@ describe('Sailor', () => {
11121116
headers: {
11131117
[Sailor.OBJECT_ID_HEADER]: passthroughObjectId
11141118
},
1115-
body: passThroughBody
1119+
body: passThroughBody.data
11161120
}
11171121
}
11181122
},
@@ -1239,7 +1243,7 @@ describe('Sailor', () => {
12391243
headers: {
12401244
[Sailor.OBJECT_ID_HEADER]: passthroughObjectId
12411245
},
1242-
body: passThroughBody
1246+
body: passThroughBody.data
12431247
}
12441248
}
12451249
},
@@ -1311,7 +1315,7 @@ describe('Sailor', () => {
13111315

13121316
sandbox.stub(sailor.objectStorage, 'getOne')
13131317
.withArgs(passthroughObjectId, { jwtPayloadOrToken: settings.OBJECT_STORAGE_TOKEN })
1314-
.resolves({ passthrough: 'body' });
1318+
.resolves({ data: { passthrough: 'body' } });
13151319

13161320
await sailor.connect();
13171321
await sailor.prepare();
@@ -1418,7 +1422,7 @@ describe('Sailor', () => {
14181422

14191423
sandbox.stub(sailor.objectStorage, 'getOne')
14201424
.withArgs(passthroughObjectId, { jwtPayloadOrToken: settings.OBJECT_STORAGE_TOKEN })
1421-
.resolves({ passthrough: 'body' });
1425+
.resolves({ data: { passthrough: 'body' } });
14221426

14231427
await sailor.connect();
14241428
await sailor.prepare();

‎package-lock.json

Lines changed: 4909 additions & 3890 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "elasticio-sailor-nodejs",
33
"description": "The official elastic.io library for bootstrapping and executing for Node.js connectors",
4-
"version": "2.7.1",
4+
"version": "2.7.2",
55
"main": "run.js",
66
"scripts": {
77
"audit": "better-npm-audit audit --level high --production",
@@ -16,7 +16,7 @@
1616
"node": ">=12.13.0"
1717
},
1818
"dependencies": {
19-
"@elastic.io/maester-client": "4.0.3",
19+
"@elastic.io/maester-client": "5.0.2",
2020
"amqplib": "0.8.0",
2121
"bunyan": "1.8.10",
2222
"co": "4.6.0",

0 commit comments

Comments
 (0)
Please sign in to comment.