@theholocron/cli 5.0.0-alpha.527 → 5.0.0-alpha.528

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/dist/cli.mjs CHANGED
@@ -10386,6 +10386,23 @@ const row$26 = (name, what, problems, ok) => ({
10386
10386
  /** Extras are information only: they never fail a row, they are named in its detail. */
10387
10387
  const extrasNote = (noun, extras) => extras.length > 0 ? `; info: ${extras.length} ${noun} not in the manifest (${extras.join(", ")})` : "";
10388
10388
  /**
10389
+ * Whether each installation is active or suspended, as information only: a suspended one is sent no webhooks, which is
10390
+ * what `dev.suspendWhenIdle` wants of a development App while `holocron dev` is not running, and a prod App that is
10391
+ * suspended is for the person reading to notice. Never a failure.
10392
+ */
10393
+ function suspensionRow(name, installations) {
10394
+ const suspended = installations.filter((i) => i.suspended);
10395
+ const who = (i) => i.account?.login ?? `installation ${i.id}`;
10396
+ const detail = installations.length === 0 ? "no installations" : suspended.length === 0 ? `${installations.length} installation(s) active` : `${suspended.length} of ${installations.length} suspended, sent no webhooks (${suspended.map(who).join(", ")}); ${installations.length - suspended.length} active`;
10397
+ return {
10398
+ id: `${name}:suspension`,
10399
+ title: `${name}: suspension`,
10400
+ status: "ok",
10401
+ detail,
10402
+ problems: []
10403
+ };
10404
+ }
10405
+ /**
10389
10406
  * The events, permissions and installations rows of one App instance: the manifest against the live App, and the live
10390
10407
  * App against what each installation has accepted. A row that fails ends with the page that fixes it.
10391
10408
  */
@@ -10405,7 +10422,8 @@ function appRows(name, manifest, app, installations) {
10405
10422
  return [
10406
10423
  row$26(name, "events", eventProblems.length > 0 ? [...eventProblems, fix] : [], `all ${manifest.events.length} subscribed${extrasNote("extra event(s)", extraEvents)}`),
10407
10424
  row$26(name, "permissions", permissionProblems.length > 0 ? [...permissionProblems, fix] : [], `all ${Object.keys(manifest.permissions).length} granted${extrasNote("extra permission(s)", extraPermissions)}`),
10408
- row$26(name, "installations", installationProblems, `${installations.length} installation(s) up to date`)
10425
+ row$26(name, "installations", installationProblems, `${installations.length} installation(s) up to date`),
10426
+ suspensionRow(name, installations)
10409
10427
  ];
10410
10428
  }
10411
10429
  // src/commands/webhook-deliveries/failed-deliveries.ts