Skip to content

Commit

Permalink
Update packages. Stop performing verify connectivity check on start
Browse files Browse the repository at this point in the history
  • Loading branch information
nad-au committed Jul 23, 2023
1 parent 1b83051 commit cd78ce2
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 75 deletions.
122 changes: 60 additions & 62 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dbc-tech/nest-neo4j",
"version": "0.7.0",
"version": "0.8.0",
"description": "",
"main": "dist/index.js",
"types": "dist/index.d.js",
Expand All @@ -20,14 +20,14 @@
},
"homepage": "https://github.com/adam-cowley/nest-neo4j#readme",
"devDependencies": {
"@nestjs/common": "^9.1.4",
"@nestjs/config": "^2.2.0",
"@nestjs/core": "^9.1.4",
"@nestjs/platform-express": "^9.1.4",
"@nestjs/common": "^10.1.0",
"@nestjs/config": "^3.0.0",
"@nestjs/core": "^10.1.0",
"@nestjs/platform-express": "^10.1.0",
"@types/node": "^18.8.2",
"typescript": "^4.8.4"
"typescript": "^5.0.2"
},
"dependencies": {
"neo4j-driver": "^5.6.0"
"neo4j-driver": "^5.10.0"
}
}
6 changes: 3 additions & 3 deletions src/neo4j.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class Neo4jModule {
{
provide: NEO4J_DRIVER,
inject: [ NEO4J_OPTIONS ],
useFactory: async (connection: Neo4jConnection) => createDriver(connection),
useFactory: (connection: Neo4jConnection) => createDriver(connection),
},
Neo4jService,
],
Expand All @@ -46,7 +46,7 @@ export class Neo4jModule {
{
provide: NEO4J_DRIVER,
inject: [ NEO4J_OPTIONS ],
useFactory: async (connection: Neo4jConnection) => createDriver(connection),
useFactory: (connection: Neo4jConnection) => createDriver(connection),
},
Neo4jService,
],
Expand Down Expand Up @@ -94,7 +94,7 @@ export class Neo4jModule {
{
provide: NEO4J_DRIVER,
inject: [ NEO4J_OPTIONS ],
useFactory: async (connection: Neo4jConnection) => createDriver(connection),
useFactory: (connection: Neo4jConnection) => createDriver(connection),
},
Neo4jService,
],
Expand Down
4 changes: 1 addition & 3 deletions src/neo4j.utils.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import neo4j from 'neo4j-driver'
import { Neo4jConnection } from './interfaces/neo4j-connection.interface'

export const createDriver = async (connection: Neo4jConnection) => {
export const createDriver = (connection: Neo4jConnection) => {
const driver = neo4j.driver(
`${connection.scheme}://${connection.host}:${connection.port}`,
neo4j.auth.basic(connection.username, connection.password),
connection.config
)

await driver.verifyConnectivity()

return driver
}

Expand Down

0 comments on commit cd78ce2

Please sign in to comment.