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
@@ -1,48 +1,14 @@
1
1
  // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
2
  // This module is browser compatible.
3
- import { CHAR_COLON } from "./_constants.js";
4
- import { assertPath, isPathSeparator, isPosixPathSeparator, isWindowsDeviceRoot, stripTrailingSeparators, } from "./_util.js";
5
- function assertArg(path) {
6
- assertPath(path);
7
- if (path.length === 0)
8
- return ".";
9
- }
10
- /**
11
- * Return the directory path of a `path`.
12
- * @param path - path to extract the directory from.
13
- */
14
- export function posixDirname(path) {
15
- assertArg(path);
16
- let end = -1;
17
- let matchedNonSeparator = false;
18
- for (let i = path.length - 1; i >= 1; --i) {
19
- if (isPosixPathSeparator(path.charCodeAt(i))) {
20
- if (matchedNonSeparator) {
21
- end = i;
22
- break;
23
- }
24
- }
25
- else {
26
- matchedNonSeparator = true;
27
- }
28
- }
29
- // No matches. Fallback based on provided path:
30
- //
31
- // - leading slashes paths
32
- // "/foo" => "/"
33
- // "///foo" => "/"
34
- // - no slash path
35
- // "foo" => "."
36
- if (end === -1) {
37
- return isPosixPathSeparator(path.charCodeAt(0)) ? "/" : ".";
38
- }
39
- return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator);
40
- }
3
+ import { assertArg } from "../_common/dirname.js";
4
+ import { CHAR_COLON } from "../_common/constants.js";
5
+ import { stripTrailingSeparators } from "../_common/strip_trailing_separators.js";
6
+ import { isPathSeparator, isPosixPathSeparator, isWindowsDeviceRoot, } from "./_util.js";
41
7
  /**
42
8
  * Return the directory path of a `path`.
43
9
  * @param path - path to extract the directory from.
44
10
  */
45
- export function windowsDirname(path) {
11
+ export function dirname(path) {
46
12
  assertArg(path);
47
13
  const len = path.length;
48
14
  let rootEnd = -1;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Return the extension of the `path` with leading period.
3
+ * @param path with extension
4
+ * @returns extension (ex. for `file.ts` returns `.ts`)
5
+ */
6
+ export declare function extname(path: string): string;
@@ -1,67 +1,14 @@
1
1
  // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
2
  // This module is browser compatible.
3
- import { CHAR_COLON, CHAR_DOT } from "./_constants.js";
4
- import { assertPath, isPathSeparator, isPosixPathSeparator, isWindowsDeviceRoot, } from "./_util.js";
3
+ import { CHAR_COLON, CHAR_DOT } from "../_common/constants.js";
4
+ import { assertPath } from "../_common/assert_path.js";
5
+ import { isPathSeparator, isWindowsDeviceRoot } from "./_util.js";
5
6
  /**
6
7
  * Return the extension of the `path` with leading period.
7
8
  * @param path with extension
8
9
  * @returns extension (ex. for `file.ts` returns `.ts`)
9
10
  */
10
- export function posixExtname(path) {
11
- assertPath(path);
12
- let startDot = -1;
13
- let startPart = 0;
14
- let end = -1;
15
- let matchedSlash = true;
16
- // Track the state of characters (if any) we see before our first dot and
17
- // after any path separator we find
18
- let preDotState = 0;
19
- for (let i = path.length - 1; i >= 0; --i) {
20
- const code = path.charCodeAt(i);
21
- if (isPosixPathSeparator(code)) {
22
- // If we reached a path separator that was not part of a set of path
23
- // separators at the end of the string, stop now
24
- if (!matchedSlash) {
25
- startPart = i + 1;
26
- break;
27
- }
28
- continue;
29
- }
30
- if (end === -1) {
31
- // We saw the first non-path separator, mark this as the end of our
32
- // extension
33
- matchedSlash = false;
34
- end = i + 1;
35
- }
36
- if (code === CHAR_DOT) {
37
- // If this is our first dot, mark it as the start of our extension
38
- if (startDot === -1)
39
- startDot = i;
40
- else if (preDotState !== 1)
41
- preDotState = 1;
42
- }
43
- else if (startDot !== -1) {
44
- // We saw a non-dot and non-path separator before our dot, so we should
45
- // have a good chance at having a non-empty extension
46
- preDotState = -1;
47
- }
48
- }
49
- if (startDot === -1 ||
50
- end === -1 ||
51
- // We saw a non-dot character immediately before the dot
52
- preDotState === 0 ||
53
- // The (right-most) trimmed path component is exactly '..'
54
- (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)) {
55
- return "";
56
- }
57
- return path.slice(startDot, end);
58
- }
59
- /**
60
- * Return the extension of the `path` with leading period.
61
- * @param path with extension
62
- * @returns extension (ex. for `file.ts` returns `.ts`)
63
- */
64
- export function windowsExtname(path) {
11
+ export function extname(path) {
65
12
  assertPath(path);
66
13
  let start = 0;
67
14
  let startDot = -1;
@@ -0,0 +1,6 @@
1
+ import type { FormatInputPathObject } from "../_interface.js";
2
+ /**
3
+ * Generate a path from `FormatInputPathObject` object.
4
+ * @param pathObject with path
5
+ */
6
+ export declare function format(pathObject: FormatInputPathObject): string;
@@ -0,0 +1,11 @@
1
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { _format, assertArg } from "../_common/format.js";
4
+ /**
5
+ * Generate a path from `FormatInputPathObject` object.
6
+ * @param pathObject with path
7
+ */
8
+ export function format(pathObject) {
9
+ assertArg(pathObject);
10
+ return _format("\\", pathObject);
11
+ }
@@ -1,15 +1,4 @@
1
1
  /// <reference types="node" />
2
- /**
3
- * Converts a file URL to a path string.
4
- *
5
- * ```ts
6
- * import { fromFileUrl } from "https://deno.land/std@$STD_VERSION/path/posix.ts";
7
- *
8
- * fromFileUrl("file:///home/foo"); // "/home/foo"
9
- * ```
10
- * @param url of a file URL
11
- */
12
- export declare function posixFromFileUrl(url: URL | string): string;
13
2
  /**
14
3
  * Converts a file URL to a path string.
15
4
  *
@@ -22,4 +11,4 @@ export declare function posixFromFileUrl(url: URL | string): string;
22
11
  * ```
23
12
  * @param url of a file URL
24
13
  */
25
- export declare function windowsFromFileUrl(url: URL | string): string;
14
+ export declare function fromFileUrl(url: URL | string): string;
@@ -1,26 +1,6 @@
1
1
  // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
2
  // This module is browser compatible.
3
- 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
- }
10
- /**
11
- * Converts a file URL to a path string.
12
- *
13
- * ```ts
14
- * import { fromFileUrl } from "https://deno.land/std@$STD_VERSION/path/posix.ts";
15
- *
16
- * fromFileUrl("file:///home/foo"); // "/home/foo"
17
- * ```
18
- * @param url of a file URL
19
- */
20
- export function posixFromFileUrl(url) {
21
- url = assertArg(url);
22
- return decodeURIComponent(url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"));
23
- }
3
+ import { assertArg } from "../_common/from_file_url.js";
24
4
  /**
25
5
  * Converts a file URL to a path string.
26
6
  *
@@ -33,7 +13,7 @@ export function posixFromFileUrl(url) {
33
13
  * ```
34
14
  * @param url of a file URL
35
15
  */
36
- export function windowsFromFileUrl(url) {
16
+ export function fromFileUrl(url) {
37
17
  url = assertArg(url);
38
18
  let path = decodeURIComponent(url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
39
19
  if (url.hostname !== "") {
@@ -0,0 +1,57 @@
1
+ import { GlobToRegExpOptions } from "../_common/glob_to_reg_exp.js";
2
+ /** Convert a glob string to a regular expression.
3
+ *
4
+ * Tries to match bash glob expansion as closely as possible.
5
+ *
6
+ * Basic glob syntax:
7
+ * - `*` - Matches everything without leaving the path segment.
8
+ * - `?` - Matches any single character.
9
+ * - `{foo,bar}` - Matches `foo` or `bar`.
10
+ * - `[abcd]` - Matches `a`, `b`, `c` or `d`.
11
+ * - `[a-d]` - Matches `a`, `b`, `c` or `d`.
12
+ * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`.
13
+ * - `[[:<class>:]]` - Matches any character belonging to `<class>`.
14
+ * - `[[:alnum:]]` - Matches any digit or letter.
15
+ * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`.
16
+ * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes
17
+ * for a complete list of supported character classes.
18
+ * - `\` - Escapes the next character for an `os` other than `"windows"`.
19
+ * - \` - Escapes the next character for `os` set to `"windows"`.
20
+ * - `/` - Path separator.
21
+ * - `\` - Additional path separator only for `os` set to `"windows"`.
22
+ *
23
+ * Extended syntax:
24
+ * - Requires `{ extended: true }`.
25
+ * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`.
26
+ * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same.
27
+ * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`.
28
+ * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`.
29
+ * - `!(foo|bar)` - Matches anything other than `{foo,bar}`.
30
+ * - See https://www.linuxjournal.com/content/bash-extended-globbing.
31
+ *
32
+ * Globstar syntax:
33
+ * - Requires `{ globstar: true }`.
34
+ * - `**` - Matches any number of any path segments.
35
+ * - Must comprise its entire path segment in the provided glob.
36
+ * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
37
+ *
38
+ * Note the following properties:
39
+ * - The generated `RegExp` is anchored at both start and end.
40
+ * - Repeating and trailing separators are tolerated. Trailing separators in the
41
+ * provided glob have no meaning and are discarded.
42
+ * - Absolute globs will only match absolute paths, etc.
43
+ * - Empty globs will match nothing.
44
+ * - Any special glob syntax must be contained to one path segment. For example,
45
+ * `?(foo|bar/baz)` is invalid. The separator will take precedence and the
46
+ * first segment ends with an unclosed group.
47
+ * - If a path segment ends with unclosed groups or a dangling escape prefix, a
48
+ * parse error has occurred. Every character for that segment is taken
49
+ * literally in this event.
50
+ *
51
+ * Limitations:
52
+ * - A negative group like `!(foo|bar)` will wrongly be converted to a negative
53
+ * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly
54
+ * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively,
55
+ * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if
56
+ * the group occurs not nested at the end of the segment. */
57
+ export declare function globToRegExp(glob: string, options?: GlobToRegExpOptions): RegExp;
@@ -0,0 +1,69 @@
1
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { _globToRegExp, } from "../_common/glob_to_reg_exp.js";
4
+ const constants = {
5
+ sep: "(?:\\\\|/)+",
6
+ sepMaybe: "(?:\\\\|/)*",
7
+ seps: ["\\", "/"],
8
+ globstar: "(?:[^\\\\/]*(?:\\\\|/|$)+)*",
9
+ wildcard: "[^\\\\/]*",
10
+ escapePrefix: "`",
11
+ };
12
+ /** Convert a glob string to a regular expression.
13
+ *
14
+ * Tries to match bash glob expansion as closely as possible.
15
+ *
16
+ * Basic glob syntax:
17
+ * - `*` - Matches everything without leaving the path segment.
18
+ * - `?` - Matches any single character.
19
+ * - `{foo,bar}` - Matches `foo` or `bar`.
20
+ * - `[abcd]` - Matches `a`, `b`, `c` or `d`.
21
+ * - `[a-d]` - Matches `a`, `b`, `c` or `d`.
22
+ * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`.
23
+ * - `[[:<class>:]]` - Matches any character belonging to `<class>`.
24
+ * - `[[:alnum:]]` - Matches any digit or letter.
25
+ * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`.
26
+ * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes
27
+ * for a complete list of supported character classes.
28
+ * - `\` - Escapes the next character for an `os` other than `"windows"`.
29
+ * - \` - Escapes the next character for `os` set to `"windows"`.
30
+ * - `/` - Path separator.
31
+ * - `\` - Additional path separator only for `os` set to `"windows"`.
32
+ *
33
+ * Extended syntax:
34
+ * - Requires `{ extended: true }`.
35
+ * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`.
36
+ * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same.
37
+ * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`.
38
+ * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`.
39
+ * - `!(foo|bar)` - Matches anything other than `{foo,bar}`.
40
+ * - See https://www.linuxjournal.com/content/bash-extended-globbing.
41
+ *
42
+ * Globstar syntax:
43
+ * - Requires `{ globstar: true }`.
44
+ * - `**` - Matches any number of any path segments.
45
+ * - Must comprise its entire path segment in the provided glob.
46
+ * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
47
+ *
48
+ * Note the following properties:
49
+ * - The generated `RegExp` is anchored at both start and end.
50
+ * - Repeating and trailing separators are tolerated. Trailing separators in the
51
+ * provided glob have no meaning and are discarded.
52
+ * - Absolute globs will only match absolute paths, etc.
53
+ * - Empty globs will match nothing.
54
+ * - Any special glob syntax must be contained to one path segment. For example,
55
+ * `?(foo|bar/baz)` is invalid. The separator will take precedence and the
56
+ * first segment ends with an unclosed group.
57
+ * - If a path segment ends with unclosed groups or a dangling escape prefix, a
58
+ * parse error has occurred. Every character for that segment is taken
59
+ * literally in this event.
60
+ *
61
+ * Limitations:
62
+ * - A negative group like `!(foo|bar)` will wrongly be converted to a negative
63
+ * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly
64
+ * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively,
65
+ * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if
66
+ * the group occurs not nested at the end of the segment. */
67
+ export function globToRegExp(glob, options = {}) {
68
+ return _globToRegExp(constants, glob, options);
69
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Verifies whether provided path is absolute
3
+ * @param path to be verified as absolute
4
+ */
5
+ export declare function isAbsolute(path: string): boolean;
@@ -1,12 +1,13 @@
1
1
  // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
2
  // This module is browser compatible.
3
- import { CHAR_COLON } from "./_constants.js";
4
- import { assertPath, isPathSeparator, isPosixPathSeparator, isWindowsDeviceRoot, } from "./_util.js";
3
+ import { CHAR_COLON } from "../_common/constants.js";
4
+ import { assertPath } from "../_common/assert_path.js";
5
+ import { isPathSeparator, isWindowsDeviceRoot } from "./_util.js";
5
6
  /**
6
7
  * Verifies whether provided path is absolute
7
8
  * @param path to be verified as absolute
8
9
  */
9
- export function windowsIsAbsolute(path) {
10
+ export function isAbsolute(path) {
10
11
  assertPath(path);
11
12
  const len = path.length;
12
13
  if (len === 0)
@@ -24,11 +25,3 @@ export function windowsIsAbsolute(path) {
24
25
  }
25
26
  return false;
26
27
  }
27
- /**
28
- * Verifies whether provided path is absolute
29
- * @param path to be verified as absolute
30
- */
31
- export function posixIsAbsolute(path) {
32
- assertPath(path);
33
- return path.length > 0 && isPosixPathSeparator(path.charCodeAt(0));
34
- }
@@ -0,0 +1 @@
1
+ export { isGlob } from "../is_glob.js";
@@ -0,0 +1,3 @@
1
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ export { isGlob } from "../is_glob.js";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Join all given a sequence of `paths`,then normalizes the resulting path.
3
+ * @param paths to be joined and normalized
4
+ */
5
+ export declare function join(...paths: string[]): string;
@@ -1,35 +1,14 @@
1
1
  // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
2
  // This module is browser compatible.
3
- import { assert } from "../assert/assert.js";
4
- import { assertPath, isPathSeparator } from "./_util.js";
5
- import { posixNormalize, windowsNormalize } from "./_normalize.js";
3
+ import { assert } from "../../assert/assert.js";
4
+ import { assertPath } from "../_common/assert_path.js";
5
+ import { isPathSeparator } from "./_util.js";
6
+ import { normalize } from "./normalize.js";
6
7
  /**
7
8
  * Join all given a sequence of `paths`,then normalizes the resulting path.
8
9
  * @param paths to be joined and normalized
9
10
  */
10
- export function posixJoin(...paths) {
11
- if (paths.length === 0)
12
- return ".";
13
- let joined;
14
- for (let i = 0, len = paths.length; i < len; ++i) {
15
- const path = paths[i];
16
- assertPath(path);
17
- if (path.length > 0) {
18
- if (!joined)
19
- joined = path;
20
- else
21
- joined += `/${path}`;
22
- }
23
- }
24
- if (!joined)
25
- return ".";
26
- return posixNormalize(joined);
27
- }
28
- /**
29
- * Join all given a sequence of `paths`,then normalizes the resulting path.
30
- * @param paths to be joined and normalized
31
- */
32
- export function windowsJoin(...paths) {
11
+ export function join(...paths) {
33
12
  if (paths.length === 0)
34
13
  return ".";
35
14
  let joined;
@@ -89,5 +68,5 @@ export function windowsJoin(...paths) {
89
68
  if (slashCount >= 2)
90
69
  joined = `\\${joined.slice(slashCount)}`;
91
70
  }
92
- return windowsNormalize(joined);
71
+ return normalize(joined);
93
72
  }
@@ -0,0 +1,3 @@
1
+ import { GlobOptions } from "../_common/glob_to_reg_exp.js";
2
+ /** Like join(), but doesn't collapse "**\/.." when `globstar` is true. */
3
+ export declare function joinGlobs(globs: string[], { extended, globstar }?: GlobOptions): string;
@@ -0,0 +1,26 @@
1
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { join } from "./join.js";
4
+ import { SEP } from "./separator.js";
5
+ import { normalizeGlob } from "./normalize_glob.js";
6
+ /** Like join(), but doesn't collapse "**\/.." when `globstar` is true. */
7
+ export function joinGlobs(globs, { extended = true, globstar = false } = {}) {
8
+ if (!globstar || globs.length === 0) {
9
+ return join(...globs);
10
+ }
11
+ if (globs.length === 0)
12
+ return ".";
13
+ let joined;
14
+ for (const glob of globs) {
15
+ const path = glob;
16
+ if (path.length > 0) {
17
+ if (!joined)
18
+ joined = path;
19
+ else
20
+ joined += `${SEP}${path}`;
21
+ }
22
+ }
23
+ if (!joined)
24
+ return ".";
25
+ return normalizeGlob(joined, { extended, globstar });
26
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Utilities for working with OS-specific file paths.
3
+ *
4
+ * Codes in the examples uses POSIX path but it automatically use Windows path
5
+ * on Windows. Use methods under `posix` or `win32` object instead to handle non
6
+ * platform specific path like:
7
+ * ```ts
8
+ * import { posix, win32 } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
9
+ * const p1 = posix.fromFileUrl("file:///home/foo");
10
+ * const p2 = win32.fromFileUrl("file:///home/foo");
11
+ * console.log(p1); // "/home/foo"
12
+ * console.log(p2); // "\\home\\foo"
13
+ * ```
14
+ *
15
+ * This module is browser compatible.
16
+ *
17
+ * @module
18
+ */
19
+ export declare const sep = "\\";
20
+ export declare const delimiter = ";";
21
+ export * from "./basename.js";
22
+ export * from "./dirname.js";
23
+ export * from "./extname.js";
24
+ export * from "./format.js";
25
+ export * from "./from_file_url.js";
26
+ export * from "./is_absolute.js";
27
+ export * from "./join.js";
28
+ export * from "./normalize.js";
29
+ export * from "./parse.js";
30
+ export * from "./relative.js";
31
+ export * from "./resolve.js";
32
+ export * from "./to_file_url.js";
33
+ export * from "./to_namespaced_path.js";
34
+ export * from "./common.js";
35
+ export * from "./separator.js";
36
+ export * from "../_interface.js";
37
+ export * from "./glob_to_regexp.js";
38
+ export * from "./is_glob.js";
39
+ export * from "./join_globs.js";
40
+ export * from "./normalize_glob.js";
@@ -0,0 +1,44 @@
1
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
+ // Copyright the Browserify authors. MIT License.
3
+ // Ported mostly from https://github.com/browserify/path-browserify/
4
+ // This module is browser compatible.
5
+ /**
6
+ * Utilities for working with OS-specific file paths.
7
+ *
8
+ * Codes in the examples uses POSIX path but it automatically use Windows path
9
+ * on Windows. Use methods under `posix` or `win32` object instead to handle non
10
+ * platform specific path like:
11
+ * ```ts
12
+ * import { posix, win32 } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
13
+ * const p1 = posix.fromFileUrl("file:///home/foo");
14
+ * const p2 = win32.fromFileUrl("file:///home/foo");
15
+ * console.log(p1); // "/home/foo"
16
+ * console.log(p2); // "\\home\\foo"
17
+ * ```
18
+ *
19
+ * This module is browser compatible.
20
+ *
21
+ * @module
22
+ */
23
+ export const sep = "\\";
24
+ export const delimiter = ";";
25
+ export * from "./basename.js";
26
+ export * from "./dirname.js";
27
+ export * from "./extname.js";
28
+ export * from "./format.js";
29
+ export * from "./from_file_url.js";
30
+ export * from "./is_absolute.js";
31
+ export * from "./join.js";
32
+ export * from "./normalize.js";
33
+ export * from "./parse.js";
34
+ export * from "./relative.js";
35
+ export * from "./resolve.js";
36
+ export * from "./to_file_url.js";
37
+ export * from "./to_namespaced_path.js";
38
+ export * from "./common.js";
39
+ export * from "./separator.js";
40
+ export * from "../_interface.js";
41
+ export * from "./glob_to_regexp.js";
42
+ export * from "./is_glob.js";
43
+ export * from "./join_globs.js";
44
+ export * from "./normalize_glob.js";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Normalize the `path`, resolving `'..'` and `'.'` segments.
3
+ * Note that resolving these segments does not necessarily mean that all will be eliminated.
4
+ * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`.
5
+ * @param path to be normalized
6
+ */
7
+ export declare function normalize(path: string): string;
@@ -1,39 +1,16 @@
1
1
  // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
2
  // This module is browser compatible.
3
- import { CHAR_COLON } from "./_constants.js";
4
- import { assertPath, isPathSeparator, isPosixPathSeparator, isWindowsDeviceRoot, normalizeString, } from "./_util.js";
5
- function assertArg(path) {
6
- assertPath(path);
7
- if (path.length === 0)
8
- return ".";
9
- }
10
- /**
11
- * Normalize the `path`, resolving `'..'` and `'.'` segments.
12
- * Note that resolving these segments does not necessarily mean that all will be eliminated.
13
- * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`.
14
- * @param path to be normalized
15
- */
16
- export function posixNormalize(path) {
17
- assertArg(path);
18
- const isAbsolute = isPosixPathSeparator(path.charCodeAt(0));
19
- const trailingSeparator = isPosixPathSeparator(path.charCodeAt(path.length - 1));
20
- // Normalize the path
21
- path = normalizeString(path, !isAbsolute, "/", isPosixPathSeparator);
22
- if (path.length === 0 && !isAbsolute)
23
- path = ".";
24
- if (path.length > 0 && trailingSeparator)
25
- path += "/";
26
- if (isAbsolute)
27
- return `/${path}`;
28
- return path;
29
- }
3
+ import { assertArg } from "../_common/normalize.js";
4
+ import { CHAR_COLON } from "../_common/constants.js";
5
+ import { normalizeString } from "../_common/normalize_string.js";
6
+ import { isPathSeparator, isWindowsDeviceRoot } from "./_util.js";
30
7
  /**
31
8
  * Normalize the `path`, resolving `'..'` and `'.'` segments.
32
9
  * Note that resolving these segments does not necessarily mean that all will be eliminated.
33
10
  * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`.
34
11
  * @param path to be normalized
35
12
  */
36
- export function windowsNormalize(path) {
13
+ export function normalize(path) {
37
14
  assertArg(path);
38
15
  const len = path.length;
39
16
  let rootEnd = 0;
@@ -0,0 +1,3 @@
1
+ import { GlobOptions } from "../_common/glob_to_reg_exp.js";
2
+ /** Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. */
3
+ export declare function normalizeGlob(glob: string, { globstar }?: GlobOptions): string;
@@ -0,0 +1,16 @@
1
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { normalize } from "./normalize.js";
4
+ import { SEP_PATTERN } from "./separator.js";
5
+ /** Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. */
6
+ export function normalizeGlob(glob, { globstar = false } = {}) {
7
+ if (glob.match(/\0/g)) {
8
+ throw new Error(`Glob contains invalid characters: "${glob}"`);
9
+ }
10
+ if (!globstar) {
11
+ return normalize(glob);
12
+ }
13
+ const s = SEP_PATTERN.source;
14
+ const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g");
15
+ return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, "..");
16
+ }
@@ -0,0 +1,6 @@
1
+ import { ParsedPath } from "../_interface.js";
2
+ /**
3
+ * Return a `ParsedPath` object of the `path`.
4
+ * @param path to process
5
+ */
6
+ export declare function parse(path: string): ParsedPath;