contentful-management 11.56.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.
- package/dist/contentful-management.browser.js +274 -194
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +433 -248
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/common-types.js +2 -0
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/typings/common-types.d.ts +5 -3
- package/dist/typings/entities/app-action-call.d.ts +2 -2
- package/dist/typings/entities/ui-config.d.ts +1 -1
- package/dist/typings/plain/entities/app-action-call.d.ts +3 -3
- package/package.json +1 -1
|
@@ -5089,6 +5089,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5089
5089
|
|
|
5090
5090
|
/** Base interface for all Payload interfaces. Used as part of the MakeRequestOptions to simplify payload definitions. */
|
|
5091
5091
|
|
|
5092
|
+
// Retry options used by createWithResponse and createWithResult. Kept separate for clarity.
|
|
5093
|
+
|
|
5092
5094
|
// New route params for fetching structured call or raw response
|
|
5093
5095
|
|
|
5094
5096
|
var ScheduledActionReferenceFilters = /*#__PURE__*/function (ScheduledActionReferenceFilters) {
|
|
@@ -23230,7 +23232,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23230
23232
|
const knownAdapters = {
|
|
23231
23233
|
http: _http_js__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
23232
23234
|
xhr: _xhr_js__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
23233
|
-
fetch:
|
|
23235
|
+
fetch: {
|
|
23236
|
+
get: _fetch_js__WEBPACK_IMPORTED_MODULE_2__.getFetch,
|
|
23237
|
+
}
|
|
23234
23238
|
}
|
|
23235
23239
|
|
|
23236
23240
|
_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(knownAdapters, (fn, value) => {
|
|
@@ -23249,7 +23253,7 @@ const renderReason = (reason) => `- ${reason}`;
|
|
|
23249
23253
|
const isResolvedHandle = (adapter) => _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(adapter) || adapter === null || adapter === false;
|
|
23250
23254
|
|
|
23251
23255
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
23252
|
-
getAdapter: (adapters) => {
|
|
23256
|
+
getAdapter: (adapters, config) => {
|
|
23253
23257
|
adapters = _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isArray(adapters) ? adapters : [adapters];
|
|
23254
23258
|
|
|
23255
23259
|
const {length} = adapters;
|
|
@@ -23272,7 +23276,7 @@ const isResolvedHandle = (adapter) => _utils_js__WEBPACK_IMPORTED_MODULE_3__["de
|
|
|
23272
23276
|
}
|
|
23273
23277
|
}
|
|
23274
23278
|
|
|
23275
|
-
if (adapter) {
|
|
23279
|
+
if (adapter && (_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
23276
23280
|
break;
|
|
23277
23281
|
}
|
|
23278
23282
|
|
|
@@ -23312,8 +23316,11 @@ const isResolvedHandle = (adapter) => _utils_js__WEBPACK_IMPORTED_MODULE_3__["de
|
|
|
23312
23316
|
|
|
23313
23317
|
"use strict";
|
|
23314
23318
|
__webpack_require__.r(__webpack_exports__);
|
|
23315
|
-
/* harmony
|
|
23316
|
-
/* harmony
|
|
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");
|
|
23317
23324
|
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ "../node_modules/axios/lib/core/AxiosError.js");
|
|
23318
23325
|
/* harmony import */ var _helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/composeSignals.js */ "../node_modules/axios/lib/helpers/composeSignals.js");
|
|
23319
23326
|
/* harmony import */ var _helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/trackStream.js */ "../node_modules/axios/lib/helpers/trackStream.js");
|
|
@@ -23331,14 +23338,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23331
23338
|
|
|
23332
23339
|
|
|
23333
23340
|
|
|
23334
|
-
const
|
|
23335
|
-
|
|
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;
|
|
23336
23352
|
|
|
23337
|
-
// used only inside the fetch adapter
|
|
23338
|
-
const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
|
|
23339
|
-
((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
|
|
23340
|
-
async (str) => new Uint8Array(await new Response(str).arrayBuffer())
|
|
23341
|
-
);
|
|
23342
23353
|
|
|
23343
23354
|
const test = (fn, ...args) => {
|
|
23344
23355
|
try {
|
|
@@ -23348,208 +23359,261 @@ const test = (fn, ...args) => {
|
|
|
23348
23359
|
}
|
|
23349
23360
|
}
|
|
23350
23361
|
|
|
23351
|
-
const
|
|
23352
|
-
|
|
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);
|
|
23353
23367
|
|
|
23354
|
-
|
|
23355
|
-
|
|
23356
|
-
|
|
23357
|
-
get duplex() {
|
|
23358
|
-
duplexAccessed = true;
|
|
23359
|
-
return 'half';
|
|
23360
|
-
},
|
|
23361
|
-
}).headers.has('Content-Type');
|
|
23368
|
+
if (!isFetchSupported) {
|
|
23369
|
+
return false;
|
|
23370
|
+
}
|
|
23362
23371
|
|
|
23363
|
-
|
|
23364
|
-
});
|
|
23372
|
+
const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);
|
|
23365
23373
|
|
|
23366
|
-
const
|
|
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;
|
|
23367
23381
|
|
|
23368
|
-
const
|
|
23369
|
-
|
|
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');
|
|
23370
23390
|
|
|
23391
|
+
return duplexAccessed && !hasContentType;
|
|
23392
|
+
});
|
|
23371
23393
|
|
|
23372
|
-
const
|
|
23373
|
-
|
|
23374
|
-
|
|
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
|
+
}
|
|
23375
23409
|
|
|
23376
|
-
isFetchSupported && (((res) => {
|
|
23377
|
-
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
|
|
23378
|
-
!resolvers[type] && (resolvers[type] = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(res[type]) ? (res) => res[type]() :
|
|
23379
|
-
(_, config) => {
|
|
23380
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);
|
|
23381
23411
|
})
|
|
23382
|
-
|
|
23383
|
-
})(
|
|
23412
|
+
});
|
|
23413
|
+
})());
|
|
23384
23414
|
|
|
23385
|
-
const getBodyLength = async (body) => {
|
|
23386
|
-
|
|
23387
|
-
|
|
23388
|
-
|
|
23415
|
+
const getBodyLength = async (body) => {
|
|
23416
|
+
if (body == null) {
|
|
23417
|
+
return 0;
|
|
23418
|
+
}
|
|
23389
23419
|
|
|
23390
|
-
|
|
23391
|
-
|
|
23392
|
-
|
|
23420
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(body)) {
|
|
23421
|
+
return body.size;
|
|
23422
|
+
}
|
|
23393
23423
|
|
|
23394
|
-
|
|
23395
|
-
|
|
23396
|
-
|
|
23397
|
-
|
|
23398
|
-
|
|
23399
|
-
|
|
23400
|
-
|
|
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
|
+
}
|
|
23401
23431
|
|
|
23402
|
-
|
|
23403
|
-
|
|
23404
|
-
|
|
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
|
+
}
|
|
23405
23435
|
|
|
23406
|
-
|
|
23407
|
-
|
|
23408
|
-
|
|
23436
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(body)) {
|
|
23437
|
+
body = body + '';
|
|
23438
|
+
}
|
|
23409
23439
|
|
|
23410
|
-
|
|
23411
|
-
|
|
23440
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(body)) {
|
|
23441
|
+
return (await encodeText(body)).byteLength;
|
|
23442
|
+
}
|
|
23412
23443
|
}
|
|
23413
|
-
}
|
|
23414
23444
|
|
|
23415
|
-
const resolveBodyLength = async (headers, body) => {
|
|
23416
|
-
|
|
23445
|
+
const resolveBodyLength = async (headers, body) => {
|
|
23446
|
+
const length = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFiniteNumber(headers.getContentLength());
|
|
23417
23447
|
|
|
23418
|
-
|
|
23419
|
-
}
|
|
23448
|
+
return length == null ? getBodyLength(body) : length;
|
|
23449
|
+
}
|
|
23420
23450
|
|
|
23421
|
-
|
|
23422
|
-
|
|
23423
|
-
|
|
23424
|
-
|
|
23425
|
-
|
|
23426
|
-
|
|
23427
|
-
|
|
23428
|
-
|
|
23429
|
-
|
|
23430
|
-
|
|
23431
|
-
|
|
23432
|
-
|
|
23433
|
-
|
|
23434
|
-
|
|
23435
|
-
|
|
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);
|
|
23436
23466
|
|
|
23437
|
-
|
|
23467
|
+
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
23438
23468
|
|
|
23439
|
-
|
|
23469
|
+
let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__["default"])([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
23440
23470
|
|
|
23441
|
-
|
|
23471
|
+
let request = null;
|
|
23442
23472
|
|
|
23443
|
-
|
|
23473
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
23444
23474
|
composedSignal.unsubscribe();
|
|
23445
|
-
|
|
23475
|
+
});
|
|
23446
23476
|
|
|
23447
|
-
|
|
23477
|
+
let requestContentLength;
|
|
23448
23478
|
|
|
23449
|
-
|
|
23450
|
-
|
|
23451
|
-
|
|
23452
|
-
|
|
23453
|
-
|
|
23454
|
-
|
|
23455
|
-
|
|
23456
|
-
|
|
23457
|
-
|
|
23458
|
-
|
|
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
|
+
});
|
|
23459
23489
|
|
|
23460
|
-
|
|
23490
|
+
let contentTypeHeader;
|
|
23461
23491
|
|
|
23462
|
-
|
|
23463
|
-
|
|
23464
|
-
|
|
23492
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
23493
|
+
headers.setContentType(contentTypeHeader)
|
|
23494
|
+
}
|
|
23465
23495
|
|
|
23466
|
-
|
|
23467
|
-
|
|
23468
|
-
|
|
23469
|
-
|
|
23470
|
-
|
|
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
|
+
);
|
|
23471
23501
|
|
|
23472
|
-
|
|
23502
|
+
data = (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
23503
|
+
}
|
|
23473
23504
|
}
|
|
23474
|
-
}
|
|
23475
23505
|
|
|
23476
|
-
|
|
23477
|
-
|
|
23478
|
-
|
|
23506
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(withCredentials)) {
|
|
23507
|
+
withCredentials = withCredentials ? 'include' : 'omit';
|
|
23508
|
+
}
|
|
23479
23509
|
|
|
23480
|
-
|
|
23481
|
-
|
|
23482
|
-
|
|
23483
|
-
request = new Request(url, {
|
|
23484
|
-
...fetchOptions,
|
|
23485
|
-
signal: composedSignal,
|
|
23486
|
-
method: method.toUpperCase(),
|
|
23487
|
-
headers: headers.normalize().toJSON(),
|
|
23488
|
-
body: data,
|
|
23489
|
-
duplex: "half",
|
|
23490
|
-
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
23491
|
-
});
|
|
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;
|
|
23492
23513
|
|
|
23493
|
-
|
|
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
|
+
};
|
|
23494
23523
|
|
|
23495
|
-
|
|
23524
|
+
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
23496
23525
|
|
|
23497
|
-
|
|
23498
|
-
const options = {};
|
|
23526
|
+
let response = await (isRequestSupported ? fetch(request, fetchOptions) : fetch(url, resolvedOptions));
|
|
23499
23527
|
|
|
23500
|
-
|
|
23501
|
-
options[prop] = response[prop];
|
|
23502
|
-
});
|
|
23528
|
+
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
23503
23529
|
|
|
23504
|
-
|
|
23530
|
+
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
23531
|
+
const options = {};
|
|
23505
23532
|
|
|
23506
|
-
|
|
23507
|
-
|
|
23508
|
-
|
|
23509
|
-
) || [];
|
|
23533
|
+
['status', 'statusText', 'headers'].forEach(prop => {
|
|
23534
|
+
options[prop] = response[prop];
|
|
23535
|
+
});
|
|
23510
23536
|
|
|
23511
|
-
|
|
23512
|
-
(0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
23513
|
-
flush && flush();
|
|
23514
|
-
unsubscribe && unsubscribe();
|
|
23515
|
-
}),
|
|
23516
|
-
options
|
|
23517
|
-
);
|
|
23518
|
-
}
|
|
23537
|
+
const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFiniteNumber(response.headers.get('content-length'));
|
|
23519
23538
|
|
|
23520
|
-
|
|
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
|
+
) || [];
|
|
23521
23543
|
|
|
23522
|
-
|
|
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
|
+
}
|
|
23523
23552
|
|
|
23524
|
-
|
|
23553
|
+
responseType = responseType || 'text';
|
|
23525
23554
|
|
|
23526
|
-
|
|
23527
|
-
|
|
23528
|
-
|
|
23529
|
-
|
|
23530
|
-
|
|
23531
|
-
|
|
23532
|
-
|
|
23533
|
-
|
|
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
|
+
})
|
|
23534
23568
|
})
|
|
23535
|
-
})
|
|
23536
|
-
|
|
23537
|
-
|
|
23538
|
-
|
|
23539
|
-
|
|
23540
|
-
|
|
23541
|
-
|
|
23542
|
-
|
|
23543
|
-
|
|
23544
|
-
|
|
23545
|
-
|
|
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);
|
|
23546
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);
|
|
23547
23592
|
|
|
23548
|
-
|
|
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;
|
|
23549
23609
|
}
|
|
23550
|
-
}));
|
|
23551
23610
|
|
|
23611
|
+
return target;
|
|
23612
|
+
};
|
|
23613
|
+
|
|
23614
|
+
const adapter = getFetch();
|
|
23552
23615
|
|
|
23616
|
+
/* harmony default export */ __webpack_exports__["default"] = (adapter);
|
|
23553
23617
|
|
|
23554
23618
|
|
|
23555
23619
|
/***/ }),
|
|
@@ -23678,15 +23742,18 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
23678
23742
|
};
|
|
23679
23743
|
|
|
23680
23744
|
// Handle low level network errors
|
|
23681
|
-
|
|
23682
|
-
|
|
23683
|
-
|
|
23684
|
-
|
|
23685
|
-
|
|
23686
|
-
|
|
23687
|
-
|
|
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;
|
|
23688
23755
|
};
|
|
23689
|
-
|
|
23756
|
+
|
|
23690
23757
|
// Handle timeout
|
|
23691
23758
|
request.ontimeout = function handleTimeout() {
|
|
23692
23759
|
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
@@ -24460,11 +24527,18 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
|
24460
24527
|
return prop !== 'isAxiosError';
|
|
24461
24528
|
});
|
|
24462
24529
|
|
|
24463
|
-
|
|
24530
|
+
const msg = error && error.message ? error.message : 'Error';
|
|
24464
24531
|
|
|
24465
|
-
|
|
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);
|
|
24466
24535
|
|
|
24467
|
-
|
|
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';
|
|
24468
24542
|
|
|
24469
24543
|
customProps && Object.assign(axiosError, customProps);
|
|
24470
24544
|
|
|
@@ -24992,7 +25066,7 @@ function dispatchRequest(config) {
|
|
|
24992
25066
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
24993
25067
|
}
|
|
24994
25068
|
|
|
24995
|
-
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);
|
|
24996
25070
|
|
|
24997
25071
|
return adapter(config).then(function onAdapterResolution(response) {
|
|
24998
25072
|
throwIfCancellationRequested(config);
|
|
@@ -25369,7 +25443,7 @@ const defaults = {
|
|
|
25369
25443
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
25370
25444
|
|
|
25371
25445
|
try {
|
|
25372
|
-
return JSON.parse(data);
|
|
25446
|
+
return JSON.parse(data, this.parseReviver);
|
|
25373
25447
|
} catch (e) {
|
|
25374
25448
|
if (strictJSONParsing) {
|
|
25375
25449
|
if (e.name === 'SyntaxError') {
|
|
@@ -25451,7 +25525,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25451
25525
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25452
25526
|
/* harmony export */ VERSION: function() { return /* binding */ VERSION; }
|
|
25453
25527
|
/* harmony export */ });
|
|
25454
|
-
const VERSION = "1.
|
|
25528
|
+
const VERSION = "1.12.0";
|
|
25455
25529
|
|
|
25456
25530
|
/***/ }),
|
|
25457
25531
|
|
|
@@ -25662,9 +25736,7 @@ function encode(val) {
|
|
|
25662
25736
|
replace(/%3A/gi, ':').
|
|
25663
25737
|
replace(/%24/g, '$').
|
|
25664
25738
|
replace(/%2C/gi, ',').
|
|
25665
|
-
replace(/%20/g, '+')
|
|
25666
|
-
replace(/%5B/gi, '[').
|
|
25667
|
-
replace(/%5D/gi, ']');
|
|
25739
|
+
replace(/%20/g, '+');
|
|
25668
25740
|
}
|
|
25669
25741
|
|
|
25670
25742
|
/**
|
|
@@ -26256,7 +26328,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26256
26328
|
/* harmony default export */ __webpack_exports__["default"] = ((config) => {
|
|
26257
26329
|
const newConfig = (0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, config);
|
|
26258
26330
|
|
|
26259
|
-
let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
|
|
26331
|
+
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
26260
26332
|
|
|
26261
26333
|
newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(headers);
|
|
26262
26334
|
|
|
@@ -26269,17 +26341,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26269
26341
|
);
|
|
26270
26342
|
}
|
|
26271
26343
|
|
|
26272
|
-
let contentType;
|
|
26273
|
-
|
|
26274
26344
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_4__["default"].isFormData(data)) {
|
|
26275
26345
|
if (_platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserEnv || _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].hasStandardBrowserWebWorkerEnv) {
|
|
26276
|
-
headers.setContentType(undefined); //
|
|
26277
|
-
} else if ((
|
|
26278
|
-
//
|
|
26279
|
-
const
|
|
26280
|
-
headers
|
|
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
|
+
});
|
|
26281
26357
|
}
|
|
26282
|
-
}
|
|
26358
|
+
}
|
|
26283
26359
|
|
|
26284
26360
|
// Add xsrf header
|
|
26285
26361
|
// This is only done if running in a standard browser environment.
|
|
@@ -27282,7 +27358,7 @@ const isEmptyObject = (val) => {
|
|
|
27282
27358
|
if (!isObject(val) || isBuffer(val)) {
|
|
27283
27359
|
return false;
|
|
27284
27360
|
}
|
|
27285
|
-
|
|
27361
|
+
|
|
27286
27362
|
try {
|
|
27287
27363
|
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
|
27288
27364
|
} catch (e) {
|
|
@@ -27475,7 +27551,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
27475
27551
|
* @returns {Object} Result of all merge properties
|
|
27476
27552
|
*/
|
|
27477
27553
|
function merge(/* obj1, obj2, obj3, ... */) {
|
|
27478
|
-
const {caseless} = isContextDefined(this) && this || {};
|
|
27554
|
+
const {caseless, skipUndefined} = isContextDefined(this) && this || {};
|
|
27479
27555
|
const result = {};
|
|
27480
27556
|
const assignValue = (val, key) => {
|
|
27481
27557
|
const targetKey = caseless && findKey(result, key) || key;
|
|
@@ -27486,7 +27562,9 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
27486
27562
|
} else if (isArray(val)) {
|
|
27487
27563
|
result[targetKey] = val.slice();
|
|
27488
27564
|
} else {
|
|
27489
|
-
|
|
27565
|
+
if (!skipUndefined || !isUndefined(val)) {
|
|
27566
|
+
result[targetKey] = val;
|
|
27567
|
+
}
|
|
27490
27568
|
}
|
|
27491
27569
|
}
|
|
27492
27570
|
|
|
@@ -27767,6 +27845,8 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
27767
27845
|
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
27768
27846
|
}
|
|
27769
27847
|
|
|
27848
|
+
|
|
27849
|
+
|
|
27770
27850
|
/**
|
|
27771
27851
|
* If the thing is a FormData object, return true, otherwise return false.
|
|
27772
27852
|
*
|
|
@@ -29375,7 +29455,7 @@ function createClient(params) {
|
|
|
29375
29455
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
29376
29456
|
var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
29377
29457
|
var userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(// @ts-expect-error
|
|
29378
|
-
"".concat(sdkMain, "/").concat("11.
|
|
29458
|
+
"".concat(sdkMain, "/").concat("11.57.1"), params.application, params.integration, params.feature);
|
|
29379
29459
|
var adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
|
|
29380
29460
|
userAgent: userAgent
|
|
29381
29461
|
}));
|