no message
This commit is contained in:
8
.output/server/node_modules/axios/lib/adapters/http.js
generated
vendored
8
.output/server/node_modules/axios/lib/adapters/http.js
generated
vendored
@@ -53,12 +53,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,6 +171,10 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
|
||||
// hotfix to support opt.all option which is required for node 20.x
|
||||
lookup = (hostname, opt, cb) => {
|
||||
_lookup(hostname, opt, (err, arg0, arg1) => {
|
||||
if (err) {
|
||||
return cb(err);
|
||||
}
|
||||
|
||||
const addresses = utils.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
||||
|
||||
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
||||
|
26
.output/server/node_modules/axios/lib/core/Axios.js
generated
vendored
26
.output/server/node_modules/axios/lib/core/Axios.js
generated
vendored
@@ -35,7 +35,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') {
|
||||
|
3
.output/server/node_modules/axios/lib/defaults/index.js
generated
vendored
3
.output/server/node_modules/axios/lib/defaults/index.js
generated
vendored
@@ -51,9 +51,6 @@ const defaults = {
|
||||
const isFormData = utils.isFormData(data);
|
||||
|
||||
if (isFormData) {
|
||||
if (!hasJSONContentType) {
|
||||
return data;
|
||||
}
|
||||
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
||||
}
|
||||
|
||||
|
2
.output/server/node_modules/axios/lib/env/data.js
generated
vendored
2
.output/server/node_modules/axios/lib/env/data.js
generated
vendored
@@ -1 +1 @@
|
||||
export const VERSION = "1.6.4";
|
||||
export const VERSION = "1.6.7";
|
Reference in New Issue
Block a user