ventojs 0.9.2 → 0.11.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/esm/deps/deno.land/std@0.210.0/assert/assert.d.ts +12 -0
- package/esm/deps/deno.land/std@0.210.0/assert/assert.js +18 -0
- package/esm/deps/deno.land/std@0.210.0/assert/assertion_error.d.ts +14 -0
- package/esm/deps/deno.land/std@0.210.0/assert/assertion_error.js +18 -0
- package/{script/deps/deno.land/std@0.208.0 → esm/deps/deno.land/std@0.210.0}/path/_common/glob_to_reg_exp.d.ts +1 -0
- package/esm/deps/deno.land/std@0.210.0/path/common.d.ts +13 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/extname.js +1 -1
- package/{script/deps/deno.land/std@0.208.0 → esm/deps/deno.land/std@0.210.0}/path/mod.d.ts +2 -2
- package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/mod.js +3 -1
- package/{script/deps/deno.land/std@0.208.0 → esm/deps/deno.land/std@0.210.0}/path/posix/to_file_url.d.ts +1 -1
- package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/separator.d.ts +1 -1
- package/esm/deps.d.ts +2 -2
- package/esm/deps.js +2 -2
- 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/for.js +27 -1
- package/esm/plugins/js.js +1 -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 +8 -1
- package/esm/src/environment.js +27 -6
- package/esm/src/tokenizer.js +65 -40
- package/package.json +5 -1
- package/script/deps/deno.land/std@0.210.0/assert/assert.d.ts +12 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/assert/assert.js +11 -1
- package/script/deps/deno.land/std@0.210.0/assert/assertion_error.d.ts +14 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/assert/assertion_error.js +13 -2
- package/{esm/deps/deno.land/std@0.208.0 → script/deps/deno.land/std@0.210.0}/path/_common/glob_to_reg_exp.d.ts +1 -0
- package/script/deps/deno.land/std@0.210.0/path/common.d.ts +13 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/extname.js +1 -1
- package/{esm/deps/deno.land/std@0.208.0 → script/deps/deno.land/std@0.210.0}/path/mod.d.ts +2 -2
- package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/mod.js +3 -1
- package/{esm/deps/deno.land/std@0.208.0 → script/deps/deno.land/std@0.210.0}/path/posix/to_file_url.d.ts +1 -1
- package/script/deps/deno.land/std@0.210.0/path/separator.d.ts +2 -0
- package/script/deps.d.ts +2 -2
- package/script/deps.js +2 -2
- package/script/mod.js +2 -0
- package/script/plugins/auto_trim.d.ts +8 -0
- package/script/plugins/auto_trim.js +41 -0
- package/script/plugins/escape.js +2 -1
- package/script/plugins/for.js +27 -1
- package/script/plugins/js.js +1 -1
- package/script/plugins/trim.d.ts +4 -0
- package/script/plugins/trim.js +33 -0
- package/script/plugins/unescape.js +2 -1
- package/script/src/environment.d.ts +8 -1
- package/script/src/environment.js +27 -6
- package/script/src/tokenizer.js +65 -40
- package/esm/deps/deno.land/std@0.208.0/assert/assert.d.ts +0 -2
- package/esm/deps/deno.land/std@0.208.0/assert/assert.js +0 -8
- package/esm/deps/deno.land/std@0.208.0/assert/assertion_error.d.ts +0 -4
- package/esm/deps/deno.land/std@0.208.0/assert/assertion_error.js +0 -7
- package/script/deps/deno.land/std@0.208.0/assert/assert.d.ts +0 -2
- package/script/deps/deno.land/std@0.208.0/assert/assertion_error.d.ts +0 -4
- package/script/deps/deno.land/std@0.208.0/path/posix/common.d.ts +0 -13
- package/script/deps/deno.land/std@0.208.0/path/separator.d.ts +0 -2
- package/script/deps/deno.land/std@0.208.0/path/windows/common.d.ts +0 -13
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/html/entities.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/html/entities.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/html/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/html/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/assert_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/assert_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/normalize_string.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_interface.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_interface.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_os.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_os.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0/path → std@0.210.0/path/posix}/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0/path/posix → std@0.210.0/path/windows}/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/html/entities.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/html/entities.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/html/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/html/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/assert_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/assert_path.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/common.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/format.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/normalize_string.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/normalize_string.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_common/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_interface.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_interface.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_os.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/_os.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/common.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/format.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/join.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/basename.js +0 -0
- /package/{esm/deps/deno.land/std@0.208.0/path/windows → script/deps/deno.land/std@0.210.0/path/posix}/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/common.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/format.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/join.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/posix/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0/path → std@0.210.0/path/windows}/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/common.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/format.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/join.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.210.0}/path/windows/to_namespaced_path.js +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error thrown when an assertion fails.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { AssertionError } from "https://deno.land/std@$STD_VERSION/assert/assertion_error.ts";
|
|
7
|
+
*
|
|
8
|
+
* throw new AssertionError("Assertion failed");
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export declare class AssertionError extends Error {
|
|
12
|
+
/** Constructs a new instance. */
|
|
13
|
+
constructor(message: string);
|
|
14
|
+
}
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.AssertionError = void 0;
|
|
4
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Error thrown when an assertion fails.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { AssertionError } from "https://deno.land/std@$STD_VERSION/assert/assertion_error.ts";
|
|
11
|
+
*
|
|
12
|
+
* throw new AssertionError("Assertion failed");
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
5
15
|
class AssertionError extends Error {
|
|
6
|
-
|
|
16
|
+
/** Constructs a new instance. */
|
|
7
17
|
constructor(message) {
|
|
8
18
|
super(message);
|
|
19
|
+
this.name = "AssertionError";
|
|
9
20
|
}
|
|
10
21
|
}
|
|
11
22
|
exports.AssertionError = AssertionError;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Determines the common path from a set of paths, using an optional separator,
|
|
2
|
+
* which defaults to the OS default separator.
|
|
3
|
+
*
|
|
4
|
+
* ```ts
|
|
5
|
+
* import { common } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
|
|
6
|
+
* const p = common([
|
|
7
|
+
* "./deno/std/path/mod.ts",
|
|
8
|
+
* "./deno/std/fs/mod.ts",
|
|
9
|
+
* ]);
|
|
10
|
+
* console.log(p); // "./deno/std/"
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare function common(paths: string[], sep?: "/" | "\\"): string;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.extname = void 0;
|
|
6
6
|
const _os_js_1 = require("./_os.js");
|
|
7
7
|
const extname_js_1 = require("./posix/extname.js");
|
|
8
|
-
const extname_js_2 = require("./
|
|
8
|
+
const extname_js_2 = require("./windows/extname.js");
|
|
9
9
|
/**
|
|
10
10
|
* Return the extension of the `path` with leading period.
|
|
11
11
|
* @param path with extension
|
|
@@ -4,8 +4,8 @@ import * as _posix from "./posix/mod.js";
|
|
|
4
4
|
export declare const win32: typeof _windows;
|
|
5
5
|
/** @deprecated (will be removed after 1.0.0) Import from {@link https://deno.land/std/posix/mod.ts} instead. */
|
|
6
6
|
export declare const posix: typeof _posix;
|
|
7
|
-
export declare const sep:
|
|
8
|
-
export declare const delimiter:
|
|
7
|
+
export declare const sep: "/" | "\\";
|
|
8
|
+
export declare const delimiter: ":" | ";";
|
|
9
9
|
export * from "./basename.js";
|
|
10
10
|
export * from "./dirname.js";
|
|
11
11
|
export * from "./extname.js";
|
|
@@ -69,7 +69,9 @@ exports.win32 = _windows;
|
|
|
69
69
|
/** @deprecated (will be removed after 1.0.0) Import from {@link https://deno.land/std/posix/mod.ts} instead. */
|
|
70
70
|
exports.posix = _posix;
|
|
71
71
|
exports.sep = _os_js_1.isWindows ? _windows.sep : _posix.sep;
|
|
72
|
-
exports.delimiter = _os_js_1.isWindows
|
|
72
|
+
exports.delimiter = _os_js_1.isWindows
|
|
73
|
+
? _windows.delimiter
|
|
74
|
+
: _posix.delimiter;
|
|
73
75
|
__exportStar(require("./basename.js"), exports);
|
|
74
76
|
__exportStar(require("./dirname.js"), exports);
|
|
75
77
|
__exportStar(require("./extname.js"), exports);
|
package/script/deps.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * as path from "./deps/deno.land/std@0.
|
|
2
|
-
export * as html from "./deps/deno.land/std@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
CHANGED
|
@@ -24,5 +24,5 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.html = exports.path = void 0;
|
|
27
|
-
exports.path = __importStar(require("./deps/deno.land/std@0.
|
|
28
|
-
exports.html = __importStar(require("./deps/deno.land/std@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.js
CHANGED
|
@@ -41,6 +41,7 @@ const export_js_1 = __importDefault(require("./plugins/export.js"));
|
|
|
41
41
|
const echo_js_1 = __importDefault(require("./plugins/echo.js"));
|
|
42
42
|
const escape_js_1 = __importDefault(require("./plugins/escape.js"));
|
|
43
43
|
const unescape_js_1 = __importDefault(require("./plugins/unescape.js"));
|
|
44
|
+
const trim_js_1 = __importDefault(require("./plugins/trim.js"));
|
|
44
45
|
function default_1(options = {}) {
|
|
45
46
|
const loader = typeof options.includes === "object"
|
|
46
47
|
? options.includes
|
|
@@ -64,6 +65,7 @@ function default_1(options = {}) {
|
|
|
64
65
|
env.use((0, echo_js_1.default)());
|
|
65
66
|
env.use((0, escape_js_1.default)());
|
|
66
67
|
env.use((0, unescape_js_1.default)());
|
|
68
|
+
env.use((0, trim_js_1.default)());
|
|
67
69
|
return env;
|
|
68
70
|
}
|
|
69
71
|
exports.default = default_1;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Token } from "../src/tokenizer.js";
|
|
2
|
+
import type { Environment } from "../src/environment.js";
|
|
3
|
+
export declare const defaultTags: string[];
|
|
4
|
+
export type AutoTrimOptions = {
|
|
5
|
+
tags: string[];
|
|
6
|
+
};
|
|
7
|
+
export default function (options?: AutoTrimOptions): (env: Environment) => void;
|
|
8
|
+
export declare function autoTrim(tokens: Token[], options: AutoTrimOptions): void;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.autoTrim = exports.defaultTags = void 0;
|
|
4
|
+
exports.defaultTags = [
|
|
5
|
+
">",
|
|
6
|
+
"#",
|
|
7
|
+
"set",
|
|
8
|
+
"/set",
|
|
9
|
+
"if",
|
|
10
|
+
"/if",
|
|
11
|
+
"else",
|
|
12
|
+
"for",
|
|
13
|
+
"/for",
|
|
14
|
+
"function",
|
|
15
|
+
"async",
|
|
16
|
+
"/function",
|
|
17
|
+
"export",
|
|
18
|
+
"/export",
|
|
19
|
+
"import",
|
|
20
|
+
];
|
|
21
|
+
function default_1(options = { tags: exports.defaultTags }) {
|
|
22
|
+
return (env) => {
|
|
23
|
+
env.tokenPreprocessors.push((_, tokens) => autoTrim(tokens, options));
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
exports.default = default_1;
|
|
27
|
+
function autoTrim(tokens, options) {
|
|
28
|
+
for (let i = 0; i < tokens.length; i++) {
|
|
29
|
+
const previous = tokens[i - 1];
|
|
30
|
+
const token = tokens[i];
|
|
31
|
+
const next = tokens[i + 1];
|
|
32
|
+
const [type, code] = token;
|
|
33
|
+
if (type === "tag" && options.tags.find((tag) => code.startsWith(tag))) {
|
|
34
|
+
// Remove leading horizontal space
|
|
35
|
+
previous[1] = previous[1].replace(/[ \t]*$/, "");
|
|
36
|
+
// Remove trailing horizontal space + newline
|
|
37
|
+
next[1] = next[1].replace(/^[ \t]*(?:\r\n|\n)/, "");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.autoTrim = autoTrim;
|
package/script/plugins/escape.js
CHANGED
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const deps_js_1 = require("../deps.js");
|
|
4
4
|
function default_1() {
|
|
5
5
|
return (env) => {
|
|
6
|
-
|
|
6
|
+
// deno-lint-ignore no-explicit-any
|
|
7
|
+
env.filters.escape = (value) => value ? deps_js_1.html.escape(value.toString()) : "";
|
|
7
8
|
};
|
|
8
9
|
}
|
|
9
10
|
exports.default = default_1;
|
package/script/plugins/for.js
CHANGED
|
@@ -28,7 +28,9 @@ function forTag(env, code, output, tokens) {
|
|
|
28
28
|
compiled.push("}");
|
|
29
29
|
return compiled.join("\n");
|
|
30
30
|
}
|
|
31
|
-
function toIterator(
|
|
31
|
+
function toIterator(
|
|
32
|
+
// deno-lint-ignore no-explicit-any
|
|
33
|
+
item, withKeys = false) {
|
|
32
34
|
if (item === undefined || item === null) {
|
|
33
35
|
return [];
|
|
34
36
|
}
|
|
@@ -39,6 +41,18 @@ function toIterator(item, withKeys = false) {
|
|
|
39
41
|
return toIterator(item(), withKeys);
|
|
40
42
|
}
|
|
41
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
|
+
}
|
|
42
56
|
return withKeys ? Object.entries(item) : Object.values(item);
|
|
43
57
|
}
|
|
44
58
|
if (typeof item === "string") {
|
|
@@ -49,3 +63,15 @@ function toIterator(item, withKeys = false) {
|
|
|
49
63
|
}
|
|
50
64
|
return toIterator([item], withKeys);
|
|
51
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
|
+
}
|
package/script/plugins/js.js
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.trim = void 0;
|
|
4
|
+
function default_1() {
|
|
5
|
+
return (env) => {
|
|
6
|
+
env.tokenPreprocessors.push(trim);
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
exports.default = default_1;
|
|
10
|
+
function trim(_, tokens) {
|
|
11
|
+
for (let i = 0; i < tokens.length; i++) {
|
|
12
|
+
const previous = tokens[i - 1];
|
|
13
|
+
const token = tokens[i];
|
|
14
|
+
const next = tokens[i + 1];
|
|
15
|
+
let [type, code] = token;
|
|
16
|
+
if (type === "tag" && code.startsWith("-")) {
|
|
17
|
+
previous[1] = previous[1].trimEnd();
|
|
18
|
+
code = code.slice(1);
|
|
19
|
+
}
|
|
20
|
+
if (type === "tag" && code.endsWith("-")) {
|
|
21
|
+
next[1] = next[1].trimStart();
|
|
22
|
+
code = code.slice(0, -1);
|
|
23
|
+
}
|
|
24
|
+
// Trim tag and filter code
|
|
25
|
+
switch (type) {
|
|
26
|
+
case "tag":
|
|
27
|
+
case "filter":
|
|
28
|
+
token[1] = code.trim();
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.trim = trim;
|
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const deps_js_1 = require("../deps.js");
|
|
4
4
|
function default_1() {
|
|
5
5
|
return (env) => {
|
|
6
|
-
|
|
6
|
+
// deno-lint-ignore no-explicit-any
|
|
7
|
+
env.filters.unescape = (value) => value ? deps_js_1.html.unescape(value.toString()) : "";
|
|
7
8
|
};
|
|
8
9
|
}
|
|
9
10
|
exports.default = default_1;
|
|
@@ -16,8 +16,13 @@ export interface TemplateSync {
|
|
|
16
16
|
code: string;
|
|
17
17
|
file?: string;
|
|
18
18
|
}
|
|
19
|
+
export type TokenPreprocessor = (env: Environment, tokens: Token[], path?: string) => Token[] | void;
|
|
19
20
|
export type Tag = (env: Environment, code: string, output: string, tokens: Token[]) => string | undefined;
|
|
20
|
-
export type
|
|
21
|
+
export type FilterThis = {
|
|
22
|
+
data: Record<string, unknown>;
|
|
23
|
+
env: Environment;
|
|
24
|
+
};
|
|
25
|
+
export type Filter = (this: FilterThis, ...args: any[]) => any;
|
|
21
26
|
export type Plugin = (env: Environment) => void;
|
|
22
27
|
export interface Options {
|
|
23
28
|
loader: Loader;
|
|
@@ -29,6 +34,7 @@ export declare class Environment {
|
|
|
29
34
|
cache: Map<string, Template>;
|
|
30
35
|
options: Options;
|
|
31
36
|
tags: Tag[];
|
|
37
|
+
tokenPreprocessors: TokenPreprocessor[];
|
|
32
38
|
filters: Record<string, Filter>;
|
|
33
39
|
utils: Record<string, unknown>;
|
|
34
40
|
constructor(options: Options);
|
|
@@ -38,6 +44,7 @@ export declare class Environment {
|
|
|
38
44
|
runStringSync(source: string, data?: Record<string, unknown>): TemplateResult;
|
|
39
45
|
compile(source: string, path?: string, defaults?: Record<string, unknown>, sync?: false): Template;
|
|
40
46
|
compile(source: string, path?: string, defaults?: Record<string, unknown>, sync?: true): TemplateSync;
|
|
47
|
+
tokenize(source: string, path?: string): Token[];
|
|
41
48
|
load(file: string, from?: string): Promise<Template>;
|
|
42
49
|
compileTokens(tokens: Token[], outputVar?: string, stopAt?: string[]): string[];
|
|
43
50
|
compileFilters(tokens: Token[], output: string, autoescape?: boolean): string;
|
|
@@ -33,6 +33,7 @@ class Environment {
|
|
|
33
33
|
cache = new Map();
|
|
34
34
|
options;
|
|
35
35
|
tags = [];
|
|
36
|
+
tokenPreprocessors = [];
|
|
36
37
|
filters = {};
|
|
37
38
|
utils = {};
|
|
38
39
|
constructor(options) {
|
|
@@ -63,10 +64,7 @@ class Environment {
|
|
|
63
64
|
return template(data);
|
|
64
65
|
}
|
|
65
66
|
compile(source, path, defaults, sync = false) {
|
|
66
|
-
const
|
|
67
|
-
if (error) {
|
|
68
|
-
throw this.createError(path || "unknown", source, position, error);
|
|
69
|
-
}
|
|
67
|
+
const tokens = this.tokenize(source, path);
|
|
70
68
|
const code = this.compileTokens(tokens).join("\n");
|
|
71
69
|
const { dataVarname, useWith } = this.options;
|
|
72
70
|
const constructor = new Function("__file", "__env", "__defaults", `return${sync ? "" : " async"} function (${dataVarname}) {
|
|
@@ -88,10 +86,29 @@ class Environment {
|
|
|
88
86
|
template.source = source;
|
|
89
87
|
return template;
|
|
90
88
|
}
|
|
89
|
+
tokenize(source, path) {
|
|
90
|
+
const result = (0, tokenizer_js_1.default)(source);
|
|
91
|
+
let { tokens } = result;
|
|
92
|
+
const { position, error } = result;
|
|
93
|
+
if (error) {
|
|
94
|
+
throw this.createError(path || "unknown", source, position, error);
|
|
95
|
+
}
|
|
96
|
+
for (const tokenPreprocessor of this.tokenPreprocessors) {
|
|
97
|
+
const result = tokenPreprocessor(this, tokens, path);
|
|
98
|
+
if (result !== undefined) {
|
|
99
|
+
tokens = result;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return tokens;
|
|
103
|
+
}
|
|
91
104
|
async load(file, from) {
|
|
92
105
|
const path = from ? this.options.loader.resolve(from, file) : file;
|
|
93
106
|
if (!this.cache.has(path)) {
|
|
94
|
-
|
|
107
|
+
// Remove query and hash params from path before loading
|
|
108
|
+
const cleanPath = path
|
|
109
|
+
.split("?")[0]
|
|
110
|
+
.split("#")[0];
|
|
111
|
+
const { source, data } = await this.options.loader.load(cleanPath);
|
|
95
112
|
const template = this.compile(source, path, data);
|
|
96
113
|
this.cache.set(path, template);
|
|
97
114
|
}
|
|
@@ -153,7 +170,8 @@ class Environment {
|
|
|
153
170
|
}
|
|
154
171
|
else {
|
|
155
172
|
// It's a filter (e.g. filters.upper())
|
|
156
|
-
|
|
173
|
+
const { dataVarname } = this.options;
|
|
174
|
+
output = `${(isAsync || checkAsync(this.filters[name])) ? "await " : ""}__env.filters.${name}.call({data:${dataVarname},env:__env}, ${output}${args ? `, ${args}` : ""})`;
|
|
157
175
|
}
|
|
158
176
|
}
|
|
159
177
|
// Escape by default
|
|
@@ -202,3 +220,6 @@ function errorLine(source, pos) {
|
|
|
202
220
|
return [line, column, source.split("\n")[line - 1]];
|
|
203
221
|
}
|
|
204
222
|
exports.errorLine = errorLine;
|
|
223
|
+
function checkAsync(fn) {
|
|
224
|
+
return fn.constructor?.name === "AsyncFunction";
|
|
225
|
+
}
|
package/script/src/tokenizer.js
CHANGED
|
@@ -4,20 +4,13 @@ exports.parseTag = void 0;
|
|
|
4
4
|
function tokenize(source) {
|
|
5
5
|
const tokens = [];
|
|
6
6
|
let type = "string";
|
|
7
|
-
let trimNext = false;
|
|
8
7
|
let position = 0;
|
|
9
8
|
try {
|
|
10
9
|
while (source.length > 0) {
|
|
11
10
|
if (type === "string") {
|
|
12
11
|
const index = source.indexOf("{{");
|
|
13
12
|
const code = index === -1 ? source : source.slice(0, index);
|
|
14
|
-
|
|
15
|
-
tokens.push([type, code.trimStart(), position]);
|
|
16
|
-
trimNext = false;
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
tokens.push([type, code, position]);
|
|
20
|
-
}
|
|
13
|
+
tokens.push([type, code, position]);
|
|
21
14
|
if (index === -1) {
|
|
22
15
|
break;
|
|
23
16
|
}
|
|
@@ -44,39 +37,23 @@ function tokenize(source) {
|
|
|
44
37
|
const lastIndex = indexes.length - 1;
|
|
45
38
|
let tag;
|
|
46
39
|
indexes.reduce((prev, curr, index) => {
|
|
47
|
-
|
|
40
|
+
const code = source.slice(prev, curr - 2);
|
|
48
41
|
// Tag
|
|
49
42
|
if (index === 1) {
|
|
50
|
-
|
|
51
|
-
if (code.startsWith("-")) {
|
|
52
|
-
code = code.slice(1);
|
|
53
|
-
const lastToken = tokens[tokens.length - 1];
|
|
54
|
-
lastToken[1] = lastToken[1].trimEnd();
|
|
55
|
-
}
|
|
56
|
-
// Right trim
|
|
57
|
-
if (code.endsWith("-") && index === lastIndex) {
|
|
58
|
-
code = code.slice(0, -1);
|
|
59
|
-
trimNext = true;
|
|
60
|
-
}
|
|
61
|
-
tag = [type, code.trim(), position];
|
|
43
|
+
tag = [type, code, position];
|
|
62
44
|
tokens.push(tag);
|
|
63
45
|
return curr;
|
|
64
46
|
}
|
|
65
|
-
// Right trim
|
|
66
|
-
if (index === lastIndex && code.endsWith("-")) {
|
|
67
|
-
code = code.slice(0, -1);
|
|
68
|
-
trimNext = true;
|
|
69
|
-
}
|
|
70
47
|
// Filters
|
|
71
|
-
tokens.push(["filter", code
|
|
48
|
+
tokens.push(["filter", code]);
|
|
72
49
|
return curr;
|
|
73
50
|
});
|
|
74
51
|
position += indexes[lastIndex];
|
|
75
52
|
source = source.slice(indexes[lastIndex]);
|
|
76
53
|
type = "string";
|
|
77
54
|
// Search the closing echo tag {{ /echo }}
|
|
78
|
-
if (tag?.[1]
|
|
79
|
-
const end = source.match(/{{
|
|
55
|
+
if (tag?.[1].match(/^\-?\s*echo\s*\-?$/)) {
|
|
56
|
+
const end = source.match(/{{\-?\s*\/echo\s*\-?}}/);
|
|
80
57
|
if (!end) {
|
|
81
58
|
throw new Error("Unclosed echo tag");
|
|
82
59
|
}
|
|
@@ -115,7 +92,8 @@ function parseTag(source) {
|
|
|
115
92
|
statuses.unshift("bracket");
|
|
116
93
|
}
|
|
117
94
|
else if (status !== "comment" && status !== "single-quote" &&
|
|
118
|
-
status !== "double-quote" && status !== "literal"
|
|
95
|
+
status !== "double-quote" && status !== "literal" &&
|
|
96
|
+
status !== "regex" && status !== "line-comment") {
|
|
119
97
|
statuses.unshift("bracket");
|
|
120
98
|
}
|
|
121
99
|
break;
|
|
@@ -140,7 +118,9 @@ function parseTag(source) {
|
|
|
140
118
|
}
|
|
141
119
|
else if (status !== "comment" &&
|
|
142
120
|
status !== "single-quote" &&
|
|
143
|
-
status !== "literal"
|
|
121
|
+
status !== "literal" &&
|
|
122
|
+
status !== "regex" &&
|
|
123
|
+
status !== "line-comment") {
|
|
144
124
|
statuses.unshift("double-quote");
|
|
145
125
|
}
|
|
146
126
|
break;
|
|
@@ -153,7 +133,9 @@ function parseTag(source) {
|
|
|
153
133
|
}
|
|
154
134
|
else if (status !== "comment" &&
|
|
155
135
|
status !== "double-quote" &&
|
|
156
|
-
status !== "literal"
|
|
136
|
+
status !== "literal" &&
|
|
137
|
+
status !== "regex" &&
|
|
138
|
+
status !== "line-comment") {
|
|
157
139
|
statuses.unshift("single-quote");
|
|
158
140
|
}
|
|
159
141
|
break;
|
|
@@ -166,23 +148,56 @@ function parseTag(source) {
|
|
|
166
148
|
}
|
|
167
149
|
else if (status !== "comment" &&
|
|
168
150
|
status !== "double-quote" &&
|
|
169
|
-
status !== "single-quote"
|
|
151
|
+
status !== "single-quote" &&
|
|
152
|
+
status !== "regex" &&
|
|
153
|
+
status !== "line-comment") {
|
|
170
154
|
statuses.unshift("literal");
|
|
171
155
|
}
|
|
172
156
|
break;
|
|
173
157
|
}
|
|
174
|
-
// Detect comments
|
|
158
|
+
// Detect comments and regex
|
|
175
159
|
case "/": {
|
|
176
160
|
const status = statuses[0];
|
|
177
|
-
if (status
|
|
178
|
-
status
|
|
179
|
-
|
|
180
|
-
|
|
161
|
+
if (status === "single-quote" || status === "double-quote" ||
|
|
162
|
+
status === "literal" || status === "line-comment") {
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
// We are in a comment: close or ignore
|
|
166
|
+
if (status === "comment") {
|
|
167
|
+
if (source.charAt(index - 2) === "*") {
|
|
168
|
+
statuses.shift();
|
|
181
169
|
}
|
|
182
|
-
|
|
183
|
-
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
// We are in a regex: close or ignore
|
|
173
|
+
if (status === "regex") {
|
|
174
|
+
if (source.charAt(index - 2) !== "\\") {
|
|
184
175
|
statuses.shift();
|
|
185
176
|
}
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
// Start a new comment
|
|
180
|
+
if (source.charAt(index) === "*") {
|
|
181
|
+
statuses.unshift("comment");
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
// Start a new line comment
|
|
185
|
+
if (source.charAt(index - 2) === "/") {
|
|
186
|
+
statuses.unshift("line-comment");
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
// Start a new regex
|
|
190
|
+
const prev = prevChar(source, index - 1);
|
|
191
|
+
if (prev === "(" || prev === "=" || prev === ":" || prev === ",") {
|
|
192
|
+
statuses.unshift("regex");
|
|
193
|
+
}
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
// Detect end of line comments
|
|
197
|
+
case "\n": {
|
|
198
|
+
const status = statuses[0];
|
|
199
|
+
if (status === "line-comment") {
|
|
200
|
+
statuses.shift();
|
|
186
201
|
}
|
|
187
202
|
break;
|
|
188
203
|
}
|
|
@@ -199,3 +214,13 @@ function parseTag(source) {
|
|
|
199
214
|
throw new Error("Unclosed tag");
|
|
200
215
|
}
|
|
201
216
|
exports.parseTag = parseTag;
|
|
217
|
+
// Get the previous character in a string ignoring spaces, line breaks and tabs
|
|
218
|
+
function prevChar(source, index) {
|
|
219
|
+
while (index > 0) {
|
|
220
|
+
const char = source.charAt(--index);
|
|
221
|
+
if (char !== " " && char !== "\n" && char !== "\r" && char !== "\t") {
|
|
222
|
+
return char;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return "";
|
|
226
|
+
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
-
import { AssertionError } from "./assertion_error.js";
|
|
3
|
-
/** Make an assertion, error will be thrown if `expr` does not have truthy value. */
|
|
4
|
-
export function assert(expr, msg = "") {
|
|
5
|
-
if (!expr) {
|
|
6
|
-
throw new AssertionError(msg);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/** Determines the common path from a set of paths, using an optional separator,
|
|
2
|
-
* which defaults to the OS default separator.
|
|
3
|
-
*
|
|
4
|
-
* ```ts
|
|
5
|
-
* import { common } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
|
|
6
|
-
* const p = common([
|
|
7
|
-
* "./deno/std/path/mod.ts",
|
|
8
|
-
* "./deno/std/fs/mod.ts",
|
|
9
|
-
* ]);
|
|
10
|
-
* console.log(p); // "./deno/std/"
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
export declare function common(paths: string[], sep?: string): string;
|