jr-common-micro 0.6.1-dev
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/README.md +33 -0
- package/dist/common/dto/by_id_request_dto.d.ts +11 -0
- package/dist/common/dto/by_id_request_dto.js +10 -0
- package/dist/common/dto/index.d.ts +3 -0
- package/dist/common/dto/index.js +7 -0
- package/dist/common/dto/paginate_from_request_dto.d.ts +58 -0
- package/dist/common/dto/paginate_from_request_dto.js +22 -0
- package/dist/common/dto/paginate_request_dto.d.ts +23 -0
- package/dist/common/dto/paginate_request_dto.js +14 -0
- package/dist/common/exception/base_exception.d.ts +4 -0
- package/dist/common/exception/base_exception.js +14 -0
- package/dist/common/exception/index.d.ts +1 -0
- package/dist/common/exception/index.js +5 -0
- package/dist/common/factory/grpc_options_factory.d.ts +15 -0
- package/dist/common/factory/grpc_options_factory.js +63 -0
- package/dist/common/factory/index.d.ts +5 -0
- package/dist/common/factory/index.js +9 -0
- package/dist/common/factory/logger/index.d.ts +2 -0
- package/dist/common/factory/logger/index.js +6 -0
- package/dist/common/factory/logger/kafka_transport.d.ts +16 -0
- package/dist/common/factory/logger/kafka_transport.js +54 -0
- package/dist/common/factory/logger/winston_config.d.ts +22 -0
- package/dist/common/factory/logger/winston_config.js +141 -0
- package/dist/common/factory/module_metadata_factory.d.ts +24 -0
- package/dist/common/factory/module_metadata_factory.js +186 -0
- package/dist/common/factory/redis_client_factory.d.ts +5 -0
- package/dist/common/factory/redis_client_factory.js +22 -0
- package/dist/common/factory/redis_cluster_factory.d.ts +5 -0
- package/dist/common/factory/redis_cluster_factory.js +25 -0
- package/dist/common/filters/grpc_exceptions_filter.d.ts +6 -0
- package/dist/common/filters/grpc_exceptions_filter.js +26 -0
- package/dist/common/filters/index.d.ts +1 -0
- package/dist/common/filters/index.js +5 -0
- package/dist/common/guards/app_auth_guard.d.ts +5 -0
- package/dist/common/guards/app_auth_guard.js +38 -0
- package/dist/common/guards/app_internal_guard.d.ts +5 -0
- package/dist/common/guards/app_internal_guard.js +38 -0
- package/dist/common/guards/app_role_guard.d.ts +5 -0
- package/dist/common/guards/app_role_guard.js +43 -0
- package/dist/common/guards/index.d.ts +4 -0
- package/dist/common/guards/index.js +8 -0
- package/dist/common/guards/jwt_auth_user_decorator.d.ts +1 -0
- package/dist/common/guards/jwt_auth_user_decorator.js +31 -0
- package/dist/common/index.d.ts +8 -0
- package/dist/common/index.js +12 -0
- package/dist/common/interceptors/grpc/grpc_error_interceptors.d.ts +7 -0
- package/dist/common/interceptors/grpc/grpc_error_interceptors.js +35 -0
- package/dist/common/interceptors/grpc/index.d.ts +1 -0
- package/dist/common/interceptors/grpc/index.js +5 -0
- package/dist/common/interceptors/http/http_error_interceptors.d.ts +7 -0
- package/dist/common/interceptors/http/http_error_interceptors.js +30 -0
- package/dist/common/interceptors/http/http_response_interceptors.d.ts +7 -0
- package/dist/common/interceptors/http/http_response_interceptors.js +20 -0
- package/dist/common/interceptors/http/index.d.ts +2 -0
- package/dist/common/interceptors/http/index.js +6 -0
- package/dist/common/interceptors/index.d.ts +2 -0
- package/dist/common/interceptors/index.js +6 -0
- package/dist/common/kafka/index.d.ts +3 -0
- package/dist/common/kafka/index.js +7 -0
- package/dist/common/kafka/kafka_admin_service.d.ts +13 -0
- package/dist/common/kafka/kafka_admin_service.js +64 -0
- package/dist/common/kafka/kafka_consumer_service.d.ts +19 -0
- package/dist/common/kafka/kafka_consumer_service.js +80 -0
- package/dist/common/kafka/kafka_producer_service.d.ts +14 -0
- package/dist/common/kafka/kafka_producer_service.js +49 -0
- package/dist/common/service/crud/crud_service_interface.d.ts +20 -0
- package/dist/common/service/crud/crud_service_interface.js +2 -0
- package/dist/common/service/crud/index.d.ts +1 -0
- package/dist/common/service/crud/index.js +5 -0
- package/dist/common/service/index.d.ts +1 -0
- package/dist/common/service/index.js +5 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -0
- package/dist/proto/index.d.ts +1 -0
- package/dist/proto/index.js +5 -0
- package/dist/proto/micro/index.d.ts +1 -0
- package/dist/proto/micro/index.js +5 -0
- package/dist/proto/micro/v1/coin/analytics_messages_nest.d.ts +335 -0
- package/dist/proto/micro/v1/coin/analytics_messages_nest.js +18 -0
- package/dist/proto/micro/v1/coin/analytics_messages_pb.d.ts +670 -0
- package/dist/proto/micro/v1/coin/analytics_messages_pb.js +1456 -0
- package/dist/proto/micro/v1/coin/coin_messages_nest.d.ts +110 -0
- package/dist/proto/micro/v1/coin/coin_messages_nest.js +5 -0
- package/dist/proto/micro/v1/coin/coin_messages_pb.d.ts +258 -0
- package/dist/proto/micro/v1/coin/coin_messages_pb.js +568 -0
- package/dist/proto/micro/v1/coin/coin_websocket_messages_nest.d.ts +72 -0
- package/dist/proto/micro/v1/coin/coin_websocket_messages_nest.js +5 -0
- package/dist/proto/micro/v1/coin/coin_websocket_messages_pb.d.ts +128 -0
- package/dist/proto/micro/v1/coin/coin_websocket_messages_pb.js +276 -0
- package/dist/proto/micro/v1/coin/data_general_messages_nest.d.ts +54 -0
- package/dist/proto/micro/v1/coin/data_general_messages_nest.js +5 -0
- package/dist/proto/micro/v1/coin/data_general_messages_pb.d.ts +118 -0
- package/dist/proto/micro/v1/coin/data_general_messages_pb.js +259 -0
- package/dist/proto/micro/v1/coin/data_microservice_messages_nest.d.ts +43 -0
- package/dist/proto/micro/v1/coin/data_microservice_messages_nest.js +5 -0
- package/dist/proto/micro/v1/coin/data_microservice_messages_pb.d.ts +91 -0
- package/dist/proto/micro/v1/coin/data_microservice_messages_pb.js +199 -0
- package/dist/proto/micro/v1/coin/etf_messages_nest.d.ts +98 -0
- package/dist/proto/micro/v1/coin/etf_messages_nest.js +5 -0
- package/dist/proto/micro/v1/coin/etf_messages_pb.d.ts +226 -0
- package/dist/proto/micro/v1/coin/etf_messages_pb.js +499 -0
- package/dist/proto/micro/v1/coin/index.d.ts +11 -0
- package/dist/proto/micro/v1/coin/index.js +15 -0
- package/dist/proto/micro/v1/coin/long_short_ratio_messages_nest.d.ts +55 -0
- package/dist/proto/micro/v1/coin/long_short_ratio_messages_nest.js +5 -0
- package/dist/proto/micro/v1/coin/long_short_ratio_messages_pb.d.ts +115 -0
- package/dist/proto/micro/v1/coin/long_short_ratio_messages_pb.js +249 -0
- package/dist/proto/micro/v1/coin/rsi_messages_nest.d.ts +42 -0
- package/dist/proto/micro/v1/coin/rsi_messages_nest.js +5 -0
- package/dist/proto/micro/v1/coin/rsi_messages_pb.d.ts +98 -0
- package/dist/proto/micro/v1/coin/rsi_messages_pb.js +216 -0
- package/dist/proto/micro/v1/coin/services_connect.d.ts +413 -0
- package/dist/proto/micro/v1/coin/services_connect.js +416 -0
- package/dist/proto/micro/v1/coin/services_nest.d.ts +200 -0
- package/dist/proto/micro/v1/coin/services_nest.js +244 -0
- package/dist/proto/micro/v1/coin/token_unlocks_messages_nest.d.ts +53 -0
- package/dist/proto/micro/v1/coin/token_unlocks_messages_nest.js +5 -0
- package/dist/proto/micro/v1/coin/token_unlocks_messages_pb.d.ts +101 -0
- package/dist/proto/micro/v1/coin/token_unlocks_messages_pb.js +214 -0
- package/dist/proto/micro/v1/data/daily_market_data_messages_nest.d.ts +18 -0
- package/dist/proto/micro/v1/data/daily_market_data_messages_nest.js +5 -0
- package/dist/proto/micro/v1/data/daily_market_data_messages_pb.d.ts +42 -0
- package/dist/proto/micro/v1/data/daily_market_data_messages_pb.js +92 -0
- package/dist/proto/micro/v1/data/dominance_messages_nest.d.ts +35 -0
- package/dist/proto/micro/v1/data/dominance_messages_nest.js +5 -0
- package/dist/proto/micro/v1/data/dominance_messages_pb.d.ts +75 -0
- package/dist/proto/micro/v1/data/dominance_messages_pb.js +164 -0
- package/dist/proto/micro/v1/data/exchanges_messages_nest.d.ts +153 -0
- package/dist/proto/micro/v1/data/exchanges_messages_nest.js +11 -0
- package/dist/proto/micro/v1/data/exchanges_messages_pb.d.ts +256 -0
- package/dist/proto/micro/v1/data/exchanges_messages_pb.js +546 -0
- package/dist/proto/micro/v1/data/funding_rate_messages_nest.d.ts +52 -0
- package/dist/proto/micro/v1/data/funding_rate_messages_nest.js +5 -0
- package/dist/proto/micro/v1/data/funding_rate_messages_pb.d.ts +68 -0
- package/dist/proto/micro/v1/data/funding_rate_messages_pb.js +131 -0
- package/dist/proto/micro/v1/data/global_stats_messages_nest.d.ts +17 -0
- package/dist/proto/micro/v1/data/global_stats_messages_nest.js +5 -0
- package/dist/proto/micro/v1/data/global_stats_messages_pb.d.ts +25 -0
- package/dist/proto/micro/v1/data/global_stats_messages_pb.js +53 -0
- package/dist/proto/micro/v1/data/homepage_messages_nest.d.ts +35 -0
- package/dist/proto/micro/v1/data/homepage_messages_nest.js +5 -0
- package/dist/proto/micro/v1/data/homepage_messages_pb.d.ts +83 -0
- package/dist/proto/micro/v1/data/homepage_messages_pb.js +183 -0
- package/dist/proto/micro/v1/data/index.d.ts +22 -0
- package/dist/proto/micro/v1/data/index.js +26 -0
- package/dist/proto/micro/v1/data/inflow_outflow_messages_nest.d.ts +72 -0
- package/dist/proto/micro/v1/data/inflow_outflow_messages_nest.js +5 -0
- package/dist/proto/micro/v1/data/inflow_outflow_messages_pb.d.ts +136 -0
- package/dist/proto/micro/v1/data/inflow_outflow_messages_pb.js +295 -0
- package/dist/proto/micro/v1/data/liquidation_heat_map_m2_messages_nest.d.ts +44 -0
- package/dist/proto/micro/v1/data/liquidation_heat_map_m2_messages_nest.js +5 -0
- package/dist/proto/micro/v1/data/liquidation_heat_map_m2_messages_pb.d.ts +100 -0
- package/dist/proto/micro/v1/data/liquidation_heat_map_m2_messages_pb.js +221 -0
- package/dist/proto/micro/v1/data/liquidation_v1_messages_nest.d.ts +34 -0
- package/dist/proto/micro/v1/data/liquidation_v1_messages_nest.js +5 -0
- package/dist/proto/micro/v1/data/liquidation_v1_messages_pb.d.ts +82 -0
- package/dist/proto/micro/v1/data/liquidation_v1_messages_pb.js +181 -0
- package/dist/proto/micro/v1/data/mvrvz_score_messages_nest.d.ts +10 -0
- package/dist/proto/micro/v1/data/mvrvz_score_messages_nest.js +5 -0
- package/dist/proto/micro/v1/data/mvrvz_score_messages_pb.d.ts +26 -0
- package/dist/proto/micro/v1/data/mvrvz_score_messages_pb.js +58 -0
- package/dist/proto/micro/v1/data/puell_multiple_messages_nest.d.ts +14 -0
- package/dist/proto/micro/v1/data/puell_multiple_messages_nest.js +5 -0
- package/dist/proto/micro/v1/data/puell_multiple_messages_pb.d.ts +30 -0
- package/dist/proto/micro/v1/data/puell_multiple_messages_pb.js +65 -0
- package/dist/proto/micro/v1/data/puppeteer_messages_nest.d.ts +24 -0
- package/dist/proto/micro/v1/data/puppeteer_messages_nest.js +5 -0
- package/dist/proto/micro/v1/data/puppeteer_messages_pb.d.ts +40 -0
- package/dist/proto/micro/v1/data/puppeteer_messages_pb.js +84 -0
- package/dist/proto/micro/v1/data/rainbow_messages_nest.d.ts +10 -0
- package/dist/proto/micro/v1/data/rainbow_messages_nest.js +5 -0
- package/dist/proto/micro/v1/data/rainbow_messages_pb.d.ts +26 -0
- package/dist/proto/micro/v1/data/rainbow_messages_pb.js +57 -0
- package/dist/proto/micro/v1/data/rsi_list_messages_nest.d.ts +23 -0
- package/dist/proto/micro/v1/data/rsi_list_messages_nest.js +5 -0
- package/dist/proto/micro/v1/data/rsi_list_messages_pb.d.ts +39 -0
- package/dist/proto/micro/v1/data/rsi_list_messages_pb.js +83 -0
- package/dist/proto/micro/v1/data/scrape_assets_messages_nest.d.ts +20 -0
- package/dist/proto/micro/v1/data/scrape_assets_messages_nest.js +5 -0
- package/dist/proto/micro/v1/data/scrape_assets_messages_pb.d.ts +36 -0
- package/dist/proto/micro/v1/data/scrape_assets_messages_pb.js +77 -0
- package/dist/proto/micro/v1/data/scrape_treasuries_messages_nest.d.ts +37 -0
- package/dist/proto/micro/v1/data/scrape_treasuries_messages_nest.js +5 -0
- package/dist/proto/micro/v1/data/scrape_treasuries_messages_pb.d.ts +69 -0
- package/dist/proto/micro/v1/data/scrape_treasuries_messages_pb.js +149 -0
- package/dist/proto/micro/v1/data/services_connect.d.ts +325 -0
- package/dist/proto/micro/v1/data/services_connect.js +328 -0
- package/dist/proto/micro/v1/data/services_nest.d.ts +207 -0
- package/dist/proto/micro/v1/data/services_nest.js +326 -0
- package/dist/proto/micro/v1/data/token_unlocks_connect.d.ts +19 -0
- package/dist/proto/micro/v1/data/token_unlocks_connect.js +22 -0
- package/dist/proto/micro/v1/data/token_unlocks_nest.d.ts +69 -0
- package/dist/proto/micro/v1/data/token_unlocks_nest.js +22 -0
- package/dist/proto/micro/v1/data/token_unlocks_pb.d.ts +109 -0
- package/dist/proto/micro/v1/data/token_unlocks_pb.js +234 -0
- package/dist/proto/micro/v1/data/two_hundred_week_moving_average_messages_nest.d.ts +15 -0
- package/dist/proto/micro/v1/data/two_hundred_week_moving_average_messages_nest.js +5 -0
- package/dist/proto/micro/v1/data/two_hundred_week_moving_average_messages_pb.d.ts +31 -0
- package/dist/proto/micro/v1/data/two_hundred_week_moving_average_messages_pb.js +68 -0
- package/dist/proto/micro/v1/data/two_year_ma_multipler_messages_nest.d.ts +15 -0
- package/dist/proto/micro/v1/data/two_year_ma_multipler_messages_nest.js +5 -0
- package/dist/proto/micro/v1/data/two_year_ma_multipler_messages_pb.d.ts +31 -0
- package/dist/proto/micro/v1/data/two_year_ma_multipler_messages_pb.js +67 -0
- package/dist/proto/micro/v1/education/education_messages_nest.d.ts +370 -0
- package/dist/proto/micro/v1/education/education_messages_nest.js +5 -0
- package/dist/proto/micro/v1/education/education_messages_pb.d.ts +610 -0
- package/dist/proto/micro/v1/education/education_messages_pb.js +1264 -0
- package/dist/proto/micro/v1/education/index.d.ts +3 -0
- package/dist/proto/micro/v1/education/index.js +7 -0
- package/dist/proto/micro/v1/education/services_connect.d.ts +375 -0
- package/dist/proto/micro/v1/education/services_connect.js +378 -0
- package/dist/proto/micro/v1/education/services_nest.d.ts +182 -0
- package/dist/proto/micro/v1/education/services_nest.js +198 -0
- package/dist/proto/micro/v1/general_nest.d.ts +115 -0
- package/dist/proto/micro/v1/general_nest.js +51 -0
- package/dist/proto/micro/v1/general_pb.d.ts +211 -0
- package/dist/proto/micro/v1/general_pb.js +460 -0
- package/dist/proto/micro/v1/index.d.ts +10 -0
- package/dist/proto/micro/v1/index.js +14 -0
- package/dist/proto/micro/v1/media/index.d.ts +3 -0
- package/dist/proto/micro/v1/media/index.js +7 -0
- package/dist/proto/micro/v1/media/media_messages_nest.d.ts +92 -0
- package/dist/proto/micro/v1/media/media_messages_nest.js +21 -0
- package/dist/proto/micro/v1/media/media_messages_pb.d.ts +202 -0
- package/dist/proto/micro/v1/media/media_messages_pb.js +447 -0
- package/dist/proto/micro/v1/media/services_connect.d.ts +55 -0
- package/dist/proto/micro/v1/media/services_connect.js +58 -0
- package/dist/proto/micro/v1/media/services_nest.d.ts +32 -0
- package/dist/proto/micro/v1/media/services_nest.js +45 -0
- package/dist/proto/micro/v1/news/app_version_message_nest.d.ts +40 -0
- package/dist/proto/micro/v1/news/app_version_message_nest.js +5 -0
- package/dist/proto/micro/v1/news/app_version_message_pb.d.ts +72 -0
- package/dist/proto/micro/v1/news/app_version_message_pb.js +150 -0
- package/dist/proto/micro/v1/news/blog_messages_nest.d.ts +162 -0
- package/dist/proto/micro/v1/news/blog_messages_nest.js +5 -0
- package/dist/proto/micro/v1/news/blog_messages_pb.d.ts +246 -0
- package/dist/proto/micro/v1/news/blog_messages_pb.js +495 -0
- package/dist/proto/micro/v1/news/calendar_messages_nest.d.ts +70 -0
- package/dist/proto/micro/v1/news/calendar_messages_nest.js +5 -0
- package/dist/proto/micro/v1/news/calendar_messages_pb.d.ts +98 -0
- package/dist/proto/micro/v1/news/calendar_messages_pb.js +193 -0
- package/dist/proto/micro/v1/news/economic_calendar_messages_nest.d.ts +28 -0
- package/dist/proto/micro/v1/news/economic_calendar_messages_nest.js +5 -0
- package/dist/proto/micro/v1/news/economic_calendar_messages_pb.d.ts +48 -0
- package/dist/proto/micro/v1/news/economic_calendar_messages_pb.js +100 -0
- package/dist/proto/micro/v1/news/index.d.ts +9 -0
- package/dist/proto/micro/v1/news/index.js +13 -0
- package/dist/proto/micro/v1/news/jr_blog_messages_nest.d.ts +321 -0
- package/dist/proto/micro/v1/news/jr_blog_messages_nest.js +5 -0
- package/dist/proto/micro/v1/news/jr_blog_messages_pb.d.ts +477 -0
- package/dist/proto/micro/v1/news/jr_blog_messages_pb.js +954 -0
- package/dist/proto/micro/v1/news/news_messages_nest.d.ts +270 -0
- package/dist/proto/micro/v1/news/news_messages_nest.js +5 -0
- package/dist/proto/micro/v1/news/news_messages_pb.d.ts +418 -0
- package/dist/proto/micro/v1/news/news_messages_pb.js +848 -0
- package/dist/proto/micro/v1/news/services_connect.d.ts +549 -0
- package/dist/proto/micro/v1/news/services_connect.js +552 -0
- package/dist/proto/micro/v1/news/services_nest.d.ts +244 -0
- package/dist/proto/micro/v1/news/services_nest.js +261 -0
- package/dist/proto/micro/v1/news/sundown_messages_nest.d.ts +99 -0
- package/dist/proto/micro/v1/news/sundown_messages_nest.js +5 -0
- package/dist/proto/micro/v1/news/sundown_messages_pb.d.ts +131 -0
- package/dist/proto/micro/v1/news/sundown_messages_pb.js +253 -0
- package/dist/proto/micro/v1/notification/index.d.ts +4 -0
- package/dist/proto/micro/v1/notification/index.js +8 -0
- package/dist/proto/micro/v1/notification/mail_messages_nest.d.ts +31 -0
- package/dist/proto/micro/v1/notification/mail_messages_nest.js +5 -0
- package/dist/proto/micro/v1/notification/mail_messages_pb.d.ts +63 -0
- package/dist/proto/micro/v1/notification/mail_messages_pb.js +138 -0
- package/dist/proto/micro/v1/notification/notification_messages_nest.d.ts +164 -0
- package/dist/proto/micro/v1/notification/notification_messages_nest.js +5 -0
- package/dist/proto/micro/v1/notification/notification_messages_pb.d.ts +356 -0
- package/dist/proto/micro/v1/notification/notification_messages_pb.js +783 -0
- package/dist/proto/micro/v1/notification/services_connect.d.ts +139 -0
- package/dist/proto/micro/v1/notification/services_connect.js +142 -0
- package/dist/proto/micro/v1/notification/services_nest.d.ts +65 -0
- package/dist/proto/micro/v1/notification/services_nest.js +70 -0
- package/dist/proto/micro/v1/portfolio/index.d.ts +5 -0
- package/dist/proto/micro/v1/portfolio/index.js +9 -0
- package/dist/proto/micro/v1/portfolio/portfolio_coin_messages_nest.d.ts +17 -0
- package/dist/proto/micro/v1/portfolio/portfolio_coin_messages_nest.js +5 -0
- package/dist/proto/micro/v1/portfolio/portfolio_coin_messages_pb.d.ts +41 -0
- package/dist/proto/micro/v1/portfolio/portfolio_coin_messages_pb.js +89 -0
- package/dist/proto/micro/v1/portfolio/portfolio_coin_trasaction_messages_nest.d.ts +34 -0
- package/dist/proto/micro/v1/portfolio/portfolio_coin_trasaction_messages_nest.js +5 -0
- package/dist/proto/micro/v1/portfolio/portfolio_coin_trasaction_messages_pb.d.ts +82 -0
- package/dist/proto/micro/v1/portfolio/portfolio_coin_trasaction_messages_pb.js +180 -0
- package/dist/proto/micro/v1/portfolio/portfolio_messages_nest.d.ts +154 -0
- package/dist/proto/micro/v1/portfolio/portfolio_messages_nest.js +5 -0
- package/dist/proto/micro/v1/portfolio/portfolio_messages_pb.d.ts +370 -0
- package/dist/proto/micro/v1/portfolio/portfolio_messages_pb.js +820 -0
- package/dist/proto/micro/v1/portfolio/services_connect.d.ts +140 -0
- package/dist/proto/micro/v1/portfolio/services_connect.js +143 -0
- package/dist/proto/micro/v1/portfolio/services_nest.d.ts +66 -0
- package/dist/proto/micro/v1/portfolio/services_nest.js +74 -0
- package/dist/proto/micro/v1/puppeteer/index.d.ts +3 -0
- package/dist/proto/micro/v1/puppeteer/index.js +7 -0
- package/dist/proto/micro/v1/puppeteer/puppeteer_messages_nest.d.ts +2 -0
- package/dist/proto/micro/v1/puppeteer/puppeteer_messages_nest.js +5 -0
- package/dist/proto/micro/v1/puppeteer/services_connect.d.ts +89 -0
- package/dist/proto/micro/v1/puppeteer/services_connect.js +92 -0
- package/dist/proto/micro/v1/puppeteer/services_nest.d.ts +47 -0
- package/dist/proto/micro/v1/puppeteer/services_nest.js +63 -0
- package/dist/proto/micro/v1/user/auth_messages_nest.d.ts +87 -0
- package/dist/proto/micro/v1/user/auth_messages_nest.js +5 -0
- package/dist/proto/micro/v1/user/auth_messages_pb.d.ts +263 -0
- package/dist/proto/micro/v1/user/auth_messages_pb.js +590 -0
- package/dist/proto/micro/v1/user/authorization_messages_nest.d.ts +47 -0
- package/dist/proto/micro/v1/user/authorization_messages_nest.js +5 -0
- package/dist/proto/micro/v1/user/authorization_messages_pb.d.ts +111 -0
- package/dist/proto/micro/v1/user/authorization_messages_pb.js +245 -0
- package/dist/proto/micro/v1/user/index.d.ts +6 -0
- package/dist/proto/micro/v1/user/index.js +10 -0
- package/dist/proto/micro/v1/user/services_connect.d.ts +315 -0
- package/dist/proto/micro/v1/user/services_connect.js +318 -0
- package/dist/proto/micro/v1/user/services_nest.d.ts +151 -0
- package/dist/proto/micro/v1/user/services_nest.js +172 -0
- package/dist/proto/micro/v1/user/site_settings_messages_nest.d.ts +19 -0
- package/dist/proto/micro/v1/user/site_settings_messages_nest.js +12 -0
- package/dist/proto/micro/v1/user/site_settings_messages_pb.d.ts +42 -0
- package/dist/proto/micro/v1/user/site_settings_messages_pb.js +93 -0
- package/dist/proto/micro/v1/user/user_messages_nest.d.ts +175 -0
- package/dist/proto/micro/v1/user/user_messages_nest.js +12 -0
- package/dist/proto/micro/v1/user/user_messages_pb.d.ts +358 -0
- package/dist/proto/micro/v1/user/user_messages_pb.js +784 -0
- package/dist/utils/constants.d.ts +45 -0
- package/dist/utils/constants.js +48 -0
- package/dist/utils/functions.d.ts +70 -0
- package/dist/utils/functions.js +425 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/logger_names.d.ts +8 -0
- package/dist/utils/logger_names.js +41 -0
- package/dist/utils/minimatch/assert_valid_pattern.d.ts +1 -0
- package/dist/utils/minimatch/assert_valid_pattern.js +13 -0
- package/dist/utils/minimatch/ast.d.ts +19 -0
- package/dist/utils/minimatch/ast.js +446 -0
- package/dist/utils/minimatch/balanced_match.d.ts +2 -0
- package/dist/utils/minimatch/balanced_match.js +57 -0
- package/dist/utils/minimatch/brace_expansion.d.ts +1 -0
- package/dist/utils/minimatch/brace_expansion.js +181 -0
- package/dist/utils/minimatch/brace_expressions.d.ts +7 -0
- package/dist/utils/minimatch/brace_expressions.js +119 -0
- package/dist/utils/minimatch/escape.d.ts +2 -0
- package/dist/utils/minimatch/escape.js +9 -0
- package/dist/utils/minimatch/index.d.ts +93 -0
- package/dist/utils/minimatch/index.js +788 -0
- package/dist/utils/minimatch/matcher_collection.d.ts +9 -0
- package/dist/utils/minimatch/matcher_collection.js +30 -0
- package/dist/utils/minimatch/unescape.d.ts +2 -0
- package/dist/utils/minimatch/unescape.js +11 -0
- package/dist/utils/types.d.ts +70 -0
- package/dist/utils/types.js +22 -0
- package/dist/utils/walk_sync.d.ts +25 -0
- package/dist/utils/walk_sync.js +184 -0
- package/package.json +87 -0
|
@@ -0,0 +1,788 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const assert_valid_pattern_1 = require("./assert_valid_pattern");
|
|
6
|
+
const ast_1 = require("./ast");
|
|
7
|
+
const brace_expansion_1 = tslib_1.__importDefault(require("./brace_expansion"));
|
|
8
|
+
const escape_1 = require("./escape");
|
|
9
|
+
const unescape_1 = require("./unescape");
|
|
10
|
+
const minimatch = (p, pattern, options = {}) => {
|
|
11
|
+
(0, assert_valid_pattern_1.assertValidPattern)(pattern);
|
|
12
|
+
if (!options.nocomment && pattern.charAt(0) === '#') {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
return new Minimatch(pattern, options).match(p);
|
|
16
|
+
};
|
|
17
|
+
exports.minimatch = minimatch;
|
|
18
|
+
const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
|
|
19
|
+
const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext);
|
|
20
|
+
const starDotExtTestDot = (ext) => (f) => f.endsWith(ext);
|
|
21
|
+
const starDotExtTestNocase = (ext) => {
|
|
22
|
+
ext = ext.toLowerCase();
|
|
23
|
+
return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext);
|
|
24
|
+
};
|
|
25
|
+
const starDotExtTestNocaseDot = (ext) => {
|
|
26
|
+
ext = ext.toLowerCase();
|
|
27
|
+
return (f) => f.toLowerCase().endsWith(ext);
|
|
28
|
+
};
|
|
29
|
+
const starDotStarRE = /^\*+\.\*+$/;
|
|
30
|
+
const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.');
|
|
31
|
+
const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.');
|
|
32
|
+
const dotStarRE = /^\.\*+$/;
|
|
33
|
+
const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.');
|
|
34
|
+
const starRE = /^\*+$/;
|
|
35
|
+
const starTest = (f) => f.length !== 0 && !f.startsWith('.');
|
|
36
|
+
const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..';
|
|
37
|
+
const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
|
|
38
|
+
const qmarksTestNocase = ([$0, ext = '']) => {
|
|
39
|
+
const noext = qmarksTestNoExt([$0]);
|
|
40
|
+
if (!ext)
|
|
41
|
+
return noext;
|
|
42
|
+
ext = ext.toLowerCase();
|
|
43
|
+
return (f) => noext(f) && f.toLowerCase().endsWith(ext);
|
|
44
|
+
};
|
|
45
|
+
const qmarksTestNocaseDot = ([$0, ext = '']) => {
|
|
46
|
+
const noext = qmarksTestNoExtDot([$0]);
|
|
47
|
+
if (!ext)
|
|
48
|
+
return noext;
|
|
49
|
+
ext = ext.toLowerCase();
|
|
50
|
+
return (f) => noext(f) && f.toLowerCase().endsWith(ext);
|
|
51
|
+
};
|
|
52
|
+
const qmarksTestDot = ([$0, ext = '']) => {
|
|
53
|
+
const noext = qmarksTestNoExtDot([$0]);
|
|
54
|
+
return !ext ? noext : (f) => noext(f) && f.endsWith(ext);
|
|
55
|
+
};
|
|
56
|
+
const qmarksTest = ([$0, ext = '']) => {
|
|
57
|
+
const noext = qmarksTestNoExt([$0]);
|
|
58
|
+
return !ext ? noext : (f) => noext(f) && f.endsWith(ext);
|
|
59
|
+
};
|
|
60
|
+
const qmarksTestNoExt = ([$0]) => {
|
|
61
|
+
const len = $0.length;
|
|
62
|
+
return (f) => f.length === len && !f.startsWith('.');
|
|
63
|
+
};
|
|
64
|
+
const qmarksTestNoExtDot = ([$0]) => {
|
|
65
|
+
const len = $0.length;
|
|
66
|
+
return (f) => f.length === len && f !== '.' && f !== '..';
|
|
67
|
+
};
|
|
68
|
+
const defaultPlatform = (typeof process === 'object' && process
|
|
69
|
+
? (typeof process.env === 'object' &&
|
|
70
|
+
process.env &&
|
|
71
|
+
process.env.__MINIMATCH_TESTING_PLATFORM__) ||
|
|
72
|
+
process.platform
|
|
73
|
+
: 'posix');
|
|
74
|
+
const path = {
|
|
75
|
+
win32: { sep: '\\' },
|
|
76
|
+
posix: { sep: '/' },
|
|
77
|
+
};
|
|
78
|
+
exports.sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep;
|
|
79
|
+
exports.minimatch.sep = exports.sep;
|
|
80
|
+
exports.GLOBSTAR = Symbol('globstar **');
|
|
81
|
+
exports.minimatch.GLOBSTAR = exports.GLOBSTAR;
|
|
82
|
+
const qmark = '[^/]';
|
|
83
|
+
const star = qmark + '*?';
|
|
84
|
+
const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?';
|
|
85
|
+
const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?';
|
|
86
|
+
const filter = (pattern, options = {}) => (p) => (0, exports.minimatch)(p, pattern, options);
|
|
87
|
+
exports.filter = filter;
|
|
88
|
+
exports.minimatch.filter = exports.filter;
|
|
89
|
+
const ext = (a, b = {}) => Object.assign({}, a, b);
|
|
90
|
+
const defaults = (def) => {
|
|
91
|
+
if (!def || typeof def !== 'object' || !Object.keys(def).length) {
|
|
92
|
+
return exports.minimatch;
|
|
93
|
+
}
|
|
94
|
+
const orig = exports.minimatch;
|
|
95
|
+
const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
|
|
96
|
+
return Object.assign(m, {
|
|
97
|
+
Minimatch: class Minimatch extends orig.Minimatch {
|
|
98
|
+
constructor(pattern, options = {}) {
|
|
99
|
+
super(pattern, ext(def, options));
|
|
100
|
+
}
|
|
101
|
+
static defaults(options) {
|
|
102
|
+
return orig.defaults(ext(def, options)).Minimatch;
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
AST: class AST extends orig.AST {
|
|
106
|
+
constructor(type, parent, options = {}) {
|
|
107
|
+
super(type, parent, ext(def, options));
|
|
108
|
+
}
|
|
109
|
+
static fromGlob(pattern, options = {}) {
|
|
110
|
+
return orig.AST.fromGlob(pattern, ext(def, options));
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
|
|
114
|
+
escape: (s, options = {}) => orig.escape(s, ext(def, options)),
|
|
115
|
+
filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
|
|
116
|
+
defaults: (options) => orig.defaults(ext(def, options)),
|
|
117
|
+
makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
|
|
118
|
+
braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
|
|
119
|
+
match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
|
|
120
|
+
sep: orig.sep,
|
|
121
|
+
GLOBSTAR: exports.GLOBSTAR,
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
exports.defaults = defaults;
|
|
125
|
+
exports.minimatch.defaults = exports.defaults;
|
|
126
|
+
const braceExpand = (pattern, options = {}) => {
|
|
127
|
+
(0, assert_valid_pattern_1.assertValidPattern)(pattern);
|
|
128
|
+
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
129
|
+
return [pattern];
|
|
130
|
+
}
|
|
131
|
+
return (0, brace_expansion_1.default)(pattern);
|
|
132
|
+
};
|
|
133
|
+
exports.braceExpand = braceExpand;
|
|
134
|
+
exports.minimatch.braceExpand = exports.braceExpand;
|
|
135
|
+
const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
|
|
136
|
+
exports.makeRe = makeRe;
|
|
137
|
+
exports.minimatch.makeRe = exports.makeRe;
|
|
138
|
+
const match = (list, pattern, options = {}) => {
|
|
139
|
+
const mm = new Minimatch(pattern, options);
|
|
140
|
+
list = list.filter((f) => mm.match(f));
|
|
141
|
+
if (mm.options.nonull && !list.length) {
|
|
142
|
+
list.push(pattern);
|
|
143
|
+
}
|
|
144
|
+
return list;
|
|
145
|
+
};
|
|
146
|
+
exports.match = match;
|
|
147
|
+
exports.minimatch.match = exports.match;
|
|
148
|
+
const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
149
|
+
const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
|
|
150
|
+
class Minimatch {
|
|
151
|
+
options;
|
|
152
|
+
set;
|
|
153
|
+
pattern;
|
|
154
|
+
windowsPathsNoEscape;
|
|
155
|
+
nonegate;
|
|
156
|
+
negate;
|
|
157
|
+
comment;
|
|
158
|
+
empty;
|
|
159
|
+
preserveMultipleSlashes;
|
|
160
|
+
partial;
|
|
161
|
+
globSet;
|
|
162
|
+
globParts;
|
|
163
|
+
nocase;
|
|
164
|
+
isWindows;
|
|
165
|
+
platform;
|
|
166
|
+
windowsNoMagicRoot;
|
|
167
|
+
regexp;
|
|
168
|
+
constructor(pattern, options = {}) {
|
|
169
|
+
(0, assert_valid_pattern_1.assertValidPattern)(pattern);
|
|
170
|
+
options = options || {};
|
|
171
|
+
this.options = options;
|
|
172
|
+
this.pattern = pattern;
|
|
173
|
+
this.platform = options.platform || defaultPlatform;
|
|
174
|
+
this.isWindows = this.platform === 'win32';
|
|
175
|
+
this.windowsPathsNoEscape =
|
|
176
|
+
!!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
|
|
177
|
+
if (this.windowsPathsNoEscape) {
|
|
178
|
+
this.pattern = this.pattern.replace(/\\/g, '/');
|
|
179
|
+
}
|
|
180
|
+
this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
|
|
181
|
+
this.regexp = null;
|
|
182
|
+
this.negate = false;
|
|
183
|
+
this.nonegate = !!options.nonegate;
|
|
184
|
+
this.comment = false;
|
|
185
|
+
this.empty = false;
|
|
186
|
+
this.partial = !!options.partial;
|
|
187
|
+
this.nocase = !!this.options.nocase;
|
|
188
|
+
this.windowsNoMagicRoot =
|
|
189
|
+
options.windowsNoMagicRoot !== undefined
|
|
190
|
+
? options.windowsNoMagicRoot
|
|
191
|
+
: !!(this.isWindows && this.nocase);
|
|
192
|
+
this.globSet = [];
|
|
193
|
+
this.globParts = [];
|
|
194
|
+
this.set = [];
|
|
195
|
+
this.make();
|
|
196
|
+
}
|
|
197
|
+
hasMagic() {
|
|
198
|
+
if (this.options.magicalBraces && this.set.length > 1) {
|
|
199
|
+
return true;
|
|
200
|
+
}
|
|
201
|
+
for (const pattern of this.set) {
|
|
202
|
+
for (const part of pattern) {
|
|
203
|
+
if (typeof part !== 'string')
|
|
204
|
+
return true;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return false;
|
|
208
|
+
}
|
|
209
|
+
debug(..._) { }
|
|
210
|
+
make() {
|
|
211
|
+
const pattern = this.pattern;
|
|
212
|
+
const options = this.options;
|
|
213
|
+
if (!options.nocomment && pattern.charAt(0) === '#') {
|
|
214
|
+
this.comment = true;
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
if (!pattern) {
|
|
218
|
+
this.empty = true;
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
this.parseNegate();
|
|
222
|
+
this.globSet = [...new Set(this.braceExpand())];
|
|
223
|
+
if (options.debug) {
|
|
224
|
+
this.debug = (...args) => console.error(...args);
|
|
225
|
+
}
|
|
226
|
+
this.debug(this.pattern, this.globSet);
|
|
227
|
+
const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
|
|
228
|
+
this.globParts = this.preprocess(rawGlobParts);
|
|
229
|
+
this.debug(this.pattern, this.globParts);
|
|
230
|
+
let set = this.globParts.map((s, _, __) => {
|
|
231
|
+
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
232
|
+
const isUNC = s[0] === '' &&
|
|
233
|
+
s[1] === '' &&
|
|
234
|
+
(s[2] === '?' || !globMagic.test(s[2])) &&
|
|
235
|
+
!globMagic.test(s[3]);
|
|
236
|
+
const isDrive = /^[a-z]:/i.test(s[0]);
|
|
237
|
+
if (isUNC) {
|
|
238
|
+
return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
|
|
239
|
+
}
|
|
240
|
+
else if (isDrive) {
|
|
241
|
+
return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return s.map((ss) => this.parse(ss));
|
|
245
|
+
});
|
|
246
|
+
this.debug(this.pattern, set);
|
|
247
|
+
this.set = set.filter((s) => s.indexOf(false) === -1);
|
|
248
|
+
if (this.isWindows) {
|
|
249
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
250
|
+
const p = this.set[i];
|
|
251
|
+
if (p[0] === '' &&
|
|
252
|
+
p[1] === '' &&
|
|
253
|
+
this.globParts[i][2] === '?' &&
|
|
254
|
+
typeof p[3] === 'string' &&
|
|
255
|
+
/^[a-z]:$/i.test(p[3])) {
|
|
256
|
+
p[2] = '?';
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
this.debug(this.pattern, this.set);
|
|
261
|
+
}
|
|
262
|
+
preprocess(globParts) {
|
|
263
|
+
if (this.options.noglobstar) {
|
|
264
|
+
for (let i = 0; i < globParts.length; i++) {
|
|
265
|
+
for (let j = 0; j < globParts[i].length; j++) {
|
|
266
|
+
if (globParts[i][j] === '**') {
|
|
267
|
+
globParts[i][j] = '*';
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
const { optimizationLevel = 1 } = this.options;
|
|
273
|
+
if (optimizationLevel >= 2) {
|
|
274
|
+
globParts = this.firstPhasePreProcess(globParts);
|
|
275
|
+
globParts = this.secondPhasePreProcess(globParts);
|
|
276
|
+
}
|
|
277
|
+
else if (optimizationLevel >= 1) {
|
|
278
|
+
globParts = this.levelOneOptimize(globParts);
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
globParts = this.adjascentGlobstarOptimize(globParts);
|
|
282
|
+
}
|
|
283
|
+
return globParts;
|
|
284
|
+
}
|
|
285
|
+
adjascentGlobstarOptimize(globParts) {
|
|
286
|
+
return globParts.map((parts) => {
|
|
287
|
+
let gs = -1;
|
|
288
|
+
while (-1 !== (gs = parts.indexOf('**', gs + 1))) {
|
|
289
|
+
let i = gs;
|
|
290
|
+
while (parts[i + 1] === '**') {
|
|
291
|
+
i++;
|
|
292
|
+
}
|
|
293
|
+
if (i !== gs) {
|
|
294
|
+
parts.splice(gs, i - gs);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
return parts;
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
levelOneOptimize(globParts) {
|
|
301
|
+
return globParts.map((parts) => {
|
|
302
|
+
parts = parts.reduce((set, part) => {
|
|
303
|
+
const prev = set[set.length - 1];
|
|
304
|
+
if (part === '**' && prev === '**') {
|
|
305
|
+
return set;
|
|
306
|
+
}
|
|
307
|
+
if (part === '..') {
|
|
308
|
+
if (prev && prev !== '..' && prev !== '.' && prev !== '**') {
|
|
309
|
+
set.pop();
|
|
310
|
+
return set;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
set.push(part);
|
|
314
|
+
return set;
|
|
315
|
+
}, []);
|
|
316
|
+
return parts.length === 0 ? [''] : parts;
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
levelTwoFileOptimize(parts) {
|
|
320
|
+
if (!Array.isArray(parts)) {
|
|
321
|
+
parts = this.slashSplit(parts);
|
|
322
|
+
}
|
|
323
|
+
let didSomething = false;
|
|
324
|
+
do {
|
|
325
|
+
didSomething = false;
|
|
326
|
+
if (!this.preserveMultipleSlashes) {
|
|
327
|
+
for (let i = 1; i < parts.length - 1; i++) {
|
|
328
|
+
const p = parts[i];
|
|
329
|
+
if (i === 1 && p === '' && parts[0] === '')
|
|
330
|
+
continue;
|
|
331
|
+
if (p === '.' || p === '') {
|
|
332
|
+
didSomething = true;
|
|
333
|
+
parts.splice(i, 1);
|
|
334
|
+
i--;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if (parts[0] === '.' &&
|
|
338
|
+
parts.length === 2 &&
|
|
339
|
+
(parts[1] === '.' || parts[1] === '')) {
|
|
340
|
+
didSomething = true;
|
|
341
|
+
parts.pop();
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
let dd = 0;
|
|
345
|
+
while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
|
|
346
|
+
const p = parts[dd - 1];
|
|
347
|
+
if (p && p !== '.' && p !== '..' && p !== '**') {
|
|
348
|
+
didSomething = true;
|
|
349
|
+
parts.splice(dd - 1, 2);
|
|
350
|
+
dd -= 2;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
} while (didSomething);
|
|
354
|
+
return parts.length === 0 ? [''] : parts;
|
|
355
|
+
}
|
|
356
|
+
firstPhasePreProcess(globParts) {
|
|
357
|
+
let didSomething = false;
|
|
358
|
+
do {
|
|
359
|
+
didSomething = false;
|
|
360
|
+
for (let parts of globParts) {
|
|
361
|
+
let gs = -1;
|
|
362
|
+
while (-1 !== (gs = parts.indexOf('**', gs + 1))) {
|
|
363
|
+
let gss = gs;
|
|
364
|
+
while (parts[gss + 1] === '**') {
|
|
365
|
+
gss++;
|
|
366
|
+
}
|
|
367
|
+
if (gss > gs) {
|
|
368
|
+
parts.splice(gs + 1, gss - gs);
|
|
369
|
+
}
|
|
370
|
+
let next = parts[gs + 1];
|
|
371
|
+
const p = parts[gs + 2];
|
|
372
|
+
const p2 = parts[gs + 3];
|
|
373
|
+
if (next !== '..')
|
|
374
|
+
continue;
|
|
375
|
+
if (!p ||
|
|
376
|
+
p === '.' ||
|
|
377
|
+
p === '..' ||
|
|
378
|
+
!p2 ||
|
|
379
|
+
p2 === '.' ||
|
|
380
|
+
p2 === '..') {
|
|
381
|
+
continue;
|
|
382
|
+
}
|
|
383
|
+
didSomething = true;
|
|
384
|
+
parts.splice(gs, 1);
|
|
385
|
+
const other = parts.slice(0);
|
|
386
|
+
other[gs] = '**';
|
|
387
|
+
globParts.push(other);
|
|
388
|
+
gs--;
|
|
389
|
+
}
|
|
390
|
+
if (!this.preserveMultipleSlashes) {
|
|
391
|
+
for (let i = 1; i < parts.length - 1; i++) {
|
|
392
|
+
const p = parts[i];
|
|
393
|
+
if (i === 1 && p === '' && parts[0] === '')
|
|
394
|
+
continue;
|
|
395
|
+
if (p === '.' || p === '') {
|
|
396
|
+
didSomething = true;
|
|
397
|
+
parts.splice(i, 1);
|
|
398
|
+
i--;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
if (parts[0] === '.' &&
|
|
402
|
+
parts.length === 2 &&
|
|
403
|
+
(parts[1] === '.' || parts[1] === '')) {
|
|
404
|
+
didSomething = true;
|
|
405
|
+
parts.pop();
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
let dd = 0;
|
|
409
|
+
while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
|
|
410
|
+
const p = parts[dd - 1];
|
|
411
|
+
if (p && p !== '.' && p !== '..' && p !== '**') {
|
|
412
|
+
didSomething = true;
|
|
413
|
+
const needDot = dd === 1 && parts[dd + 1] === '**';
|
|
414
|
+
const splin = needDot ? ['.'] : [];
|
|
415
|
+
parts.splice(dd - 1, 2, ...splin);
|
|
416
|
+
if (parts.length === 0)
|
|
417
|
+
parts.push('');
|
|
418
|
+
dd -= 2;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
} while (didSomething);
|
|
423
|
+
return globParts;
|
|
424
|
+
}
|
|
425
|
+
secondPhasePreProcess(globParts) {
|
|
426
|
+
for (let i = 0; i < globParts.length - 1; i++) {
|
|
427
|
+
for (let j = i + 1; j < globParts.length; j++) {
|
|
428
|
+
const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
|
|
429
|
+
if (matched) {
|
|
430
|
+
globParts[i] = [];
|
|
431
|
+
globParts[j] = matched;
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
return globParts.filter((gs) => gs.length);
|
|
437
|
+
}
|
|
438
|
+
partsMatch(a, b, emptyGSMatch = false) {
|
|
439
|
+
let ai = 0;
|
|
440
|
+
let bi = 0;
|
|
441
|
+
let result = [];
|
|
442
|
+
let which = '';
|
|
443
|
+
while (ai < a.length && bi < b.length) {
|
|
444
|
+
if (a[ai] === b[bi]) {
|
|
445
|
+
result.push(which === 'b' ? b[bi] : a[ai]);
|
|
446
|
+
ai++;
|
|
447
|
+
bi++;
|
|
448
|
+
}
|
|
449
|
+
else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {
|
|
450
|
+
result.push(a[ai]);
|
|
451
|
+
ai++;
|
|
452
|
+
}
|
|
453
|
+
else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {
|
|
454
|
+
result.push(b[bi]);
|
|
455
|
+
bi++;
|
|
456
|
+
}
|
|
457
|
+
else if (a[ai] === '*' &&
|
|
458
|
+
b[bi] &&
|
|
459
|
+
(this.options.dot || !b[bi].startsWith('.')) &&
|
|
460
|
+
b[bi] !== '**') {
|
|
461
|
+
if (which === 'b')
|
|
462
|
+
return false;
|
|
463
|
+
which = 'a';
|
|
464
|
+
result.push(a[ai]);
|
|
465
|
+
ai++;
|
|
466
|
+
bi++;
|
|
467
|
+
}
|
|
468
|
+
else if (b[bi] === '*' &&
|
|
469
|
+
a[ai] &&
|
|
470
|
+
(this.options.dot || !a[ai].startsWith('.')) &&
|
|
471
|
+
a[ai] !== '**') {
|
|
472
|
+
if (which === 'a')
|
|
473
|
+
return false;
|
|
474
|
+
which = 'b';
|
|
475
|
+
result.push(b[bi]);
|
|
476
|
+
ai++;
|
|
477
|
+
bi++;
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
return false;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
return a.length === b.length && result;
|
|
484
|
+
}
|
|
485
|
+
parseNegate() {
|
|
486
|
+
if (this.nonegate)
|
|
487
|
+
return;
|
|
488
|
+
const pattern = this.pattern;
|
|
489
|
+
let negate = false;
|
|
490
|
+
let negateOffset = 0;
|
|
491
|
+
for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {
|
|
492
|
+
negate = !negate;
|
|
493
|
+
negateOffset++;
|
|
494
|
+
}
|
|
495
|
+
if (negateOffset)
|
|
496
|
+
this.pattern = pattern.slice(negateOffset);
|
|
497
|
+
this.negate = negate;
|
|
498
|
+
}
|
|
499
|
+
matchOne(file, pattern, partial = false) {
|
|
500
|
+
const options = this.options;
|
|
501
|
+
if (this.isWindows) {
|
|
502
|
+
const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
|
|
503
|
+
const fileUNC = !fileDrive &&
|
|
504
|
+
file[0] === '' &&
|
|
505
|
+
file[1] === '' &&
|
|
506
|
+
file[2] === '?' &&
|
|
507
|
+
/^[a-z]:$/i.test(file[3]);
|
|
508
|
+
const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
|
|
509
|
+
const patternUNC = !patternDrive &&
|
|
510
|
+
pattern[0] === '' &&
|
|
511
|
+
pattern[1] === '' &&
|
|
512
|
+
pattern[2] === '?' &&
|
|
513
|
+
typeof pattern[3] === 'string' &&
|
|
514
|
+
/^[a-z]:$/i.test(pattern[3]);
|
|
515
|
+
const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
|
|
516
|
+
const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
|
|
517
|
+
if (typeof fdi === 'number' && typeof pdi === 'number') {
|
|
518
|
+
const [fd, pd] = [file[fdi], pattern[pdi]];
|
|
519
|
+
if (fd.toLowerCase() === pd.toLowerCase()) {
|
|
520
|
+
pattern[pdi] = fd;
|
|
521
|
+
if (pdi > fdi) {
|
|
522
|
+
pattern = pattern.slice(pdi);
|
|
523
|
+
}
|
|
524
|
+
else if (fdi > pdi) {
|
|
525
|
+
file = file.slice(fdi);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
const { optimizationLevel = 1 } = this.options;
|
|
531
|
+
if (optimizationLevel >= 2) {
|
|
532
|
+
file = this.levelTwoFileOptimize(file);
|
|
533
|
+
}
|
|
534
|
+
this.debug('matchOne', this, { file, pattern });
|
|
535
|
+
this.debug('matchOne', file.length, pattern.length);
|
|
536
|
+
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
537
|
+
this.debug('matchOne loop');
|
|
538
|
+
var p = pattern[pi];
|
|
539
|
+
var f = file[fi];
|
|
540
|
+
this.debug(pattern, p, f);
|
|
541
|
+
if (p === false) {
|
|
542
|
+
return false;
|
|
543
|
+
}
|
|
544
|
+
if (p === exports.GLOBSTAR) {
|
|
545
|
+
this.debug('GLOBSTAR', [pattern, p, f]);
|
|
546
|
+
var fr = fi;
|
|
547
|
+
var pr = pi + 1;
|
|
548
|
+
if (pr === pl) {
|
|
549
|
+
this.debug('** at the end');
|
|
550
|
+
for (; fi < fl; fi++) {
|
|
551
|
+
if (file[fi] === '.' ||
|
|
552
|
+
file[fi] === '..' ||
|
|
553
|
+
(!options.dot && file[fi].charAt(0) === '.'))
|
|
554
|
+
return false;
|
|
555
|
+
}
|
|
556
|
+
return true;
|
|
557
|
+
}
|
|
558
|
+
while (fr < fl) {
|
|
559
|
+
var swallowee = file[fr];
|
|
560
|
+
this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
|
|
561
|
+
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
|
562
|
+
this.debug('globstar found match!', fr, fl, swallowee);
|
|
563
|
+
return true;
|
|
564
|
+
}
|
|
565
|
+
else {
|
|
566
|
+
if (swallowee === '.' ||
|
|
567
|
+
swallowee === '..' ||
|
|
568
|
+
(!options.dot && swallowee.charAt(0) === '.')) {
|
|
569
|
+
this.debug('dot detected!', file, fr, pattern, pr);
|
|
570
|
+
break;
|
|
571
|
+
}
|
|
572
|
+
this.debug('globstar swallow a segment, and continue');
|
|
573
|
+
fr++;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
if (partial) {
|
|
577
|
+
this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
|
|
578
|
+
if (fr === fl) {
|
|
579
|
+
return true;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
return false;
|
|
583
|
+
}
|
|
584
|
+
let hit;
|
|
585
|
+
if (typeof p === 'string') {
|
|
586
|
+
hit = f === p;
|
|
587
|
+
this.debug('string match', p, f, hit);
|
|
588
|
+
}
|
|
589
|
+
else {
|
|
590
|
+
hit = p.test(f);
|
|
591
|
+
this.debug('pattern match', p, f, hit);
|
|
592
|
+
}
|
|
593
|
+
if (!hit)
|
|
594
|
+
return false;
|
|
595
|
+
}
|
|
596
|
+
if (fi === fl && pi === pl) {
|
|
597
|
+
return true;
|
|
598
|
+
}
|
|
599
|
+
else if (fi === fl) {
|
|
600
|
+
return partial;
|
|
601
|
+
}
|
|
602
|
+
else if (pi === pl) {
|
|
603
|
+
return fi === fl - 1 && file[fi] === '';
|
|
604
|
+
}
|
|
605
|
+
else {
|
|
606
|
+
throw new Error('wtf?');
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
braceExpand() {
|
|
610
|
+
return (0, exports.braceExpand)(this.pattern, this.options);
|
|
611
|
+
}
|
|
612
|
+
parse(pattern) {
|
|
613
|
+
(0, assert_valid_pattern_1.assertValidPattern)(pattern);
|
|
614
|
+
const options = this.options;
|
|
615
|
+
if (pattern === '**')
|
|
616
|
+
return exports.GLOBSTAR;
|
|
617
|
+
if (pattern === '')
|
|
618
|
+
return '';
|
|
619
|
+
let m;
|
|
620
|
+
let fastTest = null;
|
|
621
|
+
if ((m = pattern.match(starRE))) {
|
|
622
|
+
fastTest = options.dot ? starTestDot : starTest;
|
|
623
|
+
}
|
|
624
|
+
else if ((m = pattern.match(starDotExtRE))) {
|
|
625
|
+
fastTest = (options.nocase
|
|
626
|
+
? options.dot
|
|
627
|
+
? starDotExtTestNocaseDot
|
|
628
|
+
: starDotExtTestNocase
|
|
629
|
+
: options.dot
|
|
630
|
+
? starDotExtTestDot
|
|
631
|
+
: starDotExtTest)(m[1]);
|
|
632
|
+
}
|
|
633
|
+
else if ((m = pattern.match(qmarksRE))) {
|
|
634
|
+
fastTest = (options.nocase
|
|
635
|
+
? options.dot
|
|
636
|
+
? qmarksTestNocaseDot
|
|
637
|
+
: qmarksTestNocase
|
|
638
|
+
: options.dot
|
|
639
|
+
? qmarksTestDot
|
|
640
|
+
: qmarksTest)(m);
|
|
641
|
+
}
|
|
642
|
+
else if ((m = pattern.match(starDotStarRE))) {
|
|
643
|
+
fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
|
|
644
|
+
}
|
|
645
|
+
else if ((m = pattern.match(dotStarRE))) {
|
|
646
|
+
fastTest = dotStarTest;
|
|
647
|
+
}
|
|
648
|
+
const re = ast_1.AST.fromGlob(pattern, this.options).toMMPattern();
|
|
649
|
+
if (fastTest && typeof re === 'object') {
|
|
650
|
+
Reflect.defineProperty(re, 'test', { value: fastTest });
|
|
651
|
+
}
|
|
652
|
+
return re;
|
|
653
|
+
}
|
|
654
|
+
makeRe() {
|
|
655
|
+
if (this.regexp || this.regexp === false)
|
|
656
|
+
return this.regexp;
|
|
657
|
+
const set = this.set;
|
|
658
|
+
if (!set.length) {
|
|
659
|
+
this.regexp = false;
|
|
660
|
+
return this.regexp;
|
|
661
|
+
}
|
|
662
|
+
const options = this.options;
|
|
663
|
+
const twoStar = options.noglobstar
|
|
664
|
+
? star
|
|
665
|
+
: options.dot
|
|
666
|
+
? twoStarDot
|
|
667
|
+
: twoStarNoDot;
|
|
668
|
+
const flags = new Set(options.nocase ? ['i'] : []);
|
|
669
|
+
let re = set
|
|
670
|
+
.map((pattern) => {
|
|
671
|
+
const pp = pattern.map((p) => {
|
|
672
|
+
if (p instanceof RegExp) {
|
|
673
|
+
for (const f of p.flags.split(''))
|
|
674
|
+
flags.add(f);
|
|
675
|
+
}
|
|
676
|
+
return typeof p === 'string'
|
|
677
|
+
? regExpEscape(p)
|
|
678
|
+
: p === exports.GLOBSTAR
|
|
679
|
+
? exports.GLOBSTAR
|
|
680
|
+
: p._src;
|
|
681
|
+
});
|
|
682
|
+
pp.forEach((p, i) => {
|
|
683
|
+
const next = pp[i + 1];
|
|
684
|
+
const prev = pp[i - 1];
|
|
685
|
+
if (p !== exports.GLOBSTAR || prev === exports.GLOBSTAR) {
|
|
686
|
+
return;
|
|
687
|
+
}
|
|
688
|
+
if (prev === undefined) {
|
|
689
|
+
if (next !== undefined && next !== exports.GLOBSTAR) {
|
|
690
|
+
pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next;
|
|
691
|
+
}
|
|
692
|
+
else {
|
|
693
|
+
pp[i] = twoStar;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
else if (next === undefined) {
|
|
697
|
+
pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?';
|
|
698
|
+
}
|
|
699
|
+
else if (next !== exports.GLOBSTAR) {
|
|
700
|
+
pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
|
|
701
|
+
pp[i + 1] = exports.GLOBSTAR;
|
|
702
|
+
}
|
|
703
|
+
});
|
|
704
|
+
return pp.filter((p) => p !== exports.GLOBSTAR).join('/');
|
|
705
|
+
})
|
|
706
|
+
.join('|');
|
|
707
|
+
const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];
|
|
708
|
+
re = '^' + open + re + close + '$';
|
|
709
|
+
if (this.negate)
|
|
710
|
+
re = '^(?!' + re + ').+$';
|
|
711
|
+
try {
|
|
712
|
+
this.regexp = new RegExp(re, [...flags].join(''));
|
|
713
|
+
}
|
|
714
|
+
catch (ex) {
|
|
715
|
+
this.regexp = false;
|
|
716
|
+
}
|
|
717
|
+
return this.regexp;
|
|
718
|
+
}
|
|
719
|
+
slashSplit(p) {
|
|
720
|
+
if (this.preserveMultipleSlashes) {
|
|
721
|
+
return p.split('/');
|
|
722
|
+
}
|
|
723
|
+
else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
|
|
724
|
+
return ['', ...p.split(/\/+/)];
|
|
725
|
+
}
|
|
726
|
+
else {
|
|
727
|
+
return p.split(/\/+/);
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
match(f, partial = this.partial) {
|
|
731
|
+
this.debug('match', f, this.pattern);
|
|
732
|
+
if (this.comment) {
|
|
733
|
+
return false;
|
|
734
|
+
}
|
|
735
|
+
if (this.empty) {
|
|
736
|
+
return f === '';
|
|
737
|
+
}
|
|
738
|
+
if (f === '/' && partial) {
|
|
739
|
+
return true;
|
|
740
|
+
}
|
|
741
|
+
const options = this.options;
|
|
742
|
+
if (this.isWindows) {
|
|
743
|
+
f = f.split('\\').join('/');
|
|
744
|
+
}
|
|
745
|
+
const ff = this.slashSplit(f);
|
|
746
|
+
this.debug(this.pattern, 'split', ff);
|
|
747
|
+
const set = this.set;
|
|
748
|
+
this.debug(this.pattern, 'set', set);
|
|
749
|
+
let filename = ff[ff.length - 1];
|
|
750
|
+
if (!filename) {
|
|
751
|
+
for (let i = ff.length - 2; !filename && i >= 0; i--) {
|
|
752
|
+
filename = ff[i];
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
for (let i = 0; i < set.length; i++) {
|
|
756
|
+
const pattern = set[i];
|
|
757
|
+
let file = ff;
|
|
758
|
+
if (options.matchBase && pattern.length === 1) {
|
|
759
|
+
file = [filename];
|
|
760
|
+
}
|
|
761
|
+
const hit = this.matchOne(file, pattern, partial);
|
|
762
|
+
if (hit) {
|
|
763
|
+
if (options.flipNegate) {
|
|
764
|
+
return true;
|
|
765
|
+
}
|
|
766
|
+
return !this.negate;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
if (options.flipNegate) {
|
|
770
|
+
return false;
|
|
771
|
+
}
|
|
772
|
+
return this.negate;
|
|
773
|
+
}
|
|
774
|
+
static defaults(def) {
|
|
775
|
+
return exports.minimatch.defaults(def).Minimatch;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
exports.Minimatch = Minimatch;
|
|
779
|
+
var ast_js_1 = require("./ast.js");
|
|
780
|
+
Object.defineProperty(exports, "AST", { enumerable: true, get: function () { return ast_js_1.AST; } });
|
|
781
|
+
var escape_js_1 = require("./escape.js");
|
|
782
|
+
Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return escape_js_1.escape; } });
|
|
783
|
+
var unescape_js_1 = require("./unescape.js");
|
|
784
|
+
Object.defineProperty(exports, "unescape", { enumerable: true, get: function () { return unescape_js_1.unescape; } });
|
|
785
|
+
exports.minimatch.AST = ast_1.AST;
|
|
786
|
+
exports.minimatch.Minimatch = Minimatch;
|
|
787
|
+
exports.minimatch.escape = escape_1.escape;
|
|
788
|
+
exports.minimatch.unescape = unescape_1.unescape;
|