@theholocron/cli 3.65.0 → 3.66.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.
package/README.md CHANGED
@@ -209,13 +209,15 @@ all three. See the [telemetry guide](https://docs.theholocron.dev/holocron/telem
209
209
  implement
210
210
  - `src/config.ts` — config schema, `defineConfig`, `resolveConfig`,
211
211
  `CapabilityConfigPackage`
212
- - `src/load-config.ts` — `loadConfig` — reads JSON/JS/TS config files
212
+ - `src/config/load-config.ts` — `loadConfig` — reads `holocron.config.*`
213
+ (file discovery via [`@theholocron/datapad`](../datapad))
213
214
  - `src/define-config.ts` — `defineConfig` typed pass-through
214
215
  - `src/logger.ts` — CLI-side `@theholocron/logger` wiring (`buildCliLogger`,
215
216
  `resolveLogLevel`)
216
217
  - `src/loader.ts` — `PluginLoader` — dynamic-imports plugins, resolves
217
218
  capability config packages, builds the capability registry
218
- - `src/cli.ts` — yargs entry, dispatches subcommands
219
+ - `src/cli.ts` — yargs entry, dispatches subcommands. `holocron run` is
220
+ delegated to [`@theholocron/astromech`](../astromech) (`createAstromech`).
219
221
  - `src/commands/` — `setup`, `sync`, `doctor`, `deploy`, `secret set`,
220
222
  `secrets sync`, `npm publish-initial`, `sync-github`, `upgrade node`,
221
223
  `plugin create`, `auth`
package/dist/cli.mjs CHANGED
@@ -3,6 +3,7 @@ import { createRequire } from "node:module";
3
3
  import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
4
4
  import path, { basename, dirname, join, relative, resolve } from "node:path";
5
5
  import { checkbox, input, select } from "@inquirer/prompts";
6
+ import { createAstromech } from "@theholocron/astromech";
6
7
  import yargs from "yargs";
7
8
  import { hideBin } from "yargs/helpers";
8
9
  import { AuthError, ProviderApiError, ProviderApiError as ProviderApiError$1, createRestClient } from "@theholocron/http-client";
@@ -7228,6 +7229,29 @@ try {
7228
7229
  },
7229
7230
  ...argv.steps && argv.steps.length > 0 ? { steps: argv.steps } : {}
7230
7231
  })).summary.fail > 0) process.exitCode = 1;
7232
+ }).command("run <task> [passthrough..]", "Run a task locally (test, typecheck, lint, build) — figures out turbo / the tool / the package manager", (y) => y.positional("task", {
7233
+ type: "string",
7234
+ demandOption: true,
7235
+ describe: "Task name (test, typecheck, lint, build). See `holocron run --help`."
7236
+ }).positional("passthrough", {
7237
+ type: "string",
7238
+ array: true,
7239
+ describe: "Args forwarded to the tool — put them after `--`."
7240
+ }).option("required", {
7241
+ type: "boolean",
7242
+ default: false,
7243
+ describe: "Fail (exit 1) if this repo has no such task, instead of skipping."
7244
+ }), (argv) => {
7245
+ const { logger } = buildCliLogger(argv, { command: "run" });
7246
+ const report = createAstromech({
7247
+ cwd: argv.cwd,
7248
+ logger
7249
+ }).run(argv.task, {
7250
+ passthrough: argv.passthrough ?? [],
7251
+ dryRun: argv.dryRun,
7252
+ required: argv.required
7253
+ });
7254
+ if (report.status === "fail" || report.status === "unknown") process.exitCode = 1;
7231
7255
  }).command("sync-github", "Sync workflow templates and composite actions to theholocron/.github", (y) => y.option("repo", {
7232
7256
  type: "string",
7233
7257
  default: "theholocron/.github",