Changeset ff72ad2 for node_modules/axios/lib
- Timestamp:
- 04/01/25 22:58:15 (2 months ago)
- Branches:
- master
- Children:
- 8ae59d6
- Parents:
- 3a74959
- Location:
- node_modules/axios/lib
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
node_modules/axios/lib/adapters/http.js
r3a74959 rff72ad2 229 229 230 230 // Parse url 231 const fullPath = buildFullPath(config.baseURL, config.url );231 const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); 232 232 const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined); 233 233 const protocol = parsed.protocol || supportedProtocols[0]; -
node_modules/axios/lib/core/Axios.js
r3a74959 rff72ad2 98 98 } 99 99 100 // Set config.allowAbsoluteUrls 101 if (config.allowAbsoluteUrls !== undefined) { 102 // do nothing 103 } else if (this.defaults.allowAbsoluteUrls !== undefined) { 104 config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; 105 } else { 106 config.allowAbsoluteUrls = true; 107 } 108 100 109 validator.assertOptions(config, { 101 110 baseUrl: validators.spelling('baseURL'), … … 193 202 getUri(config) { 194 203 config = mergeConfig(this.defaults, config); 195 const fullPath = buildFullPath(config.baseURL, config.url );204 const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); 196 205 return buildURL(fullPath, config.params, config.paramsSerializer); 197 206 } -
node_modules/axios/lib/core/buildFullPath.js
r3a74959 rff72ad2 14 14 * @returns {string} The combined full path 15 15 */ 16 export default function buildFullPath(baseURL, requestedURL) { 17 if (baseURL && !isAbsoluteURL(requestedURL)) { 16 export default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { 17 let isRelativeUrl = !isAbsoluteURL(requestedURL); 18 if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { 18 19 return combineURLs(baseURL, requestedURL); 19 20 } -
node_modules/axios/lib/env/data.js
r3a74959 rff72ad2 1 export const VERSION = "1. 7.9";1 export const VERSION = "1.8.4"; -
node_modules/axios/lib/helpers/formDataToStream.js
r3a74959 rff72ad2 3 3 import utils from "../utils.js"; 4 4 import readBlob from "./readBlob.js"; 5 import platform from "../platform/index.js"; 5 6 6 const BOUNDARY_ALPHABET = utils.ALPHABET.ALPHA_DIGIT + '-_';7 const BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + '-_'; 7 8 8 9 const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util.TextEncoder(); … … 64 65 tag = 'form-data-boundary', 65 66 size = 25, 66 boundary = tag + '-' + utils.generateString(size, BOUNDARY_ALPHABET)67 boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET) 67 68 } = options || {}; 68 69 -
node_modules/axios/lib/helpers/resolveConfig.js
r3a74959 rff72ad2 15 15 newConfig.headers = headers = AxiosHeaders.from(headers); 16 16 17 newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url ), config.params, config.paramsSerializer);17 newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer); 18 18 19 19 // HTTP basic authentication -
node_modules/axios/lib/platform/node/index.js
r3a74959 rff72ad2 1 import crypto from 'crypto'; 1 2 import URLSearchParams from './classes/URLSearchParams.js' 2 3 import FormData from './classes/FormData.js' 4 5 const ALPHA = 'abcdefghijklmnopqrstuvwxyz' 6 7 const DIGIT = '0123456789'; 8 9 const ALPHABET = { 10 DIGIT, 11 ALPHA, 12 ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT 13 } 14 15 const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { 16 let str = ''; 17 const {length} = alphabet; 18 const randomValues = new Uint32Array(size); 19 crypto.randomFillSync(randomValues); 20 for (let i = 0; i < size; i++) { 21 str += alphabet[randomValues[i] % length]; 22 } 23 24 return str; 25 } 26 3 27 4 28 export default { … … 9 33 Blob: typeof Blob !== 'undefined' && Blob || null 10 34 }, 35 ALPHABET, 36 generateString, 11 37 protocols: [ 'http', 'https', 'file', 'data' ] 12 38 }; -
node_modules/axios/lib/utils.js
r3a74959 rff72ad2 601 601 const toFiniteNumber = (value, defaultValue) => { 602 602 return value != null && Number.isFinite(value = +value) ? value : defaultValue; 603 }604 605 const ALPHA = 'abcdefghijklmnopqrstuvwxyz'606 607 const DIGIT = '0123456789';608 609 const ALPHABET = {610 DIGIT,611 ALPHA,612 ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT613 }614 615 const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {616 let str = '';617 const {length} = alphabet;618 while (size--) {619 str += alphabet[Math.random() * length|0]620 }621 622 return str;623 603 } 624 604 … … 750 730 global: _global, 751 731 isContextDefined, 752 ALPHABET,753 generateString,754 732 isSpecCompliantForm, 755 733 toJSONObject,
Note:
See TracChangeset
for help on using the changeset viewer.