fluncle 0.170.0 → 0.171.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 +15 -6
  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.170.0".trim() ? "0.170.0".trim() : "0.1.0";
564
+ currentVersion = "0.171.0".trim() ? "0.171.0".trim() : "0.1.0";
565
565
  });
566
566
 
567
567
  // src/update-notifier.ts
@@ -2259,7 +2259,7 @@ function parseVersion2(version) {
2259
2259
  var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
2260
2260
  var init_version2 = __esm(() => {
2261
2261
  init_output();
2262
- currentVersion2 = "0.170.0".trim() ? "0.170.0".trim() : "0.1.0";
2262
+ currentVersion2 = "0.171.0".trim() ? "0.171.0".trim() : "0.1.0";
2263
2263
  });
2264
2264
 
2265
2265
  // ../../packages/registry/src/index.ts
@@ -6389,11 +6389,14 @@ var exports_admin_covers = {};
6389
6389
  __export(exports_admin_covers, {
6390
6390
  backfillCoverMastersCommand: () => backfillCoverMastersCommand
6391
6391
  });
6392
- async function backfillCoverMastersCommand(kind, limit, dryRun, cursor) {
6392
+ async function backfillCoverMastersCommand(kind, limit, dryRun, cursor, retryNone = false) {
6393
6393
  const params = new URLSearchParams({ dryRun: String(dryRun), kind, limit: String(limit) });
6394
6394
  if (cursor) {
6395
6395
  params.set("cursor", cursor);
6396
6396
  }
6397
+ if (retryNone) {
6398
+ params.set("retry", "none");
6399
+ }
6397
6400
  return adminApiPost(`/api/admin/backfill/cover-masters?${params.toString()}`);
6398
6401
  }
6399
6402
  var init_admin_covers = __esm(() => {
@@ -9632,7 +9635,7 @@ function addAdminCommands(program2) {
9632
9635
  const { backfillRecordingMbidsCommand: backfillRecordingMbidsCommand2 } = await Promise.resolve().then(() => (init_admin_tracks(), exports_admin_tracks));
9633
9636
  await runBackfillRecordingMbids(options, backfillRecordingMbidsCommand2);
9634
9637
  });
9635
- backfill.command("cover-masters").description("Resolve owned \u22641200\xB2 cover masters (album/artist) into R2").option("--kind <kind>", "Which entity to drain: album | artist", "album").option("--dry-run", "Report the eligible worklist without any fetch or write", false).option("--limit <limit>", "Max entities to process", "50").option("--json", "Print JSON", false).action(async (options) => {
9638
+ backfill.command("cover-masters").description("Resolve owned \u22641200\xB2 cover masters (album/artist) into R2").option("--kind <kind>", "Which entity to drain: album | artist", "album").option("--dry-run", "Report the eligible worklist without any fetch or write", false).option("--retry-none", "First re-queue a bounded batch of terminal none rows to pending, then run the pass", false).option("--limit <limit>", "Max entities to process", "50").option("--json", "Print JSON", false).action(async (options) => {
9636
9639
  const { backfillCoverMastersCommand: backfillCoverMastersCommand2 } = await Promise.resolve().then(() => (init_admin_covers(), exports_admin_covers));
9637
9640
  await runBackfillCoverMasters(options, backfillCoverMastersCommand2);
9638
9641
  });
@@ -10396,17 +10399,20 @@ async function runBackfillArtistImages(options, backfillArtistImagesCommand2) {
10396
10399
  async function runBackfillCoverMasters(options, backfillCoverMastersCommand2) {
10397
10400
  const limit = parseListLimit(options.limit);
10398
10401
  const kind = options.kind === "artist" ? "artist" : "album";
10402
+ const retryNone = options.retryNone ?? false;
10399
10403
  const resolved = [];
10400
10404
  const none = [];
10405
+ const requeued = [];
10401
10406
  const failed = [];
10402
10407
  let cursor;
10403
10408
  let dryRun = options.dryRun;
10404
10409
  while (resolved.length + none.length + failed.length < limit) {
10405
10410
  const remaining = limit - (resolved.length + none.length + failed.length);
10406
- const result = await backfillCoverMastersCommand2(kind, remaining, options.dryRun, cursor);
10411
+ const result = await backfillCoverMastersCommand2(kind, remaining, options.dryRun, cursor, retryNone && cursor === undefined);
10407
10412
  dryRun = result.dryRun;
10408
10413
  resolved.push(...result.resolved);
10409
10414
  none.push(...result.none);
10415
+ requeued.push(...result.requeued ?? []);
10410
10416
  failed.push(...result.failed);
10411
10417
  if (!options.json) {
10412
10418
  const verb2 = result.dryRun ? "would resolve" : "resolved";
@@ -10427,6 +10433,8 @@ async function runBackfillCoverMasters(options, backfillCoverMastersCommand2) {
10427
10433
  noneCount: none.length,
10428
10434
  ok: true,
10429
10435
  rateLimited: false,
10436
+ requeued,
10437
+ requeuedCount: requeued.length,
10430
10438
  resolved,
10431
10439
  resolvedCount: resolved.length
10432
10440
  });
@@ -10436,7 +10444,8 @@ async function runBackfillCoverMasters(options, backfillCoverMastersCommand2) {
10436
10444
  return;
10437
10445
  }
10438
10446
  const verb = dryRun ? "Would resolve" : "Resolved";
10439
- console.log(`${verb} ${resolved.length} ${kind} cover master(s); ${none.length} without a source; ${failed.length} failed.`);
10447
+ const requeuedNote = retryNone ? ` (${dryRun ? "would re-queue" : "re-queued"} ${requeued.length} from none)` : "";
10448
+ console.log(`${verb} ${resolved.length} ${kind} cover master(s); ${none.length} without a source; ${failed.length} failed${requeuedNote}.`);
10440
10449
  for (const slug of resolved) {
10441
10450
  console.log(` ${slug}`);
10442
10451
  }
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.170.0"
34
+ "version": "0.171.0"
35
35
  }