fluncle 0.33.0 → 0.35.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 +40 -12
- package/package.json +1 -1
package/bin/fluncle.mjs
CHANGED
|
@@ -3166,12 +3166,6 @@ function buildBody(options) {
|
|
|
3166
3166
|
if (options.recordedAt !== undefined) {
|
|
3167
3167
|
body.recordedAt = options.recordedAt;
|
|
3168
3168
|
}
|
|
3169
|
-
if (options.mixcloudUrl !== undefined) {
|
|
3170
|
-
body.mixcloudUrl = options.mixcloudUrl;
|
|
3171
|
-
}
|
|
3172
|
-
if (options.youtubeUrl !== undefined) {
|
|
3173
|
-
body.youtubeUrl = options.youtubeUrl;
|
|
3174
|
-
}
|
|
3175
3169
|
if (options.soundcloudUrl !== undefined) {
|
|
3176
3170
|
body.soundcloudUrl = options.soundcloudUrl;
|
|
3177
3171
|
}
|
|
@@ -3795,7 +3789,7 @@ function parseVersion(version) {
|
|
|
3795
3789
|
var currentVersion, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
|
|
3796
3790
|
var init_version = __esm(() => {
|
|
3797
3791
|
init_output();
|
|
3798
|
-
currentVersion = "0.
|
|
3792
|
+
currentVersion = "0.35.0".trim() ? "0.35.0".trim() : "0.1.0";
|
|
3799
3793
|
});
|
|
3800
3794
|
|
|
3801
3795
|
// src/commands/track.ts
|
|
@@ -4624,6 +4618,38 @@ var init_mixtape_mixcloud2 = __esm(() => {
|
|
|
4624
4618
|
PICTURE_MAX_BYTES2 = 10 * 1024 * 1024;
|
|
4625
4619
|
});
|
|
4626
4620
|
|
|
4621
|
+
// src/commands/auth-lastfm.ts
|
|
4622
|
+
var exports_auth_lastfm = {};
|
|
4623
|
+
__export(exports_auth_lastfm, {
|
|
4624
|
+
authLastfmCommand: () => authLastfmCommand
|
|
4625
|
+
});
|
|
4626
|
+
async function authLastfmCommand(options) {
|
|
4627
|
+
if (options.token?.trim()) {
|
|
4628
|
+
const response2 = await adminApiPost("/api/admin/lastfm/auth/session", { token: options.token.trim() });
|
|
4629
|
+
console.log(`Last.fm connected as ${response2.name || "fluncle"}.
|
|
4630
|
+
|
|
4631
|
+
Set this as the Worker secret LASTFM_SESSION_KEY (it does not expire):
|
|
4632
|
+
|
|
4633
|
+
${response2.sessionKey}
|
|
4634
|
+
|
|
4635
|
+
bun run --cwd apps/web wrangler secret put LASTFM_SESSION_KEY
|
|
4636
|
+
|
|
4637
|
+
Also store it in 1Password (Fluncle vault) alongside the API key + shared secret.`);
|
|
4638
|
+
return;
|
|
4639
|
+
}
|
|
4640
|
+
const response = await adminApiGet("/api/admin/lastfm/auth/start");
|
|
4641
|
+
console.log(`Open this Last.fm authorization URL (logged in as fluncle) and click "Yes, allow access":
|
|
4642
|
+
|
|
4643
|
+
${response.authUrl}
|
|
4644
|
+
|
|
4645
|
+
After approving, run this to mint the durable session key:
|
|
4646
|
+
|
|
4647
|
+
fluncle admin auth lastfm --token ${response.token}`);
|
|
4648
|
+
}
|
|
4649
|
+
var init_auth_lastfm = __esm(() => {
|
|
4650
|
+
init_api();
|
|
4651
|
+
});
|
|
4652
|
+
|
|
4627
4653
|
// src/interactive.ts
|
|
4628
4654
|
var exports_interactive = {};
|
|
4629
4655
|
__export(exports_interactive, {
|
|
@@ -5133,11 +5159,11 @@ function addAdminCommands(program2) {
|
|
|
5133
5159
|
adminMixtapes.action(() => {
|
|
5134
5160
|
adminMixtapes.outputHelp();
|
|
5135
5161
|
});
|
|
5136
|
-
adminMixtapes.command("create").description("Log a new mixtape draft").option("--duration-ms <duration>", "Duration (mm:ss, h:mm:ss, or ms)").option("--json", "Print JSON", false).option("--
|
|
5162
|
+
adminMixtapes.command("create").description("Log a new mixtape draft").option("--duration-ms <duration>", "Duration (mm:ss, h:mm:ss, or ms)").option("--json", "Print JSON", false).option("--note <text>", "Operator note").option("--recorded-at <date>", "Recorded date (ISO)").option("--soundcloud-url <url>", "SoundCloud URL (manual; YouTube + Mixcloud come from distribute)").allowExcessArguments().action(async (options) => {
|
|
5137
5163
|
const { mixtapeCreateCommand: mixtapeCreateCommand2 } = await Promise.resolve().then(() => (init_mixtapes2(), exports_mixtapes));
|
|
5138
5164
|
await runMixtapeCreate(options, mixtapeCreateCommand2);
|
|
5139
5165
|
});
|
|
5140
|
-
adminMixtapes.command("update").description("Update a mixtape's fields").argument("[id]").option("--duration-ms <duration>", "Duration (mm:ss, h:mm:ss, or ms)").option("--json", "Print JSON", false).option("--
|
|
5166
|
+
adminMixtapes.command("update").description("Update a mixtape's fields").argument("[id]").option("--duration-ms <duration>", "Duration (mm:ss, h:mm:ss, or ms)").option("--json", "Print JSON", false).option("--note <text>", "Operator note").option("--recorded-at <date>", "Recorded date (ISO)").option("--soundcloud-url <url>", "SoundCloud URL (manual; YouTube + Mixcloud come from distribute)").allowExcessArguments().action(async (id, options) => {
|
|
5141
5167
|
const { mixtapeUpdateCommand: mixtapeUpdateCommand2 } = await Promise.resolve().then(() => (init_mixtapes2(), exports_mixtapes));
|
|
5142
5168
|
await runMixtapeUpdate(id, options, mixtapeUpdateCommand2);
|
|
5143
5169
|
});
|
|
@@ -5208,6 +5234,10 @@ function addAdminCommands(program2) {
|
|
|
5208
5234
|
const { authMixcloudCommand: authMixcloudCommand3 } = await Promise.resolve().then(() => (init_mixtape_mixcloud2(), exports_mixtape_mixcloud2));
|
|
5209
5235
|
await authMixcloudCommand3();
|
|
5210
5236
|
});
|
|
5237
|
+
auth.command("lastfm").description("Authorize Last.fm access (love-on-add). Run once for the URL, then again with --token").option("--token <token>", "The approved request token, to mint the session key").action(async (options) => {
|
|
5238
|
+
const { authLastfmCommand: authLastfmCommand2 } = await Promise.resolve().then(() => (init_auth_lastfm(), exports_auth_lastfm));
|
|
5239
|
+
await authLastfmCommand2(options);
|
|
5240
|
+
});
|
|
5211
5241
|
const backfill = configureCommand(admin.command("backfill").description("Backfill operator-only archives"));
|
|
5212
5242
|
backfill.action(() => {
|
|
5213
5243
|
backfill.outputHelp();
|
|
@@ -5824,7 +5854,6 @@ var stringOptions = new Set([
|
|
|
5824
5854
|
"--key",
|
|
5825
5855
|
"--limit",
|
|
5826
5856
|
"--mime",
|
|
5827
|
-
"--mixcloud-url",
|
|
5828
5857
|
"--note",
|
|
5829
5858
|
"--platform",
|
|
5830
5859
|
"--poster",
|
|
@@ -5836,8 +5865,7 @@ var stringOptions = new Set([
|
|
|
5836
5865
|
"--source",
|
|
5837
5866
|
"--status",
|
|
5838
5867
|
"--url",
|
|
5839
|
-
"--video-url"
|
|
5840
|
-
"--youtube-url"
|
|
5868
|
+
"--video-url"
|
|
5841
5869
|
]);
|
|
5842
5870
|
var rootHelpSections = `
|
|
5843
5871
|
|
package/package.json
CHANGED