Changeset 0c6b92a for imaps-frontend/node_modules/axios/lib
- Timestamp:
- 12/12/24 17:06:06 (5 weeks ago)
- Branches:
- main
- Parents:
- d565449
- Location:
- imaps-frontend/node_modules/axios/lib
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/axios/lib/adapters/http.js
rd565449 r0c6b92a 5 5 import buildFullPath from '../core/buildFullPath.js'; 6 6 import buildURL from './../helpers/buildURL.js'; 7 import {getProxyForUrl}from 'proxy-from-env';7 import proxyFromEnv from 'proxy-from-env'; 8 8 import http from 'http'; 9 9 import https from 'https'; … … 84 84 let proxy = configProxy; 85 85 if (!proxy && proxy !== false) { 86 const proxyUrl = getProxyForUrl(location);86 const proxyUrl = proxyFromEnv.getProxyForUrl(location); 87 87 if (proxyUrl) { 88 88 proxy = new URL(proxyUrl); … … 315 315 } 316 316 } 317 } else if (utils.isBlob(data) ) {317 } else if (utils.isBlob(data) || utils.isFile(data)) { 318 318 data.size && headers.setContentType(data.type || 'application/octet-stream'); 319 319 headers.setContentLength(data.size || 0); … … 570 570 571 571 const err = new AxiosError( 572 ' maxContentLength size of ' + config.maxContentLength + ' exceeded',572 'stream has been aborted', 573 573 AxiosError.ERR_BAD_RESPONSE, 574 574 config, -
imaps-frontend/node_modules/axios/lib/core/Axios.js
rd565449 r0c6b92a 41 41 } catch (err) { 42 42 if (err instanceof Error) { 43 let dummy ;44 45 Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());43 let dummy = {}; 44 45 Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error()); 46 46 47 47 // slice off the Error: ... line … … 98 98 } 99 99 100 validator.assertOptions(config, { 101 baseUrl: validators.spelling('baseURL'), 102 withXsrfToken: validators.spelling('withXSRFToken') 103 }, true); 104 100 105 // Set config.method 101 106 config.method = (config.method || this.defaults.method || 'get').toLowerCase(); -
imaps-frontend/node_modules/axios/lib/core/mergeConfig.js
rd565449 r0c6b92a 20 20 const config = {}; 21 21 22 function getMergedValue(target, source, caseless) {22 function getMergedValue(target, source, prop, caseless) { 23 23 if (utils.isPlainObject(target) && utils.isPlainObject(source)) { 24 24 return utils.merge.call({caseless}, target, source); … … 32 32 33 33 // eslint-disable-next-line consistent-return 34 function mergeDeepProperties(a, b, caseless) {34 function mergeDeepProperties(a, b, prop , caseless) { 35 35 if (!utils.isUndefined(b)) { 36 return getMergedValue(a, b, caseless);36 return getMergedValue(a, b, prop , caseless); 37 37 } else if (!utils.isUndefined(a)) { 38 return getMergedValue(undefined, a, caseless);38 return getMergedValue(undefined, a, prop , caseless); 39 39 } 40 40 } … … 94 94 responseEncoding: defaultToConfig2, 95 95 validateStatus: mergeDirectKeys, 96 headers: (a, b ) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)96 headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true) 97 97 }; 98 98 -
imaps-frontend/node_modules/axios/lib/env/data.js
rd565449 r0c6b92a 1 export const VERSION = "1.7. 7";1 export const VERSION = "1.7.8"; -
imaps-frontend/node_modules/axios/lib/helpers/buildURL.js
rd565449 r0c6b92a 27 27 * @param {string} url The base of the url (e.g., http://www.google.com) 28 28 * @param {object} [params] The params to be appended 29 * @param {? object} options29 * @param {?(object|Function)} options 30 30 * 31 31 * @returns {string} The formatted url … … 38 38 39 39 const _encode = options && options.encode || encode; 40 41 if (utils.isFunction(options)) { 42 options = { 43 serialize: options 44 }; 45 } 40 46 41 47 const serializeFn = options && options.serialize; -
imaps-frontend/node_modules/axios/lib/helpers/formDataToStream.js
rd565449 r0c6b92a 1 import {TextEncoder}from 'util';1 import util from 'util'; 2 2 import {Readable} from 'stream'; 3 3 import utils from "../utils.js"; … … 6 6 const BOUNDARY_ALPHABET = utils.ALPHABET.ALPHA_DIGIT + '-_'; 7 7 8 const textEncoder = newTextEncoder();8 const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util.TextEncoder(); 9 9 10 10 const CRLF = '\r\n'; -
imaps-frontend/node_modules/axios/lib/helpers/isURLSameOrigin.js
rd565449 r0c6b92a 1 'use strict';2 3 import utils from './../utils.js';4 1 import platform from '../platform/index.js'; 5 2 6 export default platform.hasStandardBrowserEnv ? 3 export default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => { 4 url = new URL(url, platform.origin); 7 5 8 // Standard browser envs have full support of the APIs needed to test 9 // whether the request URL is of the same origin as current location. 10 (function standardBrowserEnv() { 11 const msie = platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent); 12 const urlParsingNode = document.createElement('a'); 13 let originURL; 14 15 /** 16 * Parse a URL to discover its components 17 * 18 * @param {String} url The URL to be parsed 19 * @returns {Object} 20 */ 21 function resolveURL(url) { 22 let href = url; 23 24 if (msie) { 25 // IE needs attribute set twice to normalize properties 26 urlParsingNode.setAttribute('href', href); 27 href = urlParsingNode.href; 28 } 29 30 urlParsingNode.setAttribute('href', href); 31 32 // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils 33 return { 34 href: urlParsingNode.href, 35 protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', 36 host: urlParsingNode.host, 37 search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', 38 hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', 39 hostname: urlParsingNode.hostname, 40 port: urlParsingNode.port, 41 pathname: (urlParsingNode.pathname.charAt(0) === '/') ? 42 urlParsingNode.pathname : 43 '/' + urlParsingNode.pathname 44 }; 45 } 46 47 originURL = resolveURL(window.location.href); 48 49 /** 50 * Determine if a URL shares the same origin as the current location 51 * 52 * @param {String} requestURL The URL to test 53 * @returns {boolean} True if URL shares the same origin, otherwise false 54 */ 55 return function isURLSameOrigin(requestURL) { 56 const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; 57 return (parsed.protocol === originURL.protocol && 58 parsed.host === originURL.host); 59 }; 60 })() : 61 62 // Non standard browser envs (web workers, react-native) lack needed support. 63 (function nonStandardBrowserEnv() { 64 return function isURLSameOrigin() { 65 return true; 66 }; 67 })(); 6 return ( 7 origin.protocol === url.protocol && 8 origin.host === url.host && 9 (isMSIE || origin.port === url.port) 10 ); 11 })( 12 new URL(platform.origin), 13 platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent) 14 ) : () => true; -
imaps-frontend/node_modules/axios/lib/helpers/validator.js
rd565449 r0c6b92a 53 53 }; 54 54 55 validators.spelling = function spelling(correctSpelling) { 56 return (value, opt) => { 57 // eslint-disable-next-line no-console 58 console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); 59 return true; 60 } 61 }; 62 55 63 /** 56 64 * Assert object's properties type
Note:
See TracChangeset
for help on using the changeset viewer.