fluncle 0.149.0 → 0.150.0

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/bin/fluncle.mjs +6 -3
  2. package/package.json +1 -1
package/bin/fluncle.mjs CHANGED
@@ -561,7 +561,7 @@ function parseVersion(version) {
561
561
  var currentVersion;
562
562
  var init_version = __esm(() => {
563
563
  init_output();
564
- currentVersion = "0.149.0".trim() ? "0.149.0".trim() : "0.1.0";
564
+ currentVersion = "0.150.0".trim() ? "0.150.0".trim() : "0.1.0";
565
565
  });
566
566
 
567
567
  // src/update-notifier.ts
@@ -2189,7 +2189,7 @@ function parseVersion2(version) {
2189
2189
  var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
2190
2190
  var init_version2 = __esm(() => {
2191
2191
  init_output();
2192
- currentVersion2 = "0.149.0".trim() ? "0.149.0".trim() : "0.1.0";
2192
+ currentVersion2 = "0.150.0".trim() ? "0.150.0".trim() : "0.1.0";
2193
2193
  });
2194
2194
 
2195
2195
  // ../../packages/registry/src/index.ts
@@ -3374,14 +3374,17 @@ async function trackVideoCommand(idOrLogId, files, onProgress, options = {}) {
3374
3374
  const presign = await adminApiPost(`/api/admin/tracks/${encodeURIComponent(idOrLogId)}/video/uploads`, { fields: present.map((spec) => spec.field) });
3375
3375
  const byField = new Map(presign.uploads.map((upload) => [upload.field, upload]));
3376
3376
  const urls = {};
3377
+ const STREAM_THRESHOLD_BYTES = 8 * 1024 * 1024;
3377
3378
  for (const spec of present) {
3378
3379
  const upload = byField.get(spec.field);
3379
3380
  if (!upload) {
3380
3381
  throw new CliError2("presign_missing", `Worker did not sign an upload for ${spec.field}`);
3381
3382
  }
3382
3383
  onProgress?.(`Uploading ${spec.field} → ${upload.key}`);
3384
+ const file = Bun.file(spec.path);
3385
+ const body = file.size > STREAM_THRESHOLD_BYTES ? file : await file.arrayBuffer();
3383
3386
  const response = await fetch(upload.url, {
3384
- body: Bun.file(spec.path),
3387
+ body,
3385
3388
  headers: { "Content-Type": upload.contentType },
3386
3389
  method: "PUT"
3387
3390
  });
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  "url": "git+https://github.com/mauricekleine/fluncle.git"
32
32
  },
33
33
  "type": "module",
34
- "version": "0.149.0"
34
+ "version": "0.150.0"
35
35
  }