secrez 2.0.0 → 2.1.0

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 CHANGED
@@ -369,10 +369,14 @@ Secrez is not intended to compete with password managers, so do not expect it to
369
369
 
370
370
  ## History
371
371
 
372
+ **2.0.1**
373
+
374
+ - fix commands to change password and number of iterations
375
+
372
376
  **2.0.0** (breaking changes)
373
377
 
374
378
  - remove `@crypto/hub`, `@crypto/courier`, `@crypto/tunnel` and `@crypto/tls` since they are not maintained anymore
375
- - add `show` command to show a card field as a QR code, for example to encode a private key and let a mobile wallet to scan it
379
+ - add `show` command to show a card field as a QR code, for example to encode a private key and let a mobile wallet scan it
376
380
 
377
381
  **1.1.6**
378
382
 
@@ -841,56 +845,60 @@ Thank you for any contributions! 😉
841
845
  --------------------|---------|----------|---------|---------|--------------------------------------
842
846
  File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
843
847
  --------------------|---------|----------|---------|---------|--------------------------------------
844
- All files | 81.53 | 67.81 | 81.62 | 81.43 |
845
- src | 57.84 | 53.62 | 52.63 | 58.42 |
848
+ All files | 81.16 | 67.69 | 81.02 | 81.05 |
849
+ src | 57.84 | 53.62 | 52.63 | 58.41 |
846
850
  Command.js | 79.66 | 78.72 | 76.92 | 81.03 | 32,55-62,73,80,119
847
851
  PreCommand.js | 8.82 | 0 | 0 | 8.82 | 6-97
848
852
  cliConfig.js | 100 | 100 | 100 | 100 |
849
- src/commands | 84.29 | 69.33 | 91.46 | 84.18 |
850
- Alias.js | 90.54 | 77.36 | 100 | 90.41 | 101,112,139,169,173,180,190
851
- Bash.js | 75 | 0 | 66.67 | 75 | 18-19
852
- Cat.js | 98.9 | 88.89 | 100 | 98.9 | 152
853
- Cd.js | 96.43 | 86.67 | 100 | 96.43 | 44
854
- Conf.js | 10.45 | 0 | 25 | 10.45 | 134-499
855
- Contacts.js | 87.18 | 74.32 | 100 | 87.07 | ...5-141,145,165,172,184,237,250,260
856
- Copy.js | 94.87 | 74.51 | 100 | 94.81 | 111,162,179,204
857
- Ds.js | 92.54 | 82.05 | 100 | 92.42 | 99,108-113,125
853
+ src/commands | 83.82 | 69.19 | 90.54 | 83.71 |
854
+ Alias.js | 90.54 | 77.35 | 100 | 90.41 | 101,112,139,169,173,180,190
855
+ Bash.js | 75 | 0 | 66.66 | 75 | 18-19
856
+ Cat.js | 98.9 | 88.88 | 100 | 98.9 | 152
857
+ Cd.js | 96.42 | 86.66 | 100 | 96.42 | 44
858
+ Conf.js | 9.09 | 0 | 20 | 9.09 | 98-500
859
+ Contacts.js | 87.17 | 74.32 | 100 | 87.06 | ...5-141,145,165,172,184,237,250,260
860
+ Copy.js | 94.87 | 74.5 | 100 | 94.8 | 111,162,179,204
861
+ Ds.js | 92.53 | 82.05 | 100 | 92.42 | 99,108-113,125
858
862
  Edit.js | 13.58 | 0 | 40 | 13.58 | 88-214
859
- Export.js | 88.12 | 70.59 | 100 | 88.12 | ...0-175,185,197-201,206,218,227,230
860
- Find.js | 93.59 | 86.67 | 100 | 93.42 | 101,164,200-203,209
863
+ Export.js | 88.11 | 70.58 | 100 | 88.11 | ...0-175,185,197-201,206,218,227,230
864
+ Find.js | 93.58 | 86.66 | 100 | 93.42 | 101,164,200-203,209
861
865
  Help.js | 100 | 80 | 100 | 100 | 29
862
- Import.js | 93.2 | 85.48 | 100 | 93.14 | ...5,365,367,387,393,441,456-463,490
866
+ Import.js | 93.2 | 85.48 | 100 | 93.13 | ...5,365,367,387,393,441,456-463,490
863
867
  Lcat.js | 100 | 85.71 | 100 | 100 | 54
864
- Lcd.js | 95.65 | 81.82 | 100 | 95.65 | 50
865
- Lls.js | 95.45 | 72.73 | 100 | 95.45 | 97
866
- Lpwd.js | 92.31 | 100 | 100 | 92.31 | 36
867
- Ls.js | 91.3 | 75 | 100 | 90.77 | 103,114-116,130,181
868
- Mkdir.js | 100 | 66.67 | 100 | 100 | 38-44
869
- Mv.js | 88.04 | 73.21 | 100 | 87.78 | 93-99,133,155,165-172
868
+ Lcd.js | 95.65 | 81.81 | 100 | 95.65 | 50
869
+ Lls.js | 95.45 | 72.72 | 100 | 95.45 | 97
870
+ Lpwd.js | 92.3 | 100 | 100 | 92.3 | 36
871
+ Ls.js | 91.3 | 75 | 100 | 90.76 | 103,114-116,130,181
872
+ Mkdir.js | 100 | 66.66 | 100 | 100 | 38-44
873
+ Mv.js | 88.04 | 73.21 | 100 | 87.77 | 93-99,133,155,165-172
870
874
  Paste.js | 87.23 | 75 | 100 | 87.23 | 72,78,81,89,113,129
871
- Pwd.js | 92.31 | 100 | 100 | 92.31 | 33
875
+ Pwd.js | 92.3 | 100 | 100 | 92.3 | 33
872
876
  Quit.js | 90 | 50 | 100 | 90 | 27
873
- Rm.js | 94 | 80.95 | 100 | 93.88 | 63,126,134
874
- Shell.js | 88.24 | 60 | 100 | 88.24 | 38,55
875
- Show.js | 72 | 45.45 | 57.14 | 73.47 | ...8,100,106-114,117,123-126,132,143
877
+ Rm.js | 94 | 80.95 | 100 | 93.87 | 63,126,134
878
+ Shell.js | 88.23 | 60 | 100 | 88.23 | 38,55
879
+ Show.js | 72 | 45.45 | 57.14 | 73.46 | ...8,100,106-114,117,123-126,132,143
876
880
  Ssh.js | 25 | 0 | 40 | 25 | 72-120
877
- Tag.js | 98.04 | 92.31 | 100 | 98.02 | 122,171
878
- Totp.js | 96.47 | 74.47 | 100 | 96.47 | 188-189,235
879
- Touch.js | 95.92 | 81.48 | 100 | 95.83 | 152,202
881
+ Tag.js | 98.03 | 92.3 | 100 | 98.01 | 122,171
882
+ Totp.js | 96.47 | 74.46 | 100 | 96.47 | 188-189,235
883
+ Touch.js | 95.91 | 81.48 | 100 | 95.83 | 152,202
880
884
  Use.js | 96.77 | 89.47 | 100 | 96.77 | 68
881
- Ver.js | 90 | 66.67 | 100 | 90 | 25
885
+ Ver.js | 90 | 66.66 | 100 | 90 | 25
882
886
  Whoami.js | 83.33 | 60 | 80 | 83.33 | 27,35,48
883
- index.js | 87.5 | 50 | 100 | 86.96 | 15,22,31
887
+ index.js | 87.5 | 50 | 100 | 86.95 | 15,22,31
884
888
  src/prompts | 100 | 100 | 50 | 100 |
885
889
  MainPromptMock.js | 100 | 100 | 50 | 100 |
886
890
  src/utils | 70.04 | 63.28 | 56.25 | 69.67 |
887
- AliasManager.js | 100 | 91.67 | 100 | 100 | 47
891
+ AliasManager.js | 100 | 91.66 | 100 | 100 | 47
888
892
  ContactManager.js | 73.33 | 60 | 85.71 | 73.33 | 12,34-36
889
893
  Fido2Client.js | 15.38 | 0 | 11.11 | 15.38 | 14-108
890
- HelpProto.js | 91.6 | 84.06 | 100 | 91.45 | 49,153-154,171-176,195
891
- Logger.js | 63.64 | 56.25 | 36.84 | 62.79 | ...25,37-49,57,65-69,74,84,88,93,105
894
+ HelpProto.js | 91.59 | 84.05 | 100 | 91.45 | 49,153-154,171-176,195
895
+ Logger.js | 63.63 | 56.25 | 36.84 | 62.79 | ...25,37-49,57,65-69,74,84,88,93,105
892
896
  --------------------|---------|----------|---------|---------|--------------------------------------
893
897
 
898
+ > secrez@2.1.0 posttest /Users/francescosullo/Projects/Secrez/secrez/packages/secrez
899
+ > nyc check-coverage --statements 65 --branches 50 --functions 65 --lines 65
900
+
901
+
894
902
  ```
895
903
 
896
904
  ## Copyright
package/coverage.report CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- > secrez@2.0.0 test /Users/francescosullo/Projects/Secrez/secrez/packages/secrez
2
+ > secrez@2.1.0 test /Users/francescosullo/Projects/Secrez/secrez/packages/secrez
3
3
  > cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha test/*.test.js test/**/*.test.js test/**/**/*.js --exit
4
4
 
5
5
 
@@ -29,10 +29,10 @@
29
29
  #Cat
30
30
  ✓ should return the help
31
31
  ✓ should show the content of a file
32
- ✓ should show either one or all the versions of a file (1020ms)
32
+ ✓ should show either one or all the versions of a file (1036ms)
33
33
  ✓ should throw if entry is not a file or file does not exist
34
34
  ✓ should throw if trying to cat a binary file
35
- ✓ should show the content of a Yaml file (1026ms)
35
+ ✓ should show the content of a Yaml file (1029ms)
36
36
 
37
37
  #Cd
38
38
  ✓ should return the help
@@ -51,9 +51,9 @@
51
51
 
52
52
  #Copy
53
53
  ✓ should return the help
54
- ✓ should copy a file to the clipboard (393ms)
55
- ✓ should copy a string to the clipboard (252ms)
56
- ✓ should copy a card to the clipboard (896ms)
54
+ ✓ should copy a file to the clipboard (380ms)
55
+ ✓ should copy a string to the clipboard (230ms)
56
+ ✓ should copy a card to the clipboard (866ms)
57
57
  ✓ should return an error if the file does not exist or is a folder
58
58
  ✓ should throw if copying to clipboard a binary files
59
59
 
@@ -69,14 +69,14 @@
69
69
  ✓ should export a file to the current local folder
70
70
  ✓ should export a binary file to the current local folder
71
71
  ✓ should export an encrypted file to the current local folder
72
- ✓ should export a file and delete it after 1 second (1204ms)
72
+ ✓ should export a file and delete it after 1 second (1205ms)
73
73
  ✓ should return an error if the file does not exist or is a folder
74
- ✓ should export a keystore json file if a private_key exists in the entry (783ms)
74
+ ✓ should export a keystore json file if a private_key exists in the entry (672ms)
75
75
  ✓ should export a cryptoenv file if a private_key exists in the entry
76
76
 
77
77
  #Find
78
78
  ✓ should return the help
79
- ✓ should show find a string in the tree (1039ms)
79
+ ✓ should show find a string in the tree (1018ms)
80
80
  ✓ should find no result without parameters
81
81
  ✓ should skip binary files from search
82
82
 
@@ -141,7 +141,7 @@
141
141
 
142
142
  #Mv
143
143
  ✓ should return the help
144
- ✓ should rename a file (1008ms)
144
+ ✓ should rename a file (1015ms)
145
145
  ✓ should move a file to another folder
146
146
  ✓ should move many files to another folder
147
147
  ✓ should move a file to another subfolder
@@ -150,14 +150,14 @@
150
150
  ✓ should move file to another dataset using wildcards
151
151
  ✓ should move file managing duplicates
152
152
  ✓ should throw if parameters are missed or wrong
153
- ✓ should move files from and to other datasets (1028ms)
153
+ ✓ should move files from and to other datasets (1030ms)
154
154
  ✓ should move the results of a find
155
155
 
156
156
  #Paste
157
157
  ✓ should return the help
158
- ✓ should paste the clipboard content to a new file (60ms)
159
- ✓ should paste the clipboard content to an existent file (101ms)
160
- ✓ should paste a single field to a yml card (46ms)
158
+ ✓ should paste the clipboard content to a new file (55ms)
159
+ ✓ should paste the clipboard content to an existent file (61ms)
160
+ ✓ should paste a single field to a yml card
161
161
 
162
162
  #Pwd
163
163
  ✓ should return the help
@@ -171,7 +171,7 @@
171
171
  ✓ should delete a file with one version
172
172
  ✓ should delete many files usign wildcards
173
173
  ✓ should return errors if wrong parameters
174
- ✓ should delete some versions of a file (1009ms)
174
+ ✓ should delete some versions of a file (1012ms)
175
175
 
176
176
  #Shell
177
177
  ✓ should return the help
@@ -191,13 +191,13 @@
191
191
 
192
192
  #Totp
193
193
  ✓ should return the help
194
- ✓ should totp a file to the clipboard (366ms)
195
- ✓ should read a totp secret from an image and add the totp field to the card (57ms)
196
- ✓ should read a totp secret from an image and return the secret (40ms)
194
+ ✓ should totp a file to the clipboard (347ms)
195
+ ✓ should read a totp secret from an image and add the totp field to the card (39ms)
196
+ ✓ should read a totp secret from an image and return the secret
197
197
  ✓ should throw if bad image
198
198
  ✓ should throw if missing parameters
199
199
  ✓ should throw if the yaml is malformed
200
- ✓ should read a totp secret from the clipboard (99ms)
200
+ ✓ should read a totp secret from the clipboard (275ms)
201
201
 
202
202
  #Touch
203
203
  ✓ should return the help
@@ -207,7 +207,7 @@
207
207
  ✓ should throw if wrong parameters
208
208
  ✓ should create a file and generate a wallet
209
209
  New file "/folder2/file1" created.
210
- ✓ should generate 5 prefixed wallet
210
+ ✓ should generate 5 prefixed wallet (65ms)
211
211
  New file "/folder2/file1" created.
212
212
  ✓ should generate a wallet with mnemonic and 2 keys
213
213
 
@@ -229,52 +229,56 @@ New file "/folder2/file1" created.
229
229
  --------------------|---------|----------|---------|---------|--------------------------------------
230
230
  File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
231
231
  --------------------|---------|----------|---------|---------|--------------------------------------
232
- All files | 81.53 | 67.81 | 81.62 | 81.43 |
233
- src | 57.84 | 53.62 | 52.63 | 58.42 |
232
+ All files | 81.16 | 67.69 | 81.02 | 81.05 |
233
+ src | 57.84 | 53.62 | 52.63 | 58.41 |
234
234
  Command.js | 79.66 | 78.72 | 76.92 | 81.03 | 32,55-62,73,80,119
235
235
  PreCommand.js | 8.82 | 0 | 0 | 8.82 | 6-97
236
236
  cliConfig.js | 100 | 100 | 100 | 100 |
237
- src/commands | 84.29 | 69.33 | 91.46 | 84.18 |
238
- Alias.js | 90.54 | 77.36 | 100 | 90.41 | 101,112,139,169,173,180,190
239
- Bash.js | 75 | 0 | 66.67 | 75 | 18-19
240
- Cat.js | 98.9 | 88.89 | 100 | 98.9 | 152
241
- Cd.js | 96.43 | 86.67 | 100 | 96.43 | 44
242
- Conf.js | 10.45 | 0 | 25 | 10.45 | 134-499
243
- Contacts.js | 87.18 | 74.32 | 100 | 87.07 | ...5-141,145,165,172,184,237,250,260
244
- Copy.js | 94.87 | 74.51 | 100 | 94.81 | 111,162,179,204
245
- Ds.js | 92.54 | 82.05 | 100 | 92.42 | 99,108-113,125
237
+ src/commands | 83.82 | 69.19 | 90.54 | 83.71 |
238
+ Alias.js | 90.54 | 77.35 | 100 | 90.41 | 101,112,139,169,173,180,190
239
+ Bash.js | 75 | 0 | 66.66 | 75 | 18-19
240
+ Cat.js | 98.9 | 88.88 | 100 | 98.9 | 152
241
+ Cd.js | 96.42 | 86.66 | 100 | 96.42 | 44
242
+ Conf.js | 9.09 | 0 | 20 | 9.09 | 98-500
243
+ Contacts.js | 87.17 | 74.32 | 100 | 87.06 | ...5-141,145,165,172,184,237,250,260
244
+ Copy.js | 94.87 | 74.5 | 100 | 94.8 | 111,162,179,204
245
+ Ds.js | 92.53 | 82.05 | 100 | 92.42 | 99,108-113,125
246
246
  Edit.js | 13.58 | 0 | 40 | 13.58 | 88-214
247
- Export.js | 88.12 | 70.59 | 100 | 88.12 | ...0-175,185,197-201,206,218,227,230
248
- Find.js | 93.59 | 86.67 | 100 | 93.42 | 101,164,200-203,209
247
+ Export.js | 88.11 | 70.58 | 100 | 88.11 | ...0-175,185,197-201,206,218,227,230
248
+ Find.js | 93.58 | 86.66 | 100 | 93.42 | 101,164,200-203,209
249
249
  Help.js | 100 | 80 | 100 | 100 | 29
250
- Import.js | 93.2 | 85.48 | 100 | 93.14 | ...5,365,367,387,393,441,456-463,490
250
+ Import.js | 93.2 | 85.48 | 100 | 93.13 | ...5,365,367,387,393,441,456-463,490
251
251
  Lcat.js | 100 | 85.71 | 100 | 100 | 54
252
- Lcd.js | 95.65 | 81.82 | 100 | 95.65 | 50
253
- Lls.js | 95.45 | 72.73 | 100 | 95.45 | 97
254
- Lpwd.js | 92.31 | 100 | 100 | 92.31 | 36
255
- Ls.js | 91.3 | 75 | 100 | 90.77 | 103,114-116,130,181
256
- Mkdir.js | 100 | 66.67 | 100 | 100 | 38-44
257
- Mv.js | 88.04 | 73.21 | 100 | 87.78 | 93-99,133,155,165-172
252
+ Lcd.js | 95.65 | 81.81 | 100 | 95.65 | 50
253
+ Lls.js | 95.45 | 72.72 | 100 | 95.45 | 97
254
+ Lpwd.js | 92.3 | 100 | 100 | 92.3 | 36
255
+ Ls.js | 91.3 | 75 | 100 | 90.76 | 103,114-116,130,181
256
+ Mkdir.js | 100 | 66.66 | 100 | 100 | 38-44
257
+ Mv.js | 88.04 | 73.21 | 100 | 87.77 | 93-99,133,155,165-172
258
258
  Paste.js | 87.23 | 75 | 100 | 87.23 | 72,78,81,89,113,129
259
- Pwd.js | 92.31 | 100 | 100 | 92.31 | 33
259
+ Pwd.js | 92.3 | 100 | 100 | 92.3 | 33
260
260
  Quit.js | 90 | 50 | 100 | 90 | 27
261
- Rm.js | 94 | 80.95 | 100 | 93.88 | 63,126,134
262
- Shell.js | 88.24 | 60 | 100 | 88.24 | 38,55
263
- Show.js | 72 | 45.45 | 57.14 | 73.47 | ...8,100,106-114,117,123-126,132,143
261
+ Rm.js | 94 | 80.95 | 100 | 93.87 | 63,126,134
262
+ Shell.js | 88.23 | 60 | 100 | 88.23 | 38,55
263
+ Show.js | 72 | 45.45 | 57.14 | 73.46 | ...8,100,106-114,117,123-126,132,143
264
264
  Ssh.js | 25 | 0 | 40 | 25 | 72-120
265
- Tag.js | 98.04 | 92.31 | 100 | 98.02 | 122,171
266
- Totp.js | 96.47 | 74.47 | 100 | 96.47 | 188-189,235
267
- Touch.js | 95.92 | 81.48 | 100 | 95.83 | 152,202
265
+ Tag.js | 98.03 | 92.3 | 100 | 98.01 | 122,171
266
+ Totp.js | 96.47 | 74.46 | 100 | 96.47 | 188-189,235
267
+ Touch.js | 95.91 | 81.48 | 100 | 95.83 | 152,202
268
268
  Use.js | 96.77 | 89.47 | 100 | 96.77 | 68
269
- Ver.js | 90 | 66.67 | 100 | 90 | 25
269
+ Ver.js | 90 | 66.66 | 100 | 90 | 25
270
270
  Whoami.js | 83.33 | 60 | 80 | 83.33 | 27,35,48
271
- index.js | 87.5 | 50 | 100 | 86.96 | 15,22,31
271
+ index.js | 87.5 | 50 | 100 | 86.95 | 15,22,31
272
272
  src/prompts | 100 | 100 | 50 | 100 |
273
273
  MainPromptMock.js | 100 | 100 | 50 | 100 |
274
274
  src/utils | 70.04 | 63.28 | 56.25 | 69.67 |
275
- AliasManager.js | 100 | 91.67 | 100 | 100 | 47
275
+ AliasManager.js | 100 | 91.66 | 100 | 100 | 47
276
276
  ContactManager.js | 73.33 | 60 | 85.71 | 73.33 | 12,34-36
277
277
  Fido2Client.js | 15.38 | 0 | 11.11 | 15.38 | 14-108
278
- HelpProto.js | 91.6 | 84.06 | 100 | 91.45 | 49,153-154,171-176,195
279
- Logger.js | 63.64 | 56.25 | 36.84 | 62.79 | ...25,37-49,57,65-69,74,84,88,93,105
278
+ HelpProto.js | 91.59 | 84.05 | 100 | 91.45 | 49,153-154,171-176,195
279
+ Logger.js | 63.63 | 56.25 | 36.84 | 62.79 | ...25,37-49,57,65-69,74,84,88,93,105
280
280
  --------------------|---------|----------|---------|---------|--------------------------------------
281
+
282
+ > secrez@2.1.0 posttest /Users/francescosullo/Projects/Secrez/secrez/packages/secrez
283
+ > nyc check-coverage --statements 65 --branches 50 --functions 65 --lines 65
284
+
package/package.json CHANGED
@@ -1,40 +1,39 @@
1
1
  {
2
2
  "name": "secrez",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "license": "MIT",
5
5
  "nyc": {
6
6
  "include": "src",
7
7
  "exclude": []
8
8
  },
9
9
  "dependencies": {
10
- "@secrez/core": "~1.0.4",
11
- "@secrez/crypto": "~1.0.3",
12
- "@secrez/eth": "~0.0.3",
13
- "@secrez/fs": "~1.0.4",
14
- "@secrez/utils": "~1.0.3",
10
+ "@secrez/core": "~1.0.5",
11
+ "@secrez/crypto": "~1.0.4",
12
+ "@secrez/eth": "~0.0.4",
13
+ "@secrez/fs": "~1.0.5",
14
+ "@secrez/utils": "~1.0.4",
15
15
  "case": "^1.6.3",
16
16
  "chalk": "^3.0.0",
17
17
  "clipboardy": "^2.3.0",
18
- "command-line-args": "^5.1.1",
18
+ "command-line-args": "^5.2.1",
19
19
  "external-editor": "^3.1.0",
20
20
  "fs-extra": "^9.1.0",
21
21
  "homedir": "^0.6.0",
22
- "inquirer": "^7.1.0",
22
+ "inquirer": "^7.3.3",
23
23
  "inquirer-command-prompt": "^0.1.0",
24
24
  "jimp": "^0.13.0",
25
- "lodash": "^4.17.15",
25
+ "lodash": "^4.17.21",
26
26
  "otplib": "^12.0.1",
27
- "qrcode": "^1.5.3",
27
+ "qrcode": "^1.5.4",
28
28
  "qrcode-reader": "^1.0.4",
29
- "superagent": "^5.3.1",
30
29
  "tiny-cli-editor": "^0.1.1"
31
30
  },
32
31
  "devDependencies": {
33
- "@secrez/test-helpers": "~2.0.0",
34
- "chai": "^4.2.0",
32
+ "@secrez/test-helpers": "~2.0.1",
33
+ "chai": "^4.5.0",
35
34
  "chalk": "^3.0.0",
36
- "cross-env": "^7.0.2",
37
- "mocha": "^7.1.1",
35
+ "cross-env": "^7.0.3",
36
+ "mocha": "^7.2.0",
38
37
  "nyc": "^15.1.0",
39
38
  "test-console": "^1.1.0"
40
39
  },
@@ -94,15 +94,15 @@ class Conf extends require("../Command") {
94
94
  // }
95
95
  // }
96
96
  //
97
- // async getAllFactors() {
98
- // let allFactors = {}
99
- // const conf = this.secrez.getConf()
100
- // let keys = conf.data.keys || {}
101
- // for (let authenticator in keys) {
102
- // allFactors[authenticator] = keys[authenticator].type
103
- // }
104
- // return allFactors
105
- // }
97
+ async getAllFactors() {
98
+ let allFactors = {};
99
+ const conf = this.secrez.getConf();
100
+ let keys = conf.data.keys || {};
101
+ for (let authenticator in keys) {
102
+ allFactors[authenticator] = keys[authenticator].type;
103
+ }
104
+ return allFactors;
105
+ }
106
106
  //
107
107
  // async verifyIfAlreadyRegistered() {
108
108
  // let client = this.fido2Client
@@ -196,20 +196,21 @@ class Conf extends require("../Command") {
196
196
  // await this.saveAndOverwrite(`main:/.RECOVERY_CODE_${authenticator}`, 'recovery code', recoveryCode, 'it')
197
197
  // }
198
198
  //
199
- // async saveAndOverwrite(p, spec, content, message) {
200
- // try {
201
- // await this.prompt.commands.rm.rm({
202
- // path: p
203
- // })
204
- // } catch (e) {
205
- // }
206
- // let node = await this.prompt.commands.touch.touch({
207
- // path: p,
208
- // content,
209
- // versionIfExists: true
210
- // })
211
- // this.Logger.reset(`For your convenience, ${message} has been saved in main:${node.getPath()}`)
212
- // }
199
+ async saveAndOverwrite(p, spec, content, message) {
200
+ try {
201
+ await this.prompt.commands.rm.rm({
202
+ path: p,
203
+ });
204
+ } catch (e) {}
205
+ let node = await this.prompt.commands.touch.touch({
206
+ path: p,
207
+ content,
208
+ versionIfExists: true,
209
+ });
210
+ this.Logger.reset(
211
+ `For your convenience, ${message} has been saved in main:${node.getPath()}`
212
+ );
213
+ }
213
214
  //
214
215
  // async setFido2(options) {
215
216
  // let client = this.fido2Client