fluncle 0.197.0 → 0.198.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 +51 -98
  2. 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.197.0".trim() ? "0.197.0".trim() : "0.1.0";
564
+ currentVersion = "0.198.0".trim() ? "0.198.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.197.0".trim() ? "0.197.0".trim() : "0.1.0";
2446
+ currentVersion2 = "0.198.0".trim() ? "0.198.0".trim() : "0.1.0";
2447
2447
  });
2448
2448
 
2449
2449
  // ../../packages/registry/src/index.ts
@@ -12315,10 +12315,14 @@ async function runAdminQueue(options, queueCommand2) {
12315
12315
  console.log(trackRows2(tracks).join(`
12316
12316
  `));
12317
12317
  }
12318
- async function runAdminContextQueue(options, contextQueueCommand2) {
12318
+ async function runQueueView({
12319
+ emptyMessage,
12320
+ fetch: fetch2,
12321
+ heading,
12322
+ options
12323
+ }) {
12319
12324
  const limit = parseListLimit(options.limit);
12320
- const retryEmpty = options.retryEmpty === true;
12321
- const tracks = await contextQueueCommand2(limit, retryEmpty);
12325
+ const tracks = await fetch2(limit);
12322
12326
  if (options.json) {
12323
12327
  printJson({
12324
12328
  ok: true,
@@ -12327,115 +12331,64 @@ async function runAdminContextQueue(options, contextQueueCommand2) {
12327
12331
  return;
12328
12332
  }
12329
12333
  if (tracks.length === 0) {
12330
- console.log("Every finding has its field notes. Nothing waiting on context.");
12334
+ console.log(emptyMessage);
12331
12335
  return;
12332
12336
  }
12333
12337
  const { trackRows: trackRows2 } = await Promise.resolve().then(() => (init_format2(), exports_format));
12334
12338
  const noun = tracks.length === 1 ? "finding" : "findings";
12335
- const scope = retryEmpty ? " (incl. empty retries)" : "";
12336
- console.log(`${tracks.length} ${noun} missing field notes${scope}, oldest first:`);
12339
+ console.log(heading(tracks.length, noun));
12337
12340
  console.log(trackRows2(tracks).join(`
12338
12341
  `));
12339
12342
  }
12343
+ async function runAdminContextQueue(options, contextQueueCommand2) {
12344
+ const retryEmpty = options.retryEmpty === true;
12345
+ const scope = retryEmpty ? " (incl. empty retries)" : "";
12346
+ await runQueueView({
12347
+ emptyMessage: "Every finding has its field notes. Nothing waiting on context.",
12348
+ fetch: (limit) => contextQueueCommand2(limit, retryEmpty),
12349
+ heading: (count, noun) => `${count} ${noun} missing field notes${scope}, oldest first:`,
12350
+ options
12351
+ });
12352
+ }
12340
12353
  async function runAdminObserveQueue(options, observeQueueCommand2) {
12341
- const limit = parseListLimit(options.limit);
12342
- const tracks = await observeQueueCommand2(limit);
12343
- if (options.json) {
12344
- printJson({
12345
- ok: true,
12346
- tracks
12347
- });
12348
- return;
12349
- }
12350
- if (tracks.length === 0) {
12351
- console.log("Every finding with notes has its observation. Nothing waiting on a voice.");
12352
- return;
12353
- }
12354
- const { trackRows: trackRows2 } = await Promise.resolve().then(() => (init_format2(), exports_format));
12355
- const noun = tracks.length === 1 ? "finding" : "findings";
12356
- console.log(`${tracks.length} ${noun} awaiting an observation, oldest first:`);
12357
- console.log(trackRows2(tracks).join(`
12358
- `));
12354
+ await runQueueView({
12355
+ emptyMessage: "Every finding with notes has its observation. Nothing waiting on a voice.",
12356
+ fetch: observeQueueCommand2,
12357
+ heading: (count, noun) => `${count} ${noun} awaiting an observation, oldest first:`,
12358
+ options
12359
+ });
12359
12360
  }
12360
12361
  async function runAdminNoteQueue(options, noteQueueCommand2) {
12361
- const limit = parseListLimit(options.limit);
12362
- const tracks = await noteQueueCommand2(limit);
12363
- if (options.json) {
12364
- printJson({
12365
- ok: true,
12366
- tracks
12367
- });
12368
- return;
12369
- }
12370
- if (tracks.length === 0) {
12371
- console.log("Every context'd finding has a note. Nothing waiting on the uncle's words.");
12372
- return;
12373
- }
12374
- const { trackRows: trackRows2 } = await Promise.resolve().then(() => (init_format2(), exports_format));
12375
- const noun = tracks.length === 1 ? "finding" : "findings";
12376
- console.log(`${tracks.length} ${noun} awaiting a note, oldest first:`);
12377
- console.log(trackRows2(tracks).join(`
12378
- `));
12362
+ await runQueueView({
12363
+ emptyMessage: "Every context'd finding has a note. Nothing waiting on the uncle's words.",
12364
+ fetch: noteQueueCommand2,
12365
+ heading: (count, noun) => `${count} ${noun} awaiting a note, oldest first:`,
12366
+ options
12367
+ });
12379
12368
  }
12380
12369
  async function runAdminEnrichQueue(options, enrichQueueCommand2) {
12381
- const limit = parseListLimit(options.limit);
12382
- const tracks = await enrichQueueCommand2(limit);
12383
- if (options.json) {
12384
- printJson({
12385
- ok: true,
12386
- tracks
12387
- });
12388
- return;
12389
- }
12390
- if (tracks.length === 0) {
12391
- console.log("Nothing awaiting enrichment. Every finding is enriched.");
12392
- return;
12393
- }
12394
- const { trackRows: trackRows2 } = await Promise.resolve().then(() => (init_format2(), exports_format));
12395
- const noun = tracks.length === 1 ? "finding" : "findings";
12396
- console.log(`${tracks.length} ${noun} needing (re-)enrichment, oldest first:`);
12397
- console.log(trackRows2(tracks).join(`
12398
- `));
12370
+ await runQueueView({
12371
+ emptyMessage: "Nothing awaiting enrichment. Every finding is enriched.",
12372
+ fetch: enrichQueueCommand2,
12373
+ heading: (count, noun) => `${count} ${noun} needing (re-)enrichment, oldest first:`,
12374
+ options
12375
+ });
12399
12376
  }
12400
12377
  async function runAdminEmbedQueue(options, embedQueueCommand2) {
12401
- const limit = parseListLimit(options.limit);
12402
- const tracks = await embedQueueCommand2(limit);
12403
- if (options.json) {
12404
- printJson({
12405
- ok: true,
12406
- tracks
12407
- });
12408
- return;
12409
- }
12410
- if (tracks.length === 0) {
12411
- console.log("Nothing awaiting an embedding. Every finding is embedded.");
12412
- return;
12413
- }
12414
- const { trackRows: trackRows2 } = await Promise.resolve().then(() => (init_format2(), exports_format));
12415
- const noun = tracks.length === 1 ? "finding" : "findings";
12416
- console.log(`${tracks.length} ${noun} needing an audio embedding, oldest first:`);
12417
- console.log(trackRows2(tracks).join(`
12418
- `));
12378
+ await runQueueView({
12379
+ emptyMessage: "Nothing awaiting an embedding. Every finding is embedded.",
12380
+ fetch: embedQueueCommand2,
12381
+ heading: (count, noun) => `${count} ${noun} needing an audio embedding, oldest first:`,
12382
+ options
12383
+ });
12419
12384
  }
12420
12385
  async function runAdminCaptureQueue(options, captureQueueCommand2) {
12421
- const limit = parseListLimit(options.limit);
12422
- const tracks = await captureQueueCommand2(limit);
12423
- if (options.json) {
12424
- printJson({
12425
- ok: true,
12426
- tracks
12427
- });
12428
- return;
12429
- }
12430
- if (tracks.length === 0) {
12431
- console.log("Nothing awaiting a capture. Every finding has its full song.");
12432
- return;
12433
- }
12434
- const { trackRows: trackRows2 } = await Promise.resolve().then(() => (init_format2(), exports_format));
12435
- const noun = tracks.length === 1 ? "finding" : "findings";
12436
- console.log(`${tracks.length} ${noun} needing a full-song capture, newest first:`);
12437
- console.log(trackRows2(tracks).join(`
12438
- `));
12386
+ await runQueueView({
12387
+ emptyMessage: "Nothing awaiting a capture. Every finding has its full song.",
12388
+ fetch: captureQueueCommand2,
12389
+ heading: (count, noun) => `${count} ${noun} needing a full-song capture, newest first:`,
12390
+ options
12391
+ });
12439
12392
  }
12440
12393
  var TRACK_WORK_KINDS = new Set(["analyze", "capture", "embed"]);
12441
12394
  var TRACK_WORK_SCOPES = new Set(["all", "catalogue", "findings"]);
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.197.0"
34
+ "version": "0.198.0"
35
35
  }