leaf-connect 1.1.1 → 1.1.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 +8 -7
- package/src/index.js +1 -1
- package/src/lib/encrypt-password.js +3 -5
package/package.json
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"name": "leaf-connect",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.3",
|
4
4
|
"description": "Node.js client library for the Nissan Leaf API",
|
5
5
|
"main": "src/index.js",
|
6
|
-
"scripts": {
|
7
|
-
"lint": "standard src/**/*.js",
|
8
|
-
"lint-fix": "standard --fix src/**/*.js"
|
9
|
-
},
|
10
6
|
"files": [
|
11
7
|
"src/*"
|
12
8
|
],
|
@@ -23,9 +19,14 @@
|
|
23
19
|
},
|
24
20
|
"license": "MIT",
|
25
21
|
"dependencies": {
|
26
|
-
"axios": "1.4.0"
|
22
|
+
"axios": "1.4.0",
|
23
|
+
"blowfish-node": "1.1.4"
|
27
24
|
},
|
28
25
|
"devDependencies": {
|
29
26
|
"standard": "17.1.0"
|
27
|
+
},
|
28
|
+
"scripts": {
|
29
|
+
"lint": "standard src/**/*.js",
|
30
|
+
"lint-fix": "standard --fix src/**/*.js"
|
30
31
|
}
|
31
|
-
}
|
32
|
+
}
|
package/src/index.js
CHANGED
@@ -5,7 +5,7 @@ const extractData = require('./lib/extract-data')
|
|
5
5
|
const retryUntilSuccess = require('./lib/retry-until-success')
|
6
6
|
const logger = require('./lib/logger')
|
7
7
|
|
8
|
-
const API_ENDPOINT = 'https://gdcportalgw.its-mo.com/
|
8
|
+
const API_ENDPOINT = 'https://gdcportalgw.its-mo.com/api_v230317_NE/gdc'
|
9
9
|
const INITIAL_APP_STR = '9s5rfKVuMrT03RtzajWNcA'
|
10
10
|
const RESULT_POLLING_INTERVAL = 20000
|
11
11
|
const REGION_CODES = ['NE', 'NCI', 'NNA', 'NMA', 'NML']
|
@@ -1,8 +1,6 @@
|
|
1
|
-
const
|
1
|
+
const Blowfish = require('blowfish-node')
|
2
2
|
|
3
3
|
module.exports = (password, passwordEncryptionKey) => {
|
4
|
-
const
|
5
|
-
|
6
|
-
encrypted += cipher.final('base64')
|
7
|
-
return encrypted
|
4
|
+
const bf = new Blowfish(passwordEncryptionKey, Blowfish.MODE.ECB);
|
5
|
+
return bf.encodeToBase64(password)
|
8
6
|
}
|