fluncle 0.193.0 → 0.194.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 +28 -3
- package/package.json +1 -1
package/bin/fluncle.mjs
CHANGED
|
@@ -561,7 +561,7 @@ function parseVersion(version) {
|
|
|
561
561
|
var currentVersion;
|
|
562
562
|
var init_version = __esm(() => {
|
|
563
563
|
init_output();
|
|
564
|
-
currentVersion = "0.
|
|
564
|
+
currentVersion = "0.194.0".trim() ? "0.194.0".trim() : "0.1.0";
|
|
565
565
|
});
|
|
566
566
|
|
|
567
567
|
// src/update-notifier.ts
|
|
@@ -2443,7 +2443,7 @@ function parseVersion2(version) {
|
|
|
2443
2443
|
var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
|
|
2444
2444
|
var init_version2 = __esm(() => {
|
|
2445
2445
|
init_output();
|
|
2446
|
-
currentVersion2 = "0.
|
|
2446
|
+
currentVersion2 = "0.194.0".trim() ? "0.194.0".trim() : "0.1.0";
|
|
2447
2447
|
});
|
|
2448
2448
|
|
|
2449
2449
|
// ../../packages/registry/src/index.ts
|
|
@@ -6732,6 +6732,7 @@ var init_admin_artists2 = __esm(() => {
|
|
|
6732
6732
|
// src/commands/admin-labels.ts
|
|
6733
6733
|
var exports_admin_labels = {};
|
|
6734
6734
|
__export(exports_admin_labels, {
|
|
6735
|
+
updateLabelCommand: () => updateLabelCommand,
|
|
6735
6736
|
mergeLabelCommand: () => mergeLabelCommand,
|
|
6736
6737
|
labelsBioQueueCommand: () => labelsBioQueueCommand,
|
|
6737
6738
|
draftLabelBioCommand: () => draftLabelBioCommand,
|
|
@@ -6743,6 +6744,15 @@ async function mergeLabelCommand(losingSlug, canonicalSlug) {
|
|
|
6743
6744
|
const response = await adminApiPost(`/api/v1/admin/labels/${encodeURIComponent(losingSlug)}/merge`, { canonicalSlug });
|
|
6744
6745
|
return response.result;
|
|
6745
6746
|
}
|
|
6747
|
+
async function updateLabelCommand(slugOrId, seedState) {
|
|
6748
|
+
const { labels } = await adminApiGet("/api/v1/admin/labels");
|
|
6749
|
+
const match = labels.find((label) => label.slug === slugOrId || label.id === slugOrId);
|
|
6750
|
+
if (!match) {
|
|
6751
|
+
throw new Error(`No label with slug or id '${slugOrId}' — check \`fluncle labels\``);
|
|
6752
|
+
}
|
|
6753
|
+
const response = await adminApiPatch(`/api/v1/admin/labels/${encodeURIComponent(match.id)}`, { seedState });
|
|
6754
|
+
return response.label;
|
|
6755
|
+
}
|
|
6746
6756
|
async function describeLabelCommand(slug, options) {
|
|
6747
6757
|
return adminApiPost(`/api/v1/admin/labels/${encodeURIComponent(slug)}/bio`, buildBioBody2(options));
|
|
6748
6758
|
}
|
|
@@ -10094,7 +10104,7 @@ function addAdminCommands(program2) {
|
|
|
10094
10104
|
const { draftArtistBioCommand: draftArtistBioCommand2 } = await Promise.resolve().then(() => (init_admin_artists(), exports_admin_artists));
|
|
10095
10105
|
await runEntityBioDraft("artist", slug, options, draftArtistBioCommand2);
|
|
10096
10106
|
});
|
|
10097
|
-
const labels = configureCommand(admin.command("labels").description("Label entity commands (voiced bio + slug-split merge)"));
|
|
10107
|
+
const labels = configureCommand(admin.command("labels").description("Label entity commands (crawl-seed ruling + voiced bio + slug-split merge)"));
|
|
10098
10108
|
labels.action(() => {
|
|
10099
10109
|
labels.outputHelp();
|
|
10100
10110
|
});
|
|
@@ -10111,6 +10121,20 @@ function addAdminCommands(program2) {
|
|
|
10111
10121
|
const { draftLabelBioCommand: draftLabelBioCommand2 } = await Promise.resolve().then(() => (init_admin_labels(), exports_admin_labels));
|
|
10112
10122
|
await runEntityBioDraft("label", slug, options, draftLabelBioCommand2);
|
|
10113
10123
|
});
|
|
10124
|
+
labels.command("update").description("Rule on a label's crawl-seed state (operator; next crawl only, never storage)").argument("<slug>", "The label's slug (an exact lbl_\u2026 id also works)").option("--seed-state <state>", "The ruling: enabled, disabled, or undecided").option("--json", "Print JSON", false).action(async (slug, options) => {
|
|
10125
|
+
const seedState = options.seedState;
|
|
10126
|
+
if (seedState !== "enabled" && seedState !== "disabled" && seedState !== "undecided") {
|
|
10127
|
+
throw new Error("Pass --seed-state enabled|disabled|undecided");
|
|
10128
|
+
}
|
|
10129
|
+
const { updateLabelCommand: updateLabelCommand2 } = await Promise.resolve().then(() => (init_admin_labels(), exports_admin_labels));
|
|
10130
|
+
const label = await updateLabelCommand2(slug, seedState);
|
|
10131
|
+
if (options.json) {
|
|
10132
|
+
printJson({ label, ok: true });
|
|
10133
|
+
return;
|
|
10134
|
+
}
|
|
10135
|
+
console.log(`${label.name} (${label.slug}) \u2192 ${label.seedState}.`);
|
|
10136
|
+
console.log(label.seedState === "enabled" ? " The next crawl seeds from it and stores its releases." : " The next crawl will not seed from it; nothing already stored is touched.");
|
|
10137
|
+
});
|
|
10114
10138
|
labels.command("merge").description("Merge a slug-split label into its canonical row (operator; re-points + redirects)").argument("<losingSlug>", "The duplicate label to fold away").argument("<canonicalSlug>", "The label to keep \u2014 everything re-points onto it").option("--json", "Print JSON", false).action(async (losingSlug, canonicalSlug, options) => {
|
|
10115
10139
|
const { mergeLabelCommand: mergeLabelCommand2 } = await Promise.resolve().then(() => (init_admin_labels(), exports_admin_labels));
|
|
10116
10140
|
const result = await mergeLabelCommand2(losingSlug, canonicalSlug);
|
|
@@ -12787,6 +12811,7 @@ var stringOptions = new Set([
|
|
|
12787
12811
|
"--script",
|
|
12788
12812
|
"--script-file",
|
|
12789
12813
|
"--seed",
|
|
12814
|
+
"--seed-state",
|
|
12790
12815
|
"--soundcloud-url",
|
|
12791
12816
|
"--source",
|
|
12792
12817
|
"--status",
|
package/package.json
CHANGED