fluncle 0.129.0 → 0.130.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 +53 -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.
|
|
564
|
+
currentVersion = "0.130.0".trim() ? "0.130.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.130.0".trim() ? "0.130.0".trim() : "0.1.0";
|
|
2193
2193
|
});
|
|
2194
2194
|
|
|
2195
2195
|
// ../../packages/registry/src/index.ts
|
|
@@ -3570,6 +3570,7 @@ var init_track2 = __esm(() => {
|
|
|
3570
3570
|
var exports_admin_tracks = {};
|
|
3571
3571
|
__export(exports_admin_tracks, {
|
|
3572
3572
|
vehiclesCommand: () => vehiclesCommand,
|
|
3573
|
+
trackWorkCommand: () => trackWorkCommand,
|
|
3573
3574
|
requeueAnalysisCommand: () => requeueAnalysisCommand,
|
|
3574
3575
|
queueCommand: () => queueCommand,
|
|
3575
3576
|
observeQueueCommand: () => observeQueueCommand,
|
|
@@ -3671,6 +3672,15 @@ async function embedQueueCommand(limit) {
|
|
|
3671
3672
|
async function captureQueueCommand(limit) {
|
|
3672
3673
|
return fetchAdminTracks({ captureQueue: true, max: limit, order: "desc" });
|
|
3673
3674
|
}
|
|
3675
|
+
async function trackWorkCommand(options) {
|
|
3676
|
+
const params = new URLSearchParams({
|
|
3677
|
+
kind: options.kind,
|
|
3678
|
+
limit: String(Math.min(Math.max(1, options.limit), 200)),
|
|
3679
|
+
scope: options.scope
|
|
3680
|
+
});
|
|
3681
|
+
const response = await adminApiGet(`/api/admin/tracks/work?${params.toString()}`);
|
|
3682
|
+
return response.tracks ?? [];
|
|
3683
|
+
}
|
|
3674
3684
|
async function requeueAnalysisCommand(options) {
|
|
3675
3685
|
const findings = await fetchAdminTracks({ max: options.max, order: "asc" });
|
|
3676
3686
|
const stale = findings.filter((track) => track.analyzedFrom !== "full");
|
|
@@ -8016,6 +8026,10 @@ function addAdminCommands(program2) {
|
|
|
8016
8026
|
const { captureQueueCommand: captureQueueCommand2 } = await Promise.resolve().then(() => (init_admin_tracks(), exports_admin_tracks));
|
|
8017
8027
|
await runAdminCaptureQueue(options, captureQueueCommand2);
|
|
8018
8028
|
});
|
|
8029
|
+
adminTracks.command("work").description("The audio pipeline's worklist for one stage, in capture-priority order").requiredOption("--kind <kind>", "Pipeline stage: analyze | capture | embed").option("--scope <scope>", "Which half of the archive: all | catalogue | findings", "all").option("--limit <limit>", "Rows to show", "10").option("--json", "Print JSON", false).action(async (options) => {
|
|
8030
|
+
const { trackWorkCommand: trackWorkCommand2 } = await Promise.resolve().then(() => (init_admin_tracks(), exports_admin_tracks));
|
|
8031
|
+
await runAdminTrackWork(options, trackWorkCommand2);
|
|
8032
|
+
});
|
|
8019
8033
|
adminTracks.command("requeue-analysis").description("Re-queue findings whose BPM/key are preview-grade (dry-run; --apply to flip)").option("--apply", "Actually flip statuses (default is a dry-run preview)", false).option("--limit <limit>", "Cap the archive walk (default: the whole archive)").option("--json", "Print JSON", false).action(async (options) => {
|
|
8020
8034
|
const { requeueAnalysisCommand: requeueAnalysisCommand2 } = await Promise.resolve().then(() => (init_admin_tracks(), exports_admin_tracks));
|
|
8021
8035
|
await runAdminRequeueAnalysis(options, requeueAnalysisCommand2);
|
|
@@ -9734,6 +9748,42 @@ async function runAdminCaptureQueue(options, captureQueueCommand2) {
|
|
|
9734
9748
|
console.log(trackRows2(tracks).join(`
|
|
9735
9749
|
`));
|
|
9736
9750
|
}
|
|
9751
|
+
var TRACK_WORK_KINDS = new Set(["analyze", "capture", "embed"]);
|
|
9752
|
+
var TRACK_WORK_SCOPES = new Set(["all", "catalogue", "findings"]);
|
|
9753
|
+
async function runAdminTrackWork(options, trackWorkCommand2) {
|
|
9754
|
+
const kind = options.kind?.trim().toLowerCase() ?? "";
|
|
9755
|
+
const scope = options.scope?.trim().toLowerCase() ?? "all";
|
|
9756
|
+
if (!TRACK_WORK_KINDS.has(kind)) {
|
|
9757
|
+
console.error(`--kind must be one of: analyze, capture, embed (got "${options.kind}")`);
|
|
9758
|
+
process.exitCode = 1;
|
|
9759
|
+
return;
|
|
9760
|
+
}
|
|
9761
|
+
if (!TRACK_WORK_SCOPES.has(scope)) {
|
|
9762
|
+
console.error(`--scope must be one of: all, catalogue, findings (got "${options.scope}")`);
|
|
9763
|
+
process.exitCode = 1;
|
|
9764
|
+
return;
|
|
9765
|
+
}
|
|
9766
|
+
const tracks = await trackWorkCommand2({
|
|
9767
|
+
kind,
|
|
9768
|
+
limit: parseListLimit(options.limit),
|
|
9769
|
+
scope
|
|
9770
|
+
});
|
|
9771
|
+
if (options.json) {
|
|
9772
|
+
printJson({ ok: true, tracks });
|
|
9773
|
+
return;
|
|
9774
|
+
}
|
|
9775
|
+
if (tracks.length === 0) {
|
|
9776
|
+
console.log(`Nothing to ${kind}. The ${scope} queue is drained.`);
|
|
9777
|
+
return;
|
|
9778
|
+
}
|
|
9779
|
+
const noun = tracks.length === 1 ? "track" : "tracks";
|
|
9780
|
+
console.log(`${tracks.length} ${noun} to ${kind} (${scope}), in drain order:`);
|
|
9781
|
+
for (const track of tracks) {
|
|
9782
|
+
const who = track.logId ?? `${track.trackId} \xB7 catalogue`;
|
|
9783
|
+
const rung = track.capturePriority === null ? "" : ` \xB7 p${track.capturePriority}`;
|
|
9784
|
+
console.log(` ${who}${rung} \u2014 ${track.artists.join(", ")} \u2014 ${track.title}`);
|
|
9785
|
+
}
|
|
9786
|
+
}
|
|
9737
9787
|
var REQUEUE_ANALYSIS_ARCHIVE_CAP = 1e6;
|
|
9738
9788
|
function parseRequeueAnalysisLimit(value) {
|
|
9739
9789
|
if (value === undefined) {
|
|
@@ -10075,6 +10125,7 @@ var stringOptions = new Set([
|
|
|
10075
10125
|
"--scheduled-for",
|
|
10076
10126
|
"--script",
|
|
10077
10127
|
"--script-file",
|
|
10128
|
+
"--scope",
|
|
10078
10129
|
"--seed",
|
|
10079
10130
|
"--soundcloud-url",
|
|
10080
10131
|
"--source",
|
package/package.json
CHANGED