fluncle 0.152.0 → 0.153.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 +23 -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.152.0".trim() ? "0.152.0".trim() : "0.1.0";
564
+ currentVersion = "0.153.0".trim() ? "0.153.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.152.0".trim() ? "0.152.0".trim() : "0.1.0";
2192
+ currentVersion2 = "0.153.0".trim() ? "0.153.0".trim() : "0.1.0";
2193
2193
  });
2194
2194
 
2195
2195
  // ../../packages/registry/src/index.ts
@@ -9385,6 +9385,18 @@ async function runBackfillLastfm(options, backfillLastfmCommand2) {
9385
9385
  process.exitCode = 1;
9386
9386
  }
9387
9387
  }
9388
+ function anchorOutcomeSuffix(outcome) {
9389
+ switch (outcome) {
9390
+ case "throttled":
9391
+ return " (Spotify throttled the fill; the anchor breaker is pacing it)";
9392
+ case "unauthorized":
9393
+ return " (Spotify grant is gone \u2014 reconnect Spotify from /admin to resume anchoring)";
9394
+ case "breaker_open":
9395
+ return " (anchor fill PAUSED on its breaker; it resumes after the cooldown)";
9396
+ default:
9397
+ return "";
9398
+ }
9399
+ }
9388
9400
  async function runCrawlCatalogue(options, crawlCatalogueCommand2) {
9389
9401
  const limit = parseListLimit(options.limit);
9390
9402
  const maxHop = Number.parseInt(options.maxHop ?? "2", 10);
@@ -9396,7 +9408,7 @@ async function runCrawlCatalogue(options, crawlCatalogueCommand2) {
9396
9408
  } else {
9397
9409
  console.log(`Expanded ${result.expanded} node(s) at hop \u2264 ${result.maxHop}: ${result.tracksFound} track(s) found, ${result.tracksWritten} written, ${result.tracksSkipped} already held.`);
9398
9410
  console.log(` +${result.seeded} seed(s), +${result.nodesEnqueued} node(s) enqueued, ${result.frontierPending} pending, ${result.failed} failed.`);
9399
- console.log(` ${result.anchorsFilled} Spotify anchor(s) filled.`);
9411
+ console.log(` ${result.anchorsFilled} Spotify anchor(s) filled${anchorOutcomeSuffix(result.anchorOutcome)}.`);
9400
9412
  if (result.labelsDiscovered.length > 0) {
9401
9413
  console.log(` New labels to rule on: ${result.labelsDiscovered.join(", ")} (they are NOT crawled until enabled).`);
9402
9414
  }
@@ -9416,6 +9428,14 @@ async function runCrawlStatus(options, crawlStatusCommand2) {
9416
9428
  }
9417
9429
  const { frontier, frontierByKind } = result;
9418
9430
  console.log(`Catalogue: ${result.catalogueTracks} uncertified track(s); ${result.anchorsPending} awaiting a Spotify anchor.`);
9431
+ const { spotifyAnchor } = result;
9432
+ if (spotifyAnchor.tripped) {
9433
+ const mins = Math.ceil(spotifyAnchor.cooldownRemainingMs / 60000);
9434
+ const why = spotifyAnchor.reason === "unauthorized" ? "the Spotify grant is gone \u2014 reconnect Spotify from /admin to resume anchoring" : "Spotify is throttling the app \u2014 it self-heals when the throttle lifts";
9435
+ console.log(` Spotify anchor PAUSED (${why}); breaker cools in ~${mins} min.`);
9436
+ } else if (spotifyAnchor.consecutiveFailures > 0) {
9437
+ console.log(` Spotify anchor wobbling (${spotifyAnchor.consecutiveFailures} failing pass(es); reason: ${spotifyAnchor.reason ?? "unknown"}).`);
9438
+ }
9419
9439
  console.log(`Frontier: ${frontier.pending} pending, ${frontier.done} done, ${frontier.failed} failed, ${frontier.skipped} skipped (${frontierByKind.label} label, ${frontierByKind.artist} artist, ${frontierByKind.release} release).`);
9420
9440
  console.log(`Seeds (${result.seedLabels.length}): ${result.seedLabels.join(", ") || "none enabled"}.`);
9421
9441
  console.log(`Awaiting your ruling: ${result.labelsUndecided} label(s).`);
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.152.0"
34
+ "version": "0.153.0"
35
35
  }