Socket
Socket
Sign inDemoInstall

slonik

Package Overview
Dependencies
11
Maintainers
1
Versions
392
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.2.1 to 8.3.0

5

dist/binders/bindPool.js

@@ -24,2 +24,7 @@ "use strict";

const connection = await pool.connect();
if (clientConfiguration.onConnect) {
await clientConfiguration.onConnect(connection);
}
return (0, _bindPoolConnection.default)(parentLog, pool, connection, clientConfiguration);

@@ -26,0 +31,0 @@ },

@@ -73,2 +73,7 @@ "use strict";

});
if (clientConfiguration.onConnect) {
await clientConfiguration.onConnect(connection);
}
return (0, _bindSingleConnection.default)(connectionLog, pool, connection, clientConfiguration);

@@ -75,0 +80,0 @@ };

2

package.json

@@ -93,3 +93,3 @@ {

},
"version": "8.2.1"
"version": "8.3.0"
}

@@ -110,4 +110,9 @@ <a name="slonik"></a>

/**
* @property interceptors An array of [Slonik interceptors](https://github.com/gajus/slonik#slonik-interceptors).
* @property onConnect A new connection handler. Executed after a connection is established, but before allowing the connection to be used by any clients.
*/
type ClientConfigurationType = {|
+interceptors?: $ReadOnlyArray<InterceptorType>
+interceptors?: $ReadOnlyArray<InterceptorType>,
+onConnect?: (connection: DatabaseConnectionType) => MaybePromiseType<void>
|};

@@ -114,0 +119,0 @@

@@ -38,2 +38,6 @@ // @flow

if (clientConfiguration.onConnect) {
await clientConfiguration.onConnect(connection);
}
return bindPoolConnection(parentLog, pool, connection, clientConfiguration);

@@ -40,0 +44,0 @@ },

@@ -81,3 +81,7 @@ // @flow

if (clientConfiguration.onConnect) {
await clientConfiguration.onConnect(connection);
}
return bindSingleConnection(connectionLog, pool, connection, clientConfiguration);
};

@@ -15,2 +15,4 @@ // @flow

type MaybePromiseType<T> = T | Promise<T>;
type FieldType = {|

@@ -41,4 +43,9 @@ +columnID: number,

/**
* @property interceptors An array of [Slonik interceptors](https://github.com/gajus/slonik#slonik-interceptors).
* @property onConnect A new connection handler. Executed after a connection is established, but before allowing the connection to be used by any clients.
*/
export type ClientConfigurationType = {|
+interceptors?: $ReadOnlyArray<InterceptorType>
+interceptors?: $ReadOnlyArray<InterceptorType>,
+onConnect?: (connection: DatabaseConnectionType) => MaybePromiseType<void>
|};

@@ -45,0 +52,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc