Ignore:
Timestamp:
12/12/24 17:06:06 (5 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
d565449
Message:

Pred finalna verzija

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  
    55import buildFullPath from '../core/buildFullPath.js';
    66import buildURL from './../helpers/buildURL.js';
    7 import {getProxyForUrl} from 'proxy-from-env';
     7import proxyFromEnv from 'proxy-from-env';
    88import http from 'http';
    99import https from 'https';
     
    8484  let proxy = configProxy;
    8585  if (!proxy && proxy !== false) {
    86     const proxyUrl = getProxyForUrl(location);
     86    const proxyUrl = proxyFromEnv.getProxyForUrl(location);
    8787    if (proxyUrl) {
    8888      proxy = new URL(proxyUrl);
     
    315315        }
    316316      }
    317     } else if (utils.isBlob(data)) {
     317    } else if (utils.isBlob(data) || utils.isFile(data)) {
    318318      data.size && headers.setContentType(data.type || 'application/octet-stream');
    319319      headers.setContentLength(data.size || 0);
     
    570570
    571571          const err = new AxiosError(
    572             'maxContentLength size of ' + config.maxContentLength + ' exceeded',
     572            'stream has been aborted',
    573573            AxiosError.ERR_BAD_RESPONSE,
    574574            config,
  • imaps-frontend/node_modules/axios/lib/core/Axios.js

    rd565449 r0c6b92a  
    4141    } catch (err) {
    4242      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());
    4646
    4747        // slice off the Error: ... line
     
    9898    }
    9999
     100    validator.assertOptions(config, {
     101      baseUrl: validators.spelling('baseURL'),
     102      withXsrfToken: validators.spelling('withXSRFToken')
     103    }, true);
     104
    100105    // Set config.method
    101106    config.method = (config.method || this.defaults.method || 'get').toLowerCase();
  • imaps-frontend/node_modules/axios/lib/core/mergeConfig.js

    rd565449 r0c6b92a  
    2020  const config = {};
    2121
    22   function getMergedValue(target, source, caseless) {
     22  function getMergedValue(target, source, prop, caseless) {
    2323    if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
    2424      return utils.merge.call({caseless}, target, source);
     
    3232
    3333  // eslint-disable-next-line consistent-return
    34   function mergeDeepProperties(a, b, caseless) {
     34  function mergeDeepProperties(a, b, prop , caseless) {
    3535    if (!utils.isUndefined(b)) {
    36       return getMergedValue(a, b, caseless);
     36      return getMergedValue(a, b, prop , caseless);
    3737    } else if (!utils.isUndefined(a)) {
    38       return getMergedValue(undefined, a, caseless);
     38      return getMergedValue(undefined, a, prop , caseless);
    3939    }
    4040  }
     
    9494    responseEncoding: defaultToConfig2,
    9595    validateStatus: mergeDirectKeys,
    96     headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
     96    headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
    9797  };
    9898
  • imaps-frontend/node_modules/axios/lib/env/data.js

    rd565449 r0c6b92a  
    1 export const VERSION = "1.7.7";
     1export const VERSION = "1.7.8";
  • imaps-frontend/node_modules/axios/lib/helpers/buildURL.js

    rd565449 r0c6b92a  
    2727 * @param {string} url The base of the url (e.g., http://www.google.com)
    2828 * @param {object} [params] The params to be appended
    29  * @param {?object} options
     29 * @param {?(object|Function)} options
    3030 *
    3131 * @returns {string} The formatted url
     
    3838 
    3939  const _encode = options && options.encode || encode;
     40
     41  if (utils.isFunction(options)) {
     42    options = {
     43      serialize: options
     44    };
     45  }
    4046
    4147  const serializeFn = options && options.serialize;
  • imaps-frontend/node_modules/axios/lib/helpers/formDataToStream.js

    rd565449 r0c6b92a  
    1 import {TextEncoder} from 'util';
     1import util from 'util';
    22import {Readable} from 'stream';
    33import utils from "../utils.js";
     
    66const BOUNDARY_ALPHABET = utils.ALPHABET.ALPHA_DIGIT + '-_';
    77
    8 const textEncoder = new TextEncoder();
     8const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util.TextEncoder();
    99
    1010const CRLF = '\r\n';
  • imaps-frontend/node_modules/axios/lib/helpers/isURLSameOrigin.js

    rd565449 r0c6b92a  
    1 'use strict';
    2 
    3 import utils from './../utils.js';
    41import platform from '../platform/index.js';
    52
    6 export default platform.hasStandardBrowserEnv ?
     3export default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
     4  url = new URL(url, platform.origin);
    75
    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  
    5353};
    5454
     55validators.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
    5563/**
    5664 * Assert object's properties type
Note: See TracChangeset for help on using the changeset viewer.