@mtkruto/node 0.67.1 → 0.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/0_errors.js +2 -6
- package/esm/3_errors.js +2 -12
- package/esm/3_transport.d.ts +3 -3
- package/esm/3_transport.js +3 -3
- package/esm/3_types.d.ts +8 -7
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +8 -7
- package/esm/4_errors.js +2 -12
- package/esm/_dnt.polyfills.d.ts +99 -0
- package/esm/_dnt.polyfills.d.ts.map +1 -1
- package/esm/_dnt.polyfills.js +127 -1
- package/esm/_dnt.test_polyfills.d.ts.map +1 -0
- package/esm/client/0_filters_test.d.ts.map +1 -1
- package/esm/client/0_markdown_test.d.ts.map +1 -1
- package/esm/client/0_params.d.ts +2 -0
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_password.d.ts +5 -5
- package/esm/client/0_password.d.ts.map +1 -1
- package/esm/client/0_password_test.d.ts.map +1 -1
- package/esm/client/0_storage_operations.js +143 -155
- package/esm/client/0_storage_operations_test.d.ts.map +1 -1
- package/esm/client/0_utilities.d.ts +1 -1
- package/esm/client/0_utilities_test.d.ts.map +1 -1
- package/esm/client/1_client_plain.js +4 -22
- package/esm/client/1_composer.js +8 -21
- package/esm/client/2_account_manager.js +85 -97
- package/esm/client/2_bot_info_manager.js +26 -38
- package/esm/client/2_business_connection_manager.js +10 -23
- package/esm/client/2_client_encrypted.js +194 -211
- package/esm/client/2_file_manager.d.ts +4 -3
- package/esm/client/2_file_manager.d.ts.map +1 -1
- package/esm/client/2_file_manager.js +268 -224
- package/esm/client/2_file_manager_test.d.ts.map +1 -1
- package/esm/client/2_network_statistics_manager.js +8 -21
- package/esm/client/2_payment_manager.js +7 -20
- package/esm/client/2_reaction_manager.js +7 -20
- package/esm/client/2_translations_manager.js +97 -107
- package/esm/client/2_update_manager.js +764 -759
- package/esm/client/3_client_encrypted_pool.js +10 -26
- package/esm/client/3_client_encrypted_pool_test.d.ts.map +1 -1
- package/esm/client/3_message_manager.d.ts +1 -1
- package/esm/client/3_message_manager.js +441 -448
- package/esm/client/3_message_manager_test.d.ts.map +1 -1
- package/esm/client/3_video_chat_manager.d.ts +1 -1
- package/esm/client/3_video_chat_manager.js +57 -68
- package/esm/client/4_callback_query_manager.js +18 -30
- package/esm/client/4_chat_list_manager.js +322 -318
- package/esm/client/4_chat_manager.js +118 -131
- package/esm/client/4_forum_manager.js +67 -73
- package/esm/client/4_gift_manager.js +16 -29
- package/esm/client/4_inline_query_manager.js +16 -28
- package/esm/client/4_link_preview_manager.js +6 -19
- package/esm/client/4_poll_manager.js +44 -57
- package/esm/client/4_story_manager.js +41 -53
- package/esm/client/5_client.d.ts +7 -0
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +1271 -1290
- package/esm/connection/1_connection_tcp.node.js +48 -65
- package/esm/connection/1_connection_web_socket.js +75 -91
- package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.js +3 -11
- package/esm/deps/jsr.io/@std/assert/1.0.13/equals.js +4 -4
- package/esm/deps/jsr.io/@std/async/1.0.13/mux_async_iterator.js +31 -47
- package/esm/deps/jsr.io/@std/async/1.0.13/tee.js +11 -34
- package/esm/deps/jsr.io/@std/datetime/0.225.5/_date_time_formatter.js +4 -17
- package/esm/deps/jsr.io/@std/internal/1.0.10/build_message.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/diff.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/diff_str.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/format.d.ts +29 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/format.js +70 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/styles.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/types.d.ts.map +1 -0
- package/esm/mod.js +2 -12
- package/esm/session/0_session_state.js +12 -38
- package/esm/session/1_session.js +49 -72
- package/esm/session/2_session_encrypted.js +324 -320
- package/esm/storage/1_utilities_test.d.ts.map +1 -1
- package/esm/storage/2_storage_indexed_db.js +26 -44
- package/esm/storage/2_storage_local_storage.node.js +12 -25
- package/esm/storage/2_storage_memory.js +24 -41
- package/esm/storage/2_storage_session_storage.js +3 -16
- package/esm/tl/0_utilities_test.d.ts.map +1 -1
- package/esm/tl/1_tl_reader.js +80 -88
- package/esm/tl/1_tl_reader_test.d.ts.map +1 -1
- package/esm/tl/1_tl_writer.js +155 -164
- package/esm/tl/1_tl_writer_test.d.ts.map +1 -1
- package/esm/tl/2_telegram.d.ts +9 -10
- package/esm/tl/2_telegram.d.ts.map +1 -1
- package/esm/tl/2_telegram.js +10 -10
- package/esm/transport/0_transport.js +1 -8
- package/esm/transport/1_transport_abridged.js +11 -24
- package/esm/transport/1_transport_intermediate.js +10 -23
- package/{script/transport/2_transport_provider.d.ts → esm/transport/1_transport_provider.d.ts} +1 -1
- package/esm/transport/{2_transport_provider.d.ts.map → 1_transport_provider.d.ts.map} +1 -1
- package/{script/transport/3_transport_provider_tcp.d.ts → esm/transport/2_transport_provider_tcp.d.ts} +2 -2
- package/esm/transport/{3_transport_provider_tcp.d.ts.map → 2_transport_provider_tcp.d.ts.map} +1 -1
- package/esm/transport/{3_transport_provider_tcp.js → 2_transport_provider_tcp.js} +1 -1
- package/esm/transport/{3_transport_provider_web_socket.d.ts → 2_transport_provider_web_socket.d.ts} +2 -2
- package/esm/transport/2_transport_provider_web_socket.d.ts.map +1 -0
- package/esm/transport/{3_transport_provider_web_socket.js → 2_transport_provider_web_socket.js} +1 -1
- package/esm/types/0_upload_progress.d.ts +29 -0
- package/esm/types/0_upload_progress.d.ts.map +1 -0
- package/esm/types/0_upload_progress.js +20 -0
- package/esm/types/{2_inline_keyboard_button.d.ts → 1_inline_keyboard_button.d.ts} +1 -1
- package/esm/types/{2_inline_keyboard_button.d.ts.map → 1_inline_keyboard_button.d.ts.map} +1 -1
- package/esm/types/1_sticker.d.ts +1 -1
- package/esm/types/1_sticker.d.ts.map +1 -1
- package/esm/types/2_chat.d.ts.map +1 -1
- package/esm/types/2_poll_answer.d.ts +19 -0
- package/esm/types/2_poll_answer.d.ts.map +1 -1
- package/esm/types/2_poll_answer.js +19 -0
- package/esm/types/2_pre_checkout_query.d.ts.map +1 -1
- package/esm/types/{3_reply_markup.d.ts → 2_reply_markup.d.ts} +2 -2
- package/esm/types/{3_reply_markup.d.ts.map → 2_reply_markup.d.ts.map} +1 -1
- package/esm/types/{3_reply_markup.js → 2_reply_markup.js} +1 -1
- package/esm/types/2_story_interactive_area.d.ts.map +1 -1
- package/esm/types/3_chat_member_updated.d.ts.map +1 -1
- package/esm/types/3_story.d.ts.map +1 -1
- package/esm/types/5_message.d.ts +1 -1
- package/esm/types/5_message.d.ts.map +1 -1
- package/esm/types/5_message.js +1 -1
- package/esm/types/6_inline_query_result.d.ts +1 -1
- package/esm/types/6_inline_query_result.js +1 -1
- package/esm/types/7_update.d.ts +21 -2
- package/esm/types/7_update.d.ts.map +1 -1
- package/esm/utilities/0_bigint_test.d.ts.map +1 -1
- package/esm/utilities/0_buffer.d.ts +1 -1
- package/esm/utilities/0_buffer.d.ts.map +1 -1
- package/esm/utilities/0_buffer_test.d.ts.map +1 -1
- package/esm/utilities/0_hash.d.ts +2 -2
- package/esm/utilities/0_hash.d.ts.map +1 -1
- package/esm/utilities/0_mutex.js +4 -19
- package/esm/utilities/0_part_stream.js +11 -25
- package/esm/utilities/0_part_stream_test.d.ts.map +1 -1
- package/esm/utilities/0_rle.d.ts +2 -2
- package/esm/utilities/0_rle.d.ts.map +1 -1
- package/esm/utilities/0_rle_test.d.ts.map +1 -1
- package/esm/utilities/0_text.d.ts +20 -1
- package/esm/utilities/0_text.d.ts.map +1 -1
- package/esm/utilities/0_text.js +19 -0
- package/esm/utilities/1_auth.d.ts +1 -1
- package/esm/utilities/1_auth.d.ts.map +1 -1
- package/esm/utilities/1_base64.d.ts +1 -1
- package/esm/utilities/1_base64.d.ts.map +1 -1
- package/esm/utilities/1_base64_test.d.ts.map +1 -1
- package/esm/utilities/1_crypto.js +42 -53
- package/esm/utilities/1_crypto_test.d.ts.map +1 -1
- package/esm/utilities/1_logger.d.ts +2 -2
- package/esm/utilities/1_math_test.d.ts.map +1 -1
- package/esm/utilities/2_queue.js +29 -47
- package/package.json +1 -1
- package/script/0_errors.js +2 -6
- package/script/2_tl.js +17 -7
- package/script/3_errors.js +2 -12
- package/script/3_transport.d.ts +3 -3
- package/script/3_transport.js +3 -3
- package/script/3_types.d.ts +8 -7
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +8 -7
- package/script/4_constants.js +17 -7
- package/script/4_errors.js +2 -12
- package/script/_dnt.polyfills.d.ts +99 -0
- package/script/_dnt.polyfills.d.ts.map +1 -1
- package/script/_dnt.polyfills.js +128 -0
- package/script/_dnt.test_polyfills.d.ts.map +1 -0
- package/script/client/0_filters_test.d.ts.map +1 -1
- package/script/client/0_markdown_test.d.ts.map +1 -1
- package/script/client/0_params.d.ts +2 -0
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_password.d.ts +5 -5
- package/script/client/0_password.d.ts.map +1 -1
- package/script/client/0_password.js +17 -7
- package/script/client/0_password_test.d.ts.map +1 -1
- package/script/client/0_storage_operations.js +143 -155
- package/script/client/0_storage_operations_test.d.ts.map +1 -1
- package/script/client/0_utilities.d.ts +1 -1
- package/script/client/0_utilities_test.d.ts.map +1 -1
- package/script/client/1_client_plain.js +4 -22
- package/script/client/1_composer.js +8 -21
- package/script/client/2_account_manager.js +85 -97
- package/script/client/2_bot_info_manager.js +26 -38
- package/script/client/2_business_connection_manager.js +10 -23
- package/script/client/2_client_encrypted.js +195 -212
- package/script/client/2_file_manager.d.ts +4 -3
- package/script/client/2_file_manager.d.ts.map +1 -1
- package/script/client/2_file_manager.js +285 -231
- package/script/client/2_file_manager_test.d.ts.map +1 -1
- package/script/client/2_network_statistics_manager.js +8 -21
- package/script/client/2_payment_manager.js +7 -20
- package/script/client/2_reaction_manager.js +7 -20
- package/script/client/2_translations_manager.js +98 -108
- package/script/client/2_update_manager.js +764 -759
- package/script/client/3_client_encrypted_pool.js +10 -26
- package/script/client/3_client_encrypted_pool_test.d.ts.map +1 -1
- package/script/client/3_message_manager.d.ts +1 -1
- package/script/client/3_message_manager.js +441 -448
- package/script/client/3_message_manager_test.d.ts.map +1 -1
- package/script/client/3_video_chat_manager.d.ts +1 -1
- package/script/client/3_video_chat_manager.js +57 -68
- package/script/client/4_callback_query_manager.js +18 -30
- package/script/client/4_chat_list_manager.js +322 -318
- package/script/client/4_chat_manager.js +118 -131
- package/script/client/4_forum_manager.js +67 -73
- package/script/client/4_gift_manager.js +16 -29
- package/script/client/4_inline_query_manager.js +16 -28
- package/script/client/4_link_preview_manager.js +6 -19
- package/script/client/4_poll_manager.js +44 -57
- package/script/client/4_story_manager.js +41 -53
- package/script/client/5_client.d.ts +7 -0
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +1271 -1290
- package/script/connection/1_connection_tcp.node.js +48 -65
- package/script/connection/1_connection_web_socket.js +92 -98
- package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.js +3 -11
- package/script/deps/jsr.io/@std/assert/1.0.13/equal.js +17 -7
- package/script/deps/jsr.io/@std/assert/1.0.13/equals.js +4 -4
- package/script/deps/jsr.io/@std/async/1.0.13/delay.js +17 -7
- package/script/deps/jsr.io/@std/async/1.0.13/mux_async_iterator.js +31 -47
- package/script/deps/jsr.io/@std/async/1.0.13/tee.js +11 -34
- package/script/deps/jsr.io/@std/datetime/0.225.5/_date_time_formatter.js +4 -17
- package/script/deps/jsr.io/@std/internal/1.0.10/build_message.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/diff.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/diff_str.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/format.d.ts +29 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/format.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/format.js +106 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/styles.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/styles.js +17 -7
- package/script/deps/jsr.io/@std/internal/1.0.10/types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.0/_os.js +17 -7
- package/script/mod.js +19 -19
- package/script/session/0_session_state.js +12 -38
- package/script/session/1_session.js +66 -79
- package/script/session/2_session_encrypted.js +325 -321
- package/script/storage/1_utilities_test.d.ts.map +1 -1
- package/script/storage/2_storage_indexed_db.js +26 -44
- package/script/storage/2_storage_local_storage.node.js +12 -25
- package/script/storage/2_storage_memory.js +24 -41
- package/script/storage/2_storage_session_storage.js +3 -16
- package/script/tl/0_utilities_test.d.ts.map +1 -1
- package/script/tl/1_tl_reader.js +81 -89
- package/script/tl/1_tl_reader_test.d.ts.map +1 -1
- package/script/tl/1_tl_writer.js +156 -165
- package/script/tl/1_tl_writer_test.d.ts.map +1 -1
- package/script/tl/2_telegram.d.ts +9 -10
- package/script/tl/2_telegram.d.ts.map +1 -1
- package/script/tl/2_telegram.js +32 -10
- package/script/transport/0_obfuscation.js +17 -7
- package/script/transport/0_transport.js +1 -8
- package/script/transport/1_transport_abridged.js +11 -24
- package/script/transport/1_transport_intermediate.js +10 -23
- package/{esm/transport/2_transport_provider.d.ts → script/transport/1_transport_provider.d.ts} +1 -1
- package/script/transport/{2_transport_provider.d.ts.map → 1_transport_provider.d.ts.map} +1 -1
- package/{esm/transport/3_transport_provider_tcp.d.ts → script/transport/2_transport_provider_tcp.d.ts} +2 -2
- package/script/transport/{3_transport_provider_tcp.d.ts.map → 2_transport_provider_tcp.d.ts.map} +1 -1
- package/script/transport/{3_transport_provider_tcp.js → 2_transport_provider_tcp.js} +3 -3
- package/script/transport/{3_transport_provider_web_socket.d.ts → 2_transport_provider_web_socket.d.ts} +2 -2
- package/script/transport/2_transport_provider_web_socket.d.ts.map +1 -0
- package/script/transport/{3_transport_provider_web_socket.js → 2_transport_provider_web_socket.js} +2 -2
- package/script/types/0_upload_progress.d.ts +29 -0
- package/script/types/0_upload_progress.d.ts.map +1 -0
- package/script/types/0_upload_progress.js +21 -0
- package/script/types/{2_inline_keyboard_button.d.ts → 1_inline_keyboard_button.d.ts} +1 -1
- package/script/types/{2_inline_keyboard_button.d.ts.map → 1_inline_keyboard_button.d.ts.map} +1 -1
- package/script/types/1_sticker.d.ts +1 -1
- package/script/types/1_sticker.d.ts.map +1 -1
- package/script/types/2_chat.d.ts.map +1 -1
- package/script/types/2_poll_answer.d.ts +19 -0
- package/script/types/2_poll_answer.d.ts.map +1 -1
- package/script/types/2_poll_answer.js +19 -0
- package/script/types/2_pre_checkout_query.d.ts.map +1 -1
- package/script/types/{3_reply_markup.d.ts → 2_reply_markup.d.ts} +2 -2
- package/script/types/{3_reply_markup.d.ts.map → 2_reply_markup.d.ts.map} +1 -1
- package/script/types/{3_reply_markup.js → 2_reply_markup.js} +3 -3
- package/script/types/2_story_interactive_area.d.ts.map +1 -1
- package/script/types/3_chat_member_updated.d.ts.map +1 -1
- package/script/types/3_story.d.ts.map +1 -1
- package/script/types/5_message.d.ts +1 -1
- package/script/types/5_message.d.ts.map +1 -1
- package/script/types/5_message.js +2 -2
- package/script/types/6_inline_query_result.d.ts +1 -1
- package/script/types/6_inline_query_result.js +4 -4
- package/script/types/7_update.d.ts +21 -2
- package/script/types/7_update.d.ts.map +1 -1
- package/script/utilities/0_bigint.js +17 -7
- package/script/utilities/0_bigint_test.d.ts.map +1 -1
- package/script/utilities/0_buffer.d.ts +1 -1
- package/script/utilities/0_buffer.d.ts.map +1 -1
- package/script/utilities/0_buffer_test.d.ts.map +1 -1
- package/script/utilities/0_env.js +17 -7
- package/script/utilities/0_hash.d.ts +2 -2
- package/script/utilities/0_hash.d.ts.map +1 -1
- package/script/utilities/0_hash.js +17 -7
- package/script/utilities/0_misc.js +17 -7
- package/script/utilities/0_mutex.js +4 -19
- package/script/utilities/0_part_stream.js +11 -25
- package/script/utilities/0_part_stream_test.d.ts.map +1 -1
- package/script/utilities/0_rle.d.ts +2 -2
- package/script/utilities/0_rle.d.ts.map +1 -1
- package/script/utilities/0_rle_test.d.ts.map +1 -1
- package/script/utilities/0_text.d.ts +20 -1
- package/script/utilities/0_text.d.ts.map +1 -1
- package/script/utilities/0_text.js +19 -0
- package/script/utilities/1_auth.d.ts +1 -1
- package/script/utilities/1_auth.d.ts.map +1 -1
- package/script/utilities/1_auth.js +17 -7
- package/script/utilities/1_base64.d.ts +1 -1
- package/script/utilities/1_base64.d.ts.map +1 -1
- package/script/utilities/1_base64_test.d.ts.map +1 -1
- package/script/utilities/1_crypto.js +60 -61
- package/script/utilities/1_crypto_test.d.ts.map +1 -1
- package/script/utilities/1_logger.d.ts +2 -2
- package/script/utilities/1_math_test.d.ts.map +1 -1
- package/script/utilities/2_queue.js +30 -48
- package/esm/deps/jsr.io/@std/internal/1.0.9/build_message.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.9/diff.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.9/diff_str.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.9/format.d.ts +0 -2
- package/esm/deps/jsr.io/@std/internal/1.0.9/format.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.9/format.js +0 -37
- package/esm/deps/jsr.io/@std/internal/1.0.9/styles.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.9/types.d.ts.map +0 -1
- package/esm/transport/3_transport_provider_web_socket.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.9/build_message.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.9/diff.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.9/diff_str.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.9/format.d.ts +0 -2
- package/script/deps/jsr.io/@std/internal/1.0.9/format.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.9/format.js +0 -63
- package/script/deps/jsr.io/@std/internal/1.0.9/styles.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.9/types.d.ts.map +0 -1
- package/script/transport/3_transport_provider_web_socket.d.ts.map +0 -1
- /package/esm/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/build_message.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/build_message.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/diff.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/diff.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/diff_str.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/diff_str.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/styles.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/styles.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/types.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/types.js +0 -0
- /package/esm/transport/{2_transport_provider.js → 1_transport_provider.js} +0 -0
- /package/esm/types/{2_inline_keyboard_button.js → 1_inline_keyboard_button.js} +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/build_message.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/build_message.js +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/diff.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/diff.js +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/diff_str.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/diff_str.js +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/styles.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/types.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.9 → 1.0.10}/types.js +0 -0
- /package/script/transport/{2_transport_provider.js → 1_transport_provider.js} +0 -0
- /package/script/types/{2_inline_keyboard_button.js → 1_inline_keyboard_button.js} +0 -0
|
@@ -18,18 +18,6 @@
|
|
|
18
18
|
* You should have received a copy of the GNU Lesser General Public License
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
22
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
23
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
24
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
25
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
26
|
-
};
|
|
27
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
28
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
29
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
30
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
31
|
-
};
|
|
32
|
-
var _ConnectionTCP_instances, _ConnectionTCP_hostname, _ConnectionTCP_port, _ConnectionTCP_socket, _ConnectionTCP_rMutex, _ConnectionTCP_wMutex, _ConnectionTCP_buffer, _ConnectionTCP_nextResolve, _ConnectionTCP_rejectRead, _ConnectionTCP_assertConnected;
|
|
33
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
22
|
exports.ConnectionTCP = void 0;
|
|
35
23
|
const node_net_1 = require("node:net");
|
|
@@ -38,79 +26,84 @@ const _1_utilities_js_1 = require("../1_utilities.js");
|
|
|
38
26
|
const L = (0, _1_utilities_js_1.getLogger)("ConnectionTCP");
|
|
39
27
|
const errConnectionNotOpen = new _0_errors_js_1.ConnectionError("Connection not open");
|
|
40
28
|
class ConnectionTCP {
|
|
29
|
+
#hostname;
|
|
30
|
+
#port;
|
|
31
|
+
#socket;
|
|
32
|
+
#rMutex = new _1_utilities_js_1.Mutex();
|
|
33
|
+
#wMutex = new _1_utilities_js_1.Mutex();
|
|
34
|
+
#buffer = new Array();
|
|
35
|
+
#nextResolve = null;
|
|
36
|
+
stateChangeHandler;
|
|
41
37
|
constructor(hostname, port) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
Object.defineProperty(this, "stateChangeHandler", {
|
|
51
|
-
enumerable: true,
|
|
52
|
-
configurable: true,
|
|
53
|
-
writable: true,
|
|
54
|
-
value: void 0
|
|
55
|
-
});
|
|
56
|
-
__classPrivateFieldSet(this, _ConnectionTCP_hostname, hostname, "f");
|
|
57
|
-
__classPrivateFieldSet(this, _ConnectionTCP_port, port, "f");
|
|
38
|
+
this.#hostname = hostname;
|
|
39
|
+
this.#port = port;
|
|
40
|
+
}
|
|
41
|
+
#rejectRead() {
|
|
42
|
+
if (this.#nextResolve != null) {
|
|
43
|
+
this.#nextResolve[1].reject(errConnectionNotOpen);
|
|
44
|
+
this.#nextResolve = null;
|
|
45
|
+
}
|
|
58
46
|
}
|
|
59
47
|
open() {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
48
|
+
this.#socket = new node_net_1.Socket();
|
|
49
|
+
this.#socket.on("close", () => {
|
|
50
|
+
this.#rejectRead();
|
|
63
51
|
this.stateChangeHandler?.(false);
|
|
64
52
|
});
|
|
65
53
|
const mutex = new _1_utilities_js_1.Mutex();
|
|
66
|
-
|
|
54
|
+
this.#socket.on("data", async (data) => {
|
|
67
55
|
const unlock = await mutex.lock();
|
|
68
56
|
for (const byte of data) {
|
|
69
|
-
|
|
57
|
+
this.#buffer.push(byte);
|
|
70
58
|
}
|
|
71
|
-
if (
|
|
72
|
-
const resolve =
|
|
73
|
-
|
|
59
|
+
if (this.#nextResolve != null && this.#buffer.length >= this.#nextResolve[0]) {
|
|
60
|
+
const resolve = this.#nextResolve[1].resolve;
|
|
61
|
+
this.#nextResolve = null;
|
|
74
62
|
resolve();
|
|
75
63
|
}
|
|
76
64
|
unlock();
|
|
77
65
|
});
|
|
78
66
|
return new Promise((resolve, reject) => {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
67
|
+
this.#socket.connect(this.#port, this.#hostname);
|
|
68
|
+
this.#socket.once("error", reject);
|
|
69
|
+
this.#socket.once("connect", () => {
|
|
70
|
+
this.#socket.off("error", reject);
|
|
83
71
|
resolve();
|
|
84
72
|
this.stateChangeHandler?.(true);
|
|
85
|
-
L.debug("connected to",
|
|
73
|
+
L.debug("connected to", this.#hostname, "port", this.#port);
|
|
86
74
|
});
|
|
87
75
|
});
|
|
88
76
|
}
|
|
89
77
|
get connected() {
|
|
90
|
-
return
|
|
78
|
+
return this.#socket?.readyState == "open";
|
|
79
|
+
}
|
|
80
|
+
#assertConnected() {
|
|
81
|
+
if (!this.connected) {
|
|
82
|
+
throw errConnectionNotOpen;
|
|
83
|
+
}
|
|
91
84
|
}
|
|
92
85
|
async read(p) {
|
|
93
|
-
|
|
94
|
-
const unlock = await
|
|
86
|
+
this.#assertConnected();
|
|
87
|
+
const unlock = await this.#rMutex.lock();
|
|
95
88
|
try {
|
|
96
|
-
|
|
97
|
-
if (
|
|
98
|
-
await new Promise((resolve, reject) =>
|
|
89
|
+
this.#assertConnected();
|
|
90
|
+
if (this.#buffer.length < p.length) {
|
|
91
|
+
await new Promise((resolve, reject) => this.#nextResolve = [p.length, { resolve, reject }]);
|
|
99
92
|
}
|
|
100
|
-
p.set(
|
|
93
|
+
p.set(this.#buffer.splice(0, p.length));
|
|
101
94
|
}
|
|
102
95
|
finally {
|
|
103
96
|
unlock();
|
|
104
97
|
}
|
|
105
98
|
}
|
|
106
99
|
async write(p) {
|
|
107
|
-
|
|
108
|
-
const unlock = await
|
|
100
|
+
this.#assertConnected();
|
|
101
|
+
const unlock = await this.#wMutex.lock();
|
|
109
102
|
try {
|
|
110
|
-
|
|
103
|
+
this.#assertConnected();
|
|
111
104
|
try {
|
|
112
105
|
await new Promise((resolve, reject) => {
|
|
113
|
-
|
|
106
|
+
this.#socket.write(p, (err) => {
|
|
114
107
|
(err === undefined || err == null) ? resolve() : reject(err);
|
|
115
108
|
});
|
|
116
109
|
});
|
|
@@ -129,19 +122,9 @@ class ConnectionTCP {
|
|
|
129
122
|
}
|
|
130
123
|
}
|
|
131
124
|
close() {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
125
|
+
this.#assertConnected();
|
|
126
|
+
this.#socket.destroy();
|
|
127
|
+
this.#socket = undefined;
|
|
135
128
|
}
|
|
136
129
|
}
|
|
137
130
|
exports.ConnectionTCP = ConnectionTCP;
|
|
138
|
-
_ConnectionTCP_hostname = new WeakMap(), _ConnectionTCP_port = new WeakMap(), _ConnectionTCP_socket = new WeakMap(), _ConnectionTCP_rMutex = new WeakMap(), _ConnectionTCP_wMutex = new WeakMap(), _ConnectionTCP_buffer = new WeakMap(), _ConnectionTCP_nextResolve = new WeakMap(), _ConnectionTCP_instances = new WeakSet(), _ConnectionTCP_rejectRead = function _ConnectionTCP_rejectRead() {
|
|
139
|
-
if (__classPrivateFieldGet(this, _ConnectionTCP_nextResolve, "f") != null) {
|
|
140
|
-
__classPrivateFieldGet(this, _ConnectionTCP_nextResolve, "f")[1].reject(errConnectionNotOpen);
|
|
141
|
-
__classPrivateFieldSet(this, _ConnectionTCP_nextResolve, null, "f");
|
|
142
|
-
}
|
|
143
|
-
}, _ConnectionTCP_assertConnected = function _ConnectionTCP_assertConnected() {
|
|
144
|
-
if (!this.connected) {
|
|
145
|
-
throw errConnectionNotOpen;
|
|
146
|
-
}
|
|
147
|
-
};
|
|
@@ -15,25 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
var _ConnectionWebSocket_instances, _ConnectionWebSocket_url, _ConnectionWebSocket_webSocket, _ConnectionWebSocket_rMutex, _ConnectionWebSocket_wMutex, _ConnectionWebSocket_buffer, _ConnectionWebSocket_nextResolve, _ConnectionWebSocket_initWs, _ConnectionWebSocket_isConnecting, _ConnectionWebSocket_assertConnected, _ConnectionWebSocket_rejectRead;
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
37
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
36
|
exports.ConnectionWebSocket = void 0;
|
|
39
37
|
/**
|
|
@@ -62,118 +60,114 @@ const _1_utilities_js_1 = require("../1_utilities.js");
|
|
|
62
60
|
const L = (0, _1_utilities_js_1.getLogger)("ConnectionWebSocket");
|
|
63
61
|
const errConnectionNotOpen = new _0_errors_js_1.ConnectionError("Connection not open");
|
|
64
62
|
class ConnectionWebSocket {
|
|
63
|
+
#url;
|
|
64
|
+
#webSocket;
|
|
65
|
+
#rMutex = new _1_utilities_js_1.Mutex();
|
|
66
|
+
#wMutex = new _1_utilities_js_1.Mutex();
|
|
67
|
+
#buffer = new Uint8Array();
|
|
68
|
+
#nextResolve = null;
|
|
69
|
+
stateChangeHandler;
|
|
65
70
|
constructor(url) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
this.#url = url;
|
|
72
|
+
}
|
|
73
|
+
#initWs() {
|
|
74
|
+
return new Promise((resolve, reject) => {
|
|
75
|
+
const webSocket = new dntShim.WebSocket(this.#url, "binary");
|
|
76
|
+
const mutex = new _1_utilities_js_1.Mutex();
|
|
77
|
+
webSocket.addEventListener("close", () => {
|
|
78
|
+
this.#rejectRead();
|
|
79
|
+
this.stateChangeHandler?.(false);
|
|
80
|
+
});
|
|
81
|
+
webSocket.addEventListener("open", () => {
|
|
82
|
+
this.stateChangeHandler?.(true);
|
|
83
|
+
resolve(webSocket);
|
|
84
|
+
L.debug("connected to", this.#url);
|
|
85
|
+
});
|
|
86
|
+
webSocket.addEventListener("message", async (e) => {
|
|
87
|
+
if (typeof e.data === "string") {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const unlock = await mutex.lock();
|
|
91
|
+
const data = new Uint8Array(await new Blob([e.data].map((v) => v instanceof Blob || v instanceof Uint8Array ? v : v instanceof ArrayBuffer ? v : (0, _0_deps_js_1.unreachable)())).arrayBuffer());
|
|
92
|
+
this.#buffer = (0, _0_deps_js_1.concat)([this.#buffer, data]);
|
|
93
|
+
if (this.#nextResolve != null && this.#buffer.length >= this.#nextResolve[0]) {
|
|
94
|
+
this.#nextResolve[1].resolve();
|
|
95
|
+
this.#nextResolve = null;
|
|
96
|
+
}
|
|
97
|
+
unlock();
|
|
98
|
+
});
|
|
99
|
+
webSocket.addEventListener("error", (err) => {
|
|
100
|
+
if (this.#isConnecting) {
|
|
101
|
+
reject("message" in err ? new _0_errors_js_1.ConnectionError(err.message) : new _0_errors_js_1.ConnectionError("Connection failed"));
|
|
102
|
+
}
|
|
103
|
+
if (this.connected) {
|
|
104
|
+
L.error(err);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
78
107
|
});
|
|
79
|
-
_ConnectionWebSocket_isConnecting.set(this, false);
|
|
80
|
-
__classPrivateFieldSet(this, _ConnectionWebSocket_url, url, "f");
|
|
81
108
|
}
|
|
82
109
|
get connected() {
|
|
83
|
-
return !!
|
|
110
|
+
return !!this.#webSocket && this.#webSocket.readyState == dntShim.WebSocket.OPEN;
|
|
84
111
|
}
|
|
112
|
+
#isConnecting = false;
|
|
85
113
|
async open() {
|
|
86
|
-
if (
|
|
114
|
+
if (this.#isConnecting) {
|
|
87
115
|
throw new _0_errors_js_1.ConnectionError("Already connecting");
|
|
88
116
|
}
|
|
89
|
-
|
|
117
|
+
this.#isConnecting = true;
|
|
90
118
|
if (this.connected) {
|
|
91
119
|
throw new _0_errors_js_1.ConnectionError("Already connected");
|
|
92
120
|
}
|
|
93
121
|
try {
|
|
94
|
-
|
|
122
|
+
this.#webSocket = await this.#initWs();
|
|
95
123
|
}
|
|
96
124
|
finally {
|
|
97
|
-
|
|
125
|
+
this.#isConnecting = false;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
#assertConnected() {
|
|
129
|
+
if (!this.connected) {
|
|
130
|
+
throw errConnectionNotOpen;
|
|
98
131
|
}
|
|
99
132
|
}
|
|
100
133
|
async read(p) {
|
|
101
|
-
|
|
102
|
-
const unlock = await
|
|
134
|
+
this.#assertConnected();
|
|
135
|
+
const unlock = await this.#rMutex.lock();
|
|
103
136
|
try {
|
|
104
|
-
|
|
105
|
-
if (
|
|
106
|
-
await new Promise((resolve, reject) =>
|
|
137
|
+
this.#assertConnected();
|
|
138
|
+
if (this.#buffer.length < p.length) {
|
|
139
|
+
await new Promise((resolve, reject) => this.#nextResolve = [p.length, { resolve, reject }]);
|
|
107
140
|
}
|
|
108
|
-
const slice =
|
|
141
|
+
const slice = this.#buffer.slice(0, p.length);
|
|
109
142
|
p.set(slice);
|
|
110
|
-
|
|
143
|
+
this.#buffer = this.#buffer.slice(slice.length);
|
|
111
144
|
}
|
|
112
145
|
finally {
|
|
113
146
|
unlock();
|
|
114
147
|
}
|
|
115
148
|
}
|
|
116
149
|
async write(p) {
|
|
117
|
-
|
|
118
|
-
const unlock = await
|
|
150
|
+
this.#assertConnected();
|
|
151
|
+
const unlock = await this.#wMutex.lock();
|
|
119
152
|
try {
|
|
120
|
-
|
|
121
|
-
|
|
153
|
+
this.#assertConnected();
|
|
154
|
+
this.#webSocket.send(p);
|
|
122
155
|
}
|
|
123
156
|
finally {
|
|
124
157
|
unlock();
|
|
125
158
|
}
|
|
126
159
|
}
|
|
160
|
+
#rejectRead() {
|
|
161
|
+
if (this.#nextResolve != null) {
|
|
162
|
+
this.#nextResolve[1].reject(errConnectionNotOpen);
|
|
163
|
+
this.#nextResolve = null;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
127
166
|
close() {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
167
|
+
this.#assertConnected();
|
|
168
|
+
this.#webSocket.close(1000, "method");
|
|
169
|
+
this.#webSocket = undefined;
|
|
170
|
+
this.#rejectRead();
|
|
132
171
|
}
|
|
133
172
|
}
|
|
134
173
|
exports.ConnectionWebSocket = ConnectionWebSocket;
|
|
135
|
-
_ConnectionWebSocket_url = new WeakMap(), _ConnectionWebSocket_webSocket = new WeakMap(), _ConnectionWebSocket_rMutex = new WeakMap(), _ConnectionWebSocket_wMutex = new WeakMap(), _ConnectionWebSocket_buffer = new WeakMap(), _ConnectionWebSocket_nextResolve = new WeakMap(), _ConnectionWebSocket_isConnecting = new WeakMap(), _ConnectionWebSocket_instances = new WeakSet(), _ConnectionWebSocket_initWs = function _ConnectionWebSocket_initWs() {
|
|
136
|
-
return new Promise((resolve, reject) => {
|
|
137
|
-
const webSocket = new dntShim.WebSocket(__classPrivateFieldGet(this, _ConnectionWebSocket_url, "f"), "binary");
|
|
138
|
-
const mutex = new _1_utilities_js_1.Mutex();
|
|
139
|
-
webSocket.addEventListener("close", () => {
|
|
140
|
-
__classPrivateFieldGet(this, _ConnectionWebSocket_instances, "m", _ConnectionWebSocket_rejectRead).call(this);
|
|
141
|
-
this.stateChangeHandler?.(false);
|
|
142
|
-
});
|
|
143
|
-
webSocket.addEventListener("open", () => {
|
|
144
|
-
this.stateChangeHandler?.(true);
|
|
145
|
-
resolve(webSocket);
|
|
146
|
-
L.debug("connected to", __classPrivateFieldGet(this, _ConnectionWebSocket_url, "f"));
|
|
147
|
-
});
|
|
148
|
-
webSocket.addEventListener("message", async (e) => {
|
|
149
|
-
if (typeof e.data === "string") {
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
const unlock = await mutex.lock();
|
|
153
|
-
const data = new Uint8Array(await new Blob([e.data].map((v) => v instanceof Blob || v instanceof Uint8Array ? v : v instanceof ArrayBuffer ? v : (0, _0_deps_js_1.unreachable)())).arrayBuffer());
|
|
154
|
-
__classPrivateFieldSet(this, _ConnectionWebSocket_buffer, (0, _0_deps_js_1.concat)([__classPrivateFieldGet(this, _ConnectionWebSocket_buffer, "f"), data]), "f");
|
|
155
|
-
if (__classPrivateFieldGet(this, _ConnectionWebSocket_nextResolve, "f") != null && __classPrivateFieldGet(this, _ConnectionWebSocket_buffer, "f").length >= __classPrivateFieldGet(this, _ConnectionWebSocket_nextResolve, "f")[0]) {
|
|
156
|
-
__classPrivateFieldGet(this, _ConnectionWebSocket_nextResolve, "f")[1].resolve();
|
|
157
|
-
__classPrivateFieldSet(this, _ConnectionWebSocket_nextResolve, null, "f");
|
|
158
|
-
}
|
|
159
|
-
unlock();
|
|
160
|
-
});
|
|
161
|
-
webSocket.addEventListener("error", (err) => {
|
|
162
|
-
if (__classPrivateFieldGet(this, _ConnectionWebSocket_isConnecting, "f")) {
|
|
163
|
-
reject("message" in err ? new _0_errors_js_1.ConnectionError(err.message) : new _0_errors_js_1.ConnectionError("Connection failed"));
|
|
164
|
-
}
|
|
165
|
-
if (this.connected) {
|
|
166
|
-
L.error(err);
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
}, _ConnectionWebSocket_assertConnected = function _ConnectionWebSocket_assertConnected() {
|
|
171
|
-
if (!this.connected) {
|
|
172
|
-
throw errConnectionNotOpen;
|
|
173
|
-
}
|
|
174
|
-
}, _ConnectionWebSocket_rejectRead = function _ConnectionWebSocket_rejectRead() {
|
|
175
|
-
if (__classPrivateFieldGet(this, _ConnectionWebSocket_nextResolve, "f") != null) {
|
|
176
|
-
__classPrivateFieldGet(this, _ConnectionWebSocket_nextResolve, "f")[1].reject(errConnectionNotOpen);
|
|
177
|
-
__classPrivateFieldSet(this, _ConnectionWebSocket_nextResolve, null, "f");
|
|
178
|
-
}
|
|
179
|
-
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var Module = (() => {
|
|
4
|
-
var _scriptName =
|
|
4
|
+
var _scriptName = globalThis[Symbol.for("import-meta-ponyfill-commonjs")](require, module).url;
|
|
5
5
|
return (function (moduleArg = {}) {
|
|
6
6
|
var moduleRtn;
|
|
7
7
|
var Module = moduleArg;
|
|
@@ -119,16 +119,8 @@ var Module = (() => {
|
|
|
119
119
|
}
|
|
120
120
|
} wasmBinaryFile ??= findWasmBinary(); instantiateAsync(wasmBinary, wasmBinaryFile, info, receiveInstantiationResult).catch(readyPromiseReject); return {}; }
|
|
121
121
|
class ExitStatus {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
enumerable: true,
|
|
125
|
-
configurable: true,
|
|
126
|
-
writable: true,
|
|
127
|
-
value: "ExitStatus"
|
|
128
|
-
});
|
|
129
|
-
this.message = `Program terminated with exit(${status})`;
|
|
130
|
-
this.status = status;
|
|
131
|
-
}
|
|
122
|
+
name = "ExitStatus";
|
|
123
|
+
constructor(status) { this.message = `Program terminated with exit(${status})`; this.status = status; }
|
|
132
124
|
}
|
|
133
125
|
var callRuntimeCallbacks = callbacks => { while (callbacks.length > 0) {
|
|
134
126
|
callbacks.shift()(Module);
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.equal = equal;
|
|
27
37
|
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
@@ -4,10 +4,10 @@ exports.assertEquals = assertEquals;
|
|
|
4
4
|
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const equal_js_1 = require("./equal.js");
|
|
7
|
-
const build_message_js_1 = require("../../internal/1.0.
|
|
8
|
-
const diff_js_1 = require("../../internal/1.0.
|
|
9
|
-
const diff_str_js_1 = require("../../internal/1.0.
|
|
10
|
-
const format_js_1 = require("../../internal/1.0.
|
|
7
|
+
const build_message_js_1 = require("../../internal/1.0.10/build_message.js");
|
|
8
|
+
const diff_js_1 = require("../../internal/1.0.10/diff.js");
|
|
9
|
+
const diff_str_js_1 = require("../../internal/1.0.10/diff_str.js");
|
|
10
|
+
const format_js_1 = require("../../internal/1.0.10/format.js");
|
|
11
11
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
12
12
|
/**
|
|
13
13
|
* Make an assertion that `actual` and `expected` are equal, deeply. If not
|
|
@@ -17,13 +17,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
17
17
|
}) : function(o, v) {
|
|
18
18
|
o["default"] = v;
|
|
19
19
|
});
|
|
20
|
-
var __importStar = (this && this.__importStar) || function (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
20
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
21
|
+
var ownKeys = function(o) {
|
|
22
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
23
|
+
var ar = [];
|
|
24
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
25
|
+
return ar;
|
|
26
|
+
};
|
|
27
|
+
return ownKeys(o);
|
|
28
|
+
};
|
|
29
|
+
return function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
27
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
38
|
exports.delay = delay;
|
|
29
39
|
/** Options for {@linkcode delay}. */
|
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
3
3
|
// This module is browser compatible.
|
|
4
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
5
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
6
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
7
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
8
|
-
};
|
|
9
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
10
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
11
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
12
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
13
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
14
|
-
};
|
|
15
|
-
var _MuxAsyncIterator_instances, _MuxAsyncIterator_iteratorCount, _MuxAsyncIterator_yields, _MuxAsyncIterator_throws, _MuxAsyncIterator_signal, _MuxAsyncIterator_callIteratorNext;
|
|
16
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
5
|
exports.MuxAsyncIterator = void 0;
|
|
18
6
|
/**
|
|
@@ -50,14 +38,11 @@ exports.MuxAsyncIterator = void 0;
|
|
|
50
38
|
* @typeParam T The type of the provided async iterables and generated async iterable.
|
|
51
39
|
*/
|
|
52
40
|
class MuxAsyncIterator {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
_MuxAsyncIterator_throws.set(this, []);
|
|
59
|
-
_MuxAsyncIterator_signal.set(this, Promise.withResolvers());
|
|
60
|
-
}
|
|
41
|
+
#iteratorCount = 0;
|
|
42
|
+
#yields = [];
|
|
43
|
+
// deno-lint-ignore no-explicit-any
|
|
44
|
+
#throws = [];
|
|
45
|
+
#signal = Promise.withResolvers();
|
|
61
46
|
/**
|
|
62
47
|
* Add an async iterable to the stream.
|
|
63
48
|
*
|
|
@@ -83,9 +68,23 @@ class MuxAsyncIterator {
|
|
|
83
68
|
* ```
|
|
84
69
|
*/
|
|
85
70
|
add(iterable) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
71
|
+
++this.#iteratorCount;
|
|
72
|
+
this.#callIteratorNext(iterable[Symbol.asyncIterator]());
|
|
73
|
+
}
|
|
74
|
+
async #callIteratorNext(iterator) {
|
|
75
|
+
try {
|
|
76
|
+
const { value, done } = await iterator.next();
|
|
77
|
+
if (done) {
|
|
78
|
+
--this.#iteratorCount;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
this.#yields.push({ iterator, value });
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
catch (e) {
|
|
85
|
+
this.#throws.push(e);
|
|
86
|
+
}
|
|
87
|
+
this.#signal.resolve();
|
|
89
88
|
}
|
|
90
89
|
/**
|
|
91
90
|
* Returns an async iterator of the stream.
|
|
@@ -111,22 +110,22 @@ class MuxAsyncIterator {
|
|
|
111
110
|
* ```
|
|
112
111
|
*/
|
|
113
112
|
async *iterate() {
|
|
114
|
-
while (
|
|
113
|
+
while (this.#iteratorCount > 0) {
|
|
115
114
|
// Sleep until any of the wrapped iterators yields.
|
|
116
|
-
await
|
|
115
|
+
await this.#signal.promise;
|
|
117
116
|
// Note that while we're looping over `yields`, new items may be added.
|
|
118
|
-
for (const { iterator, value } of
|
|
117
|
+
for (const { iterator, value } of this.#yields) {
|
|
119
118
|
yield value;
|
|
120
|
-
|
|
119
|
+
this.#callIteratorNext(iterator);
|
|
121
120
|
}
|
|
122
|
-
if (
|
|
123
|
-
for (const e of
|
|
121
|
+
if (this.#throws.length) {
|
|
122
|
+
for (const e of this.#throws) {
|
|
124
123
|
throw e;
|
|
125
124
|
}
|
|
126
125
|
}
|
|
127
126
|
// Clear the `yields` list and reset the `signal` promise.
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
this.#yields.length = 0;
|
|
128
|
+
this.#signal = Promise.withResolvers();
|
|
130
129
|
}
|
|
131
130
|
}
|
|
132
131
|
/**
|
|
@@ -152,22 +151,7 @@ class MuxAsyncIterator {
|
|
|
152
151
|
* assertEquals(result, [1, 2, 3]);
|
|
153
152
|
* ```
|
|
154
153
|
*/
|
|
155
|
-
[(
|
|
156
|
-
var _a;
|
|
157
|
-
try {
|
|
158
|
-
const { value, done } = await iterator.next();
|
|
159
|
-
if (done) {
|
|
160
|
-
__classPrivateFieldSet(this, _MuxAsyncIterator_iteratorCount, (_a = __classPrivateFieldGet(this, _MuxAsyncIterator_iteratorCount, "f"), --_a), "f");
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
__classPrivateFieldGet(this, _MuxAsyncIterator_yields, "f").push({ iterator, value });
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
catch (e) {
|
|
167
|
-
__classPrivateFieldGet(this, _MuxAsyncIterator_throws, "f").push(e);
|
|
168
|
-
}
|
|
169
|
-
__classPrivateFieldGet(this, _MuxAsyncIterator_signal, "f").resolve();
|
|
170
|
-
}, Symbol.asyncIterator)]() {
|
|
154
|
+
[Symbol.asyncIterator]() {
|
|
171
155
|
return this.iterate();
|
|
172
156
|
}
|
|
173
157
|
}
|