@mtkruto/node 0.1.112 → 0.1.114
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/5_client.d.ts +2 -1
- package/esm/5_client.js +2 -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 +76 -8
- package/esm/client/3_types.js +1 -1
- package/esm/client/4_composer.d.ts +22 -0
- package/esm/client/4_composer.js +81 -0
- package/esm/client/{4_client.d.ts → 5_client.d.ts} +87 -12
- package/esm/client/{4_client.js → 5_client.js} +367 -107
- package/esm/client/6_composer.d.ts +4 -0
- package/esm/client/6_composer.js +3 -0
- 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/tl/0_tl_raw_reader.d.ts +1 -0
- package/esm/tl/0_tl_raw_reader.js +3 -0
- package/esm/tl/3_deserialize.js +7 -2
- 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/types/5_inline_query_result.js +7 -0
- 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/5_client.d.ts +2 -1
- package/script/5_client.js +2 -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 +76 -8
- package/script/client/3_types.js +0 -3
- package/script/client/4_composer.d.ts +22 -0
- package/script/client/4_composer.js +88 -0
- package/script/client/{4_client.d.ts → 5_client.d.ts} +87 -12
- package/script/client/{4_client.js → 5_client.js} +369 -108
- package/script/client/6_composer.d.ts +4 -0
- package/script/client/6_composer.js +7 -0
- 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/tl/0_tl_raw_reader.d.ts +1 -0
- package/script/tl/0_tl_raw_reader.js +3 -0
- package/script/tl/3_deserialize.js +7 -2
- 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/types/5_inline_query_result.js +7 -0
- 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,125 @@
|
|
|
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 constants_js_1 = require("../_common/constants.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
|
+
* 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
|
+
(0, relative_js_1.assertArgs)(from, to);
|
|
22
|
+
const fromOrig = (0, resolve_js_1.resolve)(from);
|
|
23
|
+
const toOrig = (0, resolve_js_1.resolve)(to);
|
|
24
|
+
if (fromOrig === toOrig)
|
|
25
|
+
return "";
|
|
26
|
+
from = fromOrig.toLowerCase();
|
|
27
|
+
to = toOrig.toLowerCase();
|
|
28
|
+
if (from === to)
|
|
29
|
+
return "";
|
|
30
|
+
// Trim any leading backslashes
|
|
31
|
+
let fromStart = 0;
|
|
32
|
+
let fromEnd = from.length;
|
|
33
|
+
for (; fromStart < fromEnd; ++fromStart) {
|
|
34
|
+
if (from.charCodeAt(fromStart) !== constants_js_1.CHAR_BACKWARD_SLASH)
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
// Trim trailing backslashes (applicable to UNC paths only)
|
|
38
|
+
for (; fromEnd - 1 > fromStart; --fromEnd) {
|
|
39
|
+
if (from.charCodeAt(fromEnd - 1) !== constants_js_1.CHAR_BACKWARD_SLASH)
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
const fromLen = fromEnd - fromStart;
|
|
43
|
+
// Trim any leading backslashes
|
|
44
|
+
let toStart = 0;
|
|
45
|
+
let toEnd = to.length;
|
|
46
|
+
for (; toStart < toEnd; ++toStart) {
|
|
47
|
+
if (to.charCodeAt(toStart) !== constants_js_1.CHAR_BACKWARD_SLASH)
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
// Trim trailing backslashes (applicable to UNC paths only)
|
|
51
|
+
for (; toEnd - 1 > toStart; --toEnd) {
|
|
52
|
+
if (to.charCodeAt(toEnd - 1) !== constants_js_1.CHAR_BACKWARD_SLASH)
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
const toLen = toEnd - toStart;
|
|
56
|
+
// Compare paths to find the longest common path from root
|
|
57
|
+
const length = fromLen < toLen ? fromLen : toLen;
|
|
58
|
+
let lastCommonSep = -1;
|
|
59
|
+
let i = 0;
|
|
60
|
+
for (; i <= length; ++i) {
|
|
61
|
+
if (i === length) {
|
|
62
|
+
if (toLen > length) {
|
|
63
|
+
if (to.charCodeAt(toStart + i) === constants_js_1.CHAR_BACKWARD_SLASH) {
|
|
64
|
+
// We get here if `from` is the exact base path for `to`.
|
|
65
|
+
// For example: from='C:\\foo\\bar'; to='C:\\foo\\bar\\baz'
|
|
66
|
+
return toOrig.slice(toStart + i + 1);
|
|
67
|
+
}
|
|
68
|
+
else if (i === 2) {
|
|
69
|
+
// We get here if `from` is the device root.
|
|
70
|
+
// For example: from='C:\\'; to='C:\\foo'
|
|
71
|
+
return toOrig.slice(toStart + i);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (fromLen > length) {
|
|
75
|
+
if (from.charCodeAt(fromStart + i) === constants_js_1.CHAR_BACKWARD_SLASH) {
|
|
76
|
+
// We get here if `to` is the exact base path for `from`.
|
|
77
|
+
// For example: from='C:\\foo\\bar'; to='C:\\foo'
|
|
78
|
+
lastCommonSep = i;
|
|
79
|
+
}
|
|
80
|
+
else if (i === 2) {
|
|
81
|
+
// We get here if `to` is the device root.
|
|
82
|
+
// For example: from='C:\\foo\\bar'; to='C:\\'
|
|
83
|
+
lastCommonSep = 3;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
const fromCode = from.charCodeAt(fromStart + i);
|
|
89
|
+
const toCode = to.charCodeAt(toStart + i);
|
|
90
|
+
if (fromCode !== toCode)
|
|
91
|
+
break;
|
|
92
|
+
else if (fromCode === constants_js_1.CHAR_BACKWARD_SLASH)
|
|
93
|
+
lastCommonSep = i;
|
|
94
|
+
}
|
|
95
|
+
// We found a mismatch before the first common path separator was seen, so
|
|
96
|
+
// return the original `to`.
|
|
97
|
+
if (i !== length && lastCommonSep === -1) {
|
|
98
|
+
return toOrig;
|
|
99
|
+
}
|
|
100
|
+
let out = "";
|
|
101
|
+
if (lastCommonSep === -1)
|
|
102
|
+
lastCommonSep = 0;
|
|
103
|
+
// Generate the relative path based on the path difference between `to` and
|
|
104
|
+
// `from`
|
|
105
|
+
for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
|
|
106
|
+
if (i === fromEnd || from.charCodeAt(i) === constants_js_1.CHAR_BACKWARD_SLASH) {
|
|
107
|
+
if (out.length === 0)
|
|
108
|
+
out += "..";
|
|
109
|
+
else
|
|
110
|
+
out += "\\..";
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
// Lastly, append the rest of the destination (`to`) path that comes after
|
|
114
|
+
// the common path parts
|
|
115
|
+
if (out.length > 0) {
|
|
116
|
+
return out + toOrig.slice(toStart + lastCommonSep, toEnd);
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
toStart += lastCommonSep;
|
|
120
|
+
if (toOrig.charCodeAt(toStart) === constants_js_1.CHAR_BACKWARD_SLASH)
|
|
121
|
+
++toStart;
|
|
122
|
+
return toOrig.slice(toStart, toEnd);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
exports.relative = relative;
|
|
@@ -0,0 +1,170 @@
|
|
|
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 constants_js_1 = require("../_common/constants.js");
|
|
31
|
+
const normalize_string_js_1 = require("../_common/normalize_string.js");
|
|
32
|
+
const assert_path_js_1 = require("../_common/assert_path.js");
|
|
33
|
+
const _util_js_1 = require("./_util.js");
|
|
34
|
+
/**
|
|
35
|
+
* Resolves path segments into a `path`
|
|
36
|
+
* @param pathSegments to process to path
|
|
37
|
+
*/
|
|
38
|
+
function resolve(...pathSegments) {
|
|
39
|
+
let resolvedDevice = "";
|
|
40
|
+
let resolvedTail = "";
|
|
41
|
+
let resolvedAbsolute = false;
|
|
42
|
+
for (let i = pathSegments.length - 1; i >= -1; i--) {
|
|
43
|
+
let path;
|
|
44
|
+
// deno-lint-ignore no-explicit-any
|
|
45
|
+
const { Deno } = dntShim.dntGlobalThis;
|
|
46
|
+
if (i >= 0) {
|
|
47
|
+
path = pathSegments[i];
|
|
48
|
+
}
|
|
49
|
+
else if (!resolvedDevice) {
|
|
50
|
+
if (typeof Deno?.cwd !== "function") {
|
|
51
|
+
throw new TypeError("Resolved a drive-letter-less path without a CWD.");
|
|
52
|
+
}
|
|
53
|
+
path = Deno.cwd();
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
if (typeof Deno?.env?.get !== "function" || typeof Deno?.cwd !== "function") {
|
|
57
|
+
throw new TypeError("Resolved a relative path without a CWD.");
|
|
58
|
+
}
|
|
59
|
+
path = Deno.cwd();
|
|
60
|
+
// Verify that a cwd was found and that it actually points
|
|
61
|
+
// to our drive. If not, default to the drive's root.
|
|
62
|
+
if (path === undefined ||
|
|
63
|
+
path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\`) {
|
|
64
|
+
path = `${resolvedDevice}\\`;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
(0, assert_path_js_1.assertPath)(path);
|
|
68
|
+
const len = path.length;
|
|
69
|
+
// Skip empty entries
|
|
70
|
+
if (len === 0)
|
|
71
|
+
continue;
|
|
72
|
+
let rootEnd = 0;
|
|
73
|
+
let device = "";
|
|
74
|
+
let isAbsolute = false;
|
|
75
|
+
const code = path.charCodeAt(0);
|
|
76
|
+
// Try to match a root
|
|
77
|
+
if (len > 1) {
|
|
78
|
+
if ((0, _util_js_1.isPathSeparator)(code)) {
|
|
79
|
+
// Possible UNC root
|
|
80
|
+
// If we started with a separator, we know we at least have an
|
|
81
|
+
// absolute path of some kind (UNC or otherwise)
|
|
82
|
+
isAbsolute = true;
|
|
83
|
+
if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(1))) {
|
|
84
|
+
// Matched double path separator at beginning
|
|
85
|
+
let j = 2;
|
|
86
|
+
let last = j;
|
|
87
|
+
// Match 1 or more non-path separators
|
|
88
|
+
for (; j < len; ++j) {
|
|
89
|
+
if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
if (j < len && j !== last) {
|
|
93
|
+
const firstPart = path.slice(last, j);
|
|
94
|
+
// Matched!
|
|
95
|
+
last = j;
|
|
96
|
+
// Match 1 or more path separators
|
|
97
|
+
for (; j < len; ++j) {
|
|
98
|
+
if (!(0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
if (j < len && j !== last) {
|
|
102
|
+
// Matched!
|
|
103
|
+
last = j;
|
|
104
|
+
// Match 1 or more non-path separators
|
|
105
|
+
for (; j < len; ++j) {
|
|
106
|
+
if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
if (j === len) {
|
|
110
|
+
// We matched a UNC root only
|
|
111
|
+
device = `\\\\${firstPart}\\${path.slice(last)}`;
|
|
112
|
+
rootEnd = j;
|
|
113
|
+
}
|
|
114
|
+
else if (j !== last) {
|
|
115
|
+
// We matched a UNC root with leftovers
|
|
116
|
+
device = `\\\\${firstPart}\\${path.slice(last, j)}`;
|
|
117
|
+
rootEnd = j;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
rootEnd = 1;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
else if ((0, _util_js_1.isWindowsDeviceRoot)(code)) {
|
|
127
|
+
// Possible device root
|
|
128
|
+
if (path.charCodeAt(1) === constants_js_1.CHAR_COLON) {
|
|
129
|
+
device = path.slice(0, 2);
|
|
130
|
+
rootEnd = 2;
|
|
131
|
+
if (len > 2) {
|
|
132
|
+
if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(2))) {
|
|
133
|
+
// Treat separator following drive name as an absolute path
|
|
134
|
+
// indicator
|
|
135
|
+
isAbsolute = true;
|
|
136
|
+
rootEnd = 3;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
else if ((0, _util_js_1.isPathSeparator)(code)) {
|
|
143
|
+
// `path` contains just a path separator
|
|
144
|
+
rootEnd = 1;
|
|
145
|
+
isAbsolute = true;
|
|
146
|
+
}
|
|
147
|
+
if (device.length > 0 &&
|
|
148
|
+
resolvedDevice.length > 0 &&
|
|
149
|
+
device.toLowerCase() !== resolvedDevice.toLowerCase()) {
|
|
150
|
+
// This path points to another device so it is not applicable
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
if (resolvedDevice.length === 0 && device.length > 0) {
|
|
154
|
+
resolvedDevice = device;
|
|
155
|
+
}
|
|
156
|
+
if (!resolvedAbsolute) {
|
|
157
|
+
resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`;
|
|
158
|
+
resolvedAbsolute = isAbsolute;
|
|
159
|
+
}
|
|
160
|
+
if (resolvedAbsolute && resolvedDevice.length > 0)
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
// At this point the path should be resolved to a full absolute path,
|
|
164
|
+
// but handle relative paths to be safe (might happen when Deno.cwd()
|
|
165
|
+
// fails)
|
|
166
|
+
// Normalize the tail path
|
|
167
|
+
resolvedTail = (0, normalize_string_js_1.normalizeString)(resolvedTail, !resolvedAbsolute, "\\", _util_js_1.isPathSeparator);
|
|
168
|
+
return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || ".";
|
|
169
|
+
}
|
|
170
|
+
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,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a path string to a file URL.
|
|
3
|
+
*
|
|
4
|
+
* ```ts
|
|
5
|
+
* import { toFileUrl } from "https://deno.land/std@$STD_VERSION/path/win32.ts";
|
|
6
|
+
*
|
|
7
|
+
* toFileUrl("\\home\\foo"); // new URL("file:///home/foo")
|
|
8
|
+
* toFileUrl("C:\\Users\\foo"); // new URL("file:///C:/Users/foo")
|
|
9
|
+
* toFileUrl("\\\\127.0.0.1\\home\\foo"); // new URL("file://127.0.0.1/home/foo")
|
|
10
|
+
* ```
|
|
11
|
+
* @param path to convert to file URL
|
|
12
|
+
*/
|
|
13
|
+
export declare function toFileUrl(path: string): URL;
|
|
@@ -0,0 +1,35 @@
|
|
|
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/win32.ts";
|
|
13
|
+
*
|
|
14
|
+
* toFileUrl("\\home\\foo"); // new URL("file:///home/foo")
|
|
15
|
+
* toFileUrl("C:\\Users\\foo"); // new URL("file:///C:/Users/foo")
|
|
16
|
+
* toFileUrl("\\\\127.0.0.1\\home\\foo"); // new URL("file://127.0.0.1/home/foo")
|
|
17
|
+
* ```
|
|
18
|
+
* @param path to convert to file URL
|
|
19
|
+
*/
|
|
20
|
+
function toFileUrl(path) {
|
|
21
|
+
if (!(0, is_absolute_js_1.isAbsolute)(path)) {
|
|
22
|
+
throw new TypeError("Must be an absolute path.");
|
|
23
|
+
}
|
|
24
|
+
const [, hostname, pathname] = path.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/);
|
|
25
|
+
const url = new URL("file:///");
|
|
26
|
+
url.pathname = (0, to_file_url_js_1.encodeWhitespace)(pathname.replace(/%/g, "%25"));
|
|
27
|
+
if (hostname !== undefined && hostname !== "localhost") {
|
|
28
|
+
url.hostname = hostname;
|
|
29
|
+
if (!url.hostname) {
|
|
30
|
+
throw new TypeError("Invalid hostname.");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return url;
|
|
34
|
+
}
|
|
35
|
+
exports.toFileUrl = toFileUrl;
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
const constants_js_1 = require("../_common/constants.js");
|
|
7
|
+
const _util_js_1 = require("./_util.js");
|
|
8
|
+
const resolve_js_1 = require("./resolve.js");
|
|
9
|
+
/**
|
|
10
|
+
* Resolves path to a namespace path
|
|
11
|
+
* @param path to resolve to namespace
|
|
12
|
+
*/
|
|
13
|
+
function toNamespacedPath(path) {
|
|
14
|
+
// Note: this will *probably* throw somewhere.
|
|
15
|
+
if (typeof path !== "string")
|
|
16
|
+
return path;
|
|
17
|
+
if (path.length === 0)
|
|
18
|
+
return "";
|
|
19
|
+
const resolvedPath = (0, resolve_js_1.resolve)(path);
|
|
20
|
+
if (resolvedPath.length >= 3) {
|
|
21
|
+
if (resolvedPath.charCodeAt(0) === constants_js_1.CHAR_BACKWARD_SLASH) {
|
|
22
|
+
// Possible UNC root
|
|
23
|
+
if (resolvedPath.charCodeAt(1) === constants_js_1.CHAR_BACKWARD_SLASH) {
|
|
24
|
+
const code = resolvedPath.charCodeAt(2);
|
|
25
|
+
if (code !== constants_js_1.CHAR_QUESTION_MARK && code !== constants_js_1.CHAR_DOT) {
|
|
26
|
+
// Matched non-long UNC root, convert the path to a long UNC path
|
|
27
|
+
return `\\\\?\\UNC\\${resolvedPath.slice(2)}`;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
else if ((0, _util_js_1.isWindowsDeviceRoot)(resolvedPath.charCodeAt(0))) {
|
|
32
|
+
// Possible device root
|
|
33
|
+
if (resolvedPath.charCodeAt(1) === constants_js_1.CHAR_COLON &&
|
|
34
|
+
resolvedPath.charCodeAt(2) === constants_js_1.CHAR_BACKWARD_SLASH) {
|
|
35
|
+
// Matched device root, convert the path to a long UNC path
|
|
36
|
+
return `\\\\?\\${resolvedPath}`;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return path;
|
|
41
|
+
}
|
|
42
|
+
exports.toNamespacedPath = toNamespacedPath;
|
package/script/mod.d.ts
CHANGED
package/script/mod.js
CHANGED
|
@@ -26,8 +26,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
return result;
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.errors = exports.SYSTEM_VERSION = exports.SYSTEM_LANG_CODE = exports.LAYER = exports.LANG_PACK = exports.LANG_CODE = exports.INITIAL_DC = exports.DEVICE_MODEL = exports.APP_VERSION = exports.checkPassword = exports.getRandomId = void 0;
|
|
29
|
+
exports.errors = exports.SYSTEM_VERSION = exports.SYSTEM_LANG_CODE = exports.LAYER = exports.LANG_PACK = exports.LANG_CODE = exports.INITIAL_DC = exports.DEVICE_MODEL = exports.APP_VERSION = exports.checkPassword = exports.getRandomId = exports.getColorName = exports.getColorFromPeerId = void 0;
|
|
30
30
|
var _1_utilities_js_1 = require("./1_utilities.js");
|
|
31
|
+
Object.defineProperty(exports, "getColorFromPeerId", { enumerable: true, get: function () { return _1_utilities_js_1.getColorFromPeerId; } });
|
|
32
|
+
Object.defineProperty(exports, "getColorName", { enumerable: true, get: function () { return _1_utilities_js_1.getColorName; } });
|
|
31
33
|
Object.defineProperty(exports, "getRandomId", { enumerable: true, get: function () { return _1_utilities_js_1.getRandomId; } });
|
|
32
34
|
var _0_password_js_1 = require("./client/0_password.js");
|
|
33
35
|
Object.defineProperty(exports, "checkPassword", { enumerable: true, get: function () { return _0_password_js_1.checkPassword; } });
|
|
@@ -8,6 +8,7 @@ export declare class TLRawReader {
|
|
|
8
8
|
readInt24(signed?: boolean): number;
|
|
9
9
|
readInt32(signed?: boolean): number;
|
|
10
10
|
readInt64(signed?: boolean): bigint;
|
|
11
|
+
readDouble(): number;
|
|
11
12
|
readInt128(signed?: boolean): bigint;
|
|
12
13
|
readInt256(signed?: boolean): bigint;
|
|
13
14
|
readBytes(): Uint8Array;
|
|
@@ -37,6 +37,9 @@ class TLRawReader {
|
|
|
37
37
|
const buffer = this.read(64 / 8);
|
|
38
38
|
return (0, _1_utilities_js_1.bigIntFromBuffer)(buffer, true, signed);
|
|
39
39
|
}
|
|
40
|
+
readDouble() {
|
|
41
|
+
return new DataView(this.read(8).buffer).getFloat64(0, true); // TODO: cover in tests
|
|
42
|
+
}
|
|
40
43
|
readInt128(signed = true) {
|
|
41
44
|
const buffer = this.read(128 / 8);
|
|
42
45
|
return (0, _1_utilities_js_1.bigIntFromBuffer)(buffer, true, signed);
|
|
@@ -31,7 +31,12 @@ function deserializeSingleParam(reader, type, ntype) {
|
|
|
31
31
|
case "boolean":
|
|
32
32
|
return reader.readInt32(false) == 0x997275B5;
|
|
33
33
|
case "number":
|
|
34
|
-
|
|
34
|
+
if (ntype == "double") {
|
|
35
|
+
return reader.readDouble();
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
return reader.readInt32();
|
|
39
|
+
}
|
|
35
40
|
case "string":
|
|
36
41
|
return reader.readString();
|
|
37
42
|
case "true":
|
|
@@ -67,7 +72,7 @@ function deserialize(reader, paramDesc, constructor) {
|
|
|
67
72
|
continue;
|
|
68
73
|
}
|
|
69
74
|
const value = deserializeSingleParam(reader, type, ntype);
|
|
70
|
-
if (value) {
|
|
75
|
+
if (typeof value !== "boolean" || value) {
|
|
71
76
|
params[name] = value;
|
|
72
77
|
}
|
|
73
78
|
}
|
package/script/types/1_chat.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
2
|
import { ChatPhoto } from "./0_chat_photo.js";
|
|
3
|
-
import { Color } from "./0_color.js";
|
|
4
3
|
import { RestrictionReason } from "./0_restriction_reason.js";
|
|
5
4
|
export type ChatType = "private" | "group" | "supergroup" | "channel";
|
|
6
5
|
export declare namespace Chat {
|
|
@@ -9,8 +8,8 @@ export declare namespace Chat {
|
|
|
9
8
|
type: ChatType;
|
|
10
9
|
/** The identifier of the chat. */
|
|
11
10
|
id: number;
|
|
12
|
-
/**
|
|
13
|
-
color:
|
|
11
|
+
/** Identifier of a color that can be displayed instead of the chat's photo. */
|
|
12
|
+
color: number;
|
|
14
13
|
/** The chat's photo. */
|
|
15
14
|
photo?: ChatPhoto;
|
|
16
15
|
}
|
package/script/types/1_chat.js
CHANGED
|
@@ -5,7 +5,6 @@ const _1_utilities_js_1 = require("../1_utilities.js");
|
|
|
5
5
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
6
6
|
const _4_constants_js_1 = require("../4_constants.js");
|
|
7
7
|
const _0_chat_photo_js_1 = require("./0_chat_photo.js");
|
|
8
|
-
const _0_color_js_1 = require("./0_color.js");
|
|
9
8
|
const _0_restriction_reason_js_1 = require("./0_restriction_reason.js");
|
|
10
9
|
function constructChat(chat) {
|
|
11
10
|
if (chat instanceof _2_tl_js_1.types.User) {
|
|
@@ -14,7 +13,7 @@ function constructChat(chat) {
|
|
|
14
13
|
type: "private",
|
|
15
14
|
isBot: chat.bot || false,
|
|
16
15
|
id,
|
|
17
|
-
color: chat.color !== undefined ?
|
|
16
|
+
color: chat.color !== undefined ? chat.color : (0, _1_utilities_js_1.getColorFromPeerId)(id),
|
|
18
17
|
firstName: chat.firstName || "",
|
|
19
18
|
lastName: chat.lastName,
|
|
20
19
|
isScam: chat.scam || false,
|
|
@@ -36,7 +35,7 @@ function constructChat(chat) {
|
|
|
36
35
|
const chat_ = {
|
|
37
36
|
type: "group",
|
|
38
37
|
id,
|
|
39
|
-
color: (0,
|
|
38
|
+
color: (0, _1_utilities_js_1.getColorFromPeerId)(id),
|
|
40
39
|
title: chat.title,
|
|
41
40
|
isCreator: chat.creator || false,
|
|
42
41
|
};
|
|
@@ -52,7 +51,7 @@ function constructChat(chat) {
|
|
|
52
51
|
if (chat.megagroup) {
|
|
53
52
|
chat_ = {
|
|
54
53
|
id,
|
|
55
|
-
color: chat.color !== undefined ?
|
|
54
|
+
color: chat.color !== undefined ? chat.color : (0, _1_utilities_js_1.getColorFromPeerId)(id),
|
|
56
55
|
type: "supergroup",
|
|
57
56
|
title,
|
|
58
57
|
isScam,
|
|
@@ -66,7 +65,7 @@ function constructChat(chat) {
|
|
|
66
65
|
const id = _4_constants_js_1.ZERO_CHANNEL_ID + -Number(chat.id);
|
|
67
66
|
chat_ = {
|
|
68
67
|
id,
|
|
69
|
-
color: chat.color !== undefined ?
|
|
68
|
+
color: chat.color !== undefined ? chat.color : (0, _1_utilities_js_1.getColorFromPeerId)(id),
|
|
70
69
|
type: "channel",
|
|
71
70
|
title,
|
|
72
71
|
isScam,
|
package/script/types/1_user.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
2
|
import { ChatPhoto } from "./0_chat_photo.js";
|
|
3
|
-
import { Color } from "./0_color.js";
|
|
4
3
|
/** This object represents a Telegram user or bot. */
|
|
5
4
|
export interface User {
|
|
6
5
|
/** Unique identifier for this user or bot */
|
|
7
6
|
id: number;
|
|
8
|
-
/**
|
|
9
|
-
color:
|
|
7
|
+
/** Identifier of color that can be displayed instead of the user's photo. */
|
|
8
|
+
color: number;
|
|
10
9
|
/** True, if this user is a bot */
|
|
11
10
|
isBot: boolean;
|
|
12
11
|
/** User's or bot's first name */
|
package/script/types/1_user.js
CHANGED
|
@@ -4,12 +4,11 @@ exports.constructUser = void 0;
|
|
|
4
4
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
5
5
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
6
6
|
const _0_chat_photo_js_1 = require("./0_chat_photo.js");
|
|
7
|
-
const _0_color_js_1 = require("./0_color.js");
|
|
8
7
|
function constructUser(user_) {
|
|
9
8
|
const id = Number(user_.id);
|
|
10
9
|
const user = {
|
|
11
10
|
id,
|
|
12
|
-
color: user_.color !== undefined ?
|
|
11
|
+
color: user_.color !== undefined ? user_.color : (0, _1_utilities_js_1.getColorFromPeerId)(id),
|
|
13
12
|
isBot: user_.bot || false,
|
|
14
13
|
firstName: user_.firstName || "",
|
|
15
14
|
lastName: user_.lastName,
|
|
@@ -161,11 +161,13 @@ async function inlineQueryResultToTlObject(result_, parseText, usernameResolver)
|
|
|
161
161
|
replyMarkup,
|
|
162
162
|
});
|
|
163
163
|
const title = "title" in result_ ? result_.title : undefined;
|
|
164
|
+
const description = "description" in result_ ? result_.description : undefined;
|
|
164
165
|
if (document != null) {
|
|
165
166
|
return new _2_tl_js_1.types.InputBotInlineResult({
|
|
166
167
|
id,
|
|
167
168
|
type,
|
|
168
169
|
title,
|
|
170
|
+
description,
|
|
169
171
|
thumb: thumb == null ? undefined : thumb,
|
|
170
172
|
content: document,
|
|
171
173
|
sendMessage: new _2_tl_js_1.types.InputBotInlineMessageMediaAuto({
|
|
@@ -181,6 +183,7 @@ async function inlineQueryResultToTlObject(result_, parseText, usernameResolver)
|
|
|
181
183
|
id,
|
|
182
184
|
type,
|
|
183
185
|
title,
|
|
186
|
+
description,
|
|
184
187
|
document: new _2_tl_js_1.types.InputDocument({
|
|
185
188
|
id: fileId.params.mediaId,
|
|
186
189
|
accessHash: fileId.params.accessHash,
|
|
@@ -194,6 +197,7 @@ async function inlineQueryResultToTlObject(result_, parseText, usernameResolver)
|
|
|
194
197
|
id,
|
|
195
198
|
type,
|
|
196
199
|
title,
|
|
200
|
+
description,
|
|
197
201
|
sendMessage: new _2_tl_js_1.types.InputBotInlineMessageMediaGeo({
|
|
198
202
|
geoPoint: new _2_tl_js_1.types.InputGeoPoint({
|
|
199
203
|
lat: result_.latitude,
|
|
@@ -212,6 +216,7 @@ async function inlineQueryResultToTlObject(result_, parseText, usernameResolver)
|
|
|
212
216
|
id,
|
|
213
217
|
type,
|
|
214
218
|
title,
|
|
219
|
+
description,
|
|
215
220
|
sendMessage: new _2_tl_js_1.types.InputBotInlineMessageGame({
|
|
216
221
|
replyMarkup,
|
|
217
222
|
}),
|
|
@@ -226,6 +231,7 @@ async function inlineQueryResultToTlObject(result_, parseText, usernameResolver)
|
|
|
226
231
|
id,
|
|
227
232
|
type,
|
|
228
233
|
title,
|
|
234
|
+
description,
|
|
229
235
|
sendMessage: new _2_tl_js_1.types.InputBotInlineMessageText({
|
|
230
236
|
message,
|
|
231
237
|
entities,
|
|
@@ -242,6 +248,7 @@ async function inlineQueryResultToTlObject(result_, parseText, usernameResolver)
|
|
|
242
248
|
id,
|
|
243
249
|
type,
|
|
244
250
|
title,
|
|
251
|
+
description,
|
|
245
252
|
sendMessage: new _2_tl_js_1.types.InputBotInlineMessageMediaVenue({
|
|
246
253
|
geoPoint: new _2_tl_js_1.types.InputGeoPoint({ long: result_.longitude, lat: result_.latitude }),
|
|
247
254
|
address: result_.address,
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type ColorName = "red" | "orange" | "violet" | "green" | "cyan" | "blue" | "pink" | "combination 1" | "combination 2" | "combination 3" | "combination 4" | "combination 5" | "combination 6" | "combination 7" | "combination 8" | "combination 9" | "combination 10" | "combination 11" | "combination 12" | "combination 13" | "combination 14";
|
|
2
|
+
export declare function getColorFromPeerId(id: number): number;
|
|
3
|
+
export declare function getColorName(id: number): ColorName;
|