@drawbridge/drawbridge-utils 0.0.139 → 0.0.140

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/dist/upload.cjs CHANGED
@@ -65,7 +65,7 @@ var resolveUploadType = (type, extension) => {
65
65
  };
66
66
  var isAllowedMime = (mime) => allowedMimes.has(mime);
67
67
  var megabyte = 1024 * 1024;
68
- var maximumUploadBytes = 2048 * megabyte;
68
+ var maximumUploadBytes = 50 * megabyte;
69
69
  var maximumParts = 9e3;
70
70
  var minimumPartSize = 10 * megabyte;
71
71
  var uploadPartSize = (bytes) => {
package/dist/upload.d.cts CHANGED
@@ -68,15 +68,17 @@ const isAllowedMime = ( mime ) => allowedMimes.has( mime );
68
68
 
69
69
  const megabyte = ( 1024 * 1024 );
70
70
 
71
- // The ceiling for a presigned multipart upload. Video streams browser-to-bucket
72
- // on that path rather than through the api, so this is a product decision
73
- // rather than the fleet-protection one that keeps the single-request busboy
74
- // route at 50MB.
71
+ // The DEFAULT ceiling for a presigned multipart upload. 50MB matches the
72
+ // single-request busboy route's video cap, and it is deliberately sized for the
73
+ // current use cases (page backgrounds, gallery clips) not for long-form
74
+ // video. A scenario that needs more (premieres) gets its own route and its own
75
+ // allotment, passing a larger cap explicitly; the shared path never inherits a
76
+ // generous ceiling by default.
75
77
  //
76
78
  // It lives here because both sides have to agree on it exactly: the dashboard
77
79
  // rejects before transferring and the api rejects authoritatively, and if the
78
80
  // two numbers drift the client blocks files the api would happily accept.
79
- const maximumUploadBytes = ( 2048 * megabyte );
81
+ const maximumUploadBytes = ( 50 * megabyte );
80
82
 
81
83
  // S3 caps a multipart upload at 10,000 parts and requires every part except the
82
84
  // last to be at least 5MB. A fixed part size therefore puts a silent ceiling on
package/dist/upload.d.ts CHANGED
@@ -68,15 +68,17 @@ const isAllowedMime = ( mime ) => allowedMimes.has( mime );
68
68
 
69
69
  const megabyte = ( 1024 * 1024 );
70
70
 
71
- // The ceiling for a presigned multipart upload. Video streams browser-to-bucket
72
- // on that path rather than through the api, so this is a product decision
73
- // rather than the fleet-protection one that keeps the single-request busboy
74
- // route at 50MB.
71
+ // The DEFAULT ceiling for a presigned multipart upload. 50MB matches the
72
+ // single-request busboy route's video cap, and it is deliberately sized for the
73
+ // current use cases (page backgrounds, gallery clips) not for long-form
74
+ // video. A scenario that needs more (premieres) gets its own route and its own
75
+ // allotment, passing a larger cap explicitly; the shared path never inherits a
76
+ // generous ceiling by default.
75
77
  //
76
78
  // It lives here because both sides have to agree on it exactly: the dashboard
77
79
  // rejects before transferring and the api rejects authoritatively, and if the
78
80
  // two numbers drift the client blocks files the api would happily accept.
79
- const maximumUploadBytes = ( 2048 * megabyte );
81
+ const maximumUploadBytes = ( 50 * megabyte );
80
82
 
81
83
  // S3 caps a multipart upload at 10,000 parts and requires every part except the
82
84
  // last to be at least 5MB. A fixed part size therefore puts a silent ceiling on
package/dist/upload.js CHANGED
@@ -36,7 +36,7 @@ var resolveUploadType = (type, extension) => {
36
36
  };
37
37
  var isAllowedMime = (mime) => allowedMimes.has(mime);
38
38
  var megabyte = 1024 * 1024;
39
- var maximumUploadBytes = 2048 * megabyte;
39
+ var maximumUploadBytes = 50 * megabyte;
40
40
  var maximumParts = 9e3;
41
41
  var minimumPartSize = 10 * megabyte;
42
42
  var uploadPartSize = (bytes) => {
package/package.json CHANGED
@@ -212,8 +212,9 @@
212
212
  "scripts": {
213
213
  "sync": ". \"$HOME/.nvm/nvm.sh\" && nvm use && npm prune && npm install && npx drawbridge-agents-sync",
214
214
  "build": ". \"$HOME/.nvm/nvm.sh\" && nvm use && tsup && node --test && npm publish",
215
- "test": ". \"$HOME/.nvm/nvm.sh\" && nvm use && node --test"
215
+ "test": ". \"$HOME/.nvm/nvm.sh\" && nvm use && node --test",
216
+ "prepublishOnly": ". \"$HOME/.nvm/nvm.sh\" && nvm use && tsup && node --test"
216
217
  },
217
218
  "types": "dist/index.d.ts",
218
- "version": "0.0.139"
219
+ "version": "0.0.140"
219
220
  }