@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,30 @@
|
|
|
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 assert_path_js_1 = require("../_common/assert_path.js");
|
|
7
|
+
const normalize_js_1 = require("./normalize.js");
|
|
8
|
+
/**
|
|
9
|
+
* Join all given a sequence of `paths`,then normalizes the resulting path.
|
|
10
|
+
* @param paths to be joined and normalized
|
|
11
|
+
*/
|
|
12
|
+
function join(...paths) {
|
|
13
|
+
if (paths.length === 0)
|
|
14
|
+
return ".";
|
|
15
|
+
let joined;
|
|
16
|
+
for (let i = 0, len = paths.length; i < len; ++i) {
|
|
17
|
+
const path = paths[i];
|
|
18
|
+
(0, assert_path_js_1.assertPath)(path);
|
|
19
|
+
if (path.length > 0) {
|
|
20
|
+
if (!joined)
|
|
21
|
+
joined = path;
|
|
22
|
+
else
|
|
23
|
+
joined += `/${path}`;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (!joined)
|
|
27
|
+
return ".";
|
|
28
|
+
return (0, normalize_js_1.normalize)(joined);
|
|
29
|
+
}
|
|
30
|
+
exports.join = join;
|
|
@@ -0,0 +1,30 @@
|
|
|
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.joinGlobs = void 0;
|
|
6
|
+
const join_js_1 = require("./join.js");
|
|
7
|
+
const separator_js_1 = require("./separator.js");
|
|
8
|
+
const normalize_glob_js_1 = require("./normalize_glob.js");
|
|
9
|
+
/** Like join(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
10
|
+
function joinGlobs(globs, { extended = true, globstar = false } = {}) {
|
|
11
|
+
if (!globstar || globs.length === 0) {
|
|
12
|
+
return (0, join_js_1.join)(...globs);
|
|
13
|
+
}
|
|
14
|
+
if (globs.length === 0)
|
|
15
|
+
return ".";
|
|
16
|
+
let joined;
|
|
17
|
+
for (const glob of globs) {
|
|
18
|
+
const path = glob;
|
|
19
|
+
if (path.length > 0) {
|
|
20
|
+
if (!joined)
|
|
21
|
+
joined = path;
|
|
22
|
+
else
|
|
23
|
+
joined += `${separator_js_1.SEP}${path}`;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (!joined)
|
|
27
|
+
return ".";
|
|
28
|
+
return (0, normalize_glob_js_1.normalizeGlob)(joined, { extended, globstar });
|
|
29
|
+
}
|
|
30
|
+
exports.joinGlobs = joinGlobs;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utilities for working with OS-specific file paths.
|
|
3
|
+
*
|
|
4
|
+
* Codes in the examples uses POSIX path but it automatically use Windows path
|
|
5
|
+
* on Windows. Use methods under `posix` or `win32` object instead to handle non
|
|
6
|
+
* platform specific path like:
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { posix, win32 } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
|
|
9
|
+
* const p1 = posix.fromFileUrl("file:///home/foo");
|
|
10
|
+
* const p2 = win32.fromFileUrl("file:///home/foo");
|
|
11
|
+
* console.log(p1); // "/home/foo"
|
|
12
|
+
* console.log(p2); // "\\home\\foo"
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* This module is browser compatible.
|
|
16
|
+
*
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
export declare const sep = "/";
|
|
20
|
+
export declare const delimiter = ":";
|
|
21
|
+
export * from "./basename.js";
|
|
22
|
+
export * from "./dirname.js";
|
|
23
|
+
export * from "./extname.js";
|
|
24
|
+
export * from "./format.js";
|
|
25
|
+
export * from "./from_file_url.js";
|
|
26
|
+
export * from "./is_absolute.js";
|
|
27
|
+
export * from "./join.js";
|
|
28
|
+
export * from "./normalize.js";
|
|
29
|
+
export * from "./parse.js";
|
|
30
|
+
export * from "./relative.js";
|
|
31
|
+
export * from "./resolve.js";
|
|
32
|
+
export * from "./to_file_url.js";
|
|
33
|
+
export * from "./to_namespaced_path.js";
|
|
34
|
+
export * from "./common.js";
|
|
35
|
+
export * from "./separator.js";
|
|
36
|
+
export * from "../_interface.js";
|
|
37
|
+
export * from "./glob_to_regexp.js";
|
|
38
|
+
export * from "./is_glob.js";
|
|
39
|
+
export * from "./join_globs.js";
|
|
40
|
+
export * from "./normalize_glob.js";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
3
|
+
// Copyright the Browserify authors. MIT License.
|
|
4
|
+
// Ported mostly from https://github.com/browserify/path-browserify/
|
|
5
|
+
// This module is browser compatible.
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.delimiter = exports.sep = void 0;
|
|
22
|
+
/**
|
|
23
|
+
* Utilities for working with OS-specific file paths.
|
|
24
|
+
*
|
|
25
|
+
* Codes in the examples uses POSIX path but it automatically use Windows path
|
|
26
|
+
* on Windows. Use methods under `posix` or `win32` object instead to handle non
|
|
27
|
+
* platform specific path like:
|
|
28
|
+
* ```ts
|
|
29
|
+
* import { posix, win32 } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
|
|
30
|
+
* const p1 = posix.fromFileUrl("file:///home/foo");
|
|
31
|
+
* const p2 = win32.fromFileUrl("file:///home/foo");
|
|
32
|
+
* console.log(p1); // "/home/foo"
|
|
33
|
+
* console.log(p2); // "\\home\\foo"
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* This module is browser compatible.
|
|
37
|
+
*
|
|
38
|
+
* @module
|
|
39
|
+
*/
|
|
40
|
+
exports.sep = "/";
|
|
41
|
+
exports.delimiter = ":";
|
|
42
|
+
__exportStar(require("./basename.js"), exports);
|
|
43
|
+
__exportStar(require("./dirname.js"), exports);
|
|
44
|
+
__exportStar(require("./extname.js"), exports);
|
|
45
|
+
__exportStar(require("./format.js"), exports);
|
|
46
|
+
__exportStar(require("./from_file_url.js"), exports);
|
|
47
|
+
__exportStar(require("./is_absolute.js"), exports);
|
|
48
|
+
__exportStar(require("./join.js"), exports);
|
|
49
|
+
__exportStar(require("./normalize.js"), exports);
|
|
50
|
+
__exportStar(require("./parse.js"), exports);
|
|
51
|
+
__exportStar(require("./relative.js"), exports);
|
|
52
|
+
__exportStar(require("./resolve.js"), exports);
|
|
53
|
+
__exportStar(require("./to_file_url.js"), exports);
|
|
54
|
+
__exportStar(require("./to_namespaced_path.js"), exports);
|
|
55
|
+
__exportStar(require("./common.js"), exports);
|
|
56
|
+
__exportStar(require("./separator.js"), exports);
|
|
57
|
+
__exportStar(require("../_interface.js"), exports);
|
|
58
|
+
__exportStar(require("./glob_to_regexp.js"), exports);
|
|
59
|
+
__exportStar(require("./is_glob.js"), exports);
|
|
60
|
+
__exportStar(require("./join_globs.js"), exports);
|
|
61
|
+
__exportStar(require("./normalize_glob.js"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalize the `path`, resolving `'..'` and `'.'` segments.
|
|
3
|
+
* Note that resolving these segments does not necessarily mean that all will be eliminated.
|
|
4
|
+
* A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`.
|
|
5
|
+
* @param path to be normalized
|
|
6
|
+
*/
|
|
7
|
+
export declare function normalize(path: string): string;
|
|
@@ -0,0 +1,29 @@
|
|
|
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.normalize = void 0;
|
|
6
|
+
const normalize_js_1 = require("../_common/normalize.js");
|
|
7
|
+
const normalize_string_js_1 = require("../_common/normalize_string.js");
|
|
8
|
+
const _util_js_1 = require("./_util.js");
|
|
9
|
+
/**
|
|
10
|
+
* Normalize the `path`, resolving `'..'` and `'.'` segments.
|
|
11
|
+
* Note that resolving these segments does not necessarily mean that all will be eliminated.
|
|
12
|
+
* A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`.
|
|
13
|
+
* @param path to be normalized
|
|
14
|
+
*/
|
|
15
|
+
function normalize(path) {
|
|
16
|
+
(0, normalize_js_1.assertArg)(path);
|
|
17
|
+
const isAbsolute = (0, _util_js_1.isPosixPathSeparator)(path.charCodeAt(0));
|
|
18
|
+
const trailingSeparator = (0, _util_js_1.isPosixPathSeparator)(path.charCodeAt(path.length - 1));
|
|
19
|
+
// Normalize the path
|
|
20
|
+
path = (0, normalize_string_js_1.normalizeString)(path, !isAbsolute, "/", _util_js_1.isPosixPathSeparator);
|
|
21
|
+
if (path.length === 0 && !isAbsolute)
|
|
22
|
+
path = ".";
|
|
23
|
+
if (path.length > 0 && trailingSeparator)
|
|
24
|
+
path += "/";
|
|
25
|
+
if (isAbsolute)
|
|
26
|
+
return `/${path}`;
|
|
27
|
+
return path;
|
|
28
|
+
}
|
|
29
|
+
exports.normalize = normalize;
|
|
@@ -0,0 +1,20 @@
|
|
|
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.normalizeGlob = void 0;
|
|
6
|
+
const normalize_js_1 = require("./normalize.js");
|
|
7
|
+
const separator_js_1 = require("./separator.js");
|
|
8
|
+
/** Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
9
|
+
function normalizeGlob(glob, { globstar = false } = {}) {
|
|
10
|
+
if (glob.match(/\0/g)) {
|
|
11
|
+
throw new Error(`Glob contains invalid characters: "${glob}"`);
|
|
12
|
+
}
|
|
13
|
+
if (!globstar) {
|
|
14
|
+
return (0, normalize_js_1.normalize)(glob);
|
|
15
|
+
}
|
|
16
|
+
const s = separator_js_1.SEP_PATTERN.source;
|
|
17
|
+
const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g");
|
|
18
|
+
return (0, normalize_js_1.normalize)(glob.replace(badParentPattern, "\0")).replace(/\0/g, "..");
|
|
19
|
+
}
|
|
20
|
+
exports.normalizeGlob = normalizeGlob;
|
|
@@ -0,0 +1,102 @@
|
|
|
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.parse = void 0;
|
|
6
|
+
const constants_js_1 = require("../_common/constants.js");
|
|
7
|
+
const strip_trailing_separators_js_1 = require("../_common/strip_trailing_separators.js");
|
|
8
|
+
const assert_path_js_1 = require("../_common/assert_path.js");
|
|
9
|
+
const _util_js_1 = require("./_util.js");
|
|
10
|
+
/**
|
|
11
|
+
* Return a `ParsedPath` object of the `path`.
|
|
12
|
+
* @param path to process
|
|
13
|
+
*/
|
|
14
|
+
function parse(path) {
|
|
15
|
+
(0, assert_path_js_1.assertPath)(path);
|
|
16
|
+
const ret = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
17
|
+
if (path.length === 0)
|
|
18
|
+
return ret;
|
|
19
|
+
const isAbsolute = (0, _util_js_1.isPosixPathSeparator)(path.charCodeAt(0));
|
|
20
|
+
let start;
|
|
21
|
+
if (isAbsolute) {
|
|
22
|
+
ret.root = "/";
|
|
23
|
+
start = 1;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
start = 0;
|
|
27
|
+
}
|
|
28
|
+
let startDot = -1;
|
|
29
|
+
let startPart = 0;
|
|
30
|
+
let end = -1;
|
|
31
|
+
let matchedSlash = true;
|
|
32
|
+
let i = path.length - 1;
|
|
33
|
+
// Track the state of characters (if any) we see before our first dot and
|
|
34
|
+
// after any path separator we find
|
|
35
|
+
let preDotState = 0;
|
|
36
|
+
// Get non-dir info
|
|
37
|
+
for (; i >= start; --i) {
|
|
38
|
+
const code = path.charCodeAt(i);
|
|
39
|
+
if ((0, _util_js_1.isPosixPathSeparator)(code)) {
|
|
40
|
+
// If we reached a path separator that was not part of a set of path
|
|
41
|
+
// separators at the end of the string, stop now
|
|
42
|
+
if (!matchedSlash) {
|
|
43
|
+
startPart = i + 1;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
if (end === -1) {
|
|
49
|
+
// We saw the first non-path separator, mark this as the end of our
|
|
50
|
+
// extension
|
|
51
|
+
matchedSlash = false;
|
|
52
|
+
end = i + 1;
|
|
53
|
+
}
|
|
54
|
+
if (code === constants_js_1.CHAR_DOT) {
|
|
55
|
+
// If this is our first dot, mark it as the start of our extension
|
|
56
|
+
if (startDot === -1)
|
|
57
|
+
startDot = i;
|
|
58
|
+
else if (preDotState !== 1)
|
|
59
|
+
preDotState = 1;
|
|
60
|
+
}
|
|
61
|
+
else if (startDot !== -1) {
|
|
62
|
+
// We saw a non-dot and non-path separator before our dot, so we should
|
|
63
|
+
// have a good chance at having a non-empty extension
|
|
64
|
+
preDotState = -1;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (startDot === -1 ||
|
|
68
|
+
end === -1 ||
|
|
69
|
+
// We saw a non-dot character immediately before the dot
|
|
70
|
+
preDotState === 0 ||
|
|
71
|
+
// The (right-most) trimmed path component is exactly '..'
|
|
72
|
+
(preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)) {
|
|
73
|
+
if (end !== -1) {
|
|
74
|
+
if (startPart === 0 && isAbsolute) {
|
|
75
|
+
ret.base = ret.name = path.slice(1, end);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
ret.base = ret.name = path.slice(startPart, end);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
// Fallback to '/' in case there is no basename
|
|
82
|
+
ret.base = ret.base || "/";
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
if (startPart === 0 && isAbsolute) {
|
|
86
|
+
ret.name = path.slice(1, startDot);
|
|
87
|
+
ret.base = path.slice(1, end);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
ret.name = path.slice(startPart, startDot);
|
|
91
|
+
ret.base = path.slice(startPart, end);
|
|
92
|
+
}
|
|
93
|
+
ret.ext = path.slice(startDot, end);
|
|
94
|
+
}
|
|
95
|
+
if (startPart > 0) {
|
|
96
|
+
ret.dir = (0, strip_trailing_separators_js_1.stripTrailingSeparators)(path.slice(0, startPart - 1), _util_js_1.isPosixPathSeparator);
|
|
97
|
+
}
|
|
98
|
+
else if (isAbsolute)
|
|
99
|
+
ret.dir = "/";
|
|
100
|
+
return ret;
|
|
101
|
+
}
|
|
102
|
+
exports.parse = parse;
|
|
@@ -0,0 +1,98 @@
|
|
|
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.relative = void 0;
|
|
6
|
+
const _util_js_1 = require("./_util.js");
|
|
7
|
+
const resolve_js_1 = require("./resolve.js");
|
|
8
|
+
const relative_js_1 = require("../_common/relative.js");
|
|
9
|
+
/**
|
|
10
|
+
* Return the relative path from `from` to `to` based on current working directory.
|
|
11
|
+
*
|
|
12
|
+
* @param from path in current working directory
|
|
13
|
+
* @param to path in current working directory
|
|
14
|
+
*/
|
|
15
|
+
function relative(from, to) {
|
|
16
|
+
(0, relative_js_1.assertArgs)(from, to);
|
|
17
|
+
from = (0, resolve_js_1.resolve)(from);
|
|
18
|
+
to = (0, resolve_js_1.resolve)(to);
|
|
19
|
+
if (from === to)
|
|
20
|
+
return "";
|
|
21
|
+
// Trim any leading backslashes
|
|
22
|
+
let fromStart = 1;
|
|
23
|
+
const fromEnd = from.length;
|
|
24
|
+
for (; fromStart < fromEnd; ++fromStart) {
|
|
25
|
+
if (!(0, _util_js_1.isPosixPathSeparator)(from.charCodeAt(fromStart)))
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
const fromLen = fromEnd - fromStart;
|
|
29
|
+
// Trim any leading backslashes
|
|
30
|
+
let toStart = 1;
|
|
31
|
+
const toEnd = to.length;
|
|
32
|
+
for (; toStart < toEnd; ++toStart) {
|
|
33
|
+
if (!(0, _util_js_1.isPosixPathSeparator)(to.charCodeAt(toStart)))
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
const toLen = toEnd - toStart;
|
|
37
|
+
// Compare paths to find the longest common path from root
|
|
38
|
+
const length = fromLen < toLen ? fromLen : toLen;
|
|
39
|
+
let lastCommonSep = -1;
|
|
40
|
+
let i = 0;
|
|
41
|
+
for (; i <= length; ++i) {
|
|
42
|
+
if (i === length) {
|
|
43
|
+
if (toLen > length) {
|
|
44
|
+
if ((0, _util_js_1.isPosixPathSeparator)(to.charCodeAt(toStart + i))) {
|
|
45
|
+
// We get here if `from` is the exact base path for `to`.
|
|
46
|
+
// For example: from='/foo/bar'; to='/foo/bar/baz'
|
|
47
|
+
return to.slice(toStart + i + 1);
|
|
48
|
+
}
|
|
49
|
+
else if (i === 0) {
|
|
50
|
+
// We get here if `from` is the root
|
|
51
|
+
// For example: from='/'; to='/foo'
|
|
52
|
+
return to.slice(toStart + i);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else if (fromLen > length) {
|
|
56
|
+
if ((0, _util_js_1.isPosixPathSeparator)(from.charCodeAt(fromStart + i))) {
|
|
57
|
+
// We get here if `to` is the exact base path for `from`.
|
|
58
|
+
// For example: from='/foo/bar/baz'; to='/foo/bar'
|
|
59
|
+
lastCommonSep = i;
|
|
60
|
+
}
|
|
61
|
+
else if (i === 0) {
|
|
62
|
+
// We get here if `to` is the root.
|
|
63
|
+
// For example: from='/foo'; to='/'
|
|
64
|
+
lastCommonSep = 0;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
const fromCode = from.charCodeAt(fromStart + i);
|
|
70
|
+
const toCode = to.charCodeAt(toStart + i);
|
|
71
|
+
if (fromCode !== toCode)
|
|
72
|
+
break;
|
|
73
|
+
else if ((0, _util_js_1.isPosixPathSeparator)(fromCode))
|
|
74
|
+
lastCommonSep = i;
|
|
75
|
+
}
|
|
76
|
+
let out = "";
|
|
77
|
+
// Generate the relative path based on the path difference between `to`
|
|
78
|
+
// and `from`
|
|
79
|
+
for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
|
|
80
|
+
if (i === fromEnd || (0, _util_js_1.isPosixPathSeparator)(from.charCodeAt(i))) {
|
|
81
|
+
if (out.length === 0)
|
|
82
|
+
out += "..";
|
|
83
|
+
else
|
|
84
|
+
out += "/..";
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
// Lastly, append the rest of the destination (`to`) path that comes after
|
|
88
|
+
// the common path parts
|
|
89
|
+
if (out.length > 0)
|
|
90
|
+
return out + to.slice(toStart + lastCommonSep);
|
|
91
|
+
else {
|
|
92
|
+
toStart += lastCommonSep;
|
|
93
|
+
if ((0, _util_js_1.isPosixPathSeparator)(to.charCodeAt(toStart)))
|
|
94
|
+
++toStart;
|
|
95
|
+
return to.slice(toStart);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
exports.relative = relative;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.resolve = void 0;
|
|
27
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
28
|
+
// This module is browser compatible.
|
|
29
|
+
const dntShim = __importStar(require("../../../../../_dnt.shims.js"));
|
|
30
|
+
const normalize_string_js_1 = require("../_common/normalize_string.js");
|
|
31
|
+
const assert_path_js_1 = require("../_common/assert_path.js");
|
|
32
|
+
const _util_js_1 = require("./_util.js");
|
|
33
|
+
/**
|
|
34
|
+
* Resolves path segments into a `path`
|
|
35
|
+
* @param pathSegments to process to path
|
|
36
|
+
*/
|
|
37
|
+
function resolve(...pathSegments) {
|
|
38
|
+
let resolvedPath = "";
|
|
39
|
+
let resolvedAbsolute = false;
|
|
40
|
+
for (let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
41
|
+
let path;
|
|
42
|
+
if (i >= 0)
|
|
43
|
+
path = pathSegments[i];
|
|
44
|
+
else {
|
|
45
|
+
// deno-lint-ignore no-explicit-any
|
|
46
|
+
const { Deno } = dntShim.dntGlobalThis;
|
|
47
|
+
if (typeof Deno?.cwd !== "function") {
|
|
48
|
+
throw new TypeError("Resolved a relative path without a CWD.");
|
|
49
|
+
}
|
|
50
|
+
path = Deno.cwd();
|
|
51
|
+
}
|
|
52
|
+
(0, assert_path_js_1.assertPath)(path);
|
|
53
|
+
// Skip empty entries
|
|
54
|
+
if (path.length === 0) {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
resolvedPath = `${path}/${resolvedPath}`;
|
|
58
|
+
resolvedAbsolute = (0, _util_js_1.isPosixPathSeparator)(path.charCodeAt(0));
|
|
59
|
+
}
|
|
60
|
+
// At this point the path should be resolved to a full absolute path, but
|
|
61
|
+
// handle relative paths to be safe (might happen when Deno.cwd() fails)
|
|
62
|
+
// Normalize the path
|
|
63
|
+
resolvedPath = (0, normalize_string_js_1.normalizeString)(resolvedPath, !resolvedAbsolute, "/", _util_js_1.isPosixPathSeparator);
|
|
64
|
+
if (resolvedAbsolute) {
|
|
65
|
+
if (resolvedPath.length > 0)
|
|
66
|
+
return `/${resolvedPath}`;
|
|
67
|
+
else
|
|
68
|
+
return "/";
|
|
69
|
+
}
|
|
70
|
+
else if (resolvedPath.length > 0)
|
|
71
|
+
return resolvedPath;
|
|
72
|
+
else
|
|
73
|
+
return ".";
|
|
74
|
+
}
|
|
75
|
+
exports.resolve = resolve;
|
|
@@ -0,0 +1,7 @@
|
|
|
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.SEP_PATTERN = exports.SEP = void 0;
|
|
6
|
+
exports.SEP = "/";
|
|
7
|
+
exports.SEP_PATTERN = /\/+/;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a path string to a file URL.
|
|
3
|
+
*
|
|
4
|
+
* ```ts
|
|
5
|
+
* import { toFileUrl } from "https://deno.land/std@$STD_VERSION/path/posix.ts";
|
|
6
|
+
*
|
|
7
|
+
* toFileUrl("/home/foo"); // new URL("file:///home/foo")
|
|
8
|
+
* ```
|
|
9
|
+
* @param path to convert to file URL
|
|
10
|
+
*/
|
|
11
|
+
export declare function toFileUrl(path: string): URL;
|
|
@@ -0,0 +1,26 @@
|
|
|
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.toFileUrl = void 0;
|
|
6
|
+
const to_file_url_js_1 = require("../_common/to_file_url.js");
|
|
7
|
+
const is_absolute_js_1 = require("./is_absolute.js");
|
|
8
|
+
/**
|
|
9
|
+
* Converts a path string to a file URL.
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { toFileUrl } from "https://deno.land/std@$STD_VERSION/path/posix.ts";
|
|
13
|
+
*
|
|
14
|
+
* toFileUrl("/home/foo"); // new URL("file:///home/foo")
|
|
15
|
+
* ```
|
|
16
|
+
* @param path to convert to file URL
|
|
17
|
+
*/
|
|
18
|
+
function toFileUrl(path) {
|
|
19
|
+
if (!(0, is_absolute_js_1.isAbsolute)(path)) {
|
|
20
|
+
throw new TypeError("Must be an absolute path.");
|
|
21
|
+
}
|
|
22
|
+
const url = new URL("file:///");
|
|
23
|
+
url.pathname = (0, to_file_url_js_1.encodeWhitespace)(path.replace(/%/g, "%25").replace(/\\/g, "%5C"));
|
|
24
|
+
return url;
|
|
25
|
+
}
|
|
26
|
+
exports.toFileUrl = toFileUrl;
|
|
@@ -0,0 +1,14 @@
|
|
|
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.toNamespacedPath = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Resolves path to a namespace path
|
|
8
|
+
* @param path to resolve to namespace
|
|
9
|
+
*/
|
|
10
|
+
function toNamespacedPath(path) {
|
|
11
|
+
// Non-op on posix systems
|
|
12
|
+
return path;
|
|
13
|
+
}
|
|
14
|
+
exports.toNamespacedPath = toNamespacedPath;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return the relative path from `from` to `to` based on current working directory.
|
|
3
|
+
*
|
|
4
|
+
* An example in windws, for instance:
|
|
5
|
+
* from = 'C:\\orandea\\test\\aaa'
|
|
6
|
+
* to = 'C:\\orandea\\impl\\bbb'
|
|
7
|
+
* The output of the function should be: '..\\..\\impl\\bbb'
|
|
8
|
+
*
|
|
9
|
+
* @param from path in current working directory
|
|
10
|
+
* @param to path in current working directory
|
|
11
|
+
*/
|
|
12
|
+
export declare function relative(from: string, to: 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.relative = void 0;
|
|
6
|
+
const _os_js_1 = require("./_os.js");
|
|
7
|
+
const relative_js_1 = require("./posix/relative.js");
|
|
8
|
+
const relative_js_2 = require("./windows/relative.js");
|
|
9
|
+
/**
|
|
10
|
+
* Return the relative path from `from` to `to` based on current working directory.
|
|
11
|
+
*
|
|
12
|
+
* An example in windws, for instance:
|
|
13
|
+
* from = 'C:\\orandea\\test\\aaa'
|
|
14
|
+
* to = 'C:\\orandea\\impl\\bbb'
|
|
15
|
+
* The output of the function should be: '..\\..\\impl\\bbb'
|
|
16
|
+
*
|
|
17
|
+
* @param from path in current working directory
|
|
18
|
+
* @param to path in current working directory
|
|
19
|
+
*/
|
|
20
|
+
function relative(from, to) {
|
|
21
|
+
return _os_js_1.isWindows ? (0, relative_js_2.relative)(from, to) : (0, relative_js_1.relative)(from, to);
|
|
22
|
+
}
|
|
23
|
+
exports.relative = relative;
|