outfitter 0.3.3 → 0.4.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.
Files changed (197) hide show
  1. package/dist/actions/add.d.ts +1 -1
  2. package/dist/actions/add.js +6 -5
  3. package/dist/actions/check-automation.d.ts +4 -2
  4. package/dist/actions/check-automation.js +13 -9
  5. package/dist/actions/check.d.ts +2 -2
  6. package/dist/actions/check.js +6 -6
  7. package/dist/actions/demo.d.ts +1 -1
  8. package/dist/actions/demo.js +3 -4
  9. package/dist/actions/docs.d.ts +7 -7
  10. package/dist/actions/docs.js +12 -13
  11. package/dist/actions/doctor.d.ts +1 -1
  12. package/dist/actions/doctor.js +8 -7
  13. package/dist/actions/init.d.ts +9 -7
  14. package/dist/actions/init.js +12 -10
  15. package/dist/actions/scaffold.d.ts +1 -1
  16. package/dist/actions/scaffold.js +14 -12
  17. package/dist/actions/shared.d.ts +1 -20
  18. package/dist/actions/shared.js +1 -5
  19. package/dist/actions/upgrade.d.ts +10 -2
  20. package/dist/actions/upgrade.js +15 -8
  21. package/dist/actions.js +51 -48
  22. package/dist/cli.js +51 -48
  23. package/dist/commands/add.js +4 -3
  24. package/dist/commands/check-action-ceremony.d.ts +1 -1
  25. package/dist/commands/check-action-ceremony.js +2 -2
  26. package/dist/commands/check-action-registry.d.ts +52 -0
  27. package/dist/commands/check-action-registry.js +13 -0
  28. package/dist/commands/check-docs-sentinel.d.ts +1 -1
  29. package/dist/commands/check-docs-sentinel.js +2 -2
  30. package/dist/commands/check-orchestrator.d.ts +1 -1
  31. package/dist/commands/check-orchestrator.js +2 -2
  32. package/dist/commands/check-preset-versions.d.ts +4 -2
  33. package/dist/commands/check-preset-versions.js +8 -3
  34. package/dist/commands/check-publish-guardrails.d.ts +1 -1
  35. package/dist/commands/check-publish-guardrails.js +2 -2
  36. package/dist/commands/check-surface-map-format.d.ts +1 -1
  37. package/dist/commands/check-surface-map-format.js +2 -2
  38. package/dist/commands/check-surface-map.d.ts +1 -1
  39. package/dist/commands/check-surface-map.js +2 -2
  40. package/dist/commands/check-tsdoc.d.ts +2 -2
  41. package/dist/commands/check.js +3 -3
  42. package/dist/commands/demo.d.ts +1 -1
  43. package/dist/commands/demo.js +1 -1
  44. package/dist/commands/docs-api.d.ts +3 -3
  45. package/dist/commands/docs-api.js +2 -2
  46. package/dist/commands/docs-export.d.ts +2 -2
  47. package/dist/commands/docs-export.js +2 -2
  48. package/dist/commands/docs-list.d.ts +2 -2
  49. package/dist/commands/docs-list.js +2 -2
  50. package/dist/commands/docs-search.d.ts +2 -2
  51. package/dist/commands/docs-search.js +2 -2
  52. package/dist/commands/docs-show.d.ts +2 -2
  53. package/dist/commands/docs-show.js +2 -2
  54. package/dist/commands/doctor.js +6 -5
  55. package/dist/commands/init-execution.d.ts +5 -5
  56. package/dist/commands/init-execution.js +6 -4
  57. package/dist/commands/init-option-resolution.d.ts +3 -3
  58. package/dist/commands/init-option-resolution.js +1 -1
  59. package/dist/commands/init-output.d.ts +5 -5
  60. package/dist/commands/init-output.js +3 -3
  61. package/dist/commands/init.d.ts +5 -5
  62. package/dist/commands/init.js +9 -9
  63. package/dist/commands/scaffold-output.js +3 -3
  64. package/dist/commands/scaffold-planning.d.ts +9 -10
  65. package/dist/commands/scaffold-planning.js +6 -4
  66. package/dist/commands/scaffold.js +12 -10
  67. package/dist/commands/shared-deps.js +2 -2
  68. package/dist/commands/upgrade-codemod-builder.d.ts +45 -0
  69. package/dist/commands/upgrade-codemod-builder.js +14 -0
  70. package/dist/commands/upgrade-output.js +2 -2
  71. package/dist/commands/upgrade-workspace.js +5 -1
  72. package/dist/commands/upgrade.js +9 -5
  73. package/dist/create/index.d.ts +1 -1
  74. package/dist/create/planner.js +1 -1
  75. package/dist/engine/blocks.d.ts +2 -2
  76. package/dist/engine/blocks.js +5 -4
  77. package/dist/engine/config.d.ts +2 -2
  78. package/dist/engine/config.js +6 -5
  79. package/dist/engine/dependency-versions.d.ts +11 -3
  80. package/dist/engine/dependency-versions.js +6 -2
  81. package/dist/engine/executor.d.ts +2 -2
  82. package/dist/engine/executor.js +23 -10
  83. package/dist/engine/index.d.ts +8 -9
  84. package/dist/engine/index.js +1 -5
  85. package/dist/engine/package-json.d.ts +3 -0
  86. package/dist/engine/package-json.js +10 -0
  87. package/dist/engine/post-scaffold.js +1 -1
  88. package/dist/engine/preset.d.ts +3 -3
  89. package/dist/engine/preset.js +4 -2
  90. package/dist/engine/render-plan.js +2 -2
  91. package/dist/engine/types.d.ts +1 -1
  92. package/dist/engine/workspace.d.ts +2 -2
  93. package/dist/engine/workspace.js +3 -2
  94. package/dist/index.d.ts +7 -7
  95. package/dist/manifest.js +1 -1
  96. package/dist/output-mode.d.ts +2 -2
  97. package/dist/output-mode.js +2 -4
  98. package/dist/scaffold-e2e/cli.d.ts +19 -0
  99. package/dist/scaffold-e2e/cli.js +14 -0
  100. package/dist/scaffold-e2e/config.d.ts +6 -0
  101. package/dist/scaffold-e2e/config.js +14 -0
  102. package/dist/scaffold-e2e/runner.d.ts +29 -0
  103. package/dist/scaffold-e2e/runner.js +17 -0
  104. package/dist/scaffold-e2e/template-guardrails.d.ts +25 -0
  105. package/dist/scaffold-e2e/template-guardrails.js +183 -0
  106. package/dist/scaffold-e2e/workspace.d.ts +27 -0
  107. package/dist/scaffold-e2e/workspace.js +18 -0
  108. package/dist/scripts/scaffold-e2e.js +78 -0
  109. package/dist/shared/{outfitter-qsrx7m4w.js → outfitter-00wxeg2g.js} +8 -8
  110. package/dist/shared/{outfitter-ex8gn945.js → outfitter-0cspz333.js} +4 -6
  111. package/dist/shared/{outfitter-rp89dafm.js → outfitter-0xp447gf.js} +55 -8
  112. package/dist/shared/outfitter-0zs8makw.js +94 -0
  113. package/dist/shared/{outfitter-5d9wbzhh.d.ts → outfitter-11r5ny73.d.ts} +2 -2
  114. package/dist/shared/{outfitter-gyayfx5r.js → outfitter-18s82np1.js} +1 -1
  115. package/dist/shared/{outfitter-954y4mzx.d.ts → outfitter-1dekqnaw.d.ts} +1 -1
  116. package/dist/shared/{outfitter-6t7xeyg1.js → outfitter-1t8gjzw6.js} +91 -3
  117. package/dist/shared/{outfitter-tqznjgbm.js → outfitter-23159bef.js} +6 -3
  118. package/dist/shared/{outfitter-y6ee0k45.d.ts → outfitter-232ean4v.d.ts} +1 -1
  119. package/dist/shared/{outfitter-3rcrvva8.js → outfitter-247et71q.js} +8 -8
  120. package/dist/shared/{outfitter-xs94pkfe.js → outfitter-3f261xh0.js} +5 -7
  121. package/dist/shared/outfitter-4bs5a2n4.js +31 -0
  122. package/dist/shared/{outfitter-76k25svs.js → outfitter-4c4q091c.js} +6 -28
  123. package/dist/shared/{outfitter-738z4c37.js → outfitter-4t818mq5.js} +21 -9
  124. package/dist/shared/{outfitter-4s9meh3j.js → outfitter-4w9sc6bw.js} +24 -0
  125. package/dist/shared/outfitter-5gaptj9b.js +83 -0
  126. package/dist/shared/{outfitter-2ysjerp6.d.ts → outfitter-5rc4hxdn.d.ts} +2 -2
  127. package/dist/shared/{outfitter-ttjr95y9.js → outfitter-7krhbg3b.js} +3 -3
  128. package/dist/shared/{outfitter-7n7vsz95.js → outfitter-7t7ces1x.js} +1 -42
  129. package/dist/shared/{outfitter-gdc7b7de.d.ts → outfitter-8231g70k.d.ts} +1 -1
  130. package/dist/shared/{outfitter-yhb23pjc.js → outfitter-8jd1sak0.js} +4 -4
  131. package/dist/shared/{outfitter-wkt0a0ra.js → outfitter-93e1shd4.js} +4 -6
  132. package/dist/shared/{outfitter-wyg1tpp5.d.ts → outfitter-a93yanw6.d.ts} +1 -1
  133. package/dist/shared/{outfitter-mstr60zz.js → outfitter-aa5nzw14.js} +47 -22
  134. package/dist/shared/{outfitter-fxry5n58.js → outfitter-b05mvbmx.js} +4 -4
  135. package/dist/shared/{outfitter-1fy7byz5.js → outfitter-bsjq8gkk.js} +6 -4
  136. package/dist/shared/{outfitter-ssrtakh3.js → outfitter-c50y6yr3.js} +4 -4
  137. package/dist/shared/{outfitter-cyvr4r8d.d.ts → outfitter-crxe5gth.d.ts} +4 -0
  138. package/dist/shared/{outfitter-fj2v5ffz.js → outfitter-d5kz9x7g.js} +1 -1
  139. package/dist/shared/{outfitter-k6zyvg2n.js → outfitter-dna8exj2.js} +19 -10
  140. package/dist/shared/{outfitter-940h0x7b.js → outfitter-e44qcs0w.js} +3 -3
  141. package/dist/shared/{outfitter-r2awqszh.d.ts → outfitter-e5x0ybqt.d.ts} +12 -3
  142. package/dist/shared/{outfitter-3tx3adgj.js → outfitter-ez7qffv5.js} +8 -6
  143. package/dist/shared/outfitter-fgrqt6aq.js +179 -0
  144. package/dist/shared/outfitter-fhahf9f3.d.ts +14 -0
  145. package/dist/shared/{outfitter-c7sbs7es.js → outfitter-g6r9avgz.js} +3 -3
  146. package/dist/shared/{outfitter-ssynegbs.js → outfitter-ga59fa45.js} +1 -1
  147. package/dist/shared/{outfitter-tavatb5p.js → outfitter-gna739c3.js} +86 -31
  148. package/dist/shared/{outfitter-nxvjxrmw.d.ts → outfitter-grt5ngqq.d.ts} +1 -1
  149. package/dist/shared/{outfitter-58rn1sj1.d.ts → outfitter-gsjbcta2.d.ts} +1 -1
  150. package/dist/shared/{outfitter-q1g58t85.js → outfitter-gvpwpqnc.js} +0 -1
  151. package/dist/shared/{outfitter-x39awx8g.js → outfitter-hr4cvmjy.js} +47 -25
  152. package/dist/shared/{outfitter-84chvazx.js → outfitter-hw9f0zq9.js} +75 -31
  153. package/dist/shared/{outfitter-ksyvwmb5.js → outfitter-jhpcjeg1.js} +5 -5
  154. package/dist/shared/outfitter-kc46jq69.d.ts +12 -0
  155. package/dist/shared/{outfitter-px5sv5gn.js → outfitter-ksg34wka.js} +5 -5
  156. package/dist/shared/{outfitter-wrcqq29p.js → outfitter-n63ygpv3.js} +30 -23
  157. package/dist/shared/{outfitter-qsd5638j.js → outfitter-n9jp1abt.js} +16 -40
  158. package/dist/shared/{outfitter-d0kqashd.d.ts → outfitter-nhft74pe.d.ts} +4 -2
  159. package/dist/shared/{outfitter-8kmak0wc.d.ts → outfitter-nx1sywpb.d.ts} +1 -1
  160. package/dist/shared/{outfitter-5r6q2749.d.ts → outfitter-pw74st5t.d.ts} +1 -1
  161. package/dist/shared/{outfitter-h0wmtxw8.d.ts → outfitter-qka1skyw.d.ts} +1 -1
  162. package/dist/shared/{outfitter-6mpkh3zn.js → outfitter-qps83547.js} +30 -23
  163. package/dist/shared/outfitter-qzd5djgx.js +88 -0
  164. package/dist/shared/{outfitter-hf5bj2gq.js → outfitter-sh015v8k.js} +4 -4
  165. package/dist/shared/{outfitter-ypcvwg1s.js → outfitter-srznx3hj.js} +1 -1
  166. package/dist/shared/{outfitter-n0ed012k.js → outfitter-ssq33ym3.js} +8 -8
  167. package/dist/shared/outfitter-sxf8jjjn.js +7 -0
  168. package/dist/shared/{outfitter-p2wn07b7.js → outfitter-t535h0mw.js} +1 -1
  169. package/dist/shared/{outfitter-znbqe5zy.d.ts → outfitter-t8dg4tg5.d.ts} +1 -1
  170. package/dist/shared/{outfitter-ydw7x6bh.js → outfitter-t8mvabed.js} +1 -1
  171. package/dist/shared/{outfitter-6ddf91vh.js → outfitter-t9xkn37g.js} +11 -12
  172. package/dist/shared/{outfitter-x4cc5xsq.js → outfitter-wmgzyymq.js} +4 -4
  173. package/dist/shared/outfitter-wna6gp2t.js +56 -0
  174. package/dist/shared/outfitter-x0r7mfvy.js +142 -0
  175. package/dist/shared/{outfitter-b9cpnr7e.js → outfitter-x4f8v5vf.js} +1 -1
  176. package/dist/shared/{outfitter-x8w5sjnd.d.ts → outfitter-x6322tjp.d.ts} +1 -1
  177. package/dist/shared/{outfitter-6rtcemk7.d.ts → outfitter-xa4915yp.d.ts} +3 -2
  178. package/dist/shared/{outfitter-2z61gp5w.js → outfitter-xg5yryp2.js} +1 -1
  179. package/dist/shared/{outfitter-rdpw2sbp.d.ts → outfitter-xn5km042.d.ts} +6 -0
  180. package/dist/shared/{outfitter-cyhzstz0.js → outfitter-xqr4fp1n.js} +4 -4
  181. package/dist/shared/outfitter-z6tg0swx.js +87 -0
  182. package/dist/shared/{outfitter-dx4hn4ta.js → outfitter-zmzrsvcn.js} +17 -21
  183. package/dist/shared/{outfitter-8ggmja91.js → outfitter-zqj1nte1.js} +66 -67
  184. package/dist/targets/index.d.ts +2 -2
  185. package/dist/targets/registry.d.ts +2 -2
  186. package/dist/targets/registry.js +13 -1
  187. package/dist/targets/types.d.ts +1 -1
  188. package/package.json +85 -39
  189. package/dist/actions/docs-output-mode.d.ts +0 -4
  190. package/dist/actions/docs-output-mode.js +0 -8
  191. package/dist/engine/template.d.ts +0 -4
  192. package/dist/engine/template.js +0 -34
  193. package/dist/shared/outfitter-7r12fj7f.js +0 -30
  194. package/dist/shared/outfitter-a79xrm12.d.ts +0 -17
  195. package/dist/shared/outfitter-ec83h4v2.js +0 -17
  196. package/dist/shared/outfitter-fbvfd5zq.d.ts +0 -13
  197. package/dist/shared/outfitter-jkct38dh.js +0 -53
@@ -1,5 +1,5 @@
1
- import { runCheckTsdoc } from "./outfitter-h0wmtxw8.js";
2
- import { CliOutputMode } from "./outfitter-a79xrm12.js";
1
+ import { runCheckTsdoc } from "./outfitter-qka1skyw.js";
2
+ import { CliOutputMode } from "./outfitter-fhahf9f3.js";
3
3
  import { InternalError, Result, ValidationError } from "@outfitter/contracts";
4
4
  import { TsDocCheckResult } from "@outfitter/tooling";
5
5
  /** Validated input for the docs.api action handler. */
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  resolveStructuredOutputMode
4
- } from "./outfitter-7r12fj7f.js";
4
+ } from "./outfitter-sxf8jjjn.js";
5
5
 
6
6
  // apps/outfitter/src/engine/render-plan.ts
7
7
  import { relative } from "path";
@@ -9,7 +9,7 @@ import { output } from "@outfitter/cli";
9
9
  async function renderOperationPlan(collector, options) {
10
10
  const structuredMode = resolveStructuredOutputMode(options?.mode);
11
11
  if (structuredMode) {
12
- await output(collector.toJSON(), { mode: structuredMode });
12
+ await output(collector.toJSON(), structuredMode);
13
13
  return;
14
14
  }
15
15
  const rootDir = options?.rootDir ?? process.cwd();
@@ -92,7 +92,7 @@ async function renderOperationPlan(collector, options) {
92
92
  }
93
93
  const summary = collector.countByType();
94
94
  lines.push(`Total operations: ${Object.values(summary).reduce((a, b) => a + b, 0)}`);
95
- await output(lines, { mode: "human" });
95
+ await output(lines, "human");
96
96
  }
97
97
 
98
98
  export { renderOperationPlan };
@@ -4,32 +4,6 @@ import { resolve } from "path";
4
4
  import { InternalError, Result } from "@outfitter/contracts";
5
5
  import { z } from "zod";
6
6
  var outputModeSchema = z.enum(["human", "json", "jsonl"]).default("human");
7
- function argvContainsOutputFlag(argv) {
8
- for (let index = 0;index < argv.length; index++) {
9
- const arg = argv[index];
10
- if (!arg) {
11
- continue;
12
- }
13
- if (arg === "-o" || arg === "--output") {
14
- return true;
15
- }
16
- if (arg.startsWith("--output=") || arg.startsWith("-o=")) {
17
- return true;
18
- }
19
- }
20
- return false;
21
- }
22
- function hasExplicitOutputFlag(flags, options = {}) {
23
- const mode = flags["output"];
24
- if (typeof mode !== "string") {
25
- return false;
26
- }
27
- const defaultMode = options.defaultMode ?? "human";
28
- if (mode !== defaultMode) {
29
- return true;
30
- }
31
- return argvContainsOutputFlag(options.argv ?? process.argv.slice(2));
32
- }
33
7
  function resolveStringFlag(value) {
34
8
  return typeof value === "string" && value.length > 0 ? value : undefined;
35
9
  }
@@ -64,21 +38,6 @@ function resolveCwdFromPreset(flags, cwdPreset) {
64
38
  const { cwd: rawCwd } = cwdPreset.resolve(flags);
65
39
  return resolve(process.cwd(), rawCwd);
66
40
  }
67
- function resolveOutputModeWithEnvFallback(flags, explicitMode, options = {}) {
68
- if (hasExplicitOutputFlag(flags)) {
69
- return explicitMode;
70
- }
71
- if (options.forceHumanWhenImplicit) {
72
- return "human";
73
- }
74
- if (process.env["OUTFITTER_JSONL"] === "1") {
75
- return "jsonl";
76
- }
77
- if (process.env["OUTFITTER_JSON"] === "1") {
78
- return "json";
79
- }
80
- return "human";
81
- }
82
41
  function resolveBooleanFlagAlias(flags, key, alias) {
83
42
  return Boolean(flags[key] ?? flags[alias]);
84
43
  }
@@ -98,4 +57,4 @@ function toActionInternalErrorFromUnknown(action, error, fallbackMessage) {
98
57
  });
99
58
  }
100
59
 
101
- export { outputModeSchema, hasExplicitOutputFlag, resolveStringFlag, resolveNoToolingFlag, resolveLocalFlag, resolveInstallTimeoutFlag, resolveCwdFromPreset, resolveOutputModeWithEnvFallback, resolveBooleanFlagAlias, toActionInternalError, actionInternalErr, toActionInternalErrorFromUnknown };
60
+ export { outputModeSchema, resolveStringFlag, resolveNoToolingFlag, resolveLocalFlag, resolveInstallTimeoutFlag, resolveCwdFromPreset, resolveBooleanFlagAlias, toActionInternalError, actionInternalErr, toActionInternalErrorFromUnknown };
@@ -1,4 +1,4 @@
1
- import { ScaffoldError } from "./outfitter-cyvr4r8d.js";
1
+ import { ScaffoldError } from "./outfitter-crxe5gth.js";
2
2
  import { Result } from "@outfitter/contracts";
3
3
  declare function injectSharedConfig(targetDir: string): Result<void, ScaffoldError>;
4
4
  declare function rewriteLocalDependencies(targetDir: string): Result<void, ScaffoldError>;
@@ -7,7 +7,7 @@ import {
7
7
  } from "./outfitter-svts4wk2.js";
8
8
  import {
9
9
  resolveStructuredOutputMode
10
- } from "./outfitter-7r12fj7f.js";
10
+ } from "./outfitter-sxf8jjjn.js";
11
11
 
12
12
  // apps/outfitter/src/commands/docs-list.ts
13
13
  import { resolve } from "path";
@@ -60,7 +60,7 @@ async function printDocsListResults(result, options) {
60
60
  });
61
61
  process.stdout.write(filtered);
62
62
  } else {
63
- await output(result, { mode: structuredMode });
63
+ await output(result, structuredMode);
64
64
  }
65
65
  return;
66
66
  }
@@ -68,7 +68,7 @@ async function printDocsListResults(result, options) {
68
68
  const lines = [];
69
69
  if (result.total === 0) {
70
70
  lines.push(theme.muted("No documentation entries found."));
71
- await output(lines, { mode: "human" });
71
+ await output(lines, "human");
72
72
  return;
73
73
  }
74
74
  lines.push("");
@@ -83,7 +83,7 @@ async function printDocsListResults(result, options) {
83
83
  lines.push(` ${theme.muted(entry.sourcePath)}`);
84
84
  lines.push("");
85
85
  }
86
- await output(lines, { mode: "human" });
86
+ await output(lines, "human");
87
87
  }
88
88
 
89
89
  export { runDocsList, printDocsListResults };
@@ -2,15 +2,13 @@
2
2
  import {
3
3
  outputModeSchema,
4
4
  toActionInternalErrorFromUnknown
5
- } from "./outfitter-7n7vsz95.js";
5
+ } from "./outfitter-7t7ces1x.js";
6
6
  import {
7
7
  runDemo
8
- } from "./outfitter-ksyvwmb5.js";
9
- import {
10
- resolveOutputModeFromContext
11
- } from "./outfitter-7r12fj7f.js";
8
+ } from "./outfitter-jhpcjeg1.js";
12
9
 
13
10
  // apps/outfitter/src/actions/demo.ts
11
+ import { resolveOutputMode } from "@outfitter/cli/query";
14
12
  import { defineAction, Result } from "@outfitter/contracts";
15
13
  import { z } from "zod";
16
14
  var demoInputSchema = z.object({
@@ -40,7 +38,7 @@ var demoAction = defineAction({
40
38
  }
41
39
  ],
42
40
  mapInput: (context) => {
43
- const outputMode = resolveOutputModeFromContext(context.flags);
41
+ const { mode: outputMode } = resolveOutputMode(context.flags);
44
42
  const section = context.args[0];
45
43
  return {
46
44
  ...section !== undefined ? { section } : {},
@@ -1,4 +1,4 @@
1
- import { CliOutputMode } from "./outfitter-a79xrm12.js";
1
+ import { CliOutputMode } from "./outfitter-fhahf9f3.js";
2
2
  import { InternalError, NotFoundError, Result } from "@outfitter/contracts";
3
3
  /** Validated input for the docs.show action handler. */
4
4
  interface DocsShowInput {
@@ -2,40 +2,40 @@
2
2
  import {
3
3
  actionInternalErr,
4
4
  outputModeSchema,
5
- resolveCwdFromPreset,
6
- resolveOutputModeWithEnvFallback
7
- } from "./outfitter-7n7vsz95.js";
8
- import {
9
- printCheckDocsSentinelResult,
10
- runCheckDocsSentinel
11
- } from "./outfitter-fj2v5ffz.js";
5
+ resolveCwdFromPreset
6
+ } from "./outfitter-7t7ces1x.js";
12
7
  import {
13
8
  printCheckSurfaceMapFormatResult,
14
9
  runCheckSurfaceMapFormat
15
- } from "./outfitter-gyayfx5r.js";
10
+ } from "./outfitter-18s82np1.js";
11
+ import {
12
+ printCheckActionRegistryResult,
13
+ runCheckActionRegistry
14
+ } from "./outfitter-fgrqt6aq.js";
15
+ import {
16
+ printCheckDocsSentinelResult,
17
+ runCheckDocsSentinel
18
+ } from "./outfitter-d5kz9x7g.js";
16
19
  import {
17
20
  printCheckActionCeremonyResult,
18
21
  runCheckActionCeremony
19
- } from "./outfitter-p2wn07b7.js";
22
+ } from "./outfitter-t535h0mw.js";
23
+ import {
24
+ printCheckPublishGuardrailsResult,
25
+ runCheckPublishGuardrails
26
+ } from "./outfitter-ga59fa45.js";
20
27
  import {
21
28
  printCheckSurfaceMapResult,
22
29
  runCheckSurfaceMap
23
- } from "./outfitter-b9cpnr7e.js";
30
+ } from "./outfitter-x4f8v5vf.js";
24
31
  import {
25
32
  printCheckPresetVersionsResult,
26
33
  runCheckPresetVersions
27
- } from "./outfitter-8ggmja91.js";
28
- import {
29
- printCheckPublishGuardrailsResult,
30
- runCheckPublishGuardrails
31
- } from "./outfitter-ssynegbs.js";
32
- import {
33
- resolveStructuredOutputMode
34
- } from "./outfitter-7r12fj7f.js";
34
+ } from "./outfitter-zqj1nte1.js";
35
35
 
36
36
  // apps/outfitter/src/actions/check-automation.ts
37
37
  import { cwdPreset } from "@outfitter/cli/flags";
38
- import { outputModePreset } from "@outfitter/cli/query";
38
+ import { outputModePreset, resolveOutputMode } from "@outfitter/cli/query";
39
39
  import { defineAction, Result } from "@outfitter/contracts";
40
40
  import { z } from "zod";
41
41
  var checkAutomationInputSchema = z.object({
@@ -45,8 +45,7 @@ var checkAutomationInputSchema = z.object({
45
45
  var checkAutomationOutput = outputModePreset();
46
46
  var checkAutomationCwd = cwdPreset();
47
47
  function mapCheckAutomationInput(context) {
48
- const { outputMode: presetOutputMode } = checkAutomationOutput.resolve(context.flags);
49
- const outputMode = resolveOutputModeWithEnvFallback(context.flags, resolveStructuredOutputMode(presetOutputMode) ?? "human");
48
+ const { mode: outputMode } = resolveOutputMode(context.flags);
50
49
  return {
51
50
  cwd: resolveCwdFromPreset(context.flags, checkAutomationCwd),
52
51
  outputMode
@@ -211,5 +210,31 @@ var checkActionCeremonyAction = defineAction({
211
210
  return Result.ok(result.value);
212
211
  }
213
212
  });
213
+ var checkActionRegistryAction = defineAction({
214
+ id: "check.action-registry",
215
+ description: "Cross-reference command files against action registry for completeness",
216
+ surfaces: ["cli"],
217
+ input: checkAutomationInputSchema,
218
+ cli: {
219
+ group: "check",
220
+ command: "action-registry",
221
+ description: "Cross-reference command files against action registry for completeness",
222
+ options: [...checkAutomationOutput.options, ...checkAutomationCwd.options],
223
+ mapInput: mapCheckAutomationInput
224
+ },
225
+ handler: async (input) => {
226
+ const result = await runCheckActionRegistry({ cwd: input.cwd });
227
+ if (result.isErr()) {
228
+ return actionInternalErr("check.action-registry", result.error);
229
+ }
230
+ await printCheckActionRegistryResult(result.value, {
231
+ mode: input.outputMode
232
+ });
233
+ if (!result.value.ok) {
234
+ process.exit(1);
235
+ }
236
+ return Result.ok(result.value);
237
+ }
238
+ });
214
239
 
215
- export { checkPublishGuardrailsAction, checkPresetVersionsAction, checkSurfaceMapAction, checkSurfaceMapFormatAction, checkDocsSentinelAction, checkActionCeremonyAction };
240
+ export { checkPublishGuardrailsAction, checkPresetVersionsAction, checkSurfaceMapAction, checkSurfaceMapFormatAction, checkDocsSentinelAction, checkActionCeremonyAction, checkActionRegistryAction };
@@ -3,10 +3,13 @@ import {
3
3
  applyUpdatesToWorkspace,
4
4
  getInstalledPackagesFromWorkspace,
5
5
  runInstall
6
- } from "./outfitter-76k25svs.js";
6
+ } from "./outfitter-4c4q091c.js";
7
7
  import {
8
8
  buildMigrationGuides
9
9
  } from "./outfitter-jwxggvz4.js";
10
+ import {
11
+ writeUpgradeReportSafely
12
+ } from "./outfitter-7q9fnbwa.js";
10
13
  import {
11
14
  applyUpdates
12
15
  } from "./outfitter-f3a70135.js";
@@ -25,9 +28,6 @@ import {
25
28
  findMigrationDocsDir,
26
29
  readMigrationBreakingFlag
27
30
  } from "./outfitter-fx1m251y.js";
28
- import {
29
- writeUpgradeReportSafely
30
- } from "./outfitter-7q9fnbwa.js";
31
31
  import {
32
32
  __require
33
33
  } from "./outfitter-eepj7rf7.js";
@@ -1,10 +1,13 @@
1
1
  // @bun
2
2
  import {
3
- sanitizePackageName
4
- } from "./outfitter-4q1zfmvc.js";
3
+ serializePackageJson
4
+ } from "./outfitter-5gaptj9b.js";
5
5
  import {
6
6
  ScaffoldError
7
7
  } from "./outfitter-8y2dfx6n.js";
8
+ import {
9
+ sanitizePackageName
10
+ } from "./outfitter-4q1zfmvc.js";
8
11
 
9
12
  // apps/outfitter/src/engine/workspace.ts
10
13
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
@@ -82,8 +85,7 @@ function buildWorkspaceRootPackageJson(workspaceName) {
82
85
  format: "bun run --filter '*' format"
83
86
  }
84
87
  };
85
- return `${JSON.stringify(workspacePackage, null, 2)}
86
- `;
88
+ return serializePackageJson(workspacePackage);
87
89
  }
88
90
  function scaffoldWorkspaceRoot(rootDir, workspaceName, force) {
89
91
  const packageJsonPath = join(rootDir, "package.json");
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  readManifest
4
- } from "./outfitter-ypcvwg1s.js";
4
+ } from "./outfitter-srznx3hj.js";
5
5
  import {
6
6
  resolveStructuredOutputMode
7
- } from "./outfitter-7r12fj7f.js";
7
+ } from "./outfitter-sxf8jjjn.js";
8
8
 
9
9
  // apps/outfitter/src/commands/check.ts
10
10
  import { existsSync, readFileSync } from "fs";
@@ -285,7 +285,7 @@ async function runCheck(options) {
285
285
  async function printCheckResults(result, options) {
286
286
  const structuredMode = resolveStructuredOutputMode(options?.mode);
287
287
  if (structuredMode) {
288
- await output(result, { mode: structuredMode });
288
+ await output(result, structuredMode);
289
289
  return;
290
290
  }
291
291
  const theme = createTheme();
@@ -336,7 +336,7 @@ async function printCheckResults(result, options) {
336
336
  lines.push("");
337
337
  lines.push(theme.muted("No blocks found. If this is a workspace root, run 'outfitter check' from an app or package directory."));
338
338
  }
339
- await output(lines, { mode: "human" });
339
+ await output(lines, "human");
340
340
  }
341
341
 
342
342
  export { CheckError, runCheck, printCheckResults };
@@ -21,6 +21,10 @@ type ScaffoldChange = {
21
21
  readonly targetDir: string;
22
22
  readonly includeTooling: boolean;
23
23
  readonly overlayBaseTemplate: boolean;
24
+ } | {
25
+ readonly type: "copy-example-overlay";
26
+ readonly preset: string;
27
+ readonly targetDir: string;
24
28
  } | {
25
29
  readonly type: "inject-shared-config";
26
30
  } | {
@@ -4,7 +4,7 @@ import {
4
4
  } from "./outfitter-svts4wk2.js";
5
5
  import {
6
6
  resolveStructuredOutputMode
7
- } from "./outfitter-7r12fj7f.js";
7
+ } from "./outfitter-sxf8jjjn.js";
8
8
 
9
9
  // apps/outfitter/src/commands/check-docs-sentinel.ts
10
10
  import { readFile } from "fs/promises";
@@ -3,23 +3,22 @@ import {
3
3
  actionInternalErr,
4
4
  outputModeSchema,
5
5
  resolveCwdFromPreset,
6
- resolveOutputModeWithEnvFallback,
7
6
  resolveStringFlag
8
- } from "./outfitter-7n7vsz95.js";
7
+ } from "./outfitter-7t7ces1x.js";
9
8
  import {
10
9
  printCheckOrchestratorResults,
11
10
  runCheckOrchestrator
12
- } from "./outfitter-84chvazx.js";
11
+ } from "./outfitter-hw9f0zq9.js";
13
12
  import {
14
13
  runCheckTsdoc
15
14
  } from "./outfitter-507ra35w.js";
16
15
  import {
17
16
  printCheckResults,
18
17
  runCheck
19
- } from "./outfitter-ssrtakh3.js";
18
+ } from "./outfitter-c50y6yr3.js";
20
19
  import {
21
20
  resolveStructuredOutputMode
22
- } from "./outfitter-7r12fj7f.js";
21
+ } from "./outfitter-sxf8jjjn.js";
23
22
 
24
23
  // apps/outfitter/src/actions/check.ts
25
24
  import {
@@ -27,7 +26,11 @@ import {
27
26
  cwdPreset,
28
27
  verbosePreset
29
28
  } from "@outfitter/cli/flags";
30
- import { jqPreset, outputModePreset } from "@outfitter/cli/query";
29
+ import {
30
+ jqPreset,
31
+ outputModePreset,
32
+ resolveOutputMode
33
+ } from "@outfitter/cli/query";
31
34
  import {
32
35
  defineAction,
33
36
  Result,
@@ -35,6 +38,7 @@ import {
35
38
  } from "@outfitter/contracts";
36
39
  import { z } from "zod";
37
40
  var checkOrchestratorModes = ["all", "ci", "pre-commit", "pre-push"];
41
+ var CHECK_COMMAND_PROFILE_ENV = "OUTFITTER_CHECK_COMMAND_PROFILE";
38
42
  var checkInputSchema = z.object({
39
43
  compact: z.boolean(),
40
44
  cwd: z.string(),
@@ -121,13 +125,14 @@ var checkAction = defineAction({
121
125
  mapInput: (context) => {
122
126
  const mode = resolveCheckMode(context.flags);
123
127
  const { compact } = checkCompact.resolve(context.flags);
124
- const { outputMode: presetOutputMode } = checkOutputMode.resolve(context.flags);
125
128
  const block = resolveStringFlag(context.flags["block"]);
126
129
  if (mode !== undefined && block !== undefined) {
127
130
  throw ValidationError.fromMessage("--block cannot be combined with orchestrator mode flags.");
128
131
  }
129
132
  const stagedFiles = mode === "pre-commit" ? context.args.filter((arg) => typeof arg === "string" && arg.trim().length > 0) : undefined;
130
- const outputMode = resolveOutputModeWithEnvFallback(context.flags, resolveStructuredOutputMode(presetOutputMode) ?? "human", { forceHumanWhenImplicit: mode !== undefined });
133
+ const { mode: outputMode } = resolveOutputMode(context.flags, {
134
+ forceHumanWhenImplicit: mode !== undefined
135
+ });
131
136
  const { verbose } = checkVerbose.resolve(context.flags);
132
137
  const manifestOnly = Boolean(context.flags["manifestOnly"]);
133
138
  return {
@@ -145,9 +150,13 @@ var checkAction = defineAction({
145
150
  handler: async (input) => {
146
151
  const { outputMode, mode, stagedFiles, compact, ...checkInput } = input;
147
152
  if (mode !== undefined) {
153
+ const commandProfile = process.env[CHECK_COMMAND_PROFILE_ENV] === "hook" ? "hook" : "default";
154
+ const liveOutput = resolveStructuredOutputMode(outputMode) === undefined;
148
155
  const orchestratorResult = await runCheckOrchestrator({
156
+ commandProfile,
149
157
  cwd: checkInput.cwd,
150
158
  mode,
159
+ streamOutput: liveOutput,
151
160
  ...stagedFiles && stagedFiles.length > 0 ? { stagedFiles } : {}
152
161
  });
153
162
  if (orchestratorResult.isErr()) {
@@ -155,6 +164,7 @@ var checkAction = defineAction({
155
164
  }
156
165
  await printCheckOrchestratorResults(orchestratorResult.value, {
157
166
  compact,
167
+ liveOutput,
158
168
  mode: outputMode
159
169
  });
160
170
  if (!orchestratorResult.value.ok) {
@@ -255,9 +265,8 @@ var checkTsdocAction = defineAction({
255
265
  ...checkTsdocJq.options
256
266
  ],
257
267
  mapInput: (context) => {
258
- const { outputMode: presetOutputMode } = checkTsdocOutputMode.resolve(context.flags);
259
268
  const { jq } = checkTsdocJq.resolve(context.flags);
260
- const outputMode = resolveOutputModeWithEnvFallback(context.flags, resolveStructuredOutputMode(presetOutputMode) ?? "human");
269
+ const { mode: outputMode } = resolveOutputMode(context.flags);
261
270
  const minCoverageRaw = context.flags["minCoverage"] ?? context.flags["min-coverage"];
262
271
  let minCoverage = 0;
263
272
  if (typeof minCoverageRaw === "string") {
@@ -4,7 +4,7 @@ import {
4
4
  } from "./outfitter-svts4wk2.js";
5
5
  import {
6
6
  resolveStructuredOutputMode
7
- } from "./outfitter-7r12fj7f.js";
7
+ } from "./outfitter-sxf8jjjn.js";
8
8
 
9
9
  // apps/outfitter/src/commands/docs-export.ts
10
10
  import { resolve } from "path";
@@ -47,7 +47,7 @@ async function runDocsExport(input, dependencies) {
47
47
  async function printDocsExportResults(result, options) {
48
48
  const structuredMode = resolveStructuredOutputMode(options?.mode);
49
49
  if (structuredMode) {
50
- await output(result, { mode: structuredMode });
50
+ await output(result, structuredMode);
51
51
  return;
52
52
  }
53
53
  const lines = [];
@@ -65,7 +65,7 @@ async function printDocsExportResults(result, options) {
65
65
  lines.push(` ${warning}`);
66
66
  }
67
67
  }
68
- await output(lines, { mode: "human" });
68
+ await output(lines, "human");
69
69
  }
70
70
 
71
71
  export { runDocsExport, printDocsExportResults };
@@ -1,14 +1,23 @@
1
- import { InitPresetId } from "./outfitter-5d9wbzhh.js";
2
- import { TargetDefinition } from "./outfitter-58rn1sj1.js";
1
+ import { InitPresetId } from "./outfitter-11r5ny73.js";
2
+ import { TargetDefinition } from "./outfitter-gsjbcta2.js";
3
3
  import { PostScaffoldResult } from "./outfitter-hcexcvxe.js";
4
4
  import { Result } from "@outfitter/contracts";
5
5
  import { AddBlockResult } from "@outfitter/tooling";
6
+ /**
7
+ * Validates an `--example` flag value against the preset's available examples.
8
+ * @returns The validated example overlay directory name, or an error message.
9
+ */
10
+ declare function validateExample(preset: string, example: string): Result<string, string>;
6
11
  /** Whether the project is a standalone package or a workspace with nested packages. */
7
12
  type InitStructure = "single" | "workspace";
8
13
  /** Fully resolved inputs for the init execution pipeline, after interactive/non-interactive resolution. */
9
14
  interface ResolvedInitExecutionInput {
10
15
  readonly binName?: string | undefined;
11
16
  readonly blocksOverride?: readonly string[];
17
+ /** Example overlay name (e.g., "todo" for cli, "files" for mcp). */
18
+ readonly example?: string | undefined;
19
+ /** Resolved example overlay directory name (e.g., "_examples/cli-todo"). Set by pipeline after validation. */
20
+ readonly exampleOverlayDir?: string | undefined;
12
21
  readonly includeTooling: boolean;
13
22
  readonly local: boolean;
14
23
  readonly packageName: string;
@@ -49,4 +58,4 @@ interface InitExecutionResult {
49
58
  * @returns The init result on success, or an error message string on failure
50
59
  */
51
60
  declare function executeInitPipeline(input: ResolvedInitExecutionInput, target: TargetDefinition, options: InitExecutionOptions): Promise<Result<InitExecutionResult, string>>;
52
- export { InitStructure, ResolvedInitExecutionInput, InitExecutionOptions, InitExecutionResult, executeInitPipeline };
61
+ export { validateExample, InitStructure, ResolvedInitExecutionInput, InitExecutionOptions, InitExecutionResult, executeInitPipeline };
@@ -1,10 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  stampBlock
4
- } from "./outfitter-ypcvwg1s.js";
4
+ } from "./outfitter-srznx3hj.js";
5
5
  import {
6
6
  resolveStructuredOutputMode
7
- } from "./outfitter-7r12fj7f.js";
7
+ } from "./outfitter-sxf8jjjn.js";
8
+ import {
9
+ serializePackageJson
10
+ } from "./outfitter-5gaptj9b.js";
8
11
 
9
12
  // apps/outfitter/src/commands/add.ts
10
13
  import {
@@ -163,8 +166,7 @@ function updatePackageJson(cwd, dependencies, devDependencies, dryRun) {
163
166
  if (Object.keys(existingDevDeps).length > 0) {
164
167
  pkg["devDependencies"] = existingDevDeps;
165
168
  }
166
- writeFileSync(packageJsonPath, `${JSON.stringify(pkg, null, 2)}
167
- `);
169
+ writeFileSync(packageJsonPath, serializePackageJson(pkg));
168
170
  }
169
171
  return { dependencies: addedDeps, devDependencies: addedDevDeps };
170
172
  }
@@ -228,7 +230,7 @@ async function printAddResults(result, dryRun, options) {
228
230
  skipped: result.skipped,
229
231
  dependencies: result.dependencies,
230
232
  devDependencies: result.devDependencies
231
- }, { mode: structuredMode });
233
+ }, structuredMode);
232
234
  return;
233
235
  }
234
236
  const lines = [];
@@ -264,7 +266,7 @@ async function printAddResults(result, dryRun, options) {
264
266
  lines.push("", "Run `bun install` to install new dependencies.");
265
267
  }
266
268
  }
267
- await output(lines, { mode: "human" });
269
+ await output(lines, "human");
268
270
  }
269
271
  function listBlocks() {
270
272
  const registryResult = loadRegistry();