Skip to content

Commit

Permalink
Updated build
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellockyer committed Feb 8, 2024
1 parent 3baf4b3 commit f409d7a
Showing 1 changed file with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5532,6 +5532,7 @@ var preservedUrlFields = [
"protocol",
"query",
"search",
"hash",
];

// Create handlers that pass events from native requests
Expand Down Expand Up @@ -38687,7 +38688,7 @@ module.exports = parseParams
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {

"use strict";
// Axios v1.6.5 Copyright (c) 2024 Matt Zabriskie and contributors
// Axios v1.6.7 Copyright (c) 2024 Matt Zabriskie and contributors


const FormData$1 = __nccwpck_require__(4334);
Expand Down Expand Up @@ -40143,9 +40144,6 @@ const defaults = {
const isFormData = utils$1.isFormData(data);

if (isFormData) {
if (!hasJSONContentType) {
return data;
}
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
}

Expand Down Expand Up @@ -40711,7 +40709,7 @@ function buildFullPath(baseURL, requestedURL) {
return requestedURL;
}

const VERSION = "1.6.5";
const VERSION = "1.6.7";

function parseProtocol(url) {
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
Expand Down Expand Up @@ -41224,12 +41222,12 @@ const supportedProtocols = platform.protocols.map(protocol => {
*
* @returns {Object<string, any>}
*/
function dispatchBeforeRedirect(options) {
function dispatchBeforeRedirect(options, responseDetails) {
if (options.beforeRedirects.proxy) {
options.beforeRedirects.proxy(options);
}
if (options.beforeRedirects.config) {
options.beforeRedirects.config(options);
options.beforeRedirects.config(options, responseDetails);
}
}

Expand Down Expand Up @@ -42559,7 +42557,31 @@ class Axios {
*
* @returns {Promise} The Promise to be fulfilled
*/
request(configOrUrl, config) {
async request(configOrUrl, config) {
try {
return await this._request(configOrUrl, config);
} catch (err) {
if (err instanceof Error) {
let dummy;

Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());

// slice off the Error: ... line
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';

if (!err.stack) {
err.stack = stack;
// match without the 2 top stack lines
} else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
err.stack += '\n' + stack;
}
}

throw err;
}
}

_request(configOrUrl, config) {
/*eslint no-param-reassign:0*/
// Allow for axios('example/url'[, config]) a la fetch API
if (typeof configOrUrl === 'string') {
Expand Down

0 comments on commit f409d7a

Please sign in to comment.