@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
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const _1_connection_http_js_1 = require("../connection/1_connection_http.js");
|
|
3
|
+
exports.webSocketTransportProvider = void 0;
|
|
5
4
|
const _1_connection_web_socket_js_1 = require("../connection/1_connection_web_socket.js");
|
|
6
|
-
const _1_transport_piped_js_1 = require("./1_transport_piped.js");
|
|
7
5
|
const _1_transport_intermediate_js_1 = require("./1_transport_intermediate.js");
|
|
8
6
|
const dcToNameMap = {
|
|
9
7
|
"1": "pluto",
|
|
@@ -33,37 +31,3 @@ const webSocketTransportProvider = ({ initialDc, wss }) => {
|
|
|
33
31
|
};
|
|
34
32
|
};
|
|
35
33
|
exports.webSocketTransportProvider = webSocketTransportProvider;
|
|
36
|
-
const dcToIPv4Map = {
|
|
37
|
-
"1": "149.154.175.50",
|
|
38
|
-
"1-test": "149.154.175.10",
|
|
39
|
-
"2": "149.154.167.51",
|
|
40
|
-
"2-test": "149.154.167.40",
|
|
41
|
-
"3": "149.154.175.100",
|
|
42
|
-
"3-test": "149.154.175.117",
|
|
43
|
-
"4": "149.154.167.91",
|
|
44
|
-
"5": "149.154.171.5",
|
|
45
|
-
};
|
|
46
|
-
const dcToIPv6Map = {
|
|
47
|
-
"1": "[2001:b28:f23d:f001::a]",
|
|
48
|
-
"1-test": "[2001:b28:f23d:f001::e]",
|
|
49
|
-
"2": "[2001:67c:4e8:f002::a]",
|
|
50
|
-
"2-test": "[2001:67c:4e8:f002::e]",
|
|
51
|
-
"3": "[2001:b28:f23d:f003::a]",
|
|
52
|
-
"3-test": "[2001:b28:f23d:f003::e]",
|
|
53
|
-
"4": "[2001:67c:4e8:f004::a]",
|
|
54
|
-
"5": "[2001:b28:f23f:f005::a]",
|
|
55
|
-
};
|
|
56
|
-
const httpTransportProvider = ({ initialDc, secure, v6 }) => {
|
|
57
|
-
return {
|
|
58
|
-
initialDc,
|
|
59
|
-
createTransport({ dc, cdn }) {
|
|
60
|
-
dc ??= initialDc;
|
|
61
|
-
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"}`;
|
|
62
|
-
const connection = new _1_connection_http_js_1.ConnectionHTTP(url);
|
|
63
|
-
const transport = new _1_transport_piped_js_1.TransportPiped(connection);
|
|
64
|
-
const dcId = getDcId(dc, cdn);
|
|
65
|
-
return { connection, transport, dcId };
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
exports.httpTransportProvider = httpTransportProvider;
|
|
@@ -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;
|
|
@@ -23,87 +23,65 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.messageEntityToTlObject = exports.constructMessageEntity =
|
|
26
|
+
exports.messageEntityToTlObject = exports.constructMessageEntity = void 0;
|
|
27
27
|
const types = __importStar(require("../tl/2_types.js"));
|
|
28
|
-
var MessageEntityType;
|
|
29
|
-
(function (MessageEntityType) {
|
|
30
|
-
MessageEntityType["Mention"] = "mention";
|
|
31
|
-
MessageEntityType["Hashtag"] = "hashtag";
|
|
32
|
-
MessageEntityType["BotCommand"] = "bot_command";
|
|
33
|
-
MessageEntityType["URL"] = "url";
|
|
34
|
-
MessageEntityType["Email"] = "email";
|
|
35
|
-
MessageEntityType["Bold"] = "bold";
|
|
36
|
-
MessageEntityType["Italic"] = "italic";
|
|
37
|
-
MessageEntityType["Code"] = "code";
|
|
38
|
-
MessageEntityType["Pre"] = "pre";
|
|
39
|
-
MessageEntityType["TextURL"] = "text_url";
|
|
40
|
-
MessageEntityType["MentionName"] = "mention_name";
|
|
41
|
-
MessageEntityType["Cashtag"] = "cashtag";
|
|
42
|
-
MessageEntityType["Phone"] = "phone";
|
|
43
|
-
MessageEntityType["Underline"] = "underline";
|
|
44
|
-
MessageEntityType["Strike"] = "strike";
|
|
45
|
-
MessageEntityType["Blockquote"] = "blockquote";
|
|
46
|
-
MessageEntityType["BankCard"] = "bank_card";
|
|
47
|
-
MessageEntityType["Spoiler"] = "spoiler";
|
|
48
|
-
MessageEntityType["CustomEmoji"] = "custom_emoji";
|
|
49
|
-
})(MessageEntityType = exports.MessageEntityType || (exports.MessageEntityType = {}));
|
|
50
28
|
function constructMessageEntity(obj) {
|
|
51
29
|
if (obj instanceof types.MessageEntityMention) {
|
|
52
|
-
return { type:
|
|
30
|
+
return { type: "mention", offset: obj.offset, length: obj.length };
|
|
53
31
|
}
|
|
54
32
|
else if (obj instanceof types.MessageEntityHashtag) {
|
|
55
|
-
return { type:
|
|
33
|
+
return { type: "hashtag", offset: obj.offset, length: obj.length };
|
|
56
34
|
}
|
|
57
35
|
else if (obj instanceof types.MessageEntityBotCommand) {
|
|
58
|
-
return { type:
|
|
36
|
+
return { type: "bot_command", offset: obj.offset ?? 0, length: obj.length };
|
|
59
37
|
}
|
|
60
38
|
else if (obj instanceof types.MessageEntityURL) {
|
|
61
|
-
return { type:
|
|
39
|
+
return { type: "url", offset: obj.offset, length: obj.length };
|
|
62
40
|
}
|
|
63
41
|
else if (obj instanceof types.MessageEntityEmail) {
|
|
64
|
-
return { type:
|
|
42
|
+
return { type: "email", offset: obj.offset, length: obj.length };
|
|
65
43
|
}
|
|
66
44
|
else if (obj instanceof types.MessageEntityBold) {
|
|
67
|
-
return { type:
|
|
45
|
+
return { type: "bold", offset: obj.offset, length: obj.length };
|
|
68
46
|
}
|
|
69
47
|
else if (obj instanceof types.MessageEntityItalic) {
|
|
70
|
-
return { type:
|
|
48
|
+
return { type: "italic", offset: obj.offset, length: obj.length };
|
|
71
49
|
}
|
|
72
50
|
else if (obj instanceof types.MessageEntityCode) {
|
|
73
|
-
return { type:
|
|
51
|
+
return { type: "code", offset: obj.offset, length: obj.length };
|
|
74
52
|
}
|
|
75
53
|
else if (obj instanceof types.MessageEntityPre) {
|
|
76
|
-
return { type:
|
|
54
|
+
return { type: "pre", offset: obj.offset, length: obj.length, language: obj.language };
|
|
77
55
|
}
|
|
78
56
|
else if (obj instanceof types.MessageEntityTextURL) {
|
|
79
|
-
return { type:
|
|
57
|
+
return { type: "text_link", offset: obj.offset, length: obj.length, url: obj.url };
|
|
80
58
|
}
|
|
81
59
|
else if (obj instanceof types.MessageEntityMentionName) {
|
|
82
|
-
return { type:
|
|
60
|
+
return { type: "text_mention", offset: obj.offset, length: obj.length, userId: Number(obj.userId) };
|
|
83
61
|
}
|
|
84
62
|
else if (obj instanceof types.MessageEntityCashtag) {
|
|
85
|
-
return { type:
|
|
63
|
+
return { type: "cashtag", offset: obj.offset, length: obj.length };
|
|
86
64
|
}
|
|
87
65
|
else if (obj instanceof types.MessageEntityPhone) {
|
|
88
|
-
return { type:
|
|
66
|
+
return { type: "phone_number", offset: obj.offset, length: obj.length };
|
|
89
67
|
}
|
|
90
68
|
else if (obj instanceof types.MessageEntityUnderline) {
|
|
91
|
-
return { type:
|
|
69
|
+
return { type: "underline", offset: obj.offset, length: obj.length };
|
|
92
70
|
}
|
|
93
71
|
else if (obj instanceof types.MessageEntityStrike) {
|
|
94
|
-
return { type:
|
|
72
|
+
return { type: "strikethrough", offset: obj.offset, length: obj.length };
|
|
95
73
|
}
|
|
96
74
|
else if (obj instanceof types.MessageEntityBlockquote) {
|
|
97
|
-
return { type:
|
|
75
|
+
return { type: "blockquote", offset: obj.offset, length: obj.length };
|
|
98
76
|
}
|
|
99
77
|
else if (obj instanceof types.MessageEntityBankCard) {
|
|
100
|
-
return { type:
|
|
78
|
+
return { type: "bank_card", offset: obj.offset, length: obj.length };
|
|
101
79
|
}
|
|
102
80
|
else if (obj instanceof types.MessageEntitySpoiler) {
|
|
103
|
-
return { type:
|
|
81
|
+
return { type: "spoiler", offset: obj.offset, length: obj.length };
|
|
104
82
|
}
|
|
105
83
|
else if (obj instanceof types.MessageEntityCustomEmoji) {
|
|
106
|
-
return { type:
|
|
84
|
+
return { type: "custom_emoji", offset: obj.offset, length: obj.length, customEmojiId: String(obj.documentId) };
|
|
107
85
|
}
|
|
108
86
|
else {
|
|
109
87
|
return null;
|
|
@@ -113,43 +91,43 @@ exports.constructMessageEntity = constructMessageEntity;
|
|
|
113
91
|
function messageEntityToTlObject(entity) {
|
|
114
92
|
const { offset, length } = entity;
|
|
115
93
|
switch (entity.type) {
|
|
116
|
-
case
|
|
94
|
+
case "mention":
|
|
117
95
|
return new types.MessageEntityMention({ offset, length });
|
|
118
|
-
case
|
|
96
|
+
case "hashtag":
|
|
119
97
|
return new types.MessageEntityHashtag({ offset, length });
|
|
120
|
-
case
|
|
98
|
+
case "bot_command":
|
|
121
99
|
return new types.MessageEntityBotCommand({ offset, length });
|
|
122
|
-
case
|
|
100
|
+
case "url":
|
|
123
101
|
return new types.MessageEntityURL({ offset, length });
|
|
124
|
-
case
|
|
102
|
+
case "email":
|
|
125
103
|
return new types.MessageEntityEmail({ offset, length });
|
|
126
|
-
case
|
|
104
|
+
case "bold":
|
|
127
105
|
return new types.MessageEntityBold({ offset, length });
|
|
128
|
-
case
|
|
106
|
+
case "italic":
|
|
129
107
|
return new types.MessageEntityItalic({ offset, length });
|
|
130
|
-
case
|
|
108
|
+
case "code":
|
|
131
109
|
return new types.MessageEntityCode({ offset, length });
|
|
132
|
-
case
|
|
110
|
+
case "pre":
|
|
133
111
|
return new types.MessageEntityPre({ offset, length, language: entity.language });
|
|
134
|
-
case
|
|
112
|
+
case "text_link":
|
|
135
113
|
return new types.MessageEntityTextURL({ offset, length, url: entity.url });
|
|
136
|
-
case
|
|
114
|
+
case "text_mention":
|
|
137
115
|
return new types.MessageEntityMentionName({ offset, length, userId: BigInt(entity.userId) });
|
|
138
|
-
case
|
|
116
|
+
case "cashtag":
|
|
139
117
|
return new types.MessageEntityCashtag({ offset, length });
|
|
140
|
-
case
|
|
118
|
+
case "phone_number":
|
|
141
119
|
return new types.MessageEntityPhone({ offset, length });
|
|
142
|
-
case
|
|
120
|
+
case "underline":
|
|
143
121
|
return new types.MessageEntityUnderline({ offset, length });
|
|
144
|
-
case
|
|
122
|
+
case "strikethrough":
|
|
145
123
|
return new types.MessageEntityStrike({ offset, length });
|
|
146
|
-
case
|
|
124
|
+
case "blockquote":
|
|
147
125
|
return new types.MessageEntityBlockquote({ offset, length });
|
|
148
|
-
case
|
|
126
|
+
case "bank_card":
|
|
149
127
|
return new types.MessageEntityBankCard({ offset, length });
|
|
150
|
-
case
|
|
128
|
+
case "spoiler":
|
|
151
129
|
return new types.MessageEntitySpoiler({ offset, length });
|
|
152
|
-
case
|
|
130
|
+
case "custom_emoji":
|
|
153
131
|
return new types.MessageEntityCustomEmoji({ offset, length, documentId: BigInt(entity.customEmojiId) });
|
|
154
132
|
}
|
|
155
133
|
}
|
package/script/types/1_photo.js
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ConnectionFramed } from "./0_connection.js";
|
|
2
|
-
export declare class ConnectionHTTP extends ConnectionFramed implements ConnectionFramed {
|
|
3
|
-
private readonly url;
|
|
4
|
-
private rMutex;
|
|
5
|
-
private wMutex;
|
|
6
|
-
private resolveCanRead;
|
|
7
|
-
private canRead;
|
|
8
|
-
private buffers;
|
|
9
|
-
constructor(url: string | URL);
|
|
10
|
-
private resetCanRead;
|
|
11
|
-
get connected(): boolean;
|
|
12
|
-
open(): Promise<void>;
|
|
13
|
-
read(): Promise<Uint8Array>;
|
|
14
|
-
write(buffer: Uint8Array): Promise<void>;
|
|
15
|
-
close(): void;
|
|
16
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { Mutex } from "../deps.js";
|
|
2
|
-
import { UNREACHABLE } from "../utilities/0_control.js";
|
|
3
|
-
import { ConnectionFramed } from "./0_connection.js";
|
|
4
|
-
export class ConnectionHTTP extends ConnectionFramed {
|
|
5
|
-
constructor(url) {
|
|
6
|
-
super();
|
|
7
|
-
Object.defineProperty(this, "url", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
configurable: true,
|
|
10
|
-
writable: true,
|
|
11
|
-
value: url
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(this, "rMutex", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
configurable: true,
|
|
16
|
-
writable: true,
|
|
17
|
-
value: new Mutex()
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(this, "wMutex", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
configurable: true,
|
|
22
|
-
writable: true,
|
|
23
|
-
value: new Mutex()
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(this, "resolveCanRead", {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
configurable: true,
|
|
28
|
-
writable: true,
|
|
29
|
-
value: () => { }
|
|
30
|
-
});
|
|
31
|
-
Object.defineProperty(this, "canRead", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
configurable: true,
|
|
34
|
-
writable: true,
|
|
35
|
-
value: Promise.resolve()
|
|
36
|
-
});
|
|
37
|
-
Object.defineProperty(this, "buffers", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
configurable: true,
|
|
40
|
-
writable: true,
|
|
41
|
-
value: new Array()
|
|
42
|
-
});
|
|
43
|
-
this.resetCanRead();
|
|
44
|
-
}
|
|
45
|
-
resetCanRead() {
|
|
46
|
-
this.canRead = new Promise((r) => this.resolveCanRead = r);
|
|
47
|
-
}
|
|
48
|
-
get connected() {
|
|
49
|
-
return true;
|
|
50
|
-
}
|
|
51
|
-
async open() {
|
|
52
|
-
}
|
|
53
|
-
async read() {
|
|
54
|
-
await this.canRead;
|
|
55
|
-
const release = await this.rMutex.acquire();
|
|
56
|
-
try {
|
|
57
|
-
const buffer = this.buffers.pop();
|
|
58
|
-
if (buffer === undefined) {
|
|
59
|
-
throw UNREACHABLE();
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
return buffer;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
finally {
|
|
66
|
-
if (this.buffers.length == 0) {
|
|
67
|
-
this.resetCanRead();
|
|
68
|
-
}
|
|
69
|
-
release();
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
async write(buffer) {
|
|
73
|
-
const release = await this.wMutex.acquire();
|
|
74
|
-
try {
|
|
75
|
-
const res = await fetch(this.url, {
|
|
76
|
-
mode: "cors",
|
|
77
|
-
method: "POST",
|
|
78
|
-
body: buffer,
|
|
79
|
-
});
|
|
80
|
-
this.buffers.push(new Uint8Array(await res.arrayBuffer()));
|
|
81
|
-
}
|
|
82
|
-
finally {
|
|
83
|
-
if (this.buffers.length == 1) {
|
|
84
|
-
this.resolveCanRead();
|
|
85
|
-
}
|
|
86
|
-
release();
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
close() {
|
|
90
|
-
}
|
|
91
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ConnectionFramed } from "../connection/0_connection.js";
|
|
2
|
-
import { Transport } from "./0_transport.js";
|
|
3
|
-
export declare class TransportPiped extends Transport implements Transport {
|
|
4
|
-
private readonly connection;
|
|
5
|
-
constructor(connection: ConnectionFramed);
|
|
6
|
-
initialize(): Promise<void>;
|
|
7
|
-
receive(): import("../utilities/0_types.js").MaybePromise<Uint8Array>;
|
|
8
|
-
send(buffer: Uint8Array): import("../utilities/0_types.js").MaybePromise<void>;
|
|
9
|
-
deinitialize(): void;
|
|
10
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Transport } from "./0_transport.js";
|
|
2
|
-
export class TransportPiped extends Transport {
|
|
3
|
-
constructor(connection) {
|
|
4
|
-
super();
|
|
5
|
-
Object.defineProperty(this, "connection", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
configurable: true,
|
|
8
|
-
writable: true,
|
|
9
|
-
value: connection
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
async initialize() {
|
|
13
|
-
}
|
|
14
|
-
receive() {
|
|
15
|
-
return this.connection.read();
|
|
16
|
-
}
|
|
17
|
-
send(buffer) {
|
|
18
|
-
return this.connection.write(buffer);
|
|
19
|
-
}
|
|
20
|
-
deinitialize() {
|
|
21
|
-
this.initialized = false;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ConnectionFramed } from "./0_connection.js";
|
|
2
|
-
export declare class ConnectionHTTP extends ConnectionFramed implements ConnectionFramed {
|
|
3
|
-
private readonly url;
|
|
4
|
-
private rMutex;
|
|
5
|
-
private wMutex;
|
|
6
|
-
private resolveCanRead;
|
|
7
|
-
private canRead;
|
|
8
|
-
private buffers;
|
|
9
|
-
constructor(url: string | URL);
|
|
10
|
-
private resetCanRead;
|
|
11
|
-
get connected(): boolean;
|
|
12
|
-
open(): Promise<void>;
|
|
13
|
-
read(): Promise<Uint8Array>;
|
|
14
|
-
write(buffer: Uint8Array): Promise<void>;
|
|
15
|
-
close(): void;
|
|
16
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConnectionHTTP = void 0;
|
|
4
|
-
const deps_js_1 = require("../deps.js");
|
|
5
|
-
const _0_control_js_1 = require("../utilities/0_control.js");
|
|
6
|
-
const _0_connection_js_1 = require("./0_connection.js");
|
|
7
|
-
class ConnectionHTTP extends _0_connection_js_1.ConnectionFramed {
|
|
8
|
-
constructor(url) {
|
|
9
|
-
super();
|
|
10
|
-
Object.defineProperty(this, "url", {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
configurable: true,
|
|
13
|
-
writable: true,
|
|
14
|
-
value: url
|
|
15
|
-
});
|
|
16
|
-
Object.defineProperty(this, "rMutex", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
configurable: true,
|
|
19
|
-
writable: true,
|
|
20
|
-
value: new deps_js_1.Mutex()
|
|
21
|
-
});
|
|
22
|
-
Object.defineProperty(this, "wMutex", {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
configurable: true,
|
|
25
|
-
writable: true,
|
|
26
|
-
value: new deps_js_1.Mutex()
|
|
27
|
-
});
|
|
28
|
-
Object.defineProperty(this, "resolveCanRead", {
|
|
29
|
-
enumerable: true,
|
|
30
|
-
configurable: true,
|
|
31
|
-
writable: true,
|
|
32
|
-
value: () => { }
|
|
33
|
-
});
|
|
34
|
-
Object.defineProperty(this, "canRead", {
|
|
35
|
-
enumerable: true,
|
|
36
|
-
configurable: true,
|
|
37
|
-
writable: true,
|
|
38
|
-
value: Promise.resolve()
|
|
39
|
-
});
|
|
40
|
-
Object.defineProperty(this, "buffers", {
|
|
41
|
-
enumerable: true,
|
|
42
|
-
configurable: true,
|
|
43
|
-
writable: true,
|
|
44
|
-
value: new Array()
|
|
45
|
-
});
|
|
46
|
-
this.resetCanRead();
|
|
47
|
-
}
|
|
48
|
-
resetCanRead() {
|
|
49
|
-
this.canRead = new Promise((r) => this.resolveCanRead = r);
|
|
50
|
-
}
|
|
51
|
-
get connected() {
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
async open() {
|
|
55
|
-
}
|
|
56
|
-
async read() {
|
|
57
|
-
await this.canRead;
|
|
58
|
-
const release = await this.rMutex.acquire();
|
|
59
|
-
try {
|
|
60
|
-
const buffer = this.buffers.pop();
|
|
61
|
-
if (buffer === undefined) {
|
|
62
|
-
throw (0, _0_control_js_1.UNREACHABLE)();
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
return buffer;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
finally {
|
|
69
|
-
if (this.buffers.length == 0) {
|
|
70
|
-
this.resetCanRead();
|
|
71
|
-
}
|
|
72
|
-
release();
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
async write(buffer) {
|
|
76
|
-
const release = await this.wMutex.acquire();
|
|
77
|
-
try {
|
|
78
|
-
const res = await fetch(this.url, {
|
|
79
|
-
mode: "cors",
|
|
80
|
-
method: "POST",
|
|
81
|
-
body: buffer,
|
|
82
|
-
});
|
|
83
|
-
this.buffers.push(new Uint8Array(await res.arrayBuffer()));
|
|
84
|
-
}
|
|
85
|
-
finally {
|
|
86
|
-
if (this.buffers.length == 1) {
|
|
87
|
-
this.resolveCanRead();
|
|
88
|
-
}
|
|
89
|
-
release();
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
close() {
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
exports.ConnectionHTTP = ConnectionHTTP;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ConnectionFramed } from "../connection/0_connection.js";
|
|
2
|
-
import { Transport } from "./0_transport.js";
|
|
3
|
-
export declare class TransportPiped extends Transport implements Transport {
|
|
4
|
-
private readonly connection;
|
|
5
|
-
constructor(connection: ConnectionFramed);
|
|
6
|
-
initialize(): Promise<void>;
|
|
7
|
-
receive(): import("../utilities/0_types.js").MaybePromise<Uint8Array>;
|
|
8
|
-
send(buffer: Uint8Array): import("../utilities/0_types.js").MaybePromise<void>;
|
|
9
|
-
deinitialize(): void;
|
|
10
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TransportPiped = void 0;
|
|
4
|
-
const _0_transport_js_1 = require("./0_transport.js");
|
|
5
|
-
class TransportPiped extends _0_transport_js_1.Transport {
|
|
6
|
-
constructor(connection) {
|
|
7
|
-
super();
|
|
8
|
-
Object.defineProperty(this, "connection", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
configurable: true,
|
|
11
|
-
writable: true,
|
|
12
|
-
value: connection
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
async initialize() {
|
|
16
|
-
}
|
|
17
|
-
receive() {
|
|
18
|
-
return this.connection.read();
|
|
19
|
-
}
|
|
20
|
-
send(buffer) {
|
|
21
|
-
return this.connection.write(buffer);
|
|
22
|
-
}
|
|
23
|
-
deinitialize() {
|
|
24
|
-
this.initialized = false;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.TransportPiped = TransportPiped;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|