autopass 3.1.0 → 3.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.
Files changed (2) hide show
  1. package/index.js +3 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -317,6 +317,9 @@ class Autopass extends ReadyResource {
317
317
  }
318
318
 
319
319
  async add(key, value, file) {
320
+ if (file && file.byteLength > 6 * 1024 * 1024) {
321
+ throw new Error('File length should be less than 6 MB')
322
+ }
320
323
  await this.base.append(encode('@autopass/put', { key, value, file }))
321
324
  }
322
325
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autopass",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "brittle": "npx brittle test.js",