@theholocron/cli 4.8.0 → 4.9.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/dist/cli.mjs CHANGED
@@ -3,7 +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 { KNOWN_WORKFLOWS, WORKFLOW_CHECK_CONTEXTS, WORKFLOW_TEMPLATES, createAstromech, deriveDeployPaths, extractPreviewConfig, generateCombinedDeployContent, generateThinCallerContent, lintThinCallerWith, normalizeWorkflowWith } from "@theholocron/astromech";
6
+ import { KNOWN_WORKFLOWS, WORKFLOW_TEMPLATES, createAstromech, deriveDeployPaths, extractPreviewConfig, generateCombinedDeployContent, generateThinCallerContent, lintThinCallerWith, normalizeWorkflowWith } from "@theholocron/astromech";
7
7
  import { loadTasksConfig } from "@theholocron/astromech/config";
8
8
  import yargs from "yargs";
9
9
  import { hideBin } from "yargs/helpers";
@@ -4352,15 +4352,12 @@ async function runSetup(input) {
4352
4352
  await source.updateRepoSettings(BALANCED_REPO_SETTINGS);
4353
4353
  }));
4354
4354
  print(formatStep(steps[steps.length - 1]));
4355
- const configuredWorkflowNames = [...new Set((config.tasks ?? []).map((entry) => typeof entry === "string" ? entry : entry.name))];
4356
- const requiredChecks = effectivePreset === "strict" ? [
4357
- "DCO",
4358
- ...configuredWorkflowNames.flatMap((name) => {
4359
- const ctx = WORKFLOW_CHECK_CONTEXTS[name];
4360
- return ctx ? [ctx] : [];
4361
- }),
4362
- ...repo?.requiredChecks ?? []
4363
- ] : [];
4355
+ const tasksConfig = { tasks: config.tasks };
4356
+ if (config.extraRequiredChecks) tasksConfig.extraRequiredChecks = config.extraRequiredChecks;
4357
+ const requiredChecks = effectivePreset === "strict" ? ["DCO", ...createAstromech({
4358
+ cwd: input.context.repoRoot,
4359
+ config: tasksConfig
4360
+ }).requiredChecks()] : [];
4364
4361
  steps.push(await upsertBranchProtection(source, dryRun, requiredChecks));
4365
4362
  print(formatStep(steps[steps.length - 1]));
4366
4363
  }