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
package/README.md
CHANGED
|
@@ -1,100 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- I like:
|
|
35
|
-
|
|
36
|
-
- The support for async evaluation is less hacky than Nunjucks.
|
|
37
|
-
- The variables are not escaped by default, there's an `escape` filter for
|
|
38
|
-
that.
|
|
39
|
-
|
|
40
|
-
- I don't like:
|
|
41
|
-
- It's not possible to invoke functions in a liquid template. For example
|
|
42
|
-
`{{ user.getName() }}` fails.
|
|
43
|
-
- It has the same problem as Nunjucks with the `%` character in the
|
|
44
|
-
delimiters.
|
|
45
|
-
|
|
46
|
-
### EJS/Eta
|
|
47
|
-
|
|
48
|
-
- I like:
|
|
49
|
-
- It allows running any javascript code in the template.
|
|
50
|
-
- I don't like:
|
|
51
|
-
- It has the same problem with the `%` character. And I don't like the opening
|
|
52
|
-
and closing delimiters (`<%` and `%>`).
|
|
53
|
-
- Because it runs javascript, it's very verbose to do a simple `forEach` or
|
|
54
|
-
`if`.
|
|
55
|
-
|
|
56
|
-
### Mustache
|
|
57
|
-
|
|
58
|
-
- I like:
|
|
59
|
-
- Very simple, everything is inside `{{` and `}}`.
|
|
60
|
-
- The closing tag is `{{/tagname}}`, very nice!
|
|
61
|
-
- I don't like:
|
|
62
|
-
- Perhaps too simple and the syntax can be a bit confusing.
|
|
63
|
-
- Partials. It's not easy to include them dynamically.
|
|
64
|
-
- The data context is a bit confusing to me.
|
|
65
|
-
- Very uncomfortable to work with filters.
|
|
66
|
-
|
|
67
|
-
### What this new template engine has to offer?
|
|
68
|
-
|
|
69
|
-
First, let's take a look at this syntax example:
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
{{ if printName }}
|
|
73
|
-
{{ await user.getName("full") |> toUpperCase }}
|
|
74
|
-
{{ /if }}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
- Everything is between `{{` and `}}` tags. Unlike Nunjucks or Liquid, there's
|
|
78
|
-
no distinction between tags `{% tag %}` and printing variables `{{ var }}`.
|
|
79
|
-
- The closed tag is done by prepending the `/` character (like Mustache).
|
|
80
|
-
- Async friendly.
|
|
81
|
-
- Like EJS, you can use real JavaScript code everywhere.
|
|
82
|
-
`await user.getName("full")` is real JS code that will be executed at runtime.
|
|
83
|
-
- Filters are applied using the
|
|
84
|
-
[pipeline operator](https://github.com/tc39/proposal-pipeline-operator)
|
|
85
|
-
(`|>`). Note: this is not exactly like the last proposal for JavaScript, it's
|
|
86
|
-
inspired by
|
|
87
|
-
([the previous proposal](https://github.com/valtech-nyc/proposal-fsharp-pipelines)
|
|
88
|
-
that was rejected but it's way more simple and fits better for filters.
|
|
89
|
-
- Filters can run prototype methods. In this example `users.getName("full")`
|
|
90
|
-
returns a string, so the `toUpperCase` is a method of the `String` object.
|
|
91
|
-
It's the same as `users.getName("full").toUpperCase()`.
|
|
1
|
+
<h1>
|
|
2
|
+
<img align="left" width="40" src="https://raw.githubusercontent.com/ventojs/vento/main/docs/icon.svg"></img>
|
|
3
|
+
Vento
|
|
4
|
+
</h1>
|
|
5
|
+
|
|
6
|
+
[](https://deno.land/x/vento)
|
|
7
|
+
[](https://www.npmjs.com/package/ventojs)
|
|
8
|
+
[](https://github.com/ventojs/vento/actions/workflows/deno.yml)
|
|
9
|
+
[](https://discord.gg/YbTmpACHWB)
|
|
10
|
+
|
|
11
|
+
A minimal, ergonomic template engine inspired by other great engines like
|
|
12
|
+
Nunjucks, Liquid, Mustache, and EJS.
|
|
13
|
+
|
|
14
|
+
<br>
|
|
15
|
+
|
|
16
|
+
<p align="center" style="text-align: center">
|
|
17
|
+
<img width="450" src="https://github.com/ventojs/vento/assets/7478134/8e9fc1f2-2ea7-43a1-be08-f190fee681ea">
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
## Features
|
|
21
|
+
|
|
22
|
+
- Minimal, fast runtime. 🔥
|
|
23
|
+
- Ergonomic by design. All tags and outputs are written with `{{` and `}}`.
|
|
24
|
+
- Write JavaScript anywhere. `{{ await user.getName() }}` is real JS executed at
|
|
25
|
+
runtime.
|
|
26
|
+
- Built-in tags like `if`, `for`, `include`, `layout` and
|
|
27
|
+
[more](https://vento.js.org).
|
|
28
|
+
- Filters, using the `|>` pipeline operator. Inspired by the
|
|
29
|
+
[F# pipeline operator proposal](https://github.com/valtech-nyc/proposal-fsharp-pipelines)
|
|
30
|
+
- Async friendly. No need to use special tags.
|
|
31
|
+
- Flexible plugin system. Nearly all of Vento's features and tags are
|
|
32
|
+
implemented as plugins.
|
|
92
33
|
|
|
93
34
|
## Getting started
|
|
94
35
|
|
|
95
|
-
See [Getting started](https://vento.js.org/getting-started/)
|
|
36
|
+
See [Getting started](https://vento.js.org/getting-started/) in the docs for
|
|
37
|
+
examples and guidance.
|
|
96
38
|
|
|
97
39
|
## Editor support
|
|
98
40
|
|
|
99
|
-
See [Editor integrations](https://vento.js.org/editor-integrations/)
|
|
41
|
+
See [Editor integrations](https://vento.js.org/editor-integrations/) in the
|
|
100
42
|
docs.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
import { AssertionError } from "./assertion_error.js";
|
|
3
3
|
/**
|
|
4
4
|
* Make an assertion, error will be thrown if `expr` does not have truthy value.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** Object structure for a list of HTML entities. */
|
|
2
|
+
export type EntityList = Record<string, string>;
|
|
3
|
+
/**
|
|
4
|
+
* Escapes text for safe interpolation into HTML text content and quoted attributes.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { escape } from "https://deno.land/std@$STD_VERSION/html/entities.ts";
|
|
9
|
+
*
|
|
10
|
+
* escape("<>'&AA"); // "<>'&AA"
|
|
11
|
+
*
|
|
12
|
+
* // Characters that don't need to be escaped will be left alone,
|
|
13
|
+
* // even if named HTML entities exist for them.
|
|
14
|
+
* escape("þð"); // "þð"
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function escape(str: string): string;
|
|
18
|
+
/** Options for {@linkcode unescape}. */
|
|
19
|
+
export type UnescapeOptions = {
|
|
20
|
+
entityList: EntityList;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Unescapes HTML entities in text.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* import { unescape } from "https://deno.land/std@$STD_VERSION/html/entities.ts";
|
|
28
|
+
*
|
|
29
|
+
* // Default options (only handles &<>'" and numeric entities)
|
|
30
|
+
* unescape("<>'&AA"); // "<>'&AA"
|
|
31
|
+
* unescape("þð"); // "þð"
|
|
32
|
+
*
|
|
33
|
+
* // Using the full named entity list from the HTML spec (~47K un-minified)
|
|
34
|
+
* import entityList from "https://deno.land/std@$STD_VERSION/html/named_entity_list.json" with { type: "json" };
|
|
35
|
+
*
|
|
36
|
+
* unescape("þð", { entityList }); // "þð"
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare function unescape(str: string, options?: Partial<UnescapeOptions>): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
const rawToEntityEntries = [
|
|
4
4
|
["&", "&"],
|
|
@@ -15,18 +15,17 @@ const defaultEntityList = Object.fromEntries([
|
|
|
15
15
|
const rawToEntity = new Map(rawToEntityEntries);
|
|
16
16
|
const rawRe = new RegExp(`[${[...rawToEntity.keys()].join("")}]`, "g");
|
|
17
17
|
/**
|
|
18
|
-
* Escapes text for safe interpolation into HTML text content and quoted attributes
|
|
18
|
+
* Escapes text for safe interpolation into HTML text content and quoted attributes.
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* ```ts
|
|
22
22
|
* import { escape } from "https://deno.land/std@$STD_VERSION/html/entities.ts";
|
|
23
|
-
* import { assertEquals } from "https://deno.land/std@$STD_VERSION/assert/assert_equals.ts";
|
|
24
23
|
*
|
|
25
|
-
*
|
|
24
|
+
* escape("<>'&AA"); // "<>'&AA"
|
|
26
25
|
*
|
|
27
|
-
* //
|
|
28
|
-
* // even if named HTML entities exist for them
|
|
29
|
-
*
|
|
26
|
+
* // Characters that don't need to be escaped will be left alone,
|
|
27
|
+
* // even if named HTML entities exist for them.
|
|
28
|
+
* escape("þð"); // "þð"
|
|
30
29
|
* ```
|
|
31
30
|
*/
|
|
32
31
|
export function escape(str) {
|
|
@@ -40,20 +39,20 @@ const RX_DEC_ENTITY = /&#([0-9]+);/g;
|
|
|
40
39
|
const RX_HEX_ENTITY = /&#x(\p{AHex}+);/gu;
|
|
41
40
|
const entityListRegexCache = new WeakMap();
|
|
42
41
|
/**
|
|
43
|
-
* Unescapes HTML entities in text
|
|
42
|
+
* Unescapes HTML entities in text.
|
|
44
43
|
*
|
|
45
44
|
* @example
|
|
46
45
|
* ```ts
|
|
47
46
|
* import { unescape } from "https://deno.land/std@$STD_VERSION/html/entities.ts";
|
|
48
|
-
* import { assertEquals } from "https://deno.land/std@$STD_VERSION/assert/assert_equals.ts";
|
|
49
47
|
*
|
|
50
|
-
* //
|
|
51
|
-
*
|
|
52
|
-
*
|
|
48
|
+
* // Default options (only handles &<>'" and numeric entities)
|
|
49
|
+
* unescape("<>'&AA"); // "<>'&AA"
|
|
50
|
+
* unescape("þð"); // "þð"
|
|
53
51
|
*
|
|
54
|
-
* //
|
|
55
|
-
* import entityList from "https://deno.land/std@$STD_VERSION/html/named_entity_list.json"
|
|
56
|
-
*
|
|
52
|
+
* // Using the full named entity list from the HTML spec (~47K un-minified)
|
|
53
|
+
* import entityList from "https://deno.land/std@$STD_VERSION/html/named_entity_list.json" with { type: "json" };
|
|
54
|
+
*
|
|
55
|
+
* unescape("þð", { entityList }); // "þð"
|
|
57
56
|
* ```
|
|
58
57
|
*/
|
|
59
58
|
export function unescape(str, options = {}) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
/**
|
|
4
|
-
* Functions for HTML tasks such as escaping or unescaping HTML entities
|
|
4
|
+
* Functions for HTML tasks such as escaping or unescaping HTML entities.
|
|
5
5
|
*
|
|
6
6
|
* @module
|
|
7
7
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assertPath(path?: string): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// Copyright the Browserify authors. MIT License.
|
|
3
3
|
export function assertPath(path) {
|
|
4
4
|
if (typeof path !== "string") {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
import { assertPath } from "./assert_path.js";
|
|
4
4
|
export function stripSuffix(name, suffix) {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
export function _common(paths, sep) {
|
|
4
4
|
const [first = "", ...remaining] = paths;
|
|
5
|
-
if (first === "" || remaining.length === 0) {
|
|
6
|
-
return first.substring(0, first.lastIndexOf(sep) + 1);
|
|
7
|
-
}
|
|
8
5
|
const parts = first.split(sep);
|
|
9
6
|
let endOfPrefix = parts.length;
|
|
7
|
+
let append = "";
|
|
10
8
|
for (const path of remaining) {
|
|
11
9
|
const compare = path.split(sep);
|
|
10
|
+
if (compare.length <= endOfPrefix) {
|
|
11
|
+
endOfPrefix = compare.length;
|
|
12
|
+
append = "";
|
|
13
|
+
}
|
|
12
14
|
for (let i = 0; i < endOfPrefix; i++) {
|
|
13
15
|
if (compare[i] !== parts[i]) {
|
|
14
16
|
endOfPrefix = i;
|
|
17
|
+
append = i === 0 ? "" : sep;
|
|
18
|
+
break;
|
|
15
19
|
}
|
|
16
20
|
}
|
|
17
|
-
if (endOfPrefix === 0) {
|
|
18
|
-
return "";
|
|
19
|
-
}
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
return prefix.endsWith(sep) ? prefix : `${prefix}${sep}`;
|
|
22
|
+
return parts.slice(0, endOfPrefix).join(sep) + append;
|
|
23
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// Copyright the Browserify authors. MIT License.
|
|
3
3
|
// Ported from https://github.com/browserify/path-browserify/
|
|
4
4
|
// This module is browser compatible.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
import { assertPath } from "./assert_path.js";
|
|
4
4
|
export function assertArg(path) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
export function _format(sep, pathObject) {
|
|
4
4
|
const dir = pathObject.dir || pathObject.root;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
export function assertArg(url) {
|
|
4
4
|
url = url instanceof URL ? url : new URL(url);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
const regExpEscapeChars = [
|
|
4
4
|
"!",
|
|
@@ -205,7 +205,9 @@ caseInsensitive = false, } = {}) {
|
|
|
205
205
|
}
|
|
206
206
|
continue;
|
|
207
207
|
}
|
|
208
|
-
segment += regExpEscapeChars.includes(glob[i])
|
|
208
|
+
segment += regExpEscapeChars.includes(glob[i])
|
|
209
|
+
? `\\${glob[i]}`
|
|
210
|
+
: glob[i];
|
|
209
211
|
}
|
|
210
212
|
// Check for unclosed groups or a dangling backslash.
|
|
211
213
|
if (groupStack.length > 0 || inRange || inEscape) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
import { assertPath } from "./assert_path.js";
|
|
4
4
|
export function assertArg(path) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// Copyright the Browserify authors. MIT License.
|
|
3
3
|
// Ported from https://github.com/browserify/path-browserify/
|
|
4
4
|
// This module is browser compatible.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
import { assertPath } from "./assert_path.js";
|
|
4
4
|
export function assertArgs(from, to) {
|
package/esm/deps/deno.land/{std@0.210.0 → std@0.219.1}/path/_common/strip_trailing_separators.js
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// Copyright the Browserify authors. MIT License.
|
|
3
3
|
// Ported from https://github.com/browserify/path-browserify/
|
|
4
4
|
// This module is browser compatible.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
// Keep this up-to-date with Deno.build.os
|
|
4
4
|
import * as dntShim from "../../../../_dnt.shims.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
import { isWindows } from "./_os.js";
|
|
4
4
|
import { basename as posixBasename } from "./posix/basename.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
import { _common } from "./_common/common.js";
|
|
4
|
-
import {
|
|
4
|
+
import { SEPARATOR } from "./constants.js";
|
|
5
5
|
/** Determines the common path from a set of paths, using an optional separator,
|
|
6
6
|
* which defaults to the OS default separator.
|
|
7
7
|
*
|
|
@@ -14,6 +14,6 @@ import { SEP } from "./separator.js";
|
|
|
14
14
|
* console.log(p); // "./deno/std/"
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
export function common(paths, sep =
|
|
17
|
+
export function common(paths, sep = SEPARATOR) {
|
|
18
18
|
return _common(paths, sep);
|
|
19
19
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { isWindows } from "./_os.js";
|
|
4
|
+
export const DELIMITER = isWindows ? ";" : ":";
|
|
5
|
+
export const SEPARATOR = isWindows ? "\\" : "/";
|
|
6
|
+
export const SEPARATOR_PATTERN = isWindows ? /[\\/]+/ : /\/+/;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
import { isWindows } from "./_os.js";
|
|
4
4
|
import { dirname as posixDirname } from "./posix/dirname.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
import { isWindows } from "./_os.js";
|
|
4
4
|
import { extname as posixExtname } from "./posix/extname.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
import { isWindows } from "./_os.js";
|
|
4
4
|
import { format as posixFormat } from "./posix/format.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
import { isWindows } from "./_os.js";
|
|
4
4
|
import { fromFileUrl as posixFromFileUrl } from "./posix/from_file_url.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
import { isWindows } from "./_os.js";
|
|
4
4
|
import { globToRegExp as posixGlobToRegExp } from "./posix/glob_to_regexp.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
import { isWindows } from "./_os.js";
|
|
4
4
|
import { isAbsolute as posixIsAbsolute } from "./posix/is_absolute.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
/** Test whether the given string is a glob */
|
|
4
4
|
export function isGlob(str) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
import { isWindows } from "./_os.js";
|
|
4
4
|
import { join as posixJoin } from "./posix/join.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2018-
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
import { isWindows } from "./_os.js";
|
|
4
4
|
import { joinGlobs as posixJoinGlobs } from "./posix/join_globs.js";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utilities for working with OS-specific file paths.
|
|
3
|
+
*
|
|
4
|
+
* Functions from this module will automatically switch to support the path style
|
|
5
|
+
* of the current OS, either `windows` for Microsoft Windows, or `posix` for
|
|
6
|
+
* every other operating system, eg. Linux, MacOS, BSD etc.
|
|
7
|
+
*
|
|
8
|
+
* To use functions for a specific path style regardless of the current OS
|
|
9
|
+
* import the modules from the platform sub directory instead.
|
|
10
|
+
*
|
|
11
|
+
* Example, for `posix`:
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { fromFileUrl } from "https://deno.land/std@$STD_VERSION/path/posix/from_file_url.ts";
|
|
15
|
+
* const p = fromFileUrl("file:///home/foo");
|
|
16
|
+
* console.log(p); // "/home/foo"
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* or, for `windows`:
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { fromFileUrl } from "https://deno.land/std@$STD_VERSION/path/windows/from_file_url.ts";
|
|
23
|
+
* const p = fromFileUrl("file:///home/foo");
|
|
24
|
+
* console.log(p); // "\\home\\foo"
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* This module is browser compatible.
|
|
28
|
+
*
|
|
29
|
+
* @module
|
|
30
|
+
*/
|
|
31
|
+
import * as _windows from "./windows/mod.js";
|
|
32
|
+
import * as _posix from "./posix/mod.js";
|
|
33
|
+
/** @deprecated (will be removed after 1.0.0) Import from {@link https://deno.land/std/path/windows/mod.ts} instead. */
|
|
34
|
+
export declare const win32: typeof _windows;
|
|
35
|
+
/** @deprecated (will be removed after 1.0.0) Import from {@link https://deno.land/std/path/posix/mod.ts} instead. */
|
|
36
|
+
export declare const posix: typeof _posix;
|
|
37
|
+
export * from "./basename.js";
|
|
38
|
+
export * from "./constants.js";
|
|
39
|
+
export * from "./dirname.js";
|
|
40
|
+
export * from "./extname.js";
|
|
41
|
+
export * from "./format.js";
|
|
42
|
+
export * from "./from_file_url.js";
|
|
43
|
+
export * from "./is_absolute.js";
|
|
44
|
+
export * from "./join.js";
|
|
45
|
+
export * from "./normalize.js";
|
|
46
|
+
export * from "./parse.js";
|
|
47
|
+
export * from "./relative.js";
|
|
48
|
+
export * from "./resolve.js";
|
|
49
|
+
export * from "./to_file_url.js";
|
|
50
|
+
export * from "./to_namespaced_path.js";
|
|
51
|
+
export * from "./common.js";
|
|
52
|
+
export * from "./_interface.js";
|
|
53
|
+
export * from "./glob_to_regexp.js";
|
|
54
|
+
export * from "./is_glob.js";
|
|
55
|
+
export * from "./join_globs.js";
|
|
56
|
+
export * from "./normalize_glob.js";
|