neo4j-func
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -17,2 +17,3 @@ "use strict"; | ||
const lodash_1 = __importDefault(require("lodash")); | ||
const neo4j_default_1 = __importDefault(require("./config/neo4j-default")); | ||
const neo4j = neo4jModule; | ||
@@ -23,3 +24,2 @@ class Neo4jService { | ||
let configCustom; | ||
let configDefault; | ||
try { | ||
@@ -31,9 +31,3 @@ configCustom = js_yaml_1.default.safeLoad(fs_1.default.readFileSync(process.cwd() + '/neo4j.yaml', 'utf8')); | ||
} | ||
try { | ||
configDefault = js_yaml_1.default.safeLoad(fs_1.default.readFileSync(__dirname + '/config/neo4j-default.yaml', 'utf8')); | ||
} | ||
catch (e) { | ||
throw new Error(e); | ||
} | ||
this.config = lodash_1.default.merge(configDefault, configCustom); | ||
this.config = lodash_1.default.merge(neo4j_default_1.default, configCustom); | ||
this.driver = neo4j.driver(`bolt://${this.config.host}:${this.config.port}`, neo4j.auth.basic(this.config.credentials.user, this.config.credentials.password)); | ||
@@ -40,0 +34,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://github.com/Milihhard/neo4j-func#readme", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"keywords": [ | ||
@@ -8,0 +8,0 @@ "neo4j", |
@@ -7,2 +7,3 @@ import * as neo4jModule from 'neo4j-driver'; | ||
import _ from 'lodash'; | ||
import configDefault from './config/neo4j-default'; | ||
@@ -19,3 +20,2 @@ const neo4j = neo4jModule; | ||
let configCustom: Neo4jConfig; | ||
let configDefault: Neo4jConfig; | ||
try { | ||
@@ -28,9 +28,2 @@ configCustom = yaml.safeLoad( | ||
} | ||
try { | ||
configDefault = yaml.safeLoad( | ||
fs.readFileSync(__dirname + '/config/neo4j-default.yaml', 'utf8') | ||
); | ||
} catch (e) { | ||
throw new Error(e); | ||
} | ||
this.config = _.merge(configDefault, configCustom); | ||
@@ -37,0 +30,0 @@ this.driver = neo4j.driver( |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
98128
110
1858
0