elasticio-sailor-nodejs 2.6.28-dev1 → 2.6.28-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/lib/sailor.js +9 -3
- package/package.json +1 -1
package/lib/sailor.js
CHANGED
|
@@ -280,7 +280,10 @@ class Sailor {
|
|
|
280
280
|
logger.info('Going to fetch message body.', { objectId });
|
|
281
281
|
|
|
282
282
|
try {
|
|
283
|
-
object = await this.objectStorage.getAsJSON(
|
|
283
|
+
object = await this.objectStorage.getAsJSON(
|
|
284
|
+
objectId,
|
|
285
|
+
{ jwtPayloadOrToken: this.settings.OBJECT_STORAGE_TOKEN }
|
|
286
|
+
);
|
|
284
287
|
} catch (e) {
|
|
285
288
|
log.error(e);
|
|
286
289
|
throw new Error(`Failed to get message body with id=${objectId}`);
|
|
@@ -292,9 +295,12 @@ class Sailor {
|
|
|
292
295
|
return object;
|
|
293
296
|
}
|
|
294
297
|
|
|
295
|
-
|
|
298
|
+
uploadMessageBody(bodyBuf) {
|
|
296
299
|
const stream = () => Readable.from(bodyBuf);
|
|
297
|
-
return
|
|
300
|
+
return this.objectStorage.addAsStream(
|
|
301
|
+
stream,
|
|
302
|
+
{ jwtPayloadOrToken: this.settings.OBJECT_STORAGE_TOKEN }
|
|
303
|
+
);
|
|
298
304
|
}
|
|
299
305
|
|
|
300
306
|
async runExec(module, payload, message, outgoingMessageHeaders, stepData, timeStart, logger) {
|
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.6.28-
|
|
4
|
+
"version": "2.6.28-dev2",
|
|
5
5
|
"main": "run.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"audit": "better-npm-audit audit --level high --production",
|