@mtkruto/node 0.0.984 → 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/constants.d.ts +1 -1
- package/esm/constants.js +1 -1
- package/{script/deps/deno.land/std@0.199.0 → esm/deps/deno.land/std@0.200.0}/assert/assert_equals.d.ts +5 -1
- package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_equals.js +7 -4
- package/esm/deps/deno.land/{std@0.199.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/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/constants.d.ts +1 -1
- package/script/constants.js +1 -1
- package/{esm/deps/deno.land/std@0.199.0 → script/deps/deno.land/std@0.200.0}/assert/assert_equals.d.ts +5 -1
- package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_equals.js +10 -7
- package/script/deps/deno.land/{std@0.199.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/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/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0/_util/diff.d.ts → std@0.200.0/assert/_diff.d.ts} +0 -0
- /package/esm/deps/deno.land/{std@0.199.0/_util/diff.js → std@0.200.0/assert/_diff.js} +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_almost_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_array_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_exists.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_false.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_is_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_not_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_not_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_not_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_not_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_object_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_string_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/fail.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/unimplemented.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/unreachable.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/encoding/base64.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/encoding/base64.js +0 -0
- /package/esm/deps/deno.land/{std@0.199.0 → std@0.200.0}/fmt/colors.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.199.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.199.0 → std@0.200.0}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0/_util/diff.d.ts → std@0.200.0/assert/_diff.d.ts} +0 -0
- /package/script/deps/deno.land/{std@0.199.0/_util/diff.js → std@0.200.0/assert/_diff.js} +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_almost_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_array_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_exists.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_false.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_is_error.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_match.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_not_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_not_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_not_match.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_not_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_object_match.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_string_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/equal.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/fail.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/unimplemented.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/assert/unreachable.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/encoding/base64.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/encoding/base64.js +0 -0
- /package/script/deps/deno.land/{std@0.199.0 → std@0.200.0}/fmt/colors.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.199.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/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";
|
|
@@ -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;
|
|
@@ -1,83 +1,61 @@
|
|
|
1
1
|
import * as types from "../tl/2_types.js";
|
|
2
|
-
export var MessageEntityType;
|
|
3
|
-
(function (MessageEntityType) {
|
|
4
|
-
MessageEntityType["Mention"] = "mention";
|
|
5
|
-
MessageEntityType["Hashtag"] = "hashtag";
|
|
6
|
-
MessageEntityType["BotCommand"] = "bot_command";
|
|
7
|
-
MessageEntityType["URL"] = "url";
|
|
8
|
-
MessageEntityType["Email"] = "email";
|
|
9
|
-
MessageEntityType["Bold"] = "bold";
|
|
10
|
-
MessageEntityType["Italic"] = "italic";
|
|
11
|
-
MessageEntityType["Code"] = "code";
|
|
12
|
-
MessageEntityType["Pre"] = "pre";
|
|
13
|
-
MessageEntityType["TextURL"] = "text_url";
|
|
14
|
-
MessageEntityType["MentionName"] = "mention_name";
|
|
15
|
-
MessageEntityType["Cashtag"] = "cashtag";
|
|
16
|
-
MessageEntityType["Phone"] = "phone";
|
|
17
|
-
MessageEntityType["Underline"] = "underline";
|
|
18
|
-
MessageEntityType["Strike"] = "strike";
|
|
19
|
-
MessageEntityType["Blockquote"] = "blockquote";
|
|
20
|
-
MessageEntityType["BankCard"] = "bank_card";
|
|
21
|
-
MessageEntityType["Spoiler"] = "spoiler";
|
|
22
|
-
MessageEntityType["CustomEmoji"] = "custom_emoji";
|
|
23
|
-
})(MessageEntityType || (MessageEntityType = {}));
|
|
24
2
|
export function constructMessageEntity(obj) {
|
|
25
3
|
if (obj instanceof types.MessageEntityMention) {
|
|
26
|
-
return { type:
|
|
4
|
+
return { type: "mention", offset: obj.offset, length: obj.length };
|
|
27
5
|
}
|
|
28
6
|
else if (obj instanceof types.MessageEntityHashtag) {
|
|
29
|
-
return { type:
|
|
7
|
+
return { type: "hashtag", offset: obj.offset, length: obj.length };
|
|
30
8
|
}
|
|
31
9
|
else if (obj instanceof types.MessageEntityBotCommand) {
|
|
32
|
-
return { type:
|
|
10
|
+
return { type: "bot_command", offset: obj.offset ?? 0, length: obj.length };
|
|
33
11
|
}
|
|
34
12
|
else if (obj instanceof types.MessageEntityURL) {
|
|
35
|
-
return { type:
|
|
13
|
+
return { type: "url", offset: obj.offset, length: obj.length };
|
|
36
14
|
}
|
|
37
15
|
else if (obj instanceof types.MessageEntityEmail) {
|
|
38
|
-
return { type:
|
|
16
|
+
return { type: "email", offset: obj.offset, length: obj.length };
|
|
39
17
|
}
|
|
40
18
|
else if (obj instanceof types.MessageEntityBold) {
|
|
41
|
-
return { type:
|
|
19
|
+
return { type: "bold", offset: obj.offset, length: obj.length };
|
|
42
20
|
}
|
|
43
21
|
else if (obj instanceof types.MessageEntityItalic) {
|
|
44
|
-
return { type:
|
|
22
|
+
return { type: "italic", offset: obj.offset, length: obj.length };
|
|
45
23
|
}
|
|
46
24
|
else if (obj instanceof types.MessageEntityCode) {
|
|
47
|
-
return { type:
|
|
25
|
+
return { type: "code", offset: obj.offset, length: obj.length };
|
|
48
26
|
}
|
|
49
27
|
else if (obj instanceof types.MessageEntityPre) {
|
|
50
|
-
return { type:
|
|
28
|
+
return { type: "pre", offset: obj.offset, length: obj.length, language: obj.language };
|
|
51
29
|
}
|
|
52
30
|
else if (obj instanceof types.MessageEntityTextURL) {
|
|
53
|
-
return { type:
|
|
31
|
+
return { type: "text_link", offset: obj.offset, length: obj.length, url: obj.url };
|
|
54
32
|
}
|
|
55
33
|
else if (obj instanceof types.MessageEntityMentionName) {
|
|
56
|
-
return { type:
|
|
34
|
+
return { type: "text_mention", offset: obj.offset, length: obj.length, userId: Number(obj.userId) };
|
|
57
35
|
}
|
|
58
36
|
else if (obj instanceof types.MessageEntityCashtag) {
|
|
59
|
-
return { type:
|
|
37
|
+
return { type: "cashtag", offset: obj.offset, length: obj.length };
|
|
60
38
|
}
|
|
61
39
|
else if (obj instanceof types.MessageEntityPhone) {
|
|
62
|
-
return { type:
|
|
40
|
+
return { type: "phone_number", offset: obj.offset, length: obj.length };
|
|
63
41
|
}
|
|
64
42
|
else if (obj instanceof types.MessageEntityUnderline) {
|
|
65
|
-
return { type:
|
|
43
|
+
return { type: "underline", offset: obj.offset, length: obj.length };
|
|
66
44
|
}
|
|
67
45
|
else if (obj instanceof types.MessageEntityStrike) {
|
|
68
|
-
return { type:
|
|
46
|
+
return { type: "strikethrough", offset: obj.offset, length: obj.length };
|
|
69
47
|
}
|
|
70
48
|
else if (obj instanceof types.MessageEntityBlockquote) {
|
|
71
|
-
return { type:
|
|
49
|
+
return { type: "blockquote", offset: obj.offset, length: obj.length };
|
|
72
50
|
}
|
|
73
51
|
else if (obj instanceof types.MessageEntityBankCard) {
|
|
74
|
-
return { type:
|
|
52
|
+
return { type: "bank_card", offset: obj.offset, length: obj.length };
|
|
75
53
|
}
|
|
76
54
|
else if (obj instanceof types.MessageEntitySpoiler) {
|
|
77
|
-
return { type:
|
|
55
|
+
return { type: "spoiler", offset: obj.offset, length: obj.length };
|
|
78
56
|
}
|
|
79
57
|
else if (obj instanceof types.MessageEntityCustomEmoji) {
|
|
80
|
-
return { type:
|
|
58
|
+
return { type: "custom_emoji", offset: obj.offset, length: obj.length, customEmojiId: String(obj.documentId) };
|
|
81
59
|
}
|
|
82
60
|
else {
|
|
83
61
|
return null;
|
|
@@ -86,43 +64,43 @@ export function constructMessageEntity(obj) {
|
|
|
86
64
|
export function messageEntityToTlObject(entity) {
|
|
87
65
|
const { offset, length } = entity;
|
|
88
66
|
switch (entity.type) {
|
|
89
|
-
case
|
|
67
|
+
case "mention":
|
|
90
68
|
return new types.MessageEntityMention({ offset, length });
|
|
91
|
-
case
|
|
69
|
+
case "hashtag":
|
|
92
70
|
return new types.MessageEntityHashtag({ offset, length });
|
|
93
|
-
case
|
|
71
|
+
case "bot_command":
|
|
94
72
|
return new types.MessageEntityBotCommand({ offset, length });
|
|
95
|
-
case
|
|
73
|
+
case "url":
|
|
96
74
|
return new types.MessageEntityURL({ offset, length });
|
|
97
|
-
case
|
|
75
|
+
case "email":
|
|
98
76
|
return new types.MessageEntityEmail({ offset, length });
|
|
99
|
-
case
|
|
77
|
+
case "bold":
|
|
100
78
|
return new types.MessageEntityBold({ offset, length });
|
|
101
|
-
case
|
|
79
|
+
case "italic":
|
|
102
80
|
return new types.MessageEntityItalic({ offset, length });
|
|
103
|
-
case
|
|
81
|
+
case "code":
|
|
104
82
|
return new types.MessageEntityCode({ offset, length });
|
|
105
|
-
case
|
|
83
|
+
case "pre":
|
|
106
84
|
return new types.MessageEntityPre({ offset, length, language: entity.language });
|
|
107
|
-
case
|
|
85
|
+
case "text_link":
|
|
108
86
|
return new types.MessageEntityTextURL({ offset, length, url: entity.url });
|
|
109
|
-
case
|
|
87
|
+
case "text_mention":
|
|
110
88
|
return new types.MessageEntityMentionName({ offset, length, userId: BigInt(entity.userId) });
|
|
111
|
-
case
|
|
89
|
+
case "cashtag":
|
|
112
90
|
return new types.MessageEntityCashtag({ offset, length });
|
|
113
|
-
case
|
|
91
|
+
case "phone_number":
|
|
114
92
|
return new types.MessageEntityPhone({ offset, length });
|
|
115
|
-
case
|
|
93
|
+
case "underline":
|
|
116
94
|
return new types.MessageEntityUnderline({ offset, length });
|
|
117
|
-
case
|
|
95
|
+
case "strikethrough":
|
|
118
96
|
return new types.MessageEntityStrike({ offset, length });
|
|
119
|
-
case
|
|
97
|
+
case "blockquote":
|
|
120
98
|
return new types.MessageEntityBlockquote({ offset, length });
|
|
121
|
-
case
|
|
99
|
+
case "bank_card":
|
|
122
100
|
return new types.MessageEntityBankCard({ offset, length });
|
|
123
|
-
case
|
|
101
|
+
case "spoiler":
|
|
124
102
|
return new types.MessageEntitySpoiler({ offset, length });
|
|
125
|
-
case
|
|
103
|
+
case "custom_emoji":
|
|
126
104
|
return new types.MessageEntityCustomEmoji({ offset, length, documentId: BigInt(entity.customEmojiId) });
|
|
127
105
|
}
|
|
128
106
|
}
|
package/esm/types/1_photo.js
CHANGED
package/package.json
CHANGED
package/script/client/0_html.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.parseHtml = void 0;
|
|
4
4
|
const deps_js_1 = require("../deps.js");
|
|
5
|
-
const _0_message_entity_js_1 = require("../types/0_message_entity.js");
|
|
6
5
|
function parseHtml(html) {
|
|
7
6
|
let text = "";
|
|
8
7
|
const entities = new Array();
|
|
@@ -12,18 +11,18 @@ function parseHtml(html) {
|
|
|
12
11
|
switch (name) {
|
|
13
12
|
case "b":
|
|
14
13
|
case "strong":
|
|
15
|
-
queue.push({ type:
|
|
14
|
+
queue.push({ type: "bold", offset: text.length, length: 0 });
|
|
16
15
|
break;
|
|
17
16
|
case "em":
|
|
18
17
|
case "i":
|
|
19
|
-
queue.push({ type:
|
|
18
|
+
queue.push({ type: "italic", offset: text.length, length: 0 });
|
|
20
19
|
break;
|
|
21
20
|
case "code":
|
|
22
|
-
queue.push({ type:
|
|
21
|
+
queue.push({ type: "code", offset: text.length, length: 0 });
|
|
23
22
|
break;
|
|
24
23
|
case "pre": {
|
|
25
24
|
const language = attribs.language ?? "";
|
|
26
|
-
queue.push({ type:
|
|
25
|
+
queue.push({ type: "pre", offset: text.length, length: 0, language });
|
|
27
26
|
break;
|
|
28
27
|
}
|
|
29
28
|
case "a": {
|
|
@@ -31,16 +30,16 @@ function parseHtml(html) {
|
|
|
31
30
|
if (!url) {
|
|
32
31
|
throw new Error("Missing attribute href");
|
|
33
32
|
}
|
|
34
|
-
queue.push({ type:
|
|
33
|
+
queue.push({ type: "text_link", offset: text.length, length: 0, url });
|
|
35
34
|
break;
|
|
36
35
|
}
|
|
37
36
|
case "ins":
|
|
38
37
|
case "u":
|
|
39
|
-
queue.push({ type:
|
|
38
|
+
queue.push({ type: "underline", offset: text.length, length: 0 });
|
|
40
39
|
break;
|
|
41
40
|
case "del":
|
|
42
41
|
case "strike":
|
|
43
|
-
queue.push({ type:
|
|
42
|
+
queue.push({ type: "strikethrough", offset: text.length, length: 0 });
|
|
44
43
|
break;
|
|
45
44
|
case "span":
|
|
46
45
|
if (attribs.class != "tg-spoiler") {
|
|
@@ -48,13 +47,13 @@ function parseHtml(html) {
|
|
|
48
47
|
}
|
|
49
48
|
// falls through
|
|
50
49
|
case "tg-spoiler":
|
|
51
|
-
queue.push({ type:
|
|
50
|
+
queue.push({ type: "spoiler", offset: text.length, length: 0 });
|
|
52
51
|
break;
|
|
53
52
|
case "tg-emoji":
|
|
54
53
|
if (!attribs["emoji-id"]) {
|
|
55
54
|
throw new Error("Missing attribute emoji-id");
|
|
56
55
|
}
|
|
57
|
-
queue.push({ type:
|
|
56
|
+
queue.push({ type: "spoiler", offset: text.length, length: 0 });
|
|
58
57
|
}
|
|
59
58
|
},
|
|
60
59
|
ontext(data) {
|
package/script/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/script/constants.js
CHANGED
|
@@ -80,7 +80,7 @@ exports.PUBLIC_KEYS = Object.freeze([
|
|
|
80
80
|
exports.VECTOR_CONSTRUCTOR = 0x1CB5C415;
|
|
81
81
|
exports.INITIAL_DC = "2-test";
|
|
82
82
|
exports.LAYER = 161;
|
|
83
|
-
exports.APP_VERSION = "MTKruto 0.0.
|
|
83
|
+
exports.APP_VERSION = "MTKruto 0.0.985";
|
|
84
84
|
// @ts-ignore: lib
|
|
85
85
|
exports.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;
|
|
86
86
|
exports.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;
|
|
@@ -6,7 +6,7 @@ const equal_js_1 = require("./equal.js");
|
|
|
6
6
|
const _format_js_1 = require("./_format.js");
|
|
7
7
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
8
8
|
const colors_js_1 = require("../fmt/colors.js");
|
|
9
|
-
const
|
|
9
|
+
const _diff_js_1 = require("./_diff.js");
|
|
10
10
|
const _constants_js_1 = require("./_constants.js");
|
|
11
11
|
/**
|
|
12
12
|
* Make an assertion that `actual` and `expected` are equal, deeply. If not
|
|
@@ -23,22 +23,25 @@ const _constants_js_1 = require("./_constants.js");
|
|
|
23
23
|
* assertEquals({ hello: "world" }, { hello: "world" });
|
|
24
24
|
* });
|
|
25
25
|
* ```
|
|
26
|
+
*
|
|
27
|
+
* Note: formatter option is experimental and may be removed in the future.
|
|
26
28
|
*/
|
|
27
|
-
function assertEquals(actual, expected, msg) {
|
|
29
|
+
function assertEquals(actual, expected, msg, options = {}) {
|
|
28
30
|
if ((0, equal_js_1.equal)(actual, expected)) {
|
|
29
31
|
return;
|
|
30
32
|
}
|
|
33
|
+
const { formatter = _format_js_1.format } = options;
|
|
31
34
|
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
32
35
|
let message = `Values are not equal${msgSuffix}`;
|
|
33
|
-
const actualString = (
|
|
34
|
-
const expectedString = (
|
|
36
|
+
const actualString = formatter(actual);
|
|
37
|
+
const expectedString = formatter(expected);
|
|
35
38
|
try {
|
|
36
39
|
const stringDiff = (typeof actual === "string") &&
|
|
37
40
|
(typeof expected === "string");
|
|
38
41
|
const diffResult = stringDiff
|
|
39
|
-
? (0,
|
|
40
|
-
: (0,
|
|
41
|
-
const diffMsg = (0,
|
|
42
|
+
? (0, _diff_js_1.diffstr)(actual, expected)
|
|
43
|
+
: (0, _diff_js_1.diff)(actualString.split("\n"), expectedString.split("\n"));
|
|
44
|
+
const diffMsg = (0, _diff_js_1.buildMessage)(diffResult, { stringDiff }).join("\n");
|
|
42
45
|
message = `${message}\n${diffMsg}`;
|
|
43
46
|
}
|
|
44
47
|
catch {
|