contentful-management 11.54.3 → 11.54.4

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.
@@ -24075,8 +24075,8 @@ class Axios {
24075
24075
 
24076
24076
  if (!synchronousRequestInterceptors) {
24077
24077
  const chain = [_dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].bind(this), undefined];
24078
- chain.unshift.apply(chain, requestInterceptorChain);
24079
- chain.push.apply(chain, responseInterceptorChain);
24078
+ chain.unshift(...requestInterceptorChain);
24079
+ chain.push(...responseInterceptorChain);
24080
24080
  len = chain.length;
24081
24081
 
24082
24082
  promise = Promise.resolve(config);
@@ -24946,7 +24946,7 @@ function mergeConfig(config1, config2) {
24946
24946
  headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
24947
24947
  };
24948
24948
 
24949
- _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
24949
+ _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
24950
24950
  const merge = mergeMap[prop] || mergeDeepProperties;
24951
24951
  const configValue = merge(config1[prop], config2[prop], prop);
24952
24952
  (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
@@ -25257,7 +25257,7 @@ __webpack_require__.r(__webpack_exports__);
25257
25257
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25258
25258
  /* harmony export */ VERSION: function() { return /* binding */ VERSION; }
25259
25259
  /* harmony export */ });
25260
- const VERSION = "1.10.0";
25260
+ const VERSION = "1.11.0";
25261
25261
 
25262
25262
  /***/ }),
25263
25263
 
@@ -26248,7 +26248,7 @@ function throttle(fn, freq) {
26248
26248
  clearTimeout(timer);
26249
26249
  timer = null;
26250
26250
  }
26251
- fn.apply(null, args);
26251
+ fn(...args);
26252
26252
  }
26253
26253
 
26254
26254
  const throttled = (...args) => {
@@ -26536,7 +26536,7 @@ __webpack_require__.r(__webpack_exports__);
26536
26536
 
26537
26537
 
26538
26538
  function toURLEncodedForm(data, options) {
26539
- return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].classes.URLSearchParams(), Object.assign({
26539
+ return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].classes.URLSearchParams(), {
26540
26540
  visitor: function(value, key, path, helpers) {
26541
26541
  if (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isBuffer(value)) {
26542
26542
  this.append(key, value.toString('base64'));
@@ -26544,8 +26544,9 @@ function toURLEncodedForm(data, options) {
26544
26544
  }
26545
26545
 
26546
26546
  return helpers.defaultVisitor.apply(this, arguments);
26547
- }
26548
- }, options));
26547
+ },
26548
+ ...options
26549
+ });
26549
26550
  }
26550
26551
 
26551
26552
 
@@ -27075,6 +27076,27 @@ const isPlainObject = (val) => {
27075
27076
  return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
27076
27077
  }
27077
27078
 
27079
+ /**
27080
+ * Determine if a value is an empty object (safely handles Buffers)
27081
+ *
27082
+ * @param {*} val The value to test
27083
+ *
27084
+ * @returns {boolean} True if value is an empty object, otherwise false
27085
+ */
27086
+ const isEmptyObject = (val) => {
27087
+ // Early return for non-objects or Buffers to prevent RangeError
27088
+ if (!isObject(val) || isBuffer(val)) {
27089
+ return false;
27090
+ }
27091
+
27092
+ try {
27093
+ return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
27094
+ } catch (e) {
27095
+ // Fallback for any other objects that might cause RangeError with Object.keys()
27096
+ return false;
27097
+ }
27098
+ }
27099
+
27078
27100
  /**
27079
27101
  * Determine if a value is a Date
27080
27102
  *
@@ -27197,6 +27219,11 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
27197
27219
  fn.call(null, obj[i], i, obj);
27198
27220
  }
27199
27221
  } else {
27222
+ // Buffer check
27223
+ if (isBuffer(obj)) {
27224
+ return;
27225
+ }
27226
+
27200
27227
  // Iterate over object keys
27201
27228
  const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
27202
27229
  const len = keys.length;
@@ -27210,6 +27237,10 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
27210
27237
  }
27211
27238
 
27212
27239
  function findKey(obj, key) {
27240
+ if (isBuffer(obj)){
27241
+ return null;
27242
+ }
27243
+
27213
27244
  key = key.toLowerCase();
27214
27245
  const keys = Object.keys(obj);
27215
27246
  let i = keys.length;
@@ -27563,6 +27594,11 @@ const toJSONObject = (obj) => {
27563
27594
  return;
27564
27595
  }
27565
27596
 
27597
+ //Buffer check
27598
+ if (isBuffer(source)) {
27599
+ return source;
27600
+ }
27601
+
27566
27602
  if(!('toJSON' in source)) {
27567
27603
  stack[i] = source;
27568
27604
  const target = isArray(source) ? [] : {};
@@ -27634,6 +27670,7 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
27634
27670
  isBoolean,
27635
27671
  isObject,
27636
27672
  isPlainObject,
27673
+ isEmptyObject,
27637
27674
  isReadableStream,
27638
27675
  isRequest,
27639
27676
  isResponse,
@@ -29144,7 +29181,7 @@ function createClient(params) {
29144
29181
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
29145
29182
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
29146
29183
  var userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(// @ts-expect-error
29147
- "".concat(sdkMain, "/").concat("11.54.3"), params.application, params.integration, params.feature);
29184
+ "".concat(sdkMain, "/").concat("11.54.4"), params.application, params.integration, params.feature);
29148
29185
  var adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
29149
29186
  userAgent: userAgent
29150
29187
  }));