2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-20 20:00:40 +03:00

chore: build new version

This commit is contained in:
Jay
2022-12-29 08:21:12 +02:00
parent 6f74cb1880
commit 45c4948416
15 changed files with 351 additions and 27 deletions
+84 -4
View File
@@ -1,4 +1,4 @@
// Axios v1.2.1 Copyright (c) 2022 Matt Zabriskie and contributors
// Axios v1.2.2 Copyright (c) 2022 Matt Zabriskie and contributors
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
@@ -367,7 +367,11 @@
}
return null;
}
var _global = typeof self === "undefined" ? typeof global === "undefined" ? undefined : global : self;
var _global = function () {
/*eslint no-undef:0*/
if (typeof globalThis !== "undefined") return globalThis;
return typeof self !== "undefined" ? self : typeof window !== 'undefined' ? window : global;
}();
var isContextDefined = function isContextDefined(context) {
return !isUndefined(context) && context !== _global;
};
@@ -1223,7 +1227,9 @@
* This leads to a problem when axios post `FormData` in webWorker
*/
var isStandardBrowserWebWorkerEnv = function () {
return typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && typeof self.importScripts === 'function';
return typeof WorkerGlobalScope !== 'undefined' &&
// eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope && typeof self.importScripts === 'function';
}();
var platform = {
isBrowser: true,
@@ -2391,7 +2397,7 @@
return config;
}
var VERSION = "1.2.1";
var VERSION = "1.2.2";
var validators$1 = {};
@@ -2783,6 +2789,79 @@
return utils.isObject(payload) && payload.isAxiosError === true;
}
var HttpStatusCode = {
Continue: 100,
SwitchingProtocols: 101,
Processing: 102,
EarlyHints: 103,
Ok: 200,
Created: 201,
Accepted: 202,
NonAuthoritativeInformation: 203,
NoContent: 204,
ResetContent: 205,
PartialContent: 206,
MultiStatus: 207,
AlreadyReported: 208,
ImUsed: 226,
MultipleChoices: 300,
MovedPermanently: 301,
Found: 302,
SeeOther: 303,
NotModified: 304,
UseProxy: 305,
Unused: 306,
TemporaryRedirect: 307,
PermanentRedirect: 308,
BadRequest: 400,
Unauthorized: 401,
PaymentRequired: 402,
Forbidden: 403,
NotFound: 404,
MethodNotAllowed: 405,
NotAcceptable: 406,
ProxyAuthenticationRequired: 407,
RequestTimeout: 408,
Conflict: 409,
Gone: 410,
LengthRequired: 411,
PreconditionFailed: 412,
PayloadTooLarge: 413,
UriTooLong: 414,
UnsupportedMediaType: 415,
RangeNotSatisfiable: 416,
ExpectationFailed: 417,
ImATeapot: 418,
MisdirectedRequest: 421,
UnprocessableEntity: 422,
Locked: 423,
FailedDependency: 424,
TooEarly: 425,
UpgradeRequired: 426,
PreconditionRequired: 428,
TooManyRequests: 429,
RequestHeaderFieldsTooLarge: 431,
UnavailableForLegalReasons: 451,
InternalServerError: 500,
NotImplemented: 501,
BadGateway: 502,
ServiceUnavailable: 503,
GatewayTimeout: 504,
HttpVersionNotSupported: 505,
VariantAlsoNegotiates: 506,
InsufficientStorage: 507,
LoopDetected: 508,
NotExtended: 510,
NetworkAuthenticationRequired: 511
};
Object.entries(HttpStatusCode).forEach(function (_ref) {
var _ref2 = _slicedToArray(_ref, 2),
key = _ref2[0],
value = _ref2[1];
HttpStatusCode[value] = key;
});
var HttpStatusCode$1 = HttpStatusCode;
/**
* Create an instance of Axios
*
@@ -2845,6 +2924,7 @@
axios.formToJSON = function (thing) {
return formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
};
axios.HttpStatusCode = HttpStatusCode$1;
axios["default"] = axios;
return axios;