contentful-management 11.46.0 → 11.47.1
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 +66 -36
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +66 -36
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/typings/entities/content-type.d.ts +7 -1
- package/package.json +1 -1
|
@@ -30553,45 +30553,29 @@ function asyncToken(instance, getToken) {
|
|
|
30553
30553
|
|
|
30554
30554
|
/***/ }),
|
|
30555
30555
|
|
|
30556
|
-
/***/ "../node_modules/contentful-sdk-core/dist/create-
|
|
30557
|
-
|
|
30558
|
-
!*** ../node_modules/contentful-sdk-core/dist/create-
|
|
30559
|
-
|
|
30556
|
+
/***/ "../node_modules/contentful-sdk-core/dist/create-default-options.js":
|
|
30557
|
+
/*!**************************************************************************!*\
|
|
30558
|
+
!*** ../node_modules/contentful-sdk-core/dist/create-default-options.js ***!
|
|
30559
|
+
\**************************************************************************/
|
|
30560
30560
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
30561
30561
|
|
|
30562
30562
|
"use strict";
|
|
30563
30563
|
__webpack_require__.r(__webpack_exports__);
|
|
30564
30564
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
30565
|
-
/* harmony export */ "default": () => (/* binding */
|
|
30565
|
+
/* harmony export */ "default": () => (/* binding */ createDefaultOptions)
|
|
30566
30566
|
/* harmony export */ });
|
|
30567
|
-
/* harmony import */ var
|
|
30568
|
-
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! qs */ "../node_modules/qs/lib/index.js");
|
|
30569
|
-
/* harmony import */ var _async_token_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./async-token.js */ "../node_modules/contentful-sdk-core/dist/async-token.js");
|
|
30570
|
-
/* harmony import */ var _rate_limit_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./rate-limit.js */ "../node_modules/contentful-sdk-core/dist/rate-limit.js");
|
|
30571
|
-
/* harmony import */ var _rate_limit_throttle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rate-limit-throttle.js */ "../node_modules/contentful-sdk-core/dist/rate-limit-throttle.js");
|
|
30572
|
-
|
|
30573
|
-
|
|
30574
|
-
|
|
30575
|
-
|
|
30567
|
+
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! qs */ "../node_modules/qs/lib/index.js");
|
|
30576
30568
|
|
|
30577
30569
|
// Matches 'sub.host:port' or 'host:port' and extracts hostname and port
|
|
30578
30570
|
// Also enforces toplevel domain specified, no spaces and no protocol
|
|
30579
30571
|
const HOST_REGEX = /^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;
|
|
30580
|
-
function copyHttpClientParams(options) {
|
|
30581
|
-
const copiedOptions = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(options);
|
|
30582
|
-
// httpAgent and httpsAgent cannot be copied because they can contain private fields
|
|
30583
|
-
copiedOptions.httpAgent = options.httpAgent;
|
|
30584
|
-
copiedOptions.httpsAgent = options.httpsAgent;
|
|
30585
|
-
return copiedOptions;
|
|
30586
|
-
}
|
|
30587
30572
|
/**
|
|
30588
|
-
* Create
|
|
30573
|
+
* Create default options
|
|
30589
30574
|
* @private
|
|
30590
|
-
* @param {AxiosStatic} axios - Axios library
|
|
30591
30575
|
* @param {CreateHttpClientParams} options - Initialization parameters for the HTTP client
|
|
30592
|
-
* @return {
|
|
30576
|
+
* @return {DefaultOptions} options to pass to axios
|
|
30593
30577
|
*/
|
|
30594
|
-
function
|
|
30578
|
+
function createDefaultOptions(options) {
|
|
30595
30579
|
const defaultConfig = {
|
|
30596
30580
|
insecure: false,
|
|
30597
30581
|
retryOnError: true,
|
|
@@ -30661,7 +30645,7 @@ function createHttpClient(axios, options) {
|
|
|
30661
30645
|
maxBodyLength: config.maxBodyLength,
|
|
30662
30646
|
paramsSerializer: {
|
|
30663
30647
|
serialize: (params) => {
|
|
30664
|
-
return
|
|
30648
|
+
return qs__WEBPACK_IMPORTED_MODULE_0__.stringify(params);
|
|
30665
30649
|
},
|
|
30666
30650
|
},
|
|
30667
30651
|
// Contentful
|
|
@@ -30670,6 +30654,49 @@ function createHttpClient(axios, options) {
|
|
|
30670
30654
|
requestLogger: config.requestLogger,
|
|
30671
30655
|
retryOnError: config.retryOnError,
|
|
30672
30656
|
};
|
|
30657
|
+
return axiosOptions;
|
|
30658
|
+
}
|
|
30659
|
+
|
|
30660
|
+
|
|
30661
|
+
/***/ }),
|
|
30662
|
+
|
|
30663
|
+
/***/ "../node_modules/contentful-sdk-core/dist/create-http-client.js":
|
|
30664
|
+
/*!**********************************************************************!*\
|
|
30665
|
+
!*** ../node_modules/contentful-sdk-core/dist/create-http-client.js ***!
|
|
30666
|
+
\**********************************************************************/
|
|
30667
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
30668
|
+
|
|
30669
|
+
"use strict";
|
|
30670
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30671
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
30672
|
+
/* harmony export */ "default": () => (/* binding */ createHttpClient)
|
|
30673
|
+
/* harmony export */ });
|
|
30674
|
+
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/esm/index.mjs");
|
|
30675
|
+
/* harmony import */ var _async_token_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./async-token.js */ "../node_modules/contentful-sdk-core/dist/async-token.js");
|
|
30676
|
+
/* harmony import */ var _rate_limit_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./rate-limit.js */ "../node_modules/contentful-sdk-core/dist/rate-limit.js");
|
|
30677
|
+
/* harmony import */ var _rate_limit_throttle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rate-limit-throttle.js */ "../node_modules/contentful-sdk-core/dist/rate-limit-throttle.js");
|
|
30678
|
+
/* harmony import */ var _create_default_options_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./create-default-options.js */ "../node_modules/contentful-sdk-core/dist/create-default-options.js");
|
|
30679
|
+
|
|
30680
|
+
|
|
30681
|
+
|
|
30682
|
+
|
|
30683
|
+
|
|
30684
|
+
function copyHttpClientParams(options) {
|
|
30685
|
+
const copiedOptions = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(options);
|
|
30686
|
+
// httpAgent and httpsAgent cannot be copied because they can contain private fields
|
|
30687
|
+
copiedOptions.httpAgent = options.httpAgent;
|
|
30688
|
+
copiedOptions.httpsAgent = options.httpsAgent;
|
|
30689
|
+
return copiedOptions;
|
|
30690
|
+
}
|
|
30691
|
+
/**
|
|
30692
|
+
* Create pre-configured axios instance
|
|
30693
|
+
* @private
|
|
30694
|
+
* @param {AxiosStatic} axios - Axios library
|
|
30695
|
+
* @param {CreateHttpClientParams} options - Initialization parameters for the HTTP client
|
|
30696
|
+
* @return {AxiosInstance} Initialized axios instance
|
|
30697
|
+
*/
|
|
30698
|
+
function createHttpClient(axios, options) {
|
|
30699
|
+
const axiosOptions = (0,_create_default_options_js__WEBPACK_IMPORTED_MODULE_4__["default"])(options);
|
|
30673
30700
|
const instance = axios.create(axiosOptions);
|
|
30674
30701
|
instance.httpClientParams = options;
|
|
30675
30702
|
/**
|
|
@@ -30692,18 +30719,18 @@ function createHttpClient(axios, options) {
|
|
|
30692
30719
|
* Apply interceptors.
|
|
30693
30720
|
* Please note that the order of interceptors is important
|
|
30694
30721
|
*/
|
|
30695
|
-
if (
|
|
30696
|
-
instance.interceptors.request.use(
|
|
30722
|
+
if (options.onBeforeRequest) {
|
|
30723
|
+
instance.interceptors.request.use(options.onBeforeRequest);
|
|
30697
30724
|
}
|
|
30698
|
-
if (typeof
|
|
30699
|
-
(0,_async_token_js__WEBPACK_IMPORTED_MODULE_1__["default"])(instance,
|
|
30725
|
+
if (typeof options.accessToken === 'function') {
|
|
30726
|
+
(0,_async_token_js__WEBPACK_IMPORTED_MODULE_1__["default"])(instance, options.accessToken);
|
|
30700
30727
|
}
|
|
30701
|
-
if (
|
|
30702
|
-
(0,_rate_limit_throttle_js__WEBPACK_IMPORTED_MODULE_3__["default"])(instance,
|
|
30728
|
+
if (options.throttle) {
|
|
30729
|
+
(0,_rate_limit_throttle_js__WEBPACK_IMPORTED_MODULE_3__["default"])(instance, options.throttle);
|
|
30703
30730
|
}
|
|
30704
|
-
(0,_rate_limit_js__WEBPACK_IMPORTED_MODULE_2__["default"])(instance,
|
|
30705
|
-
if (
|
|
30706
|
-
instance.interceptors.response.use((response) => response,
|
|
30731
|
+
(0,_rate_limit_js__WEBPACK_IMPORTED_MODULE_2__["default"])(instance, options.retryLimit);
|
|
30732
|
+
if (options.onError) {
|
|
30733
|
+
instance.interceptors.response.use((response) => response, options.onError);
|
|
30707
30734
|
}
|
|
30708
30735
|
return instance;
|
|
30709
30736
|
}
|
|
@@ -30982,6 +31009,7 @@ function getUserAgentHeader(sdk, application, integration, feature) {
|
|
|
30982
31009
|
"use strict";
|
|
30983
31010
|
__webpack_require__.r(__webpack_exports__);
|
|
30984
31011
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
31012
|
+
/* harmony export */ createDefaultOptions: () => (/* reexport safe */ _create_default_options_js__WEBPACK_IMPORTED_MODULE_7__["default"]),
|
|
30985
31013
|
/* harmony export */ createHttpClient: () => (/* reexport safe */ _create_http_client_js__WEBPACK_IMPORTED_MODULE_0__["default"]),
|
|
30986
31014
|
/* harmony export */ createRequestConfig: () => (/* reexport safe */ _create_request_config_js__WEBPACK_IMPORTED_MODULE_1__["default"]),
|
|
30987
31015
|
/* harmony export */ enforceObjPath: () => (/* reexport safe */ _enforce_obj_path_js__WEBPACK_IMPORTED_MODULE_2__["default"]),
|
|
@@ -30997,6 +31025,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30997
31025
|
/* harmony import */ var _get_user_agent_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./get-user-agent.js */ "../node_modules/contentful-sdk-core/dist/get-user-agent.js");
|
|
30998
31026
|
/* harmony import */ var _to_plain_object_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./to-plain-object.js */ "../node_modules/contentful-sdk-core/dist/to-plain-object.js");
|
|
30999
31027
|
/* harmony import */ var _error_handler_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./error-handler.js */ "../node_modules/contentful-sdk-core/dist/error-handler.js");
|
|
31028
|
+
/* harmony import */ var _create_default_options_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./create-default-options.js */ "../node_modules/contentful-sdk-core/dist/create-default-options.js");
|
|
31029
|
+
|
|
31000
31030
|
|
|
31001
31031
|
|
|
31002
31032
|
|
|
@@ -31952,7 +31982,7 @@ function createClient(params, opts = {}) {
|
|
|
31952
31982
|
const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
31953
31983
|
const userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(
|
|
31954
31984
|
// @ts-expect-error
|
|
31955
|
-
`${sdkMain}/${"11.
|
|
31985
|
+
`${sdkMain}/${"11.47.1"}`, params.application, params.integration, params.feature);
|
|
31956
31986
|
const adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
|
|
31957
31987
|
userAgent
|
|
31958
31988
|
}));
|