elasticio-sailor-nodejs 3.0.0-sailor-proxy-dev12 → 3.0.0-sailor-proxy-dev13

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.
@@ -502,20 +502,21 @@ class ProxyClient {
502
502
  } else if (type === 'http-reply') {
503
503
  protocolVersion = 1;
504
504
  }
505
- let preparedData = data;
506
- if (protocolVersion) {
507
- preparedData = this.encryptMessageContent(data, protocolVersion);
508
- }
509
505
  const preparedMetadata = {
510
506
  ...metadata,
511
507
  messageId: metadata.messageId || uuid.v4()
512
508
  };
509
+ let preparedData = data;
510
+ if (protocolVersion) {
511
+ preparedData = this.encryptMessageContent(data, protocolVersion);
512
+ preparedMetadata.protocolVersion = protocolVersion;
513
+ }
513
514
  return {
514
- preparedData,
515
515
  preparedMetadata: _.omitBy(
516
516
  preparedMetadata,
517
517
  (value, key) => key.toLowerCase() === HEADER_ROUTING_KEY
518
- )
518
+ ),
519
+ preparedData
519
520
  };
520
521
  }
521
522
 
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": "3.0.0-sailor-proxy-dev12",
4
+ "version": "3.0.0-sailor-proxy-dev13",
5
5
  "main": "run.js",
6
6
  "scripts": {
7
7
  "build": "tsc",