ventojs 0.9.1 → 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.205.0/path/glob.d.ts → std@0.208.0/path/glob_to_regexp.d.ts} +1 -7
- package/esm/deps/deno.land/std@0.208.0/path/glob_to_regexp.js +65 -0
- 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.205.0 → esm/deps/deno.land/std@0.208.0}/path/mod.d.ts +6 -3
- package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/mod.js +6 -3
- 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.205.0/path/posix/glob.d.ts → std@0.208.0/path/posix/glob_to_regexp.d.ts} +1 -6
- 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_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_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.205.0 → std@0.208.0}/path/posix/mod.d.ts +4 -1
- package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/mod.js +4 -1
- 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/{script/deps/deno.land/std@0.205.0/path/posix/glob.d.ts → esm/deps/deno.land/std@0.208.0/path/windows/glob_to_regexp.d.ts} +1 -6
- 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_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_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.205.0 → std@0.208.0}/path/windows/mod.d.ts +4 -1
- package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/mod.js +4 -1
- 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.d.ts +2 -2
- package/esm/deps.js +2 -2
- package/esm/mod.js +2 -2
- package/package.json +1 -1
- package/script/deps/deno.land/{std@0.205.0/path/glob.d.ts → std@0.208.0/path/glob_to_regexp.d.ts} +1 -7
- 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/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.205.0 → script/deps/deno.land/std@0.208.0}/path/mod.d.ts +6 -3
- package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/mod.js +6 -3
- 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.205.0/path/windows/glob.d.ts → std@0.208.0/path/posix/glob_to_regexp.d.ts} +1 -6
- 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_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_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.205.0 → std@0.208.0}/path/posix/mod.d.ts +4 -1
- package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/mod.js +4 -1
- 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/{esm/deps/deno.land/std@0.205.0/path/windows/glob.d.ts → script/deps/deno.land/std@0.208.0/path/windows/glob_to_regexp.d.ts} +1 -6
- 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_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_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.205.0 → std@0.208.0}/path/windows/mod.d.ts +4 -1
- package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/mod.js +4 -1
- 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.d.ts +2 -2
- package/script/deps.js +2 -2
- package/script/mod.js +2 -2
- 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/path/glob.js +0 -85
- 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/windows/glob.js +0 -113
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/html/entities.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/html/entities.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/html/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/html/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/assert_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/assert_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/normalize_string.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_interface.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_interface.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_os.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_os.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0/path/_common → std@0.208.0/path}/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0/path/_common → std@0.208.0/path}/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/html/entities.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/html/entities.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/html/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/html/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/assert_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/assert_path.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/common.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/format.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/normalize_string.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/normalize_string.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_common/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_interface.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_interface.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_os.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/_os.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/common.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/format.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0/path/_common → std@0.208.0/path}/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0/path/_common → std@0.208.0/path}/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/join.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/common.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/format.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/join.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/posix/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/common.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/format.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/join.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.205.0 → std@0.208.0}/path/windows/to_namespaced_path.js +0 -0
package/esm/deps/deno.land/{std@0.205.0/path/glob.d.ts → std@0.208.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,8 +1,8 @@
|
|
|
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
7
|
export declare const sep: string;
|
|
8
8
|
export declare const delimiter: string;
|
|
@@ -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,9 +35,9 @@
|
|
|
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
43
|
export const delimiter = isWindows ? _windows.delimiter : _posix.delimiter;
|
|
@@ -57,4 +57,7 @@ export * from "./to_namespaced_path.js";
|
|
|
57
57
|
export * from "./common.js";
|
|
58
58
|
export * from "./separator.js";
|
|
59
59
|
export * from "./_interface.js";
|
|
60
|
-
export * from "./
|
|
60
|
+
export * from "./glob_to_regexp.js";
|
|
61
|
+
export * from "./is_glob.js";
|
|
62
|
+
export * from "./join_globs.js";
|
|
63
|
+
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,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.208.0/path/mod.js";
|
|
2
|
+
export * as html from "./deps/deno.land/std@0.208.0/html/mod.js";
|
package/esm/deps.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * as path from "./deps/deno.land/std@0.
|
|
2
|
-
export * as html from "./deps/deno.land/std@0.
|
|
1
|
+
export * as path from "./deps/deno.land/std@0.208.0/path/mod.js";
|
|
2
|
+
export * as html from "./deps/deno.land/std@0.208.0/html/mod.js";
|
package/esm/mod.js
CHANGED
|
@@ -20,8 +20,8 @@ export default function (options = {}) {
|
|
|
20
20
|
const env = new Environment({
|
|
21
21
|
loader,
|
|
22
22
|
dataVarname: options.dataVarname || "it",
|
|
23
|
-
autoescape: options.autoescape
|
|
24
|
-
useWith: options.useWith
|
|
23
|
+
autoescape: options.autoescape ?? false,
|
|
24
|
+
useWith: options.useWith ?? true,
|
|
25
25
|
});
|
|
26
26
|
// Register basic plugins
|
|
27
27
|
env.use(ifTag());
|
package/package.json
CHANGED
package/script/deps/deno.land/{std@0.205.0/path/glob.d.ts → std@0.208.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,69 @@
|
|
|
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.globToRegExp = void 0;
|
|
6
|
+
const _os_js_1 = require("./_os.js");
|
|
7
|
+
const glob_to_regexp_js_1 = require("./posix/glob_to_regexp.js");
|
|
8
|
+
const glob_to_regexp_js_2 = require("./windows/glob_to_regexp.js");
|
|
9
|
+
/** Convert a glob string to a regular expression.
|
|
10
|
+
*
|
|
11
|
+
* Tries to match bash glob expansion as closely as possible.
|
|
12
|
+
*
|
|
13
|
+
* Basic glob syntax:
|
|
14
|
+
* - `*` - Matches everything without leaving the path segment.
|
|
15
|
+
* - `?` - Matches any single character.
|
|
16
|
+
* - `{foo,bar}` - Matches `foo` or `bar`.
|
|
17
|
+
* - `[abcd]` - Matches `a`, `b`, `c` or `d`.
|
|
18
|
+
* - `[a-d]` - Matches `a`, `b`, `c` or `d`.
|
|
19
|
+
* - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`.
|
|
20
|
+
* - `[[:<class>:]]` - Matches any character belonging to `<class>`.
|
|
21
|
+
* - `[[:alnum:]]` - Matches any digit or letter.
|
|
22
|
+
* - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`.
|
|
23
|
+
* - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes
|
|
24
|
+
* for a complete list of supported character classes.
|
|
25
|
+
* - `\` - Escapes the next character for an `os` other than `"windows"`.
|
|
26
|
+
* - \` - Escapes the next character for `os` set to `"windows"`.
|
|
27
|
+
* - `/` - Path separator.
|
|
28
|
+
* - `\` - Additional path separator only for `os` set to `"windows"`.
|
|
29
|
+
*
|
|
30
|
+
* Extended syntax:
|
|
31
|
+
* - Requires `{ extended: true }`.
|
|
32
|
+
* - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`.
|
|
33
|
+
* - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same.
|
|
34
|
+
* - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`.
|
|
35
|
+
* - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`.
|
|
36
|
+
* - `!(foo|bar)` - Matches anything other than `{foo,bar}`.
|
|
37
|
+
* - See https://www.linuxjournal.com/content/bash-extended-globbing.
|
|
38
|
+
*
|
|
39
|
+
* Globstar syntax:
|
|
40
|
+
* - Requires `{ globstar: true }`.
|
|
41
|
+
* - `**` - Matches any number of any path segments.
|
|
42
|
+
* - Must comprise its entire path segment in the provided glob.
|
|
43
|
+
* - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
|
|
44
|
+
*
|
|
45
|
+
* Note the following properties:
|
|
46
|
+
* - The generated `RegExp` is anchored at both start and end.
|
|
47
|
+
* - Repeating and trailing separators are tolerated. Trailing separators in the
|
|
48
|
+
* provided glob have no meaning and are discarded.
|
|
49
|
+
* - Absolute globs will only match absolute paths, etc.
|
|
50
|
+
* - Empty globs will match nothing.
|
|
51
|
+
* - Any special glob syntax must be contained to one path segment. For example,
|
|
52
|
+
* `?(foo|bar/baz)` is invalid. The separator will take precedence and the
|
|
53
|
+
* first segment ends with an unclosed group.
|
|
54
|
+
* - If a path segment ends with unclosed groups or a dangling escape prefix, a
|
|
55
|
+
* parse error has occurred. Every character for that segment is taken
|
|
56
|
+
* literally in this event.
|
|
57
|
+
*
|
|
58
|
+
* Limitations:
|
|
59
|
+
* - A negative group like `!(foo|bar)` will wrongly be converted to a negative
|
|
60
|
+
* look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly
|
|
61
|
+
* fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively,
|
|
62
|
+
* `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if
|
|
63
|
+
* the group occurs not nested at the end of the segment. */
|
|
64
|
+
function globToRegExp(glob, options = {}) {
|
|
65
|
+
return options.os === "windows" || (!options.os && _os_js_1.isWindows)
|
|
66
|
+
? (0, glob_to_regexp_js_2.globToRegExp)(glob, options)
|
|
67
|
+
: (0, glob_to_regexp_js_1.globToRegExp)(glob, options);
|
|
68
|
+
}
|
|
69
|
+
exports.globToRegExp = globToRegExp;
|