@seyuna/cli 1.0.0-canary.23 → 1.0.0-canary.24

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 (792) hide show
  1. package/esm/_dnt.polyfills.d.ts +25 -0
  2. package/esm/_dnt.polyfills.d.ts.map +1 -1
  3. package/esm/_dnt.polyfills.js +120 -0
  4. package/esm/deno.d.ts +0 -1
  5. package/esm/deno.js +10 -11
  6. package/esm/deps/jsr.io/@cliffy/ansi/1.0.0-rc.8/ansi_escapes.d.ts +135 -0
  7. package/esm/deps/jsr.io/@cliffy/ansi/1.0.0-rc.8/ansi_escapes.d.ts.map +1 -0
  8. package/esm/deps/jsr.io/@cliffy/ansi/1.0.0-rc.8/ansi_escapes.js +218 -0
  9. package/esm/deps/jsr.io/@cliffy/ansi/1.0.0-rc.8/chain.d.ts +137 -0
  10. package/esm/deps/jsr.io/@cliffy/ansi/1.0.0-rc.8/chain.d.ts.map +1 -0
  11. package/esm/deps/jsr.io/@cliffy/ansi/1.0.0-rc.8/chain.js +1 -0
  12. package/esm/deps/jsr.io/@cliffy/ansi/1.0.0-rc.8/cursor_position.d.ts +28 -0
  13. package/esm/deps/jsr.io/@cliffy/ansi/1.0.0-rc.8/cursor_position.d.ts.map +1 -0
  14. package/esm/deps/jsr.io/@cliffy/ansi/1.0.0-rc.8/cursor_position.js +31 -0
  15. package/esm/deps/jsr.io/@cliffy/ansi/1.0.0-rc.8/tty.d.ts +37 -0
  16. package/esm/deps/jsr.io/@cliffy/ansi/1.0.0-rc.8/tty.d.ts.map +1 -0
  17. package/esm/deps/jsr.io/@cliffy/ansi/1.0.0-rc.8/tty.js +61 -0
  18. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/_argument_types.d.ts +157 -0
  19. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/_argument_types.d.ts.map +1 -0
  20. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/_argument_types.js +1 -0
  21. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/_errors.d.ts +77 -0
  22. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/_errors.d.ts.map +1 -0
  23. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/_errors.js +155 -0
  24. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/_spread.d.ts +16 -0
  25. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/_spread.d.ts.map +1 -0
  26. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/_spread.js +1 -0
  27. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/_type_utils.d.ts +9 -0
  28. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/_type_utils.d.ts.map +1 -0
  29. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/_type_utils.js +1 -0
  30. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/_utils.d.ts +37 -0
  31. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/_utils.d.ts.map +1 -0
  32. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/_utils.js +125 -0
  33. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/command.d.ts +815 -0
  34. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/command.d.ts.map +1 -0
  35. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/command.js +1789 -0
  36. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/deprecated.d.ts +46 -0
  37. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/deprecated.d.ts.map +1 -0
  38. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/deprecated.js +2 -0
  39. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/help/_help_generator.d.ts +28 -0
  40. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/help/_help_generator.d.ts.map +1 -0
  41. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/help/_help_generator.js +317 -0
  42. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/mod.d.ts +15 -0
  43. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/mod.d.ts.map +1 -0
  44. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/mod.js +13 -0
  45. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/type.d.ts +45 -0
  46. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/type.d.ts.map +1 -0
  47. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/type.js +27 -0
  48. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/action_list.d.ts +10 -0
  49. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/action_list.d.ts.map +1 -0
  50. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/action_list.js +20 -0
  51. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/boolean.d.ts +10 -0
  52. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/boolean.d.ts.map +1 -0
  53. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/boolean.js +13 -0
  54. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/child_command.d.ts +10 -0
  55. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/child_command.d.ts.map +1 -0
  56. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/child_command.js +27 -0
  57. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/command.d.ts +8 -0
  58. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/command.d.ts.map +1 -0
  59. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/command.js +9 -0
  60. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/enum.d.ts +11 -0
  61. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/enum.d.ts.map +1 -0
  62. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/enum.js +29 -0
  63. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/file.d.ts +6 -0
  64. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/file.d.ts.map +1 -0
  65. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/file.js +12 -0
  66. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/integer.d.ts +8 -0
  67. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/integer.d.ts.map +1 -0
  68. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/integer.js +9 -0
  69. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/number.d.ts +8 -0
  70. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/number.d.ts.map +1 -0
  71. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/number.js +9 -0
  72. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/string.d.ts +8 -0
  73. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/string.d.ts.map +1 -0
  74. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types/string.js +9 -0
  75. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types.d.ts +119 -0
  76. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types.d.ts.map +1 -0
  77. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/types.js +2 -0
  78. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/upgrade/_check_version.d.ts +4 -0
  79. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/upgrade/_check_version.d.ts.map +1 -0
  80. package/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.8/upgrade/_check_version.js +21 -0
  81. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/_errors.d.ts +61 -0
  82. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/_errors.d.ts.map +1 -0
  83. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/_errors.js +117 -0
  84. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/_utils.d.ts +17 -0
  85. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/_utils.d.ts.map +1 -0
  86. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/_utils.js +89 -0
  87. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/_validate_flags.d.ts +11 -0
  88. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/_validate_flags.d.ts.map +1 -0
  89. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/_validate_flags.js +155 -0
  90. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/deprecated.d.ts +25 -0
  91. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/deprecated.d.ts.map +1 -0
  92. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/deprecated.js +9 -0
  93. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/flags.d.ts +35 -0
  94. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/flags.d.ts.map +1 -0
  95. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/flags.js +401 -0
  96. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/mod.d.ts +9 -0
  97. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/mod.d.ts.map +1 -0
  98. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/mod.js +7 -0
  99. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/types/boolean.d.ts +4 -0
  100. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/types/boolean.d.ts.map +1 -0
  101. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/types/boolean.js +11 -0
  102. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/types/integer.d.ts +4 -0
  103. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/types/integer.d.ts.map +1 -0
  104. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/types/integer.js +9 -0
  105. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/types/number.d.ts +4 -0
  106. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/types/number.d.ts.map +1 -0
  107. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/types/number.js +9 -0
  108. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/types/string.d.ts +4 -0
  109. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/types/string.d.ts.map +1 -0
  110. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/types/string.js +4 -0
  111. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/types.d.ts +137 -0
  112. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/types.d.ts.map +1 -0
  113. package/esm/deps/jsr.io/@cliffy/flags/1.0.0-rc.8/types.js +1 -0
  114. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/exit.d.ts +8 -0
  115. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/exit.d.ts.map +1 -0
  116. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/exit.js +16 -0
  117. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/get_args.d.ts +7 -0
  118. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/get_args.d.ts.map +1 -0
  119. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/get_args.js +11 -0
  120. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/get_columns.d.ts +7 -0
  121. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/get_columns.d.ts.map +1 -0
  122. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/get_columns.js +23 -0
  123. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/get_env.d.ts +8 -0
  124. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/get_env.d.ts.map +1 -0
  125. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/get_env.js +18 -0
  126. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/get_os.d.ts +7 -0
  127. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/get_os.d.ts.map +1 -0
  128. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/get_os.js +19 -0
  129. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/inspect.d.ts +7 -0
  130. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/inspect.d.ts.map +1 -0
  131. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/inspect.js +11 -0
  132. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/is_directory.d.ts +8 -0
  133. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/is_directory.d.ts.map +1 -0
  134. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/is_directory.js +16 -0
  135. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/is_terminal.d.ts +7 -0
  136. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/is_terminal.d.ts.map +1 -0
  137. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/is_terminal.js +19 -0
  138. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/read.d.ts +8 -0
  139. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/read.d.ts.map +1 -0
  140. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/read.js +45 -0
  141. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/read_dir.d.ts +10 -0
  142. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/read_dir.d.ts.map +1 -0
  143. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/read_dir.js +23 -0
  144. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/read_sync.d.ts +8 -0
  145. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/read_sync.d.ts.map +1 -0
  146. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/read_sync.js +28 -0
  147. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/runtime_name.d.ts +3 -0
  148. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/runtime_name.d.ts.map +1 -0
  149. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/runtime_name.js +14 -0
  150. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/set_raw.d.ts +11 -0
  151. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/set_raw.d.ts.map +1 -0
  152. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/set_raw.js +21 -0
  153. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/stat.d.ts +10 -0
  154. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/stat.d.ts.map +1 -0
  155. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/stat.js +21 -0
  156. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/write_sync.d.ts +8 -0
  157. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/write_sync.d.ts.map +1 -0
  158. package/esm/deps/jsr.io/@cliffy/internal/1.0.0-rc.8/runtime/write_sync.js +21 -0
  159. package/esm/deps/jsr.io/@cliffy/keycode/1.0.0-rc.8/_key_codes.d.ts +9 -0
  160. package/esm/deps/jsr.io/@cliffy/keycode/1.0.0-rc.8/_key_codes.d.ts.map +1 -0
  161. package/esm/deps/jsr.io/@cliffy/keycode/1.0.0-rc.8/_key_codes.js +103 -0
  162. package/esm/deps/jsr.io/@cliffy/keycode/1.0.0-rc.8/key_code.d.ts +37 -0
  163. package/esm/deps/jsr.io/@cliffy/keycode/1.0.0-rc.8/key_code.d.ts.map +1 -0
  164. package/esm/deps/jsr.io/@cliffy/keycode/1.0.0-rc.8/key_code.js +235 -0
  165. package/esm/deps/jsr.io/@cliffy/keycode/1.0.0-rc.8/mod.d.ts +2 -0
  166. package/esm/deps/jsr.io/@cliffy/keycode/1.0.0-rc.8/mod.d.ts.map +1 -0
  167. package/esm/deps/jsr.io/@cliffy/keycode/1.0.0-rc.8/mod.js +1 -0
  168. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_figures.d.ts +34 -0
  169. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_figures.d.ts.map +1 -0
  170. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_figures.js +63 -0
  171. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_generic_input.d.ts +49 -0
  172. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_generic_input.d.ts.map +1 -0
  173. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_generic_input.js +112 -0
  174. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_generic_list.d.ts +190 -0
  175. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_generic_list.d.ts.map +1 -0
  176. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_generic_list.js +523 -0
  177. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_generic_prompt.d.ts +142 -0
  178. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_generic_prompt.d.ts.map +1 -0
  179. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_generic_prompt.js +283 -0
  180. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_generic_suggestions.d.ts +115 -0
  181. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_generic_suggestions.d.ts.map +1 -0
  182. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_generic_suggestions.js +435 -0
  183. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_utils.d.ts +4 -0
  184. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_utils.d.ts.map +1 -0
  185. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/_utils.js +5 -0
  186. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/checkbox.d.ts +204 -0
  187. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/checkbox.d.ts.map +1 -0
  188. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/checkbox.js +349 -0
  189. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/confirm.d.ts +66 -0
  190. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/confirm.d.ts.map +1 -0
  191. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/confirm.js +117 -0
  192. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/input.d.ts +64 -0
  193. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/input.d.ts.map +1 -0
  194. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/input.js +90 -0
  195. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/list.d.ts +83 -0
  196. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/list.d.ts.map +1 -0
  197. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/list.js +161 -0
  198. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/mod.d.ts +13 -0
  199. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/mod.d.ts.map +1 -0
  200. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/mod.js +9 -0
  201. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/number.d.ts +93 -0
  202. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/number.d.ts.map +1 -0
  203. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/number.js +199 -0
  204. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/prompt.d.ts +223 -0
  205. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/prompt.d.ts.map +1 -0
  206. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/prompt.js +252 -0
  207. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/secret.d.ts +74 -0
  208. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/secret.d.ts.map +1 -0
  209. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/secret.js +96 -0
  210. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/select.d.ts +142 -0
  211. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/select.d.ts.map +1 -0
  212. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/select.js +184 -0
  213. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/toggle.d.ts +74 -0
  214. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/toggle.d.ts.map +1 -0
  215. package/esm/deps/jsr.io/@cliffy/prompt/1.0.0-rc.8/toggle.js +130 -0
  216. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/_layout.d.ts +104 -0
  217. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/_layout.d.ts.map +1 -0
  218. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/_layout.js +546 -0
  219. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/_utils.d.ts +29 -0
  220. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/_utils.d.ts.map +1 -0
  221. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/_utils.js +72 -0
  222. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/border.d.ts +23 -0
  223. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/border.d.ts.map +1 -0
  224. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/border.js +18 -0
  225. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/cell.d.ts +157 -0
  226. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/cell.d.ts.map +1 -0
  227. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/cell.js +199 -0
  228. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/column.d.ts +62 -0
  229. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/column.d.ts.map +1 -0
  230. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/column.js +85 -0
  231. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/consume_words.d.ts +30 -0
  232. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/consume_words.d.ts.map +1 -0
  233. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/consume_words.js +64 -0
  234. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/mod.d.ts +7 -0
  235. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/mod.d.ts.map +1 -0
  236. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/mod.js +6 -0
  237. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/row.d.ts +71 -0
  238. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/row.d.ts.map +1 -0
  239. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/row.js +90 -0
  240. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/table.d.ts +192 -0
  241. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/table.d.ts.map +1 -0
  242. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/table.js +304 -0
  243. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/unicode_width.d.ts +40 -0
  244. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/unicode_width.d.ts.map +1 -0
  245. package/esm/deps/jsr.io/@cliffy/table/1.0.0-rc.8/unicode_width.js +95 -0
  246. package/esm/deps/jsr.io/@std/assert/1.0.16/equal.d.ts +17 -0
  247. package/esm/deps/jsr.io/@std/assert/1.0.16/equal.d.ts.map +1 -0
  248. package/esm/deps/jsr.io/@std/assert/1.0.16/equal.js +186 -0
  249. package/esm/deps/jsr.io/@std/async/1.0.16/_util.d.ts +2 -0
  250. package/esm/deps/jsr.io/@std/async/1.0.16/_util.d.ts.map +1 -0
  251. package/esm/deps/jsr.io/@std/async/1.0.16/_util.js +6 -0
  252. package/esm/deps/jsr.io/@std/async/1.0.16/abortable.d.ts +107 -0
  253. package/esm/deps/jsr.io/@std/async/1.0.16/abortable.d.ts.map +1 -0
  254. package/esm/deps/jsr.io/@std/async/1.0.16/abortable.js +46 -0
  255. package/esm/deps/jsr.io/@std/async/1.0.16/deadline.d.ts +37 -0
  256. package/esm/deps/jsr.io/@std/async/1.0.16/deadline.d.ts.map +1 -0
  257. package/esm/deps/jsr.io/@std/async/1.0.16/deadline.js +41 -0
  258. package/esm/deps/jsr.io/@std/async/1.0.16/debounce.d.ts +44 -0
  259. package/esm/deps/jsr.io/@std/async/1.0.16/debounce.d.ts.map +1 -0
  260. package/esm/deps/jsr.io/@std/async/1.0.16/debounce.js +57 -0
  261. package/esm/deps/jsr.io/@std/async/1.0.16/delay.d.ts +43 -0
  262. package/esm/deps/jsr.io/@std/async/1.0.16/delay.d.ts.map +1 -0
  263. package/esm/deps/jsr.io/@std/async/1.0.16/delay.js +78 -0
  264. package/esm/deps/jsr.io/@std/async/1.0.16/mod.d.ts +22 -0
  265. package/esm/deps/jsr.io/@std/async/1.0.16/mod.d.ts.map +1 -0
  266. package/esm/deps/jsr.io/@std/async/1.0.16/mod.js +23 -0
  267. package/esm/deps/jsr.io/@std/async/1.0.16/mux_async_iterator.d.ts +111 -0
  268. package/esm/deps/jsr.io/@std/async/1.0.16/mux_async_iterator.d.ts.map +1 -0
  269. package/esm/deps/jsr.io/@std/async/1.0.16/mux_async_iterator.js +170 -0
  270. package/esm/deps/jsr.io/@std/async/1.0.16/pool.d.ts +33 -0
  271. package/esm/deps/jsr.io/@std/async/1.0.16/pool.d.ts.map +1 -0
  272. package/esm/deps/jsr.io/@std/async/1.0.16/pool.js +99 -0
  273. package/esm/deps/jsr.io/@std/async/1.0.16/retry.d.ts +110 -0
  274. package/esm/deps/jsr.io/@std/async/1.0.16/retry.d.ts.map +1 -0
  275. package/esm/deps/jsr.io/@std/async/1.0.16/retry.js +107 -0
  276. package/esm/deps/jsr.io/@std/async/1.0.16/tee.d.ts +43 -0
  277. package/esm/deps/jsr.io/@std/async/1.0.16/tee.d.ts.map +1 -0
  278. package/esm/deps/jsr.io/@std/async/1.0.16/tee.js +102 -0
  279. package/esm/deps/jsr.io/@std/cli/1.0.25/unstable_spinner.d.ts +176 -0
  280. package/esm/deps/jsr.io/@std/cli/1.0.25/unstable_spinner.d.ts.map +1 -0
  281. package/esm/deps/jsr.io/@std/cli/1.0.25/unstable_spinner.js +202 -0
  282. package/esm/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts +35 -0
  283. package/esm/deps/jsr.io/@std/encoding/1.0.10/_common64.d.ts.map +1 -0
  284. package/esm/deps/jsr.io/@std/encoding/1.0.10/_common64.js +113 -0
  285. package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts +4 -0
  286. package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts.map +1 -0
  287. package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.js +13 -0
  288. package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts +9 -0
  289. package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts.map +1 -0
  290. package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.js +2 -0
  291. package/esm/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts +40 -0
  292. package/esm/deps/jsr.io/@std/encoding/1.0.10/base64.d.ts.map +1 -0
  293. package/esm/deps/jsr.io/@std/encoding/1.0.10/base64.js +82 -0
  294. package/esm/deps/jsr.io/@std/fmt/1.0.8/colors.d.ts +700 -0
  295. package/esm/deps/jsr.io/@std/fmt/1.0.8/colors.d.ts.map +1 -0
  296. package/esm/deps/jsr.io/@std/fmt/1.0.8/colors.js +903 -0
  297. package/esm/deps/jsr.io/@std/fs/1.0.21/_create_walk_entry.d.ts +14 -0
  298. package/esm/deps/jsr.io/@std/fs/1.0.21/_create_walk_entry.d.ts.map +1 -0
  299. package/esm/deps/jsr.io/@std/fs/1.0.21/_create_walk_entry.js +34 -0
  300. package/esm/deps/jsr.io/@std/fs/1.0.21/_get_file_info_type.d.ts +13 -0
  301. package/esm/deps/jsr.io/@std/fs/1.0.21/_get_file_info_type.d.ts.map +1 -0
  302. package/esm/deps/jsr.io/@std/fs/1.0.21/_get_file_info_type.js +18 -0
  303. package/esm/deps/jsr.io/@std/fs/1.0.21/_is_same_path.d.ts +10 -0
  304. package/esm/deps/jsr.io/@std/fs/1.0.21/_is_same_path.d.ts.map +1 -0
  305. package/esm/deps/jsr.io/@std/fs/1.0.21/_is_same_path.js +17 -0
  306. package/esm/deps/jsr.io/@std/fs/1.0.21/_is_subdir.d.ts +12 -0
  307. package/esm/deps/jsr.io/@std/fs/1.0.21/_is_subdir.d.ts.map +1 -0
  308. package/esm/deps/jsr.io/@std/fs/1.0.21/_is_subdir.js +25 -0
  309. package/esm/deps/jsr.io/@std/fs/1.0.21/_to_path_string.d.ts +9 -0
  310. package/esm/deps/jsr.io/@std/fs/1.0.21/_to_path_string.d.ts.map +1 -0
  311. package/esm/deps/jsr.io/@std/fs/1.0.21/_to_path_string.js +13 -0
  312. package/esm/deps/jsr.io/@std/fs/1.0.21/copy.d.ts +117 -0
  313. package/esm/deps/jsr.io/@std/fs/1.0.21/copy.d.ts.map +1 -0
  314. package/esm/deps/jsr.io/@std/fs/1.0.21/copy.js +313 -0
  315. package/esm/deps/jsr.io/@std/fs/1.0.21/empty_dir.d.ts +48 -0
  316. package/esm/deps/jsr.io/@std/fs/1.0.21/empty_dir.d.ts.map +1 -0
  317. package/esm/deps/jsr.io/@std/fs/1.0.21/empty_dir.js +87 -0
  318. package/esm/deps/jsr.io/@std/fs/1.0.21/ensure_dir.d.ts +49 -0
  319. package/esm/deps/jsr.io/@std/fs/1.0.21/ensure_dir.d.ts.map +1 -0
  320. package/esm/deps/jsr.io/@std/fs/1.0.21/ensure_dir.js +102 -0
  321. package/esm/deps/jsr.io/@std/fs/1.0.21/ensure_file.d.ts +47 -0
  322. package/esm/deps/jsr.io/@std/fs/1.0.21/ensure_file.d.ts.map +1 -0
  323. package/esm/deps/jsr.io/@std/fs/1.0.21/ensure_file.js +90 -0
  324. package/esm/deps/jsr.io/@std/fs/1.0.21/ensure_link.d.ts +49 -0
  325. package/esm/deps/jsr.io/@std/fs/1.0.21/ensure_link.d.ts.map +1 -0
  326. package/esm/deps/jsr.io/@std/fs/1.0.21/ensure_link.js +61 -0
  327. package/esm/deps/jsr.io/@std/fs/1.0.21/ensure_symlink.d.ts +70 -0
  328. package/esm/deps/jsr.io/@std/fs/1.0.21/ensure_symlink.d.ts.map +1 -0
  329. package/esm/deps/jsr.io/@std/fs/1.0.21/ensure_symlink.js +156 -0
  330. package/esm/deps/jsr.io/@std/fs/1.0.21/eol.d.ts +52 -0
  331. package/esm/deps/jsr.io/@std/fs/1.0.21/eol.d.ts.map +1 -0
  332. package/esm/deps/jsr.io/@std/fs/1.0.21/eol.js +67 -0
  333. package/esm/deps/jsr.io/@std/fs/1.0.21/exists.d.ts +218 -0
  334. package/esm/deps/jsr.io/@std/fs/1.0.21/exists.d.ts.map +1 -0
  335. package/esm/deps/jsr.io/@std/fs/1.0.21/exists.js +271 -0
  336. package/esm/deps/jsr.io/@std/fs/1.0.21/expand_glob.d.ts +267 -0
  337. package/esm/deps/jsr.io/@std/fs/1.0.21/expand_glob.d.ts.map +1 -0
  338. package/esm/deps/jsr.io/@std/fs/1.0.21/expand_glob.js +442 -0
  339. package/esm/deps/jsr.io/@std/fs/1.0.21/mod.d.ts +29 -0
  340. package/esm/deps/jsr.io/@std/fs/1.0.21/mod.d.ts.map +1 -0
  341. package/esm/deps/jsr.io/@std/fs/1.0.21/mod.js +29 -0
  342. package/esm/deps/jsr.io/@std/fs/1.0.21/move.d.ts +86 -0
  343. package/esm/deps/jsr.io/@std/fs/1.0.21/move.d.ts.map +1 -0
  344. package/esm/deps/jsr.io/@std/fs/1.0.21/move.js +142 -0
  345. package/esm/deps/jsr.io/@std/fs/1.0.21/walk.d.ts +777 -0
  346. package/esm/deps/jsr.io/@std/fs/1.0.21/walk.d.ts.map +1 -0
  347. package/esm/deps/jsr.io/@std/fs/1.0.21/walk.js +846 -0
  348. package/esm/deps/jsr.io/@std/internal/1.0.12/_os.d.ts +2 -0
  349. package/esm/deps/jsr.io/@std/internal/1.0.12/_os.d.ts.map +1 -0
  350. package/esm/deps/jsr.io/@std/internal/1.0.12/_os.js +12 -0
  351. package/esm/deps/jsr.io/@std/internal/1.0.12/os.d.ts +3 -0
  352. package/esm/deps/jsr.io/@std/internal/1.0.12/os.d.ts.map +1 -0
  353. package/esm/deps/jsr.io/@std/internal/1.0.12/os.js +5 -0
  354. package/esm/deps/jsr.io/@std/io/0.224.9/types.d.ts +146 -0
  355. package/esm/deps/jsr.io/@std/io/0.224.9/types.d.ts.map +1 -0
  356. package/esm/deps/jsr.io/@std/io/0.224.9/types.js +15 -0
  357. package/esm/deps/jsr.io/@std/path/1.0.9/_common/assert_path.d.ts +2 -0
  358. package/esm/deps/jsr.io/@std/path/1.0.9/_common/assert_path.d.ts.map +1 -0
  359. package/esm/deps/jsr.io/@std/path/1.0.9/_common/assert_path.js +7 -0
  360. package/esm/deps/jsr.io/@std/path/1.0.9/_common/basename.d.ts +4 -0
  361. package/esm/deps/jsr.io/@std/path/1.0.9/_common/basename.d.ts.map +1 -0
  362. package/esm/deps/jsr.io/@std/path/1.0.9/_common/basename.js +40 -0
  363. package/esm/deps/jsr.io/@std/path/1.0.9/_common/common.d.ts +2 -0
  364. package/esm/deps/jsr.io/@std/path/1.0.9/_common/common.d.ts.map +1 -0
  365. package/esm/deps/jsr.io/@std/path/1.0.9/_common/common.js +23 -0
  366. package/esm/deps/jsr.io/@std/path/1.0.9/_common/constants.d.ts +40 -0
  367. package/esm/deps/jsr.io/@std/path/1.0.9/_common/constants.d.ts.map +1 -0
  368. package/esm/deps/jsr.io/@std/path/1.0.9/_common/constants.js +46 -0
  369. package/esm/deps/jsr.io/@std/path/1.0.9/_common/dirname.d.ts +2 -0
  370. package/esm/deps/jsr.io/@std/path/1.0.9/_common/dirname.d.ts.map +1 -0
  371. package/esm/deps/jsr.io/@std/path/1.0.9/_common/dirname.js +8 -0
  372. package/esm/deps/jsr.io/@std/path/1.0.9/_common/format.d.ts +4 -0
  373. package/esm/deps/jsr.io/@std/path/1.0.9/_common/format.d.ts.map +1 -0
  374. package/esm/deps/jsr.io/@std/path/1.0.9/_common/format.js +19 -0
  375. package/esm/deps/jsr.io/@std/path/1.0.9/_common/from_file_url.d.ts +2 -0
  376. package/esm/deps/jsr.io/@std/path/1.0.9/_common/from_file_url.d.ts.map +1 -0
  377. package/esm/deps/jsr.io/@std/path/1.0.9/_common/from_file_url.js +9 -0
  378. package/esm/deps/jsr.io/@std/path/1.0.9/_common/glob_to_reg_exp.d.ts +35 -0
  379. package/esm/deps/jsr.io/@std/path/1.0.9/_common/glob_to_reg_exp.d.ts.map +1 -0
  380. package/esm/deps/jsr.io/@std/path/1.0.9/_common/glob_to_reg_exp.js +234 -0
  381. package/esm/deps/jsr.io/@std/path/1.0.9/_common/normalize.d.ts +2 -0
  382. package/esm/deps/jsr.io/@std/path/1.0.9/_common/normalize.d.ts.map +1 -0
  383. package/esm/deps/jsr.io/@std/path/1.0.9/_common/normalize.js +8 -0
  384. package/esm/deps/jsr.io/@std/path/1.0.9/_common/normalize_string.d.ts +2 -0
  385. package/esm/deps/jsr.io/@std/path/1.0.9/_common/normalize_string.d.ts.map +1 -0
  386. package/esm/deps/jsr.io/@std/path/1.0.9/_common/normalize_string.js +77 -0
  387. package/esm/deps/jsr.io/@std/path/1.0.9/_common/relative.d.ts +2 -0
  388. package/esm/deps/jsr.io/@std/path/1.0.9/_common/relative.d.ts.map +1 -0
  389. package/esm/deps/jsr.io/@std/path/1.0.9/_common/relative.js +9 -0
  390. package/esm/deps/jsr.io/@std/path/1.0.9/_common/strip_trailing_separators.d.ts +2 -0
  391. package/esm/deps/jsr.io/@std/path/1.0.9/_common/strip_trailing_separators.d.ts.map +1 -0
  392. package/esm/deps/jsr.io/@std/path/1.0.9/_common/strip_trailing_separators.js +19 -0
  393. package/esm/deps/jsr.io/@std/path/1.0.9/_common/to_file_url.d.ts +2 -0
  394. package/esm/deps/jsr.io/@std/path/1.0.9/_common/to_file_url.d.ts.map +1 -0
  395. package/esm/deps/jsr.io/@std/path/1.0.9/_common/to_file_url.js +15 -0
  396. package/esm/deps/jsr.io/@std/path/1.0.9/_os.d.ts +2 -0
  397. package/esm/deps/jsr.io/@std/path/1.0.9/_os.d.ts.map +1 -0
  398. package/esm/deps/jsr.io/@std/path/1.0.9/_os.js +9 -0
  399. package/esm/deps/jsr.io/@std/path/1.0.9/basename.d.ts +28 -0
  400. package/esm/deps/jsr.io/@std/path/1.0.9/basename.d.ts.map +1 -0
  401. package/esm/deps/jsr.io/@std/path/1.0.9/basename.js +36 -0
  402. package/esm/deps/jsr.io/@std/path/1.0.9/common.d.ts +28 -0
  403. package/esm/deps/jsr.io/@std/path/1.0.9/common.d.ts.map +1 -0
  404. package/esm/deps/jsr.io/@std/path/1.0.9/common.js +33 -0
  405. package/esm/deps/jsr.io/@std/path/1.0.9/constants.d.ts +15 -0
  406. package/esm/deps/jsr.io/@std/path/1.0.9/constants.d.ts.map +1 -0
  407. package/esm/deps/jsr.io/@std/path/1.0.9/constants.js +17 -0
  408. package/esm/deps/jsr.io/@std/path/1.0.9/dirname.d.ts +23 -0
  409. package/esm/deps/jsr.io/@std/path/1.0.9/dirname.d.ts.map +1 -0
  410. package/esm/deps/jsr.io/@std/path/1.0.9/dirname.js +29 -0
  411. package/esm/deps/jsr.io/@std/path/1.0.9/extname.d.ts +23 -0
  412. package/esm/deps/jsr.io/@std/path/1.0.9/extname.d.ts.map +1 -0
  413. package/esm/deps/jsr.io/@std/path/1.0.9/extname.js +29 -0
  414. package/esm/deps/jsr.io/@std/path/1.0.9/format.d.ts +22 -0
  415. package/esm/deps/jsr.io/@std/path/1.0.9/format.d.ts.map +1 -0
  416. package/esm/deps/jsr.io/@std/path/1.0.9/format.js +27 -0
  417. package/esm/deps/jsr.io/@std/path/1.0.9/from_file_url.d.ts +22 -0
  418. package/esm/deps/jsr.io/@std/path/1.0.9/from_file_url.d.ts.map +1 -0
  419. package/esm/deps/jsr.io/@std/path/1.0.9/from_file_url.js +28 -0
  420. package/esm/deps/jsr.io/@std/path/1.0.9/glob_to_regexp.d.ts +77 -0
  421. package/esm/deps/jsr.io/@std/path/1.0.9/glob_to_regexp.d.ts.map +1 -0
  422. package/esm/deps/jsr.io/@std/path/1.0.9/glob_to_regexp.js +83 -0
  423. package/esm/deps/jsr.io/@std/path/1.0.9/is_absolute.d.ts +22 -0
  424. package/esm/deps/jsr.io/@std/path/1.0.9/is_absolute.d.ts.map +1 -0
  425. package/esm/deps/jsr.io/@std/path/1.0.9/is_absolute.js +28 -0
  426. package/esm/deps/jsr.io/@std/path/1.0.9/is_glob.d.ts +17 -0
  427. package/esm/deps/jsr.io/@std/path/1.0.9/is_glob.d.ts.map +1 -0
  428. package/esm/deps/jsr.io/@std/path/1.0.9/is_glob.js +42 -0
  429. package/esm/deps/jsr.io/@std/path/1.0.9/join.d.ts +23 -0
  430. package/esm/deps/jsr.io/@std/path/1.0.9/join.d.ts.map +1 -0
  431. package/esm/deps/jsr.io/@std/path/1.0.9/join.js +29 -0
  432. package/esm/deps/jsr.io/@std/path/1.0.9/join_globs.d.ts +28 -0
  433. package/esm/deps/jsr.io/@std/path/1.0.9/join_globs.d.ts.map +1 -0
  434. package/esm/deps/jsr.io/@std/path/1.0.9/join_globs.js +34 -0
  435. package/esm/deps/jsr.io/@std/path/1.0.9/mod.d.ts +213 -0
  436. package/esm/deps/jsr.io/@std/path/1.0.9/mod.d.ts.map +1 -0
  437. package/esm/deps/jsr.io/@std/path/1.0.9/mod.js +216 -0
  438. package/esm/deps/jsr.io/@std/path/1.0.9/normalize.d.ts +27 -0
  439. package/esm/deps/jsr.io/@std/path/1.0.9/normalize.d.ts.map +1 -0
  440. package/esm/deps/jsr.io/@std/path/1.0.9/normalize.js +33 -0
  441. package/esm/deps/jsr.io/@std/path/1.0.9/normalize_glob.d.ts +29 -0
  442. package/esm/deps/jsr.io/@std/path/1.0.9/normalize_glob.d.ts.map +1 -0
  443. package/esm/deps/jsr.io/@std/path/1.0.9/normalize_glob.js +35 -0
  444. package/esm/deps/jsr.io/@std/path/1.0.9/parse.d.ts +35 -0
  445. package/esm/deps/jsr.io/@std/path/1.0.9/parse.d.ts.map +1 -0
  446. package/esm/deps/jsr.io/@std/path/1.0.9/parse.js +39 -0
  447. package/esm/deps/jsr.io/@std/path/1.0.9/posix/_util.d.ts +2 -0
  448. package/esm/deps/jsr.io/@std/path/1.0.9/posix/_util.d.ts.map +1 -0
  449. package/esm/deps/jsr.io/@std/path/1.0.9/posix/_util.js +8 -0
  450. package/esm/deps/jsr.io/@std/path/1.0.9/posix/basename.d.ts +40 -0
  451. package/esm/deps/jsr.io/@std/path/1.0.9/posix/basename.d.ts.map +1 -0
  452. package/esm/deps/jsr.io/@std/path/1.0.9/posix/basename.js +49 -0
  453. package/esm/deps/jsr.io/@std/path/1.0.9/posix/constants.d.ts +13 -0
  454. package/esm/deps/jsr.io/@std/path/1.0.9/posix/constants.d.ts.map +1 -0
  455. package/esm/deps/jsr.io/@std/path/1.0.9/posix/constants.js +14 -0
  456. package/esm/deps/jsr.io/@std/path/1.0.9/posix/dirname.d.ts +32 -0
  457. package/esm/deps/jsr.io/@std/path/1.0.9/posix/dirname.d.ts.map +1 -0
  458. package/esm/deps/jsr.io/@std/path/1.0.9/posix/dirname.js +62 -0
  459. package/esm/deps/jsr.io/@std/path/1.0.9/posix/extname.d.ts +37 -0
  460. package/esm/deps/jsr.io/@std/path/1.0.9/posix/extname.d.ts.map +1 -0
  461. package/esm/deps/jsr.io/@std/path/1.0.9/posix/extname.js +89 -0
  462. package/esm/deps/jsr.io/@std/path/1.0.9/posix/format.d.ts +24 -0
  463. package/esm/deps/jsr.io/@std/path/1.0.9/posix/format.d.ts.map +1 -0
  464. package/esm/deps/jsr.io/@std/path/1.0.9/posix/format.js +28 -0
  465. package/esm/deps/jsr.io/@std/path/1.0.9/posix/from_file_url.d.ts +16 -0
  466. package/esm/deps/jsr.io/@std/path/1.0.9/posix/from_file_url.d.ts.map +1 -0
  467. package/esm/deps/jsr.io/@std/path/1.0.9/posix/from_file_url.js +21 -0
  468. package/esm/deps/jsr.io/@std/path/1.0.9/posix/glob_to_regexp.d.ts +72 -0
  469. package/esm/deps/jsr.io/@std/path/1.0.9/posix/glob_to_regexp.d.ts.map +1 -0
  470. package/esm/deps/jsr.io/@std/path/1.0.9/posix/glob_to_regexp.js +82 -0
  471. package/esm/deps/jsr.io/@std/path/1.0.9/posix/is_absolute.d.ts +17 -0
  472. package/esm/deps/jsr.io/@std/path/1.0.9/posix/is_absolute.d.ts.map +1 -0
  473. package/esm/deps/jsr.io/@std/path/1.0.9/posix/is_absolute.js +23 -0
  474. package/esm/deps/jsr.io/@std/path/1.0.9/posix/join.d.ts +33 -0
  475. package/esm/deps/jsr.io/@std/path/1.0.9/posix/join.d.ts.map +1 -0
  476. package/esm/deps/jsr.io/@std/path/1.0.9/posix/join.js +42 -0
  477. package/esm/deps/jsr.io/@std/path/1.0.9/posix/join_globs.d.ts +20 -0
  478. package/esm/deps/jsr.io/@std/path/1.0.9/posix/join_globs.d.ts.map +1 -0
  479. package/esm/deps/jsr.io/@std/path/1.0.9/posix/join_globs.js +40 -0
  480. package/esm/deps/jsr.io/@std/path/1.0.9/posix/normalize.d.ts +40 -0
  481. package/esm/deps/jsr.io/@std/path/1.0.9/posix/normalize.d.ts.map +1 -0
  482. package/esm/deps/jsr.io/@std/path/1.0.9/posix/normalize.js +57 -0
  483. package/esm/deps/jsr.io/@std/path/1.0.9/posix/normalize_glob.d.ts +20 -0
  484. package/esm/deps/jsr.io/@std/path/1.0.9/posix/normalize_glob.d.ts.map +1 -0
  485. package/esm/deps/jsr.io/@std/path/1.0.9/posix/normalize_glob.js +32 -0
  486. package/esm/deps/jsr.io/@std/path/1.0.9/posix/parse.d.ts +25 -0
  487. package/esm/deps/jsr.io/@std/path/1.0.9/posix/parse.d.ts.map +1 -0
  488. package/esm/deps/jsr.io/@std/path/1.0.9/posix/parse.js +115 -0
  489. package/esm/deps/jsr.io/@std/path/1.0.9/posix/relative.d.ts +20 -0
  490. package/esm/deps/jsr.io/@std/path/1.0.9/posix/relative.d.ts.map +1 -0
  491. package/esm/deps/jsr.io/@std/path/1.0.9/posix/relative.js +106 -0
  492. package/esm/deps/jsr.io/@std/path/1.0.9/posix/resolve.d.ts +17 -0
  493. package/esm/deps/jsr.io/@std/path/1.0.9/posix/resolve.d.ts.map +1 -0
  494. package/esm/deps/jsr.io/@std/path/1.0.9/posix/resolve.js +59 -0
  495. package/esm/deps/jsr.io/@std/path/1.0.9/posix/to_file_url.d.ts +17 -0
  496. package/esm/deps/jsr.io/@std/path/1.0.9/posix/to_file_url.d.ts.map +1 -0
  497. package/esm/deps/jsr.io/@std/path/1.0.9/posix/to_file_url.js +27 -0
  498. package/esm/deps/jsr.io/@std/path/1.0.9/posix/to_namespaced_path.d.ts +16 -0
  499. package/esm/deps/jsr.io/@std/path/1.0.9/posix/to_namespaced_path.d.ts.map +1 -0
  500. package/esm/deps/jsr.io/@std/path/1.0.9/posix/to_namespaced_path.js +20 -0
  501. package/esm/deps/jsr.io/@std/path/1.0.9/relative.d.ts +24 -0
  502. package/esm/deps/jsr.io/@std/path/1.0.9/relative.d.ts.map +1 -0
  503. package/esm/deps/jsr.io/@std/path/1.0.9/relative.js +30 -0
  504. package/esm/deps/jsr.io/@std/path/1.0.9/resolve.d.ts +22 -0
  505. package/esm/deps/jsr.io/@std/path/1.0.9/resolve.d.ts.map +1 -0
  506. package/esm/deps/jsr.io/@std/path/1.0.9/resolve.js +30 -0
  507. package/esm/deps/jsr.io/@std/path/1.0.9/to_file_url.d.ts +22 -0
  508. package/esm/deps/jsr.io/@std/path/1.0.9/to_file_url.d.ts.map +1 -0
  509. package/esm/deps/jsr.io/@std/path/1.0.9/to_file_url.js +28 -0
  510. package/esm/deps/jsr.io/@std/path/1.0.9/to_namespaced_path.d.ts +21 -0
  511. package/esm/deps/jsr.io/@std/path/1.0.9/to_namespaced_path.d.ts.map +1 -0
  512. package/esm/deps/jsr.io/@std/path/1.0.9/to_namespaced_path.js +29 -0
  513. package/esm/deps/jsr.io/@std/path/1.0.9/types.d.ts +38 -0
  514. package/esm/deps/jsr.io/@std/path/1.0.9/types.d.ts.map +1 -0
  515. package/esm/deps/jsr.io/@std/path/1.0.9/types.js +3 -0
  516. package/esm/deps/jsr.io/@std/path/1.0.9/windows/_util.d.ts +4 -0
  517. package/esm/deps/jsr.io/@std/path/1.0.9/windows/_util.d.ts.map +1 -0
  518. package/esm/deps/jsr.io/@std/path/1.0.9/windows/_util.js +15 -0
  519. package/esm/deps/jsr.io/@std/path/1.0.9/windows/basename.d.ts +23 -0
  520. package/esm/deps/jsr.io/@std/path/1.0.9/windows/basename.d.ts.map +1 -0
  521. package/esm/deps/jsr.io/@std/path/1.0.9/windows/basename.js +44 -0
  522. package/esm/deps/jsr.io/@std/path/1.0.9/windows/constants.d.ts +13 -0
  523. package/esm/deps/jsr.io/@std/path/1.0.9/windows/constants.d.ts.map +1 -0
  524. package/esm/deps/jsr.io/@std/path/1.0.9/windows/constants.js +14 -0
  525. package/esm/deps/jsr.io/@std/path/1.0.9/windows/dirname.d.ts +20 -0
  526. package/esm/deps/jsr.io/@std/path/1.0.9/windows/dirname.d.ts.map +1 -0
  527. package/esm/deps/jsr.io/@std/path/1.0.9/windows/dirname.js +112 -0
  528. package/esm/deps/jsr.io/@std/path/1.0.9/windows/extname.d.ts +20 -0
  529. package/esm/deps/jsr.io/@std/path/1.0.9/windows/extname.d.ts.map +1 -0
  530. package/esm/deps/jsr.io/@std/path/1.0.9/windows/extname.js +81 -0
  531. package/esm/deps/jsr.io/@std/path/1.0.9/windows/format.d.ts +24 -0
  532. package/esm/deps/jsr.io/@std/path/1.0.9/windows/format.d.ts.map +1 -0
  533. package/esm/deps/jsr.io/@std/path/1.0.9/windows/format.js +28 -0
  534. package/esm/deps/jsr.io/@std/path/1.0.9/windows/from_file_url.d.ts +18 -0
  535. package/esm/deps/jsr.io/@std/path/1.0.9/windows/from_file_url.d.ts.map +1 -0
  536. package/esm/deps/jsr.io/@std/path/1.0.9/windows/from_file_url.js +30 -0
  537. package/esm/deps/jsr.io/@std/path/1.0.9/windows/glob_to_regexp.d.ts +71 -0
  538. package/esm/deps/jsr.io/@std/path/1.0.9/windows/glob_to_regexp.d.ts.map +1 -0
  539. package/esm/deps/jsr.io/@std/path/1.0.9/windows/glob_to_regexp.js +82 -0
  540. package/esm/deps/jsr.io/@std/path/1.0.9/windows/is_absolute.d.ts +17 -0
  541. package/esm/deps/jsr.io/@std/path/1.0.9/windows/is_absolute.d.ts.map +1 -0
  542. package/esm/deps/jsr.io/@std/path/1.0.9/windows/is_absolute.js +38 -0
  543. package/esm/deps/jsr.io/@std/path/1.0.9/windows/join.d.ts +20 -0
  544. package/esm/deps/jsr.io/@std/path/1.0.9/windows/join.d.ts.map +1 -0
  545. package/esm/deps/jsr.io/@std/path/1.0.9/windows/join.js +74 -0
  546. package/esm/deps/jsr.io/@std/path/1.0.9/windows/join_globs.d.ts +21 -0
  547. package/esm/deps/jsr.io/@std/path/1.0.9/windows/join_globs.d.ts.map +1 -0
  548. package/esm/deps/jsr.io/@std/path/1.0.9/windows/join_globs.js +41 -0
  549. package/esm/deps/jsr.io/@std/path/1.0.9/windows/normalize.d.ts +22 -0
  550. package/esm/deps/jsr.io/@std/path/1.0.9/windows/normalize.d.ts.map +1 -0
  551. package/esm/deps/jsr.io/@std/path/1.0.9/windows/normalize.js +134 -0
  552. package/esm/deps/jsr.io/@std/path/1.0.9/windows/normalize_glob.d.ts +20 -0
  553. package/esm/deps/jsr.io/@std/path/1.0.9/windows/normalize_glob.d.ts.map +1 -0
  554. package/esm/deps/jsr.io/@std/path/1.0.9/windows/normalize_glob.js +32 -0
  555. package/esm/deps/jsr.io/@std/path/1.0.9/windows/parse.d.ts +25 -0
  556. package/esm/deps/jsr.io/@std/path/1.0.9/windows/parse.d.ts.map +1 -0
  557. package/esm/deps/jsr.io/@std/path/1.0.9/windows/parse.js +176 -0
  558. package/esm/deps/jsr.io/@std/path/1.0.9/windows/relative.d.ts +23 -0
  559. package/esm/deps/jsr.io/@std/path/1.0.9/windows/relative.d.ts.map +1 -0
  560. package/esm/deps/jsr.io/@std/path/1.0.9/windows/relative.js +131 -0
  561. package/esm/deps/jsr.io/@std/path/1.0.9/windows/resolve.d.ts +17 -0
  562. package/esm/deps/jsr.io/@std/path/1.0.9/windows/resolve.d.ts.map +1 -0
  563. package/esm/deps/jsr.io/@std/path/1.0.9/windows/resolve.js +154 -0
  564. package/esm/deps/jsr.io/@std/path/1.0.9/windows/to_file_url.d.ts +17 -0
  565. package/esm/deps/jsr.io/@std/path/1.0.9/windows/to_file_url.d.ts.map +1 -0
  566. package/esm/deps/jsr.io/@std/path/1.0.9/windows/to_file_url.js +34 -0
  567. package/esm/deps/jsr.io/@std/path/1.0.9/windows/to_namespaced_path.d.ts +17 -0
  568. package/esm/deps/jsr.io/@std/path/1.0.9/windows/to_namespaced_path.d.ts.map +1 -0
  569. package/esm/deps/jsr.io/@std/path/1.0.9/windows/to_namespaced_path.js +49 -0
  570. package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts +2 -0
  571. package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts.map +1 -0
  572. package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.js +7 -0
  573. package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts +4 -0
  574. package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts.map +1 -0
  575. package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.js +40 -0
  576. package/esm/deps/jsr.io/@std/path/1.1.4/_common/common.d.ts +2 -0
  577. package/esm/deps/jsr.io/@std/path/1.1.4/_common/common.d.ts.map +1 -0
  578. package/esm/deps/jsr.io/@std/path/1.1.4/_common/common.js +23 -0
  579. package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts +40 -0
  580. package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts.map +1 -0
  581. package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.js +46 -0
  582. package/esm/deps/jsr.io/@std/path/1.1.4/_common/dirname.d.ts +2 -0
  583. package/esm/deps/jsr.io/@std/path/1.1.4/_common/dirname.d.ts.map +1 -0
  584. package/esm/deps/jsr.io/@std/path/1.1.4/_common/dirname.js +8 -0
  585. package/esm/deps/jsr.io/@std/path/1.1.4/_common/format.d.ts +4 -0
  586. package/esm/deps/jsr.io/@std/path/1.1.4/_common/format.d.ts.map +1 -0
  587. package/esm/deps/jsr.io/@std/path/1.1.4/_common/format.js +19 -0
  588. package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts +2 -0
  589. package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts.map +1 -0
  590. package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.js +9 -0
  591. package/esm/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.d.ts +35 -0
  592. package/esm/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.d.ts.map +1 -0
  593. package/esm/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.js +235 -0
  594. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts +2 -0
  595. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts.map +1 -0
  596. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.js +8 -0
  597. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts +2 -0
  598. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts.map +1 -0
  599. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.js +77 -0
  600. package/esm/deps/jsr.io/@std/path/1.1.4/_common/relative.d.ts +2 -0
  601. package/esm/deps/jsr.io/@std/path/1.1.4/_common/relative.d.ts.map +1 -0
  602. package/esm/deps/jsr.io/@std/path/1.1.4/_common/relative.js +9 -0
  603. package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts +2 -0
  604. package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts.map +1 -0
  605. package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.js +19 -0
  606. package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts +2 -0
  607. package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts.map +1 -0
  608. package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.js +15 -0
  609. package/esm/deps/jsr.io/@std/path/1.1.4/basename.d.ts +27 -0
  610. package/esm/deps/jsr.io/@std/path/1.1.4/basename.d.ts.map +1 -0
  611. package/esm/deps/jsr.io/@std/path/1.1.4/basename.js +35 -0
  612. package/esm/deps/jsr.io/@std/path/1.1.4/common.d.ts +28 -0
  613. package/esm/deps/jsr.io/@std/path/1.1.4/common.d.ts.map +1 -0
  614. package/esm/deps/jsr.io/@std/path/1.1.4/common.js +33 -0
  615. package/esm/deps/jsr.io/@std/path/1.1.4/constants.d.ts +15 -0
  616. package/esm/deps/jsr.io/@std/path/1.1.4/constants.d.ts.map +1 -0
  617. package/esm/deps/jsr.io/@std/path/1.1.4/constants.js +17 -0
  618. package/esm/deps/jsr.io/@std/path/1.1.4/dirname.d.ts +22 -0
  619. package/esm/deps/jsr.io/@std/path/1.1.4/dirname.d.ts.map +1 -0
  620. package/esm/deps/jsr.io/@std/path/1.1.4/dirname.js +28 -0
  621. package/esm/deps/jsr.io/@std/path/1.1.4/extname.d.ts +22 -0
  622. package/esm/deps/jsr.io/@std/path/1.1.4/extname.d.ts.map +1 -0
  623. package/esm/deps/jsr.io/@std/path/1.1.4/extname.js +28 -0
  624. package/esm/deps/jsr.io/@std/path/1.1.4/format.d.ts +22 -0
  625. package/esm/deps/jsr.io/@std/path/1.1.4/format.d.ts.map +1 -0
  626. package/esm/deps/jsr.io/@std/path/1.1.4/format.js +27 -0
  627. package/esm/deps/jsr.io/@std/path/1.1.4/from_file_url.d.ts +22 -0
  628. package/esm/deps/jsr.io/@std/path/1.1.4/from_file_url.d.ts.map +1 -0
  629. package/esm/deps/jsr.io/@std/path/1.1.4/from_file_url.js +28 -0
  630. package/esm/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.d.ts +77 -0
  631. package/esm/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.d.ts.map +1 -0
  632. package/esm/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.js +83 -0
  633. package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts +22 -0
  634. package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts.map +1 -0
  635. package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.js +28 -0
  636. package/esm/deps/jsr.io/@std/path/1.1.4/is_glob.d.ts +17 -0
  637. package/esm/deps/jsr.io/@std/path/1.1.4/is_glob.d.ts.map +1 -0
  638. package/esm/deps/jsr.io/@std/path/1.1.4/is_glob.js +42 -0
  639. package/esm/deps/jsr.io/@std/path/1.1.4/join.d.ts +23 -0
  640. package/esm/deps/jsr.io/@std/path/1.1.4/join.d.ts.map +1 -0
  641. package/esm/deps/jsr.io/@std/path/1.1.4/join.js +29 -0
  642. package/esm/deps/jsr.io/@std/path/1.1.4/join_globs.d.ts +28 -0
  643. package/esm/deps/jsr.io/@std/path/1.1.4/join_globs.d.ts.map +1 -0
  644. package/esm/deps/jsr.io/@std/path/1.1.4/join_globs.js +34 -0
  645. package/esm/deps/jsr.io/@std/path/1.1.4/mod.d.ts +213 -0
  646. package/esm/deps/jsr.io/@std/path/1.1.4/mod.d.ts.map +1 -0
  647. package/esm/deps/jsr.io/@std/path/1.1.4/mod.js +216 -0
  648. package/esm/deps/jsr.io/@std/path/1.1.4/normalize.d.ts +26 -0
  649. package/esm/deps/jsr.io/@std/path/1.1.4/normalize.d.ts.map +1 -0
  650. package/esm/deps/jsr.io/@std/path/1.1.4/normalize.js +32 -0
  651. package/esm/deps/jsr.io/@std/path/1.1.4/normalize_glob.d.ts +29 -0
  652. package/esm/deps/jsr.io/@std/path/1.1.4/normalize_glob.d.ts.map +1 -0
  653. package/esm/deps/jsr.io/@std/path/1.1.4/normalize_glob.js +35 -0
  654. package/esm/deps/jsr.io/@std/path/1.1.4/parse.d.ts +35 -0
  655. package/esm/deps/jsr.io/@std/path/1.1.4/parse.d.ts.map +1 -0
  656. package/esm/deps/jsr.io/@std/path/1.1.4/parse.js +39 -0
  657. package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts +2 -0
  658. package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts.map +1 -0
  659. package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.js +8 -0
  660. package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts +39 -0
  661. package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts.map +1 -0
  662. package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.js +52 -0
  663. package/esm/deps/jsr.io/@std/path/1.1.4/posix/constants.d.ts +13 -0
  664. package/esm/deps/jsr.io/@std/path/1.1.4/posix/constants.d.ts.map +1 -0
  665. package/esm/deps/jsr.io/@std/path/1.1.4/posix/constants.js +14 -0
  666. package/esm/deps/jsr.io/@std/path/1.1.4/posix/dirname.d.ts +30 -0
  667. package/esm/deps/jsr.io/@std/path/1.1.4/posix/dirname.d.ts.map +1 -0
  668. package/esm/deps/jsr.io/@std/path/1.1.4/posix/dirname.js +64 -0
  669. package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts +37 -0
  670. package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts.map +1 -0
  671. package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.js +93 -0
  672. package/esm/deps/jsr.io/@std/path/1.1.4/posix/format.d.ts +24 -0
  673. package/esm/deps/jsr.io/@std/path/1.1.4/posix/format.d.ts.map +1 -0
  674. package/esm/deps/jsr.io/@std/path/1.1.4/posix/format.js +28 -0
  675. package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts +16 -0
  676. package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts.map +1 -0
  677. package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.js +21 -0
  678. package/esm/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.d.ts +72 -0
  679. package/esm/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.d.ts.map +1 -0
  680. package/esm/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.js +82 -0
  681. package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts +17 -0
  682. package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts.map +1 -0
  683. package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.js +23 -0
  684. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts +31 -0
  685. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts.map +1 -0
  686. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.js +45 -0
  687. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join_globs.d.ts +20 -0
  688. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join_globs.d.ts.map +1 -0
  689. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join_globs.js +40 -0
  690. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts +37 -0
  691. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts.map +1 -0
  692. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.js +58 -0
  693. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.d.ts +20 -0
  694. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.d.ts.map +1 -0
  695. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.js +32 -0
  696. package/esm/deps/jsr.io/@std/path/1.1.4/posix/parse.d.ts +25 -0
  697. package/esm/deps/jsr.io/@std/path/1.1.4/posix/parse.d.ts.map +1 -0
  698. package/esm/deps/jsr.io/@std/path/1.1.4/posix/parse.js +115 -0
  699. package/esm/deps/jsr.io/@std/path/1.1.4/posix/relative.d.ts +20 -0
  700. package/esm/deps/jsr.io/@std/path/1.1.4/posix/relative.d.ts.map +1 -0
  701. package/esm/deps/jsr.io/@std/path/1.1.4/posix/relative.js +106 -0
  702. package/esm/deps/jsr.io/@std/path/1.1.4/posix/resolve.d.ts +17 -0
  703. package/esm/deps/jsr.io/@std/path/1.1.4/posix/resolve.d.ts.map +1 -0
  704. package/esm/deps/jsr.io/@std/path/1.1.4/posix/resolve.js +59 -0
  705. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts +17 -0
  706. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts.map +1 -0
  707. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.js +27 -0
  708. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.d.ts +16 -0
  709. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.d.ts.map +1 -0
  710. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.js +20 -0
  711. package/esm/deps/jsr.io/@std/path/1.1.4/relative.d.ts +24 -0
  712. package/esm/deps/jsr.io/@std/path/1.1.4/relative.d.ts.map +1 -0
  713. package/esm/deps/jsr.io/@std/path/1.1.4/relative.js +30 -0
  714. package/esm/deps/jsr.io/@std/path/1.1.4/resolve.d.ts +22 -0
  715. package/esm/deps/jsr.io/@std/path/1.1.4/resolve.d.ts.map +1 -0
  716. package/esm/deps/jsr.io/@std/path/1.1.4/resolve.js +30 -0
  717. package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts +22 -0
  718. package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts.map +1 -0
  719. package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.js +28 -0
  720. package/esm/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.d.ts +21 -0
  721. package/esm/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.d.ts.map +1 -0
  722. package/esm/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.js +29 -0
  723. package/esm/deps/jsr.io/@std/path/1.1.4/types.d.ts +38 -0
  724. package/esm/deps/jsr.io/@std/path/1.1.4/types.d.ts.map +1 -0
  725. package/esm/deps/jsr.io/@std/path/1.1.4/types.js +3 -0
  726. package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts +4 -0
  727. package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts.map +1 -0
  728. package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.js +15 -0
  729. package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts +22 -0
  730. package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts.map +1 -0
  731. package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.js +47 -0
  732. package/esm/deps/jsr.io/@std/path/1.1.4/windows/constants.d.ts +13 -0
  733. package/esm/deps/jsr.io/@std/path/1.1.4/windows/constants.d.ts.map +1 -0
  734. package/esm/deps/jsr.io/@std/path/1.1.4/windows/constants.js +14 -0
  735. package/esm/deps/jsr.io/@std/path/1.1.4/windows/dirname.d.ts +17 -0
  736. package/esm/deps/jsr.io/@std/path/1.1.4/windows/dirname.d.ts.map +1 -0
  737. package/esm/deps/jsr.io/@std/path/1.1.4/windows/dirname.js +113 -0
  738. package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts +17 -0
  739. package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts.map +1 -0
  740. package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.js +82 -0
  741. package/esm/deps/jsr.io/@std/path/1.1.4/windows/format.d.ts +24 -0
  742. package/esm/deps/jsr.io/@std/path/1.1.4/windows/format.d.ts.map +1 -0
  743. package/esm/deps/jsr.io/@std/path/1.1.4/windows/format.js +28 -0
  744. package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts +18 -0
  745. package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts.map +1 -0
  746. package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.js +30 -0
  747. package/esm/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.d.ts +71 -0
  748. package/esm/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.d.ts.map +1 -0
  749. package/esm/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.js +82 -0
  750. package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts +17 -0
  751. package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts.map +1 -0
  752. package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.js +38 -0
  753. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts +18 -0
  754. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts.map +1 -0
  755. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.js +77 -0
  756. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join_globs.d.ts +21 -0
  757. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join_globs.d.ts.map +1 -0
  758. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join_globs.js +41 -0
  759. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts +19 -0
  760. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts.map +1 -0
  761. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.js +135 -0
  762. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.d.ts +20 -0
  763. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.d.ts.map +1 -0
  764. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.js +32 -0
  765. package/esm/deps/jsr.io/@std/path/1.1.4/windows/parse.d.ts +25 -0
  766. package/esm/deps/jsr.io/@std/path/1.1.4/windows/parse.d.ts.map +1 -0
  767. package/esm/deps/jsr.io/@std/path/1.1.4/windows/parse.js +176 -0
  768. package/esm/deps/jsr.io/@std/path/1.1.4/windows/relative.d.ts +23 -0
  769. package/esm/deps/jsr.io/@std/path/1.1.4/windows/relative.d.ts.map +1 -0
  770. package/esm/deps/jsr.io/@std/path/1.1.4/windows/relative.js +131 -0
  771. package/esm/deps/jsr.io/@std/path/1.1.4/windows/resolve.d.ts +17 -0
  772. package/esm/deps/jsr.io/@std/path/1.1.4/windows/resolve.d.ts.map +1 -0
  773. package/esm/deps/jsr.io/@std/path/1.1.4/windows/resolve.js +154 -0
  774. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts +17 -0
  775. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts.map +1 -0
  776. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.js +34 -0
  777. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.d.ts +17 -0
  778. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.d.ts.map +1 -0
  779. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.js +49 -0
  780. package/esm/deps/jsr.io/@std/text/1.0.16/closest_string.d.ts +42 -0
  781. package/esm/deps/jsr.io/@std/text/1.0.16/closest_string.d.ts.map +1 -0
  782. package/esm/deps/jsr.io/@std/text/1.0.16/closest_string.js +46 -0
  783. package/esm/deps/jsr.io/@std/text/1.0.16/levenshtein_distance.d.ts +23 -0
  784. package/esm/deps/jsr.io/@std/text/1.0.16/levenshtein_distance.d.ts.map +1 -0
  785. package/esm/deps/jsr.io/@std/text/1.0.16/levenshtein_distance.js +127 -0
  786. package/esm/src/config/init.js +1 -1
  787. package/esm/src/helpers/cli.js +1 -1
  788. package/esm/src/helpers/fs.js +2 -2
  789. package/esm/src/helpers/styles.js +1 -1
  790. package/esm/src/main.js +2 -3
  791. package/esm/src/ui/compile.js +1 -1
  792. package/package.json +1 -8
@@ -0,0 +1,1789 @@
1
+ // deno-lint-ignore-file no-explicit-any
2
+ import { parseFlags, UnknownTypeError, ValidationError as FlagsValidationError, } from "../../flags/1.0.0-rc.8/mod.js";
3
+ import { bold, brightBlue, red } from "../../../@std/fmt/1.0.8/colors.js";
4
+ import { CommandNotFoundError, DefaultCommandNotFoundError, DuplicateCommandAliasError, DuplicateCommandNameError, DuplicateCompletionError, DuplicateEnvVarError, DuplicateExampleError, DuplicateOptionNameError, DuplicateTypeError, MissingArgumentError, MissingArgumentsError, MissingCommandNameError, MissingRequiredEnvVarError, NoArgumentsAllowedError, TooManyArgumentsError, TooManyEnvVarValuesError, UnexpectedOptionalEnvVarValueError, UnexpectedVariadicEnvVarValueError, UnknownCommandError, ValidationError, } from "./_errors.js";
5
+ import { exit } from "../../internal/1.0.0-rc.8/runtime/exit.js";
6
+ import { getArgs } from "../../internal/1.0.0-rc.8/runtime/get_args.js";
7
+ import { getEnv } from "../../internal/1.0.0-rc.8/runtime/get_env.js";
8
+ import { getDescription, parseArgumentsDefinition, splitArguments, underscoreToCamelCase, } from "./_utils.js";
9
+ import { HelpGenerator } from "./help/_help_generator.js";
10
+ import { Type } from "./type.js";
11
+ import { BooleanType } from "./types/boolean.js";
12
+ import { FileType } from "./types/file.js";
13
+ import { IntegerType } from "./types/integer.js";
14
+ import { NumberType } from "./types/number.js";
15
+ import { StringType } from "./types/string.js";
16
+ import { checkVersion } from "./upgrade/_check_version.js";
17
+ /**
18
+ * Chainable command factory class.
19
+ *
20
+ * ```ts
21
+ * import { Command } from "./mod.ts";
22
+ *
23
+ * export const cli = new Command()
24
+ * .name("todo")
25
+ * .description("Example command description")
26
+ * .globalOption("--verbose", "Enable verbose output.")
27
+ * .globalEnv("VERBOSE=<value>", "Enable verbose output.")
28
+ * .command("add <todo>", "Add todo.")
29
+ * .action(({ verbose }, todo: string) => {
30
+ * if (verbose) {
31
+ * console.log("Add todo '%s'.", todo);
32
+ * }
33
+ * })
34
+ * .command("delete <id>", "Delete todo.")
35
+ * .action(({ verbose }, id: string) => {
36
+ * if (verbose) {
37
+ * console.log("Delete todo with id '%s'.", id);
38
+ * }
39
+ * });
40
+ *
41
+ * if (import.meta.main) {
42
+ * await cli.parse();
43
+ * }
44
+ * ```
45
+ */
46
+ export class Command {
47
+ constructor() {
48
+ Object.defineProperty(this, "types", {
49
+ enumerable: true,
50
+ configurable: true,
51
+ writable: true,
52
+ value: new Map()
53
+ });
54
+ Object.defineProperty(this, "rawArgs", {
55
+ enumerable: true,
56
+ configurable: true,
57
+ writable: true,
58
+ value: []
59
+ });
60
+ Object.defineProperty(this, "literalArgs", {
61
+ enumerable: true,
62
+ configurable: true,
63
+ writable: true,
64
+ value: []
65
+ });
66
+ Object.defineProperty(this, "_name", {
67
+ enumerable: true,
68
+ configurable: true,
69
+ writable: true,
70
+ value: "COMMAND"
71
+ });
72
+ Object.defineProperty(this, "_parent", {
73
+ enumerable: true,
74
+ configurable: true,
75
+ writable: true,
76
+ value: void 0
77
+ });
78
+ Object.defineProperty(this, "_globalParent", {
79
+ enumerable: true,
80
+ configurable: true,
81
+ writable: true,
82
+ value: void 0
83
+ });
84
+ Object.defineProperty(this, "ver", {
85
+ enumerable: true,
86
+ configurable: true,
87
+ writable: true,
88
+ value: void 0
89
+ });
90
+ Object.defineProperty(this, "desc", {
91
+ enumerable: true,
92
+ configurable: true,
93
+ writable: true,
94
+ value: ""
95
+ });
96
+ Object.defineProperty(this, "_usage", {
97
+ enumerable: true,
98
+ configurable: true,
99
+ writable: true,
100
+ value: void 0
101
+ });
102
+ Object.defineProperty(this, "actionHandler", {
103
+ enumerable: true,
104
+ configurable: true,
105
+ writable: true,
106
+ value: void 0
107
+ });
108
+ Object.defineProperty(this, "globalActionHandler", {
109
+ enumerable: true,
110
+ configurable: true,
111
+ writable: true,
112
+ value: void 0
113
+ });
114
+ Object.defineProperty(this, "options", {
115
+ enumerable: true,
116
+ configurable: true,
117
+ writable: true,
118
+ value: []
119
+ });
120
+ Object.defineProperty(this, "commands", {
121
+ enumerable: true,
122
+ configurable: true,
123
+ writable: true,
124
+ value: new Map()
125
+ });
126
+ Object.defineProperty(this, "examples", {
127
+ enumerable: true,
128
+ configurable: true,
129
+ writable: true,
130
+ value: []
131
+ });
132
+ Object.defineProperty(this, "envVars", {
133
+ enumerable: true,
134
+ configurable: true,
135
+ writable: true,
136
+ value: []
137
+ });
138
+ Object.defineProperty(this, "aliases", {
139
+ enumerable: true,
140
+ configurable: true,
141
+ writable: true,
142
+ value: []
143
+ });
144
+ Object.defineProperty(this, "completions", {
145
+ enumerable: true,
146
+ configurable: true,
147
+ writable: true,
148
+ value: new Map()
149
+ });
150
+ Object.defineProperty(this, "cmd", {
151
+ enumerable: true,
152
+ configurable: true,
153
+ writable: true,
154
+ value: this
155
+ });
156
+ Object.defineProperty(this, "argsDefinition", {
157
+ enumerable: true,
158
+ configurable: true,
159
+ writable: true,
160
+ value: void 0
161
+ });
162
+ Object.defineProperty(this, "throwOnError", {
163
+ enumerable: true,
164
+ configurable: true,
165
+ writable: true,
166
+ value: false
167
+ });
168
+ Object.defineProperty(this, "_allowEmpty", {
169
+ enumerable: true,
170
+ configurable: true,
171
+ writable: true,
172
+ value: false
173
+ });
174
+ Object.defineProperty(this, "_stopEarly", {
175
+ enumerable: true,
176
+ configurable: true,
177
+ writable: true,
178
+ value: false
179
+ });
180
+ Object.defineProperty(this, "defaultCommand", {
181
+ enumerable: true,
182
+ configurable: true,
183
+ writable: true,
184
+ value: void 0
185
+ });
186
+ Object.defineProperty(this, "_useRawArgs", {
187
+ enumerable: true,
188
+ configurable: true,
189
+ writable: true,
190
+ value: false
191
+ });
192
+ Object.defineProperty(this, "args", {
193
+ enumerable: true,
194
+ configurable: true,
195
+ writable: true,
196
+ value: []
197
+ });
198
+ Object.defineProperty(this, "isHidden", {
199
+ enumerable: true,
200
+ configurable: true,
201
+ writable: true,
202
+ value: false
203
+ });
204
+ Object.defineProperty(this, "isGlobal", {
205
+ enumerable: true,
206
+ configurable: true,
207
+ writable: true,
208
+ value: false
209
+ });
210
+ Object.defineProperty(this, "hasDefaults", {
211
+ enumerable: true,
212
+ configurable: true,
213
+ writable: true,
214
+ value: false
215
+ });
216
+ Object.defineProperty(this, "_versionOptions", {
217
+ enumerable: true,
218
+ configurable: true,
219
+ writable: true,
220
+ value: void 0
221
+ });
222
+ Object.defineProperty(this, "_helpOptions", {
223
+ enumerable: true,
224
+ configurable: true,
225
+ writable: true,
226
+ value: void 0
227
+ });
228
+ Object.defineProperty(this, "_versionOption", {
229
+ enumerable: true,
230
+ configurable: true,
231
+ writable: true,
232
+ value: void 0
233
+ });
234
+ Object.defineProperty(this, "_helpOption", {
235
+ enumerable: true,
236
+ configurable: true,
237
+ writable: true,
238
+ value: void 0
239
+ });
240
+ Object.defineProperty(this, "_help", {
241
+ enumerable: true,
242
+ configurable: true,
243
+ writable: true,
244
+ value: void 0
245
+ });
246
+ Object.defineProperty(this, "_shouldExit", {
247
+ enumerable: true,
248
+ configurable: true,
249
+ writable: true,
250
+ value: void 0
251
+ });
252
+ Object.defineProperty(this, "_meta", {
253
+ enumerable: true,
254
+ configurable: true,
255
+ writable: true,
256
+ value: {}
257
+ });
258
+ Object.defineProperty(this, "_groupName", {
259
+ enumerable: true,
260
+ configurable: true,
261
+ writable: true,
262
+ value: null
263
+ });
264
+ Object.defineProperty(this, "_noGlobals", {
265
+ enumerable: true,
266
+ configurable: true,
267
+ writable: true,
268
+ value: false
269
+ });
270
+ Object.defineProperty(this, "errorHandler", {
271
+ enumerable: true,
272
+ configurable: true,
273
+ writable: true,
274
+ value: void 0
275
+ });
276
+ }
277
+ versionOption(flags, desc, opts) {
278
+ this._versionOptions = flags === false ? flags : {
279
+ flags,
280
+ desc,
281
+ opts: typeof opts === "function" ? { action: opts } : opts,
282
+ };
283
+ return this;
284
+ }
285
+ helpOption(flags, desc, opts) {
286
+ this._helpOptions = flags === false ? flags : {
287
+ flags,
288
+ desc,
289
+ opts: typeof opts === "function" ? { action: opts } : opts,
290
+ };
291
+ return this;
292
+ }
293
+ /**
294
+ * Add new sub-command.
295
+ * @param nameAndArguments Command definition. E.g: `my-command <input-file:string> <output-file:string>`
296
+ * @param cmdOrDescription The description of the new child command.
297
+ * @param override Override existing child command.
298
+ */
299
+ command(nameAndArguments, cmdOrDescription, override) {
300
+ this.reset();
301
+ const result = splitArguments(nameAndArguments);
302
+ const name = result.flags.shift();
303
+ const aliases = result.flags;
304
+ if (!name) {
305
+ throw new MissingCommandNameError();
306
+ }
307
+ if (this.getBaseCommand(name, true)) {
308
+ if (!override) {
309
+ throw new DuplicateCommandNameError(name);
310
+ }
311
+ this.removeCommand(name);
312
+ }
313
+ let description;
314
+ let cmd;
315
+ if (typeof cmdOrDescription === "string") {
316
+ description = cmdOrDescription;
317
+ }
318
+ if (cmdOrDescription instanceof Command) {
319
+ cmd = cmdOrDescription.reset();
320
+ }
321
+ else {
322
+ cmd = new Command();
323
+ }
324
+ cmd._name = name;
325
+ cmd._parent = this;
326
+ if (description) {
327
+ cmd.description(description);
328
+ }
329
+ if (result.typeDefinition) {
330
+ cmd.arguments(result.typeDefinition);
331
+ }
332
+ aliases.forEach((alias) => cmd.alias(alias));
333
+ this.commands.set(name, cmd);
334
+ this.select(name);
335
+ return this;
336
+ }
337
+ /**
338
+ * Add new command alias.
339
+ *
340
+ * @param alias Tha name of the alias.
341
+ */
342
+ alias(alias) {
343
+ if (this.cmd._name === alias || this.cmd.aliases.includes(alias)) {
344
+ throw new DuplicateCommandAliasError(alias);
345
+ }
346
+ this.cmd.aliases.push(alias);
347
+ return this;
348
+ }
349
+ /** Reset internal command reference to main command. */
350
+ reset() {
351
+ this._groupName = null;
352
+ this.cmd = this;
353
+ return this;
354
+ }
355
+ /**
356
+ * Set internal command pointer to child command with given name.
357
+ * @param name The name of the command to select.
358
+ */
359
+ select(name) {
360
+ const cmd = this.getBaseCommand(name, true);
361
+ if (!cmd) {
362
+ throw new CommandNotFoundError(name, this.getBaseCommands(true));
363
+ }
364
+ this.cmd = cmd;
365
+ return this;
366
+ }
367
+ /*****************************************************************************
368
+ **** SUB HANDLER ************************************************************
369
+ *****************************************************************************/
370
+ /** Set command name. Used in auto generated help and shell completions */
371
+ name(name) {
372
+ this.cmd._name = name;
373
+ return this;
374
+ }
375
+ /**
376
+ * Set command version.
377
+ *
378
+ * @param version Semantic version string string or method that returns the version string.
379
+ */
380
+ version(version) {
381
+ if (typeof version === "string") {
382
+ this.cmd.ver = () => version;
383
+ }
384
+ else if (typeof version === "function") {
385
+ this.cmd.ver = version;
386
+ }
387
+ return this;
388
+ }
389
+ /**
390
+ * Add meta data. Will be displayed in the auto generated help and in the
391
+ * output of the long version.
392
+ *
393
+ * @param name The name/label of the metadata.
394
+ * @param value The value of the metadata.
395
+ */
396
+ meta(name, value) {
397
+ this.cmd._meta[name] = value;
398
+ return this;
399
+ }
400
+ getMeta(name) {
401
+ return typeof name === "undefined" ? this._meta : this._meta[name];
402
+ }
403
+ /**
404
+ * Set command help.
405
+ *
406
+ * @param help Help string, method, or config for generator that returns the help string.
407
+ */
408
+ help(help) {
409
+ if (typeof help === "string") {
410
+ this.cmd._help = () => help;
411
+ }
412
+ else if (typeof help === "function") {
413
+ this.cmd._help = help;
414
+ }
415
+ else {
416
+ this.cmd._help = (cmd, options) => HelpGenerator.generate(cmd, { ...help, ...options });
417
+ }
418
+ return this;
419
+ }
420
+ /**
421
+ * Set the long command description.
422
+ *
423
+ * @param description The command description.
424
+ */
425
+ description(description) {
426
+ this.cmd.desc = description;
427
+ return this;
428
+ }
429
+ /**
430
+ * Set the command usage. Defaults to arguments.
431
+ *
432
+ * @param usage The command usage.
433
+ */
434
+ usage(usage) {
435
+ this.cmd._usage = usage;
436
+ return this;
437
+ }
438
+ /** Hide command from help, completions, etc. */
439
+ hidden() {
440
+ this.cmd.isHidden = true;
441
+ return this;
442
+ }
443
+ /** Make command globally available. */
444
+ global() {
445
+ this.cmd.isGlobal = true;
446
+ return this;
447
+ }
448
+ /**
449
+ * Set command arguments.
450
+ *
451
+ * Syntax: `<requiredArg:string> [optionalArg: number] [...restArgs:string]`
452
+ */
453
+ arguments(args) {
454
+ this.cmd.argsDefinition = args;
455
+ return this;
456
+ }
457
+ /**
458
+ * Set command callback method.
459
+ *
460
+ * @param fn Command action handler.
461
+ */
462
+ action(fn) {
463
+ this.cmd.actionHandler = fn;
464
+ return this;
465
+ }
466
+ /**
467
+ * Set command callback method.
468
+ *
469
+ * @param fn Command action handler.
470
+ */
471
+ globalAction(fn) {
472
+ this.cmd.globalActionHandler = fn;
473
+ return this;
474
+ }
475
+ /**
476
+ * Don't throw an error if the command was called without arguments.
477
+ *
478
+ * @param allowEmpty Enable/disable allow empty.
479
+ */
480
+ allowEmpty(allowEmpty) {
481
+ this.cmd._allowEmpty = allowEmpty !== false;
482
+ return this;
483
+ }
484
+ /**
485
+ * Enable stop early. If enabled, all arguments starting from the first non
486
+ * option argument will be passed as arguments with type string to the command
487
+ * action handler.
488
+ *
489
+ * For example:
490
+ * `command --debug-level warning server --port 80`
491
+ *
492
+ * Will result in:
493
+ * - options: `{ debugLevel: 'warning' }`
494
+ * - args: `['server', '--port', '80']`
495
+ *
496
+ * @param stopEarly Enable/disable stop early.
497
+ */
498
+ stopEarly(stopEarly = true) {
499
+ this.cmd._stopEarly = stopEarly;
500
+ return this;
501
+ }
502
+ /**
503
+ * Disable parsing arguments. If enabled the raw arguments will be passed to
504
+ * the action handler. This has no effect for parent or child commands. Only
505
+ * for the command on which this method was called.
506
+ *
507
+ * @param useRawArgs Enable/disable raw arguments.
508
+ */
509
+ useRawArgs(useRawArgs = true) {
510
+ this.cmd._useRawArgs = useRawArgs;
511
+ return this;
512
+ }
513
+ /**
514
+ * Set default command. The default command is executed when the program
515
+ * was called without any argument and if no action handler is registered.
516
+ *
517
+ * @param name Name of the default command.
518
+ */
519
+ default(name) {
520
+ this.cmd.defaultCommand = name;
521
+ return this;
522
+ }
523
+ globalType(name, handler, options) {
524
+ return this.type(name, handler, { ...options, global: true });
525
+ }
526
+ /**
527
+ * Register custom type.
528
+ *
529
+ * @param name The name of the type.
530
+ * @param handler The callback method to parse the type.
531
+ * @param options Type options.
532
+ */
533
+ type(name, handler, options) {
534
+ if (this.cmd.types.get(name) && !options?.override) {
535
+ throw new DuplicateTypeError(name);
536
+ }
537
+ this.cmd.types.set(name, {
538
+ ...options,
539
+ name,
540
+ handler: handler,
541
+ });
542
+ if (handler instanceof Type &&
543
+ (typeof handler.complete !== "undefined" ||
544
+ typeof handler.values !== "undefined")) {
545
+ const completeHandler = (cmd, parent) => handler.complete?.(cmd, parent) || [];
546
+ this.complete(name, completeHandler, options);
547
+ }
548
+ return this;
549
+ }
550
+ /**
551
+ * Register global complete handler.
552
+ *
553
+ * @param name The name of the completion.
554
+ * @param complete The callback method to complete the type.
555
+ * @param options Complete options.
556
+ */
557
+ globalComplete(name, complete, options) {
558
+ return this.complete(name, complete, { ...options, global: true });
559
+ }
560
+ complete(name, complete, options) {
561
+ if (this.cmd.completions.has(name) && !options?.override) {
562
+ throw new DuplicateCompletionError(name);
563
+ }
564
+ this.cmd.completions.set(name, {
565
+ name,
566
+ complete,
567
+ ...options,
568
+ });
569
+ return this;
570
+ }
571
+ /**
572
+ * Throw validation errors instead of calling `exit()` to handle
573
+ * validation errors manually.
574
+ *
575
+ * A validation error is thrown when the command is wrongly used by the user.
576
+ * For example: If the user passes some invalid options or arguments to the
577
+ * command.
578
+ *
579
+ * This has no effect for parent commands. Only for the command on which this
580
+ * method was called and all child commands.
581
+ *
582
+ * **Example:**
583
+ *
584
+ * ```ts
585
+ * import { Command, ValidationError } from "./mod.ts";
586
+ *
587
+ * const cmd = new Command();
588
+ * // ...
589
+ *
590
+ * try {
591
+ * cmd.parse();
592
+ * } catch(error) {
593
+ * if (error instanceof ValidationError) {
594
+ * cmd.showHelp();
595
+ * Deno.exit(1);
596
+ * }
597
+ * throw error;
598
+ * }
599
+ * ```
600
+ *
601
+ * @see ValidationError
602
+ */
603
+ throwErrors() {
604
+ this.cmd.throwOnError = true;
605
+ return this;
606
+ }
607
+ /**
608
+ * Set custom error handler.
609
+ *
610
+ * @param handler Error handler callback function.
611
+ */
612
+ error(handler) {
613
+ this.cmd.errorHandler = handler;
614
+ return this;
615
+ }
616
+ /** Get error handler callback function. */
617
+ getErrorHandler() {
618
+ return this.errorHandler ?? this._parent?.errorHandler;
619
+ }
620
+ /**
621
+ * Same as `.throwErrors()` but also prevents calling `exit()` after
622
+ * printing help or version with the --help and --version option.
623
+ */
624
+ noExit() {
625
+ this.cmd._shouldExit = false;
626
+ this.throwErrors();
627
+ return this;
628
+ }
629
+ /**
630
+ * Disable inheriting global commands, options and environment variables from
631
+ * parent commands.
632
+ */
633
+ noGlobals() {
634
+ this.cmd._noGlobals = true;
635
+ return this;
636
+ }
637
+ /** Check whether the command should throw errors or exit. */
638
+ shouldThrowErrors() {
639
+ return this.throwOnError || !!this._parent?.shouldThrowErrors();
640
+ }
641
+ /** Check whether the command should exit after printing help or version. */
642
+ shouldExit() {
643
+ return this._shouldExit ?? this._parent?.shouldExit() ?? true;
644
+ }
645
+ /**
646
+ * Enable grouping of options and set the name of the group.
647
+ * All option which are added after calling the `.group()` method will be
648
+ * grouped in the help output. If the `.group()` method can be use multiple
649
+ * times to create more groups.
650
+ *
651
+ * @param name The name of the option group.
652
+ */
653
+ group(name) {
654
+ this.cmd._groupName = name;
655
+ return this;
656
+ }
657
+ /**
658
+ * Register a global option.
659
+ *
660
+ * @param flags Flags string e.g: -h, --help, --manual <requiredArg:string> [optionalArg:number] [...restArgs:string]
661
+ * @param desc Flag description.
662
+ * @param opts Flag options or custom handler for processing flag value.
663
+ */
664
+ globalOption(flags, desc, opts) {
665
+ if (typeof opts === "function") {
666
+ return this.option(flags, desc, { value: opts, global: true });
667
+ }
668
+ return this.option(flags, desc, { ...opts, global: true });
669
+ }
670
+ option(flags, desc, opts) {
671
+ if (typeof opts === "function") {
672
+ opts = { value: opts };
673
+ }
674
+ const result = splitArguments(flags);
675
+ const args = result.typeDefinition
676
+ ? parseArgumentsDefinition(result.typeDefinition)
677
+ : [];
678
+ const option = {
679
+ ...opts,
680
+ name: "",
681
+ description: desc,
682
+ args,
683
+ flags: result.flags,
684
+ equalsSign: result.equalsSign,
685
+ typeDefinition: result.typeDefinition,
686
+ groupName: this._groupName ?? undefined,
687
+ };
688
+ if (option.separator) {
689
+ for (const arg of args) {
690
+ if (arg.list) {
691
+ arg.separator = option.separator;
692
+ }
693
+ }
694
+ }
695
+ for (const part of option.flags) {
696
+ const arg = part.trim();
697
+ const isLong = /^--/.test(arg);
698
+ const name = isLong ? arg.slice(2) : arg.slice(1);
699
+ if (this.cmd.getBaseOption(name, true)) {
700
+ if (opts?.override) {
701
+ this.removeOption(name);
702
+ }
703
+ else {
704
+ throw new DuplicateOptionNameError(name, this.getPath());
705
+ }
706
+ }
707
+ if (!option.name && isLong) {
708
+ option.name = name;
709
+ }
710
+ else if (!option.aliases) {
711
+ option.aliases = [name];
712
+ }
713
+ else {
714
+ option.aliases.push(name);
715
+ }
716
+ }
717
+ if (option.prepend) {
718
+ this.cmd.options.unshift(option);
719
+ }
720
+ else {
721
+ this.cmd.options.push(option);
722
+ }
723
+ return this;
724
+ }
725
+ /**
726
+ * Register command example.
727
+ *
728
+ * @param name Name of the example.
729
+ * @param description The content of the example.
730
+ */
731
+ example(name, description) {
732
+ if (this.cmd.hasExample(name)) {
733
+ throw new DuplicateExampleError(name);
734
+ }
735
+ this.cmd.examples.push({ name, description });
736
+ return this;
737
+ }
738
+ /**
739
+ * @param flags Flags string e.g: -h, --help, --manual <requiredArg:string> [optionalArg:number] [...restArgs:string]
740
+ * @param desc Flag description.
741
+ * @param opts Flag options or custom handler for processing flag value.
742
+ */
743
+ /**
744
+ * Register a global environment variable.
745
+ *
746
+ * @param name Name of the environment variable.
747
+ * @param description The description of the environment variable.
748
+ * @param options Environment variable options.
749
+ */
750
+ globalEnv(name, description, options) {
751
+ return this.env(name, description, { ...options, global: true });
752
+ }
753
+ env(name, description, options) {
754
+ const result = splitArguments(name);
755
+ if (!result.typeDefinition) {
756
+ result.typeDefinition = "<value:boolean>";
757
+ }
758
+ if (result.flags.some((envName) => this.cmd.getBaseEnvVar(envName, true))) {
759
+ throw new DuplicateEnvVarError(name);
760
+ }
761
+ const details = parseArgumentsDefinition(result.typeDefinition);
762
+ if (details.length > 1) {
763
+ throw new TooManyEnvVarValuesError(name);
764
+ }
765
+ else if (details.length && details[0].optional) {
766
+ throw new UnexpectedOptionalEnvVarValueError(name);
767
+ }
768
+ else if (details.length && details[0].variadic) {
769
+ throw new UnexpectedVariadicEnvVarValueError(name);
770
+ }
771
+ this.cmd.envVars.push({
772
+ name: result.flags[0],
773
+ names: result.flags,
774
+ description,
775
+ type: details[0].type,
776
+ details: details.shift(),
777
+ ...options,
778
+ });
779
+ return this;
780
+ }
781
+ /*****************************************************************************
782
+ **** MAIN HANDLER ***********************************************************
783
+ *****************************************************************************/
784
+ /**
785
+ * Parse command line arguments and execute matched command.
786
+ *
787
+ * @param args Command line args to parse. Ex: `cmd.parse( Deno.args )`
788
+ */
789
+ parse(args = getArgs()) {
790
+ const ctx = {
791
+ unknown: args.slice(),
792
+ flags: {},
793
+ env: {},
794
+ literal: [],
795
+ stopEarly: false,
796
+ stopOnUnknown: false,
797
+ defaults: {},
798
+ actions: [],
799
+ };
800
+ return this.parseCommand(ctx);
801
+ }
802
+ async parseCommand(ctx) {
803
+ try {
804
+ this.reset();
805
+ this.registerDefaults();
806
+ this.rawArgs = ctx.unknown.slice();
807
+ if (this._useRawArgs) {
808
+ await this.parseEnvVars(ctx, this.envVars);
809
+ return await this.execute(ctx.env, ctx.unknown);
810
+ }
811
+ let preParseGlobals = false;
812
+ let subCommand;
813
+ // Pre parse globals to support: cmd --global-option sub-command --option
814
+ if (ctx.unknown.length > 0) {
815
+ // Detect sub command.
816
+ subCommand = this.getSubCommand(ctx);
817
+ if (!subCommand) {
818
+ // Only pre parse globals if first arg ist a global option.
819
+ const optionName = ctx.unknown[0].replace(/^-+/, "").split("=")[0];
820
+ const option = this.getOption(optionName, true);
821
+ if (option?.global) {
822
+ preParseGlobals = true;
823
+ await this.parseGlobalOptionsAndEnvVars(ctx);
824
+ }
825
+ }
826
+ }
827
+ if (subCommand || ctx.unknown.length > 0) {
828
+ subCommand ??= this.getSubCommand(ctx);
829
+ if (subCommand) {
830
+ subCommand._globalParent = this;
831
+ return subCommand.parseCommand(ctx);
832
+ }
833
+ }
834
+ // Parse rest options & env vars.
835
+ await this.parseOptionsAndEnvVars(ctx, preParseGlobals);
836
+ const options = { ...ctx.env, ...ctx.flags };
837
+ const args = this.parseArguments(ctx, options);
838
+ this.literalArgs = ctx.literal;
839
+ // Execute option action.
840
+ if (ctx.actions.length) {
841
+ await Promise.all(ctx.actions.map((action) => action.call(this, options, ...args)));
842
+ if (ctx.standalone) {
843
+ return {
844
+ options,
845
+ args,
846
+ cmd: this,
847
+ literal: this.literalArgs,
848
+ };
849
+ }
850
+ }
851
+ return await this.execute(options, args);
852
+ }
853
+ catch (error) {
854
+ this.handleError(error);
855
+ }
856
+ }
857
+ getSubCommand(ctx) {
858
+ const subCommand = this.getCommand(ctx.unknown[0], true);
859
+ if (subCommand) {
860
+ ctx.unknown.shift();
861
+ }
862
+ return subCommand;
863
+ }
864
+ async parseGlobalOptionsAndEnvVars(ctx) {
865
+ const isHelpOption = this.getHelpOption()?.flags.includes(ctx.unknown[0]);
866
+ // Parse global env vars.
867
+ const envVars = [
868
+ ...this.envVars.filter((envVar) => envVar.global),
869
+ ...this.getGlobalEnvVars(true),
870
+ ];
871
+ await this.parseEnvVars(ctx, envVars, !isHelpOption);
872
+ // Parse global options.
873
+ const options = [
874
+ ...this.options.filter((option) => option.global),
875
+ ...this.getGlobalOptions(true),
876
+ ];
877
+ this.parseOptions(ctx, options, {
878
+ stopEarly: true,
879
+ stopOnUnknown: true,
880
+ dotted: false,
881
+ });
882
+ }
883
+ async parseOptionsAndEnvVars(ctx, preParseGlobals) {
884
+ const helpOption = this.getHelpOption();
885
+ const isVersionOption = this._versionOption?.flags.includes(ctx.unknown[0]);
886
+ const isHelpOption = helpOption && ctx.flags?.[helpOption.name] === true;
887
+ // Parse env vars.
888
+ const envVars = preParseGlobals
889
+ ? this.envVars.filter((envVar) => !envVar.global)
890
+ : this.getEnvVars(true);
891
+ await this.parseEnvVars(ctx, envVars, !isHelpOption && !isVersionOption);
892
+ // Parse options.
893
+ const options = this.getOptions(true);
894
+ this.parseOptions(ctx, options);
895
+ }
896
+ /** Register default options like `--version` and `--help`. */
897
+ registerDefaults() {
898
+ if (this.hasDefaults || this.getParent()) {
899
+ return this;
900
+ }
901
+ this.hasDefaults = true;
902
+ this.reset();
903
+ !this.types.has("string") &&
904
+ this.type("string", new StringType(), { global: true });
905
+ !this.types.has("number") &&
906
+ this.type("number", new NumberType(), { global: true });
907
+ !this.types.has("integer") &&
908
+ this.type("integer", new IntegerType(), { global: true });
909
+ !this.types.has("boolean") &&
910
+ this.type("boolean", new BooleanType(), { global: true });
911
+ !this.types.has("file") &&
912
+ this.type("file", new FileType(), { global: true });
913
+ if (!this._help) {
914
+ this.help({});
915
+ }
916
+ if (this._versionOptions !== false && (this._versionOptions || this.ver)) {
917
+ this.option(this._versionOptions?.flags || "-V, --version", this._versionOptions?.desc ||
918
+ "Show the version number for this program.", {
919
+ standalone: true,
920
+ prepend: true,
921
+ action: async function () {
922
+ const long = this.getRawArgs().includes(`--${this._versionOption?.name}`);
923
+ if (long) {
924
+ await checkVersion(this);
925
+ this.showLongVersion();
926
+ }
927
+ else {
928
+ this.showVersion();
929
+ }
930
+ this.exit();
931
+ },
932
+ ...(this._versionOptions?.opts ?? {}),
933
+ });
934
+ this._versionOption = this.options[0];
935
+ }
936
+ if (this._helpOptions !== false) {
937
+ this.option(this._helpOptions?.flags || "-h, --help", this._helpOptions?.desc || "Show this help.", {
938
+ standalone: true,
939
+ global: true,
940
+ prepend: true,
941
+ action: async function () {
942
+ const long = this.getRawArgs().includes(`--${this.getHelpOption()?.name}`);
943
+ await checkVersion(this);
944
+ this.showHelp({ long });
945
+ this.exit();
946
+ },
947
+ ...(this._helpOptions?.opts ?? {}),
948
+ });
949
+ this._helpOption = this.options[0];
950
+ }
951
+ return this;
952
+ }
953
+ /**
954
+ * Execute command.
955
+ * @param options A map of options.
956
+ * @param args Command arguments.
957
+ */
958
+ async execute(options, args) {
959
+ if (this.defaultCommand) {
960
+ const cmd = this.getCommand(this.defaultCommand, true);
961
+ if (!cmd) {
962
+ throw new DefaultCommandNotFoundError(this.defaultCommand, this.getCommands());
963
+ }
964
+ cmd._globalParent = this;
965
+ return cmd.execute(options, args);
966
+ }
967
+ await this.executeGlobalAction(options, args);
968
+ if (this.actionHandler) {
969
+ await this.actionHandler(options, ...args);
970
+ }
971
+ return {
972
+ options,
973
+ args,
974
+ cmd: this,
975
+ literal: this.literalArgs,
976
+ };
977
+ }
978
+ async executeGlobalAction(options, args) {
979
+ if (!this._noGlobals) {
980
+ await this._parent?.executeGlobalAction(options, args);
981
+ }
982
+ await this.globalActionHandler?.(options, ...args);
983
+ }
984
+ /** Parse raw command line arguments. */
985
+ parseOptions(ctx, options, { stopEarly = this._stopEarly, stopOnUnknown = false, dotted = true, } = {}) {
986
+ parseFlags(ctx, {
987
+ stopEarly,
988
+ stopOnUnknown,
989
+ dotted,
990
+ allowEmpty: this._allowEmpty,
991
+ flags: options,
992
+ ignoreDefaults: ctx.env,
993
+ parse: (type) => this.parseType(type),
994
+ option: (option) => {
995
+ if (option.action) {
996
+ ctx.actions.push(option.action);
997
+ }
998
+ },
999
+ });
1000
+ }
1001
+ /** Parse argument type. */
1002
+ parseType(type) {
1003
+ const typeSettings = this.getType(type.type);
1004
+ if (!typeSettings) {
1005
+ throw new UnknownTypeError(type.type, this.getTypes().map((type) => type.name));
1006
+ }
1007
+ return typeSettings.handler instanceof Type
1008
+ ? typeSettings.handler.parse(type)
1009
+ : typeSettings.handler(type);
1010
+ }
1011
+ /**
1012
+ * Read and validate environment variables.
1013
+ * @param ctx Parse context.
1014
+ * @param envVars env vars defined by the command.
1015
+ * @param validate when true, throws an error if a required env var is missing.
1016
+ */
1017
+ async parseEnvVars(ctx, envVars, validate = true) {
1018
+ for (const envVar of envVars) {
1019
+ const env = await this.findEnvVar(envVar.names);
1020
+ if (env) {
1021
+ const parseType = (value) => {
1022
+ return this.parseType({
1023
+ label: "Environment variable",
1024
+ type: envVar.type,
1025
+ name: env.name,
1026
+ value,
1027
+ });
1028
+ };
1029
+ const propertyName = underscoreToCamelCase(envVar.prefix
1030
+ ? envVar.names[0].replace(new RegExp(`^${envVar.prefix}`), "")
1031
+ : envVar.names[0]);
1032
+ if (envVar.details.list) {
1033
+ ctx.env[propertyName] = env.value
1034
+ .split(envVar.details.separator ?? ",")
1035
+ .map(parseType);
1036
+ }
1037
+ else {
1038
+ ctx.env[propertyName] = parseType(env.value);
1039
+ }
1040
+ if (envVar.value && typeof ctx.env[propertyName] !== "undefined") {
1041
+ ctx.env[propertyName] = envVar.value(ctx.env[propertyName]);
1042
+ }
1043
+ }
1044
+ else if (envVar.required && validate) {
1045
+ throw new MissingRequiredEnvVarError(envVar);
1046
+ }
1047
+ }
1048
+ }
1049
+ async findEnvVar(names) {
1050
+ for (const name of names) {
1051
+ // dnt-shim-ignore
1052
+ const status = await globalThis.Deno?.permissions.query({
1053
+ name: "env",
1054
+ variable: name,
1055
+ });
1056
+ if (!status || status.state === "granted") {
1057
+ const value = getEnv(name);
1058
+ if (value) {
1059
+ return { name, value };
1060
+ }
1061
+ }
1062
+ }
1063
+ return undefined;
1064
+ }
1065
+ /**
1066
+ * Parse command-line arguments.
1067
+ * @param ctx Parse context.
1068
+ * @param options Parsed command line options.
1069
+ */
1070
+ parseArguments(ctx, options) {
1071
+ const params = [];
1072
+ const args = ctx.unknown.slice();
1073
+ if (!this.hasArguments()) {
1074
+ if (args.length) {
1075
+ if (this.hasCommands(true)) {
1076
+ if (this.hasCommand(args[0], true)) {
1077
+ // e.g: command --global-foo --foo sub-command
1078
+ throw new TooManyArgumentsError(args);
1079
+ }
1080
+ else {
1081
+ throw new UnknownCommandError(args[0], this.getCommands());
1082
+ }
1083
+ }
1084
+ else {
1085
+ throw new NoArgumentsAllowedError(this.getPath());
1086
+ }
1087
+ }
1088
+ }
1089
+ else {
1090
+ if (!args.length) {
1091
+ const required = this.getArguments()
1092
+ .filter((expectedArg) => !expectedArg.optional)
1093
+ .map((expectedArg) => expectedArg.name);
1094
+ if (required.length) {
1095
+ const optionNames = Object.keys(options);
1096
+ const hasStandaloneOption = !!optionNames.find((name) => this.getOption(name, true)?.standalone);
1097
+ if (!hasStandaloneOption) {
1098
+ throw new MissingArgumentsError(required);
1099
+ }
1100
+ }
1101
+ }
1102
+ else {
1103
+ for (const expectedArg of this.getArguments()) {
1104
+ if (!args.length) {
1105
+ if (expectedArg.optional) {
1106
+ break;
1107
+ }
1108
+ throw new MissingArgumentError(expectedArg.name);
1109
+ }
1110
+ let arg;
1111
+ const parseArgValue = (value) => {
1112
+ return expectedArg.list
1113
+ ? value.split(",").map((value) => parseArgType(value))
1114
+ : parseArgType(value);
1115
+ };
1116
+ const parseArgType = (value) => {
1117
+ return this.parseType({
1118
+ label: "Argument",
1119
+ type: expectedArg.type,
1120
+ name: expectedArg.name,
1121
+ value,
1122
+ });
1123
+ };
1124
+ if (expectedArg.variadic) {
1125
+ arg = args.splice(0, args.length).map((value) => parseArgValue(value));
1126
+ }
1127
+ else {
1128
+ arg = parseArgValue(args.shift());
1129
+ }
1130
+ if (expectedArg.variadic && Array.isArray(arg)) {
1131
+ params.push(...arg);
1132
+ }
1133
+ else if (typeof arg !== "undefined") {
1134
+ params.push(arg);
1135
+ }
1136
+ }
1137
+ if (args.length) {
1138
+ throw new TooManyArgumentsError(args);
1139
+ }
1140
+ }
1141
+ }
1142
+ return params;
1143
+ }
1144
+ handleError(error) {
1145
+ this.throw(error instanceof FlagsValidationError
1146
+ ? new ValidationError(error.message)
1147
+ : error instanceof Error
1148
+ ? error
1149
+ : new Error(`[non-error-thrown] ${error}`));
1150
+ }
1151
+ /**
1152
+ * Handle error. If `throwErrors` is enabled the error will be thrown,
1153
+ * otherwise a formatted error message will be printed and `exit(1)`
1154
+ * will be called. This will also trigger registered error handlers.
1155
+ *
1156
+ * @param error The error to handle.
1157
+ */
1158
+ throw(error) {
1159
+ if (error instanceof ValidationError) {
1160
+ error.cmd = this;
1161
+ }
1162
+ this.getErrorHandler()?.(error, this);
1163
+ if (this.shouldThrowErrors() || !(error instanceof ValidationError)) {
1164
+ throw error;
1165
+ }
1166
+ this.showHelp();
1167
+ console.error(red(` ${bold("error")}: ${error.message}\n`));
1168
+ exit(error instanceof ValidationError ? error.exitCode : 1);
1169
+ }
1170
+ /*****************************************************************************
1171
+ **** GETTER *****************************************************************
1172
+ *****************************************************************************/
1173
+ /** Get command name. */
1174
+ getName() {
1175
+ return this._name;
1176
+ }
1177
+ /** Get parent command. */
1178
+ getParent() {
1179
+ return this._parent;
1180
+ }
1181
+ /**
1182
+ * Get parent command from global executed command.
1183
+ * Be sure, to call this method only inside an action handler. Unless this or any child command was executed,
1184
+ * this method returns always undefined.
1185
+ */
1186
+ getGlobalParent() {
1187
+ return this._globalParent;
1188
+ }
1189
+ /** Get main command. */
1190
+ getMainCommand() {
1191
+ return this._parent?.getMainCommand() ?? this;
1192
+ }
1193
+ /** Get command name aliases. */
1194
+ getAliases() {
1195
+ return this.aliases;
1196
+ }
1197
+ /**
1198
+ * Get full command path.
1199
+ *
1200
+ * @param name Override the main command name.
1201
+ */
1202
+ getPath(name) {
1203
+ return this._parent
1204
+ ? this._parent.getPath(name) + " " + this._name
1205
+ : name || this._name;
1206
+ }
1207
+ /** Get arguments definition. E.g: <input-file:string> <output-file:string> */
1208
+ getArgsDefinition() {
1209
+ return this.argsDefinition;
1210
+ }
1211
+ /**
1212
+ * Get argument by name.
1213
+ *
1214
+ * @param name Name of the argument.
1215
+ */
1216
+ getArgument(name) {
1217
+ return this.getArguments().find((arg) => arg.name === name);
1218
+ }
1219
+ /** Get arguments. */
1220
+ getArguments() {
1221
+ if (!this.args.length && this.argsDefinition) {
1222
+ this.args = parseArgumentsDefinition(this.argsDefinition);
1223
+ }
1224
+ return this.args;
1225
+ }
1226
+ /** Check if command has arguments. */
1227
+ hasArguments() {
1228
+ return !!this.argsDefinition;
1229
+ }
1230
+ /** Get command version. */
1231
+ getVersion() {
1232
+ return this.getVersionHandler()?.call(this, this);
1233
+ }
1234
+ /** Get help handler method. */
1235
+ getVersionHandler() {
1236
+ return this.ver ?? this._parent?.getVersionHandler();
1237
+ }
1238
+ /** Get command description. */
1239
+ getDescription() {
1240
+ // call description method only once
1241
+ return typeof this.desc === "function"
1242
+ ? this.desc = this.desc()
1243
+ : this.desc;
1244
+ }
1245
+ /** Get auto generated command usage. */
1246
+ getUsage() {
1247
+ return this._usage ??
1248
+ [this.getArgsDefinition(), this.getRequiredOptionsDefinition()]
1249
+ .join(" ")
1250
+ .trim();
1251
+ }
1252
+ getRequiredOptionsDefinition() {
1253
+ return this.getOptions()
1254
+ .filter((option) => option.required)
1255
+ .map((option) => [findFlag(option.flags), option.typeDefinition].filter((v) => v)
1256
+ .join(" ")
1257
+ .trim())
1258
+ .join(" ");
1259
+ }
1260
+ /** Get short command description. This is the first line of the description. */
1261
+ getShortDescription() {
1262
+ return getDescription(this.getDescription(), true);
1263
+ }
1264
+ /** Get original command-line arguments. */
1265
+ getRawArgs() {
1266
+ return this.rawArgs;
1267
+ }
1268
+ /** Get all arguments defined after the double dash. */
1269
+ getLiteralArgs() {
1270
+ return this.literalArgs;
1271
+ }
1272
+ /** Output generated help without exiting. */
1273
+ showVersion() {
1274
+ console.log(this.getVersion());
1275
+ }
1276
+ /** Returns command name, version and meta data. */
1277
+ getLongVersion() {
1278
+ return `${bold(this.getMainCommand().getName())} ${brightBlue(this.getVersion() ?? "")}` +
1279
+ Object.entries(this.getMeta()).map(([k, v]) => `\n${bold(k)} ${brightBlue(v)}`).join("");
1280
+ }
1281
+ /** Outputs command name, version and meta data. */
1282
+ showLongVersion() {
1283
+ console.log(this.getLongVersion());
1284
+ }
1285
+ /** Output generated help without exiting. */
1286
+ showHelp(options) {
1287
+ console.log(this.getHelp(options));
1288
+ }
1289
+ /** Get generated help. */
1290
+ getHelp(options) {
1291
+ this.registerDefaults();
1292
+ return this.getHelpHandler().call(this, this, options ?? {});
1293
+ }
1294
+ /** Get help handler method. */
1295
+ getHelpHandler() {
1296
+ return this._help ?? this._parent?.getHelpHandler();
1297
+ }
1298
+ exit(code = 0) {
1299
+ if (this.shouldExit()) {
1300
+ exit(code);
1301
+ }
1302
+ }
1303
+ /*****************************************************************************
1304
+ **** Options GETTER *********************************************************
1305
+ *****************************************************************************/
1306
+ /**
1307
+ * Checks whether the command has options or not.
1308
+ *
1309
+ * @param hidden Include hidden options.
1310
+ */
1311
+ hasOptions(hidden) {
1312
+ return this.getOptions(hidden).length > 0;
1313
+ }
1314
+ /**
1315
+ * Get options.
1316
+ *
1317
+ * @param hidden Include hidden options.
1318
+ */
1319
+ getOptions(hidden) {
1320
+ return this.getGlobalOptions(hidden).concat(this.getBaseOptions(hidden));
1321
+ }
1322
+ /**
1323
+ * Get base options.
1324
+ *
1325
+ * @param hidden Include hidden options.
1326
+ */
1327
+ getBaseOptions(hidden) {
1328
+ if (!this.options.length) {
1329
+ return [];
1330
+ }
1331
+ return hidden
1332
+ ? this.options.slice(0)
1333
+ : this.options.filter((opt) => !opt.hidden);
1334
+ }
1335
+ /**
1336
+ * Get global options.
1337
+ *
1338
+ * @param hidden Include hidden options.
1339
+ */
1340
+ getGlobalOptions(hidden) {
1341
+ const helpOption = this.getHelpOption();
1342
+ const getGlobals = (cmd, noGlobals, options = [], names = []) => {
1343
+ if (cmd.options.length) {
1344
+ for (const option of cmd.options) {
1345
+ if (option.global &&
1346
+ !this.options.find((opt) => opt.name === option.name) &&
1347
+ names.indexOf(option.name) === -1 &&
1348
+ (hidden || !option.hidden)) {
1349
+ if (noGlobals && option !== helpOption) {
1350
+ continue;
1351
+ }
1352
+ names.push(option.name);
1353
+ options.push(option);
1354
+ }
1355
+ }
1356
+ }
1357
+ return cmd._parent
1358
+ ? getGlobals(cmd._parent, noGlobals || cmd._noGlobals, options, names)
1359
+ : options;
1360
+ };
1361
+ return this._parent ? getGlobals(this._parent, this._noGlobals) : [];
1362
+ }
1363
+ /**
1364
+ * Checks whether the command has an option with given name or not.
1365
+ *
1366
+ * @param name Name of the option. Must be in param-case.
1367
+ * @param hidden Include hidden options.
1368
+ */
1369
+ hasOption(name, hidden) {
1370
+ return !!this.getOption(name, hidden);
1371
+ }
1372
+ /**
1373
+ * Get option by name.
1374
+ *
1375
+ * @param name Name of the option. Must be in param-case.
1376
+ * @param hidden Include hidden options.
1377
+ */
1378
+ getOption(name, hidden) {
1379
+ return this.getBaseOption(name, hidden) ??
1380
+ this.getGlobalOption(name, hidden);
1381
+ }
1382
+ /**
1383
+ * Get base option by name.
1384
+ *
1385
+ * @param name Name of the option. Must be in param-case.
1386
+ * @param hidden Include hidden options.
1387
+ */
1388
+ getBaseOption(name, hidden) {
1389
+ const option = this.options.find((option) => option.name === name || option.aliases?.includes(name));
1390
+ return option && (hidden || !option.hidden) ? option : undefined;
1391
+ }
1392
+ /**
1393
+ * Get global option from parent commands by name.
1394
+ *
1395
+ * @param name Name of the option. Must be in param-case.
1396
+ * @param hidden Include hidden options.
1397
+ */
1398
+ getGlobalOption(name, hidden) {
1399
+ const helpOption = this.getHelpOption();
1400
+ const getGlobalOption = (parent, noGlobals) => {
1401
+ const option = parent.getBaseOption(name, hidden);
1402
+ if (!option?.global) {
1403
+ return parent._parent && getGlobalOption(parent._parent, noGlobals || parent._noGlobals);
1404
+ }
1405
+ if (noGlobals && option !== helpOption) {
1406
+ return;
1407
+ }
1408
+ return option;
1409
+ };
1410
+ return this._parent && getGlobalOption(this._parent, this._noGlobals);
1411
+ }
1412
+ /**
1413
+ * Remove option by name.
1414
+ *
1415
+ * @param name Name of the option. Must be in param-case.
1416
+ */
1417
+ removeOption(name) {
1418
+ const index = this.options.findIndex((option) => option.name === name);
1419
+ if (index === -1) {
1420
+ return;
1421
+ }
1422
+ return this.options.splice(index, 1)[0];
1423
+ }
1424
+ /**
1425
+ * Checks whether the command has sub-commands or not.
1426
+ *
1427
+ * @param hidden Include hidden commands.
1428
+ */
1429
+ hasCommands(hidden) {
1430
+ return this.getCommands(hidden).length > 0;
1431
+ }
1432
+ /**
1433
+ * Get commands.
1434
+ *
1435
+ * @param hidden Include hidden commands.
1436
+ */
1437
+ getCommands(hidden) {
1438
+ return this.getGlobalCommands(hidden).concat(this.getBaseCommands(hidden));
1439
+ }
1440
+ /**
1441
+ * Get base commands.
1442
+ *
1443
+ * @param hidden Include hidden commands.
1444
+ */
1445
+ getBaseCommands(hidden) {
1446
+ const commands = Array.from(this.commands.values());
1447
+ return hidden ? commands : commands.filter((cmd) => !cmd.isHidden);
1448
+ }
1449
+ /**
1450
+ * Get global commands.
1451
+ *
1452
+ * @param hidden Include hidden commands.
1453
+ */
1454
+ getGlobalCommands(hidden) {
1455
+ const getCommands = (command, noGlobals, commands = [], names = []) => {
1456
+ if (command.commands.size) {
1457
+ for (const [_, cmd] of command.commands) {
1458
+ if (cmd.isGlobal &&
1459
+ this !== cmd &&
1460
+ !this.commands.has(cmd._name) &&
1461
+ names.indexOf(cmd._name) === -1 &&
1462
+ (hidden || !cmd.isHidden)) {
1463
+ if (noGlobals && cmd?.getName() !== "help") {
1464
+ continue;
1465
+ }
1466
+ names.push(cmd._name);
1467
+ commands.push(cmd);
1468
+ }
1469
+ }
1470
+ }
1471
+ return command._parent
1472
+ ? getCommands(command._parent, noGlobals || command._noGlobals, commands, names)
1473
+ : commands;
1474
+ };
1475
+ return this._parent ? getCommands(this._parent, this._noGlobals) : [];
1476
+ }
1477
+ /**
1478
+ * Checks whether a child command exists by given name or alias.
1479
+ *
1480
+ * @param name Name or alias of the command.
1481
+ * @param hidden Include hidden commands.
1482
+ */
1483
+ hasCommand(name, hidden) {
1484
+ return !!this.getCommand(name, hidden);
1485
+ }
1486
+ /**
1487
+ * Get command by name or alias.
1488
+ *
1489
+ * @param name Name or alias of the command.
1490
+ * @param hidden Include hidden commands.
1491
+ */
1492
+ getCommand(name, hidden) {
1493
+ return this.getBaseCommand(name, hidden) ??
1494
+ this.getGlobalCommand(name, hidden);
1495
+ }
1496
+ /**
1497
+ * Get base command by name or alias.
1498
+ *
1499
+ * @param name Name or alias of the command.
1500
+ * @param hidden Include hidden commands.
1501
+ */
1502
+ getBaseCommand(name, hidden) {
1503
+ for (const cmd of this.commands.values()) {
1504
+ if (cmd._name === name || cmd.aliases.includes(name)) {
1505
+ return (cmd && (hidden || !cmd.isHidden) ? cmd : undefined);
1506
+ }
1507
+ }
1508
+ }
1509
+ /**
1510
+ * Get global command by name or alias.
1511
+ *
1512
+ * @param name Name or alias of the command.
1513
+ * @param hidden Include hidden commands.
1514
+ */
1515
+ getGlobalCommand(name, hidden) {
1516
+ const getGlobalCommand = (parent, noGlobals) => {
1517
+ const cmd = parent.getBaseCommand(name, hidden);
1518
+ if (!cmd?.isGlobal) {
1519
+ return parent._parent &&
1520
+ getGlobalCommand(parent._parent, noGlobals || parent._noGlobals);
1521
+ }
1522
+ if (noGlobals && cmd.getName() !== "help") {
1523
+ return;
1524
+ }
1525
+ return cmd;
1526
+ };
1527
+ return this._parent &&
1528
+ getGlobalCommand(this._parent, this._noGlobals);
1529
+ }
1530
+ /**
1531
+ * Remove sub-command by name or alias.
1532
+ *
1533
+ * @param name Name or alias of the command.
1534
+ */
1535
+ removeCommand(name) {
1536
+ const command = this.getBaseCommand(name, true);
1537
+ if (command) {
1538
+ this.commands.delete(command._name);
1539
+ }
1540
+ return command;
1541
+ }
1542
+ /** Get types. */
1543
+ getTypes() {
1544
+ return this.getGlobalTypes().concat(this.getBaseTypes());
1545
+ }
1546
+ /** Get base types. */
1547
+ getBaseTypes() {
1548
+ return Array.from(this.types.values());
1549
+ }
1550
+ /** Get global types. */
1551
+ getGlobalTypes() {
1552
+ const getTypes = (cmd, types = [], names = []) => {
1553
+ if (cmd) {
1554
+ if (cmd.types.size) {
1555
+ cmd.types.forEach((type) => {
1556
+ if (type.global &&
1557
+ !this.types.has(type.name) &&
1558
+ names.indexOf(type.name) === -1) {
1559
+ names.push(type.name);
1560
+ types.push(type);
1561
+ }
1562
+ });
1563
+ }
1564
+ return getTypes(cmd._parent, types, names);
1565
+ }
1566
+ return types;
1567
+ };
1568
+ return getTypes(this._parent);
1569
+ }
1570
+ /**
1571
+ * Get type by name.
1572
+ *
1573
+ * @param name Name of the type.
1574
+ */
1575
+ getType(name) {
1576
+ return this.getBaseType(name) ?? this.getGlobalType(name);
1577
+ }
1578
+ /**
1579
+ * Get base type by name.
1580
+ *
1581
+ * @param name Name of the type.
1582
+ */
1583
+ getBaseType(name) {
1584
+ return this.types.get(name);
1585
+ }
1586
+ /**
1587
+ * Get global type by name.
1588
+ *
1589
+ * @param name Name of the type.
1590
+ */
1591
+ getGlobalType(name) {
1592
+ if (!this._parent) {
1593
+ return;
1594
+ }
1595
+ const cmd = this._parent.getBaseType(name);
1596
+ if (!cmd?.global) {
1597
+ return this._parent.getGlobalType(name);
1598
+ }
1599
+ return cmd;
1600
+ }
1601
+ /** Get completions. */
1602
+ getCompletions() {
1603
+ return this.getGlobalCompletions().concat(this.getBaseCompletions());
1604
+ }
1605
+ /** Get base completions. */
1606
+ getBaseCompletions() {
1607
+ return Array.from(this.completions.values());
1608
+ }
1609
+ /** Get global completions. */
1610
+ getGlobalCompletions() {
1611
+ const getCompletions = (cmd, completions = [], names = []) => {
1612
+ if (cmd) {
1613
+ if (cmd.completions.size) {
1614
+ cmd.completions.forEach((completion) => {
1615
+ if (completion.global &&
1616
+ !this.completions.has(completion.name) &&
1617
+ names.indexOf(completion.name) === -1) {
1618
+ names.push(completion.name);
1619
+ completions.push(completion);
1620
+ }
1621
+ });
1622
+ }
1623
+ return getCompletions(cmd._parent, completions, names);
1624
+ }
1625
+ return completions;
1626
+ };
1627
+ return getCompletions(this._parent);
1628
+ }
1629
+ /**
1630
+ * Get completion by name.
1631
+ *
1632
+ * @param name Name of the completion.
1633
+ */
1634
+ getCompletion(name) {
1635
+ return this.getBaseCompletion(name) ?? this.getGlobalCompletion(name);
1636
+ }
1637
+ /**
1638
+ * Get base completion by name.
1639
+ *
1640
+ * @param name Name of the completion.
1641
+ */
1642
+ getBaseCompletion(name) {
1643
+ return this.completions.get(name);
1644
+ }
1645
+ /**
1646
+ * Get global completions by name.
1647
+ *
1648
+ * @param name Name of the completion.
1649
+ */
1650
+ getGlobalCompletion(name) {
1651
+ if (!this._parent) {
1652
+ return;
1653
+ }
1654
+ const completion = this._parent.getBaseCompletion(name);
1655
+ if (!completion?.global) {
1656
+ return this._parent.getGlobalCompletion(name);
1657
+ }
1658
+ return completion;
1659
+ }
1660
+ /**
1661
+ * Checks whether the command has environment variables or not.
1662
+ *
1663
+ * @param hidden Include hidden environment variable.
1664
+ */
1665
+ hasEnvVars(hidden) {
1666
+ return this.getEnvVars(hidden).length > 0;
1667
+ }
1668
+ /**
1669
+ * Get environment variables.
1670
+ *
1671
+ * @param hidden Include hidden environment variable.
1672
+ */
1673
+ getEnvVars(hidden) {
1674
+ return this.getGlobalEnvVars(hidden).concat(this.getBaseEnvVars(hidden));
1675
+ }
1676
+ /**
1677
+ * Get base environment variables.
1678
+ *
1679
+ * @param hidden Include hidden environment variable.
1680
+ */
1681
+ getBaseEnvVars(hidden) {
1682
+ if (!this.envVars.length) {
1683
+ return [];
1684
+ }
1685
+ return hidden
1686
+ ? this.envVars.slice(0)
1687
+ : this.envVars.filter((env) => !env.hidden);
1688
+ }
1689
+ /**
1690
+ * Get global environment variables.
1691
+ *
1692
+ * @param hidden Include hidden environment variable.
1693
+ */
1694
+ getGlobalEnvVars(hidden) {
1695
+ if (this._noGlobals) {
1696
+ return [];
1697
+ }
1698
+ const getEnvVars = (cmd, envVars = [], names = []) => {
1699
+ if (cmd) {
1700
+ if (cmd.envVars.length) {
1701
+ cmd.envVars.forEach((envVar) => {
1702
+ if (envVar.global &&
1703
+ !this.envVars.find((env) => env.names[0] === envVar.names[0]) &&
1704
+ names.indexOf(envVar.names[0]) === -1 &&
1705
+ (hidden || !envVar.hidden)) {
1706
+ names.push(envVar.names[0]);
1707
+ envVars.push(envVar);
1708
+ }
1709
+ });
1710
+ }
1711
+ return getEnvVars(cmd._parent, envVars, names);
1712
+ }
1713
+ return envVars;
1714
+ };
1715
+ return getEnvVars(this._parent);
1716
+ }
1717
+ /**
1718
+ * Checks whether the command has an environment variable with given name or not.
1719
+ *
1720
+ * @param name Name of the environment variable.
1721
+ * @param hidden Include hidden environment variable.
1722
+ */
1723
+ hasEnvVar(name, hidden) {
1724
+ return !!this.getEnvVar(name, hidden);
1725
+ }
1726
+ /**
1727
+ * Get environment variable by name.
1728
+ *
1729
+ * @param name Name of the environment variable.
1730
+ * @param hidden Include hidden environment variable.
1731
+ */
1732
+ getEnvVar(name, hidden) {
1733
+ return this.getBaseEnvVar(name, hidden) ??
1734
+ this.getGlobalEnvVar(name, hidden);
1735
+ }
1736
+ /**
1737
+ * Get base environment variable by name.
1738
+ *
1739
+ * @param name Name of the environment variable.
1740
+ * @param hidden Include hidden environment variable.
1741
+ */
1742
+ getBaseEnvVar(name, hidden) {
1743
+ const envVar = this.envVars.find((env) => env.names.indexOf(name) !== -1);
1744
+ return envVar && (hidden || !envVar.hidden) ? envVar : undefined;
1745
+ }
1746
+ /**
1747
+ * Get global environment variable by name.
1748
+ *
1749
+ * @param name Name of the environment variable.
1750
+ * @param hidden Include hidden environment variable.
1751
+ */
1752
+ getGlobalEnvVar(name, hidden) {
1753
+ if (!this._parent || this._noGlobals) {
1754
+ return;
1755
+ }
1756
+ const envVar = this._parent.getBaseEnvVar(name, hidden);
1757
+ if (!envVar?.global) {
1758
+ return this._parent.getGlobalEnvVar(name, hidden);
1759
+ }
1760
+ return envVar;
1761
+ }
1762
+ /** Checks whether the command has examples or not. */
1763
+ hasExamples() {
1764
+ return this.examples.length > 0;
1765
+ }
1766
+ /** Get all examples. */
1767
+ getExamples() {
1768
+ return this.examples;
1769
+ }
1770
+ /** Checks whether the command has an example with given name or not. */
1771
+ hasExample(name) {
1772
+ return !!this.getExample(name);
1773
+ }
1774
+ /** Get example with given name. */
1775
+ getExample(name) {
1776
+ return this.examples.find((example) => example.name === name);
1777
+ }
1778
+ getHelpOption() {
1779
+ return this._helpOption ?? this._parent?.getHelpOption();
1780
+ }
1781
+ }
1782
+ function findFlag(flags) {
1783
+ for (const flag of flags) {
1784
+ if (flag.startsWith("--")) {
1785
+ return flag;
1786
+ }
1787
+ }
1788
+ return flags[0];
1789
+ }