@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 @@
|
|
|
1
|
+
export declare function assertArg(url: URL | string): URL;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
export function assertArg(url) {
|
|
4
|
+
url = url instanceof URL ? url : new URL(url);
|
|
5
|
+
if (url.protocol !== "file:") {
|
|
6
|
+
throw new TypeError("Must be a file URL.");
|
|
7
|
+
}
|
|
8
|
+
return url;
|
|
9
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface GlobOptions {
|
|
2
|
+
/** Extended glob syntax.
|
|
3
|
+
* See https://www.linuxjournal.com/content/bash-extended-globbing.
|
|
4
|
+
*
|
|
5
|
+
* @default {true}
|
|
6
|
+
*/
|
|
7
|
+
extended?: boolean;
|
|
8
|
+
/** Globstar syntax.
|
|
9
|
+
* See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
|
|
10
|
+
* If false, `**` is treated like `*`.
|
|
11
|
+
*
|
|
12
|
+
* @default {true}
|
|
13
|
+
*/
|
|
14
|
+
globstar?: boolean;
|
|
15
|
+
/** Whether globstar should be case-insensitive. */
|
|
16
|
+
caseInsensitive?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export type GlobToRegExpOptions = GlobOptions;
|
|
19
|
+
export interface GlobConstants {
|
|
20
|
+
sep: string;
|
|
21
|
+
sepMaybe: string;
|
|
22
|
+
seps: string[];
|
|
23
|
+
globstar: string;
|
|
24
|
+
wildcard: string;
|
|
25
|
+
escapePrefix: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function _globToRegExp(c: GlobConstants, glob: string, { extended, globstar: globstarOption, caseInsensitive, }?: GlobToRegExpOptions): RegExp;
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
const regExpEscapeChars = [
|
|
4
|
+
"!",
|
|
5
|
+
"$",
|
|
6
|
+
"(",
|
|
7
|
+
")",
|
|
8
|
+
"*",
|
|
9
|
+
"+",
|
|
10
|
+
".",
|
|
11
|
+
"=",
|
|
12
|
+
"?",
|
|
13
|
+
"[",
|
|
14
|
+
"\\",
|
|
15
|
+
"^",
|
|
16
|
+
"{",
|
|
17
|
+
"|",
|
|
18
|
+
];
|
|
19
|
+
const rangeEscapeChars = ["-", "\\", "]"];
|
|
20
|
+
export function _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true,
|
|
21
|
+
// os = osType,
|
|
22
|
+
caseInsensitive = false, } = {}) {
|
|
23
|
+
if (glob === "") {
|
|
24
|
+
return /(?!)/;
|
|
25
|
+
}
|
|
26
|
+
// Remove trailing separators.
|
|
27
|
+
let newLength = glob.length;
|
|
28
|
+
for (; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--)
|
|
29
|
+
;
|
|
30
|
+
glob = glob.slice(0, newLength);
|
|
31
|
+
let regExpString = "";
|
|
32
|
+
// Terminates correctly. Trust that `j` is incremented every iteration.
|
|
33
|
+
for (let j = 0; j < glob.length;) {
|
|
34
|
+
let segment = "";
|
|
35
|
+
const groupStack = [];
|
|
36
|
+
let inRange = false;
|
|
37
|
+
let inEscape = false;
|
|
38
|
+
let endsWithSep = false;
|
|
39
|
+
let i = j;
|
|
40
|
+
// Terminates with `i` at the non-inclusive end of the current segment.
|
|
41
|
+
for (; i < glob.length && !c.seps.includes(glob[i]); i++) {
|
|
42
|
+
if (inEscape) {
|
|
43
|
+
inEscape = false;
|
|
44
|
+
const escapeChars = inRange ? rangeEscapeChars : regExpEscapeChars;
|
|
45
|
+
segment += escapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i];
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
if (glob[i] === c.escapePrefix) {
|
|
49
|
+
inEscape = true;
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (glob[i] === "[") {
|
|
53
|
+
if (!inRange) {
|
|
54
|
+
inRange = true;
|
|
55
|
+
segment += "[";
|
|
56
|
+
if (glob[i + 1] === "!") {
|
|
57
|
+
i++;
|
|
58
|
+
segment += "^";
|
|
59
|
+
}
|
|
60
|
+
else if (glob[i + 1] === "^") {
|
|
61
|
+
i++;
|
|
62
|
+
segment += "\\^";
|
|
63
|
+
}
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
else if (glob[i + 1] === ":") {
|
|
67
|
+
let k = i + 1;
|
|
68
|
+
let value = "";
|
|
69
|
+
while (glob[k + 1] !== undefined && glob[k + 1] !== ":") {
|
|
70
|
+
value += glob[k + 1];
|
|
71
|
+
k++;
|
|
72
|
+
}
|
|
73
|
+
if (glob[k + 1] === ":" && glob[k + 2] === "]") {
|
|
74
|
+
i = k + 2;
|
|
75
|
+
if (value === "alnum")
|
|
76
|
+
segment += "\\dA-Za-z";
|
|
77
|
+
else if (value === "alpha")
|
|
78
|
+
segment += "A-Za-z";
|
|
79
|
+
else if (value === "ascii")
|
|
80
|
+
segment += "\x00-\x7F";
|
|
81
|
+
else if (value === "blank")
|
|
82
|
+
segment += "\t ";
|
|
83
|
+
else if (value === "cntrl")
|
|
84
|
+
segment += "\x00-\x1F\x7F";
|
|
85
|
+
else if (value === "digit")
|
|
86
|
+
segment += "\\d";
|
|
87
|
+
else if (value === "graph")
|
|
88
|
+
segment += "\x21-\x7E";
|
|
89
|
+
else if (value === "lower")
|
|
90
|
+
segment += "a-z";
|
|
91
|
+
else if (value === "print")
|
|
92
|
+
segment += "\x20-\x7E";
|
|
93
|
+
else if (value === "punct") {
|
|
94
|
+
segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~";
|
|
95
|
+
}
|
|
96
|
+
else if (value === "space")
|
|
97
|
+
segment += "\\s\v";
|
|
98
|
+
else if (value === "upper")
|
|
99
|
+
segment += "A-Z";
|
|
100
|
+
else if (value === "word")
|
|
101
|
+
segment += "\\w";
|
|
102
|
+
else if (value === "xdigit")
|
|
103
|
+
segment += "\\dA-Fa-f";
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (glob[i] === "]" && inRange) {
|
|
109
|
+
inRange = false;
|
|
110
|
+
segment += "]";
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
if (inRange) {
|
|
114
|
+
if (glob[i] === "\\") {
|
|
115
|
+
segment += `\\\\`;
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
segment += glob[i];
|
|
119
|
+
}
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
if (glob[i] === ")" && groupStack.length > 0 &&
|
|
123
|
+
groupStack[groupStack.length - 1] !== "BRACE") {
|
|
124
|
+
segment += ")";
|
|
125
|
+
const type = groupStack.pop();
|
|
126
|
+
if (type === "!") {
|
|
127
|
+
segment += c.wildcard;
|
|
128
|
+
}
|
|
129
|
+
else if (type !== "@") {
|
|
130
|
+
segment += type;
|
|
131
|
+
}
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
if (glob[i] === "|" && groupStack.length > 0 &&
|
|
135
|
+
groupStack[groupStack.length - 1] !== "BRACE") {
|
|
136
|
+
segment += "|";
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
if (glob[i] === "+" && extended && glob[i + 1] === "(") {
|
|
140
|
+
i++;
|
|
141
|
+
groupStack.push("+");
|
|
142
|
+
segment += "(?:";
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
if (glob[i] === "@" && extended && glob[i + 1] === "(") {
|
|
146
|
+
i++;
|
|
147
|
+
groupStack.push("@");
|
|
148
|
+
segment += "(?:";
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
if (glob[i] === "?") {
|
|
152
|
+
if (extended && glob[i + 1] === "(") {
|
|
153
|
+
i++;
|
|
154
|
+
groupStack.push("?");
|
|
155
|
+
segment += "(?:";
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
segment += ".";
|
|
159
|
+
}
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
if (glob[i] === "!" && extended && glob[i + 1] === "(") {
|
|
163
|
+
i++;
|
|
164
|
+
groupStack.push("!");
|
|
165
|
+
segment += "(?!";
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
if (glob[i] === "{") {
|
|
169
|
+
groupStack.push("BRACE");
|
|
170
|
+
segment += "(?:";
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
if (glob[i] === "}" && groupStack[groupStack.length - 1] === "BRACE") {
|
|
174
|
+
groupStack.pop();
|
|
175
|
+
segment += ")";
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
if (glob[i] === "," && groupStack[groupStack.length - 1] === "BRACE") {
|
|
179
|
+
segment += "|";
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
if (glob[i] === "*") {
|
|
183
|
+
if (extended && glob[i + 1] === "(") {
|
|
184
|
+
i++;
|
|
185
|
+
groupStack.push("*");
|
|
186
|
+
segment += "(?:";
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
const prevChar = glob[i - 1];
|
|
190
|
+
let numStars = 1;
|
|
191
|
+
while (glob[i + 1] === "*") {
|
|
192
|
+
i++;
|
|
193
|
+
numStars++;
|
|
194
|
+
}
|
|
195
|
+
const nextChar = glob[i + 1];
|
|
196
|
+
if (globstarOption && numStars === 2 &&
|
|
197
|
+
[...c.seps, undefined].includes(prevChar) &&
|
|
198
|
+
[...c.seps, undefined].includes(nextChar)) {
|
|
199
|
+
segment += c.globstar;
|
|
200
|
+
endsWithSep = true;
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
segment += c.wildcard;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
segment += regExpEscapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i];
|
|
209
|
+
}
|
|
210
|
+
// Check for unclosed groups or a dangling backslash.
|
|
211
|
+
if (groupStack.length > 0 || inRange || inEscape) {
|
|
212
|
+
// Parse failure. Take all characters from this segment literally.
|
|
213
|
+
segment = "";
|
|
214
|
+
for (const c of glob.slice(j, i)) {
|
|
215
|
+
segment += regExpEscapeChars.includes(c) ? `\\${c}` : c;
|
|
216
|
+
endsWithSep = false;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
regExpString += segment;
|
|
220
|
+
if (!endsWithSep) {
|
|
221
|
+
regExpString += i < glob.length ? c.sep : c.sepMaybe;
|
|
222
|
+
endsWithSep = true;
|
|
223
|
+
}
|
|
224
|
+
// Terminates with `i` at the start of the next segment.
|
|
225
|
+
while (c.seps.includes(glob[i]))
|
|
226
|
+
i++;
|
|
227
|
+
// Check that the next value of `j` is indeed higher than the current value.
|
|
228
|
+
if (!(i > j)) {
|
|
229
|
+
throw new Error("Assertion failure: i > j (potential infinite loop)");
|
|
230
|
+
}
|
|
231
|
+
j = i;
|
|
232
|
+
}
|
|
233
|
+
regExpString = `^${regExpString}$`;
|
|
234
|
+
return new RegExp(regExpString, caseInsensitive ? "i" : "");
|
|
235
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assertArg(path: string): "." | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizeString(path: string, allowAboveRoot: boolean, separator: string, isPathSeparator: (code: number) => boolean): string;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// Copyright the Browserify authors. MIT License.
|
|
3
|
+
// Ported from https://github.com/browserify/path-browserify/
|
|
4
|
+
// This module is browser compatible.
|
|
5
|
+
import { CHAR_DOT, CHAR_FORWARD_SLASH } from "./constants.js";
|
|
6
|
+
// Resolves . and .. elements in a path with directory names
|
|
7
|
+
export function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
|
|
8
|
+
let res = "";
|
|
9
|
+
let lastSegmentLength = 0;
|
|
10
|
+
let lastSlash = -1;
|
|
11
|
+
let dots = 0;
|
|
12
|
+
let code;
|
|
13
|
+
for (let i = 0, len = path.length; i <= len; ++i) {
|
|
14
|
+
if (i < len)
|
|
15
|
+
code = path.charCodeAt(i);
|
|
16
|
+
else if (isPathSeparator(code))
|
|
17
|
+
break;
|
|
18
|
+
else
|
|
19
|
+
code = CHAR_FORWARD_SLASH;
|
|
20
|
+
if (isPathSeparator(code)) {
|
|
21
|
+
if (lastSlash === i - 1 || dots === 1) {
|
|
22
|
+
// NOOP
|
|
23
|
+
}
|
|
24
|
+
else if (lastSlash !== i - 1 && dots === 2) {
|
|
25
|
+
if (res.length < 2 ||
|
|
26
|
+
lastSegmentLength !== 2 ||
|
|
27
|
+
res.charCodeAt(res.length - 1) !== CHAR_DOT ||
|
|
28
|
+
res.charCodeAt(res.length - 2) !== CHAR_DOT) {
|
|
29
|
+
if (res.length > 2) {
|
|
30
|
+
const lastSlashIndex = res.lastIndexOf(separator);
|
|
31
|
+
if (lastSlashIndex === -1) {
|
|
32
|
+
res = "";
|
|
33
|
+
lastSegmentLength = 0;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
res = res.slice(0, lastSlashIndex);
|
|
37
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);
|
|
38
|
+
}
|
|
39
|
+
lastSlash = i;
|
|
40
|
+
dots = 0;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
else if (res.length === 2 || res.length === 1) {
|
|
44
|
+
res = "";
|
|
45
|
+
lastSegmentLength = 0;
|
|
46
|
+
lastSlash = i;
|
|
47
|
+
dots = 0;
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (allowAboveRoot) {
|
|
52
|
+
if (res.length > 0)
|
|
53
|
+
res += `${separator}..`;
|
|
54
|
+
else
|
|
55
|
+
res = "..";
|
|
56
|
+
lastSegmentLength = 2;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
if (res.length > 0)
|
|
61
|
+
res += separator + path.slice(lastSlash + 1, i);
|
|
62
|
+
else
|
|
63
|
+
res = path.slice(lastSlash + 1, i);
|
|
64
|
+
lastSegmentLength = i - lastSlash - 1;
|
|
65
|
+
}
|
|
66
|
+
lastSlash = i;
|
|
67
|
+
dots = 0;
|
|
68
|
+
}
|
|
69
|
+
else if (code === CHAR_DOT && dots !== -1) {
|
|
70
|
+
++dots;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
dots = -1;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return res;
|
|
77
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assertArgs(from: string, to: string): "" | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { assertPath } from "./assert_path.js";
|
|
4
|
+
export function assertArgs(from, to) {
|
|
5
|
+
assertPath(from);
|
|
6
|
+
assertPath(to);
|
|
7
|
+
if (from === to)
|
|
8
|
+
return "";
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function stripTrailingSeparators(segment: string, isSep: (char: number) => boolean): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// Copyright the Browserify authors. MIT License.
|
|
3
|
+
// Ported from https://github.com/browserify/path-browserify/
|
|
4
|
+
// This module is browser compatible.
|
|
5
|
+
export function stripTrailingSeparators(segment, isSep) {
|
|
6
|
+
if (segment.length <= 1) {
|
|
7
|
+
return segment;
|
|
8
|
+
}
|
|
9
|
+
let end = segment.length;
|
|
10
|
+
for (let i = segment.length - 1; i > 0; i--) {
|
|
11
|
+
if (isSep(segment.charCodeAt(i))) {
|
|
12
|
+
end = i;
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
break;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return segment.slice(0, end);
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function encodeWhitespace(string: string): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
const WHITESPACE_ENCODINGS = {
|
|
4
|
+
"\u0009": "%09",
|
|
5
|
+
"\u000A": "%0A",
|
|
6
|
+
"\u000B": "%0B",
|
|
7
|
+
"\u000C": "%0C",
|
|
8
|
+
"\u000D": "%0D",
|
|
9
|
+
"\u0020": "%20",
|
|
10
|
+
};
|
|
11
|
+
export function encodeWhitespace(string) {
|
|
12
|
+
return string.replaceAll(/[\s]/g, (c) => {
|
|
13
|
+
return WHITESPACE_ENCODINGS[c] ?? c;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
@@ -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,18 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
// Keep this up-to-date with Deno.build.os
|
|
4
|
+
import * as dntShim from "../../../../_dnt.shims.js";
|
|
5
|
+
export const osType = (() => {
|
|
6
|
+
// deno-lint-ignore no-explicit-any
|
|
7
|
+
const { Deno } = dntShim.dntGlobalThis;
|
|
8
|
+
if (typeof Deno?.build?.os === "string") {
|
|
9
|
+
return Deno.build.os;
|
|
10
|
+
}
|
|
11
|
+
// deno-lint-ignore no-explicit-any
|
|
12
|
+
const { navigator } = dntShim.dntGlobalThis;
|
|
13
|
+
if (navigator?.appVersion?.includes?.("Win")) {
|
|
14
|
+
return "windows";
|
|
15
|
+
}
|
|
16
|
+
return "linux";
|
|
17
|
+
})();
|
|
18
|
+
export const isWindows = 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,17 @@
|
|
|
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 { basename as posixBasename } from "./posix/basename.js";
|
|
5
|
+
import { basename as windowsBasename } from "./windows/basename.js";
|
|
6
|
+
/**
|
|
7
|
+
* Return the last portion of a `path`.
|
|
8
|
+
* Trailing directory separators are ignored, and optional suffix is removed.
|
|
9
|
+
*
|
|
10
|
+
* @param path - path to extract the name from.
|
|
11
|
+
* @param [suffix] - suffix to remove from extracted name.
|
|
12
|
+
*/
|
|
13
|
+
export function basename(path, suffix = "") {
|
|
14
|
+
return isWindows
|
|
15
|
+
? windowsBasename(path, suffix)
|
|
16
|
+
: posixBasename(path, suffix);
|
|
17
|
+
}
|
|
@@ -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,19 @@
|
|
|
1
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { _common } from "./_common/common.js";
|
|
4
|
+
import { SEP } from "./separator.js";
|
|
5
|
+
/** Determines the common path from a set of paths, using an optional separator,
|
|
6
|
+
* which defaults to the OS default separator.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { common } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
|
|
10
|
+
* const p = common([
|
|
11
|
+
* "./deno/std/path/mod.ts",
|
|
12
|
+
* "./deno/std/fs/mod.ts",
|
|
13
|
+
* ]);
|
|
14
|
+
* console.log(p); // "./deno/std/"
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export function common(paths, sep = SEP) {
|
|
18
|
+
return _common(paths, sep);
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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 { dirname as posixDirname } from "./posix/dirname.js";
|
|
5
|
+
import { dirname as windowsDirname } from "./windows/dirname.js";
|
|
6
|
+
/**
|
|
7
|
+
* Return the directory path of a `path`.
|
|
8
|
+
* @param path - path to extract the directory from.
|
|
9
|
+
*/
|
|
10
|
+
export function dirname(path) {
|
|
11
|
+
return isWindows ? windowsDirname(path) : posixDirname(path);
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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 { extname as posixExtname } from "./posix/extname.js";
|
|
5
|
+
import { extname as windowsExtname } from "./posix/extname.js";
|
|
6
|
+
/**
|
|
7
|
+
* Return the extension of the `path` with leading period.
|
|
8
|
+
* @param path with extension
|
|
9
|
+
* @returns extension (ex. for `file.ts` returns `.ts`)
|
|
10
|
+
*/
|
|
11
|
+
export function extname(path) {
|
|
12
|
+
return isWindows ? windowsExtname(path) : posixExtname(path);
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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 { format as posixFormat } from "./posix/format.js";
|
|
5
|
+
import { format as windowsFormat } from "./windows/format.js";
|
|
6
|
+
/**
|
|
7
|
+
* Generate a path from `FormatInputPathObject` object.
|
|
8
|
+
* @param pathObject with path
|
|
9
|
+
*/
|
|
10
|
+
export function format(pathObject) {
|
|
11
|
+
return isWindows ? windowsFormat(pathObject) : posixFormat(pathObject);
|
|
12
|
+
}
|
|
@@ -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,24 @@
|
|
|
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 { fromFileUrl as posixFromFileUrl } from "./posix/from_file_url.js";
|
|
5
|
+
import { fromFileUrl as windowsFromFileUrl } from "./windows/from_file_url.js";
|
|
6
|
+
/**
|
|
7
|
+
* Converts a file URL to a path string.
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { fromFileUrl } from "https://deno.land/std@$STD_VERSION/path/from_file_url.ts";
|
|
11
|
+
*
|
|
12
|
+
* // posix
|
|
13
|
+
* fromFileUrl("file:///home/foo"); // "/home/foo"
|
|
14
|
+
*
|
|
15
|
+
* // win32
|
|
16
|
+
* fromFileUrl("file:///home/foo"); // "\\home\\foo"
|
|
17
|
+
* fromFileUrl("file:///C:/Users/foo"); // "C:\\Users\\foo"
|
|
18
|
+
* fromFileUrl("file://localhost/home/foo"); // "\\\\localhost\\home\\foo"
|
|
19
|
+
* ```
|
|
20
|
+
* @param url of a file URL
|
|
21
|
+
*/
|
|
22
|
+
export function fromFileUrl(url) {
|
|
23
|
+
return isWindows ? windowsFromFileUrl(url) : posixFromFileUrl(url);
|
|
24
|
+
}
|