contentful-management 11.61.0 → 11.62.0
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.
- package/dist/contentful-management.browser.js +134 -62
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +470 -208
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/adapters/REST/endpoints/environment-template-installation.js +2 -2
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/es-modules/create-environment-template-api.js +6 -3
- package/dist/typings/common-types.d.ts +1 -0
- package/dist/typings/create-environment-template-api.d.ts +3 -1
- package/dist/typings/plain/common-types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2439,9 +2439,9 @@ const getMany = (http, _ref, headers) => {
|
|
|
2439
2439
|
spaceId,
|
|
2440
2440
|
environmentId
|
|
2441
2441
|
} = _ref,
|
|
2442
|
-
|
|
2442
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
2443
2443
|
return _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, apiPath(organizationId, environmentTemplateId, 'template_installations'), {
|
|
2444
|
-
params: _objectSpread(_objectSpread(_objectSpread({},
|
|
2444
|
+
params: _objectSpread(_objectSpread(_objectSpread({}, otherProps), environmentId && {
|
|
2445
2445
|
'environment.sys.id': environmentId
|
|
2446
2446
|
}), spaceId && {
|
|
2447
2447
|
'space.sys.id': spaceId
|
|
@@ -10084,7 +10084,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10084
10084
|
/* harmony export */ });
|
|
10085
10085
|
/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.js");
|
|
10086
10086
|
/* harmony import */ var _entities__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./entities */ "./entities/index.ts");
|
|
10087
|
-
const _excluded = ["spaceId", "environmentId"];
|
|
10087
|
+
const _excluded = ["spaceId", "environmentId", "latestOnly"];
|
|
10088
10088
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10089
10089
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10090
10090
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -10235,6 +10235,7 @@ function createEnvironmentTemplateApi(makeRequest, organizationId) {
|
|
|
10235
10235
|
* Gets a collection of all installations for the environment template
|
|
10236
10236
|
* @param [installationParams.spaceId] - Space ID to filter installations by space and environment
|
|
10237
10237
|
* @param [installationParams.environmentId] - Environment ID to filter installations by space and environment
|
|
10238
|
+
* @param [installationParams.latestOnly] - Boolean flag to only return the latest installation per environment
|
|
10238
10239
|
* @return Promise for a collection of EnvironmentTemplateInstallations
|
|
10239
10240
|
* ```javascript
|
|
10240
10241
|
* const contentful = require('contentful-management')
|
|
@@ -10254,7 +10255,8 @@ function createEnvironmentTemplateApi(makeRequest, organizationId) {
|
|
|
10254
10255
|
getInstallations: function getEnvironmentTemplateInstallations(_ref = {}) {
|
|
10255
10256
|
let {
|
|
10256
10257
|
spaceId,
|
|
10257
|
-
environmentId
|
|
10258
|
+
environmentId,
|
|
10259
|
+
latestOnly
|
|
10258
10260
|
} = _ref,
|
|
10259
10261
|
query = _objectWithoutProperties(_ref, _excluded);
|
|
10260
10262
|
const raw = this.toPlainObject();
|
|
@@ -10268,7 +10270,8 @@ function createEnvironmentTemplateApi(makeRequest, organizationId) {
|
|
|
10268
10270
|
query
|
|
10269
10271
|
}).params),
|
|
10270
10272
|
spaceId,
|
|
10271
|
-
environmentId
|
|
10273
|
+
environmentId,
|
|
10274
|
+
latestOnly
|
|
10272
10275
|
}
|
|
10273
10276
|
}).then(data => wrapEnvironmentTemplateInstallationCollection(makeRequest, data));
|
|
10274
10277
|
},
|
|
@@ -25626,6 +25629,17 @@ module.exports = require("http");
|
|
|
25626
25629
|
|
|
25627
25630
|
/***/ }),
|
|
25628
25631
|
|
|
25632
|
+
/***/ "http2":
|
|
25633
|
+
/*!************************!*\
|
|
25634
|
+
!*** external "http2" ***!
|
|
25635
|
+
\************************/
|
|
25636
|
+
/***/ ((module) => {
|
|
25637
|
+
|
|
25638
|
+
"use strict";
|
|
25639
|
+
module.exports = require("http2");
|
|
25640
|
+
|
|
25641
|
+
/***/ }),
|
|
25642
|
+
|
|
25629
25643
|
/***/ "https":
|
|
25630
25644
|
/*!************************!*\
|
|
25631
25645
|
!*** external "https" ***!
|
|
@@ -25747,79 +25761,124 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25747
25761
|
|
|
25748
25762
|
|
|
25749
25763
|
|
|
25764
|
+
/**
|
|
25765
|
+
* Known adapters mapping.
|
|
25766
|
+
* Provides environment-specific adapters for Axios:
|
|
25767
|
+
* - `http` for Node.js
|
|
25768
|
+
* - `xhr` for browsers
|
|
25769
|
+
* - `fetch` for fetch API-based requests
|
|
25770
|
+
*
|
|
25771
|
+
* @type {Object<string, Function|Object>}
|
|
25772
|
+
*/
|
|
25750
25773
|
const knownAdapters = {
|
|
25751
25774
|
http: _http_js__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
25752
25775
|
xhr: _xhr_js__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
25753
25776
|
fetch: {
|
|
25754
25777
|
get: _fetch_js__WEBPACK_IMPORTED_MODULE_2__.getFetch,
|
|
25755
25778
|
}
|
|
25756
|
-
}
|
|
25779
|
+
};
|
|
25757
25780
|
|
|
25781
|
+
// Assign adapter names for easier debugging and identification
|
|
25758
25782
|
_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(knownAdapters, (fn, value) => {
|
|
25759
25783
|
if (fn) {
|
|
25760
25784
|
try {
|
|
25761
|
-
Object.defineProperty(fn, 'name', {value});
|
|
25785
|
+
Object.defineProperty(fn, 'name', { value });
|
|
25762
25786
|
} catch (e) {
|
|
25763
25787
|
// eslint-disable-next-line no-empty
|
|
25764
25788
|
}
|
|
25765
|
-
Object.defineProperty(fn, 'adapterName', {value});
|
|
25789
|
+
Object.defineProperty(fn, 'adapterName', { value });
|
|
25766
25790
|
}
|
|
25767
25791
|
});
|
|
25768
25792
|
|
|
25793
|
+
/**
|
|
25794
|
+
* Render a rejection reason string for unknown or unsupported adapters
|
|
25795
|
+
*
|
|
25796
|
+
* @param {string} reason
|
|
25797
|
+
* @returns {string}
|
|
25798
|
+
*/
|
|
25769
25799
|
const renderReason = (reason) => `- ${reason}`;
|
|
25770
25800
|
|
|
25801
|
+
/**
|
|
25802
|
+
* Check if the adapter is resolved (function, null, or false)
|
|
25803
|
+
*
|
|
25804
|
+
* @param {Function|null|false} adapter
|
|
25805
|
+
* @returns {boolean}
|
|
25806
|
+
*/
|
|
25771
25807
|
const isResolvedHandle = (adapter) => _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(adapter) || adapter === null || adapter === false;
|
|
25772
25808
|
|
|
25773
|
-
|
|
25774
|
-
|
|
25775
|
-
|
|
25776
|
-
|
|
25777
|
-
|
|
25778
|
-
|
|
25779
|
-
|
|
25809
|
+
/**
|
|
25810
|
+
* Get the first suitable adapter from the provided list.
|
|
25811
|
+
* Tries each adapter in order until a supported one is found.
|
|
25812
|
+
* Throws an AxiosError if no adapter is suitable.
|
|
25813
|
+
*
|
|
25814
|
+
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
|
|
25815
|
+
* @param {Object} config - Axios request configuration
|
|
25816
|
+
* @throws {AxiosError} If no suitable adapter is available
|
|
25817
|
+
* @returns {Function} The resolved adapter function
|
|
25818
|
+
*/
|
|
25819
|
+
function getAdapter(adapters, config) {
|
|
25820
|
+
adapters = _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isArray(adapters) ? adapters : [adapters];
|
|
25780
25821
|
|
|
25781
|
-
|
|
25822
|
+
const { length } = adapters;
|
|
25823
|
+
let nameOrAdapter;
|
|
25824
|
+
let adapter;
|
|
25782
25825
|
|
|
25783
|
-
|
|
25784
|
-
nameOrAdapter = adapters[i];
|
|
25785
|
-
let id;
|
|
25826
|
+
const rejectedReasons = {};
|
|
25786
25827
|
|
|
25787
|
-
|
|
25828
|
+
for (let i = 0; i < length; i++) {
|
|
25829
|
+
nameOrAdapter = adapters[i];
|
|
25830
|
+
let id;
|
|
25788
25831
|
|
|
25789
|
-
|
|
25790
|
-
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
25832
|
+
adapter = nameOrAdapter;
|
|
25791
25833
|
|
|
25792
|
-
|
|
25793
|
-
|
|
25794
|
-
}
|
|
25795
|
-
}
|
|
25834
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
25835
|
+
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
25796
25836
|
|
|
25797
|
-
if (adapter
|
|
25798
|
-
|
|
25837
|
+
if (adapter === undefined) {
|
|
25838
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"](`Unknown adapter '${id}'`);
|
|
25799
25839
|
}
|
|
25840
|
+
}
|
|
25800
25841
|
|
|
25801
|
-
|
|
25842
|
+
if (adapter && (_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
25843
|
+
break;
|
|
25802
25844
|
}
|
|
25803
25845
|
|
|
25804
|
-
|
|
25846
|
+
rejectedReasons[id || '#' + i] = adapter;
|
|
25847
|
+
}
|
|
25805
25848
|
|
|
25806
|
-
|
|
25807
|
-
|
|
25808
|
-
|
|
25809
|
-
)
|
|
25849
|
+
if (!adapter) {
|
|
25850
|
+
const reasons = Object.entries(rejectedReasons)
|
|
25851
|
+
.map(([id, state]) => `adapter ${id} ` +
|
|
25852
|
+
(state === false ? 'is not supported by the environment' : 'is not available in the build')
|
|
25853
|
+
);
|
|
25810
25854
|
|
|
25811
|
-
|
|
25812
|
-
|
|
25813
|
-
|
|
25855
|
+
let s = length ?
|
|
25856
|
+
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
|
|
25857
|
+
'as no adapter specified';
|
|
25814
25858
|
|
|
25815
|
-
|
|
25816
|
-
|
|
25817
|
-
|
|
25818
|
-
|
|
25819
|
-
|
|
25859
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"](
|
|
25860
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
25861
|
+
'ERR_NOT_SUPPORT'
|
|
25862
|
+
);
|
|
25863
|
+
}
|
|
25820
25864
|
|
|
25821
|
-
|
|
25822
|
-
|
|
25865
|
+
return adapter;
|
|
25866
|
+
}
|
|
25867
|
+
|
|
25868
|
+
/**
|
|
25869
|
+
* Exports Axios adapters and utility to resolve an adapter
|
|
25870
|
+
*/
|
|
25871
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
25872
|
+
/**
|
|
25873
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
25874
|
+
* @type {Function}
|
|
25875
|
+
*/
|
|
25876
|
+
getAdapter,
|
|
25877
|
+
|
|
25878
|
+
/**
|
|
25879
|
+
* Exposes all known adapters
|
|
25880
|
+
* @type {Object<string, Function|Object>}
|
|
25881
|
+
*/
|
|
25823
25882
|
adapters: knownAdapters
|
|
25824
25883
|
});
|
|
25825
25884
|
|
|
@@ -26111,7 +26170,7 @@ const factory = (env) => {
|
|
|
26111
26170
|
const seedCache = new Map();
|
|
26112
26171
|
|
|
26113
26172
|
const getFetch = (config) => {
|
|
26114
|
-
let env = config
|
|
26173
|
+
let env = (config && config.env) || {};
|
|
26115
26174
|
const {fetch, Request, Response} = env;
|
|
26116
26175
|
const seeds = [
|
|
26117
26176
|
Request, Response, fetch
|
|
@@ -26151,33 +26210,33 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26151
26210
|
/* harmony export */ __setProxy: () => (/* binding */ __setProxy),
|
|
26152
26211
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
26153
26212
|
/* harmony export */ });
|
|
26154
|
-
/* harmony import */ var
|
|
26155
|
-
/* harmony import */ var
|
|
26156
|
-
/* harmony import */ var
|
|
26157
|
-
/* harmony import */ var
|
|
26158
|
-
/* harmony import */ var
|
|
26159
|
-
/* harmony import */ var
|
|
26160
|
-
/* harmony import */ var
|
|
26161
|
-
/* harmony import */ var
|
|
26162
|
-
/* harmony import */ var
|
|
26163
|
-
/* harmony import */ var
|
|
26164
|
-
/* harmony import */ var
|
|
26165
|
-
/* harmony import */ var
|
|
26166
|
-
/* harmony import */ var
|
|
26167
|
-
/* harmony import */ var
|
|
26168
|
-
/* harmony import */ var
|
|
26169
|
-
/* harmony import */ var
|
|
26170
|
-
/* harmony import */ var
|
|
26171
|
-
/* harmony import */ var
|
|
26172
|
-
/* harmony import */ var
|
|
26173
|
-
/* harmony import */ var
|
|
26174
|
-
/* harmony import */ var
|
|
26175
|
-
/* harmony import */ var
|
|
26176
|
-
/* harmony import */ var
|
|
26177
|
-
/* harmony import */ var
|
|
26178
|
-
/* harmony import */ var
|
|
26179
|
-
/* harmony import */ var
|
|
26180
|
-
|
|
26213
|
+
/* harmony import */ var http2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! http2 */ "http2");
|
|
26214
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./../utils.js */ "../node_modules/axios/lib/utils.js");
|
|
26215
|
+
/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./../core/settle.js */ "../node_modules/axios/lib/core/settle.js");
|
|
26216
|
+
/* harmony import */ var _core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../core/buildFullPath.js */ "../node_modules/axios/lib/core/buildFullPath.js");
|
|
26217
|
+
/* harmony import */ var _helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./../helpers/buildURL.js */ "../node_modules/axios/lib/helpers/buildURL.js");
|
|
26218
|
+
/* harmony import */ var proxy_from_env__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! proxy-from-env */ "../node_modules/proxy-from-env/index.js");
|
|
26219
|
+
/* harmony import */ var http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! http */ "http");
|
|
26220
|
+
/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! https */ "https");
|
|
26221
|
+
/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! util */ "util");
|
|
26222
|
+
/* harmony import */ var follow_redirects__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! follow-redirects */ "../node_modules/follow-redirects/index.js");
|
|
26223
|
+
/* harmony import */ var zlib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! zlib */ "zlib");
|
|
26224
|
+
/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../env/data.js */ "../node_modules/axios/lib/env/data.js");
|
|
26225
|
+
/* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../defaults/transitional.js */ "../node_modules/axios/lib/defaults/transitional.js");
|
|
26226
|
+
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../core/AxiosError.js */ "../node_modules/axios/lib/core/AxiosError.js");
|
|
26227
|
+
/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "../node_modules/axios/lib/cancel/CanceledError.js");
|
|
26228
|
+
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../platform/index.js */ "../node_modules/axios/lib/platform/index.js");
|
|
26229
|
+
/* harmony import */ var _helpers_fromDataURI_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../helpers/fromDataURI.js */ "../node_modules/axios/lib/helpers/fromDataURI.js");
|
|
26230
|
+
/* harmony import */ var stream__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! stream */ "stream");
|
|
26231
|
+
/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "../node_modules/axios/lib/core/AxiosHeaders.js");
|
|
26232
|
+
/* harmony import */ var _helpers_AxiosTransformStream_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../helpers/AxiosTransformStream.js */ "../node_modules/axios/lib/helpers/AxiosTransformStream.js");
|
|
26233
|
+
/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! events */ "events");
|
|
26234
|
+
/* harmony import */ var _helpers_formDataToStream_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../helpers/formDataToStream.js */ "../node_modules/axios/lib/helpers/formDataToStream.js");
|
|
26235
|
+
/* harmony import */ var _helpers_readBlob_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../helpers/readBlob.js */ "../node_modules/axios/lib/helpers/readBlob.js");
|
|
26236
|
+
/* harmony import */ var _helpers_ZlibHeaderTransformStream_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../helpers/ZlibHeaderTransformStream.js */ "../node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js");
|
|
26237
|
+
/* harmony import */ var _helpers_callbackify_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../helpers/callbackify.js */ "../node_modules/axios/lib/helpers/callbackify.js");
|
|
26238
|
+
/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../helpers/progressEventReducer.js */ "../node_modules/axios/lib/helpers/progressEventReducer.js");
|
|
26239
|
+
/* harmony import */ var _helpers_estimateDataURLDecodedBytes_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../helpers/estimateDataURLDecodedBytes.js */ "../node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js");
|
|
26181
26240
|
|
|
26182
26241
|
|
|
26183
26242
|
|
|
@@ -26207,22 +26266,29 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26207
26266
|
|
|
26208
26267
|
|
|
26209
26268
|
const zlibOptions = {
|
|
26210
|
-
flush:
|
|
26211
|
-
finishFlush:
|
|
26269
|
+
flush: zlib__WEBPACK_IMPORTED_MODULE_6__.constants.Z_SYNC_FLUSH,
|
|
26270
|
+
finishFlush: zlib__WEBPACK_IMPORTED_MODULE_6__.constants.Z_SYNC_FLUSH
|
|
26212
26271
|
};
|
|
26213
26272
|
|
|
26214
26273
|
const brotliOptions = {
|
|
26215
|
-
flush:
|
|
26216
|
-
finishFlush:
|
|
26274
|
+
flush: zlib__WEBPACK_IMPORTED_MODULE_6__.constants.BROTLI_OPERATION_FLUSH,
|
|
26275
|
+
finishFlush: zlib__WEBPACK_IMPORTED_MODULE_6__.constants.BROTLI_OPERATION_FLUSH
|
|
26217
26276
|
}
|
|
26218
26277
|
|
|
26219
|
-
const
|
|
26278
|
+
const {
|
|
26279
|
+
HTTP2_HEADER_SCHEME,
|
|
26280
|
+
HTTP2_HEADER_METHOD,
|
|
26281
|
+
HTTP2_HEADER_PATH,
|
|
26282
|
+
HTTP2_HEADER_STATUS
|
|
26283
|
+
} = http2__WEBPACK_IMPORTED_MODULE_0__.constants;
|
|
26220
26284
|
|
|
26221
|
-
const
|
|
26285
|
+
const isBrotliSupported = _utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].isFunction(zlib__WEBPACK_IMPORTED_MODULE_6__.createBrotliDecompress);
|
|
26286
|
+
|
|
26287
|
+
const {http: httpFollow, https: httpsFollow} = follow_redirects__WEBPACK_IMPORTED_MODULE_5__;
|
|
26222
26288
|
|
|
26223
26289
|
const isHttps = /https:?/;
|
|
26224
26290
|
|
|
26225
|
-
const supportedProtocols =
|
|
26291
|
+
const supportedProtocols = _platform_index_js__WEBPACK_IMPORTED_MODULE_10__["default"].protocols.map(protocol => {
|
|
26226
26292
|
return protocol + ':';
|
|
26227
26293
|
});
|
|
26228
26294
|
|
|
@@ -26235,6 +26301,100 @@ const flushOnFinish = (stream, [throttled, flush]) => {
|
|
|
26235
26301
|
return throttled;
|
|
26236
26302
|
}
|
|
26237
26303
|
|
|
26304
|
+
class Http2Sessions {
|
|
26305
|
+
constructor() {
|
|
26306
|
+
this.sessions = Object.create(null);
|
|
26307
|
+
}
|
|
26308
|
+
|
|
26309
|
+
getSession(authority, options) {
|
|
26310
|
+
options = Object.assign({
|
|
26311
|
+
sessionTimeout: 1000
|
|
26312
|
+
}, options);
|
|
26313
|
+
|
|
26314
|
+
let authoritySessions;
|
|
26315
|
+
|
|
26316
|
+
if ((authoritySessions = this.sessions[authority])) {
|
|
26317
|
+
let len = authoritySessions.length;
|
|
26318
|
+
|
|
26319
|
+
for (let i = 0; i < len; i++) {
|
|
26320
|
+
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
26321
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && util__WEBPACK_IMPORTED_MODULE_4__.isDeepStrictEqual(sessionOptions, options)) {
|
|
26322
|
+
return sessionHandle;
|
|
26323
|
+
}
|
|
26324
|
+
}
|
|
26325
|
+
}
|
|
26326
|
+
|
|
26327
|
+
const session = (0,http2__WEBPACK_IMPORTED_MODULE_0__.connect)(authority, options);
|
|
26328
|
+
|
|
26329
|
+
let removed;
|
|
26330
|
+
|
|
26331
|
+
const removeSession = () => {
|
|
26332
|
+
if (removed) {
|
|
26333
|
+
return;
|
|
26334
|
+
}
|
|
26335
|
+
|
|
26336
|
+
removed = true;
|
|
26337
|
+
|
|
26338
|
+
let entries = authoritySessions, len = entries.length, i = len;
|
|
26339
|
+
|
|
26340
|
+
while (i--) {
|
|
26341
|
+
if (entries[i][0] === session) {
|
|
26342
|
+
entries.splice(i, 1);
|
|
26343
|
+
if (len === 1) {
|
|
26344
|
+
delete this.sessions[authority];
|
|
26345
|
+
return;
|
|
26346
|
+
}
|
|
26347
|
+
}
|
|
26348
|
+
}
|
|
26349
|
+
};
|
|
26350
|
+
|
|
26351
|
+
const originalRequestFn = session.request;
|
|
26352
|
+
|
|
26353
|
+
const {sessionTimeout} = options;
|
|
26354
|
+
|
|
26355
|
+
if(sessionTimeout != null) {
|
|
26356
|
+
|
|
26357
|
+
let timer;
|
|
26358
|
+
let streamsCount = 0;
|
|
26359
|
+
|
|
26360
|
+
session.request = function () {
|
|
26361
|
+
const stream = originalRequestFn.apply(this, arguments);
|
|
26362
|
+
|
|
26363
|
+
streamsCount++;
|
|
26364
|
+
|
|
26365
|
+
if (timer) {
|
|
26366
|
+
clearTimeout(timer);
|
|
26367
|
+
timer = null;
|
|
26368
|
+
}
|
|
26369
|
+
|
|
26370
|
+
stream.once('close', () => {
|
|
26371
|
+
if (!--streamsCount) {
|
|
26372
|
+
timer = setTimeout(() => {
|
|
26373
|
+
timer = null;
|
|
26374
|
+
removeSession();
|
|
26375
|
+
}, sessionTimeout);
|
|
26376
|
+
}
|
|
26377
|
+
});
|
|
26378
|
+
|
|
26379
|
+
return stream;
|
|
26380
|
+
}
|
|
26381
|
+
}
|
|
26382
|
+
|
|
26383
|
+
session.once('close', removeSession);
|
|
26384
|
+
|
|
26385
|
+
let entries = this.sessions[authority], entry = [
|
|
26386
|
+
session,
|
|
26387
|
+
options
|
|
26388
|
+
];
|
|
26389
|
+
|
|
26390
|
+
entries ? this.sessions[authority].push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
26391
|
+
|
|
26392
|
+
return session;
|
|
26393
|
+
}
|
|
26394
|
+
}
|
|
26395
|
+
|
|
26396
|
+
const http2Sessions = new Http2Sessions();
|
|
26397
|
+
|
|
26238
26398
|
|
|
26239
26399
|
/**
|
|
26240
26400
|
* If the proxy or config beforeRedirects functions are defined, call them with the options
|
|
@@ -26265,7 +26425,7 @@ function dispatchBeforeRedirect(options, responseDetails) {
|
|
|
26265
26425
|
function setProxy(options, configProxy, location) {
|
|
26266
26426
|
let proxy = configProxy;
|
|
26267
26427
|
if (!proxy && proxy !== false) {
|
|
26268
|
-
const proxyUrl =
|
|
26428
|
+
const proxyUrl = proxy_from_env__WEBPACK_IMPORTED_MODULE_1__.getProxyForUrl(location);
|
|
26269
26429
|
if (proxyUrl) {
|
|
26270
26430
|
proxy = new URL(proxyUrl);
|
|
26271
26431
|
}
|
|
@@ -26306,7 +26466,7 @@ function setProxy(options, configProxy, location) {
|
|
|
26306
26466
|
};
|
|
26307
26467
|
}
|
|
26308
26468
|
|
|
26309
|
-
const isHttpAdapterSupported = typeof process !== 'undefined' &&
|
|
26469
|
+
const isHttpAdapterSupported = typeof process !== 'undefined' && _utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].kindOf(process) === 'process';
|
|
26310
26470
|
|
|
26311
26471
|
// temporary hotfix
|
|
26312
26472
|
|
|
@@ -26336,7 +26496,7 @@ const wrapAsync = (asyncExecutor) => {
|
|
|
26336
26496
|
};
|
|
26337
26497
|
|
|
26338
26498
|
const resolveFamily = ({address, family}) => {
|
|
26339
|
-
if (!
|
|
26499
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].isString(address)) {
|
|
26340
26500
|
throw TypeError('address must be a string');
|
|
26341
26501
|
}
|
|
26342
26502
|
return ({
|
|
@@ -26345,20 +26505,72 @@ const resolveFamily = ({address, family}) => {
|
|
|
26345
26505
|
});
|
|
26346
26506
|
}
|
|
26347
26507
|
|
|
26348
|
-
const buildAddressEntry = (address, family) => resolveFamily(
|
|
26508
|
+
const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].isObject(address) ? address : {address, family});
|
|
26509
|
+
|
|
26510
|
+
const http2Transport = {
|
|
26511
|
+
request(options, cb) {
|
|
26512
|
+
const authority = options.protocol + '//' + options.hostname + ':' + (options.port || 80);
|
|
26513
|
+
|
|
26514
|
+
const {http2Options, headers} = options;
|
|
26515
|
+
|
|
26516
|
+
const session = http2Sessions.getSession(authority, http2Options);
|
|
26517
|
+
|
|
26518
|
+
const http2Headers = {
|
|
26519
|
+
[HTTP2_HEADER_SCHEME]: options.protocol.replace(':', ''),
|
|
26520
|
+
[HTTP2_HEADER_METHOD]: options.method,
|
|
26521
|
+
[HTTP2_HEADER_PATH]: options.path,
|
|
26522
|
+
}
|
|
26523
|
+
|
|
26524
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].forEach(headers, (header, name) => {
|
|
26525
|
+
name.charAt(0) !== ':' && (http2Headers[name] = header);
|
|
26526
|
+
});
|
|
26527
|
+
|
|
26528
|
+
const req = session.request(http2Headers);
|
|
26529
|
+
|
|
26530
|
+
req.once('response', (responseHeaders) => {
|
|
26531
|
+
const response = req; //duplex
|
|
26532
|
+
|
|
26533
|
+
responseHeaders = Object.assign({}, responseHeaders);
|
|
26534
|
+
|
|
26535
|
+
const status = responseHeaders[HTTP2_HEADER_STATUS];
|
|
26536
|
+
|
|
26537
|
+
delete responseHeaders[HTTP2_HEADER_STATUS];
|
|
26538
|
+
|
|
26539
|
+
response.headers = responseHeaders;
|
|
26540
|
+
|
|
26541
|
+
response.statusCode = +status;
|
|
26542
|
+
|
|
26543
|
+
cb(response);
|
|
26544
|
+
})
|
|
26545
|
+
|
|
26546
|
+
return req;
|
|
26547
|
+
}
|
|
26548
|
+
}
|
|
26349
26549
|
|
|
26350
26550
|
/*eslint consistent-return:0*/
|
|
26351
26551
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isHttpAdapterSupported && function httpAdapter(config) {
|
|
26352
26552
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
26353
|
-
let {data, lookup, family} = config;
|
|
26553
|
+
let {data, lookup, family, httpVersion = 1, http2Options} = config;
|
|
26354
26554
|
const {responseType, responseEncoding} = config;
|
|
26355
26555
|
const method = config.method.toUpperCase();
|
|
26356
26556
|
let isDone;
|
|
26357
26557
|
let rejected = false;
|
|
26358
26558
|
let req;
|
|
26359
26559
|
|
|
26560
|
+
httpVersion = +httpVersion;
|
|
26561
|
+
|
|
26562
|
+
if (Number.isNaN(httpVersion)) {
|
|
26563
|
+
throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
|
|
26564
|
+
}
|
|
26565
|
+
|
|
26566
|
+
if (httpVersion !== 1 && httpVersion !== 2) {
|
|
26567
|
+
throw TypeError(`Unsupported protocol version '${httpVersion}'`);
|
|
26568
|
+
}
|
|
26569
|
+
|
|
26570
|
+
const isHttp2 = httpVersion === 2;
|
|
26571
|
+
|
|
26360
26572
|
if (lookup) {
|
|
26361
|
-
const _lookup = (0,
|
|
26573
|
+
const _lookup = (0,_helpers_callbackify_js__WEBPACK_IMPORTED_MODULE_11__["default"])(lookup, (value) => _utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].isArray(value) ? value : [value]);
|
|
26362
26574
|
// hotfix to support opt.all option which is required for node 20.x
|
|
26363
26575
|
lookup = (hostname, opt, cb) => {
|
|
26364
26576
|
_lookup(hostname, opt, (err, arg0, arg1) => {
|
|
@@ -26366,15 +26578,24 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26366
26578
|
return cb(err);
|
|
26367
26579
|
}
|
|
26368
26580
|
|
|
26369
|
-
const addresses =
|
|
26581
|
+
const addresses = _utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
26370
26582
|
|
|
26371
26583
|
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
26372
26584
|
});
|
|
26373
26585
|
}
|
|
26374
26586
|
}
|
|
26375
26587
|
|
|
26376
|
-
|
|
26377
|
-
|
|
26588
|
+
const abortEmitter = new events__WEBPACK_IMPORTED_MODULE_8__.EventEmitter();
|
|
26589
|
+
|
|
26590
|
+
function abort(reason) {
|
|
26591
|
+
try {
|
|
26592
|
+
abortEmitter.emit('abort', !reason || reason.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_12__["default"](null, config, req) : reason);
|
|
26593
|
+
} catch(err) {
|
|
26594
|
+
console.warn('emit error', err);
|
|
26595
|
+
}
|
|
26596
|
+
}
|
|
26597
|
+
|
|
26598
|
+
abortEmitter.once('abort', reject);
|
|
26378
26599
|
|
|
26379
26600
|
const onFinished = () => {
|
|
26380
26601
|
if (config.cancelToken) {
|
|
@@ -26385,33 +26606,44 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26385
26606
|
config.signal.removeEventListener('abort', abort);
|
|
26386
26607
|
}
|
|
26387
26608
|
|
|
26388
|
-
|
|
26609
|
+
abortEmitter.removeAllListeners();
|
|
26389
26610
|
}
|
|
26390
26611
|
|
|
26391
|
-
|
|
26612
|
+
if (config.cancelToken || config.signal) {
|
|
26613
|
+
config.cancelToken && config.cancelToken.subscribe(abort);
|
|
26614
|
+
if (config.signal) {
|
|
26615
|
+
config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort);
|
|
26616
|
+
}
|
|
26617
|
+
}
|
|
26618
|
+
|
|
26619
|
+
onDone((response, isRejected) => {
|
|
26392
26620
|
isDone = true;
|
|
26621
|
+
|
|
26393
26622
|
if (isRejected) {
|
|
26394
26623
|
rejected = true;
|
|
26395
26624
|
onFinished();
|
|
26625
|
+
return;
|
|
26626
|
+
}
|
|
26627
|
+
|
|
26628
|
+
const {data} = response;
|
|
26629
|
+
|
|
26630
|
+
if (data instanceof stream__WEBPACK_IMPORTED_MODULE_7__.Readable || data instanceof stream__WEBPACK_IMPORTED_MODULE_7__.Duplex) {
|
|
26631
|
+
const offListeners = stream__WEBPACK_IMPORTED_MODULE_7__.finished(data, () => {
|
|
26632
|
+
offListeners();
|
|
26633
|
+
onFinished();
|
|
26634
|
+
});
|
|
26635
|
+
} else {
|
|
26636
|
+
onFinished();
|
|
26396
26637
|
}
|
|
26397
26638
|
});
|
|
26398
26639
|
|
|
26399
|
-
function abort(reason) {
|
|
26400
|
-
emitter.emit('abort', !reason || reason.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_11__["default"](null, config, req) : reason);
|
|
26401
|
-
}
|
|
26402
26640
|
|
|
26403
|
-
emitter.once('abort', reject);
|
|
26404
26641
|
|
|
26405
|
-
|
|
26406
|
-
config.cancelToken && config.cancelToken.subscribe(abort);
|
|
26407
|
-
if (config.signal) {
|
|
26408
|
-
config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort);
|
|
26409
|
-
}
|
|
26410
|
-
}
|
|
26642
|
+
|
|
26411
26643
|
|
|
26412
26644
|
// Parse url
|
|
26413
|
-
const fullPath = (0,
|
|
26414
|
-
const parsed = new URL(fullPath,
|
|
26645
|
+
const fullPath = (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_13__["default"])(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
26646
|
+
const parsed = new URL(fullPath, _platform_index_js__WEBPACK_IMPORTED_MODULE_10__["default"].hasBrowserEnv ? _platform_index_js__WEBPACK_IMPORTED_MODULE_10__["default"].origin : undefined);
|
|
26415
26647
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
26416
26648
|
|
|
26417
26649
|
if (protocol === 'data:') {
|
|
@@ -26419,12 +26651,12 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26419
26651
|
if (config.maxContentLength > -1) {
|
|
26420
26652
|
// Use the exact string passed to fromDataURI (config.url); fall back to fullPath if needed.
|
|
26421
26653
|
const dataUrl = String(config.url || fullPath || '');
|
|
26422
|
-
const estimated = (0,
|
|
26654
|
+
const estimated = (0,_helpers_estimateDataURLDecodedBytes_js__WEBPACK_IMPORTED_MODULE_14__["default"])(dataUrl);
|
|
26423
26655
|
|
|
26424
26656
|
if (estimated > config.maxContentLength) {
|
|
26425
|
-
return reject(new
|
|
26657
|
+
return reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"](
|
|
26426
26658
|
'maxContentLength size of ' + config.maxContentLength + ' exceeded',
|
|
26427
|
-
|
|
26659
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"].ERR_BAD_RESPONSE,
|
|
26428
26660
|
config
|
|
26429
26661
|
));
|
|
26430
26662
|
}
|
|
@@ -26433,7 +26665,7 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26433
26665
|
let convertedData;
|
|
26434
26666
|
|
|
26435
26667
|
if (method !== 'GET') {
|
|
26436
|
-
return (0,
|
|
26668
|
+
return (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_16__["default"])(resolve, reject, {
|
|
26437
26669
|
status: 405,
|
|
26438
26670
|
statusText: 'method not allowed',
|
|
26439
26671
|
headers: {},
|
|
@@ -26442,47 +26674,47 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26442
26674
|
}
|
|
26443
26675
|
|
|
26444
26676
|
try {
|
|
26445
|
-
convertedData = (0,
|
|
26677
|
+
convertedData = (0,_helpers_fromDataURI_js__WEBPACK_IMPORTED_MODULE_17__["default"])(config.url, responseType === 'blob', {
|
|
26446
26678
|
Blob: config.env && config.env.Blob
|
|
26447
26679
|
});
|
|
26448
26680
|
} catch (err) {
|
|
26449
|
-
throw
|
|
26681
|
+
throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"].from(err, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"].ERR_BAD_REQUEST, config);
|
|
26450
26682
|
}
|
|
26451
26683
|
|
|
26452
26684
|
if (responseType === 'text') {
|
|
26453
26685
|
convertedData = convertedData.toString(responseEncoding);
|
|
26454
26686
|
|
|
26455
26687
|
if (!responseEncoding || responseEncoding === 'utf8') {
|
|
26456
|
-
convertedData =
|
|
26688
|
+
convertedData = _utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].stripBOM(convertedData);
|
|
26457
26689
|
}
|
|
26458
26690
|
} else if (responseType === 'stream') {
|
|
26459
|
-
convertedData =
|
|
26691
|
+
convertedData = stream__WEBPACK_IMPORTED_MODULE_7__.Readable.from(convertedData);
|
|
26460
26692
|
}
|
|
26461
26693
|
|
|
26462
|
-
return (0,
|
|
26694
|
+
return (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_16__["default"])(resolve, reject, {
|
|
26463
26695
|
data: convertedData,
|
|
26464
26696
|
status: 200,
|
|
26465
26697
|
statusText: 'OK',
|
|
26466
|
-
headers: new
|
|
26698
|
+
headers: new _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_18__["default"](),
|
|
26467
26699
|
config
|
|
26468
26700
|
});
|
|
26469
26701
|
}
|
|
26470
26702
|
|
|
26471
26703
|
if (supportedProtocols.indexOf(protocol) === -1) {
|
|
26472
|
-
return reject(new
|
|
26704
|
+
return reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"](
|
|
26473
26705
|
'Unsupported protocol ' + protocol,
|
|
26474
|
-
|
|
26706
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"].ERR_BAD_REQUEST,
|
|
26475
26707
|
config
|
|
26476
26708
|
));
|
|
26477
26709
|
}
|
|
26478
26710
|
|
|
26479
|
-
const headers =
|
|
26711
|
+
const headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_18__["default"].from(config.headers).normalize();
|
|
26480
26712
|
|
|
26481
26713
|
// Set User-Agent (required by some servers)
|
|
26482
26714
|
// See https://github.com/axios/axios/issues/69
|
|
26483
26715
|
// User-Agent is specified; handle case where no UA header is desired
|
|
26484
26716
|
// Only set header if it hasn't been set in config
|
|
26485
|
-
headers.set('User-Agent', 'axios/' +
|
|
26717
|
+
headers.set('User-Agent', 'axios/' + _env_data_js__WEBPACK_IMPORTED_MODULE_19__.VERSION, false);
|
|
26486
26718
|
|
|
26487
26719
|
const {onUploadProgress, onDownloadProgress} = config;
|
|
26488
26720
|
const maxRate = config.maxRate;
|
|
@@ -26490,42 +26722,42 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26490
26722
|
let maxDownloadRate = undefined;
|
|
26491
26723
|
|
|
26492
26724
|
// support for spec compliant FormData objects
|
|
26493
|
-
if (
|
|
26725
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].isSpecCompliantForm(data)) {
|
|
26494
26726
|
const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
|
|
26495
26727
|
|
|
26496
|
-
data = (0,
|
|
26728
|
+
data = (0,_helpers_formDataToStream_js__WEBPACK_IMPORTED_MODULE_20__["default"])(data, (formHeaders) => {
|
|
26497
26729
|
headers.set(formHeaders);
|
|
26498
26730
|
}, {
|
|
26499
|
-
tag: `axios-${
|
|
26731
|
+
tag: `axios-${_env_data_js__WEBPACK_IMPORTED_MODULE_19__.VERSION}-boundary`,
|
|
26500
26732
|
boundary: userBoundary && userBoundary[1] || undefined
|
|
26501
26733
|
});
|
|
26502
26734
|
// support for https://www.npmjs.com/package/form-data api
|
|
26503
|
-
} else if (
|
|
26735
|
+
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].isFormData(data) && _utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].isFunction(data.getHeaders)) {
|
|
26504
26736
|
headers.set(data.getHeaders());
|
|
26505
26737
|
|
|
26506
26738
|
if (!headers.hasContentLength()) {
|
|
26507
26739
|
try {
|
|
26508
|
-
const knownLength = await
|
|
26740
|
+
const knownLength = await util__WEBPACK_IMPORTED_MODULE_4__.promisify(data.getLength).call(data);
|
|
26509
26741
|
Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
|
|
26510
26742
|
/*eslint no-empty:0*/
|
|
26511
26743
|
} catch (e) {
|
|
26512
26744
|
}
|
|
26513
26745
|
}
|
|
26514
|
-
} else if (
|
|
26746
|
+
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].isBlob(data) || _utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].isFile(data)) {
|
|
26515
26747
|
data.size && headers.setContentType(data.type || 'application/octet-stream');
|
|
26516
26748
|
headers.setContentLength(data.size || 0);
|
|
26517
|
-
data =
|
|
26518
|
-
} else if (data && !
|
|
26749
|
+
data = stream__WEBPACK_IMPORTED_MODULE_7__.Readable.from((0,_helpers_readBlob_js__WEBPACK_IMPORTED_MODULE_21__["default"])(data));
|
|
26750
|
+
} else if (data && !_utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].isStream(data)) {
|
|
26519
26751
|
if (Buffer.isBuffer(data)) {
|
|
26520
26752
|
// Nothing to do...
|
|
26521
|
-
} else if (
|
|
26753
|
+
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].isArrayBuffer(data)) {
|
|
26522
26754
|
data = Buffer.from(new Uint8Array(data));
|
|
26523
|
-
} else if (
|
|
26755
|
+
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].isString(data)) {
|
|
26524
26756
|
data = Buffer.from(data, 'utf-8');
|
|
26525
26757
|
} else {
|
|
26526
|
-
return reject(new
|
|
26758
|
+
return reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"](
|
|
26527
26759
|
'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',
|
|
26528
|
-
|
|
26760
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"].ERR_BAD_REQUEST,
|
|
26529
26761
|
config
|
|
26530
26762
|
));
|
|
26531
26763
|
}
|
|
@@ -26534,17 +26766,17 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26534
26766
|
headers.setContentLength(data.length, false);
|
|
26535
26767
|
|
|
26536
26768
|
if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
|
|
26537
|
-
return reject(new
|
|
26769
|
+
return reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"](
|
|
26538
26770
|
'Request body larger than maxBodyLength limit',
|
|
26539
|
-
|
|
26771
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"].ERR_BAD_REQUEST,
|
|
26540
26772
|
config
|
|
26541
26773
|
));
|
|
26542
26774
|
}
|
|
26543
26775
|
}
|
|
26544
26776
|
|
|
26545
|
-
const contentLength =
|
|
26777
|
+
const contentLength = _utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].toFiniteNumber(headers.getContentLength());
|
|
26546
26778
|
|
|
26547
|
-
if (
|
|
26779
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].isArray(maxRate)) {
|
|
26548
26780
|
maxUploadRate = maxRate[0];
|
|
26549
26781
|
maxDownloadRate = maxRate[1];
|
|
26550
26782
|
} else {
|
|
@@ -26552,19 +26784,19 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26552
26784
|
}
|
|
26553
26785
|
|
|
26554
26786
|
if (data && (onUploadProgress || maxUploadRate)) {
|
|
26555
|
-
if (!
|
|
26556
|
-
data =
|
|
26787
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].isStream(data)) {
|
|
26788
|
+
data = stream__WEBPACK_IMPORTED_MODULE_7__.Readable.from(data, {objectMode: false});
|
|
26557
26789
|
}
|
|
26558
26790
|
|
|
26559
|
-
data =
|
|
26560
|
-
maxRate:
|
|
26561
|
-
})],
|
|
26791
|
+
data = stream__WEBPACK_IMPORTED_MODULE_7__.pipeline([data, new _helpers_AxiosTransformStream_js__WEBPACK_IMPORTED_MODULE_22__["default"]({
|
|
26792
|
+
maxRate: _utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].toFiniteNumber(maxUploadRate)
|
|
26793
|
+
})], _utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].noop);
|
|
26562
26794
|
|
|
26563
26795
|
onUploadProgress && data.on('progress', flushOnFinish(
|
|
26564
26796
|
data,
|
|
26565
|
-
(0,
|
|
26797
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_23__.progressEventDecorator)(
|
|
26566
26798
|
contentLength,
|
|
26567
|
-
(0,
|
|
26799
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_23__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_23__.asyncDecorator)(onUploadProgress), false, 3)
|
|
26568
26800
|
)
|
|
26569
26801
|
));
|
|
26570
26802
|
}
|
|
@@ -26588,7 +26820,7 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26588
26820
|
let path;
|
|
26589
26821
|
|
|
26590
26822
|
try {
|
|
26591
|
-
path = (0,
|
|
26823
|
+
path = (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_24__["default"])(
|
|
26592
26824
|
parsed.pathname + parsed.search,
|
|
26593
26825
|
config.params,
|
|
26594
26826
|
config.paramsSerializer
|
|
@@ -26615,11 +26847,12 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26615
26847
|
protocol,
|
|
26616
26848
|
family,
|
|
26617
26849
|
beforeRedirect: dispatchBeforeRedirect,
|
|
26618
|
-
beforeRedirects: {}
|
|
26850
|
+
beforeRedirects: {},
|
|
26851
|
+
http2Options
|
|
26619
26852
|
};
|
|
26620
26853
|
|
|
26621
26854
|
// cacheable-lookup integration hotfix
|
|
26622
|
-
!
|
|
26855
|
+
!_utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].isUndefined(lookup) && (options.lookup = lookup);
|
|
26623
26856
|
|
|
26624
26857
|
if (config.socketPath) {
|
|
26625
26858
|
options.socketPath = config.socketPath;
|
|
@@ -26632,18 +26865,23 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26632
26865
|
let transport;
|
|
26633
26866
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
26634
26867
|
options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
|
|
26635
|
-
|
|
26636
|
-
|
|
26637
|
-
|
|
26638
|
-
transport = isHttpsRequest ? https__WEBPACK_IMPORTED_MODULE_2__ : http__WEBPACK_IMPORTED_MODULE_1__;
|
|
26868
|
+
|
|
26869
|
+
if (isHttp2) {
|
|
26870
|
+
transport = http2Transport;
|
|
26639
26871
|
} else {
|
|
26640
|
-
if (config.
|
|
26641
|
-
|
|
26642
|
-
}
|
|
26643
|
-
|
|
26644
|
-
|
|
26872
|
+
if (config.transport) {
|
|
26873
|
+
transport = config.transport;
|
|
26874
|
+
} else if (config.maxRedirects === 0) {
|
|
26875
|
+
transport = isHttpsRequest ? https__WEBPACK_IMPORTED_MODULE_3__ : http__WEBPACK_IMPORTED_MODULE_2__;
|
|
26876
|
+
} else {
|
|
26877
|
+
if (config.maxRedirects) {
|
|
26878
|
+
options.maxRedirects = config.maxRedirects;
|
|
26879
|
+
}
|
|
26880
|
+
if (config.beforeRedirect) {
|
|
26881
|
+
options.beforeRedirects.config = config.beforeRedirect;
|
|
26882
|
+
}
|
|
26883
|
+
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
26645
26884
|
}
|
|
26646
|
-
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
26647
26885
|
}
|
|
26648
26886
|
|
|
26649
26887
|
if (config.maxBodyLength > -1) {
|
|
@@ -26663,18 +26901,18 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26663
26901
|
|
|
26664
26902
|
const streams = [res];
|
|
26665
26903
|
|
|
26666
|
-
const responseLength =
|
|
26904
|
+
const responseLength = _utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].toFiniteNumber(res.headers['content-length']);
|
|
26667
26905
|
|
|
26668
26906
|
if (onDownloadProgress || maxDownloadRate) {
|
|
26669
|
-
const transformStream = new
|
|
26670
|
-
maxRate:
|
|
26907
|
+
const transformStream = new _helpers_AxiosTransformStream_js__WEBPACK_IMPORTED_MODULE_22__["default"]({
|
|
26908
|
+
maxRate: _utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].toFiniteNumber(maxDownloadRate)
|
|
26671
26909
|
});
|
|
26672
26910
|
|
|
26673
26911
|
onDownloadProgress && transformStream.on('progress', flushOnFinish(
|
|
26674
26912
|
transformStream,
|
|
26675
|
-
(0,
|
|
26913
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_23__.progressEventDecorator)(
|
|
26676
26914
|
responseLength,
|
|
26677
|
-
(0,
|
|
26915
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_23__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_23__.asyncDecorator)(onDownloadProgress), true, 3)
|
|
26678
26916
|
)
|
|
26679
26917
|
));
|
|
26680
26918
|
|
|
@@ -26702,46 +26940,43 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26702
26940
|
case 'compress':
|
|
26703
26941
|
case 'x-compress':
|
|
26704
26942
|
// add the unzipper to the body stream processing pipeline
|
|
26705
|
-
streams.push(
|
|
26943
|
+
streams.push(zlib__WEBPACK_IMPORTED_MODULE_6__.createUnzip(zlibOptions));
|
|
26706
26944
|
|
|
26707
26945
|
// remove the content-encoding in order to not confuse downstream operations
|
|
26708
26946
|
delete res.headers['content-encoding'];
|
|
26709
26947
|
break;
|
|
26710
26948
|
case 'deflate':
|
|
26711
|
-
streams.push(new
|
|
26949
|
+
streams.push(new _helpers_ZlibHeaderTransformStream_js__WEBPACK_IMPORTED_MODULE_25__["default"]());
|
|
26712
26950
|
|
|
26713
26951
|
// add the unzipper to the body stream processing pipeline
|
|
26714
|
-
streams.push(
|
|
26952
|
+
streams.push(zlib__WEBPACK_IMPORTED_MODULE_6__.createUnzip(zlibOptions));
|
|
26715
26953
|
|
|
26716
26954
|
// remove the content-encoding in order to not confuse downstream operations
|
|
26717
26955
|
delete res.headers['content-encoding'];
|
|
26718
26956
|
break;
|
|
26719
26957
|
case 'br':
|
|
26720
26958
|
if (isBrotliSupported) {
|
|
26721
|
-
streams.push(
|
|
26959
|
+
streams.push(zlib__WEBPACK_IMPORTED_MODULE_6__.createBrotliDecompress(brotliOptions));
|
|
26722
26960
|
delete res.headers['content-encoding'];
|
|
26723
26961
|
}
|
|
26724
26962
|
}
|
|
26725
26963
|
}
|
|
26726
26964
|
|
|
26727
|
-
responseStream = streams.length > 1 ?
|
|
26965
|
+
responseStream = streams.length > 1 ? stream__WEBPACK_IMPORTED_MODULE_7__.pipeline(streams, _utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].noop) : streams[0];
|
|
26966
|
+
|
|
26728
26967
|
|
|
26729
|
-
const offListeners = stream__WEBPACK_IMPORTED_MODULE_6__.finished(responseStream, () => {
|
|
26730
|
-
offListeners();
|
|
26731
|
-
onFinished();
|
|
26732
|
-
});
|
|
26733
26968
|
|
|
26734
26969
|
const response = {
|
|
26735
26970
|
status: res.statusCode,
|
|
26736
26971
|
statusText: res.statusMessage,
|
|
26737
|
-
headers: new
|
|
26972
|
+
headers: new _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_18__["default"](res.headers),
|
|
26738
26973
|
config,
|
|
26739
26974
|
request: lastRequest
|
|
26740
26975
|
};
|
|
26741
26976
|
|
|
26742
26977
|
if (responseType === 'stream') {
|
|
26743
26978
|
response.data = responseStream;
|
|
26744
|
-
(0,
|
|
26979
|
+
(0,_core_settle_js__WEBPACK_IMPORTED_MODULE_16__["default"])(resolve, reject, response);
|
|
26745
26980
|
} else {
|
|
26746
26981
|
const responseBuffer = [];
|
|
26747
26982
|
let totalResponseBytes = 0;
|
|
@@ -26755,8 +26990,8 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26755
26990
|
// stream.destroy() emit aborted event before calling reject() on Node.js v16
|
|
26756
26991
|
rejected = true;
|
|
26757
26992
|
responseStream.destroy();
|
|
26758
|
-
|
|
26759
|
-
|
|
26993
|
+
abort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"]('maxContentLength size of ' + config.maxContentLength + ' exceeded',
|
|
26994
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"].ERR_BAD_RESPONSE, config, lastRequest));
|
|
26760
26995
|
}
|
|
26761
26996
|
});
|
|
26762
26997
|
|
|
@@ -26765,9 +27000,9 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26765
27000
|
return;
|
|
26766
27001
|
}
|
|
26767
27002
|
|
|
26768
|
-
const err = new
|
|
27003
|
+
const err = new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"](
|
|
26769
27004
|
'stream has been aborted',
|
|
26770
|
-
|
|
27005
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"].ERR_BAD_RESPONSE,
|
|
26771
27006
|
config,
|
|
26772
27007
|
lastRequest
|
|
26773
27008
|
);
|
|
@@ -26777,7 +27012,7 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26777
27012
|
|
|
26778
27013
|
responseStream.on('error', function handleStreamError(err) {
|
|
26779
27014
|
if (req.destroyed) return;
|
|
26780
|
-
reject(
|
|
27015
|
+
reject(_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"].from(err, null, config, lastRequest));
|
|
26781
27016
|
});
|
|
26782
27017
|
|
|
26783
27018
|
responseStream.on('end', function handleStreamEnd() {
|
|
@@ -26786,18 +27021,18 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26786
27021
|
if (responseType !== 'arraybuffer') {
|
|
26787
27022
|
responseData = responseData.toString(responseEncoding);
|
|
26788
27023
|
if (!responseEncoding || responseEncoding === 'utf8') {
|
|
26789
|
-
responseData =
|
|
27024
|
+
responseData = _utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].stripBOM(responseData);
|
|
26790
27025
|
}
|
|
26791
27026
|
}
|
|
26792
27027
|
response.data = responseData;
|
|
26793
27028
|
} catch (err) {
|
|
26794
|
-
return reject(
|
|
27029
|
+
return reject(_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"].from(err, null, config, response.request, response));
|
|
26795
27030
|
}
|
|
26796
|
-
(0,
|
|
27031
|
+
(0,_core_settle_js__WEBPACK_IMPORTED_MODULE_16__["default"])(resolve, reject, response);
|
|
26797
27032
|
});
|
|
26798
27033
|
}
|
|
26799
27034
|
|
|
26800
|
-
|
|
27035
|
+
abortEmitter.once('abort', err => {
|
|
26801
27036
|
if (!responseStream.destroyed) {
|
|
26802
27037
|
responseStream.emit('error', err);
|
|
26803
27038
|
responseStream.destroy();
|
|
@@ -26805,16 +27040,19 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26805
27040
|
});
|
|
26806
27041
|
});
|
|
26807
27042
|
|
|
26808
|
-
|
|
26809
|
-
|
|
26810
|
-
|
|
27043
|
+
abortEmitter.once('abort', err => {
|
|
27044
|
+
if (req.close) {
|
|
27045
|
+
req.close();
|
|
27046
|
+
} else {
|
|
27047
|
+
req.destroy(err);
|
|
27048
|
+
}
|
|
26811
27049
|
});
|
|
26812
27050
|
|
|
26813
27051
|
// Handle errors
|
|
26814
27052
|
req.on('error', function handleRequestError(err) {
|
|
26815
27053
|
// @todo remove
|
|
26816
27054
|
// if (req.aborted && err.code !== AxiosError.ERR_FR_TOO_MANY_REDIRECTS) return;
|
|
26817
|
-
reject(
|
|
27055
|
+
reject(_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"].from(err, null, config, req));
|
|
26818
27056
|
});
|
|
26819
27057
|
|
|
26820
27058
|
// set tcp keep alive to prevent drop connection by peer
|
|
@@ -26829,9 +27067,9 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26829
27067
|
const timeout = parseInt(config.timeout, 10);
|
|
26830
27068
|
|
|
26831
27069
|
if (Number.isNaN(timeout)) {
|
|
26832
|
-
|
|
27070
|
+
abort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"](
|
|
26833
27071
|
'error trying to parse `config.timeout` to int',
|
|
26834
|
-
|
|
27072
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"].ERR_BAD_OPTION_VALUE,
|
|
26835
27073
|
config,
|
|
26836
27074
|
req
|
|
26837
27075
|
));
|
|
@@ -26847,23 +27085,22 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26847
27085
|
req.setTimeout(timeout, function handleRequestTimeout() {
|
|
26848
27086
|
if (isDone) return;
|
|
26849
27087
|
let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
26850
|
-
const transitional = config.transitional ||
|
|
27088
|
+
const transitional = config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_26__["default"];
|
|
26851
27089
|
if (config.timeoutErrorMessage) {
|
|
26852
27090
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
26853
27091
|
}
|
|
26854
|
-
|
|
27092
|
+
abort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"](
|
|
26855
27093
|
timeoutErrorMessage,
|
|
26856
|
-
transitional.clarifyTimeoutError ?
|
|
27094
|
+
transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"].ECONNABORTED,
|
|
26857
27095
|
config,
|
|
26858
27096
|
req
|
|
26859
27097
|
));
|
|
26860
|
-
abort();
|
|
26861
27098
|
});
|
|
26862
27099
|
}
|
|
26863
27100
|
|
|
26864
27101
|
|
|
26865
27102
|
// Send the request
|
|
26866
|
-
if (
|
|
27103
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_9__["default"].isStream(data)) {
|
|
26867
27104
|
let ended = false;
|
|
26868
27105
|
let errored = false;
|
|
26869
27106
|
|
|
@@ -26878,13 +27115,14 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
26878
27115
|
|
|
26879
27116
|
data.on('close', () => {
|
|
26880
27117
|
if (!ended && !errored) {
|
|
26881
|
-
abort(new
|
|
27118
|
+
abort(new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_12__["default"]('Request stream has been aborted', config, req));
|
|
26882
27119
|
}
|
|
26883
27120
|
});
|
|
26884
27121
|
|
|
26885
27122
|
data.pipe(req);
|
|
26886
27123
|
} else {
|
|
26887
|
-
req.
|
|
27124
|
+
data && req.write(data);
|
|
27125
|
+
req.end();
|
|
26888
27126
|
}
|
|
26889
27127
|
});
|
|
26890
27128
|
});
|
|
@@ -28217,7 +28455,7 @@ class InterceptorManager {
|
|
|
28217
28455
|
*
|
|
28218
28456
|
* @param {Number} id The ID that was returned by `use`
|
|
28219
28457
|
*
|
|
28220
|
-
* @returns {
|
|
28458
|
+
* @returns {void}
|
|
28221
28459
|
*/
|
|
28222
28460
|
eject(id) {
|
|
28223
28461
|
if (this.handlers[id]) {
|
|
@@ -28447,11 +28685,11 @@ function mergeConfig(config1, config2) {
|
|
|
28447
28685
|
}
|
|
28448
28686
|
|
|
28449
28687
|
// eslint-disable-next-line consistent-return
|
|
28450
|
-
function mergeDeepProperties(a, b, prop
|
|
28688
|
+
function mergeDeepProperties(a, b, prop, caseless) {
|
|
28451
28689
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) {
|
|
28452
|
-
return getMergedValue(a, b, prop
|
|
28690
|
+
return getMergedValue(a, b, prop, caseless);
|
|
28453
28691
|
} else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) {
|
|
28454
|
-
return getMergedValue(undefined, a, prop
|
|
28692
|
+
return getMergedValue(undefined, a, prop, caseless);
|
|
28455
28693
|
}
|
|
28456
28694
|
}
|
|
28457
28695
|
|
|
@@ -28509,7 +28747,7 @@ function mergeConfig(config1, config2) {
|
|
|
28509
28747
|
socketPath: defaultToConfig2,
|
|
28510
28748
|
responseEncoding: defaultToConfig2,
|
|
28511
28749
|
validateStatus: mergeDirectKeys,
|
|
28512
|
-
headers: (a, b
|
|
28750
|
+
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
28513
28751
|
};
|
|
28514
28752
|
|
|
28515
28753
|
_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
|
|
@@ -28829,7 +29067,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28829
29067
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
28830
29068
|
/* harmony export */ VERSION: () => (/* binding */ VERSION)
|
|
28831
29069
|
/* harmony export */ });
|
|
28832
|
-
const VERSION = "1.
|
|
29070
|
+
const VERSION = "1.13.1";
|
|
28833
29071
|
|
|
28834
29072
|
/***/ }),
|
|
28835
29073
|
|
|
@@ -29142,6 +29380,12 @@ const HttpStatusCode = {
|
|
|
29142
29380
|
LoopDetected: 508,
|
|
29143
29381
|
NotExtended: 510,
|
|
29144
29382
|
NetworkAuthenticationRequired: 511,
|
|
29383
|
+
WebServerIsDown: 521,
|
|
29384
|
+
ConnectionTimedOut: 522,
|
|
29385
|
+
OriginIsUnreachable: 523,
|
|
29386
|
+
TimeoutOccurred: 524,
|
|
29387
|
+
SslHandshakeFailed: 525,
|
|
29388
|
+
InvalidSslCertificate: 526,
|
|
29145
29389
|
};
|
|
29146
29390
|
|
|
29147
29391
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
@@ -29210,6 +29454,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29210
29454
|
/* harmony export */ });
|
|
29211
29455
|
|
|
29212
29456
|
|
|
29457
|
+
/**
|
|
29458
|
+
* Create a bound version of a function with a specified `this` context
|
|
29459
|
+
*
|
|
29460
|
+
* @param {Function} fn - The function to bind
|
|
29461
|
+
* @param {*} thisArg - The value to be passed as the `this` parameter
|
|
29462
|
+
* @returns {Function} A new function that will call the original function with the specified `this` context
|
|
29463
|
+
*/
|
|
29213
29464
|
function bind(fn, thisArg) {
|
|
29214
29465
|
return function wrap() {
|
|
29215
29466
|
return fn.apply(thisArg, arguments);
|
|
@@ -29451,27 +29702,38 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29451
29702
|
|
|
29452
29703
|
// Standard browser envs support document.cookie
|
|
29453
29704
|
{
|
|
29454
|
-
write(name, value, expires, path, domain, secure) {
|
|
29455
|
-
|
|
29456
|
-
|
|
29457
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
|
|
29458
|
-
|
|
29459
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(path) && cookie.push('path=' + path);
|
|
29705
|
+
write(name, value, expires, path, domain, secure, sameSite) {
|
|
29706
|
+
if (typeof document === 'undefined') return;
|
|
29460
29707
|
|
|
29461
|
-
|
|
29708
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
29462
29709
|
|
|
29463
|
-
|
|
29710
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(expires)) {
|
|
29711
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
29712
|
+
}
|
|
29713
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(path)) {
|
|
29714
|
+
cookie.push(`path=${path}`);
|
|
29715
|
+
}
|
|
29716
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(domain)) {
|
|
29717
|
+
cookie.push(`domain=${domain}`);
|
|
29718
|
+
}
|
|
29719
|
+
if (secure === true) {
|
|
29720
|
+
cookie.push('secure');
|
|
29721
|
+
}
|
|
29722
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(sameSite)) {
|
|
29723
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
29724
|
+
}
|
|
29464
29725
|
|
|
29465
29726
|
document.cookie = cookie.join('; ');
|
|
29466
29727
|
},
|
|
29467
29728
|
|
|
29468
29729
|
read(name) {
|
|
29469
|
-
|
|
29470
|
-
|
|
29730
|
+
if (typeof document === 'undefined') return null;
|
|
29731
|
+
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
|
|
29732
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
29471
29733
|
},
|
|
29472
29734
|
|
|
29473
29735
|
remove(name) {
|
|
29474
|
-
this.write(name, '', Date.now() - 86400000);
|
|
29736
|
+
this.write(name, '', Date.now() - 86400000, '/');
|
|
29475
29737
|
}
|
|
29476
29738
|
}
|
|
29477
29739
|
|
|
@@ -33363,7 +33625,7 @@ function createClient(params, opts = {}) {
|
|
|
33363
33625
|
const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
33364
33626
|
const userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(
|
|
33365
33627
|
// @ts-expect-error
|
|
33366
|
-
`${sdkMain}/${"11.
|
|
33628
|
+
`${sdkMain}/${"11.62.0"}`, params.application, params.integration, params.feature);
|
|
33367
33629
|
const adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
|
|
33368
33630
|
userAgent
|
|
33369
33631
|
}));
|