@theholocron/cli 3.18.3 → 3.18.5

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
@@ -2723,6 +2723,13 @@ function workflowHeader(source = "packages/cli/src/commands/setup-workflows.ts")
2723
2723
  ``
2724
2724
  ].join("\n");
2725
2725
  }
2726
+ function scaffoldHeader(source = "packages/cli/src/commands/setup.ts") {
2727
+ return [
2728
+ `# Scaffolded by holocron setup — edit this file freely.`,
2729
+ `# Source: theholocron/holocron · ${source}`,
2730
+ ``
2731
+ ].join("\n");
2732
+ }
2726
2733
  const WORKFLOW_TEMPLATES = {
2727
2734
  lint: lint_default$1,
2728
2735
  test: test_default$1,
@@ -2861,7 +2868,7 @@ function mergeCodecovComponents(existing, packages) {
2861
2868
  }
2862
2869
  function codecovContent(packages) {
2863
2870
  return [
2864
- workflowHeader("packages/cli/src/commands/setup.ts"),
2871
+ scaffoldHeader(),
2865
2872
  `codecov:`,
2866
2873
  ` require_ci_to_pass: true`,
2867
2874
  ``,
@@ -3306,13 +3313,14 @@ async function runSetup(input) {
3306
3313
  }));
3307
3314
  print(formatStep(steps[steps.length - 1]));
3308
3315
  {
3316
+ const hasTestWorkflow = (config.workflows ?? []).map((e) => typeof e === "string" ? e : e.name).includes("test");
3309
3317
  const packages = await readWorkspacePackages(input.context.repoRoot);
3310
3318
  const existing = await readFile(join(input.context.repoRoot, "codecov.yml"), "utf8").catch(() => null);
3311
- if (packages.length === 0 && existing == null) steps.push({
3319
+ if (!hasTestWorkflow && existing == null) steps.push({
3312
3320
  capability: "source",
3313
3321
  step: "write codecov.yml",
3314
3322
  status: "skip",
3315
- message: "no packages and no existing codecov.yml"
3323
+ message: "no test workflow configured"
3316
3324
  });
3317
3325
  else steps.push(await runStep("source", "write codecov.yml", dryRun, async () => {
3318
3326
  const content = existing != null ? mergeCodecovComponents(existing, packages) : codecovContent(packages);