@theholocron/cli 5.0.0-alpha.266 → 5.0.0-alpha.267

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/README.md CHANGED
@@ -188,13 +188,14 @@ A minimal config — for repos with a `package.json` and a GitHub remote
188
188
 
189
189
  Additional `repo` fields recognised by `holocron repo setup`:
190
190
 
191
- | Field | Type | Description |
192
- | ----------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
193
- | `repo.teams` | `Array<string \| { slug, permission }>` | GitHub teams granted repo access. String shorthand defaults to `push` (Write). `holocron repo setup` also writes `.github/CODEOWNERS` for teams with `push`/`maintain`/`admin`. |
194
- | `repo.topics` | `string[]` | GitHub topics set on the repository. |
195
- | `repo.protection` | `"balanced" \| "strict" \| "none"` | Branch-protection preset applied by `holocron repo setup`. For `"strict"`, the required status checks are derived from the task manifest — see below. |
196
- | `repo.properties` | `RepoProperties` | Org-level custom property values synced to the GitHub dashboard. |
197
- | `repo.variables` | `{ repo?, org?, prune? }` | GitHub Actions variables created and updated by `holocron repo setup`. Undeclared ones are left alone unless `prune` is on. |
191
+ | Field | Type | Description |
192
+ | ----------------- | --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
193
+ | `repo.teams` | `Array<string \| { slug, permission }>` | GitHub teams granted repo access. String shorthand defaults to `push` (Write). `holocron repo setup` also writes `.github/CODEOWNERS` for teams with `push`/`maintain`/`admin`. |
194
+ | `repo.topics` | `string[]` | GitHub topics set on the repository. |
195
+ | `repo.protection` | `"balanced" \| "strict" \| "none"` | Branch-protection preset applied by `holocron repo setup`. For `"strict"`, the required status checks are derived from the task manifest — see below. |
196
+ | `repo.properties` | `RepoProperties` | Org-level custom property values synced to the GitHub dashboard. |
197
+ | `repo.variables` | `{ repo?, org?, prune? }` | GitHub Actions variables created and updated by `holocron repo setup`. Undeclared ones are left alone unless `prune` is on. |
198
+ | `repo.secrets` | `{ repo?, org?, environments? }` | Names of the secrets that must exist, checked (never written) by `holocron doctor secrets`. Names only. The notification layout's secrets and a Chromatic project token are expected without being listed. |
198
199
 
199
200
  ### Custom properties synced to GitHub
200
201
 
@@ -539,17 +540,18 @@ A `notifications` provider can declare a whole server in `holocron.config.ts`
539
540
  pinned messages, onboarding, the bot application) and the CLI applies and checks it. The
540
541
  commands and the config are provider-neutral; Discord is the first provider.
541
542
 
542
- | Command | What it does |
543
- | -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
544
- | `holocron notifications setup` | Applies the layout; looks everything up by name first, so a re-run changes nothing that matches |
545
- | `holocron notifications channel add <name>` | Creates one channel (optionally with a webhook whose URL is stored as a secret) |
546
- | `holocron notifications create-server --name <n> --owner <id>` | Creates the server the layout describes, writes its id into the config, applies the layout, invites the owner, waits for them to join and hands the server over (`--resume` finishes an interrupted hand-over; `--force` allows a second server) |
547
- | `holocron notifications link` | Links your account on the provider to your GitHub account by signing in with the provider (OAuth, nothing secret kept) |
548
- | `holocron notifications sync-roles` | Makes who holds a role match a GitHub team, through the links file (`--keep` only adds; `--provider` picks one) |
549
- | `holocron doctor notifications [--built-only] [--deliver]` | Step by step: does the server match the layout, do the secrets exist, and does a person (not the bot) own it. A full run also leaves one `🧪 test:` post in the layout's `testChannel`; `--built-only` posts nothing; `--deliver` posts to every channel and removes each post |
550
- | `holocron doctor variables` | Do the Actions variables `repo.variables` declares exist, with those values (and, for the organization's, that visibility)? One row for the repository and one for the organization, each only when declared. Read-only. An undeclared variable counts only with `prune`; a scope that cannot be read (no provider, no org token) is a skip, not a failure |
551
- | `holocron doctor --all` | Runs every deep check (`doctor notifications`, `doctor variables`, ...) and prints one row each, then `N ok, N fail, N skipped` counted in checks. Exits 1 when any check failed. A check that cannot run (no provider, no token) is a skip with the reason. Read-only: notifications runs as `--built-only`, so it posts nothing |
552
- | `holocron probe [<provider> [<probe>]] [--dry-run] [--yes]` | Poke a live provider on purpose: list the probes, inspect something, or run a proof that cleans up after itself. Plugins offer the probes; nothing secret is printed; one that changes things asks first |
543
+ | Command | What it does |
544
+ | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
545
+ | `holocron notifications setup` | Applies the layout; looks everything up by name first, so a re-run changes nothing that matches |
546
+ | `holocron notifications channel add <name>` | Creates one channel (optionally with a webhook whose URL is stored as a secret) |
547
+ | `holocron notifications create-server --name <n> --owner <id>` | Creates the server the layout describes, writes its id into the config, applies the layout, invites the owner, waits for them to join and hands the server over (`--resume` finishes an interrupted hand-over; `--force` allows a second server) |
548
+ | `holocron notifications link` | Links your account on the provider to your GitHub account by signing in with the provider (OAuth, nothing secret kept) |
549
+ | `holocron notifications sync-roles` | Makes who holds a role match a GitHub team, through the links file (`--keep` only adds; `--provider` picks one) |
550
+ | `holocron doctor notifications [--built-only] [--deliver]` | Step by step: does the server match the layout, do the secrets exist, and does a person (not the bot) own it. A full run also leaves one `🧪 test:` post in the layout's `testChannel`; `--built-only` posts nothing; `--deliver` posts to every channel and removes each post |
551
+ | `holocron doctor variables` | Do the Actions variables `repo.variables` declares exist, with those values (and, for the organization's, that visibility)? One row for the repository and one for the organization, each only when declared. Read-only. An undeclared variable counts only with `prune`; a scope that cannot be read (no provider, no org token) is a skip, not a failure |
552
+ | `holocron doctor secrets` | Do the secrets the config says must exist (`repo.secrets`, plus the notification layout's webhook and role secrets and the Chromatic token) exist? One row for the repository, the organization and each environment, each only when something is expected there. Names only; an undeclared secret is never a problem. A scope that cannot be read is a skip |
553
+ | `holocron doctor --all` | Runs every deep check (`doctor notifications`, `doctor variables`, ...) and prints one row each, then `N ok, N fail, N skipped` counted in checks. Exits 1 when any check failed. A check that cannot run (no provider, no token) is a skip with the reason. Read-only: notifications runs as `--built-only`, so it posts nothing |
554
+ | `holocron probe [<provider> [<probe>]] [--dry-run] [--yes]` | Poke a live provider on purpose: list the probes, inspect something, or run a proof that cleans up after itself. Plugins offer the probes; nothing secret is printed; one that changes things asks first |
553
555
 
554
556
  Channels fed by another service are declared with `feeds` on the channel: `{ name: "uptime", webhook: true, feeds: { monitoring: true } }` (the object form `{ name?, webhook?, avatar? }` overrides the alert channel's name, default `Message to #<channel>`, the dedicated webhook's name, default the provider's, and gives that webhook a picture, a file path or `https://` URL, or `{ url, image }` (the URL is tried first, the file in the repo is the fallback), else the provider's own icon (`Monitoring.icon`, a URL and an embedded `data:` image; Checkly provides one), else the layout's `webhookAvatar`, else the layout's `webhookAvatar`). `setup` gives the channel a dedicated webhook and hands its URL straight to the `monitoring` provider through `Monitoring.ensureAlertChannel({ name, format: "discord", url? })`, which finds an alert channel of that name or creates one and subscribes every check; the URL is never stored as a secret. It needs a `monitoring` provider that implements `ensureAlertChannel` (Checkly does). Two feeds may not share an alert channel name, and a feed's webhook may not share the channel's own webhook name (compared without regard to case).
555
557
 
@@ -770,7 +772,7 @@ the local override exists to exempt.
770
772
  `package bump-versions`, `sync github`, `repo upgrade node`,
771
773
  `repo upgrade deps`, `new plugin`, `auth`, `notifications setup`,
772
774
  `notifications channel add`, `notifications link`,
773
- `notifications sync-roles`, `doctor notifications`, `doctor variables`
775
+ `notifications sync-roles`, `doctor notifications`, `doctor secrets`, `doctor variables`
774
776
  - `src/commands/doctor-checks/` and `src/commands/deep-checks/` — the shared row
775
777
  renderer and `declaredVsActual` helper, and `DEEP_CHECKS`, the registry every
776
778
  `doctor <capability>` is listed in
package/dist/cli.mjs CHANGED
@@ -216,6 +216,7 @@ const COMMAND_CONTEXTS = {
216
216
  "notifications sync-roles": "workspace",
217
217
  "doctor all": "workspace",
218
218
  "doctor notifications": "workspace",
219
+ "doctor secrets": "workspace",
219
220
  "doctor variables": "workspace",
220
221
  probe: "workspace",
221
222
  deploy: "workspace",
@@ -1429,6 +1430,13 @@ const doctorNotificationsEntry = {
1429
1430
  }],
1430
1431
  supportsDryRun: false
1431
1432
  };
1433
+ // src/commands/doctor-secrets/doctor-secrets.entry.ts
1434
+ const doctorSecretsEntry = {
1435
+ name: "doctor secrets",
1436
+ description: "Check the secrets the config says must exist against the ones the provider holds (read-only, names only)",
1437
+ positionals: [],
1438
+ supportsDryRun: false
1439
+ };
1432
1440
  // src/commands/doctor-variables/doctor-variables.entry.ts
1433
1441
  const doctorVariablesEntry = {
1434
1442
  name: "doctor variables",
@@ -1640,6 +1648,7 @@ const COMMAND_REGISTRY = [
1640
1648
  },
1641
1649
  notificationsChannelAddEntry,
1642
1650
  doctorNotificationsEntry,
1651
+ doctorSecretsEntry,
1643
1652
  doctorVariablesEntry,
1644
1653
  notificationsSetupEntry,
1645
1654
  notificationsCreateServerEntry,
@@ -4402,6 +4411,16 @@ async function runNotificationsChannelAdd(input) {
4402
4411
  };
4403
4412
  }
4404
4413
  }
4414
+ // src/commands/notifications-channel-add/layout-secret-names.ts
4415
+ /**
4416
+ * The names of the secrets a layout fills: each channel's webhook secret (`webhook.secret`, else the name derived
4417
+ * from the channel) and each role's `secret`. In the order the layout declares them.
4418
+ */
4419
+ function layoutSecretNames(layout) {
4420
+ const fromChannels = (layout.categories ?? []).flatMap((category) => (category.channels ?? []).filter((channel) => channel.webhook).map((channel) => channel.webhook !== true && channel.webhook && channel.webhook.secret ? channel.webhook.secret : defaultSecretName(channel.name)));
4421
+ const fromRoles = (layout.roles ?? []).flatMap((role) => role.secret ? [role.secret] : []);
4422
+ return [...fromChannels, ...fromRoles];
4423
+ }
4405
4424
  const localRedirectUri = (port) => `http://localhost:${port}/callback`;
4406
4425
  /**
4407
4426
  * The hosted service answers `GET <hostedUrl>/api/link` with `{ "service": "link" }`. Anything else (a 402 for
@@ -5379,7 +5398,7 @@ async function runDoctorNotifications(input) {
5379
5398
  }
5380
5399
  add("app-settings", APP_TITLE, appProblems, wantApp ? "1 of 1 as declared" : "none declared");
5381
5400
  }
5382
- const wanted = [...declaredChannels.filter(({ channel }) => channel.webhook).map(({ channel }) => channel.webhook !== true && channel.webhook && channel.webhook.secret ? channel.webhook.secret : defaultSecretName(channel.name)), ...(layout.roles ?? []).flatMap((r) => r.secret ? [r.secret] : [])];
5401
+ const wanted = layoutSecretNames(layout);
5383
5402
  if (wanted.length === 0) checks.push({
5384
5403
  id: "secrets",
5385
5404
  title: SECRETS_TITLE,
@@ -5523,6 +5542,179 @@ const doctorNotificationsCommand = {
5523
5542
  })).status === "fail") process.exitCode = 1;
5524
5543
  }
5525
5544
  };
5545
+ // src/commands/doctor-secrets/expected-secrets.ts
5546
+ /** Names that differ only in case are one secret to GitHub, so the first spelling wins. */
5547
+ const unique = (names) => {
5548
+ const seen = /* @__PURE__ */ new Map();
5549
+ for (const name of names) if (!seen.has(name.toUpperCase())) seen.set(name.toUpperCase(), name);
5550
+ return [...seen.values()];
5551
+ };
5552
+ /**
5553
+ * The secret a Chromatic project reads: `CHROMATIC_PROJECT_TOKEN` for `default` (or no name), otherwise
5554
+ * `CHROMATIC_PROJECT_TOKEN_<NAME>`.
5555
+ */
5556
+ const chromaticSecret = (tokenName) => !tokenName || tokenName === "default" ? "CHROMATIC_PROJECT_TOKEN" : `CHROMATIC_PROJECT_TOKEN_${tokenName.toUpperCase()}`;
5557
+ /**
5558
+ * The secrets the config says must exist: the names listed in `repo.secrets`, plus the ones it implies. A
5559
+ * notification layout fills a secret per webhook and per role (organization scope), and each project of a
5560
+ * `verification.visualRegression` task reads a Chromatic token (repository scope).
5561
+ */
5562
+ function expectedSecrets(config, layouts) {
5563
+ const declared = config.repo?.secrets;
5564
+ const chromatic = (config.tasks ?? []).flatMap((task) => typeof task === "object" && task.name === "verification.visualRegression" ? (task.with?.["chromatic-projects"] ?? []).map((project) => chromaticSecret(project.tokenName)) : []);
5565
+ return {
5566
+ repo: unique([...declared?.repo ?? [], ...chromatic]),
5567
+ org: unique([...declared?.org ?? [], ...layouts.flatMap(layoutSecretNames)]),
5568
+ environments: Object.fromEntries(Object.entries(declared?.environments ?? {}).map(([env, names]) => [env, unique(names)]))
5569
+ };
5570
+ }
5571
+ // src/commands/doctor-secrets/doctor-secrets.ts
5572
+ /**
5573
+ * `holocron doctor secrets` — do the secrets the config says must exist, exist?
5574
+ *
5575
+ * Read-only, names only: GitHub never returns a value. One row for the repository's secrets, one for the
5576
+ * organization's and one per environment, each only when the config expects something there (see
5577
+ * {@link expectedSecrets}). A secret that exists but is not expected is never a problem. A scope that cannot be
5578
+ * read because there is no provider, or no token for it, is a skip with the reason, not a failure.
5579
+ */
5580
+ async function runDoctorSecrets(input) {
5581
+ const print = input.print ?? ((line) => console.log(line));
5582
+ const logger = input.logger ?? getLogger();
5583
+ const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
5584
+ await loader.load();
5585
+ assertPluginsResolvable(loader, "doctor secrets");
5586
+ const config = input.loaded.resolved;
5587
+ const expected = expectedSecrets(config, (loader.has("notifications") ? loader.get("notifications") : []).flatMap((p) => p.layout ? [p.layout] : []));
5588
+ const org = input.context.org ?? (input.context.repo ?? config.repo?.name ?? "").split("/")[0];
5589
+ const checks = [];
5590
+ if (expected.repo.length > 0) checks.push({
5591
+ id: "repo-secrets",
5592
+ title: "repository secrets exist",
5593
+ scope: { kind: "repo" },
5594
+ names: expected.repo
5595
+ });
5596
+ if (expected.org.length > 0) checks.push({
5597
+ id: "org-secrets",
5598
+ title: "organization secrets exist",
5599
+ scope: org ? {
5600
+ kind: "organization",
5601
+ name: org
5602
+ } : { problem: "no organization: set `org` in the config or run inside a repository" },
5603
+ names: expected.org
5604
+ });
5605
+ for (const [env, names] of Object.entries(expected.environments)) {
5606
+ if (names.length === 0) continue;
5607
+ checks.push({
5608
+ id: `env-secrets-${env}`,
5609
+ title: `${env} environment secrets exist`,
5610
+ scope: {
5611
+ kind: "environment",
5612
+ name: env
5613
+ },
5614
+ names
5615
+ });
5616
+ }
5617
+ const rows = [];
5618
+ if (checks.length === 0) rows.push({
5619
+ id: "secrets",
5620
+ title: "secrets",
5621
+ status: "ok",
5622
+ detail: "none declared",
5623
+ problems: []
5624
+ });
5625
+ else if (!loader.has("secrets")) {
5626
+ const why = whyMissing(loader, "secrets", "no `secrets` provider to check them with");
5627
+ for (const { id, title } of checks) rows.push({
5628
+ id,
5629
+ title,
5630
+ status: "skip",
5631
+ detail: why,
5632
+ problems: []
5633
+ });
5634
+ } else {
5635
+ const secrets = loader.get("secrets");
5636
+ for (const check of checks) rows.push(await checkScope(secrets, check));
5637
+ }
5638
+ printCheckRows(rows, print);
5639
+ const summary = summariseChecks(rows);
5640
+ printCheckSummary(summary, print);
5641
+ const status = summary.fail > 0 ? "fail" : summary.ok === 0 ? "skip" : "ok";
5642
+ logger.info({
5643
+ ...summary,
5644
+ status
5645
+ }, "doctor secrets");
5646
+ return {
5647
+ status,
5648
+ rows,
5649
+ summary,
5650
+ ...status === "skip" ? { reason: rows.map((r) => r.detail).join("; ") } : {}
5651
+ };
5652
+ }
5653
+ async function checkScope(secrets, check) {
5654
+ const { id, title, scope, names } = check;
5655
+ if ("problem" in scope) return {
5656
+ id,
5657
+ title,
5658
+ status: "fail",
5659
+ detail: "1 problem(s)",
5660
+ problems: [scope.problem]
5661
+ };
5662
+ try {
5663
+ const have = await secrets.listSecrets(scope);
5664
+ const spelled = new Map(names.map((name) => [name.toUpperCase(), name]));
5665
+ const problems = declaredVsActual(new Map(names.map((name) => [name, true])), new Map(have.map((name) => [spelled.get(name.toUpperCase()) ?? name, true])), {
5666
+ noun: "secret",
5667
+ flagExtra: false
5668
+ });
5669
+ return problems.length > 0 ? {
5670
+ id,
5671
+ title,
5672
+ status: "fail",
5673
+ detail: `${problems.length} problem(s)`,
5674
+ problems
5675
+ } : {
5676
+ id,
5677
+ title,
5678
+ status: "ok",
5679
+ detail: `${names.length} of ${names.length} exist`,
5680
+ problems: []
5681
+ };
5682
+ } catch (err) {
5683
+ if (err instanceof MissingTokenError) return {
5684
+ id,
5685
+ title,
5686
+ status: "skip",
5687
+ detail: err.message,
5688
+ problems: []
5689
+ };
5690
+ return {
5691
+ id,
5692
+ title,
5693
+ status: "fail",
5694
+ detail: errorMessage(err),
5695
+ problems: []
5696
+ };
5697
+ }
5698
+ }
5699
+ // src/commands/doctor-secrets/doctor-secrets.command.ts
5700
+ const doctorSecretsCommand = {
5701
+ command: "secrets",
5702
+ describe: "Check the secrets the config says must exist against the ones the provider holds (read-only, names only)",
5703
+ handler: async (argv) => {
5704
+ const tokens = tokenContext(argv.token);
5705
+ if (!tokens) return;
5706
+ const loaded = await loadConfig(argv.cwd);
5707
+ applyResolvedConfig(argv, loaded.resolved);
5708
+ if ((await runDoctorSecrets({
5709
+ loaded,
5710
+ context: {
5711
+ repoRoot: argv.cwd,
5712
+ ...tokens,
5713
+ org: resolveOrg(argv, loaded.resolved)
5714
+ }
5715
+ })).status === "fail") process.exitCode = 1;
5716
+ }
5717
+ };
5526
5718
  // src/commands/doctor-variables/doctor-variables.ts
5527
5719
  /**
5528
5720
  * `holocron doctor variables` — do the Actions variables `repo.variables` declares exist, with those values?
@@ -5673,63 +5865,79 @@ function compareOrg(declared, have, prune) {
5673
5865
  * Every `doctor <capability>` deep check, in the order `doctor --all` runs them. Adding one is an entry here
5674
5866
  * plus its `COMMAND_CONTEXTS` and `COMMAND_REGISTRY` entries; `deep-checks.test.ts` fails without them.
5675
5867
  */
5676
- const DEEP_CHECKS = [{
5677
- name: "notifications",
5678
- capability: "notifications",
5679
- command: doctorNotificationsCommand,
5680
- async run(input) {
5681
- const report = await runDoctorNotifications({
5682
- ...input,
5683
- builtOnly: true
5684
- });
5685
- if (report.message) return {
5686
- status: "skip",
5687
- summary: {
5688
- ok: 0,
5689
- fail: 0,
5690
- skip: 1
5691
- },
5692
- reason: report.message
5693
- };
5694
- return {
5695
- status: report.status,
5696
- summary: {
5697
- ok: report.summary.pass,
5698
- fail: report.summary.fail,
5699
- skip: report.summary.skip
5700
- }
5701
- };
5702
- }
5703
- }, {
5704
- name: "variables",
5705
- capability: "source",
5706
- command: {
5707
- command: "variables",
5708
- describe: "Check the Actions variables the config declares against the ones the provider holds (read-only)",
5709
- handler: async (argv) => {
5710
- const tokens = tokenContext(argv.token);
5711
- if (!tokens) return;
5712
- const loaded = await loadConfig(argv.cwd);
5713
- applyResolvedConfig(argv, loaded.resolved);
5714
- if ((await runDoctorVariables({
5715
- loaded,
5716
- context: {
5717
- repoRoot: argv.cwd,
5718
- ...tokens,
5719
- org: resolveOrg(argv, loaded.resolved)
5868
+ const DEEP_CHECKS = [
5869
+ {
5870
+ name: "notifications",
5871
+ capability: "notifications",
5872
+ command: doctorNotificationsCommand,
5873
+ async run(input) {
5874
+ const report = await runDoctorNotifications({
5875
+ ...input,
5876
+ builtOnly: true
5877
+ });
5878
+ if (report.message) return {
5879
+ status: "skip",
5880
+ summary: {
5881
+ ok: 0,
5882
+ fail: 0,
5883
+ skip: 1
5884
+ },
5885
+ reason: report.message
5886
+ };
5887
+ return {
5888
+ status: report.status,
5889
+ summary: {
5890
+ ok: report.summary.pass,
5891
+ fail: report.summary.fail,
5892
+ skip: report.summary.skip
5720
5893
  }
5721
- })).status === "fail") process.exitCode = 1;
5894
+ };
5722
5895
  }
5723
5896
  },
5724
- async run(input) {
5725
- const report = await runDoctorVariables(input);
5726
- return {
5727
- status: report.status,
5728
- summary: report.summary,
5729
- ...report.reason ? { reason: report.reason } : {}
5730
- };
5897
+ {
5898
+ name: "secrets",
5899
+ capability: "secrets",
5900
+ command: doctorSecretsCommand,
5901
+ async run(input) {
5902
+ const report = await runDoctorSecrets(input);
5903
+ return {
5904
+ status: report.status,
5905
+ summary: report.summary,
5906
+ ...report.reason ? { reason: report.reason } : {}
5907
+ };
5908
+ }
5909
+ },
5910
+ {
5911
+ name: "variables",
5912
+ capability: "source",
5913
+ command: {
5914
+ command: "variables",
5915
+ describe: "Check the Actions variables the config declares against the ones the provider holds (read-only)",
5916
+ handler: async (argv) => {
5917
+ const tokens = tokenContext(argv.token);
5918
+ if (!tokens) return;
5919
+ const loaded = await loadConfig(argv.cwd);
5920
+ applyResolvedConfig(argv, loaded.resolved);
5921
+ if ((await runDoctorVariables({
5922
+ loaded,
5923
+ context: {
5924
+ repoRoot: argv.cwd,
5925
+ ...tokens,
5926
+ org: resolveOrg(argv, loaded.resolved)
5927
+ }
5928
+ })).status === "fail") process.exitCode = 1;
5929
+ }
5930
+ },
5931
+ async run(input) {
5932
+ const report = await runDoctorVariables(input);
5933
+ return {
5934
+ status: report.status,
5935
+ summary: report.summary,
5936
+ ...report.reason ? { reason: report.reason } : {}
5937
+ };
5938
+ }
5731
5939
  }
5732
- }];
5940
+ ];
5733
5941
  // src/commands/doctor-all/doctor-all.ts
5734
5942
  /**
5735
5943
  * `holocron doctor --all` — run every deep check and print one row for each.