Changeset ff72ad2 for node_modules/axios/dist/axios.js
- Timestamp:
- 04/01/25 22:58:15 (2 months ago)
- Branches:
- master
- Children:
- 8ae59d6
- Parents:
- 3a74959
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
node_modules/axios/dist/axios.js
r3a74959 rff72ad2 1 / / Axios v1.7.9 Copyright (c) 2024 Matt Zabriskie and contributors1 /*! Axios v1.8.4 Copyright (c) 2025 Matt Zabriskie and contributors */ 2 2 (function (global, factory) { 3 3 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : … … 1266 1266 var toFiniteNumber = function toFiniteNumber(value, defaultValue) { 1267 1267 return value != null && Number.isFinite(value = +value) ? value : defaultValue; 1268 };1269 var ALPHA = 'abcdefghijklmnopqrstuvwxyz';1270 var DIGIT = '0123456789';1271 var ALPHABET = {1272 DIGIT: DIGIT,1273 ALPHA: ALPHA,1274 ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT1275 };1276 var generateString = function generateString() {1277 var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 16;1278 var alphabet = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ALPHABET.ALPHA_DIGIT;1279 var str = '';1280 var length = alphabet.length;1281 while (size--) {1282 str += alphabet[Math.random() * length | 0];1283 }1284 return str;1285 1268 }; 1286 1269 … … 1400 1383 global: _global, 1401 1384 isContextDefined: isContextDefined, 1402 ALPHABET: ALPHABET,1403 generateString: generateString,1404 1385 isSpecCompliantForm: isSpecCompliantForm, 1405 1386 toJSONObject: toJSONObject, … … 2721 2702 * @returns {string} The combined full path 2722 2703 */ 2723 function buildFullPath(baseURL, requestedURL) { 2724 if (baseURL && !isAbsoluteURL(requestedURL)) { 2704 function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { 2705 var isRelativeUrl = !isAbsoluteURL(requestedURL); 2706 if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { 2725 2707 return combineURLs(baseURL, requestedURL); 2726 2708 } … … 2841 2823 auth = newConfig.auth; 2842 2824 newConfig.headers = headers = AxiosHeaders$1.from(headers); 2843 newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url ), config.params, config.paramsSerializer);2825 newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer); 2844 2826 2845 2827 // HTTP basic authentication … … 3677 3659 } 3678 3660 3679 var VERSION = "1. 7.9";3661 var VERSION = "1.8.4"; 3680 3662 3681 3663 var validators$1 = {}; … … 3868 3850 } 3869 3851 } 3852 3853 // Set config.allowAbsoluteUrls 3854 if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) { 3855 config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; 3856 } else { 3857 config.allowAbsoluteUrls = true; 3858 } 3870 3859 validator.assertOptions(config, { 3871 3860 baseUrl: validators.spelling('baseURL'), … … 3940 3929 value: function getUri(config) { 3941 3930 config = mergeConfig(this.defaults, config); 3942 var fullPath = buildFullPath(config.baseURL, config.url );3931 var fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); 3943 3932 return buildURL(fullPath, config.params, config.paramsSerializer); 3944 3933 }
Note:
See TracChangeset
for help on using the changeset viewer.