fluncle 0.252.0 → 0.253.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 +67 -4
- package/package.json +1 -1
package/bin/fluncle.mjs
CHANGED
|
@@ -622,7 +622,7 @@ function parseVersion(version) {
|
|
|
622
622
|
var currentVersion;
|
|
623
623
|
var init_version = __esm(() => {
|
|
624
624
|
init_output();
|
|
625
|
-
currentVersion = "0.
|
|
625
|
+
currentVersion = "0.253.0".trim() ? "0.253.0".trim() : "0.1.0";
|
|
626
626
|
});
|
|
627
627
|
|
|
628
628
|
// src/update-notifier.ts
|
|
@@ -2335,7 +2335,7 @@ function parseVersion2(version) {
|
|
|
2335
2335
|
var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
|
|
2336
2336
|
var init_version2 = __esm(() => {
|
|
2337
2337
|
init_output();
|
|
2338
|
-
currentVersion2 = "0.
|
|
2338
|
+
currentVersion2 = "0.253.0".trim() ? "0.253.0".trim() : "0.1.0";
|
|
2339
2339
|
});
|
|
2340
2340
|
|
|
2341
2341
|
// ../../packages/registry/src/index.ts
|
|
@@ -4309,6 +4309,12 @@ async function trackRequeueVideoCommand(idOrLogId) {
|
|
|
4309
4309
|
async function trackPurgeVideoCommand(idOrLogId) {
|
|
4310
4310
|
return adminApiPost(`/api/v1/admin/tracks/${encodeURIComponent(idOrLogId)}/video/purge`);
|
|
4311
4311
|
}
|
|
4312
|
+
async function trackPinSourceCommand(idOrLogId, youtube) {
|
|
4313
|
+
return adminApiPut(`/api/v1/admin/tracks/${encodeURIComponent(idOrLogId)}/capture-source`, { youtubeVideoId: youtube });
|
|
4314
|
+
}
|
|
4315
|
+
async function trackClearSourcePinCommand(idOrLogId) {
|
|
4316
|
+
return adminApiDelete(`/api/v1/admin/tracks/${encodeURIComponent(idOrLogId)}/capture-source`);
|
|
4317
|
+
}
|
|
4312
4318
|
async function trackObserveCommand(idOrLogId, options) {
|
|
4313
4319
|
const body = { script: options.script };
|
|
4314
4320
|
if (options.voiceId !== undefined) {
|
|
@@ -11644,6 +11650,7 @@ var init_admin_catalogue = __esm(() => {
|
|
|
11644
11650
|
action: _enum([
|
|
11645
11651
|
"flagged-finding",
|
|
11646
11652
|
"not-captured",
|
|
11653
|
+
"operator-verified",
|
|
11647
11654
|
"preview-match",
|
|
11648
11655
|
"quarantined-catalogue",
|
|
11649
11656
|
"unverified"
|
|
@@ -14722,7 +14729,7 @@ var init_admin_tokens = __esm(() => {
|
|
|
14722
14729
|
});
|
|
14723
14730
|
|
|
14724
14731
|
// ../../packages/contracts/src/orpc/admin-tracks.ts
|
|
14725
|
-
var UpdateTrackBodySchema, ObserveTrackBodySchema, ContextTrackBodySchema, NoteTrackBodySchema, NoteEchoSchema, PresignVideoUploadsBodySchema, FinalizeVideoBodySchema, VideoUploadSchema, updateTrack, CaptureReconciliationKindSchema, CaptureExternalResultSchema, CaptureReceiptCoordinatesSchema, CapturePreparedTrackSchema, CaptureCommittedReceiptResultSchema, CaptureRejectedReceiptResultSchema, prepareTrackCapture, authorizeTrackCapture, commitTrackCapture, MAX_CAPTURE_PREPARE_BATCH = 12, MAX_CAPTURE_COMMIT_BATCH = 6, MAX_EMBEDDING_WRITE_BATCH = 6, EMBEDDING_DIMENSIONS = 1024, TrackWorkCapabilitiesSchema, ItemElapsedMsSchema, CapturePreparedItemSchema, prepareTrackCaptures, CaptureCommitReceiptSchema, commitTrackCaptures, updateTrackEmbeddings, observeTrack, contextTrack, noteTrack, presignTrackVideoUploads, finalizeTrackVideo, requeueVideo, purgeVideo, PublishTrackResultSchema, getTrackAdmin, listTracksAdmin, TrackWorkKindSchema, TrackWorkScopeSchema, TrackWorkItemSchema, listTrackWork, publishTrack, MixOrderStopSchema, getMixableOrder, adminTracksContract;
|
|
14732
|
+
var UpdateTrackBodySchema, ObserveTrackBodySchema, ContextTrackBodySchema, NoteTrackBodySchema, NoteEchoSchema, PresignVideoUploadsBodySchema, FinalizeVideoBodySchema, VideoUploadSchema, updateTrack, CaptureReconciliationKindSchema, CaptureExternalResultSchema, CaptureReceiptCoordinatesSchema, CapturePreparedTrackSchema, CaptureCommittedReceiptResultSchema, CaptureRejectedReceiptResultSchema, prepareTrackCapture, authorizeTrackCapture, commitTrackCapture, MAX_CAPTURE_PREPARE_BATCH = 12, MAX_CAPTURE_COMMIT_BATCH = 6, MAX_EMBEDDING_WRITE_BATCH = 6, EMBEDDING_DIMENSIONS = 1024, TrackWorkCapabilitiesSchema, ItemElapsedMsSchema, CapturePreparedItemSchema, prepareTrackCaptures, CaptureCommitReceiptSchema, commitTrackCaptures, updateTrackEmbeddings, observeTrack, contextTrack, noteTrack, presignTrackVideoUploads, finalizeTrackVideo, requeueVideo, purgeVideo, CaptureSourcePinResultSchema, pinCaptureSource, clearCaptureSource, PublishTrackResultSchema, getTrackAdmin, listTracksAdmin, TrackWorkKindSchema, TrackWorkScopeSchema, TrackWorkItemSchema, listTrackWork, publishTrack, MixOrderStopSchema, getMixableOrder, adminTracksContract;
|
|
14726
14733
|
var init_admin_tracks = __esm(() => {
|
|
14727
14734
|
init_dist3();
|
|
14728
14735
|
init_zod();
|
|
@@ -14828,7 +14835,7 @@ var init_admin_tracks = __esm(() => {
|
|
|
14828
14835
|
strictObject({
|
|
14829
14836
|
attemptedAt: string2().datetime({ offset: true }),
|
|
14830
14837
|
bytes: number2().int().min(1),
|
|
14831
|
-
captureVerification: _enum(["preview-match", "unverified"]),
|
|
14838
|
+
captureVerification: _enum(["operator-verified", "preview-match", "unverified"]),
|
|
14832
14839
|
capturedAt: string2().datetime({ offset: true }),
|
|
14833
14840
|
kind: literal("capture"),
|
|
14834
14841
|
outcome: literal("done"),
|
|
@@ -14868,6 +14875,7 @@ var init_admin_tracks = __esm(() => {
|
|
|
14868
14875
|
anchored: boolean2().optional(),
|
|
14869
14876
|
artists: array(string2().max(512)).max(64),
|
|
14870
14877
|
bpm: number2().optional(),
|
|
14878
|
+
captureSourcePin: string2().max(64).optional(),
|
|
14871
14879
|
certified: boolean2(),
|
|
14872
14880
|
durationMs: number2().int().min(1).optional(),
|
|
14873
14881
|
label: string2().max(1024).optional(),
|
|
@@ -15154,6 +15162,30 @@ var init_admin_tracks = __esm(() => {
|
|
|
15154
15162
|
ok: literal(true),
|
|
15155
15163
|
trackId: string2()
|
|
15156
15164
|
}));
|
|
15165
|
+
CaptureSourcePinResultSchema = object({
|
|
15166
|
+
captureSourcePin: string2().nullable(),
|
|
15167
|
+
captureStatus: string2(),
|
|
15168
|
+
logId: string2().nullable(),
|
|
15169
|
+
ok: literal(true),
|
|
15170
|
+
trackId: string2()
|
|
15171
|
+
}).meta({ id: "CaptureSourcePinResult" });
|
|
15172
|
+
pinCaptureSource = oc.route({
|
|
15173
|
+
method: "PUT",
|
|
15174
|
+
operationId: "pinCaptureSource",
|
|
15175
|
+
path: "/admin/tracks/{trackId}/capture-source",
|
|
15176
|
+
summary: "Pin the YouTube upload the capture sweep must download for a track",
|
|
15177
|
+
tags: ["Admin"]
|
|
15178
|
+
}).input(object({
|
|
15179
|
+
trackId: string2(),
|
|
15180
|
+
youtubeVideoId: string2().min(1).max(2048)
|
|
15181
|
+
})).output(CaptureSourcePinResultSchema);
|
|
15182
|
+
clearCaptureSource = oc.route({
|
|
15183
|
+
method: "DELETE",
|
|
15184
|
+
operationId: "clearCaptureSource",
|
|
15185
|
+
path: "/admin/tracks/{trackId}/capture-source",
|
|
15186
|
+
summary: "Clear a track's pinned capture source (the ladder runs again)",
|
|
15187
|
+
tags: ["Admin"]
|
|
15188
|
+
}).input(object({ trackId: string2() })).output(CaptureSourcePinResultSchema);
|
|
15157
15189
|
PublishTrackResultSchema = object({
|
|
15158
15190
|
addedToSpotify: boolean2(),
|
|
15159
15191
|
dryRun: boolean2(),
|
|
@@ -15231,6 +15263,7 @@ var init_admin_tracks = __esm(() => {
|
|
|
15231
15263
|
artists: array(string2()),
|
|
15232
15264
|
bpm: number2().optional(),
|
|
15233
15265
|
capturePriority: number2().nullable(),
|
|
15266
|
+
captureSourcePin: string2().optional(),
|
|
15234
15267
|
certified: boolean2(),
|
|
15235
15268
|
deezerQuery: string2().optional(),
|
|
15236
15269
|
durationMs: number2(),
|
|
@@ -15297,6 +15330,7 @@ var init_admin_tracks = __esm(() => {
|
|
|
15297
15330
|
}));
|
|
15298
15331
|
adminTracksContract = {
|
|
15299
15332
|
authorize_track_capture: authorizeTrackCapture,
|
|
15333
|
+
clear_capture_source: clearCaptureSource,
|
|
15300
15334
|
commit_track_capture: commitTrackCapture,
|
|
15301
15335
|
commit_track_captures: commitTrackCaptures,
|
|
15302
15336
|
context_track: contextTrack,
|
|
@@ -15307,6 +15341,7 @@ var init_admin_tracks = __esm(() => {
|
|
|
15307
15341
|
list_tracks_admin: listTracksAdmin,
|
|
15308
15342
|
note_track: noteTrack,
|
|
15309
15343
|
observe_track: observeTrack,
|
|
15344
|
+
pin_capture_source: pinCaptureSource,
|
|
15310
15345
|
prepare_track_capture: prepareTrackCapture,
|
|
15311
15346
|
prepare_track_captures: prepareTrackCaptures,
|
|
15312
15347
|
presign_track_video_uploads: presignTrackVideoUploads,
|
|
@@ -22183,6 +22218,13 @@ JSON field reference:
|
|
|
22183
22218
|
await Promise.resolve().then(() => init_track());
|
|
22184
22219
|
await runTrackPurgeVideo(idOrLogId, options, trackPurgeVideoCommand);
|
|
22185
22220
|
});
|
|
22221
|
+
adminTrack.command("pin-source").description("Pin the YouTube upload the capture sweep must download for a track (operator); --clear withdraws it").argument("[idOrLogId]").option("--clear", "Withdraw the pin (capture status and captured audio stay as they are)", false).option("--json", "Print JSON", false).option("--upload <url|id>", "The YouTube upload: a bare 11-char video id or a youtube.com / youtu.be URL").allowExcessArguments().action(async (idOrLogId, options) => {
|
|
22222
|
+
await Promise.resolve().then(() => init_track());
|
|
22223
|
+
await runTrackPinSource(idOrLogId, options, {
|
|
22224
|
+
clear: trackClearSourcePinCommand,
|
|
22225
|
+
pin: trackPinSourceCommand
|
|
22226
|
+
});
|
|
22227
|
+
});
|
|
22186
22228
|
adminTrack.command("draft").description("Push the video to a platform as a draft").argument("[idOrLogId]").option("--json", "Print JSON", false).option("--platform <platform>", "Publishing platform").allowExcessArguments().action(async (idOrLogId, options) => {
|
|
22187
22229
|
await Promise.resolve().then(() => init_track());
|
|
22188
22230
|
await runTrackDraft(idOrLogId, options, trackDraftCommand);
|
|
@@ -24550,6 +24592,26 @@ async function runTrackRequeueVideo(idOrLogId, options, trackRequeueVideoCommand
|
|
|
24550
24592
|
}
|
|
24551
24593
|
console.log(result.alreadyClear ? `${result.logId} already had no video. Nothing to clear.` : `Cleared the video for ${result.logId}. It's back on the render queue (and off radio until re-rendered).`);
|
|
24552
24594
|
}
|
|
24595
|
+
async function runTrackPinSource(idOrLogId, options, commands) {
|
|
24596
|
+
const usage = "Usage: fluncle admin tracks pin-source <track_id|log_id> --upload <url|id> [--json] | --clear";
|
|
24597
|
+
if (!idOrLogId) {
|
|
24598
|
+
throw new Error(`Missing id. ${usage}`);
|
|
24599
|
+
}
|
|
24600
|
+
const youtube = options.upload?.trim();
|
|
24601
|
+
if (options.clear && youtube) {
|
|
24602
|
+
throw new Error(`Pass either --upload or --clear, not both. ${usage}`);
|
|
24603
|
+
}
|
|
24604
|
+
if (!options.clear && !youtube) {
|
|
24605
|
+
throw new Error(`Missing --upload <url|id> (or --clear to withdraw the pin). ${usage}`);
|
|
24606
|
+
}
|
|
24607
|
+
const result = options.clear ? await commands.clear(idOrLogId) : await commands.pin(idOrLogId, youtube ?? "");
|
|
24608
|
+
if (options.json) {
|
|
24609
|
+
printJson(result);
|
|
24610
|
+
return;
|
|
24611
|
+
}
|
|
24612
|
+
const who = result.logId ?? result.trackId;
|
|
24613
|
+
console.log(result.captureSourcePin ? `Pinned ${who} to youtube ${result.captureSourcePin} \u2014 capture ${result.captureStatus.toUpperCase()}; the next capture tick downloads that upload, ladder skipped.` : `Cleared the capture-source pin on ${who} \u2014 capture ${result.captureStatus.toUpperCase()} untouched; the ladder runs again.`);
|
|
24614
|
+
}
|
|
24553
24615
|
async function runTrackPurgeVideo(idOrLogId, options, trackPurgeVideoCommand) {
|
|
24554
24616
|
if (!idOrLogId) {
|
|
24555
24617
|
throw new Error("Missing id. Usage: fluncle admin tracks purge-video <track_id|log_id>");
|
|
@@ -26008,6 +26070,7 @@ var stringOptions = new Set([
|
|
|
26008
26070
|
"--wall-ms",
|
|
26009
26071
|
"--window-since",
|
|
26010
26072
|
"--window-until",
|
|
26073
|
+
"--upload",
|
|
26011
26074
|
"--work-kind"
|
|
26012
26075
|
]);
|
|
26013
26076
|
var rootHelpSections = `
|
package/package.json
CHANGED