outfitter 0.2.7 → 0.3.3

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 (312) hide show
  1. package/README.md +34 -7
  2. package/dist/actions/add.d.ts +18 -0
  3. package/dist/actions/add.js +14 -0
  4. package/dist/actions/check-automation.d.ts +20 -0
  5. package/dist/actions/check-automation.js +27 -0
  6. package/dist/actions/check.d.ts +34 -0
  7. package/dist/actions/check.js +19 -0
  8. package/dist/actions/demo.d.ts +12 -0
  9. package/dist/actions/demo.js +11 -0
  10. package/dist/actions/docs-output-mode.d.ts +4 -0
  11. package/dist/actions/docs-output-mode.js +8 -0
  12. package/dist/actions/docs.d.ts +25 -0
  13. package/dist/actions/docs.js +31 -0
  14. package/dist/actions/doctor.d.ts +10 -0
  15. package/dist/actions/doctor.js +15 -0
  16. package/dist/actions/init.d.ts +28 -0
  17. package/dist/actions/init.js +31 -0
  18. package/dist/actions/scaffold.d.ts +19 -0
  19. package/dist/actions/scaffold.js +21 -0
  20. package/dist/actions/shared.d.ts +61 -0
  21. package/dist/actions/shared.js +30 -0
  22. package/dist/actions/upgrade.d.ts +17 -0
  23. package/dist/actions/upgrade.js +21 -0
  24. package/dist/actions.d.ts +1 -1
  25. package/dist/actions.js +53 -22
  26. package/dist/cli.js +66 -4
  27. package/dist/commands/add.js +3 -3
  28. package/dist/commands/check-action-ceremony.d.ts +55 -0
  29. package/dist/commands/check-action-ceremony.js +15 -0
  30. package/dist/commands/check-docs-sentinel.d.ts +27 -0
  31. package/dist/commands/check-docs-sentinel.js +18 -0
  32. package/dist/commands/check-orchestrator.d.ts +2 -0
  33. package/dist/commands/check-orchestrator.js +17 -0
  34. package/dist/commands/check-preset-versions.d.ts +20 -0
  35. package/dist/commands/check-preset-versions.js +15 -0
  36. package/dist/commands/check-publish-guardrails.d.ts +38 -0
  37. package/dist/commands/check-publish-guardrails.js +19 -0
  38. package/dist/commands/check-surface-map-format.d.ts +29 -0
  39. package/dist/commands/check-surface-map-format.js +19 -0
  40. package/dist/commands/check-surface-map.d.ts +20 -0
  41. package/dist/commands/check-surface-map.js +15 -0
  42. package/dist/commands/check-tsdoc.d.ts +2 -21
  43. package/dist/commands/check-tsdoc.js +3 -2
  44. package/dist/commands/check.d.ts +2 -0
  45. package/dist/commands/check.js +3 -3
  46. package/dist/commands/demo.js +1 -1
  47. package/dist/commands/docs-api.d.ts +4 -0
  48. package/dist/commands/docs-api.js +13 -0
  49. package/dist/commands/docs-export.d.ts +4 -0
  50. package/dist/commands/docs-export.js +12 -0
  51. package/dist/commands/docs-list.d.ts +3 -0
  52. package/dist/commands/docs-list.js +13 -0
  53. package/dist/commands/docs-module-loader.d.ts +2 -2
  54. package/dist/commands/docs-module-loader.js +2 -2
  55. package/dist/commands/docs-search.d.ts +3 -0
  56. package/dist/commands/docs-search.js +13 -0
  57. package/dist/commands/docs-show.d.ts +3 -0
  58. package/dist/commands/docs-show.js +13 -0
  59. package/dist/commands/docs-types.d.ts +21 -0
  60. package/dist/commands/doctor.js +4 -12
  61. package/dist/commands/init-execution.d.ts +8 -0
  62. package/dist/commands/init-execution.js +11 -0
  63. package/dist/commands/init-option-resolution.d.ts +5 -0
  64. package/dist/commands/init-option-resolution.js +14 -0
  65. package/dist/commands/init-output.d.ts +9 -0
  66. package/dist/commands/init-output.js +11 -0
  67. package/dist/commands/init.d.ts +7 -5
  68. package/dist/commands/init.js +10 -18
  69. package/dist/commands/jq-utils.d.ts +17 -0
  70. package/dist/commands/jq-utils.js +8 -0
  71. package/dist/commands/repo.d.ts +3 -3
  72. package/dist/commands/repo.js +8 -4
  73. package/dist/commands/scaffold-output.d.ts +4 -0
  74. package/dist/commands/scaffold-output.js +11 -0
  75. package/dist/commands/scaffold-planning.d.ts +65 -0
  76. package/dist/commands/scaffold-planning.js +20 -0
  77. package/dist/commands/scaffold.d.ts +3 -3
  78. package/dist/commands/scaffold.js +10 -16
  79. package/dist/commands/shared-deps.d.ts +5 -4
  80. package/dist/commands/shared-deps.js +3 -3
  81. package/dist/commands/upgrade-apply.d.ts +14 -0
  82. package/dist/commands/upgrade-apply.js +8 -0
  83. package/dist/commands/upgrade-codemods.d.ts +5 -0
  84. package/dist/commands/upgrade-codemods.js +4 -5
  85. package/dist/commands/upgrade-latest-version.d.ts +8 -0
  86. package/dist/commands/upgrade-latest-version.js +8 -0
  87. package/dist/commands/upgrade-migration-docs.d.ts +3 -0
  88. package/dist/commands/upgrade-migration-docs.js +15 -0
  89. package/dist/commands/upgrade-migration-frontmatter.d.ts +2 -0
  90. package/dist/commands/upgrade-migration-frontmatter.js +10 -0
  91. package/dist/commands/upgrade-migration-guides.d.ts +5 -0
  92. package/dist/commands/upgrade-migration-guides.js +10 -0
  93. package/dist/commands/upgrade-output.d.ts +5 -0
  94. package/dist/commands/upgrade-output.js +11 -0
  95. package/dist/commands/upgrade-planner.js +1 -1
  96. package/dist/commands/upgrade-report.d.ts +5 -0
  97. package/dist/commands/upgrade-report.js +8 -0
  98. package/dist/commands/upgrade-workspace.js +2 -2
  99. package/dist/commands/upgrade.d.ts +4 -220
  100. package/dist/commands/upgrade.js +21 -9
  101. package/dist/create/index.d.ts +3 -3
  102. package/dist/create/index.js +2 -30
  103. package/dist/create/planner.d.ts +2 -2
  104. package/dist/create/planner.js +80 -17
  105. package/dist/create/presets.d.ts +2 -2
  106. package/dist/create/presets.js +2 -2
  107. package/dist/create/types.d.ts +1 -1
  108. package/dist/engine/blocks.d.ts +2 -2
  109. package/dist/engine/blocks.js +5 -5
  110. package/dist/engine/collector.d.ts +1 -1
  111. package/dist/engine/collector.js +1 -1
  112. package/dist/engine/config.d.ts +2 -2
  113. package/dist/engine/config.js +4 -4
  114. package/dist/engine/dependency-versions.d.ts +13 -8
  115. package/dist/engine/dependency-versions.js +4 -4
  116. package/dist/engine/executor.d.ts +2 -2
  117. package/dist/engine/executor.js +149 -12
  118. package/dist/engine/index.d.ts +9 -7
  119. package/dist/engine/index.js +17 -31
  120. package/dist/engine/names.js +1 -1
  121. package/dist/engine/post-scaffold.d.ts +2 -2
  122. package/dist/engine/post-scaffold.js +1 -1
  123. package/dist/engine/preset.d.ts +3 -0
  124. package/dist/engine/preset.js +17 -0
  125. package/dist/engine/render-plan.d.ts +1 -1
  126. package/dist/engine/render-plan.js +1 -1
  127. package/dist/engine/template.d.ts +3 -2
  128. package/dist/engine/template.js +24 -7
  129. package/dist/engine/types.d.ts +1 -1
  130. package/dist/engine/types.js +1 -1
  131. package/dist/engine/workspace.d.ts +2 -2
  132. package/dist/engine/workspace.js +1 -1
  133. package/dist/index.d.ts +17 -398
  134. package/dist/index.js +7 -164
  135. package/dist/manifest.js +2 -2
  136. package/dist/output-mode.js +1 -1
  137. package/dist/shared/{outfitter-6fgk6adm.d.ts → outfitter-1tfa9hke.d.ts} +16 -1
  138. package/dist/shared/{outfitter-6bkqjk86.d.ts → outfitter-2nx0k4b3.d.ts} +1 -0
  139. package/dist/shared/outfitter-2ysjerp6.d.ts +44 -0
  140. package/dist/shared/outfitter-2z61gp5w.js +29 -0
  141. package/dist/shared/outfitter-34vg353f.d.ts +82 -0
  142. package/dist/shared/{outfitter-5yjr404v.d.ts → outfitter-3dq4r10s.d.ts} +5 -3
  143. package/dist/shared/outfitter-3rcrvva8.js +103 -0
  144. package/dist/shared/{outfitter-79vfxt6y.js → outfitter-3tx3adgj.js} +12 -3
  145. package/dist/shared/{outfitter-63gse8fv.js → outfitter-507ra35w.js} +33 -64
  146. package/dist/shared/outfitter-56jq0rh2.d.ts +42 -0
  147. package/dist/shared/{outfitter-r419zfgs.d.ts → outfitter-58rn1sj1.d.ts} +1 -1
  148. package/dist/shared/outfitter-5d9wbzhh.d.ts +19 -0
  149. package/dist/shared/outfitter-5j7zee11.d.ts +180 -0
  150. package/dist/shared/{outfitter-s7jetkge.d.ts → outfitter-5r6q2749.d.ts} +1 -1
  151. package/dist/shared/outfitter-5vx1bp7h.js +41 -0
  152. package/dist/shared/outfitter-6ddf91vh.js +190 -0
  153. package/dist/shared/{outfitter-mt7d1ek2.js → outfitter-6mpkh3zn.js} +39 -305
  154. package/dist/shared/{outfitter-ybbazsxq.d.ts → outfitter-6rtcemk7.d.ts} +8 -4
  155. package/dist/shared/{outfitter-9x1brcmq.js → outfitter-6t7xeyg1.js} +13 -38
  156. package/dist/shared/outfitter-738z4c37.js +262 -0
  157. package/dist/shared/{outfitter-yvksv5qb.js → outfitter-76k25svs.js} +4 -4
  158. package/dist/shared/outfitter-7n7vsz95.js +101 -0
  159. package/dist/shared/outfitter-7q9fnbwa.js +60 -0
  160. package/dist/shared/outfitter-84chvazx.js +480 -0
  161. package/dist/shared/outfitter-8ggmja91.js +301 -0
  162. package/dist/shared/{outfitter-qakwgrrh.d.ts → outfitter-8kmak0wc.d.ts} +1 -1
  163. package/dist/shared/outfitter-940h0x7b.js +71 -0
  164. package/dist/shared/{outfitter-fn20r49x.d.ts → outfitter-954y4mzx.d.ts} +1 -1
  165. package/dist/shared/outfitter-b9cpnr7e.js +110 -0
  166. package/dist/shared/outfitter-c7sbs7es.js +92 -0
  167. package/dist/shared/outfitter-cyhzstz0.js +93 -0
  168. package/dist/shared/{outfitter-n9g1zk4x.d.ts → outfitter-cyvr4r8d.d.ts} +3 -2
  169. package/dist/shared/outfitter-d0kqashd.d.ts +98 -0
  170. package/dist/shared/outfitter-dx4hn4ta.js +325 -0
  171. package/dist/shared/{outfitter-bn9c8p2e.js → outfitter-e84cr97g.js} +37 -9
  172. package/dist/shared/outfitter-ec83h4v2.js +17 -0
  173. package/dist/shared/{outfitter-vh4xgb93.js → outfitter-ekb6t1zz.js} +4 -4
  174. package/dist/shared/outfitter-ex8gn945.js +51 -0
  175. package/dist/shared/outfitter-f3a70135.js +75 -0
  176. package/dist/shared/outfitter-fbvfd5zq.d.ts +13 -0
  177. package/dist/shared/outfitter-fj2v5ffz.js +165 -0
  178. package/dist/shared/outfitter-fx1m251y.js +122 -0
  179. package/dist/shared/outfitter-fxry5n58.js +254 -0
  180. package/dist/shared/outfitter-g3hvjshg.js +1 -0
  181. package/dist/shared/{outfitter-f9znfhkn.d.ts → outfitter-gdc7b7de.d.ts} +1 -1
  182. package/dist/shared/outfitter-gyayfx5r.js +156 -0
  183. package/dist/shared/outfitter-h0wmtxw8.d.ts +23 -0
  184. package/dist/shared/{outfitter-z5sx06qe.d.ts → outfitter-hcexcvxe.d.ts} +1 -1
  185. package/dist/shared/outfitter-hf5bj2gq.js +117 -0
  186. package/dist/shared/{outfitter-e9rrfekb.d.ts → outfitter-htx4asgr.d.ts} +4 -3
  187. package/dist/shared/outfitter-jkct38dh.js +53 -0
  188. package/dist/shared/outfitter-jwxggvz4.js +42 -0
  189. package/dist/shared/outfitter-k6zyvg2n.js +306 -0
  190. package/dist/shared/outfitter-mstr60zz.js +215 -0
  191. package/dist/shared/outfitter-n0ed012k.js +101 -0
  192. package/dist/shared/outfitter-n13pqaft.js +19 -0
  193. package/dist/shared/outfitter-nxvjxrmw.d.ts +48 -0
  194. package/dist/shared/outfitter-p2wn07b7.js +160 -0
  195. package/dist/shared/{outfitter-5y646xzk.js → outfitter-px5sv5gn.js} +29 -9
  196. package/dist/shared/outfitter-q1g58t85.js +8 -0
  197. package/dist/shared/{outfitter-pj9vp00r.js → outfitter-qsd5638j.js} +26 -249
  198. package/dist/shared/outfitter-qsrx7m4w.js +72 -0
  199. package/dist/shared/outfitter-r2awqszh.d.ts +52 -0
  200. package/dist/shared/outfitter-rdpw2sbp.d.ts +77 -0
  201. package/dist/shared/outfitter-rp89dafm.js +109 -0
  202. package/dist/shared/outfitter-s1c0whzj.js +121 -0
  203. package/dist/shared/{outfitter-w1j80j1r.js → outfitter-ssrtakh3.js} +21 -5
  204. package/dist/shared/outfitter-ssynegbs.js +167 -0
  205. package/dist/shared/{outfitter-zwyvewr1.js → outfitter-svts4wk2.js} +1 -1
  206. package/dist/shared/outfitter-tavatb5p.js +166 -0
  207. package/dist/shared/outfitter-tqznjgbm.js +44 -0
  208. package/dist/shared/{outfitter-yraebrmw.d.ts → outfitter-wcrp7d7m.d.ts} +1 -1
  209. package/dist/shared/outfitter-wkt0a0ra.js +67 -0
  210. package/dist/shared/{outfitter-ha89qf8q.js → outfitter-wrcqq29p.js} +4 -4
  211. package/dist/shared/outfitter-wyg1tpp5.d.ts +43 -0
  212. package/dist/shared/outfitter-x0vpb7tj.js +126 -0
  213. package/dist/shared/{outfitter-m44n0qzw.js → outfitter-x39awx8g.js} +11 -26
  214. package/dist/shared/outfitter-x4cc5xsq.js +168 -0
  215. package/dist/shared/outfitter-x8w5sjnd.d.ts +39 -0
  216. package/dist/shared/{outfitter-amc4jbs1.d.ts → outfitter-xr6g13nz.d.ts} +2 -2
  217. package/dist/shared/outfitter-xs94pkfe.js +106 -0
  218. package/dist/shared/outfitter-y37yfehn.d.ts +37 -0
  219. package/dist/shared/{outfitter-fhnjpjwc.d.ts → outfitter-y6ee0k45.d.ts} +1 -1
  220. package/dist/shared/{outfitter-j833sxws.js → outfitter-ydw7x6bh.js} +1 -1
  221. package/dist/shared/outfitter-yhb23pjc.js +89 -0
  222. package/dist/shared/{outfitter-mtbpabf3.js → outfitter-ypcvwg1s.js} +1 -1
  223. package/dist/shared/outfitter-znbqe5zy.d.ts +45 -0
  224. package/dist/shared/{outfitter-dpj9erew.d.ts → outfitter-zng6w0t9.d.ts} +1 -1
  225. package/dist/targets/index.d.ts +2 -2
  226. package/dist/targets/index.js +2 -3
  227. package/dist/targets/registry.d.ts +2 -2
  228. package/dist/targets/registry.js +207 -14
  229. package/dist/targets/types.d.ts +1 -1
  230. package/package.json +203 -40
  231. package/dist/shared/chunk-x6644tk8.js +0 -6491
  232. package/dist/shared/outfitter-20f6a2n4.js +0 -35
  233. package/dist/shared/outfitter-5akzvppx.js +0 -125
  234. package/dist/shared/outfitter-7ch26yq8.js +0 -885
  235. package/dist/shared/outfitter-ehp18x1n.js +0 -1
  236. package/dist/shared/outfitter-h3q6ae6d.d.ts +0 -48
  237. package/dist/shared/outfitter-hvsaxgcp.js +0 -1
  238. package/dist/shared/outfitter-p71qb0f0.js +0 -82
  239. package/dist/shared/outfitter-pcj9gg2g.js +0 -909
  240. package/dist/shared/outfitter-xe5mzgdc.js +0 -208
  241. package/dist/shared/outfitter-z0we32cp.d.ts +0 -63
  242. package/template-versions.json +0 -22
  243. package/templates/.gitkeep +0 -0
  244. package/templates/basic/.gitignore.template +0 -30
  245. package/templates/basic/.lefthook.yml.template +0 -26
  246. package/templates/basic/package.json.template +0 -46
  247. package/templates/basic/src/index.ts.template +0 -26
  248. package/templates/basic/tsconfig.json.template +0 -34
  249. package/templates/cli/.gitignore.template +0 -4
  250. package/templates/cli/.lefthook.yml.template +0 -26
  251. package/templates/cli/README.md.template +0 -35
  252. package/templates/cli/biome.json.template +0 -4
  253. package/templates/cli/package.json.template +0 -53
  254. package/templates/cli/src/cli.ts.template +0 -8
  255. package/templates/cli/src/index.ts.template +0 -7
  256. package/templates/cli/src/program.ts.template +0 -31
  257. package/templates/cli/tsconfig.json.template +0 -34
  258. package/templates/daemon/.gitignore.template +0 -4
  259. package/templates/daemon/.lefthook.yml.template +0 -26
  260. package/templates/daemon/README.md.template +0 -67
  261. package/templates/daemon/biome.json.template +0 -4
  262. package/templates/daemon/package.json.template +0 -56
  263. package/templates/daemon/src/cli.ts.template +0 -96
  264. package/templates/daemon/src/daemon-main.ts.template +0 -79
  265. package/templates/daemon/src/daemon.ts.template +0 -11
  266. package/templates/daemon/src/index.ts.template +0 -7
  267. package/templates/daemon/tsconfig.json.template +0 -23
  268. package/templates/full-stack/.gitignore.template +0 -30
  269. package/templates/full-stack/README.md.template +0 -30
  270. package/templates/full-stack/apps/cli/package.json.template +0 -39
  271. package/templates/full-stack/apps/cli/src/cli.ts.template +0 -24
  272. package/templates/full-stack/apps/cli/src/index.test.ts.template +0 -18
  273. package/templates/full-stack/apps/cli/src/index.ts.template +0 -5
  274. package/templates/full-stack/apps/cli/tsconfig.json.template +0 -37
  275. package/templates/full-stack/apps/mcp/package.json.template +0 -40
  276. package/templates/full-stack/apps/mcp/src/index.test.ts.template +0 -18
  277. package/templates/full-stack/apps/mcp/src/index.ts.template +0 -6
  278. package/templates/full-stack/apps/mcp/src/mcp.ts.template +0 -22
  279. package/templates/full-stack/apps/mcp/src/server.ts.template +0 -10
  280. package/templates/full-stack/apps/mcp/tsconfig.json.template +0 -37
  281. package/templates/full-stack/package.json.template +0 -16
  282. package/templates/full-stack/packages/core/package.json.template +0 -36
  283. package/templates/full-stack/packages/core/src/handlers.ts.template +0 -31
  284. package/templates/full-stack/packages/core/src/index.test.ts.template +0 -30
  285. package/templates/full-stack/packages/core/src/index.ts.template +0 -8
  286. package/templates/full-stack/packages/core/src/types.ts.template +0 -13
  287. package/templates/full-stack/packages/core/tsconfig.json.template +0 -34
  288. package/templates/library/.gitignore.template +0 -30
  289. package/templates/library/README.md.template +0 -29
  290. package/templates/library/bunup.config.ts.template +0 -20
  291. package/templates/library/package.json.template +0 -55
  292. package/templates/library/src/handlers.ts.template +0 -31
  293. package/templates/library/src/index.test.ts.template +0 -35
  294. package/templates/library/src/index.ts.template +0 -8
  295. package/templates/library/src/types.ts.template +0 -13
  296. package/templates/library/tsconfig.json.template +0 -34
  297. package/templates/mcp/.gitignore.template +0 -4
  298. package/templates/mcp/.lefthook.yml.template +0 -26
  299. package/templates/mcp/README.md.template +0 -54
  300. package/templates/mcp/biome.json.template +0 -4
  301. package/templates/mcp/package.json.template +0 -53
  302. package/templates/mcp/src/index.ts.template +0 -7
  303. package/templates/mcp/src/mcp.ts.template +0 -33
  304. package/templates/mcp/src/server.ts.template +0 -8
  305. package/templates/mcp/tsconfig.json.template +0 -23
  306. package/templates/minimal/.gitignore.template +0 -30
  307. package/templates/minimal/.lefthook.yml.template +0 -26
  308. package/templates/minimal/package.json.template +0 -53
  309. package/templates/minimal/src/index.ts.template +0 -26
  310. package/templates/minimal/tsconfig.json.template +0 -34
  311. /package/dist/{shared/outfitter-344t1r38.js → commands/docs-types.js} +0 -0
  312. /package/dist/shared/{outfitter-mdt37hqm.js → outfitter-eepj7rf7.js} +0 -0
@@ -0,0 +1,29 @@
1
+ // @bun
2
+ // apps/outfitter/src/commands/init-option-resolution.ts
3
+ import { Result } from "@outfitter/contracts";
4
+ function parseBlocks(withFlag) {
5
+ if (!withFlag) {
6
+ return;
7
+ }
8
+ const blocks = withFlag.split(",").map((value) => value.trim()).filter((value) => value.length > 0);
9
+ return blocks.length > 0 ? blocks : undefined;
10
+ }
11
+ function isBinaryPreset(preset) {
12
+ return preset === "cli" || preset === "daemon";
13
+ }
14
+ function isValidInitPreset(value) {
15
+ return value === "minimal" || value === "cli" || value === "mcp" || value === "daemon" || value === "library" || value === "full-stack";
16
+ }
17
+ function resolvePresetFromFlags(presetFromFlag, availablePresetIds) {
18
+ if (!presetFromFlag) {
19
+ return Result.ok(undefined);
20
+ }
21
+ const knownAvailablePresetIds = availablePresetIds.filter(isValidInitPreset);
22
+ const isKnownAndAvailable = isValidInitPreset(presetFromFlag) && knownAvailablePresetIds.includes(presetFromFlag);
23
+ if (!isKnownAndAvailable) {
24
+ return Result.err(`Unknown preset '${presetFromFlag}'. Available presets: ${knownAvailablePresetIds.join(", ")}`);
25
+ }
26
+ return Result.ok(presetFromFlag);
27
+ }
28
+
29
+ export { parseBlocks, isBinaryPreset, isValidInitPreset, resolvePresetFromFlags };
@@ -0,0 +1,82 @@
1
+ import { PostScaffoldResult } from "./outfitter-hcexcvxe.js";
2
+ import { OutputMode } from "@outfitter/cli/types";
3
+ import { Result } from "@outfitter/contracts";
4
+ import { AddBlockResult } from "@outfitter/tooling";
5
+ import { Command } from "commander";
6
+ /** Options for the scaffold command, corresponding to CLI flags and positional arguments. */
7
+ interface ScaffoldOptions {
8
+ /** Working directory to scaffold in. */
9
+ readonly cwd: string;
10
+ /** Preview changes without writing to disk. */
11
+ readonly dryRun: boolean;
12
+ /** Overwrite existing files without prompting. */
13
+ readonly force: boolean;
14
+ /** Timeout in milliseconds for `bun install`. */
15
+ readonly installTimeout?: number | undefined;
16
+ /** Use `workspace:*` protocol for `@outfitter` dependencies. */
17
+ readonly local?: boolean | undefined;
18
+ /** Override the default target directory name. */
19
+ readonly name?: string | undefined;
20
+ /** Skip adding default tooling blocks. */
21
+ readonly noTooling?: boolean | undefined;
22
+ /** Skip running `bun install` after scaffolding. */
23
+ readonly skipInstall: boolean;
24
+ /** Target preset ID to scaffold (e.g. "cli", "mcp"). */
25
+ readonly target: string;
26
+ /** Comma-separated tooling block names to include. */
27
+ readonly with?: string | undefined;
28
+ }
29
+ /** Result of a successful `outfitter scaffold` run. */
30
+ interface ScaffoldCommandResult {
31
+ /** Tooling blocks that were added, if any. */
32
+ readonly blocksAdded?: AddBlockResult | undefined;
33
+ /** Whether the project was converted from single-package to workspace. */
34
+ readonly converted: boolean;
35
+ /** Present only for dry-run invocations; contains the planned operations and summary counts. */
36
+ readonly dryRunPlan?: {
37
+ readonly operations: readonly unknown[];
38
+ readonly summary: Record<string, number>;
39
+ } | undefined;
40
+ /** Details of the existing package that was relocated during workspace conversion. */
41
+ readonly movedExisting?: {
42
+ readonly from: string;
43
+ readonly to: string;
44
+ readonly name: string;
45
+ } | undefined;
46
+ /** Results from post-scaffold steps (install, next-step hints). */
47
+ readonly postScaffold: PostScaffoldResult;
48
+ /** Absolute path to the workspace root. */
49
+ readonly rootDir: string;
50
+ /** The target preset ID that was scaffolded. */
51
+ readonly target: string;
52
+ /** Absolute path to the scaffolded target directory. */
53
+ readonly targetDir: string;
54
+ /** Whether a new workspace pattern was added to the root package.json. */
55
+ readonly workspacePatternsUpdated: boolean;
56
+ }
57
+ /** Error returned when scaffolding fails. */
58
+ declare class ScaffoldCommandError extends Error {
59
+ readonly _tag: "ScaffoldCommandError";
60
+ /** @param message - Human-readable description of the scaffold failure. */
61
+ constructor(message: string);
62
+ }
63
+ /**
64
+ * Runs the full scaffold flow: detects project structure, converts to workspace
65
+ * if needed, executes the preset plan, and performs post-scaffold steps.
66
+ */
67
+ declare function runScaffold(options: ScaffoldOptions): Promise<Result<ScaffoldCommandResult, ScaffoldCommandError>>;
68
+ /**
69
+ * Registers the `scaffold` command on a Commander program.
70
+ * @deprecated Use action-registry CLI wiring via `buildCliCommands(outfitterActions, ...)`.
71
+ */
72
+ declare function scaffoldCommand(program: Command): void;
73
+ /** Options controlling how scaffold results are rendered (human-readable, JSON, or JSONL). */
74
+ interface PrintScaffoldResultsOptions {
75
+ readonly mode?: OutputMode;
76
+ }
77
+ /**
78
+ * Renders scaffold results to stdout. Handles dry-run plans, structured output modes,
79
+ * and human-readable summaries including workspace conversion details and next steps.
80
+ */
81
+ declare function printScaffoldResults(result: ScaffoldCommandResult, options?: PrintScaffoldResultsOptions): Promise<void>;
82
+ export { PrintScaffoldResultsOptions, printScaffoldResults, ScaffoldOptions, ScaffoldCommandResult, ScaffoldCommandError, runScaffold, scaffoldCommand };
@@ -1,5 +1,7 @@
1
- import { ExecuteCheckCommandOptions, ExecuteExportCommandOptions, ExecuteSyncCommandOptions } from "./outfitter-6fgk6adm.js";
1
+ import { ExecuteCheckCommandOptions, ExecuteExportCommandOptions, ExecuteSyncCommandOptions } from "./outfitter-1tfa9hke.js";
2
2
  import { Command } from "commander";
3
+ declare const DOCS_COMMON_OPTION_FLAGS: readonly ["--cwd <path>", "--packages-dir <path>", "--output-dir <path>", "--mdx-mode <mode>"];
4
+ declare const DOCS_EXPORT_OPTION_FLAGS: readonly ["--llms-file <path>", "--llms-full-file <path>", "--target <target>"];
3
5
  type RepoCheckSubject = "docs" | "exports" | "readme" | "registry" | "changeset" | "tree" | "boundary-invocations";
4
6
  interface RepoCommandIo {
5
7
  readonly err?: (line: string) => void;
@@ -7,7 +9,7 @@ interface RepoCommandIo {
7
9
  }
8
10
  interface RepoToolingInvocation {
9
11
  readonly args: readonly string[];
10
- readonly command: "check-exports" | "check-readme-imports" | "check-bunup-registry" | "check-changeset" | "check-clean-tree" | "check-boundary-invocations";
12
+ readonly command: "check-exports" | "check-readme-imports" | "check-bunup-registry" | "check-changeset" | "check-clean-tree" | "check-boundary-invocations" | "check-markdown-links";
11
13
  readonly cwd: string;
12
14
  }
13
15
  interface CreateRepoCommandOptions {
@@ -19,4 +21,4 @@ interface CreateRepoCommandOptions {
19
21
  readonly runToolingCommand?: (input: RepoToolingInvocation) => Promise<number>;
20
22
  }
21
23
  declare function createRepoCommand(options?: CreateRepoCommandOptions): Command;
22
- export { RepoCheckSubject, RepoCommandIo, RepoToolingInvocation, CreateRepoCommandOptions, createRepoCommand };
24
+ export { DOCS_COMMON_OPTION_FLAGS, DOCS_EXPORT_OPTION_FLAGS, RepoCheckSubject, RepoCommandIo, RepoToolingInvocation, CreateRepoCommandOptions, createRepoCommand };
@@ -0,0 +1,103 @@
1
+ // @bun
2
+ import {
3
+ actionInternalErr,
4
+ outputModeSchema,
5
+ resolveCwdFromPreset
6
+ } from "./outfitter-7n7vsz95.js";
7
+ import {
8
+ listBlocks,
9
+ printAddResults,
10
+ runAdd
11
+ } from "./outfitter-3tx3adgj.js";
12
+ import {
13
+ resolveOutputModeFromContext,
14
+ resolveStructuredOutputMode
15
+ } from "./outfitter-7r12fj7f.js";
16
+
17
+ // apps/outfitter/src/actions/add.ts
18
+ import { output } from "@outfitter/cli";
19
+ import { actionCliPresets } from "@outfitter/cli/actions";
20
+ import { cwdPreset, dryRunPreset, forcePreset } from "@outfitter/cli/flags";
21
+ import { defineAction, Result } from "@outfitter/contracts";
22
+ import { z } from "zod";
23
+ var addInputSchema = z.object({
24
+ block: z.string(),
25
+ force: z.boolean(),
26
+ dryRun: z.boolean(),
27
+ cwd: z.string().optional(),
28
+ outputMode: outputModeSchema
29
+ });
30
+ var addSharedFlags = actionCliPresets(forcePreset(), dryRunPreset());
31
+ var addCwd = cwdPreset();
32
+ var addAction = defineAction({
33
+ id: "add",
34
+ description: "Add a block from the registry to your project",
35
+ surfaces: ["cli"],
36
+ input: addInputSchema,
37
+ cli: {
38
+ group: "add",
39
+ command: "<block>",
40
+ description: "Add a block from the registry (claude, linter, lefthook, bootstrap, scaffolding)",
41
+ options: [...addSharedFlags.options, ...addCwd.options],
42
+ mapInput: (context) => {
43
+ const outputMode = resolveOutputModeFromContext(context.flags);
44
+ const { force, dryRun } = addSharedFlags.resolve(context);
45
+ return {
46
+ block: context.args[0],
47
+ force,
48
+ dryRun,
49
+ cwd: resolveCwdFromPreset(context.flags, addCwd),
50
+ outputMode
51
+ };
52
+ }
53
+ },
54
+ handler: async (input) => {
55
+ const { outputMode, cwd, ...addInput } = input;
56
+ const result = await runAdd({
57
+ ...addInput,
58
+ ...cwd !== undefined ? { cwd } : {}
59
+ });
60
+ if (result.isErr()) {
61
+ return actionInternalErr("add", result.error);
62
+ }
63
+ await printAddResults(result.value, addInput.dryRun, { mode: outputMode });
64
+ return Result.ok(result.value);
65
+ }
66
+ });
67
+ var listBlocksInputSchema = z.object({ outputMode: outputModeSchema });
68
+ var listBlocksAction = defineAction({
69
+ id: "add.list",
70
+ description: "List available blocks",
71
+ surfaces: ["cli"],
72
+ input: listBlocksInputSchema,
73
+ cli: {
74
+ group: "add",
75
+ command: "list",
76
+ description: "List available blocks",
77
+ mapInput: (context) => {
78
+ const outputMode = resolveOutputModeFromContext(context.flags);
79
+ return {
80
+ outputMode
81
+ };
82
+ }
83
+ },
84
+ handler: async (input) => {
85
+ const result = listBlocks();
86
+ if (result.isErr()) {
87
+ return actionInternalErr("add.list", result.error);
88
+ }
89
+ const structuredMode = resolveStructuredOutputMode(input.outputMode);
90
+ if (structuredMode) {
91
+ await output({ blocks: result.value }, { mode: structuredMode });
92
+ } else {
93
+ const lines = [
94
+ "Available blocks:",
95
+ ...result.value.map((block) => ` - ${block}`)
96
+ ];
97
+ await output(lines, { mode: "human" });
98
+ }
99
+ return Result.ok({ blocks: result.value });
100
+ }
101
+ });
102
+
103
+ export { addAction, listBlocksAction };
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  stampBlock
4
- } from "./outfitter-mtbpabf3.js";
4
+ } from "./outfitter-ypcvwg1s.js";
5
5
  import {
6
6
  resolveStructuredOutputMode
7
7
  } from "./outfitter-7r12fj7f.js";
@@ -18,7 +18,6 @@ import { dirname, join, resolve } from "path";
18
18
  import { fileURLToPath } from "url";
19
19
  import { output } from "@outfitter/cli";
20
20
  import { Result } from "@outfitter/contracts";
21
- import { RegistrySchema } from "@outfitter/tooling";
22
21
  class AddError extends Error {
23
22
  _tag = "AddError";
24
23
  constructor(message) {
@@ -52,12 +51,22 @@ function readToolingVersion(registryPath) {
52
51
  return "unknown";
53
52
  }
54
53
  }
54
+ function isRegistryLike(value) {
55
+ if (!value || typeof value !== "object") {
56
+ return false;
57
+ }
58
+ const record = value;
59
+ return !!record["blocks"] && typeof record["blocks"] === "object";
60
+ }
55
61
  function loadRegistry() {
56
62
  try {
57
63
  const registryPath = getRegistryPath();
58
64
  const content = readFileSync(registryPath, "utf-8");
59
65
  const parsed = JSON.parse(content);
60
- const registry = RegistrySchema.parse(parsed);
66
+ if (!isRegistryLike(parsed)) {
67
+ return Result.err(new AddError("Failed to load registry: invalid registry shape"));
68
+ }
69
+ const registry = parsed;
61
70
  const toolingVersion = readToolingVersion(registryPath);
62
71
  return Result.ok({ registry, toolingVersion });
63
72
  } catch (error) {
@@ -1,4 +1,8 @@
1
1
  // @bun
2
+ import {
3
+ applyJq
4
+ } from "./outfitter-5vx1bp7h.js";
5
+
2
6
  // apps/outfitter/src/commands/check-tsdoc.ts
3
7
  import { existsSync, readFileSync } from "fs";
4
8
  import { createRequire } from "module";
@@ -106,7 +110,7 @@ function discoverPathsFromEntrypoints(cwd, entrypoints) {
106
110
  paths.add(derivePackagePathFromEntrypoint(match));
107
111
  }
108
112
  }
109
- return [...paths].sort();
113
+ return [...paths].toSorted();
110
114
  }
111
115
  function formatDiscoveryMessage(entrypoints, source) {
112
116
  const patterns = entrypoints.join(", ");
@@ -154,7 +158,7 @@ function emitJsonlLines(result, summary) {
154
158
  const lines = [];
155
159
  lines.push({ type: "meta", version: "1.0.0", ok: result.ok });
156
160
  lines.push({ type: "summary", ...result.summary });
157
- const sortedPackages = [...result.packages].sort((a, b) => a.name.localeCompare(b.name));
161
+ const sortedPackages = [...result.packages].toSorted((a, b) => a.name.localeCompare(b.name));
158
162
  for (const pkg of sortedPackages) {
159
163
  lines.push({
160
164
  type: "package",
@@ -190,43 +194,6 @@ function normalizeJsonlRecord(text) {
190
194
  return JSON.stringify(text);
191
195
  }
192
196
  }
193
- async function applyJq(data, expr, options) {
194
- try {
195
- const json = JSON.stringify(data);
196
- const args = ["jq", ...options?.compact ? ["-c"] : [], expr];
197
- const proc = Bun.spawn(args, {
198
- stdin: new Response(json),
199
- stdout: "pipe",
200
- stderr: "pipe"
201
- });
202
- const [stdout, stderr, exitCode] = await Promise.all([
203
- new Response(proc.stdout).text(),
204
- new Response(proc.stderr).text(),
205
- proc.exited
206
- ]);
207
- if (exitCode !== 0) {
208
- process.stderr.write(`jq error: ${stderr.trim()}
209
- `);
210
- return options?.compact ? `${JSON.stringify(data)}
211
- ` : `${JSON.stringify(data, null, 2)}
212
- `;
213
- }
214
- return stdout;
215
- } catch (error) {
216
- const message = error instanceof Error ? error.message : "unknown jq execution error";
217
- const missingBinary = /enoent|not found/i.test(message);
218
- if (missingBinary) {
219
- process.stderr.write(`jq is not installed. Install jq or omit --jq to continue.
220
- `);
221
- } else {
222
- process.stderr.write(`jq execution error: ${message}
223
- `);
224
- }
225
- return options?.compact ? `${JSON.stringify(data)}
226
- ` : `${JSON.stringify(data, null, 2)}
227
- `;
228
- }
229
- }
230
197
  var toolingCheckTsdocModule;
231
198
  function resolveToolingEntrypoint() {
232
199
  const packageJsonPath = require2.resolve("@outfitter/tooling/package.json");
@@ -274,37 +241,39 @@ async function runCheckTsdoc(input) {
274
241
  minCoverage: input.minCoverage
275
242
  }) : rawResult;
276
243
  const outputData = input.summary ? summarizeResult(filteredResult) : filteredResult;
277
- if (input.outputMode === "jsonl") {
278
- const lines = emitJsonlLines(filteredResult, input.summary);
279
- if (input.jq) {
280
- for (const line of lines) {
281
- const filtered = await applyJq(line, input.jq, { compact: true });
282
- for (const rawLine of filtered.split(/\r?\n/)) {
283
- const trimmed = rawLine.trim();
284
- if (!trimmed) {
285
- continue;
244
+ if (input.emitOutput !== false) {
245
+ if (input.outputMode === "jsonl") {
246
+ const lines = emitJsonlLines(filteredResult, input.summary);
247
+ if (input.jq) {
248
+ for (const line of lines) {
249
+ const filtered = await applyJq(line, input.jq, { compact: true });
250
+ for (const rawLine of filtered.split(/\r?\n/)) {
251
+ const trimmed = rawLine.trim();
252
+ if (!trimmed) {
253
+ continue;
254
+ }
255
+ process.stdout.write(`${normalizeJsonlRecord(trimmed)}
256
+ `);
286
257
  }
287
- process.stdout.write(`${normalizeJsonlRecord(trimmed)}
258
+ }
259
+ } else {
260
+ for (const line of lines) {
261
+ process.stdout.write(`${JSON.stringify(line)}
288
262
  `);
289
263
  }
290
264
  }
291
- } else {
292
- for (const line of lines) {
293
- process.stdout.write(`${JSON.stringify(line)}
265
+ } else if (input.jq) {
266
+ const filtered = await applyJq(outputData, input.jq);
267
+ process.stdout.write(filtered);
268
+ } else if (input.outputMode === "json") {
269
+ process.stdout.write(`${JSON.stringify(outputData, null, 2)}
294
270
  `);
295
- }
271
+ } else {
272
+ tooling.printCheckTsdocHuman(outputData, {
273
+ strict: input.strict,
274
+ minCoverage: input.minCoverage
275
+ });
296
276
  }
297
- } else if (input.jq) {
298
- const filtered = await applyJq(outputData, input.jq);
299
- process.stdout.write(filtered);
300
- } else if (input.outputMode === "json") {
301
- process.stdout.write(`${JSON.stringify(outputData, null, 2)}
302
- `);
303
- } else {
304
- tooling.printCheckTsdocHuman(outputData, {
305
- strict: input.strict,
306
- minCoverage: input.minCoverage
307
- });
308
277
  }
309
278
  return Result.ok(outputData);
310
279
  } catch (error) {
@@ -0,0 +1,42 @@
1
+ import { MigrationFrontmatter } from "./outfitter-y37yfehn.js";
2
+ /** A migration doc with parsed frontmatter and body content. */
3
+ interface MigrationDocWithMetadata {
4
+ readonly body: string;
5
+ readonly frontmatter: MigrationFrontmatter;
6
+ readonly version: string;
7
+ }
8
+ /**
9
+ * Find migration docs directory, checking known locations.
10
+ *
11
+ * Searches:
12
+ * 1. Relative to the target cwd
13
+ * 2. Walking up parent directories from cwd (monorepo root detection)
14
+ * 3. Relative to the outfitter binary itself (development mode)
15
+ */
16
+ declare function findMigrationDocsDir(cwd: string, binaryDir?: string): string | null;
17
+ /**
18
+ * Read all migration docs for a package between two versions.
19
+ *
20
+ * Scans the migrations directory for docs matching the package name,
21
+ * filters to versions greater than `fromVersion` and at most `toVersion`,
22
+ * and returns their contents sorted by version ascending.
23
+ */
24
+ declare function readMigrationDocs(migrationsDir: string, shortName: string, fromVersion: string, toVersion: string): string[];
25
+ /**
26
+ * Read the `breaking` flag for an exact migration doc version, if present.
27
+ *
28
+ * Returns:
29
+ * - `true` or `false` when the frontmatter contains `breaking: ...`
30
+ * - `undefined` when the doc is missing, unreadable, or has no valid flag
31
+ */
32
+ declare function readMigrationBreakingFlag(migrationsDir: string, shortName: string, version: string): boolean | undefined;
33
+ /**
34
+ * Read all migration docs for a package between two versions,
35
+ * returning parsed frontmatter alongside the body content.
36
+ *
37
+ * Like `readMigrationDocs` but returns structured metadata instead of
38
+ * plain strings. Used by the codemod infrastructure to discover
39
+ * machine-actionable changes.
40
+ */
41
+ declare function readMigrationDocsWithMetadata(migrationsDir: string, shortName: string, fromVersion: string, toVersion: string): MigrationDocWithMetadata[];
42
+ export { MigrationDocWithMetadata, findMigrationDocsDir, readMigrationDocs, readMigrationBreakingFlag, readMigrationDocsWithMetadata };
@@ -23,8 +23,8 @@ interface TargetDefinition {
23
23
  readonly description: string;
24
24
  readonly id: TargetId;
25
25
  readonly placement: "apps" | "packages";
26
+ readonly presetDir: string;
26
27
  readonly scope: TargetScope;
27
28
  readonly status: TargetStatus;
28
- readonly templateDir: string;
29
29
  }
30
30
  export { TargetId, TargetCategory, TargetStatus, TargetScope, TargetDefinition };
@@ -0,0 +1,19 @@
1
+ import { TargetId } from "./outfitter-58rn1sj1.js";
2
+ import { Result } from "@outfitter/contracts";
3
+ /** Subset of target IDs that are valid presets for `outfitter init`. */
4
+ type InitPresetId = Extract<TargetId, "minimal" | "cli" | "mcp" | "daemon" | "library" | "full-stack">;
5
+ /**
6
+ * Parses a comma-separated `--with` flag value into an array of block names.
7
+ * @returns The parsed block names, or `undefined` if the flag is empty/absent.
8
+ */
9
+ declare function parseBlocks(withFlag: string | undefined): readonly string[] | undefined;
10
+ /** Returns `true` if the preset produces a project with a binary entry point. */
11
+ declare function isBinaryPreset(preset: InitPresetId): boolean;
12
+ /** Type guard that narrows a string to {@link InitPresetId}. */
13
+ declare function isValidInitPreset(value: string): value is InitPresetId;
14
+ /**
15
+ * Validates and resolves a `--preset` flag value against the available preset list.
16
+ * @returns The validated preset ID, `undefined` if no flag was provided, or an error for unknown presets.
17
+ */
18
+ declare function resolvePresetFromFlags(presetFromFlag: string | undefined, availablePresetIds: readonly string[]): Result<InitPresetId | undefined, string>;
19
+ export { InitPresetId, parseBlocks, isBinaryPreset, isValidInitPreset, resolvePresetFromFlags };
@@ -0,0 +1,180 @@
1
+ import { VersionConflict } from "./outfitter-109s75x0.js";
2
+ import { MigrationChange } from "./outfitter-y37yfehn.js";
3
+ import { OutputMode as OutputMode3 } from "@outfitter/cli/types";
4
+ import { OutfitterError as OutfitterError2 } from "@outfitter/contracts";
5
+ import { Result } from "@outfitter/contracts";
6
+ import { OutputMode } from "@outfitter/cli/types";
7
+ /** Options controlling how upgrade results are rendered. */
8
+ interface PrintUpgradeResultsOptions {
9
+ readonly all?: boolean;
10
+ readonly cwd?: string;
11
+ readonly dryRun?: boolean;
12
+ readonly guide?: boolean;
13
+ readonly mode?: OutputMode;
14
+ }
15
+ /**
16
+ * Format and output upgrade results.
17
+ *
18
+ * @param result - Upgrade scan/apply result to render
19
+ * @param options - Display options (output mode, guide, dry-run hints)
20
+ */
21
+ declare function printUpgradeResults(result: UpgradeResult, options?: PrintUpgradeResultsOptions): Promise<void>;
22
+ import { OutputMode as OutputMode2 } from "@outfitter/cli/types";
23
+ import { OutfitterError } from "@outfitter/contracts";
24
+ /** Terminal disposition of an upgrade run (written into the report). */
25
+ type UpgradeReportStatus = "dry_run" | "no_updates" | "cancelled" | "skipped_non_interactive" | "applied" | "failed";
26
+ /** Snapshot of effective flags for this upgrade run. */
27
+ interface UpgradeReportFlags {
28
+ readonly all: boolean;
29
+ readonly dryRun: boolean;
30
+ readonly interactive: boolean;
31
+ readonly noCodemods: boolean;
32
+ readonly outputMode: OutputMode2 | null;
33
+ readonly yes: boolean;
34
+ }
35
+ /** Machine-readable upgrade report written to `.outfitter/reports/upgrade.json`. */
36
+ interface UpgradeReport {
37
+ readonly $schema: "https://outfitter.dev/reports/upgrade/v1";
38
+ readonly applied: boolean;
39
+ readonly checkedAt: string;
40
+ readonly codemods?: CodemodSummary;
41
+ readonly conflicts?: readonly VersionConflict[];
42
+ readonly cwd: string;
43
+ readonly error?: {
44
+ readonly message: string;
45
+ readonly category: string;
46
+ readonly context?: Record<string, unknown>;
47
+ };
48
+ readonly excluded: {
49
+ readonly breaking: readonly string[];
50
+ };
51
+ readonly finishedAt: string;
52
+ readonly flags: UpgradeReportFlags;
53
+ readonly packages: readonly PackageVersionInfo[];
54
+ readonly startedAt: string;
55
+ readonly status: UpgradeReportStatus;
56
+ readonly summary: {
57
+ readonly total: number;
58
+ readonly available: number;
59
+ readonly breaking: number;
60
+ readonly applied: number;
61
+ };
62
+ readonly unknownPackages?: readonly string[];
63
+ readonly workspaceRoot: string | null;
64
+ }
65
+ /** Contextual metadata passed alongside the result when writing a report. */
66
+ interface WriteUpgradeReportMeta {
67
+ readonly error?: OutfitterError;
68
+ readonly options: UpgradeOptions;
69
+ readonly startedAt: Date;
70
+ readonly status: UpgradeReportStatus;
71
+ readonly workspaceRoot: string | null;
72
+ }
73
+ /**
74
+ * Best-effort report writer.
75
+ *
76
+ * Report I/O failures should not change the primary command result.
77
+ */
78
+ declare function writeUpgradeReportSafely(cwd: string, result: UpgradeResult, meta: WriteUpgradeReportMeta): void;
79
+ /** Input options for `runUpgrade`. */
80
+ interface UpgradeOptions {
81
+ /** Include breaking changes in the upgrade */
82
+ readonly all?: boolean;
83
+ /** Working directory (defaults to cwd) */
84
+ readonly cwd: string;
85
+ /** Preview only — no mutations, no prompt */
86
+ readonly dryRun?: boolean;
87
+ /** Show migration guide */
88
+ readonly guide?: boolean;
89
+ /** Filter to specific package names (scan + guides) */
90
+ readonly guidePackages?: readonly string[];
91
+ /** Whether interactive prompts are enabled (false in CI) */
92
+ readonly interactive?: boolean;
93
+ /** Skip automatic codemod execution during upgrade */
94
+ readonly noCodemods?: boolean;
95
+ /** Output mode */
96
+ readonly outputMode?: OutputMode3;
97
+ /** Auto-confirm without prompting */
98
+ readonly yes?: boolean;
99
+ }
100
+ /** Version metadata for a single installed @outfitter/* package. */
101
+ interface PackageVersionInfo {
102
+ /** Whether the update contains breaking changes (major bump) */
103
+ readonly breaking: boolean;
104
+ /** Currently installed version */
105
+ readonly current: string;
106
+ /** Latest available version from npm (null if query failed) */
107
+ readonly latest: string | null;
108
+ /** Full package name */
109
+ readonly name: string;
110
+ /** Whether an update is available */
111
+ readonly updateAvailable: boolean;
112
+ }
113
+ /** Summary of codemods executed during --apply. */
114
+ interface CodemodSummary {
115
+ /** Total files changed across all codemods */
116
+ readonly changedFiles: readonly string[];
117
+ /** Number of codemods executed */
118
+ readonly codemodCount: number;
119
+ /** Errors encountered during codemod execution */
120
+ readonly errors: readonly string[];
121
+ }
122
+ /** Complete output of a single upgrade run. */
123
+ interface UpgradeResult {
124
+ /** Whether mutations were made (--apply was used and changes were written) */
125
+ readonly applied: boolean;
126
+ /** Package names that were updated in package.json */
127
+ readonly appliedPackages: string[];
128
+ /** Codemod execution summary (populated when --apply runs codemods) */
129
+ readonly codemods?: CodemodSummary;
130
+ /** Version conflicts found across workspace manifests */
131
+ readonly conflicts?: readonly VersionConflict[];
132
+ /** Structured migration guides (populated when --guide is used) */
133
+ readonly guides?: readonly MigrationGuide[];
134
+ /** Whether any update is a breaking change */
135
+ readonly hasBreaking: boolean;
136
+ /** Package version info */
137
+ readonly packages: PackageVersionInfo[];
138
+ /** Package names skipped because they contain breaking changes */
139
+ readonly skippedBreaking: string[];
140
+ /** Total packages checked */
141
+ readonly total: number;
142
+ /** Package names that were requested but not found in the workspace */
143
+ readonly unknownPackages?: readonly string[];
144
+ /** Number of packages with updates available */
145
+ readonly updatesAvailable: number;
146
+ }
147
+ /**
148
+ * Run the upgrade command — detect installed versions and query npm for latest.
149
+ *
150
+ * Default flow: scan → classify → prompt → apply.
151
+ * `--dry-run` returns a report without mutation.
152
+ * `--all` includes breaking changes.
153
+ * `--yes` or `--non-interactive` bypasses the prompt.
154
+ */
155
+ declare function runUpgrade(options: UpgradeOptions): Promise<Result<UpgradeResult, OutfitterError2>>;
156
+ type GuidePackageVersionInfo = PackageVersionInfo;
157
+ /** Structured migration guide for a single package upgrade. */
158
+ interface MigrationGuide {
159
+ /** Whether this is a breaking change */
160
+ readonly breaking: boolean;
161
+ /** Structured changes from migration frontmatter, if available */
162
+ readonly changes?: readonly MigrationChange[];
163
+ /** Currently installed version */
164
+ readonly fromVersion: string;
165
+ /** The @outfitter/* package name */
166
+ readonly packageName: string;
167
+ /** Migration step strings (empty if no guide exists) */
168
+ readonly steps: readonly string[];
169
+ /** Latest available version */
170
+ readonly toVersion: string;
171
+ }
172
+ /**
173
+ * Build structured migration guides for packages with available updates.
174
+ *
175
+ * For each package with an update, produces a `MigrationGuide` with steps
176
+ * extracted from migration docs (if a migrations directory is available).
177
+ * Packages without updates or without a resolved latest version are skipped.
178
+ */
179
+ declare function buildMigrationGuides(packages: readonly GuidePackageVersionInfo[], migrationsDir: string | null): MigrationGuide[];
180
+ export { MigrationGuide, buildMigrationGuides, PrintUpgradeResultsOptions, printUpgradeResults, UpgradeOptions, PackageVersionInfo, CodemodSummary, UpgradeResult, runUpgrade, UpgradeReportStatus, UpgradeReportFlags, UpgradeReport, WriteUpgradeReportMeta, writeUpgradeReportSafely };
@@ -1,4 +1,4 @@
1
- import { TargetCategory, TargetDefinition, TargetId, TargetScope, TargetStatus } from "./outfitter-r419zfgs.js";
1
+ import { TargetCategory, TargetDefinition, TargetId, TargetScope, TargetStatus } from "./outfitter-58rn1sj1.js";
2
2
  import { NotFoundError, Result, ValidationError } from "@outfitter/contracts";
3
3
  declare const TARGET_REGISTRY: ReadonlyMap<TargetId, TargetDefinition>;
4
4
  declare const TARGET_IDS: readonly TargetId[];