New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

knex-aws-xray

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

knex-aws-xray - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

19

lib/index.js

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

const DATABASE_VERS = process.env.MYSQL_DATABASE_VERSION;
const DRIVER_VERS = process.env.MYSQL_DRIVER_VERSION;
const DATABASE_VERS = process.env.MYSQL_DATABASE_VERSION ||
process.env.POSTGRES_DATABASE_VERSION;
const DRIVER_VERS = process.env.MYSQL_DRIVER_VERSION || process.env.POSTGRES_DRIVER_VERSION;
const DEFAULT_DATABASE_PORT = process.env.MYSQL_DATABASE_VERSION ? '3306' : '5432';
var AWSXRay;

@@ -24,7 +27,7 @@ var SqlData;

function getSQLServerURL() {
return knex.client.config.host
return knex.client.config.connection.host
+ ':'
+ ((knex.client.config.port != undefined) ? knex.client.config.port : '3306')
+ ((knex.client.config.connection.port != undefined) ? knex.client.config.connection.port : DEFAULT_DATABASE_PORT)
+ '/'
+ knex.client.config.database
+ knex.client.config.connection.database
}

@@ -38,3 +41,3 @@

subsegment.close()
delete openSegments[uuid]
delete openSegments[queryId]
}

@@ -48,3 +51,3 @@

subsegment.close(err)
delete openSegments[uuid]
delete openSegments[queryId]
}

@@ -57,3 +60,3 @@

const payload = new SqlData(DATABASE_VERS, DRIVER_VERS, knex.client.config.user, getSQLServerURL(), method);
const payload = new SqlData(DATABASE_VERS, DRIVER_VERS, knex.client.config.connection.user, getSQLServerURL(), method);
payload['sanitized_query'] = sql

@@ -60,0 +63,0 @@

{
"name": "knex-aws-xray",
"version": "0.0.2",
"version": "0.0.3",
"description": "AWS X-Ray adapter for knex",

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

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