fluncle 0.125.0 → 0.127.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 +42 -21
- package/package.json +1 -1
package/bin/fluncle.mjs
CHANGED
|
@@ -462,6 +462,10 @@ function versionMatches(findingTitle, candidateTitle) {
|
|
|
462
462
|
}
|
|
463
463
|
return !candidateIsRemix;
|
|
464
464
|
}
|
|
465
|
+
function r2PublicUrl(base, key) {
|
|
466
|
+
const path2 = key.split("/").map(encodeURIComponent).join("/");
|
|
467
|
+
return `${base}/${path2}`;
|
|
468
|
+
}
|
|
465
469
|
function mixcloudSections(members) {
|
|
466
470
|
return members.filter((member) => member.startMs != null).sort((a, b) => a.startMs - b.startMs).map((member) => ({
|
|
467
471
|
artist: member.artists.join(", "),
|
|
@@ -557,7 +561,7 @@ function parseVersion(version) {
|
|
|
557
561
|
var currentVersion;
|
|
558
562
|
var init_version = __esm(() => {
|
|
559
563
|
init_output();
|
|
560
|
-
currentVersion = "0.
|
|
564
|
+
currentVersion = "0.127.0".trim() ? "0.127.0".trim() : "0.1.0";
|
|
561
565
|
});
|
|
562
566
|
|
|
563
567
|
// src/update-notifier.ts
|
|
@@ -2185,7 +2189,7 @@ function parseVersion2(version) {
|
|
|
2185
2189
|
var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
|
|
2186
2190
|
var init_version2 = __esm(() => {
|
|
2187
2191
|
init_output();
|
|
2188
|
-
currentVersion2 = "0.
|
|
2192
|
+
currentVersion2 = "0.127.0".trim() ? "0.127.0".trim() : "0.1.0";
|
|
2189
2193
|
});
|
|
2190
2194
|
|
|
2191
2195
|
// ../../packages/registry/src/index.ts
|
|
@@ -3753,6 +3757,9 @@ async function previewArchiveBackfillCommand(options) {
|
|
|
3753
3757
|
if (result.archived.length >= (options.limit ?? Number.POSITIVE_INFINITY)) {
|
|
3754
3758
|
break;
|
|
3755
3759
|
}
|
|
3760
|
+
if (track.type === "mixtape") {
|
|
3761
|
+
continue;
|
|
3762
|
+
}
|
|
3756
3763
|
if (!track.logId) {
|
|
3757
3764
|
result.skipped.push({ reason: "no_log_id", trackId: track.trackId });
|
|
3758
3765
|
continue;
|
|
@@ -4571,7 +4578,7 @@ async function resolveClipSource(clip) {
|
|
|
4571
4578
|
throw new CliError2("recording_not_staged", `Recording ${clip.recordingId} has no staged set video`);
|
|
4572
4579
|
}
|
|
4573
4580
|
return {
|
|
4574
|
-
setUrl:
|
|
4581
|
+
setUrl: r2PublicUrl(FOUND_BASE3, recording.r2Key)
|
|
4575
4582
|
};
|
|
4576
4583
|
}
|
|
4577
4584
|
async function clipCutCommand(clipId, onProgress = () => {}) {
|
|
@@ -4649,6 +4656,7 @@ async function runClipCut(options) {
|
|
|
4649
4656
|
}
|
|
4650
4657
|
var FOUND_BASE3 = "https://found.fluncle.com", CLIP_WIDTH = 1080, CLIP_HEIGHT = 1920, CLIP_CRF = 21, CLIP_MAXRATE = "10M", CLIP_BUFSIZE = "20M", CLIP_AUDIO_BITRATE = "192k", MAX_CLIP_BYTES;
|
|
4651
4658
|
var init_clips = __esm(() => {
|
|
4659
|
+
init_util();
|
|
4652
4660
|
init_api();
|
|
4653
4661
|
init_output();
|
|
4654
4662
|
MAX_CLIP_BYTES = 100 * 1024 * 1024;
|
|
@@ -8337,6 +8345,12 @@ async function runTrackNote(idOrLogId, options, trackNoteCommand2) {
|
|
|
8337
8345
|
console.log(`Authored the note for ${result.logId}:`);
|
|
8338
8346
|
console.log(` ${result.note}`);
|
|
8339
8347
|
}
|
|
8348
|
+
function printSweepJson(payload, failedCount) {
|
|
8349
|
+
printJson({ ...payload, failedCount, ok: failedCount === 0 });
|
|
8350
|
+
if (failedCount > 0) {
|
|
8351
|
+
process.exitCode = 1;
|
|
8352
|
+
}
|
|
8353
|
+
}
|
|
8340
8354
|
async function runMigratePreviewArchive(options, migratePreviewArchiveCommand2) {
|
|
8341
8355
|
const limit = options.limit === undefined ? 50 : Number.parseInt(options.limit, 10);
|
|
8342
8356
|
if (!Number.isInteger(limit) || limit < 1) {
|
|
@@ -8385,7 +8399,7 @@ async function runMigratePreviewArchive(options, migratePreviewArchiveCommand2)
|
|
|
8385
8399
|
cursor = result.nextCursor;
|
|
8386
8400
|
}
|
|
8387
8401
|
if (options.json) {
|
|
8388
|
-
|
|
8402
|
+
printSweepJson({
|
|
8389
8403
|
blocked,
|
|
8390
8404
|
copied,
|
|
8391
8405
|
copiedCount: copied.length,
|
|
@@ -8393,13 +8407,11 @@ async function runMigratePreviewArchive(options, migratePreviewArchiveCommand2)
|
|
|
8393
8407
|
deletedCount: deleted.length,
|
|
8394
8408
|
dryRun,
|
|
8395
8409
|
failed,
|
|
8396
|
-
failedCount: failed.length,
|
|
8397
8410
|
mode,
|
|
8398
|
-
ok: true,
|
|
8399
8411
|
remaining,
|
|
8400
8412
|
skipped,
|
|
8401
8413
|
skippedCount: skipped.length
|
|
8402
|
-
});
|
|
8414
|
+
}, failed.length);
|
|
8403
8415
|
return;
|
|
8404
8416
|
}
|
|
8405
8417
|
if (blocked) {
|
|
@@ -8418,6 +8430,9 @@ async function runMigratePreviewArchive(options, migratePreviewArchiveCommand2)
|
|
|
8418
8430
|
for (const item of failed) {
|
|
8419
8431
|
console.log(` FAILED ${item.trackId}: ${item.error}`);
|
|
8420
8432
|
}
|
|
8433
|
+
if (failed.length > 0) {
|
|
8434
|
+
process.exitCode = 1;
|
|
8435
|
+
}
|
|
8421
8436
|
}
|
|
8422
8437
|
async function runPreviewArchiveBackfill(options, previewArchiveBackfillCommand2) {
|
|
8423
8438
|
const limit = options.limit === undefined ? undefined : Number.parseInt(options.limit, 10);
|
|
@@ -8429,7 +8444,7 @@ async function runPreviewArchiveBackfill(options, previewArchiveBackfillCommand2
|
|
|
8429
8444
|
limit
|
|
8430
8445
|
});
|
|
8431
8446
|
if (options.json) {
|
|
8432
|
-
|
|
8447
|
+
printSweepJson({ ...result }, result.failed.length);
|
|
8433
8448
|
return;
|
|
8434
8449
|
}
|
|
8435
8450
|
const verb = result.dryRun ? "Would archive" : "Archived";
|
|
@@ -8438,6 +8453,9 @@ async function runPreviewArchiveBackfill(options, previewArchiveBackfillCommand2
|
|
|
8438
8453
|
for (const item of result.archived) {
|
|
8439
8454
|
console.log(` ${item.logId}: ${item.source}`);
|
|
8440
8455
|
}
|
|
8456
|
+
if (result.failed.length > 0) {
|
|
8457
|
+
process.exitCode = 1;
|
|
8458
|
+
}
|
|
8441
8459
|
}
|
|
8442
8460
|
async function runBackfillLastfm(options, backfillLastfmCommand2) {
|
|
8443
8461
|
const limit = parseListLimit(options.limit);
|
|
@@ -8468,17 +8486,15 @@ async function runBackfillLastfm(options, backfillLastfmCommand2) {
|
|
|
8468
8486
|
cursor = result.nextCursor;
|
|
8469
8487
|
}
|
|
8470
8488
|
if (options.json) {
|
|
8471
|
-
|
|
8489
|
+
printSweepJson({
|
|
8472
8490
|
dryRun,
|
|
8473
8491
|
failed,
|
|
8474
|
-
failedCount: failed.length,
|
|
8475
8492
|
loved,
|
|
8476
8493
|
lovedCount: loved.length,
|
|
8477
|
-
ok: true,
|
|
8478
8494
|
rateLimited: throttled,
|
|
8479
8495
|
skipped,
|
|
8480
8496
|
skippedCount: skipped.length
|
|
8481
|
-
});
|
|
8497
|
+
}, failed.length);
|
|
8482
8498
|
return;
|
|
8483
8499
|
}
|
|
8484
8500
|
const verb = dryRun ? "Would love" : "Loved";
|
|
@@ -8489,6 +8505,9 @@ async function runBackfillLastfm(options, backfillLastfmCommand2) {
|
|
|
8489
8505
|
for (const item of failed) {
|
|
8490
8506
|
console.log(` ${item.logId}: ${item.error}`);
|
|
8491
8507
|
}
|
|
8508
|
+
if (failed.length > 0) {
|
|
8509
|
+
process.exitCode = 1;
|
|
8510
|
+
}
|
|
8492
8511
|
}
|
|
8493
8512
|
async function runBackfillDiscogs(options, backfillDiscogsCommand2) {
|
|
8494
8513
|
const limit = parseListLimit(options.limit);
|
|
@@ -8563,16 +8582,14 @@ async function runBackfillArtists(options, backfillArtistsCommand2) {
|
|
|
8563
8582
|
cursor = result.nextCursor;
|
|
8564
8583
|
}
|
|
8565
8584
|
if (options.json) {
|
|
8566
|
-
|
|
8585
|
+
printSweepJson({
|
|
8567
8586
|
dryRun,
|
|
8568
8587
|
failed,
|
|
8569
|
-
failedCount: failed.length,
|
|
8570
|
-
ok: true,
|
|
8571
8588
|
skipped,
|
|
8572
8589
|
skippedCount: skipped.length,
|
|
8573
8590
|
upserted,
|
|
8574
8591
|
upsertedCount: upserted.length
|
|
8575
|
-
});
|
|
8592
|
+
}, failed.length);
|
|
8576
8593
|
return;
|
|
8577
8594
|
}
|
|
8578
8595
|
const verb = dryRun ? "Would upsert" : "Upserted";
|
|
@@ -8583,6 +8600,9 @@ async function runBackfillArtists(options, backfillArtistsCommand2) {
|
|
|
8583
8600
|
for (const item of failed) {
|
|
8584
8601
|
console.log(` ${item.logId}: ${item.error}`);
|
|
8585
8602
|
}
|
|
8603
|
+
if (failed.length > 0) {
|
|
8604
|
+
process.exitCode = 1;
|
|
8605
|
+
}
|
|
8586
8606
|
}
|
|
8587
8607
|
async function runBackfillArtistImages(options, backfillArtistImagesCommand2) {
|
|
8588
8608
|
const limit = parseListLimit(options.limit);
|
|
@@ -8608,16 +8628,14 @@ async function runBackfillArtistImages(options, backfillArtistImagesCommand2) {
|
|
|
8608
8628
|
cursor = result.nextCursor;
|
|
8609
8629
|
}
|
|
8610
8630
|
if (options.json) {
|
|
8611
|
-
|
|
8631
|
+
printSweepJson({
|
|
8612
8632
|
dryRun,
|
|
8613
8633
|
failed,
|
|
8614
|
-
failedCount: failed.length,
|
|
8615
8634
|
filled,
|
|
8616
8635
|
filledCount: filled.length,
|
|
8617
|
-
ok: true,
|
|
8618
8636
|
skipped,
|
|
8619
8637
|
skippedCount: skipped.length
|
|
8620
|
-
});
|
|
8638
|
+
}, failed.length);
|
|
8621
8639
|
return;
|
|
8622
8640
|
}
|
|
8623
8641
|
const verb = dryRun ? "Would fill" : "Filled";
|
|
@@ -8628,6 +8646,9 @@ async function runBackfillArtistImages(options, backfillArtistImagesCommand2) {
|
|
|
8628
8646
|
for (const item of failed) {
|
|
8629
8647
|
console.log(` ${item.artistId}: ${item.error}`);
|
|
8630
8648
|
}
|
|
8649
|
+
if (failed.length > 0) {
|
|
8650
|
+
process.exitCode = 1;
|
|
8651
|
+
}
|
|
8631
8652
|
}
|
|
8632
8653
|
async function runArtistResolveQueue(options, listArtistsCommand2) {
|
|
8633
8654
|
const limit = parseListLimit(options.limit);
|
|
@@ -9553,7 +9574,7 @@ async function runAdminRequeueAnalysis(options, requeueAnalysisCommand2) {
|
|
|
9553
9574
|
const max = parseRequeueAnalysisLimit(options.limit);
|
|
9554
9575
|
const result = await requeueAnalysisCommand2({ apply: options.apply === true, max });
|
|
9555
9576
|
if (options.json) {
|
|
9556
|
-
|
|
9577
|
+
printSweepJson({ ...result }, result.failed.length);
|
|
9557
9578
|
return;
|
|
9558
9579
|
}
|
|
9559
9580
|
const { coordinate: coordinate3 } = await Promise.resolve().then(() => (init_format2(), exports_format));
|
package/package.json
CHANGED