@mtkruto/node 0.1.170 → 0.1.183
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 +4 -4
- package/esm/0_deps.js +5 -5
- package/esm/4_constants.d.ts +1 -2
- package/esm/4_constants.js +2 -3
- package/esm/5_client.d.ts +2 -2
- package/esm/5_client.js +2 -2
- package/esm/client/0_client_abstract.d.ts +6 -4
- package/esm/client/0_client_abstract.js +11 -5
- package/esm/client/0_message.d.ts +1 -1
- package/esm/client/0_message.js +3 -6
- package/esm/client/1_client_encrypted.d.ts +34 -0
- package/esm/client/1_client_encrypted.js +237 -0
- package/esm/client/{2_client_plain.d.ts → 1_client_plain.d.ts} +3 -0
- package/esm/client/{2_client_plain.js → 1_client_plain.js} +4 -1
- package/esm/client/1_composer.d.ts +2 -3
- package/esm/client/2_message_manager.d.ts +1 -1
- package/esm/client/2_message_manager.js +3 -2
- package/esm/client/4_client.d.ts +50 -37
- package/esm/client/4_client.js +165 -379
- package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_diff.js +6 -3
- package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/encoding/base64.js +2 -1
- package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/normalize_string.js +2 -2
- package/esm/deps/deno.land/std@0.220.1/path/posix/basename.d.ts +17 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/basename.js +9 -0
- package/esm/deps/deno.land/std@0.220.1/path/posix/dirname.d.ts +14 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/dirname.js +9 -0
- package/esm/deps/deno.land/std@0.220.1/path/posix/extname.d.ts +15 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/extname.js +9 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/join.js +1 -1
- package/esm/storage/0_storage.d.ts +7 -1
- package/esm/storage/0_storage.js +22 -2
- package/esm/tl/6_message.d.ts +3 -2
- package/esm/tl/6_message.js +1 -1
- package/esm/tl/7_message_container.d.ts +6 -4
- package/esm/tl/7_message_container.js +22 -7
- package/esm/types/4_inline_query_result.d.ts +1 -1
- package/esm/types/4_inline_query_result.js +4 -0
- package/esm/utilities/0_bigint.d.ts +1 -0
- package/esm/utilities/0_bigint.js +1 -0
- package/package.json +1 -1
- package/script/0_deps.d.ts +4 -4
- package/script/0_deps.js +5 -5
- package/script/4_constants.d.ts +1 -2
- package/script/4_constants.js +3 -4
- package/script/5_client.d.ts +2 -2
- package/script/5_client.js +2 -2
- package/script/client/0_client_abstract.d.ts +6 -4
- package/script/client/0_client_abstract.js +11 -5
- package/script/client/0_message.d.ts +1 -1
- package/script/client/0_message.js +3 -6
- package/script/client/1_client_encrypted.d.ts +34 -0
- package/script/client/1_client_encrypted.js +241 -0
- package/script/client/{2_client_plain.d.ts → 1_client_plain.d.ts} +3 -0
- package/script/client/{2_client_plain.js → 1_client_plain.js} +4 -1
- package/script/client/1_composer.d.ts +2 -3
- package/script/client/2_message_manager.d.ts +1 -1
- package/script/client/2_message_manager.js +3 -2
- package/script/client/4_client.d.ts +50 -37
- package/script/client/4_client.js +161 -375
- package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_diff.js +6 -3
- package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/encoding/base64.js +2 -1
- package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/normalize_string.js +2 -2
- package/script/deps/deno.land/std@0.220.1/path/posix/basename.d.ts +17 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/basename.js +9 -0
- package/script/deps/deno.land/std@0.220.1/path/posix/dirname.d.ts +14 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/dirname.js +9 -0
- package/script/deps/deno.land/std@0.220.1/path/posix/extname.d.ts +15 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/extname.js +9 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/join.js +1 -1
- package/script/storage/0_storage.d.ts +7 -1
- package/script/storage/0_storage.js +22 -2
- package/script/tl/6_message.d.ts +3 -2
- package/script/tl/6_message.js +1 -1
- package/script/tl/7_message_container.d.ts +6 -4
- package/script/tl/7_message_container.js +20 -5
- package/script/types/4_inline_query_result.d.ts +1 -1
- package/script/types/4_inline_query_result.js +4 -0
- package/script/utilities/0_bigint.d.ts +1 -0
- package/script/utilities/0_bigint.js +1 -0
- package/esm/client/5_composer.d.ts +0 -4
- package/esm/client/5_composer.js +0 -3
- package/script/client/5_composer.d.ts +0 -4
- package/script/client/5_composer.js +0 -7
- package/script/deps/deno.land/std@0.219.0/path/posix/basename.d.ts +0 -8
- package/script/deps/deno.land/std@0.219.0/path/posix/dirname.d.ts +0 -5
- package/script/deps/deno.land/std@0.219.0/path/posix/extname.d.ts +0 -6
- package/script/deps/deno.land/std@0.219.0/path/windows/basename.d.ts +0 -8
- package/script/deps/deno.land/std@0.219.0/path/windows/dirname.d.ts +0 -5
- package/script/deps/deno.land/std@0.219.0/path/windows/extname.d.ts +0 -6
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_diff.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_almost_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_array_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_exists.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_false.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_greater.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_greater.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_greater_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_is_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_less.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_less.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_less_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_less_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_object_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_string_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/fail.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/unimplemented.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/unreachable.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/encoding/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/encoding/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/encoding/base64.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/fmt/colors.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/fmt/colors.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/_db.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/_db.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/content_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/content_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/extension.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/extension.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/extensions_by_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/extensions_by_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/format_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/format_media_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/get_charset.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/get_charset.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/parse_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/parse_media_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/type_by_extension.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/type_by_extension.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/assert_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/assert_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/glob_to_reg_exp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_interface.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_interface.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_os.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_os.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0/path/posix → std@0.220.1/path/windows}/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0/path/posix → std@0.220.1/path/windows}/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0/path/posix → std@0.220.1/path/windows}/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_diff.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_almost_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_array_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_exists.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_false.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_greater.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_greater.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_greater_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_is_error.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_less.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_less.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_less_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_less_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_match.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_match.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_not_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_object_match.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_string_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/equal.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/fail.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/unimplemented.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/assert/unreachable.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/encoding/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/encoding/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/encoding/base64.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/fmt/colors.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/fmt/colors.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/_db.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/_db.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/content_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/content_type.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/extension.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/extension.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/extensions_by_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/extensions_by_type.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/format_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/format_media_type.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/get_charset.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/get_charset.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/parse_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/parse_media_type.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/type_by_extension.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/type_by_extension.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/assert_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/assert_path.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/common.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/glob_to_reg_exp.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/normalize_string.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/strip_trailing_separators.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_common/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_interface.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_interface.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_os.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/_os.js +0 -0
- /package/{esm/deps/deno.land/std@0.219.0/path/windows → script/deps/deno.land/std@0.220.1/path}/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/common.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/constants.js +0 -0
- /package/{esm/deps/deno.land/std@0.219.0/path/windows → script/deps/deno.land/std@0.220.1/path}/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/dirname.js +0 -0
- /package/{esm/deps/deno.land/std@0.219.0/path/windows → script/deps/deno.land/std@0.220.1/path}/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/join.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/common.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/posix/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0/path → std@0.220.1/path/windows}/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/common.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0/path → std@0.220.1/path/windows}/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0/path → std@0.220.1/path/windows}/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/join.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.220.1}/path/windows/to_namespaced_path.js +0 -0
package/esm/0_deps.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from "./deps/deno.land/std@0.
|
|
2
|
-
export * as path from "./deps/deno.land/std@0.
|
|
3
|
-
export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.
|
|
4
|
-
import { contentType as contentType_ } from "./deps/deno.land/std@0.
|
|
1
|
+
export * from "./deps/deno.land/std@0.220.1/assert/mod.js";
|
|
2
|
+
export * as path from "./deps/deno.land/std@0.220.1/path/mod.js";
|
|
3
|
+
export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.220.1/encoding/base64.js";
|
|
4
|
+
import { contentType as contentType_ } from "./deps/deno.land/std@0.220.1/media_types/content_type.js";
|
|
5
5
|
export declare const contentType: typeof contentType_;
|
|
6
6
|
export declare function extension(mimeType: string): string;
|
|
7
7
|
export { ctr256, factorize, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.3.3/mod.js";
|
package/esm/0_deps.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from "./deps/deno.land/std@0.
|
|
2
|
-
export * as path from "./deps/deno.land/std@0.
|
|
3
|
-
export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.
|
|
4
|
-
import { contentType as contentType_ } from "./deps/deno.land/std@0.
|
|
1
|
+
export * from "./deps/deno.land/std@0.220.1/assert/mod.js";
|
|
2
|
+
export * as path from "./deps/deno.land/std@0.220.1/path/mod.js";
|
|
3
|
+
export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.220.1/encoding/base64.js";
|
|
4
|
+
import { contentType as contentType_ } from "./deps/deno.land/std@0.220.1/media_types/content_type.js";
|
|
5
5
|
export const contentType = (extentionOrType) => {
|
|
6
6
|
if (extentionOrType == "tgs") {
|
|
7
7
|
return "application/x-tgsticker";
|
|
@@ -10,7 +10,7 @@ export const contentType = (extentionOrType) => {
|
|
|
10
10
|
return contentType_(extentionOrType);
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
|
-
import { extension as extension_ } from "./deps/deno.land/std@0.
|
|
13
|
+
import { extension as extension_ } from "./deps/deno.land/std@0.220.1/media_types/extension.js";
|
|
14
14
|
export function extension(mimeType) {
|
|
15
15
|
if (mimeType == "application/x-tgsticker") {
|
|
16
16
|
return "tgs";
|
package/esm/4_constants.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { DC } from "./3_transport.js";
|
|
2
|
-
export declare const ACK_THRESHOLD = 10;
|
|
3
2
|
export type PublicKeys = readonly [bigint, [bigint, bigint]][];
|
|
4
3
|
export declare const PUBLIC_KEYS: PublicKeys;
|
|
5
4
|
export declare const INITIAL_DC: DC;
|
|
6
5
|
export declare const LAYER = 176;
|
|
7
|
-
export declare const APP_VERSION = "MTKruto 0.1.
|
|
6
|
+
export declare const APP_VERSION = "MTKruto 0.1.180";
|
|
8
7
|
export declare const DEVICE_MODEL: string;
|
|
9
8
|
export declare const LANG_CODE: string;
|
|
10
9
|
export declare const LANG_PACK = "";
|
package/esm/4_constants.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as dntShim from "./_dnt.shims.js";
|
|
2
|
-
export const ACK_THRESHOLD = 10;
|
|
3
2
|
export const PUBLIC_KEYS = Object.freeze([
|
|
4
3
|
[
|
|
5
4
|
1562291298945373506n,
|
|
@@ -53,9 +52,9 @@ export const PUBLIC_KEYS = Object.freeze([
|
|
|
53
52
|
]);
|
|
54
53
|
export const INITIAL_DC = "2";
|
|
55
54
|
export const LAYER = 176;
|
|
56
|
-
export const APP_VERSION = "MTKruto 0.1.
|
|
55
|
+
export const APP_VERSION = "MTKruto 0.1.180";
|
|
57
56
|
// @ts-ignore: lib
|
|
58
|
-
export const DEVICE_MODEL = typeof dntShim.Deno === "undefined" ? typeof navigator === "undefined" ? typeof process === "undefined" ? "Unknown" : process.platform + "-" + process.arch : navigator.userAgent.split(" ")[0] : dntShim.Deno.build.os + "-" + dntShim.Deno.build.arch;
|
|
57
|
+
export const DEVICE_MODEL = typeof dntShim.Deno === "undefined" ? typeof navigator === "undefined" ? typeof process === "undefined" ? "Unknown" : process.platform + "-" + process.arch : (navigator.userAgent.split(" ")[0] || "Unknown") : dntShim.Deno.build.os + "-" + dntShim.Deno.build.arch;
|
|
59
58
|
export const LANG_CODE = typeof navigator === "undefined" || typeof navigator.language !== "string" ? "en" : navigator.language.split("-")[0];
|
|
60
59
|
export const LANG_PACK = "";
|
|
61
60
|
export const SYSTEM_LANG_CODE = LANG_CODE;
|
package/esm/5_client.d.ts
CHANGED
package/esm/5_client.js
CHANGED
|
@@ -16,16 +16,18 @@ export interface ClientAbstractParams {
|
|
|
16
16
|
}
|
|
17
17
|
export declare abstract class ClientAbstract {
|
|
18
18
|
#private;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
readonly initialDc: DC;
|
|
20
|
+
transportProvider: TransportProvider;
|
|
21
|
+
readonly cdn: boolean;
|
|
22
22
|
protected transport?: ReturnType<TransportProvider>;
|
|
23
23
|
constructor(params?: ClientAbstractParams);
|
|
24
|
-
|
|
24
|
+
stateChangeHandler?: (connected: boolean) => void;
|
|
25
|
+
get dc(): DC;
|
|
25
26
|
get dcId(): number;
|
|
26
27
|
setDc(dc: DC): MaybePromise<void>;
|
|
27
28
|
get connected(): boolean;
|
|
28
29
|
connect(): Promise<void>;
|
|
29
30
|
reconnect(dc?: DC): Promise<void>;
|
|
30
31
|
disconnect(): Promise<void>;
|
|
32
|
+
get disconnected(): boolean;
|
|
31
33
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
1
6
|
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
7
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
8
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
9
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
10
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
11
|
};
|
|
7
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
-
};
|
|
12
12
|
var _ClientAbstract_dc;
|
|
13
13
|
import { initTgCrypto } from "../0_deps.js";
|
|
14
14
|
import { transportProviderWebSocket } from "../3_transport.js";
|
|
@@ -50,6 +50,9 @@ export class ClientAbstract {
|
|
|
50
50
|
this.transportProvider = params?.transportProvider ?? transportProviderWebSocket();
|
|
51
51
|
this.cdn = params?.cdn ?? false;
|
|
52
52
|
}
|
|
53
|
+
get dc() {
|
|
54
|
+
return __classPrivateFieldGet(this, _ClientAbstract_dc, "f") ?? this.initialDc;
|
|
55
|
+
}
|
|
53
56
|
get dcId() {
|
|
54
57
|
if (!this.transport) {
|
|
55
58
|
throw new Error("Not connected");
|
|
@@ -84,5 +87,8 @@ export class ClientAbstract {
|
|
|
84
87
|
await this.transport.transport.deinitialize();
|
|
85
88
|
await this.transport.connection.close();
|
|
86
89
|
}
|
|
90
|
+
get disconnected() {
|
|
91
|
+
return !this.transport?.transport.initialized;
|
|
92
|
+
}
|
|
87
93
|
}
|
|
88
94
|
_ClientAbstract_dc = new WeakMap();
|
|
@@ -5,5 +5,5 @@ export declare function unpackUnencryptedMessage(buffer: Uint8Array): {
|
|
|
5
5
|
messageId: bigint;
|
|
6
6
|
message: Uint8Array;
|
|
7
7
|
};
|
|
8
|
-
export declare function encryptMessage(message: Message_, authKey: Uint8Array, authKeyId: bigint, salt: bigint, sessionId: bigint): Promise<Uint8Array>;
|
|
8
|
+
export declare function encryptMessage(message: Message_ | MessageContainer, authKey: Uint8Array, authKeyId: bigint, salt: bigint, sessionId: bigint): Promise<Uint8Array>;
|
|
9
9
|
export declare function decryptMessage(buffer: Uint8Array, authKey: Uint8Array, authKeyId: bigint, _sessionId: bigint): Promise<Message_ | MessageContainer>;
|
package/esm/client/0_message.js
CHANGED
|
@@ -29,14 +29,10 @@ export function unpackUnencryptedMessage(buffer) {
|
|
|
29
29
|
return { messageId, message };
|
|
30
30
|
}
|
|
31
31
|
export async function encryptMessage(message, authKey, authKeyId, salt, sessionId) {
|
|
32
|
-
const encoded = message.body[serialize]();
|
|
33
32
|
const payloadWriter = new TLWriter();
|
|
34
33
|
payloadWriter.writeInt64(salt);
|
|
35
34
|
payloadWriter.writeInt64(sessionId);
|
|
36
|
-
payloadWriter.
|
|
37
|
-
payloadWriter.writeInt32(message.seqNo);
|
|
38
|
-
payloadWriter.writeInt32(encoded.length);
|
|
39
|
-
payloadWriter.write(encoded);
|
|
35
|
+
payloadWriter.write(message[serialize]());
|
|
40
36
|
payloadWriter.write(new Uint8Array(mod(-(payloadWriter.buffer.length + 12), 16) + 12));
|
|
41
37
|
const payload = payloadWriter.buffer;
|
|
42
38
|
const messageKey = (await sha256(concat(authKey.subarray(88, 120), payload))).subarray(8, 24);
|
|
@@ -70,7 +66,8 @@ export async function decryptMessage(buffer, authKey, authKeyId, _sessionId) {
|
|
|
70
66
|
plainReader = new TLReader(plainReader.read(length));
|
|
71
67
|
const cid = plainReader.readInt32(false);
|
|
72
68
|
if (cid == MessageContainer[id]) {
|
|
73
|
-
|
|
69
|
+
const messages = MessageContainer.deserialize(plainReader.buffer);
|
|
70
|
+
return new MessageContainer(mid, seqno, messages);
|
|
74
71
|
}
|
|
75
72
|
else if (cid == RPCResult[id]) {
|
|
76
73
|
const body = RPCResult.deserialize(plainReader.buffer);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { enums, functions, ReadObject, TLObject, types } from "../2_tl.js";
|
|
2
|
+
import { ClientAbstract } from "./0_client_abstract.js";
|
|
3
|
+
import { ClientAbstractParams } from "./0_client_abstract.js";
|
|
4
|
+
export type ErrorSource = "deserialization" | "decryption" | "unknown";
|
|
5
|
+
export interface Handlers {
|
|
6
|
+
serverSaltReassigned?: (newServerSalt: bigint) => void;
|
|
7
|
+
updates?: (updates: enums.Updates | enums.Update, call: TLObject | null, callback?: () => void) => void;
|
|
8
|
+
result?: (result: ReadObject, callback: () => void) => void;
|
|
9
|
+
error?: (err: unknown, source: ErrorSource) => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* An MTProto client for making encrypted connections. Most users won't need to interact with this. Used internally by `Client`.
|
|
13
|
+
*
|
|
14
|
+
* There are a few things to note:
|
|
15
|
+
*
|
|
16
|
+
* - This is a bare client and it stores nothing.
|
|
17
|
+
* - It expects an authorization key to be present before invoking any method.
|
|
18
|
+
* - Authorization must be set using `setAuthKey`.
|
|
19
|
+
* - Incoming packets that aren't a reply to a specific call are passed to the assigned handlers.
|
|
20
|
+
* - It doesn't uncompress compressed packets.
|
|
21
|
+
*/
|
|
22
|
+
export declare class ClientEncrypted extends ClientAbstract {
|
|
23
|
+
#private;
|
|
24
|
+
handlers: Handlers;
|
|
25
|
+
constructor(params?: ClientAbstractParams);
|
|
26
|
+
connect(): Promise<void>;
|
|
27
|
+
setAuthKey(key: Uint8Array): Promise<void>;
|
|
28
|
+
get authKey(): Uint8Array;
|
|
29
|
+
set serverSalt(serverSalt: bigint);
|
|
30
|
+
get serverSalt(): bigint;
|
|
31
|
+
invoke<T extends (functions.Function<unknown> | types.Type) = functions.Function<unknown>>(function_: T): Promise<T extends functions.Function<unknown> ? T["__R"] : void>;
|
|
32
|
+
invoke<T extends (functions.Function<unknown> | types.Type) = functions.Function<unknown>>(function_: T, noWait: true): Promise<void>;
|
|
33
|
+
invoke<T extends (functions.Function<unknown> | types.Type) = functions.Function<unknown>>(function_: T, noWait?: boolean): Promise<T | void>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _ClientEncrypted_instances, _ClientEncrypted_authKey, _ClientEncrypted_authKeyId, _ClientEncrypted_sessionId, _ClientEncrypted_state, _ClientEncrypted_toAcknowledge, _ClientEncrypted_recentAcks, _ClientEncrypted_promises, _ClientEncrypted_L, _ClientEncrypted_LreceiveLoop, _ClientEncrypted_Linvoke, _ClientEncrypted_nextMessageId, _ClientEncrypted_nextSeqNo, _ClientEncrypted_sendMessage, _ClientEncrypted_receiveLoop;
|
|
13
|
+
import { gunzip } from "../0_deps.js";
|
|
14
|
+
import { bigIntFromBuffer, CacheMap, drop, getLogger, getRandomBigInt, sha1, UNREACHABLE } from "../1_utilities.js";
|
|
15
|
+
import { Message_, MessageContainer, name, RPCResult, TLError, TLReader, types } from "../2_tl.js";
|
|
16
|
+
import { upgradeInstance } from "../4_errors.js";
|
|
17
|
+
import { ClientAbstract } from "./0_client_abstract.js";
|
|
18
|
+
import { decryptMessage, encryptMessage, getMessageId } from "./0_message.js";
|
|
19
|
+
import { ConnectionError } from "./0_types.js";
|
|
20
|
+
// global ClientEncrypted ID counter for logs
|
|
21
|
+
let id = 0;
|
|
22
|
+
/**
|
|
23
|
+
* An MTProto client for making encrypted connections. Most users won't need to interact with this. Used internally by `Client`.
|
|
24
|
+
*
|
|
25
|
+
* There are a few things to note:
|
|
26
|
+
*
|
|
27
|
+
* - This is a bare client and it stores nothing.
|
|
28
|
+
* - It expects an authorization key to be present before invoking any method.
|
|
29
|
+
* - Authorization must be set using `setAuthKey`.
|
|
30
|
+
* - Incoming packets that aren't a reply to a specific call are passed to the assigned handlers.
|
|
31
|
+
* - It doesn't uncompress compressed packets.
|
|
32
|
+
*/
|
|
33
|
+
export class ClientEncrypted extends ClientAbstract {
|
|
34
|
+
constructor(params) {
|
|
35
|
+
super(params);
|
|
36
|
+
_ClientEncrypted_instances.add(this);
|
|
37
|
+
_ClientEncrypted_authKey.set(this, new Uint8Array());
|
|
38
|
+
_ClientEncrypted_authKeyId.set(this, 0n);
|
|
39
|
+
_ClientEncrypted_sessionId.set(this, getRandomBigInt(8, true, false));
|
|
40
|
+
_ClientEncrypted_state.set(this, { serverSalt: 0n, seqNo: 0, messageId: 0n });
|
|
41
|
+
_ClientEncrypted_toAcknowledge.set(this, new Set());
|
|
42
|
+
_ClientEncrypted_recentAcks.set(this, new CacheMap(20));
|
|
43
|
+
_ClientEncrypted_promises.set(this, new Map());
|
|
44
|
+
// loggers
|
|
45
|
+
_ClientEncrypted_L.set(this, void 0);
|
|
46
|
+
_ClientEncrypted_LreceiveLoop.set(this, void 0);
|
|
47
|
+
_ClientEncrypted_Linvoke.set(this, void 0);
|
|
48
|
+
// receive loop handlers
|
|
49
|
+
Object.defineProperty(this, "handlers", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
configurable: true,
|
|
52
|
+
writable: true,
|
|
53
|
+
value: {}
|
|
54
|
+
});
|
|
55
|
+
const L = __classPrivateFieldSet(this, _ClientEncrypted_L, getLogger("ClientEncrypted").client(id++), "f");
|
|
56
|
+
__classPrivateFieldSet(this, _ClientEncrypted_LreceiveLoop, L.branch("receiveLoop"), "f");
|
|
57
|
+
__classPrivateFieldSet(this, _ClientEncrypted_Linvoke, L.branch("invoke"), "f");
|
|
58
|
+
}
|
|
59
|
+
async connect() {
|
|
60
|
+
await super.connect();
|
|
61
|
+
drop(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_receiveLoop).call(this)); // TODO: ability to join this promise
|
|
62
|
+
}
|
|
63
|
+
async setAuthKey(key) {
|
|
64
|
+
const hash = await sha1(key);
|
|
65
|
+
__classPrivateFieldSet(this, _ClientEncrypted_authKeyId, bigIntFromBuffer(hash.slice(-8), true, false), "f");
|
|
66
|
+
__classPrivateFieldSet(this, _ClientEncrypted_authKey, key, "f");
|
|
67
|
+
}
|
|
68
|
+
get authKey() {
|
|
69
|
+
return __classPrivateFieldGet(this, _ClientEncrypted_authKey, "f");
|
|
70
|
+
}
|
|
71
|
+
set serverSalt(serverSalt) {
|
|
72
|
+
__classPrivateFieldGet(this, _ClientEncrypted_state, "f").serverSalt = serverSalt;
|
|
73
|
+
}
|
|
74
|
+
get serverSalt() {
|
|
75
|
+
return __classPrivateFieldGet(this, _ClientEncrypted_state, "f").serverSalt;
|
|
76
|
+
}
|
|
77
|
+
async invoke(function_, noWait) {
|
|
78
|
+
const messageId = __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextMessageId).call(this);
|
|
79
|
+
const message__ = new Message_(messageId, __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextSeqNo).call(this, true), function_);
|
|
80
|
+
let message_;
|
|
81
|
+
let container = undefined;
|
|
82
|
+
if (__classPrivateFieldGet(this, _ClientEncrypted_toAcknowledge, "f").size) {
|
|
83
|
+
const ack = new Message_(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextMessageId).call(this), __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextSeqNo).call(this, false), new types.Msgs_ack({ msg_ids: [...__classPrivateFieldGet(this, _ClientEncrypted_toAcknowledge, "f")] }));
|
|
84
|
+
__classPrivateFieldGet(this, _ClientEncrypted_recentAcks, "f").set(ack.id, { container, message: ack });
|
|
85
|
+
message_ = new MessageContainer(container = __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextMessageId).call(this), __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextSeqNo).call(this, false), [message__, ack]);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
message_ = message__;
|
|
89
|
+
}
|
|
90
|
+
await __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, message_);
|
|
91
|
+
__classPrivateFieldGet(this, _ClientEncrypted_Linvoke, "f").debug("invoked", function_[name]);
|
|
92
|
+
if (noWait) {
|
|
93
|
+
__classPrivateFieldGet(this, _ClientEncrypted_promises, "f").set(messageId, {
|
|
94
|
+
container,
|
|
95
|
+
message: message__,
|
|
96
|
+
call: function_,
|
|
97
|
+
});
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
return await new Promise((resolve, reject) => {
|
|
101
|
+
__classPrivateFieldGet(this, _ClientEncrypted_promises, "f").set(messageId, { container, message: message__, resolve, reject, call: function_ });
|
|
102
|
+
}).then((v) => v);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
_ClientEncrypted_authKey = new WeakMap(), _ClientEncrypted_authKeyId = new WeakMap(), _ClientEncrypted_sessionId = new WeakMap(), _ClientEncrypted_state = new WeakMap(), _ClientEncrypted_toAcknowledge = new WeakMap(), _ClientEncrypted_recentAcks = new WeakMap(), _ClientEncrypted_promises = new WeakMap(), _ClientEncrypted_L = new WeakMap(), _ClientEncrypted_LreceiveLoop = new WeakMap(), _ClientEncrypted_Linvoke = new WeakMap(), _ClientEncrypted_instances = new WeakSet(), _ClientEncrypted_nextMessageId = function _ClientEncrypted_nextMessageId() {
|
|
106
|
+
return __classPrivateFieldGet(this, _ClientEncrypted_state, "f").messageId = getMessageId(__classPrivateFieldGet(this, _ClientEncrypted_state, "f").messageId);
|
|
107
|
+
}, _ClientEncrypted_nextSeqNo = function _ClientEncrypted_nextSeqNo(contentRelated) {
|
|
108
|
+
let seqNo = __classPrivateFieldGet(this, _ClientEncrypted_state, "f").seqNo * 2;
|
|
109
|
+
if (contentRelated) {
|
|
110
|
+
seqNo++;
|
|
111
|
+
__classPrivateFieldGet(this, _ClientEncrypted_state, "f").seqNo++;
|
|
112
|
+
}
|
|
113
|
+
return seqNo;
|
|
114
|
+
}, _ClientEncrypted_sendMessage = async function _ClientEncrypted_sendMessage(message) {
|
|
115
|
+
const payload = await encryptMessage(message, __classPrivateFieldGet(this, _ClientEncrypted_authKey, "f"), __classPrivateFieldGet(this, _ClientEncrypted_authKeyId, "f"), __classPrivateFieldGet(this, _ClientEncrypted_state, "f").serverSalt, __classPrivateFieldGet(this, _ClientEncrypted_sessionId, "f"));
|
|
116
|
+
await this.transport.transport.send(payload);
|
|
117
|
+
}, _ClientEncrypted_receiveLoop = async function _ClientEncrypted_receiveLoop() {
|
|
118
|
+
if (!this.transport) {
|
|
119
|
+
UNREACHABLE();
|
|
120
|
+
}
|
|
121
|
+
while (this.connected) {
|
|
122
|
+
try {
|
|
123
|
+
const buffer = await this.transport.transport.receive();
|
|
124
|
+
__classPrivateFieldGet(this, _ClientEncrypted_L, "f").inBin(buffer);
|
|
125
|
+
let decrypted;
|
|
126
|
+
try {
|
|
127
|
+
decrypted = await (decryptMessage(buffer, __classPrivateFieldGet(this, _ClientEncrypted_authKey, "f"), __classPrivateFieldGet(this, _ClientEncrypted_authKeyId, "f"), __classPrivateFieldGet(this, _ClientEncrypted_sessionId, "f")));
|
|
128
|
+
__classPrivateFieldGet(this, _ClientEncrypted_L, "f").in(decrypted);
|
|
129
|
+
}
|
|
130
|
+
catch (err) {
|
|
131
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").error("failed to decrypt message:", err);
|
|
132
|
+
this.handlers.error?.(err, "decryption");
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
const messages = decrypted instanceof MessageContainer ? decrypted.messages : [decrypted];
|
|
136
|
+
for (const message of messages) {
|
|
137
|
+
let body = message.body;
|
|
138
|
+
if (body instanceof types.Gzip_packed) {
|
|
139
|
+
body = new TLReader(gunzip(body.packed_data)).readObject();
|
|
140
|
+
}
|
|
141
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").debug("received", (typeof body === "object" && name in body) ? body[name] : body.constructor.name);
|
|
142
|
+
if (body instanceof types._Updates || body instanceof types._Update) {
|
|
143
|
+
this.handlers.updates?.(body, null);
|
|
144
|
+
}
|
|
145
|
+
else if (body instanceof types.New_session_created) {
|
|
146
|
+
this.serverSalt = body.server_salt;
|
|
147
|
+
this.handlers.serverSaltReassigned?.(this.serverSalt);
|
|
148
|
+
}
|
|
149
|
+
else if (message.body instanceof RPCResult) {
|
|
150
|
+
let result = message.body.result;
|
|
151
|
+
if (result instanceof types.Gzip_packed) {
|
|
152
|
+
result = new TLReader(gunzip(result.packed_data)).readObject();
|
|
153
|
+
}
|
|
154
|
+
if (result instanceof types.Rpc_error) {
|
|
155
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").debug("RPCResult:", result.error_code, result.error_message);
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").debug("RPCResult:", (typeof result === "object" && name in result) ? result[name] : result.constructor.name);
|
|
159
|
+
}
|
|
160
|
+
const messageId = message.body.messageId;
|
|
161
|
+
const promise = __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").get(messageId);
|
|
162
|
+
const resolvePromise = () => {
|
|
163
|
+
if (promise) {
|
|
164
|
+
if (result instanceof types.Rpc_error) {
|
|
165
|
+
promise.reject?.(upgradeInstance(result, promise.call));
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
promise.resolve?.(result);
|
|
169
|
+
}
|
|
170
|
+
__classPrivateFieldGet(this, _ClientEncrypted_promises, "f").delete(messageId);
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
if (result instanceof types._Updates || result instanceof types._Update) {
|
|
174
|
+
this.handlers.updates?.(result, promise?.call ?? null, resolvePromise);
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
this.handlers.result?.(result, resolvePromise);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
else if (message.body instanceof types.Pong) {
|
|
181
|
+
const promise = __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").get(message.body.msg_id);
|
|
182
|
+
if (promise) {
|
|
183
|
+
promise.resolve?.(message.body);
|
|
184
|
+
__classPrivateFieldGet(this, _ClientEncrypted_promises, "f").delete(message.body.msg_id);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
else if (message.body instanceof types.Bad_server_salt) {
|
|
188
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").debug("server salt reassigned");
|
|
189
|
+
this.serverSalt = message.body.new_server_salt;
|
|
190
|
+
this.handlers.serverSaltReassigned?.(this.serverSalt);
|
|
191
|
+
const promise = __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").get(message.body.bad_msg_id);
|
|
192
|
+
const ack = __classPrivateFieldGet(this, _ClientEncrypted_recentAcks, "f").get(message.body.bad_msg_id);
|
|
193
|
+
if (promise) {
|
|
194
|
+
drop(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, promise.message));
|
|
195
|
+
}
|
|
196
|
+
else if (ack) {
|
|
197
|
+
drop(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, ack.message));
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
for (const promise of __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").values()) {
|
|
201
|
+
if (promise.container && promise.container == message.body.bad_msg_id) {
|
|
202
|
+
drop(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, promise.message));
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
for (const ack of __classPrivateFieldGet(this, _ClientEncrypted_recentAcks, "f").values()) {
|
|
206
|
+
if (ack.container && ack.container == message.body.bad_msg_id) {
|
|
207
|
+
drop(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, ack.message));
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
__classPrivateFieldGet(this, _ClientEncrypted_toAcknowledge, "f").add(message.id);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
catch (err) {
|
|
216
|
+
if (!this.connected) {
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
else if (err instanceof TLError) {
|
|
220
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").error("failed to deserialize:", err);
|
|
221
|
+
this.handlers.error?.(err, "deserialization");
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").error("unexpected error:", err);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
if (!this.connected) {
|
|
229
|
+
for (const [key, { reject }] of __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").entries()) {
|
|
230
|
+
reject?.(new ConnectionError("Connection was closed"));
|
|
231
|
+
__classPrivateFieldGet(this, _ClientEncrypted_promises, "f").delete(key);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
UNREACHABLE();
|
|
236
|
+
}
|
|
237
|
+
};
|
|
@@ -7,6 +7,9 @@ export interface ClientPlainParams extends ClientAbstractParams {
|
|
|
7
7
|
*/
|
|
8
8
|
publicKeys?: PublicKeys;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* An MTProto client for making plain connections. Most users won't need to interact with this. Used internally for creating authorization keys.
|
|
12
|
+
*/
|
|
10
13
|
export declare class ClientPlain extends ClientAbstract {
|
|
11
14
|
#private;
|
|
12
15
|
constructor(params?: ClientPlainParams);
|
|
@@ -18,11 +18,14 @@ import { ClientAbstract } from "./0_client_abstract.js";
|
|
|
18
18
|
import { getMessageId, packUnencryptedMessage, unpackUnencryptedMessage } from "./0_message.js";
|
|
19
19
|
const L = getLogger("ClientPlain");
|
|
20
20
|
const LcreateAuthKey = L.branch("createAuthKey");
|
|
21
|
+
/**
|
|
22
|
+
* An MTProto client for making plain connections. Most users won't need to interact with this. Used internally for creating authorization keys.
|
|
23
|
+
*/
|
|
21
24
|
export class ClientPlain extends ClientAbstract {
|
|
22
25
|
constructor(params) {
|
|
23
26
|
super(params);
|
|
24
27
|
_ClientPlain_publicKeys.set(this, void 0);
|
|
25
|
-
_ClientPlain_lastMsgId.set(this, 0n);
|
|
28
|
+
_ClientPlain_lastMsgId.set(this, 0n); // TODO: refactor
|
|
26
29
|
__classPrivateFieldSet(this, _ClientPlain_publicKeys, params?.publicKeys ?? PUBLIC_KEYS, "f");
|
|
27
30
|
}
|
|
28
31
|
async invoke(function_) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { MaybePromise } from "../1_utilities.js";
|
|
1
2
|
import { Update, UpdateIntersection, User } from "../3_types.js";
|
|
2
3
|
import { FilterQuery, WithFilter } from "./0_filters.js";
|
|
3
|
-
type
|
|
4
|
-
export type NextFunction = () => Promise<void>;
|
|
4
|
+
export type NextFunction<T = void> = () => Promise<T>;
|
|
5
5
|
export type MiddlewareFn<C> = (ctx: C, next: NextFunction) => MaybePromise<unknown>;
|
|
6
6
|
export interface MiddlewareObj<C> {
|
|
7
7
|
middleware: () => MiddlewareFn<C>;
|
|
@@ -27,4 +27,3 @@ export declare class Composer<C extends {
|
|
|
27
27
|
prefixes: string | string[];
|
|
28
28
|
}, ...middleware: Middleware<WithFilter<C, "message:text">>[]): Composer<WithFilter<C, "message:text">>;
|
|
29
29
|
}
|
|
30
|
-
export {};
|
|
@@ -33,7 +33,7 @@ export declare class MessageManager {
|
|
|
33
33
|
sendVideo(chatId: ID, video: FileSource, params?: SendVideoParams): Promise<import("../3_types.js").MessageVideo>;
|
|
34
34
|
sendDocument(chatId: ID, document: FileSource, params?: SendDocumentParams): Promise<import("../3_types.js").MessageDocument>;
|
|
35
35
|
sendPhoto(chatId: ID, photo: FileSource, params?: SendPhotoParams): Promise<import("../3_types.js").MessagePhoto>;
|
|
36
|
-
resolveFileId(maybeFileId: string, expectedFileType: FileType): {
|
|
36
|
+
resolveFileId(maybeFileId: string, expectedFileType: FileType | FileType[]): {
|
|
37
37
|
id: bigint;
|
|
38
38
|
access_hash: bigint;
|
|
39
39
|
file_reference: Uint8Array;
|
|
@@ -389,7 +389,7 @@ export class MessageManager {
|
|
|
389
389
|
let media = null;
|
|
390
390
|
const spoiler = params?.hasSpoiler ? true : undefined;
|
|
391
391
|
if (typeof photo === "string") {
|
|
392
|
-
const fileId = this.resolveFileId(photo, FileType.Photo);
|
|
392
|
+
const fileId = this.resolveFileId(photo, [FileType.Photo, FileType.ProfilePhoto]);
|
|
393
393
|
if (fileId != null) {
|
|
394
394
|
media = new types.InputMediaPhoto({
|
|
395
395
|
id: new types.InputPhoto(fileId),
|
|
@@ -411,6 +411,7 @@ export class MessageManager {
|
|
|
411
411
|
return assertMessageType(message, "photo");
|
|
412
412
|
}
|
|
413
413
|
resolveFileId(maybeFileId, expectedFileType) {
|
|
414
|
+
expectedFileType = Array.isArray(expectedFileType) ? expectedFileType : [expectedFileType];
|
|
414
415
|
let fileId = null;
|
|
415
416
|
try {
|
|
416
417
|
fileId = deserializeFileId(maybeFileId);
|
|
@@ -419,7 +420,7 @@ export class MessageManager {
|
|
|
419
420
|
__classPrivateFieldGet(this, _MessageManager_LresolveFileId, "f").warning(err);
|
|
420
421
|
}
|
|
421
422
|
if (fileId != null) {
|
|
422
|
-
if (fileId.type
|
|
423
|
+
if (!expectedFileType.includes(fileId.type)) {
|
|
423
424
|
UNREACHABLE();
|
|
424
425
|
}
|
|
425
426
|
return {
|