@codefast/cli 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/README.md +66 -41
  3. package/dist/arrange/command.js +99 -136
  4. package/dist/arrange/domain/ast/collectors-cn.d.ts +2 -2
  5. package/dist/arrange/domain/ast/collectors-cn.js +2 -2
  6. package/dist/arrange/domain/ast/collectors-jsx.d.ts +2 -2
  7. package/dist/arrange/domain/ast/collectors-jsx.js +1 -1
  8. package/dist/arrange/domain/ast/collectors-tv.d.ts +2 -2
  9. package/dist/arrange/domain/ast/collectors-tv.js +5 -5
  10. package/dist/arrange/domain/ast/helpers.d.ts +2 -2
  11. package/dist/arrange/domain/ast/helpers.js +3 -4
  12. package/dist/arrange/domain/ast/simplify-targets.d.ts +1 -1
  13. package/dist/arrange/domain/ast/simplify-targets.js +23 -28
  14. package/dist/arrange/domain/ast/targets.d.ts +2 -2
  15. package/dist/arrange/domain/ast/targets.js +9 -9
  16. package/dist/arrange/{typescript-ast-translator.d.ts → domain/ast/translator.d.ts} +6 -5
  17. package/dist/arrange/{typescript-ast-translator.js → domain/ast/translator.js} +20 -23
  18. package/dist/arrange/domain/constants.d.ts +1 -1
  19. package/dist/arrange/domain/grouping-service.d.ts +2 -2
  20. package/dist/arrange/domain/grouping-service.js +3 -3
  21. package/dist/arrange/domain/grouping.js +3 -3
  22. package/dist/arrange/domain/imports.d.ts +1 -1
  23. package/dist/arrange/domain/imports.js +2 -2
  24. package/dist/arrange/domain/source-text-formatters.js +1 -1
  25. package/dist/arrange/domain/tailwind-token.js +1 -1
  26. package/dist/arrange/domain/token-classifier.d.ts +1 -1
  27. package/dist/arrange/domain/token-classifier.js +2 -2
  28. package/dist/arrange/domain/types.d.ts +3 -3
  29. package/dist/arrange/group/cli-result.d.ts +7 -0
  30. package/dist/arrange/group/cli-result.js +12 -0
  31. package/dist/arrange/group/cli-schema.d.ts +17 -0
  32. package/dist/arrange/group/cli-schema.js +13 -0
  33. package/dist/arrange/group/output.d.ts +7 -0
  34. package/dist/arrange/group/output.js +10 -0
  35. package/dist/arrange/group/suggest.d.ts +8 -0
  36. package/dist/arrange/{suggest.js → group/suggest.js} +2 -2
  37. package/dist/arrange/inspect/cli-result.d.ts +7 -0
  38. package/dist/arrange/inspect/cli-result.js +8 -0
  39. package/dist/arrange/inspect/cli-schema.d.ts +15 -0
  40. package/dist/arrange/inspect/cli-schema.js +9 -0
  41. package/dist/arrange/{domain → inspect/domain}/analyze-service.d.ts +2 -2
  42. package/dist/arrange/{domain → inspect/domain}/analyze-service.js +7 -7
  43. package/dist/arrange/inspect/output.d.ts +7 -0
  44. package/dist/arrange/inspect/output.js +42 -0
  45. package/dist/arrange/inspect/run.d.ts +10 -0
  46. package/dist/arrange/{analyze.js → inspect/run.js} +7 -7
  47. package/dist/arrange/prepare.d.ts +13 -0
  48. package/dist/arrange/{workspace.js → prepare.js} +9 -12
  49. package/dist/arrange/regroup/cli-result.d.ts +13 -0
  50. package/dist/arrange/regroup/cli-result.js +23 -0
  51. package/dist/arrange/regroup/cli-schema.d.ts +20 -0
  52. package/dist/arrange/regroup/cli-schema.js +14 -0
  53. package/dist/arrange/regroup/output.d.ts +14 -0
  54. package/dist/arrange/regroup/output.js +72 -0
  55. package/dist/arrange/{process-file.d.ts → regroup/process-file.d.ts} +3 -3
  56. package/dist/arrange/{process-file.js → regroup/process-file.js} +3 -3
  57. package/dist/arrange/regroup/run.d.ts +11 -0
  58. package/dist/arrange/{sync.js → regroup/run.js} +5 -5
  59. package/dist/arrange/resolve-target.d.ts +2 -2
  60. package/dist/arrange/resolve-target.js +2 -2
  61. package/dist/arrange/scan-target.d.ts +2 -2
  62. package/dist/arrange/scan-target.js +3 -3
  63. package/dist/arrange/simplify/cli-result.d.ts +7 -0
  64. package/dist/arrange/simplify/cli-result.js +8 -0
  65. package/dist/arrange/simplify/cli-schema.d.ts +17 -0
  66. package/dist/arrange/simplify/cli-schema.js +11 -0
  67. package/dist/arrange/simplify/fold-targets.d.ts +13 -0
  68. package/dist/arrange/simplify/fold-targets.js +139 -0
  69. package/dist/arrange/simplify/output.d.ts +7 -0
  70. package/dist/arrange/simplify/output.js +15 -0
  71. package/dist/arrange/simplify/process-file.d.ts +13 -0
  72. package/dist/arrange/simplify/process-file.js +49 -0
  73. package/dist/arrange/simplify/run.d.ts +14 -0
  74. package/dist/arrange/simplify/run.js +38 -0
  75. package/dist/arrange/simplify/variant-classname-probe.d.ts +35 -0
  76. package/dist/arrange/simplify/variant-classname-probe.js +95 -0
  77. package/dist/arrange/source-parse.d.ts +1 -1
  78. package/dist/arrange/source-parse.js +3 -3
  79. package/dist/audit/command.js +152 -212
  80. package/dist/audit/comments/cli-result.d.ts +13 -0
  81. package/dist/audit/comments/cli-result.js +22 -0
  82. package/dist/audit/comments/cli-schema.d.ts +19 -0
  83. package/dist/audit/comments/cli-schema.js +13 -0
  84. package/dist/audit/comments/output.d.ts +7 -0
  85. package/dist/audit/comments/output.js +27 -0
  86. package/dist/audit/comments/prepare.d.ts +16 -0
  87. package/dist/audit/comments/prepare.js +12 -0
  88. package/dist/audit/{run-comments.d.ts → comments/run.d.ts} +5 -5
  89. package/dist/audit/{run-comments.js → comments/run.js} +9 -9
  90. package/dist/audit/display-names/cli-result.d.ts +13 -0
  91. package/dist/audit/display-names/cli-result.js +22 -0
  92. package/dist/audit/display-names/cli-schema.d.ts +18 -0
  93. package/dist/audit/display-names/cli-schema.js +12 -0
  94. package/dist/audit/{domain → display-names/domain}/display-names.d.ts +1 -1
  95. package/dist/audit/display-names/output.d.ts +7 -0
  96. package/dist/audit/display-names/output.js +21 -0
  97. package/dist/audit/display-names/prepare.d.ts +16 -0
  98. package/dist/audit/display-names/prepare.js +12 -0
  99. package/dist/audit/display-names/run.d.ts +14 -0
  100. package/dist/audit/{run-display-names.js → display-names/run.js} +5 -5
  101. package/dist/audit/domain/types.d.ts +43 -0
  102. package/dist/audit/imports/cli-result.d.ts +13 -0
  103. package/dist/audit/imports/cli-result.js +22 -0
  104. package/dist/audit/imports/cli-schema.d.ts +18 -0
  105. package/dist/audit/imports/cli-schema.js +12 -0
  106. package/dist/audit/{domain → imports/domain}/import-policy.d.ts +3 -3
  107. package/dist/audit/{domain → imports/domain}/import-policy.js +4 -11
  108. package/dist/audit/imports/output.d.ts +7 -0
  109. package/dist/audit/imports/output.js +21 -0
  110. package/dist/audit/imports/prepare.d.ts +16 -0
  111. package/dist/audit/imports/prepare.js +12 -0
  112. package/dist/audit/imports/run.d.ts +14 -0
  113. package/dist/audit/{run-imports.js → imports/run.js} +6 -6
  114. package/dist/audit/links/cli-result.d.ts +13 -0
  115. package/dist/audit/links/cli-result.js +22 -0
  116. package/dist/audit/links/cli-schema.d.ts +18 -0
  117. package/dist/audit/links/cli-schema.js +12 -0
  118. package/dist/audit/{domain → links/domain}/markdown-links.d.ts +3 -3
  119. package/dist/audit/{domain → links/domain}/markdown-links.js +22 -8
  120. package/dist/audit/links/output.d.ts +7 -0
  121. package/dist/audit/links/output.js +21 -0
  122. package/dist/audit/links/prepare.d.ts +16 -0
  123. package/dist/audit/links/prepare.js +12 -0
  124. package/dist/audit/links/run.d.ts +14 -0
  125. package/dist/audit/{run-links.js → links/run.js} +4 -4
  126. package/dist/audit/prepare.d.ts +13 -52
  127. package/dist/audit/prepare.js +13 -136
  128. package/dist/audit/publish/cli-result.d.ts +13 -0
  129. package/dist/audit/publish/cli-result.js +22 -0
  130. package/dist/audit/publish/cli-schema.d.ts +18 -0
  131. package/dist/audit/publish/cli-schema.js +12 -0
  132. package/dist/audit/publish/domain/legacy-subpath.d.ts +8 -0
  133. package/dist/audit/publish/domain/legacy-subpath.js +22 -0
  134. package/dist/audit/publish/output.d.ts +7 -0
  135. package/dist/audit/publish/output.js +24 -0
  136. package/dist/audit/publish/prepare.d.ts +16 -0
  137. package/dist/audit/publish/prepare.js +12 -0
  138. package/dist/audit/publish/run.d.ts +14 -0
  139. package/dist/audit/publish/run.js +62 -0
  140. package/dist/audit/rtl/cli-result.d.ts +13 -0
  141. package/dist/audit/rtl/cli-result.js +22 -0
  142. package/dist/audit/rtl/cli-schema.d.ts +18 -0
  143. package/dist/audit/rtl/cli-schema.js +12 -0
  144. package/dist/audit/{domain → rtl/domain}/audit-file.d.ts +1 -1
  145. package/dist/audit/{domain → rtl/domain}/audit-file.js +2 -2
  146. package/dist/audit/{domain → rtl/domain}/tokenize.d.ts +1 -1
  147. package/dist/audit/rtl/output.d.ts +7 -0
  148. package/dist/audit/rtl/output.js +21 -0
  149. package/dist/audit/rtl/prepare.d.ts +13 -0
  150. package/dist/audit/rtl/prepare.js +41 -0
  151. package/dist/audit/rtl/run.d.ts +14 -0
  152. package/dist/audit/{run.js → rtl/run.js} +4 -4
  153. package/dist/bin.js +1 -1
  154. package/dist/cli.js +5 -5
  155. package/dist/core/cli/command-pipeline.d.ts +90 -0
  156. package/dist/core/cli/command-pipeline.js +83 -0
  157. package/dist/core/cli/format-error.d.ts +1 -1
  158. package/dist/core/cli/global-options.d.ts +1 -1
  159. package/dist/core/cli/global-options.js +1 -1
  160. package/dist/core/cli/resolve-root.d.ts +9 -0
  161. package/dist/core/cli/resolve-root.js +16 -0
  162. package/dist/core/cli/result-handle.d.ts +3 -9
  163. package/dist/core/cli/result-handle.js +4 -17
  164. package/dist/core/config/define-config.d.ts +1 -1
  165. package/dist/core/config/loader.d.ts +3 -3
  166. package/dist/core/config/loader.js +2 -2
  167. package/dist/core/config/schema.d.ts +1 -1
  168. package/dist/core/config/schema.js +1 -1
  169. package/dist/core/config/warnings.js +1 -1
  170. package/dist/core/config.d.ts +5 -5
  171. package/dist/core/config.js +4 -4
  172. package/dist/core/filesystem/{port.d.ts → filesystem.d.ts} +1 -1
  173. package/dist/core/filesystem/node.d.ts +3 -3
  174. package/dist/core/filesystem/node.js +1 -1
  175. package/dist/core/schema-parse.d.ts +2 -2
  176. package/dist/core/schema-parse.js +2 -2
  177. package/dist/core/source-text-edit.d.ts +14 -0
  178. package/dist/core/source-text-edit.js +22 -0
  179. package/dist/core/workspace/markdown-walk.d.ts +2 -2
  180. package/dist/core/workspace/markdown-walk.js +1 -1
  181. package/dist/core/workspace/package-version.d.ts +2 -2
  182. package/dist/core/workspace/package-version.js +2 -2
  183. package/dist/core/workspace/resolver.d.ts +3 -3
  184. package/dist/core/workspace/resolver.js +5 -5
  185. package/dist/core/workspace/source-walk.d.ts +2 -2
  186. package/dist/core/workspace/source-walk.js +1 -1
  187. package/dist/core/workspace/typescript-walk.d.ts +2 -2
  188. package/dist/core/workspace/typescript-walk.js +1 -1
  189. package/dist/core/workspace/walk-files.d.ts +2 -2
  190. package/dist/core/workspace/walk-files.js +1 -1
  191. package/dist/index.d.ts +3 -3
  192. package/dist/index.js +2 -2
  193. package/dist/mirror/cli-result.d.ts +1 -1
  194. package/dist/mirror/cli-result.js +1 -1
  195. package/dist/mirror/cli-schema.d.ts +2 -2
  196. package/dist/mirror/cli-schema.js +1 -1
  197. package/dist/mirror/command.js +36 -65
  198. package/dist/mirror/dist-filesystem-node.d.ts +8 -0
  199. package/dist/mirror/{dist-filesystem-impl.js → dist-filesystem-node.js} +3 -3
  200. package/dist/mirror/domain/dirent-guard.d.ts +1 -1
  201. package/dist/mirror/domain/exports.d.ts +2 -2
  202. package/dist/mirror/domain/exports.js +1 -1
  203. package/dist/mirror/domain/types.d.ts +59 -2
  204. package/dist/mirror/output.d.ts +1 -3
  205. package/dist/mirror/output.js +127 -2
  206. package/dist/mirror/package-path.d.ts +5 -5
  207. package/dist/mirror/package-path.js +3 -3
  208. package/dist/mirror/prepare.d.ts +6 -6
  209. package/dist/mirror/prepare.js +8 -12
  210. package/dist/mirror/run.d.ts +12 -0
  211. package/dist/mirror/{sync.js → run.js} +7 -7
  212. package/dist/mirror/supplement-exports.d.ts +3 -3
  213. package/dist/mirror/supplement-exports.js +2 -2
  214. package/dist/mirror/sync-workspace-package.d.ts +4 -4
  215. package/dist/mirror/sync-workspace-package.js +11 -14
  216. package/dist/mirror/write-exports.d.ts +3 -3
  217. package/dist/mirror/write-exports.js +3 -3
  218. package/dist/pack-slim/cli-result.d.ts +1 -1
  219. package/dist/pack-slim/cli-result.js +1 -1
  220. package/dist/pack-slim/cli-schema.d.ts +1 -1
  221. package/dist/pack-slim/cli-schema.js +1 -1
  222. package/dist/pack-slim/command.js +36 -71
  223. package/dist/pack-slim/domain/transform.d.ts +22 -1
  224. package/dist/pack-slim/domain/transform.js +65 -8
  225. package/dist/pack-slim/output.d.ts +1 -1
  226. package/dist/pack-slim/output.js +1 -1
  227. package/dist/pack-slim/prepare.d.ts +21 -0
  228. package/dist/pack-slim/prepare.js +14 -0
  229. package/dist/pack-slim/{sync.d.ts → run.d.ts} +6 -6
  230. package/dist/pack-slim/{sync.js → run.js} +5 -5
  231. package/dist/pack-slim/working-tree.d.ts +2 -2
  232. package/dist/pack-slim/working-tree.js +2 -2
  233. package/dist/tag/cli-result.d.ts +8 -2
  234. package/dist/tag/cli-result.js +15 -2
  235. package/dist/tag/cli-schema.d.ts +4 -4
  236. package/dist/tag/cli-schema.js +3 -4
  237. package/dist/tag/command.js +34 -61
  238. package/dist/tag/domain/skip-filter.d.ts +13 -0
  239. package/dist/tag/domain/skip-filter.js +29 -0
  240. package/dist/tag/domain/types.d.ts +22 -2
  241. package/dist/tag/domain/version-summary.d.ts +13 -0
  242. package/dist/tag/domain/version-summary.js +24 -0
  243. package/dist/tag/output.d.ts +4 -4
  244. package/dist/tag/output.js +7 -10
  245. package/dist/tag/prepare.d.ts +5 -5
  246. package/dist/tag/prepare.js +5 -5
  247. package/dist/tag/run.d.ts +10 -0
  248. package/dist/tag/{sync.js → run.js} +23 -53
  249. package/dist/tag/target/candidates.d.ts +8 -0
  250. package/dist/tag/{target-candidates.js → target/candidates.js} +3 -3
  251. package/dist/tag/{resolve-target-path.d.ts → target/resolve-path.d.ts} +2 -2
  252. package/dist/tag/target/runner.d.ts +8 -0
  253. package/dist/tag/{target-runner.js → target/runner.js} +3 -3
  254. package/dist/tag/{since-writer.d.ts → writer/since-writer.d.ts} +3 -3
  255. package/dist/tag/{since-writer.js → writer/since-writer.js} +1 -1
  256. package/dist/tag/{version-resolver.d.ts → writer/version-resolver.d.ts} +2 -2
  257. package/dist/tag/{version-resolver.js → writer/version-resolver.js} +1 -1
  258. package/package.json +15 -7
  259. package/dist/arrange/analyze.d.ts +0 -10
  260. package/dist/arrange/cli-schema.d.ts +0 -50
  261. package/dist/arrange/cli-schema.js +0 -34
  262. package/dist/arrange/output.d.ts +0 -26
  263. package/dist/arrange/output.js +0 -127
  264. package/dist/arrange/simplify-process-file.d.ts +0 -11
  265. package/dist/arrange/simplify-process-file.js +0 -30
  266. package/dist/arrange/simplify-sync.d.ts +0 -13
  267. package/dist/arrange/simplify-sync.js +0 -30
  268. package/dist/arrange/suggest.d.ts +0 -8
  269. package/dist/arrange/sync.d.ts +0 -11
  270. package/dist/arrange/workspace.d.ts +0 -13
  271. package/dist/audit/cli-schema.d.ts +0 -93
  272. package/dist/audit/cli-schema.js +0 -66
  273. package/dist/audit/output.d.ts +0 -91
  274. package/dist/audit/output.js +0 -213
  275. package/dist/audit/run-display-names.d.ts +0 -14
  276. package/dist/audit/run-imports.d.ts +0 -14
  277. package/dist/audit/run-links.d.ts +0 -14
  278. package/dist/audit/run.d.ts +0 -14
  279. package/dist/mirror/dist-filesystem-impl.d.ts +0 -8
  280. package/dist/mirror/sync-reporter.d.ts +0 -60
  281. package/dist/mirror/sync-reporter.js +0 -128
  282. package/dist/mirror/sync-types.d.ts +0 -43
  283. package/dist/mirror/sync-types.js +0 -1
  284. package/dist/mirror/sync.d.ts +0 -12
  285. package/dist/tag/sync.d.ts +0 -42
  286. package/dist/tag/target-candidates.d.ts +0 -8
  287. package/dist/tag/target-runner.d.ts +0 -8
  288. /package/dist/audit/{domain → comments/domain}/comment-content.d.ts +0 -0
  289. /package/dist/audit/{domain → comments/domain}/comment-content.js +0 -0
  290. /package/dist/audit/{domain → comments/domain}/comment-dividers.d.ts +0 -0
  291. /package/dist/audit/{domain → comments/domain}/comment-dividers.js +0 -0
  292. /package/dist/audit/{domain → comments/domain}/link-references.d.ts +0 -0
  293. /package/dist/audit/{domain → comments/domain}/link-references.js +0 -0
  294. /package/dist/audit/{domain → comments/domain}/since-versions.d.ts +0 -0
  295. /package/dist/audit/{domain → comments/domain}/since-versions.js +0 -0
  296. /package/dist/audit/{domain → comments/domain}/tsdoc-syntax.d.ts +0 -0
  297. /package/dist/audit/{domain → comments/domain}/tsdoc-syntax.js +0 -0
  298. /package/dist/audit/{domain → display-names/domain}/display-names.js +0 -0
  299. /package/dist/audit/{domain → rtl/domain}/mappings.d.ts +0 -0
  300. /package/dist/audit/{domain → rtl/domain}/mappings.js +0 -0
  301. /package/dist/audit/{domain → rtl/domain}/tokenize.js +0 -0
  302. /package/dist/core/filesystem/{port.js → filesystem.js} +0 -0
  303. /package/dist/tag/{resolve-target-path.js → target/resolve-path.js} +0 -0
@@ -1,13 +1,12 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  /**
3
- * Zod schema validating a `TagSyncRunRequest`.
3
+ * Zod schema validating a `TagRunRequest`.
4
4
  *
5
5
  * @since 0.3.16-canary.0
6
6
  */
7
- export const tagSyncRunRequestSchema = z.object({
7
+ export const tagRunRequestSchema = z.object({
8
8
  rootDir: z.string().min(1),
9
9
  write: z.boolean(),
10
- json: z.boolean().optional(),
11
10
  targetPath: z.string().optional(),
12
11
  skipPackages: z.array(z.string()).optional(),
13
12
  config: z.unknown().optional(),
@@ -1,70 +1,43 @@
1
- import process from "node:process";
2
1
  import { Command } from "commander";
3
- import { readOptionalPositionalArg } from "#/core/cli/positional";
4
- import { consumeCliAppError } from "#/core/cli/result-handle";
5
- import { nodeFilesystem } from "#/core/filesystem/node";
6
- import { logger } from "#/core/logger";
7
- import { parseWithSchema } from "#/core/schema-parse";
8
- import { exitCodeForTagSyncResult } from "#/tag/cli-result";
9
- import { tagSyncRunRequestSchema } from "#/tag/cli-schema";
10
- import { presentTagSyncResult, TagSyncProgressPresenter } from "#/tag/output";
11
- import { prepareTagSync } from "#/tag/prepare";
12
- import { runTagSync } from "#/tag/sync";
2
+ import { applyCommandPipeline } from "#core/cli/command-pipeline";
3
+ import { nodeFilesystem } from "#core/filesystem/node";
4
+ import { exitCodeForTagResult, formatTagJsonOutput } from "#tag/cli-result";
5
+ import { tagRunRequestSchema } from "#tag/cli-schema";
6
+ import { presentTagResult, TagProgressPresenter } from "#tag/output";
7
+ import { prepareTag } from "#tag/prepare";
8
+ import { runTag } from "#tag/run";
9
+ const tagPipeline = {
10
+ positional: { name: "[target]", help: "Directory or file to tag (default: auto-discover workspace packages)" },
11
+ schema: tagRunRequestSchema,
12
+ configureArgv: (command) => {
13
+ command.option("--dry-run", "Show summary without writing files", false);
14
+ },
15
+ prepare: (fs, input) => prepareTag(fs, { currentWorkingDirectory: input.currentWorkingDirectory, rawTarget: input.rawArg }),
16
+ buildRequest: ({ prelude, opts }) => {
17
+ const tagConfig = prelude.config.tag ?? {};
18
+ return {
19
+ rootDir: prelude.rootDir,
20
+ write: !opts.dryRun,
21
+ targetPath: prelude.resolvedTargetPath,
22
+ skipPackages: tagConfig.skipPackages,
23
+ config: tagConfig,
24
+ };
25
+ },
26
+ createPresenter: () => new TagProgressPresenter(),
27
+ run: (fs, request, presenter) => runTag(fs, { ...request, listener: presenter }),
28
+ presentHuman: ({ result, prelude }) => {
29
+ presentTagResult(result, prelude.rootDir);
30
+ },
31
+ formatJson: ({ result, prelude }) => formatTagJsonOutput(result, prelude.rootDir),
32
+ exitCode: exitCodeForTagResult,
33
+ };
13
34
  /**
14
35
  * Creates the `tag` subcommand, which stamps `@since` tags on exported declarations.
15
36
  *
16
37
  * @since 0.3.16-canary.0
17
38
  */
18
39
  export function createTagCommand() {
19
- const cmd = new Command("tag")
20
- .description("Add @since <version> JSDoc tags to exported declarations")
21
- .argument("[target]", "Directory or file to tag (default: auto-discover workspace packages)")
22
- .option("--dry-run", "Show summary without writing files", false)
23
- .option("--json", "Print one JSON summary on stdout (suppresses human progress)", false)
24
- .action(async (target, opts) => {
25
- const prelude = await prepareTagSync(nodeFilesystem, {
26
- currentWorkingDirectory: process.cwd(),
27
- rawTarget: readOptionalPositionalArg(target),
28
- });
29
- if (!consumeCliAppError(prelude)) {
30
- return;
31
- }
32
- const { rootDir, config, resolvedTargetPath } = prelude.value;
33
- const tagConfig = config.tag ?? {};
34
- const parsed = parseWithSchema(tagSyncRunRequestSchema, {
35
- rootDir,
36
- write: !opts.dryRun,
37
- json: opts.json,
38
- targetPath: resolvedTargetPath,
39
- skipPackages: tagConfig.skipPackages,
40
- config: tagConfig,
41
- });
42
- if (!consumeCliAppError(parsed)) {
43
- return;
44
- }
45
- const progressPresenter = new TagSyncProgressPresenter();
46
- const tagOutcome = await runTagSync(nodeFilesystem, {
47
- ...parsed.value,
48
- listener: parsed.value.json ? undefined : progressPresenter,
49
- });
50
- if (!consumeCliAppError(tagOutcome)) {
51
- return;
52
- }
53
- if (parsed.value.json) {
54
- logger.out(formatTagSyncJsonOutput(tagOutcome.value, rootDir));
55
- process.exitCode = exitCodeForTagSyncResult(tagOutcome.value);
56
- }
57
- else {
58
- process.exitCode = presentTagSyncResult(tagOutcome.value, rootDir);
59
- }
60
- });
40
+ const cmd = new Command("tag").description("Add @since <version> JSDoc tags to exported declarations");
41
+ applyCommandPipeline(cmd, nodeFilesystem, tagPipeline);
61
42
  return cmd;
62
- }
63
- function formatTagSyncJsonOutput(result, rootDir) {
64
- return JSON.stringify({
65
- schemaVersion: 1,
66
- ok: result.hookError === null,
67
- cwd: rootDir,
68
- result,
69
- });
70
43
  }
@@ -0,0 +1,13 @@
1
+ import type { TagTargetCandidate } from "#tag/domain/types";
2
+ /**
3
+ * Partitions tag target candidates into those to tag and those to skip, matching each candidate's
4
+ * package name against `skipPackages` as glob patterns.
5
+ *
6
+ * @remarks Candidates without a package name (e.g. an explicit-target path) are never skipped.
7
+ *
8
+ * @since 0.5.0-canary.0
9
+ */
10
+ export declare function filterSkippedCandidates(targetCandidates: Array<TagTargetCandidate>, skipPackages: ReadonlyArray<string> | undefined): {
11
+ includedCandidates: Array<TagTargetCandidate>;
12
+ skippedPackages: Array<string>;
13
+ };
@@ -0,0 +1,29 @@
1
+ import { createAnyGlobMatcher } from "#core/glob";
2
+ /**
3
+ * Partitions tag target candidates into those to tag and those to skip, matching each candidate's
4
+ * package name against `skipPackages` as glob patterns.
5
+ *
6
+ * @remarks Candidates without a package name (e.g. an explicit-target path) are never skipped.
7
+ *
8
+ * @since 0.5.0-canary.0
9
+ */
10
+ export function filterSkippedCandidates(targetCandidates, skipPackages) {
11
+ if (!skipPackages || skipPackages.length === 0) {
12
+ return {
13
+ includedCandidates: targetCandidates,
14
+ skippedPackages: [],
15
+ };
16
+ }
17
+ const isSkipped = createAnyGlobMatcher(skipPackages);
18
+ const includedCandidates = [];
19
+ const skippedPackages = [];
20
+ for (const candidate of targetCandidates) {
21
+ const packageName = candidate.packageName;
22
+ if (packageName && isSkipped(packageName)) {
23
+ skippedPackages.push(packageName);
24
+ continue;
25
+ }
26
+ includedCandidates.push(candidate);
27
+ }
28
+ return { includedCandidates, skippedPackages };
29
+ }
@@ -1,4 +1,4 @@
1
- import type { CodefastConfig } from "#/core/config/schema";
1
+ import type { CodefastConfig } from "#core/config/schema";
2
2
  /**
3
3
  * Per-file outcome of a tag run.
4
4
  *
@@ -85,7 +85,7 @@ export interface TagProgressListener {
85
85
  *
86
86
  * @since 0.3.16-canary.0
87
87
  */
88
- export type TagSyncResult = {
88
+ export type TagResult = {
89
89
  mode: "applied" | "dry-run";
90
90
  selectedTargets: Array<TagResolvedTarget>;
91
91
  skippedPackages: Array<string>;
@@ -108,4 +108,24 @@ export interface TagCommandPrelude {
108
108
  readonly config: CodefastConfig;
109
109
  readonly resolvedTargetPath: string | undefined;
110
110
  }
111
+ /**
112
+ * The inputs a tag run is invoked with.
113
+ *
114
+ * @since 0.3.16-canary.0
115
+ */
116
+ export type TagRunRequest = {
117
+ rootDir: string;
118
+ write: boolean;
119
+ targetPath?: string | undefined;
120
+ skipPackages?: Array<string> | undefined;
121
+ config?: unknown;
122
+ };
123
+ /**
124
+ * A run request paired with an optional progress listener.
125
+ *
126
+ * @since 0.3.16-canary.0
127
+ */
128
+ export type TagExecutionInput = TagRunRequest & {
129
+ readonly listener?: TagProgressListener | undefined;
130
+ };
111
131
  export {};
@@ -0,0 +1,13 @@
1
+ import type { TagTargetExecutionResult } from "#tag/domain/types";
2
+ /**
3
+ * Collects the distinct, non-empty package versions stamped across a run's target results.
4
+ *
5
+ * @since 0.11.0
6
+ */
7
+ export declare function extractDistinctVersions(targetResults: Array<TagTargetExecutionResult>): Set<string>;
8
+ /**
9
+ * Summarizes a set of versions as `"none"`, the single version, or `"mixed"`.
10
+ *
11
+ * @since 0.11.0
12
+ */
13
+ export declare function summarizeVersions(distinctVersions: Set<string>): string;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Collects the distinct, non-empty package versions stamped across a run's target results.
3
+ *
4
+ * @since 0.11.0
5
+ */
6
+ export function extractDistinctVersions(targetResults) {
7
+ return new Set(targetResults
8
+ .map((targetResult) => targetResult.result?.version)
9
+ .filter((version) => typeof version === "string" && version.length > 0));
10
+ }
11
+ /**
12
+ * Summarizes a set of versions as `"none"`, the single version, or `"mixed"`.
13
+ *
14
+ * @since 0.11.0
15
+ */
16
+ export function summarizeVersions(distinctVersions) {
17
+ if (distinctVersions.size === 0) {
18
+ return "none";
19
+ }
20
+ if (distinctVersions.size > 1) {
21
+ return "mixed";
22
+ }
23
+ return distinctVersions.values().next().value ?? "none";
24
+ }
@@ -1,17 +1,17 @@
1
- import type { TagProgressListener, TagResolvedTarget, TagSyncResult, TagTargetExecutionResult } from "#/tag/domain/types";
1
+ import type { TagProgressListener, TagResolvedTarget, TagResult, TagTargetExecutionResult } from "#tag/domain/types";
2
2
  /**
3
3
  * A progress listener that prints a line as each tag target starts and completes.
4
4
  *
5
5
  * @since 0.3.16-canary.0
6
6
  */
7
- export declare class TagSyncProgressPresenter implements TagProgressListener {
7
+ export declare class TagProgressPresenter implements TagProgressListener {
8
8
  onTargetStarted(target: TagResolvedTarget): void;
9
9
  onTargetCompleted(target: TagResolvedTarget, result: TagTargetExecutionResult): void;
10
10
  private static formatProgress;
11
11
  }
12
12
  /**
13
- * Prints a tag run's target table, warnings, and summary, and returns the exit code.
13
+ * Prints a tag run's target table, warnings, and summary to the human reader.
14
14
  *
15
15
  * @since 0.3.16-canary.0
16
16
  */
17
- export declare function presentTagSyncResult(result: TagSyncResult, rootDir: string): number;
17
+ export declare function presentTagResult(result: TagResult, rootDir: string): void;
@@ -1,17 +1,15 @@
1
- import { CLI_EXIT_GENERAL_ERROR } from "#/core/exit-codes";
2
- import { logger } from "#/core/logger";
3
- import { exitCodeForTagSyncResult } from "#/tag/cli-result";
1
+ import { logger } from "#core/logger";
4
2
  /**
5
3
  * A progress listener that prints a line as each tag target starts and completes.
6
4
  *
7
5
  * @since 0.3.16-canary.0
8
6
  */
9
- export class TagSyncProgressPresenter {
7
+ export class TagProgressPresenter {
10
8
  onTargetStarted(target) {
11
- logger.out(TagSyncProgressPresenter.formatProgress({ type: "target-started", target }));
9
+ logger.out(TagProgressPresenter.formatProgress({ type: "target-started", target }));
12
10
  }
13
11
  onTargetCompleted(target, result) {
14
- logger.out(TagSyncProgressPresenter.formatProgress({ type: "target-completed", target, result }));
12
+ logger.out(TagProgressPresenter.formatProgress({ type: "target-completed", target, result }));
15
13
  }
16
14
  static formatProgress(event) {
17
15
  const targetDisplayName = (target) => target.packageName ?? target.rootRelativeTargetPath;
@@ -29,22 +27,21 @@ const colors = {
29
27
  yellow: "\x1b[33m",
30
28
  };
31
29
  /**
32
- * Prints a tag run's target table, warnings, and summary, and returns the exit code.
30
+ * Prints a tag run's target table, warnings, and summary to the human reader.
33
31
  *
34
32
  * @since 0.3.16-canary.0
35
33
  */
36
- export function presentTagSyncResult(result, rootDir) {
34
+ export function presentTagResult(result, rootDir) {
37
35
  logger.out(formatTargetTable(result.selectedTargets, rootDir));
38
36
  if (result.selectedTargets.length === 0) {
39
37
  logger.err("No packages found in workspace. Check your pnpm-workspace.yaml or provide an explicit target path.");
40
- return CLI_EXIT_GENERAL_ERROR;
38
+ return;
41
39
  }
42
40
  const warningsAndErrorsSection = formatWarningsAndErrors(result);
43
41
  if (warningsAndErrorsSection) {
44
42
  logger.err(warningsAndErrorsSection);
45
43
  }
46
44
  logger.out(formatSummary(result));
47
- return exitCodeForTagSyncResult(result);
48
45
  }
49
46
  function withColorizedLine(line, colorCode) {
50
47
  return `${colorCode}${line}${colorReset}`;
@@ -1,13 +1,13 @@
1
- import type { AppError } from "#/core/errors";
2
- import type { FilesystemPort } from "#/core/filesystem/port";
3
- import type { Result } from "#/core/result";
4
- import type { TagCommandPrelude } from "#/tag/domain/types";
1
+ import type { AppError } from "#core/errors";
2
+ import type { Filesystem } from "#core/filesystem/filesystem";
3
+ import type { Result } from "#core/result";
4
+ import type { TagCommandPrelude } from "#tag/domain/types";
5
5
  /**
6
6
  * Resolves the repo root, config, and optional target path into the prelude a tag run starts from.
7
7
  *
8
8
  * @since 0.3.16-canary.0
9
9
  */
10
- export declare function prepareTagSync(fs: FilesystemPort, args: {
10
+ export declare function prepareTag(fs: Filesystem, args: {
11
11
  readonly currentWorkingDirectory: string;
12
12
  readonly rawTarget: string | undefined;
13
13
  }): Promise<Result<TagCommandPrelude, AppError>>;
@@ -1,13 +1,13 @@
1
- import { loadCodefastConfig } from "#/core/config";
2
- import { ok } from "#/core/result";
3
- import { resolveProjectRoot } from "#/core/workspace/resolver";
4
- import { resolveProvidedTagTargetPath } from "#/tag/resolve-target-path";
1
+ import { loadCodefastConfig } from "#core/config";
2
+ import { ok } from "#core/result";
3
+ import { resolveProjectRoot } from "#core/workspace/resolver";
4
+ import { resolveProvidedTagTargetPath } from "#tag/target/resolve-path";
5
5
  /**
6
6
  * Resolves the repo root, config, and optional target path into the prelude a tag run starts from.
7
7
  *
8
8
  * @since 0.3.16-canary.0
9
9
  */
10
- export async function prepareTagSync(fs, args) {
10
+ export async function prepareTag(fs, args) {
11
11
  let rootDir;
12
12
  try {
13
13
  rootDir = resolveProjectRoot(args.currentWorkingDirectory, fs).rootDir;
@@ -0,0 +1,10 @@
1
+ import { AppError } from "#core/errors";
2
+ import type { Filesystem } from "#core/filesystem/filesystem";
3
+ import type { Result } from "#core/result";
4
+ import type { TagExecutionInput, TagResult } from "#tag/domain/types";
5
+ /**
6
+ * Applies `@since` tags across the selected targets and returns the aggregate result.
7
+ *
8
+ * @since 0.3.16-canary.0
9
+ */
10
+ export declare function runTag(fs: Filesystem, input: TagExecutionInput): Promise<Result<TagResult, AppError>>;
@@ -1,26 +1,37 @@
1
1
  import path from "node:path";
2
- import { AppError } from "#/core/errors";
3
- import { messageFrom } from "#/core/errors";
4
- import { createAnyGlobMatcher } from "#/core/glob";
5
- import { err, ok } from "#/core/result";
6
- import { resolveTagTargetCandidates } from "#/tag/target-candidates";
7
- import { runTagOnTarget } from "#/tag/target-runner";
2
+ import { AppError } from "#core/errors";
3
+ import { messageFrom } from "#core/errors";
4
+ import { err, ok } from "#core/result";
5
+ import { filterSkippedCandidates } from "#tag/domain/skip-filter";
6
+ import { extractDistinctVersions, summarizeVersions } from "#tag/domain/version-summary";
7
+ import { resolveTagTargetCandidates } from "#tag/target/candidates";
8
+ import { runTagOnTarget } from "#tag/target/runner";
8
9
  /**
9
- * Runs the tag sync across the selected targets and returns the aggregate result.
10
+ * Applies `@since` tags across the selected targets and returns the aggregate result.
10
11
  *
11
12
  * @since 0.3.16-canary.0
12
13
  */
13
- export async function runTagSync(fs, input) {
14
+ export async function runTag(fs, input) {
14
15
  try {
15
16
  const tagConfig = input.config;
16
17
  const targetCandidates = await resolveTagTargetCandidates(fs, input.rootDir, input.targetPath);
17
18
  const { includedCandidates, skippedPackages } = filterSkippedCandidates(targetCandidates, input.skipPackages);
18
19
  const selectedTargets = includedCandidates.map((candidate) => resolveTargetSelection(fs, candidate, input.rootDir));
19
20
  const targetExecutionResults = await Promise.all(selectedTargets.map((resolvedTarget) => runOnResolvedTarget(fs, resolvedTarget, input.write, input.listener)));
20
- const allFileResults = targetExecutionResults.flatMap((targetResult) => targetResult.result?.fileResults ?? []);
21
- const filesScanned = targetExecutionResults.reduce((sum, targetResult) => sum + (targetResult.result?.filesScanned ?? 0), 0);
22
- const filesChanged = targetExecutionResults.reduce((sum, targetResult) => sum + (targetResult.result?.filesChanged ?? 0), 0);
23
- const taggedDeclarations = targetExecutionResults.reduce((sum, targetResult) => sum + (targetResult.result?.taggedDeclarations ?? 0), 0);
21
+ const allFileResults = [];
22
+ let filesScanned = 0;
23
+ let filesChanged = 0;
24
+ let taggedDeclarations = 0;
25
+ for (const targetResult of targetExecutionResults) {
26
+ const runResult = targetResult.result;
27
+ if (runResult === null) {
28
+ continue;
29
+ }
30
+ allFileResults.push(...runResult.fileResults);
31
+ filesScanned += runResult.filesScanned;
32
+ filesChanged += runResult.filesChanged;
33
+ taggedDeclarations += runResult.taggedDeclarations;
34
+ }
24
35
  const modifiedFiles = allFileResults.filter((entry) => entry.changed).map((entry) => entry.filePath);
25
36
  const hookError = input.write && modifiedFiles.length > 0
26
37
  ? await runTagOnAfterWriteHook(tagConfig?.onAfterWrite, modifiedFiles)
@@ -57,20 +68,6 @@ async function runTagOnAfterWriteHook(hook, modifiedFiles) {
57
68
  return `[tag] onAfterWrite hook failed: ${messageFrom(caughtHookError)}`;
58
69
  }
59
70
  }
60
- function summarizeVersions(distinctVersions) {
61
- if (distinctVersions.size === 0) {
62
- return "none";
63
- }
64
- if (distinctVersions.size > 1) {
65
- return "mixed";
66
- }
67
- return distinctVersions.values().next().value ?? "none";
68
- }
69
- function extractDistinctVersions(targetResults) {
70
- return new Set(targetResults
71
- .map((targetResult) => targetResult.result?.version)
72
- .filter((version) => typeof version === "string" && version.length > 0));
73
- }
74
71
  function chooseWorkspacePackageTargetPath(fs, candidate) {
75
72
  if (candidate.source !== "workspace-package") {
76
73
  return {
@@ -103,33 +100,6 @@ function resolveTargetSelection(fs, candidate, rootDir) {
103
100
  packageName: candidate.packageName,
104
101
  };
105
102
  }
106
- /**
107
- * Partition tag target candidates into those to tag and those to skip, matching
108
- * each candidate's package name against `skipPackages` as glob patterns.
109
- * Candidates without a package name (e.g. an explicit-target path) are never skipped.
110
- *
111
- * @since 0.5.0-canary.0
112
- */
113
- export function filterSkippedCandidates(targetCandidates, skipPackages) {
114
- if (!skipPackages || skipPackages.length === 0) {
115
- return {
116
- includedCandidates: targetCandidates,
117
- skippedPackages: [],
118
- };
119
- }
120
- const isSkipped = createAnyGlobMatcher(skipPackages);
121
- const includedCandidates = [];
122
- const skippedPackages = [];
123
- for (const candidate of targetCandidates) {
124
- const packageName = candidate.packageName;
125
- if (packageName && isSkipped(packageName)) {
126
- skippedPackages.push(packageName);
127
- continue;
128
- }
129
- includedCandidates.push(candidate);
130
- }
131
- return { includedCandidates, skippedPackages };
132
- }
133
103
  async function runOnResolvedTarget(fs, resolvedTarget, write, listener) {
134
104
  listener?.onTargetStarted(resolvedTarget);
135
105
  const absoluteTargetPath = path.resolve(resolvedTarget.targetPath);
@@ -0,0 +1,8 @@
1
+ import type { Filesystem } from "#core/filesystem/filesystem";
2
+ import type { TagTargetCandidate } from "#tag/domain/types";
3
+ /**
4
+ * Resolves the candidate targets for a tag run: the explicit target, or the discovered workspace packages.
5
+ *
6
+ * @since 0.3.16-canary.0
7
+ */
8
+ export declare function resolveTagTargetCandidates(fs: Filesystem, rootDir: string, explicitTarget: string | undefined): Promise<Array<TagTargetCandidate>>;
@@ -1,7 +1,7 @@
1
1
  import path from "node:path";
2
- import { z } from "zod";
3
- import { listWorkspacePackageDirectories } from "#/core/workspace/resolver";
4
- import { packageJsonFileName } from "#/core/workspace/well-known-files";
2
+ import * as z from "zod";
3
+ import { listWorkspacePackageDirectories } from "#core/workspace/resolver";
4
+ import { packageJsonFileName } from "#core/workspace/well-known-files";
5
5
  const packageJsonNameSchema = z.looseObject({
6
6
  name: z.string().min(1).optional(),
7
7
  });
@@ -1,10 +1,10 @@
1
- import type { FilesystemPort } from "#/core/filesystem/port";
1
+ import type { Filesystem } from "#core/filesystem/filesystem";
2
2
  /**
3
3
  * Canonicalizes the user-provided target path, or returns `undefined` when none was given.
4
4
  *
5
5
  * @since 0.3.16-canary.0
6
6
  */
7
- export declare function resolveProvidedTagTargetPath(fs: FilesystemPort, args: {
7
+ export declare function resolveProvidedTagTargetPath(fs: Filesystem, args: {
8
8
  readonly currentWorkingDirectory: string;
9
9
  readonly rawTarget: string | undefined;
10
10
  }): string | undefined;
@@ -0,0 +1,8 @@
1
+ import type { Filesystem } from "#core/filesystem/filesystem";
2
+ import type { TagRunOptions, TagRunResult } from "#tag/domain/types";
3
+ /**
4
+ * Stamps `@since` tags across one target's TypeScript files and returns the run result.
5
+ *
6
+ * @since 0.3.16-canary.0
7
+ */
8
+ export declare function runTagOnTarget(fs: Filesystem, targetPath: string, opts: TagRunOptions): TagRunResult;
@@ -1,7 +1,7 @@
1
1
  import path from "node:path";
2
- import { walkTsxFiles } from "#/core/workspace/typescript-walk";
3
- import { TagSinceWriter } from "#/tag/since-writer";
4
- import { resolveNearestPackageVersion } from "#/tag/version-resolver";
2
+ import { walkTsxFiles } from "#core/workspace/typescript-walk";
3
+ import { TagSinceWriter } from "#tag/writer/since-writer";
4
+ import { resolveNearestPackageVersion } from "#tag/writer/version-resolver";
5
5
  /**
6
6
  * Stamps `@since` tags across one target's TypeScript files and returns the run result.
7
7
  *
@@ -1,5 +1,5 @@
1
- import type { FilesystemPort } from "#/core/filesystem/port";
2
- import type { TagFileResult } from "#/tag/domain/types";
1
+ import type { Filesystem } from "#core/filesystem/filesystem";
2
+ import type { TagFileResult } from "#tag/domain/types";
3
3
  /**
4
4
  * The writer that adds missing `@since` tags to a file's exported declarations.
5
5
  *
@@ -8,7 +8,7 @@ import type { TagFileResult } from "#/tag/domain/types";
8
8
  export declare class TagSinceWriter {
9
9
  private readonly fs;
10
10
  private readonly sinceDocumentationTag;
11
- constructor(fs: FilesystemPort);
11
+ constructor(fs: Filesystem);
12
12
  applySinceTagsToFile(filePath: string, version: string, write: boolean): TagFileResult;
13
13
  /**
14
14
  * The taggable declaration a top-level statement introduces, resolving the
@@ -1,5 +1,5 @@
1
1
  import { parseSync } from "oxc-parser";
2
- import { applyEditsDescending, indentOfLineContaining } from "#/core/source-text-edit";
2
+ import { applyEditsDescending, indentOfLineContaining } from "#core/source-text-edit";
3
3
  /**
4
4
  * Top-level statement kinds that carry a `@since` tag: function, class, interface,
5
5
  * type alias, enum, and variable declaration.
@@ -1,7 +1,7 @@
1
- import type { FilesystemPort } from "#/core/filesystem/port";
1
+ import type { Filesystem } from "#core/filesystem/filesystem";
2
2
  /**
3
3
  * Returns the `version` of the nearest enclosing `package.json` above a target path.
4
4
  *
5
5
  * @since 0.3.16-canary.0
6
6
  */
7
- export declare function resolveNearestPackageVersion(fs: FilesystemPort, targetPath: string): string;
7
+ export declare function resolveNearestPackageVersion(fs: Filesystem, targetPath: string): string;
@@ -1,4 +1,4 @@
1
- import { findNearestPackageVersion } from "#/core/workspace/package-version";
1
+ import { findNearestPackageVersion } from "#core/workspace/package-version";
2
2
  /**
3
3
  * Returns the `version` of the nearest enclosing `package.json` above a target path.
4
4
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codefast/cli",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "Developer CLI for the Codefast monorepo (arrange, audit, mirror, pack-slim, tag)",
5
5
  "keywords": [
6
6
  "cli",
@@ -35,7 +35,7 @@
35
35
  "module": "./dist/index.js",
36
36
  "types": "./dist/index.d.ts",
37
37
  "imports": {
38
- "#/*": {
38
+ "#*": {
39
39
  "types": "./dist/*.d.ts",
40
40
  "default": "./dist/*.js"
41
41
  }
@@ -51,15 +51,23 @@
51
51
  "access": "public"
52
52
  },
53
53
  "dependencies": {
54
- "@microsoft/tsdoc": "^0.16.0",
54
+ "@microsoft/tsdoc": "^0.17.0",
55
55
  "commander": "^15.0.0",
56
56
  "jiti": "^2.7.0",
57
- "oxc-parser": "^0.148.0",
57
+ "oxc-parser": "^0.150.0",
58
58
  "picomatch": "^4.0.7",
59
- "yaml": "^2.9.0",
60
- "zod": "^4.5.4"
59
+ "yaml": "^2.9.1",
60
+ "zod": "^4.6.5"
61
+ },
62
+ "peerDependencies": {
63
+ "typescript": "^7.0.2"
64
+ },
65
+ "peerDependenciesMeta": {
66
+ "typescript": {
67
+ "optional": true
68
+ }
61
69
  },
62
70
  "engines": {
63
- "node": ">=24.0.0"
71
+ "node": ">=22.12.0"
64
72
  }
65
73
  }
@@ -1,10 +0,0 @@
1
- import type { AnalyzeReport } from "#/arrange/domain/types";
2
- import { AppError } from "#/core/errors";
3
- import type { FilesystemPort } from "#/core/filesystem/port";
4
- import type { Result } from "#/core/result";
5
- /**
6
- * Scans a directory's arrange targets and returns the accumulated analyze report.
7
- *
8
- * @since 0.3.16-canary.0
9
- */
10
- export declare function analyzeDirectory(fs: FilesystemPort, analyzeRootPath: string): Result<AnalyzeReport, AppError>;