fluncle 0.149.0 → 0.151.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 +19 -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.151.0".trim() ? "0.151.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.151.0".trim() ? "0.151.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
  });
@@ -5763,6 +5766,7 @@ var exports_admin_catalogue = {};
5763
5766
  __export(exports_admin_catalogue, {
5764
5767
  verifyCaptureCommand: () => verifyCaptureCommand,
5765
5768
  setTrackDismissedCommand: () => setTrackDismissedCommand,
5769
+ requeueUnmatchedCommand: () => requeueUnmatchedCommand,
5766
5770
  listUnverifiedCapturesCommand: () => listUnverifiedCapturesCommand,
5767
5771
  forceCaptureCommand: () => forceCaptureCommand,
5768
5772
  flagWrongAudioCommand: () => flagWrongAudioCommand,
@@ -5791,6 +5795,9 @@ async function clearWrongAudioCommand(trackId) {
5791
5795
  trackId
5792
5796
  });
5793
5797
  }
5798
+ async function requeueUnmatchedCommand() {
5799
+ return adminApiPost("/api/admin/catalogue/captures/requeue-unmatched", {});
5800
+ }
5794
5801
  async function forceCaptureCommand(trackId) {
5795
5802
  return adminApiPost("/api/admin/catalogue/force-capture", {
5796
5803
  trackId
@@ -8913,6 +8920,15 @@ function addAdminCommands(program2) {
8913
8920
  }
8914
8921
  console.log(cleared ? `Kept ${trackId}. Its audio re-embeds and rejoins the ranking on the next sweep.` : `${trackId} was not quarantined \u2014 nothing to clear.`);
8915
8922
  });
8923
+ catalogue.command("requeue-unmatched").description("Re-queue terminal-unmatched captures after a matcher improvement (operator)").option("--json", "Print JSON", false).action(async (options) => {
8924
+ const { requeueUnmatchedCommand: requeueUnmatchedCommand2 } = await Promise.resolve().then(() => (init_admin_catalogue(), exports_admin_catalogue));
8925
+ const { requeued, skippedVetoed } = await requeueUnmatchedCommand2();
8926
+ if (options.json) {
8927
+ printJson({ ok: true, requeued, skippedVetoed });
8928
+ return;
8929
+ }
8930
+ console.log(`Re-queued ${requeued} unmatched capture(s) for the upgraded search ladder; ${skippedVetoed} stay terminal under the duration vetoes.`);
8931
+ });
8916
8932
  catalogue.command("flag-wrong-audio").description("Flag a finding's captured audio as the wrong recording (operator)").argument("<trackId>", "The finding's track id whose capture is wrong").option("--json", "Print JSON", false).action(async (trackId, options) => {
8917
8933
  const { flagWrongAudioCommand: flagWrongAudioCommand2 } = await Promise.resolve().then(() => (init_admin_catalogue(), exports_admin_catalogue));
8918
8934
  const { flagged } = await flagWrongAudioCommand2(trackId);
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.151.0"
35
35
  }