@mtkruto/node 0.3.0 → 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/0_utilities.js +2 -2
- 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 +18 -18
- 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,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.unescape = unescape;
|
|
4
|
+
exports.tokenize = tokenize;
|
|
5
|
+
exports.createDetails = createDetails;
|
|
6
|
+
exports.diffStr = diffStr;
|
|
4
7
|
const diff_js_1 = require("./diff.js");
|
|
5
8
|
/**
|
|
6
9
|
* Unescape invisible characters.
|
|
@@ -28,7 +31,6 @@ function unescape(string) {
|
|
|
28
31
|
// This does not remove line breaks
|
|
29
32
|
.replaceAll(/\r\n|\r|\n/g, (str) => str === "\r" ? "\\r" : str === "\n" ? "\\n\n" : "\\r\\n\r\n");
|
|
30
33
|
}
|
|
31
|
-
exports.unescape = unescape;
|
|
32
34
|
const WHITESPACE_SYMBOLS = /([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/;
|
|
33
35
|
/**
|
|
34
36
|
* Tokenizes a string into an array of tokens.
|
|
@@ -64,7 +66,6 @@ function tokenize(string, wordDiff = false) {
|
|
|
64
66
|
}
|
|
65
67
|
return tokens;
|
|
66
68
|
}
|
|
67
|
-
exports.tokenize = tokenize;
|
|
68
69
|
/**
|
|
69
70
|
* Create details by filtering relevant word-diff for current line and merge
|
|
70
71
|
* "space-diff" if surrounded by word-diff for cleaner displays.
|
|
@@ -104,7 +105,6 @@ function createDetails(line, tokens) {
|
|
|
104
105
|
return result;
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
|
-
exports.createDetails = createDetails;
|
|
108
108
|
const NON_WHITESPACE_REGEXP = /\S/;
|
|
109
109
|
/**
|
|
110
110
|
* Renders the differences between the actual and expected strings. Partially
|
|
@@ -183,4 +183,3 @@ function diffStr(A, B) {
|
|
|
183
183
|
}
|
|
184
184
|
return diffResult;
|
|
185
185
|
}
|
|
186
|
-
exports.diffStr = diffStr;
|
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
return result;
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.format =
|
|
28
|
+
exports.format = format;
|
|
29
29
|
/**
|
|
30
30
|
* Converts the input into a string. Objects, Sets and Maps are sorted so as to
|
|
31
31
|
* make tests less flaky.
|
|
@@ -61,4 +61,3 @@ function format(v) {
|
|
|
61
61
|
})
|
|
62
62
|
: `"${String(v).replace(/(?=["\\])/g, "\\")}"`;
|
|
63
63
|
}
|
|
64
|
-
exports.format = format;
|
|
@@ -27,7 +27,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.
|
|
30
|
+
exports.bold = bold;
|
|
31
|
+
exports.red = red;
|
|
32
|
+
exports.green = green;
|
|
33
|
+
exports.yellow = yellow;
|
|
34
|
+
exports.white = white;
|
|
35
|
+
exports.gray = gray;
|
|
36
|
+
exports.brightBlack = brightBlack;
|
|
37
|
+
exports.bgRed = bgRed;
|
|
38
|
+
exports.bgGreen = bgGreen;
|
|
39
|
+
exports.stripAnsiCode = stripAnsiCode;
|
|
31
40
|
// This code is vendored from `fmt/colors.ts`.
|
|
32
41
|
// deno-lint-ignore no-explicit-any
|
|
33
42
|
const dntShim = __importStar(require("../../../../../_dnt.shims.js"));
|
|
@@ -67,7 +76,6 @@ function run(str, code) {
|
|
|
67
76
|
function bold(str) {
|
|
68
77
|
return run(str, code([1], 22));
|
|
69
78
|
}
|
|
70
|
-
exports.bold = bold;
|
|
71
79
|
/**
|
|
72
80
|
* Sets the color of text to be printed to red.
|
|
73
81
|
*
|
|
@@ -87,7 +95,6 @@ exports.bold = bold;
|
|
|
87
95
|
function red(str) {
|
|
88
96
|
return run(str, code([31], 39));
|
|
89
97
|
}
|
|
90
|
-
exports.red = red;
|
|
91
98
|
/**
|
|
92
99
|
* Sets the color of text to be printed to green.
|
|
93
100
|
*
|
|
@@ -107,7 +114,6 @@ exports.red = red;
|
|
|
107
114
|
function green(str) {
|
|
108
115
|
return run(str, code([32], 39));
|
|
109
116
|
}
|
|
110
|
-
exports.green = green;
|
|
111
117
|
/**
|
|
112
118
|
* Sets the color of text to be printed to yellow.
|
|
113
119
|
*
|
|
@@ -127,7 +133,6 @@ exports.green = green;
|
|
|
127
133
|
function yellow(str) {
|
|
128
134
|
return run(str, code([33], 39));
|
|
129
135
|
}
|
|
130
|
-
exports.yellow = yellow;
|
|
131
136
|
/**
|
|
132
137
|
* Sets the color of text to be printed to white.
|
|
133
138
|
*
|
|
@@ -145,7 +150,6 @@ exports.yellow = yellow;
|
|
|
145
150
|
function white(str) {
|
|
146
151
|
return run(str, code([37], 39));
|
|
147
152
|
}
|
|
148
|
-
exports.white = white;
|
|
149
153
|
/**
|
|
150
154
|
* Sets the color of text to be printed to gray.
|
|
151
155
|
*
|
|
@@ -163,7 +167,6 @@ exports.white = white;
|
|
|
163
167
|
function gray(str) {
|
|
164
168
|
return brightBlack(str);
|
|
165
169
|
}
|
|
166
|
-
exports.gray = gray;
|
|
167
170
|
/**
|
|
168
171
|
* Sets the color of text to be printed to bright-black.
|
|
169
172
|
*
|
|
@@ -181,7 +184,6 @@ exports.gray = gray;
|
|
|
181
184
|
function brightBlack(str) {
|
|
182
185
|
return run(str, code([90], 39));
|
|
183
186
|
}
|
|
184
|
-
exports.brightBlack = brightBlack;
|
|
185
187
|
/**
|
|
186
188
|
* Sets the background color of text to be printed to red.
|
|
187
189
|
*
|
|
@@ -199,7 +201,6 @@ exports.brightBlack = brightBlack;
|
|
|
199
201
|
function bgRed(str) {
|
|
200
202
|
return run(str, code([41], 49));
|
|
201
203
|
}
|
|
202
|
-
exports.bgRed = bgRed;
|
|
203
204
|
/**
|
|
204
205
|
* Sets the background color of text to be printed to green.
|
|
205
206
|
*
|
|
@@ -217,7 +218,6 @@ exports.bgRed = bgRed;
|
|
|
217
218
|
function bgGreen(str) {
|
|
218
219
|
return run(str, code([42], 49));
|
|
219
220
|
}
|
|
220
|
-
exports.bgGreen = bgGreen;
|
|
221
221
|
// https://github.com/chalk/ansi-regex/blob/02fa893d619d3da85411acc8fd4e2eea0e95a9d9/index.js
|
|
222
222
|
const ANSI_PATTERN = new RegExp([
|
|
223
223
|
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
@@ -240,4 +240,3 @@ const ANSI_PATTERN = new RegExp([
|
|
|
240
240
|
function stripAnsiCode(string) {
|
|
241
241
|
return string.replace(ANSI_PATTERN, "");
|
|
242
242
|
}
|
|
243
|
-
exports.stripAnsiCode = stripAnsiCode;
|
package/{esm/deps/jsr.io/@std/io/0.224.9 → script/deps/jsr.io/@std/io/0.225.0}/_constants.d.ts.map
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_constants.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/io/0.
|
|
1
|
+
{"version":3,"file":"_constants.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/io/0.225.0/_constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,QAAS,CAAC;AACzC,eAAO,MAAM,mBAAmB,QAAY,CAAC"}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
// This module is browser compatible.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.DEFAULT_BUFFER_SIZE = exports.DEFAULT_CHUNK_SIZE = void 0;
|
|
6
|
-
exports.DEFAULT_CHUNK_SIZE =
|
|
6
|
+
exports.DEFAULT_CHUNK_SIZE = 16_640;
|
|
7
7
|
exports.DEFAULT_BUFFER_SIZE = 32 * 1024;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iterate_reader.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/io/0.
|
|
1
|
+
{"version":3,"file":"iterate_reader.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/io/0.225.0/iterate_reader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAErD,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAuB,aAAa,CAClC,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;IACR,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GACA,qBAAqB,CAAC,UAAU,CAAC,CAWnC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAiB,iBAAiB,CAChC,MAAM,EAAE,UAAU,EAClB,OAAO,CAAC,EAAE;IACR,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GACA,gBAAgB,CAAC,UAAU,CAAC,CAW9B"}
|
|
@@ -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.iterateReader = iterateReader;
|
|
6
|
+
exports.iterateReaderSync = iterateReaderSync;
|
|
6
7
|
const _constants_js_1 = require("./_constants.js");
|
|
7
8
|
/**
|
|
8
9
|
* Turns a {@linkcode Reader} into an async iterator.
|
|
@@ -46,7 +47,6 @@ async function* iterateReader(reader, options) {
|
|
|
46
47
|
yield b.slice(0, result);
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
|
-
exports.iterateReader = iterateReader;
|
|
50
50
|
/**
|
|
51
51
|
* Turns a {@linkcode ReaderSync} into an iterator.
|
|
52
52
|
*
|
|
@@ -98,4 +98,3 @@ function* iterateReaderSync(reader, options) {
|
|
|
98
98
|
yield b.slice(0, result);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
exports.iterateReaderSync = iterateReaderSync;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/io/0.
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/io/0.225.0/types.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,IAAI,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAC7C;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,QAAQ,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB;;;;;;;;OAQG;IACH,KAAK,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACvC;AACD;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;OAQG;IACH,SAAS,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB,gEAAgE;IAChE,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;;GAGG;AACH,oBAAY,QAAQ;IAElB,KAAK,IAAI;IAET,OAAO,IAAI;IAEX,GAAG,IAAI;CACR;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAClE;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC7D"}
|
|
@@ -1,7 +1,14 @@
|
|
|
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.
|
|
4
|
+
exports.consumeToken = consumeToken;
|
|
5
|
+
exports.consumeValue = consumeValue;
|
|
6
|
+
exports.consumeMediaParam = consumeMediaParam;
|
|
7
|
+
exports.decode2331Encoding = decode2331Encoding;
|
|
8
|
+
exports.isIterator = isIterator;
|
|
9
|
+
exports.isToken = isToken;
|
|
10
|
+
exports.isTSpecial = isTSpecial;
|
|
11
|
+
exports.needsEncoding = needsEncoding;
|
|
5
12
|
function consumeToken(v) {
|
|
6
13
|
const notPos = indexOf(v, isNotTokenChar);
|
|
7
14
|
if (notPos === -1) {
|
|
@@ -12,7 +19,6 @@ function consumeToken(v) {
|
|
|
12
19
|
}
|
|
13
20
|
return [v.slice(0, notPos), v.slice(notPos)];
|
|
14
21
|
}
|
|
15
|
-
exports.consumeToken = consumeToken;
|
|
16
22
|
function consumeValue(v) {
|
|
17
23
|
if (!v) {
|
|
18
24
|
return ["", v];
|
|
@@ -39,7 +45,6 @@ function consumeValue(v) {
|
|
|
39
45
|
}
|
|
40
46
|
return ["", v];
|
|
41
47
|
}
|
|
42
|
-
exports.consumeValue = consumeValue;
|
|
43
48
|
function consumeMediaParam(v) {
|
|
44
49
|
let rest = v.trimStart();
|
|
45
50
|
if (!rest.startsWith(";")) {
|
|
@@ -62,7 +67,6 @@ function consumeMediaParam(v) {
|
|
|
62
67
|
rest = rest2;
|
|
63
68
|
return [param, value, rest];
|
|
64
69
|
}
|
|
65
|
-
exports.consumeMediaParam = consumeMediaParam;
|
|
66
70
|
function decode2331Encoding(v) {
|
|
67
71
|
const sv = v.split(`'`, 3);
|
|
68
72
|
if (sv.length !== 3) {
|
|
@@ -82,7 +86,6 @@ function decode2331Encoding(v) {
|
|
|
82
86
|
}
|
|
83
87
|
return encv;
|
|
84
88
|
}
|
|
85
|
-
exports.decode2331Encoding = decode2331Encoding;
|
|
86
89
|
function indexOf(s, fn) {
|
|
87
90
|
let i = -1;
|
|
88
91
|
for (const v of s) {
|
|
@@ -100,14 +103,12 @@ function isIterator(obj) {
|
|
|
100
103
|
// deno-lint-ignore no-explicit-any
|
|
101
104
|
return typeof obj[Symbol.iterator] === "function";
|
|
102
105
|
}
|
|
103
|
-
exports.isIterator = isIterator;
|
|
104
106
|
function isToken(s) {
|
|
105
107
|
if (!s) {
|
|
106
108
|
return false;
|
|
107
109
|
}
|
|
108
110
|
return indexOf(s, isNotTokenChar) < 0;
|
|
109
111
|
}
|
|
110
|
-
exports.isToken = isToken;
|
|
111
112
|
function isNotTokenChar(r) {
|
|
112
113
|
return !isTokenChar(r);
|
|
113
114
|
}
|
|
@@ -118,7 +119,6 @@ function isTokenChar(r) {
|
|
|
118
119
|
function isTSpecial(r) {
|
|
119
120
|
return r[0] ? `()<>@,;:\\"/[]?=`.includes(r[0]) : false;
|
|
120
121
|
}
|
|
121
|
-
exports.isTSpecial = isTSpecial;
|
|
122
122
|
const CHAR_CODE_SPACE = " ".charCodeAt(0);
|
|
123
123
|
const CHAR_CODE_TILDE = "~".charCodeAt(0);
|
|
124
124
|
function needsEncoding(s) {
|
|
@@ -130,4 +130,3 @@ function needsEncoding(s) {
|
|
|
130
130
|
}
|
|
131
131
|
return false;
|
|
132
132
|
}
|
|
133
|
-
exports.needsEncoding = needsEncoding;
|
|
@@ -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.allExtensions =
|
|
5
|
+
exports.allExtensions = allExtensions;
|
|
6
6
|
const parse_media_type_js_1 = require("./parse_media_type.js");
|
|
7
7
|
const _db_js_1 = require("./_db.js");
|
|
8
8
|
/**
|
|
@@ -35,4 +35,3 @@ function allExtensions(type) {
|
|
|
35
35
|
// just swallow errors, returning undefined
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
exports.allExtensions = allExtensions;
|
|
@@ -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.contentType =
|
|
5
|
+
exports.contentType = contentType;
|
|
6
6
|
const parse_media_type_js_1 = require("./parse_media_type.js");
|
|
7
7
|
const get_charset_js_1 = require("./get_charset.js");
|
|
8
8
|
const format_media_type_js_1 = require("./format_media_type.js");
|
|
@@ -58,4 +58,3 @@ function contentType(extensionOrType) {
|
|
|
58
58
|
}
|
|
59
59
|
return undefined;
|
|
60
60
|
}
|
|
61
|
-
exports.contentType = contentType;
|
|
@@ -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.extension =
|
|
5
|
+
exports.extension = extension;
|
|
6
6
|
const all_extensions_js_1 = require("./all_extensions.js");
|
|
7
7
|
/**
|
|
8
8
|
* Returns the most relevant extension for the given media type, or `undefined`
|
|
@@ -29,4 +29,3 @@ const all_extensions_js_1 = require("./all_extensions.js");
|
|
|
29
29
|
function extension(type) {
|
|
30
30
|
return (0, all_extensions_js_1.allExtensions)(type)?.[0];
|
|
31
31
|
}
|
|
32
|
-
exports.extension = extension;
|
|
@@ -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.formatMediaType =
|
|
5
|
+
exports.formatMediaType = formatMediaType;
|
|
6
6
|
const _util_js_1 = require("./_util.js");
|
|
7
7
|
/**
|
|
8
8
|
* Serializes the media type and the optional parameters as a media type
|
|
@@ -78,4 +78,3 @@ function formatMediaType(type, param) {
|
|
|
78
78
|
}
|
|
79
79
|
return serializedMediaType;
|
|
80
80
|
}
|
|
81
|
-
exports.formatMediaType = formatMediaType;
|
|
@@ -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.getCharset =
|
|
5
|
+
exports.getCharset = getCharset;
|
|
6
6
|
const parse_media_type_js_1 = require("./parse_media_type.js");
|
|
7
7
|
const _db_js_1 = require("./_db.js");
|
|
8
8
|
/**
|
|
@@ -44,4 +44,3 @@ function getCharset(type) {
|
|
|
44
44
|
}
|
|
45
45
|
return undefined;
|
|
46
46
|
}
|
|
47
|
-
exports.getCharset = getCharset;
|
|
@@ -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.parseMediaType =
|
|
5
|
+
exports.parseMediaType = parseMediaType;
|
|
6
6
|
const _util_js_1 = require("./_util.js");
|
|
7
7
|
const SEMICOLON_REGEXP = /^\s*;\s*$/;
|
|
8
8
|
/**
|
|
@@ -115,4 +115,3 @@ function parseMediaType(type) {
|
|
|
115
115
|
}
|
|
116
116
|
return [mediaType, Object.keys(params).length ? params : undefined];
|
|
117
117
|
}
|
|
118
|
-
exports.parseMediaType = parseMediaType;
|
|
@@ -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.typeByExtension =
|
|
5
|
+
exports.typeByExtension = typeByExtension;
|
|
6
6
|
const _db_js_1 = require("./_db.js");
|
|
7
7
|
/**
|
|
8
8
|
* Returns the media type associated with the file extension, or `undefined` if
|
|
@@ -32,4 +32,3 @@ function typeByExtension(extension) {
|
|
|
32
32
|
// @ts-ignore Work around https://github.com/denoland/dnt/issues/148
|
|
33
33
|
return _db_js_1.types.get(extension.toLowerCase());
|
|
34
34
|
}
|
|
35
|
-
exports.typeByExtension = typeByExtension;
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
3
|
// Copyright the Browserify authors. MIT License.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.assertPath =
|
|
5
|
+
exports.assertPath = assertPath;
|
|
6
6
|
function assertPath(path) {
|
|
7
7
|
if (typeof path !== "string") {
|
|
8
8
|
throw new TypeError(`Path must be a string, received "${JSON.stringify(path)}"`);
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
exports.assertPath = assertPath;
|
|
@@ -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.stripSuffix = stripSuffix;
|
|
6
|
+
exports.lastPathSegment = lastPathSegment;
|
|
7
|
+
exports.assertArgs = assertArgs;
|
|
6
8
|
const assert_path_js_1 = require("./assert_path.js");
|
|
7
9
|
function stripSuffix(name, suffix) {
|
|
8
10
|
if (suffix.length >= name.length) {
|
|
@@ -16,7 +18,6 @@ function stripSuffix(name, suffix) {
|
|
|
16
18
|
}
|
|
17
19
|
return name.slice(0, -suffix.length);
|
|
18
20
|
}
|
|
19
|
-
exports.stripSuffix = stripSuffix;
|
|
20
21
|
function lastPathSegment(path, isSep, start = 0) {
|
|
21
22
|
let matchedNonSeparator = false;
|
|
22
23
|
let end = path.length;
|
|
@@ -34,7 +35,6 @@ function lastPathSegment(path, isSep, start = 0) {
|
|
|
34
35
|
}
|
|
35
36
|
return path.slice(start, end);
|
|
36
37
|
}
|
|
37
|
-
exports.lastPathSegment = lastPathSegment;
|
|
38
38
|
function assertArgs(path, suffix) {
|
|
39
39
|
(0, assert_path_js_1.assertPath)(path);
|
|
40
40
|
if (path.length === 0)
|
|
@@ -43,4 +43,3 @@ function assertArgs(path, suffix) {
|
|
|
43
43
|
throw new TypeError(`Suffix must be a string, received "${JSON.stringify(suffix)}"`);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
exports.assertArgs = assertArgs;
|
|
@@ -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.common =
|
|
5
|
+
exports.common = common;
|
|
6
6
|
function common(paths, sep) {
|
|
7
7
|
const [first = "", ...remaining] = paths;
|
|
8
8
|
const parts = first.split(sep);
|
|
@@ -24,4 +24,3 @@ function common(paths, sep) {
|
|
|
24
24
|
}
|
|
25
25
|
return parts.slice(0, endOfPrefix).join(sep) + append;
|
|
26
26
|
}
|
|
27
|
-
exports.common = common;
|
|
@@ -2,11 +2,10 @@
|
|
|
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.assertArg =
|
|
5
|
+
exports.assertArg = assertArg;
|
|
6
6
|
const assert_path_js_1 = require("./assert_path.js");
|
|
7
7
|
function assertArg(path) {
|
|
8
8
|
(0, assert_path_js_1.assertPath)(path);
|
|
9
9
|
if (path.length === 0)
|
|
10
10
|
return ".";
|
|
11
11
|
}
|
|
12
|
-
exports.assertArg = assertArg;
|
|
@@ -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._format = _format;
|
|
6
|
+
exports.assertArg = assertArg;
|
|
6
7
|
function _format(sep, pathObject) {
|
|
7
8
|
const dir = pathObject.dir || pathObject.root;
|
|
8
9
|
const base = pathObject.base ||
|
|
@@ -15,10 +16,8 @@ function _format(sep, pathObject) {
|
|
|
15
16
|
return dir + base;
|
|
16
17
|
return dir + sep + base;
|
|
17
18
|
}
|
|
18
|
-
exports._format = _format;
|
|
19
19
|
function assertArg(pathObject) {
|
|
20
20
|
if (pathObject === null || typeof pathObject !== "object") {
|
|
21
21
|
throw new TypeError(`The "pathObject" argument must be of type Object, received type "${typeof pathObject}"`);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
exports.assertArg = assertArg;
|
|
@@ -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.assertArg =
|
|
5
|
+
exports.assertArg = assertArg;
|
|
6
6
|
function assertArg(url) {
|
|
7
7
|
url = url instanceof URL ? url : new URL(url);
|
|
8
8
|
if (url.protocol !== "file:") {
|
|
@@ -10,4 +10,3 @@ function assertArg(url) {
|
|
|
10
10
|
}
|
|
11
11
|
return url;
|
|
12
12
|
}
|
|
13
|
-
exports.assertArg = assertArg;
|
|
@@ -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._globToRegExp =
|
|
5
|
+
exports._globToRegExp = _globToRegExp;
|
|
6
6
|
const REG_EXP_ESCAPE_CHARS = [
|
|
7
7
|
"!",
|
|
8
8
|
"$",
|
|
@@ -235,4 +235,3 @@ caseInsensitive = false, } = {}) {
|
|
|
235
235
|
regExpString = `^${regExpString}$`;
|
|
236
236
|
return new RegExp(regExpString, caseInsensitive ? "i" : "");
|
|
237
237
|
}
|
|
238
|
-
exports._globToRegExp = _globToRegExp;
|
|
@@ -2,11 +2,10 @@
|
|
|
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.assertArg =
|
|
5
|
+
exports.assertArg = assertArg;
|
|
6
6
|
const assert_path_js_1 = require("./assert_path.js");
|
|
7
7
|
function assertArg(path) {
|
|
8
8
|
(0, assert_path_js_1.assertPath)(path);
|
|
9
9
|
if (path.length === 0)
|
|
10
10
|
return ".";
|
|
11
11
|
}
|
|
12
|
-
exports.assertArg = assertArg;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// Ported from https://github.com/browserify/path-browserify/
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.normalizeString =
|
|
7
|
+
exports.normalizeString = normalizeString;
|
|
8
8
|
const constants_js_1 = require("./constants.js");
|
|
9
9
|
// Resolves . and .. elements in a path with directory names
|
|
10
10
|
function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
|
|
@@ -78,4 +78,3 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
|
|
|
78
78
|
}
|
|
79
79
|
return res;
|
|
80
80
|
}
|
|
81
|
-
exports.normalizeString = normalizeString;
|
|
@@ -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.assertArgs =
|
|
5
|
+
exports.assertArgs = assertArgs;
|
|
6
6
|
const assert_path_js_1 = require("./assert_path.js");
|
|
7
7
|
function assertArgs(from, to) {
|
|
8
8
|
(0, assert_path_js_1.assertPath)(from);
|
|
@@ -10,4 +10,3 @@ function assertArgs(from, to) {
|
|
|
10
10
|
if (from === to)
|
|
11
11
|
return "";
|
|
12
12
|
}
|
|
13
|
-
exports.assertArgs = assertArgs;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// Ported from https://github.com/browserify/path-browserify/
|
|
5
5
|
// This module is browser compatible.
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.stripTrailingSeparators =
|
|
7
|
+
exports.stripTrailingSeparators = stripTrailingSeparators;
|
|
8
8
|
function stripTrailingSeparators(segment, isSep) {
|
|
9
9
|
if (segment.length <= 1) {
|
|
10
10
|
return segment;
|
|
@@ -20,4 +20,3 @@ function stripTrailingSeparators(segment, isSep) {
|
|
|
20
20
|
}
|
|
21
21
|
return segment.slice(0, end);
|
|
22
22
|
}
|
|
23
|
-
exports.stripTrailingSeparators = stripTrailingSeparators;
|
|
@@ -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.encodeWhitespace =
|
|
5
|
+
exports.encodeWhitespace = encodeWhitespace;
|
|
6
6
|
const WHITESPACE_ENCODINGS = {
|
|
7
7
|
"\u0009": "%09",
|
|
8
8
|
"\u000A": "%0A",
|
|
@@ -16,4 +16,3 @@ function encodeWhitespace(string) {
|
|
|
16
16
|
return WHITESPACE_ENCODINGS[c] ?? c;
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
exports.encodeWhitespace = encodeWhitespace;
|
|
@@ -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.basename =
|
|
5
|
+
exports.basename = basename;
|
|
6
6
|
const _os_js_1 = require("./_os.js");
|
|
7
7
|
const basename_js_1 = require("./posix/basename.js");
|
|
8
8
|
const basename_js_2 = require("./windows/basename.js");
|
|
@@ -37,4 +37,3 @@ function basename(path, suffix = "") {
|
|
|
37
37
|
? (0, basename_js_2.basename)(path, suffix)
|
|
38
38
|
: (0, basename_js_1.basename)(path, suffix);
|
|
39
39
|
}
|
|
40
|
-
exports.basename = basename;
|
|
@@ -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.common =
|
|
5
|
+
exports.common = common;
|
|
6
6
|
const common_js_1 = require("./_common/common.js");
|
|
7
7
|
const constants_js_1 = require("./constants.js");
|
|
8
8
|
/**
|
|
@@ -34,4 +34,3 @@ const constants_js_1 = require("./constants.js");
|
|
|
34
34
|
function common(paths) {
|
|
35
35
|
return (0, common_js_1.common)(paths, constants_js_1.SEPARATOR);
|
|
36
36
|
}
|
|
37
|
-
exports.common = common;
|
|
@@ -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.dirname =
|
|
5
|
+
exports.dirname = dirname;
|
|
6
6
|
const _os_js_1 = require("./_os.js");
|
|
7
7
|
const dirname_js_1 = require("./posix/dirname.js");
|
|
8
8
|
const dirname_js_2 = require("./windows/dirname.js");
|
|
@@ -30,4 +30,3 @@ const dirname_js_2 = require("./windows/dirname.js");
|
|
|
30
30
|
function dirname(path) {
|
|
31
31
|
return _os_js_1.isWindows ? (0, dirname_js_2.dirname)(path) : (0, dirname_js_1.dirname)(path);
|
|
32
32
|
}
|
|
33
|
-
exports.dirname = dirname;
|
|
@@ -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.extname =
|
|
5
|
+
exports.extname = extname;
|
|
6
6
|
const _os_js_1 = require("./_os.js");
|
|
7
7
|
const extname_js_1 = require("./posix/extname.js");
|
|
8
8
|
const extname_js_2 = require("./windows/extname.js");
|
|
@@ -30,4 +30,3 @@ const extname_js_2 = require("./windows/extname.js");
|
|
|
30
30
|
function extname(path) {
|
|
31
31
|
return _os_js_1.isWindows ? (0, extname_js_2.extname)(path) : (0, extname_js_1.extname)(path);
|
|
32
32
|
}
|
|
33
|
-
exports.extname = extname;
|
|
@@ -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.format =
|
|
5
|
+
exports.format = format;
|
|
6
6
|
const _os_js_1 = require("./_os.js");
|
|
7
7
|
const format_js_1 = require("./posix/format.js");
|
|
8
8
|
const format_js_2 = require("./windows/format.js");
|
|
@@ -28,4 +28,3 @@ const format_js_2 = require("./windows/format.js");
|
|
|
28
28
|
function format(pathObject) {
|
|
29
29
|
return _os_js_1.isWindows ? (0, format_js_2.format)(pathObject) : (0, format_js_1.format)(pathObject);
|
|
30
30
|
}
|
|
31
|
-
exports.format = format;
|