@kjanat/dreamcli 3.0.0-rc.2 → 3.0.0-rc.20

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 (531) hide show
  1. package/CHANGELOG.md +374 -1
  2. package/README.md +3 -3
  3. package/dist/core/cli/dispatch.d.mts +6 -5
  4. package/dist/core/cli/dispatch.mjs +7 -16
  5. package/dist/core/cli/help-links.d.mts +0 -1
  6. package/dist/core/cli/index.d.mts +213 -16
  7. package/dist/core/cli/index.mjs +174 -43
  8. package/dist/core/cli/planner.d.mts +5 -1
  9. package/dist/core/cli/planner.mjs +19 -13
  10. package/dist/core/cli/plugin.d.mts +1 -1
  11. package/dist/core/cli/propagate.d.mts +1 -1
  12. package/dist/core/cli/root-help.d.mts +2 -1
  13. package/dist/core/cli/root-help.mjs +45 -22
  14. package/dist/core/cli/root-surface.d.mts +12 -1
  15. package/dist/core/cli/root-surface.mjs +2 -1
  16. package/dist/core/cli/runtime-preflight.d.mts +18 -2
  17. package/dist/core/cli/runtime-preflight.mjs +10 -7
  18. package/dist/core/completion/index.d.mts +0 -1
  19. package/dist/core/completion/index.mjs +1 -1
  20. package/dist/core/completion/shells/bash.d.mts +0 -1
  21. package/dist/core/completion/shells/bash.mjs +8 -4
  22. package/dist/core/completion/shells/fish.d.mts +0 -1
  23. package/dist/core/completion/shells/fish.mjs +6 -3
  24. package/dist/core/completion/shells/powershell.d.mts +0 -1
  25. package/dist/core/completion/shells/powershell.mjs +10 -5
  26. package/dist/core/completion/shells/shared.d.mts +13 -2
  27. package/dist/core/completion/shells/shared.mjs +25 -2
  28. package/dist/core/completion/shells/zsh.d.mts +0 -1
  29. package/dist/core/completion/shells/zsh.mjs +11 -4
  30. package/dist/core/config/index.d.mts +44 -14
  31. package/dist/core/config/index.mjs +57 -18
  32. package/dist/core/config/package-json.d.mts +28 -4
  33. package/dist/core/config/package-json.mjs +20 -19
  34. package/dist/core/errors/index.d.mts +3 -3
  35. package/dist/core/execution/index.d.mts +0 -1
  36. package/dist/core/execution/index.mjs +20 -4
  37. package/dist/core/help/ansi.d.mts +11 -5
  38. package/dist/core/help/ansi.mjs +15 -16
  39. package/dist/core/help/index.d.mts +44 -3
  40. package/dist/core/help/index.mjs +130 -68
  41. package/dist/core/help/theme.d.mts +68 -0
  42. package/dist/core/help/theme.mjs +46 -0
  43. package/dist/core/json-schema/index.d.mts +21 -9
  44. package/dist/core/json-schema/index.mjs +316 -87
  45. package/dist/core/json-schema/meta-descriptions.generated.d.mts +55 -38
  46. package/dist/core/json-schema/meta-descriptions.generated.mjs +14 -5
  47. package/dist/core/output/activity.d.mts +0 -1
  48. package/dist/core/output/contracts.d.mts +5 -6
  49. package/dist/core/output/contracts.mjs +2 -2
  50. package/dist/core/output/index.d.mts +38 -2
  51. package/dist/core/output/index.mjs +37 -2
  52. package/dist/core/output/renderers.d.mts +0 -1
  53. package/dist/core/parse/index.d.mts +40 -7
  54. package/dist/core/parse/index.mjs +212 -40
  55. package/dist/core/prompt/index.d.mts +1 -0
  56. package/dist/core/resolve/args.d.mts +1 -1
  57. package/dist/core/resolve/coerce.d.mts +1 -1
  58. package/dist/core/resolve/coerce.mjs +71 -14
  59. package/dist/core/resolve/contracts.d.mts +14 -4
  60. package/dist/core/resolve/errors.d.mts +0 -1
  61. package/dist/core/resolve/flags.d.mts +9 -2
  62. package/dist/core/resolve/flags.mjs +78 -6
  63. package/dist/core/resolve/index.d.mts +2 -2
  64. package/dist/core/resolve/index.mjs +6 -1
  65. package/dist/core/resolve/property.d.mts +4 -1
  66. package/dist/core/resolve/property.mjs +11 -3
  67. package/dist/core/resolve/standard.d.mts +24 -0
  68. package/dist/core/resolve/standard.mjs +114 -0
  69. package/dist/core/schema/activity.d.mts +31 -11
  70. package/dist/core/schema/arg.d.mts +38 -4
  71. package/dist/core/schema/arg.mjs +5 -2
  72. package/dist/core/schema/command.d.mts +57 -13
  73. package/dist/core/schema/command.mjs +41 -17
  74. package/dist/core/schema/flag.d.mts +553 -19
  75. package/dist/core/schema/flag.mjs +261 -5
  76. package/dist/core/schema/index.d.mts +6 -3
  77. package/dist/core/schema/middleware.d.mts +4 -3
  78. package/dist/core/schema/prompt.d.mts +6 -3
  79. package/dist/core/schema/run.d.mts +27 -1
  80. package/dist/core/schema/standard.d.mts +100 -0
  81. package/dist/core/schema/standard.mjs +15 -0
  82. package/dist/core/schema/string-constraints.d.mts +97 -0
  83. package/dist/core/schema/string-constraints.mjs +69 -0
  84. package/dist/core/schema/value-parsers.d.mts +78 -0
  85. package/dist/core/schema/value-parsers.mjs +142 -0
  86. package/dist/core/testkit/index.d.mts +0 -31
  87. package/dist/core/testkit/index.mjs +1 -1
  88. package/dist/index.d.mts +12 -7
  89. package/dist/index.mjs +9 -9
  90. package/dist/runtime/adapter.d.mts +71 -2
  91. package/dist/runtime/adapter.mjs +11 -1
  92. package/dist/runtime/auto.d.mts +2 -3
  93. package/dist/runtime/auto.mjs +4 -5
  94. package/dist/runtime/deno.d.mts +28 -5
  95. package/dist/runtime/deno.mjs +49 -1
  96. package/dist/runtime/index.d.mts +3 -4
  97. package/dist/runtime/node.d.mts +8 -2
  98. package/dist/runtime/node.mjs +60 -1
  99. package/dist/runtime.d.mts +4 -4
  100. package/dist/runtime.mjs +2 -3
  101. package/dist/testkit.d.mts +1 -0
  102. package/dist/version.d.mts +7 -3
  103. package/dist/version.mjs +2 -2
  104. package/dreamcli.schema.json +118 -7
  105. package/examples/gh/node_modules/typescript/LICENSE +55 -0
  106. package/examples/gh/node_modules/typescript/NOTICE.txt +436 -0
  107. package/examples/gh/node_modules/typescript/README.md +49 -0
  108. package/examples/gh/node_modules/typescript/bin/tsc +2 -0
  109. package/examples/gh/node_modules/typescript/dist/api/async/api.d.ts +529 -0
  110. package/examples/gh/node_modules/typescript/dist/api/async/api.d.ts.map +1 -0
  111. package/examples/gh/node_modules/typescript/dist/api/async/api.js +1657 -0
  112. package/examples/gh/node_modules/typescript/dist/api/async/api.js.map +1 -0
  113. package/examples/gh/node_modules/typescript/dist/api/async/client.d.ts +39 -0
  114. package/examples/gh/node_modules/typescript/dist/api/async/client.d.ts.map +1 -0
  115. package/examples/gh/node_modules/typescript/dist/api/async/client.js +211 -0
  116. package/examples/gh/node_modules/typescript/dist/api/async/client.js.map +1 -0
  117. package/examples/gh/node_modules/typescript/dist/api/async/types.d.ts +310 -0
  118. package/examples/gh/node_modules/typescript/dist/api/async/types.d.ts.map +1 -0
  119. package/examples/gh/node_modules/typescript/dist/api/async/types.js +2 -0
  120. package/examples/gh/node_modules/typescript/dist/api/async/types.js.map +1 -0
  121. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.d.ts +109 -0
  122. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.d.ts.map +1 -0
  123. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.js +2 -0
  124. package/examples/gh/node_modules/typescript/dist/api/compilerOptions.js.map +1 -0
  125. package/examples/gh/node_modules/typescript/dist/api/fs.d.ts +23 -0
  126. package/examples/gh/node_modules/typescript/dist/api/fs.d.ts.map +1 -0
  127. package/examples/gh/node_modules/typescript/dist/api/fs.js +109 -0
  128. package/examples/gh/node_modules/typescript/dist/api/fs.js.map +1 -0
  129. package/examples/gh/node_modules/typescript/dist/api/node/encoder.d.ts +15 -0
  130. package/examples/gh/node_modules/typescript/dist/api/node/encoder.d.ts.map +1 -0
  131. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.d.ts +5 -0
  132. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.d.ts.map +1 -0
  133. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.js +74 -0
  134. package/examples/gh/node_modules/typescript/dist/api/node/encoder.generated.js.map +1 -0
  135. package/examples/gh/node_modules/typescript/dist/api/node/encoder.js +287 -0
  136. package/examples/gh/node_modules/typescript/dist/api/node/encoder.js.map +1 -0
  137. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.d.ts +32 -0
  138. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.d.ts.map +1 -0
  139. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.js +213 -0
  140. package/examples/gh/node_modules/typescript/dist/api/node/msgpack.js.map +1 -0
  141. package/examples/gh/node_modules/typescript/dist/api/node/node.d.ts +76 -0
  142. package/examples/gh/node_modules/typescript/dist/api/node/node.d.ts.map +1 -0
  143. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.d.ts +182 -0
  144. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.d.ts.map +1 -0
  145. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.js +835 -0
  146. package/examples/gh/node_modules/typescript/dist/api/node/node.generated.js.map +1 -0
  147. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.d.ts +62 -0
  148. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map +1 -0
  149. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.js +122 -0
  150. package/examples/gh/node_modules/typescript/dist/api/node/node.infrastructure.js.map +1 -0
  151. package/examples/gh/node_modules/typescript/dist/api/node/node.js +298 -0
  152. package/examples/gh/node_modules/typescript/dist/api/node/node.js.map +1 -0
  153. package/examples/gh/node_modules/typescript/dist/api/node/protocol.d.ts +29 -0
  154. package/examples/gh/node_modules/typescript/dist/api/node/protocol.d.ts.map +1 -0
  155. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.d.ts +4 -0
  156. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.d.ts.map +1 -0
  157. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.js +241 -0
  158. package/examples/gh/node_modules/typescript/dist/api/node/protocol.generated.js.map +1 -0
  159. package/examples/gh/node_modules/typescript/dist/api/node/protocol.js +30 -0
  160. package/examples/gh/node_modules/typescript/dist/api/node/protocol.js.map +1 -0
  161. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.d.ts +6 -0
  162. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.d.ts.map +1 -0
  163. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.js +61 -0
  164. package/examples/gh/node_modules/typescript/dist/api/node/wtf8.js.map +1 -0
  165. package/examples/gh/node_modules/typescript/dist/api/options.d.ts +32 -0
  166. package/examples/gh/node_modules/typescript/dist/api/options.d.ts.map +1 -0
  167. package/examples/gh/node_modules/typescript/dist/api/options.js +11 -0
  168. package/examples/gh/node_modules/typescript/dist/api/options.js.map +1 -0
  169. package/examples/gh/node_modules/typescript/dist/api/path.d.ts +110 -0
  170. package/examples/gh/node_modules/typescript/dist/api/path.d.ts.map +1 -0
  171. package/examples/gh/node_modules/typescript/dist/api/path.js +508 -0
  172. package/examples/gh/node_modules/typescript/dist/api/path.js.map +1 -0
  173. package/examples/gh/node_modules/typescript/dist/api/proto.d.ts +239 -0
  174. package/examples/gh/node_modules/typescript/dist/api/proto.d.ts.map +1 -0
  175. package/examples/gh/node_modules/typescript/dist/api/proto.js +37 -0
  176. package/examples/gh/node_modules/typescript/dist/api/proto.js.map +1 -0
  177. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.d.ts +79 -0
  178. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.d.ts.map +1 -0
  179. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.js +169 -0
  180. package/examples/gh/node_modules/typescript/dist/api/sourceFileCache.js.map +1 -0
  181. package/examples/gh/node_modules/typescript/dist/api/sync/api.d.ts +529 -0
  182. package/examples/gh/node_modules/typescript/dist/api/sync/api.d.ts.map +1 -0
  183. package/examples/gh/node_modules/typescript/dist/api/sync/api.js +1665 -0
  184. package/examples/gh/node_modules/typescript/dist/api/sync/api.js.map +1 -0
  185. package/examples/gh/node_modules/typescript/dist/api/sync/client.d.ts +30 -0
  186. package/examples/gh/node_modules/typescript/dist/api/sync/client.d.ts.map +1 -0
  187. package/examples/gh/node_modules/typescript/dist/api/sync/client.js +124 -0
  188. package/examples/gh/node_modules/typescript/dist/api/sync/client.js.map +1 -0
  189. package/examples/gh/node_modules/typescript/dist/api/sync/types.d.ts +310 -0
  190. package/examples/gh/node_modules/typescript/dist/api/sync/types.d.ts.map +1 -0
  191. package/examples/gh/node_modules/typescript/dist/api/sync/types.js +2 -0
  192. package/examples/gh/node_modules/typescript/dist/api/sync/types.js.map +1 -0
  193. package/examples/gh/node_modules/typescript/dist/api/syncChannel.d.ts +114 -0
  194. package/examples/gh/node_modules/typescript/dist/api/syncChannel.d.ts.map +1 -0
  195. package/examples/gh/node_modules/typescript/dist/api/syncChannel.js +508 -0
  196. package/examples/gh/node_modules/typescript/dist/api/syncChannel.js.map +1 -0
  197. package/examples/gh/node_modules/typescript/dist/api/timing.d.ts +175 -0
  198. package/examples/gh/node_modules/typescript/dist/api/timing.d.ts.map +1 -0
  199. package/examples/gh/node_modules/typescript/dist/api/timing.js +149 -0
  200. package/examples/gh/node_modules/typescript/dist/api/timing.js.map +1 -0
  201. package/examples/gh/node_modules/typescript/dist/ast/ast.d.ts +100 -0
  202. package/examples/gh/node_modules/typescript/dist/ast/ast.d.ts.map +1 -0
  203. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.d.ts +1161 -0
  204. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.d.ts.map +1 -0
  205. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.js +4 -0
  206. package/examples/gh/node_modules/typescript/dist/ast/ast.generated.js.map +1 -0
  207. package/examples/gh/node_modules/typescript/dist/ast/ast.js +7 -0
  208. package/examples/gh/node_modules/typescript/dist/ast/ast.js.map +1 -0
  209. package/examples/gh/node_modules/typescript/dist/ast/astnav.d.ts +19 -0
  210. package/examples/gh/node_modules/typescript/dist/ast/astnav.d.ts.map +1 -0
  211. package/examples/gh/node_modules/typescript/dist/ast/astnav.js +596 -0
  212. package/examples/gh/node_modules/typescript/dist/ast/astnav.js.map +1 -0
  213. package/examples/gh/node_modules/typescript/dist/ast/clone.d.ts +16 -0
  214. package/examples/gh/node_modules/typescript/dist/ast/clone.d.ts.map +1 -0
  215. package/examples/gh/node_modules/typescript/dist/ast/clone.js +104 -0
  216. package/examples/gh/node_modules/typescript/dist/ast/clone.js.map +1 -0
  217. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.d.ts +520 -0
  218. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.d.ts.map +1 -0
  219. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.js +3057 -0
  220. package/examples/gh/node_modules/typescript/dist/ast/factory.generated.js.map +1 -0
  221. package/examples/gh/node_modules/typescript/dist/ast/index.d.ts +20 -0
  222. package/examples/gh/node_modules/typescript/dist/ast/index.d.ts.map +1 -0
  223. package/examples/gh/node_modules/typescript/dist/ast/index.js +20 -0
  224. package/examples/gh/node_modules/typescript/dist/ast/index.js.map +1 -0
  225. package/examples/gh/node_modules/typescript/dist/ast/is.d.ts +35 -0
  226. package/examples/gh/node_modules/typescript/dist/ast/is.d.ts.map +1 -0
  227. package/examples/gh/node_modules/typescript/dist/ast/is.generated.d.ts +329 -0
  228. package/examples/gh/node_modules/typescript/dist/ast/is.generated.d.ts.map +1 -0
  229. package/examples/gh/node_modules/typescript/dist/ast/is.generated.js +1103 -0
  230. package/examples/gh/node_modules/typescript/dist/ast/is.generated.js.map +1 -0
  231. package/examples/gh/node_modules/typescript/dist/ast/is.js +233 -0
  232. package/examples/gh/node_modules/typescript/dist/ast/is.js.map +1 -0
  233. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.d.ts +11 -0
  234. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.d.ts.map +1 -0
  235. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.js +202 -0
  236. package/examples/gh/node_modules/typescript/dist/ast/jsdoc.js.map +1 -0
  237. package/examples/gh/node_modules/typescript/dist/ast/scanner.d.ts +97 -0
  238. package/examples/gh/node_modules/typescript/dist/ast/scanner.d.ts.map +1 -0
  239. package/examples/gh/node_modules/typescript/dist/ast/scanner.js +2230 -0
  240. package/examples/gh/node_modules/typescript/dist/ast/scanner.js.map +1 -0
  241. package/examples/gh/node_modules/typescript/dist/ast/utils.d.ts +17 -0
  242. package/examples/gh/node_modules/typescript/dist/ast/utils.d.ts.map +1 -0
  243. package/examples/gh/node_modules/typescript/dist/ast/utils.js +67 -0
  244. package/examples/gh/node_modules/typescript/dist/ast/utils.js.map +1 -0
  245. package/examples/gh/node_modules/typescript/dist/ast/visitor.d.ts +14 -0
  246. package/examples/gh/node_modules/typescript/dist/ast/visitor.d.ts.map +1 -0
  247. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.d.ts +50 -0
  248. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.d.ts.map +1 -0
  249. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.js +978 -0
  250. package/examples/gh/node_modules/typescript/dist/ast/visitor.generated.js.map +1 -0
  251. package/examples/gh/node_modules/typescript/dist/ast/visitor.js +47 -0
  252. package/examples/gh/node_modules/typescript/dist/ast/visitor.js.map +1 -0
  253. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.d.ts +2 -0
  254. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.d.ts.map +1 -0
  255. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.d.ts +129 -0
  256. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map +1 -0
  257. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.js +132 -0
  258. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.enum.js.map +1 -0
  259. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.js +130 -0
  260. package/examples/gh/node_modules/typescript/dist/enums/characterCodes.js.map +1 -0
  261. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.d.ts +2 -0
  262. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map +1 -0
  263. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts +5 -0
  264. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map +1 -0
  265. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.js +6 -0
  266. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map +1 -0
  267. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.js +6 -0
  268. package/examples/gh/node_modules/typescript/dist/enums/commentDirectiveType.js.map +1 -0
  269. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.d.ts +2 -0
  270. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.d.ts.map +1 -0
  271. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts +28 -0
  272. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map +1 -0
  273. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.js +30 -0
  274. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.enum.js.map +1 -0
  275. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.js +30 -0
  276. package/examples/gh/node_modules/typescript/dist/enums/completionItemKind.js.map +1 -0
  277. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.d.ts +2 -0
  278. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map +1 -0
  279. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts +7 -0
  280. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map +1 -0
  281. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.js +9 -0
  282. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map +1 -0
  283. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.js +9 -0
  284. package/examples/gh/node_modules/typescript/dist/enums/diagnosticCategory.js.map +1 -0
  285. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.d.ts +2 -0
  286. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.d.ts.map +1 -0
  287. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.d.ts +12 -0
  288. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map +1 -0
  289. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.js +14 -0
  290. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.enum.js.map +1 -0
  291. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.js +14 -0
  292. package/examples/gh/node_modules/typescript/dist/enums/elementFlags.js.map +1 -0
  293. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.d.ts +2 -0
  294. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.d.ts.map +1 -0
  295. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts +23 -0
  296. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map +1 -0
  297. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.js +25 -0
  298. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.enum.js.map +1 -0
  299. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.js +25 -0
  300. package/examples/gh/node_modules/typescript/dist/enums/internalSymbolName.js.map +1 -0
  301. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.d.ts +2 -0
  302. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.d.ts.map +1 -0
  303. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts +9 -0
  304. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map +1 -0
  305. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.js +11 -0
  306. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.enum.js.map +1 -0
  307. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.js +11 -0
  308. package/examples/gh/node_modules/typescript/dist/enums/jsxEmit.js.map +1 -0
  309. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.d.ts +2 -0
  310. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.d.ts.map +1 -0
  311. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.d.ts +5 -0
  312. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map +1 -0
  313. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.js +6 -0
  314. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.enum.js.map +1 -0
  315. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.js +6 -0
  316. package/examples/gh/node_modules/typescript/dist/enums/languageVariant.js.map +1 -0
  317. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.d.ts +2 -0
  318. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.d.ts.map +1 -0
  319. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts +42 -0
  320. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map +1 -0
  321. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.js +44 -0
  322. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.enum.js.map +1 -0
  323. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.js +44 -0
  324. package/examples/gh/node_modules/typescript/dist/enums/modifierFlags.js.map +1 -0
  325. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts +2 -0
  326. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map +1 -0
  327. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts +7 -0
  328. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map +1 -0
  329. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js +9 -0
  330. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map +1 -0
  331. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.js +9 -0
  332. package/examples/gh/node_modules/typescript/dist/enums/moduleDetectionKind.js.map +1 -0
  333. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.d.ts +2 -0
  334. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.d.ts.map +1 -0
  335. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.d.ts +17 -0
  336. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map +1 -0
  337. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.js +19 -0
  338. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.enum.js.map +1 -0
  339. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.js +19 -0
  340. package/examples/gh/node_modules/typescript/dist/enums/moduleKind.js.map +1 -0
  341. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts +2 -0
  342. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map +1 -0
  343. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts +9 -0
  344. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map +1 -0
  345. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js +11 -0
  346. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map +1 -0
  347. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.js +11 -0
  348. package/examples/gh/node_modules/typescript/dist/enums/moduleResolutionKind.js.map +1 -0
  349. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.d.ts +2 -0
  350. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.d.ts.map +1 -0
  351. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.d.ts +6 -0
  352. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map +1 -0
  353. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.js +8 -0
  354. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.enum.js.map +1 -0
  355. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.js +8 -0
  356. package/examples/gh/node_modules/typescript/dist/enums/newLineKind.js.map +1 -0
  357. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts +2 -0
  358. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map +1 -0
  359. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts +36 -0
  360. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map +1 -0
  361. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js +38 -0
  362. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map +1 -0
  363. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.js +38 -0
  364. package/examples/gh/node_modules/typescript/dist/enums/nodeBuilderFlags.js.map +1 -0
  365. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.d.ts +2 -0
  366. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.d.ts.map +1 -0
  367. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts +44 -0
  368. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map +1 -0
  369. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.js +46 -0
  370. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.enum.js.map +1 -0
  371. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.js +46 -0
  372. package/examples/gh/node_modules/typescript/dist/enums/nodeFlags.js.map +1 -0
  373. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.d.ts +2 -0
  374. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.d.ts.map +1 -0
  375. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.d.ts +50 -0
  376. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map +1 -0
  377. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.js +52 -0
  378. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.enum.js.map +1 -0
  379. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.js +52 -0
  380. package/examples/gh/node_modules/typescript/dist/enums/objectFlags.js.map +1 -0
  381. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts +2 -0
  382. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map +1 -0
  383. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts +16 -0
  384. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map +1 -0
  385. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js +18 -0
  386. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map +1 -0
  387. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.js +18 -0
  388. package/examples/gh/node_modules/typescript/dist/enums/outerExpressionKinds.js.map +1 -0
  389. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts +2 -0
  390. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map +1 -0
  391. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts +13 -0
  392. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map +1 -0
  393. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js +14 -0
  394. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map +1 -0
  395. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.js +14 -0
  396. package/examples/gh/node_modules/typescript/dist/enums/regularExpressionFlags.js.map +1 -0
  397. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.d.ts +2 -0
  398. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.d.ts.map +1 -0
  399. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.d.ts +11 -0
  400. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map +1 -0
  401. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.js +12 -0
  402. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.enum.js.map +1 -0
  403. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.js +12 -0
  404. package/examples/gh/node_modules/typescript/dist/enums/scriptKind.js.map +1 -0
  405. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.d.ts +2 -0
  406. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.d.ts.map +1 -0
  407. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts +17 -0
  408. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map +1 -0
  409. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.js +18 -0
  410. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.enum.js.map +1 -0
  411. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.js +18 -0
  412. package/examples/gh/node_modules/typescript/dist/enums/scriptTarget.js.map +1 -0
  413. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.d.ts +2 -0
  414. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.d.ts.map +1 -0
  415. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts +15 -0
  416. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map +1 -0
  417. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.js +17 -0
  418. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.enum.js.map +1 -0
  419. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.js +17 -0
  420. package/examples/gh/node_modules/typescript/dist/enums/signatureFlags.js.map +1 -0
  421. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.d.ts +2 -0
  422. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.d.ts.map +1 -0
  423. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.d.ts +5 -0
  424. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map +1 -0
  425. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.js +7 -0
  426. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.enum.js.map +1 -0
  427. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.js +7 -0
  428. package/examples/gh/node_modules/typescript/dist/enums/signatureKind.js.map +1 -0
  429. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.d.ts +2 -0
  430. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.d.ts.map +1 -0
  431. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts +71 -0
  432. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map +1 -0
  433. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.js +73 -0
  434. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.enum.js.map +1 -0
  435. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.js +73 -0
  436. package/examples/gh/node_modules/typescript/dist/enums/symbolFlags.js.map +1 -0
  437. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.d.ts +2 -0
  438. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.d.ts.map +1 -0
  439. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts +389 -0
  440. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map +1 -0
  441. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.js +391 -0
  442. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.enum.js.map +1 -0
  443. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.js +391 -0
  444. package/examples/gh/node_modules/typescript/dist/enums/syntaxKind.js.map +1 -0
  445. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.d.ts +2 -0
  446. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.d.ts.map +1 -0
  447. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts +30 -0
  448. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map +1 -0
  449. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.js +32 -0
  450. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.enum.js.map +1 -0
  451. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.js +32 -0
  452. package/examples/gh/node_modules/typescript/dist/enums/tokenFlags.js.map +1 -0
  453. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.d.ts +2 -0
  454. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.d.ts.map +1 -0
  455. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.d.ts +76 -0
  456. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map +1 -0
  457. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.js +78 -0
  458. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.enum.js.map +1 -0
  459. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.js +78 -0
  460. package/examples/gh/node_modules/typescript/dist/enums/typeFlags.js.map +1 -0
  461. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.d.ts +2 -0
  462. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.d.ts.map +1 -0
  463. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts +7 -0
  464. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map +1 -0
  465. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.js +9 -0
  466. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.enum.js.map +1 -0
  467. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.js +9 -0
  468. package/examples/gh/node_modules/typescript/dist/enums/typePredicateKind.js.map +1 -0
  469. package/examples/gh/node_modules/typescript/dist/internal/utils.d.ts +23 -0
  470. package/examples/gh/node_modules/typescript/dist/internal/utils.d.ts.map +1 -0
  471. package/examples/gh/node_modules/typescript/dist/internal/utils.js +25 -0
  472. package/examples/gh/node_modules/typescript/dist/internal/utils.js.map +1 -0
  473. package/examples/gh/node_modules/typescript/lib/getExePath.d.ts +2 -0
  474. package/examples/gh/node_modules/typescript/lib/getExePath.js +70 -0
  475. package/examples/gh/node_modules/typescript/lib/tsc.js +28 -0
  476. package/examples/gh/node_modules/typescript/lib/version.cjs +3 -0
  477. package/examples/gh/node_modules/typescript/lib/version.d.cts +2 -0
  478. package/examples/gh/node_modules/typescript/package.json +87 -0
  479. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/License.txt +11 -0
  480. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/README.md +54 -0
  481. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts +17 -0
  482. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js +83 -0
  483. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts +22 -0
  484. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js +210 -0
  485. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts +14 -0
  486. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js +87 -0
  487. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts +32 -0
  488. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js +132 -0
  489. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts +367 -0
  490. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js +1271 -0
  491. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts +9 -0
  492. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js +16 -0
  493. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts +52 -0
  494. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js +70 -0
  495. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts +39 -0
  496. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js +135 -0
  497. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts +7 -0
  498. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js +34 -0
  499. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts +55 -0
  500. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js +412 -0
  501. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts +18 -0
  502. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js +155 -0
  503. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts +77 -0
  504. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js +246 -0
  505. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts +60 -0
  506. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js +157 -0
  507. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts +369 -0
  508. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js +436 -0
  509. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts +74 -0
  510. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js +23 -0
  511. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts +10 -0
  512. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js +74 -0
  513. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts +15 -0
  514. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +77 -0
  515. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts +58 -0
  516. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js +289 -0
  517. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts +12 -0
  518. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js +163 -0
  519. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/package.json +54 -0
  520. package/examples/gh/node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts +5 -0
  521. package/examples/gh/package.json +11 -5
  522. package/examples/gh/src/main.ts +10 -4
  523. package/examples/pwsh-demo/package.json +1 -1
  524. package/examples/pwsh-demo/src/main.ts +1 -1
  525. package/package.json +45 -41
  526. package/dist/core/schema-dsl/runtime.d.mts +0 -144
  527. package/dist/core/schema-dsl/runtime.mjs +0 -271
  528. package/dist/core/schema-dsl/to-json-schema.d.mts +0 -30
  529. package/dist/core/schema-dsl/to-json-schema.mjs +0 -74
  530. package/dist/runtime/bun.d.mts +0 -28
  531. package/dist/runtime/bun.mjs +0 -28
@@ -19,13 +19,12 @@
19
19
  "typecheck": "tsc --noEmit"
20
20
  },
21
21
  "dependencies": {
22
- "@kjanat/dreamcli": "link:@kjanat/dreamcli"
22
+ "@kjanat/dreamcli": "file:../.."
23
23
  },
24
24
  "devDependencies": {
25
- "@types/bun": "catalog:",
26
- "typescript": "catalog:"
25
+ "@types/bun": "latest",
26
+ "typescript": "latest"
27
27
  },
28
- "packageManager": "bun@1.3.12",
29
28
  "engines": {
30
29
  "bun": "^1.3"
31
30
  },
@@ -34,6 +33,13 @@
34
33
  "name": "bun",
35
34
  "version": "^1.3",
36
35
  "onFail": "error"
37
- }
36
+ },
37
+ "packageManager": [
38
+ {
39
+ "name": "bun",
40
+ "onFail": "error",
41
+ "version": "^1.3"
42
+ }
43
+ ]
38
44
  }
39
45
  }
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env bun
2
+ // oxlint-disable no-unused-vars | CLIBuilder is used for type inference of the JSDoc comments
3
+ // deno-lint-ignore-file no-unused-vars
2
4
  /**
3
5
  * Walkthrough example package entrypoint for a miniature `gh` clone.
4
6
  *
@@ -16,7 +18,6 @@
16
18
  * @module
17
19
  */
18
20
 
19
- // oxlint-disable-next-line no-unused-vars -- for CLIBuilder type in JSDoc
20
21
  import type { CLIBuilder } from '@kjanat/dreamcli';
21
22
  import { cli } from '@kjanat/dreamcli';
22
23
 
@@ -27,12 +28,17 @@ import { pr } from './commands/pr.ts';
27
28
  /**
28
29
  * Create the example CLI and register commands.
29
30
  *
30
- * {@linkcode CLIBuilder.packageJson | packageJson()} fills `version` and `description` from the nearest `package.json`.\
31
- * The CLI name still comes from `cli('gh')` unless `packageJson({ inferName: true })` is used.
31
+ * {@linkcode CLIBuilder.manifest | manifest()} fills `version` and `description` from this package's manifest.\
32
+ * The CLI name still comes from `cli('gh')` unless `manifest({ inferName: true })` is used.
32
33
  *
33
34
  * Command registration order determines the order shown in `--help`.
34
35
  */
35
- export const gh = cli('gh').packageJson().command(auth).command(pr).command(issue).completions();
36
+ export const gh = cli('gh')
37
+ .manifest({ from: import.meta, files: ['package.json'] })
38
+ .command(auth)
39
+ .command(pr)
40
+ .command(issue)
41
+ .completions();
36
42
 
37
43
  // Run the CLI if this file is executed directly (e.g. `bun src/main.ts ...`).
38
44
  if (import.meta.main) {
@@ -21,7 +21,7 @@
21
21
  "typecheck": "tsc --noEmit"
22
22
  },
23
23
  "dependencies": {
24
- "@kjanat/dreamcli": "link:@kjanat/dreamcli"
24
+ "@kjanat/dreamcli": "file:../.."
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/bun": "catalog:",
@@ -127,7 +127,7 @@ const debugDump = command('debug-dump')
127
127
  * PowerShell completion playground CLI used by docs, smoke checks, and manual shell testing.
128
128
  */
129
129
  export const pwshDemo = cli('pwsh-demo')
130
- .packageJson()
130
+ .manifest({ from: import.meta.url })
131
131
  .default(open)
132
132
  .command(deploy)
133
133
  .command(status)
package/package.json CHANGED
@@ -1,8 +1,16 @@
1
1
  {
2
2
  "name": "@kjanat/dreamcli",
3
- "version": "3.0.0-rc.2",
3
+ "version": "3.0.0-rc.20",
4
4
  "description": "Schema-first, fully typed TypeScript CLI framework",
5
- "keywords": ["dreamcli", "cli", "typescript", "framework", "schema-first", "command-line"],
5
+ "keywords": [
6
+ "dreamcli",
7
+ "cli",
8
+ "typescript",
9
+ "framework",
10
+ "schema-first",
11
+ "command-line",
12
+ "ansispeck"
13
+ ],
6
14
  "homepage": "https://dreamcli.kjanat.dev",
7
15
  "bugs": {
8
16
  "url": "https://github.com/kjanat/dreamcli/issues"
@@ -39,6 +47,10 @@
39
47
  "types": "./dist/testkit.d.mts",
40
48
  "default": "./dist/testkit.mjs"
41
49
  },
50
+ "./version": {
51
+ "types": "./dist/version.d.mts",
52
+ "default": "./dist/version.mjs"
53
+ },
42
54
  "./package.json": "./package.json",
43
55
  "./schema": "./dreamcli.schema.json"
44
56
  },
@@ -50,7 +62,7 @@
50
62
  "!**/.cache",
51
63
  "!**/AGENTS.md"
52
64
  ],
53
- "workspaces": ["./examples/*"],
65
+ "workspaces": ["./examples/*", "./docs"],
54
66
  "scripts": {
55
67
  "bd": "run build",
56
68
  "build": "bun --bun tsdown",
@@ -58,13 +70,14 @@
58
70
  "ci": "run -pk typecheck lint format:check meta-descriptions:check test docs:build bd",
59
71
  "coverage": "vitest run --coverage",
60
72
  "dev": "run -p build:watch docs:dev",
61
- "docs:build": "bun --bun vitepress build docs",
62
- "docs:deploy": "wrangler deploy",
63
- "docs:dev": "bun --bun vitepress dev docs --host --port ${PORT:-5173}",
64
- "docs:preview": "bun --bun vitepress preview docs",
65
- "docs:upload": "wrangler versions upload",
66
- "fmt": "dprint fmt",
73
+ "docs:build": "run --dir docs build",
74
+ "docs:deploy": "run --dir docs deploy",
75
+ "docs:dev": "run --dir docs dev",
76
+ "docs:preview": "run --dir docs preview",
77
+ "docs:upload": "run --dir docs upload",
78
+ "fmt": "run -s lint:fix fmt:dprint",
67
79
  "fmt:autofix": "dprint fmt --allow-no-files --excludes .github",
80
+ "fmt:dprint": "dprint fmt",
68
81
  "fmt:update": "dprint config update --yes --recursive",
69
82
  "format": "dprint fmt",
70
83
  "format:check": "dprint check",
@@ -75,12 +88,13 @@
75
88
  "gh-project:start": "bun gh-project start",
76
89
  "gh-project:sync": "bun gh-project sync",
77
90
  "knip": "knip",
78
- "lint": "biome lint",
91
+ "lint": "biome check",
79
92
  "lint:autofix": "biome check --skip-parse-errors --no-errors-on-unmatched --changed --write",
80
- "lint:fix": "biome lint --fix",
93
+ "lint:fix": "biome check --fix",
81
94
  "meta-descriptions": "bun --bun scripts/build-meta-descriptions.ts",
82
95
  "meta-descriptions:check": "bun --bun scripts/build-meta-descriptions.ts --check",
83
96
  "prepack": "bun --bun tsdown --logLevel silent",
97
+ "prepare": "importmapify",
84
98
  "publish:preview": "bunx pkg-pr-new publish --bun --comment=update --packageManager=bun,npm",
85
99
  "schema:emit": "bun scripts/emit-definition-schema.ts",
86
100
  "test": "vitest run",
@@ -88,42 +102,31 @@
88
102
  "test:gh": "run --dir examples/gh test",
89
103
  "test:node": "npx -y vitest run",
90
104
  "test:watch": "vitest",
91
- "typecheck": "tsgo --noEmit",
105
+ "typecheck": "bunx @typescript/native --noEmit",
92
106
  "typecheck:gh": "run --dir examples/gh typecheck",
93
- "typecheck:tsc": "tsc --noEmit",
94
- "upgrade": "bun update --latest && bun add -D vitepress@next",
107
+ "upgrade": "bun update --latest && bun --cwd docs add -D vitepress@next",
95
108
  "version:check": "bun scripts/check-version-sync.ts"
96
109
  },
97
- "overrides": {
98
- "vitepress": "next"
99
- },
100
110
  "dependencies": {
101
- "ansispeck": "^0.1.2"
111
+ "ansispeck": "^0.4.1"
102
112
  },
103
113
  "devDependencies": {
104
- "@arethetypeswrong/core": "^0.18.4",
105
- "@biomejs/biome": "^2.5.2",
114
+ "@arethetypeswrong/core": "^0.18.5",
106
115
  "@iarna/toml": "^2.2.5",
107
- "@shikijs/transformers": "^4.3.1",
108
- "@shikijs/vitepress-twoslash": "^4.3.1",
109
116
  "@types/bun": "^1.3.14",
110
117
  "@types/deno": "^2.7.0",
111
- "@types/node": ">=26.1.0",
112
- "@typescript/native-preview": "^7.0.0-dev.20260705.1",
113
- "@vitest/coverage-v8": "^4.1.9",
118
+ "@types/node": ">=26.1.1",
119
+ "@typescript/native": "npm:typescript@^7",
120
+ "@vitest/coverage-v8": "^4.1.10",
121
+ "biome": "npm:@biomejs/biome@^2.5.4",
114
122
  "dprint": "^0.55.1",
115
- "floating-vue": "^5.2.2",
116
- "knip": "^6.24.0",
117
- "mermaid": "^11.16.0",
123
+ "importmapify": "1.6.0",
124
+ "knip": "^6.25.0",
118
125
  "publint": "^0.3.21",
119
- "runner-run": "0.19.1",
120
- "tsdown": "^0.22.3",
121
- "typedoc": "^0.28.19",
122
- "typescript": "^6.0.3",
123
- "vite": "^8.1.3",
124
- "vitepress": "^2.0.0-alpha.17",
125
- "vitest": "^4.1.9",
126
- "wrangler": "^4.107.0",
126
+ "runner-run": "0.20.0",
127
+ "tsdown": "^0.22.9",
128
+ "typescript": ">=6,<7",
129
+ "vitest": "^4.1.10",
127
130
  "yaml": "^2.9.0"
128
131
  },
129
132
  "packageManager": "bun@1.3.14",
@@ -143,16 +146,17 @@
143
146
  }
144
147
  },
145
148
  "volta": {
146
- "node": "26.4.0",
149
+ "node": "26.5.0",
147
150
  "npm": "11.18.0"
148
151
  },
149
152
  "publishConfig": {
150
- "access": "public",
151
- "provenance": true
153
+ "access": "public"
152
154
  },
153
155
  "catalog": {
154
156
  "@types/bun": "^1.3.14",
155
- "@types/node": ">=26.1.0",
156
- "typescript": "^6.0.3"
157
+ "@types/node": ">=26.1.1",
158
+ "@typescript/native": "npm:typescript@^7",
159
+ "typescript": ">=6,<7",
160
+ "vitest": "^4.1.10"
157
161
  }
158
162
  }
@@ -1,144 +0,0 @@
1
- //#region src/core/schema-dsl/runtime.d.ts
2
- /**
3
- * Runtime schema string parser.
4
- *
5
- * Parses the same string literals as the compile-time {@link Parse} type,
6
- * producing a runtime AST ({@link SchemaNode}) that mirrors the inferred
7
- * TypeScript type. The AST can drive JSON Schema generation, validation,
8
- * and introspection — all from the same source string.
9
- *
10
- * Grammar (matches the type-level parser in `parse.ts`):
11
- * ```
12
- * value = union
13
- * union = postfix ('|' postfix)*
14
- * postfix = primary ('[]')*
15
- * primary = object | record | ref | literal | IDENT
16
- * object = '{' properties '}'
17
- * properties = (property ';')* property? ';'?
18
- * property = IDENT '?'? ':' value
19
- * record = 'Record' '<' value ',' value '>'
20
- * ref = '@' IDENT
21
- * literal = "'" CHARS "'"
22
- * ```
23
- *
24
- * @module dreamcli/core/schema-dsl/runtime
25
- */
26
- /** Discriminated union of all schema AST nodes. */
27
- type SchemaNode = StringNode | NumberNode | IntegerNode | BooleanNode | LiteralTrueNode | LiteralFalseNode | LiteralNullNode | LiteralStringNode | LiteralUndefinedNode | UnknownNode | NeverNode | ArrayNode | ObjectNode | UnionNode | RefNode | RecordNode;
28
- /** String primitive. */
29
- interface StringNode {
30
- /** Identifies this node as a string type. */
31
- readonly kind: 'string';
32
- }
33
- /** Number primitive. */
34
- interface NumberNode {
35
- /** Identifies this node as a number type. */
36
- readonly kind: 'number';
37
- }
38
- /** Integer primitive (maps to `number` in TS, `integer` in JSON Schema). */
39
- interface IntegerNode {
40
- /** Identifies this node as an integer type. */
41
- readonly kind: 'integer';
42
- }
43
- /** Boolean primitive. */
44
- interface BooleanNode {
45
- /** Identifies this node as a boolean type. */
46
- readonly kind: 'boolean';
47
- }
48
- /** Literal `true`. */
49
- interface LiteralTrueNode {
50
- /** Identifies this node as the literal `true` value. */
51
- readonly kind: 'true';
52
- }
53
- /** Literal `false`. */
54
- interface LiteralFalseNode {
55
- /** Identifies this node as the literal `false` value. */
56
- readonly kind: 'false';
57
- }
58
- /** Literal `null`. */
59
- interface LiteralNullNode {
60
- /** Identifies this node as the literal `null` value. */
61
- readonly kind: 'null';
62
- }
63
- /** String literal value (e.g. `'confirm'`). */
64
- interface LiteralStringNode {
65
- /** Identifies this node as a string literal. */
66
- readonly kind: 'literal';
67
- /** The exact string value this literal represents. */
68
- readonly value: string;
69
- }
70
- /** Literal `undefined`. */
71
- interface LiteralUndefinedNode {
72
- /** Identifies this node as the literal `undefined` value. */
73
- readonly kind: 'undefined';
74
- }
75
- /** The `unknown` top type. */
76
- interface UnknownNode {
77
- /** Identifies this node as the `unknown` top type. */
78
- readonly kind: 'unknown';
79
- }
80
- /** The `never` bottom type. */
81
- interface NeverNode {
82
- /** Identifies this node as the `never` bottom type. */
83
- readonly kind: 'never';
84
- }
85
- /** Array of element type. */
86
- interface ArrayNode {
87
- /** Identifies this node as an array type. */
88
- readonly kind: 'array';
89
- /** The type of each array element. */
90
- readonly element: SchemaNode;
91
- }
92
- /** Object with named properties. */
93
- interface ObjectNode {
94
- /** Identifies this node as an object type. */
95
- readonly kind: 'object';
96
- /** Named properties keyed by field name. */
97
- readonly properties: Readonly<Record<string, PropertyNode>>;
98
- }
99
- /** Union of two or more member types. */
100
- interface UnionNode {
101
- /** Identifies this node as a union type. */
102
- readonly kind: 'union';
103
- /** The constituent types of this union. */
104
- readonly members: readonly SchemaNode[];
105
- }
106
- /** Reference to a named definition (e.g. `@flag` → `$ref: '#/$defs/flag'`). */
107
- interface RefNode {
108
- /** Identifies this node as a `$ref` reference. */
109
- readonly kind: 'ref';
110
- /** Name of the referenced definition (without the `@` prefix). */
111
- readonly target: string;
112
- }
113
- /** Record/dictionary type (e.g. `Record<string, @flag>`). */
114
- interface RecordNode {
115
- /** Identifies this node as a record/dictionary type. */
116
- readonly kind: 'record';
117
- /** The type of each record value (keys are always strings). */
118
- readonly value: SchemaNode;
119
- }
120
- /** A named property with optionality flag. */
121
- interface PropertyNode {
122
- /** Whether the property is optional (`?` suffix in the schema DSL). */
123
- readonly optional: boolean;
124
- /** The property's value type. */
125
- readonly schema: SchemaNode;
126
- }
127
- /**
128
- * Parse a schema source string into a runtime AST.
129
- *
130
- * @param source - Schema string (e.g. `"{ name: string; age: number }"`).
131
- * @returns The root {@link SchemaNode}.
132
- * @throws {@link SyntaxError} on malformed input.
133
- */
134
- declare function parseSchema(source: string): SchemaNode;
135
- /**
136
- * Validate that `input` conforms to the given AST node.
137
- *
138
- * @param node - The schema AST to validate against.
139
- * @param input - The value to check.
140
- * @returns `true` if the value matches the schema.
141
- */
142
- declare function validateNode(node: SchemaNode, input: unknown): boolean;
143
- //#endregion
144
- export { type ArrayNode, type BooleanNode, type IntegerNode, type LiteralFalseNode, type LiteralNullNode, type LiteralStringNode, type LiteralTrueNode, type LiteralUndefinedNode, type NeverNode, type NumberNode, type ObjectNode, type PropertyNode, type RecordNode, type RefNode, type SchemaNode, type StringNode, type UnionNode, type UnknownNode, parseSchema, validateNode };
@@ -1,271 +0,0 @@
1
- //#region src/core/schema-dsl/runtime.ts
2
- /** Map single characters to their token kinds. */
3
- const SINGLE_CHAR_TOKENS = {
4
- "{": "lbrace",
5
- "}": "rbrace",
6
- "[": "lbracket",
7
- "]": "rbracket",
8
- "<": "langle",
9
- ">": "rangle",
10
- ",": "comma",
11
- ":": "colon",
12
- ";": "semicolon",
13
- "?": "question",
14
- "|": "pipe"
15
- };
16
- /** Whitespace characters to skip. */
17
- function isWhitespace(c) {
18
- return c === " " || c === "\n" || c === " " || c === "\r";
19
- }
20
- /** Identifier-valid characters (a-z, A-Z, 0-9, _, $). */
21
- function isIdentChar(c) {
22
- return c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c >= "0" && c <= "9" || c === "_" || c === "$";
23
- }
24
- /** Identifier start characters (a-z, A-Z, _, $). */
25
- function isIdentStart(c) {
26
- return c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c === "_" || c === "$";
27
- }
28
- /**
29
- * Tokenize a schema source string.
30
- *
31
- * Produces a flat array of tokens: identifiers (`string`, `number`, etc.),
32
- * punctuation (`{`, `}`, `[`, `]`, `:`, `;`, `?`, `|`), and skips
33
- * whitespace. Throws on unrecognized characters.
34
- */
35
- function tokenize(source) {
36
- const tokens = [];
37
- let i = 0;
38
- while (i < source.length) {
39
- const c = source[i] ?? "";
40
- if (isWhitespace(c)) {
41
- i++;
42
- continue;
43
- }
44
- const singleKind = SINGLE_CHAR_TOKENS[c];
45
- if (singleKind !== void 0) {
46
- tokens.push({
47
- kind: singleKind,
48
- value: c
49
- });
50
- i++;
51
- continue;
52
- }
53
- if (c === "'") {
54
- let lit = "";
55
- i++;
56
- while (i < source.length && source[i] !== "'") {
57
- lit += source[i];
58
- i++;
59
- }
60
- if (i >= source.length) throw new SyntaxError("Unterminated string literal");
61
- i++;
62
- tokens.push({
63
- kind: "string_literal",
64
- value: lit
65
- });
66
- continue;
67
- }
68
- if (c === "@") {
69
- i++;
70
- let ref = "";
71
- while (i < source.length) {
72
- const ch = source[i] ?? "";
73
- if (!isIdentChar(ch)) break;
74
- ref += ch;
75
- i++;
76
- }
77
- if (ref.length === 0) throw new SyntaxError(`Expected identifier after '@' at position ${String(i)}`);
78
- tokens.push({
79
- kind: "ref",
80
- value: ref
81
- });
82
- continue;
83
- }
84
- if (isIdentStart(c)) {
85
- let ident = "";
86
- while (i < source.length) {
87
- const ch = source[i] ?? "";
88
- if (!isIdentChar(ch)) break;
89
- ident += ch;
90
- i++;
91
- }
92
- tokens.push({
93
- kind: "ident",
94
- value: ident
95
- });
96
- continue;
97
- }
98
- throw new SyntaxError(`Unexpected character '${c}' at position ${String(i)}`);
99
- }
100
- return tokens;
101
- }
102
- /** Primitive type names recognized by the parser. */
103
- const PRIMITIVES = /* @__PURE__ */ new Set([
104
- "string",
105
- "number",
106
- "integer",
107
- "boolean",
108
- "true",
109
- "false",
110
- "null",
111
- "undefined",
112
- "unknown",
113
- "never"
114
- ]);
115
- /** Map a primitive name to its AST node. */
116
- function primitiveNode(name) {
117
- switch (name) {
118
- case "string": return { kind: "string" };
119
- case "number": return { kind: "number" };
120
- case "integer": return { kind: "integer" };
121
- case "boolean": return { kind: "boolean" };
122
- case "true": return { kind: "true" };
123
- case "false": return { kind: "false" };
124
- case "null": return { kind: "null" };
125
- case "undefined": return { kind: "undefined" };
126
- case "unknown": return { kind: "unknown" };
127
- case "never": return { kind: "never" };
128
- default: throw new SyntaxError(`Unknown type '${name}'`);
129
- }
130
- }
131
- /**
132
- * Parse a token stream into a {@link SchemaNode} AST.
133
- *
134
- * Implements the grammar documented at the module level using standard
135
- * recursive descent. Each grammar rule maps to one `parse*` method.
136
- */
137
- var SchemaParser = class {
138
- tokens;
139
- pos = 0;
140
- constructor(tokens) {
141
- this.tokens = tokens;
142
- }
143
- /** Parse the full token stream, asserting all tokens are consumed. */
144
- parseRoot() {
145
- const result = this.parseValue();
146
- if (this.pos < this.tokens.length) {
147
- const leftover = this.peek();
148
- throw new SyntaxError(`Unexpected token '${leftover?.value ?? "?"}' at position ${String(this.pos)}`);
149
- }
150
- return result;
151
- }
152
- /** value = union */
153
- parseValue() {
154
- return this.parseUnion();
155
- }
156
- /** union = postfix ('|' postfix)* */
157
- parseUnion() {
158
- const first = this.parsePostfix();
159
- if (!this.check("pipe")) return first;
160
- const members = [first];
161
- while (this.match("pipe")) members.push(this.parsePostfix());
162
- return {
163
- kind: "union",
164
- members
165
- };
166
- }
167
- /** postfix = primary ('[]')* */
168
- parsePostfix() {
169
- let node = this.parsePrimary();
170
- while (this.check("lbracket") && this.checkAt(this.pos + 1, "rbracket")) {
171
- this.advance();
172
- this.advance();
173
- node = {
174
- kind: "array",
175
- element: node
176
- };
177
- }
178
- return node;
179
- }
180
- /** primary = object | record | ref | literal | IDENT */
181
- parsePrimary() {
182
- if (this.check("lbrace")) return this.parseObject();
183
- if (this.check("string_literal")) return {
184
- kind: "literal",
185
- value: this.advance().value
186
- };
187
- if (this.check("ref")) return {
188
- kind: "ref",
189
- target: this.advance().value
190
- };
191
- const name = this.expectIdent();
192
- if (name === "Record") {
193
- this.expect("langle");
194
- if (this.parseValue().kind !== "string") throw new SyntaxError("Record key type must be 'string' because JSON object keys are always strings");
195
- this.expect("comma");
196
- const valueSchema = this.parseValue();
197
- this.expect("rangle");
198
- return {
199
- kind: "record",
200
- value: valueSchema
201
- };
202
- }
203
- if (!PRIMITIVES.has(name)) throw new SyntaxError(`Unknown type '${name}' at position ${String(this.pos - 1)}`);
204
- return primitiveNode(name);
205
- }
206
- /** object = '{' properties '}' */
207
- parseObject() {
208
- this.expect("lbrace");
209
- const properties = {};
210
- while (!this.check("rbrace")) {
211
- const name = this.expectIdent();
212
- if (Object.hasOwn(properties, name)) throw new SyntaxError(`Duplicate property '${name}' at position ${String(this.pos - 1)}`);
213
- const optional = this.match("question");
214
- this.expect("colon");
215
- properties[name] = {
216
- optional,
217
- schema: this.parseValue()
218
- };
219
- this.match("semicolon");
220
- }
221
- this.expect("rbrace");
222
- return {
223
- kind: "object",
224
- properties
225
- };
226
- }
227
- peek() {
228
- return this.tokens[this.pos];
229
- }
230
- check(kind) {
231
- return this.peek()?.kind === kind;
232
- }
233
- checkAt(pos, kind) {
234
- return this.tokens[pos]?.kind === kind;
235
- }
236
- advance() {
237
- const token = this.tokens[this.pos];
238
- if (token === void 0) throw new SyntaxError("Unexpected end of input");
239
- this.pos++;
240
- return token;
241
- }
242
- match(kind) {
243
- if (this.check(kind)) {
244
- this.pos++;
245
- return true;
246
- }
247
- return false;
248
- }
249
- expect(kind) {
250
- if (!this.check(kind)) {
251
- const got = this.peek();
252
- throw new SyntaxError(got ? `Expected '${kind}' but got '${got.kind}' ('${got.value}') at position ${String(this.pos)}` : `Expected '${kind}' but reached end of input`);
253
- }
254
- return this.advance();
255
- }
256
- expectIdent() {
257
- return this.expect("ident").value;
258
- }
259
- };
260
- /**
261
- * Parse a schema source string into a runtime AST.
262
- *
263
- * @param source - Schema string (e.g. `"{ name: string; age: number }"`).
264
- * @returns The root {@link SchemaNode}.
265
- * @throws {@link SyntaxError} on malformed input.
266
- */
267
- function parseSchema(source) {
268
- return new SchemaParser(tokenize(source)).parseRoot();
269
- }
270
- //#endregion
271
- export { parseSchema };
@@ -1,30 +0,0 @@
1
- import { SchemaNode } from "./runtime.mjs";
2
-
3
- //#region src/core/schema-dsl/to-json-schema.d.ts
4
- /**
5
- * Convert a {@link SchemaNode} AST node to a JSON Schema fragment.
6
- *
7
- * Mapping:
8
- * - `string` → `{ type: 'string' }`
9
- * - `number` → `{ type: 'number' }`
10
- * - `integer` → `{ type: 'integer' }`
11
- * - `boolean` → `{ type: 'boolean' }`
12
- * - `true` → `{ const: true }`
13
- * - `false` → `{ const: false }`
14
- * - `null` → `{ type: 'null' }`
15
- * - `undefined` → throws (JSON Schema has no `undefined` type)
16
- * - `unknown` → `{}` (accepts any value)
17
- * - `never` → `{ not: {} }` (rejects all values)
18
- * - `'literal'` → `{ const: 'literal' }`
19
- * - `@ref` → `{ $ref: '#/$defs/ref' }`
20
- * - `T[]` → `{ type: 'array', items: convert(T) }`
21
- * - `Record<K,V>` → `{ type: 'object', additionalProperties: convert(V) }`
22
- * - `{...}` → `{ type: 'object', properties: ..., required: [...] }`
23
- * - `A | B` → `{ enum: [...] }` if all literals, else `{ oneOf: [...] }`
24
- *
25
- * @param node - The AST node to convert.
26
- * @returns A plain JSON Schema fragment.
27
- */
28
- declare function nodeToJsonSchema(node: SchemaNode): Record<string, unknown>;
29
- //#endregion
30
- export { nodeToJsonSchema };