@theholocron/cli 5.0.0-alpha.343 → 5.0.0-alpha.344

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
@@ -814,8 +814,8 @@ the local override exists to exempt.
814
814
  `notifications sync-roles`, `project reconcile`, `doctor ci`, `doctor credentials`, `doctor dns`, `doctor environments`, `doctor monitoring`, `doctor notifications`, `doctor repo`, `doctor secrets`, `doctor tokens`, `doctor variables`
815
815
  - `src/commands/deep-checks/` — `DEEP_CHECKS`, the registry every `doctor <capability>` is
816
816
  listed in; the shared row renderer and `declaredVsActual` helper are in `@theholocron/kyber/ui`
817
- - `src/interactive-menu/` — the interactive fallback's Holocron data: `command-registry`
818
- (`COMMAND_REGISTRY`, each entry's `positionals`/`options`), `run-menu-entries`
817
+ - `src/interactive-menu/` — the interactive fallback's Holocron data: `command-catalog`
818
+ (`COMMAND_REGISTRY`, built with kyber's `createCommandRegistry`; each entry's `positionals`/`options`), `run-menu-entries`
819
819
  and `probe-menu-entries` (menu entries built at run time), and `menu.ts`,
820
820
  kyber's `createMenu` bound to the `holocron` bin and `HOLOCRON_` env prefix.
821
821
  The engine itself (the picker, argv and secret env, the dry-run preview, the spawn)
package/dist/cli.mjs CHANGED
@@ -22,7 +22,7 @@ import { Entry, findCredentials } from "@napi-rs/keyring";
22
22
  import { AuthError, DOTENV_FILE, copyToClipboard, createFeatureResolver, createKeyring, dotenvLine, finishCredentialsFile, hasCredentials, isGitIgnored, readDotenvFile, setCredentials, writeCredentialsFile } from "@theholocron/kyber/secrets";
23
23
  import { errorMessage } from "@theholocron/misc-utils";
24
24
  import { pathToFileURL } from "node:url";
25
- import { DRY_RUN_NOOP_EXIT_CODE, createMenu } from "@theholocron/kyber/menu";
25
+ import { DRY_RUN_NOOP_EXIT_CODE, createCommandRegistry, createMenu, numeric } from "@theholocron/kyber/menu";
26
26
  import { promptForPositionals } from "@theholocron/kyber/prompts";
27
27
  import { Separator, checkbox, confirm, input, select } from "@inquirer/prompts";
28
28
  import { execFileSync, spawn, spawnSync } from "node:child_process";
@@ -1921,8 +1921,6 @@ const authExportEntry = {
1921
1921
  positionals: [],
1922
1922
  supportsDryRun: false
1923
1923
  };
1924
- // src/interactive-menu/command-registry/validators.ts
1925
- const numeric = (value) => /^\d+$/.test(value) ? true : "enter a number";
1926
1924
  // src/commands/cleanup-preview/cleanup-preview.entry.ts
1927
1925
  const cleanupPreviewEntry = {
1928
1926
  name: "deploy cleanup-preview",
@@ -2354,7 +2352,7 @@ const PUBLISH_OTP_OPTION = {
2354
2352
  required: Boolean(env$6.get("HOLOCRON_NPM_ENFORCE_2FA")),
2355
2353
  message: "One-time password (2FA), if npm requires it for this publish:"
2356
2354
  };
2357
- // src/interactive-menu/command-registry/command-registry.ts
2355
+ // src/interactive-menu/command-catalog/command-catalog.ts
2358
2356
  /**
2359
2357
  * The full command surface for the interactive menu. Each entry lives next to the command it describes
2360
2358
  * (`commands/<name>/<name>.entry.ts`) and is listed here in menu order; this module does not introspect yargs at runtime.
@@ -2365,7 +2363,7 @@ const PUBLISH_OTP_OPTION = {
2365
2363
  * `run lint commit-msg <file>` stays excluded entirely: it's invoked exclusively from `.husky/commit-msg "$1"`, never
2366
2364
  * typed by a human.
2367
2365
  */
2368
- const COMMAND_REGISTRY = [
2366
+ const registry = createCommandRegistry([
2369
2367
  cloneEntry,
2370
2368
  doctorEntry,
2371
2369
  doctorAllEntry,
@@ -2674,13 +2672,11 @@ const COMMAND_REGISTRY = [
2674
2672
  projectCloseEntry,
2675
2673
  projectSetupEntry,
2676
2674
  projectReconcileEntry
2677
- ];
2678
- /** Look up a {@link CommandEntry} by its full name — for Layer 3 call sites in `cli.ts`. */
2679
- function getEntry(name) {
2680
- const entry = COMMAND_REGISTRY.find((e) => e.name === name);
2681
- if (!entry) throw new Error(`interactive-menu: no COMMAND_REGISTRY entry named "${name}"`);
2682
- return entry;
2683
- }
2675
+ ], "interactive-menu");
2676
+ /** Every Holocron command, in menu order: what {@link launchMenu} lists and what a leaf handler's prompt reads. */
2677
+ const COMMAND_REGISTRY = registry.entries;
2678
+ /** Look up a command's menu entry by its full name — for Layer 3 call sites in `cli.ts`. */
2679
+ const getEntry = registry.getEntry;
2684
2680
  // src/interactive-menu/menu.ts
2685
2681
  /**
2686
2682
  * Kyber's menu engine bound to `holocron`: secret options travel as `HOLOCRON_<OPTION>` env vars and the
@@ -15868,7 +15864,7 @@ function withAutoPreviewDeployPaths(tasks, gitRoot) {
15868
15864
  }
15869
15865
  // src/commands/thin-caller-file/thin-caller-file.ts
15870
15866
  const { workflowHeader } = createHeader({
15871
- source: "cli/astromech/src/thin-callers.ts",
15867
+ source: "cli/astromech/src/generators/github-action-thin-callers/github-action-thin-callers.ts",
15872
15868
  tool: "holocron repo sync"
15873
15869
  });
15874
15870
  /**