fluncle 0.237.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.
Files changed (2) hide show
  1. package/bin/fluncle.mjs +16 -12
  2. 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.237.0".trim() ? "0.237.0".trim() : "0.1.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.237.0".trim() ? "0.237.0".trim() : "0.1.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: ArtistRuleVerdictSchema
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",
@@ -18598,8 +18600,8 @@ function artistRuleInput(artistMbid, verdict, artistName) {
18598
18600
  if (!MBID_PATTERN.test(cleanMbid)) {
18599
18601
  throw new Error("Artist MBID must be a MusicBrainz artist MBID");
18600
18602
  }
18601
- if (verdict !== "allow" && verdict !== "block") {
18602
- throw new Error("Pass --verdict allow|block");
18603
+ if (verdict !== "allow" && verdict !== "block" && verdict !== "unlisted") {
18604
+ throw new Error("Pass --verdict allow|block|unlisted");
18603
18605
  }
18604
18606
  const cleanName = artistName?.trim();
18605
18607
  if (artistName !== undefined && !cleanName) {
@@ -21230,8 +21232,9 @@ function labelUpdateLines(label, options) {
21230
21232
  return lines;
21231
21233
  }
21232
21234
  var ARTIST_RULE_BOUNDARY = "Rules change what the next crawl takes. Everything already here stays.";
21233
- function artistRuleWriteLine(prefix) {
21234
- return `${prefix} \u2014 ${ARTIST_RULE_BOUNDARY.replace(/^R/, "r")}`;
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)}`;
21235
21238
  }
21236
21239
  function artistRuleLines(rules) {
21237
21240
  if (rules.length === 0) {
@@ -22406,14 +22409,14 @@ JSON field reference:
22406
22409
  await Promise.resolve().then(() => init_admin_artists2());
22407
22410
  await runArtistsRank(options, rankArtistsCommand);
22408
22411
  });
22409
- artists.command("rule").description("Always or never take one MusicBrainz artist's records (operator)").argument("<artist-mbid>", "The MusicBrainz artist MBID").requiredOption("--verdict <verdict>", "The ruling: allow or block").option("--name <name>", "Artist name (optional; the server resolves it when omitted)").option("--json", "Print JSON", false).action(async (artistMbid, options) => {
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) => {
22410
22413
  await Promise.resolve().then(() => init_admin_artists2());
22411
22414
  const rule = await addArtistRuleCommand(artistRuleInput(artistMbid, options.verdict, options.name));
22412
22415
  if (options.json) {
22413
22416
  printJson({ ok: true, rule });
22414
22417
  return;
22415
22418
  }
22416
- 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));
22417
22420
  });
22418
22421
  artists.command("rules").description("List the global artist crawl rules").option("--json", "Print JSON", false).action(async (options) => {
22419
22422
  await Promise.resolve().then(() => init_admin_artists2());
@@ -25548,6 +25551,7 @@ if (__require.main == __require.module) {
25548
25551
  }
25549
25552
  export {
25550
25553
  ARTIST_RULE_BOUNDARY,
25554
+ UNLISTED_RULE_BOUNDARY,
25551
25555
  artistRuleLines,
25552
25556
  createProgram,
25553
25557
  labelUpdateLines,
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  "url": "git+https://github.com/mauricekleine/fluncle.git"
32
32
  },
33
33
  "type": "module",
34
- "version": "0.237.0"
34
+ "version": "0.238.0"
35
35
  }