@secrez/core 1.0.5 → 1.0.6
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/README.md +1 -1
- package/coverage.report +25 -25
- package/package.json +3 -3
package/README.md
CHANGED
package/coverage.report
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
> @secrez/core@1.0.
|
|
2
|
+
> @secrez/core@1.0.6 test /Users/francescosullo/Projects/Secrez/secrez/packages/core
|
|
3
3
|
> cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha test/*.test.js test/**/*.test.js --exit
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
#config
|
|
8
|
+
✓ all field should be correctly configured
|
|
9
|
+
|
|
7
10
|
#Entry
|
|
8
11
|
#constructor
|
|
9
12
|
✓ should instantiate the Entry
|
|
@@ -26,22 +29,22 @@
|
|
|
26
29
|
derivePassword
|
|
27
30
|
✓ should derive a password and obtain a predeterminded hash
|
|
28
31
|
signup and signin
|
|
29
|
-
✓ should signup the user and signin without saving the iterations (
|
|
30
|
-
✓ should signup in two instances without conflicts
|
|
31
|
-
✓ should signup the user and signin saved the iterations
|
|
32
|
-
✓ should signup with version one, and signin and upgrade to version two
|
|
33
|
-
✓ should signup the user, change password and signin
|
|
34
|
-
✓ should signup the user, change iterations and signin
|
|
35
|
-
✓ should signup the user, change password and iterations and signin (
|
|
32
|
+
✓ should signup the user and signin without saving the iterations (41ms)
|
|
33
|
+
✓ should signup in two instances without conflicts
|
|
34
|
+
✓ should signup the user and signin saved the iterations
|
|
35
|
+
✓ should signup with version one, and signin and upgrade to version two
|
|
36
|
+
✓ should signup the user, change password and signin
|
|
37
|
+
✓ should signup the user, change iterations and signin
|
|
38
|
+
✓ should signup the user, change password and iterations and signin (42ms)
|
|
36
39
|
should throw an error
|
|
37
40
|
✓ trying to signup if Secrez has not been initiated
|
|
38
41
|
✓ trying to signin if Secrez has not been initiated
|
|
39
42
|
✓ trying to signup if account already exists
|
|
40
43
|
✓ trying to signin if account is not set yet
|
|
41
44
|
✓ trying to signin with missed iterations
|
|
42
|
-
✓ trying to signin with the wrong password
|
|
43
|
-
✓ trying to signin with the right password but wrong number of iterations
|
|
44
|
-
✓ trying to signin with the right password but using a wrong hash on file
|
|
45
|
+
✓ trying to signin with the wrong password
|
|
46
|
+
✓ trying to signin with the right password but wrong number of iterations
|
|
47
|
+
✓ trying to signin with the right password but using a wrong hash on file
|
|
45
48
|
✓ trying to sign out if never signed-in
|
|
46
49
|
encryptEntry and decryptEntry
|
|
47
50
|
✓ should encrypt a name and decrypt it
|
|
@@ -62,25 +65,22 @@
|
|
|
62
65
|
✓ should encrypt some data with the derivedPassword and decrypt it
|
|
63
66
|
✓ should throw trying to get the master key
|
|
64
67
|
generateSharedSecrets && recoverSharedSecrets
|
|
65
|
-
✓ should set up a second factor (
|
|
66
|
-
✓ should set up a second factor and then upgrade from derivationVersion 1 to 2
|
|
67
|
-
✓ should set up a second factor and a recovery code and remove them (
|
|
68
|
-
✓ should set up a second factor and a recovery code and remove the recovery code (
|
|
69
|
-
✓ should throw if wrong secret
|
|
70
|
-
✓ should throw if wrong authenticator
|
|
68
|
+
✓ should set up a second factor (43ms)
|
|
69
|
+
✓ should set up a second factor and then upgrade from derivationVersion 1 to 2
|
|
70
|
+
✓ should set up a second factor and a recovery code and remove them (40ms)
|
|
71
|
+
✓ should set up a second factor and a recovery code and remove the recovery code (43ms)
|
|
72
|
+
✓ should throw if wrong secret
|
|
73
|
+
✓ should throw if wrong authenticator
|
|
71
74
|
#readConf
|
|
72
75
|
✓ should encrypt some data with the derivedPassword and decrypt it
|
|
73
76
|
✓ should throw trying to get the master key
|
|
74
77
|
✓ should throw trying to get the master key
|
|
75
78
|
#signMessage
|
|
76
|
-
✓ should sign a message and verify it
|
|
79
|
+
✓ should sign a message and verify it
|
|
77
80
|
#getPublicKey
|
|
78
|
-
✓ should sign a message and verify it
|
|
81
|
+
✓ should sign a message and verify it
|
|
79
82
|
#encrypt and decrypt shared data
|
|
80
|
-
✓ should get a shared ket
|
|
81
|
-
|
|
82
|
-
#config
|
|
83
|
-
✓ all field should be correctly configured
|
|
83
|
+
✓ should get a shared ket
|
|
84
84
|
|
|
85
85
|
#ConfigUtils
|
|
86
86
|
✓ should check if a type is valid
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
✓ #getEnv should return the environment
|
|
92
92
|
|
|
93
93
|
|
|
94
|
-
60 passing (
|
|
94
|
+
60 passing (889ms)
|
|
95
95
|
|
|
96
96
|
-----------------|---------|----------|---------|---------|-------------------
|
|
97
97
|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
|
|
@@ -107,6 +107,6 @@ All files | 99.75 | 94.31 | 100 | 99.75 |
|
|
|
107
107
|
index.js | 100 | 100 | 100 | 100 |
|
|
108
108
|
-----------------|---------|----------|---------|---------|-------------------
|
|
109
109
|
|
|
110
|
-
> @secrez/core@1.0.
|
|
110
|
+
> @secrez/core@1.0.6 posttest /Users/francescosullo/Projects/Secrez/secrez/packages/core
|
|
111
111
|
> nyc check-coverage --statements 99 --branches 94 --functions 99 --lines 99
|
|
112
112
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@secrez/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@secrez/crypto": "~1.0.
|
|
10
|
-
"@secrez/utils": "~1.0.
|
|
9
|
+
"@secrez/crypto": "~1.0.5",
|
|
10
|
+
"@secrez/utils": "~1.0.5",
|
|
11
11
|
"fs-extra": "^9.1.0",
|
|
12
12
|
"homedir": "^0.6.0",
|
|
13
13
|
"lodash": "^4.17.21"
|