fluncle 0.236.0 → 0.238.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 +22 -16
- 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.238.0".trim() ? "0.238.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.238.0".trim() ? "0.238.0".trim() : "0.1.0";
|
|
2339
2339
|
});
|
|
2340
2340
|
|
|
2341
2341
|
// ../../packages/registry/src/index.ts
|
|
@@ -10415,11 +10415,12 @@ var init_admin_artifacts = __esm(() => {
|
|
|
10415
10415
|
});
|
|
10416
10416
|
|
|
10417
10417
|
// ../../packages/contracts/src/orpc/admin-artist-rules.ts
|
|
10418
|
-
var ArtistRuleVerdictSchema, ArtistRuleSourceSchema, ArtistMbidSchema, ArtistNameSchema, ArtistRuleSchema, ArtistRuleInputSchema, AddArtistRuleInputSchema, listArtistRules, addArtistRule, updateArtistRule, removeArtistRule, adminArtistRulesContract;
|
|
10418
|
+
var ArtistRuleVerdictSchema, LabelArtistRuleVerdictSchema, ArtistRuleSourceSchema, ArtistMbidSchema, ArtistNameSchema, ArtistRuleSchema, ArtistRuleInputSchema, AddArtistRuleInputSchema, listArtistRules, addArtistRule, updateArtistRule, removeArtistRule, adminArtistRulesContract;
|
|
10419
10419
|
var init_admin_artist_rules = __esm(() => {
|
|
10420
10420
|
init_dist3();
|
|
10421
10421
|
init_zod();
|
|
10422
|
-
ArtistRuleVerdictSchema = _enum(["allow", "block"]).meta({ id: "ArtistRuleVerdict" });
|
|
10422
|
+
ArtistRuleVerdictSchema = _enum(["allow", "block", "unlisted"]).meta({ id: "ArtistRuleVerdict" });
|
|
10423
|
+
LabelArtistRuleVerdictSchema = _enum(["allow", "block"]).meta({ id: "LabelArtistRuleVerdict" });
|
|
10423
10424
|
ArtistRuleSourceSchema = _enum(["operator", "triage"]).meta({ id: "ArtistRuleSource" });
|
|
10424
10425
|
ArtistMbidSchema = string2().uuid();
|
|
10425
10426
|
ArtistNameSchema = string2().trim().min(1, "Artist name cannot be blank");
|
|
@@ -10438,10 +10439,11 @@ var init_admin_artist_rules = __esm(() => {
|
|
|
10438
10439
|
ArtistRuleInputSchema = object({
|
|
10439
10440
|
artistMbid: ArtistMbidSchema,
|
|
10440
10441
|
artistName: ArtistNameSchema,
|
|
10441
|
-
verdict:
|
|
10442
|
+
verdict: LabelArtistRuleVerdictSchema
|
|
10442
10443
|
}).meta({ id: "ArtistRuleInput" });
|
|
10443
10444
|
AddArtistRuleInputSchema = ArtistRuleInputSchema.extend({
|
|
10444
|
-
artistName: ArtistNameSchema.optional()
|
|
10445
|
+
artistName: ArtistNameSchema.optional(),
|
|
10446
|
+
verdict: ArtistRuleVerdictSchema
|
|
10445
10447
|
}).meta({ id: "AddArtistRuleInput" });
|
|
10446
10448
|
listArtistRules = oc.route({
|
|
10447
10449
|
method: "GET",
|
|
@@ -11433,7 +11435,7 @@ var init_admin_bios = __esm(() => {
|
|
|
11433
11435
|
});
|
|
11434
11436
|
|
|
11435
11437
|
// ../../packages/contracts/src/orpc/admin-catalogue.ts
|
|
11436
|
-
var CatalogueLensSchema, CapturePriorityReasonSchema, CatalogueMatchSchema, CatalogueTrackItemSchema, CatalogueSummarySchema, listCatalogueTracks, rankCatalogue, recordDemand, clearWrongAudio, requeueUnmatchedCaptures, requeueAnchor, requeueIsrcRecovery, flagWrongAudio, forceCapture, certifyTrack, setTrackDismissed, CaptureVerifyItemSchema, listUnverifiedCaptures, verifyCapture, CrawlPassSchema, CrawlPhaseInitializationSchema, CrawlPhaseInputSchema, CrawlPhaseOutputSchema, CrawlStatusSchema, crawlCatalogue, getCrawlStatus, ANCHOR_CANDIDATE_LIMIT = 100, ANCHOR_ARTIST_LIMIT = 20, ANCHOR_TEXT_MAX = 300, ANCHOR_ISRC_MAX = 64, ANCHOR_ID_MAX = 64, ANCHOR_URL_MAX = 2048, AnchorCandidateSchema, anchorTrack, DEEZER_CANDIDATE_LIMIT = 5, DEEZER_TEXT_MAX = 300, DEEZER_ISRC_MAX = 64, DEEZER_TRACK_ID_MAX = 32, DeezerIsrcCandidateSchema, resolveAnchor, resolveAnchorReview, setAnchorSearch, setAnchorApify, CaptureBudgetStateSchema, getCaptureBudget, setCaptureBudget, SpotifyAnchorBreakerStateSchema, getSpotifyAnchorBreaker, resetSpotifyAnchorBreaker, AppleBreakerStateSchema, resetAppleBreaker, adminCatalogueContract;
|
|
11438
|
+
var CatalogueLensSchema, CapturePriorityReasonSchema, CatalogueMatchSchema, CatalogueTrackItemSchema, CatalogueSummarySchema, listCatalogueTracks, rankCatalogue, recordDemand, clearWrongAudio, requeueUnmatchedCaptures, requeueAnchor, requeueIsrcRecovery, flagWrongAudio, forceCapture, certifyTrack, setTrackDismissed, CaptureVerifyItemSchema, listUnverifiedCaptures, verifyCapture, CrawlPassSchema, CrawlPhaseInitializationSchema, MAX_CRAWL_PREPARE_LIMIT = 6, CrawlPhaseInputSchema, CrawlPhaseOutputSchema, CrawlStatusSchema, crawlCatalogue, getCrawlStatus, ANCHOR_CANDIDATE_LIMIT = 100, ANCHOR_ARTIST_LIMIT = 20, ANCHOR_TEXT_MAX = 300, ANCHOR_ISRC_MAX = 64, ANCHOR_ID_MAX = 64, ANCHOR_URL_MAX = 2048, AnchorCandidateSchema, anchorTrack, DEEZER_CANDIDATE_LIMIT = 5, DEEZER_TEXT_MAX = 300, DEEZER_ISRC_MAX = 64, DEEZER_TRACK_ID_MAX = 32, DeezerIsrcCandidateSchema, resolveAnchor, resolveAnchorReview, setAnchorSearch, setAnchorApify, CaptureBudgetStateSchema, getCaptureBudget, setCaptureBudget, SpotifyAnchorBreakerStateSchema, getSpotifyAnchorBreaker, resetSpotifyAnchorBreaker, AppleBreakerStateSchema, resetAppleBreaker, adminCatalogueContract;
|
|
11437
11439
|
var init_admin_catalogue = __esm(() => {
|
|
11438
11440
|
init_dist3();
|
|
11439
11441
|
init_zod();
|
|
@@ -11678,7 +11680,7 @@ var init_admin_catalogue = __esm(() => {
|
|
|
11678
11680
|
CrawlPhaseInputSchema = discriminatedUnion("phase", [
|
|
11679
11681
|
object({ phase: literal("initialize") }),
|
|
11680
11682
|
object({
|
|
11681
|
-
limit: number2().int().min(1).max(
|
|
11683
|
+
limit: number2().int().min(1).max(MAX_CRAWL_PREPARE_LIMIT).default(2),
|
|
11682
11684
|
maxHop: number2().int().min(0).max(3).default(2),
|
|
11683
11685
|
phase: literal("prepare")
|
|
11684
11686
|
}),
|
|
@@ -11701,7 +11703,7 @@ var init_admin_catalogue = __esm(() => {
|
|
|
11701
11703
|
object({
|
|
11702
11704
|
frontierPending: number2(),
|
|
11703
11705
|
initialization: CrawlPhaseInitializationSchema,
|
|
11704
|
-
items: array(object({ nodeId: string2(), preparedToken: string2() })).max(
|
|
11706
|
+
items: array(object({ nodeId: string2(), preparedToken: string2() })).max(MAX_CRAWL_PREPARE_LIMIT),
|
|
11705
11707
|
kind: _enum(["drained", "prepared", "unavailable"]),
|
|
11706
11708
|
ok: literal(true),
|
|
11707
11709
|
phase: literal("prepare")
|
|
@@ -11748,7 +11750,8 @@ var init_admin_catalogue = __esm(() => {
|
|
|
11748
11750
|
release: number2()
|
|
11749
11751
|
}),
|
|
11750
11752
|
labelsUndecided: number2(),
|
|
11751
|
-
seedLabels: array(string2())
|
|
11753
|
+
seedLabels: array(string2()),
|
|
11754
|
+
storablePending: number2()
|
|
11752
11755
|
}).meta({ id: "CrawlStatus" });
|
|
11753
11756
|
crawlCatalogue = oc.route({
|
|
11754
11757
|
inputStructure: "detailed",
|
|
@@ -18597,8 +18600,8 @@ function artistRuleInput(artistMbid, verdict, artistName) {
|
|
|
18597
18600
|
if (!MBID_PATTERN.test(cleanMbid)) {
|
|
18598
18601
|
throw new Error("Artist MBID must be a MusicBrainz artist MBID");
|
|
18599
18602
|
}
|
|
18600
|
-
if (verdict !== "allow" && verdict !== "block") {
|
|
18601
|
-
throw new Error("Pass --verdict allow|block");
|
|
18603
|
+
if (verdict !== "allow" && verdict !== "block" && verdict !== "unlisted") {
|
|
18604
|
+
throw new Error("Pass --verdict allow|block|unlisted");
|
|
18602
18605
|
}
|
|
18603
18606
|
const cleanName = artistName?.trim();
|
|
18604
18607
|
if (artistName !== undefined && !cleanName) {
|
|
@@ -21229,8 +21232,9 @@ function labelUpdateLines(label, options) {
|
|
|
21229
21232
|
return lines;
|
|
21230
21233
|
}
|
|
21231
21234
|
var ARTIST_RULE_BOUNDARY = "Rules change what the next crawl takes. Everything already here stays.";
|
|
21232
|
-
|
|
21233
|
-
|
|
21235
|
+
var UNLISTED_RULE_BOUNDARY = "Unlisted takes the artist page down. The crawl and everything already here stay.";
|
|
21236
|
+
function artistRuleWriteLine(prefix, boundary = ARTIST_RULE_BOUNDARY) {
|
|
21237
|
+
return `${prefix} \u2014 ${boundary.charAt(0).toLowerCase()}${boundary.slice(1)}`;
|
|
21234
21238
|
}
|
|
21235
21239
|
function artistRuleLines(rules) {
|
|
21236
21240
|
if (rules.length === 0) {
|
|
@@ -22405,14 +22409,14 @@ JSON field reference:
|
|
|
22405
22409
|
await Promise.resolve().then(() => init_admin_artists2());
|
|
22406
22410
|
await runArtistsRank(options, rankArtistsCommand);
|
|
22407
22411
|
});
|
|
22408
|
-
artists.command("rule").description("
|
|
22412
|
+
artists.command("rule").description("Rule one MusicBrainz artist: what the crawl takes, or whether they get a page").argument("<artist-mbid>", "The MusicBrainz artist MBID").requiredOption("--verdict <verdict>", "The ruling: allow, block, or unlisted (no public artist page)").option("--name <name>", "Artist name (optional; the server resolves it when omitted)").option("--json", "Print JSON", false).action(async (artistMbid, options) => {
|
|
22409
22413
|
await Promise.resolve().then(() => init_admin_artists2());
|
|
22410
22414
|
const rule = await addArtistRuleCommand(artistRuleInput(artistMbid, options.verdict, options.name));
|
|
22411
22415
|
if (options.json) {
|
|
22412
22416
|
printJson({ ok: true, rule });
|
|
22413
22417
|
return;
|
|
22414
22418
|
}
|
|
22415
|
-
console.log(artistRuleWriteLine(`Rule set for ${rule.resolvedName ?? rule.artistName}: ${rule.verdict.toUpperCase()}
|
|
22419
|
+
console.log(artistRuleWriteLine(`Rule set for ${rule.resolvedName ?? rule.artistName}: ${rule.verdict.toUpperCase()}`, rule.verdict === "unlisted" ? UNLISTED_RULE_BOUNDARY : ARTIST_RULE_BOUNDARY));
|
|
22416
22420
|
});
|
|
22417
22421
|
artists.command("rules").description("List the global artist crawl rules").option("--json", "Print JSON", false).action(async (options) => {
|
|
22418
22422
|
await Promise.resolve().then(() => init_admin_artists2());
|
|
@@ -22935,6 +22939,7 @@ async function runCrawlStatus(options, crawlStatusCommand) {
|
|
|
22935
22939
|
const { frontier, frontierByKind } = result;
|
|
22936
22940
|
console.log(`Catalogue: ${result.catalogueTracks} uncertified track(s); ${result.anchorsPending} awaiting a Spotify anchor.`);
|
|
22937
22941
|
console.log(`Frontier: ${frontier.pending} pending, ${frontier.done} done, ${frontier.failed} failed, ${frontier.skipped} skipped (${frontierByKind.label} label, ${frontierByKind.artist} artist, ${frontierByKind.release} release).`);
|
|
22942
|
+
console.log(`Ready to write: ${result.storablePending} storable release node(s) claimable now.`);
|
|
22938
22943
|
console.log(`Seeds (${result.seedLabels.length}): ${result.seedLabels.join(", ") || "none enabled"}.`);
|
|
22939
22944
|
console.log(`Awaiting your ruling: ${result.labelsUndecided} label(s).`);
|
|
22940
22945
|
}
|
|
@@ -25546,6 +25551,7 @@ if (__require.main == __require.module) {
|
|
|
25546
25551
|
}
|
|
25547
25552
|
export {
|
|
25548
25553
|
ARTIST_RULE_BOUNDARY,
|
|
25554
|
+
UNLISTED_RULE_BOUNDARY,
|
|
25549
25555
|
artistRuleLines,
|
|
25550
25556
|
createProgram,
|
|
25551
25557
|
labelUpdateLines,
|
package/package.json
CHANGED