secrez 1.1.5 → 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 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 data that other users need to chat with you
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 allows you to exchange encrypted messages with other users. To do so, you must set up a local Courier ([look here for more info](https://github.com/secrez/secrez/tree/master/packages/courier)).
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,15 @@ 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
+
377
+ **1.1.6**
378
+
379
+ - add support for cryptoEnv format to `export` (look at https://github.com/secrez/cryptoenv for details about CryptoEnv)
380
+
374
381
  **1.1.5**
375
382
 
376
383
  - fix touch's help showing wrong, temporary options, changed during the development :-(
@@ -828,78 +835,61 @@ Thank you for any contributions! 😉
828
835
  ## Test coverage
829
836
 
830
837
  ```
831
- 166 passing (24s)
838
+ 148 passing (15s)
832
839
  1 pending
833
840
 
834
- -----------------------|---------|----------|---------|---------|-----------------------------------
835
- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
836
- -----------------------|---------|----------|---------|---------|-----------------------------------
837
- All files | 71.22 | 58.41 | 71.25 | 71.11 |
838
- src | 59.63 | 54.79 | 55 | 60.19 |
839
- Command.js | 79.66 | 78.72 | 76.92 | 81.03 | 32,55-62,73,80,119
840
- PreCommand.js | 21.95 | 11.54 | 14.29 | 21.95 | 8-99,116
841
- cliConfig.js | 100 | 100 | 100 | 100 |
842
- src/commands | 81.53 | 67 | 89.95 | 81.4 |
843
- Alias.js | 90.54 | 77.36 | 100 | 90.41 | 101,112,139,169,173,180,190
844
- Bash.js | 75 | 0 | 66.67 | 75 | 18-19
845
- Cat.js | 98.9 | 88.89 | 100 | 98.9 | 152
846
- Cd.js | 96.43 | 86.67 | 100 | 96.43 | 44
847
- Chat.js | 19.51 | 0 | 16.67 | 19.51 | 23-144
848
- Conf.js | 10.45 | 0 | 25 | 10.45 | 134-499
849
- Contacts.js | 74.67 | 65.98 | 92.86 | 74.5 | ...90-214,240,247,259,315,328,338
850
- Copy.js | 94.87 | 74.51 | 100 | 94.81 | 111,162,179,204
851
- Courier.js | 63.54 | 41.86 | 85.71 | 63.83 | ...37,152-171,188,200-203,215-221
852
- Ds.js | 92.54 | 82.05 | 100 | 92.42 | 99,108-113,125
853
- Edit.js | 13.58 | 0 | 40 | 13.58 | 88-214
854
- Export.js | 87.63 | 67.74 | 100 | 87.63 | ...66,175,182-186,191,203,212,215
855
- Find.js | 93.59 | 86.67 | 100 | 93.42 | 101,164,200-203,209
856
- Help.js | 100 | 80 | 100 | 100 | 29
857
- Import.js | 93.2 | 85.48 | 100 | 93.14 | ...65,367,387,393,441,456-463,490
858
- Lcat.js | 100 | 85.71 | 100 | 100 | 54
859
- Lcd.js | 95.65 | 81.82 | 100 | 95.65 | 50
860
- Lls.js | 95.45 | 72.73 | 100 | 95.45 | 97
861
- Lpwd.js | 92.31 | 100 | 100 | 92.31 | 36
862
- Ls.js | 91.3 | 75 | 100 | 90.77 | 103,114-116,130,181
863
- Mkdir.js | 100 | 66.67 | 100 | 100 | 38-44
864
- Mv.js | 88.04 | 73.21 | 100 | 87.78 | 93-99,133,155,165-172
865
- Paste.js | 87.23 | 75 | 100 | 87.23 | 72,78,81,89,113,129
866
- Pwd.js | 92.31 | 100 | 100 | 92.31 | 33
867
- Quit.js | 90 | 50 | 100 | 90 | 27
868
- Rm.js | 94 | 80.95 | 100 | 93.88 | 63,126,134
869
- Shell.js | 88.24 | 60 | 100 | 88.24 | 38,55
870
- Ssh.js | 25 | 0 | 40 | 25 | 72-120
871
- Tag.js | 98.04 | 92.31 | 100 | 98.02 | 122,171
872
- Totp.js | 96.47 | 74.47 | 100 | 96.47 | 188-189,235
873
- Touch.js | 95.92 | 81.48 | 100 | 95.83 | 152,202
874
- Use.js | 96.77 | 89.47 | 100 | 96.77 | 68
875
- Ver.js | 90 | 66.67 | 100 | 90 | 25
876
- Whoami.js | 93.1 | 63.64 | 80 | 93.1 | 29,64
877
- chat.js | 85.37 | 53.85 | 100 | 85.37 | 105,117-130,136,142
878
- index.js | 91.67 | 60 | 100 | 91.3 | 22,31
879
- src/commands/chat | 79.44 | 63.29 | 92.31 | 79.33 |
880
- Contacts.js | 80 | 42.86 | 80 | 80 | 54,65,69,81
881
- Help.js | 86.67 | 60 | 100 | 86.67 | 37-38
882
- Join.js | 95.65 | 82.61 | 100 | 95.56 | 43,110
883
- Leave.js | 100 | 60 | 100 | 100 | 24,28
884
- Quit.js | 100 | 75 | 100 | 100 | 24
885
- Send.js | 67.65 | 46.67 | 100 | 67.65 | 37,41,44,77,86-95
886
- Show.js | 68.75 | 70.59 | 100 | 68.75 | 74-78,87,102-108
887
- Whoami.js | 42.86 | 0 | 60 | 42.86 | 22,30-39
888
- src/prompts | 14.72 | 0 | 13.43 | 14.85 |
889
- ChatPrompt.js | 6.1 | 0 | 0 | 6.1 | 8-164
890
- ChatPromptMock.js | 100 | 100 | 66.67 | 100 |
891
- CommandPrompt.js | 9.8 | 0 | 0 | 9.93 | 24-318
892
- Completion.js | 4.41 | 0 | 0 | 4.48 | 6-103
893
- MainPromptMock.js | 100 | 100 | 66.67 | 100 |
894
- MultiEditorPrompt.js | 25 | 0 | 0 | 25 | 7-36
895
- SigintManager.js | 25 | 0 | 20 | 25 | 10-36
896
- src/utils | 69.92 | 63.28 | 56.25 | 69.55 |
897
- AliasManager.js | 100 | 91.67 | 100 | 100 | 47
898
- ContactManager.js | 71.43 | 60 | 85.71 | 71.43 | 12,35-37
899
- Fido2Client.js | 15.38 | 0 | 11.11 | 15.38 | 14-108
900
- HelpProto.js | 91.6 | 84.06 | 100 | 91.45 | 49,153-154,171-176,195
901
- Logger.js | 63.64 | 56.25 | 36.84 | 62.79 | ...37-49,57,65-69,74,84,88,93,105
902
- -----------------------|---------|----------|---------|---------|-----------------------------------
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
+ --------------------|---------|----------|---------|---------|--------------------------------------
903
893
 
904
894
  ```
905
895
 
package/coverage.report CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- > secrez@1.1.5 test /Users/francescosullo/Projects/Secrez/secrez/packages/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 (1021ms)
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 (1033ms)
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 (168ms)
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 (391ms)
59
- ✓ should copy a string to the clipboard (246ms)
60
- ✓ should copy a card to the clipboard (889ms)
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 (143ms)
68
- ✓ should set up the courier and get the default message when is already set up (145ms)
69
-
70
60
  #Ds
71
61
  ✓ should return the help
72
62
  ✓ should list all datasets
@@ -79,13 +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 (1206ms)
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 (716ms)
74
+ ✓ should export a keystore json file if a private_key exists in the entry (783ms)
75
+ ✓ should export a cryptoenv file if a private_key exists in the entry
85
76
 
86
77
  #Find
87
78
  ✓ should return the help
88
- ✓ should show find a string in the tree (1034ms)
79
+ ✓ should show find a string in the tree (1039ms)
89
80
  ✓ should find no result without parameters
90
81
  ✓ should skip binary files from search
91
82
 
@@ -150,7 +141,7 @@
150
141
 
151
142
  #Mv
152
143
  ✓ should return the help
153
- ✓ should rename a file (1012ms)
144
+ ✓ should rename a file (1008ms)
154
145
  ✓ should move a file to another folder
155
146
  ✓ should move many files to another folder
156
147
  ✓ should move a file to another subfolder
@@ -159,14 +150,14 @@
159
150
  ✓ should move file to another dataset using wildcards
160
151
  ✓ should move file managing duplicates
161
152
  ✓ should throw if parameters are missed or wrong
162
- ✓ should move files from and to other datasets (1013ms)
153
+ ✓ should move files from and to other datasets (1028ms)
163
154
  ✓ should move the results of a find
164
155
 
165
156
  #Paste
166
157
  ✓ should return the help
167
- ✓ should paste the clipboard content to a new file (82ms)
168
- ✓ should paste the clipboard content to an existent file (89ms)
169
- ✓ should paste a single field to a yml card (57ms)
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)
170
161
 
171
162
  #Pwd
172
163
  ✓ should return the help
@@ -186,6 +177,10 @@
186
177
  ✓ should return the help
187
178
  ✓ should show the content of an external file via shell
188
179
 
180
+ #Show
181
+ ✓ should return the help
182
+ ✓ should show the field password of a card
183
+
189
184
  #Tag
190
185
  ✓ should return the help
191
186
  ✓ should tag a file
@@ -196,13 +191,13 @@
196
191
 
197
192
  #Totp
198
193
  ✓ should return the help
199
- ✓ should totp a file to the clipboard (359ms)
200
- ✓ should read a totp secret from an image and add the totp field to the card (49ms)
201
- ✓ 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)
202
197
  ✓ should throw if bad image
203
198
  ✓ should throw if missing parameters
204
199
  ✓ should throw if the yaml is malformed
205
- ✓ should read a totp secret from the clipboard (110ms)
200
+ ✓ should read a totp secret from the clipboard (99ms)
206
201
 
207
202
  #Touch
208
203
  ✓ should return the help
@@ -227,103 +222,59 @@ New file "/folder2/file1" created.
227
222
  ✓ should return the help
228
223
  ✓ should see who am I
229
224
 
230
- #Help
231
- ✓ should return the help
232
-
233
- #Join
234
- ✓ should return the help
235
- ✓ should join a chat with user0x
236
- ✓ should join a chat with user0x
237
- ✓ should jump between chats
238
- ✓ should return all the users
239
- ✓ should throw if contact not found or multiple chat
240
-
241
- #Leave
242
- ✓ should return the help
243
- ✓ should leave the room
244
-
245
- #Quit
246
- ✓ should return the help
247
- ✓ should quit the chat, even if inside a room (49ms)
248
-
249
- #Send
250
- ✓ should return the help
251
- ✓ should send a message to user0 (99ms)
252
-
253
- #Show
254
- ✓ should return the help
255
- ✓ should show history messages (367ms)
256
-
257
225
 
258
- 166 passing (24s)
226
+ 148 passing (15s)
259
227
  1 pending
260
228
 
261
- -----------------------|---------|----------|---------|---------|-----------------------------------
262
- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
263
- -----------------------|---------|----------|---------|---------|-----------------------------------
264
- All files | 71.22 | 58.41 | 71.25 | 71.11 |
265
- src | 59.63 | 54.79 | 55 | 60.19 |
266
- Command.js | 79.66 | 78.72 | 76.92 | 81.03 | 32,55-62,73,80,119
267
- PreCommand.js | 21.95 | 11.54 | 14.29 | 21.95 | 8-99,116
268
- cliConfig.js | 100 | 100 | 100 | 100 |
269
- src/commands | 81.53 | 67 | 89.95 | 81.4 |
270
- Alias.js | 90.54 | 77.36 | 100 | 90.41 | 101,112,139,169,173,180,190
271
- Bash.js | 75 | 0 | 66.67 | 75 | 18-19
272
- Cat.js | 98.9 | 88.89 | 100 | 98.9 | 152
273
- Cd.js | 96.43 | 86.67 | 100 | 96.43 | 44
274
- Chat.js | 19.51 | 0 | 16.67 | 19.51 | 23-144
275
- Conf.js | 10.45 | 0 | 25 | 10.45 | 134-499
276
- Contacts.js | 74.67 | 65.98 | 92.86 | 74.5 | ...90-214,240,247,259,315,328,338
277
- Copy.js | 94.87 | 74.51 | 100 | 94.81 | 111,162,179,204
278
- Courier.js | 63.54 | 41.86 | 85.71 | 63.83 | ...37,152-171,188,200-203,215-221
279
- Ds.js | 92.54 | 82.05 | 100 | 92.42 | 99,108-113,125
280
- Edit.js | 13.58 | 0 | 40 | 13.58 | 88-214
281
- Export.js | 87.63 | 67.74 | 100 | 87.63 | ...66,175,182-186,191,203,212,215
282
- Find.js | 93.59 | 86.67 | 100 | 93.42 | 101,164,200-203,209
283
- Help.js | 100 | 80 | 100 | 100 | 29
284
- Import.js | 93.2 | 85.48 | 100 | 93.14 | ...65,367,387,393,441,456-463,490
285
- Lcat.js | 100 | 85.71 | 100 | 100 | 54
286
- Lcd.js | 95.65 | 81.82 | 100 | 95.65 | 50
287
- Lls.js | 95.45 | 72.73 | 100 | 95.45 | 97
288
- Lpwd.js | 92.31 | 100 | 100 | 92.31 | 36
289
- Ls.js | 91.3 | 75 | 100 | 90.77 | 103,114-116,130,181
290
- Mkdir.js | 100 | 66.67 | 100 | 100 | 38-44
291
- Mv.js | 88.04 | 73.21 | 100 | 87.78 | 93-99,133,155,165-172
292
- Paste.js | 87.23 | 75 | 100 | 87.23 | 72,78,81,89,113,129
293
- Pwd.js | 92.31 | 100 | 100 | 92.31 | 33
294
- Quit.js | 90 | 50 | 100 | 90 | 27
295
- Rm.js | 94 | 80.95 | 100 | 93.88 | 63,126,134
296
- Shell.js | 88.24 | 60 | 100 | 88.24 | 38,55
297
- Ssh.js | 25 | 0 | 40 | 25 | 72-120
298
- Tag.js | 98.04 | 92.31 | 100 | 98.02 | 122,171
299
- Totp.js | 96.47 | 74.47 | 100 | 96.47 | 188-189,235
300
- Touch.js | 95.92 | 81.48 | 100 | 95.83 | 152,202
301
- Use.js | 96.77 | 89.47 | 100 | 96.77 | 68
302
- Ver.js | 90 | 66.67 | 100 | 90 | 25
303
- Whoami.js | 93.1 | 63.64 | 80 | 93.1 | 29,64
304
- chat.js | 85.37 | 53.85 | 100 | 85.37 | 105,117-130,136,142
305
- index.js | 91.67 | 60 | 100 | 91.3 | 22,31
306
- src/commands/chat | 79.44 | 63.29 | 92.31 | 79.33 |
307
- Contacts.js | 80 | 42.86 | 80 | 80 | 54,65,69,81
308
- Help.js | 86.67 | 60 | 100 | 86.67 | 37-38
309
- Join.js | 95.65 | 82.61 | 100 | 95.56 | 43,110
310
- Leave.js | 100 | 60 | 100 | 100 | 24,28
311
- Quit.js | 100 | 75 | 100 | 100 | 24
312
- Send.js | 67.65 | 46.67 | 100 | 67.65 | 37,41,44,77,86-95
313
- Show.js | 68.75 | 70.59 | 100 | 68.75 | 74-78,87,102-108
314
- Whoami.js | 42.86 | 0 | 60 | 42.86 | 22,30-39
315
- src/prompts | 14.72 | 0 | 13.43 | 14.85 |
316
- ChatPrompt.js | 6.1 | 0 | 0 | 6.1 | 8-164
317
- ChatPromptMock.js | 100 | 100 | 66.67 | 100 |
318
- CommandPrompt.js | 9.8 | 0 | 0 | 9.93 | 24-318
319
- Completion.js | 4.41 | 0 | 0 | 4.48 | 6-103
320
- MainPromptMock.js | 100 | 100 | 66.67 | 100 |
321
- MultiEditorPrompt.js | 25 | 0 | 0 | 25 | 7-36
322
- SigintManager.js | 25 | 0 | 20 | 25 | 10-36
323
- src/utils | 69.92 | 63.28 | 56.25 | 69.55 |
324
- AliasManager.js | 100 | 91.67 | 100 | 100 | 47
325
- ContactManager.js | 71.43 | 60 | 85.71 | 71.43 | 12,35-37
326
- Fido2Client.js | 15.38 | 0 | 11.11 | 15.38 | 14-108
327
- HelpProto.js | 91.6 | 84.06 | 100 | 91.45 | 49,153-154,171-176,195
328
- Logger.js | 63.64 | 56.25 | 36.84 | 62.79 | ...37-49,57,65-69,74,84,88,93,105
329
- -----------------------|---------|----------|---------|---------|-----------------------------------
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": "1.1.5",
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;