Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

http-aws-es

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-aws-es - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

3

CHANGELOG.md

@@ -0,1 +1,4 @@

### 2.0.5
* Catch aws credential errors. #35
* Add source maps.

@@ -2,0 +5,0 @@ ### 2.0.0

17

connector.js

@@ -23,3 +23,2 @@ /**

// #10
if (protocol) endpoint.protocol = protocol.replace(/:?$/, ":");

@@ -77,8 +76,14 @@ if (port) endpoint.port = port;

// load creds
// #1, #3, #12, #15, #16, #21
const CREDS = await this.getAWSCredentials();
let CREDS;
try {
CREDS = await this.getAWSCredentials();
// Sign the request (Sigv4)
let signer = new AWS.Signers.V4(request, 'es');
signer.addAuthorization(CREDS, new Date());
// Sign the request (Sigv4)
let signer = new AWS.Signers.V4(request, 'es');
signer.addAuthorization(CREDS, new Date());
} catch (e) {
if (e && e.message) e.message = `AWS Credentials error: ${e.message}`;
cleanUp(e);
return () => {};
}

@@ -85,0 +90,0 @@ let send = new AWS.NodeHttpClient();

@@ -77,3 +77,2 @@ 'use strict';

// #10
if (protocol) endpoint.protocol = protocol.replace(/:?$/, ":");

@@ -141,7 +140,8 @@ if (port) endpoint.port = port;

// load creds
// #1, #3, #12, #15, #16, #21
_context.next = 20;
CREDS = void 0;
_context.prev = 19;
_context.next = 22;
return this.getAWSCredentials();
case 20:
case 22:
CREDS = _context.sent;

@@ -154,3 +154,14 @@

signer.addAuthorization(CREDS, new Date());
_context.next = 32;
break;
case 27:
_context.prev = 27;
_context.t0 = _context['catch'](19);
if (_context.t0 && _context.t0.message) _context.t0.message = 'AWS Credentials error: ' + _context.t0.message;
cleanUp(_context.t0);
return _context.abrupt('return', function () {});
case 32:
send = new AWS.NodeHttpClient();

@@ -187,3 +198,3 @@

case 29:
case 38:
case 'end':

@@ -193,3 +204,3 @@ return _context.stop();

}
}, _callee, this);
}, _callee, this, [[19, 27]]);
}));

@@ -221,1 +232,2 @@

module.exports = HttpAmazonESConnector;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbm5lY3Rvci5qcyJdLCJuYW1lcyI6WyJIdHRwQW1hem9uRVNDb25uZWN0b3IiLCJob3N0IiwiY29uZmlnIiwicHJvdG9jb2wiLCJwb3J0IiwiZW5kcG9pbnQiLCJFbmRwb2ludCIsInJlcGxhY2UiLCJBV1MiLCJwYXJhbXMiLCJjYiIsImluY29taW5nIiwidGltZW91dElkIiwicmVxdWVzdCIsInJlcSIsInN0YXR1cyIsImhlYWRlcnMiLCJsb2ciLCJyZXNwb25zZSIsInJlcVBhcmFtcyIsIm1ha2VSZXFQYXJhbXMiLCJjbGVhblVwIiwiYmluZCIsImVyciIsImNsZWFyVGltZW91dCIsInJlbW92ZUFsbExpc3RlbmVycyIsIkVycm9yIiwidHJhY2UiLCJtZXRob2QiLCJib2R5IiwiSHR0cFJlcXVlc3QiLCJwIiwicmVnaW9uIiwiQ1JFRFMiLCJnZXRBV1NDcmVkZW50aWFscyIsInNpZ25lciIsIlNpZ25lcnMiLCJWNCIsImFkZEF1dGhvcml6YXRpb24iLCJEYXRlIiwibWVzc2FnZSIsInNlbmQiLCJOb2RlSHR0cENsaWVudCIsImhhbmRsZVJlcXVlc3QiLCJfaW5jb21pbmciLCJzdGF0dXNDb2RlIiwiZW5jb2RpbmciLCJ0b0xvd2VyQ2FzZSIsInBpcGUiLCJjcmVhdGVVbnppcCIsInNldEVuY29kaW5nIiwib24iLCJkIiwic2V0Tm9EZWxheSIsInNldFNvY2tldEtlZXBBbGl2ZSIsImFib3J0IiwicmVzb2x2ZSIsInJlamVjdCIsImdldENyZWRlbnRpYWxzIiwiY3JlZHMiLCJtb2R1bGUiLCJleHBvcnRzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Oz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udGlhbHMoKGVyciwgY3JlZHMpID0+IHtcbiAgICAgICAgaWYgKGVycikgcmV0dXJuIHJlamVjdChlcnIpO1xuICAgICAgICByZXR1cm4gcmVzb2x2ZShjcmVkcyk7XG4gICAgICB9KTtcbiAgICB9KTtcbiAgfVxufVxuXG5tb2R1bGUuZXhwb3J0cyA9IEh0dHBBbWF6b25FU0Nvbm5lY3RvcjtcbiJdfQ==

@@ -69,3 +69,2 @@ 'use strict';

// #10
if (protocol) endpoint.protocol = protocol.replace(/:?$/, ":");

@@ -133,7 +132,8 @@ if (port) endpoint.port = port;

// load creds
// #1, #3, #12, #15, #16, #21
_context.next = 20;
CREDS = void 0;
_context.prev = 19;
_context.next = 22;
return this.getAWSCredentials();
case 20:
case 22:
CREDS = _context.sent;

@@ -146,3 +146,14 @@

signer.addAuthorization(CREDS, new Date());
_context.next = 32;
break;
case 27:
_context.prev = 27;
_context.t0 = _context['catch'](19);
if (_context.t0 && _context.t0.message) _context.t0.message = `AWS Credentials error: ${_context.t0.message}`;
cleanUp(_context.t0);
return _context.abrupt('return', function () {});
case 32:
send = new AWS.NodeHttpClient();

@@ -179,3 +190,3 @@

case 29:
case 38:
case 'end':

@@ -185,3 +196,3 @@ return _context.stop();

}
}, _callee, this);
}, _callee, this, [[19, 27]]);
}));

@@ -213,1 +224,2 @@

module.exports = HttpAmazonESConnector;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbm5lY3Rvci5qcyJdLCJuYW1lcyI6WyJIdHRwQW1hem9uRVNDb25uZWN0b3IiLCJob3N0IiwiY29uZmlnIiwicHJvdG9jb2wiLCJwb3J0IiwiZW5kcG9pbnQiLCJFbmRwb2ludCIsInJlcGxhY2UiLCJBV1MiLCJwYXJhbXMiLCJjYiIsImluY29taW5nIiwidGltZW91dElkIiwicmVxdWVzdCIsInJlcSIsInN0YXR1cyIsImhlYWRlcnMiLCJsb2ciLCJyZXNwb25zZSIsInJlc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bWluZy5waXBlKHpsaWIuY3JlYXRlVW56aXAoKSk7XG4gICAgICB9XG5cbiAgICAgIGluY29taW5nLnNldEVuY29kaW5nKCd1dGY4Jyk7XG4gICAgICBpbmNvbWluZy5vbignZGF0YScsIGZ1bmN0aW9uIChkKSB7XG4gICAgICAgIHJlc3BvbnNlICs9IGQ7XG4gICAgICB9KTtcblxuICAgICAgaW5jb21pbmcub24oJ2Vycm9yJywgY2xlYW5VcCk7XG4gICAgICBpbmNvbWluZy5vbignZW5kJywgY2xlYW5VcCk7XG4gICAgfSwgY2xlYW5VcCk7XG5cbiAgICByZXEub24oJ2Vycm9yJywgY2xlYW5VcCk7XG5cbiAgICByZXEuc2V0Tm9EZWxheSh0cnVlKTtcbiAgICByZXEuc2V0U29ja2V0S2VlcEFsaXZlKHRydWUpO1xuXG4gICAgcmV0dXJuIGZ1bmN0aW9uICgpIHtcbiAgICAgIHJlcS5hYm9ydCgpO1xuICAgIH07XG4gIH1cblxuICBnZXRBV1NDcmVkZW50aWFscygpIHtcbiAgICBjb25zdCB7IEFXUyB9ID0gdGhpcztcblxuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICBBV1MuY29uZmlnLmdldENyZWRlbnRpYWxzKChlcnIsIGNyZWRzKSA9PiB7XG4gICAgICAgIGlmIChlcnIpIHJldHVybiByZWplY3QoZXJyKTtcbiAgICAgICAgcmV0dXJuIHJlc29sdmUoY3JlZHMpO1xuICAgICAgfSk7XG4gICAgfSk7XG4gIH1cbn1cblxubW9kdWxlLmV4cG9ydHMgPSBIdHRwQW1hem9uRVNDb25uZWN0b3I7XG4iXX0=

@@ -40,3 +40,2 @@ 'use strict';

// #10
if (protocol) endpoint.protocol = protocol.replace(/:?$/, ":");

@@ -97,8 +96,14 @@ if (port) endpoint.port = port;

// load creds
// #1, #3, #12, #15, #16, #21
const CREDS = yield _this.getAWSCredentials();
let CREDS;
try {
CREDS = yield _this.getAWSCredentials();
// Sign the request (Sigv4)
let signer = new AWS.Signers.V4(request, 'es');
signer.addAuthorization(CREDS, new Date());
// Sign the request (Sigv4)
let signer = new AWS.Signers.V4(request, 'es');
signer.addAuthorization(CREDS, new Date());
} catch (e) {
if (e && e.message) e.message = `AWS Credentials error: ${e.message}`;
cleanUp(e);
return function () {};
}

@@ -151,1 +156,2 @@ let send = new AWS.NodeHttpClient();

module.exports = HttpAmazonESConnector;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbm5lY3Rvci5qcyJdLCJuYW1lcyI6WyJIdHRwQW1hem9uRVNDb25uZWN0b3IiLCJjb25zdHJ1Y3RvciIsImhvc3QiLCJjb25maWciLCJwcm90b2NvbCIsInBvcnQiLCJlbmRwb2ludCIsIkVuZHBvaW50IiwicmVwbGFjZSIsIkFXUyIsInJlcXVlc3QiLCJwYXJhbXMiLCJjYiIsImluY29taW5nIiwidGltZW91dElkIiwicmVxIiwic3RhdHVzIiwiaGVhZGVycyIsImxvZyIsInJlc3BvbnNlIiwicmVxUGFyYW1zIiwibWFrZVJlcVBhcmFtcyIsImNsZWFuVXAiLCJiaW5kIiwiZXJyIiwiY2xlYXJUaW1lb3V0IiwicmVtb3ZlQWxsTGlzdGVuZXJzIiwiRXJyb3IiLCJ0cmFjZSIsIm1ldGhvZCIsImJvZHkiLCJIdHRwUmVxdWVzdCIsInAiLCJyZWdpb24iLCJDUkVEUyIsImdldEFXU0NyZWRlbnRpYWxzIiwic2lnbmVyIiwiU2lnbmVycyIsIlY0IiwiYWRkQXV0aG9yaXphdGlvbiIsIkRhdGUiLCJlIiwibWVzc2FnZSIsInNlbmQiLCJOb2RlSHR0cENsaWVudCIsImhhbmRsZVJlcXVlc3QiLCJfaW5jb21pbmciLCJzdGF0dXNDb2RlIiwiZW5jb2RpbmciLCJ0b0xvd2VyQ2FzZSIsInBpcGUiLCJjcmVhdGVVbnppcCIsInNldEVuY29kaW5nIiwib24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ignZXJyb3InLCBjbGVhblVwKTtcblxuICAgIHJlcS5zZXROb0RlbGF5KHRydWUpO1xuICAgIHJlcS5zZXRTb2NrZXRLZWVwQWxpdmUodHJ1ZSk7XG5cbiAgICByZXR1cm4gZnVuY3Rpb24gKCkge1xuICAgICAgcmVxLmFib3J0KCk7XG4gICAgfTtcbiAgfVxuXG4gIGdldEFXU0NyZWRlbnRpYWxzKCkge1xuICAgIGNvbnN0IHsgQVdTIH0gPSB0aGlzO1xuXG4gICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgIEFXUy5jb25maWcuZ2V0Q3JlZGVudGlhbHMoKGVyciwgY3JlZHMpID0+IHtcbiAgICAgICAgaWYgKGVycikgcmV0dXJuIHJlamVjdChlcnIpO1xuICAgICAgICByZXR1cm4gcmVzb2x2ZShjcmVkcyk7XG4gICAgICB9KTtcbiAgICB9KTtcbiAgfVxufVxuXG5tb2R1bGUuZXhwb3J0cyA9IEh0dHBBbWF6b25FU0Nvbm5lY3RvcjtcbiJdfQ==

@@ -38,3 +38,2 @@ 'use strict';

// #10
if (protocol) endpoint.protocol = protocol.replace(/:?$/, ":");

@@ -92,8 +91,14 @@ if (port) endpoint.port = port;

// load creds
// #1, #3, #12, #15, #16, #21
const CREDS = await this.getAWSCredentials();
let CREDS;
try {
CREDS = await this.getAWSCredentials();
// Sign the request (Sigv4)
let signer = new AWS.Signers.V4(request, 'es');
signer.addAuthorization(CREDS, new Date());
// Sign the request (Sigv4)
let signer = new AWS.Signers.V4(request, 'es');
signer.addAuthorization(CREDS, new Date());
} catch (e) {
if (e && e.message) e.message = `AWS Credentials error: ${e.message}`;
cleanUp(e);
return () => {};
}

@@ -144,1 +149,2 @@ let send = new AWS.NodeHttpClient();

module.exports = HttpAmazonESConnector;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbm5lY3Rvci5qcyJdLCJuYW1l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ICAgICBpZiAoZXJyKSByZXR1cm4gcmVqZWN0KGVycik7XG4gICAgICAgIHJldHVybiByZXNvbHZlKGNyZWRzKTtcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG59XG5cbm1vZHVsZS5leHBvcnRzID0gSHR0cEFtYXpvbkVTQ29ubmVjdG9yO1xuIl19
{
"name": "http-aws-es",
"version": "2.0.4",
"version": "2.0.5",
"description": "Use the elasticsearch-js client with Amazon ES",

@@ -40,7 +40,7 @@ "repository": "https://github.com/TheDeveloper/http-aws-es",

"build": "npm run build-node4; npm run build-node6; npm run build-node8; npm run build-legacy",
"test": "BABEL_ENV=node6 babel-node ./test/local",
"test-node8": "BABEL_ENV=node8 node ./test/local",
"test-node6": "BABEL_ENV=node6 node ./test/local",
"test-node4": "BABEL_ENV=node4 node ./test/local",
"test-legacy": "BABEL_ENV=legacy node ./test/local",
"test": "npm run test-node8 --",
"test-node8": "npx -p node-bin@8 -- node ./test/local",
"test-node6": "npx -p node-bin@6 -- node ./test/local",
"test-node4": "npx -p node-bin@4 -- node ./test/local",
"test-legacy": "npx -p node-bin@0.10 -- node ./test/local",
"build-node4": "BABEL_ENV=node4 babel ./connector.js -o ./node4.js",

@@ -47,0 +47,0 @@ "build-node6": "BABEL_ENV=node6 babel ./connector.js -o ./node6.js",

@@ -18,3 +18,3 @@ # Connection handler for Amazon ES [<img title="Version" src="https://img.shields.io/npm/v/http-aws-es.svg?style=flat-square" />](https://www.npmjs.org/package/http-aws-es)

var es = require('elasticsearch').Client({
hosts: [ 'https://amazon-es-host.us-east-1.es.amazonaws.com:80' ],
hosts: [ 'https://amazon-es-host.us-east-1.es.amazonaws.com' ],
connectionClass: require('http-aws-es')

@@ -35,3 +35,4 @@ });

```bash
npm run test -- --endpoint https://amazon-es-host.us-east-1.es.amazonaws.com --region us-east-1
# run with node 8
npm test -- --endpoint https://amazon-es-host.us-east-1.es.amazonaws.com --region us-east-1
```

@@ -17,3 +17,3 @@ var argv = require('minimist')(process.argv.slice(2));

function cb(err, result) {
console.log(result);
console.log(err, result);
process.exit();

@@ -20,0 +20,0 @@ }

Sorry, the diff of this file is not supported yet

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