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

@dbpath/environments

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dbpath/environments - npm Package Compare versions

Comparing version 0.3.5 to 0.3.6

33

dist/src/environments.js

@@ -137,6 +137,11 @@ "use strict";

return __awaiter(this, void 0, void 0, function* () {
if (env.type === 'postgres')
return (0, postgres_1.postgresDal)(env);
if (env.type === 'oracle')
return (0, oracle_1.oracleDal)(env);
try {
if (env.type === 'postgres')
return yield (0, postgres_1.postgresDal)(env);
if (env.type === 'oracle')
return yield (0, oracle_1.oracleDal)(env);
}
catch (e) {
return [`Could not get a dal for ${env.type}. Is it up? try 'dbpath admin status'`, e.message];
}
throw new Error(`Unknown environment type ${env.type}. Currently on postgres is supported. ${JSON.stringify(env)}`);

@@ -149,9 +154,14 @@ });

return __awaiter(this, void 0, void 0, function* () {
let dal = yield dalFor(env);
if ((0, utils_1.hasErrors)(dal))
return false;
try {
const dialect = sqlDialect(env.type);
yield dal.query(dialect.safeQuery);
return true;
let dal = yield dalFor(env);
if ((0, utils_1.hasErrors)(dal))
return false;
try {
const dialect = sqlDialect(env.type);
yield dal.query(dialect.safeQuery);
return true;
}
finally {
yield dal.close();
}
}

@@ -161,5 +171,2 @@ catch (e) {

}
finally {
yield dal.close();
}
});

@@ -166,0 +173,0 @@ }

{
"name": "@dbpath/environments",
"description": "",
"version": "0.3.5",
"version": "0.3.6",
"main": "dist/index",

@@ -20,7 +20,7 @@ "types": "dist/index",

"dependencies": {
"@dbpath/utils": "0.3.5",
"@dbpath/files": "0.3.5",
"@dbpath/postgres": "0.3.5",
"@dbpath/mysql": "0.3.5",
"@dbpath/oracle": "0.3.5"
"@dbpath/utils": "0.3.6",
"@dbpath/files": "0.3.6",
"@dbpath/postgres": "0.3.6",
"@dbpath/mysql": "0.3.6",
"@dbpath/oracle": "0.3.6"
},

@@ -27,0 +27,0 @@ "devDependencies": {

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