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/esm/src/tokenizer.js
CHANGED
|
@@ -2,84 +2,95 @@ export default function tokenize(source) {
|
|
|
2
2
|
const tokens = [];
|
|
3
3
|
let type = "string";
|
|
4
4
|
let trimNext = false;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
trimNext
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
let position = 0;
|
|
6
|
+
try {
|
|
7
|
+
while (source.length > 0) {
|
|
8
|
+
if (type === "string") {
|
|
9
|
+
const index = source.indexOf("{{");
|
|
10
|
+
const code = index === -1 ? source : source.slice(0, index);
|
|
11
|
+
if (trimNext) {
|
|
12
|
+
tokens.push([type, code.trimStart(), position]);
|
|
13
|
+
trimNext = false;
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
tokens.push([type, code, position]);
|
|
17
|
+
}
|
|
18
|
+
if (index === -1) {
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
position += index;
|
|
22
|
+
source = source.slice(index);
|
|
23
|
+
type = source.startsWith("{{#") ? "comment" : "tag";
|
|
24
|
+
continue;
|
|
18
25
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
if (type === "comment") {
|
|
27
|
+
source = source.slice(3);
|
|
28
|
+
const index = source.indexOf("#}}");
|
|
29
|
+
const comment = index === -1 ? source : source.slice(0, index);
|
|
30
|
+
tokens.push([type, comment, position]);
|
|
31
|
+
if (index === -1) {
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
position += index + 3;
|
|
35
|
+
source = source.slice(index + 3);
|
|
36
|
+
type = "string";
|
|
37
|
+
continue;
|
|
30
38
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
if (type === "tag") {
|
|
40
|
+
const indexes = parseTag(source);
|
|
41
|
+
const lastIndex = indexes.length - 1;
|
|
42
|
+
let tag;
|
|
43
|
+
indexes.reduce((prev, curr, index) => {
|
|
44
|
+
let code = source.slice(prev, curr - 2);
|
|
45
|
+
// Tag
|
|
46
|
+
if (index === 1) {
|
|
47
|
+
// Left trim
|
|
48
|
+
if (code.startsWith("-")) {
|
|
49
|
+
code = code.slice(1);
|
|
50
|
+
const lastToken = tokens[tokens.length - 1];
|
|
51
|
+
lastToken[1] = lastToken[1].trimEnd();
|
|
52
|
+
}
|
|
53
|
+
// Right trim
|
|
54
|
+
if (code.endsWith("-") && index === lastIndex) {
|
|
55
|
+
code = code.slice(0, -1);
|
|
56
|
+
trimNext = true;
|
|
57
|
+
}
|
|
58
|
+
tag = [type, code.trim(), position];
|
|
59
|
+
tokens.push(tag);
|
|
60
|
+
return curr;
|
|
48
61
|
}
|
|
49
62
|
// Right trim
|
|
50
|
-
if (code.endsWith("-")
|
|
63
|
+
if (index === lastIndex && code.endsWith("-")) {
|
|
51
64
|
code = code.slice(0, -1);
|
|
52
65
|
trimNext = true;
|
|
53
66
|
}
|
|
54
|
-
|
|
55
|
-
tokens.push(
|
|
67
|
+
// Filters
|
|
68
|
+
tokens.push(["filter", code.trim()]);
|
|
56
69
|
return curr;
|
|
70
|
+
});
|
|
71
|
+
position += indexes[lastIndex];
|
|
72
|
+
source = source.slice(indexes[lastIndex]);
|
|
73
|
+
type = "string";
|
|
74
|
+
// Search the closing echo tag {{ /echo }}
|
|
75
|
+
if (tag?.[1] === "echo") {
|
|
76
|
+
const end = source.match(/{{\s*\/echo\s*}}/);
|
|
77
|
+
if (!end) {
|
|
78
|
+
throw new Error("Unclosed echo tag");
|
|
79
|
+
}
|
|
80
|
+
const rawCode = source.slice(0, end.index);
|
|
81
|
+
tag[1] = `echo ${JSON.stringify(rawCode)}`;
|
|
82
|
+
const length = Number(end.index) + end[0].length;
|
|
83
|
+
source = source.slice(length);
|
|
84
|
+
position += length;
|
|
57
85
|
}
|
|
58
|
-
|
|
59
|
-
if (index === lastIndex && code.endsWith("-")) {
|
|
60
|
-
code = code.slice(0, -1);
|
|
61
|
-
trimNext = true;
|
|
62
|
-
}
|
|
63
|
-
// Filters
|
|
64
|
-
tokens.push(["filter", code.trim()]);
|
|
65
|
-
return curr;
|
|
66
|
-
});
|
|
67
|
-
source = source.slice(indexes[indexes.length - 1]);
|
|
68
|
-
type = "string";
|
|
69
|
-
// Search the closing echo tag {{ /echo }}
|
|
70
|
-
if (tag?.[1] === "echo") {
|
|
71
|
-
const end = source.match(/{{\s*\/echo\s*}}/);
|
|
72
|
-
if (!end) {
|
|
73
|
-
throw new Error("Unclosed echo tag");
|
|
74
|
-
}
|
|
75
|
-
const rawCode = source.slice(0, end.index);
|
|
76
|
-
tag[1] = `echo ${JSON.stringify(rawCode)}`;
|
|
77
|
-
source = source.slice(Number(end.index) + end[0].length);
|
|
86
|
+
continue;
|
|
78
87
|
}
|
|
79
|
-
continue;
|
|
80
88
|
}
|
|
81
89
|
}
|
|
82
|
-
|
|
90
|
+
catch (error) {
|
|
91
|
+
return { tokens, position, error };
|
|
92
|
+
}
|
|
93
|
+
return { tokens, position, error: undefined };
|
|
83
94
|
}
|
|
84
95
|
/**
|
|
85
96
|
* Parse a tag and return the indexes of the start and end brackets, and the filters between.
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assertPath(path: string): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
3
|
+
// Copyright the Browserify authors. MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.assertPath = void 0;
|
|
6
|
+
function assertPath(path) {
|
|
7
|
+
if (typeof path !== "string") {
|
|
8
|
+
throw new TypeError(`Path must be a string. Received ${JSON.stringify(path)}`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.assertPath = assertPath;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function stripSuffix(name: string, suffix: string): string;
|
|
2
|
+
export declare function lastPathSegment(path: string, isSep: (char: number) => boolean, start?: number): string;
|
|
3
|
+
export declare function assertArgs(path: string, suffix: string): string | undefined;
|
|
@@ -0,0 +1,46 @@
|
|
|
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.assertArgs = exports.lastPathSegment = exports.stripSuffix = void 0;
|
|
6
|
+
const assert_path_js_1 = require("./assert_path.js");
|
|
7
|
+
function stripSuffix(name, suffix) {
|
|
8
|
+
if (suffix.length >= name.length) {
|
|
9
|
+
return name;
|
|
10
|
+
}
|
|
11
|
+
const lenDiff = name.length - suffix.length;
|
|
12
|
+
for (let i = suffix.length - 1; i >= 0; --i) {
|
|
13
|
+
if (name.charCodeAt(lenDiff + i) !== suffix.charCodeAt(i)) {
|
|
14
|
+
return name;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return name.slice(0, -suffix.length);
|
|
18
|
+
}
|
|
19
|
+
exports.stripSuffix = stripSuffix;
|
|
20
|
+
function lastPathSegment(path, isSep, start = 0) {
|
|
21
|
+
let matchedNonSeparator = false;
|
|
22
|
+
let end = path.length;
|
|
23
|
+
for (let i = path.length - 1; i >= start; --i) {
|
|
24
|
+
if (isSep(path.charCodeAt(i))) {
|
|
25
|
+
if (matchedNonSeparator) {
|
|
26
|
+
start = i + 1;
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
else if (!matchedNonSeparator) {
|
|
31
|
+
matchedNonSeparator = true;
|
|
32
|
+
end = i + 1;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return path.slice(start, end);
|
|
36
|
+
}
|
|
37
|
+
exports.lastPathSegment = lastPathSegment;
|
|
38
|
+
function assertArgs(path, suffix) {
|
|
39
|
+
(0, assert_path_js_1.assertPath)(path);
|
|
40
|
+
if (path.length === 0)
|
|
41
|
+
return path;
|
|
42
|
+
if (typeof suffix !== "string") {
|
|
43
|
+
throw new TypeError(`Suffix must be a string. Received ${JSON.stringify(suffix)}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.assertArgs = assertArgs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function _common(paths: string[], sep: string): string;
|
|
@@ -2,21 +2,8 @@
|
|
|
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
|
-
|
|
7
|
-
/** Determines the common path from a set of paths, using an optional separator,
|
|
8
|
-
* which defaults to the OS default separator.
|
|
9
|
-
*
|
|
10
|
-
* ```ts
|
|
11
|
-
* import { common } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
|
|
12
|
-
* const p = common([
|
|
13
|
-
* "./deno/std/path/mod.ts",
|
|
14
|
-
* "./deno/std/fs/mod.ts",
|
|
15
|
-
* ]);
|
|
16
|
-
* console.log(p); // "./deno/std/"
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
function common(paths, sep = separator_js_1.SEP) {
|
|
5
|
+
exports._common = void 0;
|
|
6
|
+
function _common(paths, sep) {
|
|
20
7
|
const [first = "", ...remaining] = paths;
|
|
21
8
|
if (first === "" || remaining.length === 0) {
|
|
22
9
|
return first.substring(0, first.lastIndexOf(sep) + 1);
|
|
@@ -37,4 +24,4 @@ function common(paths, sep = separator_js_1.SEP) {
|
|
|
37
24
|
const prefix = parts.slice(0, endOfPrefix).join(sep);
|
|
38
25
|
return prefix.endsWith(sep) ? prefix : `${prefix}${sep}`;
|
|
39
26
|
}
|
|
40
|
-
exports.
|
|
27
|
+
exports._common = _common;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assertArg(path: string): "." | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
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.assertArg = void 0;
|
|
6
|
+
const assert_path_js_1 = require("./assert_path.js");
|
|
7
|
+
function assertArg(path) {
|
|
8
|
+
(0, assert_path_js_1.assertPath)(path);
|
|
9
|
+
if (path.length === 0)
|
|
10
|
+
return ".";
|
|
11
|
+
}
|
|
12
|
+
exports.assertArg = assertArg;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
3
|
// This module is browser compatible.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.assertArg = exports._format = void 0;
|
|
3
6
|
function _format(sep, pathObject) {
|
|
4
7
|
const dir = pathObject.dir || pathObject.root;
|
|
5
8
|
const base = pathObject.base ||
|
|
@@ -12,24 +15,10 @@ function _format(sep, pathObject) {
|
|
|
12
15
|
return dir + base;
|
|
13
16
|
return dir + sep + base;
|
|
14
17
|
}
|
|
18
|
+
exports._format = _format;
|
|
15
19
|
function assertArg(pathObject) {
|
|
16
20
|
if (pathObject === null || typeof pathObject !== "object") {
|
|
17
21
|
throw new TypeError(`The "pathObject" argument must be of type Object. Received type ${typeof pathObject}`);
|
|
18
22
|
}
|
|
19
23
|
}
|
|
20
|
-
|
|
21
|
-
* Generate a path from `FormatInputPathObject` object.
|
|
22
|
-
* @param pathObject with path
|
|
23
|
-
*/
|
|
24
|
-
export function posixFormat(pathObject) {
|
|
25
|
-
assertArg(pathObject);
|
|
26
|
-
return _format("/", pathObject);
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Generate a path from `FormatInputPathObject` object.
|
|
30
|
-
* @param pathObject with path
|
|
31
|
-
*/
|
|
32
|
-
export function windowsFormat(pathObject) {
|
|
33
|
-
assertArg(pathObject);
|
|
34
|
-
return _format("\\", pathObject);
|
|
35
|
-
}
|
|
24
|
+
exports.assertArg = assertArg;
|
|
@@ -0,0 +1,13 @@
|
|
|
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.assertArg = void 0;
|
|
6
|
+
function assertArg(url) {
|
|
7
|
+
url = url instanceof URL ? url : new URL(url);
|
|
8
|
+
if (url.protocol !== "file:") {
|
|
9
|
+
throw new TypeError("Must be a file URL.");
|
|
10
|
+
}
|
|
11
|
+
return url;
|
|
12
|
+
}
|
|
13
|
+
exports.assertArg = assertArg;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface GlobOptions {
|
|
2
|
+
/** Extended glob syntax.
|
|
3
|
+
* See https://www.linuxjournal.com/content/bash-extended-globbing.
|
|
4
|
+
*
|
|
5
|
+
* @default {true}
|
|
6
|
+
*/
|
|
7
|
+
extended?: boolean;
|
|
8
|
+
/** Globstar syntax.
|
|
9
|
+
* See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
|
|
10
|
+
* If false, `**` is treated like `*`.
|
|
11
|
+
*
|
|
12
|
+
* @default {true}
|
|
13
|
+
*/
|
|
14
|
+
globstar?: boolean;
|
|
15
|
+
/** Whether globstar should be case-insensitive. */
|
|
16
|
+
caseInsensitive?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export type GlobToRegExpOptions = GlobOptions;
|
|
19
|
+
export interface GlobConstants {
|
|
20
|
+
sep: string;
|
|
21
|
+
sepMaybe: string;
|
|
22
|
+
seps: string[];
|
|
23
|
+
globstar: string;
|
|
24
|
+
wildcard: string;
|
|
25
|
+
escapePrefix: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function _globToRegExp(c: GlobConstants, glob: string, { extended, globstar: globstarOption, caseInsensitive, }?: GlobToRegExpOptions): RegExp;
|
|
@@ -1,37 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
3
3
|
// This module is browser compatible.
|
|
4
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
-
if (k2 === undefined) k2 = k;
|
|
6
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
-
}
|
|
10
|
-
Object.defineProperty(o, k2, desc);
|
|
11
|
-
}) : (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
o[k2] = m[k];
|
|
14
|
-
}));
|
|
15
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
-
}) : function(o, v) {
|
|
18
|
-
o["default"] = v;
|
|
19
|
-
});
|
|
20
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
-
if (mod && mod.__esModule) return mod;
|
|
22
|
-
var result = {};
|
|
23
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
-
__setModuleDefault(result, mod);
|
|
25
|
-
return result;
|
|
26
|
-
};
|
|
27
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.
|
|
29
|
-
const _os_js_1 = require("./_os.js");
|
|
30
|
-
const separator_js_1 = require("./separator.js");
|
|
31
|
-
const _win32 = __importStar(require("./win32.js"));
|
|
32
|
-
const _posix = __importStar(require("./posix.js"));
|
|
33
|
-
const path = _os_js_1.isWindows ? _win32 : _posix;
|
|
34
|
-
const { join, normalize } = path;
|
|
5
|
+
exports._globToRegExp = void 0;
|
|
35
6
|
const regExpEscapeChars = [
|
|
36
7
|
"!",
|
|
37
8
|
"$",
|
|
@@ -49,76 +20,15 @@ const regExpEscapeChars = [
|
|
|
49
20
|
"|",
|
|
50
21
|
];
|
|
51
22
|
const rangeEscapeChars = ["-", "\\", "]"];
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
*
|
|
56
|
-
* Basic glob syntax:
|
|
57
|
-
* - `*` - Matches everything without leaving the path segment.
|
|
58
|
-
* - `?` - Matches any single character.
|
|
59
|
-
* - `{foo,bar}` - Matches `foo` or `bar`.
|
|
60
|
-
* - `[abcd]` - Matches `a`, `b`, `c` or `d`.
|
|
61
|
-
* - `[a-d]` - Matches `a`, `b`, `c` or `d`.
|
|
62
|
-
* - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`.
|
|
63
|
-
* - `[[:<class>:]]` - Matches any character belonging to `<class>`.
|
|
64
|
-
* - `[[:alnum:]]` - Matches any digit or letter.
|
|
65
|
-
* - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`.
|
|
66
|
-
* - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes
|
|
67
|
-
* for a complete list of supported character classes.
|
|
68
|
-
* - `\` - Escapes the next character for an `os` other than `"windows"`.
|
|
69
|
-
* - \` - Escapes the next character for `os` set to `"windows"`.
|
|
70
|
-
* - `/` - Path separator.
|
|
71
|
-
* - `\` - Additional path separator only for `os` set to `"windows"`.
|
|
72
|
-
*
|
|
73
|
-
* Extended syntax:
|
|
74
|
-
* - Requires `{ extended: true }`.
|
|
75
|
-
* - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`.
|
|
76
|
-
* - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same.
|
|
77
|
-
* - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`.
|
|
78
|
-
* - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`.
|
|
79
|
-
* - `!(foo|bar)` - Matches anything other than `{foo,bar}`.
|
|
80
|
-
* - See https://www.linuxjournal.com/content/bash-extended-globbing.
|
|
81
|
-
*
|
|
82
|
-
* Globstar syntax:
|
|
83
|
-
* - Requires `{ globstar: true }`.
|
|
84
|
-
* - `**` - Matches any number of any path segments.
|
|
85
|
-
* - Must comprise its entire path segment in the provided glob.
|
|
86
|
-
* - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
|
|
87
|
-
*
|
|
88
|
-
* Note the following properties:
|
|
89
|
-
* - The generated `RegExp` is anchored at both start and end.
|
|
90
|
-
* - Repeating and trailing separators are tolerated. Trailing separators in the
|
|
91
|
-
* provided glob have no meaning and are discarded.
|
|
92
|
-
* - Absolute globs will only match absolute paths, etc.
|
|
93
|
-
* - Empty globs will match nothing.
|
|
94
|
-
* - Any special glob syntax must be contained to one path segment. For example,
|
|
95
|
-
* `?(foo|bar/baz)` is invalid. The separator will take precedence and the
|
|
96
|
-
* first segment ends with an unclosed group.
|
|
97
|
-
* - If a path segment ends with unclosed groups or a dangling escape prefix, a
|
|
98
|
-
* parse error has occurred. Every character for that segment is taken
|
|
99
|
-
* literally in this event.
|
|
100
|
-
*
|
|
101
|
-
* Limitations:
|
|
102
|
-
* - A negative group like `!(foo|bar)` will wrongly be converted to a negative
|
|
103
|
-
* look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly
|
|
104
|
-
* fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively,
|
|
105
|
-
* `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if
|
|
106
|
-
* the group occurs not nested at the end of the segment. */
|
|
107
|
-
function globToRegExp(glob, { extended = true, globstar: globstarOption = true, os = _os_js_1.osType, caseInsensitive = false, } = {}) {
|
|
23
|
+
function _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true,
|
|
24
|
+
// os = osType,
|
|
25
|
+
caseInsensitive = false, } = {}) {
|
|
108
26
|
if (glob === "") {
|
|
109
27
|
return /(?!)/;
|
|
110
28
|
}
|
|
111
|
-
const sep = os === "windows" ? "(?:\\\\|/)+" : "/+";
|
|
112
|
-
const sepMaybe = os === "windows" ? "(?:\\\\|/)*" : "/*";
|
|
113
|
-
const seps = os === "windows" ? ["\\", "/"] : ["/"];
|
|
114
|
-
const globstar = os === "windows"
|
|
115
|
-
? "(?:[^\\\\/]*(?:\\\\|/|$)+)*"
|
|
116
|
-
: "(?:[^/]*(?:/|$)+)*";
|
|
117
|
-
const wildcard = os === "windows" ? "[^\\\\/]*" : "[^/]*";
|
|
118
|
-
const escapePrefix = os === "windows" ? "`" : "\\";
|
|
119
29
|
// Remove trailing separators.
|
|
120
30
|
let newLength = glob.length;
|
|
121
|
-
for (; newLength > 1 && seps.includes(glob[newLength - 1]); newLength--)
|
|
31
|
+
for (; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--)
|
|
122
32
|
;
|
|
123
33
|
glob = glob.slice(0, newLength);
|
|
124
34
|
let regExpString = "";
|
|
@@ -131,14 +41,14 @@ function globToRegExp(glob, { extended = true, globstar: globstarOption = true,
|
|
|
131
41
|
let endsWithSep = false;
|
|
132
42
|
let i = j;
|
|
133
43
|
// Terminates with `i` at the non-inclusive end of the current segment.
|
|
134
|
-
for (; i < glob.length && !seps.includes(glob[i]); i++) {
|
|
44
|
+
for (; i < glob.length && !c.seps.includes(glob[i]); i++) {
|
|
135
45
|
if (inEscape) {
|
|
136
46
|
inEscape = false;
|
|
137
47
|
const escapeChars = inRange ? rangeEscapeChars : regExpEscapeChars;
|
|
138
48
|
segment += escapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i];
|
|
139
49
|
continue;
|
|
140
50
|
}
|
|
141
|
-
if (glob[i] === escapePrefix) {
|
|
51
|
+
if (glob[i] === c.escapePrefix) {
|
|
142
52
|
inEscape = true;
|
|
143
53
|
continue;
|
|
144
54
|
}
|
|
@@ -217,7 +127,7 @@ function globToRegExp(glob, { extended = true, globstar: globstarOption = true,
|
|
|
217
127
|
segment += ")";
|
|
218
128
|
const type = groupStack.pop();
|
|
219
129
|
if (type === "!") {
|
|
220
|
-
segment += wildcard;
|
|
130
|
+
segment += c.wildcard;
|
|
221
131
|
}
|
|
222
132
|
else if (type !== "@") {
|
|
223
133
|
segment += type;
|
|
@@ -287,13 +197,13 @@ function globToRegExp(glob, { extended = true, globstar: globstarOption = true,
|
|
|
287
197
|
}
|
|
288
198
|
const nextChar = glob[i + 1];
|
|
289
199
|
if (globstarOption && numStars === 2 &&
|
|
290
|
-
[...seps, undefined].includes(prevChar) &&
|
|
291
|
-
[...seps, undefined].includes(nextChar)) {
|
|
292
|
-
segment += globstar;
|
|
200
|
+
[...c.seps, undefined].includes(prevChar) &&
|
|
201
|
+
[...c.seps, undefined].includes(nextChar)) {
|
|
202
|
+
segment += c.globstar;
|
|
293
203
|
endsWithSep = true;
|
|
294
204
|
}
|
|
295
205
|
else {
|
|
296
|
-
segment += wildcard;
|
|
206
|
+
segment += c.wildcard;
|
|
297
207
|
}
|
|
298
208
|
}
|
|
299
209
|
continue;
|
|
@@ -311,11 +221,11 @@ function globToRegExp(glob, { extended = true, globstar: globstarOption = true,
|
|
|
311
221
|
}
|
|
312
222
|
regExpString += segment;
|
|
313
223
|
if (!endsWithSep) {
|
|
314
|
-
regExpString += i < glob.length ? sep : sepMaybe;
|
|
224
|
+
regExpString += i < glob.length ? c.sep : c.sepMaybe;
|
|
315
225
|
endsWithSep = true;
|
|
316
226
|
}
|
|
317
227
|
// Terminates with `i` at the start of the next segment.
|
|
318
|
-
while (seps.includes(glob[i]))
|
|
228
|
+
while (c.seps.includes(glob[i]))
|
|
319
229
|
i++;
|
|
320
230
|
// Check that the next value of `j` is indeed higher than the current value.
|
|
321
231
|
if (!(i > j)) {
|
|
@@ -326,66 +236,4 @@ function globToRegExp(glob, { extended = true, globstar: globstarOption = true,
|
|
|
326
236
|
regExpString = `^${regExpString}$`;
|
|
327
237
|
return new RegExp(regExpString, caseInsensitive ? "i" : "");
|
|
328
238
|
}
|
|
329
|
-
exports.
|
|
330
|
-
/** Test whether the given string is a glob */
|
|
331
|
-
function isGlob(str) {
|
|
332
|
-
const chars = { "{": "}", "(": ")", "[": "]" };
|
|
333
|
-
const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
|
|
334
|
-
if (str === "") {
|
|
335
|
-
return false;
|
|
336
|
-
}
|
|
337
|
-
let match;
|
|
338
|
-
while ((match = regex.exec(str))) {
|
|
339
|
-
if (match[2])
|
|
340
|
-
return true;
|
|
341
|
-
let idx = match.index + match[0].length;
|
|
342
|
-
// if an open bracket/brace/paren is escaped,
|
|
343
|
-
// set the index to the next closing character
|
|
344
|
-
const open = match[1];
|
|
345
|
-
const close = open ? chars[open] : null;
|
|
346
|
-
if (open && close) {
|
|
347
|
-
const n = str.indexOf(close, idx);
|
|
348
|
-
if (n !== -1) {
|
|
349
|
-
idx = n + 1;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
str = str.slice(idx);
|
|
353
|
-
}
|
|
354
|
-
return false;
|
|
355
|
-
}
|
|
356
|
-
exports.isGlob = isGlob;
|
|
357
|
-
/** Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
358
|
-
function normalizeGlob(glob, { globstar = false } = {}) {
|
|
359
|
-
if (glob.match(/\0/g)) {
|
|
360
|
-
throw new Error(`Glob contains invalid characters: "${glob}"`);
|
|
361
|
-
}
|
|
362
|
-
if (!globstar) {
|
|
363
|
-
return normalize(glob);
|
|
364
|
-
}
|
|
365
|
-
const s = separator_js_1.SEP_PATTERN.source;
|
|
366
|
-
const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g");
|
|
367
|
-
return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, "..");
|
|
368
|
-
}
|
|
369
|
-
exports.normalizeGlob = normalizeGlob;
|
|
370
|
-
/** Like join(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
371
|
-
function joinGlobs(globs, { extended = true, globstar = false } = {}) {
|
|
372
|
-
if (!globstar || globs.length === 0) {
|
|
373
|
-
return join(...globs);
|
|
374
|
-
}
|
|
375
|
-
if (globs.length === 0)
|
|
376
|
-
return ".";
|
|
377
|
-
let joined;
|
|
378
|
-
for (const glob of globs) {
|
|
379
|
-
const path = glob;
|
|
380
|
-
if (path.length > 0) {
|
|
381
|
-
if (!joined)
|
|
382
|
-
joined = path;
|
|
383
|
-
else
|
|
384
|
-
joined += `${separator_js_1.SEP}${path}`;
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
if (!joined)
|
|
388
|
-
return ".";
|
|
389
|
-
return normalizeGlob(joined, { extended, globstar });
|
|
390
|
-
}
|
|
391
|
-
exports.joinGlobs = joinGlobs;
|
|
239
|
+
exports._globToRegExp = _globToRegExp;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assertArg(path: string): "." | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
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.assertArg = void 0;
|
|
6
|
+
const assert_path_js_1 = require("./assert_path.js");
|
|
7
|
+
function assertArg(path) {
|
|
8
|
+
(0, assert_path_js_1.assertPath)(path);
|
|
9
|
+
if (path.length === 0)
|
|
10
|
+
return ".";
|
|
11
|
+
}
|
|
12
|
+
exports.assertArg = assertArg;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizeString(path: string, allowAboveRoot: boolean, separator: string, isPathSeparator: (code: number) => boolean): string;
|