ventojs 0.9.0 → 0.9.2
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.208.0/path/_common/assert_path.d.ts +1 -0
- package/esm/deps/deno.land/std@0.208.0/path/_common/assert_path.js +7 -0
- package/esm/deps/deno.land/std@0.208.0/path/_common/basename.d.ts +3 -0
- package/esm/deps/deno.land/std@0.208.0/path/_common/basename.js +40 -0
- package/esm/deps/deno.land/std@0.208.0/path/_common/common.d.ts +1 -0
- package/esm/deps/deno.land/{std@0.201.0/path → std@0.208.0/path/_common}/common.js +1 -14
- package/esm/deps/deno.land/std@0.208.0/path/_common/dirname.d.ts +1 -0
- package/esm/deps/deno.land/std@0.208.0/path/_common/dirname.js +8 -0
- package/esm/deps/deno.land/std@0.208.0/path/_common/format.d.ts +3 -0
- package/esm/deps/deno.land/std@0.208.0/path/_common/format.js +19 -0
- package/esm/deps/deno.land/std@0.208.0/path/_common/from_file_url.d.ts +2 -0
- package/esm/deps/deno.land/std@0.208.0/path/_common/from_file_url.js +9 -0
- package/esm/deps/deno.land/std@0.208.0/path/_common/glob_to_reg_exp.d.ts +27 -0
- package/esm/deps/deno.land/{std@0.201.0/path/glob.js → std@0.208.0/path/_common/glob_to_reg_exp.js} +13 -139
- package/esm/deps/deno.land/std@0.208.0/path/_common/normalize.d.ts +1 -0
- package/esm/deps/deno.land/std@0.208.0/path/_common/normalize.js +8 -0
- package/esm/deps/deno.land/std@0.208.0/path/_common/normalize_string.d.ts +1 -0
- package/esm/deps/deno.land/{std@0.201.0/path/_util.js → std@0.208.0/path/_common/normalize_string.js} +1 -31
- package/esm/deps/deno.land/std@0.208.0/path/_common/relative.d.ts +1 -0
- package/esm/deps/deno.land/std@0.208.0/path/_common/relative.js +9 -0
- package/esm/deps/deno.land/std@0.208.0/path/_common/strip_trailing_separators.d.ts +1 -0
- package/esm/deps/deno.land/std@0.208.0/path/_common/strip_trailing_separators.js +19 -0
- package/esm/deps/deno.land/std@0.208.0/path/_common/to_file_url.d.ts +1 -0
- package/esm/deps/deno.land/std@0.208.0/path/_common/to_file_url.js +15 -0
- package/esm/deps/deno.land/std@0.208.0/path/_os.d.ts +3 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/_os.js +1 -1
- package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/basename.js +2 -1
- package/esm/deps/deno.land/std@0.208.0/path/common.js +19 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/dirname.js +2 -1
- package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/extname.js +2 -1
- package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/format.js +2 -1
- package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/from_file_url.js +2 -1
- package/esm/deps/deno.land/{std@0.201.0/path/glob.d.ts → std@0.208.0/path/glob_to_regexp.d.ts} +5 -27
- package/esm/deps/deno.land/std@0.208.0/path/glob_to_regexp.js +65 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/is_absolute.js +2 -1
- package/esm/deps/deno.land/std@0.208.0/path/is_glob.d.ts +2 -0
- package/esm/deps/deno.land/std@0.208.0/path/is_glob.js +28 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/join.js +2 -1
- package/esm/deps/deno.land/std@0.208.0/path/join_globs.d.ts +3 -0
- package/esm/deps/deno.land/std@0.208.0/path/join_globs.js +11 -0
- package/{script/deps/deno.land/std@0.201.0 → esm/deps/deno.land/std@0.208.0}/path/mod.d.ts +10 -4
- package/esm/deps/deno.land/std@0.208.0/path/mod.js +63 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/normalize.js +2 -1
- package/esm/deps/deno.land/std@0.208.0/path/normalize_glob.d.ts +3 -0
- package/esm/deps/deno.land/std@0.208.0/path/normalize_glob.js +11 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/parse.js +2 -1
- package/esm/deps/deno.land/std@0.208.0/path/posix/_util.d.ts +1 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/_util.js +8 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/basename.js +18 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/common.js +19 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/dirname.js +36 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/extname.js +59 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/format.d.ts +6 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/format.js +11 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/from_file_url.d.ts +12 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/from_file_url.js +17 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/glob_to_regexp.d.ts +57 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/glob_to_regexp.js +69 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/is_absolute.js +12 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/is_glob.d.ts +1 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/is_glob.js +3 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/join.js +26 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/join_globs.d.ts +3 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/join_globs.js +26 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/mod.d.ts +40 -0
- package/esm/deps/deno.land/{std@0.201.0/path → std@0.208.0/path/posix}/mod.js +7 -8
- package/esm/deps/deno.land/std@0.208.0/path/posix/normalize.js +25 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/normalize_glob.d.ts +3 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/normalize_glob.js +16 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/parse.d.ts +6 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/parse.js +98 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/relative.d.ts +7 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/relative.js +94 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/resolve.js +48 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/separator.d.ts +2 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/separator.js +4 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/to_file_url.d.ts +12 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/to_file_url.js +22 -0
- package/esm/deps/deno.land/std@0.208.0/path/posix/to_namespaced_path.js +10 -0
- package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/relative.js +2 -1
- package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/resolve.js +2 -1
- package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/to_file_url.js +2 -1
- package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/to_namespaced_path.js +2 -1
- package/esm/deps/deno.land/std@0.208.0/path/windows/_util.d.ts +3 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/_util.js +15 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/basename.d.ts +8 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/basename.js +30 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/common.d.ts +13 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/common.js +19 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/dirname.d.ts +5 -0
- package/esm/deps/deno.land/{std@0.201.0/path/_dirname.js → std@0.208.0/path/windows/dirname.js} +5 -39
- package/esm/deps/deno.land/std@0.208.0/path/windows/extname.d.ts +6 -0
- package/esm/deps/deno.land/{std@0.201.0/path/_extname.js → std@0.208.0/path/windows/extname.js} +4 -57
- package/esm/deps/deno.land/std@0.208.0/path/windows/format.d.ts +6 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/format.js +11 -0
- package/esm/deps/deno.land/{std@0.201.0/path/_from_file_url.d.ts → std@0.208.0/path/windows/from_file_url.d.ts} +1 -12
- package/esm/deps/deno.land/{std@0.201.0/path/_from_file_url.js → std@0.208.0/path/windows/from_file_url.js} +2 -22
- package/esm/deps/deno.land/std@0.208.0/path/windows/glob_to_regexp.d.ts +57 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/glob_to_regexp.js +69 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/is_absolute.d.ts +5 -0
- package/esm/deps/deno.land/{std@0.201.0/path/_is_absolute.js → std@0.208.0/path/windows/is_absolute.js} +4 -11
- package/esm/deps/deno.land/std@0.208.0/path/windows/is_glob.d.ts +1 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/is_glob.js +3 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/join.d.ts +5 -0
- package/esm/deps/deno.land/{std@0.201.0/path/_join.js → std@0.208.0/path/windows/join.js} +6 -27
- package/esm/deps/deno.land/std@0.208.0/path/windows/join_globs.d.ts +3 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/join_globs.js +26 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/mod.d.ts +40 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/mod.js +44 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/normalize.d.ts +7 -0
- package/esm/deps/deno.land/{std@0.201.0/path/_normalize.js → std@0.208.0/path/windows/normalize.js} +5 -28
- package/esm/deps/deno.land/std@0.208.0/path/windows/normalize_glob.d.ts +3 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/normalize_glob.js +16 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/parse.d.ts +6 -0
- package/esm/deps/deno.land/{std@0.201.0/path/_parse.js → std@0.208.0/path/windows/parse.js} +4 -95
- package/esm/deps/deno.land/{std@0.201.0/path/_relative.js → std@0.208.0/path/windows/relative.js} +6 -101
- package/esm/deps/deno.land/std@0.208.0/path/windows/resolve.d.ts +5 -0
- package/esm/deps/deno.land/{std@0.201.0/path/_resolve.js → std@0.208.0/path/windows/resolve.js} +6 -46
- package/esm/deps/deno.land/std@0.208.0/path/windows/separator.d.ts +2 -0
- package/esm/deps/deno.land/std@0.208.0/path/windows/separator.js +4 -0
- package/{script/deps/deno.land/std@0.201.0/path/_to_file_url.d.ts → esm/deps/deno.land/std@0.208.0/path/windows/to_file_url.d.ts} +1 -12
- package/esm/deps/deno.land/{std@0.201.0/path/_to_file_url.js → std@0.208.0/path/windows/to_file_url.js} +4 -34
- package/esm/deps/deno.land/std@0.208.0/path/windows/to_namespaced_path.d.ts +5 -0
- package/esm/deps/deno.land/{std@0.201.0/path/_to_namespaced_path.js → std@0.208.0/path/windows/to_namespaced_path.js} +4 -12
- package/esm/deps.d.ts +2 -2
- package/esm/deps.js +2 -2
- package/esm/mod.js +2 -2
- package/esm/src/environment.d.ts +5 -0
- package/esm/src/environment.js +50 -23
- package/esm/src/tokenizer.d.ts +7 -2
- package/esm/src/tokenizer.js +77 -66
- package/package.json +1 -1
- package/script/deps/deno.land/std@0.208.0/path/_common/assert_path.d.ts +1 -0
- package/script/deps/deno.land/std@0.208.0/path/_common/assert_path.js +11 -0
- package/script/deps/deno.land/std@0.208.0/path/_common/basename.d.ts +3 -0
- package/script/deps/deno.land/std@0.208.0/path/_common/basename.js +46 -0
- package/script/deps/deno.land/std@0.208.0/path/_common/common.d.ts +1 -0
- package/script/deps/deno.land/{std@0.201.0/path → std@0.208.0/path/_common}/common.js +3 -16
- package/script/deps/deno.land/std@0.208.0/path/_common/dirname.d.ts +1 -0
- package/script/deps/deno.land/std@0.208.0/path/_common/dirname.js +12 -0
- package/script/deps/deno.land/std@0.208.0/path/_common/format.d.ts +3 -0
- package/{esm/deps/deno.land/std@0.201.0/path/_format.js → script/deps/deno.land/std@0.208.0/path/_common/format.js} +5 -16
- package/script/deps/deno.land/std@0.208.0/path/_common/from_file_url.d.ts +2 -0
- package/script/deps/deno.land/std@0.208.0/path/_common/from_file_url.js +13 -0
- package/script/deps/deno.land/std@0.208.0/path/_common/glob_to_reg_exp.d.ts +27 -0
- package/script/deps/deno.land/{std@0.201.0/path/glob.js → std@0.208.0/path/_common/glob_to_reg_exp.js} +15 -167
- package/script/deps/deno.land/std@0.208.0/path/_common/normalize.d.ts +1 -0
- package/script/deps/deno.land/std@0.208.0/path/_common/normalize.js +12 -0
- package/script/deps/deno.land/std@0.208.0/path/_common/normalize_string.d.ts +1 -0
- package/script/deps/deno.land/{std@0.201.0/path/_util.js → std@0.208.0/path/_common/normalize_string.js} +6 -41
- package/script/deps/deno.land/std@0.208.0/path/_common/relative.d.ts +1 -0
- package/script/deps/deno.land/std@0.208.0/path/_common/relative.js +13 -0
- package/script/deps/deno.land/std@0.208.0/path/_common/strip_trailing_separators.d.ts +1 -0
- package/script/deps/deno.land/std@0.208.0/path/_common/strip_trailing_separators.js +23 -0
- package/script/deps/deno.land/std@0.208.0/path/_common/to_file_url.d.ts +1 -0
- package/script/deps/deno.land/std@0.208.0/path/_common/to_file_url.js +19 -0
- package/script/deps/deno.land/std@0.208.0/path/_os.d.ts +3 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/_os.js +4 -4
- package/script/deps/deno.land/std@0.208.0/path/basename.d.ts +8 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/basename.js +4 -3
- package/script/deps/deno.land/std@0.208.0/path/common.d.ts +13 -0
- package/script/deps/deno.land/std@0.208.0/path/common.js +23 -0
- package/script/deps/deno.land/std@0.208.0/path/dirname.d.ts +5 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/dirname.js +3 -2
- package/script/deps/deno.land/std@0.208.0/path/extname.d.ts +6 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/extname.js +3 -2
- package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/format.js +3 -2
- package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/from_file_url.js +3 -2
- package/script/deps/deno.land/{std@0.201.0/path/glob.d.ts → std@0.208.0/path/glob_to_regexp.d.ts} +5 -27
- package/script/deps/deno.land/std@0.208.0/path/glob_to_regexp.js +69 -0
- package/script/deps/deno.land/std@0.208.0/path/is_absolute.d.ts +5 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/is_absolute.js +3 -2
- package/script/deps/deno.land/std@0.208.0/path/is_glob.d.ts +2 -0
- package/script/deps/deno.land/std@0.208.0/path/is_glob.js +32 -0
- package/script/deps/deno.land/std@0.208.0/path/join.d.ts +5 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/join.js +3 -2
- package/script/deps/deno.land/std@0.208.0/path/join_globs.d.ts +3 -0
- package/script/deps/deno.land/std@0.208.0/path/join_globs.js +15 -0
- package/{esm/deps/deno.land/std@0.201.0 → script/deps/deno.land/std@0.208.0}/path/mod.d.ts +10 -4
- package/script/deps/deno.land/std@0.208.0/path/mod.js +92 -0
- package/script/deps/deno.land/std@0.208.0/path/normalize.d.ts +7 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/normalize.js +3 -2
- package/script/deps/deno.land/std@0.208.0/path/normalize_glob.d.ts +3 -0
- package/script/deps/deno.land/std@0.208.0/path/normalize_glob.js +15 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/parse.js +3 -2
- package/script/deps/deno.land/std@0.208.0/path/posix/_util.d.ts +1 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/_util.js +12 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/basename.d.ts +8 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/basename.js +22 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/common.d.ts +13 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/common.js +23 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/dirname.d.ts +5 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/dirname.js +40 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/extname.d.ts +6 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/extname.js +63 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/format.d.ts +6 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/format.js +15 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/from_file_url.d.ts +12 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/from_file_url.js +21 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/glob_to_regexp.d.ts +57 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/glob_to_regexp.js +73 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/is_absolute.d.ts +5 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/is_absolute.js +16 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/is_glob.d.ts +1 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/is_glob.js +7 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/join.d.ts +5 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/join.js +30 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/join_globs.d.ts +3 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/join_globs.js +30 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/mod.d.ts +40 -0
- package/script/deps/deno.land/{std@0.201.0/path → std@0.208.0/path/posix}/mod.js +8 -21
- package/script/deps/deno.land/std@0.208.0/path/posix/normalize.d.ts +7 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/normalize.js +29 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/normalize_glob.d.ts +3 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/normalize_glob.js +20 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/parse.d.ts +6 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/parse.js +102 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/relative.d.ts +7 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/relative.js +98 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/resolve.d.ts +5 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/resolve.js +75 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/separator.d.ts +2 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/separator.js +7 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/to_file_url.d.ts +12 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/to_file_url.js +26 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/to_namespaced_path.d.ts +5 -0
- package/script/deps/deno.land/std@0.208.0/path/posix/to_namespaced_path.js +14 -0
- package/script/deps/deno.land/{std@0.201.0/path/_relative.d.ts → std@0.208.0/path/relative.d.ts} +1 -8
- package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/relative.js +3 -2
- package/script/deps/deno.land/std@0.208.0/path/resolve.d.ts +5 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/resolve.js +4 -3
- package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/to_file_url.js +3 -2
- package/script/deps/deno.land/std@0.208.0/path/to_namespaced_path.d.ts +5 -0
- package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/to_namespaced_path.js +4 -3
- package/script/deps/deno.land/std@0.208.0/path/windows/_util.d.ts +3 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/_util.js +21 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/basename.d.ts +8 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/basename.js +34 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/common.d.ts +13 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/common.js +23 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/dirname.d.ts +5 -0
- package/script/deps/deno.land/{std@0.201.0/path/_dirname.js → std@0.208.0/path/windows/dirname.js} +9 -44
- package/script/deps/deno.land/std@0.208.0/path/windows/extname.d.ts +6 -0
- package/script/deps/deno.land/{std@0.201.0/path/_extname.js → std@0.208.0/path/windows/extname.js} +8 -62
- package/script/deps/deno.land/std@0.208.0/path/windows/format.d.ts +6 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/format.js +15 -0
- package/script/deps/deno.land/{std@0.201.0/path/_from_file_url.d.ts → std@0.208.0/path/windows/from_file_url.d.ts} +1 -12
- package/script/deps/deno.land/{std@0.201.0/path/_from_file_url.js → std@0.208.0/path/windows/from_file_url.js} +5 -26
- package/script/deps/deno.land/std@0.208.0/path/windows/glob_to_regexp.d.ts +57 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/glob_to_regexp.js +73 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/is_absolute.d.ts +5 -0
- package/script/deps/deno.land/{std@0.201.0/path/_is_absolute.js → std@0.208.0/path/windows/is_absolute.js} +7 -15
- package/script/deps/deno.land/std@0.208.0/path/windows/is_glob.d.ts +1 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/is_glob.js +7 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/join.d.ts +5 -0
- package/script/deps/deno.land/{std@0.201.0/path/_join.js → std@0.208.0/path/windows/join.js} +8 -30
- package/script/deps/deno.land/std@0.208.0/path/windows/join_globs.d.ts +3 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/join_globs.js +30 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/mod.d.ts +40 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/mod.js +61 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/normalize.d.ts +7 -0
- package/script/deps/deno.land/{std@0.201.0/path/_normalize.js → std@0.208.0/path/windows/normalize.js} +9 -33
- package/script/deps/deno.land/std@0.208.0/path/windows/normalize_glob.d.ts +3 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/normalize_glob.js +20 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/parse.d.ts +6 -0
- package/script/deps/deno.land/{std@0.201.0/path/_parse.js → std@0.208.0/path/windows/parse.js} +8 -100
- package/script/deps/deno.land/std@0.208.0/path/windows/relative.d.ts +12 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/relative.js +125 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/resolve.d.ts +5 -0
- package/script/deps/deno.land/{std@0.201.0/path/_resolve.js → std@0.208.0/path/windows/resolve.js} +10 -51
- package/script/deps/deno.land/std@0.208.0/path/windows/separator.d.ts +2 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/separator.js +7 -0
- package/{esm/deps/deno.land/std@0.201.0/path/_to_file_url.d.ts → script/deps/deno.land/std@0.208.0/path/windows/to_file_url.d.ts} +1 -12
- package/script/deps/deno.land/std@0.208.0/path/windows/to_file_url.js +35 -0
- package/script/deps/deno.land/std@0.208.0/path/windows/to_namespaced_path.d.ts +5 -0
- package/script/deps/deno.land/{std@0.201.0/path/_to_namespaced_path.js → std@0.208.0/path/windows/to_namespaced_path.js} +11 -20
- package/script/deps.d.ts +2 -2
- package/script/deps.js +2 -2
- package/script/mod.js +2 -2
- package/script/src/environment.d.ts +5 -0
- package/script/src/environment.js +52 -24
- package/script/src/tokenizer.d.ts +7 -2
- package/script/src/tokenizer.js +77 -66
- package/esm/deps/deno.land/std@0.201.0/path/_basename.d.ts +0 -16
- package/esm/deps/deno.land/std@0.201.0/path/_basename.js +0 -78
- package/esm/deps/deno.land/std@0.201.0/path/_dirname.d.ts +0 -10
- package/esm/deps/deno.land/std@0.201.0/path/_extname.d.ts +0 -12
- package/esm/deps/deno.land/std@0.201.0/path/_format.d.ts +0 -11
- package/esm/deps/deno.land/std@0.201.0/path/_is_absolute.d.ts +0 -10
- package/esm/deps/deno.land/std@0.201.0/path/_join.d.ts +0 -10
- package/esm/deps/deno.land/std@0.201.0/path/_normalize.d.ts +0 -14
- package/esm/deps/deno.land/std@0.201.0/path/_os.d.ts +0 -4
- package/esm/deps/deno.land/std@0.201.0/path/_parse.d.ts +0 -11
- package/esm/deps/deno.land/std@0.201.0/path/_relative.d.ts +0 -19
- package/esm/deps/deno.land/std@0.201.0/path/_resolve.d.ts +0 -10
- package/esm/deps/deno.land/std@0.201.0/path/_to_namespaced_path.d.ts +0 -10
- package/esm/deps/deno.land/std@0.201.0/path/_util.d.ts +0 -6
- package/esm/deps/deno.land/std@0.201.0/path/posix.d.ts +0 -15
- package/esm/deps/deno.land/std@0.201.0/path/posix.js +0 -19
- package/esm/deps/deno.land/std@0.201.0/path/win32.d.ts +0 -15
- package/esm/deps/deno.land/std@0.201.0/path/win32.js +0 -19
- package/script/deps/deno.land/std@0.201.0/path/_basename.d.ts +0 -16
- package/script/deps/deno.land/std@0.201.0/path/_basename.js +0 -83
- package/script/deps/deno.land/std@0.201.0/path/_dirname.d.ts +0 -10
- package/script/deps/deno.land/std@0.201.0/path/_extname.d.ts +0 -12
- package/script/deps/deno.land/std@0.201.0/path/_format.d.ts +0 -11
- package/script/deps/deno.land/std@0.201.0/path/_format.js +0 -40
- package/script/deps/deno.land/std@0.201.0/path/_is_absolute.d.ts +0 -10
- package/script/deps/deno.land/std@0.201.0/path/_join.d.ts +0 -10
- package/script/deps/deno.land/std@0.201.0/path/_normalize.d.ts +0 -14
- package/script/deps/deno.land/std@0.201.0/path/_os.d.ts +0 -4
- package/script/deps/deno.land/std@0.201.0/path/_parse.d.ts +0 -11
- package/script/deps/deno.land/std@0.201.0/path/_relative.js +0 -221
- package/script/deps/deno.land/std@0.201.0/path/_resolve.d.ts +0 -10
- package/script/deps/deno.land/std@0.201.0/path/_to_file_url.js +0 -66
- package/script/deps/deno.land/std@0.201.0/path/_to_namespaced_path.d.ts +0 -10
- package/script/deps/deno.land/std@0.201.0/path/_util.d.ts +0 -6
- package/script/deps/deno.land/std@0.201.0/path/posix.d.ts +0 -15
- package/script/deps/deno.land/std@0.201.0/path/posix.js +0 -35
- package/script/deps/deno.land/std@0.201.0/path/win32.d.ts +0 -15
- package/script/deps/deno.land/std@0.201.0/path/win32.js +0 -35
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/html/entities.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/html/entities.js +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/html/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/html/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.201.0/path/_constants.d.ts → std@0.208.0/path/_common/constants.d.ts} +0 -0
- /package/esm/deps/deno.land/{std@0.201.0/path/_constants.js → std@0.208.0/path/_common/constants.js} +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/_interface.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/_interface.js +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/parse.d.ts +0 -0
- /package/{script/deps/deno.land/std@0.201.0/path → esm/deps/deno.land/std@0.208.0/path/posix}/basename.d.ts +0 -0
- /package/{script/deps/deno.land/std@0.201.0/path → esm/deps/deno.land/std@0.208.0/path/posix}/common.d.ts +0 -0
- /package/{script/deps/deno.land/std@0.201.0/path → esm/deps/deno.land/std@0.208.0/path/posix}/dirname.d.ts +0 -0
- /package/{script/deps/deno.land/std@0.201.0/path → esm/deps/deno.land/std@0.208.0/path/posix}/extname.d.ts +0 -0
- /package/{script/deps/deno.land/std@0.201.0/path → esm/deps/deno.land/std@0.208.0/path/posix}/is_absolute.d.ts +0 -0
- /package/{script/deps/deno.land/std@0.201.0/path → esm/deps/deno.land/std@0.208.0/path/posix}/join.d.ts +0 -0
- /package/{script/deps/deno.land/std@0.201.0/path → esm/deps/deno.land/std@0.208.0/path/posix}/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0/path → std@0.208.0/path/posix}/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0/path → std@0.208.0/path/posix}/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/relative.d.ts +0 -0
- /package/{script/deps/deno.land/std@0.201.0 → esm/deps/deno.land/std@0.208.0}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/to_file_url.d.ts +0 -0
- /package/{script/deps/deno.land/std@0.201.0 → esm/deps/deno.land/std@0.208.0}/path/to_namespaced_path.d.ts +0 -0
- /package/{script/deps/deno.land/std@0.201.0/path → esm/deps/deno.land/std@0.208.0/path/windows}/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/html/entities.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/html/entities.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/html/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/html/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0/path/_constants.d.ts → std@0.208.0/path/_common/constants.d.ts} +0 -0
- /package/script/deps/deno.land/{std@0.201.0/path/_constants.js → std@0.208.0/path/_common/constants.js} +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/_interface.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/_interface.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.201.0 → std@0.208.0}/path/to_file_url.d.ts +0 -0
package/script/deps/deno.land/{std@0.201.0/path/_resolve.js → std@0.208.0/path/windows/resolve.js}
RENAMED
|
@@ -23,60 +23,19 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.resolve = void 0;
|
|
27
27
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
28
28
|
// This module is browser compatible.
|
|
29
|
-
const dntShim = __importStar(require("
|
|
30
|
-
const
|
|
29
|
+
const dntShim = __importStar(require("../../../../../_dnt.shims.js"));
|
|
30
|
+
const constants_js_1 = require("../_common/constants.js");
|
|
31
|
+
const normalize_string_js_1 = require("../_common/normalize_string.js");
|
|
32
|
+
const assert_path_js_1 = require("../_common/assert_path.js");
|
|
31
33
|
const _util_js_1 = require("./_util.js");
|
|
32
34
|
/**
|
|
33
35
|
* Resolves path segments into a `path`
|
|
34
36
|
* @param pathSegments to process to path
|
|
35
37
|
*/
|
|
36
|
-
function
|
|
37
|
-
let resolvedPath = "";
|
|
38
|
-
let resolvedAbsolute = false;
|
|
39
|
-
for (let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
40
|
-
let path;
|
|
41
|
-
if (i >= 0)
|
|
42
|
-
path = pathSegments[i];
|
|
43
|
-
else {
|
|
44
|
-
// deno-lint-ignore no-explicit-any
|
|
45
|
-
const { Deno } = dntShim.dntGlobalThis;
|
|
46
|
-
if (typeof Deno?.cwd !== "function") {
|
|
47
|
-
throw new TypeError("Resolved a relative path without a CWD.");
|
|
48
|
-
}
|
|
49
|
-
path = Deno.cwd();
|
|
50
|
-
}
|
|
51
|
-
(0, _util_js_1.assertPath)(path);
|
|
52
|
-
// Skip empty entries
|
|
53
|
-
if (path.length === 0) {
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
resolvedPath = `${path}/${resolvedPath}`;
|
|
57
|
-
resolvedAbsolute = (0, _util_js_1.isPosixPathSeparator)(path.charCodeAt(0));
|
|
58
|
-
}
|
|
59
|
-
// At this point the path should be resolved to a full absolute path, but
|
|
60
|
-
// handle relative paths to be safe (might happen when Deno.cwd() fails)
|
|
61
|
-
// Normalize the path
|
|
62
|
-
resolvedPath = (0, _util_js_1.normalizeString)(resolvedPath, !resolvedAbsolute, "/", _util_js_1.isPosixPathSeparator);
|
|
63
|
-
if (resolvedAbsolute) {
|
|
64
|
-
if (resolvedPath.length > 0)
|
|
65
|
-
return `/${resolvedPath}`;
|
|
66
|
-
else
|
|
67
|
-
return "/";
|
|
68
|
-
}
|
|
69
|
-
else if (resolvedPath.length > 0)
|
|
70
|
-
return resolvedPath;
|
|
71
|
-
else
|
|
72
|
-
return ".";
|
|
73
|
-
}
|
|
74
|
-
exports.posixResolve = posixResolve;
|
|
75
|
-
/**
|
|
76
|
-
* Resolves path segments into a `path`
|
|
77
|
-
* @param pathSegments to process to path
|
|
78
|
-
*/
|
|
79
|
-
function windowsResolve(...pathSegments) {
|
|
38
|
+
function resolve(...pathSegments) {
|
|
80
39
|
let resolvedDevice = "";
|
|
81
40
|
let resolvedTail = "";
|
|
82
41
|
let resolvedAbsolute = false;
|
|
@@ -105,7 +64,7 @@ function windowsResolve(...pathSegments) {
|
|
|
105
64
|
path = `${resolvedDevice}\\`;
|
|
106
65
|
}
|
|
107
66
|
}
|
|
108
|
-
(0,
|
|
67
|
+
(0, assert_path_js_1.assertPath)(path);
|
|
109
68
|
const len = path.length;
|
|
110
69
|
// Skip empty entries
|
|
111
70
|
if (len === 0)
|
|
@@ -166,7 +125,7 @@ function windowsResolve(...pathSegments) {
|
|
|
166
125
|
}
|
|
167
126
|
else if ((0, _util_js_1.isWindowsDeviceRoot)(code)) {
|
|
168
127
|
// Possible device root
|
|
169
|
-
if (path.charCodeAt(1) ===
|
|
128
|
+
if (path.charCodeAt(1) === constants_js_1.CHAR_COLON) {
|
|
170
129
|
device = path.slice(0, 2);
|
|
171
130
|
rootEnd = 2;
|
|
172
131
|
if (len > 2) {
|
|
@@ -205,7 +164,7 @@ function windowsResolve(...pathSegments) {
|
|
|
205
164
|
// but handle relative paths to be safe (might happen when Deno.cwd()
|
|
206
165
|
// fails)
|
|
207
166
|
// Normalize the tail path
|
|
208
|
-
resolvedTail = (0,
|
|
167
|
+
resolvedTail = (0, normalize_string_js_1.normalizeString)(resolvedTail, !resolvedAbsolute, "\\", _util_js_1.isPathSeparator);
|
|
209
168
|
return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || ".";
|
|
210
169
|
}
|
|
211
|
-
exports.
|
|
170
|
+
exports.resolve = resolve;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.SEP_PATTERN = exports.SEP = void 0;
|
|
6
|
+
exports.SEP = "\\";
|
|
7
|
+
exports.SEP_PATTERN = /[\\/]+/;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
/**
|
|
3
|
-
* Converts a path string to a file URL.
|
|
4
|
-
*
|
|
5
|
-
* ```ts
|
|
6
|
-
* import { toFileUrl } from "https://deno.land/std@$STD_VERSION/path/posix.ts";
|
|
7
|
-
*
|
|
8
|
-
* toFileUrl("/home/foo"); // new URL("file:///home/foo")
|
|
9
|
-
* ```
|
|
10
|
-
* @param path to convert to file URL
|
|
11
|
-
*/
|
|
12
|
-
export declare function posixToFileUrl(path: string): import("url").URL;
|
|
13
2
|
/**
|
|
14
3
|
* Converts a path string to a file URL.
|
|
15
4
|
*
|
|
@@ -22,4 +11,4 @@ export declare function posixToFileUrl(path: string): import("url").URL;
|
|
|
22
11
|
* ```
|
|
23
12
|
* @param path to convert to file URL
|
|
24
13
|
*/
|
|
25
|
-
export declare function
|
|
14
|
+
export declare function toFileUrl(path: string): URL;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.toFileUrl = void 0;
|
|
6
|
+
const to_file_url_js_1 = require("../_common/to_file_url.js");
|
|
7
|
+
const is_absolute_js_1 = require("./is_absolute.js");
|
|
8
|
+
/**
|
|
9
|
+
* Converts a path string to a file URL.
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { toFileUrl } from "https://deno.land/std@$STD_VERSION/path/win32.ts";
|
|
13
|
+
*
|
|
14
|
+
* toFileUrl("\\home\\foo"); // new URL("file:///home/foo")
|
|
15
|
+
* toFileUrl("C:\\Users\\foo"); // new URL("file:///C:/Users/foo")
|
|
16
|
+
* toFileUrl("\\\\127.0.0.1\\home\\foo"); // new URL("file://127.0.0.1/home/foo")
|
|
17
|
+
* ```
|
|
18
|
+
* @param path to convert to file URL
|
|
19
|
+
*/
|
|
20
|
+
function toFileUrl(path) {
|
|
21
|
+
if (!(0, is_absolute_js_1.isAbsolute)(path)) {
|
|
22
|
+
throw new TypeError("Must be an absolute path.");
|
|
23
|
+
}
|
|
24
|
+
const [, hostname, pathname] = path.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/);
|
|
25
|
+
const url = new URL("file:///");
|
|
26
|
+
url.pathname = (0, to_file_url_js_1.encodeWhitespace)(pathname.replace(/%/g, "%25"));
|
|
27
|
+
if (hostname !== undefined && hostname !== "localhost") {
|
|
28
|
+
url.hostname = hostname;
|
|
29
|
+
if (!url.hostname) {
|
|
30
|
+
throw new TypeError("Invalid hostname.");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return url;
|
|
34
|
+
}
|
|
35
|
+
exports.toFileUrl = toFileUrl;
|
|
@@ -2,36 +2,27 @@
|
|
|
2
2
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
3
3
|
// This module is browser compatible.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
6
|
-
const
|
|
5
|
+
exports.toNamespacedPath = void 0;
|
|
6
|
+
const constants_js_1 = require("../_common/constants.js");
|
|
7
7
|
const _util_js_1 = require("./_util.js");
|
|
8
|
-
const
|
|
8
|
+
const resolve_js_1 = require("./resolve.js");
|
|
9
9
|
/**
|
|
10
10
|
* Resolves path to a namespace path
|
|
11
11
|
* @param path to resolve to namespace
|
|
12
12
|
*/
|
|
13
|
-
function
|
|
14
|
-
// Non-op on posix systems
|
|
15
|
-
return path;
|
|
16
|
-
}
|
|
17
|
-
exports.posixToNamespacedPath = posixToNamespacedPath;
|
|
18
|
-
/**
|
|
19
|
-
* Resolves path to a namespace path
|
|
20
|
-
* @param path to resolve to namespace
|
|
21
|
-
*/
|
|
22
|
-
function windowsToNamespacedPath(path) {
|
|
13
|
+
function toNamespacedPath(path) {
|
|
23
14
|
// Note: this will *probably* throw somewhere.
|
|
24
15
|
if (typeof path !== "string")
|
|
25
16
|
return path;
|
|
26
17
|
if (path.length === 0)
|
|
27
18
|
return "";
|
|
28
|
-
const resolvedPath = (0,
|
|
19
|
+
const resolvedPath = (0, resolve_js_1.resolve)(path);
|
|
29
20
|
if (resolvedPath.length >= 3) {
|
|
30
|
-
if (resolvedPath.charCodeAt(0) ===
|
|
21
|
+
if (resolvedPath.charCodeAt(0) === constants_js_1.CHAR_BACKWARD_SLASH) {
|
|
31
22
|
// Possible UNC root
|
|
32
|
-
if (resolvedPath.charCodeAt(1) ===
|
|
23
|
+
if (resolvedPath.charCodeAt(1) === constants_js_1.CHAR_BACKWARD_SLASH) {
|
|
33
24
|
const code = resolvedPath.charCodeAt(2);
|
|
34
|
-
if (code !==
|
|
25
|
+
if (code !== constants_js_1.CHAR_QUESTION_MARK && code !== constants_js_1.CHAR_DOT) {
|
|
35
26
|
// Matched non-long UNC root, convert the path to a long UNC path
|
|
36
27
|
return `\\\\?\\UNC\\${resolvedPath.slice(2)}`;
|
|
37
28
|
}
|
|
@@ -39,8 +30,8 @@ function windowsToNamespacedPath(path) {
|
|
|
39
30
|
}
|
|
40
31
|
else if ((0, _util_js_1.isWindowsDeviceRoot)(resolvedPath.charCodeAt(0))) {
|
|
41
32
|
// Possible device root
|
|
42
|
-
if (resolvedPath.charCodeAt(1) ===
|
|
43
|
-
resolvedPath.charCodeAt(2) ===
|
|
33
|
+
if (resolvedPath.charCodeAt(1) === constants_js_1.CHAR_COLON &&
|
|
34
|
+
resolvedPath.charCodeAt(2) === constants_js_1.CHAR_BACKWARD_SLASH) {
|
|
44
35
|
// Matched device root, convert the path to a long UNC path
|
|
45
36
|
return `\\\\?\\${resolvedPath}`;
|
|
46
37
|
}
|
|
@@ -48,4 +39,4 @@ function windowsToNamespacedPath(path) {
|
|
|
48
39
|
}
|
|
49
40
|
return path;
|
|
50
41
|
}
|
|
51
|
-
exports.
|
|
42
|
+
exports.toNamespacedPath = toNamespacedPath;
|
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.208.0/path/mod.js";
|
|
2
|
+
export * as html from "./deps/deno.land/std@0.208.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.208.0/path/mod.js"));
|
|
28
|
+
exports.html = __importStar(require("./deps/deno.land/std@0.208.0/html/mod.js"));
|
package/script/mod.js
CHANGED
|
@@ -48,8 +48,8 @@ function default_1(options = {}) {
|
|
|
48
48
|
const env = new environment_js_1.Environment({
|
|
49
49
|
loader,
|
|
50
50
|
dataVarname: options.dataVarname || "it",
|
|
51
|
-
autoescape: options.autoescape
|
|
52
|
-
useWith: options.useWith
|
|
51
|
+
autoescape: options.autoescape ?? false,
|
|
52
|
+
useWith: options.useWith ?? true,
|
|
53
53
|
});
|
|
54
54
|
// Register basic plugins
|
|
55
55
|
env.use((0, if_js_1.default)());
|
|
@@ -6,11 +6,13 @@ export interface TemplateResult {
|
|
|
6
6
|
}
|
|
7
7
|
export interface Template {
|
|
8
8
|
(data?: Record<string, unknown>): Promise<TemplateResult>;
|
|
9
|
+
source: string;
|
|
9
10
|
code: string;
|
|
10
11
|
file?: string;
|
|
11
12
|
}
|
|
12
13
|
export interface TemplateSync {
|
|
13
14
|
(data?: Record<string, unknown>): TemplateResult;
|
|
15
|
+
source: string;
|
|
14
16
|
code: string;
|
|
15
17
|
file?: string;
|
|
16
18
|
}
|
|
@@ -39,4 +41,7 @@ export declare class Environment {
|
|
|
39
41
|
load(file: string, from?: string): Promise<Template>;
|
|
40
42
|
compileTokens(tokens: Token[], outputVar?: string, stopAt?: string[]): string[];
|
|
41
43
|
compileFilters(tokens: Token[], output: string, autoescape?: boolean): string;
|
|
44
|
+
createError(path: string, source: string, position: number, cause: Error): Error;
|
|
42
45
|
}
|
|
46
|
+
/** Returns the number and code of the errored line */
|
|
47
|
+
export declare function errorLine(source: string, pos: number): [number, number, string];
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Environment = void 0;
|
|
29
|
+
exports.errorLine = exports.Environment = void 0;
|
|
30
30
|
const dntShim = __importStar(require("../_dnt.shims.js"));
|
|
31
31
|
const tokenizer_js_1 = __importDefault(require("./tokenizer.js"));
|
|
32
32
|
class Environment {
|
|
@@ -63,30 +63,30 @@ class Environment {
|
|
|
63
63
|
return template(data);
|
|
64
64
|
}
|
|
65
65
|
compile(source, path, defaults, sync = false) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const { dataVarname, useWith } = this.options;
|
|
70
|
-
const constructor = new Function("__file", "__env", "__defaults", `return${sync ? "" : " async"} function (${dataVarname}) {
|
|
71
|
-
try {
|
|
72
|
-
${dataVarname} = Object.assign({}, __defaults, ${dataVarname});
|
|
73
|
-
const __exports = { content: "" };
|
|
74
|
-
${useWith ? `with (${dataVarname}) {${code}}` : code}
|
|
75
|
-
return __exports;
|
|
76
|
-
} catch (cause) {
|
|
77
|
-
throw new Error(\`Error rendering template: \${__file}\`, { cause });
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
`);
|
|
81
|
-
// console.log(code);
|
|
82
|
-
const template = constructor(path, this, defaults);
|
|
83
|
-
template.file = path;
|
|
84
|
-
template.code = code;
|
|
85
|
-
return template;
|
|
66
|
+
const { tokens, position, error } = (0, tokenizer_js_1.default)(source);
|
|
67
|
+
if (error) {
|
|
68
|
+
throw this.createError(path || "unknown", source, position, error);
|
|
86
69
|
}
|
|
87
|
-
|
|
88
|
-
|
|
70
|
+
const code = this.compileTokens(tokens).join("\n");
|
|
71
|
+
const { dataVarname, useWith } = this.options;
|
|
72
|
+
const constructor = new Function("__file", "__env", "__defaults", `return${sync ? "" : " async"} function (${dataVarname}) {
|
|
73
|
+
let __pos = 0;
|
|
74
|
+
try {
|
|
75
|
+
${dataVarname} = Object.assign({}, __defaults, ${dataVarname});
|
|
76
|
+
const __exports = { content: "" };
|
|
77
|
+
${useWith ? `with (${dataVarname}) {${code}}` : code}
|
|
78
|
+
return __exports;
|
|
79
|
+
} catch (cause) {
|
|
80
|
+
const template = __env.cache.get(__file);
|
|
81
|
+
throw __env.createError(__file, template?.source || "", __pos, cause);
|
|
89
82
|
}
|
|
83
|
+
}
|
|
84
|
+
`);
|
|
85
|
+
const template = constructor(path, this, defaults);
|
|
86
|
+
template.file = path;
|
|
87
|
+
template.code = code;
|
|
88
|
+
template.source = source;
|
|
89
|
+
return template;
|
|
90
90
|
}
|
|
91
91
|
async load(file, from) {
|
|
92
92
|
const path = from ? this.options.loader.resolve(from, file) : file;
|
|
@@ -103,7 +103,7 @@ class Environment {
|
|
|
103
103
|
if (stopAt && tokens[0][0] === "tag" && stopAt.includes(tokens[0][1])) {
|
|
104
104
|
break;
|
|
105
105
|
}
|
|
106
|
-
const [type, code] = tokens.shift();
|
|
106
|
+
const [type, code, pos] = tokens.shift();
|
|
107
107
|
if (type === "comment") {
|
|
108
108
|
continue;
|
|
109
109
|
}
|
|
@@ -112,6 +112,7 @@ class Environment {
|
|
|
112
112
|
continue;
|
|
113
113
|
}
|
|
114
114
|
if (type === "tag") {
|
|
115
|
+
compiled.push(`__pos = ${pos};`);
|
|
115
116
|
for (const tag of this.tags) {
|
|
116
117
|
const compiledTag = tag(this, code, outputVar, tokens);
|
|
117
118
|
if (typeof compiledTag === "string") {
|
|
@@ -161,6 +162,13 @@ class Environment {
|
|
|
161
162
|
}
|
|
162
163
|
return output;
|
|
163
164
|
}
|
|
165
|
+
createError(path, source, position, cause) {
|
|
166
|
+
if (!source) {
|
|
167
|
+
return cause;
|
|
168
|
+
}
|
|
169
|
+
const [line, column, code] = errorLine(source, position);
|
|
170
|
+
return new Error(`Error in the template ${path}:${line}:${column}\n\n${code.trim()}\n\n> ${cause.message}\n`, { cause });
|
|
171
|
+
}
|
|
164
172
|
}
|
|
165
173
|
exports.Environment = Environment;
|
|
166
174
|
function isGlobal(name) {
|
|
@@ -174,3 +182,23 @@ function isGlobal(name) {
|
|
|
174
182
|
return typeof dntShim.dntGlobalThis[obj]?.[prop] === "function";
|
|
175
183
|
}
|
|
176
184
|
}
|
|
185
|
+
/** Returns the number and code of the errored line */
|
|
186
|
+
function errorLine(source, pos) {
|
|
187
|
+
let line = 1;
|
|
188
|
+
let column = 1;
|
|
189
|
+
for (let index = 0; index < pos; index++) {
|
|
190
|
+
if (source[index] === "\n" ||
|
|
191
|
+
(source[index] === "\r" && source[index + 1] === "\n")) {
|
|
192
|
+
line++;
|
|
193
|
+
column = 1;
|
|
194
|
+
if (source[index] === "\r") {
|
|
195
|
+
index++;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
column++;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return [line, column, source.split("\n")[line - 1]];
|
|
203
|
+
}
|
|
204
|
+
exports.errorLine = errorLine;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export type TokenType = "string" | "tag" | "filter" | "comment";
|
|
2
|
-
export type Token = [TokenType, string];
|
|
3
|
-
export
|
|
2
|
+
export type Token = [TokenType, string, number?];
|
|
3
|
+
export interface TokenizeResult {
|
|
4
|
+
tokens: Token[];
|
|
5
|
+
position: number;
|
|
6
|
+
error: Error | undefined;
|
|
7
|
+
}
|
|
8
|
+
export default function tokenize(source: string): TokenizeResult;
|
|
4
9
|
/**
|
|
5
10
|
* Parse a tag and return the indexes of the start and end brackets, and the filters between.
|
|
6
11
|
* For example: {{ tag |> filter1 |> filter2 }} => [2, 9, 20, 31]
|
package/script/src/tokenizer.js
CHANGED
|
@@ -5,84 +5,95 @@ function tokenize(source) {
|
|
|
5
5
|
const tokens = [];
|
|
6
6
|
let type = "string";
|
|
7
7
|
let trimNext = false;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
trimNext
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
let position = 0;
|
|
9
|
+
try {
|
|
10
|
+
while (source.length > 0) {
|
|
11
|
+
if (type === "string") {
|
|
12
|
+
const index = source.indexOf("{{");
|
|
13
|
+
const code = index === -1 ? source : source.slice(0, index);
|
|
14
|
+
if (trimNext) {
|
|
15
|
+
tokens.push([type, code.trimStart(), position]);
|
|
16
|
+
trimNext = false;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
tokens.push([type, code, position]);
|
|
20
|
+
}
|
|
21
|
+
if (index === -1) {
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
position += index;
|
|
25
|
+
source = source.slice(index);
|
|
26
|
+
type = source.startsWith("{{#") ? "comment" : "tag";
|
|
27
|
+
continue;
|
|
21
28
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
if (type === "comment") {
|
|
30
|
+
source = source.slice(3);
|
|
31
|
+
const index = source.indexOf("#}}");
|
|
32
|
+
const comment = index === -1 ? source : source.slice(0, index);
|
|
33
|
+
tokens.push([type, comment, position]);
|
|
34
|
+
if (index === -1) {
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
position += index + 3;
|
|
38
|
+
source = source.slice(index + 3);
|
|
39
|
+
type = "string";
|
|
40
|
+
continue;
|
|
33
41
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
if (type === "tag") {
|
|
43
|
+
const indexes = parseTag(source);
|
|
44
|
+
const lastIndex = indexes.length - 1;
|
|
45
|
+
let tag;
|
|
46
|
+
indexes.reduce((prev, curr, index) => {
|
|
47
|
+
let code = source.slice(prev, curr - 2);
|
|
48
|
+
// Tag
|
|
49
|
+
if (index === 1) {
|
|
50
|
+
// Left trim
|
|
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];
|
|
62
|
+
tokens.push(tag);
|
|
63
|
+
return curr;
|
|
51
64
|
}
|
|
52
65
|
// Right trim
|
|
53
|
-
if (code.endsWith("-")
|
|
66
|
+
if (index === lastIndex && code.endsWith("-")) {
|
|
54
67
|
code = code.slice(0, -1);
|
|
55
68
|
trimNext = true;
|
|
56
69
|
}
|
|
57
|
-
|
|
58
|
-
tokens.push(
|
|
70
|
+
// Filters
|
|
71
|
+
tokens.push(["filter", code.trim()]);
|
|
59
72
|
return curr;
|
|
73
|
+
});
|
|
74
|
+
position += indexes[lastIndex];
|
|
75
|
+
source = source.slice(indexes[lastIndex]);
|
|
76
|
+
type = "string";
|
|
77
|
+
// Search the closing echo tag {{ /echo }}
|
|
78
|
+
if (tag?.[1] === "echo") {
|
|
79
|
+
const end = source.match(/{{\s*\/echo\s*}}/);
|
|
80
|
+
if (!end) {
|
|
81
|
+
throw new Error("Unclosed echo tag");
|
|
82
|
+
}
|
|
83
|
+
const rawCode = source.slice(0, end.index);
|
|
84
|
+
tag[1] = `echo ${JSON.stringify(rawCode)}`;
|
|
85
|
+
const length = Number(end.index) + end[0].length;
|
|
86
|
+
source = source.slice(length);
|
|
87
|
+
position += length;
|
|
60
88
|
}
|
|
61
|
-
|
|
62
|
-
if (index === lastIndex && code.endsWith("-")) {
|
|
63
|
-
code = code.slice(0, -1);
|
|
64
|
-
trimNext = true;
|
|
65
|
-
}
|
|
66
|
-
// Filters
|
|
67
|
-
tokens.push(["filter", code.trim()]);
|
|
68
|
-
return curr;
|
|
69
|
-
});
|
|
70
|
-
source = source.slice(indexes[indexes.length - 1]);
|
|
71
|
-
type = "string";
|
|
72
|
-
// Search the closing echo tag {{ /echo }}
|
|
73
|
-
if (tag?.[1] === "echo") {
|
|
74
|
-
const end = source.match(/{{\s*\/echo\s*}}/);
|
|
75
|
-
if (!end) {
|
|
76
|
-
throw new Error("Unclosed echo tag");
|
|
77
|
-
}
|
|
78
|
-
const rawCode = source.slice(0, end.index);
|
|
79
|
-
tag[1] = `echo ${JSON.stringify(rawCode)}`;
|
|
80
|
-
source = source.slice(Number(end.index) + end[0].length);
|
|
89
|
+
continue;
|
|
81
90
|
}
|
|
82
|
-
continue;
|
|
83
91
|
}
|
|
84
92
|
}
|
|
85
|
-
|
|
93
|
+
catch (error) {
|
|
94
|
+
return { tokens, position, error };
|
|
95
|
+
}
|
|
96
|
+
return { tokens, position, error: undefined };
|
|
86
97
|
}
|
|
87
98
|
exports.default = tokenize;
|
|
88
99
|
/**
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Return the last portion of a `path`.
|
|
3
|
-
* Trailing directory separators are ignored, and optional suffix is removed.
|
|
4
|
-
*
|
|
5
|
-
* @param path - path to extract the name from.
|
|
6
|
-
* @param [suffix] - suffix to remove from extracted name.
|
|
7
|
-
*/
|
|
8
|
-
export declare function posixBasename(path: string, suffix?: string): string;
|
|
9
|
-
/**
|
|
10
|
-
* Return the last portion of a `path`.
|
|
11
|
-
* Trailing directory separators are ignored, and optional suffix is removed.
|
|
12
|
-
*
|
|
13
|
-
* @param path - path to extract the name from.
|
|
14
|
-
* @param [suffix] - suffix to remove from extracted name.
|
|
15
|
-
*/
|
|
16
|
-
export declare function windowsBasename(path: string, suffix?: string): string;
|