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
|
@@ -1,104 +1,13 @@
|
|
|
1
1
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
|
-
import { CHAR_COLON, CHAR_DOT } from "
|
|
4
|
-
import { assertPath
|
|
3
|
+
import { CHAR_COLON, CHAR_DOT } from "../_common/constants.js";
|
|
4
|
+
import { assertPath } from "../_common/assert_path.js";
|
|
5
|
+
import { isPathSeparator, isWindowsDeviceRoot } from "./_util.js";
|
|
5
6
|
/**
|
|
6
7
|
* Return a `ParsedPath` object of the `path`.
|
|
7
8
|
* @param path to process
|
|
8
9
|
*/
|
|
9
|
-
export function
|
|
10
|
-
assertPath(path);
|
|
11
|
-
const ret = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
12
|
-
if (path.length === 0)
|
|
13
|
-
return ret;
|
|
14
|
-
const isAbsolute = isPosixPathSeparator(path.charCodeAt(0));
|
|
15
|
-
let start;
|
|
16
|
-
if (isAbsolute) {
|
|
17
|
-
ret.root = "/";
|
|
18
|
-
start = 1;
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
start = 0;
|
|
22
|
-
}
|
|
23
|
-
let startDot = -1;
|
|
24
|
-
let startPart = 0;
|
|
25
|
-
let end = -1;
|
|
26
|
-
let matchedSlash = true;
|
|
27
|
-
let i = path.length - 1;
|
|
28
|
-
// Track the state of characters (if any) we see before our first dot and
|
|
29
|
-
// after any path separator we find
|
|
30
|
-
let preDotState = 0;
|
|
31
|
-
// Get non-dir info
|
|
32
|
-
for (; i >= start; --i) {
|
|
33
|
-
const code = path.charCodeAt(i);
|
|
34
|
-
if (isPosixPathSeparator(code)) {
|
|
35
|
-
// If we reached a path separator that was not part of a set of path
|
|
36
|
-
// separators at the end of the string, stop now
|
|
37
|
-
if (!matchedSlash) {
|
|
38
|
-
startPart = i + 1;
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
continue;
|
|
42
|
-
}
|
|
43
|
-
if (end === -1) {
|
|
44
|
-
// We saw the first non-path separator, mark this as the end of our
|
|
45
|
-
// extension
|
|
46
|
-
matchedSlash = false;
|
|
47
|
-
end = i + 1;
|
|
48
|
-
}
|
|
49
|
-
if (code === CHAR_DOT) {
|
|
50
|
-
// If this is our first dot, mark it as the start of our extension
|
|
51
|
-
if (startDot === -1)
|
|
52
|
-
startDot = i;
|
|
53
|
-
else if (preDotState !== 1)
|
|
54
|
-
preDotState = 1;
|
|
55
|
-
}
|
|
56
|
-
else if (startDot !== -1) {
|
|
57
|
-
// We saw a non-dot and non-path separator before our dot, so we should
|
|
58
|
-
// have a good chance at having a non-empty extension
|
|
59
|
-
preDotState = -1;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
if (startDot === -1 ||
|
|
63
|
-
end === -1 ||
|
|
64
|
-
// We saw a non-dot character immediately before the dot
|
|
65
|
-
preDotState === 0 ||
|
|
66
|
-
// The (right-most) trimmed path component is exactly '..'
|
|
67
|
-
(preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)) {
|
|
68
|
-
if (end !== -1) {
|
|
69
|
-
if (startPart === 0 && isAbsolute) {
|
|
70
|
-
ret.base = ret.name = path.slice(1, end);
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
ret.base = ret.name = path.slice(startPart, end);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
// Fallback to '/' in case there is no basename
|
|
77
|
-
ret.base = ret.base || "/";
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
if (startPart === 0 && isAbsolute) {
|
|
81
|
-
ret.name = path.slice(1, startDot);
|
|
82
|
-
ret.base = path.slice(1, end);
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
ret.name = path.slice(startPart, startDot);
|
|
86
|
-
ret.base = path.slice(startPart, end);
|
|
87
|
-
}
|
|
88
|
-
ret.ext = path.slice(startDot, end);
|
|
89
|
-
}
|
|
90
|
-
if (startPart > 0) {
|
|
91
|
-
ret.dir = stripTrailingSeparators(path.slice(0, startPart - 1), isPosixPathSeparator);
|
|
92
|
-
}
|
|
93
|
-
else if (isAbsolute)
|
|
94
|
-
ret.dir = "/";
|
|
95
|
-
return ret;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Return a `ParsedPath` object of the `path`.
|
|
99
|
-
* @param path to process
|
|
100
|
-
*/
|
|
101
|
-
export function windowsParse(path) {
|
|
10
|
+
export function parse(path) {
|
|
102
11
|
assertPath(path);
|
|
103
12
|
const ret = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
104
13
|
const len = path.length;
|
package/esm/deps/deno.land/{std@0.201.0/path/_relative.js → std@0.208.0/path/windows/relative.js}
RENAMED
|
@@ -1,103 +1,8 @@
|
|
|
1
1
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
|
-
import { CHAR_BACKWARD_SLASH } from "
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
function assertArgs(from, to) {
|
|
7
|
-
assertPath(from);
|
|
8
|
-
assertPath(to);
|
|
9
|
-
if (from === to)
|
|
10
|
-
return "";
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Return the relative path from `from` to `to` based on current working directory.
|
|
14
|
-
*
|
|
15
|
-
* @param from path in current working directory
|
|
16
|
-
* @param to path in current working directory
|
|
17
|
-
*/
|
|
18
|
-
export function posixRelative(from, to) {
|
|
19
|
-
assertArgs(from, to);
|
|
20
|
-
from = posixResolve(from);
|
|
21
|
-
to = posixResolve(to);
|
|
22
|
-
if (from === to)
|
|
23
|
-
return "";
|
|
24
|
-
// Trim any leading backslashes
|
|
25
|
-
let fromStart = 1;
|
|
26
|
-
const fromEnd = from.length;
|
|
27
|
-
for (; fromStart < fromEnd; ++fromStart) {
|
|
28
|
-
if (!isPosixPathSeparator(from.charCodeAt(fromStart)))
|
|
29
|
-
break;
|
|
30
|
-
}
|
|
31
|
-
const fromLen = fromEnd - fromStart;
|
|
32
|
-
// Trim any leading backslashes
|
|
33
|
-
let toStart = 1;
|
|
34
|
-
const toEnd = to.length;
|
|
35
|
-
for (; toStart < toEnd; ++toStart) {
|
|
36
|
-
if (!isPosixPathSeparator(to.charCodeAt(toStart)))
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
const toLen = toEnd - toStart;
|
|
40
|
-
// Compare paths to find the longest common path from root
|
|
41
|
-
const length = fromLen < toLen ? fromLen : toLen;
|
|
42
|
-
let lastCommonSep = -1;
|
|
43
|
-
let i = 0;
|
|
44
|
-
for (; i <= length; ++i) {
|
|
45
|
-
if (i === length) {
|
|
46
|
-
if (toLen > length) {
|
|
47
|
-
if (isPosixPathSeparator(to.charCodeAt(toStart + i))) {
|
|
48
|
-
// We get here if `from` is the exact base path for `to`.
|
|
49
|
-
// For example: from='/foo/bar'; to='/foo/bar/baz'
|
|
50
|
-
return to.slice(toStart + i + 1);
|
|
51
|
-
}
|
|
52
|
-
else if (i === 0) {
|
|
53
|
-
// We get here if `from` is the root
|
|
54
|
-
// For example: from='/'; to='/foo'
|
|
55
|
-
return to.slice(toStart + i);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
else if (fromLen > length) {
|
|
59
|
-
if (isPosixPathSeparator(from.charCodeAt(fromStart + i))) {
|
|
60
|
-
// We get here if `to` is the exact base path for `from`.
|
|
61
|
-
// For example: from='/foo/bar/baz'; to='/foo/bar'
|
|
62
|
-
lastCommonSep = i;
|
|
63
|
-
}
|
|
64
|
-
else if (i === 0) {
|
|
65
|
-
// We get here if `to` is the root.
|
|
66
|
-
// For example: from='/foo'; to='/'
|
|
67
|
-
lastCommonSep = 0;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
|
-
const fromCode = from.charCodeAt(fromStart + i);
|
|
73
|
-
const toCode = to.charCodeAt(toStart + i);
|
|
74
|
-
if (fromCode !== toCode)
|
|
75
|
-
break;
|
|
76
|
-
else if (isPosixPathSeparator(fromCode))
|
|
77
|
-
lastCommonSep = i;
|
|
78
|
-
}
|
|
79
|
-
let out = "";
|
|
80
|
-
// Generate the relative path based on the path difference between `to`
|
|
81
|
-
// and `from`
|
|
82
|
-
for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
|
|
83
|
-
if (i === fromEnd || isPosixPathSeparator(from.charCodeAt(i))) {
|
|
84
|
-
if (out.length === 0)
|
|
85
|
-
out += "..";
|
|
86
|
-
else
|
|
87
|
-
out += "/..";
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
// Lastly, append the rest of the destination (`to`) path that comes after
|
|
91
|
-
// the common path parts
|
|
92
|
-
if (out.length > 0)
|
|
93
|
-
return out + to.slice(toStart + lastCommonSep);
|
|
94
|
-
else {
|
|
95
|
-
toStart += lastCommonSep;
|
|
96
|
-
if (isPosixPathSeparator(to.charCodeAt(toStart)))
|
|
97
|
-
++toStart;
|
|
98
|
-
return to.slice(toStart);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
3
|
+
import { CHAR_BACKWARD_SLASH } from "../_common/constants.js";
|
|
4
|
+
import { resolve } from "./resolve.js";
|
|
5
|
+
import { assertArgs } from "../_common/relative.js";
|
|
101
6
|
/**
|
|
102
7
|
* Return the relative path from `from` to `to` based on current working directory.
|
|
103
8
|
*
|
|
@@ -109,10 +14,10 @@ export function posixRelative(from, to) {
|
|
|
109
14
|
* @param from path in current working directory
|
|
110
15
|
* @param to path in current working directory
|
|
111
16
|
*/
|
|
112
|
-
export function
|
|
17
|
+
export function relative(from, to) {
|
|
113
18
|
assertArgs(from, to);
|
|
114
|
-
const fromOrig =
|
|
115
|
-
const toOrig =
|
|
19
|
+
const fromOrig = resolve(from);
|
|
20
|
+
const toOrig = resolve(to);
|
|
116
21
|
if (fromOrig === toOrig)
|
|
117
22
|
return "";
|
|
118
23
|
from = fromOrig.toLowerCase();
|
package/esm/deps/deno.land/{std@0.201.0/path/_resolve.js → std@0.208.0/path/windows/resolve.js}
RENAMED
|
@@ -1,55 +1,15 @@
|
|
|
1
1
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
|
-
import * as dntShim from "
|
|
4
|
-
import { CHAR_COLON } from "
|
|
5
|
-
import {
|
|
3
|
+
import * as dntShim from "../../../../../_dnt.shims.js";
|
|
4
|
+
import { CHAR_COLON } from "../_common/constants.js";
|
|
5
|
+
import { normalizeString } from "../_common/normalize_string.js";
|
|
6
|
+
import { assertPath } from "../_common/assert_path.js";
|
|
7
|
+
import { isPathSeparator, isWindowsDeviceRoot } from "./_util.js";
|
|
6
8
|
/**
|
|
7
9
|
* Resolves path segments into a `path`
|
|
8
10
|
* @param pathSegments to process to path
|
|
9
11
|
*/
|
|
10
|
-
export function
|
|
11
|
-
let resolvedPath = "";
|
|
12
|
-
let resolvedAbsolute = false;
|
|
13
|
-
for (let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
14
|
-
let path;
|
|
15
|
-
if (i >= 0)
|
|
16
|
-
path = pathSegments[i];
|
|
17
|
-
else {
|
|
18
|
-
// deno-lint-ignore no-explicit-any
|
|
19
|
-
const { Deno } = dntShim.dntGlobalThis;
|
|
20
|
-
if (typeof Deno?.cwd !== "function") {
|
|
21
|
-
throw new TypeError("Resolved a relative path without a CWD.");
|
|
22
|
-
}
|
|
23
|
-
path = Deno.cwd();
|
|
24
|
-
}
|
|
25
|
-
assertPath(path);
|
|
26
|
-
// Skip empty entries
|
|
27
|
-
if (path.length === 0) {
|
|
28
|
-
continue;
|
|
29
|
-
}
|
|
30
|
-
resolvedPath = `${path}/${resolvedPath}`;
|
|
31
|
-
resolvedAbsolute = isPosixPathSeparator(path.charCodeAt(0));
|
|
32
|
-
}
|
|
33
|
-
// At this point the path should be resolved to a full absolute path, but
|
|
34
|
-
// handle relative paths to be safe (might happen when Deno.cwd() fails)
|
|
35
|
-
// Normalize the path
|
|
36
|
-
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, "/", isPosixPathSeparator);
|
|
37
|
-
if (resolvedAbsolute) {
|
|
38
|
-
if (resolvedPath.length > 0)
|
|
39
|
-
return `/${resolvedPath}`;
|
|
40
|
-
else
|
|
41
|
-
return "/";
|
|
42
|
-
}
|
|
43
|
-
else if (resolvedPath.length > 0)
|
|
44
|
-
return resolvedPath;
|
|
45
|
-
else
|
|
46
|
-
return ".";
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Resolves path segments into a `path`
|
|
50
|
-
* @param pathSegments to process to path
|
|
51
|
-
*/
|
|
52
|
-
export function windowsResolve(...pathSegments) {
|
|
12
|
+
export function resolve(...pathSegments) {
|
|
53
13
|
let resolvedDevice = "";
|
|
54
14
|
let resolvedTail = "";
|
|
55
15
|
let resolvedAbsolute = false;
|
|
@@ -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;
|
|
@@ -1,37 +1,7 @@
|
|
|
1
1
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
"\u0009": "%09",
|
|
6
|
-
"\u000A": "%0A",
|
|
7
|
-
"\u000B": "%0B",
|
|
8
|
-
"\u000C": "%0C",
|
|
9
|
-
"\u000D": "%0D",
|
|
10
|
-
"\u0020": "%20",
|
|
11
|
-
};
|
|
12
|
-
function encodeWhitespace(string) {
|
|
13
|
-
return string.replaceAll(/[\s]/g, (c) => {
|
|
14
|
-
return WHITESPACE_ENCODINGS[c] ?? c;
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Converts a path string to a file URL.
|
|
19
|
-
*
|
|
20
|
-
* ```ts
|
|
21
|
-
* import { toFileUrl } from "https://deno.land/std@$STD_VERSION/path/posix.ts";
|
|
22
|
-
*
|
|
23
|
-
* toFileUrl("/home/foo"); // new URL("file:///home/foo")
|
|
24
|
-
* ```
|
|
25
|
-
* @param path to convert to file URL
|
|
26
|
-
*/
|
|
27
|
-
export function posixToFileUrl(path) {
|
|
28
|
-
if (!posixIsAbsolute(path)) {
|
|
29
|
-
throw new TypeError("Must be an absolute path.");
|
|
30
|
-
}
|
|
31
|
-
const url = new URL("file:///");
|
|
32
|
-
url.pathname = encodeWhitespace(path.replace(/%/g, "%25").replace(/\\/g, "%5C"));
|
|
33
|
-
return url;
|
|
34
|
-
}
|
|
3
|
+
import { encodeWhitespace } from "../_common/to_file_url.js";
|
|
4
|
+
import { isAbsolute } from "./is_absolute.js";
|
|
35
5
|
/**
|
|
36
6
|
* Converts a path string to a file URL.
|
|
37
7
|
*
|
|
@@ -44,8 +14,8 @@ export function posixToFileUrl(path) {
|
|
|
44
14
|
* ```
|
|
45
15
|
* @param path to convert to file URL
|
|
46
16
|
*/
|
|
47
|
-
export function
|
|
48
|
-
if (!
|
|
17
|
+
export function toFileUrl(path) {
|
|
18
|
+
if (!isAbsolute(path)) {
|
|
49
19
|
throw new TypeError("Must be an absolute path.");
|
|
50
20
|
}
|
|
51
21
|
const [, hostname, pathname] = path.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/);
|
|
@@ -1,27 +1,19 @@
|
|
|
1
1
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
// This module is browser compatible.
|
|
3
|
-
import { CHAR_BACKWARD_SLASH, CHAR_COLON, CHAR_DOT, CHAR_QUESTION_MARK, } from "
|
|
3
|
+
import { CHAR_BACKWARD_SLASH, CHAR_COLON, CHAR_DOT, CHAR_QUESTION_MARK, } from "../_common/constants.js";
|
|
4
4
|
import { isWindowsDeviceRoot } from "./_util.js";
|
|
5
|
-
import {
|
|
5
|
+
import { resolve } from "./resolve.js";
|
|
6
6
|
/**
|
|
7
7
|
* Resolves path to a namespace path
|
|
8
8
|
* @param path to resolve to namespace
|
|
9
9
|
*/
|
|
10
|
-
export function
|
|
11
|
-
// Non-op on posix systems
|
|
12
|
-
return path;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Resolves path to a namespace path
|
|
16
|
-
* @param path to resolve to namespace
|
|
17
|
-
*/
|
|
18
|
-
export function windowsToNamespacedPath(path) {
|
|
10
|
+
export function toNamespacedPath(path) {
|
|
19
11
|
// Note: this will *probably* throw somewhere.
|
|
20
12
|
if (typeof path !== "string")
|
|
21
13
|
return path;
|
|
22
14
|
if (path.length === 0)
|
|
23
15
|
return "";
|
|
24
|
-
const resolvedPath =
|
|
16
|
+
const resolvedPath = resolve(path);
|
|
25
17
|
if (resolvedPath.length >= 3) {
|
|
26
18
|
if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) {
|
|
27
19
|
// Possible UNC root
|
package/esm/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/esm/deps.js
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/esm/mod.js
CHANGED
|
@@ -20,8 +20,8 @@ export default function (options = {}) {
|
|
|
20
20
|
const env = new Environment({
|
|
21
21
|
loader,
|
|
22
22
|
dataVarname: options.dataVarname || "it",
|
|
23
|
-
autoescape: options.autoescape
|
|
24
|
-
useWith: options.useWith
|
|
23
|
+
autoescape: options.autoescape ?? false,
|
|
24
|
+
useWith: options.useWith ?? true,
|
|
25
25
|
});
|
|
26
26
|
// Register basic plugins
|
|
27
27
|
env.use(ifTag());
|
package/esm/src/environment.d.ts
CHANGED
|
@@ -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];
|
package/esm/src/environment.js
CHANGED
|
@@ -34,30 +34,30 @@ export class Environment {
|
|
|
34
34
|
return template(data);
|
|
35
35
|
}
|
|
36
36
|
compile(source, path, defaults, sync = false) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const { dataVarname, useWith } = this.options;
|
|
41
|
-
const constructor = new Function("__file", "__env", "__defaults", `return${sync ? "" : " async"} function (${dataVarname}) {
|
|
42
|
-
try {
|
|
43
|
-
${dataVarname} = Object.assign({}, __defaults, ${dataVarname});
|
|
44
|
-
const __exports = { content: "" };
|
|
45
|
-
${useWith ? `with (${dataVarname}) {${code}}` : code}
|
|
46
|
-
return __exports;
|
|
47
|
-
} catch (cause) {
|
|
48
|
-
throw new Error(\`Error rendering template: \${__file}\`, { cause });
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
`);
|
|
52
|
-
// console.log(code);
|
|
53
|
-
const template = constructor(path, this, defaults);
|
|
54
|
-
template.file = path;
|
|
55
|
-
template.code = code;
|
|
56
|
-
return template;
|
|
37
|
+
const { tokens, position, error } = tokenize(source);
|
|
38
|
+
if (error) {
|
|
39
|
+
throw this.createError(path || "unknown", source, position, error);
|
|
57
40
|
}
|
|
58
|
-
|
|
59
|
-
|
|
41
|
+
const code = this.compileTokens(tokens).join("\n");
|
|
42
|
+
const { dataVarname, useWith } = this.options;
|
|
43
|
+
const constructor = new Function("__file", "__env", "__defaults", `return${sync ? "" : " async"} function (${dataVarname}) {
|
|
44
|
+
let __pos = 0;
|
|
45
|
+
try {
|
|
46
|
+
${dataVarname} = Object.assign({}, __defaults, ${dataVarname});
|
|
47
|
+
const __exports = { content: "" };
|
|
48
|
+
${useWith ? `with (${dataVarname}) {${code}}` : code}
|
|
49
|
+
return __exports;
|
|
50
|
+
} catch (cause) {
|
|
51
|
+
const template = __env.cache.get(__file);
|
|
52
|
+
throw __env.createError(__file, template?.source || "", __pos, cause);
|
|
60
53
|
}
|
|
54
|
+
}
|
|
55
|
+
`);
|
|
56
|
+
const template = constructor(path, this, defaults);
|
|
57
|
+
template.file = path;
|
|
58
|
+
template.code = code;
|
|
59
|
+
template.source = source;
|
|
60
|
+
return template;
|
|
61
61
|
}
|
|
62
62
|
async load(file, from) {
|
|
63
63
|
const path = from ? this.options.loader.resolve(from, file) : file;
|
|
@@ -74,7 +74,7 @@ export class Environment {
|
|
|
74
74
|
if (stopAt && tokens[0][0] === "tag" && stopAt.includes(tokens[0][1])) {
|
|
75
75
|
break;
|
|
76
76
|
}
|
|
77
|
-
const [type, code] = tokens.shift();
|
|
77
|
+
const [type, code, pos] = tokens.shift();
|
|
78
78
|
if (type === "comment") {
|
|
79
79
|
continue;
|
|
80
80
|
}
|
|
@@ -83,6 +83,7 @@ export class Environment {
|
|
|
83
83
|
continue;
|
|
84
84
|
}
|
|
85
85
|
if (type === "tag") {
|
|
86
|
+
compiled.push(`__pos = ${pos};`);
|
|
86
87
|
for (const tag of this.tags) {
|
|
87
88
|
const compiledTag = tag(this, code, outputVar, tokens);
|
|
88
89
|
if (typeof compiledTag === "string") {
|
|
@@ -132,6 +133,13 @@ export class Environment {
|
|
|
132
133
|
}
|
|
133
134
|
return output;
|
|
134
135
|
}
|
|
136
|
+
createError(path, source, position, cause) {
|
|
137
|
+
if (!source) {
|
|
138
|
+
return cause;
|
|
139
|
+
}
|
|
140
|
+
const [line, column, code] = errorLine(source, position);
|
|
141
|
+
return new Error(`Error in the template ${path}:${line}:${column}\n\n${code.trim()}\n\n> ${cause.message}\n`, { cause });
|
|
142
|
+
}
|
|
135
143
|
}
|
|
136
144
|
function isGlobal(name) {
|
|
137
145
|
// @ts-ignore TS doesn't know about globalThis
|
|
@@ -144,3 +152,22 @@ function isGlobal(name) {
|
|
|
144
152
|
return typeof dntShim.dntGlobalThis[obj]?.[prop] === "function";
|
|
145
153
|
}
|
|
146
154
|
}
|
|
155
|
+
/** Returns the number and code of the errored line */
|
|
156
|
+
export function errorLine(source, pos) {
|
|
157
|
+
let line = 1;
|
|
158
|
+
let column = 1;
|
|
159
|
+
for (let index = 0; index < pos; index++) {
|
|
160
|
+
if (source[index] === "\n" ||
|
|
161
|
+
(source[index] === "\r" && source[index + 1] === "\n")) {
|
|
162
|
+
line++;
|
|
163
|
+
column = 1;
|
|
164
|
+
if (source[index] === "\r") {
|
|
165
|
+
index++;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
column++;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return [line, column, source.split("\n")[line - 1]];
|
|
173
|
+
}
|
package/esm/src/tokenizer.d.ts
CHANGED
|
@@ -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]
|