@defra/bng-utils-lib 0.220.0 → 0.220.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defra/bng-utils-lib",
|
|
3
|
-
"version": "0.220.
|
|
3
|
+
"version": "0.220.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "A library of utilities for the Biodiversity Net Gain Service",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"license": "OGL-UK-3.0",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@azure/identity": "^3.3.1",
|
|
20
|
-
"@defra/bng-connectors-lib": "0.220.
|
|
20
|
+
"@defra/bng-connectors-lib": "0.220.3",
|
|
21
21
|
"axios": "^1.5.1"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "62113350315389d7019b746e6e962d89a87dae90"
|
|
24
24
|
}
|
|
@@ -5,8 +5,11 @@ import DbConfig from './db-config.js'
|
|
|
5
5
|
const getDBConnection = async () => {
|
|
6
6
|
// Clone so that we don't store the token (which will expire)
|
|
7
7
|
const dbConfig = JSON.parse(JSON.stringify(DbConfig))
|
|
8
|
+
console.log('getDBConnection')
|
|
9
|
+
console.log(dbConfig)
|
|
8
10
|
if (!dbConfig.password) {
|
|
9
11
|
const credential = new DefaultAzureCredential()
|
|
12
|
+
console.log('Getting database token')
|
|
10
13
|
dbConfig.password = (await credential.getToken('https://ossrdbms-aad.database.windows.net')).token
|
|
11
14
|
}
|
|
12
15
|
return new postgresConnector.Db(dbConfig)
|