Changeset ff72ad2 for node_modules/axios/dist/esm/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/esm/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 bind(fn, thisArg) { 3 3 return function wrap() { … … 604 604 const toFiniteNumber = (value, defaultValue) => { 605 605 return value != null && Number.isFinite(value = +value) ? value : defaultValue; 606 };607 608 const ALPHA = 'abcdefghijklmnopqrstuvwxyz';609 610 const DIGIT = '0123456789';611 612 const ALPHABET = {613 DIGIT,614 ALPHA,615 ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT616 };617 618 const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {619 let str = '';620 const {length} = alphabet;621 while (size--) {622 str += alphabet[Math.random() * length|0];623 }624 625 return str;626 606 }; 627 607 … … 753 733 global: _global, 754 734 isContextDefined, 755 ALPHABET,756 generateString,757 735 isSpecCompliantForm, 758 736 toJSONObject, … … 2247 2225 * @returns {string} The combined full path 2248 2226 */ 2249 function buildFullPath(baseURL, requestedURL) { 2250 if (baseURL && !isAbsoluteURL(requestedURL)) { 2227 function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { 2228 let isRelativeUrl = !isAbsoluteURL(requestedURL); 2229 if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { 2251 2230 return combineURLs(baseURL, requestedURL); 2252 2231 } … … 2363 2342 newConfig.headers = headers = AxiosHeaders$2.from(headers); 2364 2343 2365 newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url ), config.params, config.paramsSerializer);2344 newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer); 2366 2345 2367 2346 // HTTP basic authentication … … 3088 3067 } 3089 3068 3090 const VERSION$1 = "1. 7.9";3069 const VERSION$1 = "1.8.4"; 3091 3070 3092 3071 const validators$1 = {}; … … 3273 3252 } 3274 3253 3254 // Set config.allowAbsoluteUrls 3255 if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) { 3256 config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; 3257 } else { 3258 config.allowAbsoluteUrls = true; 3259 } 3260 3275 3261 validator.assertOptions(config, { 3276 3262 baseUrl: validators.spelling('baseURL'), … … 3368 3354 getUri(config) { 3369 3355 config = mergeConfig$1(this.defaults, config); 3370 const fullPath = buildFullPath(config.baseURL, config.url );3356 const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); 3371 3357 return buildURL(fullPath, config.params, config.paramsSerializer); 3372 3358 }
Note:
See TracChangeset
for help on using the changeset viewer.