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 +41 -33
- package/coverage.report +56 -52
- package/package.json +14 -15
- package/src/commands/Conf.js +24 -23
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
|
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.
|
845
|
-
src | 57.84 | 53.62 | 52.63 | 58.
|
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 |
|
850
|
-
Alias.js | 90.54 | 77.
|
851
|
-
Bash.js | 75 | 0 | 66.
|
852
|
-
Cat.js | 98.9 | 88.
|
853
|
-
Cd.js | 96.
|
854
|
-
Conf.js |
|
855
|
-
Contacts.js | 87.
|
856
|
-
Copy.js | 94.87 |
|
857
|
-
Ds.js | 92.
|
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.
|
860
|
-
Find.js | 93.
|
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.
|
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.
|
865
|
-
Lls.js | 95.45 | 72.
|
866
|
-
Lpwd.js |
|
867
|
-
Ls.js | 91.3 | 75 | 100 | 90.
|
868
|
-
Mkdir.js | 100 | 66.
|
869
|
-
Mv.js | 88.04 | 73.21 | 100 | 87.
|
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 |
|
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.
|
874
|
-
Shell.js | 88.
|
875
|
-
Show.js | 72 | 45.45 | 57.14 | 73.
|
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.
|
878
|
-
Totp.js | 96.47 | 74.
|
879
|
-
Touch.js | 95.
|
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.
|
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.
|
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.
|
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 |
|
891
|
-
Logger.js | 63.
|
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.
|
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 (
|
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 (
|
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 (
|
55
|
-
✓ should copy a string to the clipboard (
|
56
|
-
✓ should copy a card to the clipboard (
|
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 (
|
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 (
|
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 (
|
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 (
|
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 (
|
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 (
|
159
|
-
✓ should paste the clipboard content to an existent file (
|
160
|
-
✓ should paste a single field to a yml card
|
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 (
|
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 (
|
195
|
-
✓ should read a totp secret from an image and add the totp field to the card (
|
196
|
-
✓ should read a totp secret from an image and return the secret
|
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 (
|
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.
|
233
|
-
src | 57.84 | 53.62 | 52.63 | 58.
|
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 |
|
238
|
-
Alias.js | 90.54 | 77.
|
239
|
-
Bash.js | 75 | 0 | 66.
|
240
|
-
Cat.js | 98.9 | 88.
|
241
|
-
Cd.js | 96.
|
242
|
-
Conf.js |
|
243
|
-
Contacts.js | 87.
|
244
|
-
Copy.js | 94.87 |
|
245
|
-
Ds.js | 92.
|
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.
|
248
|
-
Find.js | 93.
|
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.
|
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.
|
253
|
-
Lls.js | 95.45 | 72.
|
254
|
-
Lpwd.js |
|
255
|
-
Ls.js | 91.3 | 75 | 100 | 90.
|
256
|
-
Mkdir.js | 100 | 66.
|
257
|
-
Mv.js | 88.04 | 73.21 | 100 | 87.
|
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 |
|
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.
|
262
|
-
Shell.js | 88.
|
263
|
-
Show.js | 72 | 45.45 | 57.14 | 73.
|
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.
|
266
|
-
Totp.js | 96.47 | 74.
|
267
|
-
Touch.js | 95.
|
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.
|
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.
|
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.
|
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 |
|
279
|
-
Logger.js | 63.
|
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.
|
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.
|
11
|
-
"@secrez/crypto": "~1.0.
|
12
|
-
"@secrez/eth": "~0.0.
|
13
|
-
"@secrez/fs": "~1.0.
|
14
|
-
"@secrez/utils": "~1.0.
|
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.
|
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.
|
22
|
+
"inquirer": "^7.3.3",
|
23
23
|
"inquirer-command-prompt": "^0.1.0",
|
24
24
|
"jimp": "^0.13.0",
|
25
|
-
"lodash": "^4.17.
|
25
|
+
"lodash": "^4.17.21",
|
26
26
|
"otplib": "^12.0.1",
|
27
|
-
"qrcode": "^1.5.
|
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.
|
34
|
-
"chai": "^4.
|
32
|
+
"@secrez/test-helpers": "~2.0.1",
|
33
|
+
"chai": "^4.5.0",
|
35
34
|
"chalk": "^3.0.0",
|
36
|
-
"cross-env": "^7.0.
|
37
|
-
"mocha": "^7.
|
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
|
},
|
package/src/commands/Conf.js
CHANGED
@@ -94,15 +94,15 @@ class Conf extends require("../Command") {
|
|
94
94
|
// }
|
95
95
|
// }
|
96
96
|
//
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
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
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
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
|