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

gremlin-aws-sigv4

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gremlin-aws-sigv4 - npm Package Compare versions

Comparing version 3.5.1 to 3.5.2

7

lib/driver/aws-sigv4-driver-remote-connection.js

@@ -132,2 +132,9 @@ const debug = require('debug')('gremlin-aws-sigv4:driver');

this._rejections[queryId] = reject;
if (this._client == null) {
if (this.options.autoReconnect) {
this._connectSocket();
} else {
reject(new Error('Disconnected from database'));
}
}
this._client.submit(bytecode)

@@ -134,0 +141,0 @@ .then((result) => {

2

package.json
{
"name": "gremlin-aws-sigv4",
"version": "3.5.1",
"version": "3.5.2",
"main": "index.js",

@@ -5,0 +5,0 @@ "scripts": {

@@ -21,3 +21,3 @@ /* eslint-disable-line no-new */

describe('AwsSigV4DriverRemoteConnection', () => {
afterEach(() => {
beforeEach(() => {
jest.resetAllMocks();

@@ -32,2 +32,5 @@ gremlin.driver.Client.mockImplementation((url) => ({

},
open: jest.fn(),
submit: jest.fn(() => Promise.resolve({ toArray: jest.fn() })),
close: jest.fn(),
}));

@@ -221,2 +224,20 @@ });

});
it('should reopen the connection and submit the query if autoReconnect is true', () => {
const connection = new AwsSigV4DriverRemoteConnection(
HOST, PORT, { ...OPTS, autoReconnect: true },
);
connection._client = null;
connection.submit(null);
});
it('should fail if autoReconnect is false', () => {
const connection = new AwsSigV4DriverRemoteConnection(
HOST, PORT, { ...OPTS, autoReconnect: false },
);
connection._client = null;
connection.submit(null).catch((error) => {
expect(error.toString()).toContain('Disconnected from database');
});
});
});

@@ -223,0 +244,0 @@

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