contentful-management 11.54.2 → 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.
@@ -1494,7 +1494,7 @@ var getMany = function getMany(http, params) {
1494
1494
  var _params$query$pageUrl, _params$query, _params$query2;
1495
1495
  var url = (_params$query$pageUrl = (_params$query = params.query) === null || _params$query === void 0 ? void 0 : _params$query.pageUrl) !== null && _params$query$pageUrl !== void 0 ? _params$query$pageUrl : basePath(params.organizationId);
1496
1496
  return _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, url, {
1497
- params: (_params$query2 = params.query) !== null && _params$query2 !== void 0 && _params$query2.pageUrl ? {} : params.query
1497
+ params: (_params$query2 = params.query) !== null && _params$query2 !== void 0 && _params$query2.pageUrl ? undefined : params.query
1498
1498
  });
1499
1499
  };
1500
1500
  var getTotal = function getTotal(http, params) {
@@ -1634,11 +1634,10 @@ var getTotal = function getTotal(http, params) {
1634
1634
  function cursorBasedCollection(path, params) {
1635
1635
  var _params$query, _params$query2;
1636
1636
  return (_params$query = params.query) !== null && _params$query !== void 0 && _params$query.pageUrl ? {
1637
- url: (_params$query2 = params.query) === null || _params$query2 === void 0 ? void 0 : _params$query2.pageUrl,
1638
- queryParams: {}
1637
+ url: (_params$query2 = params.query) === null || _params$query2 === void 0 ? void 0 : _params$query2.pageUrl
1639
1638
  } : {
1640
1639
  url: "".concat(basePath(params.organizationId)).concat(path),
1641
- queryParams: params.query || {}
1640
+ queryParams: params.query
1642
1641
  };
1643
1642
  }
1644
1643
 
@@ -24076,8 +24075,8 @@ class Axios {
24076
24075
 
24077
24076
  if (!synchronousRequestInterceptors) {
24078
24077
  const chain = [_dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].bind(this), undefined];
24079
- chain.unshift.apply(chain, requestInterceptorChain);
24080
- chain.push.apply(chain, responseInterceptorChain);
24078
+ chain.unshift(...requestInterceptorChain);
24079
+ chain.push(...responseInterceptorChain);
24081
24080
  len = chain.length;
24082
24081
 
24083
24082
  promise = Promise.resolve(config);
@@ -24947,7 +24946,7 @@ function mergeConfig(config1, config2) {
24947
24946
  headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
24948
24947
  };
24949
24948
 
24950
- _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) {
24951
24950
  const merge = mergeMap[prop] || mergeDeepProperties;
24952
24951
  const configValue = merge(config1[prop], config2[prop], prop);
24953
24952
  (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
@@ -25258,7 +25257,7 @@ __webpack_require__.r(__webpack_exports__);
25258
25257
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25259
25258
  /* harmony export */ VERSION: function() { return /* binding */ VERSION; }
25260
25259
  /* harmony export */ });
25261
- const VERSION = "1.10.0";
25260
+ const VERSION = "1.11.0";
25262
25261
 
25263
25262
  /***/ }),
25264
25263
 
@@ -26249,7 +26248,7 @@ function throttle(fn, freq) {
26249
26248
  clearTimeout(timer);
26250
26249
  timer = null;
26251
26250
  }
26252
- fn.apply(null, args);
26251
+ fn(...args);
26253
26252
  }
26254
26253
 
26255
26254
  const throttled = (...args) => {
@@ -26537,7 +26536,7 @@ __webpack_require__.r(__webpack_exports__);
26537
26536
 
26538
26537
 
26539
26538
  function toURLEncodedForm(data, options) {
26540
- 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(), {
26541
26540
  visitor: function(value, key, path, helpers) {
26542
26541
  if (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isBuffer(value)) {
26543
26542
  this.append(key, value.toString('base64'));
@@ -26545,8 +26544,9 @@ function toURLEncodedForm(data, options) {
26545
26544
  }
26546
26545
 
26547
26546
  return helpers.defaultVisitor.apply(this, arguments);
26548
- }
26549
- }, options));
26547
+ },
26548
+ ...options
26549
+ });
26550
26550
  }
26551
26551
 
26552
26552
 
@@ -27076,6 +27076,27 @@ const isPlainObject = (val) => {
27076
27076
  return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
27077
27077
  }
27078
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
+
27079
27100
  /**
27080
27101
  * Determine if a value is a Date
27081
27102
  *
@@ -27198,6 +27219,11 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
27198
27219
  fn.call(null, obj[i], i, obj);
27199
27220
  }
27200
27221
  } else {
27222
+ // Buffer check
27223
+ if (isBuffer(obj)) {
27224
+ return;
27225
+ }
27226
+
27201
27227
  // Iterate over object keys
27202
27228
  const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
27203
27229
  const len = keys.length;
@@ -27211,6 +27237,10 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
27211
27237
  }
27212
27238
 
27213
27239
  function findKey(obj, key) {
27240
+ if (isBuffer(obj)){
27241
+ return null;
27242
+ }
27243
+
27214
27244
  key = key.toLowerCase();
27215
27245
  const keys = Object.keys(obj);
27216
27246
  let i = keys.length;
@@ -27564,6 +27594,11 @@ const toJSONObject = (obj) => {
27564
27594
  return;
27565
27595
  }
27566
27596
 
27597
+ //Buffer check
27598
+ if (isBuffer(source)) {
27599
+ return source;
27600
+ }
27601
+
27567
27602
  if(!('toJSON' in source)) {
27568
27603
  stack[i] = source;
27569
27604
  const target = isArray(source) ? [] : {};
@@ -27635,6 +27670,7 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
27635
27670
  isBoolean,
27636
27671
  isObject,
27637
27672
  isPlainObject,
27673
+ isEmptyObject,
27638
27674
  isReadableStream,
27639
27675
  isRequest,
27640
27676
  isResponse,
@@ -29145,7 +29181,7 @@ function createClient(params) {
29145
29181
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
29146
29182
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
29147
29183
  var userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(// @ts-expect-error
29148
- "".concat(sdkMain, "/").concat("11.54.2"), params.application, params.integration, params.feature);
29184
+ "".concat(sdkMain, "/").concat("11.54.4"), params.application, params.integration, params.feature);
29149
29185
  var adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
29150
29186
  userAgent: userAgent
29151
29187
  }));