@mtkruto/node 0.3.1 → 0.4.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_deps.d.ts +1 -1
- package/esm/0_deps.js +1 -1
- package/esm/4_constants.js +3 -3
- package/esm/client/0_params.d.ts +6 -2
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_password.js +2 -2
- package/esm/client/0_utilities.d.ts +4 -4
- package/esm/client/0_utilities.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +1 -1
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +6 -0
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +3 -3
- package/{script/deps/jsr.io/@std/io/0.224.9 → esm/deps/jsr.io/@std/io/0.225.0}/_constants.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.js +1 -1
- package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.d.ts.map +1 -1
- package/esm/transport/2_transport_provider.js +4 -4
- package/esm/utilities/0_units.js +3 -3
- package/esm/utilities/2_queue.d.ts.map +1 -1
- package/package.json +1 -1
- package/script/0_deps.d.ts +1 -1
- package/script/0_deps.js +3 -3
- package/script/4_constants.js +3 -3
- package/script/4_errors.js +2 -2
- package/script/client/0_filters.js +1 -2
- package/script/client/0_html.js +1 -2
- package/script/client/0_markdown.js +2 -2
- package/script/client/0_message.js +5 -6
- package/script/client/0_params.d.ts +6 -2
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_password.js +8 -8
- package/script/client/0_utilities.d.ts +4 -4
- package/script/client/0_utilities.d.ts.map +1 -1
- package/script/client/0_utilities.js +16 -16
- package/script/client/1_composer.js +4 -4
- package/script/client/2_update_manager.js +1 -1
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +6 -0
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +2 -2
- package/script/deps/deno.land/std@0.224.0/io/write_all.js +2 -3
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/DomSerializer.js +1 -1
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/ElementType.js +2 -2
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/FeedHandler.js +2 -2
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/Node.js +9 -9
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/mod.js +4 -4
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/decode_codepoint.js +1 -1
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/encode.js +3 -3
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/mod.js +4 -4
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/helpers.js +4 -4
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/legacy.js +5 -6
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/manipulation.js +6 -7
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/querying.js +6 -7
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/stringify.js +5 -6
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/traversal.js +8 -9
- package/script/deps/deno.land/x/tgcrypto@0.4.1/mod.js +10 -11
- package/script/deps/jsr.io/@std/assert/1.0.6/almost_equals.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/array_includes.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/assert.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/equal.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/equals.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/exists.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/fail.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/false.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/greater.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/greater_or_equal.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/instance_of.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/is_error.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/less.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/less_or_equal.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/match.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/not_equals.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/not_instance_of.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/not_match.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/object_match.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/rejects.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/strict_equals.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/string_includes.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/throws.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/unimplemented.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/unreachable.js +1 -2
- package/script/deps/jsr.io/@std/bytes/1.0.2/concat.js +1 -2
- package/script/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.js +1 -2
- package/script/deps/jsr.io/@std/encoding/1.0.5/base64.js +2 -3
- package/script/deps/jsr.io/@std/internal/1.0.4/build_message.js +3 -4
- package/script/deps/jsr.io/@std/internal/1.0.4/diff.js +5 -6
- package/script/deps/jsr.io/@std/internal/1.0.4/diff_str.js +4 -5
- package/script/deps/jsr.io/@std/internal/1.0.4/format.js +1 -2
- package/script/deps/jsr.io/@std/internal/1.0.4/styles.js +10 -11
- package/{esm/deps/jsr.io/@std/io/0.224.9 → script/deps/jsr.io/@std/io/0.225.0}/_constants.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.js +1 -1
- package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.js +2 -3
- package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/media-types/1.0.3/_util.js +8 -9
- package/script/deps/jsr.io/@std/media-types/1.0.3/all_extensions.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/content_type.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/extension.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/format_media_type.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/get_charset.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/parse_media_type.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/type_by_extension.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/assert_path.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/basename.js +3 -4
- package/script/deps/jsr.io/@std/path/1.0.6/_common/common.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/dirname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/format.js +2 -3
- package/script/deps/jsr.io/@std/path/1.0.6/_common/from_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/glob_to_reg_exp.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/normalize.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/normalize_string.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/relative.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/strip_trailing_separators.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/to_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/basename.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/common.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/dirname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/extname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/format.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/from_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/glob_to_regexp.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/is_absolute.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/is_glob.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/join.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/join_globs.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/normalize.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/normalize_glob.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/parse.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/_util.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/basename.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/dirname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/extname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/format.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/from_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/glob_to_regexp.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/is_absolute.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/join.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/join_globs.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/normalize.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/normalize_glob.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/parse.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/relative.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/resolve.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/to_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/to_namespaced_path.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/relative.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/resolve.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/to_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/to_namespaced_path.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/_util.js +3 -4
- package/script/deps/jsr.io/@std/path/1.0.6/windows/basename.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/dirname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/extname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/format.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/from_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/glob_to_regexp.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/is_absolute.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/join.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/join_globs.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/normalize.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/normalize_glob.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/parse.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/relative.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/resolve.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/to_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/to_namespaced_path.js +1 -2
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/utils/uint8.js +1 -2
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/deflate.js +2 -2
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/adler32.js +1 -1
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/crc32.js +2 -3
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/deflate.js +6 -6
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/inffast.js +1 -1
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/inflate.js +10 -10
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/inftrees.js +1 -1
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/trees.js +5 -6
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.js +1 -2
- package/script/storage/1_utilities.js +7 -7
- package/script/tl/1_utilities.js +9 -10
- package/script/tl/2_deserialize.js +1 -2
- package/script/tl/2_serialize.js +1 -2
- package/script/tl/3_utilities.js +6 -7
- package/script/tl/4_rpc_result.js +2 -2
- package/script/tl/5_message.js +6 -6
- package/script/transport/0_obfuscation.js +1 -2
- package/script/transport/2_transport_provider.js +7 -8
- package/script/transport/3_transport_provider_tcp.js +1 -2
- package/script/types/0_birthday.js +1 -2
- package/script/types/0_callback_query_answer.js +1 -2
- package/script/types/0_callback_query_question.js +1 -2
- package/script/types/0_chat_administrator_rights.js +2 -3
- package/script/types/0_chat_member_rights.js +2 -3
- package/script/types/0_chat_photo.js +1 -2
- package/script/types/0_contact.js +1 -2
- package/script/types/0_dice.js +1 -2
- package/script/types/0_failed_invitation.js +1 -2
- package/script/types/0_giveaway_parameters.js +1 -2
- package/script/types/0_invoice.js +1 -2
- package/script/types/0_link_preview.js +1 -2
- package/script/types/0_live_stream_channel.js +1 -2
- package/script/types/0_location.js +1 -2
- package/script/types/0_mask_position.js +1 -2
- package/script/types/0_message_entity.js +3 -4
- package/script/types/0_message_search_filter.js +1 -2
- package/script/types/0_mini_app_info.js +1 -2
- package/script/types/0_opening_hours.js +1 -2
- package/script/types/0_reaction.js +3 -4
- package/script/types/0_refunded_payment.js +1 -2
- package/script/types/0_restriction_reason.js +1 -2
- package/script/types/0_self_destruct_option.js +1 -2
- package/script/types/0_shipping_address.js +1 -2
- package/script/types/0_thumbnail.js +1 -2
- package/script/types/0_video_chat.js +1 -2
- package/script/types/0_voice.js +1 -2
- package/script/types/1_animation.js +1 -2
- package/script/types/1_audio.js +1 -2
- package/script/types/1_bot_command_scope.js +1 -2
- package/script/types/1_chat_p.js +1 -2
- package/script/types/1_document.js +1 -2
- package/script/types/1_giveaway.js +1 -2
- package/script/types/1_keyboard_button.js +2 -3
- package/script/types/1_message_reaction.js +1 -2
- package/script/types/1_order_info.js +1 -2
- package/script/types/1_photo.js +2 -3
- package/script/types/1_poll_option.js +1 -2
- package/script/types/1_reaction_count.js +1 -2
- package/script/types/1_reply_quote.js +1 -2
- package/script/types/1_sticker.js +1 -2
- package/script/types/1_story_privacy.js +2 -3
- package/script/types/1_story_reaction.js +1 -2
- package/script/types/1_user.js +1 -2
- package/script/types/1_venue.js +1 -2
- package/script/types/1_video.js +1 -2
- package/script/types/1_video_note.js +1 -2
- package/script/types/2_business_connection.js +1 -2
- package/script/types/2_chat.js +1 -2
- package/script/types/2_chat_member.js +1 -2
- package/script/types/2_chosen_inline_result.js +1 -2
- package/script/types/2_forward_header.js +1 -2
- package/script/types/2_game.js +1 -2
- package/script/types/2_inactive_chat.js +1 -2
- package/script/types/2_inline_keyboard_button.js +2 -3
- package/script/types/2_inline_query.js +1 -2
- package/script/types/2_invite_link.js +1 -2
- package/script/types/2_message_reaction_count.js +1 -2
- package/script/types/2_message_reactions.js +1 -2
- package/script/types/2_poll.js +1 -2
- package/script/types/2_pre_checkout_query.js +1 -2
- package/script/types/2_story_content.js +1 -2
- package/script/types/2_story_interactions.js +1 -2
- package/script/types/2_story_interactive_area.js +2 -3
- package/script/types/2_successful_payment.js +1 -2
- package/script/types/3_chat_member_updated.js +1 -2
- package/script/types/3_join_request.js +1 -2
- package/script/types/3_reply_markup.js +2 -3
- package/script/types/3_story.js +1 -2
- package/script/types/4_inline_query_result.js +2 -3
- package/script/types/4_message.js +2 -3
- package/script/types/5_callback_query.js +2 -3
- package/script/types/5_chat_list_item.js +5 -6
- package/script/types/5_inline_query_answer.js +1 -2
- package/script/types/_file_id.js +5 -5
- package/script/utilities/0_bigint.js +6 -7
- package/script/utilities/0_buffer.js +1 -2
- package/script/utilities/0_color.js +2 -3
- package/script/utilities/0_env.js +2 -3
- package/script/utilities/0_hash.js +2 -3
- package/script/utilities/0_object.js +1 -2
- package/script/utilities/0_rle.js +2 -3
- package/script/utilities/0_units.js +3 -3
- package/script/utilities/1_auth.js +1 -2
- package/script/utilities/1_base64.js +2 -3
- package/script/utilities/1_logger.js +5 -5
- package/script/utilities/1_math.js +1 -2
- package/script/utilities/1_misc.js +8 -8
- package/script/utilities/2_queue.d.ts.map +1 -1
- /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.js +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.js +0 -0
- /package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.d.ts +0 -0
- /package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.d.ts +0 -0
- /package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.d.ts +0 -0
- /package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.js +0 -0
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getChildren = getChildren;
|
|
4
|
+
exports.getParent = getParent;
|
|
5
|
+
exports.getSiblings = getSiblings;
|
|
6
|
+
exports.getAttributeValue = getAttributeValue;
|
|
7
|
+
exports.hasAttrib = hasAttrib;
|
|
8
|
+
exports.getName = getName;
|
|
9
|
+
exports.nextElementSibling = nextElementSibling;
|
|
10
|
+
exports.prevElementSibling = prevElementSibling;
|
|
4
11
|
const Node_js_1 = require("../Node.js");
|
|
5
12
|
const emptyArray = [];
|
|
6
13
|
/**
|
|
@@ -12,7 +19,6 @@ const emptyArray = [];
|
|
|
12
19
|
function getChildren(elem) {
|
|
13
20
|
return elem.children ?? emptyArray;
|
|
14
21
|
}
|
|
15
|
-
exports.getChildren = getChildren;
|
|
16
22
|
/**
|
|
17
23
|
* Get a node's parent.
|
|
18
24
|
*
|
|
@@ -22,7 +28,6 @@ exports.getChildren = getChildren;
|
|
|
22
28
|
function getParent(elem) {
|
|
23
29
|
return elem.parent || null;
|
|
24
30
|
}
|
|
25
|
-
exports.getParent = getParent;
|
|
26
31
|
/**
|
|
27
32
|
* Gets an elements siblings, including the element itself.
|
|
28
33
|
*
|
|
@@ -49,7 +54,6 @@ function getSiblings(elem) {
|
|
|
49
54
|
}
|
|
50
55
|
return siblings;
|
|
51
56
|
}
|
|
52
|
-
exports.getSiblings = getSiblings;
|
|
53
57
|
/**
|
|
54
58
|
* Gets an attribute from an element.
|
|
55
59
|
*
|
|
@@ -60,7 +64,6 @@ exports.getSiblings = getSiblings;
|
|
|
60
64
|
function getAttributeValue(elem, name) {
|
|
61
65
|
return elem.attribs?.[name];
|
|
62
66
|
}
|
|
63
|
-
exports.getAttributeValue = getAttributeValue;
|
|
64
67
|
/**
|
|
65
68
|
* Checks whether an element has an attribute.
|
|
66
69
|
*
|
|
@@ -73,7 +76,6 @@ function hasAttrib(elem, name) {
|
|
|
73
76
|
Object.prototype.hasOwnProperty.call(elem.attribs, name) &&
|
|
74
77
|
elem.attribs[name] != null);
|
|
75
78
|
}
|
|
76
|
-
exports.hasAttrib = hasAttrib;
|
|
77
79
|
/**
|
|
78
80
|
* Get the tag name of an element.
|
|
79
81
|
*
|
|
@@ -83,7 +85,6 @@ exports.hasAttrib = hasAttrib;
|
|
|
83
85
|
function getName(elem) {
|
|
84
86
|
return elem.name;
|
|
85
87
|
}
|
|
86
|
-
exports.getName = getName;
|
|
87
88
|
/**
|
|
88
89
|
* Returns the next element sibling of a node.
|
|
89
90
|
*
|
|
@@ -96,7 +97,6 @@ function nextElementSibling(elem) {
|
|
|
96
97
|
({ next } = next);
|
|
97
98
|
return next;
|
|
98
99
|
}
|
|
99
|
-
exports.nextElementSibling = nextElementSibling;
|
|
100
100
|
/**
|
|
101
101
|
* Returns the previous element sibling of a node.
|
|
102
102
|
*
|
|
@@ -109,4 +109,3 @@ function prevElementSibling(elem) {
|
|
|
109
109
|
({ prev } = prev);
|
|
110
110
|
return prev;
|
|
111
111
|
}
|
|
112
|
-
exports.prevElementSibling = prevElementSibling;
|
|
@@ -3,7 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.init = init;
|
|
7
|
+
exports.ige256Encrypt = ige256Encrypt;
|
|
8
|
+
exports.ige256Decrypt = ige256Decrypt;
|
|
9
|
+
exports.createCtr256State = createCtr256State;
|
|
10
|
+
exports.destroyCtr256State = destroyCtr256State;
|
|
11
|
+
exports.__getCtr256StateValues = __getCtr256StateValues;
|
|
12
|
+
exports.__settCtr256StateState = __settCtr256StateState;
|
|
13
|
+
exports.ctr256 = ctr256;
|
|
14
|
+
exports.cbc256Encrypt = cbc256Encrypt;
|
|
15
|
+
exports.cbc256Decrypt = cbc256Decrypt;
|
|
7
16
|
const tgcrypto_js_1 = __importDefault(require("./tgcrypto.js"));
|
|
8
17
|
// deno-lint-ignore no-explicit-any
|
|
9
18
|
let module_;
|
|
@@ -11,7 +20,6 @@ const promise = (0, tgcrypto_js_1.default)().then((v) => module_ = v);
|
|
|
11
20
|
async function init() {
|
|
12
21
|
await promise;
|
|
13
22
|
}
|
|
14
|
-
exports.init = init;
|
|
15
23
|
function checkIgeParams(data, key, iv) {
|
|
16
24
|
if (data.byteLength == 0) {
|
|
17
25
|
throw new TypeError("data must not be empty");
|
|
@@ -47,7 +55,6 @@ function ige256Encrypt(data, key, iv) {
|
|
|
47
55
|
module_._free(datap);
|
|
48
56
|
}
|
|
49
57
|
}
|
|
50
|
-
exports.ige256Encrypt = ige256Encrypt;
|
|
51
58
|
/**
|
|
52
59
|
* Performs IGE-256 decryption.
|
|
53
60
|
*
|
|
@@ -69,7 +76,6 @@ function ige256Decrypt(data, key, iv) {
|
|
|
69
76
|
module_._free(datap);
|
|
70
77
|
}
|
|
71
78
|
}
|
|
72
|
-
exports.ige256Decrypt = ige256Decrypt;
|
|
73
79
|
function checkCtrParams(data, key) {
|
|
74
80
|
if (data.byteLength == 0) {
|
|
75
81
|
throw new TypeError("data must not be empty");
|
|
@@ -90,26 +96,22 @@ function createCtr256State(iv) {
|
|
|
90
96
|
module_.HEAPU8[state.statep] = 0;
|
|
91
97
|
return state;
|
|
92
98
|
}
|
|
93
|
-
exports.createCtr256State = createCtr256State;
|
|
94
99
|
function destroyCtr256State(state) {
|
|
95
100
|
module_._free(state.ivp);
|
|
96
101
|
module_._free(state.statep);
|
|
97
102
|
}
|
|
98
|
-
exports.destroyCtr256State = destroyCtr256State;
|
|
99
103
|
function __getCtr256StateValues(state) {
|
|
100
104
|
return {
|
|
101
105
|
iv: module_.HEAPU8.slice(state.ivp, state.ivp + 16),
|
|
102
106
|
state: module_.HEAPU8.slice(state.statep, state.statep + 1),
|
|
103
107
|
};
|
|
104
108
|
}
|
|
105
|
-
exports.__getCtr256StateValues = __getCtr256StateValues;
|
|
106
109
|
function __settCtr256StateState(state, state_) {
|
|
107
110
|
if (state_.byteLength != 1) {
|
|
108
111
|
throw new Error("state_ must be 1 byte");
|
|
109
112
|
}
|
|
110
113
|
module_.HEAPU8.set(state_, state.statep);
|
|
111
114
|
}
|
|
112
|
-
exports.__settCtr256StateState = __settCtr256StateState;
|
|
113
115
|
/**
|
|
114
116
|
* Performs CTR-256 encryption/decryption.
|
|
115
117
|
*
|
|
@@ -126,7 +128,6 @@ function ctr256(data, key, state) {
|
|
|
126
128
|
data.set(module_.HEAPU8.slice(datap, datap + data.byteLength));
|
|
127
129
|
module_._free(datap);
|
|
128
130
|
}
|
|
129
|
-
exports.ctr256 = ctr256;
|
|
130
131
|
function checkCbcParams(data, key, iv) {
|
|
131
132
|
if (data.byteLength == 0) {
|
|
132
133
|
throw new TypeError("data must not be empty");
|
|
@@ -160,7 +161,6 @@ function cbc256Encrypt(data, key, iv) {
|
|
|
160
161
|
module_._free(datap);
|
|
161
162
|
}
|
|
162
163
|
}
|
|
163
|
-
exports.cbc256Encrypt = cbc256Encrypt;
|
|
164
164
|
/**
|
|
165
165
|
* Performs CBC-256 decryption.
|
|
166
166
|
*
|
|
@@ -180,4 +180,3 @@ function cbc256Decrypt(data, key, iv) {
|
|
|
180
180
|
module_._free(datap);
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
exports.cbc256Decrypt = cbc256Decrypt;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertAlmostEquals =
|
|
3
|
+
exports.assertAlmostEquals = assertAlmostEquals;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
@@ -47,4 +47,3 @@ function assertAlmostEquals(actual, expected, tolerance, msg) {
|
|
|
47
47
|
throw new assertion_error_js_1.AssertionError(`Expected actual: "${f(actual)}" to be close to "${f(expected)}": \
|
|
48
48
|
delta "${f(delta)}" is greater than "${f(tolerance)}"${msgSuffix}`);
|
|
49
49
|
}
|
|
50
|
-
exports.assertAlmostEquals = assertAlmostEquals;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertArrayIncludes =
|
|
3
|
+
exports.assertArrayIncludes = assertArrayIncludes;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const equal_js_1 = require("./equal.js");
|
|
@@ -47,4 +47,3 @@ function assertArrayIncludes(actual, expected, msg) {
|
|
|
47
47
|
msg = `Expected actual: "${(0, format_js_1.format)(actual)}" to include: "${(0, format_js_1.format)(expected)}"${msgSuffix}\nmissing: ${(0, format_js_1.format)(missing)}`;
|
|
48
48
|
throw new assertion_error_js_1.AssertionError(msg);
|
|
49
49
|
}
|
|
50
|
-
exports.assertArrayIncludes = assertArrayIncludes;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assert =
|
|
3
|
+
exports.assert = assert;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
@@ -23,4 +23,3 @@ function assert(expr, msg = "") {
|
|
|
23
23
|
throw new assertion_error_js_1.AssertionError(msg);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
exports.assert = assert;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
3
|
// This module is browser compatible.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.equal =
|
|
5
|
+
exports.equal = equal;
|
|
6
6
|
function isKeyedCollection(x) {
|
|
7
7
|
return x instanceof Set || x instanceof Map;
|
|
8
8
|
}
|
|
@@ -137,4 +137,3 @@ function equal(c, d) {
|
|
|
137
137
|
return false;
|
|
138
138
|
})(c, d);
|
|
139
139
|
}
|
|
140
|
-
exports.equal = equal;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertEquals =
|
|
3
|
+
exports.assertEquals = assertEquals;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const equal_js_1 = require("./equal.js");
|
|
@@ -46,4 +46,3 @@ function assertEquals(actual, expected, msg) {
|
|
|
46
46
|
message = `${message}\n${diffMsg}`;
|
|
47
47
|
throw new assertion_error_js_1.AssertionError(message);
|
|
48
48
|
}
|
|
49
|
-
exports.assertEquals = assertEquals;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertExists =
|
|
3
|
+
exports.assertExists = assertExists;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
@@ -28,4 +28,3 @@ function assertExists(actual, msg) {
|
|
|
28
28
|
throw new assertion_error_js_1.AssertionError(msg);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
exports.assertExists = assertExists;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fail =
|
|
3
|
+
exports.fail = fail;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
@@ -21,4 +21,3 @@ function fail(msg) {
|
|
|
21
21
|
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
22
22
|
throw new assertion_error_js_1.AssertionError(`Failed assertion${msgSuffix}`);
|
|
23
23
|
}
|
|
24
|
-
exports.fail = fail;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertFalse =
|
|
3
|
+
exports.assertFalse = assertFalse;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
@@ -23,4 +23,3 @@ function assertFalse(expr, msg = "") {
|
|
|
23
23
|
throw new assertion_error_js_1.AssertionError(msg);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
exports.assertFalse = assertFalse;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertGreater =
|
|
3
|
+
exports.assertGreater = assertGreater;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const format_js_1 = require("../../internal/1.0.4/format.js");
|
|
@@ -30,4 +30,3 @@ function assertGreater(actual, expected, msg) {
|
|
|
30
30
|
const expectedString = (0, format_js_1.format)(expected);
|
|
31
31
|
throw new assertion_error_js_1.AssertionError(msg ?? `Expect ${actualString} > ${expectedString}`);
|
|
32
32
|
}
|
|
33
|
-
exports.assertGreater = assertGreater;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertGreaterOrEqual =
|
|
3
|
+
exports.assertGreaterOrEqual = assertGreaterOrEqual;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const format_js_1 = require("../../internal/1.0.4/format.js");
|
|
@@ -30,4 +30,3 @@ function assertGreaterOrEqual(actual, expected, msg) {
|
|
|
30
30
|
const expectedString = (0, format_js_1.format)(expected);
|
|
31
31
|
throw new assertion_error_js_1.AssertionError(msg ?? `Expect ${actualString} >= ${expectedString}`);
|
|
32
32
|
}
|
|
33
|
-
exports.assertGreaterOrEqual = assertGreaterOrEqual;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertInstanceOf =
|
|
3
|
+
exports.assertInstanceOf = assertInstanceOf;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
@@ -53,4 +53,3 @@ function assertInstanceOf(actual, expectedType, msg = "") {
|
|
|
53
53
|
}
|
|
54
54
|
throw new assertion_error_js_1.AssertionError(msg);
|
|
55
55
|
}
|
|
56
|
-
exports.assertInstanceOf = assertInstanceOf;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertIsError =
|
|
3
|
+
exports.assertIsError = assertIsError;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
@@ -54,4 +54,3 @@ ErrorClass, msgMatches, msg) {
|
|
|
54
54
|
throw new assertion_error_js_1.AssertionError(msg);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
exports.assertIsError = assertIsError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertLess =
|
|
3
|
+
exports.assertLess = assertLess;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const format_js_1 = require("../../internal/1.0.4/format.js");
|
|
@@ -29,4 +29,3 @@ function assertLess(actual, expected, msg) {
|
|
|
29
29
|
const expectedString = (0, format_js_1.format)(expected);
|
|
30
30
|
throw new assertion_error_js_1.AssertionError(msg ?? `Expect ${actualString} < ${expectedString}`);
|
|
31
31
|
}
|
|
32
|
-
exports.assertLess = assertLess;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertLessOrEqual =
|
|
3
|
+
exports.assertLessOrEqual = assertLessOrEqual;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const format_js_1 = require("../../internal/1.0.4/format.js");
|
|
@@ -30,4 +30,3 @@ function assertLessOrEqual(actual, expected, msg) {
|
|
|
30
30
|
const expectedString = (0, format_js_1.format)(expected);
|
|
31
31
|
throw new assertion_error_js_1.AssertionError(msg ?? `Expect ${actualString} <= ${expectedString}`);
|
|
32
32
|
}
|
|
33
|
-
exports.assertLessOrEqual = assertLessOrEqual;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertMatch =
|
|
3
|
+
exports.assertMatch = assertMatch;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
@@ -27,4 +27,3 @@ function assertMatch(actual, expected, msg) {
|
|
|
27
27
|
msg = `Expected actual: "${actual}" to match: "${expected}"${msgSuffix}`;
|
|
28
28
|
throw new assertion_error_js_1.AssertionError(msg);
|
|
29
29
|
}
|
|
30
|
-
exports.assertMatch = assertMatch;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
3
|
// This module is browser compatible.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.assertNotEquals =
|
|
5
|
+
exports.assertNotEquals = assertNotEquals;
|
|
6
6
|
const equal_js_1 = require("./equal.js");
|
|
7
7
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
8
8
|
/**
|
|
@@ -33,4 +33,3 @@ function assertNotEquals(actual, expected, msg) {
|
|
|
33
33
|
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
34
34
|
throw new assertion_error_js_1.AssertionError(`Expected actual: ${actualString} not to be: ${expectedString}${msgSuffix}`);
|
|
35
35
|
}
|
|
36
|
-
exports.assertNotEquals = assertNotEquals;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertNotInstanceOf =
|
|
3
|
+
exports.assertNotInstanceOf = assertNotInstanceOf;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const false_js_1 = require("./false.js");
|
|
@@ -30,4 +30,3 @@ unexpectedType, msg) {
|
|
|
30
30
|
`Expected object to not be an instance of "${typeof unexpectedType}"${msgSuffix}`;
|
|
31
31
|
(0, false_js_1.assertFalse)(actual instanceof unexpectedType, msg);
|
|
32
32
|
}
|
|
33
|
-
exports.assertNotInstanceOf = assertNotInstanceOf;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertNotMatch =
|
|
3
|
+
exports.assertNotMatch = assertNotMatch;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
@@ -27,4 +27,3 @@ function assertNotMatch(actual, expected, msg) {
|
|
|
27
27
|
msg = `Expected actual: "${actual}" to not match: "${expected}"${msgSuffix}`;
|
|
28
28
|
throw new assertion_error_js_1.AssertionError(msg);
|
|
29
29
|
}
|
|
30
|
-
exports.assertNotMatch = assertNotMatch;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertNotStrictEquals =
|
|
3
|
+
exports.assertNotStrictEquals = assertNotStrictEquals;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
@@ -33,4 +33,3 @@ function assertNotStrictEquals(actual, expected, msg) {
|
|
|
33
33
|
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
34
34
|
throw new assertion_error_js_1.AssertionError(`Expected "actual" to not be strictly equal to: ${(0, format_js_1.format)(actual)}${msgSuffix}\n`);
|
|
35
35
|
}
|
|
36
|
-
exports.assertNotStrictEquals = assertNotStrictEquals;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertObjectMatch =
|
|
3
|
+
exports.assertObjectMatch = assertObjectMatch;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const equals_js_1 = require("./equals.js");
|
|
@@ -41,7 +41,6 @@ actual, expected, msg) {
|
|
|
41
41
|
// see https://github.com/denoland/deno_std/pull/1419
|
|
42
42
|
filter(expected, expected), msg);
|
|
43
43
|
}
|
|
44
|
-
exports.assertObjectMatch = assertObjectMatch;
|
|
45
44
|
function isObject(val) {
|
|
46
45
|
return typeof val === "object" && val !== null;
|
|
47
46
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertRejects =
|
|
3
|
+
exports.assertRejects = assertRejects;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
@@ -54,4 +54,3 @@ async function assertRejects(fn, errorClassOrMsg, msgIncludesOrMsg, msg) {
|
|
|
54
54
|
}
|
|
55
55
|
return err;
|
|
56
56
|
}
|
|
57
|
-
exports.assertRejects = assertRejects;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertStrictEquals =
|
|
3
|
+
exports.assertStrictEquals = assertStrictEquals;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const build_message_js_1 = require("../../internal/1.0.4/build_message.js");
|
|
@@ -58,4 +58,3 @@ function assertStrictEquals(actual, expected, msg) {
|
|
|
58
58
|
}
|
|
59
59
|
throw new assertion_error_js_1.AssertionError(message);
|
|
60
60
|
}
|
|
61
|
-
exports.assertStrictEquals = assertStrictEquals;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertStringIncludes =
|
|
3
|
+
exports.assertStringIncludes = assertStringIncludes;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
@@ -27,4 +27,3 @@ function assertStringIncludes(actual, expected, msg) {
|
|
|
27
27
|
msg = `Expected actual: "${actual}" to contain: "${expected}"${msgSuffix}`;
|
|
28
28
|
throw new assertion_error_js_1.AssertionError(msg);
|
|
29
29
|
}
|
|
30
|
-
exports.assertStringIncludes = assertStringIncludes;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertThrows =
|
|
3
|
+
exports.assertThrows = assertThrows;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const is_error_js_1 = require("./is_error.js");
|
|
@@ -45,4 +45,3 @@ function assertThrows(fn, errorClassOrMsg, msgIncludesOrMsg, msg) {
|
|
|
45
45
|
}
|
|
46
46
|
return err;
|
|
47
47
|
}
|
|
48
|
-
exports.assertThrows = assertThrows;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.unimplemented =
|
|
3
|
+
exports.unimplemented = unimplemented;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
@@ -21,4 +21,3 @@ function unimplemented(msg) {
|
|
|
21
21
|
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
22
22
|
throw new assertion_error_js_1.AssertionError(`Unimplemented${msgSuffix}`);
|
|
23
23
|
}
|
|
24
|
-
exports.unimplemented = unimplemented;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.unreachable =
|
|
3
|
+
exports.unreachable = unreachable;
|
|
4
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
const assertion_error_js_1 = require("./assertion_error.js");
|
|
@@ -21,4 +21,3 @@ function unreachable(msg) {
|
|
|
21
21
|
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
22
22
|
throw new assertion_error_js_1.AssertionError(`Unreachable${msgSuffix}`);
|
|
23
23
|
}
|
|
24
|
-
exports.unreachable = unreachable;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
3
|
// This module is browser compatible.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.concat =
|
|
5
|
+
exports.concat = concat;
|
|
6
6
|
/**
|
|
7
7
|
* Concatenate an array of byte slices into a single slice.
|
|
8
8
|
*
|
|
@@ -33,4 +33,3 @@ function concat(buffers) {
|
|
|
33
33
|
}
|
|
34
34
|
return output;
|
|
35
35
|
}
|
|
36
|
-
exports.concat = concat;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.validateBinaryLike =
|
|
4
|
+
exports.validateBinaryLike = validateBinaryLike;
|
|
5
5
|
const encoder = new TextEncoder();
|
|
6
6
|
function getTypeName(value) {
|
|
7
7
|
const type = typeof value;
|
|
@@ -27,4 +27,3 @@ function validateBinaryLike(source) {
|
|
|
27
27
|
}
|
|
28
28
|
throw new TypeError(`Cannot validate the input as it must be a Uint8Array, a string, or an ArrayBuffer: received a value of the type ${getTypeName(source)}`);
|
|
29
29
|
}
|
|
30
|
-
exports.validateBinaryLike = validateBinaryLike;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
3
|
// This module is browser compatible.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
5
|
+
exports.encodeBase64 = encodeBase64;
|
|
6
|
+
exports.decodeBase64 = decodeBase64;
|
|
6
7
|
/**
|
|
7
8
|
* Utilities for
|
|
8
9
|
* {@link https://www.rfc-editor.org/rfc/rfc4648.html#section-4 | base64}
|
|
@@ -136,7 +137,6 @@ function encodeBase64(data) {
|
|
|
136
137
|
}
|
|
137
138
|
return result;
|
|
138
139
|
}
|
|
139
|
-
exports.encodeBase64 = encodeBase64;
|
|
140
140
|
/**
|
|
141
141
|
* Decodes a base64-encoded string.
|
|
142
142
|
*
|
|
@@ -165,4 +165,3 @@ function decodeBase64(b64) {
|
|
|
165
165
|
}
|
|
166
166
|
return bytes;
|
|
167
167
|
}
|
|
168
|
-
exports.decodeBase64 = decodeBase64;
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
3
|
// This module is browser compatible.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
5
|
+
exports.createColor = createColor;
|
|
6
|
+
exports.createSign = createSign;
|
|
7
|
+
exports.buildMessage = buildMessage;
|
|
6
8
|
const styles_js_1 = require("./styles.js");
|
|
7
9
|
/**
|
|
8
10
|
* Colors the output of assertion diffs.
|
|
@@ -38,7 +40,6 @@ background = false) {
|
|
|
38
40
|
return styles_js_1.white;
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
|
-
exports.createColor = createColor;
|
|
42
43
|
/**
|
|
43
44
|
* Prefixes `+` or `-` in diff output.
|
|
44
45
|
*
|
|
@@ -66,7 +67,6 @@ function createSign(diffType) {
|
|
|
66
67
|
return " ";
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
|
-
exports.createSign = createSign;
|
|
70
70
|
/**
|
|
71
71
|
* Builds a message based on the provided diff result.
|
|
72
72
|
*
|
|
@@ -113,4 +113,3 @@ function buildMessage(diffResult, options = {}) {
|
|
|
113
113
|
messages.push(...(stringDiff ? [diffMessages.join("")] : diffMessages), "");
|
|
114
114
|
return messages;
|
|
115
115
|
}
|
|
116
|
-
exports.buildMessage = buildMessage;
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
3
|
// This module is browser compatible.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
5
|
+
exports.createCommon = createCommon;
|
|
6
|
+
exports.assertFp = assertFp;
|
|
7
|
+
exports.backTrace = backTrace;
|
|
8
|
+
exports.createFp = createFp;
|
|
9
|
+
exports.diff = diff;
|
|
6
10
|
const REMOVED = 1;
|
|
7
11
|
const COMMON = 2;
|
|
8
12
|
const ADDED = 3;
|
|
@@ -43,7 +47,6 @@ function createCommon(A, B) {
|
|
|
43
47
|
}
|
|
44
48
|
return common;
|
|
45
49
|
}
|
|
46
|
-
exports.createCommon = createCommon;
|
|
47
50
|
/**
|
|
48
51
|
* Asserts that the value is a {@linkcode FarthestPoint}.
|
|
49
52
|
* If not, an error is thrown.
|
|
@@ -71,7 +74,6 @@ function assertFp(value) {
|
|
|
71
74
|
throw new Error(`Unexpected value, expected 'FarthestPoint': received ${typeof value}`);
|
|
72
75
|
}
|
|
73
76
|
}
|
|
74
|
-
exports.assertFp = assertFp;
|
|
75
77
|
/**
|
|
76
78
|
* Creates an array of backtraced differences.
|
|
77
79
|
*
|
|
@@ -133,7 +135,6 @@ function backTrace(A, B, current, swapped, routes, diffTypesPtrOffset) {
|
|
|
133
135
|
}
|
|
134
136
|
return result;
|
|
135
137
|
}
|
|
136
|
-
exports.backTrace = backTrace;
|
|
137
138
|
/**
|
|
138
139
|
* Creates a {@linkcode FarthestPoint}.
|
|
139
140
|
*
|
|
@@ -189,7 +190,6 @@ function createFp(k, M, routes, diffTypesPtrOffset, ptr, slide, down) {
|
|
|
189
190
|
}
|
|
190
191
|
throw new Error("Unexpected missing FarthestPoint");
|
|
191
192
|
}
|
|
192
|
-
exports.createFp = createFp;
|
|
193
193
|
/**
|
|
194
194
|
* Renders the differences between the actual and expected values.
|
|
195
195
|
*
|
|
@@ -281,4 +281,3 @@ function diff(A, B) {
|
|
|
281
281
|
...backTrace(A, B, currentFp, swapped, routes, diffTypesPtrOffset),
|
|
282
282
|
];
|
|
283
283
|
}
|
|
284
|
-
exports.diff = diff;
|