@mtkruto/node 0.1.113 → 0.1.115
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/0_deps.d.ts +3 -2
- package/esm/0_deps.js +3 -2
- package/esm/1_utilities.d.ts +1 -0
- package/esm/1_utilities.js +1 -0
- package/esm/3_types.d.ts +0 -1
- package/esm/3_types.js +0 -1
- package/esm/4_constants.d.ts +1 -1
- package/esm/4_constants.js +1 -1
- package/esm/client/0_utilities.d.ts +6 -0
- package/esm/client/0_utilities.js +53 -0
- package/esm/client/3_types.d.ts +60 -2
- package/esm/client/5_client.d.ts +44 -6
- package/esm/client/5_client.js +170 -42
- package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/base64.d.ts +2 -2
- package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/base64.js +2 -2
- package/{script/deps/deno.land/std@0.204.0 → esm/deps/deno.land/std@0.207.0}/fmt/colors.d.ts +1 -1
- package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/fmt/colors.js +1 -1
- package/esm/deps/deno.land/std@0.207.0/path/_common/assert_path.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/assert_path.js +7 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/basename.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/basename.js +40 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/common.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/common.js +23 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/constants.d.ts +39 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/constants.js +46 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/dirname.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/dirname.js +8 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/format.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/format.js +19 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/from_file_url.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/from_file_url.js +9 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/glob_to_reg_exp.d.ts +27 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/glob_to_reg_exp.js +235 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/normalize.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/normalize.js +8 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/normalize_string.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/normalize_string.js +77 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/relative.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/relative.js +9 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/strip_trailing_separators.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/strip_trailing_separators.js +19 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/to_file_url.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/_common/to_file_url.js +15 -0
- package/esm/deps/deno.land/std@0.207.0/path/_interface.d.ts +26 -0
- package/esm/deps/deno.land/std@0.207.0/path/_interface.js +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/_os.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/_os.js +18 -0
- package/esm/deps/deno.land/std@0.207.0/path/basename.d.ts +8 -0
- package/esm/deps/deno.land/std@0.207.0/path/basename.js +17 -0
- package/esm/deps/deno.land/std@0.207.0/path/common.d.ts +13 -0
- package/esm/deps/deno.land/std@0.207.0/path/common.js +19 -0
- package/esm/deps/deno.land/std@0.207.0/path/dirname.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/dirname.js +12 -0
- package/esm/deps/deno.land/std@0.207.0/path/extname.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/extname.js +13 -0
- package/esm/deps/deno.land/std@0.207.0/path/format.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/format.js +12 -0
- package/esm/deps/deno.land/std@0.207.0/path/from_file_url.d.ts +17 -0
- package/esm/deps/deno.land/std@0.207.0/path/from_file_url.js +24 -0
- package/esm/deps/deno.land/std@0.207.0/path/glob_to_regexp.d.ts +61 -0
- package/esm/deps/deno.land/std@0.207.0/path/glob_to_regexp.js +65 -0
- package/esm/deps/deno.land/std@0.207.0/path/is_absolute.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/is_absolute.js +12 -0
- package/esm/deps/deno.land/std@0.207.0/path/is_glob.d.ts +2 -0
- package/esm/deps/deno.land/std@0.207.0/path/is_glob.js +28 -0
- package/esm/deps/deno.land/std@0.207.0/path/join.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/join.js +12 -0
- package/esm/deps/deno.land/std@0.207.0/path/join_globs.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/join_globs.js +11 -0
- package/esm/deps/deno.land/std@0.207.0/path/mod.d.ts +28 -0
- package/esm/deps/deno.land/std@0.207.0/path/mod.js +63 -0
- package/esm/deps/deno.land/std@0.207.0/path/normalize.d.ts +7 -0
- package/esm/deps/deno.land/std@0.207.0/path/normalize.js +14 -0
- package/esm/deps/deno.land/std@0.207.0/path/normalize_glob.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/normalize_glob.js +11 -0
- package/esm/deps/deno.land/std@0.207.0/path/parse.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/parse.js +12 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/_util.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/_util.js +8 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/basename.d.ts +8 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/basename.js +18 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/common.d.ts +13 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/common.js +19 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/dirname.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/dirname.js +36 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/extname.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/extname.js +59 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/format.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/format.js +11 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/from_file_url.d.ts +11 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/from_file_url.js +17 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/glob_to_regexp.d.ts +57 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/glob_to_regexp.js +69 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/is_absolute.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/is_absolute.js +12 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/is_glob.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/is_glob.js +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/join.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/join.js +26 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/join_globs.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/join_globs.js +26 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/mod.d.ts +40 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/mod.js +44 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/normalize.d.ts +7 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/normalize.js +25 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/normalize_glob.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/normalize_glob.js +16 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/parse.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/parse.js +98 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/relative.d.ts +7 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/relative.js +94 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/resolve.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/resolve.js +48 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/separator.d.ts +2 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/separator.js +4 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/to_file_url.d.ts +11 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/to_file_url.js +22 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/to_namespaced_path.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/posix/to_namespaced_path.js +10 -0
- package/esm/deps/deno.land/std@0.207.0/path/relative.d.ts +12 -0
- package/esm/deps/deno.land/std@0.207.0/path/relative.js +19 -0
- package/esm/deps/deno.land/std@0.207.0/path/resolve.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/resolve.js +14 -0
- package/esm/deps/deno.land/std@0.207.0/path/separator.d.ts +2 -0
- package/esm/deps/deno.land/std@0.207.0/path/separator.js +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/to_file_url.d.ts +17 -0
- package/esm/deps/deno.land/std@0.207.0/path/to_file_url.js +24 -0
- package/esm/deps/deno.land/std@0.207.0/path/to_namespaced_path.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/to_namespaced_path.js +14 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/_util.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/_util.js +15 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/basename.d.ts +8 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/basename.js +30 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/common.d.ts +13 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/common.js +19 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/dirname.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/dirname.js +98 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/extname.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/extname.js +68 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/format.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/format.js +11 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/from_file_url.d.ts +13 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/from_file_url.js +26 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/glob_to_regexp.d.ts +57 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/glob_to_regexp.js +69 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/is_absolute.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/is_absolute.js +27 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/is_glob.d.ts +1 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/is_glob.js +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/join.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/join.js +72 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/join_globs.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/join_globs.js +26 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/mod.d.ts +40 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/mod.js +44 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/normalize.d.ts +7 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/normalize.js +130 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/normalize_glob.d.ts +3 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/normalize_glob.js +16 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/parse.d.ts +6 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/parse.js +159 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/relative.d.ts +12 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/relative.js +121 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/resolve.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/resolve.js +143 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/separator.d.ts +2 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/separator.js +4 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/to_file_url.d.ts +13 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/to_file_url.js +31 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/to_namespaced_path.d.ts +5 -0
- package/esm/deps/deno.land/std@0.207.0/path/windows/to_namespaced_path.js +38 -0
- package/esm/mod.d.ts +1 -1
- package/esm/mod.js +1 -1
- package/esm/types/1_chat.d.ts +2 -3
- package/esm/types/1_chat.js +4 -5
- package/esm/types/1_user.d.ts +2 -3
- package/esm/types/1_user.js +2 -3
- package/esm/utilities/0_color.d.ts +3 -0
- package/esm/utilities/0_color.js +55 -0
- package/package.json +1 -1
- package/script/0_deps.d.ts +3 -2
- package/script/0_deps.js +18 -5
- package/script/1_utilities.d.ts +1 -0
- package/script/1_utilities.js +1 -0
- package/script/3_types.d.ts +0 -1
- package/script/3_types.js +0 -1
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.js +1 -1
- package/script/client/0_utilities.d.ts +6 -0
- package/script/client/0_utilities.js +79 -1
- package/script/client/3_types.d.ts +60 -2
- package/script/client/5_client.d.ts +44 -6
- package/script/client/5_client.js +169 -41
- package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/base64.d.ts +2 -2
- package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/base64.js +2 -2
- package/{esm/deps/deno.land/std@0.204.0 → script/deps/deno.land/std@0.207.0}/fmt/colors.d.ts +1 -1
- package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/fmt/colors.js +1 -1
- package/script/deps/deno.land/std@0.207.0/path/_common/assert_path.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/assert_path.js +11 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/basename.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/basename.js +46 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/common.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/common.js +27 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/constants.d.ts +39 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/constants.js +49 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/dirname.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/dirname.js +12 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/format.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/format.js +24 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/from_file_url.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/from_file_url.js +13 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/glob_to_reg_exp.d.ts +27 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/glob_to_reg_exp.js +239 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/normalize.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/normalize.js +12 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/normalize_string.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/normalize_string.js +81 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/relative.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/relative.js +13 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/strip_trailing_separators.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/strip_trailing_separators.js +23 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/to_file_url.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/_common/to_file_url.js +19 -0
- package/script/deps/deno.land/std@0.207.0/path/_interface.d.ts +26 -0
- package/script/deps/deno.land/std@0.207.0/path/_interface.js +4 -0
- package/script/deps/deno.land/std@0.207.0/path/_os.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/_os.js +44 -0
- package/script/deps/deno.land/std@0.207.0/path/basename.d.ts +8 -0
- package/script/deps/deno.land/std@0.207.0/path/basename.js +21 -0
- package/script/deps/deno.land/std@0.207.0/path/common.d.ts +13 -0
- package/script/deps/deno.land/std@0.207.0/path/common.js +23 -0
- package/script/deps/deno.land/std@0.207.0/path/dirname.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/dirname.js +16 -0
- package/script/deps/deno.land/std@0.207.0/path/extname.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/extname.js +17 -0
- package/script/deps/deno.land/std@0.207.0/path/format.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/format.js +16 -0
- package/script/deps/deno.land/std@0.207.0/path/from_file_url.d.ts +17 -0
- package/script/deps/deno.land/std@0.207.0/path/from_file_url.js +28 -0
- package/script/deps/deno.land/std@0.207.0/path/glob_to_regexp.d.ts +61 -0
- package/script/deps/deno.land/std@0.207.0/path/glob_to_regexp.js +69 -0
- package/script/deps/deno.land/std@0.207.0/path/is_absolute.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/is_absolute.js +16 -0
- package/script/deps/deno.land/std@0.207.0/path/is_glob.d.ts +2 -0
- package/script/deps/deno.land/std@0.207.0/path/is_glob.js +32 -0
- package/script/deps/deno.land/std@0.207.0/path/join.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/join.js +16 -0
- package/script/deps/deno.land/std@0.207.0/path/join_globs.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/join_globs.js +15 -0
- package/script/deps/deno.land/std@0.207.0/path/mod.d.ts +28 -0
- package/script/deps/deno.land/std@0.207.0/path/mod.js +92 -0
- package/script/deps/deno.land/std@0.207.0/path/normalize.d.ts +7 -0
- package/script/deps/deno.land/std@0.207.0/path/normalize.js +18 -0
- package/script/deps/deno.land/std@0.207.0/path/normalize_glob.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/normalize_glob.js +15 -0
- package/script/deps/deno.land/std@0.207.0/path/parse.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/parse.js +16 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/_util.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/_util.js +12 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/basename.d.ts +8 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/basename.js +22 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/common.d.ts +13 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/common.js +23 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/dirname.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/dirname.js +40 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/extname.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/extname.js +63 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/format.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/format.js +15 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/from_file_url.d.ts +11 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/from_file_url.js +21 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/glob_to_regexp.d.ts +57 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/glob_to_regexp.js +73 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/is_absolute.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/is_absolute.js +16 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/is_glob.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/is_glob.js +7 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/join.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/join.js +30 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/join_globs.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/join_globs.js +30 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/mod.d.ts +40 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/mod.js +61 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/normalize.d.ts +7 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/normalize.js +29 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/normalize_glob.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/normalize_glob.js +20 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/parse.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/parse.js +102 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/relative.d.ts +7 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/relative.js +98 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/resolve.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/resolve.js +75 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/separator.d.ts +2 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/separator.js +7 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/to_file_url.d.ts +11 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/to_file_url.js +26 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/to_namespaced_path.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/posix/to_namespaced_path.js +14 -0
- package/script/deps/deno.land/std@0.207.0/path/relative.d.ts +12 -0
- package/script/deps/deno.land/std@0.207.0/path/relative.js +23 -0
- package/script/deps/deno.land/std@0.207.0/path/resolve.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/resolve.js +18 -0
- package/script/deps/deno.land/std@0.207.0/path/separator.d.ts +2 -0
- package/script/deps/deno.land/std@0.207.0/path/separator.js +8 -0
- package/script/deps/deno.land/std@0.207.0/path/to_file_url.d.ts +17 -0
- package/script/deps/deno.land/std@0.207.0/path/to_file_url.js +28 -0
- package/script/deps/deno.land/std@0.207.0/path/to_namespaced_path.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/to_namespaced_path.js +18 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/_util.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/_util.js +21 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/basename.d.ts +8 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/basename.js +34 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/common.d.ts +13 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/common.js +23 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/dirname.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/dirname.js +102 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/extname.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/extname.js +72 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/format.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/format.js +15 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/from_file_url.d.ts +13 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/from_file_url.js +30 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/glob_to_regexp.d.ts +57 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/glob_to_regexp.js +73 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/is_absolute.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/is_absolute.js +31 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/is_glob.d.ts +1 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/is_glob.js +7 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/join.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/join.js +76 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/join_globs.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/join_globs.js +30 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/mod.d.ts +40 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/mod.js +61 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/normalize.d.ts +7 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/normalize.js +134 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/normalize_glob.d.ts +3 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/normalize_glob.js +20 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/parse.d.ts +6 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/parse.js +163 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/relative.d.ts +12 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/relative.js +125 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/resolve.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/resolve.js +170 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/separator.d.ts +2 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/separator.js +7 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/to_file_url.d.ts +13 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/to_file_url.js +35 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/to_namespaced_path.d.ts +5 -0
- package/script/deps/deno.land/std@0.207.0/path/windows/to_namespaced_path.js +42 -0
- package/script/mod.d.ts +1 -1
- package/script/mod.js +3 -1
- package/script/types/1_chat.d.ts +2 -3
- package/script/types/1_chat.js +4 -5
- package/script/types/1_user.d.ts +2 -3
- package/script/types/1_user.js +1 -2
- package/script/utilities/0_color.d.ts +3 -0
- package/script/utilities/0_color.js +60 -0
- package/esm/types/0_color.d.ts +0 -3
- package/esm/types/0_color.js +0 -36
- package/script/types/0_color.d.ts +0 -3
- package/script/types/0_color.js +0 -41
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_diff.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_diff.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_almost_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_array_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_exists.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_false.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_is_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_object_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_string_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/fail.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unimplemented.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unreachable.js +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_diff.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_diff.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_almost_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_array_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_exists.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_false.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_is_error.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_match.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_match.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_object_match.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_string_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/equal.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/fail.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unimplemented.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unreachable.js +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/_util.js +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
3
|
+
// Copyright the Browserify authors. MIT License.
|
|
4
|
+
// Ported from https://github.com/browserify/path-browserify/
|
|
5
|
+
// This module is browser compatible.
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.normalizeString = void 0;
|
|
8
|
+
const constants_js_1 = require("./constants.js");
|
|
9
|
+
// Resolves . and .. elements in a path with directory names
|
|
10
|
+
function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
|
|
11
|
+
let res = "";
|
|
12
|
+
let lastSegmentLength = 0;
|
|
13
|
+
let lastSlash = -1;
|
|
14
|
+
let dots = 0;
|
|
15
|
+
let code;
|
|
16
|
+
for (let i = 0, len = path.length; i <= len; ++i) {
|
|
17
|
+
if (i < len)
|
|
18
|
+
code = path.charCodeAt(i);
|
|
19
|
+
else if (isPathSeparator(code))
|
|
20
|
+
break;
|
|
21
|
+
else
|
|
22
|
+
code = constants_js_1.CHAR_FORWARD_SLASH;
|
|
23
|
+
if (isPathSeparator(code)) {
|
|
24
|
+
if (lastSlash === i - 1 || dots === 1) {
|
|
25
|
+
// NOOP
|
|
26
|
+
}
|
|
27
|
+
else if (lastSlash !== i - 1 && dots === 2) {
|
|
28
|
+
if (res.length < 2 ||
|
|
29
|
+
lastSegmentLength !== 2 ||
|
|
30
|
+
res.charCodeAt(res.length - 1) !== constants_js_1.CHAR_DOT ||
|
|
31
|
+
res.charCodeAt(res.length - 2) !== constants_js_1.CHAR_DOT) {
|
|
32
|
+
if (res.length > 2) {
|
|
33
|
+
const lastSlashIndex = res.lastIndexOf(separator);
|
|
34
|
+
if (lastSlashIndex === -1) {
|
|
35
|
+
res = "";
|
|
36
|
+
lastSegmentLength = 0;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
res = res.slice(0, lastSlashIndex);
|
|
40
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);
|
|
41
|
+
}
|
|
42
|
+
lastSlash = i;
|
|
43
|
+
dots = 0;
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
else if (res.length === 2 || res.length === 1) {
|
|
47
|
+
res = "";
|
|
48
|
+
lastSegmentLength = 0;
|
|
49
|
+
lastSlash = i;
|
|
50
|
+
dots = 0;
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (allowAboveRoot) {
|
|
55
|
+
if (res.length > 0)
|
|
56
|
+
res += `${separator}..`;
|
|
57
|
+
else
|
|
58
|
+
res = "..";
|
|
59
|
+
lastSegmentLength = 2;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
if (res.length > 0)
|
|
64
|
+
res += separator + path.slice(lastSlash + 1, i);
|
|
65
|
+
else
|
|
66
|
+
res = path.slice(lastSlash + 1, i);
|
|
67
|
+
lastSegmentLength = i - lastSlash - 1;
|
|
68
|
+
}
|
|
69
|
+
lastSlash = i;
|
|
70
|
+
dots = 0;
|
|
71
|
+
}
|
|
72
|
+
else if (code === constants_js_1.CHAR_DOT && dots !== -1) {
|
|
73
|
+
++dots;
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
dots = -1;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return res;
|
|
80
|
+
}
|
|
81
|
+
exports.normalizeString = normalizeString;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assertArgs(from: string, to: string): "" | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.assertArgs = void 0;
|
|
6
|
+
const assert_path_js_1 = require("./assert_path.js");
|
|
7
|
+
function assertArgs(from, to) {
|
|
8
|
+
(0, assert_path_js_1.assertPath)(from);
|
|
9
|
+
(0, assert_path_js_1.assertPath)(to);
|
|
10
|
+
if (from === to)
|
|
11
|
+
return "";
|
|
12
|
+
}
|
|
13
|
+
exports.assertArgs = assertArgs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function stripTrailingSeparators(segment: string, isSep: (char: number) => boolean): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
3
|
+
// Copyright the Browserify authors. MIT License.
|
|
4
|
+
// Ported from https://github.com/browserify/path-browserify/
|
|
5
|
+
// This module is browser compatible.
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.stripTrailingSeparators = void 0;
|
|
8
|
+
function stripTrailingSeparators(segment, isSep) {
|
|
9
|
+
if (segment.length <= 1) {
|
|
10
|
+
return segment;
|
|
11
|
+
}
|
|
12
|
+
let end = segment.length;
|
|
13
|
+
for (let i = segment.length - 1; i > 0; i--) {
|
|
14
|
+
if (isSep(segment.charCodeAt(i))) {
|
|
15
|
+
end = i;
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return segment.slice(0, end);
|
|
22
|
+
}
|
|
23
|
+
exports.stripTrailingSeparators = stripTrailingSeparators;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function encodeWhitespace(string: string): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
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.encodeWhitespace = void 0;
|
|
6
|
+
const WHITESPACE_ENCODINGS = {
|
|
7
|
+
"\u0009": "%09",
|
|
8
|
+
"\u000A": "%0A",
|
|
9
|
+
"\u000B": "%0B",
|
|
10
|
+
"\u000C": "%0C",
|
|
11
|
+
"\u000D": "%0D",
|
|
12
|
+
"\u0020": "%20",
|
|
13
|
+
};
|
|
14
|
+
function encodeWhitespace(string) {
|
|
15
|
+
return string.replaceAll(/[\s]/g, (c) => {
|
|
16
|
+
return WHITESPACE_ENCODINGS[c] ?? c;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
exports.encodeWhitespace = encodeWhitespace;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A parsed path object generated by path.parse() or consumed by path.format().
|
|
3
|
+
*/
|
|
4
|
+
export interface ParsedPath {
|
|
5
|
+
/**
|
|
6
|
+
* The root of the path such as '/' or 'c:\'
|
|
7
|
+
*/
|
|
8
|
+
root: string;
|
|
9
|
+
/**
|
|
10
|
+
* The full directory path such as '/home/user/dir' or 'c:\path\dir'
|
|
11
|
+
*/
|
|
12
|
+
dir: string;
|
|
13
|
+
/**
|
|
14
|
+
* The file name including extension (if any) such as 'index.html'
|
|
15
|
+
*/
|
|
16
|
+
base: string;
|
|
17
|
+
/**
|
|
18
|
+
* The file extension (if any) such as '.html'
|
|
19
|
+
*/
|
|
20
|
+
ext: string;
|
|
21
|
+
/**
|
|
22
|
+
* The file name without extension (if any) such as 'index'
|
|
23
|
+
*/
|
|
24
|
+
name: string;
|
|
25
|
+
}
|
|
26
|
+
export type FormatInputPathObject = Partial<ParsedPath>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.isWindows = exports.osType = void 0;
|
|
29
|
+
// Keep this up-to-date with Deno.build.os
|
|
30
|
+
const dntShim = __importStar(require("../../../../_dnt.shims.js"));
|
|
31
|
+
exports.osType = (() => {
|
|
32
|
+
// deno-lint-ignore no-explicit-any
|
|
33
|
+
const { Deno } = dntShim.dntGlobalThis;
|
|
34
|
+
if (typeof Deno?.build?.os === "string") {
|
|
35
|
+
return Deno.build.os;
|
|
36
|
+
}
|
|
37
|
+
// deno-lint-ignore no-explicit-any
|
|
38
|
+
const { navigator } = dntShim.dntGlobalThis;
|
|
39
|
+
if (navigator?.appVersion?.includes?.("Win")) {
|
|
40
|
+
return "windows";
|
|
41
|
+
}
|
|
42
|
+
return "linux";
|
|
43
|
+
})();
|
|
44
|
+
exports.isWindows = exports.osType === "windows";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return the last portion of a `path`.
|
|
3
|
+
* Trailing directory separators are ignored, and optional suffix is removed.
|
|
4
|
+
*
|
|
5
|
+
* @param path - path to extract the name from.
|
|
6
|
+
* @param [suffix] - suffix to remove from extracted name.
|
|
7
|
+
*/
|
|
8
|
+
export declare function basename(path: string, suffix?: string): string;
|
|
@@ -0,0 +1,21 @@
|
|
|
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.basename = void 0;
|
|
6
|
+
const _os_js_1 = require("./_os.js");
|
|
7
|
+
const basename_js_1 = require("./posix/basename.js");
|
|
8
|
+
const basename_js_2 = require("./windows/basename.js");
|
|
9
|
+
/**
|
|
10
|
+
* Return the last portion of a `path`.
|
|
11
|
+
* Trailing directory separators are ignored, and optional suffix is removed.
|
|
12
|
+
*
|
|
13
|
+
* @param path - path to extract the name from.
|
|
14
|
+
* @param [suffix] - suffix to remove from extracted name.
|
|
15
|
+
*/
|
|
16
|
+
function basename(path, suffix = "") {
|
|
17
|
+
return _os_js_1.isWindows
|
|
18
|
+
? (0, basename_js_2.basename)(path, suffix)
|
|
19
|
+
: (0, basename_js_1.basename)(path, suffix);
|
|
20
|
+
}
|
|
21
|
+
exports.basename = basename;
|
|
@@ -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): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
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.common = void 0;
|
|
6
|
+
const common_js_1 = require("./_common/common.js");
|
|
7
|
+
const separator_js_1 = require("./separator.js");
|
|
8
|
+
/** Determines the common path from a set of paths, using an optional separator,
|
|
9
|
+
* which defaults to the OS default separator.
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { common } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
|
|
13
|
+
* const p = common([
|
|
14
|
+
* "./deno/std/path/mod.ts",
|
|
15
|
+
* "./deno/std/fs/mod.ts",
|
|
16
|
+
* ]);
|
|
17
|
+
* console.log(p); // "./deno/std/"
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
function common(paths, sep = separator_js_1.SEP) {
|
|
21
|
+
return (0, common_js_1._common)(paths, sep);
|
|
22
|
+
}
|
|
23
|
+
exports.common = common;
|
|
@@ -0,0 +1,16 @@
|
|
|
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.dirname = void 0;
|
|
6
|
+
const _os_js_1 = require("./_os.js");
|
|
7
|
+
const dirname_js_1 = require("./posix/dirname.js");
|
|
8
|
+
const dirname_js_2 = require("./windows/dirname.js");
|
|
9
|
+
/**
|
|
10
|
+
* Return the directory path of a `path`.
|
|
11
|
+
* @param path - path to extract the directory from.
|
|
12
|
+
*/
|
|
13
|
+
function dirname(path) {
|
|
14
|
+
return _os_js_1.isWindows ? (0, dirname_js_2.dirname)(path) : (0, dirname_js_1.dirname)(path);
|
|
15
|
+
}
|
|
16
|
+
exports.dirname = dirname;
|
|
@@ -0,0 +1,17 @@
|
|
|
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.extname = void 0;
|
|
6
|
+
const _os_js_1 = require("./_os.js");
|
|
7
|
+
const extname_js_1 = require("./posix/extname.js");
|
|
8
|
+
const extname_js_2 = require("./posix/extname.js");
|
|
9
|
+
/**
|
|
10
|
+
* Return the extension of the `path` with leading period.
|
|
11
|
+
* @param path with extension
|
|
12
|
+
* @returns extension (ex. for `file.ts` returns `.ts`)
|
|
13
|
+
*/
|
|
14
|
+
function extname(path) {
|
|
15
|
+
return _os_js_1.isWindows ? (0, extname_js_2.extname)(path) : (0, extname_js_1.extname)(path);
|
|
16
|
+
}
|
|
17
|
+
exports.extname = extname;
|
|
@@ -0,0 +1,16 @@
|
|
|
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.format = void 0;
|
|
6
|
+
const _os_js_1 = require("./_os.js");
|
|
7
|
+
const format_js_1 = require("./posix/format.js");
|
|
8
|
+
const format_js_2 = require("./windows/format.js");
|
|
9
|
+
/**
|
|
10
|
+
* Generate a path from `FormatInputPathObject` object.
|
|
11
|
+
* @param pathObject with path
|
|
12
|
+
*/
|
|
13
|
+
function format(pathObject) {
|
|
14
|
+
return _os_js_1.isWindows ? (0, format_js_2.format)(pathObject) : (0, format_js_1.format)(pathObject);
|
|
15
|
+
}
|
|
16
|
+
exports.format = format;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a file URL to a path string.
|
|
3
|
+
*
|
|
4
|
+
* ```ts
|
|
5
|
+
* import { fromFileUrl } from "https://deno.land/std@$STD_VERSION/path/from_file_url.ts";
|
|
6
|
+
*
|
|
7
|
+
* // posix
|
|
8
|
+
* fromFileUrl("file:///home/foo"); // "/home/foo"
|
|
9
|
+
*
|
|
10
|
+
* // win32
|
|
11
|
+
* fromFileUrl("file:///home/foo"); // "\\home\\foo"
|
|
12
|
+
* fromFileUrl("file:///C:/Users/foo"); // "C:\\Users\\foo"
|
|
13
|
+
* fromFileUrl("file://localhost/home/foo"); // "\\\\localhost\\home\\foo"
|
|
14
|
+
* ```
|
|
15
|
+
* @param url of a file URL
|
|
16
|
+
*/
|
|
17
|
+
export declare function fromFileUrl(url: string | URL): string;
|
|
@@ -0,0 +1,28 @@
|
|
|
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.fromFileUrl = void 0;
|
|
6
|
+
const _os_js_1 = require("./_os.js");
|
|
7
|
+
const from_file_url_js_1 = require("./posix/from_file_url.js");
|
|
8
|
+
const from_file_url_js_2 = require("./windows/from_file_url.js");
|
|
9
|
+
/**
|
|
10
|
+
* Converts a file URL to a path string.
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { fromFileUrl } from "https://deno.land/std@$STD_VERSION/path/from_file_url.ts";
|
|
14
|
+
*
|
|
15
|
+
* // posix
|
|
16
|
+
* fromFileUrl("file:///home/foo"); // "/home/foo"
|
|
17
|
+
*
|
|
18
|
+
* // win32
|
|
19
|
+
* fromFileUrl("file:///home/foo"); // "\\home\\foo"
|
|
20
|
+
* fromFileUrl("file:///C:/Users/foo"); // "C:\\Users\\foo"
|
|
21
|
+
* fromFileUrl("file://localhost/home/foo"); // "\\\\localhost\\home\\foo"
|
|
22
|
+
* ```
|
|
23
|
+
* @param url of a file URL
|
|
24
|
+
*/
|
|
25
|
+
function fromFileUrl(url) {
|
|
26
|
+
return _os_js_1.isWindows ? (0, from_file_url_js_2.fromFileUrl)(url) : (0, from_file_url_js_1.fromFileUrl)(url);
|
|
27
|
+
}
|
|
28
|
+
exports.fromFileUrl = fromFileUrl;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { GlobOptions } from "./_common/glob_to_reg_exp.js";
|
|
2
|
+
import { OSType } from "./_os.js";
|
|
3
|
+
export type GlobToRegExpOptions = GlobOptions & {
|
|
4
|
+
os?: OSType;
|
|
5
|
+
};
|
|
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 declare function globToRegExp(glob: string, options?: GlobToRegExpOptions): RegExp;
|
|
@@ -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;
|
|
@@ -0,0 +1,16 @@
|
|
|
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.isAbsolute = void 0;
|
|
6
|
+
const _os_js_1 = require("./_os.js");
|
|
7
|
+
const is_absolute_js_1 = require("./posix/is_absolute.js");
|
|
8
|
+
const is_absolute_js_2 = require("./windows/is_absolute.js");
|
|
9
|
+
/**
|
|
10
|
+
* Verifies whether provided path is absolute
|
|
11
|
+
* @param path to be verified as absolute
|
|
12
|
+
*/
|
|
13
|
+
function isAbsolute(path) {
|
|
14
|
+
return _os_js_1.isWindows ? (0, is_absolute_js_2.isAbsolute)(path) : (0, is_absolute_js_1.isAbsolute)(path);
|
|
15
|
+
}
|
|
16
|
+
exports.isAbsolute = isAbsolute;
|
|
@@ -0,0 +1,32 @@
|
|
|
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.isGlob = void 0;
|
|
6
|
+
/** Test whether the given string is a glob */
|
|
7
|
+
function isGlob(str) {
|
|
8
|
+
const chars = { "{": "}", "(": ")", "[": "]" };
|
|
9
|
+
const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
|
|
10
|
+
if (str === "") {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
let match;
|
|
14
|
+
while ((match = regex.exec(str))) {
|
|
15
|
+
if (match[2])
|
|
16
|
+
return true;
|
|
17
|
+
let idx = match.index + match[0].length;
|
|
18
|
+
// if an open bracket/brace/paren is escaped,
|
|
19
|
+
// set the index to the next closing character
|
|
20
|
+
const open = match[1];
|
|
21
|
+
const close = open ? chars[open] : null;
|
|
22
|
+
if (open && close) {
|
|
23
|
+
const n = str.indexOf(close, idx);
|
|
24
|
+
if (n !== -1) {
|
|
25
|
+
idx = n + 1;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
str = str.slice(idx);
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
exports.isGlob = isGlob;
|
|
@@ -0,0 +1,16 @@
|
|
|
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.join = void 0;
|
|
6
|
+
const _os_js_1 = require("./_os.js");
|
|
7
|
+
const join_js_1 = require("./posix/join.js");
|
|
8
|
+
const join_js_2 = require("./windows/join.js");
|
|
9
|
+
/**
|
|
10
|
+
* Join all given a sequence of `paths`,then normalizes the resulting path.
|
|
11
|
+
* @param paths to be joined and normalized
|
|
12
|
+
*/
|
|
13
|
+
function join(...paths) {
|
|
14
|
+
return _os_js_1.isWindows ? (0, join_js_2.join)(...paths) : (0, join_js_1.join)(...paths);
|
|
15
|
+
}
|
|
16
|
+
exports.join = join;
|