secrez 1.1.1 → 1.1.2

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.
Files changed (68) hide show
  1. package/README.md +414 -291
  2. package/bin/secrez.js +50 -47
  3. package/coverage.report +63 -305
  4. package/package.json +10 -12
  5. package/src/Command.js +78 -57
  6. package/src/PreCommand.js +74 -70
  7. package/src/Welcome.js +144 -134
  8. package/src/cliConfig.js +14 -14
  9. package/src/commands/Alias.js +123 -100
  10. package/src/commands/Bash.js +10 -12
  11. package/src/commands/Cat.js +117 -107
  12. package/src/commands/Cd.js +39 -42
  13. package/src/commands/Chat.js +75 -63
  14. package/src/commands/Conf.js +123 -99
  15. package/src/commands/Contacts.js +189 -171
  16. package/src/commands/Copy.js +132 -113
  17. package/src/commands/Courier.js +123 -105
  18. package/src/commands/Ds.js +88 -76
  19. package/src/commands/Edit.js +122 -103
  20. package/src/commands/Export.js +153 -114
  21. package/src/commands/Find.js +115 -110
  22. package/src/commands/Help.js +20 -23
  23. package/src/commands/Import.js +296 -225
  24. package/src/commands/Lcat.js +36 -39
  25. package/src/commands/Lcd.js +38 -39
  26. package/src/commands/Lls.js +58 -55
  27. package/src/commands/Lpwd.js +20 -24
  28. package/src/commands/Ls.js +107 -97
  29. package/src/commands/Mkdir.js +35 -38
  30. package/src/commands/Mv.js +147 -114
  31. package/src/commands/Paste.js +68 -65
  32. package/src/commands/Pwd.js +18 -23
  33. package/src/commands/Quit.js +22 -24
  34. package/src/commands/Rm.js +78 -70
  35. package/src/commands/Shell.js +31 -32
  36. package/src/commands/Ssh.js +77 -63
  37. package/src/commands/Tag.js +133 -112
  38. package/src/commands/Totp.js +166 -136
  39. package/src/commands/Touch.js +169 -56
  40. package/src/commands/Use.js +44 -41
  41. package/src/commands/Ver.js +16 -18
  42. package/src/commands/Whoami.js +34 -37
  43. package/src/commands/chat/Contacts.js +41 -44
  44. package/src/commands/chat/Help.js +20 -23
  45. package/src/commands/chat/Join.js +59 -55
  46. package/src/commands/chat/Leave.js +16 -22
  47. package/src/commands/chat/Quit.js +19 -24
  48. package/src/commands/chat/Send.js +58 -57
  49. package/src/commands/chat/Show.js +60 -51
  50. package/src/commands/chat/Whoami.js +18 -22
  51. package/src/commands/index.js +20 -22
  52. package/src/index.js +3 -3
  53. package/src/prompts/ChatPrompt.js +87 -82
  54. package/src/prompts/ChatPromptMock.js +11 -17
  55. package/src/prompts/CommandPrompt.js +146 -138
  56. package/src/prompts/Completion.js +64 -69
  57. package/src/prompts/MainPrompt.js +84 -77
  58. package/src/prompts/MainPromptMock.js +19 -30
  59. package/src/prompts/MultiEditorPrompt.js +21 -22
  60. package/src/prompts/SigintManager.js +21 -24
  61. package/src/utils/AliasManager.js +16 -18
  62. package/src/utils/ContactManager.js +15 -17
  63. package/src/utils/Fido2Client.js +59 -49
  64. package/src/utils/HelpProto.js +130 -117
  65. package/src/utils/Logger.js +48 -50
  66. package/.eslintignore +0 -0
  67. package/.eslintrc +0 -33
  68. package/.jshintrc +0 -3
package/bin/secrez.js CHANGED
@@ -1,86 +1,90 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const path = require('path')
4
- const homedir = require('homedir')
5
- const chalk = require('chalk')
6
- const commandLineArgs = require('command-line-args')
3
+ const path = require("path");
4
+ const homedir = require("homedir");
5
+ const chalk = require("chalk");
6
+ const commandLineArgs = require("command-line-args");
7
7
 
8
- const pkg = require('../package')
8
+ const pkg = require("../package");
9
9
 
10
- const MainPrompt = require('../src/prompts/MainPrompt')
11
- const Logger = require('../src/utils/Logger')
10
+ const MainPrompt = require("../src/prompts/MainPrompt");
11
+ const Logger = require("../src/utils/Logger");
12
12
 
13
13
  const optionDefinitions = [
14
14
  {
15
- name: 'help',
16
- alias: 'h',
17
- type: Boolean
15
+ name: "help",
16
+ alias: "h",
17
+ type: Boolean,
18
18
  },
19
19
  {
20
- name: 'iterations',
21
- alias: 'i',
22
- type: Number
20
+ name: "iterations",
21
+ alias: "i",
22
+ type: Number,
23
23
  },
24
24
  {
25
- name: 'container',
26
- alias: 'c',
27
- type: String
25
+ name: "container",
26
+ alias: "c",
27
+ type: String,
28
28
  },
29
29
  {
30
- name: 'save-iterations',
31
- alias: 's',
32
- type: Boolean
30
+ name: "save-iterations",
31
+ alias: "s",
32
+ type: Boolean,
33
33
  },
34
34
  {
35
- name: 'localDir',
36
- alias: 'l',
37
- type: String
38
- }
39
- ]
35
+ name: "localDir",
36
+ alias: "l",
37
+ type: String,
38
+ },
39
+ ];
40
40
 
41
41
  function error(message) {
42
42
  if (!Array.isArray(message)) {
43
- message = [message]
43
+ message = [message];
44
44
  }
45
- Logger.red(message[0])
45
+ Logger.red(message[0]);
46
46
  if (message[1]) {
47
- Logger.log(message[1])
47
+ Logger.log(message[1]);
48
48
  }
49
49
  /*eslint-disable-next-line*/
50
- process.exit(1)
50
+ process.exit(1);
51
51
  }
52
52
 
53
- let options = {}
53
+ let options = {};
54
54
  try {
55
55
  options = commandLineArgs(optionDefinitions, {
56
- camelCase: true
57
- })
56
+ camelCase: true,
57
+ });
58
58
  } catch (e) {
59
- error(e.message)
59
+ error(e.message);
60
60
  }
61
61
 
62
62
  if (options.container) {
63
- options.container = options.container.replace(/\/+$/, '')
63
+ options.container = options.container.replace(/\/+$/, "");
64
64
  if (!path.isAbsolute(options.container)) {
65
65
  if (/^~/.test(options.container)) {
66
- options.container = path.join(homedir(), options.container.substring(2))
66
+ options.container = path.join(homedir(), options.container.substring(2));
67
67
  } else {
68
- error(['The path must be absolute or relative to home dir.',
68
+ error([
69
+ "The path must be absolute or relative to home dir.",
69
70
  `If that path is relative to the current directory, you can absolutize it running, for example:
70
71
  secrez -c \`pwd\`/${options.container}
71
- `])
72
+ `,
73
+ ]);
72
74
  }
73
75
  }
74
76
  }
75
77
 
76
78
  if (!options.localDir) {
77
- options.localDir = homedir()
79
+ options.localDir = homedir();
78
80
  }
79
81
 
80
- Logger.log('bold', chalk.grey(`Secrez v${pkg.version}`))
82
+ Logger.log("bold", chalk.grey(`Secrez v${pkg.version}`));
81
83
 
82
84
  if (options.help) {
83
- Logger.log('reset', `${pkg.description}
85
+ Logger.log(
86
+ "reset",
87
+ `${pkg.description}
84
88
 
85
89
  Options:
86
90
  -h, --help This help.
@@ -103,15 +107,14 @@ Examples:
103
107
  $ secrez -si 1213672
104
108
  $ secrez -c ~/.secrez-archive
105
109
 
106
- `)
110
+ `
111
+ );
107
112
  // eslint-disable-next-line no-process-exit
108
- process.exit(0)
113
+ process.exit(0);
109
114
  }
110
115
 
111
116
  (async () => {
112
- const prompt = new MainPrompt
113
- await prompt.init(options)
114
- prompt.run(options)
115
- })()
116
-
117
-
117
+ const prompt = new MainPrompt();
118
+ await prompt.init(options);
119
+ prompt.run(options);
120
+ })();
package/coverage.report CHANGED
@@ -1,323 +1,81 @@
1
1
 
2
- > secrez@1.1.0 test /Users/francescosullo/Projects/Personal/secrez/packages/secrez
3
- > cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text ./node_modules/.bin/_mocha test/*.test.js test/**/*.test.js test/**/**/*.js --exit
2
+ > secrez@1.1.2 test /Users/francescosullo/Projects/Personal/secrez/packages/secrez
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
 
6
6
 
7
- #Command
8
- #constructor
9
- ✓ should instantiate a Command object
10
- #getFileList
11
- ✓ should get the current internal folder dir
12
- ✓ should get the current external folder dir
13
- #help & #setHelpAndCompletion
14
- ✓ should do nothing
15
- #validate
16
- ✓ should validate the options
17
-
18
- #Fido2Client
19
- #configuration
20
- ✓ should verify that all the scripts exist
21
-
22
- #Alias
23
- ✓ should return the help
24
- ✓ create aliases and lists them
25
- - should chain two commands
26
- ✓ rename and delete aliases
27
- ✓ should throw if there are errors
28
-
29
- #Cat
30
- ✓ should return the help
31
- ✓ should show the content of a file
32
- ✓ should show either one or all the versions of a file (1015ms)
33
- ✓ should throw if entry is not a file or file does not exist
34
- ✓ should throw if trying to cat a binary file
35
- ✓ should show the content of a Yaml file (1033ms)
36
-
37
- #Cd
38
- ✓ should return the help
39
- ✓ change to a folder
40
- ✓ return en error if changing to a file
41
-
42
- #Chat
43
- ✓ should return the help
44
- ✓ should run the chat if the courier is ready (173ms)
45
-
46
- #Contacts
47
- ✓ should return the help
48
- ✓ create a contacts
49
- ✓ create contacts and get their public keys
50
- ✓ should list contacts
51
- ✓ should update a contact
52
- ✓ should rename a contacts
53
- ✓ should remove a contacts
54
- ✓ should throw if there are errors
55
-
56
- #Copy
57
- ✓ should return the help
58
- ✓ should copy a file to the clipboard (382ms)
59
- ✓ should copy a string to the clipboard (233ms)
60
- ✓ should copy a card to the clipboard (877ms)
61
- ✓ should return an error if the file does not exist or is a folder
62
- ✓ should throw if copying to clipboard a binary files
63
-
64
- #Courier
65
- ✓ should return the help
66
- ✓ should check if it is ready
67
- ✓ should set up the courier (140ms)
68
- ✓ should set up the courier and get the default message when is already set up (141ms)
69
-
70
- #Ds
71
- ✓ should return the help
72
- ✓ should list all datasets
73
- ✓ should create a new dataset
74
- ✓ should rename a dataset
75
- ✓ should delete a dataset
76
-
77
- #Export
78
- ✓ should return the help
79
- ✓ should export a file to the current local folder
80
- ✓ should export a binary file to the current local folder
81
- ✓ should export an encrypted file to the current local folder
82
- ✓ should export a file and delete it after 1 second (1204ms)
83
- ✓ should return an error if the file does not exist or is a folder
84
-
85
- #Find
86
- ✓ should return the help
87
- ✓ should show find a string in the tree (1033ms)
88
- ✓ should find no result without parameters
89
- ✓ should skip binary files from search
90
-
91
- #Help
92
- ✓ should return the help
93
- ✓ #execAsync and format
94
- ✓ should throw if wrong command
95
- ✓ -- to complete coverage
96
-
97
- #Import
98
- ✓ should return the help
99
- ✓ should import a file in the current folder
100
- ✓ should import an encrypted file
101
- ✓ should import an encrypted file encrypted for myself
102
- ✓ should import an encrypted binary file and export it again verifying it is fine
103
- ✓ should import files recursively
104
- ✓ should read a folder and import the only text file
105
- ✓ should read a folder and import text and binary files
106
- ✓ should simulate the import of two files
107
- ✓ should move the imported file
108
- ✓ should import a backup from another software spanning the data among folders and files
109
- ✓ should import a backup from another software but saving the tags as tags
110
- ✓ should import a backup from another software using tags to prefix the paths
111
- ✓ should import using tags to prefix the paths, ignoring the tags
112
- ✓ should import from a LastPass-like csv setting the path from "grouping" and "name"
113
- ✓ should import from a json
114
- ✓ should throw importing a malformed backup
115
- ✓ should throw importing a CSV indicating wrong fields to generate the path
116
-
117
- #Lcat
118
- ✓ should return the help
119
- ✓ cat a file
120
- ✓ return en error if trying to cat a binary file
121
-
122
- #Lcd
123
- ✓ should return the help
124
- ✓ change to a folder
125
- ✓ return en error if changing to a file
126
-
127
- #Lls
128
- ✓ should return the help
129
- ✓ should list a folder
130
- ✓ return en error if lls-ing a not existing path
131
- ✓ return a message if no files are found
132
-
133
- #Lpwd
134
- ✓ should return the help
135
- ✓ change to a folder
136
-
137
- #Ls
138
- ✓ should return the help
139
- ✓ should return all the datasets
140
- ✓ should list folders and files
141
- ✓ should list folders and files using wildcards
142
-
143
- #Mkdir
144
- ✓ should return the help
145
- ✓ should create a folder
146
- ✓ should create a nested folder
147
- ✓ should throw if trying to create a child of a file
148
- ✓ should throw if wrong parameters
149
-
150
- #Mv
151
- ✓ should return the help
152
- ✓ should rename a file (1010ms)
153
- ✓ should move a file to another folder
154
- ✓ should move many files to another folder
155
- ✓ should move a file to another subfolder
156
- ✓ should move and rename file to another folder
157
- ✓ should move file to another folder using wildcards
158
- ✓ should move file to another dataset using wildcards
159
- ✓ should move file managing duplicates
160
- ✓ should throw if parameters are missed or wrong
161
- ✓ should move files from and to other datasets (1023ms)
162
- ✓ should move the results of a find
163
-
164
- #Paste
165
- ✓ should return the help
166
- ✓ should paste the clipboard content to a new file (88ms)
167
- ✓ should paste the clipboard content to an existent file (101ms)
168
- ✓ should paste a single field to a yml card (48ms)
169
-
170
- #Pwd
171
- ✓ should return the help
172
- ✓ should show the working folder
173
-
174
- #Quit
175
- ✓ should show the content of an external file via bash
176
-
177
- #Rm
178
- ✓ should return the help
179
- ✓ should delete a file with one version
180
- ✓ should delete many files usign wildcards
181
- ✓ should return errors if wrong parameters
182
- ✓ should delete some versions of a file (1011ms)
183
-
184
- #Shell
185
- ✓ should return the help
186
- ✓ should show the content of an external file via shell
187
-
188
- #Tag
189
- ✓ should return the help
190
- ✓ should tag a file
191
- ✓ should remove a tag
192
- ✓ should list all the tags
193
- ✓ should show the file tagged as
194
- ✓ should show very long file tagged as
195
-
196
- #Totp
197
- ✓ should return the help
198
- ✓ should totp a file to the clipboard (359ms)
199
- ✓ should read a totp secret from an image and add the totp field to the card (55ms)
200
- ✓ should read a totp secret from an image and return the secret
201
- ✓ should throw if bad image
202
- ✓ should throw if missing parameters
203
- ✓ should throw if the yaml is malformed
204
- ✓ should read a totp secret from the clipboard (101ms)
205
-
206
7
  #Touch
207
8
  ✓ should return the help
208
9
  ✓ should create a file
209
10
  ✓ should create a file with content
210
11
  ✓ should throw if trying to create a child of a file
211
12
  ✓ should throw if wrong parameters
212
-
213
- #Use
214
- ✓ should return the help
215
- should use a new dataset, creating it if does not exist
216
-
217
- #Ver
218
- ✓ should show the current version
219
-
220
- #Whoami
221
- ✓ should return the help
222
- ✓ should see who am I (74ms)
223
-
224
- #Help
225
- ✓ should return the help
226
-
227
- #Join
228
- ✓ should return the help
229
- ✓ should join a chat with user0x
230
- ✓ should join a chat with user0x
231
- ✓ should jump between chats
232
- ✓ should return all the users
233
- ✓ should throw if contact not found or multiple chat
234
-
235
- #Leave
236
- ✓ should return the help
237
- ✓ should leave the room
238
-
239
- #Quit
240
- ✓ should return the help
241
- ✓ should quit the chat, even if inside a room (47ms)
242
-
243
- #Send
244
- ✓ should return the help
245
- ✓ should send a message to user0 (111ms)
246
-
247
- #Show
248
- ✓ should return the help
249
- ✓ should show history messages (747ms)
13
+ ✓ should create a file and generate a wallet (43ms)
14
+ New file "/folder2/file1" created.
15
+ ✓ should generate 5 prefixed wallet
16
+ New file "/folder2/file1" created.
17
+ ✓ should generate a wallet with mnemonic and 2 keys
250
18
 
251
19
 
252
- 162 passing (28s)
253
- 1 pending
20
+ 8 passing (1s)
254
21
 
255
22
  -----------------------|---------|----------|---------|---------|-----------------------------------
256
23
  File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
257
24
  -----------------------|---------|----------|---------|---------|-----------------------------------
258
- All files | 71.33 | 58.19 | 71.98 | 71.28 |
259
- src | 59.63 | 54.79 | 55 | 61.32 |
260
- Command.js | 79.66 | 78.72 | 76.92 | 83.93 | 35,54-59,68,71,95
261
- PreCommand.js | 21.95 | 11.54 | 14.29 | 21.95 | 9-95,108
25
+ All files | 19.31 | 6.31 | 17.43 | 19.32 |
26
+ src | 33.03 | 15.07 | 25 | 33.33 |
27
+ Command.js | 37.29 | 23.4 | 38.46 | 37.93 | 29-35,40-97,108,119,122-130
28
+ PreCommand.js | 12.2 | 0 | 0 | 12.2 | 8-115
262
29
  cliConfig.js | 100 | 100 | 100 | 100 |
263
- src/commands | 81.58 | 66.85 | 89.95 | 81.4 |
264
- Alias.js | 90.54 | 77.36 | 100 | 90.41 | 85,96,118,145,149,154,164
265
- Bash.js | 75 | 0 | 66.67 | 75 | 20-21
266
- Cat.js | 98.9 | 88.89 | 100 | 98.9 | 144
267
- Cd.js | 96.43 | 86.67 | 100 | 96.43 | 45
268
- Chat.js | 19.51 | 0 | 16.67 | 19.51 | 24-130
269
- Conf.js | 10.45 | 0 | 25 | 10.45 | 132-473
270
- Contacts.js | 74.67 | 65.98 | 92.86 | 74.5 | ...75-197,221,226,238,294,307,317
271
- Copy.js | 94.87 | 74.51 | 100 | 94.81 | 96,141,158,183
272
- Courier.js | 63.54 | 41.86 | 85.71 | 63.83 | ...24,139-156,168,180-183,195-201
273
- Ds.js | 92.54 | 82.05 | 100 | 92.42 | 94,103-108,120
274
- Edit.js | 13.58 | 0 | 40 | 13.58 | 78-193
275
- Export.js | 90.91 | 68 | 100 | 90.91 | 109,114-115,120,130,137,140
276
- Find.js | 93.59 | 86.67 | 100 | 93.42 | 90,153,192-196,202
277
- Help.js | 100 | 80 | 100 | 100 | 30
278
- Import.js | 93.2 | 85.48 | 100 | 93.1 | ...06,308,321,327,369,384-390,417
279
- Lcat.js | 100 | 85.71 | 100 | 100 | 55
280
- Lcd.js | 95.65 | 81.82 | 100 | 95.65 | 49
281
- Lls.js | 95.45 | 72.73 | 100 | 95.45 | 91
282
- Lpwd.js | 92.31 | 100 | 100 | 92.31 | 38
283
- Ls.js | 91.3 | 75 | 100 | 90.77 | 99,110-112,126,169
284
- Mkdir.js | 100 | 66.67 | 100 | 100 | 39-45
285
- Mv.js | 91.01 | 77.36 | 100 | 90.8 | 114,137,148-154
286
- Paste.js | 87.23 | 75 | 100 | 87.23 | 66,72,75,83,107,124
287
- Pwd.js | 92.31 | 100 | 100 | 92.31 | 36
288
- Quit.js | 90 | 50 | 100 | 90 | 29
289
- Rm.js | 94 | 80.95 | 100 | 93.88 | 61,116,124
290
- Shell.js | 88.24 | 60 | 100 | 88.24 | 39,54
291
- Ssh.js | 25 | 0 | 40 | 25 | 64-104
292
- Tag.js | 98.04 | 92.31 | 100 | 97.94 | 123,164
293
- Totp.js | 96.47 | 74.47 | 100 | 96.47 | 164-165,209
294
- Touch.js | 100 | 71.43 | 100 | 100 | 57,68
295
- Use.js | 96.77 | 89.47 | 100 | 96.77 | 65
296
- Ver.js | 90 | 66.67 | 100 | 90 | 27
297
- Whoami.js | 93.1 | 63.64 | 80 | 93.1 | 32,65
298
- chat.js | 85.37 | 53.85 | 100 | 85.37 | 94,103-116,122,128
299
- index.js | 91.67 | 60 | 100 | 91.3 | 23,32
300
- src/commands/chat | 79.44 | 63.29 | 92.31 | 79.33 |
301
- Contacts.js | 80 | 42.86 | 80 | 80 | 56,65,69,82
302
- Help.js | 86.67 | 60 | 100 | 86.67 | 38-39
303
- Join.js | 95.65 | 82.61 | 100 | 95.56 | 41,104
304
- Leave.js | 100 | 60 | 100 | 100 | 28,32
305
- Quit.js | 100 | 75 | 100 | 100 | 27
306
- Send.js | 67.65 | 46.67 | 100 | 67.65 | 40,44,47,74,83-92
307
- Show.js | 68.75 | 70.59 | 100 | 68.75 | 63-67,76,91-97
308
- Whoami.js | 42.86 | 0 | 60 | 42.86 | 24,32-41
309
- src/prompts | 15.14 | 0 | 14.29 | 15.36 |
310
- ChatPrompt.js | 6.17 | 0 | 0 | 6.17 | 9-155
311
- ChatPromptMock.js | 100 | 100 | 66.67 | 100 |
312
- CommandPrompt.js | 10.42 | 0 | 0 | 10.56 | 25-286
313
- Completion.js | 4.41 | 0 | 0 | 4.62 | 7-107
314
- MainPromptMock.js | 100 | 100 | 66.67 | 100 |
315
- MultiEditorPrompt.js | 25 | 0 | 0 | 25 | 8-35
316
- SigintManager.js | 25 | 0 | 20 | 25 | 11-37
317
- src/utils | 69.92 | 63.28 | 56.25 | 69.55 |
318
- AliasManager.js | 100 | 91.67 | 100 | 100 | 48
319
- ContactManager.js | 71.43 | 60 | 85.71 | 71.43 | 13,36-38
320
- Fido2Client.js | 15.38 | 0 | 11.11 | 15.38 | 15-101
321
- HelpProto.js | 91.6 | 84.06 | 100 | 91.45 | 44,137-138,155-160,179
322
- Logger.js | 63.64 | 56.25 | 36.84 | 62.79 | ...38-50,58,66-70,75,85,89,94,107
30
+ src/commands | 15.44 | 2.67 | 19.63 | 15.5 |
31
+ Alias.js | 8.11 | 0 | 25 | 8.22 | 62-213
32
+ Bash.js | 62.5 | 0 | 33.33 | 62.5 | 11-19
33
+ Cat.js | 12.09 | 0 | 14.29 | 12.09 | 61-220
34
+ Cd.js | 17.86 | 0 | 25 | 17.86 | 28-73
35
+ Chat.js | 19.51 | 0 | 16.67 | 19.51 | 23-144
36
+ Conf.js | 8.96 | 0 | 12.5 | 8.96 | 67-499
37
+ Contacts.js | 6 | 0 | 7.14 | 6.04 | 55-352
38
+ Copy.js | 10.26 | 0 | 14.29 | 10.39 | 69-237
39
+ Courier.js | 6.25 | 0 | 7.14 | 6.38 | 20-221
40
+ Ds.js | 5.97 | 0 | 16.67 | 6.06 | 39-160
41
+ Edit.js | 12.35 | 0 | 20 | 12.35 | 61-214
42
+ Export.js | 12.99 | 0 | 16.67 | 12.99 | 68-232
43
+ Find.js | 7.69 | 0 | 8.33 | 7.89 | 63-211
44
+ Help.js | 73.33 | 40 | 75 | 73.33 | 26,36-40
45
+ Import.js | 6.31 | 0 | 9.09 | 6.37 | 87-496
46
+ Lcat.js | 30 | 0 | 25 | 30 | 35-65
47
+ Lcd.js | 17.39 | 0 | 25 | 17.39 | 30-72
48
+ Lls.js | 22.73 | 0 | 25 | 22.73 | 49-99
49
+ Lpwd.js | 30.77 | 0 | 25 | 30.77 | 15-38
50
+ Ls.js | 5.8 | 0 | 10 | 6.15 | 46-183
51
+ Mkdir.js | 22.73 | 0 | 25 | 22.73 | 27-61
52
+ Mv.js | 6.52 | 0 | 16.67 | 6.67 | 46-240
53
+ Paste.js | 14.89 | 0 | 25 | 14.89 | 40-131
54
+ Pwd.js | 30.77 | 0 | 25 | 30.77 | 15-35
55
+ Quit.js | 50 | 0 | 33.33 | 50 | 19-40
56
+ Rm.js | 16 | 0 | 16.67 | 16.33 | 36-137
57
+ Shell.js | 29.41 | 0 | 25 | 29.41 | 25-57
58
+ Ssh.js | 22.22 | 0 | 20 | 22.22 | 49-120
59
+ Tag.js | 8.82 | 0 | 9.09 | 8.91 | 66-236
60
+ Totp.js | 15.29 | 0 | 10 | 15.29 | 75-288
61
+ Touch.js | 95.92 | 81.48 | 100 | 95.83 | 152,202
62
+ Use.js | 12.9 | 0 | 25 | 12.9 | 30-85
63
+ Ver.js | 50 | 0 | 33.33 | 50 | 17-28
64
+ Whoami.js | 24.14 | 0 | 20 | 24.14 | 22-66
65
+ chat.js | 19.51 | 0 | 16.67 | 19.51 | 23-144
66
+ index.js | 87.5 | 50 | 100 | 86.96 | 15,22,31
67
+ src/prompts | 14 | 0 | 4.76 | 14.12 |
68
+ ChatPrompt.js | 6.17 | 0 | 0 | 6.17 | 8-163
69
+ ChatPromptMock.js | 42.86 | 100 | 0 | 42.86 | 6-14
70
+ CommandPrompt.js | 10.42 | 0 | 0 | 10.56 | 24-296
71
+ Completion.js | 4.41 | 0 | 0 | 4.48 | 6-103
72
+ MainPromptMock.js | 100 | 100 | 33.33 | 100 |
73
+ MultiEditorPrompt.js | 25 | 0 | 0 | 25 | 7-36
74
+ SigintManager.js | 25 | 0 | 20 | 25 | 10-36
75
+ src/utils | 51.63 | 40.63 | 20.83 | 51.03 |
76
+ AliasManager.js | 5.88 | 0 | 0 | 5.88 | 3-48
77
+ ContactManager.js | 7.14 | 0 | 0 | 7.14 | 3-44
78
+ Fido2Client.js | 9.62 | 0 | 0 | 9.62 | 8-108
79
+ HelpProto.js | 78.99 | 62.32 | 83.33 | 78.63 | 11-39,49,153-154,171-176,195
80
+ Logger.js | 59.09 | 56.25 | 26.32 | 58.14 | ...29,37-57,65-69,74,84,88,93,105
323
81
  -----------------------|---------|----------|---------|---------|-----------------------------------
package/package.json CHANGED
@@ -1,17 +1,18 @@
1
1
  {
2
2
  "name": "secrez",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "license": "MIT",
5
5
  "nyc": {
6
6
  "include": "src",
7
7
  "exclude": []
8
8
  },
9
9
  "dependencies": {
10
- "@secrez/core": "~1.0.3",
11
- "@secrez/crypto": "~1.0.1",
12
- "@secrez/fs": "~1.0.3",
13
- "@secrez/hub": "~0.2.1",
14
- "@secrez/utils": "~1.0.2",
10
+ "@secrez/core": "~1.0.4",
11
+ "@secrez/crypto": "~1.0.3",
12
+ "@secrez/eth": "~0.0.2",
13
+ "@secrez/fs": "~1.0.4",
14
+ "@secrez/hub": "~0.2.2",
15
+ "@secrez/utils": "~1.0.3",
15
16
  "case": "^1.6.3",
16
17
  "chalk": "^3.0.0",
17
18
  "clipboardy": "^2.3.0",
@@ -29,13 +30,11 @@
29
30
  "tiny-cli-editor": "^0.1.1"
30
31
  },
31
32
  "devDependencies": {
32
- "@secrez/courier": "~0.2.2",
33
- "@secrez/test-helpers": "~1.0.2",
33
+ "@secrez/courier": "~0.2.3",
34
+ "@secrez/test-helpers": "~2.0.0",
34
35
  "chai": "^4.2.0",
35
36
  "chalk": "^3.0.0",
36
37
  "cross-env": "^7.0.2",
37
- "eslint": "^6.8.0",
38
- "eslint-plugin-node": "^11.0.0",
39
38
  "mocha": "^7.1.1",
40
39
  "nyc": "^15.1.0",
41
40
  "test-console": "^1.1.0"
@@ -64,9 +63,8 @@
64
63
  "gitHead": "42cbc519dd2802a1e03c6203bb724c726c2bfb79",
65
64
  "scripts": {
66
65
  "dev": "cross-env NODE_ENV=dev bin/secrez.js -c `pwd`/tmp/secrez-dev -i 1e3 -l `pwd`/tmp",
67
- "lint": "eslint -c .eslintrc 'src/**/*.js' 'bin/*.js' 'test/*.test.js' 'test/**/*.js' 'test/**/**/*.js'",
68
66
  "test-only": "cross-env NODE_ENV=test ./node_modules/.bin/mocha test/*.test.js test/**/*.test.js test/**/**/*.js --exit",
69
- "test": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text ./node_modules/.bin/_mocha test/*.test.js test/**/*.test.js test/**/**/*.js --exit",
67
+ "test": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha test/*.test.js test/**/*.test.js test/**/**/*.js --exit",
70
68
  "posttest": "nyc check-coverage --statements 65 --branches 50 --functions 65 --lines 65",
71
69
  "build-helpers": "cd test/helpers/os && ./build.sh"
72
70
  }