fluncle 0.91.0 → 0.92.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 +32 -2
  2. package/package.json +1 -1
package/bin/fluncle.mjs CHANGED
@@ -556,7 +556,7 @@ function parseVersion(version) {
556
556
  var currentVersion;
557
557
  var init_version = __esm(() => {
558
558
  init_output();
559
- currentVersion = "0.91.0".trim() ? "0.91.0".trim() : "0.1.0";
559
+ currentVersion = "0.92.0".trim() ? "0.92.0".trim() : "0.1.0";
560
560
  });
561
561
 
562
562
  // src/update-notifier.ts
@@ -2186,7 +2186,7 @@ function parseVersion2(version) {
2186
2186
  var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
2187
2187
  var init_version2 = __esm(() => {
2188
2188
  init_output();
2189
- currentVersion2 = "0.91.0".trim() ? "0.91.0".trim() : "0.1.0";
2189
+ currentVersion2 = "0.92.0".trim() ? "0.92.0".trim() : "0.1.0";
2190
2190
  });
2191
2191
 
2192
2192
  // ../../packages/registry/src/index.ts
@@ -2911,6 +2911,7 @@ __export(exports_track, {
2911
2911
  trackObserveCommand: () => trackObserveCommand,
2912
2912
  trackNoteCommand: () => trackNoteCommand,
2913
2913
  trackGetCommand: () => trackGetCommand,
2914
+ trackGetAdminCommand: () => trackGetAdminCommand,
2914
2915
  trackDraftCommand: () => trackDraftCommand,
2915
2916
  trackContextCommand: () => trackContextCommand,
2916
2917
  isPlatesOnlyUpload: () => isPlatesOnlyUpload,
@@ -2919,6 +2920,9 @@ __export(exports_track, {
2919
2920
  async function trackGetCommand(idOrLogId) {
2920
2921
  return publicApiGet(`/api/tracks/${encodeURIComponent(idOrLogId)}`);
2921
2922
  }
2923
+ async function trackGetAdminCommand(idOrLogId) {
2924
+ return adminApiGet(`/api/admin/tracks/${encodeURIComponent(idOrLogId)}`);
2925
+ }
2922
2926
  function isPlatesOnlyUpload(files) {
2923
2927
  const hasPlate = PLATE_FIELDS.some((option) => Boolean(files[option]));
2924
2928
  if (!hasPlate) {
@@ -7329,6 +7333,10 @@ function addAdminCommands(program2) {
7329
7333
  await runAdminVehicles(options, vehiclesCommand2);
7330
7334
  });
7331
7335
  const adminTrack = adminTracks;
7336
+ adminTrack.command("get").description("Look up one finding by id or Log ID, with full admin fields").argument("[idOrLogId]").option("--json", "Print JSON", false).allowExcessArguments().action(async (idOrLogId, options) => {
7337
+ const { trackGetAdminCommand: trackGetAdminCommand2 } = await Promise.resolve().then(() => (init_track(), exports_track));
7338
+ await runTrackGetAdmin(idOrLogId, options, trackGetAdminCommand2);
7339
+ });
7332
7340
  adminTrack.command("update").description("Certify a track into the archive").argument("[trackId]").option("--bpm <number>", "Track BPM").option("--features <json>", "Audio feature JSON").option("--json", "Print JSON", false).option("--key <key>", "Musical key").option("--note <text>", "Operator note").option("--status <status>", "Enrichment status").option("--video-url <url>", "Rendered video URL").allowExcessArguments().action(async (trackId, options) => {
7333
7341
  const { trackUpdateCommand: trackUpdateCommand2 } = await Promise.resolve().then(() => (init_track(), exports_track));
7334
7342
  await runTrackUpdate(trackId, options, trackUpdateCommand2);
@@ -7905,6 +7913,28 @@ async function runTrackGet(idOrLogId, options, trackGetCommand2) {
7905
7913
  console.log(`Log: ${t.logPageUrl}`);
7906
7914
  }
7907
7915
  }
7916
+ async function runTrackGetAdmin(idOrLogId, options, trackGetAdminCommand2) {
7917
+ if (!idOrLogId) {
7918
+ throw new Error("Missing id. Usage: fluncle admin tracks get <track_id|log_id> [--json]");
7919
+ }
7920
+ const result = await trackGetAdminCommand2(idOrLogId);
7921
+ if (options.json) {
7922
+ printJson(result);
7923
+ return;
7924
+ }
7925
+ const t = result.track;
7926
+ console.log(`${t.logId ? `${t.logId} ` : ""}${t.artists.join(", ")} \u2014 ${t.title}`);
7927
+ console.log([t.bpm ? `${t.bpm} bpm` : undefined, t.key, t.label, t.enrichmentStatus].filter(Boolean).join(" \xB7 "));
7928
+ const placed = t.galaxy && t.vibeX !== undefined && t.vibeY !== undefined;
7929
+ console.log(`Placement: ${placed && t.galaxy ? `${t.galaxy.name} (${t.vibeX?.toFixed(2)}, ${t.vibeY?.toFixed(2)})` : "unplaced"}`);
7930
+ console.log(`Video: ${t.videoUrl ? [t.videoSquaredAt ? "squared master" : "linked", t.videoVehicle].filter(Boolean).join(" \xB7 ") : "none (in the render queue)"}`);
7931
+ console.log(`Observation: ${t.observationAudioUrl ? `voiced${t.observationDurationMs ? ` \xB7 ${Math.round(t.observationDurationMs / 1000)}s` : ""}` : "none"}`);
7932
+ console.log(`Note: ${t.note ? t.note : "none"}`);
7933
+ console.log(`Spotify: ${t.spotifyUrl}`);
7934
+ if (t.logPageUrl) {
7935
+ console.log(`Log: ${t.logPageUrl}`);
7936
+ }
7937
+ }
7908
7938
  async function runTrackUpdate(trackId, options, trackUpdateCommand2) {
7909
7939
  if (!trackId) {
7910
7940
  throw new Error("Missing track id. Usage: fluncle admin tracks update <track_id>");
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.91.0"
34
+ "version": "0.92.0"
35
35
  }