contentful-management 11.47.0 → 11.47.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.
@@ -27250,45 +27250,29 @@ function asyncToken(instance, getToken) {
27250
27250
 
27251
27251
  /***/ }),
27252
27252
 
27253
- /***/ "../node_modules/contentful-sdk-core/dist/create-http-client.js":
27254
- /*!**********************************************************************!*\
27255
- !*** ../node_modules/contentful-sdk-core/dist/create-http-client.js ***!
27256
- \**********************************************************************/
27253
+ /***/ "../node_modules/contentful-sdk-core/dist/create-default-options.js":
27254
+ /*!**************************************************************************!*\
27255
+ !*** ../node_modules/contentful-sdk-core/dist/create-default-options.js ***!
27256
+ \**************************************************************************/
27257
27257
  /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
27258
27258
 
27259
27259
  "use strict";
27260
27260
  __webpack_require__.r(__webpack_exports__);
27261
27261
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27262
- /* harmony export */ "default": function() { return /* binding */ createHttpClient; }
27262
+ /* harmony export */ "default": function() { return /* binding */ createDefaultOptions; }
27263
27263
  /* harmony export */ });
27264
- /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/esm/index.mjs");
27265
- /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! qs */ "../node_modules/qs/lib/index.js");
27266
- /* harmony import */ var _async_token_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./async-token.js */ "../node_modules/contentful-sdk-core/dist/async-token.js");
27267
- /* harmony import */ var _rate_limit_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./rate-limit.js */ "../node_modules/contentful-sdk-core/dist/rate-limit.js");
27268
- /* 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");
27269
-
27270
-
27271
-
27272
-
27264
+ /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! qs */ "../node_modules/qs/lib/index.js");
27273
27265
 
27274
27266
  // Matches 'sub.host:port' or 'host:port' and extracts hostname and port
27275
27267
  // Also enforces toplevel domain specified, no spaces and no protocol
27276
27268
  const HOST_REGEX = /^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;
27277
- function copyHttpClientParams(options) {
27278
- const copiedOptions = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(options);
27279
- // httpAgent and httpsAgent cannot be copied because they can contain private fields
27280
- copiedOptions.httpAgent = options.httpAgent;
27281
- copiedOptions.httpsAgent = options.httpsAgent;
27282
- return copiedOptions;
27283
- }
27284
27269
  /**
27285
- * Create pre-configured axios instance
27270
+ * Create default options
27286
27271
  * @private
27287
- * @param {AxiosStatic} axios - Axios library
27288
27272
  * @param {CreateHttpClientParams} options - Initialization parameters for the HTTP client
27289
- * @return {AxiosInstance} Initialized axios instance
27273
+ * @return {DefaultOptions} options to pass to axios
27290
27274
  */
27291
- function createHttpClient(axios, options) {
27275
+ function createDefaultOptions(options) {
27292
27276
  const defaultConfig = {
27293
27277
  insecure: false,
27294
27278
  retryOnError: true,
@@ -27358,7 +27342,7 @@ function createHttpClient(axios, options) {
27358
27342
  maxBodyLength: config.maxBodyLength,
27359
27343
  paramsSerializer: {
27360
27344
  serialize: (params) => {
27361
- return qs__WEBPACK_IMPORTED_MODULE_4__.stringify(params);
27345
+ return qs__WEBPACK_IMPORTED_MODULE_0__.stringify(params);
27362
27346
  },
27363
27347
  },
27364
27348
  // Contentful
@@ -27367,6 +27351,49 @@ function createHttpClient(axios, options) {
27367
27351
  requestLogger: config.requestLogger,
27368
27352
  retryOnError: config.retryOnError,
27369
27353
  };
27354
+ return axiosOptions;
27355
+ }
27356
+
27357
+
27358
+ /***/ }),
27359
+
27360
+ /***/ "../node_modules/contentful-sdk-core/dist/create-http-client.js":
27361
+ /*!**********************************************************************!*\
27362
+ !*** ../node_modules/contentful-sdk-core/dist/create-http-client.js ***!
27363
+ \**********************************************************************/
27364
+ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
27365
+
27366
+ "use strict";
27367
+ __webpack_require__.r(__webpack_exports__);
27368
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27369
+ /* harmony export */ "default": function() { return /* binding */ createHttpClient; }
27370
+ /* harmony export */ });
27371
+ /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/esm/index.mjs");
27372
+ /* harmony import */ var _async_token_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./async-token.js */ "../node_modules/contentful-sdk-core/dist/async-token.js");
27373
+ /* harmony import */ var _rate_limit_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./rate-limit.js */ "../node_modules/contentful-sdk-core/dist/rate-limit.js");
27374
+ /* 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");
27375
+ /* 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");
27376
+
27377
+
27378
+
27379
+
27380
+
27381
+ function copyHttpClientParams(options) {
27382
+ const copiedOptions = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(options);
27383
+ // httpAgent and httpsAgent cannot be copied because they can contain private fields
27384
+ copiedOptions.httpAgent = options.httpAgent;
27385
+ copiedOptions.httpsAgent = options.httpsAgent;
27386
+ return copiedOptions;
27387
+ }
27388
+ /**
27389
+ * Create pre-configured axios instance
27390
+ * @private
27391
+ * @param {AxiosStatic} axios - Axios library
27392
+ * @param {CreateHttpClientParams} options - Initialization parameters for the HTTP client
27393
+ * @return {AxiosInstance} Initialized axios instance
27394
+ */
27395
+ function createHttpClient(axios, options) {
27396
+ const axiosOptions = (0,_create_default_options_js__WEBPACK_IMPORTED_MODULE_4__["default"])(options);
27370
27397
  const instance = axios.create(axiosOptions);
27371
27398
  instance.httpClientParams = options;
27372
27399
  /**
@@ -27389,18 +27416,18 @@ function createHttpClient(axios, options) {
27389
27416
  * Apply interceptors.
27390
27417
  * Please note that the order of interceptors is important
27391
27418
  */
27392
- if (config.onBeforeRequest) {
27393
- instance.interceptors.request.use(config.onBeforeRequest);
27419
+ if (options.onBeforeRequest) {
27420
+ instance.interceptors.request.use(options.onBeforeRequest);
27394
27421
  }
27395
- if (typeof config.accessToken === 'function') {
27396
- (0,_async_token_js__WEBPACK_IMPORTED_MODULE_1__["default"])(instance, config.accessToken);
27422
+ if (typeof options.accessToken === 'function') {
27423
+ (0,_async_token_js__WEBPACK_IMPORTED_MODULE_1__["default"])(instance, options.accessToken);
27397
27424
  }
27398
- if (config.throttle) {
27399
- (0,_rate_limit_throttle_js__WEBPACK_IMPORTED_MODULE_3__["default"])(instance, config.throttle);
27425
+ if (options.throttle) {
27426
+ (0,_rate_limit_throttle_js__WEBPACK_IMPORTED_MODULE_3__["default"])(instance, options.throttle);
27400
27427
  }
27401
- (0,_rate_limit_js__WEBPACK_IMPORTED_MODULE_2__["default"])(instance, config.retryLimit);
27402
- if (config.onError) {
27403
- instance.interceptors.response.use((response) => response, config.onError);
27428
+ (0,_rate_limit_js__WEBPACK_IMPORTED_MODULE_2__["default"])(instance, options.retryLimit);
27429
+ if (options.onError) {
27430
+ instance.interceptors.response.use((response) => response, options.onError);
27404
27431
  }
27405
27432
  return instance;
27406
27433
  }
@@ -27679,6 +27706,7 @@ function getUserAgentHeader(sdk, application, integration, feature) {
27679
27706
  "use strict";
27680
27707
  __webpack_require__.r(__webpack_exports__);
27681
27708
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27709
+ /* harmony export */ createDefaultOptions: function() { return /* reexport safe */ _create_default_options_js__WEBPACK_IMPORTED_MODULE_7__["default"]; },
27682
27710
  /* harmony export */ createHttpClient: function() { return /* reexport safe */ _create_http_client_js__WEBPACK_IMPORTED_MODULE_0__["default"]; },
27683
27711
  /* harmony export */ createRequestConfig: function() { return /* reexport safe */ _create_request_config_js__WEBPACK_IMPORTED_MODULE_1__["default"]; },
27684
27712
  /* harmony export */ enforceObjPath: function() { return /* reexport safe */ _enforce_obj_path_js__WEBPACK_IMPORTED_MODULE_2__["default"]; },
@@ -27694,6 +27722,8 @@ __webpack_require__.r(__webpack_exports__);
27694
27722
  /* 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");
27695
27723
  /* 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");
27696
27724
  /* harmony import */ var _error_handler_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./error-handler.js */ "../node_modules/contentful-sdk-core/dist/error-handler.js");
27725
+ /* 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");
27726
+
27697
27727
 
27698
27728
 
27699
27729
 
@@ -28648,7 +28678,7 @@ function createClient(params) {
28648
28678
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
28649
28679
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
28650
28680
  var userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(// @ts-expect-error
28651
- "".concat(sdkMain, "/").concat("11.47.0"), params.application, params.integration, params.feature);
28681
+ "".concat(sdkMain, "/").concat("11.47.2"), params.application, params.integration, params.feature);
28652
28682
  var adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
28653
28683
  userAgent: userAgent
28654
28684
  }));