@kjanat/dreamcli 4.0.0-rc.1 → 4.0.0-rc.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 (501) hide show
  1. package/CHANGELOG.md +516 -1842
  2. package/dist/core/cli/builtins.d.mts +74 -4
  3. package/dist/core/cli/compiled.d.mts +39 -2
  4. package/dist/core/cli/dispatch.d.mts +81 -4
  5. package/dist/core/cli/help-links.d.mts +13 -1
  6. package/dist/core/cli/index.d.mts +77 -12
  7. package/dist/core/cli/index.mjs +9 -3
  8. package/dist/core/cli/planner.d.mts +86 -8
  9. package/dist/core/cli/reserved-flags.d.mts +19 -1
  10. package/dist/core/cli/root-help.d.mts +53 -1
  11. package/dist/core/cli/root-help.mjs +1 -1
  12. package/dist/core/cli/root-output-flags.d.mts +74 -1
  13. package/dist/core/cli/root-surface.d.mts +64 -1
  14. package/dist/core/cli/runtime-preflight.d.mts +213 -1
  15. package/dist/core/completion/index.d.mts +2 -2
  16. package/dist/core/completion/shells/bash.d.mts +1 -0
  17. package/dist/core/completion/shells/bash.mjs +4 -1
  18. package/dist/core/completion/shells/fish.d.mts +1 -0
  19. package/dist/core/completion/shells/fish.mjs +2 -1
  20. package/dist/core/completion/shells/powershell.d.mts +1 -0
  21. package/dist/core/completion/shells/powershell.mjs +2 -1
  22. package/dist/core/completion/shells/shared.d.mts +118 -3
  23. package/dist/core/completion/shells/shared.mjs +1 -1
  24. package/dist/core/completion/shells/zsh.d.mts +1 -0
  25. package/dist/core/completion/shells/zsh.mjs +6 -2
  26. package/dist/core/config/index.d.mts +1 -1
  27. package/dist/core/config/package-json.d.mts +1 -1
  28. package/dist/core/errors/index.d.mts +17 -18
  29. package/dist/core/execution/index.d.mts +61 -1
  30. package/dist/core/help/ansi.d.mts +11 -0
  31. package/dist/core/help/index.d.mts +42 -3
  32. package/dist/core/help/index.mjs +14 -10
  33. package/dist/core/help/theme.d.mts +39 -1
  34. package/dist/core/help/theme.mjs +24 -1
  35. package/dist/core/json-schema/index.d.mts +11 -11
  36. package/dist/core/json-schema/index.mjs +7 -6
  37. package/dist/core/output/activity.d.mts +193 -1
  38. package/dist/core/output/bind.d.mts +37 -1
  39. package/dist/core/output/contracts.d.mts +5 -4
  40. package/dist/core/output/display-value.d.mts +19 -1
  41. package/dist/core/output/index.d.mts +191 -7
  42. package/dist/core/output/index.mjs +6 -4
  43. package/dist/core/output/renderers.d.mts +45 -1
  44. package/dist/core/parse/index.d.mts +4 -4
  45. package/dist/core/parse/occurrences.d.mts +9 -8
  46. package/dist/core/prompt/index.d.mts +3 -3
  47. package/dist/core/read-flags/index.d.mts +1 -1
  48. package/dist/core/resolve/coerce.d.mts +4 -4
  49. package/dist/core/resolve/config.d.mts +10 -1
  50. package/dist/core/resolve/contracts.d.mts +9 -8
  51. package/dist/core/resolve/flags.d.mts +28 -1
  52. package/dist/core/resolve/path-checks.d.mts +4 -3
  53. package/dist/core/resolve/redaction.d.mts +1 -0
  54. package/dist/core/resolve/stages.d.mts +7 -6
  55. package/dist/core/resolve/standard.d.mts +26 -1
  56. package/dist/core/schema/activity.d.mts +16 -16
  57. package/dist/core/schema/arg.d.mts +76 -66
  58. package/dist/core/schema/brand.d.mts +1 -1
  59. package/dist/core/schema/cardinality.d.mts +18 -17
  60. package/dist/core/schema/command.d.mts +40 -9
  61. package/dist/core/schema/flag.d.mts +98 -90
  62. package/dist/core/schema/index.d.mts +1 -1
  63. package/dist/core/schema/middleware.d.mts +4 -1
  64. package/dist/core/schema/number-constraints.d.mts +5 -5
  65. package/dist/core/schema/prompt.d.mts +4 -4
  66. package/dist/core/schema/provenance.d.mts +11 -11
  67. package/dist/core/schema/run.d.mts +58 -8
  68. package/dist/core/schema/source.d.mts +13 -12
  69. package/dist/core/schema/standard.d.mts +31 -24
  70. package/dist/core/schema/stdin.d.mts +12 -2
  71. package/dist/core/schema/string-constraints.d.mts +4 -4
  72. package/dist/core/schema/value-parsers.d.mts +3 -3
  73. package/dist/core/schema/value.d.mts +15 -14
  74. package/dist/core/testkit/index.d.mts +13 -4
  75. package/dist/index.d.mts +6 -6
  76. package/dist/runtime/adapter.d.mts +3 -3
  77. package/dist/runtime/deno.d.mts +3 -3
  78. package/dist/runtime/detect.d.mts +2 -2
  79. package/dist/runtime/node.d.mts +3 -3
  80. package/dist/runtime/paths.d.mts +31 -1
  81. package/dist/strings.d.mts +16 -1
  82. package/dist/version.d.mts +16 -4
  83. package/dist/version.mjs +2 -2
  84. package/package.json +15 -11
  85. package/skills/cli-creation/SKILL.md +1 -1
  86. package/examples/gh/node_modules/typescript/LICENSE +0 -55
  87. package/examples/gh/node_modules/typescript/NOTICE.txt +0 -436
  88. package/examples/gh/node_modules/typescript/README.md +0 -49
  89. package/examples/gh/node_modules/typescript/bin/tsc +0 -2
  90. package/examples/gh/node_modules/typescript/dist/api/async/api.d.ts +0 -529
  91. package/examples/gh/node_modules/typescript/dist/api/async/api.d.ts.map +0 -1
  92. package/examples/gh/node_modules/typescript/dist/api/async/api.js +0 -1657
  93. package/examples/gh/node_modules/typescript/dist/api/async/api.js.map +0 -1
  94. package/examples/gh/node_modules/typescript/dist/api/async/client.d.ts +0 -39
  95. package/examples/gh/node_modules/typescript/dist/api/async/client.d.ts.map +0 -1
  96. package/examples/gh/node_modules/typescript/dist/api/async/client.js +0 -211
  97. package/examples/gh/node_modules/typescript/dist/api/async/client.js.map +0 -1
  98. package/examples/gh/node_modules/typescript/dist/api/async/types.d.ts +0 -310
  99. package/examples/gh/node_modules/typescript/dist/api/async/types.d.ts.map +0 -1
  100. package/examples/gh/node_modules/typescript/dist/api/async/types.js +0 -2
  101. package/examples/gh/node_modules/typescript/dist/api/async/types.js.map +0 -1
  102. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.d.ts +0 -109
  103. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.d.ts.map +0 -1
  104. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.js +0 -2
  105. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.js.map +0 -1
  106. package/examples/gh/node_modules/typescript/dist/api/fs.d.ts +0 -23
  107. package/examples/gh/node_modules/typescript/dist/api/fs.d.ts.map +0 -1
  108. package/examples/gh/node_modules/typescript/dist/api/fs.js +0 -109
  109. package/examples/gh/node_modules/typescript/dist/api/fs.js.map +0 -1
  110. package/examples/gh/node_modules/typescript/dist/api/node/encoder.d.ts +0 -15
  111. package/examples/gh/node_modules/typescript/dist/api/node/encoder.d.ts.map +0 -1
  112. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.d.ts +0 -5
  113. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.d.ts.map +0 -1
  114. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.js +0 -74
  115. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.js.map +0 -1
  116. package/examples/gh/node_modules/typescript/dist/api/node/encoder.js +0 -287
  117. package/examples/gh/node_modules/typescript/dist/api/node/encoder.js.map +0 -1
  118. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.d.ts +0 -32
  119. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.d.ts.map +0 -1
  120. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.js +0 -213
  121. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.js.map +0 -1
  122. package/examples/gh/node_modules/typescript/dist/api/node/node.d.ts +0 -76
  123. package/examples/gh/node_modules/typescript/dist/api/node/node.d.ts.map +0 -1
  124. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.d.ts +0 -182
  125. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.d.ts.map +0 -1
  126. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.js +0 -835
  127. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.js.map +0 -1
  128. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.d.ts +0 -62
  129. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map +0 -1
  130. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.js +0 -122
  131. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.js.map +0 -1
  132. package/examples/gh/node_modules/typescript/dist/api/node/node.js +0 -298
  133. package/examples/gh/node_modules/typescript/dist/api/node/node.js.map +0 -1
  134. package/examples/gh/node_modules/typescript/dist/api/node/protocol.d.ts +0 -29
  135. package/examples/gh/node_modules/typescript/dist/api/node/protocol.d.ts.map +0 -1
  136. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.d.ts +0 -4
  137. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.d.ts.map +0 -1
  138. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.js +0 -241
  139. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.js.map +0 -1
  140. package/examples/gh/node_modules/typescript/dist/api/node/protocol.js +0 -30
  141. package/examples/gh/node_modules/typescript/dist/api/node/protocol.js.map +0 -1
  142. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.d.ts +0 -6
  143. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.d.ts.map +0 -1
  144. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.js +0 -61
  145. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.js.map +0 -1
  146. package/examples/gh/node_modules/typescript/dist/api/options.d.ts +0 -32
  147. package/examples/gh/node_modules/typescript/dist/api/options.d.ts.map +0 -1
  148. package/examples/gh/node_modules/typescript/dist/api/options.js +0 -11
  149. package/examples/gh/node_modules/typescript/dist/api/options.js.map +0 -1
  150. package/examples/gh/node_modules/typescript/dist/api/path.d.ts +0 -110
  151. package/examples/gh/node_modules/typescript/dist/api/path.d.ts.map +0 -1
  152. package/examples/gh/node_modules/typescript/dist/api/path.js +0 -508
  153. package/examples/gh/node_modules/typescript/dist/api/path.js.map +0 -1
  154. package/examples/gh/node_modules/typescript/dist/api/proto.d.ts +0 -239
  155. package/examples/gh/node_modules/typescript/dist/api/proto.d.ts.map +0 -1
  156. package/examples/gh/node_modules/typescript/dist/api/proto.js +0 -37
  157. package/examples/gh/node_modules/typescript/dist/api/proto.js.map +0 -1
  158. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.d.ts +0 -79
  159. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.d.ts.map +0 -1
  160. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.js +0 -169
  161. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.js.map +0 -1
  162. package/examples/gh/node_modules/typescript/dist/api/sync/api.d.ts +0 -529
  163. package/examples/gh/node_modules/typescript/dist/api/sync/api.d.ts.map +0 -1
  164. package/examples/gh/node_modules/typescript/dist/api/sync/api.js +0 -1665
  165. package/examples/gh/node_modules/typescript/dist/api/sync/api.js.map +0 -1
  166. package/examples/gh/node_modules/typescript/dist/api/sync/client.d.ts +0 -30
  167. package/examples/gh/node_modules/typescript/dist/api/sync/client.d.ts.map +0 -1
  168. package/examples/gh/node_modules/typescript/dist/api/sync/client.js +0 -124
  169. package/examples/gh/node_modules/typescript/dist/api/sync/client.js.map +0 -1
  170. package/examples/gh/node_modules/typescript/dist/api/sync/types.d.ts +0 -310
  171. package/examples/gh/node_modules/typescript/dist/api/sync/types.d.ts.map +0 -1
  172. package/examples/gh/node_modules/typescript/dist/api/sync/types.js +0 -2
  173. package/examples/gh/node_modules/typescript/dist/api/sync/types.js.map +0 -1
  174. package/examples/gh/node_modules/typescript/dist/api/syncChannel.d.ts +0 -114
  175. package/examples/gh/node_modules/typescript/dist/api/syncChannel.d.ts.map +0 -1
  176. package/examples/gh/node_modules/typescript/dist/api/syncChannel.js +0 -508
  177. package/examples/gh/node_modules/typescript/dist/api/syncChannel.js.map +0 -1
  178. package/examples/gh/node_modules/typescript/dist/api/timing.d.ts +0 -175
  179. package/examples/gh/node_modules/typescript/dist/api/timing.d.ts.map +0 -1
  180. package/examples/gh/node_modules/typescript/dist/api/timing.js +0 -149
  181. package/examples/gh/node_modules/typescript/dist/api/timing.js.map +0 -1
  182. package/examples/gh/node_modules/typescript/dist/ast/ast.d.ts +0 -100
  183. package/examples/gh/node_modules/typescript/dist/ast/ast.d.ts.map +0 -1
  184. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.d.ts +0 -1161
  185. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.d.ts.map +0 -1
  186. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.js +0 -4
  187. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.js.map +0 -1
  188. package/examples/gh/node_modules/typescript/dist/ast/ast.js +0 -7
  189. package/examples/gh/node_modules/typescript/dist/ast/ast.js.map +0 -1
  190. package/examples/gh/node_modules/typescript/dist/ast/astnav.d.ts +0 -19
  191. package/examples/gh/node_modules/typescript/dist/ast/astnav.d.ts.map +0 -1
  192. package/examples/gh/node_modules/typescript/dist/ast/astnav.js +0 -596
  193. package/examples/gh/node_modules/typescript/dist/ast/astnav.js.map +0 -1
  194. package/examples/gh/node_modules/typescript/dist/ast/clone.d.ts +0 -16
  195. package/examples/gh/node_modules/typescript/dist/ast/clone.d.ts.map +0 -1
  196. package/examples/gh/node_modules/typescript/dist/ast/clone.js +0 -104
  197. package/examples/gh/node_modules/typescript/dist/ast/clone.js.map +0 -1
  198. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.d.ts +0 -520
  199. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.d.ts.map +0 -1
  200. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.js +0 -3057
  201. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.js.map +0 -1
  202. package/examples/gh/node_modules/typescript/dist/ast/index.d.ts +0 -20
  203. package/examples/gh/node_modules/typescript/dist/ast/index.d.ts.map +0 -1
  204. package/examples/gh/node_modules/typescript/dist/ast/index.js +0 -20
  205. package/examples/gh/node_modules/typescript/dist/ast/index.js.map +0 -1
  206. package/examples/gh/node_modules/typescript/dist/ast/is.d.ts +0 -35
  207. package/examples/gh/node_modules/typescript/dist/ast/is.d.ts.map +0 -1
  208. package/examples/gh/node_modules/typescript/dist/ast/is.generated.d.ts +0 -329
  209. package/examples/gh/node_modules/typescript/dist/ast/is.generated.d.ts.map +0 -1
  210. package/examples/gh/node_modules/typescript/dist/ast/is.generated.js +0 -1103
  211. package/examples/gh/node_modules/typescript/dist/ast/is.generated.js.map +0 -1
  212. package/examples/gh/node_modules/typescript/dist/ast/is.js +0 -233
  213. package/examples/gh/node_modules/typescript/dist/ast/is.js.map +0 -1
  214. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.d.ts +0 -11
  215. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.d.ts.map +0 -1
  216. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.js +0 -202
  217. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.js.map +0 -1
  218. package/examples/gh/node_modules/typescript/dist/ast/scanner.d.ts +0 -97
  219. package/examples/gh/node_modules/typescript/dist/ast/scanner.d.ts.map +0 -1
  220. package/examples/gh/node_modules/typescript/dist/ast/scanner.js +0 -2230
  221. package/examples/gh/node_modules/typescript/dist/ast/scanner.js.map +0 -1
  222. package/examples/gh/node_modules/typescript/dist/ast/utils.d.ts +0 -17
  223. package/examples/gh/node_modules/typescript/dist/ast/utils.d.ts.map +0 -1
  224. package/examples/gh/node_modules/typescript/dist/ast/utils.js +0 -67
  225. package/examples/gh/node_modules/typescript/dist/ast/utils.js.map +0 -1
  226. package/examples/gh/node_modules/typescript/dist/ast/visitor.d.ts +0 -14
  227. package/examples/gh/node_modules/typescript/dist/ast/visitor.d.ts.map +0 -1
  228. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.d.ts +0 -50
  229. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.d.ts.map +0 -1
  230. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.js +0 -978
  231. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.js.map +0 -1
  232. package/examples/gh/node_modules/typescript/dist/ast/visitor.js +0 -47
  233. package/examples/gh/node_modules/typescript/dist/ast/visitor.js.map +0 -1
  234. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.d.ts +0 -2
  235. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.d.ts.map +0 -1
  236. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.d.ts +0 -129
  237. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map +0 -1
  238. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.js +0 -132
  239. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.js.map +0 -1
  240. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.js +0 -130
  241. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.js.map +0 -1
  242. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.d.ts +0 -2
  243. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map +0 -1
  244. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts +0 -5
  245. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map +0 -1
  246. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.js +0 -6
  247. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map +0 -1
  248. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.js +0 -6
  249. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.js.map +0 -1
  250. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.d.ts +0 -2
  251. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.d.ts.map +0 -1
  252. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts +0 -28
  253. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map +0 -1
  254. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.js +0 -30
  255. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.js.map +0 -1
  256. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.js +0 -30
  257. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.js.map +0 -1
  258. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.d.ts +0 -2
  259. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map +0 -1
  260. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts +0 -7
  261. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map +0 -1
  262. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.js +0 -9
  263. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map +0 -1
  264. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.js +0 -9
  265. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.js.map +0 -1
  266. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.d.ts +0 -2
  267. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.d.ts.map +0 -1
  268. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.d.ts +0 -12
  269. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map +0 -1
  270. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.js +0 -14
  271. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.js.map +0 -1
  272. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.js +0 -14
  273. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.js.map +0 -1
  274. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.d.ts +0 -2
  275. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.d.ts.map +0 -1
  276. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts +0 -23
  277. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map +0 -1
  278. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.js +0 -25
  279. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.js.map +0 -1
  280. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.js +0 -25
  281. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.js.map +0 -1
  282. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.d.ts +0 -2
  283. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.d.ts.map +0 -1
  284. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts +0 -9
  285. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map +0 -1
  286. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.js +0 -11
  287. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.js.map +0 -1
  288. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.js +0 -11
  289. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.js.map +0 -1
  290. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.d.ts +0 -2
  291. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.d.ts.map +0 -1
  292. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.d.ts +0 -5
  293. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map +0 -1
  294. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.js +0 -6
  295. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.js.map +0 -1
  296. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.js +0 -6
  297. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.js.map +0 -1
  298. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.d.ts +0 -2
  299. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.d.ts.map +0 -1
  300. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts +0 -42
  301. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map +0 -1
  302. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.js +0 -44
  303. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.js.map +0 -1
  304. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.js +0 -44
  305. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.js.map +0 -1
  306. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts +0 -2
  307. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map +0 -1
  308. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts +0 -7
  309. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map +0 -1
  310. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js +0 -9
  311. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map +0 -1
  312. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.js +0 -9
  313. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.js.map +0 -1
  314. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.d.ts +0 -2
  315. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.d.ts.map +0 -1
  316. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.d.ts +0 -17
  317. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map +0 -1
  318. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.js +0 -19
  319. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.js.map +0 -1
  320. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.js +0 -19
  321. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.js.map +0 -1
  322. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts +0 -2
  323. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map +0 -1
  324. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts +0 -9
  325. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map +0 -1
  326. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js +0 -11
  327. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map +0 -1
  328. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.js +0 -11
  329. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.js.map +0 -1
  330. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.d.ts +0 -2
  331. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.d.ts.map +0 -1
  332. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.d.ts +0 -6
  333. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map +0 -1
  334. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.js +0 -8
  335. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.js.map +0 -1
  336. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.js +0 -8
  337. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.js.map +0 -1
  338. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts +0 -2
  339. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map +0 -1
  340. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts +0 -36
  341. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map +0 -1
  342. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js +0 -38
  343. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map +0 -1
  344. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.js +0 -38
  345. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.js.map +0 -1
  346. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.d.ts +0 -2
  347. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.d.ts.map +0 -1
  348. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts +0 -44
  349. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map +0 -1
  350. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.js +0 -46
  351. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.js.map +0 -1
  352. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.js +0 -46
  353. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.js.map +0 -1
  354. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.d.ts +0 -2
  355. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.d.ts.map +0 -1
  356. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.d.ts +0 -50
  357. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map +0 -1
  358. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.js +0 -52
  359. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.js.map +0 -1
  360. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.js +0 -52
  361. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.js.map +0 -1
  362. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts +0 -2
  363. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map +0 -1
  364. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts +0 -16
  365. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map +0 -1
  366. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js +0 -18
  367. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map +0 -1
  368. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.js +0 -18
  369. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.js.map +0 -1
  370. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts +0 -2
  371. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map +0 -1
  372. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts +0 -13
  373. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map +0 -1
  374. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js +0 -14
  375. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map +0 -1
  376. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.js +0 -14
  377. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.js.map +0 -1
  378. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.d.ts +0 -2
  379. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.d.ts.map +0 -1
  380. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.d.ts +0 -11
  381. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map +0 -1
  382. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.js +0 -12
  383. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.js.map +0 -1
  384. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.js +0 -12
  385. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.js.map +0 -1
  386. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.d.ts +0 -2
  387. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.d.ts.map +0 -1
  388. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts +0 -17
  389. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map +0 -1
  390. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.js +0 -18
  391. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.js.map +0 -1
  392. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.js +0 -18
  393. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.js.map +0 -1
  394. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.d.ts +0 -2
  395. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.d.ts.map +0 -1
  396. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts +0 -15
  397. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map +0 -1
  398. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.js +0 -17
  399. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.js.map +0 -1
  400. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.js +0 -17
  401. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.js.map +0 -1
  402. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.d.ts +0 -2
  403. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.d.ts.map +0 -1
  404. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.d.ts +0 -5
  405. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map +0 -1
  406. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.js +0 -7
  407. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.js.map +0 -1
  408. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.js +0 -7
  409. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.js.map +0 -1
  410. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.d.ts +0 -2
  411. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.d.ts.map +0 -1
  412. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts +0 -71
  413. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map +0 -1
  414. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.js +0 -73
  415. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.js.map +0 -1
  416. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.js +0 -73
  417. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.js.map +0 -1
  418. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.d.ts +0 -2
  419. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.d.ts.map +0 -1
  420. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts +0 -389
  421. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map +0 -1
  422. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.js +0 -391
  423. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.js.map +0 -1
  424. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.js +0 -391
  425. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.js.map +0 -1
  426. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.d.ts +0 -2
  427. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.d.ts.map +0 -1
  428. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts +0 -30
  429. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map +0 -1
  430. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.js +0 -32
  431. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.js.map +0 -1
  432. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.js +0 -32
  433. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.js.map +0 -1
  434. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.d.ts +0 -2
  435. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.d.ts.map +0 -1
  436. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.d.ts +0 -76
  437. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map +0 -1
  438. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.js +0 -78
  439. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.js.map +0 -1
  440. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.js +0 -78
  441. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.js.map +0 -1
  442. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.d.ts +0 -2
  443. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.d.ts.map +0 -1
  444. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts +0 -7
  445. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map +0 -1
  446. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.js +0 -9
  447. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.js.map +0 -1
  448. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.js +0 -9
  449. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.js.map +0 -1
  450. package/examples/gh/node_modules/typescript/dist/internal/utils.d.ts +0 -23
  451. package/examples/gh/node_modules/typescript/dist/internal/utils.d.ts.map +0 -1
  452. package/examples/gh/node_modules/typescript/dist/internal/utils.js +0 -25
  453. package/examples/gh/node_modules/typescript/dist/internal/utils.js.map +0 -1
  454. package/examples/gh/node_modules/typescript/lib/getExePath.d.ts +0 -2
  455. package/examples/gh/node_modules/typescript/lib/getExePath.js +0 -70
  456. package/examples/gh/node_modules/typescript/lib/tsc.js +0 -28
  457. package/examples/gh/node_modules/typescript/lib/version.cjs +0 -3
  458. package/examples/gh/node_modules/typescript/lib/version.d.cts +0 -2
  459. package/examples/gh/node_modules/typescript/package.json +0 -87
  460. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/License.txt +0 -11
  461. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/README.md +0 -54
  462. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts +0 -17
  463. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js +0 -83
  464. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts +0 -22
  465. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js +0 -210
  466. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts +0 -14
  467. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js +0 -87
  468. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts +0 -32
  469. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js +0 -132
  470. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts +0 -367
  471. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js +0 -1271
  472. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts +0 -9
  473. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js +0 -16
  474. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts +0 -52
  475. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js +0 -70
  476. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts +0 -39
  477. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js +0 -135
  478. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts +0 -7
  479. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js +0 -34
  480. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts +0 -55
  481. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js +0 -412
  482. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts +0 -18
  483. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js +0 -155
  484. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts +0 -77
  485. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js +0 -246
  486. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts +0 -60
  487. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js +0 -157
  488. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts +0 -369
  489. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js +0 -436
  490. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts +0 -74
  491. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js +0 -23
  492. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts +0 -10
  493. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js +0 -74
  494. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts +0 -15
  495. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +0 -77
  496. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts +0 -58
  497. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js +0 -289
  498. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts +0 -12
  499. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js +0 -163
  500. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/package.json +0 -54
  501. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts +0 -5
@@ -1,4 +1,17 @@
1
+ import { BuiltinsConfig } from "../../cli/builtins.mjs";
2
+ import { FlagSchema } from "../../schema/flag.mjs";
3
+ import { CommandSchema } from "../../schema/command.mjs";
4
+ import "../../schema/index.mjs";
1
5
  //#region src/core/completion/shells/shared.d.ts
6
+ /**
7
+ * Format a version tag for generated completion script headers.
8
+ *
9
+ * Produces e.g. `"@kjanat/dreamcli v0.9.1 (f9b5f1a)"` when built, or
10
+ * `"@kjanat/dreamcli"` when running unbundled in development.
11
+ *
12
+ * @internal
13
+ */
14
+ declare function versionTag(): string;
2
15
  /**
3
16
  * Options for completion script generation.
4
17
  *
@@ -30,7 +43,7 @@ interface CompletionOptions {
30
43
  *
31
44
  * @defaultValue `'command'`
32
45
  */
33
- readonly as?: "command" | "flag";
46
+ readonly as?: 'command' | 'flag';
34
47
  /**
35
48
  * Controls which root-level surface shell completion exposes when a
36
49
  * default command exists.
@@ -43,7 +56,109 @@ interface CompletionOptions {
43
56
  *
44
57
  * @defaultValue `'subcommands'`
45
58
  */
46
- readonly rootMode?: "subcommands" | "surface";
59
+ readonly rootMode?: 'subcommands' | 'surface';
60
+ }
61
+ /**
62
+ * Normalized root completion surface consumed by shell generators.
63
+ *
64
+ * @internal
65
+ */
66
+ interface RootCompletionSurface {
67
+ readonly visibleCommands: readonly CommandSchema[];
68
+ readonly visibleDefaultCommand: CommandSchema | undefined;
69
+ readonly rootFlags: Readonly<Record<string, FlagSchema>>;
70
+ readonly defaultFlags: Readonly<Record<string, FlagSchema>>;
71
+ readonly includeDefaultFlags: boolean;
72
+ }
73
+ /**
74
+ * Schema shape needed to compute the root completion surface.
75
+ *
76
+ * @internal
77
+ */
78
+ interface RootCompletionSchemaLike {
79
+ readonly commands: readonly CommandSchema[];
80
+ readonly defaultCommand: CommandSchema | undefined;
81
+ readonly defaultCommandRouted?: boolean | undefined;
82
+ readonly version: string | undefined;
83
+ /**
84
+ * Built-in flag state. `help: 'off'` drops the synthetic root `--help` so a
85
+ * command's own `help` flag is the only one completed. Optional so
86
+ * hand-built schema-like objects keep every built-in.
87
+ */
88
+ readonly builtins?: BuiltinsConfig | undefined;
89
+ }
90
+ /**
91
+ * Resolve the root-level completion surface from the CLI schema and policy.
92
+ *
93
+ * @internal
94
+ */
95
+ declare function resolveRootCompletionSurface(schema: RootCompletionSchemaLike, rootMode?: CompletionOptions['rootMode']): RootCompletionSurface;
96
+ /**
97
+ * A flattened node from the command tree, carrying its ancestry context.
98
+ *
99
+ * Used by both bash and zsh generators to produce completions at every
100
+ * nesting level with correct propagated flag inheritance.
101
+ *
102
+ * @internal
103
+ */
104
+ interface CommandNode {
105
+ /** Name path from root: `['db', 'migrate']` */
106
+ readonly path: readonly string[];
107
+ /** The command schema at this node */
108
+ readonly schema: CommandSchema;
109
+ /** Propagated flags inherited from ancestors (excludes own flags) */
110
+ readonly propagatedFlags: Readonly<Record<string, FlagSchema>>;
111
+ /** Merged flags: propagated + own (own shadows propagated) */
112
+ readonly mergedFlags: Readonly<Record<string, FlagSchema>>;
113
+ /** Visible child command schemas (for subcommand completion) */
114
+ readonly children: readonly CommandSchema[];
47
115
  }
116
+ /**
117
+ * Walk the command tree depth-first, producing a flat list of
118
+ * {@link CommandNode}s with propagated flag context.
119
+ *
120
+ * @param topLevel - Top-level visible command schemas.
121
+ * @param ancestorSchemas - Schema path from root (for propagation calculation).
122
+ * @returns Flat list of all visible nodes in the tree.
123
+ *
124
+ * @internal
125
+ */
126
+ declare function walkCommandTree(topLevel: readonly CommandSchema[], ancestorSchemas?: readonly CommandSchema[]): readonly CommandNode[];
127
+ /**
128
+ * Effective negated long-form spelling for user-facing suggestion lists.
129
+ *
130
+ * Returns the negated spelling without the `--` prefix (e.g. `no-verbose`)
131
+ * when the flag is negatable and the negation is not hidden; `undefined`
132
+ * otherwise. Negated spellings are long-only and take no value, so they only
133
+ * belong in suggestion lists — never in value-flag (operand-skip) patterns.
134
+ *
135
+ * @internal
136
+ */
137
+ declare function getVisibleNegatedName(name: string, schema: FlagSchema): string | undefined;
138
+ /**
139
+ * Sanitize a string for use as a shell function identifier.
140
+ * Replaces non-alphanumeric/underscore characters with underscores.
141
+ * When sanitization changes the name, appends a short stable hash suffix so
142
+ * distinct originals cannot collide on the same helper identifier.
143
+ * Used by both bash and zsh generators.
144
+ *
145
+ * @internal
146
+ */
147
+ declare function sanitizeShellIdentifier(name: string): string;
148
+ /**
149
+ * Quote a string for safe interpolation into a shell script.
150
+ *
151
+ * Uses single-quote wrapping with the standard `'\''` idiom for
152
+ * embedded single quotes. This prevents shell injection from CLI
153
+ * names containing spaces, semicolons, backticks, or other
154
+ * special characters.
155
+ *
156
+ * Returns the input unquoted if it consists only of shell-safe
157
+ * characters (`[a-zA-Z0-9_\-.]`), avoiding unnecessary noise
158
+ * in generated scripts for common CLI names like `my-cli` or `app.v2`.
159
+ *
160
+ * @internal
161
+ */
162
+ declare function quoteShellArg(value: string): string;
48
163
  //#endregion
49
- export type { CompletionOptions };
164
+ export { type CommandNode, type CompletionOptions, type RootCompletionSurface, getVisibleNegatedName, quoteShellArg, resolveRootCompletionSurface, sanitizeShellIdentifier, versionTag, walkCommandTree };
@@ -29,7 +29,7 @@ function resolveRootCompletionSurface(schema, rootMode = "subcommands") {
29
29
  const defaultCommand = rootSurface.visibleDefaultCommand;
30
30
  const alreadyListed = defaultCommand !== void 0 && rootSurface.visibleCommands.some((c) => c.name === defaultCommand.name);
31
31
  return {
32
- visibleCommands: defaultCommand !== void 0 && !alreadyListed ? [defaultCommand, ...rootSurface.visibleCommands] : rootSurface.visibleCommands,
32
+ visibleCommands: rootSurface.defaultRouted && defaultCommand !== void 0 && !alreadyListed ? [defaultCommand, ...rootSurface.visibleCommands] : rootSurface.defaultRouted ? rootSurface.visibleCommands : rootSurface.visibleSubcommands,
33
33
  visibleDefaultCommand: rootSurface.visibleDefaultCommand,
34
34
  rootFlags,
35
35
  defaultFlags,
@@ -1,4 +1,5 @@
1
1
  import { CompletionOptions } from "./shared.mjs";
2
+ import { CLISchema } from "../../cli/index.mjs";
2
3
  //#region src/core/completion/shells/zsh.d.ts
3
4
  /**
4
5
  * Generate a zsh completion script for the CLI.
@@ -2,6 +2,7 @@ import { CLIError } from "../../errors/index.mjs";
2
2
  import { getFlagAliasNames } from "../../schema/flag.mjs";
3
3
  import { flagExpectsValue } from "../../parse/index.mjs";
4
4
  import { getVisibleNegatedName, quoteShellArg, resolveRootCompletionSurface, sanitizeShellIdentifier, versionTag, walkCommandTree } from "./shared.mjs";
5
+ import { resolvePlainHelpDescription } from "../../help/theme.mjs";
5
6
  //#region src/core/completion/shells/zsh.ts
6
7
  /**
7
8
  * Generate a zsh completion script for the CLI.
@@ -93,7 +94,10 @@ function generateZshCompletion(schema, options) {
93
94
  lines.push(" ;;");
94
95
  lines.push(" esac");
95
96
  } else {
96
- const globalFlags = buildZshFlagSpecsFromFlags(rootSurface.rootFlags);
97
+ const globalFlags = buildZshFlagSpecsFromFlags({
98
+ ...rootSurface.rootFlags,
99
+ ...rootSurface.includeDefaultFlags ? rootSurface.defaultFlags : {}
100
+ });
97
101
  lines.push(" _arguments \\");
98
102
  for (let i = 0; i < globalFlags.length; i++) {
99
103
  const trailing = i < globalFlags.length - 1 ? " \\" : "";
@@ -212,7 +216,7 @@ function escapeZshDescription(value) {
212
216
  function buildZshFlagSpecsFromFlags(flags) {
213
217
  const specs = [];
214
218
  for (const [name, schema] of Object.entries(flags)) {
215
- const desc = escapeZshDescription(schema.description ?? name);
219
+ const desc = escapeZshDescription(schema.description === void 0 ? name : resolvePlainHelpDescription(schema.description));
216
220
  const longFlag = `--${name}`;
217
221
  const shortFlags = getFlagAliasNames(schema, { kind: "short" }).map((alias) => `-${alias}`);
218
222
  const longAliases = getFlagAliasNames(schema, { kind: "long" }).map((alias) => `--${alias}`);
@@ -126,7 +126,7 @@ declare function buildConfigSearchPaths(appName: string, options: ConfigSearchPa
126
126
  * Exported so custom hosts and tests can type the minimal adapter required by
127
127
  * {@link discoverConfig} without depending on the full runtime adapter shape.
128
128
  */
129
- type ConfigAdapter = Pick<RuntimeAdapter, "readFile" | "cwd" | "configDir"> & Partial<Pick<RuntimeAdapter, "userConfigDirs" | "systemConfigDirs">>;
129
+ type ConfigAdapter = Pick<RuntimeAdapter, 'readFile' | 'cwd' | 'configDir'> & Partial<Pick<RuntimeAdapter, 'userConfigDirs' | 'systemConfigDirs'>>;
130
130
  /**
131
131
  * Discover and load a config file.
132
132
  *
@@ -37,7 +37,7 @@ interface PackageJsonData {
37
37
  * Using a narrow pick keeps the function easy to test and makes the
38
38
  * dependency explicit.
39
39
  */
40
- type PackageJsonAdapter = Pick<RuntimeAdapter, "readFile" | "cwd">;
40
+ type PackageJsonAdapter = Pick<RuntimeAdapter, 'readFile' | 'cwd'>;
41
41
  /** Options for {@link discoverManifest}. */
42
42
  interface ManifestDiscoveryOptions {
43
43
  /**
@@ -9,13 +9,13 @@
9
9
  * @module dreamcli/core/errors
10
10
  */
11
11
  /** Codes emitted during argv parsing. */
12
- type ParseErrorCode = "UNKNOWN_FLAG" | "UNKNOWN_COMMAND" | "MISSING_VALUE" | "INVALID_VALUE" | "INVALID_SCHEMA" | "DUPLICATE_FLAG" | "UNEXPECTED_POSITIONAL";
12
+ export type ParseErrorCode = 'UNKNOWN_FLAG' | 'UNKNOWN_COMMAND' | 'MISSING_VALUE' | 'INVALID_VALUE' | 'INVALID_SCHEMA' | 'DUPLICATE_FLAG' | 'UNEXPECTED_POSITIONAL';
13
13
  /** Codes emitted during post-parse validation / resolution. */
14
- type ValidationErrorCode = "REQUIRED_FLAG" | "REQUIRED_ARG" | "MISSING_STDIN" | "INVALID_ENUM" | "TYPE_MISMATCH" | "CONSTRAINT_VIOLATED";
14
+ export type ValidationErrorCode = 'REQUIRED_FLAG' | 'REQUIRED_ARG' | 'MISSING_STDIN' | 'INVALID_ENUM' | 'TYPE_MISMATCH' | 'CONSTRAINT_VIOLATED';
15
15
  /** Any framework error code (extensible via `string & {}`). */
16
- type ErrorCode = ParseErrorCode | ValidationErrorCode | (string & {});
16
+ export type ErrorCode = ParseErrorCode | ValidationErrorCode | (string & {});
17
17
  /** Options accepted by the `CLIError` constructor. */
18
- interface CLIErrorOptions {
18
+ export interface CLIErrorOptions {
19
19
  /** Stable machine-readable identifier (e.g. `"UNKNOWN_FLAG"`). */
20
20
  readonly code: ErrorCode;
21
21
  /**
@@ -36,9 +36,9 @@ interface CLIErrorOptions {
36
36
  * Every error surfaced by the framework extends this class, ensuring a
37
37
  * consistent shape for rendering (TTY pretty-print, `--json`, test assertions).
38
38
  */
39
- declare class CLIError extends Error {
39
+ export declare class CLIError extends Error {
40
40
  /** Error class name, always `'CLIError'` for the base class. @override */
41
- override readonly name: string;
41
+ readonly name: string;
42
42
  /** Stable machine-readable identifier. */
43
43
  readonly code: ErrorCode;
44
44
  /** Process exit code (defaults to `1`). */
@@ -56,7 +56,7 @@ declare class CLIError extends Error {
56
56
  toJSON(): CLIErrorJSON;
57
57
  }
58
58
  /** Shape returned by {@linkcode CLIError}.toJSON(). */
59
- interface CLIErrorJSON {
59
+ export interface CLIErrorJSON {
60
60
  /** Error class name (e.g. `'CLIError'`, `'ParseError'`). */
61
61
  readonly name: string;
62
62
  /** Stable machine-readable identifier for programmatic matching. */
@@ -71,7 +71,7 @@ interface CLIErrorJSON {
71
71
  readonly details?: Readonly<Record<string, unknown>>;
72
72
  }
73
73
  /** Options for {@linkcode ParseError}. Code is narrowed to parse-specific codes. */
74
- interface ParseErrorOptions extends Omit<CLIErrorOptions, "code" | "exitCode"> {
74
+ export interface ParseErrorOptions extends Omit<CLIErrorOptions, 'code' | 'exitCode'> {
75
75
  /** Parse-category error code (e.g. `'UNKNOWN_FLAG'`, `'MISSING_VALUE'`). */
76
76
  readonly code: ParseErrorCode;
77
77
  /**
@@ -85,16 +85,16 @@ interface ParseErrorOptions extends Omit<CLIErrorOptions, "code" | "exitCode"> {
85
85
  *
86
86
  * Exit code defaults to `2` (standard for CLI usage errors).
87
87
  */
88
- declare class ParseError extends CLIError {
88
+ export declare class ParseError extends CLIError {
89
89
  /** Always `'ParseError'`. @override */
90
- override readonly name: "ParseError";
90
+ readonly name: "ParseError";
91
91
  /** Narrowed to parse-category codes. */
92
92
  readonly code: ParseErrorCode;
93
93
  /** Create a parse error with exit code defaulting to `2`. */
94
94
  constructor(message: string, options: ParseErrorOptions);
95
95
  }
96
96
  /** Options for {@linkcode ValidationError}. Code is narrowed to validation-specific codes. */
97
- interface ValidationErrorOptions extends Omit<CLIErrorOptions, "code" | "exitCode"> {
97
+ export interface ValidationErrorOptions extends Omit<CLIErrorOptions, 'code' | 'exitCode'> {
98
98
  /** Validation-category error code (e.g. `'REQUIRED_FLAG'`, `'INVALID_ENUM'`). */
99
99
  readonly code: ValidationErrorCode;
100
100
  /**
@@ -108,19 +108,18 @@ interface ValidationErrorOptions extends Omit<CLIErrorOptions, "code" | "exitCod
108
108
  *
109
109
  * Exit code defaults to `2` (standard for CLI usage errors).
110
110
  */
111
- declare class ValidationError extends CLIError {
111
+ export declare class ValidationError extends CLIError {
112
112
  /** Always `'ValidationError'`. @override */
113
- override readonly name: "ValidationError";
113
+ readonly name: "ValidationError";
114
114
  /** Narrowed to validation-category codes. */
115
115
  readonly code: ValidationErrorCode;
116
116
  /** Create a validation error with exit code defaulting to `2`. */
117
117
  constructor(message: string, options: ValidationErrorOptions);
118
118
  }
119
119
  /** Narrows an unknown value to `CLIError`. */
120
- declare function isCLIError(value: unknown): value is CLIError;
120
+ export declare function isCLIError(value: unknown): value is CLIError;
121
121
  /** Narrows an unknown value to `ParseError`. */
122
- declare function isParseError(value: unknown): value is ParseError;
122
+ export declare function isParseError(value: unknown): value is ParseError;
123
123
  /** Narrows an unknown value to `ValidationError`. */
124
- declare function isValidationError(value: unknown): value is ValidationError;
125
- //#endregion
126
- export { CLIError, CLIErrorJSON, CLIErrorOptions, ErrorCode, ParseError, ParseErrorCode, ParseErrorOptions, ValidationError, ValidationErrorCode, ValidationErrorOptions, isCLIError, isParseError, isValidationError };
124
+ export declare function isValidationError(value: unknown): value is ValidationError;
125
+ //#endregion
@@ -1 +1,61 @@
1
- export {}
1
+ import { CLIError } from "../errors/index.mjs";
2
+ import { CommandMeta, CommandSchema, ErasedActionHandler, ExecutionStep, Out } from "../schema/command.mjs";
3
+ import { CapturedOutput } from "../output/index.mjs";
4
+ import { InternalRunOptions, RunResult } from "../schema/run.mjs";
5
+ //#region src/core/execution/index.d.ts
6
+ /**
7
+ * The executable half of a command: what to run, and what wraps it.
8
+ *
9
+ * The schema travels on the request instead, already merged with propagated
10
+ * ancestor flags.
11
+ * @internal
12
+ */
13
+ interface ExecutableCommand {
14
+ /** Action handler, `undefined` when the command declares none. */
15
+ readonly handler: ErasedActionHandler | undefined;
16
+ /** Derive and middleware steps in registration order. */
17
+ readonly steps: readonly ExecutionStep[];
18
+ }
19
+ /**
20
+ * Explicit executor input for a single command invocation.
21
+ * @internal
22
+ */
23
+ interface CommandExecutionRequest {
24
+ /** The handler and execution steps to run. */
25
+ readonly command: ExecutableCommand;
26
+ /** Raw argument tokens to parse (excluding the program name). */
27
+ readonly argv: readonly string[];
28
+ /** Output channel for handler and error rendering. */
29
+ readonly out: Out;
30
+ /** Frozen schema definition (flags, args, metadata) for parsing and resolution. */
31
+ readonly schema: CommandSchema;
32
+ /** Runtime metadata (binary name, version) propagated to the handler. */
33
+ readonly meta: CommandMeta;
34
+ /** Optional overrides for env, config, prompter, plugins, and JSON mode. */
35
+ readonly options?: InternalRunOptions;
36
+ }
37
+ /**
38
+ * Minimal executor result before output buffers are assembled into `RunResult`.
39
+ * @internal
40
+ */
41
+ interface CommandExecutionResult {
42
+ /** Process exit code (`0` on success, error-specific otherwise). */
43
+ readonly exitCode: number;
44
+ /** The structured error if the command failed, `undefined` on success. */
45
+ readonly error: CLIError | undefined;
46
+ }
47
+ /**
48
+ * Run the full parse -> resolve -> plugin -> handler pipeline for one command.
49
+ *
50
+ * Handles `--help` short-circuit, plugin lifecycle hooks, deprecation warnings,
51
+ * and error wrapping. Both CLI dispatch and testkit `runCommand` converge here.
52
+ * @internal
53
+ */
54
+ declare function executeCommand(request: CommandExecutionRequest): Promise<CommandExecutionResult>;
55
+ /**
56
+ * Assemble a {@linkcode CommandExecutionResult} and captured output buffers into a public `RunResult`.
57
+ * @internal
58
+ */
59
+ declare function buildRunResult(result: CommandExecutionResult, captured: CapturedOutput): RunResult;
60
+ //#endregion
61
+ export { type CommandExecutionRequest, type CommandExecutionResult, type ExecutableCommand, buildRunResult, executeCommand };
@@ -1,4 +1,15 @@
1
1
  //#region src/core/help/ansi.d.ts
2
+ /**
3
+ * ANSI/OSC-aware text helpers for help formatting.
4
+ *
5
+ * Terminal escape sequences (SGR colors, OSC 8 hyperlinks) occupy zero
6
+ * columns when rendered, so width math must measure the *visible* text.
7
+ * {@linkcode visibleWidth} strips escapes before counting, and the shared
8
+ * {@linkcode padEnd}/{@linkcode wrapText} helpers build on it so aligned
9
+ * tables and wrapped lines stay intact when escapes are present.
10
+ *
11
+ * @module dreamcli/core/help/ansi
12
+ */
2
13
  /**
3
14
  * Remove ANSI CSI and OSC escape sequences from `text`.
4
15
  *
@@ -1,5 +1,5 @@
1
+ import { HelpDescription, HelpTheme, HelpThemeFactory } from "./theme.mjs";
1
2
  import { CommandSchema } from "../schema/command.mjs";
2
- import { HelpTheme, HelpThemeFactory } from "./theme.mjs";
3
3
  import { osc8, visibleWidth } from "./ansi.mjs";
4
4
  import "../schema/index.mjs";
5
5
  import { Colors } from "ansispeck";
@@ -22,7 +22,7 @@ interface HelpOptions {
22
22
  *
23
23
  * @defaultValue `'alphabetical'`
24
24
  */
25
- readonly flagOrder?: "alphabetical" | "declaration";
25
+ readonly flagOrder?: 'alphabetical' | 'declaration';
26
26
  /**
27
27
  * Custom comparator over flag long names for the `Flags:` table. When set,
28
28
  * it wins over {@link HelpOptions.flagOrder}.
@@ -62,6 +62,8 @@ interface HelpOptions {
62
62
  * explicitly to force it on or off.
63
63
  */
64
64
  readonly footer?: boolean;
65
+ /** @internal Whether this usage line is being rendered as merged root/default help. */
66
+ readonly isDefaultHelp?: boolean;
65
67
  /**
66
68
  * Gated ANSI palette used to style help output. Identity formatters mean
67
69
  * plain text. `CLIBuilder.execute()`/`.run()` thread the output channel's
@@ -79,7 +81,30 @@ interface HelpOptions {
79
81
  * @defaultValue `undefined` (built-in theme)
80
82
  */
81
83
  readonly theme?: HelpThemeFactory;
84
+ /**
85
+ * Theme overrides used only by function-form flag and argument descriptions.
86
+ * Merged over the resolved global theme, one role at a time.
87
+ *
88
+ * @defaultValue `undefined` (use the global theme)
89
+ */
90
+ readonly descriptionTheme?: HelpThemeFactory;
91
+ }
92
+ /** Formatted flag entry for the flags table. @internal */
93
+ interface FlagEntry {
94
+ /** Preformatted flag names and value hint for the left table column. */
95
+ readonly left: string;
96
+ /** Preformatted help text for the description table column. */
97
+ readonly description: string;
82
98
  }
99
+ /**
100
+ * Build the ordered help sections without joining them.
101
+ *
102
+ * @internal
103
+ * @param schema - The {@link CommandSchema} to render.
104
+ * @param options - Optional {@link HelpOptions} for width/bin name.
105
+ * @returns Array of section strings (usage, description, commands, args, flags, examples).
106
+ */
107
+ declare function formatHelpSections(schema: CommandSchema, options?: HelpOptions): readonly string[];
83
108
  /**
84
109
  * Generate help text from a command schema.
85
110
  *
@@ -106,5 +131,19 @@ interface HelpOptions {
106
131
  * ```
107
132
  */
108
133
  declare function formatHelp(schema: CommandSchema, options?: HelpOptions): string;
134
+ /**
135
+ * Render a titled two-column flag block from pre-built {@link FlagEntry} rows.
136
+ *
137
+ * Shared by the per-command `Flags:` section and the root-help `Global options:`
138
+ * block (built-in flags), so column alignment and description wrapping stay
139
+ * identical across both. Returns `''` when there are no entries.
140
+ *
141
+ * @param title - Section heading (e.g. `'Flags:'`, `'Global options:'`), pre-styled by the caller.
142
+ * @param entries - Formatted left/description rows.
143
+ * @param width - Terminal width for description wrapping.
144
+ * @returns Multi-line block string, or `''` when `entries` is empty.
145
+ * @internal
146
+ */
147
+ declare function formatFlagEntriesBlock(title: string, entries: readonly FlagEntry[], width: number): string;
109
148
  //#endregion
110
- export { type HelpOptions, type HelpTheme, type HelpThemeFactory, formatHelp, osc8, visibleWidth };
149
+ export { type FlagEntry, type HelpDescription, type HelpOptions, type HelpTheme, type HelpThemeFactory, formatFlagEntriesBlock, formatHelp, formatHelpSections, osc8, visibleWidth };
@@ -1,8 +1,8 @@
1
1
  import { getFlagAliasNames } from "../schema/flag.mjs";
2
2
  import { resolveExampleCommand } from "../schema/command.mjs";
3
+ import { extendHelpTheme, resolveHelpDescription, resolveHelpTheme } from "./theme.mjs";
3
4
  import { formatDisplayValue } from "../output/display-value.mjs";
4
5
  import { osc8, padEnd, visibleWidth, wrapText } from "./ansi.mjs";
5
- import { resolveHelpTheme } from "./theme.mjs";
6
6
  //#region src/core/help/index.ts
7
7
  const DEFAULT_WIDTH = 80;
8
8
  /**
@@ -12,6 +12,7 @@ const DEFAULT_WIDTH = 80;
12
12
  * @returns Fully resolved options with defaults applied.
13
13
  */
14
14
  function resolveOptions(options) {
15
+ const theme = resolveHelpTheme(options?.colors, options?.theme);
15
16
  return {
16
17
  width: options?.width ?? DEFAULT_WIDTH,
17
18
  binName: options?.binName,
@@ -19,7 +20,8 @@ function resolveOptions(options) {
19
20
  flagOrder: options?.flagOrder ?? "alphabetical",
20
21
  sortFlags: options?.sortFlags,
21
22
  isDefaultHelp: options?.isDefaultHelp ?? false,
22
- theme: resolveHelpTheme(options?.colors, options?.theme)
23
+ theme,
24
+ descriptionTheme: extendHelpTheme(theme, options?.colors, options?.descriptionTheme)
23
25
  };
24
26
  }
25
27
  /**
@@ -103,12 +105,13 @@ function formatStdinAnnotation(stdin) {
103
105
  * annotations.
104
106
  *
105
107
  * @param schema - The {@link FlagSchema} to describe.
106
- * @param theme - Theme applied to the metadata annotations (description stays plain).
108
+ * @param theme - Theme applied to the metadata annotations.
109
+ * @param descriptionTheme - Theme passed to a function-form description.
107
110
  * @returns Concatenated description string with metadata annotations.
108
111
  */
109
- function formatFlagDescription(schema, theme) {
112
+ function formatFlagDescription(schema, theme, descriptionTheme) {
110
113
  const parts = [];
111
- if (schema.description !== void 0) parts.push(schema.description);
114
+ if (schema.description !== void 0) parts.push(resolveHelpDescription(schema.description, descriptionTheme));
112
115
  if (schema.deprecated !== void 0) parts.push(theme.deprecated(formatDeprecated(schema.deprecated)));
113
116
  if (schema.stdin !== void 0) parts.push(theme.annotation(formatStdinAnnotation(schema.stdin)));
114
117
  if (schema.envVar !== void 0) parts.push(theme.annotation(`[env: ${schema.envVar}]`));
@@ -157,7 +160,7 @@ function buildFlagEntries(flags, opts) {
157
160
  if (schema === void 0) continue;
158
161
  entries.push({
159
162
  left: formatFlagLeft(name, schema, opts.theme),
160
- description: formatFlagDescription(schema, opts.theme)
163
+ description: formatFlagDescription(schema, opts.theme, opts.descriptionTheme)
161
164
  });
162
165
  }
163
166
  return entries;
@@ -180,12 +183,13 @@ function formatArgUsage(entry) {
180
183
  * annotations.
181
184
  *
182
185
  * @param schema - The {@link ArgSchema} to describe.
183
- * @param theme - Theme applied to the metadata annotations (description stays plain).
186
+ * @param theme - Theme applied to the metadata annotations.
187
+ * @param descriptionTheme - Theme passed to a function-form description.
184
188
  * @returns Concatenated description string with metadata annotations.
185
189
  */
186
- function formatArgDescription(schema, theme) {
190
+ function formatArgDescription(schema, theme, descriptionTheme) {
187
191
  const parts = [];
188
- if (schema.description !== void 0) parts.push(schema.description);
192
+ if (schema.description !== void 0) parts.push(resolveHelpDescription(schema.description, descriptionTheme));
189
193
  if (schema.deprecated !== void 0) parts.push(theme.deprecated(formatDeprecated(schema.deprecated)));
190
194
  if (schema.stdin !== void 0) parts.push(theme.annotation(formatStdinAnnotation(schema.stdin)));
191
195
  if (schema.envVar !== void 0) parts.push(theme.annotation(`[env: ${schema.envVar}]`));
@@ -280,7 +284,7 @@ function formatArgsSection(args, opts) {
280
284
  const entries = [];
281
285
  for (const entry of args) {
282
286
  const left = ` ${theme.arg(formatArgUsage(entry))}`;
283
- const desc = formatArgDescription(entry.schema, theme);
287
+ const desc = formatArgDescription(entry.schema, theme, opts.descriptionTheme);
284
288
  entries.push({
285
289
  left,
286
290
  desc
@@ -35,6 +35,11 @@ interface HelpTheme {
35
35
  /** The `$` prompt marker in `Examples:`. */
36
36
  readonly examplePrompt: Formatter;
37
37
  }
38
+ /**
39
+ * Help description text, either literal or resolved against the effective
40
+ * description theme at render time.
41
+ */
42
+ type HelpDescription = string | ((theme: HelpTheme) => string);
38
43
  /**
39
44
  * User theme customization: receives the gated palette and returns role
40
45
  * overrides merged over the default theme.
@@ -44,5 +49,38 @@ interface HelpTheme {
44
49
  * unconditionally, gating is the framework's job.
45
50
  */
46
51
  type HelpThemeFactory = (colors: Colors) => Partial<HelpTheme>;
52
+ /**
53
+ * The built-in help theme (clap/cargo conventions).
54
+ *
55
+ * @param c - Palette to build formatters from (typically the gated `out.color`).
56
+ * @internal
57
+ */
58
+ declare function defaultHelpTheme(c: Colors): HelpTheme;
59
+ /**
60
+ * Resolve the effective help theme from a palette and optional user factory.
61
+ *
62
+ * When the palette renders no styling (color disabled — its formatters are
63
+ * identity functions), the user factory is **never invoked**: even a factory
64
+ * that emits raw escapes cannot leak them into color-off output. When color
65
+ * is enabled, factory overrides merge over {@linkcode defaultHelpTheme}.
66
+ *
67
+ * @param colors - Gated palette, or `undefined` for a color-off theme.
68
+ * @param theme - Optional user overrides factory.
69
+ * @internal
70
+ */
71
+ declare function resolveHelpTheme(colors: Colors | undefined, theme: HelpThemeFactory | undefined): HelpTheme;
72
+ /**
73
+ * Merge a scoped theme factory over an already-resolved help theme.
74
+ *
75
+ * The scoped factory follows the same color gate as the global factory and is
76
+ * never invoked when the palette is disabled.
77
+ *
78
+ * @internal
79
+ */
80
+ declare function extendHelpTheme(theme: HelpTheme, colors: Colors | undefined, override: HelpThemeFactory | undefined): HelpTheme;
81
+ /** Resolve literal or function-form help description text. @internal */
82
+ declare function resolveHelpDescription(description: HelpDescription, theme: HelpTheme): string;
83
+ /** Resolve a help description with identity formatters for non-TTY output. @internal */
84
+ declare function resolvePlainHelpDescription(description: HelpDescription): string;
47
85
  //#endregion
48
- export type { HelpTheme, HelpThemeFactory };
86
+ export { type HelpDescription, type HelpTheme, type HelpThemeFactory, defaultHelpTheme, extendHelpTheme, resolveHelpDescription, resolveHelpTheme, resolvePlainHelpDescription };
@@ -42,5 +42,28 @@ function resolveHelpTheme(colors, theme) {
42
42
  ...theme(palette)
43
43
  };
44
44
  }
45
+ /**
46
+ * Merge a scoped theme factory over an already-resolved help theme.
47
+ *
48
+ * The scoped factory follows the same color gate as the global factory and is
49
+ * never invoked when the palette is disabled.
50
+ *
51
+ * @internal
52
+ */
53
+ function extendHelpTheme(theme, colors, override) {
54
+ const palette = colors ?? createColors(false);
55
+ return palette.bold("x") !== "x" && override !== void 0 ? {
56
+ ...theme,
57
+ ...override(palette)
58
+ } : theme;
59
+ }
60
+ /** Resolve literal or function-form help description text. @internal */
61
+ function resolveHelpDescription(description, theme) {
62
+ return typeof description === "function" ? description(theme) : description;
63
+ }
64
+ /** Resolve a help description with identity formatters for non-TTY output. @internal */
65
+ function resolvePlainHelpDescription(description) {
66
+ return resolveHelpDescription(description, defaultHelpTheme(createColors(false)));
67
+ }
45
68
  //#endregion
46
- export { defaultHelpTheme, resolveHelpTheme };
69
+ export { defaultHelpTheme, extendHelpTheme, resolveHelpDescription, resolveHelpTheme, resolvePlainHelpDescription };