fluncle 0.54.0 → 0.56.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 +63 -6
- package/package.json +1 -1
package/bin/fluncle.mjs
CHANGED
|
@@ -423,7 +423,7 @@ function parseVersion(version) {
|
|
|
423
423
|
var currentVersion;
|
|
424
424
|
var init_version = __esm(() => {
|
|
425
425
|
init_output();
|
|
426
|
-
currentVersion = "0.
|
|
426
|
+
currentVersion = "0.56.0".trim() ? "0.56.0".trim() : "0.1.0";
|
|
427
427
|
});
|
|
428
428
|
|
|
429
429
|
// src/update-notifier.ts
|
|
@@ -1912,7 +1912,7 @@ function parseVersion2(version) {
|
|
|
1912
1912
|
var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
|
|
1913
1913
|
var init_version2 = __esm(() => {
|
|
1914
1914
|
init_output();
|
|
1915
|
-
currentVersion2 = "0.
|
|
1915
|
+
currentVersion2 = "0.56.0".trim() ? "0.56.0".trim() : "0.1.0";
|
|
1916
1916
|
});
|
|
1917
1917
|
|
|
1918
1918
|
// src/commands/track.ts
|
|
@@ -2097,7 +2097,8 @@ __export(exports_admin_tracks, {
|
|
|
2097
2097
|
enrichQueueCommand: () => enrichQueueCommand,
|
|
2098
2098
|
contextQueueCommand: () => contextQueueCommand,
|
|
2099
2099
|
backfillLastfmCommand: () => backfillLastfmCommand,
|
|
2100
|
-
backfillDiscogsCommand: () => backfillDiscogsCommand
|
|
2100
|
+
backfillDiscogsCommand: () => backfillDiscogsCommand,
|
|
2101
|
+
backfillAlignmentCommand: () => backfillAlignmentCommand
|
|
2101
2102
|
});
|
|
2102
2103
|
async function fetchAdminTracks(options) {
|
|
2103
2104
|
const { hasContext, hasObservation, hasVideo, max, order, status } = options;
|
|
@@ -2137,7 +2138,7 @@ async function fetchAdminTracks(options) {
|
|
|
2137
2138
|
}
|
|
2138
2139
|
async function queueCommand(limit, filters = {}) {
|
|
2139
2140
|
return fetchAdminTracks({
|
|
2140
|
-
hasContext:
|
|
2141
|
+
hasContext: true,
|
|
2141
2142
|
hasObservation: filters.hasObservation,
|
|
2142
2143
|
hasVideo: false,
|
|
2143
2144
|
max: limit,
|
|
@@ -2172,6 +2173,13 @@ async function backfillDiscogsCommand(limit, dryRun, cursor) {
|
|
|
2172
2173
|
}
|
|
2173
2174
|
return adminApiPost(`/api/admin/backfill/discogs?${params.toString()}`);
|
|
2174
2175
|
}
|
|
2176
|
+
async function backfillAlignmentCommand(limit, dryRun, cursor) {
|
|
2177
|
+
const params = new URLSearchParams({ dryRun: String(dryRun), limit: String(limit) });
|
|
2178
|
+
if (cursor) {
|
|
2179
|
+
params.set("cursor", cursor);
|
|
2180
|
+
}
|
|
2181
|
+
return adminApiPost(`/api/admin/backfill/alignment?${params.toString()}`);
|
|
2182
|
+
}
|
|
2175
2183
|
async function vehiclesCommand(limit) {
|
|
2176
2184
|
const tracks = await fetchAdminTracks({ hasVideo: true, max: limit, order: "desc" });
|
|
2177
2185
|
return tracks.map((track) => ({
|
|
@@ -5428,11 +5436,11 @@ function addAdminCommands(program2) {
|
|
|
5428
5436
|
const { addCommand: addCommand3 } = await Promise.resolve().then(() => (init_add(), exports_add));
|
|
5429
5437
|
await runAdd(spotifyUrl, options, addCommand3);
|
|
5430
5438
|
});
|
|
5431
|
-
adminTracks.command("queue").description("Findings awaiting a video, oldest first (the next to film is first)").option("--limit <limit>", "Number of findings to show", "10").option("--has-context", "
|
|
5439
|
+
adminTracks.command("queue").description("Findings awaiting a video, oldest first (the next to film is first)").option("--limit <limit>", "Number of findings to show", "10").option("--has-context", "No-op: the render queue is always context-gated").option("--has-observation", "Only findings that already have a spoken observation").option("--json", "Print JSON", false).action(async (options) => {
|
|
5432
5440
|
const { queueCommand: queueCommand2 } = await Promise.resolve().then(() => (init_admin_tracks(), exports_admin_tracks));
|
|
5433
5441
|
await runAdminQueue(options, queueCommand2);
|
|
5434
5442
|
});
|
|
5435
|
-
admin.command("queue", { hidden: true }).description("Render queue (alias of `admin tracks queue`)").option("--limit <limit>", "Number of findings to show", "10").option("--has-context", "
|
|
5443
|
+
admin.command("queue", { hidden: true }).description("Render queue (alias of `admin tracks queue`)").option("--limit <limit>", "Number of findings to show", "10").option("--has-context", "No-op: the render queue is always context-gated").option("--has-observation", "Only findings that already have a spoken observation").option("--json", "Print JSON", false).action(async (options) => {
|
|
5436
5444
|
const { queueCommand: queueCommand2 } = await Promise.resolve().then(() => (init_admin_tracks(), exports_admin_tracks));
|
|
5437
5445
|
await runAdminQueue(options, queueCommand2);
|
|
5438
5446
|
});
|
|
@@ -5611,6 +5619,10 @@ function addAdminCommands(program2) {
|
|
|
5611
5619
|
const { backfillDiscogsCommand: backfillDiscogsCommand2 } = await Promise.resolve().then(() => (init_admin_tracks(), exports_admin_tracks));
|
|
5612
5620
|
await runBackfillDiscogs(options, backfillDiscogsCommand2);
|
|
5613
5621
|
});
|
|
5622
|
+
backfill.command("alignment").description("Back-fill word-level caption timings for observations rendered before timestamps (no re-render)").option("--dry-run", "Report the eligible set but align nothing", false).option("--limit <limit>", "Max observations to align", "50").option("--json", "Print JSON", false).action(async (options) => {
|
|
5623
|
+
const { backfillAlignmentCommand: backfillAlignmentCommand2 } = await Promise.resolve().then(() => (init_admin_tracks(), exports_admin_tracks));
|
|
5624
|
+
await runBackfillAlignment(options, backfillAlignmentCommand2);
|
|
5625
|
+
});
|
|
5614
5626
|
}
|
|
5615
5627
|
async function runTrackPreviewArchive(idOrLogId, options, previewArchiveUploadCommand2) {
|
|
5616
5628
|
if (!idOrLogId || !options.file || !options.source || !options.mime) {
|
|
@@ -5791,6 +5803,51 @@ async function runBackfillDiscogs(options, backfillDiscogsCommand2) {
|
|
|
5791
5803
|
console.log(` ${item.logId}: release ${item.releaseId}${master}`);
|
|
5792
5804
|
}
|
|
5793
5805
|
}
|
|
5806
|
+
async function runBackfillAlignment(options, backfillAlignmentCommand2) {
|
|
5807
|
+
const limit = parseListLimit(options.limit);
|
|
5808
|
+
const aligned = [];
|
|
5809
|
+
const empty = [];
|
|
5810
|
+
const failed = [];
|
|
5811
|
+
let cursor;
|
|
5812
|
+
let dryRun = options.dryRun;
|
|
5813
|
+
while (aligned.length + empty.length + failed.length < limit) {
|
|
5814
|
+
const remaining = limit - (aligned.length + empty.length + failed.length);
|
|
5815
|
+
const result = await backfillAlignmentCommand2(remaining, options.dryRun, cursor);
|
|
5816
|
+
dryRun = result.dryRun;
|
|
5817
|
+
aligned.push(...result.aligned);
|
|
5818
|
+
empty.push(...result.empty);
|
|
5819
|
+
failed.push(...result.failed);
|
|
5820
|
+
if (!options.json) {
|
|
5821
|
+
const verb2 = result.dryRun ? "would align" : "aligned";
|
|
5822
|
+
console.log(` \u2026${verb2} ${result.alignedCount}; ${result.emptyCount} empty; ${result.failedCount} failed`);
|
|
5823
|
+
}
|
|
5824
|
+
if (result.nextCursor === null) {
|
|
5825
|
+
break;
|
|
5826
|
+
}
|
|
5827
|
+
cursor = result.nextCursor;
|
|
5828
|
+
}
|
|
5829
|
+
if (options.json) {
|
|
5830
|
+
printJson({
|
|
5831
|
+
aligned,
|
|
5832
|
+
alignedCount: aligned.length,
|
|
5833
|
+
dryRun,
|
|
5834
|
+
empty,
|
|
5835
|
+
emptyCount: empty.length,
|
|
5836
|
+
failed,
|
|
5837
|
+
failedCount: failed.length,
|
|
5838
|
+
ok: true
|
|
5839
|
+
});
|
|
5840
|
+
return;
|
|
5841
|
+
}
|
|
5842
|
+
const verb = dryRun ? "Would align" : "Aligned";
|
|
5843
|
+
console.log(`${verb} ${aligned.length} observation(s); ${empty.length} empty; ${failed.length} failed.`);
|
|
5844
|
+
for (const logId of aligned) {
|
|
5845
|
+
console.log(` ${logId}`);
|
|
5846
|
+
}
|
|
5847
|
+
for (const item of failed) {
|
|
5848
|
+
console.log(` ${item.logId}: ${item.error}`);
|
|
5849
|
+
}
|
|
5850
|
+
}
|
|
5794
5851
|
async function runTrackVideo(idOrLogId, options, trackVideoCommand2) {
|
|
5795
5852
|
if (!idOrLogId) {
|
|
5796
5853
|
throw new Error("Missing id. Usage: fluncle admin tracks video <track_id|log_id> (--dir <dir> | --footage <file> [--footage-social <file>] [--footage-silent <file>] [--poster <file>] [--cover <file>] [--note <file>] [--composition <file>] [--props <file>] [--render <file>])");
|
package/package.json
CHANGED