secrez 1.0.4 → 1.1.1

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/LICENSE CHANGED
File without changes
package/README.md CHANGED
@@ -181,48 +181,6 @@ Running Secrez in different containers (with the `-c` option), you can set up mu
181
181
  secrez -c ~/data/secrez
182
182
  ```
183
183
 
184
- ## How to set up a Git repo for the data
185
-
186
- The best way to go is to set up a repo on your own server. If you can't do that, using a private repo on a service like GitHub is not a bad option. Let's see how you can configure it in this second case.
187
-
188
- First, you go to GitHub and create a new private repo. Don't add anything like README, Licence, etc. In the next page, GitHub will show you the command you must run to set up it locally. Here is an example, imagining that your data are in the default folder
189
-
190
- ```
191
- git --init --main-branch main
192
- git --remote-url git@github.com:sullof/jarrabish.git
193
- ```
194
-
195
- To push any change run
196
- ```
197
- git -p
198
- ```
199
- and, if you pushed changes to the repo on some other computer, to pull and merge, run
200
- ```
201
- git -P
202
- ```
203
- Notice that the lowercase `p` is an alias for `push` and the uppercase `P` for `pull`.
204
-
205
- ### What if I have a private remote repo?
206
-
207
- You should use Git anyway, to have a safe backup of your data. In this case, just run
208
- ```
209
- git --init
210
- ```
211
- to set the repo up. After, use `git -p` to commit your changes. It will allow you to reverse the data in case some critical error occurs. When you have a private repo, you can just add the remote url (see example above).
212
-
213
- If you need more, you can run commands using Shell, like
214
- ```
215
- shell "cd ~/.secrez && git log"
216
- ```
217
- However, if you like to do some reset, you should quit and run the commands directly in the shell.
218
-
219
- **Be careful when you do anything inside your container, you can irreversibly damage your data.**
220
-
221
- ### What about Mercurial or Subversion?
222
-
223
- You can use a different version control system.
224
- If you do so, though, be careful to correctly set up in the directory the equivalent of `.gitignore` to avoid pushing to the repo also data that must exist only locally.
225
-
226
184
  ## The commands
227
185
 
228
186
  ```
@@ -451,6 +409,12 @@ Secrez does not want to compete with password managers. So, don't expect in the
451
409
 
452
410
  ## History
453
411
 
412
+ __1.1.0__
413
+ * Remove `git`. If used carefully, the command was helpful, but still it is at risk of creating conflicts. After long thoughts, I disapproved my own proposal at: https://github.com/secrez/secrez/pull/163
414
+
415
+ __1.0.4__
416
+ * Fix wrong example in `import`
417
+
454
418
  __1.0.3__
455
419
  * `git` asks to quit Secrez and merge manually if there are remote changes
456
420
  * `totp` allows to add a totp code to an existing yaml file using the option `--set` (see the examples)
@@ -801,12 +765,12 @@ Thanks a lot for any contribution 😉
801
765
  -----------------------|---------|----------|---------|---------|-----------------------------------
802
766
  File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
803
767
  -----------------------|---------|----------|---------|---------|-----------------------------------
804
- All files | 69.69 | 55.82 | 71.76 | 69.62 |
768
+ All files | 71.33 | 58.19 | 71.98 | 71.28 |
805
769
  src | 59.63 | 54.79 | 55 | 61.32 |
806
770
  Command.js | 79.66 | 78.72 | 76.92 | 83.93 | 35,54-59,68,71,95
807
771
  PreCommand.js | 21.95 | 11.54 | 14.29 | 21.95 | 9-95,108
808
772
  cliConfig.js | 100 | 100 | 100 | 100 |
809
- src/commands | 78.81 | 63.22 | 89.24 | 78.6 |
773
+ src/commands | 81.58 | 66.85 | 89.95 | 81.4 |
810
774
  Alias.js | 90.54 | 77.36 | 100 | 90.41 | 85,96,118,145,149,154,164
811
775
  Bash.js | 75 | 0 | 66.67 | 75 | 20-21
812
776
  Cat.js | 98.9 | 88.89 | 100 | 98.9 | 144
@@ -820,7 +784,6 @@ All files | 69.69 | 55.82 | 71.76 | 69.62 |
820
784
  Edit.js | 13.58 | 0 | 40 | 13.58 | 78-193
821
785
  Export.js | 90.91 | 68 | 100 | 90.91 | 109,114-115,120,130,137,140
822
786
  Find.js | 93.59 | 86.67 | 100 | 93.42 | 90,153,192-196,202
823
- Git.js | 13.41 | 0 | 50 | 13.41 | 74-197
824
787
  Help.js | 100 | 80 | 100 | 100 | 30
825
788
  Import.js | 93.2 | 85.48 | 100 | 93.1 | ...06,308,321,327,369,384-390,417
826
789
  Lcat.js | 100 | 85.71 | 100 | 100 | 55
@@ -861,11 +824,11 @@ All files | 69.69 | 55.82 | 71.76 | 69.62 |
861
824
  MainPromptMock.js | 100 | 100 | 66.67 | 100 |
862
825
  MultiEditorPrompt.js | 25 | 0 | 0 | 25 | 8-35
863
826
  SigintManager.js | 25 | 0 | 20 | 25 | 11-37
864
- src/utils | 69.92 | 62.1 | 56.25 | 69.55 |
827
+ src/utils | 69.92 | 63.28 | 56.25 | 69.55 |
865
828
  AliasManager.js | 100 | 91.67 | 100 | 100 | 48
866
829
  ContactManager.js | 71.43 | 60 | 85.71 | 71.43 | 13,36-38
867
830
  Fido2Client.js | 15.38 | 0 | 11.11 | 15.38 | 15-101
868
- HelpProto.js | 91.6 | 83.08 | 100 | 91.45 | 44,137-138,155-160,179
831
+ HelpProto.js | 91.6 | 84.06 | 100 | 91.45 | 44,137-138,155-160,179
869
832
  Logger.js | 63.64 | 56.25 | 36.84 | 62.79 | ...38-50,58,66-70,75,85,89,94,107
870
833
  -----------------------|---------|----------|---------|---------|-----------------------------------
871
834
 
package/coverage.report CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- > secrez@1.0.4 test /Users/sullof/Projects/Personal/secrez/packages/secrez
2
+ > secrez@1.1.0 test /Users/francescosullo/Projects/Personal/secrez/packages/secrez
3
3
  > cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text ./node_modules/.bin/_mocha test/*.test.js test/**/*.test.js test/**/**/*.js --exit
4
4
 
5
5
 
@@ -29,10 +29,10 @@
29
29
  #Cat
30
30
  ✓ should return the help
31
31
  ✓ should show the content of a file
32
- ✓ should show either one or all the versions of a file
32
+ ✓ should show either one or all the versions of a file (1015ms)
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 (1033ms)
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 (288ms)
44
+ ✓ should run the chat if the courier is ready (173ms)
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 (431ms)
59
- ✓ should copy a string to the clipboard (267ms)
60
- ✓ should copy a card to the clipboard (984ms)
61
- ✓ should return an error if the file does not exist or is a folder (52ms)
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
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 (182ms)
68
- ✓ should set up the courier and get the default message when is already set up (174ms)
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
69
 
70
70
  #Ds
71
71
  ✓ should return the help
@@ -78,13 +78,13 @@
78
78
  ✓ should return the help
79
79
  ✓ should export a file to the current local folder
80
80
  ✓ should export a binary file to the current local folder
81
- ✓ should export an encrypted file to the current local folder (55ms)
82
- ✓ should export a file and delete it after 1 second (1210ms)
81
+ ✓ should export an encrypted file to the current local folder
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
84
 
85
85
  #Find
86
86
  ✓ should return the help
87
- ✓ should show find a string in the tree (58ms)
87
+ ✓ should show find a string in the tree (1033ms)
88
88
  ✓ should find no result without parameters
89
89
  ✓ should skip binary files from search
90
90
 
@@ -149,7 +149,7 @@
149
149
 
150
150
  #Mv
151
151
  ✓ should return the help
152
- ✓ should rename a file
152
+ ✓ should rename a file (1010ms)
153
153
  ✓ should move a file to another folder
154
154
  ✓ should move many files to another folder
155
155
  ✓ should move a file to another subfolder
@@ -158,14 +158,14 @@
158
158
  ✓ should move file to another dataset using wildcards
159
159
  ✓ should move file managing duplicates
160
160
  ✓ should throw if parameters are missed or wrong
161
- ✓ should move files from and to other datasets (51ms)
161
+ ✓ should move files from and to other datasets (1023ms)
162
162
  ✓ should move the results of a find
163
163
 
164
164
  #Paste
165
165
  ✓ should return the help
166
- ✓ should paste the clipboard content to a new file (101ms)
167
- ✓ should paste the clipboard content to an existent file (168ms)
168
- ✓ should paste a single field to a yml card (98ms)
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
169
 
170
170
  #Pwd
171
171
  ✓ should return the help
@@ -179,7 +179,7 @@
179
179
  ✓ should delete a file with one version
180
180
  ✓ should delete many files usign wildcards
181
181
  ✓ should return errors if wrong parameters
182
- ✓ should delete some versions of a file
182
+ ✓ should delete some versions of a file (1011ms)
183
183
 
184
184
  #Shell
185
185
  ✓ should return the help
@@ -195,13 +195,13 @@
195
195
 
196
196
  #Totp
197
197
  ✓ should return the help
198
- ✓ should totp a file to the clipboard (403ms)
199
- ✓ should read a totp secret from an image and add the totp field to the card (136ms)
200
- ✓ should read a totp secret from an image and return the secret (59ms)
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
201
  ✓ should throw if bad image
202
202
  ✓ should throw if missing parameters
203
- ✓ should throw if the yaml is malformed (74ms)
204
- ✓ should read a totp secret from the clipboard (168ms)
203
+ ✓ should throw if the yaml is malformed
204
+ ✓ should read a totp secret from the clipboard (101ms)
205
205
 
206
206
  #Touch
207
207
  ✓ should return the help
@@ -219,7 +219,7 @@
219
219
 
220
220
  #Whoami
221
221
  ✓ should return the help
222
- ✓ should see who am I (46ms)
222
+ ✓ should see who am I (74ms)
223
223
 
224
224
  #Help
225
225
  ✓ should return the help
@@ -230,23 +230,23 @@
230
230
  ✓ should join a chat with user0x
231
231
  ✓ should jump between chats
232
232
  ✓ should return all the users
233
- ✓ should throw if contact not found or multiple chat (67ms)
233
+ ✓ should throw if contact not found or multiple chat
234
234
 
235
235
  #Leave
236
236
  ✓ should return the help
237
237
  ✓ should leave the room
238
238
 
239
239
  #Quit
240
- ✓ should return the help (54ms)
241
- ✓ should quit the chat, even if inside a room (82ms)
240
+ ✓ should return the help
241
+ ✓ should quit the chat, even if inside a room (47ms)
242
242
 
243
243
  #Send
244
244
  ✓ should return the help
245
- ✓ should send a message to user0 (193ms)
245
+ ✓ should send a message to user0 (111ms)
246
246
 
247
247
  #Show
248
248
  ✓ should return the help
249
- ✓ should show history messages (810ms)
249
+ ✓ should show history messages (747ms)
250
250
 
251
251
 
252
252
  162 passing (28s)
@@ -255,12 +255,12 @@
255
255
  -----------------------|---------|----------|---------|---------|-----------------------------------
256
256
  File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
257
257
  -----------------------|---------|----------|---------|---------|-----------------------------------
258
- All files | 69.69 | 55.82 | 71.76 | 69.62 |
258
+ All files | 71.33 | 58.19 | 71.98 | 71.28 |
259
259
  src | 59.63 | 54.79 | 55 | 61.32 |
260
260
  Command.js | 79.66 | 78.72 | 76.92 | 83.93 | 35,54-59,68,71,95
261
261
  PreCommand.js | 21.95 | 11.54 | 14.29 | 21.95 | 9-95,108
262
262
  cliConfig.js | 100 | 100 | 100 | 100 |
263
- src/commands | 78.81 | 63.22 | 89.24 | 78.6 |
263
+ src/commands | 81.58 | 66.85 | 89.95 | 81.4 |
264
264
  Alias.js | 90.54 | 77.36 | 100 | 90.41 | 85,96,118,145,149,154,164
265
265
  Bash.js | 75 | 0 | 66.67 | 75 | 20-21
266
266
  Cat.js | 98.9 | 88.89 | 100 | 98.9 | 144
@@ -274,7 +274,6 @@ All files | 69.69 | 55.82 | 71.76 | 69.62 |
274
274
  Edit.js | 13.58 | 0 | 40 | 13.58 | 78-193
275
275
  Export.js | 90.91 | 68 | 100 | 90.91 | 109,114-115,120,130,137,140
276
276
  Find.js | 93.59 | 86.67 | 100 | 93.42 | 90,153,192-196,202
277
- Git.js | 13.41 | 0 | 50 | 13.41 | 74-197
278
277
  Help.js | 100 | 80 | 100 | 100 | 30
279
278
  Import.js | 93.2 | 85.48 | 100 | 93.1 | ...06,308,321,327,369,384-390,417
280
279
  Lcat.js | 100 | 85.71 | 100 | 100 | 55
@@ -315,10 +314,10 @@ All files | 69.69 | 55.82 | 71.76 | 69.62 |
315
314
  MainPromptMock.js | 100 | 100 | 66.67 | 100 |
316
315
  MultiEditorPrompt.js | 25 | 0 | 0 | 25 | 8-35
317
316
  SigintManager.js | 25 | 0 | 20 | 25 | 11-37
318
- src/utils | 69.92 | 62.1 | 56.25 | 69.55 |
317
+ src/utils | 69.92 | 63.28 | 56.25 | 69.55 |
319
318
  AliasManager.js | 100 | 91.67 | 100 | 100 | 48
320
319
  ContactManager.js | 71.43 | 60 | 85.71 | 71.43 | 13,36-38
321
320
  Fido2Client.js | 15.38 | 0 | 11.11 | 15.38 | 15-101
322
- HelpProto.js | 91.6 | 83.08 | 100 | 91.45 | 44,137-138,155-160,179
321
+ HelpProto.js | 91.6 | 84.06 | 100 | 91.45 | 44,137-138,155-160,179
323
322
  Logger.js | 63.64 | 56.25 | 36.84 | 62.79 | ...38-50,58,66-70,75,85,89,94,107
324
323
  -----------------------|---------|----------|---------|---------|-----------------------------------
package/package.json CHANGED
@@ -1,73 +1,73 @@
1
1
  {
2
- "name": "secrez",
3
- "version": "1.0.4",
4
- "license": "MIT",
5
- "nyc": {
6
- "include": "src",
7
- "exclude": []
8
- },
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",
15
- "case": "^1.6.3",
16
- "chalk": "^3.0.0",
17
- "clipboardy": "^2.3.0",
18
- "command-line-args": "^5.1.1",
19
- "external-editor": "^3.1.0",
20
- "fs-extra": "^9.1.0",
21
- "homedir": "^0.6.0",
22
- "inquirer": "^7.1.0",
23
- "inquirer-command-prompt": "^0.1.0",
24
- "jimp": "^0.13.0",
25
- "lodash": "^4.17.15",
26
- "otplib": "^12.0.1",
27
- "qrcode-reader": "^1.0.4",
28
- "superagent": "^5.3.1",
29
- "tiny-cli-editor": "^0.1.1"
30
- },
31
- "devDependencies": {
32
- "@secrez/courier": "~0.2.2",
33
- "@secrez/test-helpers": "~1.0.2",
34
- "chai": "^4.2.0",
35
- "chalk": "^3.0.0",
36
- "cross-env": "^7.0.2",
37
- "eslint": "^6.8.0",
38
- "eslint-plugin-node": "^11.0.0",
39
- "mocha": "^7.1.1",
40
- "nyc": "^15.1.0",
41
- "test-console": "^1.1.0"
42
- },
43
- "bin": {
44
- "secrez": "bin/secrez.js"
45
- },
46
- "preferGlobal": true,
47
- "description": "A secrets manager in times of crypto coins.",
48
- "main": "src/index.js",
49
- "repository": {
50
- "type": "git",
51
- "url": "git+https://github.com/secrez/secrez.git"
52
- },
53
- "author": {
54
- "name": "Francesco Sullo",
55
- "email": "francesco@sullo.co"
56
- },
57
- "bugs": {
58
- "url": "https://github.com/secrez/secrez/issues"
59
- },
60
- "homepage": "https://github.com/secrez/secrez#readme",
61
- "engines": {
62
- "node": ">=10.0.0"
63
- },
64
- "gitHead": "42cbc519dd2802a1e03c6203bb724c726c2bfb79",
65
- "scripts": {
66
- "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
- "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",
70
- "posttest": "nyc check-coverage --statements 65 --branches 50 --functions 65 --lines 65",
71
- "build-helpers": "cd test/helpers/os && ./build.sh"
72
- }
73
- }
2
+ "name": "secrez",
3
+ "version": "1.1.1",
4
+ "license": "MIT",
5
+ "nyc": {
6
+ "include": "src",
7
+ "exclude": []
8
+ },
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",
15
+ "case": "^1.6.3",
16
+ "chalk": "^3.0.0",
17
+ "clipboardy": "^2.3.0",
18
+ "command-line-args": "^5.1.1",
19
+ "external-editor": "^3.1.0",
20
+ "fs-extra": "^9.1.0",
21
+ "homedir": "^0.6.0",
22
+ "inquirer": "^7.1.0",
23
+ "inquirer-command-prompt": "^0.1.0",
24
+ "jimp": "^0.13.0",
25
+ "lodash": "^4.17.15",
26
+ "otplib": "^12.0.1",
27
+ "qrcode-reader": "^1.0.4",
28
+ "superagent": "^5.3.1",
29
+ "tiny-cli-editor": "^0.1.1"
30
+ },
31
+ "devDependencies": {
32
+ "@secrez/courier": "~0.2.2",
33
+ "@secrez/test-helpers": "~1.0.2",
34
+ "chai": "^4.2.0",
35
+ "chalk": "^3.0.0",
36
+ "cross-env": "^7.0.2",
37
+ "eslint": "^6.8.0",
38
+ "eslint-plugin-node": "^11.0.0",
39
+ "mocha": "^7.1.1",
40
+ "nyc": "^15.1.0",
41
+ "test-console": "^1.1.0"
42
+ },
43
+ "bin": {
44
+ "secrez": "bin/secrez.js"
45
+ },
46
+ "preferGlobal": true,
47
+ "description": "A secrets manager in times of crypto coins.",
48
+ "main": "src/index.js",
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "git+https://github.com/secrez/secrez.git"
52
+ },
53
+ "author": {
54
+ "name": "Francesco Sullo",
55
+ "email": "francesco@sullo.co"
56
+ },
57
+ "bugs": {
58
+ "url": "https://github.com/secrez/secrez/issues"
59
+ },
60
+ "homepage": "https://github.com/secrez/secrez#readme",
61
+ "engines": {
62
+ "node": ">=10.0.0"
63
+ },
64
+ "gitHead": "42cbc519dd2802a1e03c6203bb724c726c2bfb79",
65
+ "scripts": {
66
+ "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
+ "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",
70
+ "posttest": "nyc check-coverage --statements 65 --branches 50 --functions 65 --lines 65",
71
+ "build-helpers": "cd test/helpers/os && ./build.sh"
72
+ }
73
+ }
@@ -99,8 +99,8 @@ class Import extends require('../Command') {
99
99
  examples: [
100
100
  ['import seed.json', 'copies seed.json from the disk into the current directory'],
101
101
  ['import seed.json.secrez --password s8eeuhwy36534', 'imports seed.json and decrypts it using the specified password'],
102
- ['import seed.json.secrez -d', 'imports seed.json trying to decrypt it using the key shared with the contact who encrypted the data'],
103
- ['import seed.json.secrez -d --public-key Tush76/u+..... ', 'imports seed.json trying to decrypt it using a shared key generated using the specified public key'],
102
+ ['import seed.json.secrez', 'imports seed.json trying to decrypt it using the key shared with the contact who encrypted the data'],
103
+ ['import seed.json.secrez--public-key Tush76/u+..... ', 'imports seed.json trying to decrypt it using a shared key generated using the specified public key'],
104
104
  ['import -m ethKeys', 'copies ethKeys and remove it from the disk'],
105
105
  ['import -p ~/passwords', 'imports all the text files in the folder passwords'],
106
106
  ['import -b -p ~/passwords', 'imports all the files, included binaries'],
@@ -108,7 +108,7 @@ class HelpProto {
108
108
  let m = max - x
109
109
  if (example.length <= m) {
110
110
  elem = spacer + ' '.repeat(x) + example
111
- str.push(elem + ' '.repeat(tot - elem.length))
111
+ str.push(elem + ' '.repeat(tot > elem.length ? tot - elem.length : 3))
112
112
  break
113
113
  } else {
114
114
  j = -1
@@ -125,7 +125,7 @@ class HelpProto {
125
125
  }
126
126
  let good = example.substring(0, li)
127
127
  elem = spacer + ' '.repeat(x) + good
128
- str.push(elem + ' '.repeat(tot - elem.length))
128
+ str.push(elem + ' '.repeat(tot > elem.length ? tot - elem.length : 3))
129
129
  example = example.substring(li + 1)
130
130
  i++
131
131
  // console.log(i, example)