fluncle 0.81.0 → 0.82.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 +61 -3
- package/package.json +1 -1
package/bin/fluncle.mjs
CHANGED
|
@@ -558,7 +558,7 @@ function parseVersion(version) {
|
|
|
558
558
|
var currentVersion;
|
|
559
559
|
var init_version = __esm(() => {
|
|
560
560
|
init_output();
|
|
561
|
-
currentVersion = "0.
|
|
561
|
+
currentVersion = "0.82.0".trim() ? "0.82.0".trim() : "0.1.0";
|
|
562
562
|
});
|
|
563
563
|
|
|
564
564
|
// src/update-notifier.ts
|
|
@@ -2466,7 +2466,7 @@ function parseVersion2(version) {
|
|
|
2466
2466
|
var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
|
|
2467
2467
|
var init_version2 = __esm(() => {
|
|
2468
2468
|
init_output();
|
|
2469
|
-
currentVersion2 = "0.
|
|
2469
|
+
currentVersion2 = "0.82.0".trim() ? "0.82.0".trim() : "0.1.0";
|
|
2470
2470
|
});
|
|
2471
2471
|
|
|
2472
2472
|
// ../../packages/registry/src/index.ts
|
|
@@ -3385,13 +3385,24 @@ __export(exports_admin_tracks, {
|
|
|
3385
3385
|
queueCommand: () => queueCommand,
|
|
3386
3386
|
observeQueueCommand: () => observeQueueCommand,
|
|
3387
3387
|
noteQueueCommand: () => noteQueueCommand,
|
|
3388
|
+
listCommand: () => listCommand,
|
|
3388
3389
|
enrichQueueCommand: () => enrichQueueCommand,
|
|
3389
3390
|
contextQueueCommand: () => contextQueueCommand,
|
|
3390
3391
|
backfillLastfmCommand: () => backfillLastfmCommand,
|
|
3391
3392
|
backfillDiscogsCommand: () => backfillDiscogsCommand
|
|
3392
3393
|
});
|
|
3393
3394
|
async function fetchAdminTracks(options) {
|
|
3394
|
-
const {
|
|
3395
|
+
const {
|
|
3396
|
+
hasContext,
|
|
3397
|
+
hasKey,
|
|
3398
|
+
hasNote,
|
|
3399
|
+
hasObservation,
|
|
3400
|
+
hasVideo,
|
|
3401
|
+
max,
|
|
3402
|
+
order,
|
|
3403
|
+
retryEmptyContext,
|
|
3404
|
+
status
|
|
3405
|
+
} = options;
|
|
3395
3406
|
const results = [];
|
|
3396
3407
|
let cursor;
|
|
3397
3408
|
do {
|
|
@@ -3399,6 +3410,9 @@ async function fetchAdminTracks(options) {
|
|
|
3399
3410
|
if (hasVideo !== undefined) {
|
|
3400
3411
|
params.set("hasVideo", String(hasVideo));
|
|
3401
3412
|
}
|
|
3413
|
+
if (hasKey !== undefined) {
|
|
3414
|
+
params.set("hasKey", String(hasKey));
|
|
3415
|
+
}
|
|
3402
3416
|
if (hasContext !== undefined) {
|
|
3403
3417
|
params.set("hasContext", String(hasContext));
|
|
3404
3418
|
}
|
|
@@ -3432,6 +3446,13 @@ async function fetchAdminTracks(options) {
|
|
|
3432
3446
|
} while (cursor);
|
|
3433
3447
|
return results;
|
|
3434
3448
|
}
|
|
3449
|
+
async function listCommand(options) {
|
|
3450
|
+
return fetchAdminTracks({
|
|
3451
|
+
hasKey: options.hasKey,
|
|
3452
|
+
max: options.limit,
|
|
3453
|
+
order: options.order
|
|
3454
|
+
});
|
|
3455
|
+
}
|
|
3435
3456
|
async function queueCommand(limit, filters = {}) {
|
|
3436
3457
|
return fetchAdminTracks({
|
|
3437
3458
|
hasContext: true,
|
|
@@ -7612,6 +7633,10 @@ function addAdminCommands(program2) {
|
|
|
7612
7633
|
const { queueCommand: queueCommand2 } = await Promise.resolve().then(() => (init_admin_tracks(), exports_admin_tracks));
|
|
7613
7634
|
await runAdminQueue(options, queueCommand2);
|
|
7614
7635
|
});
|
|
7636
|
+
adminTracks.command("list").description("List findings, filterable by musical-key presence (--no-key / --has-key)").option("--limit <limit>", "Number of findings to show", "50").option("--no-key", "Only findings with NO stored musical key (the key-backfill backlog)").option("--has-key <bool>", "Filter by key presence: true (has key) or false (missing)").option("--order <order>", "Sort: asc (oldest first) or desc (newest first)", "desc").option("--json", "Print JSON", false).action(async (options) => {
|
|
7637
|
+
const { listCommand: listCommand2 } = await Promise.resolve().then(() => (init_admin_tracks(), exports_admin_tracks));
|
|
7638
|
+
await runAdminTracksList(options, listCommand2);
|
|
7639
|
+
});
|
|
7615
7640
|
adminTracks.command("enrich").description("Enrichment worklist (pending, failed, or stuck processing) \u2014 use --queue").option("--queue", "Show the enrichment worklist, oldest first", false).option("--limit <limit>", "Number of findings to show with --queue", "10").option("--json", "Print JSON", false).action(async (options) => {
|
|
7616
7641
|
if (!options.queue) {
|
|
7617
7642
|
console.error("`tracks enrich` is a worklist view \u2014 enrichment runs on the on-box `fluncle-enrich` cron.\nUse `tracks enrich --queue` to see findings needing (re-)enrichment.");
|
|
@@ -8566,6 +8591,39 @@ function parseListLimit(value) {
|
|
|
8566
8591
|
}
|
|
8567
8592
|
return limit;
|
|
8568
8593
|
}
|
|
8594
|
+
function resolveHasKey(options) {
|
|
8595
|
+
if (options.key === false) {
|
|
8596
|
+
return false;
|
|
8597
|
+
}
|
|
8598
|
+
if (options.hasKey === "false") {
|
|
8599
|
+
return false;
|
|
8600
|
+
}
|
|
8601
|
+
if (options.hasKey === "true") {
|
|
8602
|
+
return true;
|
|
8603
|
+
}
|
|
8604
|
+
return;
|
|
8605
|
+
}
|
|
8606
|
+
async function runAdminTracksList(options, listCommand2) {
|
|
8607
|
+
const limit = parseListLimit(options.limit);
|
|
8608
|
+
const order = options.order === "asc" ? "asc" : "desc";
|
|
8609
|
+
const hasKey = resolveHasKey(options);
|
|
8610
|
+
const tracks = await listCommand2({ hasKey, limit, order });
|
|
8611
|
+
if (options.json) {
|
|
8612
|
+
printJson({ ok: true, tracks });
|
|
8613
|
+
return;
|
|
8614
|
+
}
|
|
8615
|
+
if (tracks.length === 0) {
|
|
8616
|
+
const scope2 = hasKey === false ? " missing a key" : hasKey === true ? " with a key" : "";
|
|
8617
|
+
console.log(`No findings${scope2}.`);
|
|
8618
|
+
return;
|
|
8619
|
+
}
|
|
8620
|
+
const { trackRows: trackRows2 } = await Promise.resolve().then(() => (init_format2(), exports_format));
|
|
8621
|
+
const scope = hasKey === false ? " missing a musical key" : hasKey === true ? " with a musical key" : "";
|
|
8622
|
+
const noun = tracks.length === 1 ? "finding" : "findings";
|
|
8623
|
+
console.log(`${tracks.length} ${noun}${scope}:`);
|
|
8624
|
+
console.log(trackRows2(tracks).join(`
|
|
8625
|
+
`));
|
|
8626
|
+
}
|
|
8569
8627
|
async function runAdminQueue(options, queueCommand2) {
|
|
8570
8628
|
const limit = parseListLimit(options.limit);
|
|
8571
8629
|
const tracks = await queueCommand2(limit, {
|
package/package.json
CHANGED