secrez 1.1.1 → 1.1.3
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 +503 -444
- package/bin/secrez.js +50 -47
- package/coverage.report +91 -85
- package/package.json +10 -12
- package/src/Command.js +78 -57
- package/src/PreCommand.js +75 -70
- package/src/Welcome.js +144 -134
- package/src/cliConfig.js +14 -14
- package/src/commands/Alias.js +123 -100
- package/src/commands/Bash.js +10 -12
- package/src/commands/Cat.js +117 -107
- package/src/commands/Cd.js +39 -42
- package/src/commands/Chat.js +75 -63
- package/src/commands/Conf.js +123 -99
- package/src/commands/Contacts.js +189 -171
- package/src/commands/Copy.js +132 -113
- package/src/commands/Courier.js +123 -105
- package/src/commands/Ds.js +88 -76
- package/src/commands/Edit.js +122 -103
- package/src/commands/Export.js +201 -116
- package/src/commands/Find.js +115 -110
- package/src/commands/Help.js +20 -23
- package/src/commands/Import.js +296 -225
- package/src/commands/Lcat.js +36 -39
- package/src/commands/Lcd.js +38 -39
- package/src/commands/Lls.js +58 -55
- package/src/commands/Lpwd.js +20 -24
- package/src/commands/Ls.js +107 -97
- package/src/commands/Mkdir.js +35 -38
- package/src/commands/Mv.js +147 -114
- package/src/commands/Paste.js +68 -65
- package/src/commands/Pwd.js +18 -23
- package/src/commands/Quit.js +22 -24
- package/src/commands/Rm.js +78 -70
- package/src/commands/Shell.js +31 -32
- package/src/commands/Ssh.js +77 -63
- package/src/commands/Tag.js +133 -112
- package/src/commands/Totp.js +166 -136
- package/src/commands/Touch.js +169 -56
- package/src/commands/Use.js +44 -41
- package/src/commands/Ver.js +16 -18
- package/src/commands/Whoami.js +34 -37
- package/src/commands/chat/Contacts.js +41 -44
- package/src/commands/chat/Help.js +20 -23
- package/src/commands/chat/Join.js +59 -55
- package/src/commands/chat/Leave.js +16 -22
- package/src/commands/chat/Quit.js +19 -24
- package/src/commands/chat/Send.js +58 -57
- package/src/commands/chat/Show.js +60 -51
- package/src/commands/chat/Whoami.js +18 -22
- package/src/commands/index.js +20 -22
- package/src/index.js +3 -3
- package/src/prompts/ChatPrompt.js +87 -82
- package/src/prompts/ChatPromptMock.js +11 -17
- package/src/prompts/CommandPrompt.js +146 -138
- package/src/prompts/Completion.js +64 -69
- package/src/prompts/MainPrompt.js +84 -77
- package/src/prompts/MainPromptMock.js +19 -30
- package/src/prompts/MultiEditorPrompt.js +21 -22
- package/src/prompts/SigintManager.js +21 -24
- package/src/utils/AliasManager.js +16 -18
- package/src/utils/ContactManager.js +15 -17
- package/src/utils/Fido2Client.js +59 -49
- package/src/utils/HelpProto.js +130 -117
- package/src/utils/Logger.js +48 -50
- package/.eslintignore +0 -0
- package/.eslintrc +0 -33
- 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(
|
4
|
-
const homedir = require(
|
5
|
-
const chalk = require(
|
6
|
-
const commandLineArgs = require(
|
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(
|
8
|
+
const pkg = require("../package");
|
9
9
|
|
10
|
-
const MainPrompt = require(
|
11
|
-
const Logger = require(
|
10
|
+
const MainPrompt = require("../src/prompts/MainPrompt");
|
11
|
+
const Logger = require("../src/utils/Logger");
|
12
12
|
|
13
13
|
const optionDefinitions = [
|
14
14
|
{
|
15
|
-
name:
|
16
|
-
alias:
|
17
|
-
type: Boolean
|
15
|
+
name: "help",
|
16
|
+
alias: "h",
|
17
|
+
type: Boolean,
|
18
18
|
},
|
19
19
|
{
|
20
|
-
name:
|
21
|
-
alias:
|
22
|
-
type: Number
|
20
|
+
name: "iterations",
|
21
|
+
alias: "i",
|
22
|
+
type: Number,
|
23
23
|
},
|
24
24
|
{
|
25
|
-
name:
|
26
|
-
alias:
|
27
|
-
type: String
|
25
|
+
name: "container",
|
26
|
+
alias: "c",
|
27
|
+
type: String,
|
28
28
|
},
|
29
29
|
{
|
30
|
-
name:
|
31
|
-
alias:
|
32
|
-
type: Boolean
|
30
|
+
name: "save-iterations",
|
31
|
+
alias: "s",
|
32
|
+
type: Boolean,
|
33
33
|
},
|
34
34
|
{
|
35
|
-
name:
|
36
|
-
alias:
|
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([
|
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(
|
82
|
+
Logger.log("bold", chalk.grey(`Secrez v${pkg.version}`));
|
81
83
|
|
82
84
|
if (options.help) {
|
83
|
-
Logger.log(
|
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,6 +1,6 @@
|
|
1
1
|
|
2
|
-
> secrez@1.1.
|
3
|
-
> cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text
|
2
|
+
> secrez@1.1.3 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
|
|
@@ -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 (1022ms)
|
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 (1031ms)
|
36
36
|
|
37
37
|
#Cd
|
38
38
|
✓ should return the help
|
@@ -41,7 +41,7 @@
|
|
41
41
|
|
42
42
|
#Chat
|
43
43
|
✓ should return the help
|
44
|
-
✓ should run the chat if the courier is ready (
|
44
|
+
✓ should run the chat if the courier is ready (247ms)
|
45
45
|
|
46
46
|
#Contacts
|
47
47
|
✓ should return the help
|
@@ -55,17 +55,17 @@
|
|
55
55
|
|
56
56
|
#Copy
|
57
57
|
✓ 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 (
|
58
|
+
✓ should copy a file to the clipboard (409ms)
|
59
|
+
✓ should copy a string to the clipboard (239ms)
|
60
|
+
✓ should copy a card to the clipboard (937ms)
|
61
61
|
✓ should return an error if the file does not exist or is a folder
|
62
62
|
✓ should throw if copying to clipboard a binary files
|
63
63
|
|
64
64
|
#Courier
|
65
65
|
✓ should return the help
|
66
66
|
✓ should check if it is ready
|
67
|
-
✓ should set up the courier (
|
68
|
-
✓ should set up the courier and get the default message when is already set up (
|
67
|
+
✓ should set up the courier (143ms)
|
68
|
+
✓ should set up the courier and get the default message when is already set up (143ms)
|
69
69
|
|
70
70
|
#Ds
|
71
71
|
✓ should return the help
|
@@ -81,10 +81,11 @@
|
|
81
81
|
✓ should export an encrypted file to the current local folder
|
82
82
|
✓ should export a file and delete it after 1 second (1204ms)
|
83
83
|
✓ 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 (717ms)
|
84
85
|
|
85
86
|
#Find
|
86
87
|
✓ should return the help
|
87
|
-
✓ should show find a string in the tree (
|
88
|
+
✓ should show find a string in the tree (1028ms)
|
88
89
|
✓ should find no result without parameters
|
89
90
|
✓ should skip binary files from search
|
90
91
|
|
@@ -149,7 +150,7 @@
|
|
149
150
|
|
150
151
|
#Mv
|
151
152
|
✓ should return the help
|
152
|
-
✓ should rename a file (
|
153
|
+
✓ should rename a file (1009ms)
|
153
154
|
✓ should move a file to another folder
|
154
155
|
✓ should move many files to another folder
|
155
156
|
✓ should move a file to another subfolder
|
@@ -158,14 +159,14 @@
|
|
158
159
|
✓ should move file to another dataset using wildcards
|
159
160
|
✓ should move file managing duplicates
|
160
161
|
✓ should throw if parameters are missed or wrong
|
161
|
-
✓ should move files from and to other datasets (
|
162
|
+
✓ should move files from and to other datasets (1031ms)
|
162
163
|
✓ should move the results of a find
|
163
164
|
|
164
165
|
#Paste
|
165
166
|
✓ should return the help
|
166
|
-
✓ should paste the clipboard content to a new file (
|
167
|
-
✓ should paste the clipboard content to an existent file (
|
168
|
-
✓ should paste a single field to a yml card (
|
167
|
+
✓ should paste the clipboard content to a new file (54ms)
|
168
|
+
✓ should paste the clipboard content to an existent file (77ms)
|
169
|
+
✓ should paste a single field to a yml card (41ms)
|
169
170
|
|
170
171
|
#Pwd
|
171
172
|
✓ should return the help
|
@@ -179,7 +180,7 @@
|
|
179
180
|
✓ should delete a file with one version
|
180
181
|
✓ should delete many files usign wildcards
|
181
182
|
✓ should return errors if wrong parameters
|
182
|
-
✓ should delete some versions of a file (
|
183
|
+
✓ should delete some versions of a file (1013ms)
|
183
184
|
|
184
185
|
#Shell
|
185
186
|
✓ should return the help
|
@@ -195,13 +196,13 @@
|
|
195
196
|
|
196
197
|
#Totp
|
197
198
|
✓ should return the help
|
198
|
-
✓ should totp a file to the clipboard (
|
199
|
-
✓ should read a totp secret from an image and add the totp field to the card (
|
199
|
+
✓ should totp a file to the clipboard (357ms)
|
200
|
+
✓ should read a totp secret from an image and add the totp field to the card (48ms)
|
200
201
|
✓ should read a totp secret from an image and return the secret
|
201
202
|
✓ should throw if bad image
|
202
203
|
✓ should throw if missing parameters
|
203
204
|
✓ should throw if the yaml is malformed
|
204
|
-
✓ should read a totp secret from the clipboard (
|
205
|
+
✓ should read a totp secret from the clipboard (285ms)
|
205
206
|
|
206
207
|
#Touch
|
207
208
|
✓ should return the help
|
@@ -209,6 +210,11 @@
|
|
209
210
|
✓ should create a file with content
|
210
211
|
✓ should throw if trying to create a child of a file
|
211
212
|
✓ should throw if wrong parameters
|
213
|
+
✓ should create a file and generate a wallet
|
214
|
+
New file "/folder2/file1" created.
|
215
|
+
✓ should generate 5 prefixed wallet
|
216
|
+
New file "/folder2/file1" created.
|
217
|
+
✓ should generate a wallet with mnemonic and 2 keys
|
212
218
|
|
213
219
|
#Use
|
214
220
|
✓ should return the help
|
@@ -219,7 +225,7 @@
|
|
219
225
|
|
220
226
|
#Whoami
|
221
227
|
✓ should return the help
|
222
|
-
✓ should see who am I
|
228
|
+
✓ should see who am I
|
223
229
|
|
224
230
|
#Help
|
225
231
|
✓ should return the help
|
@@ -238,86 +244,86 @@
|
|
238
244
|
|
239
245
|
#Quit
|
240
246
|
✓ should return the help
|
241
|
-
✓ should quit the chat, even if inside a room (
|
247
|
+
✓ should quit the chat, even if inside a room (50ms)
|
242
248
|
|
243
249
|
#Send
|
244
250
|
✓ should return the help
|
245
|
-
✓ should send a message to user0 (
|
251
|
+
✓ should send a message to user0 (120ms)
|
246
252
|
|
247
253
|
#Show
|
248
254
|
✓ should return the help
|
249
|
-
✓ should show history messages (
|
255
|
+
✓ should show history messages (395ms)
|
250
256
|
|
251
257
|
|
252
|
-
|
258
|
+
166 passing (25s)
|
253
259
|
1 pending
|
254
260
|
|
255
261
|
-----------------------|---------|----------|---------|---------|-----------------------------------
|
256
262
|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
|
257
263
|
-----------------------|---------|----------|---------|---------|-----------------------------------
|
258
|
-
All files | 71.
|
259
|
-
src | 59.63 | 54.79 | 55 |
|
260
|
-
Command.js | 79.66 | 78.72 | 76.92 |
|
261
|
-
PreCommand.js | 21.95 | 11.54 | 14.29 | 21.95 |
|
264
|
+
All files | 71.47 | 58.49 | 71.98 | 71.36 |
|
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-98,115
|
262
268
|
cliConfig.js | 100 | 100 | 100 | 100 |
|
263
|
-
src/commands | 81.
|
264
|
-
Alias.js | 90.54 | 77.36 | 100 | 90.41 |
|
265
|
-
Bash.js | 75 | 0 | 66.67 | 75 |
|
266
|
-
Cat.js | 98.9 | 88.89 | 100 | 98.9 |
|
267
|
-
Cd.js | 96.43 | 86.67 | 100 | 96.43 |
|
268
|
-
Chat.js | 19.51 | 0 | 16.67 | 19.51 |
|
269
|
-
Conf.js | 10.45 | 0 | 25 | 10.45 |
|
270
|
-
Contacts.js | 74.67 | 65.98 | 92.86 | 74.5 | ...
|
271
|
-
Copy.js | 94.87 | 74.51 | 100 | 94.81 |
|
272
|
-
Courier.js | 63.54 | 41.86 | 85.71 | 63.83 | ...
|
273
|
-
Ds.js | 92.54 | 82.05 | 100 | 92.42 |
|
274
|
-
Edit.js | 13.58 | 0 | 40 | 13.58 |
|
275
|
-
Export.js |
|
276
|
-
Find.js | 93.59 | 86.67 | 100 | 93.42 |
|
277
|
-
Help.js | 100 | 80 | 100 | 100 |
|
278
|
-
Import.js | 93.2 | 85.48 | 100 |
|
279
|
-
Lcat.js | 100 | 85.71 | 100 | 100 |
|
280
|
-
Lcd.js | 95.65 | 81.82 | 100 | 95.65 |
|
281
|
-
Lls.js | 95.45 | 72.73 | 100 | 95.45 |
|
282
|
-
Lpwd.js | 92.31 | 100 | 100 | 92.31 |
|
283
|
-
Ls.js | 91.3 | 75 | 100 | 90.77 |
|
284
|
-
Mkdir.js | 100 | 66.67 | 100 | 100 |
|
285
|
-
Mv.js |
|
286
|
-
Paste.js | 87.23 | 75 | 100 | 87.23 |
|
287
|
-
Pwd.js | 92.31 | 100 | 100 | 92.31 |
|
288
|
-
Quit.js | 90 | 50 | 100 | 90 |
|
289
|
-
Rm.js | 94 | 80.95 | 100 | 93.88 |
|
290
|
-
Shell.js | 88.24 | 60 | 100 | 88.24 |
|
291
|
-
Ssh.js | 25 | 0 | 40 | 25 |
|
292
|
-
Tag.js | 98.04 | 92.31 | 100 |
|
293
|
-
Totp.js | 96.47 | 74.47 | 100 | 96.47 |
|
294
|
-
Touch.js |
|
295
|
-
Use.js | 96.77 | 89.47 | 100 | 96.77 |
|
296
|
-
Ver.js | 90 | 66.67 | 100 | 90 |
|
297
|
-
Whoami.js | 93.1 | 63.64 | 80 | 93.1 |
|
298
|
-
chat.js | 85.37 | 53.85 | 100 | 85.37 |
|
299
|
-
index.js | 91.67 | 60 | 100 | 91.3 |
|
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
|
300
306
|
src/commands/chat | 79.44 | 63.29 | 92.31 | 79.33 |
|
301
|
-
Contacts.js | 80 | 42.86 | 80 | 80 |
|
302
|
-
Help.js | 86.67 | 60 | 100 | 86.67 | 38
|
303
|
-
Join.js | 95.65 | 82.61 | 100 | 95.56 |
|
304
|
-
Leave.js | 100 | 60 | 100 | 100 | 28
|
305
|
-
Quit.js | 100 | 75 | 100 | 100 |
|
306
|
-
Send.js | 67.65 | 46.67 | 100 | 67.65 |
|
307
|
-
Show.js | 68.75 | 70.59 | 100 | 68.75 |
|
308
|
-
Whoami.js | 42.86 | 0 | 60 | 42.86 |
|
309
|
-
src/prompts | 15.14 | 0 | 14.29 | 15.
|
310
|
-
ChatPrompt.js | 6.17 | 0 | 0 | 6.17 |
|
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 | 15.14 | 0 | 14.29 | 15.27 |
|
316
|
+
ChatPrompt.js | 6.17 | 0 | 0 | 6.17 | 8-163
|
311
317
|
ChatPromptMock.js | 100 | 100 | 66.67 | 100 |
|
312
|
-
CommandPrompt.js | 10.42 | 0 | 0 | 10.56 |
|
313
|
-
Completion.js | 4.41 | 0 | 0 | 4.
|
318
|
+
CommandPrompt.js | 10.42 | 0 | 0 | 10.56 | 24-296
|
319
|
+
Completion.js | 4.41 | 0 | 0 | 4.48 | 6-103
|
314
320
|
MainPromptMock.js | 100 | 100 | 66.67 | 100 |
|
315
|
-
MultiEditorPrompt.js | 25 | 0 | 0 | 25 |
|
316
|
-
SigintManager.js | 25 | 0 | 20 | 25 |
|
321
|
+
MultiEditorPrompt.js | 25 | 0 | 0 | 25 | 7-36
|
322
|
+
SigintManager.js | 25 | 0 | 20 | 25 | 10-36
|
317
323
|
src/utils | 69.92 | 63.28 | 56.25 | 69.55 |
|
318
|
-
AliasManager.js | 100 | 91.67 | 100 | 100 |
|
319
|
-
ContactManager.js | 71.43 | 60 | 85.71 | 71.43 |
|
320
|
-
Fido2Client.js | 15.38 | 0 | 11.11 | 15.38 |
|
321
|
-
HelpProto.js | 91.6 | 84.06 | 100 | 91.45 |
|
322
|
-
Logger.js | 63.64 | 56.25 | 36.84 | 62.79 | ...
|
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
|
323
329
|
-----------------------|---------|----------|---------|---------|-----------------------------------
|
package/package.json
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
{
|
2
2
|
"name": "secrez",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.3",
|
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/
|
13
|
-
"@secrez/
|
14
|
-
"@secrez/
|
10
|
+
"@secrez/core": "~1.0.4",
|
11
|
+
"@secrez/crypto": "~1.0.3",
|
12
|
+
"@secrez/eth": "~0.0.3",
|
13
|
+
"@secrez/fs": "~1.0.4",
|
14
|
+
"@secrez/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.
|
33
|
-
"@secrez/test-helpers": "~
|
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
|
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
|
}
|