@mtkruto/node 0.0.983 → 0.0.985
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/client/0_html.js +9 -10
- package/esm/client/3_client.d.ts +30 -1
- package/esm/client/3_client.js +89 -28
- package/esm/constants.d.ts +1 -1
- package/esm/constants.js +1 -1
- package/{script/deps/deno.land/std@0.198.0 → esm/deps/deno.land/std@0.200.0}/assert/assert_equals.d.ts +5 -1
- package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_equals.js +7 -4
- package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_strict_equals.js +1 -1
- package/esm/deps.d.ts +4 -4
- package/esm/deps.js +4 -4
- package/esm/transport/2_transport_provider.d.ts +0 -4
- package/esm/transport/2_transport_provider.js +0 -35
- package/esm/types/0_message_entity.d.ts +26 -45
- package/esm/types/0_message_entity.js +38 -60
- package/esm/types/1_photo.js +1 -0
- package/package.json +1 -1
- package/script/client/0_html.js +9 -10
- package/script/client/3_client.d.ts +30 -1
- package/script/client/3_client.js +89 -28
- package/script/constants.d.ts +1 -1
- package/script/constants.js +1 -1
- package/{esm/deps/deno.land/std@0.198.0 → script/deps/deno.land/std@0.200.0}/assert/assert_equals.d.ts +5 -1
- package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_equals.js +10 -7
- package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_strict_equals.js +4 -4
- package/script/deps.d.ts +4 -4
- package/script/deps.js +4 -4
- package/script/transport/2_transport_provider.d.ts +0 -4
- package/script/transport/2_transport_provider.js +1 -37
- package/script/types/0_message_entity.d.ts +26 -45
- package/script/types/0_message_entity.js +39 -61
- package/script/types/1_photo.js +1 -0
- package/esm/connection/1_connection_http.d.ts +0 -16
- package/esm/connection/1_connection_http.js +0 -91
- package/esm/transport/1_transport_piped.d.ts +0 -10
- package/esm/transport/1_transport_piped.js +0 -23
- package/script/connection/1_connection_http.d.ts +0 -16
- package/script/connection/1_connection_http.js +0 -95
- package/script/transport/1_transport_piped.d.ts +0 -10
- package/script/transport/1_transport_piped.js +0 -27
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0/_util/diff.d.ts → std@0.200.0/assert/_diff.d.ts} +0 -0
- /package/esm/deps/deno.land/{std@0.198.0/_util/diff.js → std@0.200.0/assert/_diff.js} +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_almost_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_array_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_exists.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_false.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_is_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_object_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_string_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/fail.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/unimplemented.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/unreachable.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/encoding/base64.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/encoding/base64.js +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/fmt/colors.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.198.0 → std@0.200.0}/fmt/colors.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/gzip/gzip.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/gzip/gzip.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/utils/uint8.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/utils/uint8.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/deflate.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/deflate.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/inflate.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/inflate.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/mod.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/mod.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/adler32.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/adler32.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/crc32.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/crc32.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/deflate.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/deflate.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/gzheader.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/gzheader.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inffast.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inffast.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inflate.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inflate.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inftrees.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inftrees.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/messages.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/messages.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/status.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/status.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/trees.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/trees.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/zstream.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/zstream.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/colors.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/colors.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/debug.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/debug.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/deps.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/deps.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/format.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/format.js +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/mod.d.ts +0 -0
- /package/esm/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0/_util/diff.d.ts → std@0.200.0/assert/_diff.d.ts} +0 -0
- /package/script/deps/deno.land/{std@0.198.0/_util/diff.js → std@0.200.0/assert/_diff.js} +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_almost_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_array_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_exists.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_false.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_is_error.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_match.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_match.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_not_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_object_match.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_string_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/equal.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/fail.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/unimplemented.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/assert/unreachable.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/encoding/base64.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/encoding/base64.js +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/fmt/colors.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.198.0 → std@0.200.0}/fmt/colors.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/gzip/gzip.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/gzip/gzip.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/utils/uint8.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/utils/uint8.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/deflate.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/deflate.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/inflate.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/inflate.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/mod.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/mod.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/adler32.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/adler32.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/crc32.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/crc32.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/deflate.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/deflate.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/gzheader.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/gzheader.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inffast.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inffast.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inflate.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inflate.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inftrees.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/inftrees.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/messages.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/messages.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/status.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/status.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/trees.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/trees.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/zstream.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/compress/{master → main}/zlib/zlib/zstream.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/colors.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/colors.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/debug.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/debug.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/deps.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/deps.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/format.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/format.js +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/mod.d.ts +0 -0
- /package/script/deps/raw.githubusercontent.com/MTKruto/debug/{master → main}/mod.js +0 -0
package/esm/client/0_html.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Parser } from "../deps.js";
|
|
2
|
-
import { MessageEntityType } from "../types/0_message_entity.js";
|
|
3
2
|
export function parseHtml(html) {
|
|
4
3
|
let text = "";
|
|
5
4
|
const entities = new Array();
|
|
@@ -9,18 +8,18 @@ export function parseHtml(html) {
|
|
|
9
8
|
switch (name) {
|
|
10
9
|
case "b":
|
|
11
10
|
case "strong":
|
|
12
|
-
queue.push({ type:
|
|
11
|
+
queue.push({ type: "bold", offset: text.length, length: 0 });
|
|
13
12
|
break;
|
|
14
13
|
case "em":
|
|
15
14
|
case "i":
|
|
16
|
-
queue.push({ type:
|
|
15
|
+
queue.push({ type: "italic", offset: text.length, length: 0 });
|
|
17
16
|
break;
|
|
18
17
|
case "code":
|
|
19
|
-
queue.push({ type:
|
|
18
|
+
queue.push({ type: "code", offset: text.length, length: 0 });
|
|
20
19
|
break;
|
|
21
20
|
case "pre": {
|
|
22
21
|
const language = attribs.language ?? "";
|
|
23
|
-
queue.push({ type:
|
|
22
|
+
queue.push({ type: "pre", offset: text.length, length: 0, language });
|
|
24
23
|
break;
|
|
25
24
|
}
|
|
26
25
|
case "a": {
|
|
@@ -28,16 +27,16 @@ export function parseHtml(html) {
|
|
|
28
27
|
if (!url) {
|
|
29
28
|
throw new Error("Missing attribute href");
|
|
30
29
|
}
|
|
31
|
-
queue.push({ type:
|
|
30
|
+
queue.push({ type: "text_link", offset: text.length, length: 0, url });
|
|
32
31
|
break;
|
|
33
32
|
}
|
|
34
33
|
case "ins":
|
|
35
34
|
case "u":
|
|
36
|
-
queue.push({ type:
|
|
35
|
+
queue.push({ type: "underline", offset: text.length, length: 0 });
|
|
37
36
|
break;
|
|
38
37
|
case "del":
|
|
39
38
|
case "strike":
|
|
40
|
-
queue.push({ type:
|
|
39
|
+
queue.push({ type: "strikethrough", offset: text.length, length: 0 });
|
|
41
40
|
break;
|
|
42
41
|
case "span":
|
|
43
42
|
if (attribs.class != "tg-spoiler") {
|
|
@@ -45,13 +44,13 @@ export function parseHtml(html) {
|
|
|
45
44
|
}
|
|
46
45
|
// falls through
|
|
47
46
|
case "tg-spoiler":
|
|
48
|
-
queue.push({ type:
|
|
47
|
+
queue.push({ type: "spoiler", offset: text.length, length: 0 });
|
|
49
48
|
break;
|
|
50
49
|
case "tg-emoji":
|
|
51
50
|
if (!attribs["emoji-id"]) {
|
|
52
51
|
throw new Error("Missing attribute emoji-id");
|
|
53
52
|
}
|
|
54
|
-
queue.push({ type:
|
|
53
|
+
queue.push({ type: "spoiler", offset: text.length, length: 0 });
|
|
55
54
|
}
|
|
56
55
|
},
|
|
57
56
|
ontext(data) {
|
package/esm/client/3_client.d.ts
CHANGED
|
@@ -110,6 +110,24 @@ export interface SendMessagesParams {
|
|
|
110
110
|
*/
|
|
111
111
|
replyMarkup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
112
112
|
}
|
|
113
|
+
export interface EditMessageParams {
|
|
114
|
+
/**
|
|
115
|
+
* The parse mode to use. If not provided, the default parse mode will be used.
|
|
116
|
+
*/
|
|
117
|
+
parseMode?: ParseMode;
|
|
118
|
+
/**
|
|
119
|
+
* The message's entities.
|
|
120
|
+
*/
|
|
121
|
+
entities?: MessageEntity[];
|
|
122
|
+
/**
|
|
123
|
+
* Whether to disable web page previews in the message that is to be edited.
|
|
124
|
+
*/
|
|
125
|
+
disableWebPagePreview?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* The reply markup of the message.
|
|
128
|
+
*/
|
|
129
|
+
replyMarkup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
130
|
+
}
|
|
113
131
|
export interface ForwardMessagesParams {
|
|
114
132
|
messageThreadId?: number;
|
|
115
133
|
/**
|
|
@@ -179,6 +197,9 @@ export declare class Client extends ClientAbstract {
|
|
|
179
197
|
connect(): Promise<void>;
|
|
180
198
|
private fetchState;
|
|
181
199
|
[handleMigrationError](err: types.RPCError): Promise<void>;
|
|
200
|
+
private connectionInited;
|
|
201
|
+
disconnect(): Promise<void>;
|
|
202
|
+
private initConnection;
|
|
182
203
|
/**
|
|
183
204
|
* Calls [initConnection](1) and authorizes the client with one of the following:
|
|
184
205
|
*
|
|
@@ -229,7 +250,7 @@ export declare class Client extends ClientAbstract {
|
|
|
229
250
|
private updateGapRecoveryMutex;
|
|
230
251
|
private recoverUpdateGap;
|
|
231
252
|
private recoverChannelUpdateGap;
|
|
232
|
-
getInputPeer(id:
|
|
253
|
+
getInputPeer(id: ChatID): Promise<types.InputPeerChat | types.InputPeerUser | types.InputPeerChannel>;
|
|
233
254
|
[getEntity](peer: types.PeerUser): Promise<types.User | null>;
|
|
234
255
|
[getEntity](peer: types.PeerChat): Promise<types.Chat | null>;
|
|
235
256
|
[getEntity](peer: types.PeerChannel): Promise<types.Channel | null>;
|
|
@@ -242,6 +263,14 @@ export declare class Client extends ClientAbstract {
|
|
|
242
263
|
* @param text The message's text.
|
|
243
264
|
*/
|
|
244
265
|
sendMessage(chatId: ChatID, text: string, params?: SendMessagesParams): Promise<Message>;
|
|
266
|
+
/**
|
|
267
|
+
* Edit a message's text.
|
|
268
|
+
*
|
|
269
|
+
* @param chatId The chat where the message is.
|
|
270
|
+
* @param messageId The ID of the message.
|
|
271
|
+
* @param text The new text of the message.
|
|
272
|
+
*/
|
|
273
|
+
editMessageText(chatId: ChatID, messageId: number, text: string, params?: EditMessageParams): Promise<void>;
|
|
245
274
|
/**
|
|
246
275
|
* Retrieve multiple messages.
|
|
247
276
|
*
|
package/esm/client/3_client.js
CHANGED
|
@@ -172,6 +172,12 @@ export class Client extends ClientAbstract {
|
|
|
172
172
|
writable: true,
|
|
173
173
|
value: false
|
|
174
174
|
});
|
|
175
|
+
Object.defineProperty(this, "connectionInited", {
|
|
176
|
+
enumerable: true,
|
|
177
|
+
configurable: true,
|
|
178
|
+
writable: true,
|
|
179
|
+
value: false
|
|
180
|
+
});
|
|
175
181
|
Object.defineProperty(this, "autoStarted", {
|
|
176
182
|
enumerable: true,
|
|
177
183
|
configurable: true,
|
|
@@ -293,6 +299,29 @@ export class Client extends ClientAbstract {
|
|
|
293
299
|
UNREACHABLE();
|
|
294
300
|
}
|
|
295
301
|
}
|
|
302
|
+
disconnect() {
|
|
303
|
+
this.connectionInited = false;
|
|
304
|
+
return super.disconnect();
|
|
305
|
+
}
|
|
306
|
+
async initConnection() {
|
|
307
|
+
if (!this.connectionInited) {
|
|
308
|
+
await this.invoke(new functions.InitConnection({
|
|
309
|
+
apiId: this.apiId,
|
|
310
|
+
appVersion: this.appVersion,
|
|
311
|
+
deviceModel: this.deviceModel,
|
|
312
|
+
langCode: this.langCode,
|
|
313
|
+
langPack: this.langPack,
|
|
314
|
+
query: new functions.InvokeWithLayer({
|
|
315
|
+
layer: LAYER,
|
|
316
|
+
query: new functions.HelpGetConfig(),
|
|
317
|
+
}),
|
|
318
|
+
systemLangCode: this.systemLangCode,
|
|
319
|
+
systemVersion: this.systemVersion,
|
|
320
|
+
}));
|
|
321
|
+
this.connectionInited = true;
|
|
322
|
+
d("connection inited");
|
|
323
|
+
}
|
|
324
|
+
}
|
|
296
325
|
/**
|
|
297
326
|
* Calls [initConnection](1) and authorizes the client with one of the following:
|
|
298
327
|
*
|
|
@@ -327,23 +356,7 @@ export class Client extends ClientAbstract {
|
|
|
327
356
|
}
|
|
328
357
|
}
|
|
329
358
|
dAuth("authorizing with %s", typeof params === "string" ? "bot token" : params instanceof types.AuthExportedAuthorization ? "exported authorization" : "AuthorizeUserParams");
|
|
330
|
-
|
|
331
|
-
await this.invoke(new functions.InitConnection({
|
|
332
|
-
apiId: this.apiId,
|
|
333
|
-
appVersion: this.appVersion,
|
|
334
|
-
deviceModel: this.deviceModel,
|
|
335
|
-
langCode: this.langCode,
|
|
336
|
-
langPack: this.langPack,
|
|
337
|
-
query: new functions.InvokeWithLayer({
|
|
338
|
-
layer: LAYER,
|
|
339
|
-
query: new functions.HelpGetConfig(),
|
|
340
|
-
}),
|
|
341
|
-
systemLangCode: this.systemLangCode,
|
|
342
|
-
systemVersion: this.systemVersion,
|
|
343
|
-
}));
|
|
344
|
-
d("connection inited");
|
|
345
|
-
};
|
|
346
|
-
await initConnection();
|
|
359
|
+
await this.initConnection();
|
|
347
360
|
try {
|
|
348
361
|
await this.fetchState("authorize");
|
|
349
362
|
d("already authorized");
|
|
@@ -366,7 +379,7 @@ export class Client extends ClientAbstract {
|
|
|
366
379
|
const match = err.errorMessage.match(/MIGRATE_(\d)$/);
|
|
367
380
|
if (match) {
|
|
368
381
|
await this[handleMigrationError](err);
|
|
369
|
-
await initConnection();
|
|
382
|
+
await this.initConnection();
|
|
370
383
|
continue;
|
|
371
384
|
}
|
|
372
385
|
else {
|
|
@@ -406,7 +419,7 @@ export class Client extends ClientAbstract {
|
|
|
406
419
|
const match = err.errorMessage.match(/MIGRATE_(\d)$/);
|
|
407
420
|
if (match) {
|
|
408
421
|
await this[handleMigrationError](err);
|
|
409
|
-
await initConnection();
|
|
422
|
+
await this.initConnection();
|
|
410
423
|
sentCode = await sendCode();
|
|
411
424
|
}
|
|
412
425
|
else {
|
|
@@ -485,6 +498,7 @@ export class Client extends ClientAbstract {
|
|
|
485
498
|
*/
|
|
486
499
|
async start(params) {
|
|
487
500
|
await this.connect();
|
|
501
|
+
await this.initConnection();
|
|
488
502
|
try {
|
|
489
503
|
await this.fetchState("authorize");
|
|
490
504
|
d("already authorized");
|
|
@@ -566,16 +580,14 @@ export class Client extends ClientAbstract {
|
|
|
566
580
|
this.promises.delete(message.body.msgId);
|
|
567
581
|
}
|
|
568
582
|
}
|
|
569
|
-
else if (message.body instanceof types.
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
583
|
+
else if (message.body instanceof types.BadServerSalt) {
|
|
584
|
+
d("server salt reassigned");
|
|
585
|
+
this.state.salt = message.body.newServerSalt;
|
|
586
|
+
const promise = this.promises.get(message.body.badMsgId);
|
|
587
|
+
if (promise) {
|
|
588
|
+
promise.resolve(message.body);
|
|
589
|
+
this.promises.delete(message.body.badMsgId);
|
|
573
590
|
}
|
|
574
|
-
// const promise = this.promises.get(message.body.badMsgId);
|
|
575
|
-
// if (promise) {
|
|
576
|
-
// promise.resolve(message.body);
|
|
577
|
-
// this.promises.delete(message.body.badMsgId);
|
|
578
|
-
// }
|
|
579
591
|
}
|
|
580
592
|
this.toAcknowledge.add(message.id);
|
|
581
593
|
}
|
|
@@ -1212,6 +1224,55 @@ export class Client extends ClientAbstract {
|
|
|
1212
1224
|
}));
|
|
1213
1225
|
return await this.updatesToMessages(chatId, result).then((v) => v[0]);
|
|
1214
1226
|
}
|
|
1227
|
+
/**
|
|
1228
|
+
* Edit a message's text.
|
|
1229
|
+
*
|
|
1230
|
+
* @param chatId The chat where the message is.
|
|
1231
|
+
* @param messageId The ID of the message.
|
|
1232
|
+
* @param text The new text of the message.
|
|
1233
|
+
*/
|
|
1234
|
+
async editMessageText(chatId, messageId, text, params) {
|
|
1235
|
+
const entities_ = params?.entities ?? [];
|
|
1236
|
+
const parseMode = params?.parseMode ?? this.parseMode;
|
|
1237
|
+
switch (parseMode) {
|
|
1238
|
+
case ParseMode.None:
|
|
1239
|
+
break;
|
|
1240
|
+
case ParseMode.HTML: {
|
|
1241
|
+
const [newText, entitiesToPush] = parseHtml(text);
|
|
1242
|
+
text = newText;
|
|
1243
|
+
for (const entity of entitiesToPush) {
|
|
1244
|
+
entities_.push(entity);
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
let replyMarkup = undefined;
|
|
1249
|
+
if (params?.replyMarkup) {
|
|
1250
|
+
if ("inlineKeyboard" in params.replyMarkup) {
|
|
1251
|
+
replyMarkup = await inlineKeyboardMarkupToTlObject(params.replyMarkup, async (v) => {
|
|
1252
|
+
const inputPeer = await this.getInputPeer(v).then((v) => v[as](types.InputPeerUser));
|
|
1253
|
+
return new types.InputUser({ userId: inputPeer.userId, accessHash: inputPeer.accessHash });
|
|
1254
|
+
});
|
|
1255
|
+
}
|
|
1256
|
+
else if ("keyboard" in params.replyMarkup) {
|
|
1257
|
+
replyMarkup = replyKeyboardMarkupToTlObject(params.replyMarkup);
|
|
1258
|
+
}
|
|
1259
|
+
else if ("removeKeyboard" in params.replyMarkup) {
|
|
1260
|
+
replyMarkup = replyKeyboardRemoveToTlObject(params.replyMarkup);
|
|
1261
|
+
}
|
|
1262
|
+
else if ("forceReply" in params.replyMarkup) {
|
|
1263
|
+
replyMarkup = forceReplyToTlObject(params.replyMarkup);
|
|
1264
|
+
}
|
|
1265
|
+
else {
|
|
1266
|
+
throw new Error("The replyMarkup parameter has an unexpected type");
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
const id = messageId;
|
|
1270
|
+
const peer = await this.getInputPeer(chatId);
|
|
1271
|
+
const entities = entities_?.length > 0 ? entities_.map((v) => messageEntityToTlObject(v)) : undefined;
|
|
1272
|
+
const message = text;
|
|
1273
|
+
const noWebpage = params?.disableWebPagePreview ? true : undefined;
|
|
1274
|
+
await this.invoke(new functions.MessagesEditMessage({ id, peer, entities, message, noWebpage, replyMarkup }));
|
|
1275
|
+
}
|
|
1215
1276
|
/**
|
|
1216
1277
|
* Retrieve multiple messages.
|
|
1217
1278
|
*
|
package/esm/constants.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const PUBLIC_KEYS: PublicKeys;
|
|
|
5
5
|
export declare const VECTOR_CONSTRUCTOR = 481674261;
|
|
6
6
|
export declare const INITIAL_DC: DC;
|
|
7
7
|
export declare const LAYER = 161;
|
|
8
|
-
export declare const APP_VERSION = "MTKruto 0.0.
|
|
8
|
+
export declare const APP_VERSION = "MTKruto 0.0.985";
|
|
9
9
|
export declare const DEVICE_MODEL: string;
|
|
10
10
|
export declare const LANG_CODE: string;
|
|
11
11
|
export declare const LANG_PACK = "";
|
package/esm/constants.js
CHANGED
|
@@ -54,7 +54,7 @@ export const PUBLIC_KEYS = Object.freeze([
|
|
|
54
54
|
export const VECTOR_CONSTRUCTOR = 0x1CB5C415;
|
|
55
55
|
export const INITIAL_DC = "2-test";
|
|
56
56
|
export const LAYER = 161;
|
|
57
|
-
export const APP_VERSION = "MTKruto 0.0.
|
|
57
|
+
export const APP_VERSION = "MTKruto 0.0.985";
|
|
58
58
|
// @ts-ignore: lib
|
|
59
59
|
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;
|
|
60
60
|
export const LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
|
|
@@ -13,5 +13,9 @@
|
|
|
13
13
|
* assertEquals({ hello: "world" }, { hello: "world" });
|
|
14
14
|
* });
|
|
15
15
|
* ```
|
|
16
|
+
*
|
|
17
|
+
* Note: formatter option is experimental and may be removed in the future.
|
|
16
18
|
*/
|
|
17
|
-
export declare function assertEquals<T>(actual: T, expected: T, msg?: string
|
|
19
|
+
export declare function assertEquals<T>(actual: T, expected: T, msg?: string, options?: {
|
|
20
|
+
formatter?: (value: unknown) => string;
|
|
21
|
+
}): void;
|
|
@@ -3,7 +3,7 @@ import { equal } from "./equal.js";
|
|
|
3
3
|
import { format } from "./_format.js";
|
|
4
4
|
import { AssertionError } from "./assertion_error.js";
|
|
5
5
|
import { red } from "../fmt/colors.js";
|
|
6
|
-
import { buildMessage, diff, diffstr } from "
|
|
6
|
+
import { buildMessage, diff, diffstr } from "./_diff.js";
|
|
7
7
|
import { CAN_NOT_DISPLAY } from "./_constants.js";
|
|
8
8
|
/**
|
|
9
9
|
* Make an assertion that `actual` and `expected` are equal, deeply. If not
|
|
@@ -20,15 +20,18 @@ import { CAN_NOT_DISPLAY } from "./_constants.js";
|
|
|
20
20
|
* assertEquals({ hello: "world" }, { hello: "world" });
|
|
21
21
|
* });
|
|
22
22
|
* ```
|
|
23
|
+
*
|
|
24
|
+
* Note: formatter option is experimental and may be removed in the future.
|
|
23
25
|
*/
|
|
24
|
-
export function assertEquals(actual, expected, msg) {
|
|
26
|
+
export function assertEquals(actual, expected, msg, options = {}) {
|
|
25
27
|
if (equal(actual, expected)) {
|
|
26
28
|
return;
|
|
27
29
|
}
|
|
30
|
+
const { formatter = format } = options;
|
|
28
31
|
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
29
32
|
let message = `Values are not equal${msgSuffix}`;
|
|
30
|
-
const actualString =
|
|
31
|
-
const expectedString =
|
|
33
|
+
const actualString = formatter(actual);
|
|
34
|
+
const expectedString = formatter(expected);
|
|
32
35
|
try {
|
|
33
36
|
const stringDiff = (typeof actual === "string") &&
|
|
34
37
|
(typeof expected === "string");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
2
2
|
import { format } from "./_format.js";
|
|
3
3
|
import { AssertionError } from "./assertion_error.js";
|
|
4
|
-
import { buildMessage, diff, diffstr } from "
|
|
4
|
+
import { buildMessage, diff, diffstr } from "./_diff.js";
|
|
5
5
|
import { CAN_NOT_DISPLAY } from "./_constants.js";
|
|
6
6
|
import { red } from "../fmt/colors.js";
|
|
7
7
|
/**
|
package/esm/deps.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./deps/deno.land/std@0.
|
|
1
|
+
export * from "./deps/deno.land/std@0.200.0/assert/mod.js";
|
|
2
2
|
export { ctr256Decrypt, ctr256Encrypt, factorize, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.1.3/mod.js";
|
|
3
|
-
export { gunzip, gzip } from "./deps/raw.githubusercontent.com/MTKruto/compress/
|
|
3
|
+
export { gunzip, gzip } from "./deps/raw.githubusercontent.com/MTKruto/compress/main/gzip/gzip.js";
|
|
4
4
|
export { Mutex, type MutexInterface } from "async-mutex";
|
|
5
5
|
export { Parser } from "./deps/deno.land/x/html_parser@v0.1.3/src/mod.js";
|
|
6
|
-
import { debug as debug_ } from "./deps/raw.githubusercontent.com/MTKruto/debug/
|
|
6
|
+
import { debug as debug_ } from "./deps/raw.githubusercontent.com/MTKruto/debug/main/mod.js";
|
|
7
7
|
export declare const debug: typeof debug_;
|
|
8
|
-
export { decode as base64Decode, encode as base64Encode } from "./deps/deno.land/std@0.
|
|
8
|
+
export { decode as base64Decode, encode as base64Encode } from "./deps/deno.land/std@0.200.0/encoding/base64.js";
|
package/esm/deps.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./deps/deno.land/std@0.
|
|
1
|
+
export * from "./deps/deno.land/std@0.200.0/assert/mod.js";
|
|
2
2
|
export { ctr256Decrypt, ctr256Encrypt, factorize, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.1.3/mod.js";
|
|
3
|
-
export { gunzip, gzip } from "./deps/raw.githubusercontent.com/MTKruto/compress/
|
|
3
|
+
export { gunzip, gzip } from "./deps/raw.githubusercontent.com/MTKruto/compress/main/gzip/gzip.js";
|
|
4
4
|
export { Mutex } from "async-mutex";
|
|
5
5
|
export { Parser } from "./deps/deno.land/x/html_parser@v0.1.3/src/mod.js";
|
|
6
|
-
import { debug as debug_ } from "./deps/raw.githubusercontent.com/MTKruto/debug/
|
|
6
|
+
import { debug as debug_ } from "./deps/raw.githubusercontent.com/MTKruto/debug/main/mod.js";
|
|
7
7
|
export const debug = (v) => debug_(`mtkruto/${v}`);
|
|
8
|
-
export { decode as base64Decode, encode as base64Encode } from "./deps/deno.land/std@0.
|
|
8
|
+
export { decode as base64Decode, encode as base64Encode } from "./deps/deno.land/std@0.200.0/encoding/base64.js";
|
|
@@ -20,7 +20,3 @@ export type TransportProviderCreator<E = Record<never, never>> = (params: Transp
|
|
|
20
20
|
export declare const webSocketTransportProvider: TransportProviderCreator<{
|
|
21
21
|
wss?: boolean;
|
|
22
22
|
}>;
|
|
23
|
-
export declare const httpTransportProvider: TransportProviderCreator<{
|
|
24
|
-
secure?: boolean;
|
|
25
|
-
v6?: boolean;
|
|
26
|
-
}>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { ConnectionHTTP } from "../connection/1_connection_http.js";
|
|
2
1
|
import { ConnectionWebSocket } from "../connection/1_connection_web_socket.js";
|
|
3
|
-
import { TransportPiped } from "./1_transport_piped.js";
|
|
4
2
|
import { TransportIntermediate } from "./1_transport_intermediate.js";
|
|
5
3
|
const dcToNameMap = {
|
|
6
4
|
"1": "pluto",
|
|
@@ -29,36 +27,3 @@ export const webSocketTransportProvider = ({ initialDc, wss }) => {
|
|
|
29
27
|
},
|
|
30
28
|
};
|
|
31
29
|
};
|
|
32
|
-
const dcToIPv4Map = {
|
|
33
|
-
"1": "149.154.175.50",
|
|
34
|
-
"1-test": "149.154.175.10",
|
|
35
|
-
"2": "149.154.167.51",
|
|
36
|
-
"2-test": "149.154.167.40",
|
|
37
|
-
"3": "149.154.175.100",
|
|
38
|
-
"3-test": "149.154.175.117",
|
|
39
|
-
"4": "149.154.167.91",
|
|
40
|
-
"5": "149.154.171.5",
|
|
41
|
-
};
|
|
42
|
-
const dcToIPv6Map = {
|
|
43
|
-
"1": "[2001:b28:f23d:f001::a]",
|
|
44
|
-
"1-test": "[2001:b28:f23d:f001::e]",
|
|
45
|
-
"2": "[2001:67c:4e8:f002::a]",
|
|
46
|
-
"2-test": "[2001:67c:4e8:f002::e]",
|
|
47
|
-
"3": "[2001:b28:f23d:f003::a]",
|
|
48
|
-
"3-test": "[2001:b28:f23d:f003::e]",
|
|
49
|
-
"4": "[2001:67c:4e8:f004::a]",
|
|
50
|
-
"5": "[2001:b28:f23f:f005::a]",
|
|
51
|
-
};
|
|
52
|
-
export const httpTransportProvider = ({ initialDc, secure, v6 }) => {
|
|
53
|
-
return {
|
|
54
|
-
initialDc,
|
|
55
|
-
createTransport({ dc, cdn }) {
|
|
56
|
-
dc ??= initialDc;
|
|
57
|
-
const url = secure ? `https://${dcToNameMap[dc]}${cdn ? "-1" : ""}.web.telegram.org/${dc.endsWith("-test") ? "apiw1_test" : "apiw1"}` : `http://${(v6 ? dcToIPv6Map : dcToIPv4Map)[dc]}/${dc.endsWith("-test") ? "api_test" : "api"}`;
|
|
58
|
-
const connection = new ConnectionHTTP(url);
|
|
59
|
-
const transport = new TransportPiped(connection);
|
|
60
|
-
const dcId = getDcId(dc, cdn);
|
|
61
|
-
return { connection, transport, dcId };
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
};
|
|
@@ -1,99 +1,80 @@
|
|
|
1
1
|
import * as types from "../tl/2_types.js";
|
|
2
|
-
export
|
|
3
|
-
Mention = "mention",
|
|
4
|
-
Hashtag = "hashtag",
|
|
5
|
-
BotCommand = "bot_command",
|
|
6
|
-
URL = "url",
|
|
7
|
-
Email = "email",
|
|
8
|
-
Bold = "bold",
|
|
9
|
-
Italic = "italic",
|
|
10
|
-
Code = "code",
|
|
11
|
-
Pre = "pre",
|
|
12
|
-
TextURL = "text_url",
|
|
13
|
-
MentionName = "mention_name",
|
|
14
|
-
Cashtag = "cashtag",
|
|
15
|
-
Phone = "phone",
|
|
16
|
-
Underline = "underline",
|
|
17
|
-
Strike = "strike",
|
|
18
|
-
Blockquote = "blockquote",
|
|
19
|
-
BankCard = "bank_card",
|
|
20
|
-
Spoiler = "spoiler",
|
|
21
|
-
CustomEmoji = "custom_emoji"
|
|
22
|
-
}
|
|
2
|
+
export type MessageEntityType = "mention" | "hashtag" | "bot_command" | "url" | "email" | "bold" | "italic" | "code" | "pre" | "text_link" | "text_mention" | "cashtag" | "phone_number" | "underline" | "strikethrough" | "blockquote" | "bank_card" | "spoiler" | "custom_emoji";
|
|
23
3
|
export declare namespace MessageEntity {
|
|
24
4
|
interface Base {
|
|
5
|
+
type: MessageEntityType;
|
|
25
6
|
/** Offset in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length) to the start of the entity */
|
|
26
7
|
offset: number;
|
|
27
8
|
/** Length of the entity in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length) */
|
|
28
9
|
length: number;
|
|
29
10
|
}
|
|
30
11
|
interface Mention extends Base {
|
|
31
|
-
type:
|
|
12
|
+
type: "mention";
|
|
32
13
|
}
|
|
33
14
|
interface Hashtag extends Base {
|
|
34
|
-
type:
|
|
15
|
+
type: "hashtag";
|
|
35
16
|
}
|
|
36
17
|
interface BotCommand extends Base {
|
|
37
|
-
type:
|
|
18
|
+
type: "bot_command";
|
|
38
19
|
}
|
|
39
20
|
interface URL extends Base {
|
|
40
|
-
type:
|
|
21
|
+
type: "url";
|
|
41
22
|
}
|
|
42
23
|
interface EmailAddress extends Base {
|
|
43
|
-
type:
|
|
24
|
+
type: "email";
|
|
44
25
|
}
|
|
45
26
|
interface Bold extends Base {
|
|
46
|
-
type:
|
|
27
|
+
type: "bold";
|
|
47
28
|
}
|
|
48
29
|
interface Italic extends Base {
|
|
49
|
-
type:
|
|
30
|
+
type: "italic";
|
|
50
31
|
}
|
|
51
32
|
interface Pre extends Base {
|
|
52
|
-
type:
|
|
33
|
+
type: "pre";
|
|
53
34
|
/** For “pre” only, the programming language of the entity text */
|
|
54
35
|
language: string;
|
|
55
36
|
}
|
|
56
37
|
interface Code extends Base {
|
|
57
|
-
type:
|
|
38
|
+
type: "code";
|
|
58
39
|
}
|
|
59
|
-
interface
|
|
60
|
-
type:
|
|
40
|
+
interface TextLink extends Base {
|
|
41
|
+
type: "text_link";
|
|
61
42
|
/** For “text_link” only, URL that will be opened after user taps on the text */
|
|
62
43
|
url: string;
|
|
63
44
|
}
|
|
64
|
-
interface
|
|
65
|
-
type:
|
|
45
|
+
interface TextMention extends Base {
|
|
46
|
+
type: "text_mention";
|
|
66
47
|
/** For “text_mention” only, the ID of the mentioned user */
|
|
67
48
|
userId: number;
|
|
68
49
|
}
|
|
69
50
|
interface Cashtag extends Base {
|
|
70
|
-
type:
|
|
51
|
+
type: "cashtag";
|
|
71
52
|
}
|
|
72
|
-
interface
|
|
73
|
-
type:
|
|
53
|
+
interface PhoneNumber extends Base {
|
|
54
|
+
type: "phone_number";
|
|
74
55
|
}
|
|
75
56
|
interface Underline extends Base {
|
|
76
|
-
type:
|
|
57
|
+
type: "underline";
|
|
77
58
|
}
|
|
78
|
-
interface
|
|
79
|
-
type:
|
|
59
|
+
interface Strikethrough extends Base {
|
|
60
|
+
type: "strikethrough";
|
|
80
61
|
}
|
|
81
62
|
interface Blockquote extends Base {
|
|
82
|
-
type:
|
|
63
|
+
type: "blockquote";
|
|
83
64
|
}
|
|
84
65
|
interface BankCard extends Base {
|
|
85
|
-
type:
|
|
66
|
+
type: "bank_card";
|
|
86
67
|
}
|
|
87
68
|
interface Spoiler extends Base {
|
|
88
|
-
type:
|
|
69
|
+
type: "spoiler";
|
|
89
70
|
}
|
|
90
71
|
interface CustomEmoji extends Base {
|
|
91
|
-
type:
|
|
72
|
+
type: "custom_emoji";
|
|
92
73
|
/** For “custom_emoji” only, unique identifier of the custom emoji */
|
|
93
74
|
customEmojiId: string;
|
|
94
75
|
}
|
|
95
76
|
}
|
|
96
77
|
/** This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. */
|
|
97
|
-
export type MessageEntity = MessageEntity.Mention | MessageEntity.Hashtag | MessageEntity.BotCommand | MessageEntity.URL | MessageEntity.EmailAddress | MessageEntity.Bold | MessageEntity.Italic | MessageEntity.Code | MessageEntity.Pre | MessageEntity.
|
|
78
|
+
export type MessageEntity = MessageEntity.Mention | MessageEntity.Hashtag | MessageEntity.BotCommand | MessageEntity.URL | MessageEntity.EmailAddress | MessageEntity.Bold | MessageEntity.Italic | MessageEntity.Code | MessageEntity.Pre | MessageEntity.TextLink | MessageEntity.TextMention | MessageEntity.Cashtag | MessageEntity.PhoneNumber | MessageEntity.Underline | MessageEntity.Strikethrough | MessageEntity.Blockquote | MessageEntity.BankCard | MessageEntity.Spoiler | MessageEntity.CustomEmoji;
|
|
98
79
|
export declare function constructMessageEntity(obj: types.TypeMessageEntity): MessageEntity | null;
|
|
99
80
|
export declare function messageEntityToTlObject(entity: MessageEntity): types.MessageEntityMention | types.MessageEntityHashtag | types.MessageEntityBotCommand | types.MessageEntityURL | types.MessageEntityEmail | types.MessageEntityBold | types.MessageEntityItalic | types.MessageEntityCode | types.MessageEntityPre | types.MessageEntityTextURL | types.MessageEntityMentionName | types.MessageEntityPhone | types.MessageEntityCashtag | types.MessageEntityUnderline | types.MessageEntityStrike | types.MessageEntityBlockquote | types.MessageEntityBankCard | types.MessageEntitySpoiler | types.MessageEntityCustomEmoji;
|