outfitter 0.2.5 → 0.2.7

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 (175) hide show
  1. package/README.md +60 -31
  2. package/dist/actions.d.ts +2 -0
  3. package/dist/actions.js +35 -0
  4. package/dist/cli.js +3 -2
  5. package/dist/commands/add.d.ts +54 -0
  6. package/dist/commands/add.js +16 -0
  7. package/dist/commands/check-tsdoc.d.ts +22 -0
  8. package/dist/commands/check-tsdoc.js +8 -0
  9. package/dist/commands/check.d.ts +91 -0
  10. package/dist/commands/check.js +14 -0
  11. package/dist/commands/demo.d.ts +21 -0
  12. package/dist/commands/demo.js +8 -0
  13. package/dist/commands/docs-module-loader.d.ts +2 -0
  14. package/dist/commands/docs-module-loader.js +8 -0
  15. package/dist/commands/doctor.d.ts +2 -0
  16. package/dist/commands/doctor.js +25 -0
  17. package/dist/commands/init.d.ts +7 -0
  18. package/dist/commands/init.js +32 -0
  19. package/dist/commands/repo.d.ts +3 -0
  20. package/dist/commands/repo.js +9 -0
  21. package/dist/commands/scaffold.d.ts +4 -0
  22. package/dist/commands/scaffold.js +32 -0
  23. package/dist/commands/shared-deps.d.ts +21 -0
  24. package/dist/commands/shared-deps.js +11 -0
  25. package/dist/commands/upgrade-codemods.d.ts +42 -0
  26. package/dist/commands/upgrade-codemods.js +15 -0
  27. package/dist/commands/upgrade-planner.d.ts +58 -0
  28. package/dist/commands/upgrade-planner.js +8 -0
  29. package/dist/commands/upgrade-workspace.d.ts +2 -0
  30. package/dist/commands/upgrade-workspace.js +16 -0
  31. package/dist/commands/upgrade.d.ts +221 -0
  32. package/dist/commands/upgrade.js +25 -0
  33. package/dist/create/index.d.ts +5 -0
  34. package/dist/create/index.js +30 -0
  35. package/dist/create/planner.d.ts +3 -0
  36. package/dist/create/planner.js +22 -0
  37. package/dist/create/presets.d.ts +3 -0
  38. package/dist/create/presets.js +12 -0
  39. package/dist/create/types.d.ts +2 -0
  40. package/dist/create/types.js +1 -0
  41. package/dist/engine/blocks.d.ts +3 -0
  42. package/dist/engine/blocks.js +12 -0
  43. package/dist/engine/collector.d.ts +2 -0
  44. package/dist/engine/collector.js +8 -0
  45. package/dist/engine/config.d.ts +3 -0
  46. package/dist/engine/config.js +15 -0
  47. package/dist/engine/dependency-versions.d.ts +12 -0
  48. package/dist/engine/dependency-versions.js +12 -0
  49. package/dist/engine/executor.d.ts +3 -0
  50. package/dist/engine/executor.js +19 -0
  51. package/dist/engine/index.d.ts +8 -0
  52. package/dist/engine/index.js +68 -0
  53. package/dist/engine/names.d.ts +2 -0
  54. package/dist/engine/names.js +24 -0
  55. package/dist/engine/post-scaffold.d.ts +3 -0
  56. package/dist/engine/post-scaffold.js +8 -0
  57. package/dist/engine/render-plan.d.ts +7 -0
  58. package/dist/engine/render-plan.js +9 -0
  59. package/dist/engine/template.d.ts +3 -0
  60. package/dist/engine/template.js +17 -0
  61. package/dist/engine/types.d.ts +2 -0
  62. package/dist/engine/types.js +8 -0
  63. package/dist/engine/workspace.d.ts +3 -0
  64. package/dist/engine/workspace.js +20 -0
  65. package/dist/index.d.ts +100 -129
  66. package/dist/index.js +1 -9
  67. package/dist/manifest.d.ts +71 -0
  68. package/dist/manifest.js +16 -0
  69. package/dist/output-mode.d.ts +2 -0
  70. package/dist/output-mode.js +10 -0
  71. package/dist/shared/{chunk-tpwtpa74.js → chunk-x6644tk8.js} +3840 -2881
  72. package/dist/shared/outfitter-109s75x0.d.ts +76 -0
  73. package/dist/shared/outfitter-1fy7byz5.js +170 -0
  74. package/dist/shared/outfitter-1h7k8xxt.js +29 -0
  75. package/dist/shared/outfitter-20f6a2n4.js +35 -0
  76. package/dist/shared/outfitter-344t1r38.js +1 -0
  77. package/dist/shared/outfitter-4q1zfmvc.js +154 -0
  78. package/dist/shared/outfitter-4s9meh3j.js +221 -0
  79. package/dist/shared/outfitter-5akzvppx.js +125 -0
  80. package/dist/shared/outfitter-5y646xzk.js +301 -0
  81. package/dist/shared/outfitter-5yjr404v.d.ts +22 -0
  82. package/dist/shared/outfitter-63gse8fv.js +316 -0
  83. package/dist/shared/outfitter-6bkqjk86.d.ts +3 -0
  84. package/dist/shared/outfitter-6fgk6adm.d.ts +40 -0
  85. package/dist/shared/outfitter-79vfxt6y.js +269 -0
  86. package/dist/shared/outfitter-7ch26yq8.js +885 -0
  87. package/dist/shared/outfitter-7r12fj7f.js +30 -0
  88. package/dist/shared/outfitter-8y2dfx6n.js +11 -0
  89. package/dist/shared/outfitter-9x1brcmq.js +184 -0
  90. package/dist/shared/outfitter-a79xrm12.d.ts +17 -0
  91. package/dist/shared/outfitter-amc4jbs1.d.ts +50 -0
  92. package/dist/shared/outfitter-bn9c8p2e.js +204 -0
  93. package/dist/shared/outfitter-bpr28y54.js +70 -0
  94. package/dist/shared/outfitter-dpj9erew.d.ts +4 -0
  95. package/dist/shared/outfitter-e9rrfekb.d.ts +51 -0
  96. package/dist/shared/outfitter-ehp18x1n.js +1 -0
  97. package/dist/shared/outfitter-f9znfhkn.d.ts +5 -0
  98. package/dist/shared/outfitter-fhnjpjwc.d.ts +18 -0
  99. package/dist/shared/outfitter-fn20r49x.d.ts +5 -0
  100. package/dist/shared/outfitter-h3q6ae6d.d.ts +48 -0
  101. package/dist/shared/outfitter-ha89qf8q.js +132 -0
  102. package/dist/shared/outfitter-hsp8vy5m.d.ts +146 -0
  103. package/dist/shared/outfitter-hvsaxgcp.js +1 -0
  104. package/dist/shared/outfitter-j833sxws.js +61 -0
  105. package/dist/shared/outfitter-ksyvwmb5.js +191 -0
  106. package/dist/shared/outfitter-m3ehh37q.d.ts +22 -0
  107. package/dist/shared/outfitter-m44n0qzw.js +161 -0
  108. package/dist/shared/outfitter-mdt37hqm.js +4 -0
  109. package/dist/shared/outfitter-mt7d1ek2.js +698 -0
  110. package/dist/shared/outfitter-mtbpabf3.js +91 -0
  111. package/dist/shared/outfitter-n9g1zk4x.d.ts +66 -0
  112. package/dist/shared/outfitter-p71qb0f0.js +82 -0
  113. package/dist/shared/outfitter-pcj9gg2g.js +909 -0
  114. package/dist/shared/outfitter-pj9vp00r.js +601 -0
  115. package/dist/shared/outfitter-qakwgrrh.d.ts +4 -0
  116. package/dist/shared/outfitter-r419zfgs.d.ts +30 -0
  117. package/dist/shared/outfitter-s7jetkge.d.ts +18 -0
  118. package/dist/shared/outfitter-ttjr95y9.js +98 -0
  119. package/dist/shared/outfitter-vh4xgb93.js +35 -0
  120. package/dist/shared/outfitter-w1j80j1r.js +326 -0
  121. package/dist/shared/outfitter-xe5mzgdc.js +208 -0
  122. package/dist/shared/outfitter-ybbazsxq.d.ts +14 -0
  123. package/dist/shared/outfitter-yraebrmw.d.ts +5 -0
  124. package/dist/shared/outfitter-yvksv5qb.js +322 -0
  125. package/dist/shared/outfitter-z0we32cp.d.ts +63 -0
  126. package/dist/shared/outfitter-z5sx06qe.d.ts +25 -0
  127. package/dist/shared/outfitter-zwyvewr1.js +36 -0
  128. package/dist/targets/index.d.ts +4 -0
  129. package/dist/targets/index.js +29 -0
  130. package/dist/targets/registry.d.ts +3 -0
  131. package/dist/targets/registry.js +28 -0
  132. package/dist/targets/types.d.ts +2 -0
  133. package/dist/targets/types.js +1 -0
  134. package/package.json +45 -28
  135. package/template-versions.json +22 -0
  136. package/templates/basic/package.json.template +6 -6
  137. package/templates/cli/biome.json.template +1 -1
  138. package/templates/cli/package.json.template +17 -9
  139. package/templates/daemon/biome.json.template +1 -1
  140. package/templates/daemon/package.json.template +18 -10
  141. package/templates/full-stack/.gitignore.template +30 -0
  142. package/templates/full-stack/README.md.template +30 -0
  143. package/templates/full-stack/apps/cli/package.json.template +39 -0
  144. package/templates/full-stack/apps/cli/src/cli.ts.template +24 -0
  145. package/templates/full-stack/apps/cli/src/index.test.ts.template +18 -0
  146. package/templates/full-stack/apps/cli/src/index.ts.template +5 -0
  147. package/templates/full-stack/apps/cli/tsconfig.json.template +37 -0
  148. package/templates/full-stack/apps/mcp/package.json.template +40 -0
  149. package/templates/full-stack/apps/mcp/src/index.test.ts.template +18 -0
  150. package/templates/full-stack/apps/mcp/src/index.ts.template +6 -0
  151. package/templates/full-stack/apps/mcp/src/mcp.ts.template +22 -0
  152. package/templates/full-stack/apps/mcp/src/server.ts.template +10 -0
  153. package/templates/full-stack/apps/mcp/tsconfig.json.template +37 -0
  154. package/templates/full-stack/package.json.template +16 -0
  155. package/templates/full-stack/packages/core/package.json.template +36 -0
  156. package/templates/full-stack/packages/core/src/handlers.ts.template +31 -0
  157. package/templates/full-stack/packages/core/src/index.test.ts.template +30 -0
  158. package/templates/full-stack/packages/core/src/index.ts.template +8 -0
  159. package/templates/full-stack/packages/core/src/types.ts.template +13 -0
  160. package/templates/full-stack/packages/core/tsconfig.json.template +34 -0
  161. package/templates/library/.gitignore.template +30 -0
  162. package/templates/library/README.md.template +29 -0
  163. package/templates/library/bunup.config.ts.template +20 -0
  164. package/templates/library/package.json.template +55 -0
  165. package/templates/library/src/handlers.ts.template +31 -0
  166. package/templates/library/src/index.test.ts.template +35 -0
  167. package/templates/library/src/index.ts.template +8 -0
  168. package/templates/library/src/types.ts.template +13 -0
  169. package/templates/library/tsconfig.json.template +34 -0
  170. package/templates/mcp/biome.json.template +1 -1
  171. package/templates/mcp/package.json.template +17 -9
  172. package/templates/mcp/src/index.ts.template +1 -1
  173. package/templates/mcp/src/mcp.ts.template +28 -74
  174. package/templates/mcp/src/server.ts.template +2 -9
  175. package/templates/minimal/package.json.template +13 -6
package/README.md CHANGED
@@ -40,8 +40,7 @@ Top-level commands:
40
40
  - `scaffold <target> [name]` - Add a new capability to an existing project
41
41
  - `add <block>` - Add a tooling block (`claude`, `biome`, `lefthook`, `bootstrap`, `scaffolding`)
42
42
  - `repo <action> <subject>` - Repository maintenance namespace (`check|sync|export`)
43
- - `migrate kit [directory]` - Migrate foundation imports and dependencies to `@outfitter/kit`
44
- - `update` - Check installed `@outfitter/*` versions and optionally show migration guidance
43
+ - `upgrade` - Check installed `@outfitter/*` versions and optionally show migration guidance
45
44
  - `doctor` - Validate local environment and project dependencies
46
45
  - `demo [section]` - Forward to the dedicated demo CLI (`outfitter-demo`)
47
46
 
@@ -165,44 +164,28 @@ outfitter repo check exports --json
165
164
  outfitter repo check readme
166
165
  ```
167
166
 
168
- ### `migrate kit`
169
-
170
- Codemod for kit-first foundation adoption.
171
-
172
- ```bash
173
- outfitter migrate kit [directory] [options]
174
- ```
175
-
176
- Options:
177
-
178
- - `--dry-run` - Preview changes without writing files
179
-
180
- Examples:
181
-
182
- ```bash
183
- outfitter migrate kit --dry-run
184
- outfitter migrate kit .
185
- ```
186
-
187
- ### `update`
167
+ ### `upgrade`
188
168
 
189
169
  Check installed `@outfitter/*` packages against npm versions.
190
170
 
191
171
  ```bash
192
- outfitter update [options]
172
+ outfitter upgrade [options]
193
173
  ```
194
174
 
195
175
  Options:
196
176
 
197
177
  - `--guide` - Include composed migration guidance
178
+ - `--all` - Include breaking changes
179
+ - `--dry-run` - Preview without making changes
180
+ - `--yes` - Skip interactive prompts
198
181
  - `--cwd <path>` - Working directory to inspect
199
182
 
200
183
  Examples:
201
184
 
202
185
  ```bash
203
- outfitter update
204
- outfitter update --guide
205
- outfitter update --json --cwd .
186
+ outfitter upgrade
187
+ outfitter upgrade --guide
188
+ outfitter upgrade --json --cwd .
206
189
  ```
207
190
 
208
191
  ### `doctor`
@@ -228,10 +211,58 @@ Options:
228
211
 
229
212
  Use `outfitter-demo` (or `cli-demo`) directly for the dedicated demo app.
230
213
 
214
+ ### `schema`
215
+
216
+ Machine-readable introspection of registered actions. Agents can discover CLI capabilities without scraping `--help`.
217
+
218
+ ```bash
219
+ outfitter schema # Human-readable summary
220
+ outfitter schema <action-id> # Detail view for a single action
221
+ outfitter schema --output json # Machine-readable JSON manifest
222
+ outfitter schema --output json --pretty # Pretty-printed JSON
223
+ outfitter schema --surface cli # Filter by surface
224
+ ```
225
+
226
+ Subcommands for surface map management:
227
+
228
+ ```bash
229
+ outfitter schema generate # Write .outfitter/surface.json
230
+ outfitter schema generate --dry-run # Print without writing
231
+ outfitter schema diff # Compare runtime vs committed
232
+ outfitter schema diff --output json # Structured diff as JSON
233
+ ```
234
+
235
+ ### `check`
236
+
237
+ Compare local config blocks against the registry for drift detection.
238
+
239
+ ```bash
240
+ outfitter check [options]
241
+ outfitter check tsdoc [options]
242
+ ```
243
+
244
+ Options:
245
+
246
+ - `-v, --verbose` - Show diffs for drifted files
247
+ - `-b, --block <name>` - Check a specific block only
248
+ - `-o, --output <mode>` - Output mode (`human`, `json`, `jsonl`)
249
+ - `--cwd <path>` - Working directory
250
+
251
+ `check tsdoc` checks TSDoc coverage on exported declarations:
252
+
253
+ ```bash
254
+ outfitter check tsdoc # Human-readable coverage report
255
+ outfitter check tsdoc --strict # Fail if coverage is below threshold
256
+ outfitter check tsdoc --output json # Machine-readable JSON output
257
+ outfitter check tsdoc --summary # Compact output
258
+ outfitter check tsdoc --level undocumented # Filter by coverage level
259
+ outfitter check tsdoc --package @outfitter/cli # Filter to specific package
260
+ ```
261
+
231
262
  ## Command Conventions
232
263
 
233
264
  Canonical boundary and command conventions are documented in
234
- [`docs/BOUNDARY-CONVENTIONS.md`](../../docs/BOUNDARY-CONVENTIONS.md).
265
+ [Architecture: Boundary Conventions](../../docs/ARCHITECTURE.md#boundary-conventions).
235
266
 
236
267
  Quick model status:
237
268
 
@@ -247,10 +278,8 @@ Root exports:
247
278
  import {
248
279
  runDoctor,
249
280
  runInit,
250
- runMigrateKit,
251
281
  runScaffold,
252
282
  type InitOptions,
253
- type MigrateKitOptions,
254
283
  type ScaffoldOptions,
255
284
  } from "outfitter";
256
285
  ```
@@ -259,7 +288,7 @@ Command subpath exports:
259
288
 
260
289
  ```typescript
261
290
  import { runAdd } from "outfitter/commands/add";
262
- import { runUpdate } from "outfitter/commands/update";
291
+ import { runUpgrade } from "outfitter/commands/upgrade";
263
292
  ```
264
293
 
265
294
  Example:
@@ -281,7 +310,7 @@ if (result.isErr()) {
281
310
 
282
311
  ## Requirements
283
312
 
284
- - Bun >= 1.3.7
313
+ - Bun >= 1.3.9
285
314
 
286
315
  ## Related Packages
287
316
 
@@ -0,0 +1,2 @@
1
+ import { outfitterActions } from "./shared/outfitter-6bkqjk86.js";
2
+ export { outfitterActions };
@@ -0,0 +1,35 @@
1
+ // @bun
2
+ import {
3
+ outfitterActions
4
+ } from "./shared/outfitter-7ch26yq8.js";
5
+ import"./shared/outfitter-pj9vp00r.js";
6
+ import"./shared/outfitter-mt7d1ek2.js";
7
+ import"./shared/outfitter-ksyvwmb5.js";
8
+ import"./shared/outfitter-w1j80j1r.js";
9
+ import"./shared/outfitter-5y646xzk.js";
10
+ import"./shared/outfitter-63gse8fv.js";
11
+ import"./shared/outfitter-pcj9gg2g.js";
12
+ import"./shared/outfitter-bpr28y54.js";
13
+ import"./shared/outfitter-yvksv5qb.js";
14
+ import"./shared/outfitter-4s9meh3j.js";
15
+ import"./shared/outfitter-ehp18x1n.js";
16
+ import"./shared/outfitter-xe5mzgdc.js";
17
+ import"./shared/outfitter-1h7k8xxt.js";
18
+ import"./shared/outfitter-ttjr95y9.js";
19
+ import"./shared/outfitter-344t1r38.js";
20
+ import"./shared/outfitter-5akzvppx.js";
21
+ import"./shared/outfitter-ha89qf8q.js";
22
+ import"./shared/outfitter-20f6a2n4.js";
23
+ import"./shared/outfitter-m44n0qzw.js";
24
+ import"./shared/outfitter-9x1brcmq.js";
25
+ import"./shared/outfitter-j833sxws.js";
26
+ import"./shared/outfitter-79vfxt6y.js";
27
+ import"./shared/outfitter-1fy7byz5.js";
28
+ import"./shared/outfitter-4q1zfmvc.js";
29
+ import"./shared/outfitter-8y2dfx6n.js";
30
+ import"./shared/outfitter-mtbpabf3.js";
31
+ import"./shared/outfitter-7r12fj7f.js";
32
+ import"./shared/outfitter-mdt37hqm.js";
33
+ export {
34
+ outfitterActions
35
+ };
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  createRepoCommand,
4
4
  outfitterActions
5
- } from "./shared/chunk-tpwtpa74.js";
5
+ } from "./shared/chunk-x6644tk8.js";
6
6
 
7
7
  // src/cli.ts
8
8
  import { readFileSync } from "node:fs";
@@ -43,7 +43,8 @@ function createProgram() {
43
43
  requestId,
44
44
  logger: logger.child({ action: action.id, requestId })
45
45
  });
46
- }
46
+ },
47
+ schema: { programName: "outfitter", surface: {} }
47
48
  })) {
48
49
  cli.register(command);
49
50
  }
@@ -0,0 +1,54 @@
1
+ import { OutputMode } from "@outfitter/cli/types";
2
+ import { Result } from "@outfitter/contracts";
3
+ import { AddBlockResult } from "@outfitter/tooling";
4
+ /**
5
+ * Input for the add command.
6
+ */
7
+ interface AddInput {
8
+ /** Block name to add */
9
+ readonly block: string;
10
+ /** Working directory (defaults to cwd) */
11
+ readonly cwd?: string;
12
+ /** Show what would be done without making changes */
13
+ readonly dryRun: boolean;
14
+ /** Overwrite existing files */
15
+ readonly force: boolean;
16
+ }
17
+ /**
18
+ * Error returned when adding a block fails.
19
+ */
20
+ declare class AddError extends Error {
21
+ readonly _tag: "AddError";
22
+ constructor(message: string);
23
+ }
24
+ /**
25
+ * Runs the add command programmatically.
26
+ *
27
+ * @param input - Add command input
28
+ * @returns Result with details of what was added
29
+ *
30
+ * @example
31
+ * ```typescript
32
+ * const result = await runAdd({
33
+ * block: "scaffolding",
34
+ * force: false,
35
+ * dryRun: false,
36
+ * });
37
+ *
38
+ * if (result.isOk()) {
39
+ * console.log(`Created ${result.value.created.length} files`);
40
+ * }
41
+ * ```
42
+ */
43
+ declare function runAdd(input: AddInput): Promise<Result<AddBlockResult, AddError>>;
44
+ /**
45
+ * Prints the results of the add command.
46
+ */
47
+ declare function printAddResults(result: AddBlockResult, dryRun: boolean, options?: {
48
+ mode?: OutputMode;
49
+ }): Promise<void>;
50
+ /**
51
+ * Lists available blocks.
52
+ */
53
+ declare function listBlocks(): Result<string[], AddError>;
54
+ export { runAdd, printAddResults, listBlocks, AddInput, AddError };
@@ -0,0 +1,16 @@
1
+ // @bun
2
+ import {
3
+ AddError,
4
+ listBlocks,
5
+ printAddResults,
6
+ runAdd
7
+ } from "../shared/outfitter-79vfxt6y.js";
8
+ import"../shared/outfitter-mtbpabf3.js";
9
+ import"../shared/outfitter-7r12fj7f.js";
10
+ import"../shared/outfitter-mdt37hqm.js";
11
+ export {
12
+ runAdd,
13
+ printAddResults,
14
+ listBlocks,
15
+ AddError
16
+ };
@@ -0,0 +1,22 @@
1
+ import { CliOutputMode } from "../shared/outfitter-a79xrm12.js";
2
+ import { Result } from "@outfitter/contracts";
3
+ import { CoverageLevel, TsDocCheckResult } from "@outfitter/tooling";
4
+ /** Validated input for the check-tsdoc action handler. */
5
+ interface CheckTsDocInput {
6
+ readonly cwd: string;
7
+ readonly jq: string | undefined;
8
+ readonly level: CoverageLevel | undefined;
9
+ readonly minCoverage: number;
10
+ readonly outputMode: CliOutputMode;
11
+ readonly packages: readonly string[];
12
+ readonly strict: boolean;
13
+ readonly summary: boolean;
14
+ }
15
+ /**
16
+ * Run TSDoc coverage analysis and format output.
17
+ *
18
+ * @param input - Validated action input
19
+ * @returns Result containing the coverage analysis
20
+ */
21
+ declare function runCheckTsdoc(input: CheckTsDocInput): Promise<Result<TsDocCheckResult, Error>>;
22
+ export { runCheckTsdoc, CheckTsDocInput };
@@ -0,0 +1,8 @@
1
+ // @bun
2
+ import {
3
+ runCheckTsdoc
4
+ } from "../shared/outfitter-63gse8fv.js";
5
+ import"../shared/outfitter-mdt37hqm.js";
6
+ export {
7
+ runCheckTsdoc
8
+ };
@@ -0,0 +1,91 @@
1
+ import { OutputMode } from "@outfitter/cli/types";
2
+ import { Result } from "@outfitter/contracts";
3
+ /**
4
+ * Options for the check command.
5
+ */
6
+ interface CheckOptions {
7
+ /** Check a specific block only. */
8
+ readonly block?: string;
9
+ /** Machine-oriented output for CI. */
10
+ readonly ci?: boolean;
11
+ /** Working directory to check. */
12
+ readonly cwd: string;
13
+ /** Output mode override. */
14
+ readonly outputMode?: OutputMode;
15
+ /** Show diff information for drifted files. */
16
+ readonly verbose?: boolean;
17
+ }
18
+ /**
19
+ * Information about a drifted file (included in verbose mode).
20
+ */
21
+ interface DriftedFileInfo {
22
+ /** File path relative to project root. */
23
+ readonly path: string;
24
+ /** Reason for drift classification. */
25
+ readonly reason: "modified" | "missing";
26
+ }
27
+ /**
28
+ * Status of a single block after comparison.
29
+ */
30
+ interface BlockCheckStatus {
31
+ /** Current tooling version providing the registry. */
32
+ readonly currentToolingVersion?: string;
33
+ /** Drifted file details (populated when verbose is true). */
34
+ readonly driftedFiles?: DriftedFileInfo[];
35
+ /** Tooling version the block was installed from. */
36
+ readonly installedFrom?: string;
37
+ /** Block name. */
38
+ readonly name: string;
39
+ /** Comparison result. */
40
+ readonly status: "current" | "drifted" | "missing";
41
+ }
42
+ /**
43
+ * Complete result of the check command.
44
+ */
45
+ interface CheckResult {
46
+ /** Per-block comparison results. */
47
+ readonly blocks: BlockCheckStatus[];
48
+ /** Number of blocks matching the registry. */
49
+ readonly currentCount: number;
50
+ /** Number of blocks with local modifications. */
51
+ readonly driftedCount: number;
52
+ /** Number of blocks with missing files. */
53
+ readonly missingCount: number;
54
+ /** Number of blocks checked. */
55
+ readonly totalChecked: number;
56
+ }
57
+ /**
58
+ * Error returned when the check command fails.
59
+ */
60
+ declare class CheckError extends Error {
61
+ readonly _tag: "CheckError";
62
+ constructor(message: string);
63
+ }
64
+ /**
65
+ * Runs the check command programmatically.
66
+ *
67
+ * Reads the manifest (or falls back to file-presence heuristic) and
68
+ * compares each installed block against the registry.
69
+ *
70
+ * @param options - Check command options
71
+ * @returns Result with per-block comparison statuses
72
+ *
73
+ * @example
74
+ * ```typescript
75
+ * const result = await runCheck({ cwd: process.cwd() });
76
+ * if (result.isOk()) {
77
+ * if (result.value.driftedCount > 0) {
78
+ * console.log("Some blocks have drifted from the registry");
79
+ * }
80
+ * }
81
+ * ```
82
+ */
83
+ declare function runCheck(options: CheckOptions): Promise<Result<CheckResult, CheckError>>;
84
+ /**
85
+ * Formats and outputs check results.
86
+ */
87
+ declare function printCheckResults(result: CheckResult, options?: {
88
+ mode?: OutputMode;
89
+ verbose?: boolean;
90
+ }): Promise<void>;
91
+ export { runCheck, printCheckResults, DriftedFileInfo, CheckResult, CheckOptions, CheckError, BlockCheckStatus };
@@ -0,0 +1,14 @@
1
+ // @bun
2
+ import {
3
+ CheckError,
4
+ printCheckResults,
5
+ runCheck
6
+ } from "../shared/outfitter-w1j80j1r.js";
7
+ import"../shared/outfitter-mtbpabf3.js";
8
+ import"../shared/outfitter-7r12fj7f.js";
9
+ import"../shared/outfitter-mdt37hqm.js";
10
+ export {
11
+ runCheck,
12
+ printCheckResults,
13
+ CheckError
14
+ };
@@ -0,0 +1,21 @@
1
+ import { CliOutputMode } from "../shared/outfitter-a79xrm12.js";
2
+ /**
3
+ * Options for forwarding to the demo CLI.
4
+ */
5
+ interface DemoOptions {
6
+ readonly animate?: boolean | undefined;
7
+ readonly list?: boolean | undefined;
8
+ readonly outputMode: CliOutputMode;
9
+ readonly section?: string | undefined;
10
+ }
11
+ /**
12
+ * Result of forwarding the demo command.
13
+ */
14
+ interface DemoResult {
15
+ readonly exitCode: number;
16
+ }
17
+ /**
18
+ * Runs the demo command through available entrypoints.
19
+ */
20
+ declare function runDemo(options: DemoOptions): Promise<DemoResult>;
21
+ export { runDemo, DemoResult, DemoOptions };
@@ -0,0 +1,8 @@
1
+ // @bun
2
+ import {
3
+ runDemo
4
+ } from "../shared/outfitter-ksyvwmb5.js";
5
+ import"../shared/outfitter-mdt37hqm.js";
6
+ export {
7
+ runDemo
8
+ };
@@ -0,0 +1,2 @@
1
+ import { CreateDocsCommandOptions, DocsCommandIo, DocsExportTarget, ExecuteCheckCommandOptions, ExecuteExportCommandOptions, ExecuteSyncCommandOptions, loadDocsModule } from "../shared/outfitter-6fgk6adm.js";
2
+ export { loadDocsModule, ExecuteSyncCommandOptions, ExecuteExportCommandOptions, ExecuteCheckCommandOptions, DocsExportTarget, DocsCommandIo, CreateDocsCommandOptions };
@@ -0,0 +1,8 @@
1
+ // @bun
2
+ import {
3
+ loadDocsModule
4
+ } from "../shared/outfitter-zwyvewr1.js";
5
+ import"../shared/outfitter-mdt37hqm.js";
6
+ export {
7
+ loadDocsModule
8
+ };
@@ -0,0 +1,2 @@
1
+ import { BunVersionCheck, CheckResult, ConfigFilesCheck, DependenciesCheck, DirectoriesCheck, DoctorOptions, DoctorResult, DoctorSummary, PackageJsonCheck, WorkspaceMemberHealth, doctorCommand, printDoctorResults, runDoctor } from "../shared/outfitter-hsp8vy5m.js";
2
+ export { runDoctor, printDoctorResults, doctorCommand, WorkspaceMemberHealth, PackageJsonCheck, DoctorSummary, DoctorResult, DoctorOptions, DirectoriesCheck, DependenciesCheck, ConfigFilesCheck, CheckResult, BunVersionCheck };
@@ -0,0 +1,25 @@
1
+ // @bun
2
+ import {
3
+ doctorCommand,
4
+ printDoctorResults,
5
+ runDoctor
6
+ } from "../shared/outfitter-5y646xzk.js";
7
+ import"../shared/outfitter-344t1r38.js";
8
+ import"../shared/outfitter-5akzvppx.js";
9
+ import"../shared/outfitter-ha89qf8q.js";
10
+ import"../shared/outfitter-20f6a2n4.js";
11
+ import"../shared/outfitter-m44n0qzw.js";
12
+ import"../shared/outfitter-9x1brcmq.js";
13
+ import"../shared/outfitter-j833sxws.js";
14
+ import"../shared/outfitter-79vfxt6y.js";
15
+ import"../shared/outfitter-1fy7byz5.js";
16
+ import"../shared/outfitter-4q1zfmvc.js";
17
+ import"../shared/outfitter-8y2dfx6n.js";
18
+ import"../shared/outfitter-mtbpabf3.js";
19
+ import"../shared/outfitter-7r12fj7f.js";
20
+ import"../shared/outfitter-mdt37hqm.js";
21
+ export {
22
+ runDoctor,
23
+ printDoctorResults,
24
+ doctorCommand
25
+ };
@@ -0,0 +1,7 @@
1
+ import { InitError, InitOptions, InitPresetId, InitResult, InitStructure, initCommand, printInitResults, runInit } from "../shared/outfitter-z0we32cp.js";
2
+ import "../shared/outfitter-z5sx06qe.js";
3
+ import "../shared/outfitter-y784nh31.js";
4
+ import "../shared/outfitter-s7jetkge.js";
5
+ import "../shared/outfitter-r419zfgs.js";
6
+ import "../shared/outfitter-amc4jbs1.js";
7
+ export { runInit, printInitResults, initCommand, InitStructure, InitResult, InitPresetId, InitOptions, InitError };
@@ -0,0 +1,32 @@
1
+ // @bun
2
+ import {
3
+ InitError,
4
+ initCommand,
5
+ printInitResults,
6
+ runInit
7
+ } from "../shared/outfitter-mt7d1ek2.js";
8
+ import"../shared/outfitter-4s9meh3j.js";
9
+ import"../shared/outfitter-ehp18x1n.js";
10
+ import"../shared/outfitter-xe5mzgdc.js";
11
+ import"../shared/outfitter-1h7k8xxt.js";
12
+ import"../shared/outfitter-ttjr95y9.js";
13
+ import"../shared/outfitter-344t1r38.js";
14
+ import"../shared/outfitter-5akzvppx.js";
15
+ import"../shared/outfitter-ha89qf8q.js";
16
+ import"../shared/outfitter-20f6a2n4.js";
17
+ import"../shared/outfitter-m44n0qzw.js";
18
+ import"../shared/outfitter-9x1brcmq.js";
19
+ import"../shared/outfitter-j833sxws.js";
20
+ import"../shared/outfitter-79vfxt6y.js";
21
+ import"../shared/outfitter-1fy7byz5.js";
22
+ import"../shared/outfitter-4q1zfmvc.js";
23
+ import"../shared/outfitter-8y2dfx6n.js";
24
+ import"../shared/outfitter-mtbpabf3.js";
25
+ import"../shared/outfitter-7r12fj7f.js";
26
+ import"../shared/outfitter-mdt37hqm.js";
27
+ export {
28
+ runInit,
29
+ printInitResults,
30
+ initCommand,
31
+ InitError
32
+ };
@@ -0,0 +1,3 @@
1
+ import { CreateRepoCommandOptions, RepoCheckSubject, RepoCommandIo, RepoToolingInvocation, createRepoCommand } from "../shared/outfitter-5yjr404v.js";
2
+ import "../shared/outfitter-6fgk6adm.js";
3
+ export { createRepoCommand, RepoToolingInvocation, RepoCommandIo, RepoCheckSubject, CreateRepoCommandOptions };
@@ -0,0 +1,9 @@
1
+ // @bun
2
+ import {
3
+ createRepoCommand
4
+ } from "../shared/outfitter-bn9c8p2e.js";
5
+ import"../shared/outfitter-zwyvewr1.js";
6
+ import"../shared/outfitter-mdt37hqm.js";
7
+ export {
8
+ createRepoCommand
9
+ };
@@ -0,0 +1,4 @@
1
+ import { ScaffoldCommandError, ScaffoldCommandResult, ScaffoldOptions, printScaffoldResults, runScaffold, scaffoldCommand } from "../shared/outfitter-h3q6ae6d.js";
2
+ import "../shared/outfitter-z5sx06qe.js";
3
+ import "../shared/outfitter-amc4jbs1.js";
4
+ export { scaffoldCommand, runScaffold, printScaffoldResults, ScaffoldOptions, ScaffoldCommandResult, ScaffoldCommandError };
@@ -0,0 +1,32 @@
1
+ // @bun
2
+ import {
3
+ ScaffoldCommandError,
4
+ printScaffoldResults,
5
+ runScaffold,
6
+ scaffoldCommand
7
+ } from "../shared/outfitter-pj9vp00r.js";
8
+ import"../shared/outfitter-4s9meh3j.js";
9
+ import"../shared/outfitter-ehp18x1n.js";
10
+ import"../shared/outfitter-xe5mzgdc.js";
11
+ import"../shared/outfitter-1h7k8xxt.js";
12
+ import"../shared/outfitter-ttjr95y9.js";
13
+ import"../shared/outfitter-344t1r38.js";
14
+ import"../shared/outfitter-5akzvppx.js";
15
+ import"../shared/outfitter-ha89qf8q.js";
16
+ import"../shared/outfitter-20f6a2n4.js";
17
+ import"../shared/outfitter-m44n0qzw.js";
18
+ import"../shared/outfitter-9x1brcmq.js";
19
+ import"../shared/outfitter-j833sxws.js";
20
+ import"../shared/outfitter-79vfxt6y.js";
21
+ import"../shared/outfitter-1fy7byz5.js";
22
+ import"../shared/outfitter-4q1zfmvc.js";
23
+ import"../shared/outfitter-8y2dfx6n.js";
24
+ import"../shared/outfitter-mtbpabf3.js";
25
+ import"../shared/outfitter-7r12fj7f.js";
26
+ import"../shared/outfitter-mdt37hqm.js";
27
+ export {
28
+ scaffoldCommand,
29
+ runScaffold,
30
+ printScaffoldResults,
31
+ ScaffoldCommandError
32
+ };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Shared devDependencies injected into all scaffolded projects.
3
+ * Template-specific devDependencies take precedence over these defaults.
4
+ *
5
+ * Keep these in sync with the root package.json versions.
6
+ */
7
+ declare const SHARED_DEV_DEPS: Readonly<Record<string, string>>;
8
+ /**
9
+ * Shared scripts injected into all scaffolded projects.
10
+ * Template-specific scripts take precedence over these defaults.
11
+ */
12
+ declare const SHARED_SCRIPTS: {
13
+ readonly check: "ultracite check";
14
+ readonly "clean:artifacts": "rm -rf dist .turbo";
15
+ readonly "verify:ci": "bun run typecheck && bun run check && bun run build && bun run test";
16
+ readonly lint: "biome check .";
17
+ readonly "lint:fix": "biome check . --write";
18
+ readonly format: "biome format --write .";
19
+ readonly typecheck: "tsc --noEmit";
20
+ };
21
+ export { SHARED_SCRIPTS, SHARED_DEV_DEPS };
@@ -0,0 +1,11 @@
1
+ // @bun
2
+ import {
3
+ SHARED_DEV_DEPS,
4
+ SHARED_SCRIPTS
5
+ } from "../shared/outfitter-20f6a2n4.js";
6
+ import"../shared/outfitter-m44n0qzw.js";
7
+ import"../shared/outfitter-mdt37hqm.js";
8
+ export {
9
+ SHARED_SCRIPTS,
10
+ SHARED_DEV_DEPS
11
+ };
@@ -0,0 +1,42 @@
1
+ import { OutfitterError } from "@outfitter/contracts";
2
+ import { Result } from "@outfitter/contracts";
3
+ /** Options passed to a codemod's transform function. */
4
+ interface CodemodOptions {
5
+ readonly dryRun: boolean;
6
+ readonly targetDir: string;
7
+ }
8
+ /** Result returned by a codemod's transform function. */
9
+ interface CodemodResult {
10
+ readonly changedFiles: readonly string[];
11
+ readonly errors: readonly string[];
12
+ readonly skippedFiles: readonly string[];
13
+ }
14
+ /** A discovered codemod with resolved paths. */
15
+ interface DiscoveredCodemod {
16
+ /** Absolute path to the codemod file. */
17
+ readonly absolutePath: string;
18
+ /** Path relative to the codemods directory. */
19
+ readonly relativePath: string;
20
+ }
21
+ /**
22
+ * Find the codemods directory, checking known locations.
23
+ *
24
+ * Searches:
25
+ * 1. Relative to the target cwd
26
+ * 2. Walking up parent directories from cwd (monorepo root detection)
27
+ * 3. Relative to the outfitter binary itself (development mode)
28
+ */
29
+ declare function findCodemodsDir(cwd: string, binaryDir?: string): string | null;
30
+ /**
31
+ * Discover codemods referenced in migration docs for a package version range.
32
+ *
33
+ * Scans migration doc frontmatter for `codemod` references in the `changes`
34
+ * array, resolves them to absolute paths in the codemods directory, and
35
+ * deduplicates.
36
+ */
37
+ declare function discoverCodemods(migrationsDir: string, codemodsDir: string, shortName: string, fromVersion: string, toVersion: string): DiscoveredCodemod[];
38
+ /**
39
+ * Run a single codemod by importing and executing its `transform` function.
40
+ */
41
+ declare function runCodemod(codemodPath: string, targetDir: string, dryRun: boolean): Promise<Result<CodemodResult, OutfitterError>>;
42
+ export { runCodemod, findCodemodsDir, discoverCodemods, DiscoveredCodemod, CodemodResult, CodemodOptions };