contentful-management 11.31.7 → 11.31.8

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.
@@ -21786,6 +21786,9 @@ const resolveBodyLength = async (headers, body) => {
21786
21786
  withCredentials = withCredentials ? 'include' : 'omit';
21787
21787
  }
21788
21788
 
21789
+ // Cloudflare Workers throws when credentials are defined
21790
+ // see https://github.com/cloudflare/workerd/issues/902
21791
+ const isCredentialsSupported = "credentials" in Request.prototype;
21789
21792
  request = new Request(url, {
21790
21793
  ...fetchOptions,
21791
21794
  signal: composedSignal,
@@ -21793,7 +21796,7 @@ const resolveBodyLength = async (headers, body) => {
21793
21796
  headers: headers.normalize().toJSON(),
21794
21797
  body: data,
21795
21798
  duplex: "half",
21796
- credentials: withCredentials
21799
+ credentials: isCredentialsSupported ? withCredentials : undefined
21797
21800
  });
21798
21801
 
21799
21802
  let response = await fetch(request);
@@ -22678,7 +22681,10 @@ function AxiosError(message, code, config, request, response) {
22678
22681
  code && (this.code = code);
22679
22682
  config && (this.config = config);
22680
22683
  request && (this.request = request);
22681
- response && (this.response = response);
22684
+ if (response) {
22685
+ this.response = response;
22686
+ this.status = response.status ? response.status : null;
22687
+ }
22682
22688
  }
22683
22689
 
22684
22690
  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].inherits(AxiosError, Error, {
@@ -22698,7 +22704,7 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].inherits(AxiosError, Error, {
22698
22704
  // Axios
22699
22705
  config: _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(this.config),
22700
22706
  code: this.code,
22701
- status: this.response && this.response.status ? this.response.status : null
22707
+ status: this.status
22702
22708
  };
22703
22709
  }
22704
22710
  });
@@ -23715,7 +23721,7 @@ __webpack_require__.r(__webpack_exports__);
23715
23721
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23716
23722
  /* harmony export */ VERSION: function() { return /* binding */ VERSION; }
23717
23723
  /* harmony export */ });
23718
- const VERSION = "1.7.4";
23724
+ const VERSION = "1.7.5";
23719
23725
 
23720
23726
  /***/ }),
23721
23727
 
@@ -24309,7 +24315,7 @@ __webpack_require__.r(__webpack_exports__);
24309
24315
  // Standard browser envs have full support of the APIs needed to test
24310
24316
  // whether the request URL is of the same origin as current location.
24311
24317
  (function standardBrowserEnv() {
24312
- const msie = /(msie|trident)/i.test(navigator.userAgent);
24318
+ const msie = _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator && /(msie|trident)/i.test(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator.userAgent);
24313
24319
  const urlParsingNode = document.createElement('a');
24314
24320
  let originURL;
24315
24321
 
@@ -25326,10 +25332,13 @@ __webpack_require__.r(__webpack_exports__);
25326
25332
  /* harmony export */ hasBrowserEnv: function() { return /* binding */ hasBrowserEnv; },
25327
25333
  /* harmony export */ hasStandardBrowserEnv: function() { return /* binding */ hasStandardBrowserEnv; },
25328
25334
  /* harmony export */ hasStandardBrowserWebWorkerEnv: function() { return /* binding */ hasStandardBrowserWebWorkerEnv; },
25335
+ /* harmony export */ navigator: function() { return /* binding */ _navigator; },
25329
25336
  /* harmony export */ origin: function() { return /* binding */ origin; }
25330
25337
  /* harmony export */ });
25331
25338
  const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
25332
25339
 
25340
+ const _navigator = typeof navigator === 'object' && navigator || undefined;
25341
+
25333
25342
  /**
25334
25343
  * Determine if we're running in a standard browser environment
25335
25344
  *
@@ -25347,10 +25356,8 @@ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'unde
25347
25356
  *
25348
25357
  * @returns {boolean}
25349
25358
  */
25350
- const hasStandardBrowserEnv = (
25351
- (product) => {
25352
- return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
25353
- })(typeof navigator !== 'undefined' && navigator.product);
25359
+ const hasStandardBrowserEnv = hasBrowserEnv &&
25360
+ (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
25354
25361
 
25355
25362
  /**
25356
25363
  * Determine if we're running in a standard browser webWorker environment
@@ -26749,7 +26756,7 @@ function createClient(params) {
26749
26756
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
26750
26757
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
26751
26758
  var userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)( // @ts-expect-error
26752
- "".concat(sdkMain, "/").concat("11.31.7"), params.application, params.integration, params.feature);
26759
+ "".concat(sdkMain, "/").concat("11.31.8"), params.application, params.integration, params.feature);
26753
26760
  var adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
26754
26761
  userAgent: userAgent
26755
26762
  }));