Enhance refactor commands with controller-aware Route() updates and fix code quality violations

Add semantic token highlighting for 'that' variable and comment file references in VS Code extension
Add Phone_Text_Input and Currency_Input components with formatting utilities
Implement client widgets, form standardization, and soft delete functionality
Add modal scroll lock and update documentation
Implement comprehensive modal system with form integration and validation
Fix modal component instantiation using jQuery plugin API
Implement modal system with responsive sizing, queuing, and validation support
Implement form submission with validation, error handling, and loading states
Implement country/state selectors with dynamic data loading and Bootstrap styling
Revert Rsx::Route() highlighting in Blade/PHP files
Target specific PHP scopes for Rsx::Route() highlighting in Blade
Expand injection selector for Rsx::Route() highlighting
Add custom syntax highlighting for Rsx::Route() and Rsx.Route() calls
Update jqhtml packages to v2.2.165
Add bundle path validation for common mistakes (development mode only)
Create Ajax_Select_Input widget and Rsx_Reference_Data controller
Create Country_Select_Input widget with default country support
Initialize Tom Select on Select_Input widgets
Add Tom Select bundle for enhanced select dropdowns
Implement ISO 3166 geographic data system for country/region selection
Implement widget-based form system with disabled state support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-10-30 06:21:56 +00:00
parent e678b987c2
commit f6ac36c632
5683 changed files with 5854736 additions and 22329 deletions

46
node_modules/axios/CHANGELOG.md generated vendored
View File

@@ -1,5 +1,50 @@
# Changelog
## [1.13.1](https://github.com/axios/axios/compare/v1.13.0...v1.13.1) (2025-10-28)
### Bug Fixes
* **http:** fixed a regression that caused the data stream to be interrupted for responses with non-OK HTTP statuses; ([#7193](https://github.com/axios/axios/issues/7193)) ([bcd5581](https://github.com/axios/axios/commit/bcd5581d208cd372055afdcb2fd10b68ca40613c))
### Contributors to this release
- <img src="https://avatars.githubusercontent.com/u/128113546?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Anchal Singh](https://github.com/imanchalsingh "+220/-111 (#7173 )")
- <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+18/-1 (#7193 )")
# [1.13.0](https://github.com/axios/axios/compare/v1.12.2...v1.13.0) (2025-10-27)
### Bug Fixes
* **fetch:** prevent TypeError when config.env is undefined ([#7155](https://github.com/axios/axios/issues/7155)) ([015faec](https://github.com/axios/axios/commit/015faeca9f26db76f9562760f04bb9f8229f4db1))
* resolve issue [#7131](https://github.com/axios/axios/issues/7131) (added spacing in mergeConfig.js) ([#7133](https://github.com/axios/axios/issues/7133)) ([9b9ec98](https://github.com/axios/axios/commit/9b9ec98548d93e9f2204deea10a5f1528bf3ce62))
### Features
* **http:** add HTTP2 support; ([#7150](https://github.com/axios/axios/issues/7150)) ([d676df7](https://github.com/axios/axios/commit/d676df772244726533ca320f42e967f5af056bac))
### Contributors to this release
- <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+794/-180 (#7186 #7150 #7039 )")
- <img src="https://avatars.githubusercontent.com/u/189505037?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Noritaka Kobayashi](https://github.com/noritaka1166 "+24/-509 (#7032 )")
- <img src="https://avatars.githubusercontent.com/u/195581631?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Aviraj2929](https://github.com/Aviraj2929 "+211/-93 (#7136 #7135 #7134 #7112 )")
- <img src="https://avatars.githubusercontent.com/u/181717941?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [prasoon patel](https://github.com/Prasoon52 "+167/-6 (#7099 )")
- <img src="https://avatars.githubusercontent.com/u/141911040?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Samyak Dandge](https://github.com/Samy-in "+134/-0 (#7171 )")
- <img src="https://avatars.githubusercontent.com/u/128113546?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Anchal Singh](https://github.com/imanchalsingh "+53/-56 (#7170 )")
- <img src="https://avatars.githubusercontent.com/u/146073621?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Rahul Kumar](https://github.com/jaiyankargupta "+28/-28 (#7073 )")
- <img src="https://avatars.githubusercontent.com/u/148716794?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Amit Verma](https://github.com/Amitverma0509 "+24/-13 (#7129 )")
- <img src="https://avatars.githubusercontent.com/u/141427581?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Abhishek3880](https://github.com/abhishekmaniy "+23/-4 (#7119 #7117 #7116 #7115 )")
- <img src="https://avatars.githubusercontent.com/u/91522146?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dhvani Maktuporia](https://github.com/Dhvani365 "+14/-5 (#7175 )")
- <img src="https://avatars.githubusercontent.com/u/41838423?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Usama Ayoub](https://github.com/sam3690 "+4/-4 (#7133 )")
- <img src="https://avatars.githubusercontent.com/u/79366821?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [ikuy1203](https://github.com/ikuy1203 "+3/-3 (#7166 )")
- <img src="https://avatars.githubusercontent.com/u/74639234?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Nikhil Simon Toppo](https://github.com/Kirito-Excalibur "+1/-1 (#7172 )")
- <img src="https://avatars.githubusercontent.com/u/200562195?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Jane Wangari](https://github.com/Wangarijane "+1/-1 (#7155 )")
- <img src="https://avatars.githubusercontent.com/u/78318848?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Supakorn Ieamgomol](https://github.com/Supakornn "+1/-1 (#7065 )")
- <img src="https://avatars.githubusercontent.com/u/134518?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Kian-Meng Ang](https://github.com/kianmeng "+1/-1 (#7046 )")
- <img src="https://avatars.githubusercontent.com/u/13148112?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [UTSUMI Keiji](https://github.com/k-utsumi "+1/-1 (#7037 )")
## [1.12.2](https://github.com/axios/axios/compare/v1.12.1...v1.12.2) (2025-09-14)
@@ -1292,4 +1337,5 @@ This functionality is considered as a fix.
- [Marco Weber](https://github.com/mrcwbr)
- [Luca Pizzini](https://github.com/lpizzinidev)
- [Willian Agostini](https://github.com/WillianAgostini)
- [Huyen Nguyen](https://github.com/huyenltnguyen)

129
node_modules/axios/README.md generated vendored
View File

@@ -1,14 +1,14 @@
<h3 align="center"> 🥇 Gold sponsors <br> </h3> <table align="center" width="100%"><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://dev.intra-mart.jp/?utm_source&#x3D;axios&amp;utm_medium&#x3D;sponsorlist&amp;utm_campaign&#x3D;sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="48px" height="47px" src="https://axios-http.com/assets/sponsors/opencollective/948009b39c308b39f58c5d1245abd22512adc37b.png" alt="intra-mart"/> </a> <p align="center" title="[1ページ目] CookBook の記事 intra-mart Developer Portal ">[1ページ目] CookBook の記事 intra-mart Developer Portal</p> <p align="center"> <a href="https://dev.intra-mart.jp/?utm_source&#x3D;axios&amp;utm_medium&#x3D;readme_sponsorlist&amp;utm_campaign&#x3D;sponsorship" target="_blank"><b>dev.intra-mart.jp</b></a> </p>
</td><td align="center" width="33.333333333333336%"> <a href="https://stytch.com/?utm_source&#x3D;oss-sponsorship&amp;utm_medium&#x3D;paid_sponsorship&amp;utm_content&#x3D;website-link&amp;utm_campaign&#x3D;axios-http" style="padding: 10px; display: inline-block" target="_blank"> <picture> <source width="200px" height="38px" media="(prefers-color-scheme: dark)" srcset="https://axios-http.com/assets/sponsors/stytch_white.png"> <img width="200px" height="38px" src="https://axios-http.com/assets/sponsors/stytch.png" alt="Stytch"/> </picture> </a> <p align="center" title="API-first authentication, authorization, and fraud prevention">API-first authentication, authorization, and fraud prevention</p> <p align="center"> <a href="https://stytch.com/?utm_source&#x3D;oss-sponsorship&amp;utm_medium&#x3D;paid_sponsorship&amp;utm_content&#x3D;website-link&amp;utm_campaign&#x3D;axios-http" target="_blank"><b>Website</b></a> | <a href="https://stytch.com/docs?utm_source&#x3D;oss-sponsorship&amp;utm_medium&#x3D;paid_sponsorship&amp;utm_content&#x3D;docs-link&amp;utm_campaign&#x3D;axios-http" target="_blank"><b>Documentation</b></a> | <a href="https://github.com/stytchauth/stytch-node?utm_source&#x3D;oss-sponsorship&amp;utm_medium&#x3D;paid_sponsorship&amp;utm_content&#x3D;node-sdk&amp;utm_campaign&#x3D;axios-http" target="_blank"><b>Node.js</b></a> </p>
<h3 align="center"> 🥇 Gold sponsors <br> </h3> <table align="center" width="100%"><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://stytch.com/?utm_source&#x3D;oss-sponsorship&amp;utm_medium&#x3D;paid_sponsorship&amp;utm_content&#x3D;website-link&amp;utm_campaign&#x3D;axios-http" style="padding: 10px; display: inline-block" target="_blank"> <picture> <source width="200px" height="38px" media="(prefers-color-scheme: dark)" srcset="https://axios-http.com/assets/sponsors/stytch_white.png"> <img width="200px" height="38px" src="https://axios-http.com/assets/sponsors/stytch.png" alt="Stytch"/> </picture> </a> <p align="center" title="API-first authentication, authorization, and fraud prevention">API-first authentication, authorization, and fraud prevention</p> <p align="center"> <a href="https://stytch.com/?utm_source&#x3D;oss-sponsorship&amp;utm_medium&#x3D;paid_sponsorship&amp;utm_content&#x3D;website-link&amp;utm_campaign&#x3D;axios-http" target="_blank"><b>Website</b></a> | <a href="https://stytch.com/docs?utm_source&#x3D;oss-sponsorship&amp;utm_medium&#x3D;paid_sponsorship&amp;utm_content&#x3D;docs-link&amp;utm_campaign&#x3D;axios-http" target="_blank"><b>Documentation</b></a> | <a href="https://github.com/stytchauth/stytch-node?utm_source&#x3D;oss-sponsorship&amp;utm_medium&#x3D;paid_sponsorship&amp;utm_content&#x3D;node-sdk&amp;utm_campaign&#x3D;axios-http" target="_blank"><b>Node.js</b></a> </p>
</td><td align="center" width="33.333333333333336%"> <a href="https://www.principal.com/about-us?utm_source&#x3D;axios&amp;utm_medium&#x3D;sponsorlist&amp;utm_campaign&#x3D;sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="133px" height="43px" src="https://axios-http.com/assets/sponsors/principal.svg" alt="Principal Financial Group"/> </a> <p align="center" title="Were bound by one common purpose: to give you the financial tools, resources and information you need to live your best life.">Were bound by one common purpose: to give you the financial tools, resources and information you ne...</p> <p align="center"> <a href="https://www.principal.com/about-us?utm_source&#x3D;axios&amp;utm_medium&#x3D;readme_sponsorlist&amp;utm_campaign&#x3D;sponsorship" target="_blank"><b>www.principal.com</b></a> </p>
</td></tr><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://twicsy.com/buy-instagram-followers?utm_source&#x3D;axios&amp;utm_medium&#x3D;sponsorlist&amp;utm_campaign&#x3D;sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="85px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/dfa9670ad5e66eea17315332453c7f4e3a3b5905.png" alt="Buy Instagram Followers Twicsy"/> </a> <p align="center" title="Buy real Instagram followers from Twicsy starting at only $2.97. Twicsy has been voted the best site to buy followers from the likes of US Magazine.">Buy real Instagram followers from Twicsy starting at only $2.97. Twicsy has been voted the best site...</p> <p align="center"> <a href="https://twicsy.com/buy-instagram-followers?utm_source&#x3D;axios&amp;utm_medium&#x3D;readme_sponsorlist&amp;utm_campaign&#x3D;sponsorship" target="_blank"><b>twicsy.com</b></a> </p>
</td><td align="center" width="33.333333333333336%"> <a href="https://www.descope.com/?utm_source&#x3D;axios&amp;utm_medium&#x3D;referral&amp;utm_campaign&#x3D;axios-oss-sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <picture> <source width="200px" height="52px" media="(prefers-color-scheme: dark)" srcset="https://axios-http.com/assets/sponsors/descope_white.png"> <img width="200px" height="52px" src="https://axios-http.com/assets/sponsors/descope.png" alt="Descope"/> </picture> </a> <p align="center" title="Hi, we&#x27;re Descope! We are building something in the authentication space for app developers and cant wait to place it in your hands.">Hi, we&#x27;re Descope! We are building something in the authentication space for app developers and...</p> <p align="center"> <a href="https://www.descope.com/?utm_source&#x3D;axios&amp;utm_medium&#x3D;referral&amp;utm_campaign&#x3D;axios-oss-sponsorship" target="_blank"><b>Website</b></a> | <a href="https://docs.descope.com/?utm_source&#x3D;axios&amp;utm_medium&#x3D;referral&amp;utm_campaign&#x3D;axios-oss-sponsorship" target="_blank"><b>Docs</b></a> | <a href="https://www.descope.com/community?utm_source&#x3D;axios&amp;utm_medium&#x3D;referral&amp;utm_campaign&#x3D;axios-oss-sponsorship" target="_blank"><b>Community</b></a> </p>
</td><td align="center" width="33.333333333333336%"> <a href="https://twicsy.com/buy-instagram-followers?utm_source&#x3D;axios&amp;utm_medium&#x3D;sponsorlist&amp;utm_campaign&#x3D;sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="85px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/dfa9670ad5e66eea17315332453c7f4e3a3b5905.png" alt="Buy Instagram Followers Twicsy"/> </a> <p align="center" title="Buy real Instagram followers from Twicsy starting at only $2.97. Twicsy has been voted the best site to buy followers from the likes of US Magazine.">Buy real Instagram followers from Twicsy starting at only $2.97. Twicsy has been voted the best site...</p> <p align="center"> <a href="https://twicsy.com/buy-instagram-followers?utm_source&#x3D;axios&amp;utm_medium&#x3D;readme_sponsorlist&amp;utm_campaign&#x3D;sponsorship" target="_blank"><b>twicsy.com</b></a> </p>
</td></tr><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://www.descope.com/?utm_source&#x3D;axios&amp;utm_medium&#x3D;referral&amp;utm_campaign&#x3D;axios-oss-sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <picture> <source width="200px" height="52px" media="(prefers-color-scheme: dark)" srcset="https://axios-http.com/assets/sponsors/descope_white.png"> <img width="200px" height="52px" src="https://axios-http.com/assets/sponsors/descope.png" alt="Descope"/> </picture> </a> <p align="center" title="Hi, we&#x27;re Descope! We are building something in the authentication space for app developers and cant wait to place it in your hands.">Hi, we&#x27;re Descope! We are building something in the authentication space for app developers and...</p> <p align="center"> <a href="https://www.descope.com/?utm_source&#x3D;axios&amp;utm_medium&#x3D;referral&amp;utm_campaign&#x3D;axios-oss-sponsorship" target="_blank"><b>Website</b></a> | <a href="https://docs.descope.com/?utm_source&#x3D;axios&amp;utm_medium&#x3D;referral&amp;utm_campaign&#x3D;axios-oss-sponsorship" target="_blank"><b>Docs</b></a> | <a href="https://www.descope.com/community?utm_source&#x3D;axios&amp;utm_medium&#x3D;referral&amp;utm_campaign&#x3D;axios-oss-sponsorship" target="_blank"><b>Community</b></a> </p>
</td><td align="center" width="33.333333333333336%"> <a href="https://route4me.com/?utm_source&#x3D;axios&amp;utm_medium&#x3D;sponsorlist&amp;utm_campaign&#x3D;sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <picture> <source width="200px" height="51px" media="(prefers-color-scheme: dark)" srcset="https://axios-http.com/assets/sponsors/route4me_white.png"> <img width="200px" height="51px" src="https://axios-http.com/assets/sponsors/route4me.png" alt="Route4Me"/> </picture> </a> <p align="center" title="Best Route Planning And Route Optimization Software">Best Route Planning And Route Optimization Software</p> <p align="center"> <a href="https://route4me.com/platform/route-optimization-software?utm_source&#x3D;axios&amp;utm_medium&#x3D;readme_sponsorlist&amp;utm_campaign&#x3D;sponsorship" target="_blank"><b>Explore</b></a> | <a href="https://route4me.com/platform/marketplace/pricing?utm_source&#x3D;axios&amp;utm_medium&#x3D;readme_sponsorlist&amp;utm_campaign&#x3D;sponsorship" target="_blank"><b>Free Trial</b></a> | <a href="https://route4me.com/contact?utm_source&#x3D;axios&amp;utm_medium&#x3D;readme_sponsorlist&amp;utm_campaign&#x3D;sponsorship" target="_blank"><b>Contact</b></a> </p>
</td></tr><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://buzzoid.com/buy-instagram-followers/?utm_source&#x3D;axios&amp;utm_medium&#x3D;sponsorlist&amp;utm_campaign&#x3D;sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="62px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/e1625cb54e10ee40180c99d1495a462e9d6664a4.png" alt="Buzzoid - Buy Instagram Followers"/> </a> <p align="center" title="At Buzzoid, you can buy Instagram followers quickly, safely, and easily with just a few clicks. Rated world&#x27;s #1 IG service since 2012.">At Buzzoid, you can buy Instagram followers quickly, safely, and easily with just a few clicks. Rate...</p> <p align="center"> <a href="https://buzzoid.com/buy-instagram-followers/?utm_source&#x3D;axios&amp;utm_medium&#x3D;readme_sponsorlist&amp;utm_campaign&#x3D;sponsorship" target="_blank"><b>buzzoid.com</b></a> </p>
</td><td align="center" width="33.333333333333336%"> <a href="https://www.famety.net/?utm_source&#x3D;axios&amp;utm_medium&#x3D;sponsorlist&amp;utm_campaign&#x3D;sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="70px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/56645c65d4bad0ab84265e02430d19d64afde927.png" alt="Famety - Buy Instagram Followers"/> </a> <p align="center" title="At Famety, you can grow your social media following quickly, safely, and easily with just a few clicks. Rated the worlds #1 social media service since 2013.">At Famety, you can grow your social media following quickly, safely, and easily with just a few clic...</p> <p align="center"> <a href="https://www.famety.net/?utm_source&#x3D;axios&amp;utm_medium&#x3D;readme_sponsorlist&amp;utm_campaign&#x3D;sponsorship" target="_blank"><b>www.famety.net</b></a> </p>
</td><td align="center" width="33.333333333333336%"> <a href="https://buzzoid.com/buy-instagram-followers/?utm_source&#x3D;axios&amp;utm_medium&#x3D;sponsorlist&amp;utm_campaign&#x3D;sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="62px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/e1625cb54e10ee40180c99d1495a462e9d6664a4.png" alt="Buzzoid - Buy Instagram Followers"/> </a> <p align="center" title="At Buzzoid, you can buy Instagram followers quickly, safely, and easily with just a few clicks. Rated world&#x27;s #1 IG service since 2012.">At Buzzoid, you can buy Instagram followers quickly, safely, and easily with just a few clicks. Rate...</p> <p align="center"> <a href="https://buzzoid.com/buy-instagram-followers/?utm_source&#x3D;axios&amp;utm_medium&#x3D;readme_sponsorlist&amp;utm_campaign&#x3D;sponsorship" target="_blank"><b>buzzoid.com</b></a> </p>
</td></tr><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://www.famety.net/?utm_source&#x3D;axios&amp;utm_medium&#x3D;sponsorlist&amp;utm_campaign&#x3D;sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="70px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/56645c65d4bad0ab84265e02430d19d64afde927.png" alt="Famety - Buy Instagram Followers"/> </a> <p align="center" title="At Famety, you can grow your social media following quickly, safely, and easily with just a few clicks. Rated the worlds #1 social media service since 2013.">At Famety, you can grow your social media following quickly, safely, and easily with just a few clic...</p> <p align="center"> <a href="https://www.famety.net/?utm_source&#x3D;axios&amp;utm_medium&#x3D;readme_sponsorlist&amp;utm_campaign&#x3D;sponsorship" target="_blank"><b>www.famety.net</b></a> </p>
</td><td align="center" width="33.333333333333336%"> <a href="https://poprey.com/?utm_source&#x3D;axios&amp;utm_medium&#x3D;sponsorlist&amp;utm_campaign&#x3D;sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="70px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/e699ec99f7df3a203ddbc49d3c7712a907e628ea.png" alt="Poprey - Buy Instagram Likes"/> </a> <p align="center" title="Buy Instagram Likes">Buy Instagram Likes</p> <p align="center"> <a href="https://poprey.com/?utm_source&#x3D;axios&amp;utm_medium&#x3D;readme_sponsorlist&amp;utm_campaign&#x3D;sponsorship" target="_blank"><b>poprey.com</b></a> </p>
</td></tr><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://ssmarket.net/buy-youtube-subscribers?utm_source&#x3D;axios&amp;utm_medium&#x3D;sponsorlist&amp;utm_campaign&#x3D;sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="70px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/0845614102b0c6602707ca2983de05a0098faad4.png" alt="Buy Youtube Subscribers"/> </a> <p align="center" title="SS Market offers professional social media services that rapidly increase your YouTube subscriber count, elevating your channel to a powerful position.">SS Market offers professional social media services that rapidly increase your YouTube subscriber co...</p> <p align="center"> <a href="https://ssmarket.net/buy-youtube-subscribers?utm_source&#x3D;axios&amp;utm_medium&#x3D;readme_sponsorlist&amp;utm_campaign&#x3D;sponsorship" target="_blank"><b>ssmarket.net</b></a> </p>
</td><td align="center" width="33.333333333333336%"> <a href="https://requestly.com/?utm_source&#x3D;axios&amp;utm_medium&#x3D;sponsorlist&amp;utm_campaign&#x3D;sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="71px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/16450b4dc0deb9dab5a511bf2bc8b8b4ac33412f.png" alt="Requestly"/> </a> <p align="center" title="A lightweight open-source API Development, Testing &amp; Mocking platform">A lightweight open-source API Development, Testing &amp; Mocking platform</p> <p align="center"> <a href="https://requestly.com/?utm_source&#x3D;axios&amp;utm_medium&#x3D;readme_sponsorlist&amp;utm_campaign&#x3D;sponsorship" target="_blank"><b>requestly.com</b></a> </p>
</td></tr><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://opencollective.com/axios/contribute" target="_blank" >💜 Become a sponsor</a>
</td><td align="center" width="33.333333333333336%"> <a href="https://opencollective.com/axios/contribute" target="_blank" >💜 Become a sponsor</a>
</td><td align="center" width="33.333333333333336%"> <a href="https://opencollective.com/axios/contribute" target="_blank" >💜 Become a sponsor</a>
</td></tr></table>
@@ -16,7 +16,7 @@
<!--<div>marker</div>-->
<br><br>
<div align="center">
<a href="https://axios-http.com"><img src="https://axios-http.com/assets/logo.svg" /></a><br>
<a href="https://axios-http.com"><img src="https://axios-http.com/assets/logo.svg" alt="Axios" /></a><br>
</div>
<p align="center">Promise based HTTP client for the browser and node.js</p>
@@ -39,6 +39,7 @@
[![gitter chat](https://img.shields.io/gitter/room/mzabriskie/axios.svg?style=flat-square)](https://gitter.im/mzabriskie/axios)
[![code helpers](https://www.codetriage.com/axios/axios/badges/users.svg)](https://www.codetriage.com/axios/axios)
[![Known Vulnerabilities](https://snyk.io/test/npm/axios/badge.svg)](https://snyk.io/test/npm/axios)
[![Contributors](https://img.shields.io/github/contributors/axios/axios.svg?style=flat-square)](CONTRIBUTORS.md)
@@ -80,12 +81,13 @@
- [Files Posting](#files-posting)
- [HTML Form Posting](#-html-form-posting-browser)
- [🆕 Progress capturing](#-progress-capturing)
- [🆕 Rate limiting](#-progress-capturing)
- [🆕 Rate limiting](#-rate-limiting)
- [🆕 AxiosHeaders](#-axiosheaders)
- [🔥 Fetch adapter](#-fetch-adapter)
- [🔥 Custom fetch](#-custom-fetch)
- [🔥 Using with Tauri](#-using-with-tauri)
- [🔥 Using with SvelteKit](#-using-with-sveltekit-)
- [🔥 HTTP2](#-http2)
- [Semver](#semver)
- [Promises](#promises)
- [TypeScript](#typescript)
@@ -95,21 +97,22 @@
## Features
- Make [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) from the browser
- Make [http](https://nodejs.org/api/http.html) requests from node.js
- Supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API
- Intercept request and response
- Transform request and response data
- Cancel requests
- Automatic transforms for [JSON](https://www.json.org/json-en.html) data
- 🆕 Automatic data object serialization to `multipart/form-data` and `x-www-form-urlencoded` body encodings
- Client side support for protecting against [XSRF](https://en.wikipedia.org/wiki/Cross-site_request_forgery)
- **Browser Requests:** Make [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) directly from the browser.
- **Node.js Requests:** Make [http](https://nodejs.org/api/http.html) requests from Node.js environments.
- **Promise-based:** Fully supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API for easier asynchronous code.
- **Interceptors:** Intercept requests and responses to add custom logic or transform data.
- **Data Transformation:** Transform request and response data automatically.
- **Request Cancellation:** Cancel requests using built-in mechanisms.
- **Automatic JSON Handling:** Automatically serializes and parses [JSON](https://www.json.org/json-en.html) data.
- **Form Serialization:** 🆕 Automatically serializes data objects to `multipart/form-data` or `x-www-form-urlencoded` formats.
- **XSRF Protection:** Client-side support to protect against [Cross-Site Request Forgery](https://en.wikipedia.org/wiki/Cross-site_request_forgery).
## Browser Support
![Chrome](https://raw.githubusercontent.com/alrra/browser-logos/main/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.githubusercontent.com/alrra/browser-logos/main/src/firefox/firefox_48x48.png) | ![Safari](https://raw.githubusercontent.com/alrra/browser-logos/main/src/safari/safari_48x48.png) | ![Opera](https://raw.githubusercontent.com/alrra/browser-logos/main/src/opera/opera_48x48.png) | ![Edge](https://raw.githubusercontent.com/alrra/browser-logos/main/src/edge/edge_48x48.png) |
--- | --- | --- | --- | --- |
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
| Chrome | Firefox | Safari | Opera | Edge |
|:------:|:-------:|:------:|:-----:|:----:|
| ![Chrome browser logo](https://raw.githubusercontent.com/alrra/browser-logos/main/src/chrome/chrome_48x48.png) | ![Firefox browser logo](https://raw.githubusercontent.com/alrra/browser-logos/main/src/firefox/firefox_48x48.png) | ![Safari browser logo](https://raw.githubusercontent.com/alrra/browser-logos/main/src/safari/safari_48x48.png) | ![Opera browser logo](https://raw.githubusercontent.com/alrra/browser-logos/main/src/opera/opera_48x48.png) | ![Edge browser logo](https://raw.githubusercontent.com/alrra/browser-logos/main/src/edge/edge_48x48.png) |
| Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
[![Browser Matrix](https://saucelabs.com/open_sauce/build_matrix/axios.svg)](https://saucelabs.com/u/axios)
@@ -199,7 +202,7 @@ Using unpkg CDN:
## Example
> **Note**: CommonJS usage
> **Note**: CommonJS usage
> In order to gain the TypeScript typings (for intellisense / autocomplete) while using CommonJS imports with `require()`, use the following approach:
```js
@@ -421,18 +424,18 @@ These are the available config options for making requests. Only the `url` is re
params: {
ID: 12345
},
// `paramsSerializer` is an optional config that allows you to customize serializing `params`.
// `paramsSerializer` is an optional config that allows you to customize serializing `params`.
paramsSerializer: {
// Custom encoder function which sends key/value pairs in an iterative fashion.
encode?: (param: string): string => { /* Do custom operations here and return transformed string */ },
encode?: (param: string): string => { /* Do custom operations here and return transformed string */ },
// Custom serializer function for the entire parameter. Allows user to mimic pre 1.x behaviour.
serialize?: (params: Record<string, any>, options?: ParamsSerializerOptions ),
// Configuration for formatting array indexes in the params.
indexes: false // Three available options: (1) indexes: null (leads to no brackets), (2) (default) indexes: false (leads to empty brackets), (3) indexes: true (leads to brackets with indexes).
serialize?: (params: Record<string, any>, options?: ParamsSerializerOptions ),
// Configuration for formatting array indexes in the params.
indexes: false // Three available options: (1) indexes: null (leads to no brackets), (2) (default) indexes: false (leads to empty brackets), (3) indexes: true (leads to brackets with indexes).
},
// `data` is the data to be sent as the request body
@@ -494,7 +497,7 @@ These are the available config options for making requests. Only the `url` is re
// `xsrfHeaderName` is the name of the http header that carries the xsrf token value
xsrfHeaderName: 'X-XSRF-TOKEN', // default
// `undefined` (default) - set XSRF header only for the same origin requests
withXSRFToken: boolean | undefined | ((config: InternalAxiosRequestConfig) => boolean | undefined),
@@ -544,7 +547,7 @@ These are the available config options for making requests. Only the `url` is re
// Only either `socketPath` or `proxy` can be specified.
// If both are specified, `socketPath` is used.
socketPath: null, // default
// `transport` determines the transport method that will be used to make the request.
// If defined, it will be used. Otherwise, if `maxRedirects` is 0,
// the default `http` or `https` library will be used, depending on the protocol specified in `protocol`.
@@ -837,10 +840,10 @@ The general structure of axios errors is as follows:
| -------- | ---------- |
| message | A quick summary of the error message and the status it failed with. |
| name | This defines where the error originated from. For axios, it will always be an 'AxiosError'. |
| stack | Provides the stack trace of the error. |
| stack | Provides the stack trace of the error. |
| config | An axios config object with specific instance configurations defined by the user from when the request was made |
| code | Represents an axios identified error. The table below lists out specific definitions for internal axios error. |
| status | HTTP response status code. See [here](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) for common HTTP response status code meanings.
| status | HTTP response status code. See [here](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) for common HTTP response status code meanings.
Below is a list of potential axios identified error:
@@ -1285,7 +1288,7 @@ Sending `Blobs`/`Files` as JSON (`base64`) is not currently supported.
Axios supports both browser and node environments to capture request upload/download progress.
The frequency of progress events is forced to be limited to `3` times per second.
```js
```js
await axios.post(url, data, {
onUploadProgress: function (axiosProgressEvent) {
/*{
@@ -1304,13 +1307,13 @@ await axios.post(url, data, {
loaded: number;
total?: number;
progress?: number;
bytes: number;
bytes: number;
estimated?: number;
rate?: number; // download speed in bytes
download: true; // download sign
}*/
}
});
});
```
You can also track stream upload/download progress in node.js:
@@ -1320,7 +1323,7 @@ const {data} = await axios.post(SERVER_URL, readableStream, {
onUploadProgress: ({progress}) => {
console.log((progress * 100).toFixed(2));
},
headers: {
'Content-Length': contentLength
},
@@ -1346,7 +1349,7 @@ const {data} = await axios.post(LOCAL_SERVER_URL, myBuffer, {
onUploadProgress: ({progress, rate}) => {
console.log(`Upload [${(progress*100).toFixed(2)}%]: ${(rate / 1024).toFixed(2)}KB/s`)
},
maxRate: [100 * 1024], // 100KB/s limit
});
```
@@ -1384,13 +1387,13 @@ The headers object is always initialized inside interceptors and transformers:
"My-set-header1": "my-set-value1",
"My-set-header2": "my-set-value2"
});
request.headers.set('User-Agent', false); // disable subsequent setting the header by Axios
request.headers.setContentType('text/plain');
request.headers['My-set-header2'] = 'newValue' // direct access is deprecated
return request;
}
);
@@ -1416,7 +1419,7 @@ for(const [header, value] of headers) {
### new AxiosHeaders(headers?)
Constructs a new `AxiosHeaders` instance.
Constructs a new `AxiosHeaders` instance.
```
constructor(headers?: RawAxiosHeaders | AxiosHeaders | string);
@@ -1471,7 +1474,7 @@ const headers = new AxiosHeaders({
'Content-Type': 'multipart/form-data; boundary=Asrf456BGe4h'
});
console.log(headers.get('Content-Type'));
console.log(headers.get('Content-Type'));
// multipart/form-data; boundary=Asrf456BGe4h
console.log(headers.get('Content-Type', true)); // parse key-value pairs from a string separated with \s,;= delimiters:
@@ -1515,7 +1518,7 @@ Returns `true` if at least one header has been removed.
clear(matcher?: AxiosHeaderMatcher): boolean;
```
Removes all headers.
Removes all headers.
Unlike the `delete` method matcher, this optional matcher will be used to match against the header name rather than the value.
```ts
@@ -1570,7 +1573,7 @@ Returns a new `AxiosHeaders` instance.
toJSON(asStrings?: boolean): RawAxiosHeaders;
````
Resolve all internal headers values into a new null prototype object.
Resolve all internal headers values into a new null prototype object.
Set `asStrings` to true to resolve arrays as a string containing all elements, separated by commas.
### AxiosHeaders.from(thing?)
@@ -1626,7 +1629,7 @@ const fetchAxios = axios.create({
const {data} = fetchAxios.get(url);
```
The adapter supports the same functionality as `xhr` adapter, **including upload and download progress capturing**.
The adapter supports the same functionality as `xhr` adapter, **including upload and download progress capturing**.
Also, it supports additional response types such as `stream` and `formdata` (if supported by the environment).
### 🔥 Custom fetch
@@ -1680,7 +1683,7 @@ const instance = axios.create({
const {data} = await instance.get("https://google.com");
```
#### 🔥 Using with SvelteKit
#### 🔥 Using with SvelteKit
[SvelteKit](https://svelte.dev/docs/kit/web-standards#Fetch-APIs) framework has a custom implementation of the fetch function for server rendering (so called `load` functions), and also uses relative paths,
which makes it incompatible with the standard URL API. So, Axios must be configured to use the custom fetch API:
@@ -1700,6 +1703,34 @@ export async function load({ fetch }) {
}
```
## 🔥 HTTP2
In version `1.13.0`, experimental `HTTP2` support was added to the `http` adapter.
The `httpVersion` option is now available to select the protocol version used.
Additional native options for the internal `session.request()` call can be passed via the `http2Options` config.
This config also includes the custom `sessionTimeout` parameter, which defaults to `1000ms`.
```js
const form = new FormData();
form.append('foo', '123');
const {data, headers, status} = await axios.post('https://httpbin.org/post', form, {
httpVersion: 2,
http2Options: {
// rejectUnauthorized: false,
// sessionTimeout: 1000
},
onUploadProgress(e) {
console.log('upload progress', e);
},
onDownloadProgress(e) {
console.log('download progress', e);
},
responseType: 'arraybuffer'
});
```
## Semver
Since Axios has reached a `v.1.0.0` we will fully embrace semver as per the spec [here](https://semver.org/)
@@ -1753,4 +1784,4 @@ axios is heavily inspired by the [$http service](https://docs.angularjs.org/api/
## License
[MIT](LICENSE)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

171
node_modules/axios/dist/axios.js generated vendored Executable file → Normal file
View File

@@ -1,4 +1,4 @@
/*! Axios v1.12.2 Copyright (c) 2025 Matt Zabriskie and contributors */
/*! Axios v1.13.1 Copyright (c) 2025 Matt Zabriskie and contributors */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
@@ -668,6 +668,13 @@
};
}
/**
* Create a bound version of a function with a specified `this` context
*
* @param {Function} fn - The function to bind
* @param {*} thisArg - The value to be passed as the `this` parameter
* @returns {Function} A new function that will call the original function with the specified `this` context
*/
function bind(fn, thisArg) {
return function wrap() {
return fn.apply(thisArg, arguments);
@@ -1831,7 +1838,7 @@
*
* @param {Number} id The ID that was returned by `use`
*
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
* @returns {void}
*/
}, {
key: "eject",
@@ -2702,20 +2709,33 @@
var cookies = platform.hasStandardBrowserEnv ?
// Standard browser envs support document.cookie
{
write: function write(name, value, expires, path, domain, secure) {
var cookie = [name + '=' + encodeURIComponent(value)];
utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
utils$1.isString(path) && cookie.push('path=' + path);
utils$1.isString(domain) && cookie.push('domain=' + domain);
secure === true && cookie.push('secure');
write: function write(name, value, expires, path, domain, secure, sameSite) {
if (typeof document === 'undefined') return;
var cookie = ["".concat(name, "=").concat(encodeURIComponent(value))];
if (utils$1.isNumber(expires)) {
cookie.push("expires=".concat(new Date(expires).toUTCString()));
}
if (utils$1.isString(path)) {
cookie.push("path=".concat(path));
}
if (utils$1.isString(domain)) {
cookie.push("domain=".concat(domain));
}
if (secure === true) {
cookie.push('secure');
}
if (utils$1.isString(sameSite)) {
cookie.push("SameSite=".concat(sameSite));
}
document.cookie = cookie.join('; ');
},
read: function read(name) {
var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
return match ? decodeURIComponent(match[3]) : null;
if (typeof document === 'undefined') return null;
var match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
return match ? decodeURIComponent(match[1]) : null;
},
remove: function remove(name) {
this.write(name, '', Date.now() - 86400000);
this.write(name, '', Date.now() - 86400000, '/');
}
} :
// Non-standard browser env (web workers, react-native) lack needed support.
@@ -3639,7 +3659,7 @@
};
var seedCache = new Map();
var getFetch = function getFetch(config) {
var env = config ? config.env : {};
var env = config && config.env || {};
var fetch = env.fetch,
Request = env.Request,
Response = env.Response;
@@ -3659,6 +3679,15 @@
};
getFetch();
/**
* Known adapters mapping.
* Provides environment-specific adapters for Axios:
* - `http` for Node.js
* - `xhr` for browsers
* - `fetch` for fetch API-based requests
*
* @type {Object<string, Function|Object>}
*/
var knownAdapters = {
http: httpAdapter,
xhr: xhrAdapter,
@@ -3666,6 +3695,8 @@
get: getFetch
}
};
// Assign adapter names for easier debugging and identification
utils$1.forEach(knownAdapters, function (fn, value) {
if (fn) {
try {
@@ -3680,47 +3711,85 @@
});
}
});
/**
* Render a rejection reason string for unknown or unsupported adapters
*
* @param {string} reason
* @returns {string}
*/
var renderReason = function renderReason(reason) {
return "- ".concat(reason);
};
/**
* Check if the adapter is resolved (function, null, or false)
*
* @param {Function|null|false} adapter
* @returns {boolean}
*/
var isResolvedHandle = function isResolvedHandle(adapter) {
return utils$1.isFunction(adapter) || adapter === null || adapter === false;
};
/**
* Get the first suitable adapter from the provided list.
* Tries each adapter in order until a supported one is found.
* Throws an AxiosError if no adapter is suitable.
*
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
* @param {Object} config - Axios request configuration
* @throws {AxiosError} If no suitable adapter is available
* @returns {Function} The resolved adapter function
*/
function getAdapter(adapters, config) {
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
var _adapters = adapters,
length = _adapters.length;
var nameOrAdapter;
var adapter;
var rejectedReasons = {};
for (var i = 0; i < length; i++) {
nameOrAdapter = adapters[i];
var id = void 0;
adapter = nameOrAdapter;
if (!isResolvedHandle(nameOrAdapter)) {
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
if (adapter === undefined) {
throw new AxiosError("Unknown adapter '".concat(id, "'"));
}
}
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
break;
}
rejectedReasons[id || '#' + i] = adapter;
}
if (!adapter) {
var reasons = Object.entries(rejectedReasons).map(function (_ref) {
var _ref2 = _slicedToArray(_ref, 2),
id = _ref2[0],
state = _ref2[1];
return "adapter ".concat(id, " ") + (state === false ? 'is not supported by the environment' : 'is not available in the build');
});
var s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
throw new AxiosError("There is no suitable adapter to dispatch the request " + s, 'ERR_NOT_SUPPORT');
}
return adapter;
}
/**
* Exports Axios adapters and utility to resolve an adapter
*/
var adapters = {
getAdapter: function getAdapter(adapters, config) {
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
var _adapters = adapters,
length = _adapters.length;
var nameOrAdapter;
var adapter;
var rejectedReasons = {};
for (var i = 0; i < length; i++) {
nameOrAdapter = adapters[i];
var id = void 0;
adapter = nameOrAdapter;
if (!isResolvedHandle(nameOrAdapter)) {
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
if (adapter === undefined) {
throw new AxiosError("Unknown adapter '".concat(id, "'"));
}
}
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
break;
}
rejectedReasons[id || '#' + i] = adapter;
}
if (!adapter) {
var reasons = Object.entries(rejectedReasons).map(function (_ref) {
var _ref2 = _slicedToArray(_ref, 2),
id = _ref2[0],
state = _ref2[1];
return "adapter ".concat(id, " ") + (state === false ? 'is not supported by the environment' : 'is not available in the build');
});
var s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
throw new AxiosError("There is no suitable adapter to dispatch the request " + s, 'ERR_NOT_SUPPORT');
}
return adapter;
},
/**
* Resolve an adapter from a list of adapter names or functions.
* @type {Function}
*/
getAdapter: getAdapter,
/**
* Exposes all known adapters
* @type {Object<string, Function|Object>}
*/
adapters: knownAdapters
};
@@ -3778,7 +3847,7 @@
});
}
var VERSION = "1.12.2";
var VERSION = "1.13.1";
var validators$1 = {};
@@ -4314,7 +4383,13 @@
InsufficientStorage: 507,
LoopDetected: 508,
NotExtended: 510,
NetworkAuthenticationRequired: 511
NetworkAuthenticationRequired: 511,
WebServerIsDown: 521,
ConnectionTimedOut: 522,
OriginIsUnreachable: 523,
TimeoutOccurred: 524,
SslHandshakeFailed: 525,
InvalidSslCertificate: 526
};
Object.entries(HttpStatusCode).forEach(function (_ref) {
var _ref2 = _slicedToArray(_ref, 2),

2
node_modules/axios/dist/axios.js.map generated vendored Executable file → Normal file

File diff suppressed because one or more lines are too long

4
node_modules/axios/dist/axios.min.js generated vendored Executable file → Normal file

File diff suppressed because one or more lines are too long

2
node_modules/axios/dist/axios.min.js.map generated vendored Executable file → Normal file

File diff suppressed because one or more lines are too long

185
node_modules/axios/dist/browser/axios.cjs generated vendored Executable file → Normal file
View File

@@ -1,6 +1,13 @@
/*! Axios v1.12.2 Copyright (c) 2025 Matt Zabriskie and contributors */
/*! Axios v1.13.1 Copyright (c) 2025 Matt Zabriskie and contributors */
'use strict';
/**
* Create a bound version of a function with a specified `this` context
*
* @param {Function} fn - The function to bind
* @param {*} thisArg - The value to be passed as the `this` parameter
* @returns {Function} A new function that will call the original function with the specified `this` context
*/
function bind(fn, thisArg) {
return function wrap() {
return fn.apply(thisArg, arguments);
@@ -1253,7 +1260,7 @@ class InterceptorManager {
*
* @param {Number} id The ID that was returned by `use`
*
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
* @returns {void}
*/
eject(id) {
if (this.handlers[id]) {
@@ -2219,27 +2226,38 @@ var cookies = platform.hasStandardBrowserEnv ?
// Standard browser envs support document.cookie
{
write(name, value, expires, path, domain, secure) {
const cookie = [name + '=' + encodeURIComponent(value)];
write(name, value, expires, path, domain, secure, sameSite) {
if (typeof document === 'undefined') return;
utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
const cookie = [`${name}=${encodeURIComponent(value)}`];
utils$1.isString(path) && cookie.push('path=' + path);
utils$1.isString(domain) && cookie.push('domain=' + domain);
secure === true && cookie.push('secure');
if (utils$1.isNumber(expires)) {
cookie.push(`expires=${new Date(expires).toUTCString()}`);
}
if (utils$1.isString(path)) {
cookie.push(`path=${path}`);
}
if (utils$1.isString(domain)) {
cookie.push(`domain=${domain}`);
}
if (secure === true) {
cookie.push('secure');
}
if (utils$1.isString(sameSite)) {
cookie.push(`SameSite=${sameSite}`);
}
document.cookie = cookie.join('; ');
},
read(name) {
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
return (match ? decodeURIComponent(match[3]) : null);
if (typeof document === 'undefined') return null;
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
return match ? decodeURIComponent(match[1]) : null;
},
remove(name) {
this.write(name, '', Date.now() - 86400000);
this.write(name, '', Date.now() - 86400000, '/');
}
}
@@ -2328,11 +2346,11 @@ function mergeConfig(config1, config2) {
}
// eslint-disable-next-line consistent-return
function mergeDeepProperties(a, b, prop , caseless) {
function mergeDeepProperties(a, b, prop, caseless) {
if (!utils$1.isUndefined(b)) {
return getMergedValue(a, b, prop , caseless);
return getMergedValue(a, b, prop, caseless);
} else if (!utils$1.isUndefined(a)) {
return getMergedValue(undefined, a, prop , caseless);
return getMergedValue(undefined, a, prop, caseless);
}
}
@@ -2390,7 +2408,7 @@ function mergeConfig(config1, config2) {
socketPath: defaultToConfig2,
responseEncoding: defaultToConfig2,
validateStatus: mergeDirectKeys,
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
};
utils$1.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
@@ -3030,7 +3048,7 @@ const factory = (env) => {
const seedCache = new Map();
const getFetch = (config) => {
let env = config ? config.env : {};
let env = (config && config.env) || {};
const {fetch, Request, Response} = env;
const seeds = [
Request, Response, fetch
@@ -3053,6 +3071,15 @@ const getFetch = (config) => {
getFetch();
/**
* Known adapters mapping.
* Provides environment-specific adapters for Axios:
* - `http` for Node.js
* - `xhr` for browsers
* - `fetch` for fetch API-based requests
*
* @type {Object<string, Function|Object>}
*/
const knownAdapters = {
http: httpAdapter,
xhr: xhrAdapter,
@@ -3061,71 +3088,107 @@ const knownAdapters = {
}
};
// Assign adapter names for easier debugging and identification
utils$1.forEach(knownAdapters, (fn, value) => {
if (fn) {
try {
Object.defineProperty(fn, 'name', {value});
Object.defineProperty(fn, 'name', { value });
} catch (e) {
// eslint-disable-next-line no-empty
}
Object.defineProperty(fn, 'adapterName', {value});
Object.defineProperty(fn, 'adapterName', { value });
}
});
/**
* Render a rejection reason string for unknown or unsupported adapters
*
* @param {string} reason
* @returns {string}
*/
const renderReason = (reason) => `- ${reason}`;
/**
* Check if the adapter is resolved (function, null, or false)
*
* @param {Function|null|false} adapter
* @returns {boolean}
*/
const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
var adapters = {
getAdapter: (adapters, config) => {
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
/**
* Get the first suitable adapter from the provided list.
* Tries each adapter in order until a supported one is found.
* Throws an AxiosError if no adapter is suitable.
*
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
* @param {Object} config - Axios request configuration
* @throws {AxiosError} If no suitable adapter is available
* @returns {Function} The resolved adapter function
*/
function getAdapter(adapters, config) {
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
const {length} = adapters;
let nameOrAdapter;
let adapter;
const { length } = adapters;
let nameOrAdapter;
let adapter;
const rejectedReasons = {};
const rejectedReasons = {};
for (let i = 0; i < length; i++) {
nameOrAdapter = adapters[i];
let id;
for (let i = 0; i < length; i++) {
nameOrAdapter = adapters[i];
let id;
adapter = nameOrAdapter;
adapter = nameOrAdapter;
if (!isResolvedHandle(nameOrAdapter)) {
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
if (!isResolvedHandle(nameOrAdapter)) {
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
if (adapter === undefined) {
throw new AxiosError(`Unknown adapter '${id}'`);
}
if (adapter === undefined) {
throw new AxiosError(`Unknown adapter '${id}'`);
}
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
break;
}
rejectedReasons[id || '#' + i] = adapter;
}
if (!adapter) {
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
break;
}
const reasons = Object.entries(rejectedReasons)
.map(([id, state]) => `adapter ${id} ` +
(state === false ? 'is not supported by the environment' : 'is not available in the build')
);
rejectedReasons[id || '#' + i] = adapter;
}
let s = length ?
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
'as no adapter specified';
throw new AxiosError(
`There is no suitable adapter to dispatch the request ` + s,
'ERR_NOT_SUPPORT'
if (!adapter) {
const reasons = Object.entries(rejectedReasons)
.map(([id, state]) => `adapter ${id} ` +
(state === false ? 'is not supported by the environment' : 'is not available in the build')
);
}
return adapter;
},
let s = length ?
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
'as no adapter specified';
throw new AxiosError(
`There is no suitable adapter to dispatch the request ` + s,
'ERR_NOT_SUPPORT'
);
}
return adapter;
}
/**
* Exports Axios adapters and utility to resolve an adapter
*/
var adapters = {
/**
* Resolve an adapter from a list of adapter names or functions.
* @type {Function}
*/
getAdapter,
/**
* Exposes all known adapters
* @type {Object<string, Function|Object>}
*/
adapters: knownAdapters
};
@@ -3202,7 +3265,7 @@ function dispatchRequest(config) {
});
}
const VERSION = "1.12.2";
const VERSION = "1.13.1";
const validators$1 = {};
@@ -3761,6 +3824,12 @@ const HttpStatusCode = {
LoopDetected: 508,
NotExtended: 510,
NetworkAuthenticationRequired: 511,
WebServerIsDown: 521,
ConnectionTimedOut: 522,
OriginIsUnreachable: 523,
TimeoutOccurred: 524,
SslHandshakeFailed: 525,
InvalidSslCertificate: 526,
};
Object.entries(HttpStatusCode).forEach(([key, value]) => {

2
node_modules/axios/dist/browser/axios.cjs.map generated vendored Executable file → Normal file

File diff suppressed because one or more lines are too long

185
node_modules/axios/dist/esm/axios.js generated vendored Executable file → Normal file
View File

@@ -1,4 +1,11 @@
/*! Axios v1.12.2 Copyright (c) 2025 Matt Zabriskie and contributors */
/*! Axios v1.13.1 Copyright (c) 2025 Matt Zabriskie and contributors */
/**
* Create a bound version of a function with a specified `this` context
*
* @param {Function} fn - The function to bind
* @param {*} thisArg - The value to be passed as the `this` parameter
* @returns {Function} A new function that will call the original function with the specified `this` context
*/
function bind(fn, thisArg) {
return function wrap() {
return fn.apply(thisArg, arguments);
@@ -1251,7 +1258,7 @@ class InterceptorManager {
*
* @param {Number} id The ID that was returned by `use`
*
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
* @returns {void}
*/
eject(id) {
if (this.handlers[id]) {
@@ -2217,27 +2224,38 @@ const cookies = platform.hasStandardBrowserEnv ?
// Standard browser envs support document.cookie
{
write(name, value, expires, path, domain, secure) {
const cookie = [name + '=' + encodeURIComponent(value)];
write(name, value, expires, path, domain, secure, sameSite) {
if (typeof document === 'undefined') return;
utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
const cookie = [`${name}=${encodeURIComponent(value)}`];
utils$1.isString(path) && cookie.push('path=' + path);
utils$1.isString(domain) && cookie.push('domain=' + domain);
secure === true && cookie.push('secure');
if (utils$1.isNumber(expires)) {
cookie.push(`expires=${new Date(expires).toUTCString()}`);
}
if (utils$1.isString(path)) {
cookie.push(`path=${path}`);
}
if (utils$1.isString(domain)) {
cookie.push(`domain=${domain}`);
}
if (secure === true) {
cookie.push('secure');
}
if (utils$1.isString(sameSite)) {
cookie.push(`SameSite=${sameSite}`);
}
document.cookie = cookie.join('; ');
},
read(name) {
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
return (match ? decodeURIComponent(match[3]) : null);
if (typeof document === 'undefined') return null;
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
return match ? decodeURIComponent(match[1]) : null;
},
remove(name) {
this.write(name, '', Date.now() - 86400000);
this.write(name, '', Date.now() - 86400000, '/');
}
}
@@ -2326,11 +2344,11 @@ function mergeConfig$1(config1, config2) {
}
// eslint-disable-next-line consistent-return
function mergeDeepProperties(a, b, prop , caseless) {
function mergeDeepProperties(a, b, prop, caseless) {
if (!utils$1.isUndefined(b)) {
return getMergedValue(a, b, prop , caseless);
return getMergedValue(a, b, prop, caseless);
} else if (!utils$1.isUndefined(a)) {
return getMergedValue(undefined, a, prop , caseless);
return getMergedValue(undefined, a, prop, caseless);
}
}
@@ -2388,7 +2406,7 @@ function mergeConfig$1(config1, config2) {
socketPath: defaultToConfig2,
responseEncoding: defaultToConfig2,
validateStatus: mergeDirectKeys,
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
};
utils$1.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
@@ -3028,7 +3046,7 @@ const factory = (env) => {
const seedCache = new Map();
const getFetch = (config) => {
let env = config ? config.env : {};
let env = (config && config.env) || {};
const {fetch, Request, Response} = env;
const seeds = [
Request, Response, fetch
@@ -3051,6 +3069,15 @@ const getFetch = (config) => {
getFetch();
/**
* Known adapters mapping.
* Provides environment-specific adapters for Axios:
* - `http` for Node.js
* - `xhr` for browsers
* - `fetch` for fetch API-based requests
*
* @type {Object<string, Function|Object>}
*/
const knownAdapters = {
http: httpAdapter,
xhr: xhrAdapter,
@@ -3059,71 +3086,107 @@ const knownAdapters = {
}
};
// Assign adapter names for easier debugging and identification
utils$1.forEach(knownAdapters, (fn, value) => {
if (fn) {
try {
Object.defineProperty(fn, 'name', {value});
Object.defineProperty(fn, 'name', { value });
} catch (e) {
// eslint-disable-next-line no-empty
}
Object.defineProperty(fn, 'adapterName', {value});
Object.defineProperty(fn, 'adapterName', { value });
}
});
/**
* Render a rejection reason string for unknown or unsupported adapters
*
* @param {string} reason
* @returns {string}
*/
const renderReason = (reason) => `- ${reason}`;
/**
* Check if the adapter is resolved (function, null, or false)
*
* @param {Function|null|false} adapter
* @returns {boolean}
*/
const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
const adapters = {
getAdapter: (adapters, config) => {
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
/**
* Get the first suitable adapter from the provided list.
* Tries each adapter in order until a supported one is found.
* Throws an AxiosError if no adapter is suitable.
*
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
* @param {Object} config - Axios request configuration
* @throws {AxiosError} If no suitable adapter is available
* @returns {Function} The resolved adapter function
*/
function getAdapter$1(adapters, config) {
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
const {length} = adapters;
let nameOrAdapter;
let adapter;
const { length } = adapters;
let nameOrAdapter;
let adapter;
const rejectedReasons = {};
const rejectedReasons = {};
for (let i = 0; i < length; i++) {
nameOrAdapter = adapters[i];
let id;
for (let i = 0; i < length; i++) {
nameOrAdapter = adapters[i];
let id;
adapter = nameOrAdapter;
adapter = nameOrAdapter;
if (!isResolvedHandle(nameOrAdapter)) {
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
if (!isResolvedHandle(nameOrAdapter)) {
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
if (adapter === undefined) {
throw new AxiosError$1(`Unknown adapter '${id}'`);
}
if (adapter === undefined) {
throw new AxiosError$1(`Unknown adapter '${id}'`);
}
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
break;
}
rejectedReasons[id || '#' + i] = adapter;
}
if (!adapter) {
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
break;
}
const reasons = Object.entries(rejectedReasons)
.map(([id, state]) => `adapter ${id} ` +
(state === false ? 'is not supported by the environment' : 'is not available in the build')
);
rejectedReasons[id || '#' + i] = adapter;
}
let s = length ?
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
'as no adapter specified';
throw new AxiosError$1(
`There is no suitable adapter to dispatch the request ` + s,
'ERR_NOT_SUPPORT'
if (!adapter) {
const reasons = Object.entries(rejectedReasons)
.map(([id, state]) => `adapter ${id} ` +
(state === false ? 'is not supported by the environment' : 'is not available in the build')
);
}
return adapter;
},
let s = length ?
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
'as no adapter specified';
throw new AxiosError$1(
`There is no suitable adapter to dispatch the request ` + s,
'ERR_NOT_SUPPORT'
);
}
return adapter;
}
/**
* Exports Axios adapters and utility to resolve an adapter
*/
const adapters = {
/**
* Resolve an adapter from a list of adapter names or functions.
* @type {Function}
*/
getAdapter: getAdapter$1,
/**
* Exposes all known adapters
* @type {Object<string, Function|Object>}
*/
adapters: knownAdapters
};
@@ -3200,7 +3263,7 @@ function dispatchRequest(config) {
});
}
const VERSION$1 = "1.12.2";
const VERSION$1 = "1.13.1";
const validators$1 = {};
@@ -3759,6 +3822,12 @@ const HttpStatusCode$1 = {
LoopDetected: 508,
NotExtended: 510,
NetworkAuthenticationRequired: 511,
WebServerIsDown: 521,
ConnectionTimedOut: 522,
OriginIsUnreachable: 523,
TimeoutOccurred: 524,
SslHandshakeFailed: 525,
InvalidSslCertificate: 526,
};
Object.entries(HttpStatusCode$1).forEach(([key, value]) => {

2
node_modules/axios/dist/esm/axios.js.map generated vendored Executable file → Normal file

File diff suppressed because one or more lines are too long

4
node_modules/axios/dist/esm/axios.min.js generated vendored Executable file → Normal file

File diff suppressed because one or more lines are too long

2
node_modules/axios/dist/esm/axios.min.js.map generated vendored Executable file → Normal file

File diff suppressed because one or more lines are too long

451
node_modules/axios/dist/node/axios.cjs generated vendored Executable file → Normal file
View File

@@ -1,9 +1,10 @@
/*! Axios v1.12.2 Copyright (c) 2025 Matt Zabriskie and contributors */
/*! Axios v1.13.1 Copyright (c) 2025 Matt Zabriskie and contributors */
'use strict';
const FormData$1 = require('form-data');
const crypto = require('crypto');
const url = require('url');
const http2 = require('http2');
const proxyFromEnv = require('proxy-from-env');
const http = require('http');
const https = require('https');
@@ -26,6 +27,13 @@ const followRedirects__default = /*#__PURE__*/_interopDefaultLegacy(followRedire
const zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib);
const stream__default = /*#__PURE__*/_interopDefaultLegacy(stream);
/**
* Create a bound version of a function with a specified `this` context
*
* @param {Function} fn - The function to bind
* @param {*} thisArg - The value to be passed as the `this` parameter
* @returns {Function} A new function that will call the original function with the specified `this` context
*/
function bind(fn, thisArg) {
return function wrap() {
return fn.apply(thisArg, arguments);
@@ -1275,7 +1283,7 @@ class InterceptorManager {
*
* @param {Number} id The ID that was returned by `use`
*
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
* @returns {void}
*/
eject(id) {
if (this.handlers[id]) {
@@ -2150,7 +2158,7 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
return requestedURL;
}
const VERSION = "1.12.2";
const VERSION = "1.13.1";
function parseProtocol(url) {
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
@@ -2727,6 +2735,13 @@ const brotliOptions = {
finishFlush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH
};
const {
HTTP2_HEADER_SCHEME,
HTTP2_HEADER_METHOD,
HTTP2_HEADER_PATH,
HTTP2_HEADER_STATUS
} = http2.constants;
const isBrotliSupported = utils$1.isFunction(zlib__default["default"].createBrotliDecompress);
const {http: httpFollow, https: httpsFollow} = followRedirects__default["default"];
@@ -2746,6 +2761,100 @@ const flushOnFinish = (stream, [throttled, flush]) => {
return throttled;
};
class Http2Sessions {
constructor() {
this.sessions = Object.create(null);
}
getSession(authority, options) {
options = Object.assign({
sessionTimeout: 1000
}, options);
let authoritySessions;
if ((authoritySessions = this.sessions[authority])) {
let len = authoritySessions.length;
for (let i = 0; i < len; i++) {
const [sessionHandle, sessionOptions] = authoritySessions[i];
if (!sessionHandle.destroyed && !sessionHandle.closed && util__default["default"].isDeepStrictEqual(sessionOptions, options)) {
return sessionHandle;
}
}
}
const session = http2.connect(authority, options);
let removed;
const removeSession = () => {
if (removed) {
return;
}
removed = true;
let entries = authoritySessions, len = entries.length, i = len;
while (i--) {
if (entries[i][0] === session) {
entries.splice(i, 1);
if (len === 1) {
delete this.sessions[authority];
return;
}
}
}
};
const originalRequestFn = session.request;
const {sessionTimeout} = options;
if(sessionTimeout != null) {
let timer;
let streamsCount = 0;
session.request = function () {
const stream = originalRequestFn.apply(this, arguments);
streamsCount++;
if (timer) {
clearTimeout(timer);
timer = null;
}
stream.once('close', () => {
if (!--streamsCount) {
timer = setTimeout(() => {
timer = null;
removeSession();
}, sessionTimeout);
}
});
return stream;
};
}
session.once('close', removeSession);
let entries = this.sessions[authority], entry = [
session,
options
];
entries ? this.sessions[authority].push(entry) : authoritySessions = this.sessions[authority] = [entry];
return session;
}
}
const http2Sessions = new Http2Sessions();
/**
* If the proxy or config beforeRedirects functions are defined, call them with the options
@@ -2858,16 +2967,68 @@ const resolveFamily = ({address, family}) => {
const buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : {address, family});
const http2Transport = {
request(options, cb) {
const authority = options.protocol + '//' + options.hostname + ':' + (options.port || 80);
const {http2Options, headers} = options;
const session = http2Sessions.getSession(authority, http2Options);
const http2Headers = {
[HTTP2_HEADER_SCHEME]: options.protocol.replace(':', ''),
[HTTP2_HEADER_METHOD]: options.method,
[HTTP2_HEADER_PATH]: options.path,
};
utils$1.forEach(headers, (header, name) => {
name.charAt(0) !== ':' && (http2Headers[name] = header);
});
const req = session.request(http2Headers);
req.once('response', (responseHeaders) => {
const response = req; //duplex
responseHeaders = Object.assign({}, responseHeaders);
const status = responseHeaders[HTTP2_HEADER_STATUS];
delete responseHeaders[HTTP2_HEADER_STATUS];
response.headers = responseHeaders;
response.statusCode = +status;
cb(response);
});
return req;
}
};
/*eslint consistent-return:0*/
const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
let {data, lookup, family} = config;
let {data, lookup, family, httpVersion = 1, http2Options} = config;
const {responseType, responseEncoding} = config;
const method = config.method.toUpperCase();
let isDone;
let rejected = false;
let req;
httpVersion = +httpVersion;
if (Number.isNaN(httpVersion)) {
throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
}
if (httpVersion !== 1 && httpVersion !== 2) {
throw TypeError(`Unsupported protocol version '${httpVersion}'`);
}
const isHttp2 = httpVersion === 2;
if (lookup) {
const _lookup = callbackify$1(lookup, (value) => utils$1.isArray(value) ? value : [value]);
// hotfix to support opt.all option which is required for node 20.x
@@ -2884,8 +3045,17 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
};
}
// temporary internal emitter until the AxiosRequest class will be implemented
const emitter = new events.EventEmitter();
const abortEmitter = new events.EventEmitter();
function abort(reason) {
try {
abortEmitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);
} catch(err) {
console.warn('emit error', err);
}
}
abortEmitter.once('abort', reject);
const onFinished = () => {
if (config.cancelToken) {
@@ -2896,23 +3066,9 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
config.signal.removeEventListener('abort', abort);
}
emitter.removeAllListeners();
abortEmitter.removeAllListeners();
};
onDone((value, isRejected) => {
isDone = true;
if (isRejected) {
rejected = true;
onFinished();
}
});
function abort(reason) {
emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);
}
emitter.once('abort', reject);
if (config.cancelToken || config.signal) {
config.cancelToken && config.cancelToken.subscribe(abort);
if (config.signal) {
@@ -2920,6 +3076,31 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
}
}
onDone((response, isRejected) => {
isDone = true;
if (isRejected) {
rejected = true;
onFinished();
return;
}
const {data} = response;
if (data instanceof stream__default["default"].Readable || data instanceof stream__default["default"].Duplex) {
const offListeners = stream__default["default"].finished(data, () => {
offListeners();
onFinished();
});
} else {
onFinished();
}
});
// Parse url
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined);
@@ -3124,7 +3305,8 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
protocol,
family,
beforeRedirect: dispatchBeforeRedirect,
beforeRedirects: {}
beforeRedirects: {},
http2Options
};
// cacheable-lookup integration hotfix
@@ -3141,18 +3323,23 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
let transport;
const isHttpsRequest = isHttps.test(options.protocol);
options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
if (config.transport) {
transport = config.transport;
} else if (config.maxRedirects === 0) {
transport = isHttpsRequest ? https__default["default"] : http__default["default"];
if (isHttp2) {
transport = http2Transport;
} else {
if (config.maxRedirects) {
options.maxRedirects = config.maxRedirects;
if (config.transport) {
transport = config.transport;
} else if (config.maxRedirects === 0) {
transport = isHttpsRequest ? https__default["default"] : http__default["default"];
} else {
if (config.maxRedirects) {
options.maxRedirects = config.maxRedirects;
}
if (config.beforeRedirect) {
options.beforeRedirects.config = config.beforeRedirect;
}
transport = isHttpsRequest ? httpsFollow : httpFollow;
}
if (config.beforeRedirect) {
options.beforeRedirects.config = config.beforeRedirect;
}
transport = isHttpsRequest ? httpsFollow : httpFollow;
}
if (config.maxBodyLength > -1) {
@@ -3172,7 +3359,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
const streams = [res];
const responseLength = +res.headers['content-length'];
const responseLength = utils$1.toFiniteNumber(res.headers['content-length']);
if (onDownloadProgress || maxDownloadRate) {
const transformStream = new AxiosTransformStream$1({
@@ -3235,10 +3422,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
responseStream = streams.length > 1 ? stream__default["default"].pipeline(streams, utils$1.noop) : streams[0];
const offListeners = stream__default["default"].finished(responseStream, () => {
offListeners();
onFinished();
});
const response = {
status: res.statusCode,
@@ -3264,7 +3448,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
// stream.destroy() emit aborted event before calling reject() on Node.js v16
rejected = true;
responseStream.destroy();
reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
abort(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
}
});
@@ -3306,7 +3490,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
});
}
emitter.once('abort', err => {
abortEmitter.once('abort', err => {
if (!responseStream.destroyed) {
responseStream.emit('error', err);
responseStream.destroy();
@@ -3314,9 +3498,12 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
});
});
emitter.once('abort', err => {
reject(err);
req.destroy(err);
abortEmitter.once('abort', err => {
if (req.close) {
req.close();
} else {
req.destroy(err);
}
});
// Handle errors
@@ -3338,7 +3525,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
const timeout = parseInt(config.timeout, 10);
if (Number.isNaN(timeout)) {
reject(new AxiosError(
abort(new AxiosError(
'error trying to parse `config.timeout` to int',
AxiosError.ERR_BAD_OPTION_VALUE,
config,
@@ -3360,13 +3547,12 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
if (config.timeoutErrorMessage) {
timeoutErrorMessage = config.timeoutErrorMessage;
}
reject(new AxiosError(
abort(new AxiosError(
timeoutErrorMessage,
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
config,
req
));
abort();
});
}
@@ -3393,7 +3579,8 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
data.pipe(req);
} else {
req.end(data);
data && req.write(data);
req.end();
}
});
};
@@ -3415,27 +3602,38 @@ const cookies = platform.hasStandardBrowserEnv ?
// Standard browser envs support document.cookie
{
write(name, value, expires, path, domain, secure) {
const cookie = [name + '=' + encodeURIComponent(value)];
write(name, value, expires, path, domain, secure, sameSite) {
if (typeof document === 'undefined') return;
utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
const cookie = [`${name}=${encodeURIComponent(value)}`];
utils$1.isString(path) && cookie.push('path=' + path);
utils$1.isString(domain) && cookie.push('domain=' + domain);
secure === true && cookie.push('secure');
if (utils$1.isNumber(expires)) {
cookie.push(`expires=${new Date(expires).toUTCString()}`);
}
if (utils$1.isString(path)) {
cookie.push(`path=${path}`);
}
if (utils$1.isString(domain)) {
cookie.push(`domain=${domain}`);
}
if (secure === true) {
cookie.push('secure');
}
if (utils$1.isString(sameSite)) {
cookie.push(`SameSite=${sameSite}`);
}
document.cookie = cookie.join('; ');
},
read(name) {
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
return (match ? decodeURIComponent(match[3]) : null);
if (typeof document === 'undefined') return null;
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
return match ? decodeURIComponent(match[1]) : null;
},
remove(name) {
this.write(name, '', Date.now() - 86400000);
this.write(name, '', Date.now() - 86400000, '/');
}
}
@@ -3478,11 +3676,11 @@ function mergeConfig(config1, config2) {
}
// eslint-disable-next-line consistent-return
function mergeDeepProperties(a, b, prop , caseless) {
function mergeDeepProperties(a, b, prop, caseless) {
if (!utils$1.isUndefined(b)) {
return getMergedValue(a, b, prop , caseless);
return getMergedValue(a, b, prop, caseless);
} else if (!utils$1.isUndefined(a)) {
return getMergedValue(undefined, a, prop , caseless);
return getMergedValue(undefined, a, prop, caseless);
}
}
@@ -3540,7 +3738,7 @@ function mergeConfig(config1, config2) {
socketPath: defaultToConfig2,
responseEncoding: defaultToConfig2,
validateStatus: mergeDirectKeys,
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
};
utils$1.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
@@ -4180,7 +4378,7 @@ const factory = (env) => {
const seedCache = new Map();
const getFetch = (config) => {
let env = config ? config.env : {};
let env = (config && config.env) || {};
const {fetch, Request, Response} = env;
const seeds = [
Request, Response, fetch
@@ -4203,6 +4401,15 @@ const getFetch = (config) => {
getFetch();
/**
* Known adapters mapping.
* Provides environment-specific adapters for Axios:
* - `http` for Node.js
* - `xhr` for browsers
* - `fetch` for fetch API-based requests
*
* @type {Object<string, Function|Object>}
*/
const knownAdapters = {
http: httpAdapter,
xhr: xhrAdapter,
@@ -4211,71 +4418,107 @@ const knownAdapters = {
}
};
// Assign adapter names for easier debugging and identification
utils$1.forEach(knownAdapters, (fn, value) => {
if (fn) {
try {
Object.defineProperty(fn, 'name', {value});
Object.defineProperty(fn, 'name', { value });
} catch (e) {
// eslint-disable-next-line no-empty
}
Object.defineProperty(fn, 'adapterName', {value});
Object.defineProperty(fn, 'adapterName', { value });
}
});
/**
* Render a rejection reason string for unknown or unsupported adapters
*
* @param {string} reason
* @returns {string}
*/
const renderReason = (reason) => `- ${reason}`;
/**
* Check if the adapter is resolved (function, null, or false)
*
* @param {Function|null|false} adapter
* @returns {boolean}
*/
const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
const adapters = {
getAdapter: (adapters, config) => {
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
/**
* Get the first suitable adapter from the provided list.
* Tries each adapter in order until a supported one is found.
* Throws an AxiosError if no adapter is suitable.
*
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
* @param {Object} config - Axios request configuration
* @throws {AxiosError} If no suitable adapter is available
* @returns {Function} The resolved adapter function
*/
function getAdapter(adapters, config) {
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
const {length} = adapters;
let nameOrAdapter;
let adapter;
const { length } = adapters;
let nameOrAdapter;
let adapter;
const rejectedReasons = {};
const rejectedReasons = {};
for (let i = 0; i < length; i++) {
nameOrAdapter = adapters[i];
let id;
for (let i = 0; i < length; i++) {
nameOrAdapter = adapters[i];
let id;
adapter = nameOrAdapter;
adapter = nameOrAdapter;
if (!isResolvedHandle(nameOrAdapter)) {
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
if (!isResolvedHandle(nameOrAdapter)) {
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
if (adapter === undefined) {
throw new AxiosError(`Unknown adapter '${id}'`);
}
if (adapter === undefined) {
throw new AxiosError(`Unknown adapter '${id}'`);
}
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
break;
}
rejectedReasons[id || '#' + i] = adapter;
}
if (!adapter) {
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
break;
}
const reasons = Object.entries(rejectedReasons)
.map(([id, state]) => `adapter ${id} ` +
(state === false ? 'is not supported by the environment' : 'is not available in the build')
);
rejectedReasons[id || '#' + i] = adapter;
}
let s = length ?
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
'as no adapter specified';
throw new AxiosError(
`There is no suitable adapter to dispatch the request ` + s,
'ERR_NOT_SUPPORT'
if (!adapter) {
const reasons = Object.entries(rejectedReasons)
.map(([id, state]) => `adapter ${id} ` +
(state === false ? 'is not supported by the environment' : 'is not available in the build')
);
}
return adapter;
},
let s = length ?
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
'as no adapter specified';
throw new AxiosError(
`There is no suitable adapter to dispatch the request ` + s,
'ERR_NOT_SUPPORT'
);
}
return adapter;
}
/**
* Exports Axios adapters and utility to resolve an adapter
*/
const adapters = {
/**
* Resolve an adapter from a list of adapter names or functions.
* @type {Function}
*/
getAdapter,
/**
* Exposes all known adapters
* @type {Object<string, Function|Object>}
*/
adapters: knownAdapters
};
@@ -4909,6 +5152,12 @@ const HttpStatusCode = {
LoopDetected: 508,
NotExtended: 510,
NetworkAuthenticationRequired: 511,
WebServerIsDown: 521,
ConnectionTimedOut: 522,
OriginIsUnreachable: 523,
TimeoutOccurred: 524,
SslHandshakeFailed: 525,
InvalidSslCertificate: 526,
};
Object.entries(HttpStatusCode).forEach(([key, value]) => {

2
node_modules/axios/dist/node/axios.cjs.map generated vendored Executable file → Normal file

File diff suppressed because one or more lines are too long

4
node_modules/axios/index.d.cts generated vendored
View File

@@ -436,6 +436,10 @@ declare namespace axios {
((hostname: string, options: object) => Promise<[address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily] | LookupAddress>);
withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
fetchOptions?: Omit<RequestInit, 'body' | 'headers' | 'method' | 'signal'> | Record<string, any>;
httpVersion?: 1 | 2;
http2Options?: Record<string, any> & {
sessionTimeout?: number;
};
}
// Alias

4
node_modules/axios/index.d.ts generated vendored
View File

@@ -369,6 +369,10 @@ export interface AxiosRequestConfig<D = any> {
withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
parseReviver?: (this: any, key: string, value: any) => any;
fetchOptions?: Omit<RequestInit, 'body' | 'headers' | 'method' | 'signal'> | Record<string, any>;
httpVersion?: 1 | 2;
http2Options?: Record<string, any> & {
sessionTimeout?: number;
};
}
// Alias

0
node_modules/axios/lib/adapters/README.md generated vendored Executable file → Normal file
View File

127
node_modules/axios/lib/adapters/adapters.js generated vendored Executable file → Normal file
View File

@@ -4,78 +4,123 @@ import xhrAdapter from './xhr.js';
import * as fetchAdapter from './fetch.js';
import AxiosError from "../core/AxiosError.js";
/**
* Known adapters mapping.
* Provides environment-specific adapters for Axios:
* - `http` for Node.js
* - `xhr` for browsers
* - `fetch` for fetch API-based requests
*
* @type {Object<string, Function|Object>}
*/
const knownAdapters = {
http: httpAdapter,
xhr: xhrAdapter,
fetch: {
get: fetchAdapter.getFetch,
}
}
};
// Assign adapter names for easier debugging and identification
utils.forEach(knownAdapters, (fn, value) => {
if (fn) {
try {
Object.defineProperty(fn, 'name', {value});
Object.defineProperty(fn, 'name', { value });
} catch (e) {
// eslint-disable-next-line no-empty
}
Object.defineProperty(fn, 'adapterName', {value});
Object.defineProperty(fn, 'adapterName', { value });
}
});
/**
* Render a rejection reason string for unknown or unsupported adapters
*
* @param {string} reason
* @returns {string}
*/
const renderReason = (reason) => `- ${reason}`;
/**
* Check if the adapter is resolved (function, null, or false)
*
* @param {Function|null|false} adapter
* @returns {boolean}
*/
const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
export default {
getAdapter: (adapters, config) => {
adapters = utils.isArray(adapters) ? adapters : [adapters];
/**
* Get the first suitable adapter from the provided list.
* Tries each adapter in order until a supported one is found.
* Throws an AxiosError if no adapter is suitable.
*
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
* @param {Object} config - Axios request configuration
* @throws {AxiosError} If no suitable adapter is available
* @returns {Function} The resolved adapter function
*/
function getAdapter(adapters, config) {
adapters = utils.isArray(adapters) ? adapters : [adapters];
const {length} = adapters;
let nameOrAdapter;
let adapter;
const { length } = adapters;
let nameOrAdapter;
let adapter;
const rejectedReasons = {};
const rejectedReasons = {};
for (let i = 0; i < length; i++) {
nameOrAdapter = adapters[i];
let id;
for (let i = 0; i < length; i++) {
nameOrAdapter = adapters[i];
let id;
adapter = nameOrAdapter;
adapter = nameOrAdapter;
if (!isResolvedHandle(nameOrAdapter)) {
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
if (!isResolvedHandle(nameOrAdapter)) {
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
if (adapter === undefined) {
throw new AxiosError(`Unknown adapter '${id}'`);
}
if (adapter === undefined) {
throw new AxiosError(`Unknown adapter '${id}'`);
}
if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) {
break;
}
rejectedReasons[id || '#' + i] = adapter;
}
if (!adapter) {
if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) {
break;
}
const reasons = Object.entries(rejectedReasons)
.map(([id, state]) => `adapter ${id} ` +
(state === false ? 'is not supported by the environment' : 'is not available in the build')
);
rejectedReasons[id || '#' + i] = adapter;
}
let s = length ?
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
'as no adapter specified';
throw new AxiosError(
`There is no suitable adapter to dispatch the request ` + s,
'ERR_NOT_SUPPORT'
if (!adapter) {
const reasons = Object.entries(rejectedReasons)
.map(([id, state]) => `adapter ${id} ` +
(state === false ? 'is not supported by the environment' : 'is not available in the build')
);
}
return adapter;
},
adapters: knownAdapters
let s = length ?
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
'as no adapter specified';
throw new AxiosError(
`There is no suitable adapter to dispatch the request ` + s,
'ERR_NOT_SUPPORT'
);
}
return adapter;
}
/**
* Exports Axios adapters and utility to resolve an adapter
*/
export default {
/**
* Resolve an adapter from a list of adapter names or functions.
* @type {Function}
*/
getAdapter,
/**
* Exposes all known adapters
* @type {Object<string, Function|Object>}
*/
adapters: knownAdapters
};

2
node_modules/axios/lib/adapters/fetch.js generated vendored Executable file → Normal file
View File

@@ -262,7 +262,7 @@ const factory = (env) => {
const seedCache = new Map();
export const getFetch = (config) => {
let env = config ? config.env : {};
let env = (config && config.env) || {};
const {fetch, Request, Response} = env;
const seeds = [
Request, Response, fetch

View File

@@ -1,5 +1,4 @@
'use strict';
import { connect, constants } from 'http2';
import utils from './../utils.js';
import settle from './../core/settle.js';
import buildFullPath from '../core/buildFullPath.js';
@@ -37,6 +36,13 @@ const brotliOptions = {
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
}
const {
HTTP2_HEADER_SCHEME,
HTTP2_HEADER_METHOD,
HTTP2_HEADER_PATH,
HTTP2_HEADER_STATUS
} = constants;
const isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress);
const {http: httpFollow, https: httpsFollow} = followRedirects;
@@ -56,6 +62,100 @@ const flushOnFinish = (stream, [throttled, flush]) => {
return throttled;
}
class Http2Sessions {
constructor() {
this.sessions = Object.create(null);
}
getSession(authority, options) {
options = Object.assign({
sessionTimeout: 1000
}, options);
let authoritySessions;
if ((authoritySessions = this.sessions[authority])) {
let len = authoritySessions.length;
for (let i = 0; i < len; i++) {
const [sessionHandle, sessionOptions] = authoritySessions[i];
if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) {
return sessionHandle;
}
}
}
const session = connect(authority, options);
let removed;
const removeSession = () => {
if (removed) {
return;
}
removed = true;
let entries = authoritySessions, len = entries.length, i = len;
while (i--) {
if (entries[i][0] === session) {
entries.splice(i, 1);
if (len === 1) {
delete this.sessions[authority];
return;
}
}
}
};
const originalRequestFn = session.request;
const {sessionTimeout} = options;
if(sessionTimeout != null) {
let timer;
let streamsCount = 0;
session.request = function () {
const stream = originalRequestFn.apply(this, arguments);
streamsCount++;
if (timer) {
clearTimeout(timer);
timer = null;
}
stream.once('close', () => {
if (!--streamsCount) {
timer = setTimeout(() => {
timer = null;
removeSession();
}, sessionTimeout);
}
});
return stream;
}
}
session.once('close', removeSession);
let entries = this.sessions[authority], entry = [
session,
options
];
entries ? this.sessions[authority].push(entry) : authoritySessions = this.sessions[authority] = [entry];
return session;
}
}
const http2Sessions = new Http2Sessions();
/**
* If the proxy or config beforeRedirects functions are defined, call them with the options
@@ -168,16 +268,68 @@ const resolveFamily = ({address, family}) => {
const buildAddressEntry = (address, family) => resolveFamily(utils.isObject(address) ? address : {address, family});
const http2Transport = {
request(options, cb) {
const authority = options.protocol + '//' + options.hostname + ':' + (options.port || 80);
const {http2Options, headers} = options;
const session = http2Sessions.getSession(authority, http2Options);
const http2Headers = {
[HTTP2_HEADER_SCHEME]: options.protocol.replace(':', ''),
[HTTP2_HEADER_METHOD]: options.method,
[HTTP2_HEADER_PATH]: options.path,
}
utils.forEach(headers, (header, name) => {
name.charAt(0) !== ':' && (http2Headers[name] = header);
});
const req = session.request(http2Headers);
req.once('response', (responseHeaders) => {
const response = req; //duplex
responseHeaders = Object.assign({}, responseHeaders);
const status = responseHeaders[HTTP2_HEADER_STATUS];
delete responseHeaders[HTTP2_HEADER_STATUS];
response.headers = responseHeaders;
response.statusCode = +status;
cb(response);
})
return req;
}
}
/*eslint consistent-return:0*/
export default isHttpAdapterSupported && function httpAdapter(config) {
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
let {data, lookup, family} = config;
let {data, lookup, family, httpVersion = 1, http2Options} = config;
const {responseType, responseEncoding} = config;
const method = config.method.toUpperCase();
let isDone;
let rejected = false;
let req;
httpVersion = +httpVersion;
if (Number.isNaN(httpVersion)) {
throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
}
if (httpVersion !== 1 && httpVersion !== 2) {
throw TypeError(`Unsupported protocol version '${httpVersion}'`);
}
const isHttp2 = httpVersion === 2;
if (lookup) {
const _lookup = callbackify(lookup, (value) => utils.isArray(value) ? value : [value]);
// hotfix to support opt.all option which is required for node 20.x
@@ -194,8 +346,17 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
}
}
// temporary internal emitter until the AxiosRequest class will be implemented
const emitter = new EventEmitter();
const abortEmitter = new EventEmitter();
function abort(reason) {
try {
abortEmitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);
} catch(err) {
console.warn('emit error', err);
}
}
abortEmitter.once('abort', reject);
const onFinished = () => {
if (config.cancelToken) {
@@ -206,23 +367,9 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
config.signal.removeEventListener('abort', abort);
}
emitter.removeAllListeners();
abortEmitter.removeAllListeners();
}
onDone((value, isRejected) => {
isDone = true;
if (isRejected) {
rejected = true;
onFinished();
}
});
function abort(reason) {
emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);
}
emitter.once('abort', reject);
if (config.cancelToken || config.signal) {
config.cancelToken && config.cancelToken.subscribe(abort);
if (config.signal) {
@@ -230,6 +377,31 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
}
}
onDone((response, isRejected) => {
isDone = true;
if (isRejected) {
rejected = true;
onFinished();
return;
}
const {data} = response;
if (data instanceof stream.Readable || data instanceof stream.Duplex) {
const offListeners = stream.finished(data, () => {
offListeners();
onFinished();
});
} else {
onFinished();
}
});
// Parse url
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined);
@@ -436,7 +608,8 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
protocol,
family,
beforeRedirect: dispatchBeforeRedirect,
beforeRedirects: {}
beforeRedirects: {},
http2Options
};
// cacheable-lookup integration hotfix
@@ -453,18 +626,23 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
let transport;
const isHttpsRequest = isHttps.test(options.protocol);
options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
if (config.transport) {
transport = config.transport;
} else if (config.maxRedirects === 0) {
transport = isHttpsRequest ? https : http;
if (isHttp2) {
transport = http2Transport;
} else {
if (config.maxRedirects) {
options.maxRedirects = config.maxRedirects;
if (config.transport) {
transport = config.transport;
} else if (config.maxRedirects === 0) {
transport = isHttpsRequest ? https : http;
} else {
if (config.maxRedirects) {
options.maxRedirects = config.maxRedirects;
}
if (config.beforeRedirect) {
options.beforeRedirects.config = config.beforeRedirect;
}
transport = isHttpsRequest ? httpsFollow : httpFollow;
}
if (config.beforeRedirect) {
options.beforeRedirects.config = config.beforeRedirect;
}
transport = isHttpsRequest ? httpsFollow : httpFollow;
}
if (config.maxBodyLength > -1) {
@@ -484,7 +662,7 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
const streams = [res];
const responseLength = +res.headers['content-length'];
const responseLength = utils.toFiniteNumber(res.headers['content-length']);
if (onDownloadProgress || maxDownloadRate) {
const transformStream = new AxiosTransformStream({
@@ -547,10 +725,7 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
responseStream = streams.length > 1 ? stream.pipeline(streams, utils.noop) : streams[0];
const offListeners = stream.finished(responseStream, () => {
offListeners();
onFinished();
});
const response = {
status: res.statusCode,
@@ -576,7 +751,7 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
// stream.destroy() emit aborted event before calling reject() on Node.js v16
rejected = true;
responseStream.destroy();
reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
abort(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
}
});
@@ -618,7 +793,7 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
});
}
emitter.once('abort', err => {
abortEmitter.once('abort', err => {
if (!responseStream.destroyed) {
responseStream.emit('error', err);
responseStream.destroy();
@@ -626,9 +801,12 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
});
});
emitter.once('abort', err => {
reject(err);
req.destroy(err);
abortEmitter.once('abort', err => {
if (req.close) {
req.close();
} else {
req.destroy(err);
}
});
// Handle errors
@@ -650,7 +828,7 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
const timeout = parseInt(config.timeout, 10);
if (Number.isNaN(timeout)) {
reject(new AxiosError(
abort(new AxiosError(
'error trying to parse `config.timeout` to int',
AxiosError.ERR_BAD_OPTION_VALUE,
config,
@@ -672,13 +850,12 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
if (config.timeoutErrorMessage) {
timeoutErrorMessage = config.timeoutErrorMessage;
}
reject(new AxiosError(
abort(new AxiosError(
timeoutErrorMessage,
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
config,
req
));
abort();
});
}
@@ -705,7 +882,8 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
data.pipe(req);
} else {
req.end(data);
data && req.write(data);
req.end();
}
});
}

0
node_modules/axios/lib/adapters/xhr.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/axios.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/cancel/CancelToken.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/cancel/CanceledError.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/cancel/isCancel.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/core/Axios.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/core/AxiosError.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/core/AxiosHeaders.js generated vendored Executable file → Normal file
View File

2
node_modules/axios/lib/core/InterceptorManager.js generated vendored Executable file → Normal file
View File

@@ -30,7 +30,7 @@ class InterceptorManager {
*
* @param {Number} id The ID that was returned by `use`
*
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
* @returns {void}
*/
eject(id) {
if (this.handlers[id]) {

0
node_modules/axios/lib/core/README.md generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/core/buildFullPath.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/core/dispatchRequest.js generated vendored Executable file → Normal file
View File

8
node_modules/axios/lib/core/mergeConfig.js generated vendored Executable file → Normal file
View File

@@ -31,11 +31,11 @@ export default function mergeConfig(config1, config2) {
}
// eslint-disable-next-line consistent-return
function mergeDeepProperties(a, b, prop , caseless) {
function mergeDeepProperties(a, b, prop, caseless) {
if (!utils.isUndefined(b)) {
return getMergedValue(a, b, prop , caseless);
return getMergedValue(a, b, prop, caseless);
} else if (!utils.isUndefined(a)) {
return getMergedValue(undefined, a, prop , caseless);
return getMergedValue(undefined, a, prop, caseless);
}
}
@@ -93,7 +93,7 @@ export default function mergeConfig(config1, config2) {
socketPath: defaultToConfig2,
responseEncoding: defaultToConfig2,
validateStatus: mergeDirectKeys,
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
};
utils.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {

0
node_modules/axios/lib/core/settle.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/core/transformData.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/defaults/index.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/defaults/transitional.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/env/README.md generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/env/classes/FormData.js generated vendored Executable file → Normal file
View File

2
node_modules/axios/lib/env/data.js generated vendored Executable file → Normal file
View File

@@ -1 +1 @@
export const VERSION = "1.12.2";
export const VERSION = "1.13.1";

0
node_modules/axios/lib/helpers/AxiosTransformStream.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/AxiosURLSearchParams.js generated vendored Executable file → Normal file
View File

6
node_modules/axios/lib/helpers/HttpStatusCode.js generated vendored Executable file → Normal file
View File

@@ -62,6 +62,12 @@ const HttpStatusCode = {
LoopDetected: 508,
NotExtended: 510,
NetworkAuthenticationRequired: 511,
WebServerIsDown: 521,
ConnectionTimedOut: 522,
OriginIsUnreachable: 523,
TimeoutOccurred: 524,
SslHandshakeFailed: 525,
InvalidSslCertificate: 526,
};
Object.entries(HttpStatusCode).forEach(([key, value]) => {

0
node_modules/axios/lib/helpers/README.md generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js generated vendored Executable file → Normal file
View File

7
node_modules/axios/lib/helpers/bind.js generated vendored Executable file → Normal file
View File

@@ -1,5 +1,12 @@
'use strict';
/**
* Create a bound version of a function with a specified `this` context
*
* @param {Function} fn - The function to bind
* @param {*} thisArg - The value to be passed as the `this` parameter
* @returns {Function} A new function that will call the original function with the specified `this` context
*/
export default function bind(fn, thisArg) {
return function wrap() {
return fn.apply(thisArg, arguments);

0
node_modules/axios/lib/helpers/buildURL.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/callbackify.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/combineURLs.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/composeSignals.js generated vendored Executable file → Normal file
View File

33
node_modules/axios/lib/helpers/cookies.js generated vendored Executable file → Normal file
View File

@@ -5,27 +5,38 @@ export default platform.hasStandardBrowserEnv ?
// Standard browser envs support document.cookie
{
write(name, value, expires, path, domain, secure) {
const cookie = [name + '=' + encodeURIComponent(value)];
write(name, value, expires, path, domain, secure, sameSite) {
if (typeof document === 'undefined') return;
utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
const cookie = [`${name}=${encodeURIComponent(value)}`];
utils.isString(path) && cookie.push('path=' + path);
utils.isString(domain) && cookie.push('domain=' + domain);
secure === true && cookie.push('secure');
if (utils.isNumber(expires)) {
cookie.push(`expires=${new Date(expires).toUTCString()}`);
}
if (utils.isString(path)) {
cookie.push(`path=${path}`);
}
if (utils.isString(domain)) {
cookie.push(`domain=${domain}`);
}
if (secure === true) {
cookie.push('secure');
}
if (utils.isString(sameSite)) {
cookie.push(`SameSite=${sameSite}`);
}
document.cookie = cookie.join('; ');
},
read(name) {
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
return (match ? decodeURIComponent(match[3]) : null);
if (typeof document === 'undefined') return null;
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
return match ? decodeURIComponent(match[1]) : null;
},
remove(name) {
this.write(name, '', Date.now() - 86400000);
this.write(name, '', Date.now() - 86400000, '/');
}
}

0
node_modules/axios/lib/helpers/deprecatedMethod.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/formDataToJSON.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/formDataToStream.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/fromDataURI.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/isAbsoluteURL.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/isAxiosError.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/isURLSameOrigin.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/null.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/parseHeaders.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/parseProtocol.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/progressEventReducer.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/readBlob.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/resolveConfig.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/speedometer.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/spread.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/throttle.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/toFormData.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/toURLEncodedForm.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/trackStream.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/helpers/validator.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/platform/browser/classes/Blob.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/platform/browser/classes/FormData.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/platform/browser/classes/URLSearchParams.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/platform/browser/index.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/platform/common/utils.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/platform/index.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/platform/node/classes/FormData.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/platform/node/classes/URLSearchParams.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/platform/node/index.js generated vendored Executable file → Normal file
View File

0
node_modules/axios/lib/utils.js generated vendored Executable file → Normal file
View File

13
node_modules/axios/package.json generated vendored
View File

@@ -1,6 +1,6 @@
{
"name": "axios",
"version": "1.12.2",
"version": "1.13.1",
"description": "Promise based HTTP client for the browser and node.js",
"main": "index.js",
"exports": {
@@ -80,7 +80,12 @@
"http",
"ajax",
"promise",
"node"
"node",
"browser",
"fetch",
"rest",
"api",
"client"
],
"author": "Matt Zabriskie",
"license": "MIT",
@@ -141,11 +146,11 @@
"rollup-plugin-auto-external": "^2.0.0",
"rollup-plugin-bundle-size": "^1.0.3",
"rollup-plugin-terser": "^7.0.2",
"selfsigned": "^3.0.1",
"sinon": "^4.5.0",
"stream-throttle": "^0.1.3",
"string-replace-async": "^3.0.2",
"tar-stream": "^3.1.7",
"terser-webpack-plugin": "^4.2.3",
"typescript": "^4.9.5"
},
"browser": {
@@ -185,7 +190,7 @@
"Remco Haszing (https://github.com/remcohaszing)",
"Rikki Gibson (https://github.com/RikkiGibson)",
"Willian Agostini (https://github.com/WillianAgostini)",
"Yasu Flores (https://github.com/yasuf)"
"Ben Carp (https://github.com/carpben)"
],
"sideEffects": false,
"release-it": {