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.
- package/README.md +35 -93
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/assert/assert.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/assert/assertion_error.js +1 -1
- package/esm/deps/deno.land/std@0.219.1/html/entities.d.ts +39 -0
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/html/entities.js +14 -15
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/html/mod.d.ts +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/html/mod.js +2 -2
- package/esm/deps/deno.land/std@0.219.1/path/_common/assert_path.d.ts +1 -0
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/assert_path.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/basename.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/common.js +9 -9
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/constants.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/dirname.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/format.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/from_file_url.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/glob_to_reg_exp.js +4 -2
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/normalize.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/normalize_string.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/relative.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/strip_trailing_separators.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/to_file_url.js +1 -1
- package/esm/deps/deno.land/std@0.219.1/path/_interface.js +3 -0
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_os.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/basename.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/common.js +3 -3
- package/esm/deps/deno.land/std@0.219.1/path/constants.d.ts +3 -0
- package/esm/deps/deno.land/std@0.219.1/path/constants.js +6 -0
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/dirname.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/extname.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/format.d.ts +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/format.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/from_file_url.js +1 -1
- 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
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/glob_to_regexp.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/is_absolute.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/is_glob.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/join.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/join_globs.d.ts +1 -0
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/join_globs.js +1 -1
- package/esm/deps/deno.land/std@0.219.1/path/mod.d.ts +56 -0
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/mod.js +3 -8
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/normalize.js +1 -1
- package/{script/deps/deno.land/std@0.210.0 → esm/deps/deno.land/std@0.219.1}/path/normalize_glob.d.ts +1 -0
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/normalize_glob.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/parse.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/_util.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/basename.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0/path/windows → std@0.219.1/path/posix}/common.js +3 -3
- package/esm/deps/deno.land/std@0.219.1/path/posix/constants.d.ts +3 -0
- package/esm/deps/deno.land/std@0.219.1/path/posix/constants.js +5 -0
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/dirname.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/extname.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/format.js +1 -1
- 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
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/from_file_url.js +2 -2
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/glob_to_regexp.d.ts +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/glob_to_regexp.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/is_absolute.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0/path/windows → std@0.219.1/path/posix}/is_glob.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/join.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0/path/windows → std@0.219.1/path/posix}/join_globs.d.ts +2 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/join_globs.js +3 -3
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/mod.d.ts +1 -3
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/mod.js +2 -4
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/normalize.js +1 -1
- 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
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/normalize_glob.js +3 -3
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/parse.d.ts +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/parse.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/relative.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/resolve.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/to_file_url.d.ts +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/to_file_url.js +2 -2
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/to_namespaced_path.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/relative.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/resolve.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/to_file_url.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/to_namespaced_path.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/_util.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/basename.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0/path/posix → std@0.219.1/path/windows}/common.js +3 -3
- package/esm/deps/deno.land/std@0.219.1/path/windows/constants.d.ts +3 -0
- package/esm/deps/deno.land/std@0.219.1/path/windows/constants.js +5 -0
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/dirname.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/extname.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/format.js +1 -1
- 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
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/from_file_url.js +2 -2
- 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
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/glob_to_regexp.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/is_absolute.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0/path/posix → std@0.219.1/path/windows}/is_glob.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/join.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0/path/posix → std@0.219.1/path/windows}/join_globs.d.ts +2 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/join_globs.js +3 -3
- 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
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/mod.js +2 -4
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/normalize.js +1 -1
- 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
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/normalize_glob.js +3 -3
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/parse.d.ts +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/parse.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/relative.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/resolve.js +1 -1
- 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
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/to_file_url.js +2 -2
- package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/to_namespaced_path.js +1 -1
- package/esm/deps/deno.land/x/astring@v1.8.6/src/astring.d.ts +109 -0
- package/esm/deps/deno.land/x/astring@v1.8.6/src/astring.js +1159 -0
- package/esm/deps.d.ts +6 -2
- package/esm/deps.js +5 -2
- package/esm/mod.d.ts +1 -0
- package/esm/mod.js +2 -0
- package/esm/plugins/auto_trim.d.ts +8 -0
- package/esm/plugins/auto_trim.js +36 -0
- package/esm/plugins/escape.js +2 -1
- package/esm/plugins/trim.d.ts +4 -0
- package/esm/plugins/trim.js +28 -0
- package/esm/plugins/unescape.js +2 -1
- package/esm/src/environment.d.ts +3 -0
- package/esm/src/environment.js +28 -7
- package/esm/src/tokenizer.js +6 -29
- package/esm/src/transformer.d.ts +1 -0
- package/esm/src/transformer.js +180 -0
- package/package.json +21 -8
- package/esm/deps/deno.land/std@0.210.0/html/entities.d.ts +0 -38
- package/esm/deps/deno.land/std@0.210.0/path/_common/assert_path.d.ts +0 -1
- package/esm/deps/deno.land/std@0.210.0/path/_interface.js +0 -3
- package/esm/deps/deno.land/std@0.210.0/path/common.d.ts +0 -13
- package/esm/deps/deno.land/std@0.210.0/path/glob_to_regexp.d.ts +0 -61
- package/esm/deps/deno.land/std@0.210.0/path/mod.d.ts +0 -28
- package/esm/deps/deno.land/std@0.210.0/path/normalize_glob.d.ts +0 -3
- package/esm/deps/deno.land/std@0.210.0/path/posix/from_file_url.d.ts +0 -12
- package/esm/deps/deno.land/std@0.210.0/path/posix/normalize_glob.d.ts +0 -3
- package/esm/deps/deno.land/std@0.210.0/path/posix/separator.d.ts +0 -2
- package/esm/deps/deno.land/std@0.210.0/path/posix/separator.js +0 -4
- package/esm/deps/deno.land/std@0.210.0/path/separator.d.ts +0 -2
- package/esm/deps/deno.land/std@0.210.0/path/separator.js +0 -5
- package/esm/deps/deno.land/std@0.210.0/path/windows/from_file_url.d.ts +0 -14
- package/esm/deps/deno.land/std@0.210.0/path/windows/glob_to_regexp.d.ts +0 -57
- package/esm/deps/deno.land/std@0.210.0/path/windows/mod.d.ts +0 -40
- package/esm/deps/deno.land/std@0.210.0/path/windows/normalize_glob.d.ts +0 -3
- package/esm/deps/deno.land/std@0.210.0/path/windows/separator.d.ts +0 -2
- package/esm/deps/deno.land/std@0.210.0/path/windows/separator.js +0 -4
- package/esm/deps/deno.land/std@0.210.0/path/windows/to_file_url.d.ts +0 -14
- package/script/_dnt.shims.d.ts +0 -5
- package/script/_dnt.shims.js +0 -65
- package/script/deps/deno.land/std@0.210.0/assert/assert.d.ts +0 -12
- package/script/deps/deno.land/std@0.210.0/assert/assert.js +0 -22
- package/script/deps/deno.land/std@0.210.0/assert/assertion_error.d.ts +0 -14
- package/script/deps/deno.land/std@0.210.0/assert/assertion_error.js +0 -22
- package/script/deps/deno.land/std@0.210.0/html/entities.d.ts +0 -38
- package/script/deps/deno.land/std@0.210.0/html/entities.js +0 -81
- package/script/deps/deno.land/std@0.210.0/html/mod.d.ts +0 -6
- package/script/deps/deno.land/std@0.210.0/html/mod.js +0 -24
- package/script/deps/deno.land/std@0.210.0/path/_common/assert_path.d.ts +0 -1
- package/script/deps/deno.land/std@0.210.0/path/_common/assert_path.js +0 -11
- package/script/deps/deno.land/std@0.210.0/path/_common/basename.d.ts +0 -3
- package/script/deps/deno.land/std@0.210.0/path/_common/basename.js +0 -46
- package/script/deps/deno.land/std@0.210.0/path/_common/common.d.ts +0 -1
- package/script/deps/deno.land/std@0.210.0/path/_common/common.js +0 -27
- package/script/deps/deno.land/std@0.210.0/path/_common/constants.d.ts +0 -39
- package/script/deps/deno.land/std@0.210.0/path/_common/constants.js +0 -49
- package/script/deps/deno.land/std@0.210.0/path/_common/dirname.d.ts +0 -1
- package/script/deps/deno.land/std@0.210.0/path/_common/dirname.js +0 -12
- package/script/deps/deno.land/std@0.210.0/path/_common/format.d.ts +0 -3
- package/script/deps/deno.land/std@0.210.0/path/_common/format.js +0 -24
- package/script/deps/deno.land/std@0.210.0/path/_common/from_file_url.d.ts +0 -2
- package/script/deps/deno.land/std@0.210.0/path/_common/from_file_url.js +0 -13
- package/script/deps/deno.land/std@0.210.0/path/_common/glob_to_reg_exp.d.ts +0 -28
- package/script/deps/deno.land/std@0.210.0/path/_common/glob_to_reg_exp.js +0 -239
- package/script/deps/deno.land/std@0.210.0/path/_common/normalize.d.ts +0 -1
- package/script/deps/deno.land/std@0.210.0/path/_common/normalize.js +0 -12
- package/script/deps/deno.land/std@0.210.0/path/_common/normalize_string.d.ts +0 -1
- package/script/deps/deno.land/std@0.210.0/path/_common/normalize_string.js +0 -81
- package/script/deps/deno.land/std@0.210.0/path/_common/relative.d.ts +0 -1
- package/script/deps/deno.land/std@0.210.0/path/_common/relative.js +0 -13
- package/script/deps/deno.land/std@0.210.0/path/_common/strip_trailing_separators.d.ts +0 -1
- package/script/deps/deno.land/std@0.210.0/path/_common/strip_trailing_separators.js +0 -23
- package/script/deps/deno.land/std@0.210.0/path/_common/to_file_url.d.ts +0 -1
- package/script/deps/deno.land/std@0.210.0/path/_common/to_file_url.js +0 -19
- package/script/deps/deno.land/std@0.210.0/path/_interface.d.ts +0 -26
- package/script/deps/deno.land/std@0.210.0/path/_interface.js +0 -4
- package/script/deps/deno.land/std@0.210.0/path/_os.d.ts +0 -3
- package/script/deps/deno.land/std@0.210.0/path/_os.js +0 -44
- package/script/deps/deno.land/std@0.210.0/path/basename.d.ts +0 -8
- package/script/deps/deno.land/std@0.210.0/path/basename.js +0 -21
- package/script/deps/deno.land/std@0.210.0/path/common.d.ts +0 -13
- package/script/deps/deno.land/std@0.210.0/path/common.js +0 -23
- package/script/deps/deno.land/std@0.210.0/path/dirname.d.ts +0 -5
- package/script/deps/deno.land/std@0.210.0/path/dirname.js +0 -16
- package/script/deps/deno.land/std@0.210.0/path/extname.d.ts +0 -6
- package/script/deps/deno.land/std@0.210.0/path/extname.js +0 -17
- package/script/deps/deno.land/std@0.210.0/path/format.d.ts +0 -6
- package/script/deps/deno.land/std@0.210.0/path/format.js +0 -16
- package/script/deps/deno.land/std@0.210.0/path/from_file_url.d.ts +0 -18
- package/script/deps/deno.land/std@0.210.0/path/from_file_url.js +0 -28
- package/script/deps/deno.land/std@0.210.0/path/glob_to_regexp.js +0 -69
- package/script/deps/deno.land/std@0.210.0/path/is_absolute.d.ts +0 -5
- package/script/deps/deno.land/std@0.210.0/path/is_absolute.js +0 -16
- package/script/deps/deno.land/std@0.210.0/path/is_glob.d.ts +0 -2
- package/script/deps/deno.land/std@0.210.0/path/is_glob.js +0 -32
- package/script/deps/deno.land/std@0.210.0/path/join.d.ts +0 -5
- package/script/deps/deno.land/std@0.210.0/path/join.js +0 -16
- package/script/deps/deno.land/std@0.210.0/path/join_globs.d.ts +0 -3
- package/script/deps/deno.land/std@0.210.0/path/join_globs.js +0 -15
- package/script/deps/deno.land/std@0.210.0/path/mod.d.ts +0 -28
- package/script/deps/deno.land/std@0.210.0/path/mod.js +0 -94
- package/script/deps/deno.land/std@0.210.0/path/normalize.d.ts +0 -7
- package/script/deps/deno.land/std@0.210.0/path/normalize.js +0 -18
- package/script/deps/deno.land/std@0.210.0/path/normalize_glob.js +0 -15
- package/script/deps/deno.land/std@0.210.0/path/parse.d.ts +0 -6
- package/script/deps/deno.land/std@0.210.0/path/parse.js +0 -16
- package/script/deps/deno.land/std@0.210.0/path/posix/_util.d.ts +0 -1
- package/script/deps/deno.land/std@0.210.0/path/posix/_util.js +0 -12
- package/script/deps/deno.land/std@0.210.0/path/posix/basename.d.ts +0 -8
- package/script/deps/deno.land/std@0.210.0/path/posix/basename.js +0 -22
- package/script/deps/deno.land/std@0.210.0/path/posix/common.js +0 -23
- package/script/deps/deno.land/std@0.210.0/path/posix/dirname.d.ts +0 -5
- package/script/deps/deno.land/std@0.210.0/path/posix/dirname.js +0 -40
- package/script/deps/deno.land/std@0.210.0/path/posix/extname.d.ts +0 -6
- package/script/deps/deno.land/std@0.210.0/path/posix/extname.js +0 -63
- package/script/deps/deno.land/std@0.210.0/path/posix/format.d.ts +0 -6
- package/script/deps/deno.land/std@0.210.0/path/posix/format.js +0 -15
- package/script/deps/deno.land/std@0.210.0/path/posix/from_file_url.js +0 -21
- package/script/deps/deno.land/std@0.210.0/path/posix/glob_to_regexp.js +0 -73
- package/script/deps/deno.land/std@0.210.0/path/posix/is_absolute.d.ts +0 -5
- package/script/deps/deno.land/std@0.210.0/path/posix/is_absolute.js +0 -16
- package/script/deps/deno.land/std@0.210.0/path/posix/is_glob.d.ts +0 -1
- package/script/deps/deno.land/std@0.210.0/path/posix/is_glob.js +0 -7
- package/script/deps/deno.land/std@0.210.0/path/posix/join.d.ts +0 -5
- package/script/deps/deno.land/std@0.210.0/path/posix/join.js +0 -30
- package/script/deps/deno.land/std@0.210.0/path/posix/join_globs.d.ts +0 -3
- package/script/deps/deno.land/std@0.210.0/path/posix/join_globs.js +0 -30
- package/script/deps/deno.land/std@0.210.0/path/posix/mod.js +0 -61
- package/script/deps/deno.land/std@0.210.0/path/posix/normalize.d.ts +0 -7
- package/script/deps/deno.land/std@0.210.0/path/posix/normalize.js +0 -29
- package/script/deps/deno.land/std@0.210.0/path/posix/normalize_glob.js +0 -20
- package/script/deps/deno.land/std@0.210.0/path/posix/parse.d.ts +0 -6
- package/script/deps/deno.land/std@0.210.0/path/posix/parse.js +0 -102
- package/script/deps/deno.land/std@0.210.0/path/posix/relative.d.ts +0 -7
- package/script/deps/deno.land/std@0.210.0/path/posix/relative.js +0 -98
- package/script/deps/deno.land/std@0.210.0/path/posix/resolve.d.ts +0 -5
- package/script/deps/deno.land/std@0.210.0/path/posix/resolve.js +0 -75
- package/script/deps/deno.land/std@0.210.0/path/posix/separator.d.ts +0 -2
- package/script/deps/deno.land/std@0.210.0/path/posix/separator.js +0 -7
- package/script/deps/deno.land/std@0.210.0/path/posix/to_file_url.d.ts +0 -12
- package/script/deps/deno.land/std@0.210.0/path/posix/to_file_url.js +0 -26
- package/script/deps/deno.land/std@0.210.0/path/posix/to_namespaced_path.d.ts +0 -5
- package/script/deps/deno.land/std@0.210.0/path/posix/to_namespaced_path.js +0 -14
- package/script/deps/deno.land/std@0.210.0/path/relative.d.ts +0 -12
- package/script/deps/deno.land/std@0.210.0/path/relative.js +0 -23
- package/script/deps/deno.land/std@0.210.0/path/resolve.d.ts +0 -5
- package/script/deps/deno.land/std@0.210.0/path/resolve.js +0 -18
- package/script/deps/deno.land/std@0.210.0/path/separator.d.ts +0 -2
- package/script/deps/deno.land/std@0.210.0/path/separator.js +0 -8
- package/script/deps/deno.land/std@0.210.0/path/to_file_url.d.ts +0 -18
- package/script/deps/deno.land/std@0.210.0/path/to_file_url.js +0 -28
- package/script/deps/deno.land/std@0.210.0/path/to_namespaced_path.d.ts +0 -5
- package/script/deps/deno.land/std@0.210.0/path/to_namespaced_path.js +0 -18
- package/script/deps/deno.land/std@0.210.0/path/windows/_util.d.ts +0 -3
- package/script/deps/deno.land/std@0.210.0/path/windows/_util.js +0 -21
- package/script/deps/deno.land/std@0.210.0/path/windows/basename.d.ts +0 -8
- package/script/deps/deno.land/std@0.210.0/path/windows/basename.js +0 -34
- package/script/deps/deno.land/std@0.210.0/path/windows/common.d.ts +0 -13
- package/script/deps/deno.land/std@0.210.0/path/windows/common.js +0 -23
- package/script/deps/deno.land/std@0.210.0/path/windows/dirname.d.ts +0 -5
- package/script/deps/deno.land/std@0.210.0/path/windows/dirname.js +0 -102
- package/script/deps/deno.land/std@0.210.0/path/windows/extname.d.ts +0 -6
- package/script/deps/deno.land/std@0.210.0/path/windows/extname.js +0 -72
- package/script/deps/deno.land/std@0.210.0/path/windows/format.d.ts +0 -6
- package/script/deps/deno.land/std@0.210.0/path/windows/format.js +0 -15
- package/script/deps/deno.land/std@0.210.0/path/windows/from_file_url.js +0 -30
- package/script/deps/deno.land/std@0.210.0/path/windows/glob_to_regexp.d.ts +0 -57
- package/script/deps/deno.land/std@0.210.0/path/windows/glob_to_regexp.js +0 -73
- package/script/deps/deno.land/std@0.210.0/path/windows/is_absolute.d.ts +0 -5
- package/script/deps/deno.land/std@0.210.0/path/windows/is_absolute.js +0 -31
- package/script/deps/deno.land/std@0.210.0/path/windows/is_glob.d.ts +0 -1
- package/script/deps/deno.land/std@0.210.0/path/windows/is_glob.js +0 -7
- package/script/deps/deno.land/std@0.210.0/path/windows/join.d.ts +0 -5
- package/script/deps/deno.land/std@0.210.0/path/windows/join.js +0 -76
- package/script/deps/deno.land/std@0.210.0/path/windows/join_globs.d.ts +0 -3
- package/script/deps/deno.land/std@0.210.0/path/windows/join_globs.js +0 -30
- package/script/deps/deno.land/std@0.210.0/path/windows/mod.d.ts +0 -40
- package/script/deps/deno.land/std@0.210.0/path/windows/mod.js +0 -61
- package/script/deps/deno.land/std@0.210.0/path/windows/normalize.d.ts +0 -7
- package/script/deps/deno.land/std@0.210.0/path/windows/normalize.js +0 -134
- package/script/deps/deno.land/std@0.210.0/path/windows/normalize_glob.js +0 -20
- package/script/deps/deno.land/std@0.210.0/path/windows/parse.d.ts +0 -6
- package/script/deps/deno.land/std@0.210.0/path/windows/parse.js +0 -163
- package/script/deps/deno.land/std@0.210.0/path/windows/relative.d.ts +0 -12
- package/script/deps/deno.land/std@0.210.0/path/windows/relative.js +0 -125
- package/script/deps/deno.land/std@0.210.0/path/windows/resolve.d.ts +0 -5
- package/script/deps/deno.land/std@0.210.0/path/windows/resolve.js +0 -170
- package/script/deps/deno.land/std@0.210.0/path/windows/separator.d.ts +0 -2
- package/script/deps/deno.land/std@0.210.0/path/windows/separator.js +0 -7
- package/script/deps/deno.land/std@0.210.0/path/windows/to_file_url.js +0 -35
- package/script/deps/deno.land/std@0.210.0/path/windows/to_namespaced_path.d.ts +0 -5
- package/script/deps/deno.land/std@0.210.0/path/windows/to_namespaced_path.js +0 -42
- package/script/deps.d.ts +0 -2
- package/script/deps.js +0 -28
- package/script/mod.d.ts +0 -9
- package/script/mod.js +0 -69
- package/script/package.json +0 -3
- package/script/plugins/echo.d.ts +0 -2
- package/script/plugins/echo.js +0 -16
- package/script/plugins/escape.d.ts +0 -2
- package/script/plugins/escape.js +0 -9
- package/script/plugins/export.d.ts +0 -2
- package/script/plugins/export.js +0 -50
- package/script/plugins/for.d.ts +0 -2
- package/script/plugins/for.js +0 -77
- package/script/plugins/function.d.ts +0 -2
- package/script/plugins/function.js +0 -40
- package/script/plugins/if.d.ts +0 -2
- package/script/plugins/if.js +0 -35
- package/script/plugins/import.d.ts +0 -2
- package/script/plugins/import.js +0 -20
- package/script/plugins/include.d.ts +0 -2
- package/script/plugins/include.js +0 -26
- package/script/plugins/js.d.ts +0 -2
- package/script/plugins/js.js +0 -14
- package/script/plugins/layout.d.ts +0 -2
- package/script/plugins/layout.js +0 -37
- package/script/plugins/set.d.ts +0 -2
- package/script/plugins/set.js +0 -48
- package/script/plugins/unescape.d.ts +0 -2
- package/script/plugins/unescape.js +0 -9
- package/script/src/environment.d.ts +0 -51
- package/script/src/environment.js +0 -208
- package/script/src/loader.d.ts +0 -14
- package/script/src/loader.js +0 -46
- package/script/src/tokenizer.d.ts +0 -13
- package/script/src/tokenizer.js +0 -249
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_interface.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_os.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0/path/posix → std@0.219.1/path}/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0/path/windows → std@0.219.1/path/posix}/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/basename.d.ts +0 -0
- /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
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/windows/resolve.d.ts +0 -0
- /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,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
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;
|
package/script/package.json
DELETED
package/script/plugins/echo.d.ts
DELETED
package/script/plugins/echo.js
DELETED
|
@@ -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
|
-
}
|
package/script/plugins/escape.js
DELETED
package/script/plugins/export.js
DELETED
|
@@ -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
|
-
}
|
package/script/plugins/for.d.ts
DELETED
package/script/plugins/for.js
DELETED
|
@@ -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,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
|
-
}
|
package/script/plugins/if.d.ts
DELETED
package/script/plugins/if.js
DELETED
|
@@ -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
|
-
}
|
package/script/plugins/import.js
DELETED
|
@@ -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,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
|
-
}
|
package/script/plugins/js.d.ts
DELETED
package/script/plugins/js.js
DELETED
|
@@ -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
|
-
}
|
package/script/plugins/layout.js
DELETED
|
@@ -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
|
-
}
|
package/script/plugins/set.d.ts
DELETED
package/script/plugins/set.js
DELETED
|
@@ -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
|
-
}
|