@kjanat/dreamcli 4.0.0-rc.2 → 4.0.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 (629) hide show
  1. package/README.md +5 -7
  2. package/dist/{runtime/adapter.d.mts → adapter-D0hbBNVB.d.mts} +5 -7
  3. package/dist/completion-D4mz6axB.mjs +6 -0
  4. package/dist/completion.d.mts +90 -0
  5. package/dist/completion.mjs +1 -0
  6. package/dist/config-B9ddC-Kb.mjs +1 -0
  7. package/dist/config.d.mts +2 -0
  8. package/dist/config.mjs +1 -0
  9. package/dist/core-Cp2w8vRq.mjs +17 -0
  10. package/dist/index-BziI2aKc.d.mts +5440 -0
  11. package/dist/index-DOfClfYR.d.mts +370 -0
  12. package/dist/index-DWsnGZlx.d.mts +831 -0
  13. package/dist/{core/cli/index.d.mts → index-DXROeDPC.d.mts} +149 -25
  14. package/dist/index-DndPmT8J.d.mts +275 -0
  15. package/dist/{core/json-schema/index.d.mts → index-DyoaS234.d.mts} +54 -45
  16. package/dist/index.d.mts +190 -41
  17. package/dist/index.mjs +1 -26
  18. package/dist/json-schema-C9SzZ7jY.mjs +52 -0
  19. package/dist/json-schema.d.mts +2 -0
  20. package/dist/json-schema.mjs +1 -0
  21. package/dist/package-json-BgE9YjjQ.mjs +3 -0
  22. package/dist/prompt.d.mts +48 -0
  23. package/dist/prompt.mjs +1 -0
  24. package/dist/rolldown-runtime-G4Kt5YOX.mjs +1 -0
  25. package/dist/runtime.d.mts +2 -6
  26. package/dist/runtime.mjs +1 -6
  27. package/dist/terminal-C8KTXjv5.mjs +6 -0
  28. package/dist/test-prompter-v__jT2yG.mjs +1 -0
  29. package/dist/testkit.d.mts +54 -6
  30. package/dist/testkit.mjs +1 -5
  31. package/dist/version.d.mts +16 -4
  32. package/dist/version.mjs +1 -7
  33. package/dreamcli.schema.json +697 -538
  34. package/package.json +37 -12
  35. package/skills/cli-creation/SKILL.md +16 -11
  36. package/CHANGELOG.md +0 -2453
  37. package/dist/core/cli/builtins.d.mts +0 -47
  38. package/dist/core/cli/builtins.mjs +0 -135
  39. package/dist/core/cli/compiled.d.mts +0 -29
  40. package/dist/core/cli/compiled.mjs +0 -76
  41. package/dist/core/cli/dispatch.d.mts +0 -38
  42. package/dist/core/cli/dispatch.mjs +0 -205
  43. package/dist/core/cli/help-links.d.mts +0 -15
  44. package/dist/core/cli/help-links.mjs +0 -41
  45. package/dist/core/cli/index.mjs +0 -1265
  46. package/dist/core/cli/planner.d.mts +0 -96
  47. package/dist/core/cli/planner.mjs +0 -323
  48. package/dist/core/cli/plugin.d.mts +0 -94
  49. package/dist/core/cli/plugin.mjs +0 -41
  50. package/dist/core/cli/propagate.d.mts +0 -39
  51. package/dist/core/cli/propagate.mjs +0 -57
  52. package/dist/core/cli/reserved-flags.d.mts +0 -1
  53. package/dist/core/cli/reserved-flags.mjs +0 -158
  54. package/dist/core/cli/root-help.d.mts +0 -1
  55. package/dist/core/cli/root-help.mjs +0 -221
  56. package/dist/core/cli/root-output-flags.d.mts +0 -1
  57. package/dist/core/cli/root-output-flags.mjs +0 -169
  58. package/dist/core/cli/root-surface.d.mts +0 -1
  59. package/dist/core/cli/root-surface.mjs +0 -28
  60. package/dist/core/cli/runtime-preflight.d.mts +0 -1
  61. package/dist/core/cli/runtime-preflight.mjs +0 -221
  62. package/dist/core/completion/index.d.mts +0 -76
  63. package/dist/core/completion/index.mjs +0 -90
  64. package/dist/core/completion/shells/bash.d.mts +0 -22
  65. package/dist/core/completion/shells/bash.mjs +0 -309
  66. package/dist/core/completion/shells/fish.d.mts +0 -18
  67. package/dist/core/completion/shells/fish.mjs +0 -163
  68. package/dist/core/completion/shells/powershell.d.mts +0 -12
  69. package/dist/core/completion/shells/powershell.mjs +0 -359
  70. package/dist/core/completion/shells/shared.d.mts +0 -49
  71. package/dist/core/completion/shells/shared.mjs +0 -147
  72. package/dist/core/completion/shells/zsh.d.mts +0 -22
  73. package/dist/core/completion/shells/zsh.mjs +0 -252
  74. package/dist/core/config/index.d.mts +0 -191
  75. package/dist/core/config/index.mjs +0 -285
  76. package/dist/core/config/package-json.d.mts +0 -179
  77. package/dist/core/config/package-json.mjs +0 -353
  78. package/dist/core/errors/index.d.mts +0 -126
  79. package/dist/core/errors/index.mjs +0 -87
  80. package/dist/core/execution/index.d.mts +0 -1
  81. package/dist/core/execution/index.mjs +0 -220
  82. package/dist/core/help/ansi.d.mts +0 -73
  83. package/dist/core/help/ansi.mjs +0 -121
  84. package/dist/core/help/index.d.mts +0 -110
  85. package/dist/core/help/index.mjs +0 -414
  86. package/dist/core/help/theme.d.mts +0 -48
  87. package/dist/core/help/theme.mjs +0 -46
  88. package/dist/core/json-schema/index.mjs +0 -1007
  89. package/dist/core/json-schema/meta-descriptions.generated.d.mts +0 -274
  90. package/dist/core/json-schema/meta-descriptions.generated.mjs +0 -136
  91. package/dist/core/output/activity.d.mts +0 -1
  92. package/dist/core/output/activity.mjs +0 -452
  93. package/dist/core/output/bind.d.mts +0 -1
  94. package/dist/core/output/bind.mjs +0 -56
  95. package/dist/core/output/contracts.d.mts +0 -81
  96. package/dist/core/output/contracts.mjs +0 -57
  97. package/dist/core/output/display-value.d.mts +0 -1
  98. package/dist/core/output/display-value.mjs +0 -32
  99. package/dist/core/output/index.d.mts +0 -160
  100. package/dist/core/output/index.mjs +0 -512
  101. package/dist/core/output/renderers.d.mts +0 -1
  102. package/dist/core/output/renderers.mjs +0 -46
  103. package/dist/core/output/writer.d.mts +0 -39
  104. package/dist/core/output/writer.mjs +0 -12
  105. package/dist/core/parse/index.d.mts +0 -178
  106. package/dist/core/parse/index.mjs +0 -850
  107. package/dist/core/parse/occurrences.d.mts +0 -89
  108. package/dist/core/parse/occurrences.mjs +0 -114
  109. package/dist/core/prompt/index.d.mts +0 -213
  110. package/dist/core/prompt/index.mjs +0 -348
  111. package/dist/core/read-flags/index.d.mts +0 -150
  112. package/dist/core/read-flags/index.mjs +0 -217
  113. package/dist/core/resolve/args.d.mts +0 -39
  114. package/dist/core/resolve/args.mjs +0 -182
  115. package/dist/core/resolve/coerce.d.mts +0 -79
  116. package/dist/core/resolve/coerce.mjs +0 -900
  117. package/dist/core/resolve/config.d.mts +0 -1
  118. package/dist/core/resolve/config.mjs +0 -19
  119. package/dist/core/resolve/contracts.d.mts +0 -145
  120. package/dist/core/resolve/errors.d.mts +0 -10
  121. package/dist/core/resolve/errors.mjs +0 -148
  122. package/dist/core/resolve/flags.d.mts +0 -47
  123. package/dist/core/resolve/flags.mjs +0 -246
  124. package/dist/core/resolve/index.d.mts +0 -44
  125. package/dist/core/resolve/index.mjs +0 -123
  126. package/dist/core/resolve/path-checks.d.mts +0 -47
  127. package/dist/core/resolve/path-checks.mjs +0 -102
  128. package/dist/core/resolve/redaction.d.mts +0 -12
  129. package/dist/core/resolve/redaction.mjs +0 -14
  130. package/dist/core/resolve/stages.d.mts +0 -85
  131. package/dist/core/resolve/stages.mjs +0 -170
  132. package/dist/core/resolve/standard.d.mts +0 -1
  133. package/dist/core/resolve/standard.mjs +0 -212
  134. package/dist/core/schema/activity.d.mts +0 -189
  135. package/dist/core/schema/arg.d.mts +0 -1451
  136. package/dist/core/schema/arg.mjs +0 -1139
  137. package/dist/core/schema/brand.d.mts +0 -17
  138. package/dist/core/schema/cardinality.d.mts +0 -301
  139. package/dist/core/schema/cardinality.mjs +0 -514
  140. package/dist/core/schema/command.d.mts +0 -1086
  141. package/dist/core/schema/command.mjs +0 -999
  142. package/dist/core/schema/flag.d.mts +0 -1487
  143. package/dist/core/schema/flag.mjs +0 -1207
  144. package/dist/core/schema/index.d.mts +0 -15
  145. package/dist/core/schema/index.mjs +0 -10
  146. package/dist/core/schema/middleware.d.mts +0 -126
  147. package/dist/core/schema/middleware.mjs +0 -41
  148. package/dist/core/schema/number-constraints.d.mts +0 -96
  149. package/dist/core/schema/number-constraints.mjs +0 -60
  150. package/dist/core/schema/prompt.d.mts +0 -135
  151. package/dist/core/schema/provenance.d.mts +0 -99
  152. package/dist/core/schema/provenance.mjs +0 -28
  153. package/dist/core/schema/run.d.mts +0 -161
  154. package/dist/core/schema/source.d.mts +0 -179
  155. package/dist/core/schema/source.mjs +0 -206
  156. package/dist/core/schema/standard.d.mts +0 -93
  157. package/dist/core/schema/standard.mjs +0 -15
  158. package/dist/core/schema/stdin.d.mts +0 -87
  159. package/dist/core/schema/stdin.mjs +0 -91
  160. package/dist/core/schema/string-constraints.d.mts +0 -108
  161. package/dist/core/schema/string-constraints.mjs +0 -86
  162. package/dist/core/schema/value-parsers.d.mts +0 -150
  163. package/dist/core/schema/value-parsers.mjs +0 -160
  164. package/dist/core/schema/value.d.mts +0 -242
  165. package/dist/core/schema/value.mjs +0 -573
  166. package/dist/core/testkit/index.d.mts +0 -56
  167. package/dist/core/testkit/index.mjs +0 -102
  168. package/dist/runtime/adapter.mjs +0 -92
  169. package/dist/runtime/auto.d.mts +0 -25
  170. package/dist/runtime/auto.mjs +0 -45
  171. package/dist/runtime/deno.d.mts +0 -99
  172. package/dist/runtime/deno.mjs +0 -265
  173. package/dist/runtime/detect.d.mts +0 -86
  174. package/dist/runtime/detect.mjs +0 -45
  175. package/dist/runtime/index.d.mts +0 -6
  176. package/dist/runtime/node.d.mts +0 -71
  177. package/dist/runtime/node.mjs +0 -228
  178. package/dist/runtime/paths.d.mts +0 -1
  179. package/dist/runtime/paths.mjs +0 -48
  180. package/dist/strings.d.mts +0 -12
  181. package/dist/strings.mjs +0 -22
  182. package/examples/basic.ts +0 -37
  183. package/examples/flag-types.ts +0 -79
  184. package/examples/gh/node_modules/typescript/LICENSE +0 -55
  185. package/examples/gh/node_modules/typescript/NOTICE.txt +0 -436
  186. package/examples/gh/node_modules/typescript/README.md +0 -49
  187. package/examples/gh/node_modules/typescript/bin/tsc +0 -2
  188. package/examples/gh/node_modules/typescript/dist/api/async/api.d.ts +0 -529
  189. package/examples/gh/node_modules/typescript/dist/api/async/api.d.ts.map +0 -1
  190. package/examples/gh/node_modules/typescript/dist/api/async/api.js +0 -1657
  191. package/examples/gh/node_modules/typescript/dist/api/async/api.js.map +0 -1
  192. package/examples/gh/node_modules/typescript/dist/api/async/client.d.ts +0 -39
  193. package/examples/gh/node_modules/typescript/dist/api/async/client.d.ts.map +0 -1
  194. package/examples/gh/node_modules/typescript/dist/api/async/client.js +0 -211
  195. package/examples/gh/node_modules/typescript/dist/api/async/client.js.map +0 -1
  196. package/examples/gh/node_modules/typescript/dist/api/async/types.d.ts +0 -310
  197. package/examples/gh/node_modules/typescript/dist/api/async/types.d.ts.map +0 -1
  198. package/examples/gh/node_modules/typescript/dist/api/async/types.js +0 -2
  199. package/examples/gh/node_modules/typescript/dist/api/async/types.js.map +0 -1
  200. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.d.ts +0 -109
  201. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.d.ts.map +0 -1
  202. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.js +0 -2
  203. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.js.map +0 -1
  204. package/examples/gh/node_modules/typescript/dist/api/fs.d.ts +0 -23
  205. package/examples/gh/node_modules/typescript/dist/api/fs.d.ts.map +0 -1
  206. package/examples/gh/node_modules/typescript/dist/api/fs.js +0 -109
  207. package/examples/gh/node_modules/typescript/dist/api/fs.js.map +0 -1
  208. package/examples/gh/node_modules/typescript/dist/api/node/encoder.d.ts +0 -15
  209. package/examples/gh/node_modules/typescript/dist/api/node/encoder.d.ts.map +0 -1
  210. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.d.ts +0 -5
  211. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.d.ts.map +0 -1
  212. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.js +0 -74
  213. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.js.map +0 -1
  214. package/examples/gh/node_modules/typescript/dist/api/node/encoder.js +0 -287
  215. package/examples/gh/node_modules/typescript/dist/api/node/encoder.js.map +0 -1
  216. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.d.ts +0 -32
  217. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.d.ts.map +0 -1
  218. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.js +0 -213
  219. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.js.map +0 -1
  220. package/examples/gh/node_modules/typescript/dist/api/node/node.d.ts +0 -76
  221. package/examples/gh/node_modules/typescript/dist/api/node/node.d.ts.map +0 -1
  222. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.d.ts +0 -182
  223. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.d.ts.map +0 -1
  224. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.js +0 -835
  225. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.js.map +0 -1
  226. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.d.ts +0 -62
  227. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map +0 -1
  228. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.js +0 -122
  229. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.js.map +0 -1
  230. package/examples/gh/node_modules/typescript/dist/api/node/node.js +0 -298
  231. package/examples/gh/node_modules/typescript/dist/api/node/node.js.map +0 -1
  232. package/examples/gh/node_modules/typescript/dist/api/node/protocol.d.ts +0 -29
  233. package/examples/gh/node_modules/typescript/dist/api/node/protocol.d.ts.map +0 -1
  234. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.d.ts +0 -4
  235. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.d.ts.map +0 -1
  236. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.js +0 -241
  237. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.js.map +0 -1
  238. package/examples/gh/node_modules/typescript/dist/api/node/protocol.js +0 -30
  239. package/examples/gh/node_modules/typescript/dist/api/node/protocol.js.map +0 -1
  240. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.d.ts +0 -6
  241. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.d.ts.map +0 -1
  242. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.js +0 -61
  243. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.js.map +0 -1
  244. package/examples/gh/node_modules/typescript/dist/api/options.d.ts +0 -32
  245. package/examples/gh/node_modules/typescript/dist/api/options.d.ts.map +0 -1
  246. package/examples/gh/node_modules/typescript/dist/api/options.js +0 -11
  247. package/examples/gh/node_modules/typescript/dist/api/options.js.map +0 -1
  248. package/examples/gh/node_modules/typescript/dist/api/path.d.ts +0 -110
  249. package/examples/gh/node_modules/typescript/dist/api/path.d.ts.map +0 -1
  250. package/examples/gh/node_modules/typescript/dist/api/path.js +0 -508
  251. package/examples/gh/node_modules/typescript/dist/api/path.js.map +0 -1
  252. package/examples/gh/node_modules/typescript/dist/api/proto.d.ts +0 -239
  253. package/examples/gh/node_modules/typescript/dist/api/proto.d.ts.map +0 -1
  254. package/examples/gh/node_modules/typescript/dist/api/proto.js +0 -37
  255. package/examples/gh/node_modules/typescript/dist/api/proto.js.map +0 -1
  256. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.d.ts +0 -79
  257. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.d.ts.map +0 -1
  258. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.js +0 -169
  259. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.js.map +0 -1
  260. package/examples/gh/node_modules/typescript/dist/api/sync/api.d.ts +0 -529
  261. package/examples/gh/node_modules/typescript/dist/api/sync/api.d.ts.map +0 -1
  262. package/examples/gh/node_modules/typescript/dist/api/sync/api.js +0 -1665
  263. package/examples/gh/node_modules/typescript/dist/api/sync/api.js.map +0 -1
  264. package/examples/gh/node_modules/typescript/dist/api/sync/client.d.ts +0 -30
  265. package/examples/gh/node_modules/typescript/dist/api/sync/client.d.ts.map +0 -1
  266. package/examples/gh/node_modules/typescript/dist/api/sync/client.js +0 -124
  267. package/examples/gh/node_modules/typescript/dist/api/sync/client.js.map +0 -1
  268. package/examples/gh/node_modules/typescript/dist/api/sync/types.d.ts +0 -310
  269. package/examples/gh/node_modules/typescript/dist/api/sync/types.d.ts.map +0 -1
  270. package/examples/gh/node_modules/typescript/dist/api/sync/types.js +0 -2
  271. package/examples/gh/node_modules/typescript/dist/api/sync/types.js.map +0 -1
  272. package/examples/gh/node_modules/typescript/dist/api/syncChannel.d.ts +0 -114
  273. package/examples/gh/node_modules/typescript/dist/api/syncChannel.d.ts.map +0 -1
  274. package/examples/gh/node_modules/typescript/dist/api/syncChannel.js +0 -508
  275. package/examples/gh/node_modules/typescript/dist/api/syncChannel.js.map +0 -1
  276. package/examples/gh/node_modules/typescript/dist/api/timing.d.ts +0 -175
  277. package/examples/gh/node_modules/typescript/dist/api/timing.d.ts.map +0 -1
  278. package/examples/gh/node_modules/typescript/dist/api/timing.js +0 -149
  279. package/examples/gh/node_modules/typescript/dist/api/timing.js.map +0 -1
  280. package/examples/gh/node_modules/typescript/dist/ast/ast.d.ts +0 -100
  281. package/examples/gh/node_modules/typescript/dist/ast/ast.d.ts.map +0 -1
  282. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.d.ts +0 -1161
  283. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.d.ts.map +0 -1
  284. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.js +0 -4
  285. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.js.map +0 -1
  286. package/examples/gh/node_modules/typescript/dist/ast/ast.js +0 -7
  287. package/examples/gh/node_modules/typescript/dist/ast/ast.js.map +0 -1
  288. package/examples/gh/node_modules/typescript/dist/ast/astnav.d.ts +0 -19
  289. package/examples/gh/node_modules/typescript/dist/ast/astnav.d.ts.map +0 -1
  290. package/examples/gh/node_modules/typescript/dist/ast/astnav.js +0 -596
  291. package/examples/gh/node_modules/typescript/dist/ast/astnav.js.map +0 -1
  292. package/examples/gh/node_modules/typescript/dist/ast/clone.d.ts +0 -16
  293. package/examples/gh/node_modules/typescript/dist/ast/clone.d.ts.map +0 -1
  294. package/examples/gh/node_modules/typescript/dist/ast/clone.js +0 -104
  295. package/examples/gh/node_modules/typescript/dist/ast/clone.js.map +0 -1
  296. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.d.ts +0 -520
  297. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.d.ts.map +0 -1
  298. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.js +0 -3057
  299. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.js.map +0 -1
  300. package/examples/gh/node_modules/typescript/dist/ast/index.d.ts +0 -20
  301. package/examples/gh/node_modules/typescript/dist/ast/index.d.ts.map +0 -1
  302. package/examples/gh/node_modules/typescript/dist/ast/index.js +0 -20
  303. package/examples/gh/node_modules/typescript/dist/ast/index.js.map +0 -1
  304. package/examples/gh/node_modules/typescript/dist/ast/is.d.ts +0 -35
  305. package/examples/gh/node_modules/typescript/dist/ast/is.d.ts.map +0 -1
  306. package/examples/gh/node_modules/typescript/dist/ast/is.generated.d.ts +0 -329
  307. package/examples/gh/node_modules/typescript/dist/ast/is.generated.d.ts.map +0 -1
  308. package/examples/gh/node_modules/typescript/dist/ast/is.generated.js +0 -1103
  309. package/examples/gh/node_modules/typescript/dist/ast/is.generated.js.map +0 -1
  310. package/examples/gh/node_modules/typescript/dist/ast/is.js +0 -233
  311. package/examples/gh/node_modules/typescript/dist/ast/is.js.map +0 -1
  312. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.d.ts +0 -11
  313. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.d.ts.map +0 -1
  314. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.js +0 -202
  315. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.js.map +0 -1
  316. package/examples/gh/node_modules/typescript/dist/ast/scanner.d.ts +0 -97
  317. package/examples/gh/node_modules/typescript/dist/ast/scanner.d.ts.map +0 -1
  318. package/examples/gh/node_modules/typescript/dist/ast/scanner.js +0 -2230
  319. package/examples/gh/node_modules/typescript/dist/ast/scanner.js.map +0 -1
  320. package/examples/gh/node_modules/typescript/dist/ast/utils.d.ts +0 -17
  321. package/examples/gh/node_modules/typescript/dist/ast/utils.d.ts.map +0 -1
  322. package/examples/gh/node_modules/typescript/dist/ast/utils.js +0 -67
  323. package/examples/gh/node_modules/typescript/dist/ast/utils.js.map +0 -1
  324. package/examples/gh/node_modules/typescript/dist/ast/visitor.d.ts +0 -14
  325. package/examples/gh/node_modules/typescript/dist/ast/visitor.d.ts.map +0 -1
  326. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.d.ts +0 -50
  327. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.d.ts.map +0 -1
  328. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.js +0 -978
  329. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.js.map +0 -1
  330. package/examples/gh/node_modules/typescript/dist/ast/visitor.js +0 -47
  331. package/examples/gh/node_modules/typescript/dist/ast/visitor.js.map +0 -1
  332. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.d.ts +0 -2
  333. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.d.ts.map +0 -1
  334. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.d.ts +0 -129
  335. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map +0 -1
  336. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.js +0 -132
  337. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.js.map +0 -1
  338. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.js +0 -130
  339. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.js.map +0 -1
  340. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.d.ts +0 -2
  341. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map +0 -1
  342. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts +0 -5
  343. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map +0 -1
  344. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.js +0 -6
  345. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map +0 -1
  346. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.js +0 -6
  347. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.js.map +0 -1
  348. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.d.ts +0 -2
  349. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.d.ts.map +0 -1
  350. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts +0 -28
  351. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map +0 -1
  352. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.js +0 -30
  353. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.js.map +0 -1
  354. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.js +0 -30
  355. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.js.map +0 -1
  356. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.d.ts +0 -2
  357. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map +0 -1
  358. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts +0 -7
  359. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map +0 -1
  360. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.js +0 -9
  361. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map +0 -1
  362. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.js +0 -9
  363. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.js.map +0 -1
  364. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.d.ts +0 -2
  365. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.d.ts.map +0 -1
  366. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.d.ts +0 -12
  367. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map +0 -1
  368. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.js +0 -14
  369. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.js.map +0 -1
  370. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.js +0 -14
  371. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.js.map +0 -1
  372. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.d.ts +0 -2
  373. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.d.ts.map +0 -1
  374. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts +0 -23
  375. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map +0 -1
  376. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.js +0 -25
  377. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.js.map +0 -1
  378. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.js +0 -25
  379. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.js.map +0 -1
  380. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.d.ts +0 -2
  381. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.d.ts.map +0 -1
  382. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts +0 -9
  383. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map +0 -1
  384. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.js +0 -11
  385. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.js.map +0 -1
  386. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.js +0 -11
  387. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.js.map +0 -1
  388. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.d.ts +0 -2
  389. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.d.ts.map +0 -1
  390. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.d.ts +0 -5
  391. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map +0 -1
  392. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.js +0 -6
  393. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.js.map +0 -1
  394. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.js +0 -6
  395. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.js.map +0 -1
  396. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.d.ts +0 -2
  397. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.d.ts.map +0 -1
  398. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts +0 -42
  399. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map +0 -1
  400. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.js +0 -44
  401. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.js.map +0 -1
  402. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.js +0 -44
  403. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.js.map +0 -1
  404. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts +0 -2
  405. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map +0 -1
  406. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts +0 -7
  407. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map +0 -1
  408. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js +0 -9
  409. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map +0 -1
  410. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.js +0 -9
  411. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.js.map +0 -1
  412. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.d.ts +0 -2
  413. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.d.ts.map +0 -1
  414. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.d.ts +0 -17
  415. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map +0 -1
  416. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.js +0 -19
  417. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.js.map +0 -1
  418. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.js +0 -19
  419. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.js.map +0 -1
  420. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts +0 -2
  421. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map +0 -1
  422. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts +0 -9
  423. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map +0 -1
  424. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js +0 -11
  425. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map +0 -1
  426. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.js +0 -11
  427. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.js.map +0 -1
  428. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.d.ts +0 -2
  429. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.d.ts.map +0 -1
  430. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.d.ts +0 -6
  431. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map +0 -1
  432. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.js +0 -8
  433. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.js.map +0 -1
  434. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.js +0 -8
  435. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.js.map +0 -1
  436. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts +0 -2
  437. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map +0 -1
  438. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts +0 -36
  439. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map +0 -1
  440. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js +0 -38
  441. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map +0 -1
  442. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.js +0 -38
  443. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.js.map +0 -1
  444. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.d.ts +0 -2
  445. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.d.ts.map +0 -1
  446. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts +0 -44
  447. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map +0 -1
  448. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.js +0 -46
  449. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.js.map +0 -1
  450. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.js +0 -46
  451. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.js.map +0 -1
  452. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.d.ts +0 -2
  453. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.d.ts.map +0 -1
  454. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.d.ts +0 -50
  455. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map +0 -1
  456. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.js +0 -52
  457. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.js.map +0 -1
  458. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.js +0 -52
  459. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.js.map +0 -1
  460. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts +0 -2
  461. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map +0 -1
  462. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts +0 -16
  463. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map +0 -1
  464. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js +0 -18
  465. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map +0 -1
  466. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.js +0 -18
  467. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.js.map +0 -1
  468. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts +0 -2
  469. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map +0 -1
  470. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts +0 -13
  471. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map +0 -1
  472. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js +0 -14
  473. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map +0 -1
  474. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.js +0 -14
  475. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.js.map +0 -1
  476. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.d.ts +0 -2
  477. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.d.ts.map +0 -1
  478. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.d.ts +0 -11
  479. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map +0 -1
  480. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.js +0 -12
  481. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.js.map +0 -1
  482. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.js +0 -12
  483. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.js.map +0 -1
  484. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.d.ts +0 -2
  485. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.d.ts.map +0 -1
  486. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts +0 -17
  487. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map +0 -1
  488. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.js +0 -18
  489. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.js.map +0 -1
  490. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.js +0 -18
  491. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.js.map +0 -1
  492. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.d.ts +0 -2
  493. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.d.ts.map +0 -1
  494. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts +0 -15
  495. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map +0 -1
  496. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.js +0 -17
  497. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.js.map +0 -1
  498. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.js +0 -17
  499. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.js.map +0 -1
  500. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.d.ts +0 -2
  501. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.d.ts.map +0 -1
  502. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.d.ts +0 -5
  503. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map +0 -1
  504. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.js +0 -7
  505. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.js.map +0 -1
  506. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.js +0 -7
  507. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.js.map +0 -1
  508. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.d.ts +0 -2
  509. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.d.ts.map +0 -1
  510. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts +0 -71
  511. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map +0 -1
  512. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.js +0 -73
  513. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.js.map +0 -1
  514. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.js +0 -73
  515. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.js.map +0 -1
  516. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.d.ts +0 -2
  517. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.d.ts.map +0 -1
  518. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts +0 -389
  519. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map +0 -1
  520. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.js +0 -391
  521. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.js.map +0 -1
  522. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.js +0 -391
  523. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.js.map +0 -1
  524. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.d.ts +0 -2
  525. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.d.ts.map +0 -1
  526. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts +0 -30
  527. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map +0 -1
  528. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.js +0 -32
  529. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.js.map +0 -1
  530. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.js +0 -32
  531. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.js.map +0 -1
  532. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.d.ts +0 -2
  533. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.d.ts.map +0 -1
  534. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.d.ts +0 -76
  535. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map +0 -1
  536. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.js +0 -78
  537. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.js.map +0 -1
  538. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.js +0 -78
  539. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.js.map +0 -1
  540. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.d.ts +0 -2
  541. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.d.ts.map +0 -1
  542. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts +0 -7
  543. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map +0 -1
  544. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.js +0 -9
  545. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.js.map +0 -1
  546. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.js +0 -9
  547. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.js.map +0 -1
  548. package/examples/gh/node_modules/typescript/dist/internal/utils.d.ts +0 -23
  549. package/examples/gh/node_modules/typescript/dist/internal/utils.d.ts.map +0 -1
  550. package/examples/gh/node_modules/typescript/dist/internal/utils.js +0 -25
  551. package/examples/gh/node_modules/typescript/dist/internal/utils.js.map +0 -1
  552. package/examples/gh/node_modules/typescript/lib/getExePath.d.ts +0 -2
  553. package/examples/gh/node_modules/typescript/lib/getExePath.js +0 -70
  554. package/examples/gh/node_modules/typescript/lib/tsc.js +0 -28
  555. package/examples/gh/node_modules/typescript/lib/version.cjs +0 -3
  556. package/examples/gh/node_modules/typescript/lib/version.d.cts +0 -2
  557. package/examples/gh/node_modules/typescript/package.json +0 -87
  558. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/License.txt +0 -11
  559. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/README.md +0 -54
  560. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts +0 -17
  561. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js +0 -83
  562. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts +0 -22
  563. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js +0 -210
  564. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts +0 -14
  565. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js +0 -87
  566. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts +0 -32
  567. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js +0 -132
  568. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts +0 -367
  569. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js +0 -1271
  570. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts +0 -9
  571. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js +0 -16
  572. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts +0 -52
  573. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js +0 -70
  574. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts +0 -39
  575. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js +0 -135
  576. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts +0 -7
  577. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js +0 -34
  578. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts +0 -55
  579. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js +0 -412
  580. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts +0 -18
  581. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js +0 -155
  582. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts +0 -77
  583. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js +0 -246
  584. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts +0 -60
  585. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js +0 -157
  586. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts +0 -369
  587. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js +0 -436
  588. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts +0 -74
  589. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js +0 -23
  590. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts +0 -10
  591. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js +0 -74
  592. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts +0 -15
  593. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +0 -77
  594. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts +0 -58
  595. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js +0 -289
  596. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts +0 -12
  597. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js +0 -163
  598. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/package.json +0 -54
  599. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts +0 -5
  600. package/examples/gh/package.json +0 -45
  601. package/examples/gh/src/commands/auth.ts +0 -66
  602. package/examples/gh/src/commands/issue.ts +0 -120
  603. package/examples/gh/src/commands/pr.ts +0 -125
  604. package/examples/gh/src/data/issues.yaml +0 -5
  605. package/examples/gh/src/data/issues.yaml.d.ts +0 -17
  606. package/examples/gh/src/data/pull-requests.yaml +0 -7
  607. package/examples/gh/src/data/pull-requests.yaml.d.ts +0 -18
  608. package/examples/gh/src/docs.ts +0 -11
  609. package/examples/gh/src/lib/auth.ts +0 -37
  610. package/examples/gh/src/lib/utils.ts +0 -17
  611. package/examples/gh/src/main.test.ts +0 -307
  612. package/examples/gh/src/main.ts +0 -46
  613. package/examples/help-config.ts +0 -43
  614. package/examples/interactive.ts +0 -67
  615. package/examples/json-mode.ts +0 -95
  616. package/examples/middleware.ts +0 -71
  617. package/examples/multi-command.ts +0 -66
  618. package/examples/output-extras.ts +0 -46
  619. package/examples/parser-control.ts +0 -40
  620. package/examples/pwsh-demo/README.md +0 -40
  621. package/examples/pwsh-demo/package.json +0 -41
  622. package/examples/pwsh-demo/pwsh-demo.cmd +0 -3
  623. package/examples/pwsh-demo/smoke-powershell.ps1 +0 -218
  624. package/examples/pwsh-demo/src/main.test.ts +0 -45
  625. package/examples/pwsh-demo/src/main.ts +0 -140
  626. package/examples/spinner-progress.ts +0 -49
  627. package/examples/standard-schema.ts +0 -45
  628. package/examples/testing.ts +0 -147
  629. package/examples/transport-launcher.ts +0 -85
@@ -1,11 +1,30 @@
1
- import { NumberConstraints } from "../schema/number-constraints.mjs";
2
- import { PromptKind } from "../schema/prompt.mjs";
3
- import { DuplicatePolicy, FlagKind, FlagPresence } from "../schema/flag.mjs";
4
- import { DuplicateKeys } from "../schema/cardinality.mjs";
5
- import { ArgKind, ArgPresence } from "../schema/arg.mjs";
6
- import { CommandSchema, ExampleMeta } from "../schema/command.mjs";
7
- import "../schema/index.mjs";
8
- import { CLISchema } from "../cli/index.mjs";
1
+ import { Bt as FlagKind, Pn as NumberConstraints, Q as ArgKind, T as ExampleMeta, Ut as FlagPresence, b as CommandSchema, et as ArgPresence, jt as DuplicatePolicy, kn as PromptKind, vt as DuplicateKeys } from "./index-BziI2aKc.mjs";
2
+ import "./index-DWsnGZlx.mjs";
3
+ import { o as CLISchema } from "./index-DXROeDPC.mjs";
4
+ //#region src/core/json-schema/constants.d.ts
5
+ /**
6
+ * Identifiers of the definition document format.
7
+ *
8
+ * @module dreamcli/core/json-schema/constants
9
+ */
10
+ /**
11
+ * `$schema` URL for definition documents.
12
+ *
13
+ * Self-hosted. The `v1` segment is the definition format version, the value
14
+ * every document reports as `schemaVersion`, so it resolves for every package
15
+ * release that emits `schemaVersion: 1`. Two mirrors carry identical bytes:
16
+ * `./node_modules/@kjanat/dreamcli/dreamcli.schema.json` for offline or
17
+ * local-first workflows, and
18
+ * `https://cdn.jsdelivr.net/npm/@kjanat/dreamcli/dreamcli.schema.json` on the
19
+ * npm CDN.
20
+ */
21
+ declare const DEFINITION_SCHEMA_URL = "https://dreamcli.kjanat.dev/schemas/definition/v1.schema.json";
22
+ /**
23
+ * Version of the definition document format emitted by `generateSchema()`
24
+ * and `generateCommandSchema()` from `@kjanat/dreamcli/json-schema`.
25
+ */
26
+ declare const DEFINITION_SCHEMA_VERSION = 1;
27
+ //#endregion
9
28
  //#region src/core/json-schema/index.d.ts
10
29
  /**
11
30
  * Options for JSON Schema generation.
@@ -38,23 +57,6 @@ interface JsonSchemaOptions {
38
57
  */
39
58
  readonly includePrompts?: boolean;
40
59
  }
41
- /**
42
- * `$schema` URL for definition documents.
43
- *
44
- * Self-hosted. The `v1` segment is the definition format version, the value
45
- * every document reports as `schemaVersion`, so it resolves for every package
46
- * release that emits `schemaVersion: 1`. Two mirrors carry identical bytes:
47
- * `./node_modules/@kjanat/dreamcli/dreamcli.schema.json` for offline or
48
- * local-first workflows, and
49
- * `https://cdn.jsdelivr.net/npm/@kjanat/dreamcli/dreamcli.schema.json` on the
50
- * npm CDN.
51
- */
52
- declare const DEFINITION_SCHEMA_URL = "https://dreamcli.kjanat.dev/schemas/definition/v1.schema.json";
53
- /**
54
- * Version of the definition document format emitted by {@link generateSchema}
55
- * and {@link generateCommandSchema}.
56
- */
57
- declare const DEFINITION_SCHEMA_VERSION = 1;
58
60
  /**
59
61
  * A usage example inside a definition document.
60
62
  *
@@ -91,8 +93,8 @@ type PromptDefinitionFragmentV1 = {
91
93
  * mode, and the trimming without a reader having to know the builder's defaults.
92
94
  */
93
95
  type StdinBindingFragmentV1 = {
94
- readonly when: "dash" | "missing" | "dash-or-missing";
95
- readonly consume: "exclusive" | "broadcast";
96
+ readonly when: 'dash' | 'missing' | 'dash-or-missing';
97
+ readonly consume: 'exclusive' | 'broadcast';
96
98
  readonly trim: boolean;
97
99
  };
98
100
  /**
@@ -101,14 +103,14 @@ type StdinBindingFragmentV1 = {
101
103
  * A delimiter carries its own literal; every other format is named alone.
102
104
  */
103
105
  type SplitPolicyFragmentV1 = {
104
- readonly format: "whole";
106
+ readonly format: 'whole';
105
107
  } | {
106
- readonly format: "delimiter";
108
+ readonly format: 'delimiter';
107
109
  readonly delimiter: string;
108
110
  } | {
109
- readonly format: "lines";
111
+ readonly format: 'lines';
110
112
  } | {
111
- readonly format: "json";
113
+ readonly format: 'json';
112
114
  };
113
115
  /**
114
116
  * Non-CLI split policies of a collection fragment.
@@ -141,16 +143,11 @@ type FlagStringConstraintsFragmentV1 = {
141
143
  /** Filesystem expectations of a flag or arg fragment. */
142
144
  type FlagPathChecksFragmentV1 = {
143
145
  readonly mustExist: boolean;
144
- readonly type?: "file" | "directory";
146
+ readonly type?: 'file' | 'directory';
145
147
  readonly create?: true;
146
148
  };
147
- /**
148
- * A flag entry inside a definition document.
149
- *
150
- * Optional fields appear only when the flag sets them; `defaultValue` appears
151
- * only when the value survives a JSON round-trip.
152
- */
153
- type FlagDefinitionFragmentV1 = {
149
+ /** A collection flag's element fragment, excluding input-level metadata. */
150
+ type FlagElementFragmentV1 = {
154
151
  readonly kind: FlagKind;
155
152
  readonly presence: FlagPresence;
156
153
  readonly defaultValue?: unknown;
@@ -162,7 +159,7 @@ type FlagDefinitionFragmentV1 = {
162
159
  readonly enumValues?: readonly string[];
163
160
  readonly numberConstraints?: NumberConstraints;
164
161
  readonly stringConstraints?: FlagStringConstraintsFragmentV1;
165
- readonly elementSchema?: FlagDefinitionFragmentV1;
162
+ readonly elementSchema?: FlagElementFragmentV1;
166
163
  readonly separator?: string;
167
164
  readonly split?: SourceSplitFragmentV1;
168
165
  readonly duplicateKeys?: DuplicateKeys;
@@ -175,6 +172,16 @@ type FlagDefinitionFragmentV1 = {
175
172
  readonly negation?: FlagNegationFragmentV1;
176
173
  readonly duplicates?: DuplicatePolicy;
177
174
  };
175
+ /**
176
+ * A flag entry inside a definition document.
177
+ *
178
+ * Optional fields appear only when the flag sets them; `defaultValue` appears
179
+ * only for non-sensitive inputs when the value survives a JSON round-trip.
180
+ */
181
+ type FlagDefinitionFragmentV1 = FlagElementFragmentV1 & {
182
+ readonly defaultDescription?: string | false;
183
+ readonly sensitive?: true;
184
+ };
178
185
  /**
179
186
  * The supported value-axis fields of an entries arg's `elementSchema`.
180
187
  *
@@ -183,9 +190,9 @@ type FlagDefinitionFragmentV1 = {
183
190
  * another key-value layer.
184
191
  */
185
192
  type ArgElementFragmentV1 = {
186
- readonly kind: Exclude<ArgKind, "keyValue">;
193
+ readonly kind: Exclude<ArgKind, 'keyValue'>;
187
194
  /** Entry values are required once their containing key-value argument is present. */
188
- readonly presence: "required";
195
+ readonly presence: 'required';
189
196
  readonly enumValues?: readonly string[];
190
197
  readonly numberConstraints?: NumberConstraints;
191
198
  readonly stringConstraints?: FlagStringConstraintsFragmentV1;
@@ -204,6 +211,8 @@ type ArgDefinitionFragmentV1 = {
204
211
  readonly variadic?: true;
205
212
  readonly stdin?: StdinBindingFragmentV1;
206
213
  readonly defaultValue?: unknown;
214
+ readonly defaultDescription?: string | false;
215
+ readonly sensitive?: true;
207
216
  readonly description?: string;
208
217
  readonly envVar?: string;
209
218
  readonly configPath?: string;
@@ -278,7 +287,7 @@ type CommandDefinitionDocument = CommandDefinitionDocumentV1;
278
287
  type InputSchemaProperty = Readonly<Record<string, unknown>>;
279
288
  /** The JSON Schema object describing one command's flags and args. */
280
289
  type InputSchemaBranch = {
281
- readonly type: "object";
290
+ readonly type: 'object';
282
291
  readonly properties: Readonly<Record<string, InputSchemaProperty>>;
283
292
  readonly additionalProperties: false;
284
293
  readonly required?: readonly string[];
@@ -297,7 +306,7 @@ type InputSchemaDocument = ({
297
306
  readonly oneOf: readonly InputSchemaBranch[];
298
307
  } | {
299
308
  readonly $schema: string;
300
- readonly type: "object";
309
+ readonly type: 'object';
301
310
  };
302
311
  /**
303
312
  * Generate a definition metadata document describing the CLI's structure.
@@ -387,4 +396,4 @@ declare function generateInputSchema(schema: CLISchema | CommandSchema, options?
387
396
  */
388
397
  declare const definitionMetaSchema: Record<string, unknown>;
389
398
  //#endregion
390
- export { type ArgDefinitionFragmentV1, type ArgElementFragmentV1, type CommandDefinitionDocument, type CommandDefinitionDocumentV1, type CommandDefinitionFragmentV1, DEFINITION_SCHEMA_URL, DEFINITION_SCHEMA_VERSION, type DefinitionDocument, type DefinitionDocumentV1, type ExampleDefinitionFragmentV1, type FlagDefinitionFragmentV1, type FlagNegationFragmentV1, type FlagPathChecksFragmentV1, type FlagStringConstraintsFragmentV1, type InputSchemaBranch, type InputSchemaDocument, type InputSchemaProperty, type JsonSchemaOptions, type PromptChoiceFragmentV1, type PromptDefinitionFragmentV1, type SourceSplitFragmentV1, type SplitPolicyFragmentV1, type StdinBindingFragmentV1, definitionMetaSchema, generateCommandSchema, generateInputSchema, generateSchema };
399
+ export { definitionMetaSchema as C, DEFINITION_SCHEMA_URL as D, generateSchema as E, DEFINITION_SCHEMA_VERSION as O, StdinBindingFragmentV1 as S, generateInputSchema as T, JsonSchemaOptions as _, CommandDefinitionFragmentV1 as a, SourceSplitFragmentV1 as b, ExampleDefinitionFragmentV1 as c, FlagNegationFragmentV1 as d, FlagPathChecksFragmentV1 as f, InputSchemaProperty as g, InputSchemaDocument as h, CommandDefinitionDocumentV1 as i, FlagDefinitionFragmentV1 as l, InputSchemaBranch as m, ArgElementFragmentV1 as n, DefinitionDocument as o, FlagStringConstraintsFragmentV1 as p, CommandDefinitionDocument as r, DefinitionDocumentV1 as s, ArgDefinitionFragmentV1 as t, FlagElementFragmentV1 as u, PromptChoiceFragmentV1 as v, generateCommandSchema as w, SplitPolicyFragmentV1 as x, PromptDefinitionFragmentV1 as y };
package/dist/index.d.mts CHANGED
@@ -1,42 +1,191 @@
1
- import { BuiltinMode, BuiltinName, Builtins, BuiltinsConfig } from "./core/cli/builtins.mjs";
2
- import { Verbosity } from "./core/output/contracts.mjs";
3
- import { ActivityEvent, Fallback, ProgressHandle, ProgressOptions, SpinnerHandle, SpinnerOptions, TableColumn, TableFormat, TableOptions, TableStream } from "./core/schema/activity.mjs";
4
- import { NumberConstraintViolation, NumberConstraints } from "./core/schema/number-constraints.mjs";
5
- import { ConfirmPromptConfig, InputPromptConfig, MultiselectPromptConfig, PromptConfig, PromptConfigBase, PromptKind, PromptResult, SelectChoice, SelectPromptConfig } from "./core/schema/prompt.mjs";
6
- import { InferStandardInput, InferStandardOutput, StandardSchemaV1, StandardSchemaV1FailureResult, StandardSchemaV1Issue, StandardSchemaV1Options, StandardSchemaV1PathSegment, StandardSchemaV1Props, StandardSchemaV1Result, StandardSchemaV1SuccessResult, StandardSchemaV1Types } from "./core/schema/standard.mjs";
7
- import { StdinBinding, StdinConsume, StdinOptions, StdinWhen } from "./core/schema/stdin.mjs";
8
- import { StringConstraintViolation, StringConstraints } from "./core/schema/string-constraints.mjs";
9
- import { DateFlagOptions, PathChecks, PathFlagOptions, UrlFlagOptions } from "./core/schema/value-parsers.mjs";
10
- import { ArrayFlagDefinition, BooleanFlagDefinition, CountFlagDefinition, CustomFlagDefinition, DuplicatePolicy, EnumFlagDefinition, FlagBuilder, FlagConfig, FlagDefinition, FlagDefinitionBase, FlagDefinitionByKind, FlagDefinitionOverrides, FlagFactory, FlagKind, FlagNegation, FlagParseFn, FlagPresence, FlagSchema, InferFlag, InferFlags, KeyValueFlagDefinition, NumberFlagDefinition, ResolvedValue, StringElementConfig, StringFlagDefinition, WithPresence, WithoutElementEligibility, createFlagSchema, flag, getFlagNegatedName } from "./core/schema/flag.mjs";
11
- import { DUPLICATE_KEYS, DuplicateKeys, SPLIT_FORMATS, SourceSplitBinding, SplitBinding, SplitFormat, SplitOptions, SplitPolicy, SplitSetting } from "./core/schema/cardinality.mjs";
12
- import { ArgBuilder, ArgConfig, ArgDefaultValue, ArgDefinition, ArgDefinitionBase, ArgDefinitionByKind, ArgDefinitionOverrides, ArgFactory, ArgKind, ArgParseFn, ArgPresence, ArgSchema, BooleanArgDefinition, CustomArgDefinition, EnumArgDefinition, InferArg, InferArgs, KeyValueArgDefinition, NumberArgDefinition, ResolvedArgValue, StringArgDefinition, StringArgElementConfig, WithArgPresence, WithVariadic, WithoutArgElementEligibility, arg, createArgSchema } from "./core/schema/arg.mjs";
13
- import { Middleware, MiddlewareHandler, MiddlewareParams, middleware } from "./core/schema/middleware.mjs";
14
- import { InputSources, ResolutionProvenance, SourcesOf, wasExplicit } from "./core/schema/provenance.mjs";
15
- import { ActionHandler, ActionParams, CommandArgEntry, CommandArgEntryDefinition, CommandBuilder, CommandDefinition, CommandExample, CommandMeta, CommandSchema, DeriveHandler, DeriveParams, ExampleCommand, ExampleMeta, InteractiveParams, InteractiveResolver, InteractiveResult, Out, command, createCommandSchema, group, resolveExampleCommand } from "./core/schema/command.mjs";
16
- import { CLIError, CLIErrorJSON, CLIErrorOptions, ErrorCode, ParseError, ParseErrorCode, ParseErrorOptions, ValidationError, ValidationErrorCode, ValidationErrorOptions, isCLIError, isParseError, isValidationError } from "./core/errors/index.mjs";
17
- import { HelpTheme, HelpThemeFactory } from "./core/help/theme.mjs";
18
- import { osc8, visibleWidth } from "./core/help/ansi.mjs";
19
- import { HelpOptions, formatHelp } from "./core/help/index.mjs";
20
- import { WriteFn } from "./core/output/writer.mjs";
21
- import { OutputOptions, createOutput } from "./core/output/index.mjs";
22
- import { PromptEngine, ReadFn, ResolvedMultiselectPromptConfig, ResolvedPromptConfig, ResolvedSelectPromptConfig, createTerminalPrompter, resolvePromptConfig } from "./core/prompt/index.mjs";
23
- import { RunResult } from "./core/schema/run.mjs";
24
- import "./core/schema/index.mjs";
25
- import { ParseOptions, ParseResult, Token, includesBeforeSeparator, parse, stripBeforeSeparator, tokenize } from "./core/parse/index.mjs";
26
- import { DeprecationWarning, ResolutionProvenanceRecord, ResolveOptions, ResolveResult } from "./core/resolve/contracts.mjs";
27
- import { resolve } from "./core/resolve/index.mjs";
28
- import { BeforeParseParams, CLIPlugin, CLIPluginHooks, PluginCommandContext, ResolvedCommandParams, plugin } from "./core/cli/plugin.mjs";
29
- import { HelpLinks } from "./core/cli/help-links.mjs";
30
- import { CompletionOptions } from "./core/completion/shells/shared.mjs";
31
- import { generateBashCompletion } from "./core/completion/shells/bash.mjs";
32
- import { generateFishCompletion } from "./core/completion/shells/fish.mjs";
33
- import { generatePowerShellCompletion } from "./core/completion/shells/powershell.mjs";
34
- import { generateZshCompletion } from "./core/completion/shells/zsh.mjs";
35
- import { SHELLS, Shell, generateCompletion } from "./core/completion/index.mjs";
36
- import { ManifestDiscoveryOptions, PackageJsonAdapter, PackageJsonData, PackageRepository, PackageRepositoryUrlOptions, discoverManifest, inferCliName, packageRepositoryUrl } from "./core/config/package-json.mjs";
37
- import { ConfigAdapter, ConfigDiscoveryOptions, ConfigDiscoveryResult, ConfigFound, ConfigNotFound, FormatLoader, buildConfigSearchPaths, configFormat, discoverConfig } from "./core/config/index.mjs";
38
- import { CLIBuilder, CLIDefinition, CLIExecuteOptions, CLIOptions, CLIRunOptions, CLISchema, CompletionsFlagConfig, ConfigSettings, ConfigSettingsDefinition, DefaultCommandOptions, HelpConfig, InferNameOption, ManifestSettings, RenderContext, RenderContextOptions, ResolvedManifestSettings, cli, createCLISchema, isMainModule, resolveRenderContext } from "./core/cli/index.mjs";
39
- import { ArgDefinitionFragmentV1, ArgElementFragmentV1, CommandDefinitionDocument, CommandDefinitionDocumentV1, CommandDefinitionFragmentV1, DEFINITION_SCHEMA_URL, DEFINITION_SCHEMA_VERSION, DefinitionDocument, DefinitionDocumentV1, ExampleDefinitionFragmentV1, FlagDefinitionFragmentV1, FlagNegationFragmentV1, FlagPathChecksFragmentV1, FlagStringConstraintsFragmentV1, InputSchemaBranch, InputSchemaDocument, InputSchemaProperty, JsonSchemaOptions, PromptChoiceFragmentV1, PromptDefinitionFragmentV1, SourceSplitFragmentV1, SplitPolicyFragmentV1, StdinBindingFragmentV1, definitionMetaSchema, generateCommandSchema, generateInputSchema, generateSchema } from "./core/json-schema/index.mjs";
40
- import { FlagMap, ReadFlagsOptions, readFlags } from "./core/read-flags/index.mjs";
1
+ import { $ as ArgParseFn, $t as WithoutElementEligibility, A as Out, An as PromptResult, At as DefaultValueOptions, B as MiddlewareHandler, Bn as ProgressHandle, Bt as FlagKind, Cn as StandardSchemaV1Types, Ct as SplitOptions, D as InteractiveParams, Dn as PromptConfig, Dt as BooleanFlagDefinition, En as MultiselectPromptConfig, Et as ArrayFlagDefinition, F as InputSources, Fn as HelpDescription, Ft as FlagDefinition, G as ArgConfig, Gn as TableFormat, Gt as InferFlag, H as middleware, Hn as SpinnerHandle, Ht as FlagParseFn, I as ResolutionProvenance, In as HelpTheme, It as FlagDefinitionBase, J as ArgDefinitionBase, Jt as NumberFlagDefinition, K as ArgDefaultValue, Kn as TableOptions, Kt as InferFlags, L as SourcesOf, Ln as HelpThemeFactory, Lt as FlagDefinitionByKind, M as createCommandSchema, Mn as SelectPromptConfig, Mt as EnumFlagDefinition, N as group, Nn as NumberConstraintViolation, Nt as FlagBuilder, O as InteractiveResolver, On as PromptConfigBase, Ot as CountFlagDefinition, P as resolveExampleCommand, Pn as NumberConstraints, Pt as FlagConfig, Q as ArgKind, Qt as WithPresence, R as wasExplicit, Rn as ActivityEvent, Rt as FlagDefinitionOverrides, S as DeriveParams, Sn as StandardSchemaV1SuccessResult, St as SplitFormat, T as ExampleMeta, Tn as InputPromptConfig, Tt as SplitSetting, U as Verbosity, Un as SpinnerOptions, Ut as FlagPresence, V as MiddlewareParams, Vn as ProgressOptions, Vt as FlagNegation, W as ArgBuilder, Wn as TableColumn, Wt as FlagSchema, X as ArgDefinitionOverrides, Xt as StringElementConfig, Y as ArgDefinitionByKind, Yt as ResolvedValue, Z as ArgFactory, Zt as StringFlagDefinition, _ as CommandDefinition, _n as StandardSchemaV1Issue, _t as DUPLICATE_KEYS, a as WriteFn, an as PathFlagOptions, at as InferArg, b as CommandSchema, bn as StandardSchemaV1Props, bt as SourceSplitBinding, c as ResolvedMultiselectPromptConfig, cn as StringConstraints, ct as NumberArgDefinition, d as resolvePromptConfig, dn as StdinOptions, dt as StringArgElementConfig, en as createFlagSchema, et as ArgPresence, f as ActionHandler, fn as StdinWhen, ft as WithArgPresence, g as CommandBuilder, gn as StandardSchemaV1FailureResult, gt as createArgSchema, h as CommandArgEntryDefinition, hn as StandardSchemaV1, ht as arg, i as createOutput, in as PathChecks, it as EnumArgDefinition, j as command, jn as SelectChoice, jt as DuplicatePolicy, k as InteractiveResult, kn as PromptKind, kt as CustomFlagDefinition, l as ResolvedPromptConfig, ln as StdinBinding, lt as ResolvedArgValue, m as CommandArgEntry, mn as InferStandardOutput, mt as WithoutArgElementEligibility, n as OutputOptions, nn as getFlagNegatedName, nt as BooleanArgDefinition, o as PromptEngine, on as UrlFlagOptions, ot as InferArgs, p as ActionParams, pn as InferStandardInput, pt as WithVariadic, q as ArgDefinition, qn as TableStream, qt as KeyValueFlagDefinition, rn as DateFlagOptions, rt as CustomArgDefinition, s as ReadFn, sn as StringConstraintViolation, st as KeyValueArgDefinition, tn as flag, tt as ArgSchema, u as ResolvedSelectPromptConfig, un as StdinConsume, ut as StringArgDefinition, v as CommandExample, vn as StandardSchemaV1Options, vt as DuplicateKeys, w as ExampleCommand, wn as ConfirmPromptConfig, wt as SplitPolicy, x as DeriveHandler, xn as StandardSchemaV1Result, xt as SplitBinding, y as CommandMeta, yn as StandardSchemaV1PathSegment, yt as SPLIT_FORMATS, z as Middleware, zn as Fallback, zt as FlagFactory } from "./index-BziI2aKc.mjs";
2
+ import { A as ErrorCode, B as BuiltinMode, C as includesBeforeSeparator, D as CLIError, E as tokenize, F as ValidationErrorCode, H as Builtins, I as ValidationErrorOptions, L as isCLIError, M as ParseErrorCode, N as ParseErrorOptions, O as CLIErrorJSON, P as ValidationError, R as isParseError, S as Token, T as stripBeforeSeparator, U as BuiltinsConfig, V as BuiltinName, _ as ResolutionProvenanceRecord, b as ParseOptions, c as formatHelp, d as CLIPluginHooks, f as PluginCommandContext, g as DeprecationWarning, h as resolve, j as ParseError, k as CLIErrorOptions, l as BeforeParseParams, m as plugin, n as RunResult, p as ResolvedCommandParams, s as HelpOptions, u as CLIPlugin, v as ResolveOptions, w as parse, x as ParseResult, y as ResolveResult, z as isValidationError } from "./index-DWsnGZlx.mjs";
3
+ import { C as SHELLS, S as HelpLinks, T as CompletionOptions, _ as ResolvedManifestSettings, a as CLIRunOptions, b as isMainModule, c as CompletionsFlagConfig, d as DefaultCommandOptions, f as HelpConfig, g as RenderContextOptions, h as RenderContext, i as CLIOptions, l as ConfigSettings, m as ManifestSettings, n as CLIDefinition, o as CLISchema, p as InferNameOption, r as CLIExecuteOptions, s as CompletionRegistrationOptions, t as CLIBuilder, u as ConfigSettingsDefinition, v as cli, w as Shell, x as resolveRenderContext, y as createCLISchema } from "./index-DXROeDPC.mjs";
4
+ import { n as RuntimeAdapter } from "./adapter-D0hbBNVB.mjs";
5
+ import { a as ConfigNotFound, d as PackageRepositoryUrlOptions, g as PackageRepository, h as PackageJsonData, i as ConfigFound, m as PackageJsonAdapter, n as ConfigDiscoveryOptions, o as ConfigSearchPathOptions, p as ManifestDiscoveryOptions, r as ConfigDiscoveryResult, s as FormatLoader, t as ConfigAdapter } from "./index-DOfClfYR.mjs";
6
+ import { D as DEFINITION_SCHEMA_URL, O as DEFINITION_SCHEMA_VERSION, S as StdinBindingFragmentV1, _ as JsonSchemaOptions, a as CommandDefinitionFragmentV1, b as SourceSplitFragmentV1, c as ExampleDefinitionFragmentV1, d as FlagNegationFragmentV1, f as FlagPathChecksFragmentV1, g as InputSchemaProperty, h as InputSchemaDocument, i as CommandDefinitionDocumentV1, l as FlagDefinitionFragmentV1, m as InputSchemaBranch, n as ArgElementFragmentV1, o as DefinitionDocument, p as FlagStringConstraintsFragmentV1, r as CommandDefinitionDocument, s as DefinitionDocumentV1, t as ArgDefinitionFragmentV1, u as FlagElementFragmentV1, v as PromptChoiceFragmentV1, x as SplitPolicyFragmentV1, y as PromptDefinitionFragmentV1 } from "./index-DyoaS234.mjs";
41
7
  import { Colors } from "ansispeck";
42
- export { type ActionHandler, type ActionParams, type ActivityEvent, ArgBuilder, type ArgConfig, type ArgDefaultValue, type ArgDefinition, type ArgDefinitionBase, type ArgDefinitionByKind, type ArgDefinitionFragmentV1, type ArgDefinitionOverrides, type ArgElementFragmentV1, type ArgFactory, type ArgKind, type ArgParseFn, type ArgPresence, type ArgSchema, type ArrayFlagDefinition, type BeforeParseParams, type BooleanArgDefinition, type BooleanFlagDefinition, type BuiltinMode, type BuiltinName, type Builtins, type BuiltinsConfig, CLIBuilder, type CLIDefinition, CLIError, type CLIErrorJSON, type CLIErrorOptions, type CLIExecuteOptions, type CLIOptions, type CLIPlugin, type CLIPluginHooks, type CLIRunOptions, type CLISchema, type Colors, type CommandArgEntry, type CommandArgEntryDefinition, CommandBuilder, type CommandDefinition, type CommandDefinitionDocument, type CommandDefinitionDocumentV1, type CommandDefinitionFragmentV1, type CommandExample, type CommandMeta, type CommandSchema, type CompletionOptions, type CompletionsFlagConfig, type ConfigAdapter, type ConfigDiscoveryOptions, type ConfigDiscoveryResult, type ConfigFound, type ConfigNotFound, type ConfigSettings, type ConfigSettingsDefinition, type ConfirmPromptConfig, type CountFlagDefinition, type CustomArgDefinition, type CustomFlagDefinition, DEFINITION_SCHEMA_URL, DEFINITION_SCHEMA_VERSION, DUPLICATE_KEYS, type DateFlagOptions, type DefaultCommandOptions, type DefinitionDocument, type DefinitionDocumentV1, type DeprecationWarning, type DeriveHandler, type DeriveParams, type DuplicateKeys, type DuplicatePolicy, type EnumArgDefinition, type EnumFlagDefinition, type ErrorCode, type ExampleCommand, type ExampleDefinitionFragmentV1, type ExampleMeta, type Fallback, FlagBuilder, type FlagConfig, type FlagDefinition, type FlagDefinitionBase, type FlagDefinitionByKind, type FlagDefinitionFragmentV1, type FlagDefinitionOverrides, type FlagFactory, type FlagKind, type FlagMap, type FlagNegation, type FlagNegationFragmentV1, type FlagParseFn, type FlagPathChecksFragmentV1, type FlagPresence, type FlagSchema, type FlagStringConstraintsFragmentV1, type FormatLoader, type HelpConfig, type HelpLinks, type HelpOptions, type HelpTheme, type HelpThemeFactory, type InferArg, type InferArgs, type InferFlag, type InferFlags, type InferNameOption, type InferStandardInput, type InferStandardOutput, type InputPromptConfig, type InputSchemaBranch, type InputSchemaDocument, type InputSchemaProperty, type InputSources, type InteractiveParams, type InteractiveResolver, type InteractiveResult, type JsonSchemaOptions, type KeyValueArgDefinition, type KeyValueFlagDefinition, type ManifestDiscoveryOptions, type ManifestSettings, type Middleware, type MiddlewareHandler, type MiddlewareParams, type MultiselectPromptConfig, type NumberArgDefinition, type NumberConstraintViolation, type NumberConstraints, type NumberFlagDefinition, type Out, type OutputOptions, type PackageJsonAdapter, type PackageJsonData, type PackageRepository, type PackageRepositoryUrlOptions, ParseError, type ParseErrorCode, type ParseErrorOptions, type ParseOptions, type ParseResult, type PathChecks, type PathFlagOptions, type PluginCommandContext, type ProgressHandle, type ProgressOptions, type PromptChoiceFragmentV1, type PromptConfig, type PromptConfigBase, type PromptDefinitionFragmentV1, type PromptEngine, type PromptKind, type PromptResult, type ReadFlagsOptions, type ReadFn, type RenderContext, type RenderContextOptions, type ResolutionProvenance, type ResolutionProvenanceRecord, type ResolveOptions, type ResolveResult, type ResolvedArgValue, type ResolvedCommandParams, type ResolvedManifestSettings, type ResolvedMultiselectPromptConfig, type ResolvedPromptConfig, type ResolvedSelectPromptConfig, type ResolvedValue, type RunResult, SHELLS, SPLIT_FORMATS, type SelectChoice, type SelectPromptConfig, type Shell, type SourceSplitBinding, type SourceSplitFragmentV1, type SourcesOf, type SpinnerHandle, type SpinnerOptions, type SplitBinding, type SplitFormat, type SplitOptions, type SplitPolicy, type SplitPolicyFragmentV1, type SplitSetting, type StandardSchemaV1, type StandardSchemaV1FailureResult, type StandardSchemaV1Issue, type StandardSchemaV1Options, type StandardSchemaV1PathSegment, type StandardSchemaV1Props, type StandardSchemaV1Result, type StandardSchemaV1SuccessResult, type StandardSchemaV1Types, type StdinBinding, type StdinBindingFragmentV1, type StdinConsume, type StdinOptions, type StdinWhen, type StringArgDefinition, type StringArgElementConfig, type StringConstraintViolation, type StringConstraints, type StringElementConfig, type StringFlagDefinition, type TableColumn, type TableFormat, type TableOptions, type TableStream, type Token, type UrlFlagOptions, ValidationError, type ValidationErrorCode, type ValidationErrorOptions, type Verbosity, type WithArgPresence, type WithPresence, type WithVariadic, type WithoutArgElementEligibility, type WithoutElementEligibility, type WriteFn, arg, buildConfigSearchPaths, cli, command, configFormat, createArgSchema, createCLISchema, createCommandSchema, createFlagSchema, createOutput, createTerminalPrompter, definitionMetaSchema, discoverConfig, discoverManifest, flag, formatHelp, generateBashCompletion, generateCommandSchema, generateCompletion, generateFishCompletion, generateInputSchema, generatePowerShellCompletion, generateSchema, generateZshCompletion, getFlagNegatedName, group, includesBeforeSeparator, inferCliName, isCLIError, isMainModule, isParseError, isValidationError, middleware, osc8, packageRepositoryUrl, parse, plugin, readFlags, resolve, resolveExampleCommand, resolvePromptConfig, resolveRenderContext, stripBeforeSeparator, tokenize, visibleWidth, wasExplicit };
8
+ //#region src/core/help/ansi.d.ts
9
+ /**
10
+ * Measure the visible column width of `text`, ignoring ANSI/OSC escapes.
11
+ *
12
+ * Escape sequences (SGR colors, OSC 8 hyperlinks) occupy zero columns when
13
+ * rendered, so `.length` overcounts whenever they are present. Help
14
+ * formatting uses this for padding and wrapping; exported for custom help
15
+ * renderers that mix colors or links into aligned output.
16
+ *
17
+ * @param text - Text possibly containing terminal escapes.
18
+ * @returns Number of visible characters.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * visibleWidth('plain'); // 5
23
+ * visibleWidth(osc8('https://x.dev', 'x')); // 1
24
+ * ```
25
+ */
26
+ declare function visibleWidth(text: string): number;
27
+ /**
28
+ * Wrap `text` in an [OSC 8 hyperlink](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda)
29
+ * pointing at `url`.
30
+ *
31
+ * Supporting terminals render `text` as a clickable link; others show it
32
+ * plain. `text` defaults to the URL, so an omitted label degrades to a
33
+ * usable address. The framework's help layer decides *whether* to link
34
+ * (`help.hyperlinks`); this always emits when called.
35
+ *
36
+ * @param url - Link target (string or `URL` instance).
37
+ * @param text - Visible link text.
38
+ * @returns The OSC 8 escape sequence wrapping `text`.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * cli('mycli').version(osc8('https://github.com/me/mycli/releases/tag/v1.0.0', '1.0.0'));
43
+ * osc8('https://dreamcli.kjanat.dev'); // linked, displayed as the URL
44
+ * ```
45
+ */
46
+ declare function osc8(url: string | URL, text?: string): string;
47
+ //#endregion
48
+ //#region src/core/read-flags/index.d.ts
49
+ /**
50
+ * A record of flag definitions keyed by canonical flag name.
51
+ *
52
+ * The object key is the `--name` spelling and the key on the resolved record.
53
+ */
54
+ type FlagMap = Readonly<Record<string, FlagBuilder<FlagConfig>>>;
55
+ /**
56
+ * External state and behavior toggles accepted by {@linkcode readFlags}.
57
+ *
58
+ * Extends {@linkcode ResolveOptions}, so `env`, `config`, `prompter`, `stat`,
59
+ * and `mkdir` carry the meaning they have during command resolution.
60
+ */
61
+ interface ReadFlagsOptions<F extends FlagMap = FlagMap> extends ResolveOptions {
62
+ /**
63
+ * User arguments only, without the binary and script entries.
64
+ * @defaultValue the runtime adapter's argv past its binary and script entries
65
+ */
66
+ readonly argv?: readonly string[];
67
+ /**
68
+ * Runtime source for argv, environment, and filesystem primitives.
69
+ * @defaultValue {@linkcode createAdapter | createAdapter()}, built on the
70
+ * first fact the caller left out
71
+ */
72
+ readonly adapter?: RuntimeAdapter;
73
+ /**
74
+ * Parser behavior such as kebab/camel case parity.
75
+ * @defaultValue `undefined`, which keeps the parser defaults
76
+ */
77
+ readonly parse?: ParseOptions;
78
+ /**
79
+ * Reject argv content the definitions do not declare.
80
+ *
81
+ * `false` drops undeclared input from argv before parsing: unknown long
82
+ * flags together with their inline `=value`, unknown characters inside a
83
+ * short group, positional arguments, and the `--` separator, which can only
84
+ * introduce positionals here. A value token of a declared flag is kept by
85
+ * walking the same consumption rules the parser applies. Misuse of a
86
+ * declared flag still fails: a missing value, a bad coercion, or a violated
87
+ * duplicate policy throws in either mode.
88
+ * @defaultValue `true`
89
+ */
90
+ readonly strict?: boolean;
91
+ /**
92
+ * The built-in `--help`/`-h` handling.
93
+ *
94
+ * While `'on'`, a pre-separator `--help` or `-h` prints generated help for
95
+ * the definitions to the adapter's stdout and exits the process with
96
+ * code 0. The built-in yields automatically when any definition claims the
97
+ * `help` or `h` spelling through its name, an alias, a negated form, or a
98
+ * case-parity counterpart; those spellings then parse as the definition's
99
+ * own. `'off'` removes the built-in, and the spellings parse like any other
100
+ * token.
101
+ * @defaultValue `'on'`
102
+ */
103
+ readonly help?: 'on' | 'off';
104
+ /**
105
+ * Receiver for notices produced by `.deprecated()` flags.
106
+ * @defaultValue `undefined`, which drops the notices
107
+ */
108
+ readonly onDeprecation?: (warning: DeprecationWarning) => void;
109
+ /**
110
+ * Receiver for the provenance of the resolved values, keyed by flag name.
111
+ *
112
+ * Called once with the whole record, before {@linkcode readFlags} returns the
113
+ * values. A flag that resolved no value has no record, so the same reader
114
+ * works for optional flags.
115
+ * @defaultValue `undefined`, which drops the record
116
+ */
117
+ readonly onSources?: (sources: SourcesOf<F>) => void;
118
+ }
119
+ /**
120
+ * Evaluate a record of flag definitions and return the resolved values.
121
+ *
122
+ * The record is compiled into an anonymous command schema with no positional
123
+ * arguments, parsed once, and run through the CLI, env, config, prompt, default
124
+ * resolution chain. Aliases, negated spellings, duplicate policy, case parity,
125
+ * unknown-flag rejection, coercion, constraints, Standard Schema validators, and
126
+ * `flag.path()` checks behave exactly as they do inside a command.
127
+ *
128
+ * A pre-separator `--help` or `-h` prints generated help to the adapter's
129
+ * stdout and exits with code 0, unless {@linkcode ReadFlagsOptions.help} is
130
+ * `'off'` or a definition claims either spelling. With
131
+ * {@linkcode ReadFlagsOptions.strict} set to `false`, undeclared argv content
132
+ * is dropped instead of rejected, so a script can read its own flags out of an
133
+ * argv it shares with another consumer.
134
+ *
135
+ * Anything the caller leaves out comes from the runtime adapter, which is built
136
+ * on first use, so a call given `argv` and `env` reads nothing from the host
137
+ * unless a `flag.path()` check needs the adapter's filesystem primitives.
138
+ * `config` has no application name to discover a file from and stays
139
+ * caller-supplied. `prompter` stays caller-supplied as well, so a `.prompt()`
140
+ * flag with no prompter falls through to its default.
141
+ *
142
+ * @param definitions - Flag builders keyed by canonical flag name.
143
+ * @param options - Injected runtime state and behavior toggles.
144
+ * @returns The resolved flag values, typed from the definitions.
145
+ * @throws {ParseError} For unknown flags, missing values, and bad input.
146
+ * @throws {ValidationError} For missing required flags and failed validators.
147
+ * @throws {CLIError} With code `'FLAG_NAME_COLLISION'` when two definitions share
148
+ * a name, an alias, or a negated spelling.
149
+ * @throws {CLIError} With code `'INVALID_SCHEMA'` for the definition key
150
+ * `__proto__`, which JavaScript cannot carry as a plain record key, and for a
151
+ * definitions record whose prototype is replaced, which hides the entries a
152
+ * key check would read.
153
+ *
154
+ * @example
155
+ * ```ts
156
+ * import { flag, readFlags } from '@kjanat/dreamcli';
157
+ *
158
+ * const options = await readFlags({
159
+ * watch: flag.boolean().alias('w').env('WATCH').default(false),
160
+ * minify: flag.boolean().env('MINIFY').default(true),
161
+ * target: flag.enum(['node', 'browser']).env('TARGET').default('node'),
162
+ * });
163
+ *
164
+ * options.watch; // boolean
165
+ * options.minify; // boolean
166
+ * options.target; // 'node' | 'browser'
167
+ * ```
168
+ *
169
+ * @example
170
+ * ```ts
171
+ * const values = await readFlags(
172
+ * { watch: flag.boolean().alias('w').env('WATCH') },
173
+ * { argv: [], env: { WATCH: 'true' } },
174
+ * );
175
+ *
176
+ * values.watch; // true
177
+ * ```
178
+ *
179
+ * @example
180
+ * ```ts
181
+ * const values = await readFlags(
182
+ * { watch: flag.boolean() },
183
+ * { argv: ['build', '--watch', '--unknown'], env: {}, strict: false },
184
+ * );
185
+ *
186
+ * values.watch; // true, with 'build' and '--unknown' dropped
187
+ * ```
188
+ */
189
+ declare function readFlags<const F extends FlagMap>(definitions: F, options?: ReadFlagsOptions<F>): Promise<InferFlags<F>>;
190
+ //#endregion
191
+ export { type ActionHandler, type ActionParams, type ActivityEvent, ArgBuilder, type ArgConfig, type ArgDefaultValue, type ArgDefinition, type ArgDefinitionBase, type ArgDefinitionByKind, type ArgDefinitionFragmentV1, type ArgDefinitionOverrides, type ArgElementFragmentV1, type ArgFactory, type ArgKind, type ArgParseFn, type ArgPresence, type ArgSchema, type ArrayFlagDefinition, type BeforeParseParams, type BooleanArgDefinition, type BooleanFlagDefinition, type BuiltinMode, type BuiltinName, type Builtins, type BuiltinsConfig, CLIBuilder, type CLIDefinition, CLIError, type CLIErrorJSON, type CLIErrorOptions, type CLIExecuteOptions, type CLIOptions, type CLIPlugin, type CLIPluginHooks, type CLIRunOptions, type CLISchema, type Colors, type CommandArgEntry, type CommandArgEntryDefinition, CommandBuilder, type CommandDefinition, type CommandDefinitionDocument, type CommandDefinitionDocumentV1, type CommandDefinitionFragmentV1, type CommandExample, type CommandMeta, type CommandSchema, type CompletionOptions, type CompletionRegistrationOptions, type CompletionsFlagConfig, type ConfigAdapter, type ConfigDiscoveryOptions, type ConfigDiscoveryResult, type ConfigFound, type ConfigNotFound, type ConfigSearchPathOptions, type ConfigSettings, type ConfigSettingsDefinition, type ConfirmPromptConfig, type CountFlagDefinition, type CustomArgDefinition, type CustomFlagDefinition, DEFINITION_SCHEMA_URL, DEFINITION_SCHEMA_VERSION, DUPLICATE_KEYS, type DateFlagOptions, type DefaultCommandOptions, type DefaultValueOptions, type DefinitionDocument, type DefinitionDocumentV1, type DeprecationWarning, type DeriveHandler, type DeriveParams, type DuplicateKeys, type DuplicatePolicy, type EnumArgDefinition, type EnumFlagDefinition, type ErrorCode, type ExampleCommand, type ExampleDefinitionFragmentV1, type ExampleMeta, type Fallback, FlagBuilder, type FlagConfig, type FlagDefinition, type FlagDefinitionBase, type FlagDefinitionByKind, type FlagDefinitionFragmentV1, type FlagDefinitionOverrides, type FlagElementFragmentV1, type FlagFactory, type FlagKind, type FlagMap, type FlagNegation, type FlagNegationFragmentV1, type FlagParseFn, type FlagPathChecksFragmentV1, type FlagPresence, type FlagSchema, type FlagStringConstraintsFragmentV1, type FormatLoader, type HelpConfig, type HelpDescription, type HelpLinks, type HelpOptions, type HelpTheme, type HelpThemeFactory, type InferArg, type InferArgs, type InferFlag, type InferFlags, type InferNameOption, type InferStandardInput, type InferStandardOutput, type InputPromptConfig, type InputSchemaBranch, type InputSchemaDocument, type InputSchemaProperty, type InputSources, type InteractiveParams, type InteractiveResolver, type InteractiveResult, type JsonSchemaOptions, type KeyValueArgDefinition, type KeyValueFlagDefinition, type ManifestDiscoveryOptions, type ManifestSettings, type Middleware, type MiddlewareHandler, type MiddlewareParams, type MultiselectPromptConfig, type NumberArgDefinition, type NumberConstraintViolation, type NumberConstraints, type NumberFlagDefinition, type Out, type OutputOptions, type PackageJsonAdapter, type PackageJsonData, type PackageRepository, type PackageRepositoryUrlOptions, ParseError, type ParseErrorCode, type ParseErrorOptions, type ParseOptions, type ParseResult, type PathChecks, type PathFlagOptions, type PluginCommandContext, type ProgressHandle, type ProgressOptions, type PromptChoiceFragmentV1, type PromptConfig, type PromptConfigBase, type PromptDefinitionFragmentV1, type PromptEngine, type PromptKind, type PromptResult, type ReadFlagsOptions, type ReadFn, type RenderContext, type RenderContextOptions, type ResolutionProvenance, type ResolutionProvenanceRecord, type ResolveOptions, type ResolveResult, type ResolvedArgValue, type ResolvedCommandParams, type ResolvedManifestSettings, type ResolvedMultiselectPromptConfig, type ResolvedPromptConfig, type ResolvedSelectPromptConfig, type ResolvedValue, type RunResult, SHELLS, SPLIT_FORMATS, type SelectChoice, type SelectPromptConfig, type Shell, type SourceSplitBinding, type SourceSplitFragmentV1, type SourcesOf, type SpinnerHandle, type SpinnerOptions, type SplitBinding, type SplitFormat, type SplitOptions, type SplitPolicy, type SplitPolicyFragmentV1, type SplitSetting, type StandardSchemaV1, type StandardSchemaV1FailureResult, type StandardSchemaV1Issue, type StandardSchemaV1Options, type StandardSchemaV1PathSegment, type StandardSchemaV1Props, type StandardSchemaV1Result, type StandardSchemaV1SuccessResult, type StandardSchemaV1Types, type StdinBinding, type StdinBindingFragmentV1, type StdinConsume, type StdinOptions, type StdinWhen, type StringArgDefinition, type StringArgElementConfig, type StringConstraintViolation, type StringConstraints, type StringElementConfig, type StringFlagDefinition, type TableColumn, type TableFormat, type TableOptions, type TableStream, type Token, type UrlFlagOptions, ValidationError, type ValidationErrorCode, type ValidationErrorOptions, type Verbosity, type WithArgPresence, type WithPresence, type WithVariadic, type WithoutArgElementEligibility, type WithoutElementEligibility, type WriteFn, arg, cli, command, createArgSchema, createCLISchema, createCommandSchema, createFlagSchema, createOutput, flag, formatHelp, getFlagNegatedName, group, includesBeforeSeparator, isCLIError, isMainModule, isParseError, isValidationError, middleware, osc8, parse, plugin, readFlags, resolve, resolveExampleCommand, resolvePromptConfig, resolveRenderContext, stripBeforeSeparator, tokenize, visibleWidth, wasExplicit };
package/dist/index.mjs CHANGED
@@ -1,26 +1 @@
1
- import { CLIError, ParseError, ValidationError, isCLIError, isParseError, isValidationError } from "./core/errors/index.mjs";
2
- import { DUPLICATE_KEYS, SPLIT_FORMATS } from "./core/schema/cardinality.mjs";
3
- import { FlagBuilder, createFlagSchema, flag, getFlagNegatedName } from "./core/schema/flag.mjs";
4
- import { ArgBuilder, arg, createArgSchema } from "./core/schema/arg.mjs";
5
- import { CommandBuilder, command, createCommandSchema, group, resolveExampleCommand } from "./core/schema/command.mjs";
6
- import { middleware } from "./core/schema/middleware.mjs";
7
- import { wasExplicit } from "./core/schema/provenance.mjs";
8
- import "./core/schema/index.mjs";
9
- import { includesBeforeSeparator, parse, stripBeforeSeparator, tokenize } from "./core/parse/index.mjs";
10
- import { generateBashCompletion } from "./core/completion/shells/bash.mjs";
11
- import { generateFishCompletion } from "./core/completion/shells/fish.mjs";
12
- import { generatePowerShellCompletion } from "./core/completion/shells/powershell.mjs";
13
- import { generateZshCompletion } from "./core/completion/shells/zsh.mjs";
14
- import { SHELLS, generateCompletion } from "./core/completion/index.mjs";
15
- import { osc8, visibleWidth } from "./core/help/ansi.mjs";
16
- import { formatHelp } from "./core/help/index.mjs";
17
- import { DEFINITION_SCHEMA_URL, DEFINITION_SCHEMA_VERSION, definitionMetaSchema, generateCommandSchema, generateInputSchema, generateSchema } from "./core/json-schema/index.mjs";
18
- import { createOutput } from "./core/output/index.mjs";
19
- import { createTerminalPrompter, resolvePromptConfig } from "./core/prompt/index.mjs";
20
- import { resolve } from "./core/resolve/index.mjs";
21
- import { discoverManifest, inferCliName, packageRepositoryUrl } from "./core/config/package-json.mjs";
22
- import { plugin } from "./core/cli/plugin.mjs";
23
- import { buildConfigSearchPaths, configFormat, discoverConfig } from "./core/config/index.mjs";
24
- import { CLIBuilder, cli, createCLISchema, isMainModule, resolveRenderContext } from "./core/cli/index.mjs";
25
- import { readFlags } from "./core/read-flags/index.mjs";
26
- export { ArgBuilder, CLIBuilder, CLIError, CommandBuilder, DEFINITION_SCHEMA_URL, DEFINITION_SCHEMA_VERSION, DUPLICATE_KEYS, FlagBuilder, ParseError, SHELLS, SPLIT_FORMATS, ValidationError, arg, buildConfigSearchPaths, cli, command, configFormat, createArgSchema, createCLISchema, createCommandSchema, createFlagSchema, createOutput, createTerminalPrompter, definitionMetaSchema, discoverConfig, discoverManifest, flag, formatHelp, generateBashCompletion, generateCommandSchema, generateCompletion, generateFishCompletion, generateInputSchema, generatePowerShellCompletion, generateSchema, generateZshCompletion, getFlagNegatedName, group, includesBeforeSeparator, inferCliName, isCLIError, isMainModule, isParseError, isValidationError, middleware, osc8, packageRepositoryUrl, parse, plugin, readFlags, resolve, resolveExampleCommand, resolvePromptConfig, resolveRenderContext, stripBeforeSeparator, tokenize, visibleWidth, wasExplicit };
1
+ import{$ as ParseError,B as resolveExampleCommand,D as tokenize,E as stripBeforeSeparator,F as visibleWidth,G as getFlagNegatedName,H as createFlagSchema,I as CommandBuilder,J as createArgSchema,K as ArgBuilder,L as command,M as formatHelp,O as wasExplicit,P as osc8,Q as CLIError,R as createCommandSchema,S as resolvePromptConfig,T as parse,U as flag,V as FlagBuilder,X as SPLIT_FORMATS,Y as DUPLICATE_KEYS,a as DEFINITION_SCHEMA_URL,c as cli,d as resolveRenderContext,et as ValidationError,i as readFlags,it as SHELLS,j as createOutput,k as middleware,l as createCLISchema,nt as isParseError,o as DEFINITION_SCHEMA_VERSION,p as plugin,q as arg,rt as isValidationError,s as CLIBuilder,tt as isCLIError,u as isMainModule,w as includesBeforeSeparator,x as resolve,z as group}from"./core-Cp2w8vRq.mjs";export{ArgBuilder,CLIBuilder,CLIError,CommandBuilder,DEFINITION_SCHEMA_URL,DEFINITION_SCHEMA_VERSION,DUPLICATE_KEYS,FlagBuilder,ParseError,SHELLS,SPLIT_FORMATS,ValidationError,arg,cli,command,createArgSchema,createCLISchema,createCommandSchema,createFlagSchema,createOutput,flag,formatHelp,getFlagNegatedName,group,includesBeforeSeparator,isCLIError,isMainModule,isParseError,isValidationError,middleware,osc8,parse,plugin,readFlags,resolve,resolveExampleCommand,resolvePromptConfig,resolveRenderContext,stripBeforeSeparator,tokenize,visibleWidth,wasExplicit};
@@ -0,0 +1,52 @@
1
+ import{t as __exportAll}from"./rolldown-runtime-G4Kt5YOX.mjs";import{B as resolveExampleCommand,N as resolvePlainHelpDescription,W as getFlagAliasNames,Y as DUPLICATE_KEYS,a as DEFINITION_SCHEMA_URL}from"./core-Cp2w8vRq.mjs";const definitionMetaSchemaDescriptions={root:{description:`Runtime descriptor for the CLI program.
2
+
3
+ Stores the program name, version, description, and registered command schemas.\\
4
+ Sealed by createCLISchema and rebuilt by each CLIBuilder step.`,properties:{name:{description:`Program name (used in help text, usage lines, and completion scripts).`},version:{description:"Program version (shown by `--version`)."},description:{description:`Program description (shown in root help).`},defaultCommand:{description:`Schema of the default command dispatched when no subcommand matches.
5
+
6
+ When set, the CLI root behaves like a hybrid command group: subcommands
7
+ dispatch by name as usual, but empty argv or flags-only argv falls
8
+ through to this command instead of showing root help.
9
+
10
+ Set via the .default() builder method
11
+ or the \`defaultCommand\` field of CLIDefinition.`},commands:{description:`Schemas of the registered commands, in registration order.`}}},defs:{command:{description:`Runtime descriptor produced by CommandBuilder.
12
+
13
+ Consumers (parser, help generator, CLI dispatcher) read this to
14
+ understand the command's shape — flags, args, aliases, subcommands,
15
+ and interactive resolver.`,properties:{name:{description:"The command name (used for dispatch, e.g. `'deploy'`)."},description:{description:`Human-readable description for help text.`},aliases:{description:`Alternative names for this command.`},hidden:{description:`Whether this command is hidden from help listings.`},examples:{description:`Usage examples for help text.`},flags:{description:`Named flag schemas, keyed by flag name.`},args:{description:`Ordered positional arg entries (name + schema).`},commands:{description:"Nested subcommand schemas (for help rendering and completion).\n\nPure data — no execution closures. Populated by `.command()` on\n`CommandBuilder`. Empty for leaf commands."}}},commandDocument:{description:`A single-command definition document, version 1.
16
+
17
+ Produced by generateCommandSchema. Same shape as a
18
+ CommandDefinitionFragmentV1 plus the \`schemaVersion\` every standalone
19
+ document carries.`,properties:{schemaVersion:{description:"Version of the definition document format emitted by `generateSchema()`\nand `generateCommandSchema()` from `@kjanat/dreamcli/json-schema`."},name:{description:`The command name used for dispatch.`},description:{description:`Human-readable description for help text.`},aliases:{description:`Alternative names accepted for this command.`},hidden:{description:`Whether the command is omitted from help listings.`},examples:{description:`Usage examples attached to the command.`},flags:{description:`Named flag definitions keyed by flag name.`},args:{description:`Positional argument definitions in CLI order.`},commands:{description:`Nested subcommand definitions.`}}},flag:{description:`The runtime descriptor stored inside every FlagBuilder. Consumers (parser,
20
+ help generator, resolution chain) read this to understand the flag's shape
21
+ without touching generics.`,properties:{kind:{description:`What kind of value this flag accepts.`},presence:{description:"Presence describes whether a flag value is guaranteed to exist when the\naction handler runs:\n\n- `'optional'` — not required; unresolved value follows the kind-specific\n optional fallback (`undefined` for most flags, `[]` for arrays)\n- `'required'` — must be supplied; error if missing\n- `'defaulted'` — always present (falls back to default value)"},defaultValue:{description:`Runtime default value (if any).`},aliases:{description:"Short/long aliases (e.g. `[{ name: 'f', hidden: false }]` for `--force`)."},stdin:{description:"Stdin binding set by `.stdin()` (`undefined` when the flag never reads\nstdin). See StdinBinding."},envVar:{description:`Environment variable name for v0.2+ resolution.`},configPath:{description:"Dotted config path for v0.2+ resolution (e.g. `'deploy.region'`)."},description:{description:`Human-readable description for help text.`},enumValues:{description:"Allowed literal values when `kind === 'enum'`."},elementSchema:{description:"Element schema when `kind === 'array'` or `kind === 'keyValue'`."},prompt:{description:`Interactive prompt configuration for v0.3+ resolution.`},deprecated:{description:"Deprecation marker.\n\n- `undefined` — not deprecated (default)\n- `true` — deprecated with no migration message\n- `string` — deprecated with a reason/migration message\n\nWhen a deprecated flag is used, a warning is emitted to stderr.\nHelp text shows `[deprecated]` or `[deprecated: <reason>]`."},propagate:{description:`Whether this flag propagates to subcommands in nested command trees.
22
+
23
+ When \`true\`, the flag is automatically available to all descendant
24
+ commands. A child command that defines a flag with the same name
25
+ shadows the propagated parent flag.
26
+
27
+ Default: \`false\``},negation:{description:"Negation settings when `kind === 'boolean'` and `.negatable()` was\ncalled (`undefined` otherwise). See FlagNegation."},duplicates:{description:"How repeated CLI occurrences of a singleton flag combine.\n\n- `'last'` — last occurrence wins (matches historic behavior)\n- `'first'` — first occurrence wins; later ones parse but are ignored\n- `'error'` — a second occurrence is a `ParseError` (`DUPLICATE_FLAG`)\n\nApplies to CLI token occurrences only — env/config/prompt/default\nresolution keeps its precedence semantics and never raises duplicates.\nOccurrences are counted per *logical* flag: aliases and the negated\nspelling all count toward the same flag.\n\nDefault: `'last'`"},defaultDescription:{description:"Human-readable replacement for the default value in help, or `false` to\nomit the default annotation."},sensitive:{description:`Whether values from this input must be kept out of user-facing projections.`}}},flagElement:{description:"Element schema when `kind === 'array'` or `kind === 'keyValue'`.",properties:{kind:{description:`What kind of value this flag accepts.`},presence:{description:"Presence describes whether a flag value is guaranteed to exist when the\naction handler runs:\n\n- `'optional'` — not required; unresolved value follows the kind-specific\n optional fallback (`undefined` for most flags, `[]` for arrays)\n- `'required'` — must be supplied; error if missing\n- `'defaulted'` — always present (falls back to default value)"},defaultValue:{description:`Runtime default value (if any).`},aliases:{description:"Short/long aliases (e.g. `[{ name: 'f', hidden: false }]` for `--force`)."},stdin:{description:"Stdin binding set by `.stdin()` (`undefined` when the flag never reads\nstdin). See StdinBinding."},envVar:{description:`Environment variable name for v0.2+ resolution.`},configPath:{description:"Dotted config path for v0.2+ resolution (e.g. `'deploy.region'`)."},description:{description:`Human-readable description for help text.`},enumValues:{description:"Allowed literal values when `kind === 'enum'`."},elementSchema:{description:"Element schema when `kind === 'array'` or `kind === 'keyValue'`."},prompt:{description:`Interactive prompt configuration for v0.3+ resolution.`},deprecated:{description:"Deprecation marker.\n\n- `undefined` — not deprecated (default)\n- `true` — deprecated with no migration message\n- `string` — deprecated with a reason/migration message\n\nWhen a deprecated flag is used, a warning is emitted to stderr.\nHelp text shows `[deprecated]` or `[deprecated: <reason>]`."},propagate:{description:`Whether this flag propagates to subcommands in nested command trees.
28
+
29
+ When \`true\`, the flag is automatically available to all descendant
30
+ commands. A child command that defines a flag with the same name
31
+ shadows the propagated parent flag.
32
+
33
+ Default: \`false\``},negation:{description:"Negation settings when `kind === 'boolean'` and `.negatable()` was\ncalled (`undefined` otherwise). See FlagNegation."},duplicates:{description:"How repeated CLI occurrences of a singleton flag combine.\n\n- `'last'` — last occurrence wins (matches historic behavior)\n- `'first'` — first occurrence wins; later ones parse but are ignored\n- `'error'` — a second occurrence is a `ParseError` (`DUPLICATE_FLAG`)\n\nApplies to CLI token occurrences only — env/config/prompt/default\nresolution keeps its precedence semantics and never raises duplicates.\nOccurrences are counted per *logical* flag: aliases and the negated\nspelling all count toward the same flag.\n\nDefault: `'last'`"}}},stdin:{description:`The normalized stdin axis of a flag or an arg.`,properties:{when:{description:`When this input reads the stdin stream.`},consume:{description:`Whether this input consumes the stream alone.`},trim:{description:`Whether one trailing line terminator is dropped from a single value.`}}},negation:{description:`Negation settings for a boolean flag (set by \`.negatable()\`).
34
+
35
+ The negated spelling and the positive form are two spellings of ONE
36
+ logical flag: they share duplicate policy, and the last CLI occurrence
37
+ wins across both. The negated spelling is presence-only — \`--no-foo=x\`
38
+ is rejected.`,properties:{alias:{description:"Explicit negated spelling without the `--` prefix (e.g. `'no-sandbox'`).\n`undefined` synthesizes `no-<flagName>` wherever the flag name is known."},hidden:{description:`Hide the negated spelling from help, completions, and suggestions.`}}},arg:{description:`The runtime descriptor stored inside every ArgBuilder. Consumers (parser,
39
+ help generator) read this to understand the arg's shape without touching
40
+ generics.`,properties:{name:{description:`A named positional argument entry in the command schema.
41
+
42
+ Pairs a user-facing arg name with its ArgSchema descriptor.
43
+ The array ordering in CommandSchema.args determines CLI position.`},kind:{description:`What kind of value this arg accepts.`},presence:{description:"Presence describes whether a positional arg is guaranteed to exist when the\naction handler runs:\n\n- `'required'` — must be supplied; error if missing (default)\n- `'optional'` — may be `undefined` if not supplied\n- `'defaulted'` — always present (falls back to default value)"},variadic:{description:`Whether this arg consumes all remaining positionals.`},stdin:{description:"Stdin binding set by `.stdin()` (`undefined` when the arg never reads\nstdin). See StdinBinding."},defaultValue:{description:`Runtime default value (if any).`},defaultDescription:{description:"Human-readable replacement for the default value in help, or `false` to\nomit the default annotation."},sensitive:{description:`Whether values from this input must be kept out of user-facing projections.`},description:{description:`Human-readable description for help text.`},envVar:{description:`Environment variable name for env resolution.
44
+
45
+ When set and the CLI value is absent, the resolver reads this env var
46
+ and coerces the string to the arg's declared kind.`},configPath:{description:"Dotted config path for config resolution (e.g. `'deploy.region'`)."},prompt:{description:`Interactive prompt configuration.`},enumValues:{description:"Allowed literal values when `kind === 'enum'`."},elementSchema:{description:"Element schema when `kind === 'keyValue'`.\n\nDescribes the value of each entry, so `arg.keyValue(arg.number())` decodes\n`A=1` to the number `1`. `undefined` leaves entry values as strings."},deprecated:{description:"Deprecation marker.\n\n- `undefined` — not deprecated (default)\n- `true` — deprecated with no migration message\n- `string` — deprecated with a reason/migration message\n\nWhen a deprecated arg is used, a warning is emitted to stderr.\nHelp text shows `[deprecated]` or `[deprecated: <reason>]`."}}},argElement:{description:"Element schema when `kind === 'keyValue'`.\n\nDescribes the value of each entry, so `arg.keyValue(arg.number())` decodes\n`A=1` to the number `1`. `undefined` leaves entry values as strings.",properties:{kind:{description:`What kind of value this arg accepts.`},presence:{description:`Entry values are required once their containing key-value argument is present.`},enumValues:{description:"Allowed literal values when `kind === 'enum'`."}}},prompt:{description:"Discriminated union of all prompt configurations.\n\nUse the `kind` field to narrow:\n```ts\nif (config.kind === 'select') {\n config.choices // readonly SelectChoice[] | undefined\n}\n```",properties:{kind:{description:"The kind of interactive prompt to present.\n\n- `'confirm'` — yes/no boolean question\n- `'input'` — free-text string input\n- `'select'` — single selection from a list\n- `'multiselect'` — multiple selections from a list"},message:{description:`The question displayed to the user.`},placeholder:{description:`Placeholder text shown before user types (informational only).`},choices:{description:"Available choices. When omitted for `enum` flags, the enum values\nfrom the flag schema are used automatically."},min:{description:`Minimum number of selections required.
47
+
48
+ Default: \`0\``},max:{description:`Maximum number of selections allowed.
49
+
50
+ Default: \`Infinity\``}}},choice:{description:`A selectable option for SelectPromptConfig and MultiselectPromptConfig prompts.`,properties:{value:{description:`The value returned when this choice is selected.`},label:{description:`Display label shown to the user.
51
+
52
+ Default: value`},description:{description:`Optional description shown alongside the choice.`}}},example:{description:`A single usage example shown in help text.`,properties:{command:{description:"The command invocation (e.g. `'deploy production --force'`)."},description:{description:`Optional description of what this example does.`}}}}};var json_schema_exports=__exportAll({DEFINITION_SCHEMA_URL:()=>DEFINITION_SCHEMA_URL,DEFINITION_SCHEMA_VERSION:()=>1,definitionMetaSchema:()=>definitionMetaSchema,generateCommandSchema:()=>generateCommandSchema,generateInputSchema:()=>generateInputSchema,generateSchema:()=>generateSchema});function resolveOptions(e){return{includeHidden:e?.includeHidden??!0,includePrompts:e?.includePrompts??!0}}const JSON_SCHEMA_DRAFT=`https://json-schema.org/draft/2020-12/schema`;function generateSchema(e,t,n){let r=resolveOptions(t),i=n??{name:e.name,version:e.version},a=e.defaultCommand!==void 0&&(r.includeHidden||!e.defaultCommand.hidden)?serializeCommand(e.defaultCommand,r,i):void 0;return{$schema:DEFINITION_SCHEMA_URL,schemaVersion:1,name:e.name,...e.version===void 0?{}:{version:e.version},...e.description===void 0?{}:{description:resolvePlainHelpDescription(e.description)},...a===void 0?{}:{defaultCommand:a},commands:e.commands.filter(e=>r.includeHidden||!e.hidden).map(e=>serializeCommand(e,r,i))}}function generateCommandSchema(e,t,n){let r=n??{name:e.name,version:void 0};return{schemaVersion:1,...serializeCommand(e,resolveOptions(t),r)}}function serializeCommand(e,t,n){let r={};for(let[n,i]of Object.entries(e.flags))r[n]=serializeFlag(i,t);return{name:e.name,...e.description===void 0?{}:{description:resolvePlainHelpDescription(e.description)},...e.aliases.length>0?{aliases:[...e.aliases]}:{},...e.hidden?{hidden:!0}:{},...e.examples.length>0?{examples:e.examples.map(e=>serializeExample(e,n))}:{},flags:r,args:e.args.map(e=>serializeArgEntry(e,t)),commands:e.commands.filter(e=>t.includeHidden||!e.hidden).map(e=>serializeCommand(e,t,n))}}function serializeFlag(e,t,n=!1){let r=getFlagAliasNames(e),i=e.stringConstraints,a=e.pathChecks,o=e.negation,s=n||e.sensitive;return{kind:e.kind,presence:e.presence,...!s&&isJsonSerializable(e.defaultValue)?{defaultValue:e.defaultValue}:{},...e.defaultDescription===void 0?{}:{defaultDescription:e.defaultDescription},...e.sensitive?{sensitive:!0}:{},...r.length>0?{aliases:[...r]}:{},...e.stdin===void 0?{}:{stdin:serializeStdin(e.stdin)},...e.envVar===void 0?{}:{envVar:e.envVar},...e.configPath===void 0?{}:{configPath:e.configPath},...e.description===void 0?{}:{description:resolvePlainHelpDescription(e.description)},...e.enumValues===void 0?{}:{enumValues:[...e.enumValues]},...e.numberConstraints===void 0?{}:{numberConstraints:{...e.numberConstraints}},...i===void 0?{}:{stringConstraints:serializeStringConstraints(i)},...e.elementSchema===void 0?{}:{elementSchema:serializeFlag(e.elementSchema,t,s)},...e.separator===void 0?{}:{separator:e.separator},...e.split===void 0?{}:{split:serializeSplit(e.split)},...e.duplicateKeys===`last`?{}:{duplicateKeys:e.duplicateKeys},...e.unique?{unique:!0}:{},...a===void 0?{}:{pathChecks:serializePathChecks(a)},...e.valueHint===void 0?{}:{valueHint:e.valueHint},...t.includePrompts&&e.prompt!==void 0?{prompt:serializePrompt(e.prompt)}:{},...e.deprecated===void 0?{}:{deprecated:e.deprecated},...e.propagate?{propagate:!0}:{},...o===void 0?{}:{negation:{...o.alias===void 0?{}:{alias:o.alias},...o.hidden?{hidden:!0}:{}}},...e.duplicates===`last`?{}:{duplicates:e.duplicates}}}function serializeStringConstraints(e){let t=e.pattern;return{...e.nonEmpty===void 0?{}:{nonEmpty:e.nonEmpty},...e.minLength===void 0?{}:{minLength:e.minLength},...e.maxLength===void 0?{}:{maxLength:e.maxLength},...t===void 0?{}:{pattern:{source:t.source,flags:t.flags}}}}function serializePathChecks(e){return{mustExist:e.mustExist,...e.type===void 0?{}:{type:e.type},...e.create?{create:!0}:{}}}function serializeArgEntry(e,t){return{name:e.name,...serializeArgValue(e.schema,t)}}function serializeArgValue(e,t){let n=e.stringConstraints,r=e.pathChecks;return{kind:e.kind,presence:e.presence,...e.variadic?{variadic:!0}:{},...e.stdin===void 0?{}:{stdin:serializeStdin(e.stdin)},...!e.sensitive&&isJsonSerializable(e.defaultValue)?{defaultValue:e.defaultValue}:{},...e.defaultDescription===void 0?{}:{defaultDescription:e.defaultDescription},...e.sensitive?{sensitive:!0}:{},...e.description===void 0?{}:{description:resolvePlainHelpDescription(e.description)},...e.envVar===void 0?{}:{envVar:e.envVar},...e.configPath===void 0?{}:{configPath:e.configPath},...e.enumValues===void 0?{}:{enumValues:[...e.enumValues]},...e.elementSchema===void 0?{}:{elementSchema:serializeArgElementValue(e.elementSchema)},...e.numberConstraints===void 0?{}:{numberConstraints:{...e.numberConstraints}},...n===void 0?{}:{stringConstraints:serializeStringConstraints(n)},...r===void 0?{}:{pathChecks:serializePathChecks(r)},...e.valueHint===void 0?{}:{valueHint:e.valueHint},...e.separator===void 0?{}:{separator:e.separator},...e.split===void 0?{}:{split:serializeSplit(e.split)},...e.duplicateKeys===`last`?{}:{duplicateKeys:e.duplicateKeys},...e.unique?{unique:!0}:{},...t.includePrompts&&e.prompt!==void 0?{prompt:serializePrompt(e.prompt)}:{},...e.deprecated===void 0?{}:{deprecated:e.deprecated}}}function serializeArgElementValue(e){if(e.kind===`keyValue`)throw TypeError(`Arg element schema kind 'keyValue' is not supported`);return{kind:e.kind,presence:`required`,...e.enumValues===void 0?{}:{enumValues:[...e.enumValues]},...e.numberConstraints===void 0?{}:{numberConstraints:{...e.numberConstraints}},...e.stringConstraints===void 0?{}:{stringConstraints:serializeStringConstraints(e.stringConstraints)},...e.pathChecks===void 0?{}:{pathChecks:serializePathChecks(e.pathChecks)},...e.valueHint===void 0?{}:{valueHint:e.valueHint}}}function serializeSplit(e){return{...e.env===void 0?{}:{env:{...e.env}},...e.stdin===void 0?{}:{stdin:{...e.stdin}}}}function serializeStdin(e){return{when:e.when,consume:e.consume,trim:e.trim}}function serializePrompt(e){switch(e.kind){case`input`:return{kind:e.kind,message:e.message,...e.placeholder===void 0?{}:{placeholder:e.placeholder}};case`select`:return{kind:e.kind,message:e.message,...e.choices===void 0?{}:{choices:e.choices.map(serializeChoice)}};case`multiselect`:return{kind:e.kind,message:e.message,...e.choices===void 0?{}:{choices:e.choices.map(serializeChoice)},...e.min===void 0?{}:{min:e.min},...e.max===void 0?{}:{max:e.max}};case`confirm`:return{kind:e.kind,message:e.message}}}function serializeChoice(e){return{value:e.value,...e.label===void 0?{}:{label:e.label},...e.description===void 0?{}:{description:e.description}}}function serializeExample(e,t){return{command:resolveExampleCommand(e.command,t),...e.description===void 0?{}:{description:e.description}}}function generateInputSchema(e,t){let n=resolveOptions(t);if(isCommandSchema(e))return{$schema:JSON_SCHEMA_DRAFT,...commandToInputSchema(e)};let r=[];e.defaultCommand!==void 0&&(n.includeHidden||!e.defaultCommand.hidden)&&collectInputBranches(e.defaultCommand,``,r,n);for(let t of e.commands)t!==e.defaultCommand&&t.name!==e.defaultCommand?.name&&(n.includeHidden||!t.hidden)&&collectInputBranches(t,``,r,n);let[i]=r;if(r.length===1&&i!==void 0)return{$schema:JSON_SCHEMA_DRAFT,...stripCommandDiscriminator(i)};if(r.length>0){let t=e.defaultCommand!==void 0&&(n.includeHidden||!e.defaultCommand.hidden)?e.defaultCommand.name:void 0,i=t===void 0?r:r.map(e=>getBranchCommandDiscriminator(e)===t?stripCommandDiscriminator(e):e);return{$schema:JSON_SCHEMA_DRAFT,oneOf:i}}return{$schema:JSON_SCHEMA_DRAFT,type:`object`}}function isCommandSchema(e){return`flags`in e&&`args`in e&&`hasAction`in e}function collectInputBranches(e,t,n,r){let i=t?`${t}.${e.name}`:e.name;e.hasAction&&n.push(commandToInputSchema(e,i));for(let t of e.commands)(r.includeHidden||!t.hidden)&&collectInputBranches(t,i,n,r)}function commandToInputSchema(e,t){let n={},r=[];t!==void 0&&(n.command={const:t},r.push(`command`));for(let[t,i]of Object.entries(e.flags))n[t]=flagToJsonSchemaType(i),i.presence===`required`&&r.push(t);for(let t of e.args)n[t.name]=argToJsonSchemaType(t.schema),t.schema.presence===`required`&&r.push(t.name);return{type:`object`,properties:n,additionalProperties:!1,...r.length>0?{required:r}:{}}}function stripCommandDiscriminator(e){let{command:t,...n}=e.properties,r=e.required?.filter(e=>e!==`command`);return{type:e.type,properties:n,additionalProperties:e.additionalProperties,...r!==void 0&&r.length>0?{required:r}:{}}}function getBranchCommandDiscriminator(e){let t=e.properties.command;if(t===void 0)return;let n=t.const;return typeof n==`string`?n:void 0}function stringConstraintsToJsonSchemaProperties(e){let t={},n=e?.nonEmpty===!0?Math.max(e.minLength??1,1):e?.minLength;return n!==void 0&&(t.minLength=n),e?.maxLength!==void 0&&(t.maxLength=e.maxLength),e?.pattern!==void 0&&(t.pattern=e.pattern.source),t}function flagToJsonSchemaType(e,t=!1){let n={},r=t||e.sensitive;switch(e.kind){case`string`:n.type=`string`,Object.assign(n,stringConstraintsToJsonSchemaProperties(e.stringConstraints));break;case`number`:{let t=e.numberConstraints;n.type=t?.int===!0?`integer`:`number`,t?.min!==void 0&&(n.minimum=t.min),t?.max!==void 0&&(n.maximum=t.max);break}case`boolean`:n.type=`boolean`;break;case`enum`:n.type=`string`,e.enumValues!==void 0&&(n.enum=[...e.enumValues]);break;case`array`:n.type=`array`,e.elementSchema!==void 0&&(n.items=flagToJsonSchemaType(e.elementSchema,r));break;case`custom`:break;case`count`:n.type=`integer`,n.minimum=0;break;case`keyValue`:n.type=`object`,n.additionalProperties=e.elementSchema===void 0?{type:`string`}:flagToJsonSchemaType(e.elementSchema,r)}return e.description!==void 0&&(n.description=resolvePlainHelpDescription(e.description)),e.sensitive&&(n.writeOnly=!0),!r&&isJsonSerializable(e.defaultValue)&&(n.default=e.defaultValue),e.deprecated!==void 0&&(n.deprecated=e.deprecated),n}function argToJsonSchemaType(e){let t=argKindToType(e),n=e.variadic&&e.kind!==`keyValue`?{type:`array`,items:t}:{...t};return e.description!==void 0&&(n.description=resolvePlainHelpDescription(e.description)),e.sensitive&&(n.writeOnly=!0),!e.sensitive&&isJsonSerializable(e.defaultValue)&&(n.default=e.defaultValue),e.deprecated!==void 0&&(n.deprecated=e.deprecated),n}function argKindToType(e){switch(e.kind){case`string`:return{type:`string`,...stringConstraintsToJsonSchemaProperties(e.stringConstraints)};case`number`:{let t=e.numberConstraints,n={type:t?.int===!0?`integer`:`number`};return t?.min!==void 0&&(n.minimum=t.min),t?.max!==void 0&&(n.maximum=t.max),n}case`enum`:{let t={type:`string`};return e.enumValues!==void 0&&(t.enum=[...e.enumValues]),t}case`boolean`:return{type:`boolean`};case`keyValue`:return{type:`object`,additionalProperties:e.elementSchema===void 0?{type:`string`}:argKindToType(e.elementSchema)};case`custom`:return{}}}function isJsonSerializable(e,t=new WeakSet){if(e===void 0)return!1;if(e===null)return!0;let n=typeof e;if(n===`string`||n===`boolean`)return!0;if(n===`number`)return Number.isFinite(e);if(n===`function`||n===`symbol`||n===`bigint`)return!1;if(Array.isArray(e)){if(t.has(e))return!1;t.add(e);try{return e.every(e=>isJsonSerializable(e,t))}finally{t.delete(e)}}if(n===`object`){let n=e;if(!isPlainJsonObject(n)||t.has(n))return!1;t.add(n);try{return Object.values(n).every(e=>isJsonSerializable(e,t))}finally{t.delete(n)}}return!1}function isPlainJsonObject(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function withDefinitionDescriptions(e,t){let n=e.properties,r=typeof n==`object`&&n&&isPlainJsonObject(n)&&t.properties!==void 0?Object.fromEntries(Object.entries(n).map(([e,n])=>{let r=t.properties?.[e];return r===void 0||typeof n!=`object`||!n||!isPlainJsonObject(n)?[e,n]:[e,withDefinitionDescriptions(n,r)]})):void 0;return{...e,...t.description===void 0?{}:{description:t.description},...r===void 0?{}:{properties:r}}}function withDefinitionMetaSchemaDescriptions(e,t){let n=withDefinitionDescriptions(e,t.root),r=n.$defs;return typeof r!=`object`||!r||!isPlainJsonObject(r)?n:{...n,$defs:Object.fromEntries(Object.entries(r).map(([e,n])=>{let r=t.defs[e];return r===void 0||typeof n!=`object`||!n||!isPlainJsonObject(n)?[e,n]:[e,withDefinitionDescriptions(n,r)]}))}}const commandFragmentProperties={name:{type:`string`},description:{type:`string`},aliases:{type:`array`,items:{type:`string`}},hidden:{const:!0},examples:{type:`array`,items:{$ref:`#/$defs/example`}},flags:{type:`object`,additionalProperties:{$ref:`#/$defs/flag`}},args:{type:`array`,items:{$ref:`#/$defs/arg`}},commands:{type:`array`,items:{$ref:`#/$defs/command`}}},argValueFragmentProperties={kind:{enum:[`string`,`number`,`boolean`,`enum`,`custom`,`keyValue`]},presence:{enum:[`required`,`optional`,`defaulted`]},variadic:{const:!0},stdin:{$ref:`#/$defs/stdin`},defaultValue:{},defaultDescription:{oneOf:[{type:`string`},{const:!1}]},sensitive:{const:!0},description:{type:`string`},envVar:{type:`string`},configPath:{type:`string`},enumValues:{type:`array`,items:{type:`string`}},elementSchema:{$ref:`#/$defs/argElement`},numberConstraints:{$ref:`#/$defs/numberConstraints`},stringConstraints:{$ref:`#/$defs/stringConstraints`},pathChecks:{$ref:`#/$defs/pathChecks`},valueHint:{type:`string`},separator:{type:`string`,minLength:1},split:{$ref:`#/$defs/split`},duplicateKeys:{enum:[...DUPLICATE_KEYS]},unique:{const:!0},prompt:{$ref:`#/$defs/prompt`},deprecated:{oneOf:[{type:`string`},{const:!0}]}},argElementFragmentProperties={kind:{enum:[`string`,`number`,`boolean`,`enum`,`custom`]},presence:{const:`required`},enumValues:{type:`array`,items:{type:`string`}},numberConstraints:{$ref:`#/$defs/numberConstraints`},stringConstraints:{$ref:`#/$defs/stringConstraints`},pathChecks:{$ref:`#/$defs/pathChecks`},valueHint:{type:`string`}},flagElementFragmentProperties={kind:{enum:[`string`,`number`,`boolean`,`enum`,`array`,`custom`,`count`,`keyValue`]},presence:{enum:[`optional`,`required`,`defaulted`]},defaultValue:{},aliases:{type:`array`,items:{type:`string`}},stdin:{$ref:`#/$defs/stdin`},envVar:{type:`string`},configPath:{type:`string`},description:{type:`string`},enumValues:{type:`array`,items:{type:`string`}},numberConstraints:{$ref:`#/$defs/numberConstraints`},stringConstraints:{$ref:`#/$defs/stringConstraints`},elementSchema:{$ref:`#/$defs/flagElement`},separator:{type:`string`,minLength:1},split:{$ref:`#/$defs/split`},duplicateKeys:{enum:[...DUPLICATE_KEYS]},unique:{const:!0},pathChecks:{$ref:`#/$defs/pathChecks`},valueHint:{type:`string`},prompt:{$ref:`#/$defs/prompt`},deprecated:{oneOf:[{type:`string`},{const:!0}]},propagate:{const:!0},negation:{$ref:`#/$defs/negation`},duplicates:{enum:[`last`,`first`,`error`]}},flagFragmentProperties={...flagElementFragmentProperties,defaultDescription:{oneOf:[{type:`string`},{const:!1}]},sensitive:{const:!0}},definitionMetaSchema=withDefinitionMetaSchemaDescriptions({$schema:JSON_SCHEMA_DRAFT,$id:DEFINITION_SCHEMA_URL,title:`@kjanat/dreamcli definition schema`,description:`Describes the structure of a CLI built with dreamcli — commands, flags, args, types, constraints, env bindings, and prompts.`,type:`object`,additionalProperties:!1,properties:{$schema:{const:DEFINITION_SCHEMA_URL},schemaVersion:{const:1},name:{type:`string`},version:{type:`string`},description:{type:`string`},defaultCommand:{$ref:`#/$defs/command`},commands:{type:`array`,items:{$ref:`#/$defs/command`}}},required:[`$schema`,`schemaVersion`,`name`,`commands`],$defs:{command:{type:`object`,additionalProperties:!1,properties:commandFragmentProperties,required:[`name`,`flags`,`args`,`commands`]},commandDocument:{type:`object`,additionalProperties:!1,properties:{schemaVersion:{const:1},...commandFragmentProperties},required:[`schemaVersion`,`name`,`flags`,`args`,`commands`]},flag:{type:`object`,additionalProperties:!1,properties:flagFragmentProperties,required:[`kind`,`presence`]},flagElement:{type:`object`,additionalProperties:!1,properties:flagElementFragmentProperties,required:[`kind`,`presence`]},stdin:{type:`object`,additionalProperties:!1,properties:{when:{enum:[`dash`,`missing`,`dash-or-missing`]},consume:{enum:[`exclusive`,`broadcast`]},trim:{type:`boolean`}},required:[`when`,`consume`]},split:{type:`object`,additionalProperties:!1,properties:{env:{$ref:`#/$defs/splitPolicy`},stdin:{$ref:`#/$defs/splitPolicy`}}},splitPolicy:{type:`object`,additionalProperties:!1,properties:{format:{enum:[`whole`,`delimiter`,`lines`,`json`]},delimiter:{type:`string`,minLength:1}},required:[`format`],oneOf:[{properties:{format:{const:`delimiter`}},required:[`format`,`delimiter`]},{properties:{format:{enum:[`whole`,`lines`,`json`]}},not:{required:[`delimiter`]}}]},negation:{type:`object`,additionalProperties:!1,properties:{alias:{type:`string`},hidden:{const:!0}}},numberConstraints:{type:`object`,additionalProperties:!1,properties:{min:{type:`number`},max:{type:`number`},int:{type:`boolean`},finite:{type:`boolean`}}},stringConstraints:{type:`object`,additionalProperties:!1,properties:{nonEmpty:{type:`boolean`},minLength:{type:`integer`,minimum:0},maxLength:{type:`integer`,minimum:0},pattern:{type:`object`,additionalProperties:!1,properties:{source:{type:`string`},flags:{type:`string`}},required:[`source`,`flags`]}}},pathChecks:{type:`object`,additionalProperties:!1,properties:{mustExist:{type:`boolean`},type:{enum:[`file`,`directory`]},create:{const:!0}},required:[`mustExist`]},argElement:{type:`object`,additionalProperties:!1,properties:argElementFragmentProperties,required:[`kind`,`presence`]},arg:{type:`object`,additionalProperties:!1,properties:{name:{type:`string`},...argValueFragmentProperties},required:[`name`,`kind`,`presence`],anyOf:[{not:{required:[`elementSchema`]}},{properties:{kind:{const:`keyValue`}},required:[`kind`]}]},prompt:{type:`object`,additionalProperties:!1,properties:{kind:{enum:[`confirm`,`input`,`select`,`multiselect`]},message:{type:`string`},placeholder:{type:`string`},choices:{type:`array`,items:{$ref:`#/$defs/choice`}},min:{type:`integer`},max:{type:`integer`}},required:[`kind`,`message`]},choice:{type:`object`,additionalProperties:!1,properties:{value:{type:`string`},label:{type:`string`},description:{type:`string`}},required:[`value`]},example:{type:`object`,additionalProperties:!1,properties:{command:{type:`string`},description:{type:`string`}},required:[`command`]}}},definitionMetaSchemaDescriptions);export{json_schema_exports as a,generateSchema as i,generateCommandSchema as n,generateInputSchema as r,definitionMetaSchema as t};
@@ -0,0 +1,2 @@
1
+ import { C as definitionMetaSchema, D as DEFINITION_SCHEMA_URL, E as generateSchema, O as DEFINITION_SCHEMA_VERSION, S as StdinBindingFragmentV1, T as generateInputSchema, _ as JsonSchemaOptions, a as CommandDefinitionFragmentV1, b as SourceSplitFragmentV1, c as ExampleDefinitionFragmentV1, d as FlagNegationFragmentV1, f as FlagPathChecksFragmentV1, g as InputSchemaProperty, h as InputSchemaDocument, i as CommandDefinitionDocumentV1, l as FlagDefinitionFragmentV1, m as InputSchemaBranch, n as ArgElementFragmentV1, o as DefinitionDocument, p as FlagStringConstraintsFragmentV1, r as CommandDefinitionDocument, s as DefinitionDocumentV1, t as ArgDefinitionFragmentV1, u as FlagElementFragmentV1, v as PromptChoiceFragmentV1, w as generateCommandSchema, x as SplitPolicyFragmentV1, y as PromptDefinitionFragmentV1 } from "./index-DyoaS234.mjs";
2
+ export { type ArgDefinitionFragmentV1, type ArgElementFragmentV1, type CommandDefinitionDocument, type CommandDefinitionDocumentV1, type CommandDefinitionFragmentV1, DEFINITION_SCHEMA_URL, DEFINITION_SCHEMA_VERSION, type DefinitionDocument, type DefinitionDocumentV1, type ExampleDefinitionFragmentV1, type FlagDefinitionFragmentV1, type FlagElementFragmentV1, type FlagNegationFragmentV1, type FlagPathChecksFragmentV1, type FlagStringConstraintsFragmentV1, type InputSchemaBranch, type InputSchemaDocument, type InputSchemaProperty, type JsonSchemaOptions, type PromptChoiceFragmentV1, type PromptDefinitionFragmentV1, type SourceSplitFragmentV1, type SplitPolicyFragmentV1, type StdinBindingFragmentV1, definitionMetaSchema, generateCommandSchema, generateInputSchema, generateSchema };
@@ -0,0 +1 @@
1
+ import{a as DEFINITION_SCHEMA_URL,o as DEFINITION_SCHEMA_VERSION}from"./core-Cp2w8vRq.mjs";import{i as generateSchema,n as generateCommandSchema,r as generateInputSchema,t as definitionMetaSchema}from"./json-schema-C9SzZ7jY.mjs";export{DEFINITION_SCHEMA_URL,DEFINITION_SCHEMA_VERSION,definitionMetaSchema,generateCommandSchema,generateInputSchema,generateSchema};