ventojs 0.12.2 → 0.12.4

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 (376) hide show
  1. package/esm/_dnt.shims.d.ts +1 -0
  2. package/esm/_dnt.shims.d.ts.map +1 -0
  3. package/esm/_dnt.test_polyfills.d.ts.map +1 -0
  4. package/esm/_dnt.test_shims.d.ts.map +1 -0
  5. package/esm/deps/deno.land/std@0.221.0/assert/_constants.d.ts.map +1 -0
  6. package/esm/deps/deno.land/std@0.221.0/assert/_diff.d.ts.map +1 -0
  7. package/esm/deps/deno.land/std@0.221.0/assert/_format.d.ts.map +1 -0
  8. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/assert/assert.d.ts +1 -0
  9. package/esm/deps/deno.land/std@0.221.0/assert/assert.d.ts.map +1 -0
  10. package/esm/deps/deno.land/std@0.221.0/assert/assert_equals.d.ts.map +1 -0
  11. package/esm/deps/deno.land/std@0.221.0/assert/assert_is_error.d.ts.map +1 -0
  12. package/esm/deps/deno.land/std@0.221.0/assert/assert_throws.d.ts.map +1 -0
  13. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/assert/assertion_error.d.ts +1 -0
  14. package/esm/deps/deno.land/std@0.221.0/assert/assertion_error.d.ts.map +1 -0
  15. package/esm/deps/deno.land/std@0.221.0/assert/equal.d.ts.map +1 -0
  16. package/esm/deps/deno.land/std@0.221.0/collections/_utils.d.ts.map +1 -0
  17. package/esm/deps/deno.land/std@0.221.0/collections/deep_merge.d.ts.map +1 -0
  18. package/esm/deps/deno.land/std@0.221.0/fmt/colors.d.ts.map +1 -0
  19. package/esm/deps/deno.land/std@0.221.0/front_matter/_formats.d.ts.map +1 -0
  20. package/esm/deps/deno.land/std@0.221.0/front_matter/create_extractor.d.ts.map +1 -0
  21. package/esm/deps/deno.land/std@0.221.0/front_matter/json.d.ts.map +1 -0
  22. package/esm/deps/deno.land/std@0.221.0/front_matter/mod.d.ts.map +1 -0
  23. package/esm/deps/deno.land/std@0.221.0/front_matter/test.d.ts.map +1 -0
  24. package/esm/deps/deno.land/std@0.221.0/front_matter/toml.d.ts.map +1 -0
  25. package/esm/deps/deno.land/std@0.221.0/front_matter/yaml.d.ts.map +1 -0
  26. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/html/entities.d.ts +1 -0
  27. package/esm/deps/deno.land/std@0.221.0/html/entities.d.ts.map +1 -0
  28. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/html/mod.d.ts +1 -0
  29. package/esm/deps/deno.land/std@0.221.0/html/mod.d.ts.map +1 -0
  30. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/assert_path.d.ts +1 -0
  31. package/esm/deps/deno.land/std@0.221.0/path/_common/assert_path.d.ts.map +1 -0
  32. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/basename.d.ts +1 -0
  33. package/esm/deps/deno.land/std@0.221.0/path/_common/basename.d.ts.map +1 -0
  34. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/common.d.ts +1 -0
  35. package/esm/deps/deno.land/std@0.221.0/path/_common/common.d.ts.map +1 -0
  36. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/constants.d.ts +1 -0
  37. package/esm/deps/deno.land/std@0.221.0/path/_common/constants.d.ts.map +1 -0
  38. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/dirname.d.ts +1 -0
  39. package/esm/deps/deno.land/std@0.221.0/path/_common/dirname.d.ts.map +1 -0
  40. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/format.d.ts +1 -0
  41. package/esm/deps/deno.land/std@0.221.0/path/_common/format.d.ts.map +1 -0
  42. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/from_file_url.d.ts +1 -0
  43. package/esm/deps/deno.land/std@0.221.0/path/_common/from_file_url.d.ts.map +1 -0
  44. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/glob_to_reg_exp.d.ts +1 -0
  45. package/esm/deps/deno.land/std@0.221.0/path/_common/glob_to_reg_exp.d.ts.map +1 -0
  46. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/normalize.d.ts +1 -0
  47. package/esm/deps/deno.land/std@0.221.0/path/_common/normalize.d.ts.map +1 -0
  48. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/normalize_string.d.ts +1 -0
  49. package/esm/deps/deno.land/std@0.221.0/path/_common/normalize_string.d.ts.map +1 -0
  50. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/normalize_string.js +2 -2
  51. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/relative.d.ts +1 -0
  52. package/esm/deps/deno.land/std@0.221.0/path/_common/relative.d.ts.map +1 -0
  53. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/strip_trailing_separators.d.ts +1 -0
  54. package/esm/deps/deno.land/std@0.221.0/path/_common/strip_trailing_separators.d.ts.map +1 -0
  55. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/to_file_url.d.ts +1 -0
  56. package/esm/deps/deno.land/std@0.221.0/path/_common/to_file_url.d.ts.map +1 -0
  57. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_interface.d.ts +14 -1
  58. package/esm/deps/deno.land/std@0.221.0/path/_interface.d.ts.map +1 -0
  59. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_os.d.ts +1 -0
  60. package/esm/deps/deno.land/std@0.221.0/path/_os.d.ts.map +1 -0
  61. package/esm/deps/deno.land/std@0.221.0/path/basename.d.ts +18 -0
  62. package/esm/deps/deno.land/std@0.221.0/path/basename.d.ts.map +1 -0
  63. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/basename.js +9 -0
  64. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/common.d.ts +1 -0
  65. package/esm/deps/deno.land/std@0.221.0/path/common.d.ts.map +1 -0
  66. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/constants.d.ts +1 -0
  67. package/esm/deps/deno.land/std@0.221.0/path/constants.d.ts.map +1 -0
  68. package/esm/deps/deno.land/{std@0.219.1/path/posix → std@0.221.0/path}/dirname.d.ts +1 -0
  69. package/esm/deps/deno.land/std@0.221.0/path/dirname.d.ts.map +1 -0
  70. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/extname.d.ts +1 -0
  71. package/esm/deps/deno.land/std@0.221.0/path/extname.d.ts.map +1 -0
  72. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/format.d.ts +4 -1
  73. package/esm/deps/deno.land/std@0.221.0/path/format.d.ts.map +1 -0
  74. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/format.js +3 -1
  75. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/from_file_url.d.ts +1 -0
  76. package/esm/deps/deno.land/std@0.221.0/path/from_file_url.d.ts.map +1 -0
  77. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/glob_to_regexp.d.ts +1 -0
  78. package/esm/deps/deno.land/std@0.221.0/path/glob_to_regexp.d.ts.map +1 -0
  79. package/esm/deps/deno.land/{std@0.219.1/path/posix → std@0.221.0/path}/is_absolute.d.ts +1 -0
  80. package/esm/deps/deno.land/std@0.221.0/path/is_absolute.d.ts.map +1 -0
  81. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/is_glob.d.ts +1 -0
  82. package/esm/deps/deno.land/std@0.221.0/path/is_glob.d.ts.map +1 -0
  83. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/join.d.ts +1 -0
  84. package/esm/deps/deno.land/std@0.221.0/path/join.d.ts.map +1 -0
  85. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/join_globs.d.ts +1 -0
  86. package/esm/deps/deno.land/std@0.221.0/path/join_globs.d.ts.map +1 -0
  87. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/mod.d.ts +1 -0
  88. package/esm/deps/deno.land/std@0.221.0/path/mod.d.ts.map +1 -0
  89. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/normalize.d.ts +1 -0
  90. package/esm/deps/deno.land/std@0.221.0/path/normalize.d.ts.map +1 -0
  91. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/normalize_glob.d.ts +1 -0
  92. package/esm/deps/deno.land/std@0.221.0/path/normalize_glob.d.ts.map +1 -0
  93. package/esm/deps/deno.land/std@0.221.0/path/parse.d.ts +19 -0
  94. package/esm/deps/deno.land/std@0.221.0/path/parse.d.ts.map +1 -0
  95. package/esm/deps/deno.land/std@0.221.0/path/parse.js +24 -0
  96. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/_util.d.ts +1 -0
  97. package/esm/deps/deno.land/std@0.221.0/path/posix/_util.d.ts.map +1 -0
  98. package/esm/deps/deno.land/std@0.221.0/path/posix/basename.d.ts +18 -0
  99. package/esm/deps/deno.land/std@0.221.0/path/posix/basename.d.ts.map +1 -0
  100. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/basename.js +9 -0
  101. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/common.d.ts +1 -0
  102. package/esm/deps/deno.land/std@0.221.0/path/posix/common.d.ts.map +1 -0
  103. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/constants.d.ts +1 -0
  104. package/esm/deps/deno.land/std@0.221.0/path/posix/constants.d.ts.map +1 -0
  105. package/esm/deps/deno.land/std@0.221.0/path/posix/dirname.d.ts +15 -0
  106. package/esm/deps/deno.land/std@0.221.0/path/posix/dirname.d.ts.map +1 -0
  107. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/dirname.js +9 -0
  108. package/esm/deps/deno.land/std@0.221.0/path/posix/extname.d.ts +16 -0
  109. package/esm/deps/deno.land/std@0.221.0/path/posix/extname.d.ts.map +1 -0
  110. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/extname.js +9 -0
  111. package/esm/deps/deno.land/{std@0.219.1/path/windows → std@0.221.0/path/posix}/format.d.ts +1 -0
  112. package/esm/deps/deno.land/std@0.221.0/path/posix/format.d.ts.map +1 -0
  113. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/from_file_url.d.ts +1 -0
  114. package/esm/deps/deno.land/std@0.221.0/path/posix/from_file_url.d.ts.map +1 -0
  115. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/glob_to_regexp.d.ts +1 -0
  116. package/esm/deps/deno.land/std@0.221.0/path/posix/glob_to_regexp.d.ts.map +1 -0
  117. package/esm/deps/deno.land/{std@0.219.1/path/windows → std@0.221.0/path/posix}/is_absolute.d.ts +1 -0
  118. package/esm/deps/deno.land/std@0.221.0/path/posix/is_absolute.d.ts.map +1 -0
  119. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/is_glob.d.ts +1 -0
  120. package/esm/deps/deno.land/std@0.221.0/path/posix/is_glob.d.ts.map +1 -0
  121. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/join.d.ts +1 -0
  122. package/esm/deps/deno.land/std@0.221.0/path/posix/join.d.ts.map +1 -0
  123. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/join.js +1 -1
  124. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/join_globs.d.ts +1 -0
  125. package/esm/deps/deno.land/std@0.221.0/path/posix/join_globs.d.ts.map +1 -0
  126. package/esm/deps/deno.land/{std@0.219.1/path/windows → std@0.221.0/path/posix}/mod.d.ts +1 -0
  127. package/esm/deps/deno.land/std@0.221.0/path/posix/mod.d.ts.map +1 -0
  128. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/normalize.d.ts +1 -0
  129. package/esm/deps/deno.land/std@0.221.0/path/posix/normalize.d.ts.map +1 -0
  130. package/esm/deps/deno.land/{std@0.219.1/path/windows → std@0.221.0/path/posix}/normalize_glob.d.ts +1 -0
  131. package/esm/deps/deno.land/std@0.221.0/path/posix/normalize_glob.d.ts.map +1 -0
  132. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/parse.d.ts +1 -0
  133. package/esm/deps/deno.land/std@0.221.0/path/posix/parse.d.ts.map +1 -0
  134. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/relative.d.ts +1 -0
  135. package/esm/deps/deno.land/std@0.221.0/path/posix/relative.d.ts.map +1 -0
  136. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/resolve.d.ts +1 -0
  137. package/esm/deps/deno.land/std@0.221.0/path/posix/resolve.d.ts.map +1 -0
  138. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/to_file_url.d.ts +1 -0
  139. package/esm/deps/deno.land/std@0.221.0/path/posix/to_file_url.d.ts.map +1 -0
  140. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/to_namespaced_path.d.ts +1 -0
  141. package/esm/deps/deno.land/std@0.221.0/path/posix/to_namespaced_path.d.ts.map +1 -0
  142. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/relative.d.ts +1 -0
  143. package/esm/deps/deno.land/std@0.221.0/path/relative.d.ts.map +1 -0
  144. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/resolve.d.ts +1 -0
  145. package/esm/deps/deno.land/std@0.221.0/path/resolve.d.ts.map +1 -0
  146. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/to_file_url.d.ts +1 -0
  147. package/esm/deps/deno.land/std@0.221.0/path/to_file_url.d.ts.map +1 -0
  148. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/to_namespaced_path.d.ts +1 -0
  149. package/esm/deps/deno.land/std@0.221.0/path/to_namespaced_path.d.ts.map +1 -0
  150. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/_util.d.ts +1 -0
  151. package/esm/deps/deno.land/std@0.221.0/path/windows/_util.d.ts.map +1 -0
  152. package/esm/deps/deno.land/std@0.221.0/path/windows/basename.d.ts +18 -0
  153. package/esm/deps/deno.land/std@0.221.0/path/windows/basename.d.ts.map +1 -0
  154. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/basename.js +9 -0
  155. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/common.d.ts +1 -0
  156. package/esm/deps/deno.land/std@0.221.0/path/windows/common.d.ts.map +1 -0
  157. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/constants.d.ts +1 -0
  158. package/esm/deps/deno.land/std@0.221.0/path/windows/constants.d.ts.map +1 -0
  159. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/dirname.d.ts +1 -0
  160. package/esm/deps/deno.land/std@0.221.0/path/windows/dirname.d.ts.map +1 -0
  161. package/esm/deps/deno.land/{std@0.219.1/path/posix → std@0.221.0/path/windows}/extname.d.ts +1 -0
  162. package/esm/deps/deno.land/std@0.221.0/path/windows/extname.d.ts.map +1 -0
  163. package/esm/deps/deno.land/{std@0.219.1/path/posix → std@0.221.0/path/windows}/format.d.ts +1 -0
  164. package/esm/deps/deno.land/std@0.221.0/path/windows/format.d.ts.map +1 -0
  165. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/from_file_url.d.ts +1 -0
  166. package/esm/deps/deno.land/std@0.221.0/path/windows/from_file_url.d.ts.map +1 -0
  167. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/glob_to_regexp.d.ts +1 -0
  168. package/esm/deps/deno.land/std@0.221.0/path/windows/glob_to_regexp.d.ts.map +1 -0
  169. package/esm/deps/deno.land/{std@0.219.1/path → std@0.221.0/path/windows}/is_absolute.d.ts +1 -0
  170. package/esm/deps/deno.land/std@0.221.0/path/windows/is_absolute.d.ts.map +1 -0
  171. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/is_glob.d.ts +1 -0
  172. package/esm/deps/deno.land/std@0.221.0/path/windows/is_glob.d.ts.map +1 -0
  173. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/join.d.ts +1 -0
  174. package/esm/deps/deno.land/std@0.221.0/path/windows/join.d.ts.map +1 -0
  175. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/join_globs.d.ts +1 -0
  176. package/esm/deps/deno.land/std@0.221.0/path/windows/join_globs.d.ts.map +1 -0
  177. package/esm/deps/deno.land/{std@0.219.1/path/posix → std@0.221.0/path/windows}/mod.d.ts +1 -0
  178. package/esm/deps/deno.land/std@0.221.0/path/windows/mod.d.ts.map +1 -0
  179. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/normalize.d.ts +1 -0
  180. package/esm/deps/deno.land/std@0.221.0/path/windows/normalize.d.ts.map +1 -0
  181. package/esm/deps/deno.land/{std@0.219.1/path/posix → std@0.221.0/path/windows}/normalize_glob.d.ts +1 -0
  182. package/esm/deps/deno.land/std@0.221.0/path/windows/normalize_glob.d.ts.map +1 -0
  183. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/parse.d.ts +1 -0
  184. package/esm/deps/deno.land/std@0.221.0/path/windows/parse.d.ts.map +1 -0
  185. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/relative.d.ts +1 -0
  186. package/esm/deps/deno.land/std@0.221.0/path/windows/relative.d.ts.map +1 -0
  187. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/resolve.d.ts +1 -0
  188. package/esm/deps/deno.land/std@0.221.0/path/windows/resolve.d.ts.map +1 -0
  189. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/to_file_url.d.ts +1 -0
  190. package/esm/deps/deno.land/std@0.221.0/path/windows/to_file_url.d.ts.map +1 -0
  191. package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/to_namespaced_path.d.ts +1 -0
  192. package/esm/deps/deno.land/std@0.221.0/path/windows/to_namespaced_path.d.ts.map +1 -0
  193. package/esm/deps/deno.land/std@0.221.0/toml/_parser.d.ts.map +1 -0
  194. package/esm/deps/deno.land/std@0.221.0/toml/parse.d.ts.map +1 -0
  195. package/esm/deps/deno.land/std@0.221.0/yaml/_error.d.ts.map +1 -0
  196. package/esm/deps/deno.land/std@0.221.0/yaml/_loader/loader.d.ts.map +1 -0
  197. package/esm/deps/deno.land/std@0.221.0/yaml/_loader/loader_state.d.ts.map +1 -0
  198. package/esm/deps/deno.land/std@0.221.0/yaml/_mark.d.ts.map +1 -0
  199. package/esm/deps/deno.land/std@0.221.0/yaml/_state.d.ts.map +1 -0
  200. package/esm/deps/deno.land/std@0.221.0/yaml/_type/binary.d.ts.map +1 -0
  201. package/esm/deps/deno.land/std@0.221.0/yaml/_type/bool.d.ts.map +1 -0
  202. package/esm/deps/deno.land/std@0.221.0/yaml/_type/float.d.ts.map +1 -0
  203. package/esm/deps/deno.land/std@0.221.0/yaml/_type/function.d.ts.map +1 -0
  204. package/esm/deps/deno.land/std@0.221.0/yaml/_type/int.d.ts.map +1 -0
  205. package/esm/deps/deno.land/std@0.221.0/yaml/_type/map.d.ts.map +1 -0
  206. package/esm/deps/deno.land/std@0.221.0/yaml/_type/merge.d.ts.map +1 -0
  207. package/esm/deps/deno.land/std@0.221.0/yaml/_type/mod.d.ts.map +1 -0
  208. package/esm/deps/deno.land/std@0.221.0/yaml/_type/nil.d.ts.map +1 -0
  209. package/esm/deps/deno.land/std@0.221.0/yaml/_type/omap.d.ts.map +1 -0
  210. package/esm/deps/deno.land/std@0.221.0/yaml/_type/pairs.d.ts.map +1 -0
  211. package/esm/deps/deno.land/std@0.221.0/yaml/_type/regexp.d.ts.map +1 -0
  212. package/esm/deps/deno.land/std@0.221.0/yaml/_type/seq.d.ts.map +1 -0
  213. package/esm/deps/deno.land/std@0.221.0/yaml/_type/set.d.ts.map +1 -0
  214. package/esm/deps/deno.land/std@0.221.0/yaml/_type/str.d.ts.map +1 -0
  215. package/esm/deps/deno.land/std@0.221.0/yaml/_type/timestamp.d.ts.map +1 -0
  216. package/esm/deps/deno.land/std@0.221.0/yaml/_type/undefined.d.ts.map +1 -0
  217. package/esm/deps/deno.land/std@0.221.0/yaml/_utils.d.ts.map +1 -0
  218. package/esm/deps/deno.land/std@0.221.0/yaml/parse.d.ts.map +1 -0
  219. package/esm/deps/deno.land/std@0.221.0/yaml/schema/core.d.ts.map +1 -0
  220. package/esm/deps/deno.land/std@0.221.0/yaml/schema/default.d.ts.map +1 -0
  221. package/esm/deps/deno.land/std@0.221.0/yaml/schema/extended.d.ts.map +1 -0
  222. package/esm/deps/deno.land/std@0.221.0/yaml/schema/failsafe.d.ts.map +1 -0
  223. package/esm/deps/deno.land/std@0.221.0/yaml/schema/json.d.ts.map +1 -0
  224. package/esm/deps/deno.land/std@0.221.0/yaml/schema/mod.d.ts.map +1 -0
  225. package/esm/deps/deno.land/std@0.221.0/yaml/schema.d.ts.map +1 -0
  226. package/esm/deps/deno.land/std@0.221.0/yaml/type.d.ts.map +1 -0
  227. package/esm/deps/deno.land/x/astring@v1.8.6/src/astring.d.ts +110 -0
  228. package/esm/deps/deno.land/x/astring@v1.8.6/src/astring.d.ts.map +1 -0
  229. package/esm/deps/deno.land/x/astring@v1.8.6/src/astring.js +1159 -0
  230. package/esm/deps.d.ts +3 -2
  231. package/esm/deps.d.ts.map +1 -0
  232. package/esm/deps.js +2 -2
  233. package/esm/mod.d.ts +1 -0
  234. package/esm/mod.d.ts.map +1 -0
  235. package/esm/plugins/auto_trim.d.ts +1 -0
  236. package/esm/plugins/auto_trim.d.ts.map +1 -0
  237. package/esm/plugins/echo.d.ts +1 -0
  238. package/esm/plugins/echo.d.ts.map +1 -0
  239. package/esm/plugins/escape.d.ts +1 -0
  240. package/esm/plugins/escape.d.ts.map +1 -0
  241. package/esm/plugins/export.d.ts +1 -0
  242. package/esm/plugins/export.d.ts.map +1 -0
  243. package/esm/plugins/for.d.ts +1 -0
  244. package/esm/plugins/for.d.ts.map +1 -0
  245. package/esm/plugins/function.d.ts +1 -0
  246. package/esm/plugins/function.d.ts.map +1 -0
  247. package/esm/plugins/if.d.ts +1 -0
  248. package/esm/plugins/if.d.ts.map +1 -0
  249. package/esm/plugins/import.d.ts +1 -0
  250. package/esm/plugins/import.d.ts.map +1 -0
  251. package/esm/plugins/include.d.ts +1 -0
  252. package/esm/plugins/include.d.ts.map +1 -0
  253. package/esm/plugins/include.js +14 -6
  254. package/esm/plugins/js.d.ts +1 -0
  255. package/esm/plugins/js.d.ts.map +1 -0
  256. package/esm/plugins/layout.d.ts +1 -0
  257. package/esm/plugins/layout.d.ts.map +1 -0
  258. package/esm/plugins/set.d.ts +1 -0
  259. package/esm/plugins/set.d.ts.map +1 -0
  260. package/esm/plugins/trim.d.ts +1 -0
  261. package/esm/plugins/trim.d.ts.map +1 -0
  262. package/esm/plugins/unescape.d.ts +1 -0
  263. package/esm/plugins/unescape.d.ts.map +1 -0
  264. package/esm/src/environment.d.ts +55 -0
  265. package/esm/src/environment.d.ts.map +1 -0
  266. package/esm/src/environment.js +200 -0
  267. package/esm/src/js.d.ts +5 -0
  268. package/esm/src/js.d.ts.map +1 -0
  269. package/esm/src/js.js +150 -0
  270. package/esm/src/loader.d.ts +15 -0
  271. package/esm/src/loader.d.ts.map +1 -0
  272. package/esm/src/loader.js +19 -0
  273. package/esm/src/tokenizer.d.ts +14 -0
  274. package/esm/src/tokenizer.d.ts.map +1 -0
  275. package/esm/src/tokenizer.js +92 -0
  276. package/esm/src/transformer.d.ts +2 -0
  277. package/esm/src/transformer.d.ts.map +1 -0
  278. package/esm/src/transformer.js +196 -0
  279. package/esm/test/auto_trim.test.d.ts.map +1 -0
  280. package/esm/test/comment.test.d.ts.map +1 -0
  281. package/esm/test/compile.test.d.ts.map +1 -0
  282. package/esm/test/echo.test.d.ts.map +1 -0
  283. package/esm/test/escape.test.d.ts.map +1 -0
  284. package/esm/test/for.test.d.ts.map +1 -0
  285. package/esm/test/function.test.d.ts.map +1 -0
  286. package/esm/test/if.test.d.ts.map +1 -0
  287. package/esm/test/import.test.d.ts.map +1 -0
  288. package/esm/test/include.test.d.ts.map +1 -0
  289. package/esm/test/js.test.d.ts.map +1 -0
  290. package/esm/test/layout.test.d.ts.map +1 -0
  291. package/esm/test/print.test.d.ts.map +1 -0
  292. package/esm/test/safe.test.d.ts.map +1 -0
  293. package/esm/test/set.test.d.ts.map +1 -0
  294. package/esm/test/tokenizer.test.d.ts.map +1 -0
  295. package/esm/test/unescape.test.d.ts.map +1 -0
  296. package/esm/test/utils.d.ts.map +1 -0
  297. package/package.json +2 -2
  298. package/esm/deps/deno.land/std@0.219.1/path/basename.d.ts +0 -8
  299. package/esm/deps/deno.land/std@0.219.1/path/dirname.d.ts +0 -5
  300. package/esm/deps/deno.land/std@0.219.1/path/parse.d.ts +0 -6
  301. package/esm/deps/deno.land/std@0.219.1/path/parse.js +0 -12
  302. package/esm/deps/deno.land/std@0.219.1/path/posix/basename.d.ts +0 -8
  303. package/esm/deps/deno.land/std@0.219.1/path/windows/basename.d.ts +0 -8
  304. package/esm/deps/deno.land/std@0.219.1/path/windows/extname.d.ts +0 -6
  305. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/assert/assert.js +0 -0
  306. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/assert/assertion_error.js +0 -0
  307. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/html/entities.js +0 -0
  308. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/html/mod.js +0 -0
  309. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/assert_path.js +0 -0
  310. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/basename.js +0 -0
  311. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/common.js +0 -0
  312. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/constants.js +0 -0
  313. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/dirname.js +0 -0
  314. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/format.js +0 -0
  315. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/from_file_url.js +0 -0
  316. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/glob_to_reg_exp.js +0 -0
  317. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/normalize.js +0 -0
  318. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/relative.js +0 -0
  319. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/strip_trailing_separators.js +0 -0
  320. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/to_file_url.js +0 -0
  321. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_interface.js +0 -0
  322. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_os.js +0 -0
  323. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/common.js +0 -0
  324. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/constants.js +0 -0
  325. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/dirname.js +0 -0
  326. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/extname.js +0 -0
  327. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/from_file_url.js +0 -0
  328. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/glob_to_regexp.js +0 -0
  329. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/is_absolute.js +0 -0
  330. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/is_glob.js +0 -0
  331. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/join.js +0 -0
  332. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/join_globs.js +0 -0
  333. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/mod.js +0 -0
  334. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/normalize.js +0 -0
  335. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/normalize_glob.js +0 -0
  336. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/_util.js +0 -0
  337. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/common.js +0 -0
  338. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/constants.js +0 -0
  339. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/format.js +0 -0
  340. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/from_file_url.js +0 -0
  341. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/glob_to_regexp.js +0 -0
  342. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/is_absolute.js +0 -0
  343. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/is_glob.js +0 -0
  344. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/join_globs.js +0 -0
  345. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/mod.js +0 -0
  346. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/normalize.js +0 -0
  347. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/normalize_glob.js +0 -0
  348. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/parse.js +0 -0
  349. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/relative.js +0 -0
  350. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/resolve.js +0 -0
  351. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/to_file_url.js +0 -0
  352. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/to_namespaced_path.js +0 -0
  353. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/relative.js +0 -0
  354. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/resolve.js +0 -0
  355. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/to_file_url.js +0 -0
  356. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/to_namespaced_path.js +0 -0
  357. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/_util.js +0 -0
  358. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/common.js +0 -0
  359. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/constants.js +0 -0
  360. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/dirname.js +0 -0
  361. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/extname.js +0 -0
  362. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/format.js +0 -0
  363. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/from_file_url.js +0 -0
  364. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/glob_to_regexp.js +0 -0
  365. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/is_absolute.js +0 -0
  366. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/is_glob.js +0 -0
  367. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/join.js +0 -0
  368. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/join_globs.js +0 -0
  369. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/mod.js +0 -0
  370. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/normalize.js +0 -0
  371. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/normalize_glob.js +0 -0
  372. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/parse.js +0 -0
  373. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/relative.js +0 -0
  374. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/resolve.js +0 -0
  375. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/to_file_url.js +0 -0
  376. /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/to_namespaced_path.js +0 -0
@@ -0,0 +1,19 @@
1
+ import * as dntShim from "../_dnt.shims.js";
2
+ import { path } from "../deps.js";
3
+ export class FileLoader {
4
+ #root;
5
+ constructor(root) {
6
+ this.#root = root;
7
+ }
8
+ async load(file) {
9
+ return {
10
+ source: await dntShim.Deno.readTextFile(file),
11
+ };
12
+ }
13
+ resolve(from, file) {
14
+ if (file.startsWith(".")) {
15
+ return path.join(path.dirname(from), file);
16
+ }
17
+ return path.join(this.#root, file);
18
+ }
19
+ }
@@ -0,0 +1,14 @@
1
+ export type TokenType = "string" | "tag" | "filter" | "comment";
2
+ export type Token = [TokenType, string, number?];
3
+ export interface TokenizeResult {
4
+ tokens: Token[];
5
+ position: number;
6
+ error: Error | undefined;
7
+ }
8
+ export default function tokenize(source: string): TokenizeResult;
9
+ /**
10
+ * Parse a tag and return the indexes of the start and end brackets, and the filters between.
11
+ * For example: {{ tag |> filter1 |> filter2 }} => [2, 9, 20, 31]
12
+ */
13
+ export declare function parseTag(source: string): number[];
14
+ //# sourceMappingURL=tokenizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenizer.d.ts","sourceRoot":"","sources":["../../src/src/tokenizer.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;AAChE,MAAM,MAAM,KAAK,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEjD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAsF/D;AAWD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAiBjD"}
@@ -0,0 +1,92 @@
1
+ import analyze from "./js.js";
2
+ export default function tokenize(source) {
3
+ const tokens = [];
4
+ let type = "string";
5
+ let position = 0;
6
+ try {
7
+ while (source.length > 0) {
8
+ if (type === "string") {
9
+ const index = source.indexOf("{{");
10
+ const code = index === -1 ? source : source.slice(0, index);
11
+ tokens.push([type, code, position]);
12
+ if (index === -1) {
13
+ break;
14
+ }
15
+ position += index;
16
+ source = source.slice(index);
17
+ type = source.startsWith("{{#") ? "comment" : "tag";
18
+ continue;
19
+ }
20
+ if (type === "comment") {
21
+ source = source.slice(3);
22
+ const index = source.indexOf("#}}");
23
+ const comment = index === -1 ? source : source.slice(0, index);
24
+ tokens.push([type, comment, position]);
25
+ if (index === -1) {
26
+ break;
27
+ }
28
+ position += index + 3;
29
+ source = source.slice(index + 3);
30
+ type = "string";
31
+ continue;
32
+ }
33
+ if (type === "tag") {
34
+ const indexes = parseTag(source);
35
+ const lastIndex = indexes.length - 1;
36
+ let tag;
37
+ indexes.reduce((prev, curr, index) => {
38
+ const code = source.slice(prev, curr - 2);
39
+ // Tag
40
+ if (index === 1) {
41
+ tag = [type, code, position];
42
+ tokens.push(tag);
43
+ return curr;
44
+ }
45
+ // Filters
46
+ tokens.push(["filter", code]);
47
+ return curr;
48
+ });
49
+ position += indexes[lastIndex];
50
+ source = source.slice(indexes[lastIndex]);
51
+ type = "string";
52
+ // Search the closing echo tag {{ /echo }}
53
+ if (tag?.[1].match(/^\-?\s*echo\s*\-?$/)) {
54
+ const end = source.match(/{{\-?\s*\/echo\s*\-?}}/);
55
+ if (!end) {
56
+ throw new Error("Unclosed echo tag");
57
+ }
58
+ const rawCode = source.slice(0, end.index);
59
+ tag[1] = `echo ${JSON.stringify(rawCode)}`;
60
+ const length = Number(end.index) + end[0].length;
61
+ source = source.slice(length);
62
+ position += length;
63
+ }
64
+ continue;
65
+ }
66
+ }
67
+ }
68
+ catch (error) {
69
+ return { tokens, position, error };
70
+ }
71
+ return { tokens, position, error: undefined };
72
+ }
73
+ /**
74
+ * Parse a tag and return the indexes of the start and end brackets, and the filters between.
75
+ * For example: {{ tag |> filter1 |> filter2 }} => [2, 9, 20, 31]
76
+ */
77
+ export function parseTag(source) {
78
+ const indexes = [2];
79
+ analyze(source, (type, index) => {
80
+ if (type === "close") {
81
+ indexes.push(index);
82
+ return false;
83
+ }
84
+ if (type === "new-filter") {
85
+ indexes.push(index);
86
+ }
87
+ else if (type === "unclosed") {
88
+ throw new Error("Unclosed tag");
89
+ }
90
+ });
91
+ return indexes;
92
+ }
@@ -0,0 +1,2 @@
1
+ export declare function transformTemplateCode(code: string, templateState: string): string;
2
+ //# sourceMappingURL=transformer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformer.d.ts","sourceRoot":"","sources":["../../src/src/transformer.ts"],"names":[],"mappings":"AAkHA,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GACpB,MAAM,CA4HR"}
@@ -0,0 +1,196 @@
1
+ import * as dntShim from "../_dnt.shims.js";
2
+ import { astring, meriyah, walker } from "../deps.js";
3
+ // List of identifiers that are in globalThis
4
+ // but should be accessed as templateState.identifier
5
+ const INCLUDE_GLOBAL = [
6
+ "name",
7
+ ];
8
+ // List of identifiers that should be ignored
9
+ // when transforming the code
10
+ const DEFAULT_EXCLUDES = [
11
+ "globalThis",
12
+ "self",
13
+ "global",
14
+ "this",
15
+ "undefined",
16
+ "null",
17
+ ];
18
+ // Tracks the scope of the code
19
+ // and the variables that should be ignored
20
+ class ScopeTracker {
21
+ scopes = [];
22
+ // The index of the global/function scope
23
+ globalScope = 0;
24
+ includes(val) {
25
+ for (let i = this.scopes.length - 1; i >= 0; i--) {
26
+ if (this.scopes[i].stack.includes(val)) {
27
+ return true;
28
+ }
29
+ }
30
+ return false;
31
+ }
32
+ pushScope(global) {
33
+ if (global) {
34
+ this.globalScope = this.scopes.length;
35
+ }
36
+ const newScope = {
37
+ globalScope: this.globalScope,
38
+ stack: [],
39
+ };
40
+ this.scopes.push(newScope);
41
+ }
42
+ popScope() {
43
+ this.globalScope = this.scopes[this.scopes.length - 1].globalScope;
44
+ this.scopes.pop();
45
+ }
46
+ pushBinding(val, global) {
47
+ if (this.scopes.length === 0) {
48
+ this.scopes.push({ globalScope: this.globalScope, stack: [] });
49
+ }
50
+ if (global) {
51
+ this.scopes[this.globalScope].stack.push(val);
52
+ }
53
+ else {
54
+ this.scopes[this.scopes.length - 1].stack.push(val);
55
+ }
56
+ }
57
+ pushPatternBinding(pattern, global) {
58
+ switch (pattern.type) {
59
+ case "Identifier":
60
+ this.pushBinding(pattern.name, global);
61
+ break;
62
+ case "RestElement":
63
+ this.pushPatternBinding(pattern.argument, global);
64
+ break;
65
+ case "ArrayPattern":
66
+ for (const element of pattern.elements) {
67
+ if (element) {
68
+ this.pushPatternBinding(element, global);
69
+ }
70
+ }
71
+ break;
72
+ case "ObjectPattern":
73
+ for (const prop of pattern.properties) {
74
+ if (prop.type === "RestElement") {
75
+ this.pushPatternBinding(prop.argument, global);
76
+ }
77
+ else {
78
+ this.pushPatternBinding(prop.value, global);
79
+ }
80
+ }
81
+ break;
82
+ case "AssignmentPattern":
83
+ this.pushPatternBinding(pattern.left, global);
84
+ break;
85
+ }
86
+ }
87
+ pushPatternBindings(patterns, global) {
88
+ for (const pattern of patterns) {
89
+ this.pushPatternBinding(pattern, global);
90
+ }
91
+ }
92
+ }
93
+ export function transformTemplateCode(code, templateState) {
94
+ if (!code.trim()) {
95
+ return code;
96
+ }
97
+ const parsed = meriyah.parseScript(code, { module: true });
98
+ const tracker = new ScopeTracker();
99
+ const exclude = [
100
+ templateState,
101
+ ...DEFAULT_EXCLUDES,
102
+ ];
103
+ if (parsed.type !== "Program") {
104
+ throw new Error("Expected a program");
105
+ }
106
+ if (parsed.body.length === 0) {
107
+ throw new Error("Empty program");
108
+ }
109
+ // Transforms an identifier to a MemberExpression
110
+ // if it's not in the exclude list
111
+ //
112
+ // Example:
113
+ // Transforms {{ name }} to {{ id.name }}
114
+ function transformIdentifier(id) {
115
+ if ((!INCLUDE_GLOBAL.includes(id.name) &&
116
+ dntShim.dntGlobalThis[id.name] !== undefined) ||
117
+ exclude.includes(id.name) ||
118
+ tracker.includes(id.name) ||
119
+ id.name.startsWith("__")) {
120
+ return id;
121
+ }
122
+ return {
123
+ type: "MemberExpression",
124
+ object: {
125
+ type: "Identifier",
126
+ name: templateState,
127
+ },
128
+ optional: false,
129
+ computed: false,
130
+ property: id,
131
+ };
132
+ }
133
+ walker.walk(parsed, {
134
+ enter(node) {
135
+ switch (node.type) {
136
+ // Track variable declarations
137
+ case "VariableDeclaration":
138
+ // "var" declarations are scoped to the function/global scope.
139
+ tracker.pushPatternBindings(node.declarations.map((d) => d.id), node.kind === "var");
140
+ break;
141
+ // Track function declarations, and
142
+ // function parameters.
143
+ // Also track the scope.
144
+ case "FunctionDeclaration":
145
+ case "FunctionExpression":
146
+ if (node.id) {
147
+ tracker.pushBinding(node.id.name);
148
+ }
149
+ tracker.pushScope(true);
150
+ tracker.pushPatternBindings(node.params);
151
+ break;
152
+ case "ArrowFunctionExpression":
153
+ tracker.pushScope();
154
+ tracker.pushPatternBindings(node.params);
155
+ break;
156
+ case "Property":
157
+ if (node.shorthand && node.key.type === "Identifier") {
158
+ this.replace({
159
+ type: "Property",
160
+ key: node.key,
161
+ value: transformIdentifier(node.key),
162
+ kind: "init",
163
+ computed: false,
164
+ method: false,
165
+ shorthand: false,
166
+ });
167
+ }
168
+ break;
169
+ }
170
+ },
171
+ leave(node, parent) {
172
+ switch (node.type) {
173
+ // Pop the scope when leaving a function
174
+ case "FunctionDeclaration":
175
+ case "FunctionExpression":
176
+ case "ArrowFunctionExpression":
177
+ tracker.popScope();
178
+ break;
179
+ case "Identifier":
180
+ // Don't transform identifiers that aren't at the start of a MemberExpression
181
+ // ie. don't transform `bar` or `baz` in `foo.bar.baz`
182
+ if (parent?.type === "MemberExpression" && parent.property === node) {
183
+ return;
184
+ }
185
+ // Don't transform identifiers that are keys in an object
186
+ if (parent?.type === "Property" && parent.key === node) {
187
+ return;
188
+ }
189
+ this.replace(transformIdentifier(node));
190
+ break;
191
+ }
192
+ },
193
+ });
194
+ const generated = astring.generate(parsed);
195
+ return generated;
196
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto_trim.test.d.ts","sourceRoot":"","sources":["../../src/test/auto_trim.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment.test.d.ts","sourceRoot":"","sources":["../../src/test/comment.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compile.test.d.ts","sourceRoot":"","sources":["../../src/test/compile.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"echo.test.d.ts","sourceRoot":"","sources":["../../src/test/echo.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escape.test.d.ts","sourceRoot":"","sources":["../../src/test/escape.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"for.test.d.ts","sourceRoot":"","sources":["../../src/test/for.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function.test.d.ts","sourceRoot":"","sources":["../../src/test/function.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"if.test.d.ts","sourceRoot":"","sources":["../../src/test/if.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import.test.d.ts","sourceRoot":"","sources":["../../src/test/import.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"include.test.d.ts","sourceRoot":"","sources":["../../src/test/include.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"js.test.d.ts","sourceRoot":"","sources":["../../src/test/js.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.test.d.ts","sourceRoot":"","sources":["../../src/test/layout.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"print.test.d.ts","sourceRoot":"","sources":["../../src/test/print.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safe.test.d.ts","sourceRoot":"","sources":["../../src/test/safe.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set.test.d.ts","sourceRoot":"","sources":["../../src/test/set.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenizer.test.d.ts","sourceRoot":"","sources":["../../src/test/tokenizer.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unescape.test.d.ts","sourceRoot":"","sources":["../../src/test/unescape.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/test/utils.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,QAE9C;AAED,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,iBAkB9C;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,WAAW,QAiB5C;AAED,qBAAa,UAAW,YAAW,MAAM;IACvC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;gBAEvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIzC,IAAI,CAAC,IAAI,EAAE,MAAM;;;;;;;IAcjB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;CAO5C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ventojs",
3
- "version": "0.12.2",
3
+ "version": "0.12.4",
4
4
  "description": "🌬 A minimal but powerful template engine",
5
5
  "homepage": "https://vento.js.org/",
6
6
  "repository": "github:oscarotero/vento",
@@ -37,5 +37,5 @@
37
37
  "picocolors": "^1.0.0",
38
38
  "@types/estree": "1.0.5"
39
39
  },
40
- "_generatedBy": "dnt@0.40.0"
40
+ "_generatedBy": "dnt@dev"
41
41
  }
@@ -1,8 +0,0 @@
1
- /**
2
- * Return the last portion of a `path`.
3
- * Trailing directory separators are ignored, and optional suffix is removed.
4
- *
5
- * @param path - path to extract the name from.
6
- * @param [suffix] - suffix to remove from extracted name.
7
- */
8
- export declare function basename(path: string, suffix?: string): string;
@@ -1,5 +0,0 @@
1
- /**
2
- * Return the directory path of a `path`.
3
- * @param path - path to extract the directory from.
4
- */
5
- export declare function dirname(path: string): string;
@@ -1,6 +0,0 @@
1
- import type { 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;
@@ -1,12 +0,0 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
- // This module is browser compatible.
3
- import { isWindows } from "./_os.js";
4
- import { parse as posixParse } from "./posix/parse.js";
5
- import { parse as windowsParse } from "./windows/parse.js";
6
- /**
7
- * Return a `ParsedPath` object of the `path`.
8
- * @param path to process
9
- */
10
- export function parse(path) {
11
- return isWindows ? windowsParse(path) : posixParse(path);
12
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Return the last portion of a `path`.
3
- * Trailing directory separators are ignored, and optional suffix is removed.
4
- *
5
- * @param path - path to extract the name from.
6
- * @param [suffix] - suffix to remove from extracted name.
7
- */
8
- export declare function basename(path: string, suffix?: string): string;
@@ -1,8 +0,0 @@
1
- /**
2
- * Return the last portion of a `path`.
3
- * Trailing directory separators are ignored, and optional suffix is removed.
4
- *
5
- * @param path - path to extract the name from.
6
- * @param [suffix] - suffix to remove from extracted name.
7
- */
8
- export declare function basename(path: string, suffix?: string): string;
@@ -1,6 +0,0 @@
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;