axios 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of axios might be problematic. Click here for more details.
- package/CHANGELOG.md +32 -9
- package/dist/axios.js +84 -4
- package/dist/axios.js.map +1 -1
- package/dist/axios.min.js +1 -1
- package/dist/axios.min.js.map +1 -1
- package/dist/browser/axios.cjs +82 -3
- package/dist/browser/axios.cjs.map +1 -1
- package/dist/esm/axios.js +84 -4
- package/dist/esm/axios.js.map +1 -1
- package/dist/esm/axios.min.js +1 -1
- package/dist/esm/axios.min.js.map +1 -1
- package/dist/node/axios.cjs +89 -4
- package/dist/node/axios.cjs.map +1 -1
- package/index.d.cts +20 -12
- package/index.d.ts +4 -3
- package/index.js +2 -0
- package/lib/.DS_Store +0 -0
- package/lib/adapters/http.js +8 -1
- package/lib/axios.js +3 -0
- package/lib/env/data.js +1 -1
- package/lib/helpers/HttpStatusCode.js +71 -0
- package/lib/platform/browser/index.js +1 -0
- package/lib/utils.js +5 -1
- package/package.json +54 -6
- package/bin/ssl_hotfix.js +0 -22
- package/gulpfile.js +0 -88
- package/karma.conf.cjs +0 -250
- package/rollup.config.js +0 -117
- package/tsconfig.json +0 -9
- package/tslint.json +0 -11
package/dist/esm/axios.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
// Axios v1.2.
|
1
|
+
// Axios v1.2.2 Copyright (c) 2022 Matt Zabriskie and contributors
|
2
2
|
function bind(fn, thisArg) {
|
3
3
|
return function wrap() {
|
4
4
|
return fn.apply(thisArg, arguments);
|
@@ -280,7 +280,11 @@ function findKey(obj, key) {
|
|
280
280
|
return null;
|
281
281
|
}
|
282
282
|
|
283
|
-
const _global =
|
283
|
+
const _global = (() => {
|
284
|
+
/*eslint no-undef:0*/
|
285
|
+
if (typeof globalThis !== "undefined") return globalThis;
|
286
|
+
return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
|
287
|
+
})();
|
284
288
|
|
285
289
|
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
286
290
|
|
@@ -1229,6 +1233,7 @@ const isStandardBrowserEnv = (() => {
|
|
1229
1233
|
const isStandardBrowserWebWorkerEnv = (() => {
|
1230
1234
|
return (
|
1231
1235
|
typeof WorkerGlobalScope !== 'undefined' &&
|
1236
|
+
// eslint-disable-next-line no-undef
|
1232
1237
|
self instanceof WorkerGlobalScope &&
|
1233
1238
|
typeof self.importScripts === 'function'
|
1234
1239
|
);
|
@@ -2575,7 +2580,7 @@ function mergeConfig$1(config1, config2) {
|
|
2575
2580
|
return config;
|
2576
2581
|
}
|
2577
2582
|
|
2578
|
-
const VERSION$1 = "1.2.
|
2583
|
+
const VERSION$1 = "1.2.2";
|
2579
2584
|
|
2580
2585
|
const validators$1 = {};
|
2581
2586
|
|
@@ -3007,6 +3012,78 @@ function isAxiosError$1(payload) {
|
|
3007
3012
|
return utils.isObject(payload) && (payload.isAxiosError === true);
|
3008
3013
|
}
|
3009
3014
|
|
3015
|
+
const HttpStatusCode$1 = {
|
3016
|
+
Continue: 100,
|
3017
|
+
SwitchingProtocols: 101,
|
3018
|
+
Processing: 102,
|
3019
|
+
EarlyHints: 103,
|
3020
|
+
Ok: 200,
|
3021
|
+
Created: 201,
|
3022
|
+
Accepted: 202,
|
3023
|
+
NonAuthoritativeInformation: 203,
|
3024
|
+
NoContent: 204,
|
3025
|
+
ResetContent: 205,
|
3026
|
+
PartialContent: 206,
|
3027
|
+
MultiStatus: 207,
|
3028
|
+
AlreadyReported: 208,
|
3029
|
+
ImUsed: 226,
|
3030
|
+
MultipleChoices: 300,
|
3031
|
+
MovedPermanently: 301,
|
3032
|
+
Found: 302,
|
3033
|
+
SeeOther: 303,
|
3034
|
+
NotModified: 304,
|
3035
|
+
UseProxy: 305,
|
3036
|
+
Unused: 306,
|
3037
|
+
TemporaryRedirect: 307,
|
3038
|
+
PermanentRedirect: 308,
|
3039
|
+
BadRequest: 400,
|
3040
|
+
Unauthorized: 401,
|
3041
|
+
PaymentRequired: 402,
|
3042
|
+
Forbidden: 403,
|
3043
|
+
NotFound: 404,
|
3044
|
+
MethodNotAllowed: 405,
|
3045
|
+
NotAcceptable: 406,
|
3046
|
+
ProxyAuthenticationRequired: 407,
|
3047
|
+
RequestTimeout: 408,
|
3048
|
+
Conflict: 409,
|
3049
|
+
Gone: 410,
|
3050
|
+
LengthRequired: 411,
|
3051
|
+
PreconditionFailed: 412,
|
3052
|
+
PayloadTooLarge: 413,
|
3053
|
+
UriTooLong: 414,
|
3054
|
+
UnsupportedMediaType: 415,
|
3055
|
+
RangeNotSatisfiable: 416,
|
3056
|
+
ExpectationFailed: 417,
|
3057
|
+
ImATeapot: 418,
|
3058
|
+
MisdirectedRequest: 421,
|
3059
|
+
UnprocessableEntity: 422,
|
3060
|
+
Locked: 423,
|
3061
|
+
FailedDependency: 424,
|
3062
|
+
TooEarly: 425,
|
3063
|
+
UpgradeRequired: 426,
|
3064
|
+
PreconditionRequired: 428,
|
3065
|
+
TooManyRequests: 429,
|
3066
|
+
RequestHeaderFieldsTooLarge: 431,
|
3067
|
+
UnavailableForLegalReasons: 451,
|
3068
|
+
InternalServerError: 500,
|
3069
|
+
NotImplemented: 501,
|
3070
|
+
BadGateway: 502,
|
3071
|
+
ServiceUnavailable: 503,
|
3072
|
+
GatewayTimeout: 504,
|
3073
|
+
HttpVersionNotSupported: 505,
|
3074
|
+
VariantAlsoNegotiates: 506,
|
3075
|
+
InsufficientStorage: 507,
|
3076
|
+
LoopDetected: 508,
|
3077
|
+
NotExtended: 510,
|
3078
|
+
NetworkAuthenticationRequired: 511,
|
3079
|
+
};
|
3080
|
+
|
3081
|
+
Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
|
3082
|
+
HttpStatusCode$1[value] = key;
|
3083
|
+
});
|
3084
|
+
|
3085
|
+
const HttpStatusCode$2 = HttpStatusCode$1;
|
3086
|
+
|
3010
3087
|
/**
|
3011
3088
|
* Create an instance of Axios
|
3012
3089
|
*
|
@@ -3068,6 +3145,8 @@ axios.AxiosHeaders = AxiosHeaders$2;
|
|
3068
3145
|
|
3069
3146
|
axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
3070
3147
|
|
3148
|
+
axios.HttpStatusCode = HttpStatusCode$2;
|
3149
|
+
|
3071
3150
|
axios.default = axios;
|
3072
3151
|
|
3073
3152
|
// this module should only have a default export
|
@@ -3089,9 +3168,10 @@ const {
|
|
3089
3168
|
spread,
|
3090
3169
|
toFormData,
|
3091
3170
|
AxiosHeaders,
|
3171
|
+
HttpStatusCode,
|
3092
3172
|
formToJSON,
|
3093
3173
|
mergeConfig
|
3094
3174
|
} = axios$1;
|
3095
3175
|
|
3096
|
-
export { Axios, AxiosError, AxiosHeaders, Cancel, CancelToken, CanceledError, VERSION, all, axios$1 as default, formToJSON, isAxiosError, isCancel, mergeConfig, spread, toFormData };
|
3176
|
+
export { Axios, AxiosError, AxiosHeaders, Cancel, CancelToken, CanceledError, HttpStatusCode, VERSION, all, axios$1 as default, formToJSON, isAxiosError, isCancel, mergeConfig, spread, toFormData };
|
3097
3177
|
//# sourceMappingURL=axios.js.map
|