ventojs 0.10.2 → 0.12.0

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 (390) hide show
  1. package/README.md +35 -93
  2. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/assert/assert.js +1 -1
  3. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/assert/assertion_error.js +1 -1
  4. package/esm/deps/deno.land/std@0.219.1/html/entities.d.ts +39 -0
  5. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/html/entities.js +14 -15
  6. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/html/mod.d.ts +1 -1
  7. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/html/mod.js +2 -2
  8. package/esm/deps/deno.land/std@0.219.1/path/_common/assert_path.d.ts +1 -0
  9. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/assert_path.js +1 -1
  10. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/basename.js +1 -1
  11. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/common.js +9 -9
  12. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/constants.js +1 -1
  13. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/dirname.js +1 -1
  14. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/format.js +1 -1
  15. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/from_file_url.js +1 -1
  16. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/glob_to_reg_exp.js +4 -2
  17. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/normalize.js +1 -1
  18. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/normalize_string.js +1 -1
  19. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/relative.js +1 -1
  20. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/strip_trailing_separators.js +1 -1
  21. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/to_file_url.js +1 -1
  22. package/esm/deps/deno.land/std@0.219.1/path/_interface.js +3 -0
  23. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_os.js +1 -1
  24. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/basename.js +1 -1
  25. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/common.js +3 -3
  26. package/esm/deps/deno.land/std@0.219.1/path/constants.d.ts +3 -0
  27. package/esm/deps/deno.land/std@0.219.1/path/constants.js +6 -0
  28. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/dirname.js +1 -1
  29. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/extname.js +1 -1
  30. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/format.d.ts +1 -1
  31. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/format.js +1 -1
  32. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/from_file_url.js +1 -1
  33. package/{script/deps/deno.land/std@0.210.0 → esm/deps/deno.land/std@0.219.1}/path/glob_to_regexp.d.ts +2 -1
  34. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/glob_to_regexp.js +1 -1
  35. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/is_absolute.js +1 -1
  36. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/is_glob.js +1 -1
  37. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/join.js +1 -1
  38. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/join_globs.d.ts +1 -0
  39. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/join_globs.js +1 -1
  40. package/esm/deps/deno.land/std@0.219.1/path/mod.d.ts +56 -0
  41. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/mod.js +3 -8
  42. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/normalize.js +1 -1
  43. package/{script/deps/deno.land/std@0.210.0 → esm/deps/deno.land/std@0.219.1}/path/normalize_glob.d.ts +1 -0
  44. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/normalize_glob.js +1 -1
  45. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/parse.js +1 -1
  46. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/_util.js +1 -1
  47. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/basename.js +1 -1
  48. package/esm/deps/deno.land/{std@0.210.0/path/windows → std@0.219.1/path/posix}/common.js +3 -3
  49. package/esm/deps/deno.land/std@0.219.1/path/posix/constants.d.ts +3 -0
  50. package/esm/deps/deno.land/std@0.219.1/path/posix/constants.js +5 -0
  51. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/dirname.js +1 -1
  52. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/extname.js +1 -1
  53. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/format.js +1 -1
  54. package/{script/deps/deno.land/std@0.210.0 → esm/deps/deno.land/std@0.219.1}/path/posix/from_file_url.d.ts +1 -1
  55. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/from_file_url.js +2 -2
  56. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/glob_to_regexp.d.ts +1 -1
  57. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/glob_to_regexp.js +1 -1
  58. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/is_absolute.js +1 -1
  59. package/esm/deps/deno.land/{std@0.210.0/path/windows → std@0.219.1/path/posix}/is_glob.js +1 -1
  60. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/join.js +1 -1
  61. package/esm/deps/deno.land/{std@0.210.0/path/windows → std@0.219.1/path/posix}/join_globs.d.ts +2 -1
  62. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/join_globs.js +3 -3
  63. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/mod.d.ts +1 -3
  64. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/mod.js +2 -4
  65. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/normalize.js +1 -1
  66. package/{script/deps/deno.land/std@0.210.0 → esm/deps/deno.land/std@0.219.1}/path/posix/normalize_glob.d.ts +2 -1
  67. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/normalize_glob.js +3 -3
  68. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/parse.d.ts +1 -1
  69. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/parse.js +1 -1
  70. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/relative.js +1 -1
  71. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/resolve.js +1 -1
  72. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/to_file_url.d.ts +1 -1
  73. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/to_file_url.js +2 -2
  74. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/to_namespaced_path.js +1 -1
  75. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/relative.js +1 -1
  76. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/resolve.js +1 -1
  77. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/to_file_url.js +1 -1
  78. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/to_namespaced_path.js +1 -1
  79. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/_util.js +1 -1
  80. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/basename.js +1 -1
  81. package/esm/deps/deno.land/{std@0.210.0/path/posix → std@0.219.1/path/windows}/common.js +3 -3
  82. package/esm/deps/deno.land/std@0.219.1/path/windows/constants.d.ts +3 -0
  83. package/esm/deps/deno.land/std@0.219.1/path/windows/constants.js +5 -0
  84. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/dirname.js +1 -1
  85. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/extname.js +1 -1
  86. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/format.js +1 -1
  87. package/{script/deps/deno.land/std@0.210.0 → esm/deps/deno.land/std@0.219.1}/path/windows/from_file_url.d.ts +1 -1
  88. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/from_file_url.js +2 -2
  89. package/{script/deps/deno.land/std@0.210.0/path/posix → esm/deps/deno.land/std@0.219.1/path/windows}/glob_to_regexp.d.ts +1 -1
  90. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/glob_to_regexp.js +1 -1
  91. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/is_absolute.js +1 -1
  92. package/esm/deps/deno.land/{std@0.210.0/path/posix → std@0.219.1/path/windows}/is_glob.js +1 -1
  93. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/join.js +1 -1
  94. package/esm/deps/deno.land/{std@0.210.0/path/posix → std@0.219.1/path/windows}/join_globs.d.ts +2 -1
  95. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/join_globs.js +3 -3
  96. package/{script/deps/deno.land/std@0.210.0/path/posix → esm/deps/deno.land/std@0.219.1/path/windows}/mod.d.ts +1 -3
  97. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/mod.js +2 -4
  98. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/normalize.js +1 -1
  99. package/{script/deps/deno.land/std@0.210.0 → esm/deps/deno.land/std@0.219.1}/path/windows/normalize_glob.d.ts +2 -1
  100. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/normalize_glob.js +3 -3
  101. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/parse.d.ts +1 -1
  102. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/parse.js +1 -1
  103. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/relative.js +1 -1
  104. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/resolve.js +1 -1
  105. package/{script/deps/deno.land/std@0.210.0 → esm/deps/deno.land/std@0.219.1}/path/windows/to_file_url.d.ts +1 -1
  106. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/to_file_url.js +2 -2
  107. package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/to_namespaced_path.js +1 -1
  108. package/esm/deps/deno.land/x/astring@v1.8.6/src/astring.d.ts +109 -0
  109. package/esm/deps/deno.land/x/astring@v1.8.6/src/astring.js +1159 -0
  110. package/esm/deps.d.ts +6 -2
  111. package/esm/deps.js +5 -2
  112. package/esm/mod.d.ts +1 -0
  113. package/esm/mod.js +2 -0
  114. package/esm/plugins/auto_trim.d.ts +8 -0
  115. package/esm/plugins/auto_trim.js +36 -0
  116. package/esm/plugins/escape.js +2 -1
  117. package/esm/plugins/trim.d.ts +4 -0
  118. package/esm/plugins/trim.js +28 -0
  119. package/esm/plugins/unescape.js +2 -1
  120. package/esm/src/environment.d.ts +3 -0
  121. package/esm/src/environment.js +28 -7
  122. package/esm/src/tokenizer.js +6 -29
  123. package/esm/src/transformer.d.ts +1 -0
  124. package/esm/src/transformer.js +180 -0
  125. package/package.json +21 -8
  126. package/esm/deps/deno.land/std@0.210.0/html/entities.d.ts +0 -38
  127. package/esm/deps/deno.land/std@0.210.0/path/_common/assert_path.d.ts +0 -1
  128. package/esm/deps/deno.land/std@0.210.0/path/_interface.js +0 -3
  129. package/esm/deps/deno.land/std@0.210.0/path/common.d.ts +0 -13
  130. package/esm/deps/deno.land/std@0.210.0/path/glob_to_regexp.d.ts +0 -61
  131. package/esm/deps/deno.land/std@0.210.0/path/mod.d.ts +0 -28
  132. package/esm/deps/deno.land/std@0.210.0/path/normalize_glob.d.ts +0 -3
  133. package/esm/deps/deno.land/std@0.210.0/path/posix/from_file_url.d.ts +0 -12
  134. package/esm/deps/deno.land/std@0.210.0/path/posix/normalize_glob.d.ts +0 -3
  135. package/esm/deps/deno.land/std@0.210.0/path/posix/separator.d.ts +0 -2
  136. package/esm/deps/deno.land/std@0.210.0/path/posix/separator.js +0 -4
  137. package/esm/deps/deno.land/std@0.210.0/path/separator.d.ts +0 -2
  138. package/esm/deps/deno.land/std@0.210.0/path/separator.js +0 -5
  139. package/esm/deps/deno.land/std@0.210.0/path/windows/from_file_url.d.ts +0 -14
  140. package/esm/deps/deno.land/std@0.210.0/path/windows/glob_to_regexp.d.ts +0 -57
  141. package/esm/deps/deno.land/std@0.210.0/path/windows/mod.d.ts +0 -40
  142. package/esm/deps/deno.land/std@0.210.0/path/windows/normalize_glob.d.ts +0 -3
  143. package/esm/deps/deno.land/std@0.210.0/path/windows/separator.d.ts +0 -2
  144. package/esm/deps/deno.land/std@0.210.0/path/windows/separator.js +0 -4
  145. package/esm/deps/deno.land/std@0.210.0/path/windows/to_file_url.d.ts +0 -14
  146. package/script/_dnt.shims.d.ts +0 -5
  147. package/script/_dnt.shims.js +0 -65
  148. package/script/deps/deno.land/std@0.210.0/assert/assert.d.ts +0 -12
  149. package/script/deps/deno.land/std@0.210.0/assert/assert.js +0 -22
  150. package/script/deps/deno.land/std@0.210.0/assert/assertion_error.d.ts +0 -14
  151. package/script/deps/deno.land/std@0.210.0/assert/assertion_error.js +0 -22
  152. package/script/deps/deno.land/std@0.210.0/html/entities.d.ts +0 -38
  153. package/script/deps/deno.land/std@0.210.0/html/entities.js +0 -81
  154. package/script/deps/deno.land/std@0.210.0/html/mod.d.ts +0 -6
  155. package/script/deps/deno.land/std@0.210.0/html/mod.js +0 -24
  156. package/script/deps/deno.land/std@0.210.0/path/_common/assert_path.d.ts +0 -1
  157. package/script/deps/deno.land/std@0.210.0/path/_common/assert_path.js +0 -11
  158. package/script/deps/deno.land/std@0.210.0/path/_common/basename.d.ts +0 -3
  159. package/script/deps/deno.land/std@0.210.0/path/_common/basename.js +0 -46
  160. package/script/deps/deno.land/std@0.210.0/path/_common/common.d.ts +0 -1
  161. package/script/deps/deno.land/std@0.210.0/path/_common/common.js +0 -27
  162. package/script/deps/deno.land/std@0.210.0/path/_common/constants.d.ts +0 -39
  163. package/script/deps/deno.land/std@0.210.0/path/_common/constants.js +0 -49
  164. package/script/deps/deno.land/std@0.210.0/path/_common/dirname.d.ts +0 -1
  165. package/script/deps/deno.land/std@0.210.0/path/_common/dirname.js +0 -12
  166. package/script/deps/deno.land/std@0.210.0/path/_common/format.d.ts +0 -3
  167. package/script/deps/deno.land/std@0.210.0/path/_common/format.js +0 -24
  168. package/script/deps/deno.land/std@0.210.0/path/_common/from_file_url.d.ts +0 -2
  169. package/script/deps/deno.land/std@0.210.0/path/_common/from_file_url.js +0 -13
  170. package/script/deps/deno.land/std@0.210.0/path/_common/glob_to_reg_exp.d.ts +0 -28
  171. package/script/deps/deno.land/std@0.210.0/path/_common/glob_to_reg_exp.js +0 -239
  172. package/script/deps/deno.land/std@0.210.0/path/_common/normalize.d.ts +0 -1
  173. package/script/deps/deno.land/std@0.210.0/path/_common/normalize.js +0 -12
  174. package/script/deps/deno.land/std@0.210.0/path/_common/normalize_string.d.ts +0 -1
  175. package/script/deps/deno.land/std@0.210.0/path/_common/normalize_string.js +0 -81
  176. package/script/deps/deno.land/std@0.210.0/path/_common/relative.d.ts +0 -1
  177. package/script/deps/deno.land/std@0.210.0/path/_common/relative.js +0 -13
  178. package/script/deps/deno.land/std@0.210.0/path/_common/strip_trailing_separators.d.ts +0 -1
  179. package/script/deps/deno.land/std@0.210.0/path/_common/strip_trailing_separators.js +0 -23
  180. package/script/deps/deno.land/std@0.210.0/path/_common/to_file_url.d.ts +0 -1
  181. package/script/deps/deno.land/std@0.210.0/path/_common/to_file_url.js +0 -19
  182. package/script/deps/deno.land/std@0.210.0/path/_interface.d.ts +0 -26
  183. package/script/deps/deno.land/std@0.210.0/path/_interface.js +0 -4
  184. package/script/deps/deno.land/std@0.210.0/path/_os.d.ts +0 -3
  185. package/script/deps/deno.land/std@0.210.0/path/_os.js +0 -44
  186. package/script/deps/deno.land/std@0.210.0/path/basename.d.ts +0 -8
  187. package/script/deps/deno.land/std@0.210.0/path/basename.js +0 -21
  188. package/script/deps/deno.land/std@0.210.0/path/common.d.ts +0 -13
  189. package/script/deps/deno.land/std@0.210.0/path/common.js +0 -23
  190. package/script/deps/deno.land/std@0.210.0/path/dirname.d.ts +0 -5
  191. package/script/deps/deno.land/std@0.210.0/path/dirname.js +0 -16
  192. package/script/deps/deno.land/std@0.210.0/path/extname.d.ts +0 -6
  193. package/script/deps/deno.land/std@0.210.0/path/extname.js +0 -17
  194. package/script/deps/deno.land/std@0.210.0/path/format.d.ts +0 -6
  195. package/script/deps/deno.land/std@0.210.0/path/format.js +0 -16
  196. package/script/deps/deno.land/std@0.210.0/path/from_file_url.d.ts +0 -18
  197. package/script/deps/deno.land/std@0.210.0/path/from_file_url.js +0 -28
  198. package/script/deps/deno.land/std@0.210.0/path/glob_to_regexp.js +0 -69
  199. package/script/deps/deno.land/std@0.210.0/path/is_absolute.d.ts +0 -5
  200. package/script/deps/deno.land/std@0.210.0/path/is_absolute.js +0 -16
  201. package/script/deps/deno.land/std@0.210.0/path/is_glob.d.ts +0 -2
  202. package/script/deps/deno.land/std@0.210.0/path/is_glob.js +0 -32
  203. package/script/deps/deno.land/std@0.210.0/path/join.d.ts +0 -5
  204. package/script/deps/deno.land/std@0.210.0/path/join.js +0 -16
  205. package/script/deps/deno.land/std@0.210.0/path/join_globs.d.ts +0 -3
  206. package/script/deps/deno.land/std@0.210.0/path/join_globs.js +0 -15
  207. package/script/deps/deno.land/std@0.210.0/path/mod.d.ts +0 -28
  208. package/script/deps/deno.land/std@0.210.0/path/mod.js +0 -94
  209. package/script/deps/deno.land/std@0.210.0/path/normalize.d.ts +0 -7
  210. package/script/deps/deno.land/std@0.210.0/path/normalize.js +0 -18
  211. package/script/deps/deno.land/std@0.210.0/path/normalize_glob.js +0 -15
  212. package/script/deps/deno.land/std@0.210.0/path/parse.d.ts +0 -6
  213. package/script/deps/deno.land/std@0.210.0/path/parse.js +0 -16
  214. package/script/deps/deno.land/std@0.210.0/path/posix/_util.d.ts +0 -1
  215. package/script/deps/deno.land/std@0.210.0/path/posix/_util.js +0 -12
  216. package/script/deps/deno.land/std@0.210.0/path/posix/basename.d.ts +0 -8
  217. package/script/deps/deno.land/std@0.210.0/path/posix/basename.js +0 -22
  218. package/script/deps/deno.land/std@0.210.0/path/posix/common.js +0 -23
  219. package/script/deps/deno.land/std@0.210.0/path/posix/dirname.d.ts +0 -5
  220. package/script/deps/deno.land/std@0.210.0/path/posix/dirname.js +0 -40
  221. package/script/deps/deno.land/std@0.210.0/path/posix/extname.d.ts +0 -6
  222. package/script/deps/deno.land/std@0.210.0/path/posix/extname.js +0 -63
  223. package/script/deps/deno.land/std@0.210.0/path/posix/format.d.ts +0 -6
  224. package/script/deps/deno.land/std@0.210.0/path/posix/format.js +0 -15
  225. package/script/deps/deno.land/std@0.210.0/path/posix/from_file_url.js +0 -21
  226. package/script/deps/deno.land/std@0.210.0/path/posix/glob_to_regexp.js +0 -73
  227. package/script/deps/deno.land/std@0.210.0/path/posix/is_absolute.d.ts +0 -5
  228. package/script/deps/deno.land/std@0.210.0/path/posix/is_absolute.js +0 -16
  229. package/script/deps/deno.land/std@0.210.0/path/posix/is_glob.d.ts +0 -1
  230. package/script/deps/deno.land/std@0.210.0/path/posix/is_glob.js +0 -7
  231. package/script/deps/deno.land/std@0.210.0/path/posix/join.d.ts +0 -5
  232. package/script/deps/deno.land/std@0.210.0/path/posix/join.js +0 -30
  233. package/script/deps/deno.land/std@0.210.0/path/posix/join_globs.d.ts +0 -3
  234. package/script/deps/deno.land/std@0.210.0/path/posix/join_globs.js +0 -30
  235. package/script/deps/deno.land/std@0.210.0/path/posix/mod.js +0 -61
  236. package/script/deps/deno.land/std@0.210.0/path/posix/normalize.d.ts +0 -7
  237. package/script/deps/deno.land/std@0.210.0/path/posix/normalize.js +0 -29
  238. package/script/deps/deno.land/std@0.210.0/path/posix/normalize_glob.js +0 -20
  239. package/script/deps/deno.land/std@0.210.0/path/posix/parse.d.ts +0 -6
  240. package/script/deps/deno.land/std@0.210.0/path/posix/parse.js +0 -102
  241. package/script/deps/deno.land/std@0.210.0/path/posix/relative.d.ts +0 -7
  242. package/script/deps/deno.land/std@0.210.0/path/posix/relative.js +0 -98
  243. package/script/deps/deno.land/std@0.210.0/path/posix/resolve.d.ts +0 -5
  244. package/script/deps/deno.land/std@0.210.0/path/posix/resolve.js +0 -75
  245. package/script/deps/deno.land/std@0.210.0/path/posix/separator.d.ts +0 -2
  246. package/script/deps/deno.land/std@0.210.0/path/posix/separator.js +0 -7
  247. package/script/deps/deno.land/std@0.210.0/path/posix/to_file_url.d.ts +0 -12
  248. package/script/deps/deno.land/std@0.210.0/path/posix/to_file_url.js +0 -26
  249. package/script/deps/deno.land/std@0.210.0/path/posix/to_namespaced_path.d.ts +0 -5
  250. package/script/deps/deno.land/std@0.210.0/path/posix/to_namespaced_path.js +0 -14
  251. package/script/deps/deno.land/std@0.210.0/path/relative.d.ts +0 -12
  252. package/script/deps/deno.land/std@0.210.0/path/relative.js +0 -23
  253. package/script/deps/deno.land/std@0.210.0/path/resolve.d.ts +0 -5
  254. package/script/deps/deno.land/std@0.210.0/path/resolve.js +0 -18
  255. package/script/deps/deno.land/std@0.210.0/path/separator.d.ts +0 -2
  256. package/script/deps/deno.land/std@0.210.0/path/separator.js +0 -8
  257. package/script/deps/deno.land/std@0.210.0/path/to_file_url.d.ts +0 -18
  258. package/script/deps/deno.land/std@0.210.0/path/to_file_url.js +0 -28
  259. package/script/deps/deno.land/std@0.210.0/path/to_namespaced_path.d.ts +0 -5
  260. package/script/deps/deno.land/std@0.210.0/path/to_namespaced_path.js +0 -18
  261. package/script/deps/deno.land/std@0.210.0/path/windows/_util.d.ts +0 -3
  262. package/script/deps/deno.land/std@0.210.0/path/windows/_util.js +0 -21
  263. package/script/deps/deno.land/std@0.210.0/path/windows/basename.d.ts +0 -8
  264. package/script/deps/deno.land/std@0.210.0/path/windows/basename.js +0 -34
  265. package/script/deps/deno.land/std@0.210.0/path/windows/common.d.ts +0 -13
  266. package/script/deps/deno.land/std@0.210.0/path/windows/common.js +0 -23
  267. package/script/deps/deno.land/std@0.210.0/path/windows/dirname.d.ts +0 -5
  268. package/script/deps/deno.land/std@0.210.0/path/windows/dirname.js +0 -102
  269. package/script/deps/deno.land/std@0.210.0/path/windows/extname.d.ts +0 -6
  270. package/script/deps/deno.land/std@0.210.0/path/windows/extname.js +0 -72
  271. package/script/deps/deno.land/std@0.210.0/path/windows/format.d.ts +0 -6
  272. package/script/deps/deno.land/std@0.210.0/path/windows/format.js +0 -15
  273. package/script/deps/deno.land/std@0.210.0/path/windows/from_file_url.js +0 -30
  274. package/script/deps/deno.land/std@0.210.0/path/windows/glob_to_regexp.d.ts +0 -57
  275. package/script/deps/deno.land/std@0.210.0/path/windows/glob_to_regexp.js +0 -73
  276. package/script/deps/deno.land/std@0.210.0/path/windows/is_absolute.d.ts +0 -5
  277. package/script/deps/deno.land/std@0.210.0/path/windows/is_absolute.js +0 -31
  278. package/script/deps/deno.land/std@0.210.0/path/windows/is_glob.d.ts +0 -1
  279. package/script/deps/deno.land/std@0.210.0/path/windows/is_glob.js +0 -7
  280. package/script/deps/deno.land/std@0.210.0/path/windows/join.d.ts +0 -5
  281. package/script/deps/deno.land/std@0.210.0/path/windows/join.js +0 -76
  282. package/script/deps/deno.land/std@0.210.0/path/windows/join_globs.d.ts +0 -3
  283. package/script/deps/deno.land/std@0.210.0/path/windows/join_globs.js +0 -30
  284. package/script/deps/deno.land/std@0.210.0/path/windows/mod.d.ts +0 -40
  285. package/script/deps/deno.land/std@0.210.0/path/windows/mod.js +0 -61
  286. package/script/deps/deno.land/std@0.210.0/path/windows/normalize.d.ts +0 -7
  287. package/script/deps/deno.land/std@0.210.0/path/windows/normalize.js +0 -134
  288. package/script/deps/deno.land/std@0.210.0/path/windows/normalize_glob.js +0 -20
  289. package/script/deps/deno.land/std@0.210.0/path/windows/parse.d.ts +0 -6
  290. package/script/deps/deno.land/std@0.210.0/path/windows/parse.js +0 -163
  291. package/script/deps/deno.land/std@0.210.0/path/windows/relative.d.ts +0 -12
  292. package/script/deps/deno.land/std@0.210.0/path/windows/relative.js +0 -125
  293. package/script/deps/deno.land/std@0.210.0/path/windows/resolve.d.ts +0 -5
  294. package/script/deps/deno.land/std@0.210.0/path/windows/resolve.js +0 -170
  295. package/script/deps/deno.land/std@0.210.0/path/windows/separator.d.ts +0 -2
  296. package/script/deps/deno.land/std@0.210.0/path/windows/separator.js +0 -7
  297. package/script/deps/deno.land/std@0.210.0/path/windows/to_file_url.js +0 -35
  298. package/script/deps/deno.land/std@0.210.0/path/windows/to_namespaced_path.d.ts +0 -5
  299. package/script/deps/deno.land/std@0.210.0/path/windows/to_namespaced_path.js +0 -42
  300. package/script/deps.d.ts +0 -2
  301. package/script/deps.js +0 -28
  302. package/script/mod.d.ts +0 -9
  303. package/script/mod.js +0 -69
  304. package/script/package.json +0 -3
  305. package/script/plugins/echo.d.ts +0 -2
  306. package/script/plugins/echo.js +0 -16
  307. package/script/plugins/escape.d.ts +0 -2
  308. package/script/plugins/escape.js +0 -9
  309. package/script/plugins/export.d.ts +0 -2
  310. package/script/plugins/export.js +0 -50
  311. package/script/plugins/for.d.ts +0 -2
  312. package/script/plugins/for.js +0 -77
  313. package/script/plugins/function.d.ts +0 -2
  314. package/script/plugins/function.js +0 -40
  315. package/script/plugins/if.d.ts +0 -2
  316. package/script/plugins/if.js +0 -35
  317. package/script/plugins/import.d.ts +0 -2
  318. package/script/plugins/import.js +0 -20
  319. package/script/plugins/include.d.ts +0 -2
  320. package/script/plugins/include.js +0 -26
  321. package/script/plugins/js.d.ts +0 -2
  322. package/script/plugins/js.js +0 -14
  323. package/script/plugins/layout.d.ts +0 -2
  324. package/script/plugins/layout.js +0 -37
  325. package/script/plugins/set.d.ts +0 -2
  326. package/script/plugins/set.js +0 -48
  327. package/script/plugins/unescape.d.ts +0 -2
  328. package/script/plugins/unescape.js +0 -9
  329. package/script/src/environment.d.ts +0 -51
  330. package/script/src/environment.js +0 -208
  331. package/script/src/loader.d.ts +0 -14
  332. package/script/src/loader.js +0 -46
  333. package/script/src/tokenizer.d.ts +0 -13
  334. package/script/src/tokenizer.js +0 -249
  335. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/assert/assert.d.ts +0 -0
  336. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/assert/assertion_error.d.ts +0 -0
  337. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/basename.d.ts +0 -0
  338. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/common.d.ts +0 -0
  339. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/constants.d.ts +0 -0
  340. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/dirname.d.ts +0 -0
  341. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/format.d.ts +0 -0
  342. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/from_file_url.d.ts +0 -0
  343. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/glob_to_reg_exp.d.ts +0 -0
  344. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/normalize.d.ts +0 -0
  345. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/normalize_string.d.ts +0 -0
  346. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/relative.d.ts +0 -0
  347. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/strip_trailing_separators.d.ts +0 -0
  348. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/to_file_url.d.ts +0 -0
  349. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_interface.d.ts +0 -0
  350. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_os.d.ts +0 -0
  351. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/basename.d.ts +0 -0
  352. /package/esm/deps/deno.land/{std@0.210.0/path/posix → std@0.219.1/path}/common.d.ts +0 -0
  353. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/dirname.d.ts +0 -0
  354. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/extname.d.ts +0 -0
  355. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/from_file_url.d.ts +0 -0
  356. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/is_absolute.d.ts +0 -0
  357. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/is_glob.d.ts +0 -0
  358. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/join.d.ts +0 -0
  359. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/normalize.d.ts +0 -0
  360. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/parse.d.ts +0 -0
  361. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/_util.d.ts +0 -0
  362. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/basename.d.ts +0 -0
  363. /package/esm/deps/deno.land/{std@0.210.0/path/windows → std@0.219.1/path/posix}/common.d.ts +0 -0
  364. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/dirname.d.ts +0 -0
  365. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/extname.d.ts +0 -0
  366. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/format.d.ts +0 -0
  367. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/is_absolute.d.ts +0 -0
  368. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/is_glob.d.ts +0 -0
  369. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/join.d.ts +0 -0
  370. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/normalize.d.ts +0 -0
  371. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/relative.d.ts +0 -0
  372. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/resolve.d.ts +0 -0
  373. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/to_namespaced_path.d.ts +0 -0
  374. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/relative.d.ts +0 -0
  375. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/resolve.d.ts +0 -0
  376. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/to_file_url.d.ts +0 -0
  377. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/to_namespaced_path.d.ts +0 -0
  378. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/_util.d.ts +0 -0
  379. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/basename.d.ts +0 -0
  380. /package/{script/deps/deno.land/std@0.210.0/path/posix → esm/deps/deno.land/std@0.219.1/path/windows}/common.d.ts +0 -0
  381. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/dirname.d.ts +0 -0
  382. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/extname.d.ts +0 -0
  383. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/format.d.ts +0 -0
  384. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/is_absolute.d.ts +0 -0
  385. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/is_glob.d.ts +0 -0
  386. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/join.d.ts +0 -0
  387. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/normalize.d.ts +0 -0
  388. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/relative.d.ts +0 -0
  389. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/resolve.d.ts +0 -0
  390. /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/to_namespaced_path.d.ts +0 -0
@@ -1,35 +0,0 @@
1
- "use strict";
2
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
3
- // This module is browser compatible.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.toFileUrl = void 0;
6
- const to_file_url_js_1 = require("../_common/to_file_url.js");
7
- const is_absolute_js_1 = require("./is_absolute.js");
8
- /**
9
- * Converts a path string to a file URL.
10
- *
11
- * ```ts
12
- * import { toFileUrl } from "https://deno.land/std@$STD_VERSION/path/win32.ts";
13
- *
14
- * toFileUrl("\\home\\foo"); // new URL("file:///home/foo")
15
- * toFileUrl("C:\\Users\\foo"); // new URL("file:///C:/Users/foo")
16
- * toFileUrl("\\\\127.0.0.1\\home\\foo"); // new URL("file://127.0.0.1/home/foo")
17
- * ```
18
- * @param path to convert to file URL
19
- */
20
- function toFileUrl(path) {
21
- if (!(0, is_absolute_js_1.isAbsolute)(path)) {
22
- throw new TypeError("Must be an absolute path.");
23
- }
24
- const [, hostname, pathname] = path.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/);
25
- const url = new URL("file:///");
26
- url.pathname = (0, to_file_url_js_1.encodeWhitespace)(pathname.replace(/%/g, "%25"));
27
- if (hostname !== undefined && hostname !== "localhost") {
28
- url.hostname = hostname;
29
- if (!url.hostname) {
30
- throw new TypeError("Invalid hostname.");
31
- }
32
- }
33
- return url;
34
- }
35
- exports.toFileUrl = toFileUrl;
@@ -1,5 +0,0 @@
1
- /**
2
- * Resolves path to a namespace path
3
- * @param path to resolve to namespace
4
- */
5
- export declare function toNamespacedPath(path: string): string;
@@ -1,42 +0,0 @@
1
- "use strict";
2
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
3
- // This module is browser compatible.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.toNamespacedPath = void 0;
6
- const constants_js_1 = require("../_common/constants.js");
7
- const _util_js_1 = require("./_util.js");
8
- const resolve_js_1 = require("./resolve.js");
9
- /**
10
- * Resolves path to a namespace path
11
- * @param path to resolve to namespace
12
- */
13
- function toNamespacedPath(path) {
14
- // Note: this will *probably* throw somewhere.
15
- if (typeof path !== "string")
16
- return path;
17
- if (path.length === 0)
18
- return "";
19
- const resolvedPath = (0, resolve_js_1.resolve)(path);
20
- if (resolvedPath.length >= 3) {
21
- if (resolvedPath.charCodeAt(0) === constants_js_1.CHAR_BACKWARD_SLASH) {
22
- // Possible UNC root
23
- if (resolvedPath.charCodeAt(1) === constants_js_1.CHAR_BACKWARD_SLASH) {
24
- const code = resolvedPath.charCodeAt(2);
25
- if (code !== constants_js_1.CHAR_QUESTION_MARK && code !== constants_js_1.CHAR_DOT) {
26
- // Matched non-long UNC root, convert the path to a long UNC path
27
- return `\\\\?\\UNC\\${resolvedPath.slice(2)}`;
28
- }
29
- }
30
- }
31
- else if ((0, _util_js_1.isWindowsDeviceRoot)(resolvedPath.charCodeAt(0))) {
32
- // Possible device root
33
- if (resolvedPath.charCodeAt(1) === constants_js_1.CHAR_COLON &&
34
- resolvedPath.charCodeAt(2) === constants_js_1.CHAR_BACKWARD_SLASH) {
35
- // Matched device root, convert the path to a long UNC path
36
- return `\\\\?\\${resolvedPath}`;
37
- }
38
- }
39
- }
40
- return path;
41
- }
42
- exports.toNamespacedPath = toNamespacedPath;
package/script/deps.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * as path from "./deps/deno.land/std@0.210.0/path/mod.js";
2
- export * as html from "./deps/deno.land/std@0.210.0/html/mod.js";
package/script/deps.js DELETED
@@ -1,28 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.html = exports.path = void 0;
27
- exports.path = __importStar(require("./deps/deno.land/std@0.210.0/path/mod.js"));
28
- exports.html = __importStar(require("./deps/deno.land/std@0.210.0/html/mod.js"));
package/script/mod.d.ts DELETED
@@ -1,9 +0,0 @@
1
- import { Environment } from "./src/environment.js";
2
- import { Loader } from "./src/loader.js";
3
- export interface Options {
4
- includes?: string | Loader;
5
- useWith?: boolean;
6
- dataVarname?: string;
7
- autoescape?: boolean;
8
- }
9
- export default function (options?: Options): Environment;
package/script/mod.js DELETED
@@ -1,69 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- const dntShim = __importStar(require("./_dnt.shims.js"));
30
- const environment_js_1 = require("./src/environment.js");
31
- const loader_js_1 = require("./src/loader.js");
32
- const if_js_1 = __importDefault(require("./plugins/if.js"));
33
- const for_js_1 = __importDefault(require("./plugins/for.js"));
34
- const include_js_1 = __importDefault(require("./plugins/include.js"));
35
- const set_js_1 = __importDefault(require("./plugins/set.js"));
36
- const js_js_1 = __importDefault(require("./plugins/js.js"));
37
- const layout_js_1 = __importDefault(require("./plugins/layout.js"));
38
- const function_js_1 = __importDefault(require("./plugins/function.js"));
39
- const import_js_1 = __importDefault(require("./plugins/import.js"));
40
- const export_js_1 = __importDefault(require("./plugins/export.js"));
41
- const echo_js_1 = __importDefault(require("./plugins/echo.js"));
42
- const escape_js_1 = __importDefault(require("./plugins/escape.js"));
43
- const unescape_js_1 = __importDefault(require("./plugins/unescape.js"));
44
- function default_1(options = {}) {
45
- const loader = typeof options.includes === "object"
46
- ? options.includes
47
- : new loader_js_1.FileLoader(options.includes || dntShim.Deno.cwd());
48
- const env = new environment_js_1.Environment({
49
- loader,
50
- dataVarname: options.dataVarname || "it",
51
- autoescape: options.autoescape ?? false,
52
- useWith: options.useWith ?? true,
53
- });
54
- // Register basic plugins
55
- env.use((0, if_js_1.default)());
56
- env.use((0, for_js_1.default)());
57
- env.use((0, js_js_1.default)());
58
- env.use((0, include_js_1.default)());
59
- env.use((0, set_js_1.default)());
60
- env.use((0, layout_js_1.default)());
61
- env.use((0, function_js_1.default)());
62
- env.use((0, import_js_1.default)());
63
- env.use((0, export_js_1.default)());
64
- env.use((0, echo_js_1.default)());
65
- env.use((0, escape_js_1.default)());
66
- env.use((0, unescape_js_1.default)());
67
- return env;
68
- }
69
- exports.default = default_1;
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
@@ -1,2 +0,0 @@
1
- import type { Environment } from "../src/environment.js";
2
- export default function (): (env: Environment) => void;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function default_1() {
4
- return (env) => {
5
- env.tags.push(setTag);
6
- };
7
- }
8
- exports.default = default_1;
9
- function setTag(env, code, output, tokens) {
10
- if (!code.startsWith("echo ")) {
11
- return;
12
- }
13
- const value = code.replace(/^echo\s+/, "");
14
- const val = env.compileFilters(tokens, value, env.options.autoescape);
15
- return `${output} += ${val};`;
16
- }
@@ -1,2 +0,0 @@
1
- import type { Environment } from "../src/environment.js";
2
- export default function (): (env: Environment) => void;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const deps_js_1 = require("../deps.js");
4
- function default_1() {
5
- return (env) => {
6
- env.filters.escape = deps_js_1.html.escape;
7
- };
8
- }
9
- exports.default = default_1;
@@ -1,2 +0,0 @@
1
- import type { Environment } from "../src/environment.js";
2
- export default function (): (env: Environment) => void;
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function default_1() {
4
- return (env) => {
5
- env.tags.push(exportTag);
6
- };
7
- }
8
- exports.default = default_1;
9
- function exportTag(env, code, _output, tokens) {
10
- if (!code.startsWith("export ")) {
11
- return;
12
- }
13
- const expression = code.replace(/^export\s+/, "");
14
- const { dataVarname } = env.options;
15
- // Value is set (e.g. {{ export foo = "bar" }})
16
- if (expression.includes("=")) {
17
- const match = code.match(/^export\s+([\w]+)\s*=\s*([\s\S]+)$/);
18
- if (!match) {
19
- throw new Error(`Invalid export tag: ${code}`);
20
- }
21
- const [, variable, value] = match;
22
- const val = env.compileFilters(tokens, value);
23
- return `if (${dataVarname}.hasOwnProperty("${variable}")) {
24
- ${variable} = ${val};
25
- } else {
26
- var ${variable} = ${val};
27
- }
28
- ${dataVarname}["${variable}"] = ${variable};
29
- __exports["${variable}"] = ${variable};
30
- `;
31
- }
32
- // Value is captured (eg: {{ export foo }}bar{{ /export }})
33
- const compiled = [];
34
- const compiledFilters = env.compileFilters(tokens, expression);
35
- compiled.push(`if (${dataVarname}.hasOwnProperty("${expression}")) {
36
- ${expression} = "";
37
- } else {
38
- var ${expression} = "";
39
- }
40
- `);
41
- compiled.push(...env.compileTokens(tokens, expression, ["/export"]));
42
- if (tokens.length && (tokens[0][0] !== "tag" || tokens[0][1] !== "/export")) {
43
- throw new Error(`Missing closing tag for export tag: ${code}`);
44
- }
45
- tokens.shift();
46
- compiled.push(`${expression} = ${compiledFilters};`);
47
- compiled.push(`${dataVarname}["${expression.trim()}"] = ${expression};`);
48
- compiled.push(`__exports["${expression.trim()}"] = ${expression};`);
49
- return compiled.join("\n");
50
- }
@@ -1,2 +0,0 @@
1
- import type { Environment } from "../src/environment.js";
2
- export default function (): (env: Environment) => void;
@@ -1,77 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function default_1() {
4
- return (env) => {
5
- env.tags.push(forTag);
6
- env.utils.toIterator = toIterator;
7
- };
8
- }
9
- exports.default = default_1;
10
- function forTag(env, code, output, tokens) {
11
- if (!code.startsWith("for ")) {
12
- return;
13
- }
14
- const compiled = [];
15
- const match = code.match(/^for\s+(await\s+)?(\w+)(?:,\s*(\w+))?\s+of\s+([\s|\S]+)$/);
16
- if (!match) {
17
- throw new Error(`Invalid for loop: ${code}`);
18
- }
19
- const [_, aw, var1, var2, collection] = match;
20
- if (var2) {
21
- compiled.push(`for ${aw || ""}(let [${var1}, ${var2}] of __env.utils.toIterator(${env.compileFilters(tokens, collection)}, true)) {`);
22
- }
23
- else {
24
- compiled.push(`for ${aw || ""}(let ${var1} of __env.utils.toIterator(${env.compileFilters(tokens, collection)})) {`);
25
- }
26
- compiled.push(...env.compileTokens(tokens, output, ["/for"]));
27
- tokens.shift();
28
- compiled.push("}");
29
- return compiled.join("\n");
30
- }
31
- function toIterator(
32
- // deno-lint-ignore no-explicit-any
33
- item, withKeys = false) {
34
- if (item === undefined || item === null) {
35
- return [];
36
- }
37
- if (Array.isArray(item)) {
38
- return withKeys ? Object.entries(item) : item;
39
- }
40
- if (typeof item === "function") {
41
- return toIterator(item(), withKeys);
42
- }
43
- if (typeof item === "object" && item !== null) {
44
- if (typeof item[Symbol.iterator] === "function") {
45
- if (withKeys) {
46
- return iterableToEntries(item);
47
- }
48
- return item;
49
- }
50
- if (typeof item[Symbol.asyncIterator] === "function") {
51
- if (withKeys) {
52
- return asyncIterableToEntries(item);
53
- }
54
- return item;
55
- }
56
- return withKeys ? Object.entries(item) : Object.values(item);
57
- }
58
- if (typeof item === "string") {
59
- return toIterator(item.split(""), withKeys);
60
- }
61
- if (typeof item === "number") {
62
- return toIterator(new Array(item).fill(0).map((_, i) => i + 1), withKeys);
63
- }
64
- return toIterator([item], withKeys);
65
- }
66
- function* iterableToEntries(iterator) {
67
- let i = 0;
68
- for (const value of iterator) {
69
- yield [i++, value];
70
- }
71
- }
72
- async function* asyncIterableToEntries(iterator) {
73
- let i = 0;
74
- for await (const value of iterator) {
75
- yield [i++, value];
76
- }
77
- }
@@ -1,2 +0,0 @@
1
- import type { Environment } from "../src/environment.js";
2
- export default function (): (env: Environment) => void;
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function default_1() {
4
- return (env) => {
5
- env.tags.push(functionTag);
6
- };
7
- }
8
- exports.default = default_1;
9
- function functionTag(env, code, _output, tokens) {
10
- if (!code.match(/(export\s+)?(async\s+)?function\s/)) {
11
- return;
12
- }
13
- const match = code.match(/^(export\s+)?(async\s+)?function\s+(\w+)\s*(\([^)]+\))?$/);
14
- if (!match) {
15
- throw new Error(`Invalid function: ${code}`);
16
- }
17
- const [_, exp, as, name, args] = match;
18
- const compiled = [];
19
- compiled.push(`${as || ""} function ${name} ${args || "()"} {`);
20
- compiled.push(`let __output = "";`);
21
- if (exp) {
22
- compiled.push(...env.compileTokens(tokens, "__output", ["/export"]));
23
- if (tokens.length && (tokens[0][0] !== "tag" || tokens[0][1] !== "/export")) {
24
- throw new Error(`Missing closing tag for export function tag: ${code}`);
25
- }
26
- }
27
- else {
28
- compiled.push(...env.compileTokens(tokens, "__output", ["/function"]));
29
- if (tokens.length && (tokens[0][0] !== "tag" || tokens[0][1] !== "/function")) {
30
- throw new Error(`Missing closing tag for function tag: ${code}`);
31
- }
32
- }
33
- tokens.shift();
34
- compiled.push(`return __output;`);
35
- compiled.push(`}`);
36
- if (exp) {
37
- compiled.push(`__exports["${name}"] = ${name}`);
38
- }
39
- return compiled.join("\n");
40
- }
@@ -1,2 +0,0 @@
1
- import type { Environment } from "../src/environment.js";
2
- export default function (): (env: Environment) => void;
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function default_1() {
4
- return (env) => {
5
- env.tags.push(ifTag);
6
- env.tags.push(elseTag);
7
- };
8
- }
9
- exports.default = default_1;
10
- function ifTag(env, code, output, tokens) {
11
- if (!code.startsWith("if ")) {
12
- return;
13
- }
14
- const condition = code.replace(/^if\s+/, "").trim();
15
- const compiled = [];
16
- compiled.push(`if (${condition}) {`);
17
- compiled.push(...env.compileTokens(tokens, output, ["/if"]));
18
- tokens.shift();
19
- compiled.push("}");
20
- return compiled.join("\n");
21
- }
22
- function elseTag(_env, code) {
23
- if (!code.startsWith("else ") && code !== "else") {
24
- return;
25
- }
26
- const match = code.match(/^else(\s+if\s+(.*))?$/);
27
- if (!match) {
28
- throw new Error(`Invalid else: ${code}`);
29
- }
30
- const [_, ifTag, condition] = match;
31
- if (ifTag) {
32
- return `} else if (${condition}) {`;
33
- }
34
- return "} else {";
35
- }
@@ -1,2 +0,0 @@
1
- import type { Environment } from "../src/environment.js";
2
- export default function (): (env: Environment) => void;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function default_1() {
4
- return (env) => {
5
- env.tags.push(importTag);
6
- };
7
- }
8
- exports.default = default_1;
9
- function importTag(env, code) {
10
- if (!code.startsWith("import ")) {
11
- return;
12
- }
13
- const match = code?.match(/^import\s+(\{[\s|\S]*\}|\w+)\s+from\s+(.+)$/);
14
- if (!match) {
15
- throw new Error(`Invalid import: ${code}`);
16
- }
17
- const [, vars, file] = match;
18
- const { dataVarname } = env.options;
19
- return `let ${vars} = await __env.run(${file}, {...${dataVarname}}, __file);`;
20
- }
@@ -1,2 +0,0 @@
1
- import type { Environment } from "../src/environment.js";
2
- export default function (): (env: Environment) => void;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function default_1() {
4
- return (env) => {
5
- env.tags.push(includeTag);
6
- };
7
- }
8
- exports.default = default_1;
9
- function includeTag(env, code, output, tokens) {
10
- if (!code.startsWith("include ")) {
11
- return;
12
- }
13
- const match = code?.match(/^include\s+([^{]+|`[^`]+`)+(?:\{([\s|\S]*)\})?$/);
14
- if (!match) {
15
- throw new Error(`Invalid include: ${code}`);
16
- }
17
- const [_, file, data] = match;
18
- const { dataVarname } = env.options;
19
- return `{
20
- const __tmp = await __env.run(${file},
21
- {...${dataVarname}${data ? `, ${data}` : ""}},
22
- __file
23
- );
24
- ${output} += ${env.compileFilters(tokens, "__tmp.content")};
25
- }`;
26
- }
@@ -1,2 +0,0 @@
1
- import type { Environment } from "../src/environment.js";
2
- export default function (): (env: Environment) => void;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function default_1() {
4
- return (env) => {
5
- env.tags.push(jsTag);
6
- };
7
- }
8
- exports.default = default_1;
9
- function jsTag(_env, code) {
10
- if (!code.startsWith(">")) {
11
- return;
12
- }
13
- return code.replace(/^>\s+/, "");
14
- }
@@ -1,2 +0,0 @@
1
- import type { Environment } from "../src/environment.js";
2
- export default function (): (env: Environment) => void;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function default_1() {
4
- return (env) => {
5
- env.tags.push(layoutTag);
6
- };
7
- }
8
- exports.default = default_1;
9
- function layoutTag(env, code, output, tokens) {
10
- if (!code.startsWith("layout ")) {
11
- return;
12
- }
13
- const match = code?.match(/^layout\s+([^{]+|`[^`]+`)+(?:\{([\s|\S]*)\})?$/);
14
- if (!match) {
15
- throw new Error(`Invalid wrap: ${code}`);
16
- }
17
- const [_, file, data] = match;
18
- const varname = "__content";
19
- const compiled = [];
20
- const compiledFilters = env.compileFilters(tokens, varname);
21
- compiled.push("{");
22
- compiled.push(`let ${varname} = "";`);
23
- compiled.push(...env.compileTokens(tokens, varname, ["/layout"]));
24
- if (tokens.length && (tokens[0][0] !== "tag" || tokens[0][1] !== "/layout")) {
25
- throw new Error(`Missing closing tag for layout tag: ${code}`);
26
- }
27
- tokens.shift();
28
- compiled.push(`${varname} = ${compiledFilters};`);
29
- const { dataVarname } = env.options;
30
- compiled.push(`const __tmp = await __env.run(${file},
31
- {...${dataVarname}${data ? `, ${data}` : ""}, content: ${env.compileFilters(tokens, varname)}},
32
- __file
33
- );
34
- ${output} += __tmp.content;`);
35
- compiled.push("}");
36
- return compiled.join("\n");
37
- }
@@ -1,2 +0,0 @@
1
- import type { Environment } from "../src/environment.js";
2
- export default function (): (env: Environment) => void;
@@ -1,48 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function default_1() {
4
- return (env) => {
5
- env.tags.push(setTag);
6
- };
7
- }
8
- exports.default = default_1;
9
- function setTag(env, code, _output, tokens) {
10
- if (!code.startsWith("set ")) {
11
- return;
12
- }
13
- const expression = code.replace(/^set\s+/, "");
14
- const { dataVarname } = env.options;
15
- // Value is set (e.g. {{ set foo = "bar" }})
16
- if (expression.includes("=")) {
17
- const match = code.match(/^set\s+([\w]+)\s*=\s*([\s\S]+)$/);
18
- if (!match) {
19
- throw new Error(`Invalid set tag: ${code}`);
20
- }
21
- const [, variable, value] = match;
22
- const val = env.compileFilters(tokens, value);
23
- return `if (${dataVarname}.hasOwnProperty("${variable}")) {
24
- ${variable} = ${val};
25
- } else {
26
- var ${variable} = ${val};
27
- }
28
- ${dataVarname}["${variable}"] = ${variable};
29
- `;
30
- }
31
- // Value is captured (eg: {{ set foo }}bar{{ /set }})
32
- const compiled = [];
33
- const compiledFilters = env.compileFilters(tokens, expression);
34
- compiled.push(`if (${dataVarname}.hasOwnProperty("${expression}")) {
35
- ${expression} = "";
36
- } else {
37
- var ${expression} = "";
38
- }
39
- `);
40
- compiled.push(...env.compileTokens(tokens, expression, ["/set"]));
41
- if (tokens.length && (tokens[0][0] !== "tag" || tokens[0][1] !== "/set")) {
42
- throw new Error(`Missing closing tag for set tag: ${code}`);
43
- }
44
- tokens.shift();
45
- compiled.push(`${expression} = ${compiledFilters};`);
46
- compiled.push(`${dataVarname}["${expression.trim()}"] = ${expression};`);
47
- return compiled.join("\n");
48
- }
@@ -1,2 +0,0 @@
1
- import type { Environment } from "../src/environment.js";
2
- export default function (): (env: Environment) => void;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const deps_js_1 = require("../deps.js");
4
- function default_1() {
5
- return (env) => {
6
- env.filters.unescape = deps_js_1.html.unescape;
7
- };
8
- }
9
- exports.default = default_1;