fluncle 0.151.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.
- package/bin/fluncle.mjs +27 -5
- 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.
|
|
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.
|
|
2192
|
+
currentVersion2 = "0.153.0".trim() ? "0.153.0".trim() : "0.1.0";
|
|
2193
2193
|
});
|
|
2194
2194
|
|
|
2195
2195
|
// ../../packages/registry/src/index.ts
|
|
@@ -5784,7 +5784,7 @@ async function catalogueRankCommand(options) {
|
|
|
5784
5784
|
}
|
|
5785
5785
|
async function catalogueListCommand(options) {
|
|
5786
5786
|
const params = new URLSearchParams;
|
|
5787
|
-
params.set("lens", options.lens
|
|
5787
|
+
params.set("lens", options.lens && CATALOGUE_LENSES.has(options.lens) ? options.lens : "ear");
|
|
5788
5788
|
if (options.limit) {
|
|
5789
5789
|
params.set("limit", options.limit);
|
|
5790
5790
|
}
|
|
@@ -5843,8 +5843,10 @@ async function crawlCatalogueCommand(limit, maxHop, dryRun) {
|
|
|
5843
5843
|
async function crawlStatusCommand() {
|
|
5844
5844
|
return adminApiGet("/api/admin/catalogue/crawl");
|
|
5845
5845
|
}
|
|
5846
|
+
var CATALOGUE_LENSES;
|
|
5846
5847
|
var init_admin_catalogue = __esm(() => {
|
|
5847
5848
|
init_api();
|
|
5849
|
+
CATALOGUE_LENSES = new Set(["capture", "dismissed", "failed", "quarantine", "unmatched"]);
|
|
5848
5850
|
});
|
|
5849
5851
|
|
|
5850
5852
|
// src/commands/admin-reach.ts
|
|
@@ -8907,7 +8909,7 @@ function addAdminCommands(program2) {
|
|
|
8907
8909
|
const { catalogueRankCommand: catalogueRankCommand2 } = await Promise.resolve().then(() => (init_admin_catalogue(), exports_admin_catalogue));
|
|
8908
8910
|
await runCatalogueRank(options, catalogueRankCommand2);
|
|
8909
8911
|
});
|
|
8910
|
-
catalogue.command("list").description("The ranked catalogue: closest to a finding (ear), next to capture, or wrong audio").option("--lens <lens>", "ear (default), capture, or
|
|
8912
|
+
catalogue.command("list").description("The ranked catalogue: closest to a finding (ear), next to capture, or wrong audio").option("--lens <lens>", "ear (default), capture, quarantine, unmatched, failed, or dismissed", "ear").option("--limit <limit>", "Rows (default 50, max 200)").option("--json", "Print JSON", false).action(async (options) => {
|
|
8911
8913
|
const { catalogueListCommand: catalogueListCommand2 } = await Promise.resolve().then(() => (init_admin_catalogue(), exports_admin_catalogue));
|
|
8912
8914
|
await runCatalogueList(options, catalogueListCommand2);
|
|
8913
8915
|
});
|
|
@@ -9383,6 +9385,18 @@ async function runBackfillLastfm(options, backfillLastfmCommand2) {
|
|
|
9383
9385
|
process.exitCode = 1;
|
|
9384
9386
|
}
|
|
9385
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
|
+
}
|
|
9386
9400
|
async function runCrawlCatalogue(options, crawlCatalogueCommand2) {
|
|
9387
9401
|
const limit = parseListLimit(options.limit);
|
|
9388
9402
|
const maxHop = Number.parseInt(options.maxHop ?? "2", 10);
|
|
@@ -9394,7 +9408,7 @@ async function runCrawlCatalogue(options, crawlCatalogueCommand2) {
|
|
|
9394
9408
|
} else {
|
|
9395
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.`);
|
|
9396
9410
|
console.log(` +${result.seeded} seed(s), +${result.nodesEnqueued} node(s) enqueued, ${result.frontierPending} pending, ${result.failed} failed.`);
|
|
9397
|
-
console.log(` ${result.anchorsFilled} Spotify anchor(s) filled.`);
|
|
9411
|
+
console.log(` ${result.anchorsFilled} Spotify anchor(s) filled${anchorOutcomeSuffix(result.anchorOutcome)}.`);
|
|
9398
9412
|
if (result.labelsDiscovered.length > 0) {
|
|
9399
9413
|
console.log(` New labels to rule on: ${result.labelsDiscovered.join(", ")} (they are NOT crawled until enabled).`);
|
|
9400
9414
|
}
|
|
@@ -9414,6 +9428,14 @@ async function runCrawlStatus(options, crawlStatusCommand2) {
|
|
|
9414
9428
|
}
|
|
9415
9429
|
const { frontier, frontierByKind } = result;
|
|
9416
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
|
+
}
|
|
9417
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).`);
|
|
9418
9440
|
console.log(`Seeds (${result.seedLabels.length}): ${result.seedLabels.join(", ") || "none enabled"}.`);
|
|
9419
9441
|
console.log(`Awaiting your ruling: ${result.labelsUndecided} label(s).`);
|
package/package.json
CHANGED