contentful-management 11.57.1 → 11.57.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.
package/README.md CHANGED
@@ -320,11 +320,11 @@ Your CMA access token.
320
320
 
321
321
  #### host (default: `'api.contentful.com'`)
322
322
 
323
- Set the host used to build the request URI's.
323
+ Set the host used to build the request URIs.
324
324
 
325
325
  #### hostUpload (default: `'upload.contentful.com'`)
326
326
 
327
- Set the host used to build the upload related request uri's.
327
+ Set the host used to build the upload related request URIs. Learn more about the Upload API [here](https://www.contentful.com/developers/docs/references/content-management-api/#/reference/uploads).
328
328
 
329
329
  #### basePath (default: ``)
330
330
 
@@ -23342,9 +23342,9 @@ const DEFAULT_CHUNK_SIZE = 64 * 1024;
23342
23342
 
23343
23343
  const {isFunction} = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"];
23344
23344
 
23345
- const globalFetchAPI = (({fetch, Request, Response}) => ({
23346
- fetch, Request, Response
23347
- }))(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].global);
23345
+ const globalFetchAPI = (({Request, Response}) => ({
23346
+ Request, Response
23347
+ }))(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].global);
23348
23348
 
23349
23349
  const {
23350
23350
  ReadableStream, TextEncoder
@@ -23360,8 +23360,12 @@ const test = (fn, ...args) => {
23360
23360
  }
23361
23361
 
23362
23362
  const factory = (env) => {
23363
- const {fetch, Request, Response} = Object.assign({}, globalFetchAPI, env);
23364
- const isFetchSupported = isFunction(fetch);
23363
+ env = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge.call({
23364
+ skipUndefined: true
23365
+ }, globalFetchAPI, env);
23366
+
23367
+ const {fetch: envFetch, Request, Response} = env;
23368
+ const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
23365
23369
  const isRequestSupported = isFunction(Request);
23366
23370
  const isResponseSupported = isFunction(Response);
23367
23371
 
@@ -23464,6 +23468,8 @@ const factory = (env) => {
23464
23468
  fetchOptions
23465
23469
  } = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(config);
23466
23470
 
23471
+ let _fetch = envFetch || fetch;
23472
+
23467
23473
  responseType = responseType ? (responseType + '').toLowerCase() : 'text';
23468
23474
 
23469
23475
  let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__["default"])([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
@@ -23523,7 +23529,7 @@ const factory = (env) => {
23523
23529
 
23524
23530
  request = isRequestSupported && new Request(url, resolvedOptions);
23525
23531
 
23526
- let response = await (isRequestSupported ? fetch(request, fetchOptions) : fetch(url, resolvedOptions));
23532
+ let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
23527
23533
 
23528
23534
  const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
23529
23535
 
@@ -23586,12 +23592,8 @@ const factory = (env) => {
23586
23592
  const seedCache = new Map();
23587
23593
 
23588
23594
  const getFetch = (config) => {
23589
- let env = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge.call({
23590
- skipUndefined: true
23591
- }, globalFetchAPI, config ? config.env : null);
23592
-
23595
+ let env = config ? config.env : {};
23593
23596
  const {fetch, Request, Response} = env;
23594
-
23595
23597
  const seeds = [
23596
23598
  Request, Response, fetch
23597
23599
  ];
@@ -24353,8 +24355,6 @@ class Axios {
24353
24355
 
24354
24356
  let newConfig = config;
24355
24357
 
24356
- i = 0;
24357
-
24358
24358
  while (i < len) {
24359
24359
  const onFulfilled = requestInterceptorChain[i++];
24360
24360
  const onRejected = requestInterceptorChain[i++];
@@ -25525,7 +25525,7 @@ __webpack_require__.r(__webpack_exports__);
25525
25525
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25526
25526
  /* harmony export */ VERSION: function() { return /* binding */ VERSION; }
25527
25527
  /* harmony export */ });
25528
- const VERSION = "1.12.0";
25528
+ const VERSION = "1.12.2";
25529
25529
 
25530
25530
  /***/ }),
25531
25531
 
@@ -27561,10 +27561,8 @@ function merge(/* obj1, obj2, obj3, ... */) {
27561
27561
  result[targetKey] = merge({}, val);
27562
27562
  } else if (isArray(val)) {
27563
27563
  result[targetKey] = val.slice();
27564
- } else {
27565
- if (!skipUndefined || !isUndefined(val)) {
27566
- result[targetKey] = val;
27567
- }
27564
+ } else if (!skipUndefined || !isUndefined(val)) {
27565
+ result[targetKey] = val;
27568
27566
  }
27569
27567
  }
27570
27568
 
@@ -29455,7 +29453,7 @@ function createClient(params) {
29455
29453
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
29456
29454
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
29457
29455
  var userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(// @ts-expect-error
29458
- "".concat(sdkMain, "/").concat("11.57.1"), params.application, params.integration, params.feature);
29456
+ "".concat(sdkMain, "/").concat("11.57.2"), params.application, params.integration, params.feature);
29459
29457
  var adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
29460
29458
  userAgent: userAgent
29461
29459
  }));