secrez 1.1.6 → 2.0.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 +61 -75
- package/coverage.report +80 -146
- package/package.json +2 -3
- package/src/PreCommand.js +0 -19
- package/src/commands/Contacts.js +24 -102
- package/src/commands/Show.js +149 -0
- package/src/commands/Whoami.js +2 -18
- package/src/utils/ContactManager.js +4 -4
- package/src/commands/Chat.js +0 -148
- package/src/commands/Courier.js +0 -225
- package/src/commands/chat/Contacts.js +0 -87
- package/src/commands/chat/Help.js +0 -48
- package/src/commands/chat/Join.js +0 -116
- package/src/commands/chat/Leave.js +0 -35
- package/src/commands/chat/Quit.js +0 -39
- package/src/commands/chat/Send.js +0 -99
- package/src/commands/chat/Show.js +0 -112
- package/src/commands/chat/Whoami.js +0 -43
- package/src/prompts/ChatPrompt.js +0 -168
- package/src/prompts/ChatPromptMock.js +0 -24
package/README.md
CHANGED
@@ -145,11 +145,9 @@ Available commands:
|
|
145
145
|
bash << deprecated - use "shell" instead
|
146
146
|
cat Shows the content of a file.
|
147
147
|
cd Changes the working directory.
|
148
|
-
chat Enters the Secrez chat
|
149
148
|
conf Shows current configuration and allow to change password and number of iterations).
|
150
149
|
contacts Manages your contacts
|
151
150
|
copy Copy a text file to the clipboard.
|
152
|
-
courier Configure the connection to a local courier
|
153
151
|
ds Manages datasets
|
154
152
|
edit Edits a file containing a secret.
|
155
153
|
export Export encrypted data to the OS in the current local folder
|
@@ -168,14 +166,14 @@ Available commands:
|
|
168
166
|
quit Quits Secrez.
|
169
167
|
rm Removes one or more files and folders.
|
170
168
|
shell Execute a shell command in the current disk folder.
|
169
|
+
show Show a card field as a QR code.
|
171
170
|
ssh Opens a new tab and run ssh to connect to a remote server via SSH
|
172
171
|
tag Tags a file and shows existent tags.
|
173
172
|
totp Generate a TOTP code if a totp field exists in the card.
|
174
173
|
touch Creates a file.
|
175
174
|
use Uses a specific dataset.
|
176
175
|
ver Shows the version of Secrez.
|
177
|
-
whoami Show
|
178
|
-
|
176
|
+
whoami Show your Secrez public key
|
179
177
|
```
|
180
178
|
|
181
179
|
## Some example
|
@@ -357,7 +355,7 @@ It has been removed in version 0.11.0 due to potential critical issues with Pyth
|
|
357
355
|
|
358
356
|
## (experimental) End-to-end encrypted communication with other accounts
|
359
357
|
|
360
|
-
Starting from version 0.8.0, Secrez
|
358
|
+
Starting from version 0.8.0, Secrez allowed you to exchange encrypted messages with other users. To do so, it was using the packages `@secrez/courier`, `@secrez/hub`, `@secrez/tls` and `@secrez/tunnel`. Those four packages have been removed in version 2.0.0 since the feature was hard to maintain and not very used.
|
361
359
|
|
362
360
|
## Blog posts
|
363
361
|
|
@@ -371,6 +369,11 @@ Secrez is not intended to compete with password managers, so do not expect it to
|
|
371
369
|
|
372
370
|
## History
|
373
371
|
|
372
|
+
**2.0.0** (breaking changes)
|
373
|
+
|
374
|
+
- 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
|
376
|
+
|
374
377
|
**1.1.6**
|
375
378
|
|
376
379
|
- add support for cryptoEnv format to `export` (look at https://github.com/secrez/cryptoenv for details about CryptoEnv)
|
@@ -832,78 +835,61 @@ Thank you for any contributions! 😉
|
|
832
835
|
## Test coverage
|
833
836
|
|
834
837
|
```
|
835
|
-
|
838
|
+
148 passing (15s)
|
836
839
|
1 pending
|
837
840
|
|
838
|
-
|
839
|
-
File
|
840
|
-
|
841
|
-
All files
|
842
|
-
src
|
843
|
-
Command.js
|
844
|
-
PreCommand.js
|
845
|
-
cliConfig.js
|
846
|
-
src/commands
|
847
|
-
Alias.js
|
848
|
-
Bash.js
|
849
|
-
Cat.js
|
850
|
-
Cd.js
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
src/
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
Show.js | 68.75 | 70.59 | 100 | 68.75 | 74-78,87,102-108
|
891
|
-
Whoami.js | 42.86 | 0 | 60 | 42.86 | 22,30-39
|
892
|
-
src/prompts | 14.72 | 0 | 13.43 | 14.85 |
|
893
|
-
ChatPrompt.js | 6.1 | 0 | 0 | 6.1 | 8-164
|
894
|
-
ChatPromptMock.js | 100 | 100 | 66.67 | 100 |
|
895
|
-
CommandPrompt.js | 9.8 | 0 | 0 | 9.93 | 24-318
|
896
|
-
Completion.js | 4.41 | 0 | 0 | 4.48 | 6-103
|
897
|
-
MainPromptMock.js | 100 | 100 | 66.67 | 100 |
|
898
|
-
MultiEditorPrompt.js | 25 | 0 | 0 | 25 | 7-36
|
899
|
-
SigintManager.js | 25 | 0 | 20 | 25 | 10-36
|
900
|
-
src/utils | 69.92 | 63.28 | 56.25 | 69.55 |
|
901
|
-
AliasManager.js | 100 | 91.67 | 100 | 100 | 47
|
902
|
-
ContactManager.js | 71.43 | 60 | 85.71 | 71.43 | 12,35-37
|
903
|
-
Fido2Client.js | 15.38 | 0 | 11.11 | 15.38 | 14-108
|
904
|
-
HelpProto.js | 91.6 | 84.06 | 100 | 91.45 | 49,153-154,171-176,195
|
905
|
-
Logger.js | 63.64 | 56.25 | 36.84 | 62.79 | ...37-49,57,65-69,74,84,88,93,105
|
906
|
-
-----------------------|---------|----------|---------|---------|-----------------------------------
|
841
|
+
--------------------|---------|----------|---------|---------|--------------------------------------
|
842
|
+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
|
843
|
+
--------------------|---------|----------|---------|---------|--------------------------------------
|
844
|
+
All files | 81.53 | 67.81 | 81.62 | 81.43 |
|
845
|
+
src | 57.84 | 53.62 | 52.63 | 58.42 |
|
846
|
+
Command.js | 79.66 | 78.72 | 76.92 | 81.03 | 32,55-62,73,80,119
|
847
|
+
PreCommand.js | 8.82 | 0 | 0 | 8.82 | 6-97
|
848
|
+
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
|
858
|
+
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
|
861
|
+
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
|
863
|
+
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
|
870
|
+
Paste.js | 87.23 | 75 | 100 | 87.23 | 72,78,81,89,113,129
|
871
|
+
Pwd.js | 92.31 | 100 | 100 | 92.31 | 33
|
872
|
+
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
|
876
|
+
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
|
880
|
+
Use.js | 96.77 | 89.47 | 100 | 96.77 | 68
|
881
|
+
Ver.js | 90 | 66.67 | 100 | 90 | 25
|
882
|
+
Whoami.js | 83.33 | 60 | 80 | 83.33 | 27,35,48
|
883
|
+
index.js | 87.5 | 50 | 100 | 86.96 | 15,22,31
|
884
|
+
src/prompts | 100 | 100 | 50 | 100 |
|
885
|
+
MainPromptMock.js | 100 | 100 | 50 | 100 |
|
886
|
+
src/utils | 70.04 | 63.28 | 56.25 | 69.67 |
|
887
|
+
AliasManager.js | 100 | 91.67 | 100 | 100 | 47
|
888
|
+
ContactManager.js | 73.33 | 60 | 85.71 | 73.33 | 12,34-36
|
889
|
+
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
|
892
|
+
--------------------|---------|----------|---------|---------|--------------------------------------
|
907
893
|
|
908
894
|
```
|
909
895
|
|
package/coverage.report
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> secrez@
|
2
|
+
> secrez@2.0.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,20 +29,16 @@
|
|
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 (1020ms)
|
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 (1026ms)
|
36
36
|
|
37
37
|
#Cd
|
38
38
|
✓ should return the help
|
39
39
|
✓ change to a folder
|
40
40
|
✓ return en error if changing to a file
|
41
41
|
|
42
|
-
#Chat
|
43
|
-
✓ should return the help
|
44
|
-
✓ should run the chat if the courier is ready (551ms)
|
45
|
-
|
46
42
|
#Contacts
|
47
43
|
✓ should return the help
|
48
44
|
✓ create a contacts
|
@@ -55,18 +51,12 @@
|
|
55
51
|
|
56
52
|
#Copy
|
57
53
|
✓ should return the help
|
58
|
-
✓ should copy a file to the clipboard (
|
59
|
-
✓ should copy a string to the clipboard (
|
60
|
-
✓ should copy a card to the clipboard (
|
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)
|
61
57
|
✓ should return an error if the file does not exist or is a folder
|
62
58
|
✓ should throw if copying to clipboard a binary files
|
63
59
|
|
64
|
-
#Courier
|
65
|
-
✓ should return the help
|
66
|
-
✓ should check if it is ready
|
67
|
-
✓ should set up the courier (172ms)
|
68
|
-
✓ should set up the courier and get the default message when is already set up (171ms)
|
69
|
-
|
70
60
|
#Ds
|
71
61
|
✓ should return the help
|
72
62
|
✓ should list all datasets
|
@@ -79,14 +69,14 @@
|
|
79
69
|
✓ should export a file to the current local folder
|
80
70
|
✓ should export a binary file to the current local folder
|
81
71
|
✓ should export an encrypted file to the current local folder
|
82
|
-
✓ should export a file and delete it after 1 second (
|
72
|
+
✓ should export a file and delete it after 1 second (1204ms)
|
83
73
|
✓ should return an error if the file does not exist or is a folder
|
84
|
-
✓ 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 (783ms)
|
85
75
|
✓ should export a cryptoenv file if a private_key exists in the entry
|
86
76
|
|
87
77
|
#Find
|
88
78
|
✓ should return the help
|
89
|
-
✓ should show find a string in the tree (
|
79
|
+
✓ should show find a string in the tree (1039ms)
|
90
80
|
✓ should find no result without parameters
|
91
81
|
✓ should skip binary files from search
|
92
82
|
|
@@ -104,7 +94,7 @@
|
|
104
94
|
✓ should import an encrypted binary file and export it again verifying it is fine
|
105
95
|
✓ should import files recursively
|
106
96
|
✓ should read a folder and import the only text file
|
107
|
-
|
97
|
+
✓ should read a folder and import text and binary files
|
108
98
|
✓ should simulate the import of two files
|
109
99
|
✓ should move the imported file
|
110
100
|
✓ should import a backup from another software spanning the data among folders and files
|
@@ -151,7 +141,7 @@
|
|
151
141
|
|
152
142
|
#Mv
|
153
143
|
✓ should return the help
|
154
|
-
✓ should rename a file (
|
144
|
+
✓ should rename a file (1008ms)
|
155
145
|
✓ should move a file to another folder
|
156
146
|
✓ should move many files to another folder
|
157
147
|
✓ should move a file to another subfolder
|
@@ -160,14 +150,14 @@
|
|
160
150
|
✓ should move file to another dataset using wildcards
|
161
151
|
✓ should move file managing duplicates
|
162
152
|
✓ should throw if parameters are missed or wrong
|
163
|
-
✓ should move files from and to other datasets (
|
153
|
+
✓ should move files from and to other datasets (1028ms)
|
164
154
|
✓ should move the results of a find
|
165
155
|
|
166
156
|
#Paste
|
167
157
|
✓ should return the help
|
168
|
-
✓ should paste the clipboard content to a new file (
|
169
|
-
✓ should paste the clipboard content to an existent file (
|
170
|
-
✓ should paste a single field to a yml card (
|
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)
|
171
161
|
|
172
162
|
#Pwd
|
173
163
|
✓ should return the help
|
@@ -181,12 +171,16 @@
|
|
181
171
|
✓ should delete a file with one version
|
182
172
|
✓ should delete many files usign wildcards
|
183
173
|
✓ should return errors if wrong parameters
|
184
|
-
✓ should delete some versions of a file (
|
174
|
+
✓ should delete some versions of a file (1009ms)
|
185
175
|
|
186
176
|
#Shell
|
187
177
|
✓ should return the help
|
188
178
|
✓ should show the content of an external file via shell
|
189
179
|
|
180
|
+
#Show
|
181
|
+
✓ should return the help
|
182
|
+
✓ should show the field password of a card
|
183
|
+
|
190
184
|
#Tag
|
191
185
|
✓ should return the help
|
192
186
|
✓ should tag a file
|
@@ -197,13 +191,13 @@
|
|
197
191
|
|
198
192
|
#Totp
|
199
193
|
✓ should return the help
|
200
|
-
✓ should totp a file to the clipboard (
|
201
|
-
✓ should read a totp secret from an image and add the totp field to the card (
|
202
|
-
✓ should read a totp secret from an image and return the secret (
|
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)
|
203
197
|
✓ should throw if bad image
|
204
198
|
✓ should throw if missing parameters
|
205
|
-
✓ should throw if the yaml is malformed
|
206
|
-
✓ should read a totp secret from the clipboard (
|
199
|
+
✓ should throw if the yaml is malformed
|
200
|
+
✓ should read a totp secret from the clipboard (99ms)
|
207
201
|
|
208
202
|
#Touch
|
209
203
|
✓ should return the help
|
@@ -226,121 +220,61 @@ New file "/folder2/file1" created.
|
|
226
220
|
|
227
221
|
#Whoami
|
228
222
|
✓ should return the help
|
229
|
-
✓ should see who am I
|
230
|
-
|
231
|
-
#Help
|
232
|
-
✓ should return the help
|
223
|
+
✓ should see who am I
|
233
224
|
|
234
|
-
#Join
|
235
|
-
✓ should return the help
|
236
|
-
✓ should join a chat with user0x
|
237
|
-
✓ should join a chat with user0x
|
238
|
-
✓ should jump between chats (39ms)
|
239
|
-
✓ should return all the users
|
240
|
-
✓ should throw if contact not found or multiple chat
|
241
225
|
|
242
|
-
|
243
|
-
✓ should return the help
|
244
|
-
✓ should leave the room
|
245
|
-
|
246
|
-
#Quit
|
247
|
-
✓ should return the help
|
248
|
-
✓ should quit the chat, even if inside a room (57ms)
|
249
|
-
|
250
|
-
#Send
|
251
|
-
✓ should return the help
|
252
|
-
✓ should send a message to user0 (245ms)
|
253
|
-
|
254
|
-
#Show
|
255
|
-
✓ should return the help
|
256
|
-
✓ should show history messages (452ms)
|
257
|
-
|
258
|
-
|
259
|
-
166 passing (30s)
|
226
|
+
148 passing (15s)
|
260
227
|
1 pending
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
Tag.js | 98.04 | 92.31 | 100 | 98.02 | 122,171
|
315
|
-
Totp.js | 96.47 | 74.47 | 100 | 96.47 | 188-189,235
|
316
|
-
Touch.js | 95.92 | 81.48 | 100 | 95.83 | 152,202
|
317
|
-
Use.js | 96.77 | 89.47 | 100 | 96.77 | 68
|
318
|
-
Ver.js | 90 | 66.67 | 100 | 90 | 25
|
319
|
-
Whoami.js | 93.1 | 63.64 | 80 | 93.1 | 29,64
|
320
|
-
chat.js | 85.37 | 53.85 | 100 | 85.37 | 105,117-130,136,142
|
321
|
-
index.js | 91.67 | 60 | 100 | 91.3 | 22,31
|
322
|
-
src/commands/chat | 79.44 | 63.29 | 92.31 | 79.33 |
|
323
|
-
Contacts.js | 80 | 42.86 | 80 | 80 | 54,65,69,81
|
324
|
-
Help.js | 86.67 | 60 | 100 | 86.67 | 37-38
|
325
|
-
Join.js | 95.65 | 82.61 | 100 | 95.56 | 43,110
|
326
|
-
Leave.js | 100 | 60 | 100 | 100 | 24,28
|
327
|
-
Quit.js | 100 | 75 | 100 | 100 | 24
|
328
|
-
Send.js | 67.65 | 46.67 | 100 | 67.65 | 37,41,44,77,86-95
|
329
|
-
Show.js | 68.75 | 70.59 | 100 | 68.75 | 74-78,87,102-108
|
330
|
-
Whoami.js | 42.86 | 0 | 60 | 42.86 | 22,30-39
|
331
|
-
src/prompts | 14.72 | 0 | 13.43 | 14.85 |
|
332
|
-
ChatPrompt.js | 6.1 | 0 | 0 | 6.1 | 8-164
|
333
|
-
ChatPromptMock.js | 100 | 100 | 66.67 | 100 |
|
334
|
-
CommandPrompt.js | 9.8 | 0 | 0 | 9.93 | 24-318
|
335
|
-
Completion.js | 4.41 | 0 | 0 | 4.48 | 6-103
|
336
|
-
MainPromptMock.js | 100 | 100 | 66.67 | 100 |
|
337
|
-
MultiEditorPrompt.js | 25 | 0 | 0 | 25 | 7-36
|
338
|
-
SigintManager.js | 25 | 0 | 20 | 25 | 10-36
|
339
|
-
src/utils | 69.92 | 63.28 | 56.25 | 69.55 |
|
340
|
-
AliasManager.js | 100 | 91.67 | 100 | 100 | 47
|
341
|
-
ContactManager.js | 71.43 | 60 | 85.71 | 71.43 | 12,35-37
|
342
|
-
Fido2Client.js | 15.38 | 0 | 11.11 | 15.38 | 14-108
|
343
|
-
HelpProto.js | 91.6 | 84.06 | 100 | 91.45 | 49,153-154,171-176,195
|
344
|
-
Logger.js | 63.64 | 56.25 | 36.84 | 62.79 | ...37-49,57,65-69,74,84,88,93,105
|
345
|
-
-----------------------|---------|----------|---------|---------|-----------------------------------
|
346
|
-
ELIFECYCLE Test failed. See above for more details.
|
228
|
+
|
229
|
+
--------------------|---------|----------|---------|---------|--------------------------------------
|
230
|
+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
|
231
|
+
--------------------|---------|----------|---------|---------|--------------------------------------
|
232
|
+
All files | 81.53 | 67.81 | 81.62 | 81.43 |
|
233
|
+
src | 57.84 | 53.62 | 52.63 | 58.42 |
|
234
|
+
Command.js | 79.66 | 78.72 | 76.92 | 81.03 | 32,55-62,73,80,119
|
235
|
+
PreCommand.js | 8.82 | 0 | 0 | 8.82 | 6-97
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
268
|
+
Use.js | 96.77 | 89.47 | 100 | 96.77 | 68
|
269
|
+
Ver.js | 90 | 66.67 | 100 | 90 | 25
|
270
|
+
Whoami.js | 83.33 | 60 | 80 | 83.33 | 27,35,48
|
271
|
+
index.js | 87.5 | 50 | 100 | 86.96 | 15,22,31
|
272
|
+
src/prompts | 100 | 100 | 50 | 100 |
|
273
|
+
MainPromptMock.js | 100 | 100 | 50 | 100 |
|
274
|
+
src/utils | 70.04 | 63.28 | 56.25 | 69.67 |
|
275
|
+
AliasManager.js | 100 | 91.67 | 100 | 100 | 47
|
276
|
+
ContactManager.js | 73.33 | 60 | 85.71 | 73.33 | 12,34-36
|
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
|
280
|
+
--------------------|---------|----------|---------|---------|--------------------------------------
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "secrez",
|
3
|
-
"version": "
|
3
|
+
"version": "2.0.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"nyc": {
|
6
6
|
"include": "src",
|
@@ -11,7 +11,6 @@
|
|
11
11
|
"@secrez/crypto": "~1.0.3",
|
12
12
|
"@secrez/eth": "~0.0.3",
|
13
13
|
"@secrez/fs": "~1.0.4",
|
14
|
-
"@secrez/hub": "~0.2.2",
|
15
14
|
"@secrez/utils": "~1.0.3",
|
16
15
|
"case": "^1.6.3",
|
17
16
|
"chalk": "^3.0.0",
|
@@ -25,12 +24,12 @@
|
|
25
24
|
"jimp": "^0.13.0",
|
26
25
|
"lodash": "^4.17.15",
|
27
26
|
"otplib": "^12.0.1",
|
27
|
+
"qrcode": "^1.5.3",
|
28
28
|
"qrcode-reader": "^1.0.4",
|
29
29
|
"superagent": "^5.3.1",
|
30
30
|
"tiny-cli-editor": "^0.1.1"
|
31
31
|
},
|
32
32
|
"devDependencies": {
|
33
|
-
"@secrez/courier": "~0.2.3",
|
34
33
|
"@secrez/test-helpers": "~2.0.0",
|
35
34
|
"chai": "^4.2.0",
|
36
35
|
"chalk": "^3.0.0",
|
package/src/PreCommand.js
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
const { chalk } = require("./utils/Logger");
|
2
2
|
const Crypto = require("@secrez/crypto");
|
3
|
-
const { utils: hubUtils } = require("@secrez/hub");
|
4
|
-
const superagent = require("superagent");
|
5
3
|
|
6
4
|
class PreCommand {
|
7
5
|
async useEditor(options) {
|
@@ -99,23 +97,6 @@ class PreCommand {
|
|
99
97
|
return result;
|
100
98
|
}
|
101
99
|
}
|
102
|
-
|
103
|
-
async callCourier(_payload, port, caCrt, pathname) {
|
104
|
-
const { payload, signature } = hubUtils.setPayloadAndSignIt(
|
105
|
-
this.secrez,
|
106
|
-
_payload
|
107
|
-
);
|
108
|
-
try {
|
109
|
-
const res = await superagent
|
110
|
-
.get(`https://localhost:${port}${pathname || ""}`)
|
111
|
-
.set("Accept", "application/json")
|
112
|
-
.query({ payload, signature })
|
113
|
-
[caCrt ? "ca" : "trustLocalhost"](caCrt);
|
114
|
-
return res.body;
|
115
|
-
} catch (e) {
|
116
|
-
return { error: e.message };
|
117
|
-
}
|
118
|
-
}
|
119
100
|
}
|
120
101
|
|
121
102
|
module.exports = PreCommand;
|