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

analysis-tools

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

analysis-tools - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

dist/database/driver/DriverInterface.d.ts

2

dist/database/SQLDatabase.d.ts

@@ -1,2 +0,2 @@

declare type DatabaseScheme = 'mysql';
declare type DatabaseScheme = 'mysql' | 'postgresql';
export interface Database {

@@ -3,0 +3,0 @@ scheme: DatabaseScheme;

@@ -40,3 +40,4 @@ "use strict";

exports.SQLDatabase = void 0;
var MySQLDatabase_1 = require("./driver/MySQLDatabase");
var MySQL_1 = require("./driver/MySQL");
var Postgres_1 = require("./driver/Postgres");
var SQLDatabase = /** @class */ (function () {

@@ -47,4 +48,12 @@ function SQLDatabase(endpoint) {

this.scheme = 'mysql';
this.driver = new MySQLDatabase_1.MySQLDatabase(endpoint);
this.driver = new MySQL_1.MySQLDatabase(endpoint);
return;
}
if (this.endpoint.startsWith('postgresql://') ||
this.endpoint.startsWith('postgres://')) {
this.scheme = 'postgresql';
this.driver = new Postgres_1.PostgresDatabase(endpoint);
return;
}
throw new Error('Error in SQLDatabase: unknown database scheme');
}

@@ -51,0 +60,0 @@ SQLDatabase.prototype.init = function () {

{
"name": "analysis-tools",
"version": "0.0.2",
"version": "0.0.3",
"main": "dist/index.js",
"license": "MIT",
"dependencies": {
"connection-string-parser": "^1.0.3",
"mysql2": "^2.1.0"
"connection-string-parser": "1.0.3",
"mysql2": "2.1.0",
"pg": "8.2.1"
},
"devDependencies": {
"@types/mysql2": "types/mysql2",
"@types/node": "^14.0.13",
"ts-node": "^8.10.2",
"typescript": "^3.9.5"
"@types/node": "14.0.13",
"@types/pg": "^7.14.3",
"ts-node": "8.10.2",
"typescript": "3.9.5"
},

@@ -19,4 +21,4 @@ "scripts": {

"build": "tsc -d",
"prepublish": "rm -rf dist/ && yarn build"
"prepublishOnly": "rm -rf dist/ && yarn build"
}
}

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

import { MySQLDatabase } from './driver/MySQLDatabase'
import { MySQLDatabase } from './driver/MySQL'
import { PostgresDatabase } from './driver/Postgres'
type DatabaseScheme = 'mysql'
type DatabaseScheme = 'mysql' | 'postgresql'
export interface Database {

@@ -18,3 +19,3 @@ scheme: DatabaseScheme

private driver: MySQLDatabase
private driver: MySQLDatabase | PostgresDatabase

@@ -27,3 +28,13 @@ constructor(endpoint) {

this.driver = new MySQLDatabase(endpoint)
return
}
if (
this.endpoint.startsWith('postgresql://') ||
this.endpoint.startsWith('postgres://')
) {
this.scheme = 'postgresql'
this.driver = new PostgresDatabase(endpoint)
return
}
throw new Error('Error in SQLDatabase: unknown database scheme')
}

@@ -30,0 +41,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