fluncle 0.58.0 → 0.59.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 +3 -60
- 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.59.0".trim() ? "0.59.0".trim() : "0.1.0";
|
|
427
427
|
});
|
|
428
428
|
|
|
429
429
|
// src/update-notifier.ts
|
|
@@ -1914,7 +1914,7 @@ function parseVersion2(version) {
|
|
|
1914
1914
|
var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
|
|
1915
1915
|
var init_version2 = __esm(() => {
|
|
1916
1916
|
init_output();
|
|
1917
|
-
currentVersion2 = "0.
|
|
1917
|
+
currentVersion2 = "0.59.0".trim() ? "0.59.0".trim() : "0.1.0";
|
|
1918
1918
|
});
|
|
1919
1919
|
|
|
1920
1920
|
// src/commands/track.ts
|
|
@@ -2117,8 +2117,7 @@ __export(exports_admin_tracks, {
|
|
|
2117
2117
|
enrichQueueCommand: () => enrichQueueCommand,
|
|
2118
2118
|
contextQueueCommand: () => contextQueueCommand,
|
|
2119
2119
|
backfillLastfmCommand: () => backfillLastfmCommand,
|
|
2120
|
-
backfillDiscogsCommand: () => backfillDiscogsCommand
|
|
2121
|
-
backfillAlignmentCommand: () => backfillAlignmentCommand
|
|
2120
|
+
backfillDiscogsCommand: () => backfillDiscogsCommand
|
|
2122
2121
|
});
|
|
2123
2122
|
async function fetchAdminTracks(options) {
|
|
2124
2123
|
const { hasContext, hasNote, hasObservation, hasVideo, max, order, status } = options;
|
|
@@ -2204,13 +2203,6 @@ async function backfillDiscogsCommand(limit, dryRun, cursor) {
|
|
|
2204
2203
|
}
|
|
2205
2204
|
return adminApiPost(`/api/admin/backfill/discogs?${params.toString()}`);
|
|
2206
2205
|
}
|
|
2207
|
-
async function backfillAlignmentCommand(limit, dryRun, cursor) {
|
|
2208
|
-
const params = new URLSearchParams({ dryRun: String(dryRun), limit: String(limit) });
|
|
2209
|
-
if (cursor) {
|
|
2210
|
-
params.set("cursor", cursor);
|
|
2211
|
-
}
|
|
2212
|
-
return adminApiPost(`/api/admin/backfill/alignment?${params.toString()}`);
|
|
2213
|
-
}
|
|
2214
2206
|
async function vehiclesCommand(limit) {
|
|
2215
2207
|
const tracks = await fetchAdminTracks({ hasVideo: true, max: limit, order: "desc" });
|
|
2216
2208
|
return tracks.map((track) => ({
|
|
@@ -5668,10 +5660,6 @@ function addAdminCommands(program2) {
|
|
|
5668
5660
|
const { backfillDiscogsCommand: backfillDiscogsCommand2 } = await Promise.resolve().then(() => (init_admin_tracks(), exports_admin_tracks));
|
|
5669
5661
|
await runBackfillDiscogs(options, backfillDiscogsCommand2);
|
|
5670
5662
|
});
|
|
5671
|
-
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) => {
|
|
5672
|
-
const { backfillAlignmentCommand: backfillAlignmentCommand2 } = await Promise.resolve().then(() => (init_admin_tracks(), exports_admin_tracks));
|
|
5673
|
-
await runBackfillAlignment(options, backfillAlignmentCommand2);
|
|
5674
|
-
});
|
|
5675
5663
|
}
|
|
5676
5664
|
async function runTrackPreviewArchive(idOrLogId, options, previewArchiveUploadCommand2) {
|
|
5677
5665
|
if (!idOrLogId || !options.file || !options.source || !options.mime) {
|
|
@@ -5872,51 +5860,6 @@ async function runBackfillDiscogs(options, backfillDiscogsCommand2) {
|
|
|
5872
5860
|
console.log(` ${item.logId}: release ${item.releaseId}${master}`);
|
|
5873
5861
|
}
|
|
5874
5862
|
}
|
|
5875
|
-
async function runBackfillAlignment(options, backfillAlignmentCommand2) {
|
|
5876
|
-
const limit = parseListLimit(options.limit);
|
|
5877
|
-
const aligned = [];
|
|
5878
|
-
const empty = [];
|
|
5879
|
-
const failed = [];
|
|
5880
|
-
let cursor;
|
|
5881
|
-
let dryRun = options.dryRun;
|
|
5882
|
-
while (aligned.length + empty.length + failed.length < limit) {
|
|
5883
|
-
const remaining = limit - (aligned.length + empty.length + failed.length);
|
|
5884
|
-
const result = await backfillAlignmentCommand2(remaining, options.dryRun, cursor);
|
|
5885
|
-
dryRun = result.dryRun;
|
|
5886
|
-
aligned.push(...result.aligned);
|
|
5887
|
-
empty.push(...result.empty);
|
|
5888
|
-
failed.push(...result.failed);
|
|
5889
|
-
if (!options.json) {
|
|
5890
|
-
const verb2 = result.dryRun ? "would align" : "aligned";
|
|
5891
|
-
console.log(` \u2026${verb2} ${result.alignedCount}; ${result.emptyCount} empty; ${result.failedCount} failed`);
|
|
5892
|
-
}
|
|
5893
|
-
if (result.nextCursor === null) {
|
|
5894
|
-
break;
|
|
5895
|
-
}
|
|
5896
|
-
cursor = result.nextCursor;
|
|
5897
|
-
}
|
|
5898
|
-
if (options.json) {
|
|
5899
|
-
printJson({
|
|
5900
|
-
aligned,
|
|
5901
|
-
alignedCount: aligned.length,
|
|
5902
|
-
dryRun,
|
|
5903
|
-
empty,
|
|
5904
|
-
emptyCount: empty.length,
|
|
5905
|
-
failed,
|
|
5906
|
-
failedCount: failed.length,
|
|
5907
|
-
ok: true
|
|
5908
|
-
});
|
|
5909
|
-
return;
|
|
5910
|
-
}
|
|
5911
|
-
const verb = dryRun ? "Would align" : "Aligned";
|
|
5912
|
-
console.log(`${verb} ${aligned.length} observation(s); ${empty.length} empty; ${failed.length} failed.`);
|
|
5913
|
-
for (const logId of aligned) {
|
|
5914
|
-
console.log(` ${logId}`);
|
|
5915
|
-
}
|
|
5916
|
-
for (const item of failed) {
|
|
5917
|
-
console.log(` ${item.logId}: ${item.error}`);
|
|
5918
|
-
}
|
|
5919
|
-
}
|
|
5920
5863
|
async function runTrackVideo(idOrLogId, options, trackVideoCommand2) {
|
|
5921
5864
|
if (!idOrLogId) {
|
|
5922
5865
|
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