staticalize 0.2.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 (433) hide show
  1. package/README.md +43 -0
  2. package/esm/_dnt.polyfills.d.ts +117 -0
  3. package/esm/_dnt.polyfills.d.ts.map +1 -0
  4. package/esm/_dnt.polyfills.js +144 -0
  5. package/esm/_dnt.polyfills.js.map +1 -0
  6. package/esm/_dnt.shims.d.ts +6 -0
  7. package/esm/_dnt.shims.d.ts.map +1 -0
  8. package/esm/_dnt.shims.js +62 -0
  9. package/esm/_dnt.shims.js.map +1 -0
  10. package/esm/config.d.ts +6 -0
  11. package/esm/config.d.ts.map +1 -0
  12. package/esm/config.js +25 -0
  13. package/esm/config.js.map +1 -0
  14. package/esm/deno.d.ts +45 -0
  15. package/esm/deno.d.ts.map +1 -0
  16. package/esm/deno.js +43 -0
  17. package/esm/deno.js.map +1 -0
  18. package/esm/deps/jsr.io/@libs/xml/6.0.8/_types.d.ts +48 -0
  19. package/esm/deps/jsr.io/@libs/xml/6.0.8/_types.d.ts.map +1 -0
  20. package/esm/deps/jsr.io/@libs/xml/6.0.8/_types.js +2 -0
  21. package/esm/deps/jsr.io/@libs/xml/6.0.8/_types.js.map +1 -0
  22. package/esm/deps/jsr.io/@libs/xml/6.0.8/parse.d.ts +127 -0
  23. package/esm/deps/jsr.io/@libs/xml/6.0.8/parse.d.ts.map +1 -0
  24. package/esm/deps/jsr.io/@libs/xml/6.0.8/parse.js +383 -0
  25. package/esm/deps/jsr.io/@libs/xml/6.0.8/parse.js.map +1 -0
  26. package/esm/deps/jsr.io/@libs/xml/6.0.8/stringify.d.ts +93 -0
  27. package/esm/deps/jsr.io/@libs/xml/6.0.8/stringify.d.ts.map +1 -0
  28. package/esm/deps/jsr.io/@libs/xml/6.0.8/stringify.js +262 -0
  29. package/esm/deps/jsr.io/@libs/xml/6.0.8/stringify.js.map +1 -0
  30. package/esm/deps/jsr.io/@libs/xml/6.0.8/wasm_xml_parser/wasm_xml_parser.d.ts +37 -0
  31. package/esm/deps/jsr.io/@libs/xml/6.0.8/wasm_xml_parser/wasm_xml_parser.d.ts.map +1 -0
  32. package/esm/deps/jsr.io/@libs/xml/6.0.8/wasm_xml_parser/wasm_xml_parser.js +90 -0
  33. package/esm/deps/jsr.io/@libs/xml/6.0.8/wasm_xml_parser/wasm_xml_parser.js.map +1 -0
  34. package/esm/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.d.ts +13 -0
  35. package/esm/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.d.ts.map +1 -0
  36. package/esm/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.js +19 -0
  37. package/esm/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.js.map +1 -0
  38. package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_dir.d.ts +49 -0
  39. package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_dir.d.ts.map +1 -0
  40. package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_dir.js +103 -0
  41. package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_dir.js.map +1 -0
  42. package/esm/deps/jsr.io/@std/internal/1.0.12/_os.d.ts +2 -0
  43. package/esm/deps/jsr.io/@std/internal/1.0.12/_os.d.ts.map +1 -0
  44. package/esm/deps/jsr.io/@std/internal/1.0.12/_os.js +13 -0
  45. package/esm/deps/jsr.io/@std/internal/1.0.12/_os.js.map +1 -0
  46. package/esm/deps/jsr.io/@std/internal/1.0.12/os.d.ts +3 -0
  47. package/esm/deps/jsr.io/@std/internal/1.0.12/os.d.ts.map +1 -0
  48. package/esm/deps/jsr.io/@std/internal/1.0.12/os.js +6 -0
  49. package/esm/deps/jsr.io/@std/internal/1.0.12/os.js.map +1 -0
  50. package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts +2 -0
  51. package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts.map +1 -0
  52. package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.js +8 -0
  53. package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.js.map +1 -0
  54. package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts +4 -0
  55. package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts.map +1 -0
  56. package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.js +41 -0
  57. package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.js.map +1 -0
  58. package/esm/deps/jsr.io/@std/path/1.1.4/_common/common.d.ts +2 -0
  59. package/esm/deps/jsr.io/@std/path/1.1.4/_common/common.d.ts.map +1 -0
  60. package/esm/deps/jsr.io/@std/path/1.1.4/_common/common.js +24 -0
  61. package/esm/deps/jsr.io/@std/path/1.1.4/_common/common.js.map +1 -0
  62. package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts +40 -0
  63. package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts.map +1 -0
  64. package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.js +47 -0
  65. package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.js.map +1 -0
  66. package/esm/deps/jsr.io/@std/path/1.1.4/_common/dirname.d.ts +2 -0
  67. package/esm/deps/jsr.io/@std/path/1.1.4/_common/dirname.d.ts.map +1 -0
  68. package/esm/deps/jsr.io/@std/path/1.1.4/_common/dirname.js +9 -0
  69. package/esm/deps/jsr.io/@std/path/1.1.4/_common/dirname.js.map +1 -0
  70. package/esm/deps/jsr.io/@std/path/1.1.4/_common/format.d.ts +4 -0
  71. package/esm/deps/jsr.io/@std/path/1.1.4/_common/format.d.ts.map +1 -0
  72. package/esm/deps/jsr.io/@std/path/1.1.4/_common/format.js +20 -0
  73. package/esm/deps/jsr.io/@std/path/1.1.4/_common/format.js.map +1 -0
  74. package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts +2 -0
  75. package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts.map +1 -0
  76. package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.js +10 -0
  77. package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.js.map +1 -0
  78. package/esm/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.d.ts +35 -0
  79. package/esm/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.d.ts.map +1 -0
  80. package/esm/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.js +236 -0
  81. package/esm/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.js.map +1 -0
  82. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts +2 -0
  83. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts.map +1 -0
  84. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.js +9 -0
  85. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.js.map +1 -0
  86. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts +2 -0
  87. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts.map +1 -0
  88. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.js +78 -0
  89. package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.js.map +1 -0
  90. package/esm/deps/jsr.io/@std/path/1.1.4/_common/relative.d.ts +2 -0
  91. package/esm/deps/jsr.io/@std/path/1.1.4/_common/relative.d.ts.map +1 -0
  92. package/esm/deps/jsr.io/@std/path/1.1.4/_common/relative.js +10 -0
  93. package/esm/deps/jsr.io/@std/path/1.1.4/_common/relative.js.map +1 -0
  94. package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts +2 -0
  95. package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts.map +1 -0
  96. package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.js +20 -0
  97. package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.js.map +1 -0
  98. package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts +2 -0
  99. package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts.map +1 -0
  100. package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.js +16 -0
  101. package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.js.map +1 -0
  102. package/esm/deps/jsr.io/@std/path/1.1.4/basename.d.ts +27 -0
  103. package/esm/deps/jsr.io/@std/path/1.1.4/basename.d.ts.map +1 -0
  104. package/esm/deps/jsr.io/@std/path/1.1.4/basename.js +36 -0
  105. package/esm/deps/jsr.io/@std/path/1.1.4/basename.js.map +1 -0
  106. package/esm/deps/jsr.io/@std/path/1.1.4/common.d.ts +28 -0
  107. package/esm/deps/jsr.io/@std/path/1.1.4/common.d.ts.map +1 -0
  108. package/esm/deps/jsr.io/@std/path/1.1.4/common.js +34 -0
  109. package/esm/deps/jsr.io/@std/path/1.1.4/common.js.map +1 -0
  110. package/esm/deps/jsr.io/@std/path/1.1.4/constants.d.ts +15 -0
  111. package/esm/deps/jsr.io/@std/path/1.1.4/constants.d.ts.map +1 -0
  112. package/esm/deps/jsr.io/@std/path/1.1.4/constants.js +18 -0
  113. package/esm/deps/jsr.io/@std/path/1.1.4/constants.js.map +1 -0
  114. package/esm/deps/jsr.io/@std/path/1.1.4/dirname.d.ts +22 -0
  115. package/esm/deps/jsr.io/@std/path/1.1.4/dirname.d.ts.map +1 -0
  116. package/esm/deps/jsr.io/@std/path/1.1.4/dirname.js +29 -0
  117. package/esm/deps/jsr.io/@std/path/1.1.4/dirname.js.map +1 -0
  118. package/esm/deps/jsr.io/@std/path/1.1.4/extname.d.ts +22 -0
  119. package/esm/deps/jsr.io/@std/path/1.1.4/extname.d.ts.map +1 -0
  120. package/esm/deps/jsr.io/@std/path/1.1.4/extname.js +29 -0
  121. package/esm/deps/jsr.io/@std/path/1.1.4/extname.js.map +1 -0
  122. package/esm/deps/jsr.io/@std/path/1.1.4/format.d.ts +22 -0
  123. package/esm/deps/jsr.io/@std/path/1.1.4/format.d.ts.map +1 -0
  124. package/esm/deps/jsr.io/@std/path/1.1.4/format.js +28 -0
  125. package/esm/deps/jsr.io/@std/path/1.1.4/format.js.map +1 -0
  126. package/esm/deps/jsr.io/@std/path/1.1.4/from_file_url.d.ts +22 -0
  127. package/esm/deps/jsr.io/@std/path/1.1.4/from_file_url.d.ts.map +1 -0
  128. package/esm/deps/jsr.io/@std/path/1.1.4/from_file_url.js +29 -0
  129. package/esm/deps/jsr.io/@std/path/1.1.4/from_file_url.js.map +1 -0
  130. package/esm/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.d.ts +77 -0
  131. package/esm/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.d.ts.map +1 -0
  132. package/esm/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.js +84 -0
  133. package/esm/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.js.map +1 -0
  134. package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts +22 -0
  135. package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts.map +1 -0
  136. package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.js +29 -0
  137. package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.js.map +1 -0
  138. package/esm/deps/jsr.io/@std/path/1.1.4/is_glob.d.ts +17 -0
  139. package/esm/deps/jsr.io/@std/path/1.1.4/is_glob.d.ts.map +1 -0
  140. package/esm/deps/jsr.io/@std/path/1.1.4/is_glob.js +43 -0
  141. package/esm/deps/jsr.io/@std/path/1.1.4/is_glob.js.map +1 -0
  142. package/esm/deps/jsr.io/@std/path/1.1.4/join.d.ts +23 -0
  143. package/esm/deps/jsr.io/@std/path/1.1.4/join.d.ts.map +1 -0
  144. package/esm/deps/jsr.io/@std/path/1.1.4/join.js +30 -0
  145. package/esm/deps/jsr.io/@std/path/1.1.4/join.js.map +1 -0
  146. package/esm/deps/jsr.io/@std/path/1.1.4/join_globs.d.ts +28 -0
  147. package/esm/deps/jsr.io/@std/path/1.1.4/join_globs.d.ts.map +1 -0
  148. package/esm/deps/jsr.io/@std/path/1.1.4/join_globs.js +35 -0
  149. package/esm/deps/jsr.io/@std/path/1.1.4/join_globs.js.map +1 -0
  150. package/esm/deps/jsr.io/@std/path/1.1.4/mod.d.ts +213 -0
  151. package/esm/deps/jsr.io/@std/path/1.1.4/mod.d.ts.map +1 -0
  152. package/esm/deps/jsr.io/@std/path/1.1.4/mod.js +217 -0
  153. package/esm/deps/jsr.io/@std/path/1.1.4/mod.js.map +1 -0
  154. package/esm/deps/jsr.io/@std/path/1.1.4/normalize.d.ts +26 -0
  155. package/esm/deps/jsr.io/@std/path/1.1.4/normalize.d.ts.map +1 -0
  156. package/esm/deps/jsr.io/@std/path/1.1.4/normalize.js +33 -0
  157. package/esm/deps/jsr.io/@std/path/1.1.4/normalize.js.map +1 -0
  158. package/esm/deps/jsr.io/@std/path/1.1.4/normalize_glob.d.ts +29 -0
  159. package/esm/deps/jsr.io/@std/path/1.1.4/normalize_glob.d.ts.map +1 -0
  160. package/esm/deps/jsr.io/@std/path/1.1.4/normalize_glob.js +36 -0
  161. package/esm/deps/jsr.io/@std/path/1.1.4/normalize_glob.js.map +1 -0
  162. package/esm/deps/jsr.io/@std/path/1.1.4/parse.d.ts +35 -0
  163. package/esm/deps/jsr.io/@std/path/1.1.4/parse.d.ts.map +1 -0
  164. package/esm/deps/jsr.io/@std/path/1.1.4/parse.js +40 -0
  165. package/esm/deps/jsr.io/@std/path/1.1.4/parse.js.map +1 -0
  166. package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts +2 -0
  167. package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts.map +1 -0
  168. package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.js +9 -0
  169. package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.js.map +1 -0
  170. package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts +39 -0
  171. package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts.map +1 -0
  172. package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.js +53 -0
  173. package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.js.map +1 -0
  174. package/esm/deps/jsr.io/@std/path/1.1.4/posix/constants.d.ts +13 -0
  175. package/esm/deps/jsr.io/@std/path/1.1.4/posix/constants.d.ts.map +1 -0
  176. package/esm/deps/jsr.io/@std/path/1.1.4/posix/constants.js +15 -0
  177. package/esm/deps/jsr.io/@std/path/1.1.4/posix/constants.js.map +1 -0
  178. package/esm/deps/jsr.io/@std/path/1.1.4/posix/dirname.d.ts +30 -0
  179. package/esm/deps/jsr.io/@std/path/1.1.4/posix/dirname.d.ts.map +1 -0
  180. package/esm/deps/jsr.io/@std/path/1.1.4/posix/dirname.js +65 -0
  181. package/esm/deps/jsr.io/@std/path/1.1.4/posix/dirname.js.map +1 -0
  182. package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts +37 -0
  183. package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts.map +1 -0
  184. package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.js +94 -0
  185. package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.js.map +1 -0
  186. package/esm/deps/jsr.io/@std/path/1.1.4/posix/format.d.ts +24 -0
  187. package/esm/deps/jsr.io/@std/path/1.1.4/posix/format.d.ts.map +1 -0
  188. package/esm/deps/jsr.io/@std/path/1.1.4/posix/format.js +29 -0
  189. package/esm/deps/jsr.io/@std/path/1.1.4/posix/format.js.map +1 -0
  190. package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts +16 -0
  191. package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts.map +1 -0
  192. package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.js +22 -0
  193. package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.js.map +1 -0
  194. package/esm/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.d.ts +72 -0
  195. package/esm/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.d.ts.map +1 -0
  196. package/esm/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.js +83 -0
  197. package/esm/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.js.map +1 -0
  198. package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts +17 -0
  199. package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts.map +1 -0
  200. package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.js +24 -0
  201. package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.js.map +1 -0
  202. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts +31 -0
  203. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts.map +1 -0
  204. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.js +46 -0
  205. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.js.map +1 -0
  206. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join_globs.d.ts +20 -0
  207. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join_globs.d.ts.map +1 -0
  208. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join_globs.js +41 -0
  209. package/esm/deps/jsr.io/@std/path/1.1.4/posix/join_globs.js.map +1 -0
  210. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts +37 -0
  211. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts.map +1 -0
  212. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.js +59 -0
  213. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.js.map +1 -0
  214. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.d.ts +20 -0
  215. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.d.ts.map +1 -0
  216. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.js +33 -0
  217. package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.js.map +1 -0
  218. package/esm/deps/jsr.io/@std/path/1.1.4/posix/parse.d.ts +25 -0
  219. package/esm/deps/jsr.io/@std/path/1.1.4/posix/parse.d.ts.map +1 -0
  220. package/esm/deps/jsr.io/@std/path/1.1.4/posix/parse.js +116 -0
  221. package/esm/deps/jsr.io/@std/path/1.1.4/posix/parse.js.map +1 -0
  222. package/esm/deps/jsr.io/@std/path/1.1.4/posix/relative.d.ts +20 -0
  223. package/esm/deps/jsr.io/@std/path/1.1.4/posix/relative.d.ts.map +1 -0
  224. package/esm/deps/jsr.io/@std/path/1.1.4/posix/relative.js +107 -0
  225. package/esm/deps/jsr.io/@std/path/1.1.4/posix/relative.js.map +1 -0
  226. package/esm/deps/jsr.io/@std/path/1.1.4/posix/resolve.d.ts +17 -0
  227. package/esm/deps/jsr.io/@std/path/1.1.4/posix/resolve.d.ts.map +1 -0
  228. package/esm/deps/jsr.io/@std/path/1.1.4/posix/resolve.js +60 -0
  229. package/esm/deps/jsr.io/@std/path/1.1.4/posix/resolve.js.map +1 -0
  230. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts +17 -0
  231. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts.map +1 -0
  232. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.js +28 -0
  233. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.js.map +1 -0
  234. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.d.ts +16 -0
  235. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.d.ts.map +1 -0
  236. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.js +21 -0
  237. package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.js.map +1 -0
  238. package/esm/deps/jsr.io/@std/path/1.1.4/relative.d.ts +24 -0
  239. package/esm/deps/jsr.io/@std/path/1.1.4/relative.d.ts.map +1 -0
  240. package/esm/deps/jsr.io/@std/path/1.1.4/relative.js +31 -0
  241. package/esm/deps/jsr.io/@std/path/1.1.4/relative.js.map +1 -0
  242. package/esm/deps/jsr.io/@std/path/1.1.4/resolve.d.ts +22 -0
  243. package/esm/deps/jsr.io/@std/path/1.1.4/resolve.d.ts.map +1 -0
  244. package/esm/deps/jsr.io/@std/path/1.1.4/resolve.js +31 -0
  245. package/esm/deps/jsr.io/@std/path/1.1.4/resolve.js.map +1 -0
  246. package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts +22 -0
  247. package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts.map +1 -0
  248. package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.js +29 -0
  249. package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.js.map +1 -0
  250. package/esm/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.d.ts +21 -0
  251. package/esm/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.d.ts.map +1 -0
  252. package/esm/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.js +30 -0
  253. package/esm/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.js.map +1 -0
  254. package/esm/deps/jsr.io/@std/path/1.1.4/types.d.ts +38 -0
  255. package/esm/deps/jsr.io/@std/path/1.1.4/types.d.ts.map +1 -0
  256. package/esm/deps/jsr.io/@std/path/1.1.4/types.js +4 -0
  257. package/esm/deps/jsr.io/@std/path/1.1.4/types.js.map +1 -0
  258. package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts +4 -0
  259. package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts.map +1 -0
  260. package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.js +16 -0
  261. package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.js.map +1 -0
  262. package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts +22 -0
  263. package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts.map +1 -0
  264. package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.js +48 -0
  265. package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.js.map +1 -0
  266. package/esm/deps/jsr.io/@std/path/1.1.4/windows/constants.d.ts +13 -0
  267. package/esm/deps/jsr.io/@std/path/1.1.4/windows/constants.d.ts.map +1 -0
  268. package/esm/deps/jsr.io/@std/path/1.1.4/windows/constants.js +15 -0
  269. package/esm/deps/jsr.io/@std/path/1.1.4/windows/constants.js.map +1 -0
  270. package/esm/deps/jsr.io/@std/path/1.1.4/windows/dirname.d.ts +17 -0
  271. package/esm/deps/jsr.io/@std/path/1.1.4/windows/dirname.d.ts.map +1 -0
  272. package/esm/deps/jsr.io/@std/path/1.1.4/windows/dirname.js +114 -0
  273. package/esm/deps/jsr.io/@std/path/1.1.4/windows/dirname.js.map +1 -0
  274. package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts +17 -0
  275. package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts.map +1 -0
  276. package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.js +83 -0
  277. package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.js.map +1 -0
  278. package/esm/deps/jsr.io/@std/path/1.1.4/windows/format.d.ts +24 -0
  279. package/esm/deps/jsr.io/@std/path/1.1.4/windows/format.d.ts.map +1 -0
  280. package/esm/deps/jsr.io/@std/path/1.1.4/windows/format.js +29 -0
  281. package/esm/deps/jsr.io/@std/path/1.1.4/windows/format.js.map +1 -0
  282. package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts +18 -0
  283. package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts.map +1 -0
  284. package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.js +31 -0
  285. package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.js.map +1 -0
  286. package/esm/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.d.ts +71 -0
  287. package/esm/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.d.ts.map +1 -0
  288. package/esm/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.js +83 -0
  289. package/esm/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.js.map +1 -0
  290. package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts +17 -0
  291. package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts.map +1 -0
  292. package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.js +39 -0
  293. package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.js.map +1 -0
  294. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts +18 -0
  295. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts.map +1 -0
  296. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.js +78 -0
  297. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.js.map +1 -0
  298. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join_globs.d.ts +21 -0
  299. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join_globs.d.ts.map +1 -0
  300. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join_globs.js +42 -0
  301. package/esm/deps/jsr.io/@std/path/1.1.4/windows/join_globs.js.map +1 -0
  302. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts +19 -0
  303. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts.map +1 -0
  304. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.js +136 -0
  305. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.js.map +1 -0
  306. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.d.ts +20 -0
  307. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.d.ts.map +1 -0
  308. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.js +33 -0
  309. package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.js.map +1 -0
  310. package/esm/deps/jsr.io/@std/path/1.1.4/windows/parse.d.ts +25 -0
  311. package/esm/deps/jsr.io/@std/path/1.1.4/windows/parse.d.ts.map +1 -0
  312. package/esm/deps/jsr.io/@std/path/1.1.4/windows/parse.js +177 -0
  313. package/esm/deps/jsr.io/@std/path/1.1.4/windows/parse.js.map +1 -0
  314. package/esm/deps/jsr.io/@std/path/1.1.4/windows/relative.d.ts +23 -0
  315. package/esm/deps/jsr.io/@std/path/1.1.4/windows/relative.d.ts.map +1 -0
  316. package/esm/deps/jsr.io/@std/path/1.1.4/windows/relative.js +132 -0
  317. package/esm/deps/jsr.io/@std/path/1.1.4/windows/relative.js.map +1 -0
  318. package/esm/deps/jsr.io/@std/path/1.1.4/windows/resolve.d.ts +17 -0
  319. package/esm/deps/jsr.io/@std/path/1.1.4/windows/resolve.d.ts.map +1 -0
  320. package/esm/deps/jsr.io/@std/path/1.1.4/windows/resolve.js +155 -0
  321. package/esm/deps/jsr.io/@std/path/1.1.4/windows/resolve.js.map +1 -0
  322. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts +17 -0
  323. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts.map +1 -0
  324. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.js +35 -0
  325. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.js.map +1 -0
  326. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.d.ts +17 -0
  327. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.d.ts.map +1 -0
  328. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.js +50 -0
  329. package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.js.map +1 -0
  330. package/esm/main.d.ts +3 -0
  331. package/esm/main.d.ts.map +1 -0
  332. package/esm/main.js +35 -0
  333. package/esm/main.js.map +1 -0
  334. package/esm/mod.d.ts +3 -0
  335. package/esm/mod.d.ts.map +1 -0
  336. package/esm/mod.js +3 -0
  337. package/esm/mod.js.map +1 -0
  338. package/esm/package.json +3 -0
  339. package/esm/staticalize.d.ts +11 -0
  340. package/esm/staticalize.d.ts.map +1 -0
  341. package/esm/staticalize.js +144 -0
  342. package/esm/staticalize.js.map +1 -0
  343. package/esm/task-buffer.d.ts +6 -0
  344. package/esm/task-buffer.d.ts.map +1 -0
  345. package/esm/task-buffer.js +59 -0
  346. package/esm/task-buffer.js.map +1 -0
  347. package/package.json +41 -0
  348. package/src/_dnt.polyfills.ts +283 -0
  349. package/src/_dnt.shims.ts +64 -0
  350. package/src/config.ts +28 -0
  351. package/src/deno.js +42 -0
  352. package/src/deps/jsr.io/@libs/xml/6.0.8/_types.ts +46 -0
  353. package/src/deps/jsr.io/@libs/xml/6.0.8/parse.ts +443 -0
  354. package/src/deps/jsr.io/@libs/xml/6.0.8/stringify.ts +308 -0
  355. package/src/deps/jsr.io/@libs/xml/6.0.8/wasm_xml_parser/wasm_xml_parser.js +2 -0
  356. package/src/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.ts +25 -0
  357. package/src/deps/jsr.io/@std/fs/1.0.22/ensure_dir.ts +110 -0
  358. package/src/deps/jsr.io/@std/internal/1.0.12/_os.ts +15 -0
  359. package/src/deps/jsr.io/@std/internal/1.0.12/os.ts +7 -0
  360. package/src/deps/jsr.io/@std/path/1.1.4/_common/assert_path.ts +10 -0
  361. package/src/deps/jsr.io/@std/path/1.1.4/_common/basename.ts +53 -0
  362. package/src/deps/jsr.io/@std/path/1.1.4/_common/common.ts +26 -0
  363. package/src/deps/jsr.io/@std/path/1.1.4/_common/constants.ts +49 -0
  364. package/src/deps/jsr.io/@std/path/1.1.4/_common/dirname.ts +9 -0
  365. package/src/deps/jsr.io/@std/path/1.1.4/_common/format.ts +25 -0
  366. package/src/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.ts +12 -0
  367. package/src/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.ts +295 -0
  368. package/src/deps/jsr.io/@std/path/1.1.4/_common/normalize.ts +9 -0
  369. package/src/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.ts +74 -0
  370. package/src/deps/jsr.io/@std/path/1.1.4/_common/relative.ts +10 -0
  371. package/src/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.ts +25 -0
  372. package/src/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.ts +17 -0
  373. package/src/deps/jsr.io/@std/path/1.1.4/basename.ts +37 -0
  374. package/src/deps/jsr.io/@std/path/1.1.4/common.ts +35 -0
  375. package/src/deps/jsr.io/@std/path/1.1.4/constants.ts +18 -0
  376. package/src/deps/jsr.io/@std/path/1.1.4/dirname.ts +30 -0
  377. package/src/deps/jsr.io/@std/path/1.1.4/extname.ts +29 -0
  378. package/src/deps/jsr.io/@std/path/1.1.4/format.ts +30 -0
  379. package/src/deps/jsr.io/@std/path/1.1.4/from_file_url.ts +30 -0
  380. package/src/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.ts +94 -0
  381. package/src/deps/jsr.io/@std/path/1.1.4/is_absolute.ts +30 -0
  382. package/src/deps/jsr.io/@std/path/1.1.4/is_glob.ts +49 -0
  383. package/src/deps/jsr.io/@std/path/1.1.4/join.ts +31 -0
  384. package/src/deps/jsr.io/@std/path/1.1.4/join_globs.ts +42 -0
  385. package/src/deps/jsr.io/@std/path/1.1.4/mod.ts +217 -0
  386. package/src/deps/jsr.io/@std/path/1.1.4/normalize.ts +33 -0
  387. package/src/deps/jsr.io/@std/path/1.1.4/normalize_glob.ts +45 -0
  388. package/src/deps/jsr.io/@std/path/1.1.4/parse.ts +44 -0
  389. package/src/deps/jsr.io/@std/path/1.1.4/posix/_util.ts +10 -0
  390. package/src/deps/jsr.io/@std/path/1.1.4/posix/basename.ts +62 -0
  391. package/src/deps/jsr.io/@std/path/1.1.4/posix/constants.ts +15 -0
  392. package/src/deps/jsr.io/@std/path/1.1.4/posix/dirname.ts +72 -0
  393. package/src/deps/jsr.io/@std/path/1.1.4/posix/extname.ts +96 -0
  394. package/src/deps/jsr.io/@std/path/1.1.4/posix/format.ts +31 -0
  395. package/src/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.ts +25 -0
  396. package/src/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.ts +94 -0
  397. package/src/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.ts +25 -0
  398. package/src/deps/jsr.io/@std/path/1.1.4/posix/join.ts +46 -0
  399. package/src/deps/jsr.io/@std/path/1.1.4/posix/join_globs.ts +45 -0
  400. package/src/deps/jsr.io/@std/path/1.1.4/posix/normalize.ts +63 -0
  401. package/src/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.ts +43 -0
  402. package/src/deps/jsr.io/@std/path/1.1.4/posix/parse.ts +121 -0
  403. package/src/deps/jsr.io/@std/path/1.1.4/posix/relative.ts +103 -0
  404. package/src/deps/jsr.io/@std/path/1.1.4/posix/resolve.ts +71 -0
  405. package/src/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.ts +32 -0
  406. package/src/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.ts +21 -0
  407. package/src/deps/jsr.io/@std/path/1.1.4/relative.ts +32 -0
  408. package/src/deps/jsr.io/@std/path/1.1.4/resolve.ts +32 -0
  409. package/src/deps/jsr.io/@std/path/1.1.4/to_file_url.ts +30 -0
  410. package/src/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.ts +31 -0
  411. package/src/deps/jsr.io/@std/path/1.1.4/types.ts +40 -0
  412. package/src/deps/jsr.io/@std/path/1.1.4/windows/_util.ts +28 -0
  413. package/src/deps/jsr.io/@std/path/1.1.4/windows/basename.ts +54 -0
  414. package/src/deps/jsr.io/@std/path/1.1.4/windows/constants.ts +15 -0
  415. package/src/deps/jsr.io/@std/path/1.1.4/windows/dirname.ts +118 -0
  416. package/src/deps/jsr.io/@std/path/1.1.4/windows/extname.ts +90 -0
  417. package/src/deps/jsr.io/@std/path/1.1.4/windows/format.ts +31 -0
  418. package/src/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.ts +34 -0
  419. package/src/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.ts +92 -0
  420. package/src/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.ts +40 -0
  421. package/src/deps/jsr.io/@std/path/1.1.4/windows/join.ts +78 -0
  422. package/src/deps/jsr.io/@std/path/1.1.4/windows/join_globs.ts +46 -0
  423. package/src/deps/jsr.io/@std/path/1.1.4/windows/normalize.ts +136 -0
  424. package/src/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.ts +43 -0
  425. package/src/deps/jsr.io/@std/path/1.1.4/windows/parse.ts +184 -0
  426. package/src/deps/jsr.io/@std/path/1.1.4/windows/relative.ts +128 -0
  427. package/src/deps/jsr.io/@std/path/1.1.4/windows/resolve.ts +178 -0
  428. package/src/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.ts +38 -0
  429. package/src/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.ts +60 -0
  430. package/src/main.ts +37 -0
  431. package/src/mod.ts +2 -0
  432. package/src/staticalize.ts +216 -0
  433. package/src/task-buffer.ts +87 -0
@@ -0,0 +1,63 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+
4
+ import { assertArg } from "../_common/normalize.js";
5
+ import { normalizeString } from "../_common/normalize_string.js";
6
+ import { isPosixPathSeparator } from "./_util.js";
7
+ import { fromFileUrl } from "./from_file_url.js";
8
+
9
+ /**
10
+ * Normalize the `path`, resolving `'..'` and `'.'` segments.
11
+ * Note that resolving these segments does not necessarily mean that all will be eliminated.
12
+ * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`.
13
+ *
14
+ * @example Usage
15
+ * ```ts
16
+ * import { normalize } from "@std/path/posix/normalize";
17
+ * import { assertEquals } from "@std/assert";
18
+ *
19
+ * assertEquals(normalize("/foo/bar//baz/asdf/quux/.."), "/foo/bar/baz/asdf");
20
+ * assertEquals(normalize(new URL("file:///foo/bar//baz/asdf/quux/..")), "/foo/bar/baz/asdf/");
21
+ * ```
22
+ *
23
+ * @example Working with URLs
24
+ *
25
+ * Note: This function will remove the double slashes from a URL's scheme.
26
+ * Hence, do not pass a full URL to this function. Instead, pass the pathname of
27
+ * the URL.
28
+ *
29
+ * ```ts
30
+ * import { normalize } from "@std/path/posix/normalize";
31
+ * import { assertEquals } from "@std/assert";
32
+ *
33
+ * const url = new URL("https://deno.land");
34
+ * url.pathname = normalize("//std//assert//.//mod.ts");
35
+ * assertEquals(url.href, "https://deno.land/std/assert/mod.ts");
36
+ *
37
+ * url.pathname = normalize("std/assert/../async/retry.ts");
38
+ * assertEquals(url.href, "https://deno.land/std/async/retry.ts");
39
+ * ```
40
+ *
41
+ * @param path The path to normalize.
42
+ * @returns The normalized path.
43
+ */
44
+ export function normalize(path: string | URL): string {
45
+ if (path instanceof URL) {
46
+ path = fromFileUrl(path);
47
+ }
48
+ assertArg(path);
49
+
50
+ const isAbsolute = isPosixPathSeparator(path.charCodeAt(0));
51
+ const trailingSeparator = isPosixPathSeparator(
52
+ path.charCodeAt(path.length - 1),
53
+ );
54
+
55
+ // Normalize the path
56
+ path = normalizeString(path, !isAbsolute, "/", isPosixPathSeparator);
57
+
58
+ if (path.length === 0 && !isAbsolute) path = ".";
59
+ if (path.length > 0 && trailingSeparator) path += "/";
60
+
61
+ if (isAbsolute) return `/${path}`;
62
+ return path;
63
+ }
@@ -0,0 +1,43 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+
4
+ import type { GlobOptions } from "../_common/glob_to_reg_exp.js";
5
+ import { normalize } from "./normalize.js";
6
+ import { SEPARATOR_PATTERN } from "./constants.js";
7
+
8
+ export type { GlobOptions };
9
+
10
+ /**
11
+ * Like normalize(), but doesn't collapse "**\/.." when `globstar` is true.
12
+ *
13
+ * @example Usage
14
+ * ```ts
15
+ * import { normalizeGlob } from "@std/path/posix/normalize-glob";
16
+ * import { assertEquals } from "@std/assert";
17
+ *
18
+ * const path = normalizeGlob("foo/bar/../*", { globstar: true });
19
+ * assertEquals(path, "foo/*");
20
+ * ```
21
+ *
22
+ * @param glob The glob to normalize.
23
+ * @param options The options to use.
24
+ * @returns The normalized path.
25
+ */
26
+ export function normalizeGlob(
27
+ glob: string,
28
+ options: Pick<GlobOptions, "globstar"> = {},
29
+ ): string {
30
+ const { globstar = false }: GlobOptions = options;
31
+ if (glob.match(/\0/g)) {
32
+ throw new Error(`Glob contains invalid characters: "${glob}"`);
33
+ }
34
+ if (!globstar) {
35
+ return normalize(glob);
36
+ }
37
+ const s = SEPARATOR_PATTERN.source;
38
+ const badParentPattern = new RegExp(
39
+ `(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`,
40
+ "g",
41
+ );
42
+ return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, "..");
43
+ }
@@ -0,0 +1,121 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+
4
+ import { CHAR_DOT } from "../_common/constants.js";
5
+ import type { ParsedPath } from "../types.js";
6
+ import { stripTrailingSeparators } from "../_common/strip_trailing_separators.js";
7
+ import { assertPath } from "../_common/assert_path.js";
8
+ import { isPosixPathSeparator } from "./_util.js";
9
+
10
+ export type { ParsedPath } from "../types.js";
11
+
12
+ /**
13
+ * Return a `ParsedPath` object of the `path`.
14
+ *
15
+ * @example Usage
16
+ * ```ts
17
+ * import { parse } from "@std/path/posix/parse";
18
+ * import { assertEquals } from "@std/assert";
19
+ *
20
+ * const path = parse("/home/user/file.txt");
21
+ * assertEquals(path, {
22
+ * root: "/",
23
+ * dir: "/home/user",
24
+ * base: "file.txt",
25
+ * ext: ".txt",
26
+ * name: "file"
27
+ * });
28
+ * ```
29
+ *
30
+ * @param path The path to parse.
31
+ * @returns The parsed path object.
32
+ */
33
+ export function parse(path: string): ParsedPath {
34
+ assertPath(path);
35
+
36
+ const ret: ParsedPath = { root: "", dir: "", base: "", ext: "", name: "" };
37
+ if (path.length === 0) return ret;
38
+ const isAbsolute = isPosixPathSeparator(path.charCodeAt(0));
39
+ let start: number;
40
+ if (isAbsolute) {
41
+ ret.root = "/";
42
+ start = 1;
43
+ } else {
44
+ start = 0;
45
+ }
46
+ let startDot = -1;
47
+ let startPart = 0;
48
+ let end = -1;
49
+ let matchedSlash = true;
50
+ let i = path.length - 1;
51
+
52
+ // Track the state of characters (if any) we see before our first dot and
53
+ // after any path separator we find
54
+ let preDotState = 0;
55
+
56
+ // Get non-dir info
57
+ for (; i >= start; --i) {
58
+ const code = path.charCodeAt(i);
59
+ if (isPosixPathSeparator(code)) {
60
+ // If we reached a path separator that was not part of a set of path
61
+ // separators at the end of the string, stop now
62
+ if (!matchedSlash) {
63
+ startPart = i + 1;
64
+ break;
65
+ }
66
+ continue;
67
+ }
68
+ if (end === -1) {
69
+ // We saw the first non-path separator, mark this as the end of our
70
+ // extension
71
+ matchedSlash = false;
72
+ end = i + 1;
73
+ }
74
+ if (code === CHAR_DOT) {
75
+ // If this is our first dot, mark it as the start of our extension
76
+ if (startDot === -1) startDot = i;
77
+ else if (preDotState !== 1) preDotState = 1;
78
+ } else if (startDot !== -1) {
79
+ // We saw a non-dot and non-path separator before our dot, so we should
80
+ // have a good chance at having a non-empty extension
81
+ preDotState = -1;
82
+ }
83
+ }
84
+
85
+ if (
86
+ startDot === -1 ||
87
+ end === -1 ||
88
+ // We saw a non-dot character immediately before the dot
89
+ preDotState === 0 ||
90
+ // The (right-most) trimmed path component is exactly '..'
91
+ (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)
92
+ ) {
93
+ if (end !== -1) {
94
+ if (startPart === 0 && isAbsolute) {
95
+ ret.base = ret.name = path.slice(1, end);
96
+ } else {
97
+ ret.base = ret.name = path.slice(startPart, end);
98
+ }
99
+ }
100
+ // Fallback to '/' in case there is no basename
101
+ ret.base = ret.base || "/";
102
+ } else {
103
+ if (startPart === 0 && isAbsolute) {
104
+ ret.name = path.slice(1, startDot);
105
+ ret.base = path.slice(1, end);
106
+ } else {
107
+ ret.name = path.slice(startPart, startDot);
108
+ ret.base = path.slice(startPart, end);
109
+ }
110
+ ret.ext = path.slice(startDot, end);
111
+ }
112
+
113
+ if (startPart > 0) {
114
+ ret.dir = stripTrailingSeparators(
115
+ path.slice(0, startPart - 1),
116
+ isPosixPathSeparator,
117
+ );
118
+ } else if (isAbsolute) ret.dir = "/";
119
+
120
+ return ret;
121
+ }
@@ -0,0 +1,103 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+
4
+ import { isPosixPathSeparator } from "./_util.js";
5
+ import { resolve } from "./resolve.js";
6
+ import { assertArgs } from "../_common/relative.js";
7
+
8
+ /**
9
+ * Return the relative path from `from` to `to` based on current working directory.
10
+ *
11
+ * If `from` and `to` are the same, return an empty string.
12
+ *
13
+ * @example Usage
14
+ * ```ts
15
+ * import { relative } from "@std/path/posix/relative";
16
+ * import { assertEquals } from "@std/assert";
17
+ *
18
+ * const path = relative("/data/orandea/test/aaa", "/data/orandea/impl/bbb");
19
+ * assertEquals(path, "../../impl/bbb");
20
+ * ```
21
+ *
22
+ * @param from The path to start from.
23
+ * @param to The path to reach.
24
+ * @returns The relative path.
25
+ */
26
+ export function relative(from: string, to: string): string {
27
+ assertArgs(from, to);
28
+
29
+ from = resolve(from);
30
+ to = resolve(to);
31
+
32
+ if (from === to) return "";
33
+
34
+ // Trim any leading backslashes
35
+ let fromStart = 1;
36
+ const fromEnd = from.length;
37
+ for (; fromStart < fromEnd; ++fromStart) {
38
+ if (!isPosixPathSeparator(from.charCodeAt(fromStart))) break;
39
+ }
40
+ const fromLen = fromEnd - fromStart;
41
+
42
+ // Trim any leading backslashes
43
+ let toStart = 1;
44
+ const toEnd = to.length;
45
+ for (; toStart < toEnd; ++toStart) {
46
+ if (!isPosixPathSeparator(to.charCodeAt(toStart))) break;
47
+ }
48
+ const toLen = toEnd - toStart;
49
+
50
+ // Compare paths to find the longest common path from root
51
+ const length = fromLen < toLen ? fromLen : toLen;
52
+ let lastCommonSep = -1;
53
+ let i = 0;
54
+ for (; i <= length; ++i) {
55
+ if (i === length) {
56
+ if (toLen > length) {
57
+ if (isPosixPathSeparator(to.charCodeAt(toStart + i))) {
58
+ // We get here if `from` is the exact base path for `to`.
59
+ // For example: from='/foo/bar'; to='/foo/bar/baz'
60
+ return to.slice(toStart + i + 1);
61
+ } else if (i === 0) {
62
+ // We get here if `from` is the root
63
+ // For example: from='/'; to='/foo'
64
+ return to.slice(toStart + i);
65
+ }
66
+ } else if (fromLen > length) {
67
+ if (isPosixPathSeparator(from.charCodeAt(fromStart + i))) {
68
+ // We get here if `to` is the exact base path for `from`.
69
+ // For example: from='/foo/bar/baz'; to='/foo/bar'
70
+ lastCommonSep = i;
71
+ } else if (i === 0) {
72
+ // We get here if `to` is the root.
73
+ // For example: from='/foo'; to='/'
74
+ lastCommonSep = 0;
75
+ }
76
+ }
77
+ break;
78
+ }
79
+ const fromCode = from.charCodeAt(fromStart + i);
80
+ const toCode = to.charCodeAt(toStart + i);
81
+ if (fromCode !== toCode) break;
82
+ else if (isPosixPathSeparator(fromCode)) lastCommonSep = i;
83
+ }
84
+
85
+ let out = "";
86
+ // Generate the relative path based on the path difference between `to`
87
+ // and `from`
88
+ for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
89
+ if (i === fromEnd || isPosixPathSeparator(from.charCodeAt(i))) {
90
+ if (out.length === 0) out += "..";
91
+ else out += "/..";
92
+ }
93
+ }
94
+
95
+ // Lastly, append the rest of the destination (`to`) path that comes after
96
+ // the common path parts
97
+ if (out.length > 0) return out + to.slice(toStart + lastCommonSep);
98
+ else {
99
+ toStart += lastCommonSep;
100
+ if (isPosixPathSeparator(to.charCodeAt(toStart))) ++toStart;
101
+ return to.slice(toStart);
102
+ }
103
+ }
@@ -0,0 +1,71 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+ import * as dntShim from "../../../../../../_dnt.shims.js";
4
+
5
+
6
+ import { normalizeString } from "../_common/normalize_string.js";
7
+ import { assertPath } from "../_common/assert_path.js";
8
+ import { isPosixPathSeparator } from "./_util.js";
9
+
10
+ /**
11
+ * Resolves path segments into a `path`.
12
+ *
13
+ * @example Usage
14
+ * ```ts
15
+ * import { resolve } from "@std/path/posix/resolve";
16
+ * import { assertEquals } from "@std/assert";
17
+ *
18
+ * const path = resolve("/foo", "bar", "baz/asdf", "quux", "..");
19
+ * assertEquals(path, "/foo/bar/baz/asdf");
20
+ * ```
21
+ *
22
+ * @param pathSegments The path segments to resolve.
23
+ * @returns The resolved path.
24
+ */
25
+ export function resolve(...pathSegments: string[]): string {
26
+ let resolvedPath = "";
27
+ let resolvedAbsolute = false;
28
+
29
+ for (let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
30
+ let path: string;
31
+
32
+ if (i >= 0) path = pathSegments[i]!;
33
+ else {
34
+ // deno-lint-ignore no-explicit-any
35
+ const { Deno } = dntShim.dntGlobalThis as any;
36
+ if (typeof Deno?.cwd !== "function") {
37
+ throw new TypeError(
38
+ "Resolved a relative path without a current working directory (CWD)",
39
+ );
40
+ }
41
+ path = Deno.cwd();
42
+ }
43
+
44
+ assertPath(path);
45
+
46
+ // Skip empty entries
47
+ if (path.length === 0) {
48
+ continue;
49
+ }
50
+
51
+ resolvedPath = `${path}/${resolvedPath}`;
52
+ resolvedAbsolute = isPosixPathSeparator(path.charCodeAt(0));
53
+ }
54
+
55
+ // At this point the path should be resolved to a full absolute path, but
56
+ // handle relative paths to be safe (might happen when Deno.cwd() fails)
57
+
58
+ // Normalize the path
59
+ resolvedPath = normalizeString(
60
+ resolvedPath,
61
+ !resolvedAbsolute,
62
+ "/",
63
+ isPosixPathSeparator,
64
+ );
65
+
66
+ if (resolvedAbsolute) {
67
+ if (resolvedPath.length > 0) return `/${resolvedPath}`;
68
+ else return "/";
69
+ } else if (resolvedPath.length > 0) return resolvedPath;
70
+ else return ".";
71
+ }
@@ -0,0 +1,32 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+
4
+ import { encodeWhitespace } from "../_common/to_file_url.js";
5
+ import { isAbsolute } from "./is_absolute.js";
6
+
7
+ /**
8
+ * Converts a path string to a file URL.
9
+ *
10
+ * @example Usage
11
+ * ```ts
12
+ * import { toFileUrl } from "@std/path/posix/to-file-url";
13
+ * import { assertEquals } from "@std/assert";
14
+ *
15
+ * assertEquals(toFileUrl("/home/foo"), new URL("file:///home/foo"));
16
+ * assertEquals(toFileUrl("/home/foo bar"), new URL("file:///home/foo%20bar"));
17
+ * ```
18
+ *
19
+ * @param path The path to convert.
20
+ * @returns The file URL.
21
+ */
22
+ export function toFileUrl(path: string): URL {
23
+ if (!isAbsolute(path)) {
24
+ throw new TypeError(`Path must be absolute: received "${path}"`);
25
+ }
26
+
27
+ const url = new URL("file:///");
28
+ url.pathname = encodeWhitespace(
29
+ path.replace(/%/g, "%25").replace(/\\/g, "%5C"),
30
+ );
31
+ return url;
32
+ }
@@ -0,0 +1,21 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+
4
+ /**
5
+ * Converts a path to a namespaced path. This function returns the path as is on posix.
6
+ *
7
+ * @example Usage
8
+ * ```ts
9
+ * import { toNamespacedPath } from "@std/path/posix/to-namespaced-path";
10
+ * import { assertEquals } from "@std/assert";
11
+ *
12
+ * assertEquals(toNamespacedPath("/home/foo"), "/home/foo");
13
+ * ```
14
+ *
15
+ * @param path The path.
16
+ * @returns The namespaced path.
17
+ */
18
+ export function toNamespacedPath(path: string): string {
19
+ // Non-op on posix systems
20
+ return path;
21
+ }
@@ -0,0 +1,32 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+
4
+ import { isWindows } from "../../internal/1.0.12/os.js";
5
+ import { relative as posixRelative } from "./posix/relative.js";
6
+ import { relative as windowsRelative } from "./windows/relative.js";
7
+
8
+ /**
9
+ * Return the relative path from `from` to `to` based on current working
10
+ * directory.
11
+ *
12
+ * @example Usage
13
+ * ```ts
14
+ * import { relative } from "@std/path/relative";
15
+ * import { assertEquals } from "@std/assert";
16
+ *
17
+ * if (Deno.build.os === "windows") {
18
+ * const path = relative("C:\\foobar\\test\\aaa", "C:\\foobar\\impl\\bbb");
19
+ * assertEquals(path, "..\\..\\impl\\bbb");
20
+ * } else {
21
+ * const path = relative("/data/foobar/test/aaa", "/data/foobar/impl/bbb");
22
+ * assertEquals(path, "../../impl/bbb");
23
+ * }
24
+ * ```
25
+ *
26
+ * @param from Path in current working directory.
27
+ * @param to Path in current working directory.
28
+ * @returns The relative path from `from` to `to`.
29
+ */
30
+ export function relative(from: string, to: string): string {
31
+ return isWindows ? windowsRelative(from, to) : posixRelative(from, to);
32
+ }
@@ -0,0 +1,32 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+
4
+ import { isWindows } from "../../internal/1.0.12/os.js";
5
+ import { resolve as posixResolve } from "./posix/resolve.js";
6
+ import { resolve as windowsResolve } from "./windows/resolve.js";
7
+
8
+ /**
9
+ * Resolves path segments into a path.
10
+ *
11
+ * @example Usage
12
+ * ```ts
13
+ * import { resolve } from "@std/path/resolve";
14
+ * import { assertEquals } from "@std/assert";
15
+ *
16
+ * if (Deno.build.os === "windows") {
17
+ * assertEquals(resolve("C:\\foo", "bar", "baz"), "C:\\foo\\bar\\baz");
18
+ * assertEquals(resolve("C:\\foo", "C:\\bar", "baz"), "C:\\bar\\baz");
19
+ * } else {
20
+ * assertEquals(resolve("/foo", "bar", "baz"), "/foo/bar/baz");
21
+ * assertEquals(resolve("/foo", "/bar", "baz"), "/bar/baz");
22
+ * }
23
+ * ```
24
+ *
25
+ * @param pathSegments Path segments to process to path.
26
+ * @returns The resolved path.
27
+ */
28
+ export function resolve(...pathSegments: string[]): string {
29
+ return isWindows
30
+ ? windowsResolve(...pathSegments)
31
+ : posixResolve(...pathSegments);
32
+ }
@@ -0,0 +1,30 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+
4
+ import { isWindows } from "../../internal/1.0.12/os.js";
5
+ import { toFileUrl as posixToFileUrl } from "./posix/to_file_url.js";
6
+ import { toFileUrl as windowsToFileUrl } from "./windows/to_file_url.js";
7
+
8
+ /**
9
+ * Converts a path string to a file URL.
10
+ *
11
+ * @example Usage
12
+ * ```ts
13
+ * import { toFileUrl } from "@std/path/to-file-url";
14
+ * import { assertEquals } from "@std/assert";
15
+ *
16
+ * if (Deno.build.os === "windows") {
17
+ * assertEquals(toFileUrl("\\home\\foo"), new URL("file:///home/foo"));
18
+ * assertEquals(toFileUrl("C:\\Users\\foo"), new URL("file:///C:/Users/foo"));
19
+ * assertEquals(toFileUrl("\\\\127.0.0.1\\home\\foo"), new URL("file://127.0.0.1/home/foo"));
20
+ * } else {
21
+ * assertEquals(toFileUrl("/home/foo"), new URL("file:///home/foo"));
22
+ * }
23
+ * ```
24
+ *
25
+ * @param path Path to convert to file URL.
26
+ * @returns The file URL equivalent to the path.
27
+ */
28
+ export function toFileUrl(path: string): URL {
29
+ return isWindows ? windowsToFileUrl(path) : posixToFileUrl(path);
30
+ }
@@ -0,0 +1,31 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+
4
+ import { isWindows } from "../../internal/1.0.12/os.js";
5
+ import { toNamespacedPath as posixToNamespacedPath } from "./posix/to_namespaced_path.js";
6
+ import { toNamespacedPath as windowsToNamespacedPath } from "./windows/to_namespaced_path.js";
7
+
8
+ /**
9
+ * Resolves path to a namespace path. This is a no-op on
10
+ * non-windows systems.
11
+ *
12
+ * @example Usage
13
+ * ```ts
14
+ * import { toNamespacedPath } from "@std/path/to-namespaced-path";
15
+ * import { assertEquals } from "@std/assert";
16
+ *
17
+ * if (Deno.build.os === "windows") {
18
+ * assertEquals(toNamespacedPath("C:\\foo\\bar"), "\\\\?\\C:\\foo\\bar");
19
+ * } else {
20
+ * assertEquals(toNamespacedPath("/foo/bar"), "/foo/bar");
21
+ * }
22
+ * ```
23
+ *
24
+ * @param path Path to resolve to namespace.
25
+ * @returns The resolved namespace path.
26
+ */
27
+ export function toNamespacedPath(path: string): string {
28
+ return isWindows
29
+ ? windowsToNamespacedPath(path)
30
+ : posixToNamespacedPath(path);
31
+ }
@@ -0,0 +1,40 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+
4
+ /**
5
+ * A parsed path object generated by path.parse() or consumed by path.format().
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { parse } from "@std/path";
10
+ *
11
+ * const parsedPathObj = parse("c:\\path\\dir\\index.html");
12
+ * parsedPathObj.root; // "c:\\"
13
+ * parsedPathObj.dir; // "c:\\path\\dir"
14
+ * parsedPathObj.base; // "index.html"
15
+ * parsedPathObj.ext; // ".html"
16
+ * parsedPathObj.name; // "index"
17
+ * ```
18
+ */
19
+ export interface ParsedPath {
20
+ /**
21
+ * The root of the path such as '/' or 'c:\'
22
+ */
23
+ root: string;
24
+ /**
25
+ * The full directory path of the parent such as '/home/user/dir' or 'c:\path\dir'
26
+ */
27
+ dir: string;
28
+ /**
29
+ * The file name including extension (if any) such as 'index.html'
30
+ */
31
+ base: string;
32
+ /**
33
+ * The file extension (if any) such as '.html'
34
+ */
35
+ ext: string;
36
+ /**
37
+ * The file name without extension (if any) such as 'index'
38
+ */
39
+ name: string;
40
+ }
@@ -0,0 +1,28 @@
1
+ // Copyright 2018-2025 the Deno authors. 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
+
6
+ import {
7
+ CHAR_BACKWARD_SLASH,
8
+ CHAR_FORWARD_SLASH,
9
+ CHAR_LOWERCASE_A,
10
+ CHAR_LOWERCASE_Z,
11
+ CHAR_UPPERCASE_A,
12
+ CHAR_UPPERCASE_Z,
13
+ } from "../_common/constants.js";
14
+
15
+ export function isPosixPathSeparator(code: number): boolean {
16
+ return code === CHAR_FORWARD_SLASH;
17
+ }
18
+
19
+ export function isPathSeparator(code: number): boolean {
20
+ return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
21
+ }
22
+
23
+ export function isWindowsDeviceRoot(code: number): boolean {
24
+ return (
25
+ (code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z) ||
26
+ (code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z)
27
+ );
28
+ }