ventojs 0.9.0 → 0.9.2

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 (377) hide show
  1. package/esm/deps/deno.land/std@0.208.0/path/_common/assert_path.d.ts +1 -0
  2. package/esm/deps/deno.land/std@0.208.0/path/_common/assert_path.js +7 -0
  3. package/esm/deps/deno.land/std@0.208.0/path/_common/basename.d.ts +3 -0
  4. package/esm/deps/deno.land/std@0.208.0/path/_common/basename.js +40 -0
  5. package/esm/deps/deno.land/std@0.208.0/path/_common/common.d.ts +1 -0
  6. package/esm/deps/deno.land/{std@0.201.0/path → std@0.208.0/path/_common}/common.js +1 -14
  7. package/esm/deps/deno.land/std@0.208.0/path/_common/dirname.d.ts +1 -0
  8. package/esm/deps/deno.land/std@0.208.0/path/_common/dirname.js +8 -0
  9. package/esm/deps/deno.land/std@0.208.0/path/_common/format.d.ts +3 -0
  10. package/esm/deps/deno.land/std@0.208.0/path/_common/format.js +19 -0
  11. package/esm/deps/deno.land/std@0.208.0/path/_common/from_file_url.d.ts +2 -0
  12. package/esm/deps/deno.land/std@0.208.0/path/_common/from_file_url.js +9 -0
  13. package/esm/deps/deno.land/std@0.208.0/path/_common/glob_to_reg_exp.d.ts +27 -0
  14. package/esm/deps/deno.land/{std@0.201.0/path/glob.js → std@0.208.0/path/_common/glob_to_reg_exp.js} +13 -139
  15. package/esm/deps/deno.land/std@0.208.0/path/_common/normalize.d.ts +1 -0
  16. package/esm/deps/deno.land/std@0.208.0/path/_common/normalize.js +8 -0
  17. package/esm/deps/deno.land/std@0.208.0/path/_common/normalize_string.d.ts +1 -0
  18. package/esm/deps/deno.land/{std@0.201.0/path/_util.js → std@0.208.0/path/_common/normalize_string.js} +1 -31
  19. package/esm/deps/deno.land/std@0.208.0/path/_common/relative.d.ts +1 -0
  20. package/esm/deps/deno.land/std@0.208.0/path/_common/relative.js +9 -0
  21. package/esm/deps/deno.land/std@0.208.0/path/_common/strip_trailing_separators.d.ts +1 -0
  22. package/esm/deps/deno.land/std@0.208.0/path/_common/strip_trailing_separators.js +19 -0
  23. package/esm/deps/deno.land/std@0.208.0/path/_common/to_file_url.d.ts +1 -0
  24. package/esm/deps/deno.land/std@0.208.0/path/_common/to_file_url.js +15 -0
  25. package/esm/deps/deno.land/std@0.208.0/path/_os.d.ts +3 -0
  26. package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/_os.js +1 -1
  27. package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/basename.js +2 -1
  28. package/esm/deps/deno.land/std@0.208.0/path/common.js +19 -0
  29. package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/dirname.js +2 -1
  30. package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/extname.js +2 -1
  31. package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/format.js +2 -1
  32. package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/from_file_url.js +2 -1
  33. package/esm/deps/deno.land/{std@0.201.0/path/glob.d.ts → std@0.208.0/path/glob_to_regexp.d.ts} +5 -27
  34. package/esm/deps/deno.land/std@0.208.0/path/glob_to_regexp.js +65 -0
  35. package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/is_absolute.js +2 -1
  36. package/esm/deps/deno.land/std@0.208.0/path/is_glob.d.ts +2 -0
  37. package/esm/deps/deno.land/std@0.208.0/path/is_glob.js +28 -0
  38. package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/join.js +2 -1
  39. package/esm/deps/deno.land/std@0.208.0/path/join_globs.d.ts +3 -0
  40. package/esm/deps/deno.land/std@0.208.0/path/join_globs.js +11 -0
  41. package/{script/deps/deno.land/std@0.201.0 → esm/deps/deno.land/std@0.208.0}/path/mod.d.ts +10 -4
  42. package/esm/deps/deno.land/std@0.208.0/path/mod.js +63 -0
  43. package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/normalize.js +2 -1
  44. package/esm/deps/deno.land/std@0.208.0/path/normalize_glob.d.ts +3 -0
  45. package/esm/deps/deno.land/std@0.208.0/path/normalize_glob.js +11 -0
  46. package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/parse.js +2 -1
  47. package/esm/deps/deno.land/std@0.208.0/path/posix/_util.d.ts +1 -0
  48. package/esm/deps/deno.land/std@0.208.0/path/posix/_util.js +8 -0
  49. package/esm/deps/deno.land/std@0.208.0/path/posix/basename.js +18 -0
  50. package/esm/deps/deno.land/std@0.208.0/path/posix/common.js +19 -0
  51. package/esm/deps/deno.land/std@0.208.0/path/posix/dirname.js +36 -0
  52. package/esm/deps/deno.land/std@0.208.0/path/posix/extname.js +59 -0
  53. package/esm/deps/deno.land/std@0.208.0/path/posix/format.d.ts +6 -0
  54. package/esm/deps/deno.land/std@0.208.0/path/posix/format.js +11 -0
  55. package/esm/deps/deno.land/std@0.208.0/path/posix/from_file_url.d.ts +12 -0
  56. package/esm/deps/deno.land/std@0.208.0/path/posix/from_file_url.js +17 -0
  57. package/esm/deps/deno.land/std@0.208.0/path/posix/glob_to_regexp.d.ts +57 -0
  58. package/esm/deps/deno.land/std@0.208.0/path/posix/glob_to_regexp.js +69 -0
  59. package/esm/deps/deno.land/std@0.208.0/path/posix/is_absolute.js +12 -0
  60. package/esm/deps/deno.land/std@0.208.0/path/posix/is_glob.d.ts +1 -0
  61. package/esm/deps/deno.land/std@0.208.0/path/posix/is_glob.js +3 -0
  62. package/esm/deps/deno.land/std@0.208.0/path/posix/join.js +26 -0
  63. package/esm/deps/deno.land/std@0.208.0/path/posix/join_globs.d.ts +3 -0
  64. package/esm/deps/deno.land/std@0.208.0/path/posix/join_globs.js +26 -0
  65. package/esm/deps/deno.land/std@0.208.0/path/posix/mod.d.ts +40 -0
  66. package/esm/deps/deno.land/{std@0.201.0/path → std@0.208.0/path/posix}/mod.js +7 -8
  67. package/esm/deps/deno.land/std@0.208.0/path/posix/normalize.js +25 -0
  68. package/esm/deps/deno.land/std@0.208.0/path/posix/normalize_glob.d.ts +3 -0
  69. package/esm/deps/deno.land/std@0.208.0/path/posix/normalize_glob.js +16 -0
  70. package/esm/deps/deno.land/std@0.208.0/path/posix/parse.d.ts +6 -0
  71. package/esm/deps/deno.land/std@0.208.0/path/posix/parse.js +98 -0
  72. package/esm/deps/deno.land/std@0.208.0/path/posix/relative.d.ts +7 -0
  73. package/esm/deps/deno.land/std@0.208.0/path/posix/relative.js +94 -0
  74. package/esm/deps/deno.land/std@0.208.0/path/posix/resolve.js +48 -0
  75. package/esm/deps/deno.land/std@0.208.0/path/posix/separator.d.ts +2 -0
  76. package/esm/deps/deno.land/std@0.208.0/path/posix/separator.js +4 -0
  77. package/esm/deps/deno.land/std@0.208.0/path/posix/to_file_url.d.ts +12 -0
  78. package/esm/deps/deno.land/std@0.208.0/path/posix/to_file_url.js +22 -0
  79. package/esm/deps/deno.land/std@0.208.0/path/posix/to_namespaced_path.js +10 -0
  80. package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/relative.js +2 -1
  81. package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/resolve.js +2 -1
  82. package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/to_file_url.js +2 -1
  83. package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/to_namespaced_path.js +2 -1
  84. package/esm/deps/deno.land/std@0.208.0/path/windows/_util.d.ts +3 -0
  85. package/esm/deps/deno.land/std@0.208.0/path/windows/_util.js +15 -0
  86. package/esm/deps/deno.land/std@0.208.0/path/windows/basename.d.ts +8 -0
  87. package/esm/deps/deno.land/std@0.208.0/path/windows/basename.js +30 -0
  88. package/esm/deps/deno.land/std@0.208.0/path/windows/common.d.ts +13 -0
  89. package/esm/deps/deno.land/std@0.208.0/path/windows/common.js +19 -0
  90. package/esm/deps/deno.land/std@0.208.0/path/windows/dirname.d.ts +5 -0
  91. package/esm/deps/deno.land/{std@0.201.0/path/_dirname.js → std@0.208.0/path/windows/dirname.js} +5 -39
  92. package/esm/deps/deno.land/std@0.208.0/path/windows/extname.d.ts +6 -0
  93. package/esm/deps/deno.land/{std@0.201.0/path/_extname.js → std@0.208.0/path/windows/extname.js} +4 -57
  94. package/esm/deps/deno.land/std@0.208.0/path/windows/format.d.ts +6 -0
  95. package/esm/deps/deno.land/std@0.208.0/path/windows/format.js +11 -0
  96. package/esm/deps/deno.land/{std@0.201.0/path/_from_file_url.d.ts → std@0.208.0/path/windows/from_file_url.d.ts} +1 -12
  97. package/esm/deps/deno.land/{std@0.201.0/path/_from_file_url.js → std@0.208.0/path/windows/from_file_url.js} +2 -22
  98. package/esm/deps/deno.land/std@0.208.0/path/windows/glob_to_regexp.d.ts +57 -0
  99. package/esm/deps/deno.land/std@0.208.0/path/windows/glob_to_regexp.js +69 -0
  100. package/esm/deps/deno.land/std@0.208.0/path/windows/is_absolute.d.ts +5 -0
  101. package/esm/deps/deno.land/{std@0.201.0/path/_is_absolute.js → std@0.208.0/path/windows/is_absolute.js} +4 -11
  102. package/esm/deps/deno.land/std@0.208.0/path/windows/is_glob.d.ts +1 -0
  103. package/esm/deps/deno.land/std@0.208.0/path/windows/is_glob.js +3 -0
  104. package/esm/deps/deno.land/std@0.208.0/path/windows/join.d.ts +5 -0
  105. package/esm/deps/deno.land/{std@0.201.0/path/_join.js → std@0.208.0/path/windows/join.js} +6 -27
  106. package/esm/deps/deno.land/std@0.208.0/path/windows/join_globs.d.ts +3 -0
  107. package/esm/deps/deno.land/std@0.208.0/path/windows/join_globs.js +26 -0
  108. package/esm/deps/deno.land/std@0.208.0/path/windows/mod.d.ts +40 -0
  109. package/esm/deps/deno.land/std@0.208.0/path/windows/mod.js +44 -0
  110. package/esm/deps/deno.land/std@0.208.0/path/windows/normalize.d.ts +7 -0
  111. package/esm/deps/deno.land/{std@0.201.0/path/_normalize.js → std@0.208.0/path/windows/normalize.js} +5 -28
  112. package/esm/deps/deno.land/std@0.208.0/path/windows/normalize_glob.d.ts +3 -0
  113. package/esm/deps/deno.land/std@0.208.0/path/windows/normalize_glob.js +16 -0
  114. package/esm/deps/deno.land/std@0.208.0/path/windows/parse.d.ts +6 -0
  115. package/esm/deps/deno.land/{std@0.201.0/path/_parse.js → std@0.208.0/path/windows/parse.js} +4 -95
  116. package/esm/deps/deno.land/{std@0.201.0/path/_relative.js → std@0.208.0/path/windows/relative.js} +6 -101
  117. package/esm/deps/deno.land/std@0.208.0/path/windows/resolve.d.ts +5 -0
  118. package/esm/deps/deno.land/{std@0.201.0/path/_resolve.js → std@0.208.0/path/windows/resolve.js} +6 -46
  119. package/esm/deps/deno.land/std@0.208.0/path/windows/separator.d.ts +2 -0
  120. package/esm/deps/deno.land/std@0.208.0/path/windows/separator.js +4 -0
  121. package/{script/deps/deno.land/std@0.201.0/path/_to_file_url.d.ts → esm/deps/deno.land/std@0.208.0/path/windows/to_file_url.d.ts} +1 -12
  122. package/esm/deps/deno.land/{std@0.201.0/path/_to_file_url.js → std@0.208.0/path/windows/to_file_url.js} +4 -34
  123. package/esm/deps/deno.land/std@0.208.0/path/windows/to_namespaced_path.d.ts +5 -0
  124. package/esm/deps/deno.land/{std@0.201.0/path/_to_namespaced_path.js → std@0.208.0/path/windows/to_namespaced_path.js} +4 -12
  125. package/esm/deps.d.ts +2 -2
  126. package/esm/deps.js +2 -2
  127. package/esm/mod.js +2 -2
  128. package/esm/src/environment.d.ts +5 -0
  129. package/esm/src/environment.js +50 -23
  130. package/esm/src/tokenizer.d.ts +7 -2
  131. package/esm/src/tokenizer.js +77 -66
  132. package/package.json +1 -1
  133. package/script/deps/deno.land/std@0.208.0/path/_common/assert_path.d.ts +1 -0
  134. package/script/deps/deno.land/std@0.208.0/path/_common/assert_path.js +11 -0
  135. package/script/deps/deno.land/std@0.208.0/path/_common/basename.d.ts +3 -0
  136. package/script/deps/deno.land/std@0.208.0/path/_common/basename.js +46 -0
  137. package/script/deps/deno.land/std@0.208.0/path/_common/common.d.ts +1 -0
  138. package/script/deps/deno.land/{std@0.201.0/path → std@0.208.0/path/_common}/common.js +3 -16
  139. package/script/deps/deno.land/std@0.208.0/path/_common/dirname.d.ts +1 -0
  140. package/script/deps/deno.land/std@0.208.0/path/_common/dirname.js +12 -0
  141. package/script/deps/deno.land/std@0.208.0/path/_common/format.d.ts +3 -0
  142. package/{esm/deps/deno.land/std@0.201.0/path/_format.js → script/deps/deno.land/std@0.208.0/path/_common/format.js} +5 -16
  143. package/script/deps/deno.land/std@0.208.0/path/_common/from_file_url.d.ts +2 -0
  144. package/script/deps/deno.land/std@0.208.0/path/_common/from_file_url.js +13 -0
  145. package/script/deps/deno.land/std@0.208.0/path/_common/glob_to_reg_exp.d.ts +27 -0
  146. package/script/deps/deno.land/{std@0.201.0/path/glob.js → std@0.208.0/path/_common/glob_to_reg_exp.js} +15 -167
  147. package/script/deps/deno.land/std@0.208.0/path/_common/normalize.d.ts +1 -0
  148. package/script/deps/deno.land/std@0.208.0/path/_common/normalize.js +12 -0
  149. package/script/deps/deno.land/std@0.208.0/path/_common/normalize_string.d.ts +1 -0
  150. package/script/deps/deno.land/{std@0.201.0/path/_util.js → std@0.208.0/path/_common/normalize_string.js} +6 -41
  151. package/script/deps/deno.land/std@0.208.0/path/_common/relative.d.ts +1 -0
  152. package/script/deps/deno.land/std@0.208.0/path/_common/relative.js +13 -0
  153. package/script/deps/deno.land/std@0.208.0/path/_common/strip_trailing_separators.d.ts +1 -0
  154. package/script/deps/deno.land/std@0.208.0/path/_common/strip_trailing_separators.js +23 -0
  155. package/script/deps/deno.land/std@0.208.0/path/_common/to_file_url.d.ts +1 -0
  156. package/script/deps/deno.land/std@0.208.0/path/_common/to_file_url.js +19 -0
  157. package/script/deps/deno.land/std@0.208.0/path/_os.d.ts +3 -0
  158. package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/_os.js +4 -4
  159. package/script/deps/deno.land/std@0.208.0/path/basename.d.ts +8 -0
  160. package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/basename.js +4 -3
  161. package/script/deps/deno.land/std@0.208.0/path/common.d.ts +13 -0
  162. package/script/deps/deno.land/std@0.208.0/path/common.js +23 -0
  163. package/script/deps/deno.land/std@0.208.0/path/dirname.d.ts +5 -0
  164. package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/dirname.js +3 -2
  165. package/script/deps/deno.land/std@0.208.0/path/extname.d.ts +6 -0
  166. package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/extname.js +3 -2
  167. package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/format.js +3 -2
  168. package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/from_file_url.js +3 -2
  169. package/script/deps/deno.land/{std@0.201.0/path/glob.d.ts → std@0.208.0/path/glob_to_regexp.d.ts} +5 -27
  170. package/script/deps/deno.land/std@0.208.0/path/glob_to_regexp.js +69 -0
  171. package/script/deps/deno.land/std@0.208.0/path/is_absolute.d.ts +5 -0
  172. package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/is_absolute.js +3 -2
  173. package/script/deps/deno.land/std@0.208.0/path/is_glob.d.ts +2 -0
  174. package/script/deps/deno.land/std@0.208.0/path/is_glob.js +32 -0
  175. package/script/deps/deno.land/std@0.208.0/path/join.d.ts +5 -0
  176. package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/join.js +3 -2
  177. package/script/deps/deno.land/std@0.208.0/path/join_globs.d.ts +3 -0
  178. package/script/deps/deno.land/std@0.208.0/path/join_globs.js +15 -0
  179. package/{esm/deps/deno.land/std@0.201.0 → script/deps/deno.land/std@0.208.0}/path/mod.d.ts +10 -4
  180. package/script/deps/deno.land/std@0.208.0/path/mod.js +92 -0
  181. package/script/deps/deno.land/std@0.208.0/path/normalize.d.ts +7 -0
  182. package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/normalize.js +3 -2
  183. package/script/deps/deno.land/std@0.208.0/path/normalize_glob.d.ts +3 -0
  184. package/script/deps/deno.land/std@0.208.0/path/normalize_glob.js +15 -0
  185. package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/parse.js +3 -2
  186. package/script/deps/deno.land/std@0.208.0/path/posix/_util.d.ts +1 -0
  187. package/script/deps/deno.land/std@0.208.0/path/posix/_util.js +12 -0
  188. package/script/deps/deno.land/std@0.208.0/path/posix/basename.d.ts +8 -0
  189. package/script/deps/deno.land/std@0.208.0/path/posix/basename.js +22 -0
  190. package/script/deps/deno.land/std@0.208.0/path/posix/common.d.ts +13 -0
  191. package/script/deps/deno.land/std@0.208.0/path/posix/common.js +23 -0
  192. package/script/deps/deno.land/std@0.208.0/path/posix/dirname.d.ts +5 -0
  193. package/script/deps/deno.land/std@0.208.0/path/posix/dirname.js +40 -0
  194. package/script/deps/deno.land/std@0.208.0/path/posix/extname.d.ts +6 -0
  195. package/script/deps/deno.land/std@0.208.0/path/posix/extname.js +63 -0
  196. package/script/deps/deno.land/std@0.208.0/path/posix/format.d.ts +6 -0
  197. package/script/deps/deno.land/std@0.208.0/path/posix/format.js +15 -0
  198. package/script/deps/deno.land/std@0.208.0/path/posix/from_file_url.d.ts +12 -0
  199. package/script/deps/deno.land/std@0.208.0/path/posix/from_file_url.js +21 -0
  200. package/script/deps/deno.land/std@0.208.0/path/posix/glob_to_regexp.d.ts +57 -0
  201. package/script/deps/deno.land/std@0.208.0/path/posix/glob_to_regexp.js +73 -0
  202. package/script/deps/deno.land/std@0.208.0/path/posix/is_absolute.d.ts +5 -0
  203. package/script/deps/deno.land/std@0.208.0/path/posix/is_absolute.js +16 -0
  204. package/script/deps/deno.land/std@0.208.0/path/posix/is_glob.d.ts +1 -0
  205. package/script/deps/deno.land/std@0.208.0/path/posix/is_glob.js +7 -0
  206. package/script/deps/deno.land/std@0.208.0/path/posix/join.d.ts +5 -0
  207. package/script/deps/deno.land/std@0.208.0/path/posix/join.js +30 -0
  208. package/script/deps/deno.land/std@0.208.0/path/posix/join_globs.d.ts +3 -0
  209. package/script/deps/deno.land/std@0.208.0/path/posix/join_globs.js +30 -0
  210. package/script/deps/deno.land/std@0.208.0/path/posix/mod.d.ts +40 -0
  211. package/script/deps/deno.land/{std@0.201.0/path → std@0.208.0/path/posix}/mod.js +8 -21
  212. package/script/deps/deno.land/std@0.208.0/path/posix/normalize.d.ts +7 -0
  213. package/script/deps/deno.land/std@0.208.0/path/posix/normalize.js +29 -0
  214. package/script/deps/deno.land/std@0.208.0/path/posix/normalize_glob.d.ts +3 -0
  215. package/script/deps/deno.land/std@0.208.0/path/posix/normalize_glob.js +20 -0
  216. package/script/deps/deno.land/std@0.208.0/path/posix/parse.d.ts +6 -0
  217. package/script/deps/deno.land/std@0.208.0/path/posix/parse.js +102 -0
  218. package/script/deps/deno.land/std@0.208.0/path/posix/relative.d.ts +7 -0
  219. package/script/deps/deno.land/std@0.208.0/path/posix/relative.js +98 -0
  220. package/script/deps/deno.land/std@0.208.0/path/posix/resolve.d.ts +5 -0
  221. package/script/deps/deno.land/std@0.208.0/path/posix/resolve.js +75 -0
  222. package/script/deps/deno.land/std@0.208.0/path/posix/separator.d.ts +2 -0
  223. package/script/deps/deno.land/std@0.208.0/path/posix/separator.js +7 -0
  224. package/script/deps/deno.land/std@0.208.0/path/posix/to_file_url.d.ts +12 -0
  225. package/script/deps/deno.land/std@0.208.0/path/posix/to_file_url.js +26 -0
  226. package/script/deps/deno.land/std@0.208.0/path/posix/to_namespaced_path.d.ts +5 -0
  227. package/script/deps/deno.land/std@0.208.0/path/posix/to_namespaced_path.js +14 -0
  228. package/script/deps/deno.land/{std@0.201.0/path/_relative.d.ts → std@0.208.0/path/relative.d.ts} +1 -8
  229. package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/relative.js +3 -2
  230. package/script/deps/deno.land/std@0.208.0/path/resolve.d.ts +5 -0
  231. package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/resolve.js +4 -3
  232. package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/to_file_url.js +3 -2
  233. package/script/deps/deno.land/std@0.208.0/path/to_namespaced_path.d.ts +5 -0
  234. package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/to_namespaced_path.js +4 -3
  235. package/script/deps/deno.land/std@0.208.0/path/windows/_util.d.ts +3 -0
  236. package/script/deps/deno.land/std@0.208.0/path/windows/_util.js +21 -0
  237. package/script/deps/deno.land/std@0.208.0/path/windows/basename.d.ts +8 -0
  238. package/script/deps/deno.land/std@0.208.0/path/windows/basename.js +34 -0
  239. package/script/deps/deno.land/std@0.208.0/path/windows/common.d.ts +13 -0
  240. package/script/deps/deno.land/std@0.208.0/path/windows/common.js +23 -0
  241. package/script/deps/deno.land/std@0.208.0/path/windows/dirname.d.ts +5 -0
  242. package/script/deps/deno.land/{std@0.201.0/path/_dirname.js → std@0.208.0/path/windows/dirname.js} +9 -44
  243. package/script/deps/deno.land/std@0.208.0/path/windows/extname.d.ts +6 -0
  244. package/script/deps/deno.land/{std@0.201.0/path/_extname.js → std@0.208.0/path/windows/extname.js} +8 -62
  245. package/script/deps/deno.land/std@0.208.0/path/windows/format.d.ts +6 -0
  246. package/script/deps/deno.land/std@0.208.0/path/windows/format.js +15 -0
  247. package/script/deps/deno.land/{std@0.201.0/path/_from_file_url.d.ts → std@0.208.0/path/windows/from_file_url.d.ts} +1 -12
  248. package/script/deps/deno.land/{std@0.201.0/path/_from_file_url.js → std@0.208.0/path/windows/from_file_url.js} +5 -26
  249. package/script/deps/deno.land/std@0.208.0/path/windows/glob_to_regexp.d.ts +57 -0
  250. package/script/deps/deno.land/std@0.208.0/path/windows/glob_to_regexp.js +73 -0
  251. package/script/deps/deno.land/std@0.208.0/path/windows/is_absolute.d.ts +5 -0
  252. package/script/deps/deno.land/{std@0.201.0/path/_is_absolute.js → std@0.208.0/path/windows/is_absolute.js} +7 -15
  253. package/script/deps/deno.land/std@0.208.0/path/windows/is_glob.d.ts +1 -0
  254. package/script/deps/deno.land/std@0.208.0/path/windows/is_glob.js +7 -0
  255. package/script/deps/deno.land/std@0.208.0/path/windows/join.d.ts +5 -0
  256. package/script/deps/deno.land/{std@0.201.0/path/_join.js → std@0.208.0/path/windows/join.js} +8 -30
  257. package/script/deps/deno.land/std@0.208.0/path/windows/join_globs.d.ts +3 -0
  258. package/script/deps/deno.land/std@0.208.0/path/windows/join_globs.js +30 -0
  259. package/script/deps/deno.land/std@0.208.0/path/windows/mod.d.ts +40 -0
  260. package/script/deps/deno.land/std@0.208.0/path/windows/mod.js +61 -0
  261. package/script/deps/deno.land/std@0.208.0/path/windows/normalize.d.ts +7 -0
  262. package/script/deps/deno.land/{std@0.201.0/path/_normalize.js → std@0.208.0/path/windows/normalize.js} +9 -33
  263. package/script/deps/deno.land/std@0.208.0/path/windows/normalize_glob.d.ts +3 -0
  264. package/script/deps/deno.land/std@0.208.0/path/windows/normalize_glob.js +20 -0
  265. package/script/deps/deno.land/std@0.208.0/path/windows/parse.d.ts +6 -0
  266. package/script/deps/deno.land/{std@0.201.0/path/_parse.js → std@0.208.0/path/windows/parse.js} +8 -100
  267. package/script/deps/deno.land/std@0.208.0/path/windows/relative.d.ts +12 -0
  268. package/script/deps/deno.land/std@0.208.0/path/windows/relative.js +125 -0
  269. package/script/deps/deno.land/std@0.208.0/path/windows/resolve.d.ts +5 -0
  270. package/script/deps/deno.land/{std@0.201.0/path/_resolve.js → std@0.208.0/path/windows/resolve.js} +10 -51
  271. package/script/deps/deno.land/std@0.208.0/path/windows/separator.d.ts +2 -0
  272. package/script/deps/deno.land/std@0.208.0/path/windows/separator.js +7 -0
  273. package/{esm/deps/deno.land/std@0.201.0/path/_to_file_url.d.ts → script/deps/deno.land/std@0.208.0/path/windows/to_file_url.d.ts} +1 -12
  274. package/script/deps/deno.land/std@0.208.0/path/windows/to_file_url.js +35 -0
  275. package/script/deps/deno.land/std@0.208.0/path/windows/to_namespaced_path.d.ts +5 -0
  276. package/script/deps/deno.land/{std@0.201.0/path/_to_namespaced_path.js → std@0.208.0/path/windows/to_namespaced_path.js} +11 -20
  277. package/script/deps.d.ts +2 -2
  278. package/script/deps.js +2 -2
  279. package/script/mod.js +2 -2
  280. package/script/src/environment.d.ts +5 -0
  281. package/script/src/environment.js +52 -24
  282. package/script/src/tokenizer.d.ts +7 -2
  283. package/script/src/tokenizer.js +77 -66
  284. package/esm/deps/deno.land/std@0.201.0/path/_basename.d.ts +0 -16
  285. package/esm/deps/deno.land/std@0.201.0/path/_basename.js +0 -78
  286. package/esm/deps/deno.land/std@0.201.0/path/_dirname.d.ts +0 -10
  287. package/esm/deps/deno.land/std@0.201.0/path/_extname.d.ts +0 -12
  288. package/esm/deps/deno.land/std@0.201.0/path/_format.d.ts +0 -11
  289. package/esm/deps/deno.land/std@0.201.0/path/_is_absolute.d.ts +0 -10
  290. package/esm/deps/deno.land/std@0.201.0/path/_join.d.ts +0 -10
  291. package/esm/deps/deno.land/std@0.201.0/path/_normalize.d.ts +0 -14
  292. package/esm/deps/deno.land/std@0.201.0/path/_os.d.ts +0 -4
  293. package/esm/deps/deno.land/std@0.201.0/path/_parse.d.ts +0 -11
  294. package/esm/deps/deno.land/std@0.201.0/path/_relative.d.ts +0 -19
  295. package/esm/deps/deno.land/std@0.201.0/path/_resolve.d.ts +0 -10
  296. package/esm/deps/deno.land/std@0.201.0/path/_to_namespaced_path.d.ts +0 -10
  297. package/esm/deps/deno.land/std@0.201.0/path/_util.d.ts +0 -6
  298. package/esm/deps/deno.land/std@0.201.0/path/posix.d.ts +0 -15
  299. package/esm/deps/deno.land/std@0.201.0/path/posix.js +0 -19
  300. package/esm/deps/deno.land/std@0.201.0/path/win32.d.ts +0 -15
  301. package/esm/deps/deno.land/std@0.201.0/path/win32.js +0 -19
  302. package/script/deps/deno.land/std@0.201.0/path/_basename.d.ts +0 -16
  303. package/script/deps/deno.land/std@0.201.0/path/_basename.js +0 -83
  304. package/script/deps/deno.land/std@0.201.0/path/_dirname.d.ts +0 -10
  305. package/script/deps/deno.land/std@0.201.0/path/_extname.d.ts +0 -12
  306. package/script/deps/deno.land/std@0.201.0/path/_format.d.ts +0 -11
  307. package/script/deps/deno.land/std@0.201.0/path/_format.js +0 -40
  308. package/script/deps/deno.land/std@0.201.0/path/_is_absolute.d.ts +0 -10
  309. package/script/deps/deno.land/std@0.201.0/path/_join.d.ts +0 -10
  310. package/script/deps/deno.land/std@0.201.0/path/_normalize.d.ts +0 -14
  311. package/script/deps/deno.land/std@0.201.0/path/_os.d.ts +0 -4
  312. package/script/deps/deno.land/std@0.201.0/path/_parse.d.ts +0 -11
  313. package/script/deps/deno.land/std@0.201.0/path/_relative.js +0 -221
  314. package/script/deps/deno.land/std@0.201.0/path/_resolve.d.ts +0 -10
  315. package/script/deps/deno.land/std@0.201.0/path/_to_file_url.js +0 -66
  316. package/script/deps/deno.land/std@0.201.0/path/_to_namespaced_path.d.ts +0 -10
  317. package/script/deps/deno.land/std@0.201.0/path/_util.d.ts +0 -6
  318. package/script/deps/deno.land/std@0.201.0/path/posix.d.ts +0 -15
  319. package/script/deps/deno.land/std@0.201.0/path/posix.js +0 -35
  320. package/script/deps/deno.land/std@0.201.0/path/win32.d.ts +0 -15
  321. package/script/deps/deno.land/std@0.201.0/path/win32.js +0 -35
  322. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/assert/assert.d.ts +0 -0
  323. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/assert/assert.js +0 -0
  324. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/assert/assertion_error.d.ts +0 -0
  325. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/assert/assertion_error.js +0 -0
  326. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/html/entities.d.ts +0 -0
  327. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/html/entities.js +0 -0
  328. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/html/mod.d.ts +0 -0
  329. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/html/mod.js +0 -0
  330. /package/esm/deps/deno.land/{std@0.201.0/path/_constants.d.ts → std@0.208.0/path/_common/constants.d.ts} +0 -0
  331. /package/esm/deps/deno.land/{std@0.201.0/path/_constants.js → std@0.208.0/path/_common/constants.js} +0 -0
  332. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/_interface.d.ts +0 -0
  333. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/_interface.js +0 -0
  334. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/basename.d.ts +0 -0
  335. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/common.d.ts +0 -0
  336. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/dirname.d.ts +0 -0
  337. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/extname.d.ts +0 -0
  338. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/format.d.ts +0 -0
  339. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/from_file_url.d.ts +0 -0
  340. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/is_absolute.d.ts +0 -0
  341. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/join.d.ts +0 -0
  342. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/normalize.d.ts +0 -0
  343. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/parse.d.ts +0 -0
  344. /package/{script/deps/deno.land/std@0.201.0/path → esm/deps/deno.land/std@0.208.0/path/posix}/basename.d.ts +0 -0
  345. /package/{script/deps/deno.land/std@0.201.0/path → esm/deps/deno.land/std@0.208.0/path/posix}/common.d.ts +0 -0
  346. /package/{script/deps/deno.land/std@0.201.0/path → esm/deps/deno.land/std@0.208.0/path/posix}/dirname.d.ts +0 -0
  347. /package/{script/deps/deno.land/std@0.201.0/path → esm/deps/deno.land/std@0.208.0/path/posix}/extname.d.ts +0 -0
  348. /package/{script/deps/deno.land/std@0.201.0/path → esm/deps/deno.land/std@0.208.0/path/posix}/is_absolute.d.ts +0 -0
  349. /package/{script/deps/deno.land/std@0.201.0/path → esm/deps/deno.land/std@0.208.0/path/posix}/join.d.ts +0 -0
  350. /package/{script/deps/deno.land/std@0.201.0/path → esm/deps/deno.land/std@0.208.0/path/posix}/normalize.d.ts +0 -0
  351. /package/esm/deps/deno.land/{std@0.201.0/path → std@0.208.0/path/posix}/resolve.d.ts +0 -0
  352. /package/esm/deps/deno.land/{std@0.201.0/path → std@0.208.0/path/posix}/to_namespaced_path.d.ts +0 -0
  353. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/relative.d.ts +0 -0
  354. /package/{script/deps/deno.land/std@0.201.0 → esm/deps/deno.land/std@0.208.0}/path/resolve.d.ts +0 -0
  355. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/separator.d.ts +0 -0
  356. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/separator.js +0 -0
  357. /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/to_file_url.d.ts +0 -0
  358. /package/{script/deps/deno.land/std@0.201.0 → esm/deps/deno.land/std@0.208.0}/path/to_namespaced_path.d.ts +0 -0
  359. /package/{script/deps/deno.land/std@0.201.0/path → esm/deps/deno.land/std@0.208.0/path/windows}/relative.d.ts +0 -0
  360. /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/assert/assert.d.ts +0 -0
  361. /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/assert/assert.js +0 -0
  362. /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/assert/assertion_error.d.ts +0 -0
  363. /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/assert/assertion_error.js +0 -0
  364. /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/html/entities.d.ts +0 -0
  365. /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/html/entities.js +0 -0
  366. /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/html/mod.d.ts +0 -0
  367. /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/html/mod.js +0 -0
  368. /package/script/deps/deno.land/{std@0.201.0/path/_constants.d.ts → std@0.208.0/path/_common/constants.d.ts} +0 -0
  369. /package/script/deps/deno.land/{std@0.201.0/path/_constants.js → std@0.208.0/path/_common/constants.js} +0 -0
  370. /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/_interface.d.ts +0 -0
  371. /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/_interface.js +0 -0
  372. /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/format.d.ts +0 -0
  373. /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/from_file_url.d.ts +0 -0
  374. /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/parse.d.ts +0 -0
  375. /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/separator.d.ts +0 -0
  376. /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/separator.js +0 -0
  377. /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/to_file_url.d.ts +0 -0
@@ -0,0 +1 @@
1
+ export declare function assertPath(path: string): void;
@@ -0,0 +1,7 @@
1
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
+ // Copyright the Browserify authors. MIT License.
3
+ export function assertPath(path) {
4
+ if (typeof path !== "string") {
5
+ throw new TypeError(`Path must be a string. Received ${JSON.stringify(path)}`);
6
+ }
7
+ }
@@ -0,0 +1,3 @@
1
+ export declare function stripSuffix(name: string, suffix: string): string;
2
+ export declare function lastPathSegment(path: string, isSep: (char: number) => boolean, start?: number): string;
3
+ export declare function assertArgs(path: string, suffix: string): string | undefined;
@@ -0,0 +1,40 @@
1
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { assertPath } from "./assert_path.js";
4
+ export function stripSuffix(name, suffix) {
5
+ if (suffix.length >= name.length) {
6
+ return name;
7
+ }
8
+ const lenDiff = name.length - suffix.length;
9
+ for (let i = suffix.length - 1; i >= 0; --i) {
10
+ if (name.charCodeAt(lenDiff + i) !== suffix.charCodeAt(i)) {
11
+ return name;
12
+ }
13
+ }
14
+ return name.slice(0, -suffix.length);
15
+ }
16
+ export function lastPathSegment(path, isSep, start = 0) {
17
+ let matchedNonSeparator = false;
18
+ let end = path.length;
19
+ for (let i = path.length - 1; i >= start; --i) {
20
+ if (isSep(path.charCodeAt(i))) {
21
+ if (matchedNonSeparator) {
22
+ start = i + 1;
23
+ break;
24
+ }
25
+ }
26
+ else if (!matchedNonSeparator) {
27
+ matchedNonSeparator = true;
28
+ end = i + 1;
29
+ }
30
+ }
31
+ return path.slice(start, end);
32
+ }
33
+ export function assertArgs(path, suffix) {
34
+ assertPath(path);
35
+ if (path.length === 0)
36
+ return path;
37
+ if (typeof suffix !== "string") {
38
+ throw new TypeError(`Suffix must be a string. Received ${JSON.stringify(suffix)}`);
39
+ }
40
+ }
@@ -0,0 +1 @@
1
+ export declare function _common(paths: string[], sep: string): string;
@@ -1,19 +1,6 @@
1
1
  // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
2
  // This module is browser compatible.
3
- import { SEP } from "./separator.js";
4
- /** Determines the common path from a set of paths, using an optional separator,
5
- * which defaults to the OS default separator.
6
- *
7
- * ```ts
8
- * import { common } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
9
- * const p = common([
10
- * "./deno/std/path/mod.ts",
11
- * "./deno/std/fs/mod.ts",
12
- * ]);
13
- * console.log(p); // "./deno/std/"
14
- * ```
15
- */
16
- export function common(paths, sep = SEP) {
3
+ export function _common(paths, sep) {
17
4
  const [first = "", ...remaining] = paths;
18
5
  if (first === "" || remaining.length === 0) {
19
6
  return first.substring(0, first.lastIndexOf(sep) + 1);
@@ -0,0 +1 @@
1
+ export declare function assertArg(path: string): "." | undefined;
@@ -0,0 +1,8 @@
1
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { assertPath } from "./assert_path.js";
4
+ export function assertArg(path) {
5
+ assertPath(path);
6
+ if (path.length === 0)
7
+ return ".";
8
+ }
@@ -0,0 +1,3 @@
1
+ import type { FormatInputPathObject } from "../_interface.js";
2
+ export declare function _format(sep: string, pathObject: FormatInputPathObject): string;
3
+ export declare function assertArg(pathObject: FormatInputPathObject): void;
@@ -0,0 +1,19 @@
1
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ export function _format(sep, pathObject) {
4
+ const dir = pathObject.dir || pathObject.root;
5
+ const base = pathObject.base ||
6
+ (pathObject.name || "") + (pathObject.ext || "");
7
+ if (!dir)
8
+ return base;
9
+ if (base === sep)
10
+ return dir;
11
+ if (dir === pathObject.root)
12
+ return dir + base;
13
+ return dir + sep + base;
14
+ }
15
+ export function assertArg(pathObject) {
16
+ if (pathObject === null || typeof pathObject !== "object") {
17
+ throw new TypeError(`The "pathObject" argument must be of type Object. Received type ${typeof pathObject}`);
18
+ }
19
+ }
@@ -0,0 +1,2 @@
1
+ /// <reference types="node" />
2
+ export declare function assertArg(url: URL | string): URL;
@@ -0,0 +1,9 @@
1
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ export function assertArg(url) {
4
+ url = url instanceof URL ? url : new URL(url);
5
+ if (url.protocol !== "file:") {
6
+ throw new TypeError("Must be a file URL.");
7
+ }
8
+ return url;
9
+ }
@@ -0,0 +1,27 @@
1
+ export interface GlobOptions {
2
+ /** Extended glob syntax.
3
+ * See https://www.linuxjournal.com/content/bash-extended-globbing.
4
+ *
5
+ * @default {true}
6
+ */
7
+ extended?: boolean;
8
+ /** Globstar syntax.
9
+ * See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
10
+ * If false, `**` is treated like `*`.
11
+ *
12
+ * @default {true}
13
+ */
14
+ globstar?: boolean;
15
+ /** Whether globstar should be case-insensitive. */
16
+ caseInsensitive?: boolean;
17
+ }
18
+ export type GlobToRegExpOptions = GlobOptions;
19
+ export interface GlobConstants {
20
+ sep: string;
21
+ sepMaybe: string;
22
+ seps: string[];
23
+ globstar: string;
24
+ wildcard: string;
25
+ escapePrefix: string;
26
+ }
27
+ export declare function _globToRegExp(c: GlobConstants, glob: string, { extended, globstar: globstarOption, caseInsensitive, }?: GlobToRegExpOptions): RegExp;
@@ -1,11 +1,5 @@
1
1
  // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
2
  // This module is browser compatible.
3
- import { isWindows, osType } from "./_os.js";
4
- import { SEP, SEP_PATTERN } from "./separator.js";
5
- import * as _win32 from "./win32.js";
6
- import * as _posix from "./posix.js";
7
- const path = isWindows ? _win32 : _posix;
8
- const { join, normalize } = path;
9
3
  const regExpEscapeChars = [
10
4
  "!",
11
5
  "$",
@@ -23,76 +17,15 @@ const regExpEscapeChars = [
23
17
  "|",
24
18
  ];
25
19
  const rangeEscapeChars = ["-", "\\", "]"];
26
- /** Convert a glob string to a regular expression.
27
- *
28
- * Tries to match bash glob expansion as closely as possible.
29
- *
30
- * Basic glob syntax:
31
- * - `*` - Matches everything without leaving the path segment.
32
- * - `?` - Matches any single character.
33
- * - `{foo,bar}` - Matches `foo` or `bar`.
34
- * - `[abcd]` - Matches `a`, `b`, `c` or `d`.
35
- * - `[a-d]` - Matches `a`, `b`, `c` or `d`.
36
- * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`.
37
- * - `[[:<class>:]]` - Matches any character belonging to `<class>`.
38
- * - `[[:alnum:]]` - Matches any digit or letter.
39
- * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`.
40
- * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes
41
- * for a complete list of supported character classes.
42
- * - `\` - Escapes the next character for an `os` other than `"windows"`.
43
- * - \` - Escapes the next character for `os` set to `"windows"`.
44
- * - `/` - Path separator.
45
- * - `\` - Additional path separator only for `os` set to `"windows"`.
46
- *
47
- * Extended syntax:
48
- * - Requires `{ extended: true }`.
49
- * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`.
50
- * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same.
51
- * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`.
52
- * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`.
53
- * - `!(foo|bar)` - Matches anything other than `{foo,bar}`.
54
- * - See https://www.linuxjournal.com/content/bash-extended-globbing.
55
- *
56
- * Globstar syntax:
57
- * - Requires `{ globstar: true }`.
58
- * - `**` - Matches any number of any path segments.
59
- * - Must comprise its entire path segment in the provided glob.
60
- * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
61
- *
62
- * Note the following properties:
63
- * - The generated `RegExp` is anchored at both start and end.
64
- * - Repeating and trailing separators are tolerated. Trailing separators in the
65
- * provided glob have no meaning and are discarded.
66
- * - Absolute globs will only match absolute paths, etc.
67
- * - Empty globs will match nothing.
68
- * - Any special glob syntax must be contained to one path segment. For example,
69
- * `?(foo|bar/baz)` is invalid. The separator will take precedence and the
70
- * first segment ends with an unclosed group.
71
- * - If a path segment ends with unclosed groups or a dangling escape prefix, a
72
- * parse error has occurred. Every character for that segment is taken
73
- * literally in this event.
74
- *
75
- * Limitations:
76
- * - A negative group like `!(foo|bar)` will wrongly be converted to a negative
77
- * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly
78
- * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively,
79
- * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if
80
- * the group occurs not nested at the end of the segment. */
81
- export function globToRegExp(glob, { extended = true, globstar: globstarOption = true, os = osType, caseInsensitive = false, } = {}) {
20
+ export function _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true,
21
+ // os = osType,
22
+ caseInsensitive = false, } = {}) {
82
23
  if (glob === "") {
83
24
  return /(?!)/;
84
25
  }
85
- const sep = os === "windows" ? "(?:\\\\|/)+" : "/+";
86
- const sepMaybe = os === "windows" ? "(?:\\\\|/)*" : "/*";
87
- const seps = os === "windows" ? ["\\", "/"] : ["/"];
88
- const globstar = os === "windows"
89
- ? "(?:[^\\\\/]*(?:\\\\|/|$)+)*"
90
- : "(?:[^/]*(?:/|$)+)*";
91
- const wildcard = os === "windows" ? "[^\\\\/]*" : "[^/]*";
92
- const escapePrefix = os === "windows" ? "`" : "\\";
93
26
  // Remove trailing separators.
94
27
  let newLength = glob.length;
95
- for (; newLength > 1 && seps.includes(glob[newLength - 1]); newLength--)
28
+ for (; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--)
96
29
  ;
97
30
  glob = glob.slice(0, newLength);
98
31
  let regExpString = "";
@@ -105,14 +38,14 @@ export function globToRegExp(glob, { extended = true, globstar: globstarOption =
105
38
  let endsWithSep = false;
106
39
  let i = j;
107
40
  // Terminates with `i` at the non-inclusive end of the current segment.
108
- for (; i < glob.length && !seps.includes(glob[i]); i++) {
41
+ for (; i < glob.length && !c.seps.includes(glob[i]); i++) {
109
42
  if (inEscape) {
110
43
  inEscape = false;
111
44
  const escapeChars = inRange ? rangeEscapeChars : regExpEscapeChars;
112
45
  segment += escapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i];
113
46
  continue;
114
47
  }
115
- if (glob[i] === escapePrefix) {
48
+ if (glob[i] === c.escapePrefix) {
116
49
  inEscape = true;
117
50
  continue;
118
51
  }
@@ -191,7 +124,7 @@ export function globToRegExp(glob, { extended = true, globstar: globstarOption =
191
124
  segment += ")";
192
125
  const type = groupStack.pop();
193
126
  if (type === "!") {
194
- segment += wildcard;
127
+ segment += c.wildcard;
195
128
  }
196
129
  else if (type !== "@") {
197
130
  segment += type;
@@ -261,13 +194,13 @@ export function globToRegExp(glob, { extended = true, globstar: globstarOption =
261
194
  }
262
195
  const nextChar = glob[i + 1];
263
196
  if (globstarOption && numStars === 2 &&
264
- [...seps, undefined].includes(prevChar) &&
265
- [...seps, undefined].includes(nextChar)) {
266
- segment += globstar;
197
+ [...c.seps, undefined].includes(prevChar) &&
198
+ [...c.seps, undefined].includes(nextChar)) {
199
+ segment += c.globstar;
267
200
  endsWithSep = true;
268
201
  }
269
202
  else {
270
- segment += wildcard;
203
+ segment += c.wildcard;
271
204
  }
272
205
  }
273
206
  continue;
@@ -285,11 +218,11 @@ export function globToRegExp(glob, { extended = true, globstar: globstarOption =
285
218
  }
286
219
  regExpString += segment;
287
220
  if (!endsWithSep) {
288
- regExpString += i < glob.length ? sep : sepMaybe;
221
+ regExpString += i < glob.length ? c.sep : c.sepMaybe;
289
222
  endsWithSep = true;
290
223
  }
291
224
  // Terminates with `i` at the start of the next segment.
292
- while (seps.includes(glob[i]))
225
+ while (c.seps.includes(glob[i]))
293
226
  i++;
294
227
  // Check that the next value of `j` is indeed higher than the current value.
295
228
  if (!(i > j)) {
@@ -300,62 +233,3 @@ export function globToRegExp(glob, { extended = true, globstar: globstarOption =
300
233
  regExpString = `^${regExpString}$`;
301
234
  return new RegExp(regExpString, caseInsensitive ? "i" : "");
302
235
  }
303
- /** Test whether the given string is a glob */
304
- export function isGlob(str) {
305
- const chars = { "{": "}", "(": ")", "[": "]" };
306
- const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
307
- if (str === "") {
308
- return false;
309
- }
310
- let match;
311
- while ((match = regex.exec(str))) {
312
- if (match[2])
313
- return true;
314
- let idx = match.index + match[0].length;
315
- // if an open bracket/brace/paren is escaped,
316
- // set the index to the next closing character
317
- const open = match[1];
318
- const close = open ? chars[open] : null;
319
- if (open && close) {
320
- const n = str.indexOf(close, idx);
321
- if (n !== -1) {
322
- idx = n + 1;
323
- }
324
- }
325
- str = str.slice(idx);
326
- }
327
- return false;
328
- }
329
- /** Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. */
330
- export function normalizeGlob(glob, { globstar = false } = {}) {
331
- if (glob.match(/\0/g)) {
332
- throw new Error(`Glob contains invalid characters: "${glob}"`);
333
- }
334
- if (!globstar) {
335
- return normalize(glob);
336
- }
337
- const s = SEP_PATTERN.source;
338
- const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g");
339
- return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, "..");
340
- }
341
- /** Like join(), but doesn't collapse "**\/.." when `globstar` is true. */
342
- export function joinGlobs(globs, { extended = true, globstar = false } = {}) {
343
- if (!globstar || globs.length === 0) {
344
- return join(...globs);
345
- }
346
- if (globs.length === 0)
347
- return ".";
348
- let joined;
349
- for (const glob of globs) {
350
- const path = glob;
351
- if (path.length > 0) {
352
- if (!joined)
353
- joined = path;
354
- else
355
- joined += `${SEP}${path}`;
356
- }
357
- }
358
- if (!joined)
359
- return ".";
360
- return normalizeGlob(joined, { extended, globstar });
361
- }
@@ -0,0 +1 @@
1
+ export declare function assertArg(path: string): "." | undefined;
@@ -0,0 +1,8 @@
1
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { assertPath } from "./assert_path.js";
4
+ export function assertArg(path) {
5
+ assertPath(path);
6
+ if (path.length === 0)
7
+ return ".";
8
+ }
@@ -0,0 +1 @@
1
+ export declare function normalizeString(path: string, allowAboveRoot: boolean, separator: string, isPathSeparator: (code: number) => boolean): string;
@@ -2,22 +2,7 @@
2
2
  // Copyright the Browserify authors. MIT License.
3
3
  // Ported from https://github.com/browserify/path-browserify/
4
4
  // This module is browser compatible.
5
- import { CHAR_BACKWARD_SLASH, CHAR_DOT, CHAR_FORWARD_SLASH, CHAR_LOWERCASE_A, CHAR_LOWERCASE_Z, CHAR_UPPERCASE_A, CHAR_UPPERCASE_Z, } from "./_constants.js";
6
- export function assertPath(path) {
7
- if (typeof path !== "string") {
8
- throw new TypeError(`Path must be a string. Received ${JSON.stringify(path)}`);
9
- }
10
- }
11
- export function isPosixPathSeparator(code) {
12
- return code === CHAR_FORWARD_SLASH;
13
- }
14
- export function isPathSeparator(code) {
15
- return isPosixPathSeparator(code) || code === CHAR_BACKWARD_SLASH;
16
- }
17
- export function isWindowsDeviceRoot(code) {
18
- return ((code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z) ||
19
- (code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z));
20
- }
5
+ import { CHAR_DOT, CHAR_FORWARD_SLASH } from "./constants.js";
21
6
  // Resolves . and .. elements in a path with directory names
22
7
  export function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
23
8
  let res = "";
@@ -90,18 +75,3 @@ export function normalizeString(path, allowAboveRoot, separator, isPathSeparator
90
75
  }
91
76
  return res;
92
77
  }
93
- export function stripTrailingSeparators(segment, isSep) {
94
- if (segment.length <= 1) {
95
- return segment;
96
- }
97
- let end = segment.length;
98
- for (let i = segment.length - 1; i > 0; i--) {
99
- if (isSep(segment.charCodeAt(i))) {
100
- end = i;
101
- }
102
- else {
103
- break;
104
- }
105
- }
106
- return segment.slice(0, end);
107
- }
@@ -0,0 +1 @@
1
+ export declare function assertArgs(from: string, to: string): "" | undefined;
@@ -0,0 +1,9 @@
1
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { assertPath } from "./assert_path.js";
4
+ export function assertArgs(from, to) {
5
+ assertPath(from);
6
+ assertPath(to);
7
+ if (from === to)
8
+ return "";
9
+ }
@@ -0,0 +1 @@
1
+ export declare function stripTrailingSeparators(segment: string, isSep: (char: number) => boolean): string;
@@ -0,0 +1,19 @@
1
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
+ // Copyright the Browserify authors. MIT License.
3
+ // Ported from https://github.com/browserify/path-browserify/
4
+ // This module is browser compatible.
5
+ export function stripTrailingSeparators(segment, isSep) {
6
+ if (segment.length <= 1) {
7
+ return segment;
8
+ }
9
+ let end = segment.length;
10
+ for (let i = segment.length - 1; i > 0; i--) {
11
+ if (isSep(segment.charCodeAt(i))) {
12
+ end = i;
13
+ }
14
+ else {
15
+ break;
16
+ }
17
+ }
18
+ return segment.slice(0, end);
19
+ }
@@ -0,0 +1 @@
1
+ export declare function encodeWhitespace(string: string): string;
@@ -0,0 +1,15 @@
1
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ const WHITESPACE_ENCODINGS = {
4
+ "\u0009": "%09",
5
+ "\u000A": "%0A",
6
+ "\u000B": "%0B",
7
+ "\u000C": "%0C",
8
+ "\u000D": "%0D",
9
+ "\u0020": "%20",
10
+ };
11
+ export function encodeWhitespace(string) {
12
+ return string.replaceAll(/[\s]/g, (c) => {
13
+ return WHITESPACE_ENCODINGS[c] ?? c;
14
+ });
15
+ }
@@ -0,0 +1,3 @@
1
+ export type OSType = "darwin" | "linux" | "windows" | "freebsd" | "netbsd" | "aix" | "solaris" | "illumos";
2
+ export declare const osType: OSType;
3
+ export declare const isWindows: boolean;
@@ -1,5 +1,6 @@
1
1
  // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
2
  // This module is browser compatible.
3
+ // Keep this up-to-date with Deno.build.os
3
4
  import * as dntShim from "../../../../_dnt.shims.js";
4
5
  export const osType = (() => {
5
6
  // deno-lint-ignore no-explicit-any
@@ -15,4 +16,3 @@ export const osType = (() => {
15
16
  return "linux";
16
17
  })();
17
18
  export const isWindows = osType === "windows";
18
- export const isLinux = osType === "linux";
@@ -1,7 +1,8 @@
1
1
  // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { isWindows } from "./_os.js";
4
- import { posixBasename, windowsBasename } from "./_basename.js";
4
+ import { basename as posixBasename } from "./posix/basename.js";
5
+ import { basename as windowsBasename } from "./windows/basename.js";
5
6
  /**
6
7
  * Return the last portion of a `path`.
7
8
  * Trailing directory separators are ignored, and optional suffix is removed.
@@ -0,0 +1,19 @@
1
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { _common } from "./_common/common.js";
4
+ import { SEP } from "./separator.js";
5
+ /** Determines the common path from a set of paths, using an optional separator,
6
+ * which defaults to the OS default separator.
7
+ *
8
+ * ```ts
9
+ * import { common } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
10
+ * const p = common([
11
+ * "./deno/std/path/mod.ts",
12
+ * "./deno/std/fs/mod.ts",
13
+ * ]);
14
+ * console.log(p); // "./deno/std/"
15
+ * ```
16
+ */
17
+ export function common(paths, sep = SEP) {
18
+ return _common(paths, sep);
19
+ }
@@ -1,7 +1,8 @@
1
1
  // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { isWindows } from "./_os.js";
4
- import { posixDirname, windowsDirname } from "./_dirname.js";
4
+ import { dirname as posixDirname } from "./posix/dirname.js";
5
+ import { dirname as windowsDirname } from "./windows/dirname.js";
5
6
  /**
6
7
  * Return the directory path of a `path`.
7
8
  * @param path - path to extract the directory from.
@@ -1,7 +1,8 @@
1
1
  // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { isWindows } from "./_os.js";
4
- import { posixExtname, windowsExtname } from "./_extname.js";
4
+ import { extname as posixExtname } from "./posix/extname.js";
5
+ import { extname as windowsExtname } from "./posix/extname.js";
5
6
  /**
6
7
  * Return the extension of the `path` with leading period.
7
8
  * @param path with extension
@@ -1,7 +1,8 @@
1
1
  // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { isWindows } from "./_os.js";
4
- import { posixFormat, windowsFormat } from "./_format.js";
4
+ import { format as posixFormat } from "./posix/format.js";
5
+ import { format as windowsFormat } from "./windows/format.js";
5
6
  /**
6
7
  * Generate a path from `FormatInputPathObject` object.
7
8
  * @param pathObject with path
@@ -1,7 +1,8 @@
1
1
  // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { isWindows } from "./_os.js";
4
- import { posixFromFileUrl, windowsFromFileUrl } from "./_from_file_url.js";
4
+ import { fromFileUrl as posixFromFileUrl } from "./posix/from_file_url.js";
5
+ import { fromFileUrl as windowsFromFileUrl } from "./windows/from_file_url.js";
5
6
  /**
6
7
  * Converts a file URL to a path string.
7
8
  *
@@ -1,24 +1,8 @@
1
- import { type OSType } from "./_os.js";
2
- export interface GlobOptions {
3
- /** Extended glob syntax.
4
- * See https://www.linuxjournal.com/content/bash-extended-globbing.
5
- *
6
- * @default {true}
7
- */
8
- extended?: boolean;
9
- /** Globstar syntax.
10
- * See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
11
- * If false, `**` is treated like `*`.
12
- *
13
- * @default {true}
14
- */
15
- globstar?: boolean;
16
- /** Whether globstar should be case-insensitive. */
17
- caseInsensitive?: boolean;
18
- /** Operating system. Defaults to the native OS. */
1
+ import type { GlobOptions } from "./_common/glob_to_reg_exp.js";
2
+ import { OSType } from "./_os.js";
3
+ export type GlobToRegExpOptions = GlobOptions & {
19
4
  os?: OSType;
20
- }
21
- export type GlobToRegExpOptions = GlobOptions;
5
+ };
22
6
  /** Convert a glob string to a regular expression.
23
7
  *
24
8
  * Tries to match bash glob expansion as closely as possible.
@@ -74,10 +58,4 @@ export type GlobToRegExpOptions = GlobOptions;
74
58
  * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively,
75
59
  * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if
76
60
  * the group occurs not nested at the end of the segment. */
77
- export declare function globToRegExp(glob: string, { extended, globstar: globstarOption, os, caseInsensitive, }?: GlobToRegExpOptions): RegExp;
78
- /** Test whether the given string is a glob */
79
- export declare function isGlob(str: string): boolean;
80
- /** Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. */
81
- export declare function normalizeGlob(glob: string, { globstar }?: GlobOptions): string;
82
- /** Like join(), but doesn't collapse "**\/.." when `globstar` is true. */
83
- export declare function joinGlobs(globs: string[], { extended, globstar }?: GlobOptions): string;
61
+ export declare function globToRegExp(glob: string, options?: GlobToRegExpOptions): RegExp;