contentful-management 11.57.0 → 11.57.1

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.
@@ -23232,7 +23232,9 @@ __webpack_require__.r(__webpack_exports__);
23232
23232
  const knownAdapters = {
23233
23233
  http: _http_js__WEBPACK_IMPORTED_MODULE_0__["default"],
23234
23234
  xhr: _xhr_js__WEBPACK_IMPORTED_MODULE_1__["default"],
23235
- fetch: _fetch_js__WEBPACK_IMPORTED_MODULE_2__["default"]
23235
+ fetch: {
23236
+ get: _fetch_js__WEBPACK_IMPORTED_MODULE_2__.getFetch,
23237
+ }
23236
23238
  }
23237
23239
 
23238
23240
  _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(knownAdapters, (fn, value) => {
@@ -23251,7 +23253,7 @@ const renderReason = (reason) => `- ${reason}`;
23251
23253
  const isResolvedHandle = (adapter) => _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(adapter) || adapter === null || adapter === false;
23252
23254
 
23253
23255
  /* harmony default export */ __webpack_exports__["default"] = ({
23254
- getAdapter: (adapters) => {
23256
+ getAdapter: (adapters, config) => {
23255
23257
  adapters = _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isArray(adapters) ? adapters : [adapters];
23256
23258
 
23257
23259
  const {length} = adapters;
@@ -23274,7 +23276,7 @@ const isResolvedHandle = (adapter) => _utils_js__WEBPACK_IMPORTED_MODULE_3__["de
23274
23276
  }
23275
23277
  }
23276
23278
 
23277
- if (adapter) {
23279
+ if (adapter && (_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(adapter) || (adapter = adapter.get(config)))) {
23278
23280
  break;
23279
23281
  }
23280
23282
 
@@ -23314,8 +23316,11 @@ const isResolvedHandle = (adapter) => _utils_js__WEBPACK_IMPORTED_MODULE_3__["de
23314
23316
 
23315
23317
  "use strict";
23316
23318
  __webpack_require__.r(__webpack_exports__);
23317
- /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "../node_modules/axios/lib/platform/index.js");
23318
- /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "../node_modules/axios/lib/utils.js");
23319
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23320
+ /* harmony export */ getFetch: function() { return /* binding */ getFetch; }
23321
+ /* harmony export */ });
23322
+ /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ "../node_modules/axios/lib/platform/index.js");
23323
+ /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "../node_modules/axios/lib/utils.js");
23319
23324
  /* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ "../node_modules/axios/lib/core/AxiosError.js");
23320
23325
  /* harmony import */ var _helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/composeSignals.js */ "../node_modules/axios/lib/helpers/composeSignals.js");
23321
23326
  /* harmony import */ var _helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/trackStream.js */ "../node_modules/axios/lib/helpers/trackStream.js");
@@ -23333,14 +23338,18 @@ __webpack_require__.r(__webpack_exports__);
23333
23338
 
23334
23339
 
23335
23340
 
23336
- const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
23337
- const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
23341
+ const DEFAULT_CHUNK_SIZE = 64 * 1024;
23342
+
23343
+ const {isFunction} = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"];
23344
+
23345
+ const globalFetchAPI = (({fetch, Request, Response}) => ({
23346
+ fetch, Request, Response
23347
+ }))(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].global);
23348
+
23349
+ const {
23350
+ ReadableStream, TextEncoder
23351
+ } = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].global;
23338
23352
 
23339
- // used only inside the fetch adapter
23340
- const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
23341
- ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
23342
- async (str) => new Uint8Array(await new Response(str).arrayBuffer())
23343
- );
23344
23353
 
23345
23354
  const test = (fn, ...args) => {
23346
23355
  try {
@@ -23350,208 +23359,261 @@ const test = (fn, ...args) => {
23350
23359
  }
23351
23360
  }
23352
23361
 
23353
- const supportsRequestStream = isReadableStreamSupported && test(() => {
23354
- let duplexAccessed = false;
23362
+ const factory = (env) => {
23363
+ const {fetch, Request, Response} = Object.assign({}, globalFetchAPI, env);
23364
+ const isFetchSupported = isFunction(fetch);
23365
+ const isRequestSupported = isFunction(Request);
23366
+ const isResponseSupported = isFunction(Response);
23355
23367
 
23356
- const hasContentType = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, {
23357
- body: new ReadableStream(),
23358
- method: 'POST',
23359
- get duplex() {
23360
- duplexAccessed = true;
23361
- return 'half';
23362
- },
23363
- }).headers.has('Content-Type');
23368
+ if (!isFetchSupported) {
23369
+ return false;
23370
+ }
23364
23371
 
23365
- return duplexAccessed && !hasContentType;
23366
- });
23372
+ const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);
23367
23373
 
23368
- const DEFAULT_CHUNK_SIZE = 64 * 1024;
23374
+ const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
23375
+ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
23376
+ async (str) => new Uint8Array(await new Request(str).arrayBuffer())
23377
+ );
23378
+
23379
+ const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
23380
+ let duplexAccessed = false;
23369
23381
 
23370
- const supportsResponseStream = isReadableStreamSupported &&
23371
- test(() => _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isReadableStream(new Response('').body));
23382
+ const hasContentType = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].origin, {
23383
+ body: new ReadableStream(),
23384
+ method: 'POST',
23385
+ get duplex() {
23386
+ duplexAccessed = true;
23387
+ return 'half';
23388
+ },
23389
+ }).headers.has('Content-Type');
23372
23390
 
23391
+ return duplexAccessed && !hasContentType;
23392
+ });
23373
23393
 
23374
- const resolvers = {
23375
- stream: supportsResponseStream && ((res) => res.body)
23376
- };
23394
+ const supportsResponseStream = isResponseSupported && isReadableStreamSupported &&
23395
+ test(() => _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(new Response('').body));
23396
+
23397
+ const resolvers = {
23398
+ stream: supportsResponseStream && ((res) => res.body)
23399
+ };
23400
+
23401
+ isFetchSupported && ((() => {
23402
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
23403
+ !resolvers[type] && (resolvers[type] = (res, config) => {
23404
+ let method = res && res[type];
23405
+
23406
+ if (method) {
23407
+ return method.call(res);
23408
+ }
23377
23409
 
23378
- isFetchSupported && (((res) => {
23379
- ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
23380
- !resolvers[type] && (resolvers[type] = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(res[type]) ? (res) => res[type]() :
23381
- (_, config) => {
23382
23410
  throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](`Response type '${type}' is not supported`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NOT_SUPPORT, config);
23383
23411
  })
23384
- });
23385
- })(new Response));
23412
+ });
23413
+ })());
23386
23414
 
23387
- const getBodyLength = async (body) => {
23388
- if (body == null) {
23389
- return 0;
23390
- }
23415
+ const getBodyLength = async (body) => {
23416
+ if (body == null) {
23417
+ return 0;
23418
+ }
23391
23419
 
23392
- if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isBlob(body)) {
23393
- return body.size;
23394
- }
23420
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(body)) {
23421
+ return body.size;
23422
+ }
23395
23423
 
23396
- if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isSpecCompliantForm(body)) {
23397
- const _request = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, {
23398
- method: 'POST',
23399
- body,
23400
- });
23401
- return (await _request.arrayBuffer()).byteLength;
23402
- }
23424
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(body)) {
23425
+ const _request = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].origin, {
23426
+ method: 'POST',
23427
+ body,
23428
+ });
23429
+ return (await _request.arrayBuffer()).byteLength;
23430
+ }
23403
23431
 
23404
- if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBufferView(body) || _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArrayBuffer(body)) {
23405
- return body.byteLength;
23406
- }
23432
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBufferView(body) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(body)) {
23433
+ return body.byteLength;
23434
+ }
23407
23435
 
23408
- if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isURLSearchParams(body)) {
23409
- body = body + '';
23410
- }
23436
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(body)) {
23437
+ body = body + '';
23438
+ }
23411
23439
 
23412
- if(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(body)) {
23413
- return (await encodeText(body)).byteLength;
23440
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(body)) {
23441
+ return (await encodeText(body)).byteLength;
23442
+ }
23414
23443
  }
23415
- }
23416
23444
 
23417
- const resolveBodyLength = async (headers, body) => {
23418
- const length = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(headers.getContentLength());
23445
+ const resolveBodyLength = async (headers, body) => {
23446
+ const length = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFiniteNumber(headers.getContentLength());
23419
23447
 
23420
- return length == null ? getBodyLength(body) : length;
23421
- }
23448
+ return length == null ? getBodyLength(body) : length;
23449
+ }
23422
23450
 
23423
- /* harmony default export */ __webpack_exports__["default"] = (isFetchSupported && (async (config) => {
23424
- let {
23425
- url,
23426
- method,
23427
- data,
23428
- signal,
23429
- cancelToken,
23430
- timeout,
23431
- onDownloadProgress,
23432
- onUploadProgress,
23433
- responseType,
23434
- headers,
23435
- withCredentials = 'same-origin',
23436
- fetchOptions
23437
- } = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(config);
23451
+ return async (config) => {
23452
+ let {
23453
+ url,
23454
+ method,
23455
+ data,
23456
+ signal,
23457
+ cancelToken,
23458
+ timeout,
23459
+ onDownloadProgress,
23460
+ onUploadProgress,
23461
+ responseType,
23462
+ headers,
23463
+ withCredentials = 'same-origin',
23464
+ fetchOptions
23465
+ } = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(config);
23438
23466
 
23439
- responseType = responseType ? (responseType + '').toLowerCase() : 'text';
23467
+ responseType = responseType ? (responseType + '').toLowerCase() : 'text';
23440
23468
 
23441
- let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__["default"])([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
23469
+ let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__["default"])([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
23442
23470
 
23443
- let request;
23471
+ let request = null;
23444
23472
 
23445
- const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
23473
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
23446
23474
  composedSignal.unsubscribe();
23447
- });
23475
+ });
23448
23476
 
23449
- let requestContentLength;
23477
+ let requestContentLength;
23450
23478
 
23451
- try {
23452
- if (
23453
- onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
23454
- (requestContentLength = await resolveBodyLength(headers, data)) !== 0
23455
- ) {
23456
- let _request = new Request(url, {
23457
- method: 'POST',
23458
- body: data,
23459
- duplex: "half"
23460
- });
23479
+ try {
23480
+ if (
23481
+ onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
23482
+ (requestContentLength = await resolveBodyLength(headers, data)) !== 0
23483
+ ) {
23484
+ let _request = new Request(url, {
23485
+ method: 'POST',
23486
+ body: data,
23487
+ duplex: "half"
23488
+ });
23461
23489
 
23462
- let contentTypeHeader;
23490
+ let contentTypeHeader;
23463
23491
 
23464
- if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
23465
- headers.setContentType(contentTypeHeader)
23466
- }
23492
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
23493
+ headers.setContentType(contentTypeHeader)
23494
+ }
23467
23495
 
23468
- if (_request.body) {
23469
- const [onProgress, flush] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)(
23470
- requestContentLength,
23471
- (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onUploadProgress))
23472
- );
23496
+ if (_request.body) {
23497
+ const [onProgress, flush] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)(
23498
+ requestContentLength,
23499
+ (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onUploadProgress))
23500
+ );
23473
23501
 
23474
- data = (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
23502
+ data = (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
23503
+ }
23475
23504
  }
23476
- }
23477
23505
 
23478
- if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(withCredentials)) {
23479
- withCredentials = withCredentials ? 'include' : 'omit';
23480
- }
23506
+ if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(withCredentials)) {
23507
+ withCredentials = withCredentials ? 'include' : 'omit';
23508
+ }
23481
23509
 
23482
- // Cloudflare Workers throws when credentials are defined
23483
- // see https://github.com/cloudflare/workerd/issues/902
23484
- const isCredentialsSupported = "credentials" in Request.prototype;
23485
- request = new Request(url, {
23486
- ...fetchOptions,
23487
- signal: composedSignal,
23488
- method: method.toUpperCase(),
23489
- headers: headers.normalize().toJSON(),
23490
- body: data,
23491
- duplex: "half",
23492
- credentials: isCredentialsSupported ? withCredentials : undefined
23493
- });
23510
+ // Cloudflare Workers throws when credentials are defined
23511
+ // see https://github.com/cloudflare/workerd/issues/902
23512
+ const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
23494
23513
 
23495
- let response = await fetch(request, fetchOptions);
23514
+ const resolvedOptions = {
23515
+ ...fetchOptions,
23516
+ signal: composedSignal,
23517
+ method: method.toUpperCase(),
23518
+ headers: headers.normalize().toJSON(),
23519
+ body: data,
23520
+ duplex: "half",
23521
+ credentials: isCredentialsSupported ? withCredentials : undefined
23522
+ };
23496
23523
 
23497
- const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
23524
+ request = isRequestSupported && new Request(url, resolvedOptions);
23498
23525
 
23499
- if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
23500
- const options = {};
23526
+ let response = await (isRequestSupported ? fetch(request, fetchOptions) : fetch(url, resolvedOptions));
23501
23527
 
23502
- ['status', 'statusText', 'headers'].forEach(prop => {
23503
- options[prop] = response[prop];
23504
- });
23528
+ const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
23505
23529
 
23506
- const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(response.headers.get('content-length'));
23530
+ if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
23531
+ const options = {};
23507
23532
 
23508
- const [onProgress, flush] = onDownloadProgress && (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)(
23509
- responseContentLength,
23510
- (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onDownloadProgress), true)
23511
- ) || [];
23533
+ ['status', 'statusText', 'headers'].forEach(prop => {
23534
+ options[prop] = response[prop];
23535
+ });
23512
23536
 
23513
- response = new Response(
23514
- (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
23515
- flush && flush();
23516
- unsubscribe && unsubscribe();
23517
- }),
23518
- options
23519
- );
23520
- }
23537
+ const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFiniteNumber(response.headers.get('content-length'));
23521
23538
 
23522
- responseType = responseType || 'text';
23539
+ const [onProgress, flush] = onDownloadProgress && (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)(
23540
+ responseContentLength,
23541
+ (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onDownloadProgress), true)
23542
+ ) || [];
23523
23543
 
23524
- let responseData = await resolvers[_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].findKey(resolvers, responseType) || 'text'](response, config);
23544
+ response = new Response(
23545
+ (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
23546
+ flush && flush();
23547
+ unsubscribe && unsubscribe();
23548
+ }),
23549
+ options
23550
+ );
23551
+ }
23525
23552
 
23526
- !isStreamResponse && unsubscribe && unsubscribe();
23553
+ responseType = responseType || 'text';
23527
23554
 
23528
- return await new Promise((resolve, reject) => {
23529
- (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_7__["default"])(resolve, reject, {
23530
- data: responseData,
23531
- headers: _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].from(response.headers),
23532
- status: response.status,
23533
- statusText: response.statusText,
23534
- config,
23535
- request
23555
+ let responseData = await resolvers[_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(resolvers, responseType) || 'text'](response, config);
23556
+
23557
+ !isStreamResponse && unsubscribe && unsubscribe();
23558
+
23559
+ return await new Promise((resolve, reject) => {
23560
+ (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_7__["default"])(resolve, reject, {
23561
+ data: responseData,
23562
+ headers: _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].from(response.headers),
23563
+ status: response.status,
23564
+ statusText: response.statusText,
23565
+ config,
23566
+ request
23567
+ })
23536
23568
  })
23537
- })
23538
- } catch (err) {
23539
- unsubscribe && unsubscribe();
23540
-
23541
- if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
23542
- throw Object.assign(
23543
- new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NETWORK, config, request),
23544
- {
23545
- cause: err.cause || err
23546
- }
23547
- )
23569
+ } catch (err) {
23570
+ unsubscribe && unsubscribe();
23571
+
23572
+ if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
23573
+ throw Object.assign(
23574
+ new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NETWORK, config, request),
23575
+ {
23576
+ cause: err.cause || err
23577
+ }
23578
+ )
23579
+ }
23580
+
23581
+ throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(err, err && err.code, config, request);
23548
23582
  }
23583
+ }
23584
+ }
23585
+
23586
+ const seedCache = new Map();
23587
+
23588
+ const getFetch = (config) => {
23589
+ let env = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge.call({
23590
+ skipUndefined: true
23591
+ }, globalFetchAPI, config ? config.env : null);
23549
23592
 
23550
- throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(err, err && err.code, config, request);
23593
+ const {fetch, Request, Response} = env;
23594
+
23595
+ const seeds = [
23596
+ Request, Response, fetch
23597
+ ];
23598
+
23599
+ let len = seeds.length, i = len,
23600
+ seed, target, map = seedCache;
23601
+
23602
+ while (i--) {
23603
+ seed = seeds[i];
23604
+ target = map.get(seed);
23605
+
23606
+ target === undefined && map.set(seed, target = (i ? new Map() : factory(env)))
23607
+
23608
+ map = target;
23551
23609
  }
23552
- }));
23553
23610
 
23611
+ return target;
23612
+ };
23613
+
23614
+ const adapter = getFetch();
23554
23615
 
23616
+ /* harmony default export */ __webpack_exports__["default"] = (adapter);
23555
23617
 
23556
23618
 
23557
23619
  /***/ }),
@@ -23680,15 +23742,18 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
23680
23742
  };
23681
23743
 
23682
23744
  // Handle low level network errors
23683
- request.onerror = function handleError() {
23684
- // Real errors are hidden from us by the browser
23685
- // onerror should only fire if it's a network error
23686
- reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_NETWORK, config, request));
23687
-
23688
- // Clean up request
23689
- request = null;
23745
+ request.onerror = function handleError(event) {
23746
+ // Browsers deliver a ProgressEvent in XHR onerror
23747
+ // (message may be empty; when present, surface it)
23748
+ // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
23749
+ const msg = event && event.message ? event.message : 'Network Error';
23750
+ const err = new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](msg, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_NETWORK, config, request);
23751
+ // attach the underlying event for consumers who want details
23752
+ err.event = event || null;
23753
+ reject(err);
23754
+ request = null;
23690
23755
  };
23691
-
23756
+
23692
23757
  // Handle timeout
23693
23758
  request.ontimeout = function handleTimeout() {
23694
23759
  let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
@@ -24462,11 +24527,18 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
24462
24527
  return prop !== 'isAxiosError';
24463
24528
  });
24464
24529
 
24465
- AxiosError.call(axiosError, error.message, code, config, request, response);
24530
+ const msg = error && error.message ? error.message : 'Error';
24466
24531
 
24467
- axiosError.cause = error;
24532
+ // Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
24533
+ const errCode = code == null && error ? error.code : code;
24534
+ AxiosError.call(axiosError, msg, errCode, config, request, response);
24468
24535
 
24469
- axiosError.name = error.name;
24536
+ // Chain the original error on the standard field; non-enumerable to avoid JSON noise
24537
+ if (error && axiosError.cause == null) {
24538
+ Object.defineProperty(axiosError, 'cause', { value: error, configurable: true });
24539
+ }
24540
+
24541
+ axiosError.name = (error && error.name) || 'Error';
24470
24542
 
24471
24543
  customProps && Object.assign(axiosError, customProps);
24472
24544
 
@@ -24994,7 +25066,7 @@ function dispatchRequest(config) {
24994
25066
  config.headers.setContentType('application/x-www-form-urlencoded', false);
24995
25067
  }
24996
25068
 
24997
- const adapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__["default"].getAdapter(config.adapter || _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].adapter);
25069
+ const adapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__["default"].getAdapter(config.adapter || _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].adapter, config);
24998
25070
 
24999
25071
  return adapter(config).then(function onAdapterResolution(response) {
25000
25072
  throwIfCancellationRequested(config);
@@ -25371,7 +25443,7 @@ const defaults = {
25371
25443
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
25372
25444
 
25373
25445
  try {
25374
- return JSON.parse(data);
25446
+ return JSON.parse(data, this.parseReviver);
25375
25447
  } catch (e) {
25376
25448
  if (strictJSONParsing) {
25377
25449
  if (e.name === 'SyntaxError') {
@@ -25453,7 +25525,7 @@ __webpack_require__.r(__webpack_exports__);
25453
25525
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25454
25526
  /* harmony export */ VERSION: function() { return /* binding */ VERSION; }
25455
25527
  /* harmony export */ });
25456
- const VERSION = "1.11.0";
25528
+ const VERSION = "1.12.0";
25457
25529
 
25458
25530
  /***/ }),
25459
25531
 
@@ -25664,9 +25736,7 @@ function encode(val) {
25664
25736
  replace(/%3A/gi, ':').
25665
25737
  replace(/%24/g, '$').
25666
25738
  replace(/%2C/gi, ',').
25667
- replace(/%20/g, '+').
25668
- replace(/%5B/gi, '[').
25669
- replace(/%5D/gi, ']');
25739
+ replace(/%20/g, '+');
25670
25740
  }
25671
25741
 
25672
25742
  /**
@@ -26258,7 +26328,7 @@ __webpack_require__.r(__webpack_exports__);
26258
26328
  /* harmony default export */ __webpack_exports__["default"] = ((config) => {
26259
26329
  const newConfig = (0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, config);
26260
26330
 
26261
- let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
26331
+ let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
26262
26332
 
26263
26333
  newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(headers);
26264
26334
 
@@ -26271,17 +26341,21 @@ __webpack_require__.r(__webpack_exports__);
26271
26341
  );
26272
26342
  }
26273
26343
 
26274
- let contentType;
26275
-
26276
26344
  if (_utils_js__WEBPACK_IMPORTED_MODULE_4__["default"].isFormData(data)) {
26277
26345
  if (_platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserEnv || _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserWebWorkerEnv) {
26278
- headers.setContentType(undefined); // Let the browser set it
26279
- } else if ((contentType = headers.getContentType()) !== false) {
26280
- // fix semicolon duplication issue for ReactNative FormData implementation
26281
- const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
26282
- headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
26346
+ headers.setContentType(undefined); // browser handles it
26347
+ } else if (_utils_js__WEBPACK_IMPORTED_MODULE_4__["default"].isFunction(data.getHeaders)) {
26348
+ // Node.js FormData (like form-data package)
26349
+ const formHeaders = data.getHeaders();
26350
+ // Only set safe headers to avoid overwriting security headers
26351
+ const allowedHeaders = ['content-type', 'content-length'];
26352
+ Object.entries(formHeaders).forEach(([key, val]) => {
26353
+ if (allowedHeaders.includes(key.toLowerCase())) {
26354
+ headers.set(key, val);
26355
+ }
26356
+ });
26283
26357
  }
26284
- }
26358
+ }
26285
26359
 
26286
26360
  // Add xsrf header
26287
26361
  // This is only done if running in a standard browser environment.
@@ -27284,7 +27358,7 @@ const isEmptyObject = (val) => {
27284
27358
  if (!isObject(val) || isBuffer(val)) {
27285
27359
  return false;
27286
27360
  }
27287
-
27361
+
27288
27362
  try {
27289
27363
  return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
27290
27364
  } catch (e) {
@@ -27477,7 +27551,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
27477
27551
  * @returns {Object} Result of all merge properties
27478
27552
  */
27479
27553
  function merge(/* obj1, obj2, obj3, ... */) {
27480
- const {caseless} = isContextDefined(this) && this || {};
27554
+ const {caseless, skipUndefined} = isContextDefined(this) && this || {};
27481
27555
  const result = {};
27482
27556
  const assignValue = (val, key) => {
27483
27557
  const targetKey = caseless && findKey(result, key) || key;
@@ -27488,7 +27562,9 @@ function merge(/* obj1, obj2, obj3, ... */) {
27488
27562
  } else if (isArray(val)) {
27489
27563
  result[targetKey] = val.slice();
27490
27564
  } else {
27491
- result[targetKey] = val;
27565
+ if (!skipUndefined || !isUndefined(val)) {
27566
+ result[targetKey] = val;
27567
+ }
27492
27568
  }
27493
27569
  }
27494
27570
 
@@ -27769,6 +27845,8 @@ const toFiniteNumber = (value, defaultValue) => {
27769
27845
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
27770
27846
  }
27771
27847
 
27848
+
27849
+
27772
27850
  /**
27773
27851
  * If the thing is a FormData object, return true, otherwise return false.
27774
27852
  *
@@ -29377,7 +29455,7 @@ function createClient(params) {
29377
29455
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
29378
29456
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
29379
29457
  var userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(// @ts-expect-error
29380
- "".concat(sdkMain, "/").concat("11.57.0"), params.application, params.integration, params.feature);
29458
+ "".concat(sdkMain, "/").concat("11.57.1"), params.application, params.integration, params.feature);
29381
29459
  var adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
29382
29460
  userAgent: userAgent
29383
29461
  }));