outfitter 0.3.4 → 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-dmfac1w9.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-xwzjgswj.js → outfitter-hw9f0zq9.js} +57 -21
  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-1gmrtapz.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-yywcypw8.js +0 -53
@@ -0,0 +1,88 @@
1
+ // @bun
2
+ import {
3
+ resolveScaffoldE2EPresets
4
+ } from "./outfitter-x0r7mfvy.js";
5
+ import {
6
+ resolveScaffoldE2EProfile
7
+ } from "./outfitter-4bs5a2n4.js";
8
+ import {
9
+ DEFAULT_SCAFFOLD_E2E_RETENTION_MS
10
+ } from "./outfitter-z6tg0swx.js";
11
+
12
+ // apps/outfitter/src/scaffold-e2e/cli.ts
13
+ function parseScaffoldE2EArgs(argv) {
14
+ let clean = false;
15
+ let keep = process.env["OUTFITTER_SCAFFOLD_E2E_KEEP"] === "1";
16
+ let rootDir = process.env["OUTFITTER_SCAFFOLD_E2E_ROOT"];
17
+ let maxAgeMs = DEFAULT_SCAFFOLD_E2E_RETENTION_MS;
18
+ let profile = "default";
19
+ const presets = [];
20
+ for (let index = 0;index < argv.length; index += 1) {
21
+ const arg = argv[index];
22
+ if (arg === "--clean") {
23
+ clean = true;
24
+ continue;
25
+ }
26
+ if (arg === "--ci") {
27
+ profile = "ci";
28
+ continue;
29
+ }
30
+ if (arg === "--keep") {
31
+ keep = true;
32
+ continue;
33
+ }
34
+ if (arg === "--root") {
35
+ const value = argv[index + 1];
36
+ if (!value) {
37
+ throw new Error("Missing value for --root");
38
+ }
39
+ rootDir = value;
40
+ index += 1;
41
+ continue;
42
+ }
43
+ if (arg === "--max-age-hours") {
44
+ const value = argv[index + 1];
45
+ if (!value) {
46
+ throw new Error("Missing value for --max-age-hours");
47
+ }
48
+ const hours = Number(value);
49
+ if (!Number.isFinite(hours) || hours < 0) {
50
+ throw new Error(`Invalid --max-age-hours value: ${value}`);
51
+ }
52
+ maxAgeMs = hours * 60 * 60 * 1000;
53
+ index += 1;
54
+ continue;
55
+ }
56
+ if (arg === "--preset") {
57
+ const value = argv[index + 1];
58
+ if (!value) {
59
+ throw new Error("Missing value for --preset");
60
+ }
61
+ presets.push(value);
62
+ index += 1;
63
+ continue;
64
+ }
65
+ throw new Error(`Unknown argument: ${arg}`);
66
+ }
67
+ if (clean && presets.length > 0) {
68
+ throw new Error("--clean cannot be combined with --preset");
69
+ }
70
+ return {
71
+ clean,
72
+ keep,
73
+ maxAgeMs,
74
+ presets: presets.length > 0 ? presets : undefined,
75
+ profile,
76
+ rootDir
77
+ };
78
+ }
79
+ function resolveScaffoldE2EScriptPlan(args) {
80
+ const profile = resolveScaffoldE2EProfile(args.profile);
81
+ const presets = args.presets ? resolveScaffoldE2EPresets(args.presets) : profile.presets;
82
+ return {
83
+ profile,
84
+ presets
85
+ };
86
+ }
87
+
88
+ export { parseScaffoldE2EArgs, resolveScaffoldE2EScriptPlan };
@@ -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-search.ts
13
13
  import { readFile } from "fs/promises";
@@ -82,7 +82,7 @@ async function printDocsSearchResults(result, options) {
82
82
  });
83
83
  process.stdout.write(filtered);
84
84
  } else {
85
- await output(result, { mode: structuredMode });
85
+ await output(result, structuredMode);
86
86
  }
87
87
  return;
88
88
  }
@@ -90,7 +90,7 @@ async function printDocsSearchResults(result, options) {
90
90
  const lines = [];
91
91
  if (result.total === 0) {
92
92
  lines.push(theme.muted(`No documentation entries matched "${result.query}".`));
93
- await output(lines, { mode: "human" });
93
+ await output(lines, "human");
94
94
  return;
95
95
  }
96
96
  lines.push("");
@@ -111,7 +111,7 @@ async function printDocsSearchResults(result, options) {
111
111
  }
112
112
  lines.push("");
113
113
  }
114
- await output(lines, { mode: "human" });
114
+ await output(lines, "human");
115
115
  }
116
116
 
117
117
  export { runDocsSearch, printDocsSearchResults };
@@ -60,7 +60,7 @@ async function writeManifest(cwd, manifest) {
60
60
  } else {
61
61
  mkdirSync(dirPath, { recursive: true });
62
62
  }
63
- const content = JSON.stringify(manifest, null, "\t");
63
+ const content = JSON.stringify(manifest, null, 2);
64
64
  await Bun.write(path, `${content}
65
65
  `);
66
66
  return Result.ok(undefined);
@@ -1,13 +1,13 @@
1
1
  // @bun
2
+ import {
3
+ OperationCollector
4
+ } from "./outfitter-1h7k8xxt.js";
2
5
  import {
3
6
  renderOperationPlan
4
- } from "./outfitter-ttjr95y9.js";
7
+ } from "./outfitter-7krhbg3b.js";
5
8
  import {
6
9
  resolveStructuredOutputMode
7
- } from "./outfitter-7r12fj7f.js";
8
- import {
9
- OperationCollector
10
- } from "./outfitter-1h7k8xxt.js";
10
+ } from "./outfitter-sxf8jjjn.js";
11
11
 
12
12
  // apps/outfitter/src/commands/init-output.ts
13
13
  import { realpath } from "fs/promises";
@@ -29,7 +29,7 @@ async function printInitResults(result, options) {
29
29
  preset: result.preset,
30
30
  packageName: result.packageName,
31
31
  ...result.dryRunPlan
32
- }, { mode: structuredMode });
32
+ }, structuredMode);
33
33
  return;
34
34
  }
35
35
  const collector = new OperationCollector;
@@ -49,7 +49,7 @@ async function printInitResults(result, options) {
49
49
  blocksAdded: result.blocksAdded ?? null,
50
50
  postScaffold: result.postScaffold,
51
51
  nextSteps: result.postScaffold.nextSteps
52
- }, { mode: structuredMode });
52
+ }, structuredMode);
53
53
  return;
54
54
  }
55
55
  const lines = [
@@ -95,7 +95,7 @@ async function printInitResults(result, options) {
95
95
  for (const step of result.postScaffold.nextSteps) {
96
96
  lines.push(` ${step}`);
97
97
  }
98
- await output(lines, { mode: "human" });
98
+ await output(lines, "human");
99
99
  }
100
100
 
101
101
  export { printInitResults };
@@ -0,0 +1,7 @@
1
+ // @bun
2
+ // apps/outfitter/src/output-mode.ts
3
+ function resolveStructuredOutputMode(mode) {
4
+ return mode === "json" || mode === "jsonl" ? mode : undefined;
5
+ }
6
+
7
+ export { resolveStructuredOutputMode };
@@ -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/commands/check-action-ceremony.ts
7
7
  import { readdirSync } from "fs";
@@ -1,4 +1,4 @@
1
- import { CliOutputMode } from "./outfitter-a79xrm12.js";
1
+ import { CliOutputMode } from "./outfitter-fhahf9f3.js";
2
2
  import { InternalError, Result } from "@outfitter/contracts";
3
3
  /** Validated input for the docs.list action handler. */
4
4
  interface DocsListInput {
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  runAdd
4
- } from "./outfitter-3tx3adgj.js";
4
+ } from "./outfitter-ez7qffv5.js";
5
5
  import {
6
6
  ScaffoldError
7
7
  } from "./outfitter-8y2dfx6n.js";
@@ -5,27 +5,27 @@ import {
5
5
  detectProjectStructure,
6
6
  ensureWorkspacePattern,
7
7
  validateScaffoldTargetName
8
- } from "./outfitter-qsd5638j.js";
8
+ } from "./outfitter-n9jp1abt.js";
9
9
  import {
10
10
  getScaffoldTarget
11
11
  } from "./outfitter-g3hvjshg.js";
12
+ import {
13
+ printScaffoldResults
14
+ } from "./outfitter-00wxeg2g.js";
12
15
  import {
13
16
  deriveProjectName,
14
17
  executePlan,
15
18
  isPathWithin
16
- } from "./outfitter-q1g58t85.js";
19
+ } from "./outfitter-gvpwpqnc.js";
17
20
  import {
18
- printScaffoldResults
19
- } from "./outfitter-qsrx7m4w.js";
21
+ OperationCollector
22
+ } from "./outfitter-1h7k8xxt.js";
20
23
  import {
21
24
  runPostScaffold
22
- } from "./outfitter-4s9meh3j.js";
25
+ } from "./outfitter-4w9sc6bw.js";
23
26
  import {
24
27
  scaffoldWorkspaceRoot
25
- } from "./outfitter-1fy7byz5.js";
26
- import {
27
- OperationCollector
28
- } from "./outfitter-1h7k8xxt.js";
28
+ } from "./outfitter-bsjq8gkk.js";
29
29
 
30
30
  // apps/outfitter/src/commands/scaffold.ts
31
31
  import { existsSync } from "fs";
@@ -166,7 +166,6 @@ function scaffoldCommand(program) {
166
166
  program.command("scaffold <target> [name]").description("Add a capability to an existing project").option("-f, --force", "Overwrite existing files", false).option("--skip-install", "Skip bun install", false).option("--dry-run", "Preview changes without executing", false).option("--with <blocks>", "Comma-separated tooling blocks to add").option("--no-tooling", "Skip default tooling blocks").option("--local", "Use workspace:* for @outfitter dependencies").option("--install-timeout <ms>", "bun install timeout in ms").action(async (target, name, _flags, command) => {
167
167
  const resolvedFlags = command.optsWithGlobals();
168
168
  const mode = resolvedFlags.json ? "json" : undefined;
169
- const outputOptions = mode ? { mode } : undefined;
170
169
  const result = await runScaffold({
171
170
  target,
172
171
  name,
@@ -180,10 +179,10 @@ function scaffoldCommand(program) {
180
179
  ...resolvedFlags.installTimeout !== undefined ? { installTimeout: resolvedFlags.installTimeout } : {}
181
180
  });
182
181
  if (result.isErr()) {
183
- exitWithError(result.error, outputOptions);
182
+ exitWithError(result.error, mode);
184
183
  return;
185
184
  }
186
- await printScaffoldResults(result.value, outputOptions);
185
+ await printScaffoldResults(result.value, mode ? { mode } : undefined);
187
186
  });
188
187
  }
189
188
 
@@ -5,7 +5,7 @@ import {
5
5
  } from "./outfitter-fx1m251y.js";
6
6
  import {
7
7
  resolveStructuredOutputMode
8
- } from "./outfitter-7r12fj7f.js";
8
+ } from "./outfitter-sxf8jjjn.js";
9
9
 
10
10
  // apps/outfitter/src/commands/upgrade-output.ts
11
11
  import { output } from "@outfitter/cli";
@@ -13,7 +13,7 @@ import { createTheme } from "@outfitter/tui/render";
13
13
  async function printUpgradeResults(result, options) {
14
14
  const structuredMode = resolveStructuredOutputMode(options?.mode);
15
15
  if (structuredMode) {
16
- await output(result, { mode: structuredMode });
16
+ await output(result, structuredMode);
17
17
  return;
18
18
  }
19
19
  const theme = createTheme();
@@ -21,7 +21,7 @@ async function printUpgradeResults(result, options) {
21
21
  if (result.packages.length === 0) {
22
22
  lines.push("No @outfitter/* packages found in package.json.");
23
23
  if (!result.unknownPackages || result.unknownPackages.length === 0) {
24
- await output(lines, { mode: "human" });
24
+ await output(lines, "human");
25
25
  return;
26
26
  }
27
27
  lines.push("");
@@ -162,7 +162,7 @@ async function printUpgradeResults(result, options) {
162
162
  lines.push("", theme.muted("Migration docs not found locally. See https://github.com/outfitter-dev/outfitter for migration guides."));
163
163
  }
164
164
  }
165
- await output(lines, { mode: "human" });
165
+ await output(lines, "human");
166
166
  }
167
167
 
168
168
  export { printUpgradeResults };
@@ -0,0 +1,56 @@
1
+ // @bun
2
+ import {
3
+ upgradeAction,
4
+ upgradeCodemodAction
5
+ } from "./outfitter-0xp447gf.js";
6
+ import {
7
+ createAction,
8
+ initAction,
9
+ initBasicAction,
10
+ initCliAction,
11
+ initDaemonAction,
12
+ initFullStackAction,
13
+ initLibraryAction,
14
+ initMcpAction
15
+ } from "./outfitter-4t818mq5.js";
16
+ import {
17
+ docsApiAction,
18
+ docsExportAction,
19
+ docsListAction,
20
+ docsSearchAction,
21
+ docsShowAction
22
+ } from "./outfitter-zmzrsvcn.js";
23
+ import {
24
+ doctorAction
25
+ } from "./outfitter-0cspz333.js";
26
+ import {
27
+ demoAction
28
+ } from "./outfitter-93e1shd4.js";
29
+ import {
30
+ checkAction,
31
+ checkTsdocAction
32
+ } from "./outfitter-dna8exj2.js";
33
+ import {
34
+ addAction,
35
+ listBlocksAction
36
+ } from "./outfitter-247et71q.js";
37
+ import {
38
+ checkActionCeremonyAction,
39
+ checkActionRegistryAction,
40
+ checkDocsSentinelAction,
41
+ checkPresetVersionsAction,
42
+ checkPublishGuardrailsAction,
43
+ checkSurfaceMapAction,
44
+ checkSurfaceMapFormatAction
45
+ } from "./outfitter-aa5nzw14.js";
46
+ import {
47
+ scaffoldAction
48
+ } from "./outfitter-3f261xh0.js";
49
+
50
+ // apps/outfitter/src/actions.ts
51
+ import {
52
+ createActionRegistry
53
+ } from "@outfitter/contracts";
54
+ var outfitterActions = createActionRegistry().add(createAction).add(scaffoldAction).add(initAction).add(initBasicAction).add(initCliAction).add(initMcpAction).add(initDaemonAction).add(initLibraryAction).add(initFullStackAction).add(demoAction).add(doctorAction).add(addAction).add(listBlocksAction).add(checkAction).add(checkTsdocAction).add(checkPublishGuardrailsAction).add(checkPresetVersionsAction).add(checkSurfaceMapAction).add(checkSurfaceMapFormatAction).add(checkDocsSentinelAction).add(checkActionCeremonyAction).add(checkActionRegistryAction).add(upgradeAction).add(upgradeCodemodAction).add(docsListAction).add(docsShowAction).add(docsSearchAction).add(docsApiAction).add(docsExportAction);
55
+
56
+ export { outfitterActions };
@@ -0,0 +1,142 @@
1
+ // @bun
2
+ import {
3
+ DEFAULT_SCAFFOLD_E2E_PRESETS,
4
+ resolveScaffoldE2EProfile
5
+ } from "./outfitter-4bs5a2n4.js";
6
+ import {
7
+ isValidInitPreset
8
+ } from "./outfitter-xg5yryp2.js";
9
+
10
+ // apps/outfitter/src/scaffold-e2e/runner.ts
11
+ import { existsSync } from "fs";
12
+ import { join } from "path";
13
+ function resolveScaffoldCliEntry(baseDir, fileExists = existsSync) {
14
+ const sourceEntry = join(baseDir, "..", "cli.ts");
15
+ if (fileExists(sourceEntry)) {
16
+ return sourceEntry;
17
+ }
18
+ const builtEntry = join(baseDir, "..", "cli.js");
19
+ if (fileExists(builtEntry)) {
20
+ return builtEntry;
21
+ }
22
+ throw new Error(`Unable to resolve outfitter CLI entry from ${baseDir}`);
23
+ }
24
+ var cliEntry = resolveScaffoldCliEntry(import.meta.dir);
25
+ var repoRoot = join(import.meta.dir, "..", "..", "..", "..");
26
+ function createProjectName(preset) {
27
+ return `scaffold-e2e-${preset}`;
28
+ }
29
+ function resolveScaffoldE2EPresets(values) {
30
+ if (!values || values.length === 0) {
31
+ return DEFAULT_SCAFFOLD_E2E_PRESETS;
32
+ }
33
+ const presets = values.flatMap((value) => value.split(",").map((part) => part.trim()).filter((part) => part.length > 0));
34
+ const invalid = presets.filter((preset) => !isValidInitPreset(preset));
35
+ if (invalid.length > 0) {
36
+ throw new Error(`Unknown scaffold E2E preset(s): ${invalid.join(", ")}. Available presets: ${DEFAULT_SCAFFOLD_E2E_PRESETS.join(", ")}`);
37
+ }
38
+ return [...new Set(presets)];
39
+ }
40
+ async function runCommand(cwd, command, timeoutMs) {
41
+ const proc = Bun.spawn([...command], {
42
+ cwd,
43
+ stdout: "pipe",
44
+ stderr: "pipe"
45
+ });
46
+ const timeout = new Promise((resolveTimeout) => {
47
+ const timer = setTimeout(() => resolveTimeout("timeout"), timeoutMs);
48
+ proc.exited.finally(() => clearTimeout(timer));
49
+ });
50
+ const race = await Promise.race([proc.exited.then(() => "exit"), timeout]);
51
+ if (race === "timeout") {
52
+ proc.kill("SIGKILL");
53
+ }
54
+ const [exitCode, stdout, stderr] = await Promise.all([
55
+ proc.exited,
56
+ new Response(proc.stdout).text(),
57
+ new Response(proc.stderr).text()
58
+ ]);
59
+ return {
60
+ exitCode,
61
+ stdout,
62
+ stderr,
63
+ timedOut: race === "timeout"
64
+ };
65
+ }
66
+ function assertCommandSuccess(preset, step, result) {
67
+ if (result.timedOut) {
68
+ throw new Error(`[${preset}] ${step} timed out.
69
+ stdout:
70
+ ${result.stdout}
71
+ stderr:
72
+ ${result.stderr}`);
73
+ }
74
+ if (result.exitCode !== 0) {
75
+ throw new Error(`[${preset}] ${step} failed with exit code ${result.exitCode}.
76
+ stdout:
77
+ ${result.stdout}
78
+ stderr:
79
+ ${result.stderr}`);
80
+ }
81
+ }
82
+ async function runInitViaCli(targetDir, name, preset, timeoutMs) {
83
+ return runCommand(repoRoot, [
84
+ "bun",
85
+ cliEntry,
86
+ "init",
87
+ targetDir,
88
+ "--name",
89
+ name,
90
+ "--preset",
91
+ preset,
92
+ "--yes",
93
+ "--skip-install",
94
+ "--skip-git",
95
+ "--skip-commit"
96
+ ], timeoutMs);
97
+ }
98
+ async function runScaffoldE2ESuite(options) {
99
+ const profile = resolveScaffoldE2EProfile(options.profile);
100
+ const timeoutMs = options.timeoutMs ?? profile.commandTimeoutMs;
101
+ const presets = options.presets ?? profile.presets;
102
+ const results = [];
103
+ for (const preset of presets) {
104
+ const presetStartedAt = Date.now();
105
+ process.stderr.write(`[scaffold-e2e] starting preset: ${preset}
106
+ `);
107
+ const targetDir = join(options.runDir, preset);
108
+ const steps = [];
109
+ const initStartedAt = Date.now();
110
+ const init = await runInitViaCli(targetDir, createProjectName(preset), preset, timeoutMs);
111
+ assertCommandSuccess(preset, "outfitter init", init);
112
+ steps.push({
113
+ command: "outfitter init",
114
+ durationMs: Date.now() - initStartedAt
115
+ });
116
+ const installStartedAt = Date.now();
117
+ const install = await runCommand(targetDir, ["bun", "install"], timeoutMs);
118
+ assertCommandSuccess(preset, "bun install", install);
119
+ steps.push({
120
+ command: "bun install",
121
+ durationMs: Date.now() - installStartedAt
122
+ });
123
+ const verifyStartedAt = Date.now();
124
+ const verify = await runCommand(targetDir, ["bun", "run", "verify:ci"], timeoutMs);
125
+ assertCommandSuccess(preset, "bun run verify:ci", verify);
126
+ steps.push({
127
+ command: "bun run verify:ci",
128
+ durationMs: Date.now() - verifyStartedAt
129
+ });
130
+ results.push({
131
+ preset,
132
+ targetDir,
133
+ steps
134
+ });
135
+ const presetDurationMs = Date.now() - presetStartedAt;
136
+ process.stderr.write(`[scaffold-e2e] completed preset: ${preset} (${presetDurationMs}ms)
137
+ `);
138
+ }
139
+ return results;
140
+ }
141
+
142
+ export { resolveScaffoldCliEntry, resolveScaffoldE2EPresets, runScaffoldE2ESuite };
@@ -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/commands/check-surface-map.ts
7
7
  import { resolve } from "path";
@@ -1,4 +1,4 @@
1
- import { CliOutputMode } from "./outfitter-a79xrm12.js";
1
+ import { CliOutputMode } from "./outfitter-fhahf9f3.js";
2
2
  import { DocsExportTarget, loadDocsModule } from "./outfitter-1tfa9hke.js";
3
3
  import { InternalError, Result } from "@outfitter/contracts";
4
4
  /** Validated input for the docs.action handler. */
@@ -1,4 +1,4 @@
1
- import { EngineOptions, PlaceholderValues, ScaffoldError } from "./outfitter-cyvr4r8d.js";
1
+ import { EngineOptions, PlaceholderValues, ScaffoldError } from "./outfitter-crxe5gth.js";
2
2
  import { Result } from "@outfitter/contracts";
3
3
  /**
4
4
  * Get the directory containing scaffold preset files.
@@ -8,6 +8,7 @@ declare function getPresetsBaseDir(): string;
8
8
  declare function getOutputFilename(templateFilename: string): string;
9
9
  declare function isBinaryFile(filename: string): boolean;
10
10
  declare function replacePlaceholders(content: string, values: PlaceholderValues): string;
11
+ declare function sortLeadingImports(filePath: string, content: string): string;
11
12
  declare function copyPresetFiles(presetDir: string, targetDir: string, values: PlaceholderValues, options: EngineOptions, copyOptions?: {
12
13
  readonly allowOverwrite?: boolean;
13
14
  readonly overwritablePaths?: ReadonlySet<string>;
@@ -15,4 +16,4 @@ declare function copyPresetFiles(presetDir: string, targetDir: string, values: P
15
16
  readonly skipFilter?: (relativePath: string) => boolean;
16
17
  readonly relativePrefix?: string;
17
18
  }): Result<void, ScaffoldError>;
18
- export { getPresetsBaseDir, getOutputFilename, isBinaryFile, replacePlaceholders, copyPresetFiles };
19
+ export { getPresetsBaseDir, getOutputFilename, isBinaryFile, replacePlaceholders, sortLeadingImports, copyPresetFiles };
@@ -12,7 +12,7 @@ function isBinaryPreset(preset) {
12
12
  return preset === "cli" || preset === "daemon";
13
13
  }
14
14
  function isValidInitPreset(value) {
15
- return value === "minimal" || value === "cli" || value === "mcp" || value === "daemon" || value === "library" || value === "full-stack";
15
+ return value === "minimal" || value === "basic" || value === "cli" || value === "mcp" || value === "daemon" || value === "library" || value === "full-stack";
16
16
  }
17
17
  function resolvePresetFromFlags(presetFromFlag, availablePresetIds) {
18
18
  if (!presetFromFlag) {
@@ -2,6 +2,7 @@ import { OutputMode } from "@outfitter/cli/types";
2
2
  import { Result } from "@outfitter/contracts";
3
3
  /** Check bundle mode controlling which steps are included and whether a clean tree is enforced. */
4
4
  type CheckOrchestratorMode = "all" | "ci" | "pre-commit" | "pre-push";
5
+ type CheckOrchestratorCommandProfile = "default" | "hook";
5
6
  interface CheckOrchestratorStep {
6
7
  readonly command: readonly string[];
7
8
  readonly id: string;
@@ -9,11 +10,15 @@ interface CheckOrchestratorStep {
9
10
  }
10
11
  /** Options controlling which checks the orchestrator runs. */
11
12
  interface CheckOrchestratorOptions {
13
+ /** Command profile for nested tool invocations. */
14
+ readonly commandProfile?: CheckOrchestratorCommandProfile;
12
15
  /** Workspace root for resolving commands and tree-clean detection. */
13
16
  readonly cwd: string;
14
17
  readonly mode: CheckOrchestratorMode;
15
18
  /** Staged file paths for pre-commit scoping. Ignored by other modes. */
16
19
  readonly stagedFiles?: readonly string[];
20
+ /** Stream child process output to the terminal as each step runs. */
21
+ readonly streamOutput?: boolean;
17
22
  }
18
23
  interface CheckOrchestratorStepResult {
19
24
  readonly command: readonly string[];
@@ -64,6 +69,7 @@ declare function parseTreePaths(statusOutput: string): string[];
64
69
  declare function runCheckOrchestrator(options: CheckOrchestratorOptions): Promise<Result<CheckOrchestratorResult, CheckOrchestratorError>>;
65
70
  interface PrintCheckOrchestratorResultsOptions {
66
71
  readonly compact?: boolean;
72
+ readonly liveOutput?: boolean;
67
73
  readonly mode?: OutputMode;
68
74
  }
69
75
  /**
@@ -7,7 +7,7 @@ import {
7
7
  } from "./outfitter-5vx1bp7h.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-api.ts
13
13
  import { relative } from "path";
@@ -50,7 +50,7 @@ async function printDocsApiResults(result, options) {
50
50
  });
51
51
  process.stdout.write(filtered);
52
52
  } else {
53
- await output(result, { mode: structuredMode });
53
+ await output(result, structuredMode);
54
54
  }
55
55
  return;
56
56
  }
@@ -59,7 +59,7 @@ async function printDocsApiResults(result, options) {
59
59
  const totalDeclarations = result.summary.total;
60
60
  if (totalDeclarations === 0) {
61
61
  lines.push(theme.muted("No API declarations found."));
62
- await output(lines, { mode: "human" });
62
+ await output(lines, "human");
63
63
  return;
64
64
  }
65
65
  lines.push("");
@@ -87,7 +87,7 @@ async function printDocsApiResults(result, options) {
87
87
  }
88
88
  }
89
89
  lines.push("");
90
- await output(lines, { mode: "human" });
90
+ await output(lines, "human");
91
91
  }
92
92
 
93
93
  export { runDocsApi, printDocsApiResults };