structured-outputs 0.1.0-beta.6 → 0.1.0-beta.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (686) hide show
  1. package/esm/_dnt.polyfills.d.ts +19 -0
  2. package/esm/_dnt.polyfills.d.ts.map +1 -0
  3. package/esm/_dnt.polyfills.js +124 -0
  4. package/esm/_dnt.polyfills.js.map +1 -0
  5. package/esm/_dnt.shims.d.ts +6 -0
  6. package/esm/_dnt.shims.d.ts.map +1 -0
  7. package/esm/_dnt.shims.js +62 -0
  8. package/esm/_dnt.shims.js.map +1 -0
  9. package/esm/deps/jsr.io/@std/assert/1.0.6/almost_equals.d.ts +29 -0
  10. package/esm/deps/jsr.io/@std/assert/1.0.6/almost_equals.d.ts.map +1 -0
  11. package/esm/deps/jsr.io/@std/assert/1.0.6/almost_equals.js +47 -0
  12. package/esm/deps/jsr.io/@std/assert/1.0.6/almost_equals.js.map +1 -0
  13. package/esm/deps/jsr.io/@std/assert/1.0.6/array_includes.d.ts +24 -0
  14. package/esm/deps/jsr.io/@std/assert/1.0.6/array_includes.d.ts.map +1 -0
  15. package/esm/deps/jsr.io/@std/assert/1.0.6/array_includes.js +47 -0
  16. package/esm/deps/jsr.io/@std/assert/1.0.6/array_includes.js.map +1 -0
  17. package/esm/deps/jsr.io/@std/assert/1.0.6/assert.d.ts +16 -0
  18. package/esm/deps/jsr.io/@std/assert/1.0.6/assert.d.ts.map +1 -0
  19. package/esm/deps/jsr.io/@std/assert/1.0.6/assert.js +23 -0
  20. package/esm/deps/jsr.io/@std/assert/1.0.6/assert.js.map +1 -0
  21. package/esm/deps/jsr.io/@std/assert/1.0.6/assertion_error.d.ts +26 -0
  22. package/esm/deps/jsr.io/@std/assert/1.0.6/assertion_error.d.ts.map +1 -0
  23. package/esm/deps/jsr.io/@std/assert/1.0.6/assertion_error.js +31 -0
  24. package/esm/deps/jsr.io/@std/assert/1.0.6/assertion_error.js.map +1 -0
  25. package/esm/deps/jsr.io/@std/assert/1.0.6/equal.d.ts +17 -0
  26. package/esm/deps/jsr.io/@std/assert/1.0.6/equal.d.ts.map +1 -0
  27. package/esm/deps/jsr.io/@std/assert/1.0.6/equal.js +137 -0
  28. package/esm/deps/jsr.io/@std/assert/1.0.6/equal.js.map +1 -0
  29. package/esm/deps/jsr.io/@std/assert/1.0.6/equals.d.ts +22 -0
  30. package/esm/deps/jsr.io/@std/assert/1.0.6/equals.d.ts.map +1 -0
  31. package/esm/deps/jsr.io/@std/assert/1.0.6/equals.js +46 -0
  32. package/esm/deps/jsr.io/@std/assert/1.0.6/equals.js.map +1 -0
  33. package/esm/deps/jsr.io/@std/assert/1.0.6/exists.d.ts +18 -0
  34. package/esm/deps/jsr.io/@std/assert/1.0.6/exists.d.ts.map +1 -0
  35. package/esm/deps/jsr.io/@std/assert/1.0.6/exists.js +28 -0
  36. package/esm/deps/jsr.io/@std/assert/1.0.6/exists.js.map +1 -0
  37. package/esm/deps/jsr.io/@std/assert/1.0.6/fail.d.ts +15 -0
  38. package/esm/deps/jsr.io/@std/assert/1.0.6/fail.d.ts.map +1 -0
  39. package/esm/deps/jsr.io/@std/assert/1.0.6/fail.js +21 -0
  40. package/esm/deps/jsr.io/@std/assert/1.0.6/fail.js.map +1 -0
  41. package/esm/deps/jsr.io/@std/assert/1.0.6/false.d.ts +18 -0
  42. package/esm/deps/jsr.io/@std/assert/1.0.6/false.d.ts.map +1 -0
  43. package/esm/deps/jsr.io/@std/assert/1.0.6/false.js +23 -0
  44. package/esm/deps/jsr.io/@std/assert/1.0.6/false.js.map +1 -0
  45. package/esm/deps/jsr.io/@std/assert/1.0.6/greater.d.ts +20 -0
  46. package/esm/deps/jsr.io/@std/assert/1.0.6/greater.d.ts.map +1 -0
  47. package/esm/deps/jsr.io/@std/assert/1.0.6/greater.js +30 -0
  48. package/esm/deps/jsr.io/@std/assert/1.0.6/greater.js.map +1 -0
  49. package/esm/deps/jsr.io/@std/assert/1.0.6/greater_or_equal.d.ts +20 -0
  50. package/esm/deps/jsr.io/@std/assert/1.0.6/greater_or_equal.d.ts.map +1 -0
  51. package/esm/deps/jsr.io/@std/assert/1.0.6/greater_or_equal.js +30 -0
  52. package/esm/deps/jsr.io/@std/assert/1.0.6/greater_or_equal.js.map +1 -0
  53. package/esm/deps/jsr.io/@std/assert/1.0.6/instance_of.d.ts +23 -0
  54. package/esm/deps/jsr.io/@std/assert/1.0.6/instance_of.d.ts.map +1 -0
  55. package/esm/deps/jsr.io/@std/assert/1.0.6/instance_of.js +53 -0
  56. package/esm/deps/jsr.io/@std/assert/1.0.6/instance_of.js.map +1 -0
  57. package/esm/deps/jsr.io/@std/assert/1.0.6/is_error.d.ts +25 -0
  58. package/esm/deps/jsr.io/@std/assert/1.0.6/is_error.d.ts.map +1 -0
  59. package/esm/deps/jsr.io/@std/assert/1.0.6/is_error.js +54 -0
  60. package/esm/deps/jsr.io/@std/assert/1.0.6/is_error.js.map +1 -0
  61. package/esm/deps/jsr.io/@std/assert/1.0.6/less.d.ts +19 -0
  62. package/esm/deps/jsr.io/@std/assert/1.0.6/less.d.ts.map +1 -0
  63. package/esm/deps/jsr.io/@std/assert/1.0.6/less.js +29 -0
  64. package/esm/deps/jsr.io/@std/assert/1.0.6/less.js.map +1 -0
  65. package/esm/deps/jsr.io/@std/assert/1.0.6/less_or_equal.d.ts +20 -0
  66. package/esm/deps/jsr.io/@std/assert/1.0.6/less_or_equal.d.ts.map +1 -0
  67. package/esm/deps/jsr.io/@std/assert/1.0.6/less_or_equal.js +30 -0
  68. package/esm/deps/jsr.io/@std/assert/1.0.6/less_or_equal.js.map +1 -0
  69. package/esm/deps/jsr.io/@std/assert/1.0.6/match.d.ts +18 -0
  70. package/esm/deps/jsr.io/@std/assert/1.0.6/match.d.ts.map +1 -0
  71. package/esm/deps/jsr.io/@std/assert/1.0.6/match.js +27 -0
  72. package/esm/deps/jsr.io/@std/assert/1.0.6/match.js.map +1 -0
  73. package/esm/deps/jsr.io/@std/assert/1.0.6/mod.d.ts +44 -0
  74. package/esm/deps/jsr.io/@std/assert/1.0.6/mod.d.ts.map +1 -0
  75. package/esm/deps/jsr.io/@std/assert/1.0.6/mod.js +46 -0
  76. package/esm/deps/jsr.io/@std/assert/1.0.6/mod.js.map +1 -0
  77. package/esm/deps/jsr.io/@std/assert/1.0.6/not_equals.d.ts +21 -0
  78. package/esm/deps/jsr.io/@std/assert/1.0.6/not_equals.d.ts.map +1 -0
  79. package/esm/deps/jsr.io/@std/assert/1.0.6/not_equals.js +33 -0
  80. package/esm/deps/jsr.io/@std/assert/1.0.6/not_equals.js.map +1 -0
  81. package/esm/deps/jsr.io/@std/assert/1.0.6/not_instance_of.d.ts +20 -0
  82. package/esm/deps/jsr.io/@std/assert/1.0.6/not_instance_of.d.ts.map +1 -0
  83. package/esm/deps/jsr.io/@std/assert/1.0.6/not_instance_of.js +30 -0
  84. package/esm/deps/jsr.io/@std/assert/1.0.6/not_instance_of.js.map +1 -0
  85. package/esm/deps/jsr.io/@std/assert/1.0.6/not_match.d.ts +18 -0
  86. package/esm/deps/jsr.io/@std/assert/1.0.6/not_match.d.ts.map +1 -0
  87. package/esm/deps/jsr.io/@std/assert/1.0.6/not_match.js +27 -0
  88. package/esm/deps/jsr.io/@std/assert/1.0.6/not_match.js.map +1 -0
  89. package/esm/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.d.ts +23 -0
  90. package/esm/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.d.ts.map +1 -0
  91. package/esm/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.js +33 -0
  92. package/esm/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.js.map +1 -0
  93. package/esm/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts +28 -0
  94. package/esm/deps/jsr.io/@std/assert/1.0.6/object_match.d.ts.map +1 -0
  95. package/esm/deps/jsr.io/@std/assert/1.0.6/object_match.js +160 -0
  96. package/esm/deps/jsr.io/@std/assert/1.0.6/object_match.js.map +1 -0
  97. package/esm/deps/jsr.io/@std/assert/1.0.6/rejects.d.ts +42 -0
  98. package/esm/deps/jsr.io/@std/assert/1.0.6/rejects.d.ts.map +1 -0
  99. package/esm/deps/jsr.io/@std/assert/1.0.6/rejects.js +54 -0
  100. package/esm/deps/jsr.io/@std/assert/1.0.6/rejects.js.map +1 -0
  101. package/esm/deps/jsr.io/@std/assert/1.0.6/strict_equals.d.ts +24 -0
  102. package/esm/deps/jsr.io/@std/assert/1.0.6/strict_equals.d.ts.map +1 -0
  103. package/esm/deps/jsr.io/@std/assert/1.0.6/strict_equals.js +58 -0
  104. package/esm/deps/jsr.io/@std/assert/1.0.6/strict_equals.js.map +1 -0
  105. package/esm/deps/jsr.io/@std/assert/1.0.6/string_includes.d.ts +18 -0
  106. package/esm/deps/jsr.io/@std/assert/1.0.6/string_includes.d.ts.map +1 -0
  107. package/esm/deps/jsr.io/@std/assert/1.0.6/string_includes.js +27 -0
  108. package/esm/deps/jsr.io/@std/assert/1.0.6/string_includes.js.map +1 -0
  109. package/esm/deps/jsr.io/@std/assert/1.0.6/throws.d.ts +45 -0
  110. package/esm/deps/jsr.io/@std/assert/1.0.6/throws.d.ts.map +1 -0
  111. package/esm/deps/jsr.io/@std/assert/1.0.6/throws.js +45 -0
  112. package/esm/deps/jsr.io/@std/assert/1.0.6/throws.js.map +1 -0
  113. package/esm/deps/jsr.io/@std/assert/1.0.6/unimplemented.d.ts +15 -0
  114. package/esm/deps/jsr.io/@std/assert/1.0.6/unimplemented.d.ts.map +1 -0
  115. package/esm/deps/jsr.io/@std/assert/1.0.6/unimplemented.js +21 -0
  116. package/esm/deps/jsr.io/@std/assert/1.0.6/unimplemented.js.map +1 -0
  117. package/esm/deps/jsr.io/@std/assert/1.0.6/unreachable.d.ts +15 -0
  118. package/esm/deps/jsr.io/@std/assert/1.0.6/unreachable.d.ts.map +1 -0
  119. package/esm/deps/jsr.io/@std/assert/1.0.6/unreachable.js +21 -0
  120. package/esm/deps/jsr.io/@std/assert/1.0.6/unreachable.js.map +1 -0
  121. package/esm/deps/jsr.io/@std/cli/1.0.6/_data.d.ts +9 -0
  122. package/esm/deps/jsr.io/@std/cli/1.0.6/_data.d.ts.map +1 -0
  123. package/esm/deps/jsr.io/@std/cli/1.0.6/_data.js +18 -0
  124. package/esm/deps/jsr.io/@std/cli/1.0.6/_data.js.map +1 -0
  125. package/esm/deps/jsr.io/@std/cli/1.0.6/_run_length.d.ts +9 -0
  126. package/esm/deps/jsr.io/@std/cli/1.0.6/_run_length.d.ts.map +1 -0
  127. package/esm/deps/jsr.io/@std/cli/1.0.6/_run_length.js +35 -0
  128. package/esm/deps/jsr.io/@std/cli/1.0.6/_run_length.js.map +1 -0
  129. package/esm/deps/jsr.io/@std/cli/1.0.6/mod.d.ts +18 -0
  130. package/esm/deps/jsr.io/@std/cli/1.0.6/mod.d.ts.map +1 -0
  131. package/esm/deps/jsr.io/@std/cli/1.0.6/mod.js +19 -0
  132. package/esm/deps/jsr.io/@std/cli/1.0.6/mod.js.map +1 -0
  133. package/esm/deps/jsr.io/@std/cli/1.0.6/parse_args.d.ts +229 -0
  134. package/esm/deps/jsr.io/@std/cli/1.0.6/parse_args.d.ts.map +1 -0
  135. package/esm/deps/jsr.io/@std/cli/1.0.6/parse_args.js +306 -0
  136. package/esm/deps/jsr.io/@std/cli/1.0.6/parse_args.js.map +1 -0
  137. package/esm/deps/jsr.io/@std/cli/1.0.6/prompt_secret.d.ts +28 -0
  138. package/esm/deps/jsr.io/@std/cli/1.0.6/prompt_secret.d.ts.map +1 -0
  139. package/esm/deps/jsr.io/@std/cli/1.0.6/prompt_secret.js +87 -0
  140. package/esm/deps/jsr.io/@std/cli/1.0.6/prompt_secret.js.map +1 -0
  141. package/esm/deps/jsr.io/@std/cli/1.0.6/unicode_width.d.ts +40 -0
  142. package/esm/deps/jsr.io/@std/cli/1.0.6/unicode_width.d.ts.map +1 -0
  143. package/esm/deps/jsr.io/@std/cli/1.0.6/unicode_width.js +75 -0
  144. package/esm/deps/jsr.io/@std/cli/1.0.6/unicode_width.js.map +1 -0
  145. package/esm/deps/jsr.io/@std/dotenv/0.225.2/load.d.ts +2 -0
  146. package/esm/deps/jsr.io/@std/dotenv/0.225.2/load.d.ts.map +1 -0
  147. package/esm/deps/jsr.io/@std/dotenv/0.225.2/load.js +11 -0
  148. package/esm/deps/jsr.io/@std/dotenv/0.225.2/load.js.map +1 -0
  149. package/esm/deps/jsr.io/@std/dotenv/0.225.2/mod.d.ts +164 -0
  150. package/esm/deps/jsr.io/@std/dotenv/0.225.2/mod.d.ts.map +1 -0
  151. package/esm/deps/jsr.io/@std/dotenv/0.225.2/mod.js +213 -0
  152. package/esm/deps/jsr.io/@std/dotenv/0.225.2/mod.js.map +1 -0
  153. package/esm/deps/jsr.io/@std/dotenv/0.225.2/parse.d.ts +19 -0
  154. package/esm/deps/jsr.io/@std/dotenv/0.225.2/parse.d.ts.map +1 -0
  155. package/esm/deps/jsr.io/@std/dotenv/0.225.2/parse.js +75 -0
  156. package/esm/deps/jsr.io/@std/dotenv/0.225.2/parse.js.map +1 -0
  157. package/esm/deps/jsr.io/@std/dotenv/0.225.2/stringify.d.ts +17 -0
  158. package/esm/deps/jsr.io/@std/dotenv/0.225.2/stringify.d.ts.map +1 -0
  159. package/esm/deps/jsr.io/@std/dotenv/0.225.2/stringify.js +45 -0
  160. package/esm/deps/jsr.io/@std/dotenv/0.225.2/stringify.js.map +1 -0
  161. package/esm/deps/jsr.io/@std/fs/1.0.5/_create_walk_entry.d.ts +14 -0
  162. package/esm/deps/jsr.io/@std/fs/1.0.5/_create_walk_entry.d.ts.map +1 -0
  163. package/esm/deps/jsr.io/@std/fs/1.0.5/_create_walk_entry.js +35 -0
  164. package/esm/deps/jsr.io/@std/fs/1.0.5/_create_walk_entry.js.map +1 -0
  165. package/esm/deps/jsr.io/@std/fs/1.0.5/_get_file_info_type.d.ts +13 -0
  166. package/esm/deps/jsr.io/@std/fs/1.0.5/_get_file_info_type.d.ts.map +1 -0
  167. package/esm/deps/jsr.io/@std/fs/1.0.5/_get_file_info_type.js +19 -0
  168. package/esm/deps/jsr.io/@std/fs/1.0.5/_get_file_info_type.js.map +1 -0
  169. package/esm/deps/jsr.io/@std/fs/1.0.5/_is_same_path.d.ts +10 -0
  170. package/esm/deps/jsr.io/@std/fs/1.0.5/_is_same_path.d.ts.map +1 -0
  171. package/esm/deps/jsr.io/@std/fs/1.0.5/_is_same_path.js +18 -0
  172. package/esm/deps/jsr.io/@std/fs/1.0.5/_is_same_path.js.map +1 -0
  173. package/esm/deps/jsr.io/@std/fs/1.0.5/_is_subdir.d.ts +12 -0
  174. package/esm/deps/jsr.io/@std/fs/1.0.5/_is_subdir.d.ts.map +1 -0
  175. package/esm/deps/jsr.io/@std/fs/1.0.5/_is_subdir.js +26 -0
  176. package/esm/deps/jsr.io/@std/fs/1.0.5/_is_subdir.js.map +1 -0
  177. package/esm/deps/jsr.io/@std/fs/1.0.5/_to_path_string.d.ts +9 -0
  178. package/esm/deps/jsr.io/@std/fs/1.0.5/_to_path_string.d.ts.map +1 -0
  179. package/esm/deps/jsr.io/@std/fs/1.0.5/_to_path_string.js +14 -0
  180. package/esm/deps/jsr.io/@std/fs/1.0.5/_to_path_string.js.map +1 -0
  181. package/esm/deps/jsr.io/@std/fs/1.0.5/copy.d.ts +117 -0
  182. package/esm/deps/jsr.io/@std/fs/1.0.5/copy.d.ts.map +1 -0
  183. package/esm/deps/jsr.io/@std/fs/1.0.5/copy.js +315 -0
  184. package/esm/deps/jsr.io/@std/fs/1.0.5/copy.js.map +1 -0
  185. package/esm/deps/jsr.io/@std/fs/1.0.5/empty_dir.d.ts +48 -0
  186. package/esm/deps/jsr.io/@std/fs/1.0.5/empty_dir.d.ts.map +1 -0
  187. package/esm/deps/jsr.io/@std/fs/1.0.5/empty_dir.js +88 -0
  188. package/esm/deps/jsr.io/@std/fs/1.0.5/empty_dir.js.map +1 -0
  189. package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_dir.d.ts +49 -0
  190. package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_dir.d.ts.map +1 -0
  191. package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_dir.js +103 -0
  192. package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_dir.js.map +1 -0
  193. package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_file.d.ts +47 -0
  194. package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_file.d.ts.map +1 -0
  195. package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_file.js +91 -0
  196. package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_file.js.map +1 -0
  197. package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_link.d.ts +49 -0
  198. package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_link.d.ts.map +1 -0
  199. package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_link.js +62 -0
  200. package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_link.js.map +1 -0
  201. package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_symlink.d.ts +52 -0
  202. package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_symlink.d.ts.map +1 -0
  203. package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_symlink.js +122 -0
  204. package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_symlink.js.map +1 -0
  205. package/esm/deps/jsr.io/@std/fs/1.0.5/eol.d.ts +52 -0
  206. package/esm/deps/jsr.io/@std/fs/1.0.5/eol.d.ts.map +1 -0
  207. package/esm/deps/jsr.io/@std/fs/1.0.5/eol.js +67 -0
  208. package/esm/deps/jsr.io/@std/fs/1.0.5/eol.js.map +1 -0
  209. package/esm/deps/jsr.io/@std/fs/1.0.5/exists.d.ts +218 -0
  210. package/esm/deps/jsr.io/@std/fs/1.0.5/exists.d.ts.map +1 -0
  211. package/esm/deps/jsr.io/@std/fs/1.0.5/exists.js +272 -0
  212. package/esm/deps/jsr.io/@std/fs/1.0.5/exists.js.map +1 -0
  213. package/esm/deps/jsr.io/@std/fs/1.0.5/expand_glob.d.ts +267 -0
  214. package/esm/deps/jsr.io/@std/fs/1.0.5/expand_glob.d.ts.map +1 -0
  215. package/esm/deps/jsr.io/@std/fs/1.0.5/expand_glob.js +417 -0
  216. package/esm/deps/jsr.io/@std/fs/1.0.5/expand_glob.js.map +1 -0
  217. package/esm/deps/jsr.io/@std/fs/1.0.5/mod.d.ts +29 -0
  218. package/esm/deps/jsr.io/@std/fs/1.0.5/mod.d.ts.map +1 -0
  219. package/esm/deps/jsr.io/@std/fs/1.0.5/mod.js +30 -0
  220. package/esm/deps/jsr.io/@std/fs/1.0.5/mod.js.map +1 -0
  221. package/esm/deps/jsr.io/@std/fs/1.0.5/move.d.ts +86 -0
  222. package/esm/deps/jsr.io/@std/fs/1.0.5/move.d.ts.map +1 -0
  223. package/esm/deps/jsr.io/@std/fs/1.0.5/move.js +142 -0
  224. package/esm/deps/jsr.io/@std/fs/1.0.5/move.js.map +1 -0
  225. package/esm/deps/jsr.io/@std/fs/1.0.5/walk.d.ts +777 -0
  226. package/esm/deps/jsr.io/@std/fs/1.0.5/walk.d.ts.map +1 -0
  227. package/esm/deps/jsr.io/@std/fs/1.0.5/walk.js +847 -0
  228. package/esm/deps/jsr.io/@std/fs/1.0.5/walk.js.map +1 -0
  229. package/esm/deps/jsr.io/@std/internal/1.0.4/build_message.d.ts +82 -0
  230. package/esm/deps/jsr.io/@std/internal/1.0.4/build_message.d.ts.map +1 -0
  231. package/esm/deps/jsr.io/@std/internal/1.0.4/build_message.js +111 -0
  232. package/esm/deps/jsr.io/@std/internal/1.0.4/build_message.js.map +1 -0
  233. package/esm/deps/jsr.io/@std/internal/1.0.4/diff.d.ts +140 -0
  234. package/esm/deps/jsr.io/@std/internal/1.0.4/diff.d.ts.map +1 -0
  235. package/esm/deps/jsr.io/@std/internal/1.0.4/diff.js +277 -0
  236. package/esm/deps/jsr.io/@std/internal/1.0.4/diff.js.map +1 -0
  237. package/esm/deps/jsr.io/@std/internal/1.0.4/diff_str.d.ts +99 -0
  238. package/esm/deps/jsr.io/@std/internal/1.0.4/diff_str.d.ts.map +1 -0
  239. package/esm/deps/jsr.io/@std/internal/1.0.4/diff_str.js +180 -0
  240. package/esm/deps/jsr.io/@std/internal/1.0.4/diff_str.js.map +1 -0
  241. package/esm/deps/jsr.io/@std/internal/1.0.4/format.d.ts +2 -0
  242. package/esm/deps/jsr.io/@std/internal/1.0.4/format.d.ts.map +1 -0
  243. package/esm/deps/jsr.io/@std/internal/1.0.4/format.js +38 -0
  244. package/esm/deps/jsr.io/@std/internal/1.0.4/format.js.map +1 -0
  245. package/esm/deps/jsr.io/@std/internal/1.0.4/styles.d.ts +159 -0
  246. package/esm/deps/jsr.io/@std/internal/1.0.4/styles.d.ts.map +1 -0
  247. package/esm/deps/jsr.io/@std/internal/1.0.4/styles.js +208 -0
  248. package/esm/deps/jsr.io/@std/internal/1.0.4/styles.js.map +1 -0
  249. package/esm/deps/jsr.io/@std/internal/1.0.4/types.d.ts +16 -0
  250. package/esm/deps/jsr.io/@std/internal/1.0.4/types.d.ts.map +1 -0
  251. package/esm/deps/jsr.io/@std/internal/1.0.4/types.js +3 -0
  252. package/esm/deps/jsr.io/@std/internal/1.0.4/types.js.map +1 -0
  253. package/esm/deps/jsr.io/@std/path/1.0.7/_common/assert_path.d.ts +2 -0
  254. package/esm/deps/jsr.io/@std/path/1.0.7/_common/assert_path.d.ts.map +1 -0
  255. package/esm/deps/jsr.io/@std/path/1.0.7/_common/assert_path.js +8 -0
  256. package/esm/deps/jsr.io/@std/path/1.0.7/_common/assert_path.js.map +1 -0
  257. package/esm/deps/jsr.io/@std/path/1.0.7/_common/basename.d.ts +4 -0
  258. package/esm/deps/jsr.io/@std/path/1.0.7/_common/basename.d.ts.map +1 -0
  259. package/esm/deps/jsr.io/@std/path/1.0.7/_common/basename.js +41 -0
  260. package/esm/deps/jsr.io/@std/path/1.0.7/_common/basename.js.map +1 -0
  261. package/esm/deps/jsr.io/@std/path/1.0.7/_common/common.d.ts +2 -0
  262. package/esm/deps/jsr.io/@std/path/1.0.7/_common/common.d.ts.map +1 -0
  263. package/esm/deps/jsr.io/@std/path/1.0.7/_common/common.js +24 -0
  264. package/esm/deps/jsr.io/@std/path/1.0.7/_common/common.js.map +1 -0
  265. package/esm/deps/jsr.io/@std/path/1.0.7/_common/constants.d.ts +40 -0
  266. package/esm/deps/jsr.io/@std/path/1.0.7/_common/constants.d.ts.map +1 -0
  267. package/esm/deps/jsr.io/@std/path/1.0.7/_common/constants.js +47 -0
  268. package/esm/deps/jsr.io/@std/path/1.0.7/_common/constants.js.map +1 -0
  269. package/esm/deps/jsr.io/@std/path/1.0.7/_common/dirname.d.ts +2 -0
  270. package/esm/deps/jsr.io/@std/path/1.0.7/_common/dirname.d.ts.map +1 -0
  271. package/esm/deps/jsr.io/@std/path/1.0.7/_common/dirname.js +9 -0
  272. package/esm/deps/jsr.io/@std/path/1.0.7/_common/dirname.js.map +1 -0
  273. package/esm/deps/jsr.io/@std/path/1.0.7/_common/format.d.ts +4 -0
  274. package/esm/deps/jsr.io/@std/path/1.0.7/_common/format.d.ts.map +1 -0
  275. package/esm/deps/jsr.io/@std/path/1.0.7/_common/format.js +20 -0
  276. package/esm/deps/jsr.io/@std/path/1.0.7/_common/format.js.map +1 -0
  277. package/esm/deps/jsr.io/@std/path/1.0.7/_common/from_file_url.d.ts +2 -0
  278. package/esm/deps/jsr.io/@std/path/1.0.7/_common/from_file_url.d.ts.map +1 -0
  279. package/esm/deps/jsr.io/@std/path/1.0.7/_common/from_file_url.js +10 -0
  280. package/esm/deps/jsr.io/@std/path/1.0.7/_common/from_file_url.js.map +1 -0
  281. package/esm/deps/jsr.io/@std/path/1.0.7/_common/glob_to_reg_exp.d.ts +35 -0
  282. package/esm/deps/jsr.io/@std/path/1.0.7/_common/glob_to_reg_exp.d.ts.map +1 -0
  283. package/esm/deps/jsr.io/@std/path/1.0.7/_common/glob_to_reg_exp.js +235 -0
  284. package/esm/deps/jsr.io/@std/path/1.0.7/_common/glob_to_reg_exp.js.map +1 -0
  285. package/esm/deps/jsr.io/@std/path/1.0.7/_common/normalize.d.ts +2 -0
  286. package/esm/deps/jsr.io/@std/path/1.0.7/_common/normalize.d.ts.map +1 -0
  287. package/esm/deps/jsr.io/@std/path/1.0.7/_common/normalize.js +9 -0
  288. package/esm/deps/jsr.io/@std/path/1.0.7/_common/normalize.js.map +1 -0
  289. package/esm/deps/jsr.io/@std/path/1.0.7/_common/normalize_string.d.ts +2 -0
  290. package/esm/deps/jsr.io/@std/path/1.0.7/_common/normalize_string.d.ts.map +1 -0
  291. package/esm/deps/jsr.io/@std/path/1.0.7/_common/normalize_string.js +78 -0
  292. package/esm/deps/jsr.io/@std/path/1.0.7/_common/normalize_string.js.map +1 -0
  293. package/esm/deps/jsr.io/@std/path/1.0.7/_common/relative.d.ts +2 -0
  294. package/esm/deps/jsr.io/@std/path/1.0.7/_common/relative.d.ts.map +1 -0
  295. package/esm/deps/jsr.io/@std/path/1.0.7/_common/relative.js +10 -0
  296. package/esm/deps/jsr.io/@std/path/1.0.7/_common/relative.js.map +1 -0
  297. package/esm/deps/jsr.io/@std/path/1.0.7/_common/strip_trailing_separators.d.ts +2 -0
  298. package/esm/deps/jsr.io/@std/path/1.0.7/_common/strip_trailing_separators.d.ts.map +1 -0
  299. package/esm/deps/jsr.io/@std/path/1.0.7/_common/strip_trailing_separators.js +20 -0
  300. package/esm/deps/jsr.io/@std/path/1.0.7/_common/strip_trailing_separators.js.map +1 -0
  301. package/esm/deps/jsr.io/@std/path/1.0.7/_common/to_file_url.d.ts +2 -0
  302. package/esm/deps/jsr.io/@std/path/1.0.7/_common/to_file_url.d.ts.map +1 -0
  303. package/esm/deps/jsr.io/@std/path/1.0.7/_common/to_file_url.js +16 -0
  304. package/esm/deps/jsr.io/@std/path/1.0.7/_common/to_file_url.js.map +1 -0
  305. package/esm/deps/jsr.io/@std/path/1.0.7/_os.d.ts +2 -0
  306. package/esm/deps/jsr.io/@std/path/1.0.7/_os.d.ts.map +1 -0
  307. package/esm/deps/jsr.io/@std/path/1.0.7/_os.js +10 -0
  308. package/esm/deps/jsr.io/@std/path/1.0.7/_os.js.map +1 -0
  309. package/esm/deps/jsr.io/@std/path/1.0.7/basename.d.ts +28 -0
  310. package/esm/deps/jsr.io/@std/path/1.0.7/basename.d.ts.map +1 -0
  311. package/esm/deps/jsr.io/@std/path/1.0.7/basename.js +37 -0
  312. package/esm/deps/jsr.io/@std/path/1.0.7/basename.js.map +1 -0
  313. package/esm/deps/jsr.io/@std/path/1.0.7/common.d.ts +28 -0
  314. package/esm/deps/jsr.io/@std/path/1.0.7/common.d.ts.map +1 -0
  315. package/esm/deps/jsr.io/@std/path/1.0.7/common.js +34 -0
  316. package/esm/deps/jsr.io/@std/path/1.0.7/common.js.map +1 -0
  317. package/esm/deps/jsr.io/@std/path/1.0.7/constants.d.ts +15 -0
  318. package/esm/deps/jsr.io/@std/path/1.0.7/constants.d.ts.map +1 -0
  319. package/esm/deps/jsr.io/@std/path/1.0.7/constants.js +18 -0
  320. package/esm/deps/jsr.io/@std/path/1.0.7/constants.js.map +1 -0
  321. package/esm/deps/jsr.io/@std/path/1.0.7/dirname.d.ts +23 -0
  322. package/esm/deps/jsr.io/@std/path/1.0.7/dirname.d.ts.map +1 -0
  323. package/esm/deps/jsr.io/@std/path/1.0.7/dirname.js +30 -0
  324. package/esm/deps/jsr.io/@std/path/1.0.7/dirname.js.map +1 -0
  325. package/esm/deps/jsr.io/@std/path/1.0.7/extname.d.ts +23 -0
  326. package/esm/deps/jsr.io/@std/path/1.0.7/extname.d.ts.map +1 -0
  327. package/esm/deps/jsr.io/@std/path/1.0.7/extname.js +30 -0
  328. package/esm/deps/jsr.io/@std/path/1.0.7/extname.js.map +1 -0
  329. package/esm/deps/jsr.io/@std/path/1.0.7/format.d.ts +22 -0
  330. package/esm/deps/jsr.io/@std/path/1.0.7/format.d.ts.map +1 -0
  331. package/esm/deps/jsr.io/@std/path/1.0.7/format.js +28 -0
  332. package/esm/deps/jsr.io/@std/path/1.0.7/format.js.map +1 -0
  333. package/esm/deps/jsr.io/@std/path/1.0.7/from_file_url.d.ts +22 -0
  334. package/esm/deps/jsr.io/@std/path/1.0.7/from_file_url.d.ts.map +1 -0
  335. package/esm/deps/jsr.io/@std/path/1.0.7/from_file_url.js +29 -0
  336. package/esm/deps/jsr.io/@std/path/1.0.7/from_file_url.js.map +1 -0
  337. package/esm/deps/jsr.io/@std/path/1.0.7/glob_to_regexp.d.ts +77 -0
  338. package/esm/deps/jsr.io/@std/path/1.0.7/glob_to_regexp.d.ts.map +1 -0
  339. package/esm/deps/jsr.io/@std/path/1.0.7/glob_to_regexp.js +84 -0
  340. package/esm/deps/jsr.io/@std/path/1.0.7/glob_to_regexp.js.map +1 -0
  341. package/esm/deps/jsr.io/@std/path/1.0.7/is_absolute.d.ts +22 -0
  342. package/esm/deps/jsr.io/@std/path/1.0.7/is_absolute.d.ts.map +1 -0
  343. package/esm/deps/jsr.io/@std/path/1.0.7/is_absolute.js +29 -0
  344. package/esm/deps/jsr.io/@std/path/1.0.7/is_absolute.js.map +1 -0
  345. package/esm/deps/jsr.io/@std/path/1.0.7/is_glob.d.ts +17 -0
  346. package/esm/deps/jsr.io/@std/path/1.0.7/is_glob.d.ts.map +1 -0
  347. package/esm/deps/jsr.io/@std/path/1.0.7/is_glob.js +43 -0
  348. package/esm/deps/jsr.io/@std/path/1.0.7/is_glob.js.map +1 -0
  349. package/esm/deps/jsr.io/@std/path/1.0.7/join.d.ts +23 -0
  350. package/esm/deps/jsr.io/@std/path/1.0.7/join.d.ts.map +1 -0
  351. package/esm/deps/jsr.io/@std/path/1.0.7/join.js +30 -0
  352. package/esm/deps/jsr.io/@std/path/1.0.7/join.js.map +1 -0
  353. package/esm/deps/jsr.io/@std/path/1.0.7/join_globs.d.ts +28 -0
  354. package/esm/deps/jsr.io/@std/path/1.0.7/join_globs.d.ts.map +1 -0
  355. package/esm/deps/jsr.io/@std/path/1.0.7/join_globs.js +35 -0
  356. package/esm/deps/jsr.io/@std/path/1.0.7/join_globs.js.map +1 -0
  357. package/esm/deps/jsr.io/@std/path/1.0.7/mod.d.ts +54 -0
  358. package/esm/deps/jsr.io/@std/path/1.0.7/mod.d.ts.map +1 -0
  359. package/esm/deps/jsr.io/@std/path/1.0.7/mod.js +58 -0
  360. package/esm/deps/jsr.io/@std/path/1.0.7/mod.js.map +1 -0
  361. package/esm/deps/jsr.io/@std/path/1.0.7/normalize.d.ts +27 -0
  362. package/esm/deps/jsr.io/@std/path/1.0.7/normalize.d.ts.map +1 -0
  363. package/esm/deps/jsr.io/@std/path/1.0.7/normalize.js +34 -0
  364. package/esm/deps/jsr.io/@std/path/1.0.7/normalize.js.map +1 -0
  365. package/esm/deps/jsr.io/@std/path/1.0.7/normalize_glob.d.ts +29 -0
  366. package/esm/deps/jsr.io/@std/path/1.0.7/normalize_glob.d.ts.map +1 -0
  367. package/esm/deps/jsr.io/@std/path/1.0.7/normalize_glob.js +36 -0
  368. package/esm/deps/jsr.io/@std/path/1.0.7/normalize_glob.js.map +1 -0
  369. package/esm/deps/jsr.io/@std/path/1.0.7/parse.d.ts +35 -0
  370. package/esm/deps/jsr.io/@std/path/1.0.7/parse.d.ts.map +1 -0
  371. package/esm/deps/jsr.io/@std/path/1.0.7/parse.js +40 -0
  372. package/esm/deps/jsr.io/@std/path/1.0.7/parse.js.map +1 -0
  373. package/esm/deps/jsr.io/@std/path/1.0.7/posix/_util.d.ts +2 -0
  374. package/esm/deps/jsr.io/@std/path/1.0.7/posix/_util.d.ts.map +1 -0
  375. package/esm/deps/jsr.io/@std/path/1.0.7/posix/_util.js +9 -0
  376. package/esm/deps/jsr.io/@std/path/1.0.7/posix/_util.js.map +1 -0
  377. package/esm/deps/jsr.io/@std/path/1.0.7/posix/basename.d.ts +40 -0
  378. package/esm/deps/jsr.io/@std/path/1.0.7/posix/basename.d.ts.map +1 -0
  379. package/esm/deps/jsr.io/@std/path/1.0.7/posix/basename.js +50 -0
  380. package/esm/deps/jsr.io/@std/path/1.0.7/posix/basename.js.map +1 -0
  381. package/esm/deps/jsr.io/@std/path/1.0.7/posix/constants.d.ts +13 -0
  382. package/esm/deps/jsr.io/@std/path/1.0.7/posix/constants.d.ts.map +1 -0
  383. package/esm/deps/jsr.io/@std/path/1.0.7/posix/constants.js +15 -0
  384. package/esm/deps/jsr.io/@std/path/1.0.7/posix/constants.js.map +1 -0
  385. package/esm/deps/jsr.io/@std/path/1.0.7/posix/dirname.d.ts +32 -0
  386. package/esm/deps/jsr.io/@std/path/1.0.7/posix/dirname.d.ts.map +1 -0
  387. package/esm/deps/jsr.io/@std/path/1.0.7/posix/dirname.js +63 -0
  388. package/esm/deps/jsr.io/@std/path/1.0.7/posix/dirname.js.map +1 -0
  389. package/esm/deps/jsr.io/@std/path/1.0.7/posix/extname.d.ts +37 -0
  390. package/esm/deps/jsr.io/@std/path/1.0.7/posix/extname.d.ts.map +1 -0
  391. package/esm/deps/jsr.io/@std/path/1.0.7/posix/extname.js +90 -0
  392. package/esm/deps/jsr.io/@std/path/1.0.7/posix/extname.js.map +1 -0
  393. package/esm/deps/jsr.io/@std/path/1.0.7/posix/format.d.ts +24 -0
  394. package/esm/deps/jsr.io/@std/path/1.0.7/posix/format.d.ts.map +1 -0
  395. package/esm/deps/jsr.io/@std/path/1.0.7/posix/format.js +29 -0
  396. package/esm/deps/jsr.io/@std/path/1.0.7/posix/format.js.map +1 -0
  397. package/esm/deps/jsr.io/@std/path/1.0.7/posix/from_file_url.d.ts +16 -0
  398. package/esm/deps/jsr.io/@std/path/1.0.7/posix/from_file_url.d.ts.map +1 -0
  399. package/esm/deps/jsr.io/@std/path/1.0.7/posix/from_file_url.js +22 -0
  400. package/esm/deps/jsr.io/@std/path/1.0.7/posix/from_file_url.js.map +1 -0
  401. package/esm/deps/jsr.io/@std/path/1.0.7/posix/glob_to_regexp.d.ts +72 -0
  402. package/esm/deps/jsr.io/@std/path/1.0.7/posix/glob_to_regexp.d.ts.map +1 -0
  403. package/esm/deps/jsr.io/@std/path/1.0.7/posix/glob_to_regexp.js +83 -0
  404. package/esm/deps/jsr.io/@std/path/1.0.7/posix/glob_to_regexp.js.map +1 -0
  405. package/esm/deps/jsr.io/@std/path/1.0.7/posix/is_absolute.d.ts +17 -0
  406. package/esm/deps/jsr.io/@std/path/1.0.7/posix/is_absolute.d.ts.map +1 -0
  407. package/esm/deps/jsr.io/@std/path/1.0.7/posix/is_absolute.js +24 -0
  408. package/esm/deps/jsr.io/@std/path/1.0.7/posix/is_absolute.js.map +1 -0
  409. package/esm/deps/jsr.io/@std/path/1.0.7/posix/join.d.ts +33 -0
  410. package/esm/deps/jsr.io/@std/path/1.0.7/posix/join.d.ts.map +1 -0
  411. package/esm/deps/jsr.io/@std/path/1.0.7/posix/join.js +43 -0
  412. package/esm/deps/jsr.io/@std/path/1.0.7/posix/join.js.map +1 -0
  413. package/esm/deps/jsr.io/@std/path/1.0.7/posix/join_globs.d.ts +20 -0
  414. package/esm/deps/jsr.io/@std/path/1.0.7/posix/join_globs.d.ts.map +1 -0
  415. package/esm/deps/jsr.io/@std/path/1.0.7/posix/join_globs.js +40 -0
  416. package/esm/deps/jsr.io/@std/path/1.0.7/posix/join_globs.js.map +1 -0
  417. package/esm/deps/jsr.io/@std/path/1.0.7/posix/normalize.d.ts +40 -0
  418. package/esm/deps/jsr.io/@std/path/1.0.7/posix/normalize.d.ts.map +1 -0
  419. package/esm/deps/jsr.io/@std/path/1.0.7/posix/normalize.js +58 -0
  420. package/esm/deps/jsr.io/@std/path/1.0.7/posix/normalize.js.map +1 -0
  421. package/esm/deps/jsr.io/@std/path/1.0.7/posix/normalize_glob.d.ts +20 -0
  422. package/esm/deps/jsr.io/@std/path/1.0.7/posix/normalize_glob.d.ts.map +1 -0
  423. package/esm/deps/jsr.io/@std/path/1.0.7/posix/normalize_glob.js +32 -0
  424. package/esm/deps/jsr.io/@std/path/1.0.7/posix/normalize_glob.js.map +1 -0
  425. package/esm/deps/jsr.io/@std/path/1.0.7/posix/parse.d.ts +25 -0
  426. package/esm/deps/jsr.io/@std/path/1.0.7/posix/parse.d.ts.map +1 -0
  427. package/esm/deps/jsr.io/@std/path/1.0.7/posix/parse.js +116 -0
  428. package/esm/deps/jsr.io/@std/path/1.0.7/posix/parse.js.map +1 -0
  429. package/esm/deps/jsr.io/@std/path/1.0.7/posix/relative.d.ts +20 -0
  430. package/esm/deps/jsr.io/@std/path/1.0.7/posix/relative.d.ts.map +1 -0
  431. package/esm/deps/jsr.io/@std/path/1.0.7/posix/relative.js +107 -0
  432. package/esm/deps/jsr.io/@std/path/1.0.7/posix/relative.js.map +1 -0
  433. package/esm/deps/jsr.io/@std/path/1.0.7/posix/resolve.d.ts +17 -0
  434. package/esm/deps/jsr.io/@std/path/1.0.7/posix/resolve.d.ts.map +1 -0
  435. package/esm/deps/jsr.io/@std/path/1.0.7/posix/resolve.js +60 -0
  436. package/esm/deps/jsr.io/@std/path/1.0.7/posix/resolve.js.map +1 -0
  437. package/esm/deps/jsr.io/@std/path/1.0.7/posix/to_file_url.d.ts +17 -0
  438. package/esm/deps/jsr.io/@std/path/1.0.7/posix/to_file_url.d.ts.map +1 -0
  439. package/esm/deps/jsr.io/@std/path/1.0.7/posix/to_file_url.js +28 -0
  440. package/esm/deps/jsr.io/@std/path/1.0.7/posix/to_file_url.js.map +1 -0
  441. package/esm/deps/jsr.io/@std/path/1.0.7/posix/to_namespaced_path.d.ts +16 -0
  442. package/esm/deps/jsr.io/@std/path/1.0.7/posix/to_namespaced_path.d.ts.map +1 -0
  443. package/esm/deps/jsr.io/@std/path/1.0.7/posix/to_namespaced_path.js +21 -0
  444. package/esm/deps/jsr.io/@std/path/1.0.7/posix/to_namespaced_path.js.map +1 -0
  445. package/esm/deps/jsr.io/@std/path/1.0.7/relative.d.ts +24 -0
  446. package/esm/deps/jsr.io/@std/path/1.0.7/relative.d.ts.map +1 -0
  447. package/esm/deps/jsr.io/@std/path/1.0.7/relative.js +31 -0
  448. package/esm/deps/jsr.io/@std/path/1.0.7/relative.js.map +1 -0
  449. package/esm/deps/jsr.io/@std/path/1.0.7/resolve.d.ts +22 -0
  450. package/esm/deps/jsr.io/@std/path/1.0.7/resolve.d.ts.map +1 -0
  451. package/esm/deps/jsr.io/@std/path/1.0.7/resolve.js +31 -0
  452. package/esm/deps/jsr.io/@std/path/1.0.7/resolve.js.map +1 -0
  453. package/esm/deps/jsr.io/@std/path/1.0.7/to_file_url.d.ts +22 -0
  454. package/esm/deps/jsr.io/@std/path/1.0.7/to_file_url.d.ts.map +1 -0
  455. package/esm/deps/jsr.io/@std/path/1.0.7/to_file_url.js +29 -0
  456. package/esm/deps/jsr.io/@std/path/1.0.7/to_file_url.js.map +1 -0
  457. package/esm/deps/jsr.io/@std/path/1.0.7/to_namespaced_path.d.ts +21 -0
  458. package/esm/deps/jsr.io/@std/path/1.0.7/to_namespaced_path.d.ts.map +1 -0
  459. package/esm/deps/jsr.io/@std/path/1.0.7/to_namespaced_path.js +30 -0
  460. package/esm/deps/jsr.io/@std/path/1.0.7/to_namespaced_path.js.map +1 -0
  461. package/esm/deps/jsr.io/@std/path/1.0.7/types.d.ts +38 -0
  462. package/esm/deps/jsr.io/@std/path/1.0.7/types.d.ts.map +1 -0
  463. package/esm/deps/jsr.io/@std/path/1.0.7/types.js +4 -0
  464. package/esm/deps/jsr.io/@std/path/1.0.7/types.js.map +1 -0
  465. package/esm/deps/jsr.io/@std/path/1.0.7/windows/_util.d.ts +4 -0
  466. package/esm/deps/jsr.io/@std/path/1.0.7/windows/_util.d.ts.map +1 -0
  467. package/esm/deps/jsr.io/@std/path/1.0.7/windows/_util.js +16 -0
  468. package/esm/deps/jsr.io/@std/path/1.0.7/windows/_util.js.map +1 -0
  469. package/esm/deps/jsr.io/@std/path/1.0.7/windows/basename.d.ts +23 -0
  470. package/esm/deps/jsr.io/@std/path/1.0.7/windows/basename.d.ts.map +1 -0
  471. package/esm/deps/jsr.io/@std/path/1.0.7/windows/basename.js +45 -0
  472. package/esm/deps/jsr.io/@std/path/1.0.7/windows/basename.js.map +1 -0
  473. package/esm/deps/jsr.io/@std/path/1.0.7/windows/constants.d.ts +13 -0
  474. package/esm/deps/jsr.io/@std/path/1.0.7/windows/constants.d.ts.map +1 -0
  475. package/esm/deps/jsr.io/@std/path/1.0.7/windows/constants.js +15 -0
  476. package/esm/deps/jsr.io/@std/path/1.0.7/windows/constants.js.map +1 -0
  477. package/esm/deps/jsr.io/@std/path/1.0.7/windows/dirname.d.ts +20 -0
  478. package/esm/deps/jsr.io/@std/path/1.0.7/windows/dirname.d.ts.map +1 -0
  479. package/esm/deps/jsr.io/@std/path/1.0.7/windows/dirname.js +113 -0
  480. package/esm/deps/jsr.io/@std/path/1.0.7/windows/dirname.js.map +1 -0
  481. package/esm/deps/jsr.io/@std/path/1.0.7/windows/extname.d.ts +20 -0
  482. package/esm/deps/jsr.io/@std/path/1.0.7/windows/extname.d.ts.map +1 -0
  483. package/esm/deps/jsr.io/@std/path/1.0.7/windows/extname.js +82 -0
  484. package/esm/deps/jsr.io/@std/path/1.0.7/windows/extname.js.map +1 -0
  485. package/esm/deps/jsr.io/@std/path/1.0.7/windows/format.d.ts +24 -0
  486. package/esm/deps/jsr.io/@std/path/1.0.7/windows/format.d.ts.map +1 -0
  487. package/esm/deps/jsr.io/@std/path/1.0.7/windows/format.js +29 -0
  488. package/esm/deps/jsr.io/@std/path/1.0.7/windows/format.js.map +1 -0
  489. package/esm/deps/jsr.io/@std/path/1.0.7/windows/from_file_url.d.ts +18 -0
  490. package/esm/deps/jsr.io/@std/path/1.0.7/windows/from_file_url.d.ts.map +1 -0
  491. package/esm/deps/jsr.io/@std/path/1.0.7/windows/from_file_url.js +31 -0
  492. package/esm/deps/jsr.io/@std/path/1.0.7/windows/from_file_url.js.map +1 -0
  493. package/esm/deps/jsr.io/@std/path/1.0.7/windows/glob_to_regexp.d.ts +71 -0
  494. package/esm/deps/jsr.io/@std/path/1.0.7/windows/glob_to_regexp.d.ts.map +1 -0
  495. package/esm/deps/jsr.io/@std/path/1.0.7/windows/glob_to_regexp.js +83 -0
  496. package/esm/deps/jsr.io/@std/path/1.0.7/windows/glob_to_regexp.js.map +1 -0
  497. package/esm/deps/jsr.io/@std/path/1.0.7/windows/is_absolute.d.ts +17 -0
  498. package/esm/deps/jsr.io/@std/path/1.0.7/windows/is_absolute.d.ts.map +1 -0
  499. package/esm/deps/jsr.io/@std/path/1.0.7/windows/is_absolute.js +39 -0
  500. package/esm/deps/jsr.io/@std/path/1.0.7/windows/is_absolute.js.map +1 -0
  501. package/esm/deps/jsr.io/@std/path/1.0.7/windows/join.d.ts +20 -0
  502. package/esm/deps/jsr.io/@std/path/1.0.7/windows/join.d.ts.map +1 -0
  503. package/esm/deps/jsr.io/@std/path/1.0.7/windows/join.js +75 -0
  504. package/esm/deps/jsr.io/@std/path/1.0.7/windows/join.js.map +1 -0
  505. package/esm/deps/jsr.io/@std/path/1.0.7/windows/join_globs.d.ts +21 -0
  506. package/esm/deps/jsr.io/@std/path/1.0.7/windows/join_globs.d.ts.map +1 -0
  507. package/esm/deps/jsr.io/@std/path/1.0.7/windows/join_globs.js +41 -0
  508. package/esm/deps/jsr.io/@std/path/1.0.7/windows/join_globs.js.map +1 -0
  509. package/esm/deps/jsr.io/@std/path/1.0.7/windows/normalize.d.ts +22 -0
  510. package/esm/deps/jsr.io/@std/path/1.0.7/windows/normalize.d.ts.map +1 -0
  511. package/esm/deps/jsr.io/@std/path/1.0.7/windows/normalize.js +135 -0
  512. package/esm/deps/jsr.io/@std/path/1.0.7/windows/normalize.js.map +1 -0
  513. package/esm/deps/jsr.io/@std/path/1.0.7/windows/normalize_glob.d.ts +20 -0
  514. package/esm/deps/jsr.io/@std/path/1.0.7/windows/normalize_glob.d.ts.map +1 -0
  515. package/esm/deps/jsr.io/@std/path/1.0.7/windows/normalize_glob.js +32 -0
  516. package/esm/deps/jsr.io/@std/path/1.0.7/windows/normalize_glob.js.map +1 -0
  517. package/esm/deps/jsr.io/@std/path/1.0.7/windows/parse.d.ts +25 -0
  518. package/esm/deps/jsr.io/@std/path/1.0.7/windows/parse.d.ts.map +1 -0
  519. package/esm/deps/jsr.io/@std/path/1.0.7/windows/parse.js +177 -0
  520. package/esm/deps/jsr.io/@std/path/1.0.7/windows/parse.js.map +1 -0
  521. package/esm/deps/jsr.io/@std/path/1.0.7/windows/relative.d.ts +23 -0
  522. package/esm/deps/jsr.io/@std/path/1.0.7/windows/relative.d.ts.map +1 -0
  523. package/esm/deps/jsr.io/@std/path/1.0.7/windows/relative.js +132 -0
  524. package/esm/deps/jsr.io/@std/path/1.0.7/windows/relative.js.map +1 -0
  525. package/esm/deps/jsr.io/@std/path/1.0.7/windows/resolve.d.ts +17 -0
  526. package/esm/deps/jsr.io/@std/path/1.0.7/windows/resolve.d.ts.map +1 -0
  527. package/esm/deps/jsr.io/@std/path/1.0.7/windows/resolve.js +155 -0
  528. package/esm/deps/jsr.io/@std/path/1.0.7/windows/resolve.js.map +1 -0
  529. package/esm/deps/jsr.io/@std/path/1.0.7/windows/to_file_url.d.ts +17 -0
  530. package/esm/deps/jsr.io/@std/path/1.0.7/windows/to_file_url.d.ts.map +1 -0
  531. package/esm/deps/jsr.io/@std/path/1.0.7/windows/to_file_url.js +35 -0
  532. package/esm/deps/jsr.io/@std/path/1.0.7/windows/to_file_url.js.map +1 -0
  533. package/esm/deps/jsr.io/@std/path/1.0.7/windows/to_namespaced_path.d.ts +17 -0
  534. package/esm/deps/jsr.io/@std/path/1.0.7/windows/to_namespaced_path.d.ts.map +1 -0
  535. package/esm/deps/jsr.io/@std/path/1.0.7/windows/to_namespaced_path.js +50 -0
  536. package/esm/deps/jsr.io/@std/path/1.0.7/windows/to_namespaced_path.js.map +1 -0
  537. package/esm/main.d.ts +4 -0
  538. package/esm/main.d.ts.map +1 -0
  539. package/esm/main.js +80 -0
  540. package/esm/main.js.map +1 -0
  541. package/esm/mod.d.ts +1 -0
  542. package/esm/mod.d.ts.map +1 -1
  543. package/esm/mod.js +1 -0
  544. package/esm/mod.js.map +1 -1
  545. package/esm/util/displayCompletion.d.ts +3 -0
  546. package/esm/util/displayCompletion.d.ts.map +1 -0
  547. package/esm/util/displayCompletion.js +9 -0
  548. package/esm/util/displayCompletion.js.map +1 -0
  549. package/package.json +7 -2
  550. package/src/_dnt.polyfills.ts +172 -0
  551. package/src/_dnt.shims.ts +64 -0
  552. package/src/deps/jsr.io/@std/assert/1.0.6/almost_equals.ts +55 -0
  553. package/src/deps/jsr.io/@std/assert/1.0.6/array_includes.ts +57 -0
  554. package/src/deps/jsr.io/@std/assert/1.0.6/assert.ts +23 -0
  555. package/src/deps/jsr.io/@std/assert/1.0.6/assertion_error.ts +31 -0
  556. package/src/deps/jsr.io/@std/assert/1.0.6/equal.ts +152 -0
  557. package/src/deps/jsr.io/@std/assert/1.0.6/equals.ts +52 -0
  558. package/src/deps/jsr.io/@std/assert/1.0.6/exists.ts +31 -0
  559. package/src/deps/jsr.io/@std/assert/1.0.6/fail.ts +21 -0
  560. package/src/deps/jsr.io/@std/assert/1.0.6/false.ts +26 -0
  561. package/src/deps/jsr.io/@std/assert/1.0.6/greater.ts +30 -0
  562. package/src/deps/jsr.io/@std/assert/1.0.6/greater_or_equal.ts +36 -0
  563. package/src/deps/jsr.io/@std/assert/1.0.6/instance_of.ts +64 -0
  564. package/src/deps/jsr.io/@std/assert/1.0.6/is_error.ts +65 -0
  565. package/src/deps/jsr.io/@std/assert/1.0.6/less.ts +29 -0
  566. package/src/deps/jsr.io/@std/assert/1.0.6/less_or_equal.ts +36 -0
  567. package/src/deps/jsr.io/@std/assert/1.0.6/match.ts +30 -0
  568. package/src/deps/jsr.io/@std/assert/1.0.6/mod.ts +47 -0
  569. package/src/deps/jsr.io/@std/assert/1.0.6/not_equals.ts +36 -0
  570. package/src/deps/jsr.io/@std/assert/1.0.6/not_instance_of.ts +33 -0
  571. package/src/deps/jsr.io/@std/assert/1.0.6/not_match.ts +30 -0
  572. package/src/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.ts +42 -0
  573. package/src/deps/jsr.io/@std/assert/1.0.6/object_match.ts +202 -0
  574. package/src/deps/jsr.io/@std/assert/1.0.6/rejects.ts +123 -0
  575. package/src/deps/jsr.io/@std/assert/1.0.6/strict_equals.ts +67 -0
  576. package/src/deps/jsr.io/@std/assert/1.0.6/string_includes.ts +30 -0
  577. package/src/deps/jsr.io/@std/assert/1.0.6/throws.ts +111 -0
  578. package/src/deps/jsr.io/@std/assert/1.0.6/unimplemented.ts +21 -0
  579. package/src/deps/jsr.io/@std/assert/1.0.6/unreachable.ts +21 -0
  580. package/src/deps/jsr.io/@std/cli/1.0.6/_data.js +17 -0
  581. package/src/deps/jsr.io/@std/cli/1.0.6/_run_length.ts +41 -0
  582. package/src/deps/jsr.io/@std/cli/1.0.6/mod.ts +20 -0
  583. package/src/deps/jsr.io/@std/cli/1.0.6/parse_args.ts +776 -0
  584. package/src/deps/jsr.io/@std/cli/1.0.6/prompt_secret.ts +102 -0
  585. package/src/deps/jsr.io/@std/cli/1.0.6/unicode_width.ts +79 -0
  586. package/src/deps/jsr.io/@std/dotenv/0.225.2/load.ts +14 -0
  587. package/src/deps/jsr.io/@std/dotenv/0.225.2/mod.ts +251 -0
  588. package/src/deps/jsr.io/@std/dotenv/0.225.2/parse.ts +113 -0
  589. package/src/deps/jsr.io/@std/dotenv/0.225.2/stringify.ts +47 -0
  590. package/src/deps/jsr.io/@std/fs/1.0.5/_create_walk_entry.ts +47 -0
  591. package/src/deps/jsr.io/@std/fs/1.0.5/_get_file_info_type.ts +25 -0
  592. package/src/deps/jsr.io/@std/fs/1.0.5/_is_same_path.ts +23 -0
  593. package/src/deps/jsr.io/@std/fs/1.0.5/_is_subdir.ts +34 -0
  594. package/src/deps/jsr.io/@std/fs/1.0.5/_to_path_string.ts +17 -0
  595. package/src/deps/jsr.io/@std/fs/1.0.5/copy.ts +413 -0
  596. package/src/deps/jsr.io/@std/fs/1.0.5/empty_dir.ts +91 -0
  597. package/src/deps/jsr.io/@std/fs/1.0.5/ensure_dir.ts +110 -0
  598. package/src/deps/jsr.io/@std/fs/1.0.5/ensure_file.ts +100 -0
  599. package/src/deps/jsr.io/@std/fs/1.0.5/ensure_link.ts +66 -0
  600. package/src/deps/jsr.io/@std/fs/1.0.5/ensure_symlink.ts +145 -0
  601. package/src/deps/jsr.io/@std/fs/1.0.5/eol.ts +74 -0
  602. package/src/deps/jsr.io/@std/fs/1.0.5/exists.ts +316 -0
  603. package/src/deps/jsr.io/@std/fs/1.0.5/expand_glob.ts +538 -0
  604. package/src/deps/jsr.io/@std/fs/1.0.5/mod.ts +31 -0
  605. package/src/deps/jsr.io/@std/fs/1.0.5/move.ts +171 -0
  606. package/src/deps/jsr.io/@std/fs/1.0.5/walk.ts +956 -0
  607. package/src/deps/jsr.io/@std/internal/1.0.4/build_message.ts +134 -0
  608. package/src/deps/jsr.io/@std/internal/1.0.4/diff.ts +317 -0
  609. package/src/deps/jsr.io/@std/internal/1.0.4/diff_str.ts +204 -0
  610. package/src/deps/jsr.io/@std/internal/1.0.4/format.ts +39 -0
  611. package/src/deps/jsr.io/@std/internal/1.0.4/styles.ts +233 -0
  612. package/src/deps/jsr.io/@std/internal/1.0.4/types.ts +18 -0
  613. package/src/deps/jsr.io/@std/path/1.0.7/_common/assert_path.ts +10 -0
  614. package/src/deps/jsr.io/@std/path/1.0.7/_common/basename.ts +53 -0
  615. package/src/deps/jsr.io/@std/path/1.0.7/_common/common.ts +26 -0
  616. package/src/deps/jsr.io/@std/path/1.0.7/_common/constants.ts +49 -0
  617. package/src/deps/jsr.io/@std/path/1.0.7/_common/dirname.ts +9 -0
  618. package/src/deps/jsr.io/@std/path/1.0.7/_common/format.ts +25 -0
  619. package/src/deps/jsr.io/@std/path/1.0.7/_common/from_file_url.ts +12 -0
  620. package/src/deps/jsr.io/@std/path/1.0.7/_common/glob_to_reg_exp.ts +290 -0
  621. package/src/deps/jsr.io/@std/path/1.0.7/_common/normalize.ts +9 -0
  622. package/src/deps/jsr.io/@std/path/1.0.7/_common/normalize_string.ts +74 -0
  623. package/src/deps/jsr.io/@std/path/1.0.7/_common/relative.ts +10 -0
  624. package/src/deps/jsr.io/@std/path/1.0.7/_common/strip_trailing_separators.ts +25 -0
  625. package/src/deps/jsr.io/@std/path/1.0.7/_common/to_file_url.ts +17 -0
  626. package/src/deps/jsr.io/@std/path/1.0.7/_os.ts +12 -0
  627. package/src/deps/jsr.io/@std/path/1.0.7/basename.ts +38 -0
  628. package/src/deps/jsr.io/@std/path/1.0.7/common.ts +35 -0
  629. package/src/deps/jsr.io/@std/path/1.0.7/constants.ts +18 -0
  630. package/src/deps/jsr.io/@std/path/1.0.7/dirname.ts +31 -0
  631. package/src/deps/jsr.io/@std/path/1.0.7/extname.ts +30 -0
  632. package/src/deps/jsr.io/@std/path/1.0.7/format.ts +30 -0
  633. package/src/deps/jsr.io/@std/path/1.0.7/from_file_url.ts +30 -0
  634. package/src/deps/jsr.io/@std/path/1.0.7/glob_to_regexp.ts +94 -0
  635. package/src/deps/jsr.io/@std/path/1.0.7/is_absolute.ts +30 -0
  636. package/src/deps/jsr.io/@std/path/1.0.7/is_glob.ts +49 -0
  637. package/src/deps/jsr.io/@std/path/1.0.7/join.ts +31 -0
  638. package/src/deps/jsr.io/@std/path/1.0.7/join_globs.ts +42 -0
  639. package/src/deps/jsr.io/@std/path/1.0.7/mod.ts +58 -0
  640. package/src/deps/jsr.io/@std/path/1.0.7/normalize.ts +34 -0
  641. package/src/deps/jsr.io/@std/path/1.0.7/normalize_glob.ts +45 -0
  642. package/src/deps/jsr.io/@std/path/1.0.7/parse.ts +44 -0
  643. package/src/deps/jsr.io/@std/path/1.0.7/posix/_util.ts +10 -0
  644. package/src/deps/jsr.io/@std/path/1.0.7/posix/basename.ts +59 -0
  645. package/src/deps/jsr.io/@std/path/1.0.7/posix/constants.ts +15 -0
  646. package/src/deps/jsr.io/@std/path/1.0.7/posix/dirname.ts +70 -0
  647. package/src/deps/jsr.io/@std/path/1.0.7/posix/extname.ts +92 -0
  648. package/src/deps/jsr.io/@std/path/1.0.7/posix/format.ts +31 -0
  649. package/src/deps/jsr.io/@std/path/1.0.7/posix/from_file_url.ts +25 -0
  650. package/src/deps/jsr.io/@std/path/1.0.7/posix/glob_to_regexp.ts +94 -0
  651. package/src/deps/jsr.io/@std/path/1.0.7/posix/is_absolute.ts +25 -0
  652. package/src/deps/jsr.io/@std/path/1.0.7/posix/join.ts +43 -0
  653. package/src/deps/jsr.io/@std/path/1.0.7/posix/join_globs.ts +44 -0
  654. package/src/deps/jsr.io/@std/path/1.0.7/posix/normalize.ts +62 -0
  655. package/src/deps/jsr.io/@std/path/1.0.7/posix/normalize_glob.ts +42 -0
  656. package/src/deps/jsr.io/@std/path/1.0.7/posix/parse.ts +121 -0
  657. package/src/deps/jsr.io/@std/path/1.0.7/posix/relative.ts +103 -0
  658. package/src/deps/jsr.io/@std/path/1.0.7/posix/resolve.ts +71 -0
  659. package/src/deps/jsr.io/@std/path/1.0.7/posix/to_file_url.ts +32 -0
  660. package/src/deps/jsr.io/@std/path/1.0.7/posix/to_namespaced_path.ts +21 -0
  661. package/src/deps/jsr.io/@std/path/1.0.7/relative.ts +32 -0
  662. package/src/deps/jsr.io/@std/path/1.0.7/resolve.ts +32 -0
  663. package/src/deps/jsr.io/@std/path/1.0.7/to_file_url.ts +30 -0
  664. package/src/deps/jsr.io/@std/path/1.0.7/to_namespaced_path.ts +31 -0
  665. package/src/deps/jsr.io/@std/path/1.0.7/types.ts +40 -0
  666. package/src/deps/jsr.io/@std/path/1.0.7/windows/_util.ts +28 -0
  667. package/src/deps/jsr.io/@std/path/1.0.7/windows/basename.ts +51 -0
  668. package/src/deps/jsr.io/@std/path/1.0.7/windows/constants.ts +15 -0
  669. package/src/deps/jsr.io/@std/path/1.0.7/windows/dirname.ts +117 -0
  670. package/src/deps/jsr.io/@std/path/1.0.7/windows/extname.ts +89 -0
  671. package/src/deps/jsr.io/@std/path/1.0.7/windows/format.ts +31 -0
  672. package/src/deps/jsr.io/@std/path/1.0.7/windows/from_file_url.ts +34 -0
  673. package/src/deps/jsr.io/@std/path/1.0.7/windows/glob_to_regexp.ts +92 -0
  674. package/src/deps/jsr.io/@std/path/1.0.7/windows/is_absolute.ts +40 -0
  675. package/src/deps/jsr.io/@std/path/1.0.7/windows/join.ts +75 -0
  676. package/src/deps/jsr.io/@std/path/1.0.7/windows/join_globs.ts +45 -0
  677. package/src/deps/jsr.io/@std/path/1.0.7/windows/normalize.ts +135 -0
  678. package/src/deps/jsr.io/@std/path/1.0.7/windows/normalize_glob.ts +42 -0
  679. package/src/deps/jsr.io/@std/path/1.0.7/windows/parse.ts +184 -0
  680. package/src/deps/jsr.io/@std/path/1.0.7/windows/relative.ts +128 -0
  681. package/src/deps/jsr.io/@std/path/1.0.7/windows/resolve.ts +178 -0
  682. package/src/deps/jsr.io/@std/path/1.0.7/windows/to_file_url.ts +38 -0
  683. package/src/deps/jsr.io/@std/path/1.0.7/windows/to_namespaced_path.ts +60 -0
  684. package/src/main.ts +106 -0
  685. package/src/mod.ts +2 -0
  686. package/src/util/displayCompletion.ts +12 -0
@@ -0,0 +1,306 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ const FLAG_REGEXP = /^(?:-(?:(?<doubleDash>-)(?<negated>no-)?)?)(?<key>.+?)(?:=(?<value>.+?))?$/s;
4
+ const LETTER_REGEXP = /[A-Za-z]/;
5
+ const NUMBER_REGEXP = /-?\d+(\.\d*)?(e-?\d+)?$/;
6
+ const HYPHEN_REGEXP = /^(-|--)[^-]/;
7
+ const VALUE_REGEXP = /=(?<value>.+)/;
8
+ const FLAG_NAME_REGEXP = /^--[^=]+$/;
9
+ const SPECIAL_CHAR_REGEXP = /\W/;
10
+ const NON_WHITESPACE_REGEXP = /\S/;
11
+ function isNumber(string) {
12
+ return NON_WHITESPACE_REGEXP.test(string) && Number.isFinite(Number(string));
13
+ }
14
+ function setNested(object, keys, value, collect = false) {
15
+ keys = [...keys];
16
+ const key = keys.pop();
17
+ keys.forEach((key) => object = (object[key] ??= {}));
18
+ if (collect) {
19
+ const v = object[key];
20
+ if (Array.isArray(v)) {
21
+ v.push(value);
22
+ return;
23
+ }
24
+ value = v ? [v, value] : [value];
25
+ }
26
+ object[key] = value;
27
+ }
28
+ function hasNested(object, keys) {
29
+ for (const key of keys) {
30
+ const value = object[key];
31
+ if (!Object.hasOwn(object, key))
32
+ return false;
33
+ object = value;
34
+ }
35
+ return true;
36
+ }
37
+ function aliasIsBoolean(aliasMap, booleanSet, key) {
38
+ const set = aliasMap.get(key);
39
+ if (set === undefined)
40
+ return false;
41
+ for (const alias of set)
42
+ if (booleanSet.has(alias))
43
+ return true;
44
+ return false;
45
+ }
46
+ function isBooleanString(value) {
47
+ return value === "true" || value === "false";
48
+ }
49
+ function parseBooleanString(value) {
50
+ return value !== "false";
51
+ }
52
+ /**
53
+ * Take a set of command line arguments, optionally with a set of options, and
54
+ * return an object representing the flags found in the passed arguments.
55
+ *
56
+ * By default, any arguments starting with `-` or `--` are considered boolean
57
+ * flags. If the argument name is followed by an equal sign (`=`) it is
58
+ * considered a key-value pair. Any arguments which could not be parsed are
59
+ * available in the `_` property of the returned object.
60
+ *
61
+ * By default, this module tries to determine the type of all arguments
62
+ * automatically and the return type of this function will have an index
63
+ * signature with `any` as value (`{ [x: string]: any }`).
64
+ *
65
+ * If the `string`, `boolean` or `collect` option is set, the return value of
66
+ * this function will be fully typed and the index signature of the return
67
+ * type will change to `{ [x: string]: unknown }`.
68
+ *
69
+ * Any arguments after `'--'` will not be parsed and will end up in `parsedArgs._`.
70
+ *
71
+ * Numeric-looking arguments will be returned as numbers unless `options.string`
72
+ * or `options.boolean` is set for that argument name.
73
+ *
74
+ * @param args An array of command line arguments.
75
+ * @param options Options for the parse function.
76
+ *
77
+ * @typeParam TArgs Type of result.
78
+ * @typeParam TDoubleDash Used by `TArgs` for the result.
79
+ * @typeParam TBooleans Used by `TArgs` for the result.
80
+ * @typeParam TStrings Used by `TArgs` for the result.
81
+ * @typeParam TCollectable Used by `TArgs` for the result.
82
+ * @typeParam TNegatable Used by `TArgs` for the result.
83
+ * @typeParam TDefaults Used by `TArgs` for the result.
84
+ * @typeParam TAliases Used by `TArgs` for the result.
85
+ * @typeParam TAliasArgNames Used by `TArgs` for the result.
86
+ * @typeParam TAliasNames Used by `TArgs` for the result.
87
+ *
88
+ * @return The parsed arguments.
89
+ *
90
+ * @example Usage
91
+ * ```ts
92
+ * import { parseArgs } from "@std/cli/parse-args";
93
+ * import { assertEquals } from "@std/assert";
94
+ *
95
+ * // For proper use, one should use `parseArgs(Deno.args)`
96
+ * assertEquals(parseArgs(["--foo", "--bar=baz", "./quux.txt"]), {
97
+ * foo: true,
98
+ * bar: "baz",
99
+ * _: ["./quux.txt"],
100
+ * });
101
+ * ```
102
+ */
103
+ export function parseArgs(args, options) {
104
+ const { "--": doubleDash = false, alias = {}, boolean = false, default: defaults = {}, stopEarly = false, string = [], collect = [], negatable = [], unknown: unknownFn = (i) => i, } = options ?? {};
105
+ const aliasMap = new Map();
106
+ const booleanSet = new Set();
107
+ const stringSet = new Set();
108
+ const collectSet = new Set();
109
+ const negatableSet = new Set();
110
+ let allBools = false;
111
+ if (alias) {
112
+ for (const [key, value] of Object.entries(alias)) {
113
+ if (value === undefined) {
114
+ throw new TypeError("Alias value must be defined");
115
+ }
116
+ const aliases = Array.isArray(value) ? value : [value];
117
+ aliasMap.set(key, new Set(aliases));
118
+ aliases.forEach((alias) => aliasMap.set(alias, new Set([key, ...aliases.filter((it) => it !== alias)])));
119
+ }
120
+ }
121
+ if (boolean) {
122
+ if (typeof boolean === "boolean") {
123
+ allBools = boolean;
124
+ }
125
+ else {
126
+ const booleanArgs = Array.isArray(boolean) ? boolean : [boolean];
127
+ for (const key of booleanArgs.filter(Boolean)) {
128
+ booleanSet.add(key);
129
+ aliasMap.get(key)?.forEach((al) => {
130
+ booleanSet.add(al);
131
+ });
132
+ }
133
+ }
134
+ }
135
+ if (string) {
136
+ const stringArgs = Array.isArray(string) ? string : [string];
137
+ for (const key of stringArgs.filter(Boolean)) {
138
+ stringSet.add(key);
139
+ aliasMap.get(key)?.forEach((al) => stringSet.add(al));
140
+ }
141
+ }
142
+ if (collect) {
143
+ const collectArgs = Array.isArray(collect) ? collect : [collect];
144
+ for (const key of collectArgs.filter(Boolean)) {
145
+ collectSet.add(key);
146
+ aliasMap.get(key)?.forEach((al) => collectSet.add(al));
147
+ }
148
+ }
149
+ if (negatable) {
150
+ const negatableArgs = Array.isArray(negatable) ? negatable : [negatable];
151
+ for (const key of negatableArgs.filter(Boolean)) {
152
+ negatableSet.add(key);
153
+ aliasMap.get(key)?.forEach((alias) => negatableSet.add(alias));
154
+ }
155
+ }
156
+ const argv = { _: [] };
157
+ function setArgument(key, value, arg, collect) {
158
+ if (!booleanSet.has(key) &&
159
+ !stringSet.has(key) &&
160
+ !aliasMap.has(key) &&
161
+ !(allBools && FLAG_NAME_REGEXP.test(arg)) &&
162
+ unknownFn?.(arg, key, value) === false) {
163
+ return;
164
+ }
165
+ if (typeof value === "string" && !stringSet.has(key)) {
166
+ value = isNumber(value) ? Number(value) : value;
167
+ }
168
+ const collectable = collect && collectSet.has(key);
169
+ setNested(argv, key.split("."), value, collectable);
170
+ aliasMap.get(key)?.forEach((key) => {
171
+ setNested(argv, key.split("."), value, collectable);
172
+ });
173
+ }
174
+ let notFlags = [];
175
+ // all args after "--" are not parsed
176
+ const index = args.indexOf("--");
177
+ if (index !== -1) {
178
+ notFlags = args.slice(index + 1);
179
+ args = args.slice(0, index);
180
+ }
181
+ argsLoop: for (let i = 0; i < args.length; i++) {
182
+ const arg = args[i];
183
+ const groups = arg.match(FLAG_REGEXP)?.groups;
184
+ if (groups) {
185
+ const { doubleDash, negated } = groups;
186
+ let key = groups.key;
187
+ let value = groups.value;
188
+ if (doubleDash) {
189
+ if (value) {
190
+ if (booleanSet.has(key))
191
+ value = parseBooleanString(value);
192
+ setArgument(key, value, arg, true);
193
+ continue;
194
+ }
195
+ if (negated) {
196
+ if (negatableSet.has(key)) {
197
+ setArgument(key, false, arg, false);
198
+ continue;
199
+ }
200
+ key = `no-${key}`;
201
+ }
202
+ const next = args[i + 1];
203
+ if (next) {
204
+ if (!booleanSet.has(key) &&
205
+ !allBools &&
206
+ !next.startsWith("-") &&
207
+ (!aliasMap.has(key) || !aliasIsBoolean(aliasMap, booleanSet, key))) {
208
+ value = next;
209
+ i++;
210
+ setArgument(key, value, arg, true);
211
+ continue;
212
+ }
213
+ if (isBooleanString(next)) {
214
+ value = parseBooleanString(next);
215
+ i++;
216
+ setArgument(key, value, arg, true);
217
+ continue;
218
+ }
219
+ }
220
+ value = stringSet.has(key) ? "" : true;
221
+ setArgument(key, value, arg, true);
222
+ continue;
223
+ }
224
+ const letters = arg.slice(1, -1).split("");
225
+ for (const [j, letter] of letters.entries()) {
226
+ const next = arg.slice(j + 2);
227
+ if (next === "-") {
228
+ setArgument(letter, next, arg, true);
229
+ continue;
230
+ }
231
+ if (LETTER_REGEXP.test(letter)) {
232
+ const groups = VALUE_REGEXP.exec(next)?.groups;
233
+ if (groups) {
234
+ setArgument(letter, groups.value, arg, true);
235
+ continue argsLoop;
236
+ }
237
+ if (NUMBER_REGEXP.test(next)) {
238
+ setArgument(letter, next, arg, true);
239
+ continue argsLoop;
240
+ }
241
+ }
242
+ if (letters[j + 1]?.match(SPECIAL_CHAR_REGEXP)) {
243
+ setArgument(letter, arg.slice(j + 2), arg, true);
244
+ continue argsLoop;
245
+ }
246
+ setArgument(letter, stringSet.has(letter) ? "" : true, arg, true);
247
+ }
248
+ key = arg.slice(-1);
249
+ if (key === "-")
250
+ continue;
251
+ const nextArg = args[i + 1];
252
+ if (nextArg) {
253
+ if (!HYPHEN_REGEXP.test(nextArg) &&
254
+ !booleanSet.has(key) &&
255
+ (!aliasMap.has(key) || !aliasIsBoolean(aliasMap, booleanSet, key))) {
256
+ setArgument(key, nextArg, arg, true);
257
+ i++;
258
+ continue;
259
+ }
260
+ if (isBooleanString(nextArg)) {
261
+ const value = parseBooleanString(nextArg);
262
+ setArgument(key, value, arg, true);
263
+ i++;
264
+ continue;
265
+ }
266
+ }
267
+ setArgument(key, stringSet.has(key) ? "" : true, arg, true);
268
+ continue;
269
+ }
270
+ if (unknownFn?.(arg) !== false) {
271
+ argv._.push(stringSet.has("_") || !isNumber(arg) ? arg : Number(arg));
272
+ }
273
+ if (stopEarly) {
274
+ argv._.push(...args.slice(i + 1));
275
+ break;
276
+ }
277
+ }
278
+ for (const [key, value] of Object.entries(defaults)) {
279
+ const keys = key.split(".");
280
+ if (!hasNested(argv, keys)) {
281
+ setNested(argv, keys, value);
282
+ aliasMap.get(key)?.forEach((key) => setNested(argv, key.split("."), value));
283
+ }
284
+ }
285
+ for (const key of booleanSet.keys()) {
286
+ const keys = key.split(".");
287
+ if (!hasNested(argv, keys)) {
288
+ const value = collectSet.has(key) ? [] : false;
289
+ setNested(argv, keys, value);
290
+ }
291
+ }
292
+ for (const key of stringSet.keys()) {
293
+ const keys = key.split(".");
294
+ if (!hasNested(argv, keys) && collectSet.has(key)) {
295
+ setNested(argv, keys, []);
296
+ }
297
+ }
298
+ if (doubleDash) {
299
+ argv["--"] = notFlags;
300
+ }
301
+ else {
302
+ argv._.push(...notFlags);
303
+ }
304
+ return argv;
305
+ }
306
+ //# sourceMappingURL=parse_args.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse_args.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/cli/1.0.6/parse_args.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AA2WrC,MAAM,WAAW,GACf,6EAA6E,CAAC;AAChF,MAAM,aAAa,GAAG,UAAU,CAAC;AACjC,MAAM,aAAa,GAAG,yBAAyB,CAAC;AAChD,MAAM,aAAa,GAAG,aAAa,CAAC;AACpC,MAAM,YAAY,GAAG,eAAe,CAAC;AACrC,MAAM,gBAAgB,GAAG,WAAW,CAAC;AACrC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAEjC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAEnC,SAAS,QA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AED,IAAI,UAAU,EAAE,CAAC;QACf,IAAI,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;IACxB,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;IAC3B,CAAC;IAED,OAAO,IAAgC,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,28 @@
1
+ /** Options for {@linkcode promptSecret}. */
2
+ export type PromptSecretOptions = {
3
+ /** A character to print instead of the user's input. */
4
+ mask?: string;
5
+ /** Clear the current line after the user's input. */
6
+ clear?: boolean;
7
+ };
8
+ /**
9
+ * Shows the given message and waits for the user's input. Returns the user's input as string.
10
+ * This is similar to `prompt()` but it print user's input as `*` to prevent password from being shown.
11
+ * Use an empty `mask` if you don't want to show any character.
12
+ *
13
+ * @param message The prompt message to show to the user.
14
+ * @param options The options for the prompt.
15
+ * @returns The string that was entered or `null` if stdin is not a TTY.
16
+ *
17
+ * @example Usage
18
+ * ```ts no-eval
19
+ * import { promptSecret } from "@std/cli/prompt-secret";
20
+ *
21
+ * const password = promptSecret("Please provide the password:");
22
+ * if (password !== "some-password") {
23
+ * throw new Error("Access denied");
24
+ * }
25
+ * ```
26
+ */
27
+ export declare function promptSecret(message?: string, options?: PromptSecretOptions): string | null;
28
+ //# sourceMappingURL=prompt_secret.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt_secret.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/cli/1.0.6/prompt_secret.ts"],"names":[],"mappings":"AAmBA,4CAA4C;AAC5C,MAAM,MAAM,mBAAmB,GAAG;IAChC,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAC1B,OAAO,SAAW,EAClB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,MAAM,GAAG,IAAI,CA0Bf"}
@@ -0,0 +1,87 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ import * as dntShim from "../../../../../_dnt.shims.js";
3
+ const input = dntShim.Deno.stdin;
4
+ const output = dntShim.Deno.stdout;
5
+ const encoder = new TextEncoder();
6
+ const decoder = new TextDecoder();
7
+ const LF = "\n".charCodeAt(0); // ^J - Enter on Linux
8
+ const CR = "\r".charCodeAt(0); // ^M - Enter on macOS and Windows (CRLF)
9
+ const BS = "\b".charCodeAt(0); // ^H - Backspace on Linux and Windows
10
+ const DEL = 0x7f; // ^? - Backspace on macOS
11
+ const CLR = encoder.encode("\r\u001b[K"); // Clear the current line
12
+ // The `cbreak` option is not supported on Windows
13
+ const setRawOptions = dntShim.Deno.build.os === "windows"
14
+ ? undefined
15
+ : { cbreak: true };
16
+ /**
17
+ * Shows the given message and waits for the user's input. Returns the user's input as string.
18
+ * This is similar to `prompt()` but it print user's input as `*` to prevent password from being shown.
19
+ * Use an empty `mask` if you don't want to show any character.
20
+ *
21
+ * @param message The prompt message to show to the user.
22
+ * @param options The options for the prompt.
23
+ * @returns The string that was entered or `null` if stdin is not a TTY.
24
+ *
25
+ * @example Usage
26
+ * ```ts no-eval
27
+ * import { promptSecret } from "@std/cli/prompt-secret";
28
+ *
29
+ * const password = promptSecret("Please provide the password:");
30
+ * if (password !== "some-password") {
31
+ * throw new Error("Access denied");
32
+ * }
33
+ * ```
34
+ */
35
+ export function promptSecret(message = "Secret", options) {
36
+ const { mask = "*", clear } = options ?? {};
37
+ if (!input.isTerminal()) {
38
+ return null;
39
+ }
40
+ // Make the output consistent with the built-in prompt()
41
+ message += " ";
42
+ const callback = !mask ? undefined : (n) => {
43
+ output.writeSync(CLR);
44
+ output.writeSync(encoder.encode(`${message}${mask.repeat(n)}`));
45
+ };
46
+ output.writeSync(encoder.encode(message));
47
+ dntShim.Deno.stdin.setRaw(true, setRawOptions);
48
+ try {
49
+ return readLineFromStdinSync(callback);
50
+ }
51
+ finally {
52
+ if (clear) {
53
+ output.writeSync(CLR);
54
+ }
55
+ else {
56
+ output.writeSync(encoder.encode("\n"));
57
+ }
58
+ dntShim.Deno.stdin.setRaw(false);
59
+ }
60
+ }
61
+ // Slightly modified from Deno's runtime/js/41_prompt.js
62
+ // This implementation immediately break on CR or LF and accept callback.
63
+ // The original version waits LF when CR is received.
64
+ // https://github.com/denoland/deno/blob/e4593873a9c791238685dfbb45e64b4485884174/runtime/js/41_prompt.js#L52-L77
65
+ function readLineFromStdinSync(callback) {
66
+ const c = new Uint8Array(1);
67
+ const buf = [];
68
+ while (true) {
69
+ const n = input.readSync(c);
70
+ if (n === null || n === 0) {
71
+ break;
72
+ }
73
+ if (c[0] === CR || c[0] === LF) {
74
+ break;
75
+ }
76
+ if (c[0] === BS || c[0] === DEL) {
77
+ buf.pop();
78
+ }
79
+ else {
80
+ buf.push(c[0]);
81
+ }
82
+ if (callback)
83
+ callback(buf.length);
84
+ }
85
+ return decoder.decode(new Uint8Array(buf));
86
+ }
87
+ //# sourceMappingURL=prompt_secret.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt_secret.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/cli/1.0.6/prompt_secret.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AAGxD,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;AACjC,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;AACnC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAClC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAClC,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,sBAAsB;AACrD,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,yCAAy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 @@
1
+ /**
2
+ * Calculate the physical width of a string in a TTY-like environment. This is
3
+ * useful for cases such as calculating where a line-wrap will occur and
4
+ * underlining strings.
5
+ *
6
+ * The physical width is given by the number of columns required to display
7
+ * the string. The number of columns a given unicode character occupies can
8
+ * vary depending on the character itself.
9
+ *
10
+ * @param str The string to measure.
11
+ * @returns The unicode width of the string.
12
+ *
13
+ * @example Calculating the unicode width of a string
14
+ * ```ts
15
+ * import { unicodeWidth } from "@std/cli/unicode-width";
16
+ * import { assertEquals } from "@std/assert";
17
+ *
18
+ * assertEquals(unicodeWidth("hello world"), 11);
19
+ * assertEquals(unicodeWidth("天地玄黃宇宙洪荒"), 16);
20
+ * assertEquals(unicodeWidth("fullwidth"), 18);
21
+ * ```
22
+ *
23
+ * @example Calculating the unicode width of a color-encoded string
24
+ * ```ts
25
+ * import { unicodeWidth } from "@std/cli/unicode-width";
26
+ * import { stripAnsiCode } from "@std/fmt/colors";
27
+ * import { assertEquals } from "@std/assert";
28
+ *
29
+ * assertEquals(unicodeWidth(stripAnsiCode("\x1b[36mголубой\x1b[39m")), 7);
30
+ * assertEquals(unicodeWidth(stripAnsiCode("\x1b[31m紅色\x1b[39m")), 4);
31
+ * assertEquals(unicodeWidth(stripAnsiCode("\x1B]8;;https://deno.land\x07🦕\x1B]8;;\x07")), 2);
32
+ * ```
33
+ *
34
+ * Use
35
+ * {@linkcode https://jsr.io/@std/fmt/doc/colors/~/stripAnsiCode | stripAnsiCode}
36
+ * to remove ANSI escape codes from a string before passing it to
37
+ * {@linkcode unicodeWidth}.
38
+ */
39
+ export declare function unicodeWidth(str: string): number;
40
+ //# sourceMappingURL=unicode_width.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unicode_width.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/cli/1.0.6/unicode_width.ts"],"names":[],"mappings":"AAsCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD"}
@@ -0,0 +1,75 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ // Ported from unicode_width rust crate, Copyright (c) 2015 The Rust Project Developers. MIT license.
4
+ import data from "./_data.js";
5
+ import { runLengthDecode } from "./_run_length.js";
6
+ let tables = null;
7
+ function lookupWidth(cp) {
8
+ if (!tables)
9
+ tables = data.tables.map(runLengthDecode);
10
+ const t1Offset = tables[0][(cp >> 13) & 0xff];
11
+ const t2Offset = tables[1][128 * t1Offset + ((cp >> 6) & 0x7f)];
12
+ const packedWidths = tables[2][16 * t2Offset + ((cp >> 2) & 0xf)];
13
+ const width = (packedWidths >> (2 * (cp & 0b11))) & 0b11;
14
+ return width === 3 ? 1 : width;
15
+ }
16
+ const cache = new Map();
17
+ function charWidth(char) {
18
+ if (cache.has(char))
19
+ return cache.get(char);
20
+ const codePoint = char.codePointAt(0);
21
+ let width = null;
22
+ if (codePoint < 0x7f) {
23
+ width = codePoint >= 0x20 ? 1 : codePoint === 0 ? 0 : null;
24
+ }
25
+ else if (codePoint >= 0xa0) {
26
+ width = lookupWidth(codePoint);
27
+ }
28
+ else {
29
+ width = null;
30
+ }
31
+ cache.set(char, width);
32
+ return width;
33
+ }
34
+ /**
35
+ * Calculate the physical width of a string in a TTY-like environment. This is
36
+ * useful for cases such as calculating where a line-wrap will occur and
37
+ * underlining strings.
38
+ *
39
+ * The physical width is given by the number of columns required to display
40
+ * the string. The number of columns a given unicode character occupies can
41
+ * vary depending on the character itself.
42
+ *
43
+ * @param str The string to measure.
44
+ * @returns The unicode width of the string.
45
+ *
46
+ * @example Calculating the unicode width of a string
47
+ * ```ts
48
+ * import { unicodeWidth } from "@std/cli/unicode-width";
49
+ * import { assertEquals } from "@std/assert";
50
+ *
51
+ * assertEquals(unicodeWidth("hello world"), 11);
52
+ * assertEquals(unicodeWidth("天地玄黃宇宙洪荒"), 16);
53
+ * assertEquals(unicodeWidth("fullwidth"), 18);
54
+ * ```
55
+ *
56
+ * @example Calculating the unicode width of a color-encoded string
57
+ * ```ts
58
+ * import { unicodeWidth } from "@std/cli/unicode-width";
59
+ * import { stripAnsiCode } from "@std/fmt/colors";
60
+ * import { assertEquals } from "@std/assert";
61
+ *
62
+ * assertEquals(unicodeWidth(stripAnsiCode("\x1b[36mголубой\x1b[39m")), 7);
63
+ * assertEquals(unicodeWidth(stripAnsiCode("\x1b[31m紅色\x1b[39m")), 4);
64
+ * assertEquals(unicodeWidth(stripAnsiCode("\x1B]8;;https://deno.land\x07🦕\x1B]8;;\x07")), 2);
65
+ * ```
66
+ *
67
+ * Use
68
+ * {@linkcode https://jsr.io/@std/fmt/doc/colors/~/stripAnsiCode | stripAnsiCode}
69
+ * to remove ANSI escape codes from a string before passing it to
70
+ * {@linkcode unicodeWidth}.
71
+ */
72
+ export function unicodeWidth(str) {
73
+ return [...str].map((ch) => charWidth(ch) ?? 0).reduce((a, b) => a + b, 0);
74
+ }
75
+ //# sourceMappingURL=unicode_width.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unicode_width.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/cli/1.0.6/unicode_width.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,qGAAqG;AAErG,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,IAAI,MAAM,GAAwB,IAAI,CAAC;AACvC,SAAS,WAAW,CAAC,EAAU;IAC7B,IAAI,CAAC,MAAM;QAAE,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACvD,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAE,CAAC;IAChD,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CA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;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;AAC7E,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=load.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/dotenv/0.225.2/load.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ import * as dntShim from "../../../../../_dnt.shims.js";
3
+ import { loadSync } from "./mod.js";
4
+ if (!(dntShim.Deno.readTextFileSync instanceof Function)) {
5
+ // Avoid errors that occur in deno deploy: https://github.com/denoland/deno_std/issues/1957
6
+ console.warn(`Deno.readTextFileSync is not a function: No .env data was read.`);
7
+ }
8
+ else {
9
+ loadSync({ export: true });
10
+ }
11
+ //# sourceMappingURL=load.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/dotenv/0.225.2/load.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AAGxD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,YAAY,QAAQ,CAAC,EAAE,CAAC;IACzD,2FAA2F;IAC3F,OAAO,CAAC,IAAI,CACV,iEAAiE,CAClE,CAAC;AACJ,CAAC;KAAM,CAAC;IACN,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7B,CAAC"}