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,168 @@
1
+ // @bun
2
+ import {
3
+ findMigrationDocsDir,
4
+ readMigrationDocs
5
+ } from "./outfitter-fx1m251y.js";
6
+ import {
7
+ resolveStructuredOutputMode
8
+ } from "./outfitter-7r12fj7f.js";
9
+
10
+ // apps/outfitter/src/commands/upgrade-output.ts
11
+ import { output } from "@outfitter/cli";
12
+ import { createTheme } from "@outfitter/tui/render";
13
+ async function printUpgradeResults(result, options) {
14
+ const structuredMode = resolveStructuredOutputMode(options?.mode);
15
+ if (structuredMode) {
16
+ await output(result, { mode: structuredMode });
17
+ return;
18
+ }
19
+ const theme = createTheme();
20
+ const lines = ["", "Outfitter Upgrade", "", "=".repeat(60)];
21
+ if (result.packages.length === 0) {
22
+ lines.push("No @outfitter/* packages found in package.json.");
23
+ if (!result.unknownPackages || result.unknownPackages.length === 0) {
24
+ await output(lines, { mode: "human" });
25
+ return;
26
+ }
27
+ lines.push("");
28
+ } else {
29
+ lines.push(` ${"Package".padEnd(28)} ${"Current".padEnd(10)} ${"Available".padEnd(10)} Migration`);
30
+ lines.push(` ${"\u2500".repeat(28)} ${"\u2500".repeat(10)} ${"\u2500".repeat(10)} ${"\u2500".repeat(20)}`);
31
+ for (const pkg of result.packages) {
32
+ const name = pkg.name.padEnd(28);
33
+ const current = pkg.current.padEnd(10);
34
+ const available = (pkg.latest ?? "unknown").padEnd(10);
35
+ let migration;
36
+ if (pkg.latest === null) {
37
+ migration = theme.muted("lookup failed");
38
+ } else if (!pkg.updateAvailable) {
39
+ migration = theme.muted("up to date");
40
+ } else if (pkg.breaking) {
41
+ migration = theme.error("breaking");
42
+ } else {
43
+ migration = theme.success("non-breaking");
44
+ }
45
+ lines.push(` ${name} ${current} ${available} ${migration}`);
46
+ }
47
+ lines.push("");
48
+ }
49
+ if (result.applied && result.appliedPackages.length > 0) {
50
+ const breakingApplied = result.appliedPackages.filter((name) => result.packages.some((p) => p.name === name && p.breaking));
51
+ const nonBreakingApplied = result.appliedPackages.filter((name) => !result.packages.some((p) => p.name === name && p.breaking));
52
+ if (nonBreakingApplied.length > 0) {
53
+ lines.push(theme.success(`Applied ${nonBreakingApplied.length} non-breaking upgrade(s):`));
54
+ for (const name of nonBreakingApplied) {
55
+ lines.push(` - ${name}`);
56
+ }
57
+ lines.push("");
58
+ }
59
+ if (breakingApplied.length > 0) {
60
+ lines.push(theme.error(`Applied ${breakingApplied.length} breaking upgrade(s):`));
61
+ for (const name of breakingApplied) {
62
+ const pkg = result.packages.find((p) => p.name === name);
63
+ lines.push(` - ${name} (${pkg?.current} -> ${pkg?.latest})`);
64
+ }
65
+ lines.push("", theme.muted("Review migration guides: 'outfitter upgrade --guide'"));
66
+ lines.push("");
67
+ }
68
+ }
69
+ if (result.skippedBreaking.length > 0 && options?.all !== true) {
70
+ if (result.applied) {
71
+ lines.push(theme.error(`Skipped ${result.skippedBreaking.length} breaking upgrade(s):`));
72
+ } else {
73
+ lines.push(" Excluded (breaking):");
74
+ }
75
+ for (const name of result.skippedBreaking) {
76
+ const pkg = result.packages.find((p) => p.name === name);
77
+ const codemodHint = pkg?.breaking ? "(migration guide)" : "";
78
+ lines.push(` ${name.padEnd(24)} ${(pkg?.current ?? "").padEnd(8)} -> ${(pkg?.latest ?? "").padEnd(8)} ${codemodHint}`.trimEnd());
79
+ }
80
+ lines.push("", theme.muted(" Use --all to include breaking changes"));
81
+ lines.push("");
82
+ }
83
+ if (result.codemods !== undefined) {
84
+ const uniqueChangedFiles = [
85
+ ...new Set(result.codemods.changedFiles)
86
+ ].toSorted();
87
+ lines.push(theme.info(`Ran ${result.codemods.codemodCount} codemod(s).`));
88
+ if (uniqueChangedFiles.length > 0) {
89
+ lines.push(theme.success(`Codemods changed ${uniqueChangedFiles.length} file(s):`));
90
+ for (const file of uniqueChangedFiles) {
91
+ lines.push(` - ${file}`);
92
+ }
93
+ }
94
+ if (result.codemods.errors.length > 0) {
95
+ lines.push(theme.error(`Codemod errors (${result.codemods.errors.length}):`));
96
+ for (const error of result.codemods.errors) {
97
+ lines.push(` - ${error}`);
98
+ }
99
+ }
100
+ lines.push("");
101
+ }
102
+ if (result.conflicts && result.conflicts.length > 0) {
103
+ lines.push(theme.warning(`Version conflict(s) across workspace (${result.conflicts.length}):`));
104
+ for (const conflict of result.conflicts) {
105
+ lines.push(` ${conflict.name}`);
106
+ for (const entry of conflict.versions) {
107
+ const manifests = entry.manifests.map((m) => {
108
+ const dir = m.replace(/\/package\.json$/, "");
109
+ const parts = dir.split("/");
110
+ return parts.slice(-2).join("/");
111
+ }).join(", ");
112
+ lines.push(` ${entry.version.padEnd(10)} ${theme.muted(manifests)}`);
113
+ }
114
+ }
115
+ lines.push("");
116
+ }
117
+ if (result.unknownPackages && result.unknownPackages.length > 0) {
118
+ lines.push(theme.error("Unknown package(s) not found in workspace:"));
119
+ for (const name of result.unknownPackages) {
120
+ lines.push(` - ${name}`);
121
+ }
122
+ lines.push("");
123
+ }
124
+ if (!result.applied) {
125
+ if (options?.dryRun) {
126
+ lines.push(theme.muted("Dry run \u2014 no changes applied."));
127
+ } else if (result.updatesAvailable > 0) {
128
+ lines.push(theme.muted("Run 'outfitter upgrade --guide' for migration instructions."));
129
+ } else {
130
+ lines.push(theme.success("All packages are up to date."));
131
+ }
132
+ }
133
+ if (options?.guide && result.guides && result.guides.length > 0) {
134
+ lines.push("", "=".repeat(60), "", "Migration Guide", "");
135
+ for (const guide of result.guides) {
136
+ const label = guide.breaking ? theme.error("BREAKING") : theme.success("non-breaking");
137
+ lines.push(`${theme.info(guide.packageName)} ${guide.fromVersion} -> ${guide.toVersion} [${label}]`);
138
+ if (guide.steps.length > 0) {
139
+ for (const step of guide.steps) {
140
+ lines.push(` ${step}`);
141
+ }
142
+ } else {
143
+ lines.push(` ${theme.muted("No migration steps available. Check release notes.")}`);
144
+ }
145
+ lines.push("");
146
+ }
147
+ } else if (options?.guide && result.updatesAvailable > 0 && !result.guides) {
148
+ const cwd = options.cwd ?? process.cwd();
149
+ const migrationsDir = findMigrationDocsDir(cwd);
150
+ if (migrationsDir) {
151
+ lines.push("", "=".repeat(60), "", "Migration Guide", "");
152
+ for (const pkg of result.packages) {
153
+ if (!(pkg.updateAvailable && pkg.latest))
154
+ continue;
155
+ const shortName = pkg.name.replace("@outfitter/", "");
156
+ const docs = readMigrationDocs(migrationsDir, shortName, pkg.current, pkg.latest);
157
+ for (const doc of docs) {
158
+ lines.push(doc, "", "---", "");
159
+ }
160
+ }
161
+ } else {
162
+ lines.push("", theme.muted("Migration docs not found locally. See https://github.com/outfitter-dev/outfitter for migration guides."));
163
+ }
164
+ }
165
+ await output(lines, { mode: "human" });
166
+ }
167
+
168
+ export { printUpgradeResults };
@@ -0,0 +1,39 @@
1
+ import { CliOutputMode } from "./outfitter-a79xrm12.js";
2
+ import { DocsExportTarget, loadDocsModule } from "./outfitter-1tfa9hke.js";
3
+ import { InternalError, Result } from "@outfitter/contracts";
4
+ /** Validated input for the docs.action handler. */
5
+ interface DocsExportInput {
6
+ readonly cwd: string;
7
+ readonly outputMode: CliOutputMode;
8
+ readonly target: DocsExportTarget;
9
+ }
10
+ /** Output shape for the docs.action. */
11
+ interface DocsExportOutput {
12
+ readonly exitCode: number;
13
+ readonly messages: string[];
14
+ readonly target: string;
15
+ readonly warnings: string[];
16
+ }
17
+ interface DocsExportDependencies {
18
+ readonly loadDocsModule?: typeof loadDocsModule;
19
+ }
20
+ /**
21
+ * Export documentation to the specified target format.
22
+ *
23
+ * Delegates to `executeExportCommand` from "@outfitter/docs" via the
24
+ * dynamic module loader.
25
+ *
26
+ * @param input - Validated action input
27
+ * @returns Result containing the output or an error
28
+ */
29
+ declare function runDocsExport(input: DocsExportInput, dependencies?: DocsExportDependencies): Promise<Result<DocsExportOutput, InternalError>>;
30
+ /**
31
+ * Print docs results in the appropriate output format.
32
+ *
33
+ * @param result - The docs output
34
+ * @param options - Output formatting options
35
+ */
36
+ declare function printDocsExportResults(result: DocsExportOutput, options?: {
37
+ mode?: CliOutputMode;
38
+ }): Promise<void>;
39
+ export { DocsExportInput, DocsExportOutput, runDocsExport, printDocsExportResults };
@@ -1,11 +1,11 @@
1
1
  type Operation = {
2
2
  readonly type: "file-create";
3
3
  readonly path: string;
4
- readonly source: "template" | "block" | "generated";
4
+ readonly source: "preset" | "block" | "generated";
5
5
  } | {
6
6
  readonly type: "file-overwrite";
7
7
  readonly path: string;
8
- readonly source: "template" | "block" | "generated";
8
+ readonly source: "preset" | "block" | "generated";
9
9
  } | {
10
10
  readonly type: "file-skip";
11
11
  readonly path: string;
@@ -0,0 +1,106 @@
1
+ // @bun
2
+ import {
3
+ actionInternalErr,
4
+ outputModeSchema,
5
+ resolveBooleanFlagAlias,
6
+ resolveInstallTimeoutFlag,
7
+ resolveLocalFlag,
8
+ resolveNoToolingFlag,
9
+ resolveStringFlag
10
+ } from "./outfitter-7n7vsz95.js";
11
+ import {
12
+ runScaffold
13
+ } from "./outfitter-6ddf91vh.js";
14
+ import {
15
+ printScaffoldResults
16
+ } from "./outfitter-qsrx7m4w.js";
17
+ import {
18
+ resolveOutputModeFromContext
19
+ } from "./outfitter-7r12fj7f.js";
20
+
21
+ // apps/outfitter/src/actions/scaffold.ts
22
+ import { actionCliPresets } from "@outfitter/cli/actions";
23
+ import { dryRunPreset, forcePreset } from "@outfitter/cli/flags";
24
+ import { defineAction, Result } from "@outfitter/contracts";
25
+ import { z } from "zod";
26
+ var scaffoldInputSchema = z.object({
27
+ target: z.string(),
28
+ name: z.string().optional(),
29
+ force: z.boolean(),
30
+ skipInstall: z.boolean(),
31
+ dryRun: z.boolean(),
32
+ with: z.string().optional(),
33
+ noTooling: z.boolean().optional(),
34
+ local: z.boolean().optional(),
35
+ installTimeout: z.number().optional(),
36
+ cwd: z.string(),
37
+ outputMode: outputModeSchema
38
+ });
39
+ var scaffoldSharedFlags = actionCliPresets(forcePreset(), dryRunPreset());
40
+ function resolveScaffoldOptions(context) {
41
+ const flags = context.flags;
42
+ const { force, dryRun } = scaffoldSharedFlags.resolve(context);
43
+ const outputMode = resolveOutputModeFromContext(context.flags);
44
+ const noTooling = resolveNoToolingFlag(flags);
45
+ const local = resolveLocalFlag(flags);
46
+ const installTimeout = resolveInstallTimeoutFlag(flags.installTimeout);
47
+ return {
48
+ target: String(context.args[0] ?? ""),
49
+ name: resolveStringFlag(context.args[1]),
50
+ force,
51
+ skipInstall: resolveBooleanFlagAlias(context.flags, "skipInstall", "skip-install"),
52
+ dryRun,
53
+ ...local !== undefined ? { local } : {},
54
+ with: resolveStringFlag(flags.with),
55
+ ...noTooling !== undefined ? { noTooling } : {},
56
+ ...installTimeout !== undefined ? { installTimeout } : {},
57
+ cwd: process.cwd(),
58
+ outputMode
59
+ };
60
+ }
61
+ var scaffoldAction = defineAction({
62
+ id: "scaffold",
63
+ description: "Add a capability to an existing project",
64
+ surfaces: ["cli"],
65
+ input: scaffoldInputSchema,
66
+ cli: {
67
+ command: "scaffold <target> [name]",
68
+ description: "Add a capability (cli, mcp, daemon, lib, ...) to an existing project",
69
+ options: [
70
+ ...scaffoldSharedFlags.options,
71
+ {
72
+ flags: "--skip-install",
73
+ description: "Skip bun install",
74
+ defaultValue: false
75
+ },
76
+ {
77
+ flags: "--with <blocks>",
78
+ description: "Comma-separated tooling blocks to add"
79
+ },
80
+ {
81
+ flags: "--no-tooling",
82
+ description: "Skip default tooling blocks"
83
+ },
84
+ {
85
+ flags: "--local",
86
+ description: "Use workspace:* for @outfitter dependencies"
87
+ },
88
+ {
89
+ flags: "--install-timeout <ms>",
90
+ description: "bun install timeout in milliseconds"
91
+ }
92
+ ],
93
+ mapInput: resolveScaffoldOptions
94
+ },
95
+ handler: async (input) => {
96
+ const { outputMode, ...scaffoldInput } = input;
97
+ const result = await runScaffold(scaffoldInput);
98
+ if (result.isErr()) {
99
+ return actionInternalErr("scaffold", result.error);
100
+ }
101
+ await printScaffoldResults(result.value, { mode: outputMode });
102
+ return Result.ok(result.value);
103
+ }
104
+ });
105
+
106
+ export { scaffoldAction };
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Structured migration doc frontmatter parsing for `outfitter upgrade`.
3
+ *
4
+ * @packageDocumentation
5
+ */
6
+ /** Classification of a change within a migration. */
7
+ type MigrationChangeType = "renamed" | "removed" | "signature-changed" | "moved" | "deprecated" | "added";
8
+ /** A single structured change entry from migration frontmatter. */
9
+ interface MigrationChange {
10
+ /** Path to codemod script relative to the codemods directory. */
11
+ readonly codemod?: string;
12
+ readonly detail?: string;
13
+ readonly export?: string;
14
+ readonly from?: string;
15
+ readonly path?: string;
16
+ readonly to?: string;
17
+ readonly type: MigrationChangeType;
18
+ }
19
+ /** Parsed frontmatter from a migration doc. */
20
+ interface MigrationFrontmatter {
21
+ readonly breaking: boolean;
22
+ readonly changes?: readonly MigrationChange[];
23
+ readonly package: string;
24
+ readonly version: string;
25
+ }
26
+ /**
27
+ * Strip a YAML frontmatter block from migration doc content.
28
+ */
29
+ declare function stripMigrationFrontmatter(content: string): string;
30
+ /**
31
+ * Parse the full frontmatter from a migration doc, including the `changes` array.
32
+ *
33
+ * Returns `null` if the content has no valid frontmatter or is missing
34
+ * required fields (`package`, `version`, `breaking`).
35
+ */
36
+ declare function parseMigrationFrontmatter(content: string): MigrationFrontmatter | null;
37
+ export { MigrationChangeType, MigrationChange, MigrationFrontmatter, stripMigrationFrontmatter, parseMigrationFrontmatter };
@@ -1,4 +1,4 @@
1
- import { ScaffoldError } from "./outfitter-n9g1zk4x.js";
1
+ import { ScaffoldError } from "./outfitter-cyvr4r8d.js";
2
2
  import { Result } from "@outfitter/contracts";
3
3
  declare function buildWorkspaceRootReadme(workspaceName: string): string;
4
4
  declare function buildWorkspaceRootPackageJson(workspaceName: string): string;
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  runAdd
4
- } from "./outfitter-79vfxt6y.js";
4
+ } from "./outfitter-3tx3adgj.js";
5
5
  import {
6
6
  ScaffoldError
7
7
  } from "./outfitter-8y2dfx6n.js";
@@ -0,0 +1,89 @@
1
+ // @bun
2
+ import {
3
+ applyJq
4
+ } from "./outfitter-5vx1bp7h.js";
5
+ import {
6
+ loadDocsModule
7
+ } from "./outfitter-svts4wk2.js";
8
+ import {
9
+ resolveStructuredOutputMode
10
+ } from "./outfitter-7r12fj7f.js";
11
+
12
+ // apps/outfitter/src/commands/docs-list.ts
13
+ import { resolve } from "path";
14
+ import { output } from "@outfitter/cli";
15
+ import { InternalError, Result } from "@outfitter/contracts";
16
+ import { createTheme } from "@outfitter/tui/render";
17
+ async function runDocsList(input) {
18
+ try {
19
+ const cwd = resolve(input.cwd);
20
+ const docsModule = await loadDocsModule();
21
+ const mapResult = await docsModule.generateDocsMap({ workspaceRoot: cwd });
22
+ if (mapResult.isErr()) {
23
+ return Result.err(new InternalError({
24
+ message: mapResult.error.message,
25
+ context: { action: "docs.list" }
26
+ }));
27
+ }
28
+ const rawMap = mapResult.value;
29
+ let entries = rawMap.entries.map((entry) => ({
30
+ id: entry.id,
31
+ kind: entry.kind,
32
+ title: entry.title,
33
+ sourcePath: entry.sourcePath,
34
+ outputPath: entry.outputPath,
35
+ ...entry.package !== undefined ? { package: entry.package } : {}
36
+ }));
37
+ if (input.kind) {
38
+ entries = entries.filter((entry) => entry.kind === input.kind);
39
+ }
40
+ if (input.package) {
41
+ entries = entries.filter((entry) => entry.package === input.package);
42
+ }
43
+ return Result.ok({
44
+ entries,
45
+ total: entries.length
46
+ });
47
+ } catch (error) {
48
+ return Result.err(new InternalError({
49
+ message: error instanceof Error ? error.message : "Failed to list docs",
50
+ context: { action: "docs.list" }
51
+ }));
52
+ }
53
+ }
54
+ async function printDocsListResults(result, options) {
55
+ const structuredMode = resolveStructuredOutputMode(options?.mode);
56
+ if (structuredMode) {
57
+ if (options?.jq) {
58
+ const filtered = await applyJq(result, options.jq, {
59
+ compact: structuredMode === "jsonl"
60
+ });
61
+ process.stdout.write(filtered);
62
+ } else {
63
+ await output(result, { mode: structuredMode });
64
+ }
65
+ return;
66
+ }
67
+ const theme = createTheme();
68
+ const lines = [];
69
+ if (result.total === 0) {
70
+ lines.push(theme.muted("No documentation entries found."));
71
+ await output(lines, { mode: "human" });
72
+ return;
73
+ }
74
+ lines.push("");
75
+ lines.push(`Documentation Entries (${result.total})`);
76
+ lines.push("=".repeat(60));
77
+ lines.push("");
78
+ for (const entry of result.entries) {
79
+ const pkg = entry.package ? theme.muted(` [${entry.package}]`) : "";
80
+ const kind = theme.muted(`(${entry.kind})`);
81
+ lines.push(` ${entry.id} ${kind}${pkg}`);
82
+ lines.push(` ${entry.title}`);
83
+ lines.push(` ${theme.muted(entry.sourcePath)}`);
84
+ lines.push("");
85
+ }
86
+ await output(lines, { mode: "human" });
87
+ }
88
+
89
+ export { runDocsList, printDocsListResults };
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  __require
4
- } from "./outfitter-mdt37hqm.js";
4
+ } from "./outfitter-eepj7rf7.js";
5
5
 
6
6
  // apps/outfitter/src/manifest.ts
7
7
  import { join } from "path";
@@ -0,0 +1,45 @@
1
+ import { CliOutputMode } from "./outfitter-a79xrm12.js";
2
+ import { InternalError, Result } from "@outfitter/contracts";
3
+ /** Validated input for the docs.list action handler. */
4
+ interface DocsListInput {
5
+ readonly cwd: string;
6
+ readonly jq?: string | undefined;
7
+ readonly kind?: string | undefined;
8
+ readonly outputMode: CliOutputMode;
9
+ readonly package?: string | undefined;
10
+ }
11
+ /** Single entry in the docs list output. */
12
+ interface DocsListEntry {
13
+ readonly id: string;
14
+ readonly kind: string;
15
+ readonly outputPath: string;
16
+ readonly package?: string;
17
+ readonly sourcePath: string;
18
+ readonly title: string;
19
+ }
20
+ /** Output shape for the docs.list action. */
21
+ interface DocsListOutput {
22
+ readonly entries: DocsListEntry[];
23
+ readonly total: number;
24
+ }
25
+ /**
26
+ * List documentation entries from the docs map.
27
+ *
28
+ * Generates the docs map for the workspace and returns a filtered list of
29
+ * entries. Supports filtering by doc kind and package name.
30
+ *
31
+ * @param input - Validated action input
32
+ * @returns Result containing the list of docs entries or an error
33
+ */
34
+ declare function runDocsList(input: DocsListInput): Promise<Result<DocsListOutput, InternalError>>;
35
+ /**
36
+ * Print docs list results in the appropriate output format.
37
+ *
38
+ * @param result - The docs list output
39
+ * @param options - Output formatting options
40
+ */
41
+ declare function printDocsListResults(result: DocsListOutput, options?: {
42
+ mode?: CliOutputMode;
43
+ jq?: string | undefined;
44
+ }): Promise<void>;
45
+ export { DocsListInput, DocsListEntry, DocsListOutput, runDocsList, printDocsListResults };
@@ -1,4 +1,4 @@
1
- import { CreateProjectInput, CreateProjectPlan } from "./outfitter-e9rrfekb.js";
1
+ import { CreateProjectInput, CreateProjectPlan } from "./outfitter-htx4asgr.js";
2
2
  import { Result, ValidationError } from "@outfitter/contracts";
3
3
  declare function planCreateProject(input: CreateProjectInput): Result<CreateProjectPlan, ValidationError>;
4
4
  export { planCreateProject };
@@ -1,4 +1,4 @@
1
1
  import "../shared/outfitter-y784nh31.js";
2
- import { INIT_TARGET_IDS, READY_TARGET_IDS, SCAFFOLD_TARGET_IDS, TARGET_IDS, TARGET_REGISTRY, getInitTarget, getReadyTarget, getScaffoldTarget, getTarget, listTargets, resolvePlacement } from "../shared/outfitter-s7jetkge.js";
3
- import { TargetCategory, TargetDefinition, TargetId, TargetScope, TargetStatus } from "../shared/outfitter-r419zfgs.js";
2
+ import { INIT_TARGET_IDS, READY_TARGET_IDS, SCAFFOLD_TARGET_IDS, TARGET_IDS, TARGET_REGISTRY, getInitTarget, getReadyTarget, getScaffoldTarget, getTarget, listTargets, resolvePlacement } from "../shared/outfitter-5r6q2749.js";
3
+ import { TargetCategory, TargetDefinition, TargetId, TargetScope, TargetStatus } from "../shared/outfitter-58rn1sj1.js";
4
4
  export { resolvePlacement, listTargets, getTarget, getScaffoldTarget, getReadyTarget, getInitTarget, TargetStatus, TargetScope, TargetId, TargetDefinition, TargetCategory, TARGET_REGISTRY, TARGET_IDS, SCAFFOLD_TARGET_IDS, READY_TARGET_IDS, INIT_TARGET_IDS };
@@ -1,5 +1,4 @@
1
1
  // @bun
2
- import"../shared/outfitter-ehp18x1n.js";
3
2
  import {
4
3
  INIT_TARGET_IDS,
5
4
  READY_TARGET_IDS,
@@ -12,8 +11,8 @@ import {
12
11
  getTarget,
13
12
  listTargets,
14
13
  resolvePlacement
15
- } from "../shared/outfitter-xe5mzgdc.js";
16
- import"../shared/outfitter-mdt37hqm.js";
14
+ } from "../shared/outfitter-g3hvjshg.js";
15
+ import"../shared/outfitter-eepj7rf7.js";
17
16
  export {
18
17
  resolvePlacement,
19
18
  listTargets,
@@ -1,3 +1,3 @@
1
- import { INIT_TARGET_IDS, READY_TARGET_IDS, SCAFFOLD_TARGET_IDS, TARGET_IDS, TARGET_REGISTRY, getInitTarget, getReadyTarget, getScaffoldTarget, getTarget, listTargets, resolvePlacement } from "../shared/outfitter-s7jetkge.js";
2
- import "../shared/outfitter-r419zfgs.js";
1
+ import { INIT_TARGET_IDS, READY_TARGET_IDS, SCAFFOLD_TARGET_IDS, TARGET_IDS, TARGET_REGISTRY, getInitTarget, getReadyTarget, getScaffoldTarget, getTarget, listTargets, resolvePlacement } from "../shared/outfitter-5r6q2749.js";
2
+ import "../shared/outfitter-58rn1sj1.js";
3
3
  export { resolvePlacement, listTargets, getTarget, getScaffoldTarget, getReadyTarget, getInitTarget, TARGET_REGISTRY, TARGET_IDS, SCAFFOLD_TARGET_IDS, READY_TARGET_IDS, INIT_TARGET_IDS };