@kontent-ai/core-sdk 10.11.0 → 10.12.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.
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sdkInfo = void 0;
4
4
  exports.sdkInfo = {
5
5
  host: 'npmjs.com',
6
- version: '10.11.0',
6
+ version: '10.12.0',
7
7
  name: '@kontent-ai/core-sdk'
8
8
  };
9
9
  //# sourceMappingURL=sdk-info.generated.js.map
@@ -1,6 +1,6 @@
1
1
  export const sdkInfo = {
2
2
  host: 'npmjs.com',
3
- version: '10.11.0',
3
+ version: '10.12.0',
4
4
  name: '@kontent-ai/core-sdk'
5
5
  };
6
6
  //# sourceMappingURL=sdk-info.generated.js.map
@@ -1,6 +1,6 @@
1
1
  export const sdkInfo = {
2
2
  host: 'npmjs.com',
3
- version: '10.11.0',
3
+ version: '10.12.0',
4
4
  name: '@kontent-ai/core-sdk'
5
5
  };
6
6
  //# sourceMappingURL=sdk-info.generated.js.map
@@ -899,7 +899,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
899
899
  \***************************************************/
900
900
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
901
901
 
902
- /*! Axios v1.9.0 Copyright (c) 2025 Matt Zabriskie and contributors */
902
+ /*! Axios v1.11.0 Copyright (c) 2025 Matt Zabriskie and contributors */
903
903
 
904
904
 
905
905
  function bind(fn, thisArg) {
@@ -1042,6 +1042,27 @@ const isPlainObject = (val) => {
1042
1042
  return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
1043
1043
  };
1044
1044
 
1045
+ /**
1046
+ * Determine if a value is an empty object (safely handles Buffers)
1047
+ *
1048
+ * @param {*} val The value to test
1049
+ *
1050
+ * @returns {boolean} True if value is an empty object, otherwise false
1051
+ */
1052
+ const isEmptyObject = (val) => {
1053
+ // Early return for non-objects or Buffers to prevent RangeError
1054
+ if (!isObject(val) || isBuffer(val)) {
1055
+ return false;
1056
+ }
1057
+
1058
+ try {
1059
+ return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
1060
+ } catch (e) {
1061
+ // Fallback for any other objects that might cause RangeError with Object.keys()
1062
+ return false;
1063
+ }
1064
+ };
1065
+
1045
1066
  /**
1046
1067
  * Determine if a value is a Date
1047
1068
  *
@@ -1164,6 +1185,11 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
1164
1185
  fn.call(null, obj[i], i, obj);
1165
1186
  }
1166
1187
  } else {
1188
+ // Buffer check
1189
+ if (isBuffer(obj)) {
1190
+ return;
1191
+ }
1192
+
1167
1193
  // Iterate over object keys
1168
1194
  const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
1169
1195
  const len = keys.length;
@@ -1177,6 +1203,10 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
1177
1203
  }
1178
1204
 
1179
1205
  function findKey(obj, key) {
1206
+ if (isBuffer(obj)){
1207
+ return null;
1208
+ }
1209
+
1180
1210
  key = key.toLowerCase();
1181
1211
  const keys = Object.keys(obj);
1182
1212
  let i = keys.length;
@@ -1530,6 +1560,11 @@ const toJSONObject = (obj) => {
1530
1560
  return;
1531
1561
  }
1532
1562
 
1563
+ //Buffer check
1564
+ if (isBuffer(source)) {
1565
+ return source;
1566
+ }
1567
+
1533
1568
  if(!('toJSON' in source)) {
1534
1569
  stack[i] = source;
1535
1570
  const target = isArray(source) ? [] : {};
@@ -1601,6 +1636,7 @@ var utils$1 = {
1601
1636
  isBoolean,
1602
1637
  isObject,
1603
1638
  isPlainObject,
1639
+ isEmptyObject,
1604
1640
  isReadableStream,
1605
1641
  isRequest,
1606
1642
  isResponse,
@@ -1865,6 +1901,10 @@ function toFormData(obj, formData, options) {
1865
1901
  return value.toISOString();
1866
1902
  }
1867
1903
 
1904
+ if (utils$1.isBoolean(value)) {
1905
+ return value.toString();
1906
+ }
1907
+
1868
1908
  if (!useBlob && utils$1.isBlob(value)) {
1869
1909
  throw new AxiosError('Blob is not supported. Use a Buffer instead.');
1870
1910
  }
@@ -2228,7 +2268,7 @@ var platform = {
2228
2268
  };
2229
2269
 
2230
2270
  function toURLEncodedForm(data, options) {
2231
- return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
2271
+ return toFormData(data, new platform.classes.URLSearchParams(), {
2232
2272
  visitor: function(value, key, path, helpers) {
2233
2273
  if (platform.isNode && utils$1.isBuffer(value)) {
2234
2274
  this.append(key, value.toString('base64'));
@@ -2236,8 +2276,9 @@ function toURLEncodedForm(data, options) {
2236
2276
  }
2237
2277
 
2238
2278
  return helpers.defaultVisitor.apply(this, arguments);
2239
- }
2240
- }, options));
2279
+ },
2280
+ ...options
2281
+ });
2241
2282
  }
2242
2283
 
2243
2284
  /**
@@ -2990,7 +3031,7 @@ function throttle(fn, freq) {
2990
3031
  clearTimeout(timer);
2991
3032
  timer = null;
2992
3033
  }
2993
- fn.apply(null, args);
3034
+ fn(...args);
2994
3035
  };
2995
3036
 
2996
3037
  const throttled = (...args) => {
@@ -3246,7 +3287,7 @@ function mergeConfig(config1, config2) {
3246
3287
  headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
3247
3288
  };
3248
3289
 
3249
- utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
3290
+ utils$1.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
3250
3291
  const merge = mergeMap[prop] || mergeDeepProperties;
3251
3292
  const configValue = merge(config1[prop], config2[prop], prop);
3252
3293
  (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
@@ -3781,7 +3822,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
3781
3822
  credentials: isCredentialsSupported ? withCredentials : undefined
3782
3823
  });
3783
3824
 
3784
- let response = await fetch(request);
3825
+ let response = await fetch(request, fetchOptions);
3785
3826
 
3786
3827
  const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
3787
3828
 
@@ -3987,7 +4028,7 @@ function dispatchRequest(config) {
3987
4028
  });
3988
4029
  }
3989
4030
 
3990
- const VERSION = "1.9.0";
4031
+ const VERSION = "1.11.0";
3991
4032
 
3992
4033
  const validators$1 = {};
3993
4034
 
@@ -4226,8 +4267,8 @@ class Axios {
4226
4267
 
4227
4268
  if (!synchronousRequestInterceptors) {
4228
4269
  const chain = [dispatchRequest.bind(this), undefined];
4229
- chain.unshift.apply(chain, requestInterceptorChain);
4230
- chain.push.apply(chain, responseInterceptorChain);
4270
+ chain.unshift(...requestInterceptorChain);
4271
+ chain.push(...responseInterceptorChain);
4231
4272
  len = chain.length;
4232
4273
 
4233
4274
  promise = Promise.resolve(config);