ventojs 0.9.1 → 0.10.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.210.0/assert/assert.d.ts +12 -0
- package/esm/deps/deno.land/std@0.210.0/assert/assert.js +18 -0
- package/esm/deps/deno.land/std@0.210.0/assert/assertion_error.d.ts +14 -0
- package/esm/deps/deno.land/std@0.210.0/assert/assertion_error.js +18 -0
- package/{script/deps/deno.land/std@0.205.0 → esm/deps/deno.land/std@0.210.0}/path/_common/glob_to_reg_exp.d.ts +1 -0
- package/esm/deps/deno.land/std@0.210.0/path/common.d.ts +13 -0
- package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/extname.js +1 -1
- package/esm/deps/deno.land/{std@0.205.0/path/glob.d.ts → std@0.210.0/path/glob_to_regexp.d.ts} +1 -7
- package/esm/deps/deno.land/std@0.210.0/path/glob_to_regexp.js +65 -0
- package/esm/deps/deno.land/std@0.210.0/path/join_globs.d.ts +3 -0
- package/esm/deps/deno.land/std@0.210.0/path/join_globs.js +11 -0
- package/{script/deps/deno.land/std@0.205.0 → esm/deps/deno.land/std@0.210.0}/path/mod.d.ts +8 -5
- package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/mod.js +9 -4
- package/esm/deps/deno.land/std@0.210.0/path/normalize_glob.d.ts +3 -0
- package/esm/deps/deno.land/std@0.210.0/path/normalize_glob.js +11 -0
- package/esm/deps/deno.land/{std@0.205.0/path/posix/glob.d.ts → std@0.210.0/path/posix/glob_to_regexp.d.ts} +1 -6
- package/esm/deps/deno.land/std@0.210.0/path/posix/glob_to_regexp.js +69 -0
- package/esm/deps/deno.land/std@0.210.0/path/posix/is_glob.d.ts +1 -0
- package/esm/deps/deno.land/std@0.210.0/path/posix/is_glob.js +3 -0
- package/esm/deps/deno.land/std@0.210.0/path/posix/join_globs.d.ts +3 -0
- package/esm/deps/deno.land/std@0.210.0/path/posix/join_globs.js +26 -0
- package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/mod.d.ts +4 -1
- package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/mod.js +4 -1
- package/esm/deps/deno.land/std@0.210.0/path/posix/normalize_glob.d.ts +3 -0
- package/esm/deps/deno.land/std@0.210.0/path/posix/normalize_glob.js +16 -0
- package/{script/deps/deno.land/std@0.205.0 → esm/deps/deno.land/std@0.210.0}/path/posix/to_file_url.d.ts +1 -1
- package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/separator.d.ts +1 -1
- package/{script/deps/deno.land/std@0.205.0/path/posix/glob.d.ts → esm/deps/deno.land/std@0.210.0/path/windows/glob_to_regexp.d.ts} +1 -6
- package/esm/deps/deno.land/std@0.210.0/path/windows/glob_to_regexp.js +69 -0
- package/esm/deps/deno.land/std@0.210.0/path/windows/is_glob.d.ts +1 -0
- package/esm/deps/deno.land/std@0.210.0/path/windows/is_glob.js +3 -0
- package/esm/deps/deno.land/std@0.210.0/path/windows/join_globs.d.ts +3 -0
- package/esm/deps/deno.land/std@0.210.0/path/windows/join_globs.js +26 -0
- package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/mod.d.ts +4 -1
- package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/mod.js +4 -1
- package/esm/deps/deno.land/std@0.210.0/path/windows/normalize_glob.d.ts +3 -0
- package/esm/deps/deno.land/std@0.210.0/path/windows/normalize_glob.js +16 -0
- package/esm/deps.d.ts +2 -2
- package/esm/deps.js +2 -2
- package/esm/mod.js +2 -2
- package/esm/plugins/for.js +27 -1
- package/esm/plugins/js.js +1 -1
- package/esm/src/environment.d.ts +5 -1
- package/esm/src/environment.js +5 -1
- package/esm/src/tokenizer.js +59 -11
- package/package.json +1 -1
- package/script/deps/deno.land/std@0.210.0/assert/assert.d.ts +12 -0
- package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/assert/assert.js +11 -1
- package/script/deps/deno.land/std@0.210.0/assert/assertion_error.d.ts +14 -0
- package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/assert/assertion_error.js +13 -2
- package/{esm/deps/deno.land/std@0.205.0 → script/deps/deno.land/std@0.210.0}/path/_common/glob_to_reg_exp.d.ts +1 -0
- package/script/deps/deno.land/std@0.210.0/path/common.d.ts +13 -0
- package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/extname.js +1 -1
- package/script/deps/deno.land/{std@0.205.0/path/glob.d.ts → std@0.210.0/path/glob_to_regexp.d.ts} +1 -7
- package/script/deps/deno.land/std@0.210.0/path/glob_to_regexp.js +69 -0
- package/script/deps/deno.land/std@0.210.0/path/join_globs.d.ts +3 -0
- package/script/deps/deno.land/std@0.210.0/path/join_globs.js +15 -0
- package/{esm/deps/deno.land/std@0.205.0 → script/deps/deno.land/std@0.210.0}/path/mod.d.ts +8 -5
- package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/mod.js +9 -4
- package/script/deps/deno.land/std@0.210.0/path/normalize_glob.d.ts +3 -0
- package/script/deps/deno.land/std@0.210.0/path/normalize_glob.js +15 -0
- package/script/deps/deno.land/{std@0.205.0/path/windows/glob.d.ts → std@0.210.0/path/posix/glob_to_regexp.d.ts} +1 -6
- package/script/deps/deno.land/std@0.210.0/path/posix/glob_to_regexp.js +73 -0
- package/script/deps/deno.land/std@0.210.0/path/posix/is_glob.d.ts +1 -0
- package/script/deps/deno.land/std@0.210.0/path/posix/is_glob.js +7 -0
- package/script/deps/deno.land/std@0.210.0/path/posix/join_globs.d.ts +3 -0
- package/script/deps/deno.land/std@0.210.0/path/posix/join_globs.js +30 -0
- package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/mod.d.ts +4 -1
- package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/mod.js +4 -1
- package/script/deps/deno.land/std@0.210.0/path/posix/normalize_glob.d.ts +3 -0
- package/script/deps/deno.land/std@0.210.0/path/posix/normalize_glob.js +20 -0
- package/{esm/deps/deno.land/std@0.205.0 → script/deps/deno.land/std@0.210.0}/path/posix/to_file_url.d.ts +1 -1
- package/script/deps/deno.land/std@0.210.0/path/separator.d.ts +2 -0
- package/{esm/deps/deno.land/std@0.205.0/path/windows/glob.d.ts → script/deps/deno.land/std@0.210.0/path/windows/glob_to_regexp.d.ts} +1 -6
- package/script/deps/deno.land/std@0.210.0/path/windows/glob_to_regexp.js +73 -0
- package/script/deps/deno.land/std@0.210.0/path/windows/is_glob.d.ts +1 -0
- package/script/deps/deno.land/std@0.210.0/path/windows/is_glob.js +7 -0
- package/script/deps/deno.land/std@0.210.0/path/windows/join_globs.d.ts +3 -0
- package/script/deps/deno.land/std@0.210.0/path/windows/join_globs.js +30 -0
- package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/mod.d.ts +4 -1
- package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/mod.js +4 -1
- package/script/deps/deno.land/std@0.210.0/path/windows/normalize_glob.d.ts +3 -0
- package/script/deps/deno.land/std@0.210.0/path/windows/normalize_glob.js +20 -0
- package/script/deps.d.ts +2 -2
- package/script/deps.js +2 -2
- package/script/mod.js +2 -2
- package/script/plugins/for.js +27 -1
- package/script/plugins/js.js +1 -1
- package/script/src/environment.d.ts +5 -1
- package/script/src/environment.js +5 -1
- package/script/src/tokenizer.js +59 -11
- package/esm/deps/deno.land/std@0.205.0/assert/assert.d.ts +0 -2
- package/esm/deps/deno.land/std@0.205.0/assert/assert.js +0 -8
- package/esm/deps/deno.land/std@0.205.0/assert/assertion_error.d.ts +0 -4
- package/esm/deps/deno.land/std@0.205.0/assert/assertion_error.js +0 -7
- package/esm/deps/deno.land/std@0.205.0/path/glob.js +0 -78
- package/esm/deps/deno.land/std@0.205.0/path/posix/glob.js +0 -106
- package/esm/deps/deno.land/std@0.205.0/path/windows/glob.js +0 -106
- package/script/deps/deno.land/std@0.205.0/assert/assert.d.ts +0 -2
- package/script/deps/deno.land/std@0.205.0/assert/assertion_error.d.ts +0 -4
- package/script/deps/deno.land/std@0.205.0/path/glob.js +0 -85
- package/script/deps/deno.land/std@0.205.0/path/posix/common.d.ts +0 -13
- package/script/deps/deno.land/std@0.205.0/path/posix/glob.js +0 -113
- package/script/deps/deno.land/std@0.205.0/path/separator.d.ts +0 -2
- package/script/deps/deno.land/std@0.205.0/path/windows/common.d.ts +0 -13
- package/script/deps/deno.land/std@0.205.0/path/windows/glob.js +0 -113
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/html/entities.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/html/entities.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/html/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/html/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/assert_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/assert_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/normalize_string.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_interface.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_interface.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_os.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_os.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0/path/_common → std@0.210.0/path}/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0/path/_common → std@0.210.0/path}/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0/path → std@0.210.0/path/posix}/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0/path/posix → std@0.210.0/path/windows}/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/html/entities.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/html/entities.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/html/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/html/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/assert_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/assert_path.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/common.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/format.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/normalize_string.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/normalize_string.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_common/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_interface.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_interface.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_os.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/_os.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/common.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/format.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0/path/_common → std@0.210.0/path}/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0/path/_common → std@0.210.0/path}/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/join.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/basename.js +0 -0
- /package/{esm/deps/deno.land/std@0.205.0/path/windows → script/deps/deno.land/std@0.210.0/path/posix}/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/common.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/format.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/join.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/posix/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0/path → std@0.210.0/path/windows}/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/common.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/format.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/join.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.210.0}/path/windows/to_namespaced_path.js +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Make an assertion, error will be thrown if `expr` does not have truthy value.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { assert } from "https://deno.land/std@$STD_VERSION/assert/assert.ts";
|
|
7
|
+
*
|
|
8
|
+
* assert("hello".includes("ello")); // Doesn't throw
|
|
9
|
+
* assert("hello".includes("world")); // Throws
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export declare function assert(expr: unknown, msg?: string): asserts expr;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
import { AssertionError } from "./assertion_error.js";
|
|
3
|
+
/**
|
|
4
|
+
* Make an assertion, error will be thrown if `expr` does not have truthy value.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { assert } from "https://deno.land/std@$STD_VERSION/assert/assert.ts";
|
|
9
|
+
*
|
|
10
|
+
* assert("hello".includes("ello")); // Doesn't throw
|
|
11
|
+
* assert("hello".includes("world")); // Throws
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export function assert(expr, msg = "") {
|
|
15
|
+
if (!expr) {
|
|
16
|
+
throw new AssertionError(msg);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error thrown when an assertion fails.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { AssertionError } from "https://deno.land/std@$STD_VERSION/assert/assertion_error.ts";
|
|
7
|
+
*
|
|
8
|
+
* throw new AssertionError("Assertion failed");
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export declare class AssertionError extends Error {
|
|
12
|
+
/** Constructs a new instance. */
|
|
13
|
+
constructor(message: string);
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
/**
|
|
3
|
+
* Error thrown when an assertion fails.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { AssertionError } from "https://deno.land/std@$STD_VERSION/assert/assertion_error.ts";
|
|
8
|
+
*
|
|
9
|
+
* throw new AssertionError("Assertion failed");
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export class AssertionError extends Error {
|
|
13
|
+
/** Constructs a new instance. */
|
|
14
|
+
constructor(message) {
|
|
15
|
+
super(message);
|
|
16
|
+
this.name = "AssertionError";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Determines the common path from a set of paths, using an optional separator,
|
|
2
|
+
* which defaults to the OS default separator.
|
|
3
|
+
*
|
|
4
|
+
* ```ts
|
|
5
|
+
* import { common } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
|
|
6
|
+
* const p = common([
|
|
7
|
+
* "./deno/std/path/mod.ts",
|
|
8
|
+
* "./deno/std/fs/mod.ts",
|
|
9
|
+
* ]);
|
|
10
|
+
* console.log(p); // "./deno/std/"
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare function common(paths: string[], sep?: "/" | "\\"): string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// This module is browser compatible.
|
|
3
3
|
import { isWindows } from "./_os.js";
|
|
4
4
|
import { extname as posixExtname } from "./posix/extname.js";
|
|
5
|
-
import { extname as windowsExtname } from "./
|
|
5
|
+
import { extname as windowsExtname } from "./windows/extname.js";
|
|
6
6
|
/**
|
|
7
7
|
* Return the extension of the `path` with leading period.
|
|
8
8
|
* @param path with extension
|
package/esm/deps/deno.land/{std@0.205.0/path/glob.d.ts → std@0.210.0/path/glob_to_regexp.d.ts}
RENAMED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { OSType } from "./_os.js";
|
|
2
1
|
import type { GlobOptions } from "./_common/glob_to_reg_exp.js";
|
|
3
|
-
|
|
4
|
-
export type { GlobOptions };
|
|
2
|
+
import { OSType } from "./_os.js";
|
|
5
3
|
export type GlobToRegExpOptions = GlobOptions & {
|
|
6
4
|
os?: OSType;
|
|
7
5
|
};
|
|
@@ -61,7 +59,3 @@ export type GlobToRegExpOptions = GlobOptions & {
|
|
|
61
59
|
* `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if
|
|
62
60
|
* the group occurs not nested at the end of the segment. */
|
|
63
61
|
export declare function globToRegExp(glob: string, options?: GlobToRegExpOptions): RegExp;
|
|
64
|
-
/** Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
65
|
-
export declare function normalizeGlob(glob: string, options?: GlobOptions): string;
|
|
66
|
-
/** Like join(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
67
|
-
export declare function joinGlobs(globs: string[], options?: GlobOptions): string;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { isWindows } from "./_os.js";
|
|
4
|
+
import { globToRegExp as posixGlobToRegExp } from "./posix/glob_to_regexp.js";
|
|
5
|
+
import { globToRegExp as windowsGlobToRegExp, } from "./windows/glob_to_regexp.js";
|
|
6
|
+
/** Convert a glob string to a regular expression.
|
|
7
|
+
*
|
|
8
|
+
* Tries to match bash glob expansion as closely as possible.
|
|
9
|
+
*
|
|
10
|
+
* Basic glob syntax:
|
|
11
|
+
* - `*` - Matches everything without leaving the path segment.
|
|
12
|
+
* - `?` - Matches any single character.
|
|
13
|
+
* - `{foo,bar}` - Matches `foo` or `bar`.
|
|
14
|
+
* - `[abcd]` - Matches `a`, `b`, `c` or `d`.
|
|
15
|
+
* - `[a-d]` - Matches `a`, `b`, `c` or `d`.
|
|
16
|
+
* - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`.
|
|
17
|
+
* - `[[:<class>:]]` - Matches any character belonging to `<class>`.
|
|
18
|
+
* - `[[:alnum:]]` - Matches any digit or letter.
|
|
19
|
+
* - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`.
|
|
20
|
+
* - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes
|
|
21
|
+
* for a complete list of supported character classes.
|
|
22
|
+
* - `\` - Escapes the next character for an `os` other than `"windows"`.
|
|
23
|
+
* - \` - Escapes the next character for `os` set to `"windows"`.
|
|
24
|
+
* - `/` - Path separator.
|
|
25
|
+
* - `\` - Additional path separator only for `os` set to `"windows"`.
|
|
26
|
+
*
|
|
27
|
+
* Extended syntax:
|
|
28
|
+
* - Requires `{ extended: true }`.
|
|
29
|
+
* - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`.
|
|
30
|
+
* - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same.
|
|
31
|
+
* - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`.
|
|
32
|
+
* - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`.
|
|
33
|
+
* - `!(foo|bar)` - Matches anything other than `{foo,bar}`.
|
|
34
|
+
* - See https://www.linuxjournal.com/content/bash-extended-globbing.
|
|
35
|
+
*
|
|
36
|
+
* Globstar syntax:
|
|
37
|
+
* - Requires `{ globstar: true }`.
|
|
38
|
+
* - `**` - Matches any number of any path segments.
|
|
39
|
+
* - Must comprise its entire path segment in the provided glob.
|
|
40
|
+
* - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
|
|
41
|
+
*
|
|
42
|
+
* Note the following properties:
|
|
43
|
+
* - The generated `RegExp` is anchored at both start and end.
|
|
44
|
+
* - Repeating and trailing separators are tolerated. Trailing separators in the
|
|
45
|
+
* provided glob have no meaning and are discarded.
|
|
46
|
+
* - Absolute globs will only match absolute paths, etc.
|
|
47
|
+
* - Empty globs will match nothing.
|
|
48
|
+
* - Any special glob syntax must be contained to one path segment. For example,
|
|
49
|
+
* `?(foo|bar/baz)` is invalid. The separator will take precedence and the
|
|
50
|
+
* first segment ends with an unclosed group.
|
|
51
|
+
* - If a path segment ends with unclosed groups or a dangling escape prefix, a
|
|
52
|
+
* parse error has occurred. Every character for that segment is taken
|
|
53
|
+
* literally in this event.
|
|
54
|
+
*
|
|
55
|
+
* Limitations:
|
|
56
|
+
* - A negative group like `!(foo|bar)` will wrongly be converted to a negative
|
|
57
|
+
* look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly
|
|
58
|
+
* fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively,
|
|
59
|
+
* `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if
|
|
60
|
+
* the group occurs not nested at the end of the segment. */
|
|
61
|
+
export function globToRegExp(glob, options = {}) {
|
|
62
|
+
return options.os === "windows" || (!options.os && isWindows)
|
|
63
|
+
? windowsGlobToRegExp(glob, options)
|
|
64
|
+
: posixGlobToRegExp(glob, options);
|
|
65
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { isWindows } from "./_os.js";
|
|
4
|
+
import { joinGlobs as posixJoinGlobs } from "./posix/join_globs.js";
|
|
5
|
+
import { joinGlobs as windowsJoinGlobs } from "./windows/join_globs.js";
|
|
6
|
+
/** Like join(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
7
|
+
export function joinGlobs(globs, options = {}) {
|
|
8
|
+
return isWindows
|
|
9
|
+
? windowsJoinGlobs(globs, options)
|
|
10
|
+
: posixJoinGlobs(globs, options);
|
|
11
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as _windows from "./windows/mod.js";
|
|
2
2
|
import * as _posix from "./posix/mod.js";
|
|
3
|
-
/** @deprecated (will be removed after 1.0.0) Import from
|
|
3
|
+
/** @deprecated (will be removed after 1.0.0) Import from {@link https://deno.land/std/path/windows/mod.ts} instead. */
|
|
4
4
|
export declare const win32: typeof _windows;
|
|
5
|
-
/** @deprecated (will be removed after 1.0.0) Import from
|
|
5
|
+
/** @deprecated (will be removed after 1.0.0) Import from {@link https://deno.land/std/posix/mod.ts} instead. */
|
|
6
6
|
export declare const posix: typeof _posix;
|
|
7
|
-
export declare const sep:
|
|
8
|
-
export declare const delimiter:
|
|
7
|
+
export declare const sep: "/" | "\\";
|
|
8
|
+
export declare const delimiter: ":" | ";";
|
|
9
9
|
export * from "./basename.js";
|
|
10
10
|
export * from "./dirname.js";
|
|
11
11
|
export * from "./extname.js";
|
|
@@ -22,4 +22,7 @@ export * from "./to_namespaced_path.js";
|
|
|
22
22
|
export * from "./common.js";
|
|
23
23
|
export * from "./separator.js";
|
|
24
24
|
export * from "./_interface.js";
|
|
25
|
-
export * from "./
|
|
25
|
+
export * from "./glob_to_regexp.js";
|
|
26
|
+
export * from "./is_glob.js";
|
|
27
|
+
export * from "./join_globs.js";
|
|
28
|
+
export * from "./normalize_glob.js";
|
|
@@ -35,12 +35,14 @@
|
|
|
35
35
|
import { isWindows } from "./_os.js";
|
|
36
36
|
import * as _windows from "./windows/mod.js";
|
|
37
37
|
import * as _posix from "./posix/mod.js";
|
|
38
|
-
/** @deprecated (will be removed after 1.0.0) Import from
|
|
38
|
+
/** @deprecated (will be removed after 1.0.0) Import from {@link https://deno.land/std/path/windows/mod.ts} instead. */
|
|
39
39
|
export const win32 = _windows;
|
|
40
|
-
/** @deprecated (will be removed after 1.0.0) Import from
|
|
40
|
+
/** @deprecated (will be removed after 1.0.0) Import from {@link https://deno.land/std/posix/mod.ts} instead. */
|
|
41
41
|
export const posix = _posix;
|
|
42
42
|
export const sep = isWindows ? _windows.sep : _posix.sep;
|
|
43
|
-
export const delimiter = isWindows
|
|
43
|
+
export const delimiter = isWindows
|
|
44
|
+
? _windows.delimiter
|
|
45
|
+
: _posix.delimiter;
|
|
44
46
|
export * from "./basename.js";
|
|
45
47
|
export * from "./dirname.js";
|
|
46
48
|
export * from "./extname.js";
|
|
@@ -57,4 +59,7 @@ export * from "./to_namespaced_path.js";
|
|
|
57
59
|
export * from "./common.js";
|
|
58
60
|
export * from "./separator.js";
|
|
59
61
|
export * from "./_interface.js";
|
|
60
|
-
export * from "./
|
|
62
|
+
export * from "./glob_to_regexp.js";
|
|
63
|
+
export * from "./is_glob.js";
|
|
64
|
+
export * from "./join_globs.js";
|
|
65
|
+
export * from "./normalize_glob.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { isWindows } from "./_os.js";
|
|
4
|
+
import { normalizeGlob as posixNormalizeGlob } from "./posix/normalize_glob.js";
|
|
5
|
+
import { normalizeGlob as windowsNormalizeGlob, } from "./windows/normalize_glob.js";
|
|
6
|
+
/** Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
7
|
+
export function normalizeGlob(glob, options = {}) {
|
|
8
|
+
return isWindows
|
|
9
|
+
? windowsNormalizeGlob(glob, options)
|
|
10
|
+
: posixNormalizeGlob(glob, options);
|
|
11
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { isGlob } from "../_common/is_glob.js";
|
|
1
|
+
import { GlobToRegExpOptions } from "../_common/glob_to_reg_exp.js";
|
|
3
2
|
/** Convert a glob string to a regular expression.
|
|
4
3
|
*
|
|
5
4
|
* Tries to match bash glob expansion as closely as possible.
|
|
@@ -56,7 +55,3 @@ export { isGlob } from "../_common/is_glob.js";
|
|
|
56
55
|
* `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if
|
|
57
56
|
* the group occurs not nested at the end of the segment. */
|
|
58
57
|
export declare function globToRegExp(glob: string, options?: GlobToRegExpOptions): RegExp;
|
|
59
|
-
/** Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
60
|
-
export declare function normalizeGlob(glob: string, { globstar }?: GlobOptions): string;
|
|
61
|
-
/** Like join(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
62
|
-
export declare function joinGlobs(globs: string[], { extended, globstar }?: GlobOptions): string;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { _globToRegExp, } from "../_common/glob_to_reg_exp.js";
|
|
4
|
+
const constants = {
|
|
5
|
+
sep: "/+",
|
|
6
|
+
sepMaybe: "/*",
|
|
7
|
+
seps: ["/"],
|
|
8
|
+
globstar: "(?:[^/]*(?:/|$)+)*",
|
|
9
|
+
wildcard: "[^/]*",
|
|
10
|
+
escapePrefix: "\\",
|
|
11
|
+
};
|
|
12
|
+
/** Convert a glob string to a regular expression.
|
|
13
|
+
*
|
|
14
|
+
* Tries to match bash glob expansion as closely as possible.
|
|
15
|
+
*
|
|
16
|
+
* Basic glob syntax:
|
|
17
|
+
* - `*` - Matches everything without leaving the path segment.
|
|
18
|
+
* - `?` - Matches any single character.
|
|
19
|
+
* - `{foo,bar}` - Matches `foo` or `bar`.
|
|
20
|
+
* - `[abcd]` - Matches `a`, `b`, `c` or `d`.
|
|
21
|
+
* - `[a-d]` - Matches `a`, `b`, `c` or `d`.
|
|
22
|
+
* - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`.
|
|
23
|
+
* - `[[:<class>:]]` - Matches any character belonging to `<class>`.
|
|
24
|
+
* - `[[:alnum:]]` - Matches any digit or letter.
|
|
25
|
+
* - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`.
|
|
26
|
+
* - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes
|
|
27
|
+
* for a complete list of supported character classes.
|
|
28
|
+
* - `\` - Escapes the next character for an `os` other than `"windows"`.
|
|
29
|
+
* - \` - Escapes the next character for `os` set to `"windows"`.
|
|
30
|
+
* - `/` - Path separator.
|
|
31
|
+
* - `\` - Additional path separator only for `os` set to `"windows"`.
|
|
32
|
+
*
|
|
33
|
+
* Extended syntax:
|
|
34
|
+
* - Requires `{ extended: true }`.
|
|
35
|
+
* - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`.
|
|
36
|
+
* - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same.
|
|
37
|
+
* - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`.
|
|
38
|
+
* - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`.
|
|
39
|
+
* - `!(foo|bar)` - Matches anything other than `{foo,bar}`.
|
|
40
|
+
* - See https://www.linuxjournal.com/content/bash-extended-globbing.
|
|
41
|
+
*
|
|
42
|
+
* Globstar syntax:
|
|
43
|
+
* - Requires `{ globstar: true }`.
|
|
44
|
+
* - `**` - Matches any number of any path segments.
|
|
45
|
+
* - Must comprise its entire path segment in the provided glob.
|
|
46
|
+
* - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
|
|
47
|
+
*
|
|
48
|
+
* Note the following properties:
|
|
49
|
+
* - The generated `RegExp` is anchored at both start and end.
|
|
50
|
+
* - Repeating and trailing separators are tolerated. Trailing separators in the
|
|
51
|
+
* provided glob have no meaning and are discarded.
|
|
52
|
+
* - Absolute globs will only match absolute paths, etc.
|
|
53
|
+
* - Empty globs will match nothing.
|
|
54
|
+
* - Any special glob syntax must be contained to one path segment. For example,
|
|
55
|
+
* `?(foo|bar/baz)` is invalid. The separator will take precedence and the
|
|
56
|
+
* first segment ends with an unclosed group.
|
|
57
|
+
* - If a path segment ends with unclosed groups or a dangling escape prefix, a
|
|
58
|
+
* parse error has occurred. Every character for that segment is taken
|
|
59
|
+
* literally in this event.
|
|
60
|
+
*
|
|
61
|
+
* Limitations:
|
|
62
|
+
* - A negative group like `!(foo|bar)` will wrongly be converted to a negative
|
|
63
|
+
* look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly
|
|
64
|
+
* fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively,
|
|
65
|
+
* `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if
|
|
66
|
+
* the group occurs not nested at the end of the segment. */
|
|
67
|
+
export function globToRegExp(glob, options = {}) {
|
|
68
|
+
return _globToRegExp(constants, glob, options);
|
|
69
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { isGlob } from "../is_glob.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { join } from "./join.js";
|
|
4
|
+
import { SEP } from "./separator.js";
|
|
5
|
+
import { normalizeGlob } from "./normalize_glob.js";
|
|
6
|
+
/** Like join(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
7
|
+
export function joinGlobs(globs, { extended = true, globstar = false } = {}) {
|
|
8
|
+
if (!globstar || globs.length === 0) {
|
|
9
|
+
return join(...globs);
|
|
10
|
+
}
|
|
11
|
+
if (globs.length === 0)
|
|
12
|
+
return ".";
|
|
13
|
+
let joined;
|
|
14
|
+
for (const glob of globs) {
|
|
15
|
+
const path = glob;
|
|
16
|
+
if (path.length > 0) {
|
|
17
|
+
if (!joined)
|
|
18
|
+
joined = path;
|
|
19
|
+
else
|
|
20
|
+
joined += `${SEP}${path}`;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (!joined)
|
|
24
|
+
return ".";
|
|
25
|
+
return normalizeGlob(joined, { extended, globstar });
|
|
26
|
+
}
|
|
@@ -34,4 +34,7 @@ export * from "./to_namespaced_path.js";
|
|
|
34
34
|
export * from "./common.js";
|
|
35
35
|
export * from "./separator.js";
|
|
36
36
|
export * from "../_interface.js";
|
|
37
|
-
export * from "
|
|
37
|
+
export * from "./glob_to_regexp.js";
|
|
38
|
+
export * from "./is_glob.js";
|
|
39
|
+
export * from "./join_globs.js";
|
|
40
|
+
export * from "./normalize_glob.js";
|
|
@@ -38,4 +38,7 @@ export * from "./to_namespaced_path.js";
|
|
|
38
38
|
export * from "./common.js";
|
|
39
39
|
export * from "./separator.js";
|
|
40
40
|
export * from "../_interface.js";
|
|
41
|
-
export * from "
|
|
41
|
+
export * from "./glob_to_regexp.js";
|
|
42
|
+
export * from "./is_glob.js";
|
|
43
|
+
export * from "./join_globs.js";
|
|
44
|
+
export * from "./normalize_glob.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { normalize } from "./normalize.js";
|
|
4
|
+
import { SEP_PATTERN } from "./separator.js";
|
|
5
|
+
/** Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
6
|
+
export function normalizeGlob(glob, { globstar = false } = {}) {
|
|
7
|
+
if (glob.match(/\0/g)) {
|
|
8
|
+
throw new Error(`Glob contains invalid characters: "${glob}"`);
|
|
9
|
+
}
|
|
10
|
+
if (!globstar) {
|
|
11
|
+
return normalize(glob);
|
|
12
|
+
}
|
|
13
|
+
const s = SEP_PATTERN.source;
|
|
14
|
+
const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g");
|
|
15
|
+
return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, "..");
|
|
16
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SEP:
|
|
1
|
+
export declare const SEP: "/" | "\\";
|
|
2
2
|
export declare const SEP_PATTERN: RegExp;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { isGlob } from "../_common/is_glob.js";
|
|
1
|
+
import { GlobToRegExpOptions } from "../_common/glob_to_reg_exp.js";
|
|
3
2
|
/** Convert a glob string to a regular expression.
|
|
4
3
|
*
|
|
5
4
|
* Tries to match bash glob expansion as closely as possible.
|
|
@@ -56,7 +55,3 @@ export { isGlob } from "../_common/is_glob.js";
|
|
|
56
55
|
* `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if
|
|
57
56
|
* the group occurs not nested at the end of the segment. */
|
|
58
57
|
export declare function globToRegExp(glob: string, options?: GlobToRegExpOptions): RegExp;
|
|
59
|
-
/** Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
60
|
-
export declare function normalizeGlob(glob: string, { globstar }?: GlobOptions): string;
|
|
61
|
-
/** Like join(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
62
|
-
export declare function joinGlobs(globs: string[], { extended, globstar }?: GlobOptions): string;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { _globToRegExp, } from "../_common/glob_to_reg_exp.js";
|
|
4
|
+
const constants = {
|
|
5
|
+
sep: "(?:\\\\|/)+",
|
|
6
|
+
sepMaybe: "(?:\\\\|/)*",
|
|
7
|
+
seps: ["\\", "/"],
|
|
8
|
+
globstar: "(?:[^\\\\/]*(?:\\\\|/|$)+)*",
|
|
9
|
+
wildcard: "[^\\\\/]*",
|
|
10
|
+
escapePrefix: "`",
|
|
11
|
+
};
|
|
12
|
+
/** Convert a glob string to a regular expression.
|
|
13
|
+
*
|
|
14
|
+
* Tries to match bash glob expansion as closely as possible.
|
|
15
|
+
*
|
|
16
|
+
* Basic glob syntax:
|
|
17
|
+
* - `*` - Matches everything without leaving the path segment.
|
|
18
|
+
* - `?` - Matches any single character.
|
|
19
|
+
* - `{foo,bar}` - Matches `foo` or `bar`.
|
|
20
|
+
* - `[abcd]` - Matches `a`, `b`, `c` or `d`.
|
|
21
|
+
* - `[a-d]` - Matches `a`, `b`, `c` or `d`.
|
|
22
|
+
* - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`.
|
|
23
|
+
* - `[[:<class>:]]` - Matches any character belonging to `<class>`.
|
|
24
|
+
* - `[[:alnum:]]` - Matches any digit or letter.
|
|
25
|
+
* - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`.
|
|
26
|
+
* - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes
|
|
27
|
+
* for a complete list of supported character classes.
|
|
28
|
+
* - `\` - Escapes the next character for an `os` other than `"windows"`.
|
|
29
|
+
* - \` - Escapes the next character for `os` set to `"windows"`.
|
|
30
|
+
* - `/` - Path separator.
|
|
31
|
+
* - `\` - Additional path separator only for `os` set to `"windows"`.
|
|
32
|
+
*
|
|
33
|
+
* Extended syntax:
|
|
34
|
+
* - Requires `{ extended: true }`.
|
|
35
|
+
* - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`.
|
|
36
|
+
* - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same.
|
|
37
|
+
* - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`.
|
|
38
|
+
* - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`.
|
|
39
|
+
* - `!(foo|bar)` - Matches anything other than `{foo,bar}`.
|
|
40
|
+
* - See https://www.linuxjournal.com/content/bash-extended-globbing.
|
|
41
|
+
*
|
|
42
|
+
* Globstar syntax:
|
|
43
|
+
* - Requires `{ globstar: true }`.
|
|
44
|
+
* - `**` - Matches any number of any path segments.
|
|
45
|
+
* - Must comprise its entire path segment in the provided glob.
|
|
46
|
+
* - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
|
|
47
|
+
*
|
|
48
|
+
* Note the following properties:
|
|
49
|
+
* - The generated `RegExp` is anchored at both start and end.
|
|
50
|
+
* - Repeating and trailing separators are tolerated. Trailing separators in the
|
|
51
|
+
* provided glob have no meaning and are discarded.
|
|
52
|
+
* - Absolute globs will only match absolute paths, etc.
|
|
53
|
+
* - Empty globs will match nothing.
|
|
54
|
+
* - Any special glob syntax must be contained to one path segment. For example,
|
|
55
|
+
* `?(foo|bar/baz)` is invalid. The separator will take precedence and the
|
|
56
|
+
* first segment ends with an unclosed group.
|
|
57
|
+
* - If a path segment ends with unclosed groups or a dangling escape prefix, a
|
|
58
|
+
* parse error has occurred. Every character for that segment is taken
|
|
59
|
+
* literally in this event.
|
|
60
|
+
*
|
|
61
|
+
* Limitations:
|
|
62
|
+
* - A negative group like `!(foo|bar)` will wrongly be converted to a negative
|
|
63
|
+
* look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly
|
|
64
|
+
* fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively,
|
|
65
|
+
* `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if
|
|
66
|
+
* the group occurs not nested at the end of the segment. */
|
|
67
|
+
export function globToRegExp(glob, options = {}) {
|
|
68
|
+
return _globToRegExp(constants, glob, options);
|
|
69
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { isGlob } from "../is_glob.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { join } from "./join.js";
|
|
4
|
+
import { SEP } from "./separator.js";
|
|
5
|
+
import { normalizeGlob } from "./normalize_glob.js";
|
|
6
|
+
/** Like join(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
7
|
+
export function joinGlobs(globs, { extended = true, globstar = false } = {}) {
|
|
8
|
+
if (!globstar || globs.length === 0) {
|
|
9
|
+
return join(...globs);
|
|
10
|
+
}
|
|
11
|
+
if (globs.length === 0)
|
|
12
|
+
return ".";
|
|
13
|
+
let joined;
|
|
14
|
+
for (const glob of globs) {
|
|
15
|
+
const path = glob;
|
|
16
|
+
if (path.length > 0) {
|
|
17
|
+
if (!joined)
|
|
18
|
+
joined = path;
|
|
19
|
+
else
|
|
20
|
+
joined += `${SEP}${path}`;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (!joined)
|
|
24
|
+
return ".";
|
|
25
|
+
return normalizeGlob(joined, { extended, globstar });
|
|
26
|
+
}
|
|
@@ -34,4 +34,7 @@ export * from "./to_namespaced_path.js";
|
|
|
34
34
|
export * from "./common.js";
|
|
35
35
|
export * from "./separator.js";
|
|
36
36
|
export * from "../_interface.js";
|
|
37
|
-
export * from "
|
|
37
|
+
export * from "./glob_to_regexp.js";
|
|
38
|
+
export * from "./is_glob.js";
|
|
39
|
+
export * from "./join_globs.js";
|
|
40
|
+
export * from "./normalize_glob.js";
|
|
@@ -38,4 +38,7 @@ export * from "./to_namespaced_path.js";
|
|
|
38
38
|
export * from "./common.js";
|
|
39
39
|
export * from "./separator.js";
|
|
40
40
|
export * from "../_interface.js";
|
|
41
|
-
export * from "
|
|
41
|
+
export * from "./glob_to_regexp.js";
|
|
42
|
+
export * from "./is_glob.js";
|
|
43
|
+
export * from "./join_globs.js";
|
|
44
|
+
export * from "./normalize_glob.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { normalize } from "./normalize.js";
|
|
4
|
+
import { SEP_PATTERN } from "./separator.js";
|
|
5
|
+
/** Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
6
|
+
export function normalizeGlob(glob, { globstar = false } = {}) {
|
|
7
|
+
if (glob.match(/\0/g)) {
|
|
8
|
+
throw new Error(`Glob contains invalid characters: "${glob}"`);
|
|
9
|
+
}
|
|
10
|
+
if (!globstar) {
|
|
11
|
+
return normalize(glob);
|
|
12
|
+
}
|
|
13
|
+
const s = SEP_PATTERN.source;
|
|
14
|
+
const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g");
|
|
15
|
+
return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, "..");
|
|
16
|
+
}
|
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.210.0/path/mod.js";
|
|
2
|
+
export * as html from "./deps/deno.land/std@0.210.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.210.0/path/mod.js";
|
|
2
|
+
export * as html from "./deps/deno.land/std@0.210.0/html/mod.js";
|