fluncle 0.147.0 → 0.148.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 +29 -2
  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.147.0".trim() ? "0.147.0".trim() : "0.1.0";
564
+ currentVersion = "0.148.0".trim() ? "0.148.0".trim() : "0.1.0";
565
565
  });
566
566
 
567
567
  // src/update-notifier.ts
@@ -2189,7 +2189,7 @@ function parseVersion2(version) {
2189
2189
  var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
2190
2190
  var init_version2 = __esm(() => {
2191
2191
  init_output();
2192
- currentVersion2 = "0.147.0".trim() ? "0.147.0".trim() : "0.1.0";
2192
+ currentVersion2 = "0.148.0".trim() ? "0.148.0".trim() : "0.1.0";
2193
2193
  });
2194
2194
 
2195
2195
  // ../../packages/registry/src/index.ts
@@ -5806,6 +5806,18 @@ var init_admin_catalogue = __esm(() => {
5806
5806
  init_api();
5807
5807
  });
5808
5808
 
5809
+ // src/commands/admin-reach.ts
5810
+ var exports_admin_reach = {};
5811
+ __export(exports_admin_reach, {
5812
+ reachCollectCommand: () => reachCollectCommand
5813
+ });
5814
+ async function reachCollectCommand() {
5815
+ return adminApiPost("/api/admin/reach/collect", {});
5816
+ }
5817
+ var init_admin_reach = __esm(() => {
5818
+ init_api();
5819
+ });
5820
+
5809
5821
  // src/commands/admin-artists.ts
5810
5822
  var exports_admin_artists = {};
5811
5823
  __export(exports_admin_artists, {
@@ -8951,6 +8963,21 @@ function addAdminCommands(program2) {
8951
8963
  const { crawlStatusCommand: crawlStatusCommand2 } = await Promise.resolve().then(() => (init_admin_catalogue(), exports_admin_catalogue));
8952
8964
  await runCrawlStatus(options, crawlStatusCommand2);
8953
8965
  });
8966
+ const reach = configureCommand(admin.command("reach").description("The public /reach numbers: collect a daily snapshot"));
8967
+ reach.action(() => {
8968
+ reach.outputHelp();
8969
+ });
8970
+ reach.command("collect").description("Collect + record one daily reach snapshot across every platform").option("--json", "Print JSON", false).action(async (options) => {
8971
+ const { reachCollectCommand: reachCollectCommand2 } = await Promise.resolve().then(() => (init_admin_reach(), exports_admin_reach));
8972
+ const { collected, inserted, skipped } = await reachCollectCommand2();
8973
+ if (options.json) {
8974
+ printJson({ collected, inserted, ok: true, skipped });
8975
+ return;
8976
+ }
8977
+ const landed = collected.map((entry) => `${entry.platform} (${entry.metrics.join(", ")})`).join("; ");
8978
+ const missed = skipped.map((entry) => `${entry.platform}: ${entry.reason}`).join("; ");
8979
+ console.log(`Collected ${collected.length} platform(s), wrote ${inserted} new row(s).${landed ? ` Landed: ${landed}.` : ""}${missed ? ` Skipped: ${missed}.` : ""}`);
8980
+ });
8954
8981
  const backfill = configureCommand(admin.command("backfills").description("Backfill operator-only archives"));
8955
8982
  backfill.action(() => {
8956
8983
  backfill.outputHelp();
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.147.0"
34
+ "version": "0.148.0"
35
35
  }