secrez 2.1.1 → 2.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.
package/README.md CHANGED
@@ -369,6 +369,10 @@ Secrez is not intended to compete with password managers, so do not expect it to
369
369
 
370
370
  ## History
371
371
 
372
+ **2.1.2**
373
+
374
+ - disable `copy` command when in headless shells
375
+
372
376
  **2.1.1**
373
377
 
374
378
  - manage missing clipboard when in headless shells
@@ -850,19 +854,19 @@ Thank you for any contributions! 😉
850
854
  --------------------|---------|----------|---------|---------|--------------------------------------
851
855
  File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
852
856
  --------------------|---------|----------|---------|---------|--------------------------------------
853
- All files | 81.09 | 67.66 | 81.15 | 80.99 |
857
+ All files | 81.09 | 67.71 | 81.15 | 80.99 |
854
858
  src | 57.84 | 53.62 | 52.63 | 58.41 |
855
859
  Command.js | 79.66 | 78.72 | 76.92 | 81.03 | 32,55-62,73,80,119
856
860
  PreCommand.js | 8.82 | 0 | 0 | 8.82 | 6-97
857
861
  cliConfig.js | 100 | 100 | 100 | 100 |
858
- src/commands | 83.73 | 69.14 | 90.64 | 83.61 |
862
+ src/commands | 83.73 | 69.2 | 90.64 | 83.61 |
859
863
  Alias.js | 90.54 | 77.35 | 100 | 90.41 | 101,112,139,169,173,180,190
860
864
  Bash.js | 75 | 0 | 66.66 | 75 | 18-19
861
865
  Cat.js | 98.9 | 88.88 | 100 | 98.9 | 152
862
866
  Cd.js | 96.42 | 86.66 | 100 | 96.42 | 44
863
867
  Conf.js | 9.09 | 0 | 20 | 9.09 | 98-500
864
868
  Contacts.js | 87.17 | 74.32 | 100 | 87.06 | ...5-141,145,165,172,184,237,250,260
865
- Copy.js | 92.94 | 73.58 | 100 | 92.85 | 114,165,182,200,216-217
869
+ Copy.js | 92.94 | 74.54 | 100 | 92.85 | 114,165,182,200,216-217
866
870
  Ds.js | 92.53 | 82.05 | 100 | 92.42 | 99,108-113,125
867
871
  Edit.js | 13.58 | 0 | 40 | 13.58 | 88-214
868
872
  Export.js | 88.11 | 70.58 | 100 | 88.11 | ...0-175,185,197-201,206,218,227,230
@@ -900,7 +904,7 @@ All files | 81.09 | 67.66 | 81.15 | 80.99 |
900
904
  Logger.js | 63.63 | 56.25 | 36.84 | 62.79 | ...25,37-49,57,65-69,74,84,88,93,105
901
905
  --------------------|---------|----------|---------|---------|--------------------------------------
902
906
 
903
- > secrez@2.1.1 posttest /Users/francescosullo/Projects/Secrez/secrez/packages/secrez
907
+ > secrez@2.1.2 posttest /Users/francescosullo/Projects/Secrez/secrez/packages/secrez
904
908
  > nyc check-coverage --statements 65 --branches 50 --functions 65 --lines 65
905
909
 
906
910
 
package/coverage.report CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- > secrez@2.1.1 test /Users/francescosullo/Projects/Secrez/secrez/packages/secrez
2
+ > secrez@2.1.2 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,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 (1020ms)
32
+ ✓ should show either one or all the versions of a file (1017ms)
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 (1030ms)
35
+ ✓ should show the content of a Yaml file (1031ms)
36
36
 
37
37
  #Cd
38
38
  ✓ should return the help
@@ -51,10 +51,10 @@
51
51
 
52
52
  #Copy
53
53
  ✓ should return the help
54
- ✓ should copy a file to the clipboard (405ms)
55
- ✓ should copy a string to the clipboard (254ms)
56
- ✓ should copy a card to the clipboard (937ms)
57
- ✓ should return an error if the file does not exist or is a folder
54
+ ✓ should copy a file to the clipboard (488ms)
55
+ ✓ should copy a string to the clipboard (271ms)
56
+ ✓ should copy a card to the clipboard (1040ms)
57
+ ✓ should return an error if the file does not exist or is a folder (60ms)
58
58
  ✓ should throw if copying to clipboard a binary files
59
59
 
60
60
  #Ds
@@ -69,14 +69,14 @@
69
69
  ✓ should export a file to the current local folder
70
70
  ✓ should export a binary file to the current local folder
71
71
  ✓ should export an encrypted file to the current local folder
72
- ✓ should export a file and delete it after 1 second (1203ms)
72
+ ✓ should export a file and delete it after 1 second (1205ms)
73
73
  ✓ should return an error if the file does not exist or is a folder
74
- ✓ should export a keystore json file if a private_key exists in the entry (718ms)
74
+ ✓ should export a keystore json file if a private_key exists in the entry (685ms)
75
75
  ✓ should export a cryptoenv file if a private_key exists in the entry
76
76
 
77
77
  #Find
78
78
  ✓ should return the help
79
- ✓ should show find a string in the tree (1017ms)
79
+ ✓ should show find a string in the tree (1020ms)
80
80
  ✓ should find no result without parameters
81
81
  ✓ should skip binary files from search
82
82
 
@@ -141,7 +141,7 @@
141
141
 
142
142
  #Mv
143
143
  ✓ should return the help
144
- ✓ should rename a file (1013ms)
144
+ ✓ should rename a file (1014ms)
145
145
  ✓ should move a file to another folder
146
146
  ✓ should move many files to another folder
147
147
  ✓ should move a file to another subfolder
@@ -150,14 +150,14 @@
150
150
  ✓ should move file to another dataset using wildcards
151
151
  ✓ should move file managing duplicates
152
152
  ✓ should throw if parameters are missed or wrong
153
- ✓ should move files from and to other datasets (1030ms)
153
+ ✓ should move files from and to other datasets (1033ms)
154
154
  ✓ should move the results of a find
155
155
 
156
156
  #Paste
157
157
  ✓ should return the help
158
158
  ✓ should paste the clipboard content to a new file (52ms)
159
- ✓ should paste the clipboard content to an existent file (77ms)
160
- ✓ should paste a single field to a yml card (38ms)
159
+ ✓ should paste the clipboard content to an existent file (76ms)
160
+ ✓ should paste a single field to a yml card (39ms)
161
161
 
162
162
  #Pwd
163
163
  ✓ should return the help
@@ -171,7 +171,7 @@
171
171
  ✓ should delete a file with one version
172
172
  ✓ should delete many files usign wildcards
173
173
  ✓ should return errors if wrong parameters
174
- ✓ should delete some versions of a file (1010ms)
174
+ ✓ should delete some versions of a file (1014ms)
175
175
 
176
176
  #Shell
177
177
  ✓ should return the help
@@ -191,13 +191,13 @@
191
191
 
192
192
  #Totp
193
193
  ✓ should return the help
194
- ✓ should totp a file to the clipboard (425ms)
195
- ✓ should read a totp secret from an image and add the totp field to the card (39ms)
194
+ ✓ should totp a file to the clipboard (421ms)
195
+ ✓ should read a totp secret from an image and add the totp field to the card (40ms)
196
196
  ✓ should read a totp secret from an image and return the secret
197
197
  ✓ should throw if bad image
198
198
  ✓ should throw if missing parameters
199
199
  ✓ should throw if the yaml is malformed
200
- ✓ should read a totp secret from the clipboard (115ms)
200
+ ✓ should read a totp secret from the clipboard (215ms)
201
201
 
202
202
  #Touch
203
203
  ✓ should return the help
@@ -207,7 +207,7 @@
207
207
  ✓ should throw if wrong parameters
208
208
  ✓ should create a file and generate a wallet
209
209
  New file "/folder2/file1" created.
210
- ✓ should generate 5 prefixed wallet (63ms)
210
+ ✓ should generate 5 prefixed wallet (65ms)
211
211
  New file "/folder2/file1" created.
212
212
  ✓ should generate a wallet with mnemonic and 2 keys
213
213
 
@@ -229,19 +229,19 @@ New file "/folder2/file1" created.
229
229
  --------------------|---------|----------|---------|---------|--------------------------------------
230
230
  File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
231
231
  --------------------|---------|----------|---------|---------|--------------------------------------
232
- All files | 81.09 | 67.66 | 81.15 | 80.99 |
232
+ All files | 81.09 | 67.71 | 81.15 | 80.99 |
233
233
  src | 57.84 | 53.62 | 52.63 | 58.41 |
234
234
  Command.js | 79.66 | 78.72 | 76.92 | 81.03 | 32,55-62,73,80,119
235
235
  PreCommand.js | 8.82 | 0 | 0 | 8.82 | 6-97
236
236
  cliConfig.js | 100 | 100 | 100 | 100 |
237
- src/commands | 83.73 | 69.14 | 90.64 | 83.61 |
237
+ src/commands | 83.73 | 69.2 | 90.64 | 83.61 |
238
238
  Alias.js | 90.54 | 77.35 | 100 | 90.41 | 101,112,139,169,173,180,190
239
239
  Bash.js | 75 | 0 | 66.66 | 75 | 18-19
240
240
  Cat.js | 98.9 | 88.88 | 100 | 98.9 | 152
241
241
  Cd.js | 96.42 | 86.66 | 100 | 96.42 | 44
242
242
  Conf.js | 9.09 | 0 | 20 | 9.09 | 98-500
243
243
  Contacts.js | 87.17 | 74.32 | 100 | 87.06 | ...5-141,145,165,172,184,237,250,260
244
- Copy.js | 92.94 | 73.58 | 100 | 92.85 | 114,165,182,200,216-217
244
+ Copy.js | 92.94 | 74.54 | 100 | 92.85 | 114,165,182,200,216-217
245
245
  Ds.js | 92.53 | 82.05 | 100 | 92.42 | 99,108-113,125
246
246
  Edit.js | 13.58 | 0 | 40 | 13.58 | 88-214
247
247
  Export.js | 88.11 | 70.58 | 100 | 88.11 | ...0-175,185,197-201,206,218,227,230
@@ -279,6 +279,6 @@ All files | 81.09 | 67.66 | 81.15 | 80.99 |
279
279
  Logger.js | 63.63 | 56.25 | 36.84 | 62.79 | ...25,37-49,57,65-69,74,84,88,93,105
280
280
  --------------------|---------|----------|---------|---------|--------------------------------------
281
281
 
282
- > secrez@2.1.1 posttest /Users/francescosullo/Projects/Secrez/secrez/packages/secrez
282
+ > secrez@2.1.2 posttest /Users/francescosullo/Projects/Secrez/secrez/packages/secrez
283
283
  > nyc check-coverage --statements 65 --branches 50 --functions 65 --lines 65
284
284
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secrez",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "license": "MIT",
5
5
  "nyc": {
6
6
  "include": "src",
@@ -242,7 +242,7 @@ class Copy extends require("../Command") {
242
242
  }
243
243
  try {
244
244
  /* istanbul ignore if */
245
- if (!this.clipboardyVerified) {
245
+ if (this.isMacGuiSession() && !this.clipboardyVerified) {
246
246
  await clipboardy.read();
247
247
  }
248
248
  this.validate(options);