contentful-management 11.57.0 → 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 +2 -2
- package/dist/contentful-management.browser.js +272 -196
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +431 -250
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/contentful-management.js +1 -1
- package/package.json +1 -1
|
@@ -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:
|
|
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
|
|
23318
|
-
/* 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");
|
|
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
|
|
23337
|
-
|
|
23341
|
+
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
23342
|
+
|
|
23343
|
+
const {isFunction} = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"];
|
|
23344
|
+
|
|
23345
|
+
const globalFetchAPI = (({Request, Response}) => ({
|
|
23346
|
+
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,263 @@ const test = (fn, ...args) => {
|
|
|
23350
23359
|
}
|
|
23351
23360
|
}
|
|
23352
23361
|
|
|
23353
|
-
const
|
|
23354
|
-
|
|
23362
|
+
const factory = (env) => {
|
|
23363
|
+
env = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge.call({
|
|
23364
|
+
skipUndefined: true
|
|
23365
|
+
}, globalFetchAPI, env);
|
|
23355
23366
|
|
|
23356
|
-
const
|
|
23357
|
-
|
|
23358
|
-
|
|
23359
|
-
|
|
23360
|
-
duplexAccessed = true;
|
|
23361
|
-
return 'half';
|
|
23362
|
-
},
|
|
23363
|
-
}).headers.has('Content-Type');
|
|
23367
|
+
const {fetch: envFetch, Request, Response} = env;
|
|
23368
|
+
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
|
|
23369
|
+
const isRequestSupported = isFunction(Request);
|
|
23370
|
+
const isResponseSupported = isFunction(Response);
|
|
23364
23371
|
|
|
23365
|
-
|
|
23366
|
-
|
|
23372
|
+
if (!isFetchSupported) {
|
|
23373
|
+
return false;
|
|
23374
|
+
}
|
|
23367
23375
|
|
|
23368
|
-
const
|
|
23376
|
+
const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);
|
|
23369
23377
|
|
|
23370
|
-
const
|
|
23371
|
-
|
|
23378
|
+
const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
|
|
23379
|
+
((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
|
|
23380
|
+
async (str) => new Uint8Array(await new Request(str).arrayBuffer())
|
|
23381
|
+
);
|
|
23372
23382
|
|
|
23383
|
+
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
23384
|
+
let duplexAccessed = false;
|
|
23373
23385
|
|
|
23374
|
-
const
|
|
23375
|
-
|
|
23376
|
-
|
|
23386
|
+
const hasContentType = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].origin, {
|
|
23387
|
+
body: new ReadableStream(),
|
|
23388
|
+
method: 'POST',
|
|
23389
|
+
get duplex() {
|
|
23390
|
+
duplexAccessed = true;
|
|
23391
|
+
return 'half';
|
|
23392
|
+
},
|
|
23393
|
+
}).headers.has('Content-Type');
|
|
23377
23394
|
|
|
23378
|
-
|
|
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
|
-
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
|
-
})
|
|
23395
|
+
return duplexAccessed && !hasContentType;
|
|
23384
23396
|
});
|
|
23385
|
-
})(new Response));
|
|
23386
23397
|
|
|
23387
|
-
const
|
|
23388
|
-
|
|
23389
|
-
return 0;
|
|
23390
|
-
}
|
|
23398
|
+
const supportsResponseStream = isResponseSupported && isReadableStreamSupported &&
|
|
23399
|
+
test(() => _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(new Response('').body));
|
|
23391
23400
|
|
|
23392
|
-
|
|
23393
|
-
|
|
23394
|
-
}
|
|
23401
|
+
const resolvers = {
|
|
23402
|
+
stream: supportsResponseStream && ((res) => res.body)
|
|
23403
|
+
};
|
|
23395
23404
|
|
|
23396
|
-
|
|
23397
|
-
|
|
23398
|
-
|
|
23399
|
-
|
|
23405
|
+
isFetchSupported && ((() => {
|
|
23406
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
|
|
23407
|
+
!resolvers[type] && (resolvers[type] = (res, config) => {
|
|
23408
|
+
let method = res && res[type];
|
|
23409
|
+
|
|
23410
|
+
if (method) {
|
|
23411
|
+
return method.call(res);
|
|
23412
|
+
}
|
|
23413
|
+
|
|
23414
|
+
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);
|
|
23415
|
+
})
|
|
23400
23416
|
});
|
|
23401
|
-
|
|
23402
|
-
}
|
|
23417
|
+
})());
|
|
23403
23418
|
|
|
23404
|
-
|
|
23405
|
-
|
|
23406
|
-
|
|
23419
|
+
const getBodyLength = async (body) => {
|
|
23420
|
+
if (body == null) {
|
|
23421
|
+
return 0;
|
|
23422
|
+
}
|
|
23407
23423
|
|
|
23408
|
-
|
|
23409
|
-
|
|
23410
|
-
|
|
23424
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(body)) {
|
|
23425
|
+
return body.size;
|
|
23426
|
+
}
|
|
23411
23427
|
|
|
23412
|
-
|
|
23413
|
-
|
|
23428
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(body)) {
|
|
23429
|
+
const _request = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].origin, {
|
|
23430
|
+
method: 'POST',
|
|
23431
|
+
body,
|
|
23432
|
+
});
|
|
23433
|
+
return (await _request.arrayBuffer()).byteLength;
|
|
23434
|
+
}
|
|
23435
|
+
|
|
23436
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBufferView(body) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(body)) {
|
|
23437
|
+
return body.byteLength;
|
|
23438
|
+
}
|
|
23439
|
+
|
|
23440
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(body)) {
|
|
23441
|
+
body = body + '';
|
|
23442
|
+
}
|
|
23443
|
+
|
|
23444
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(body)) {
|
|
23445
|
+
return (await encodeText(body)).byteLength;
|
|
23446
|
+
}
|
|
23414
23447
|
}
|
|
23415
|
-
}
|
|
23416
23448
|
|
|
23417
|
-
const resolveBodyLength = async (headers, body) => {
|
|
23418
|
-
|
|
23449
|
+
const resolveBodyLength = async (headers, body) => {
|
|
23450
|
+
const length = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFiniteNumber(headers.getContentLength());
|
|
23419
23451
|
|
|
23420
|
-
|
|
23421
|
-
}
|
|
23452
|
+
return length == null ? getBodyLength(body) : length;
|
|
23453
|
+
}
|
|
23454
|
+
|
|
23455
|
+
return async (config) => {
|
|
23456
|
+
let {
|
|
23457
|
+
url,
|
|
23458
|
+
method,
|
|
23459
|
+
data,
|
|
23460
|
+
signal,
|
|
23461
|
+
cancelToken,
|
|
23462
|
+
timeout,
|
|
23463
|
+
onDownloadProgress,
|
|
23464
|
+
onUploadProgress,
|
|
23465
|
+
responseType,
|
|
23466
|
+
headers,
|
|
23467
|
+
withCredentials = 'same-origin',
|
|
23468
|
+
fetchOptions
|
|
23469
|
+
} = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(config);
|
|
23422
23470
|
|
|
23423
|
-
|
|
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);
|
|
23471
|
+
let _fetch = envFetch || fetch;
|
|
23438
23472
|
|
|
23439
|
-
|
|
23473
|
+
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
23440
23474
|
|
|
23441
|
-
|
|
23475
|
+
let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__["default"])([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
23442
23476
|
|
|
23443
|
-
|
|
23477
|
+
let request = null;
|
|
23444
23478
|
|
|
23445
|
-
|
|
23479
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
23446
23480
|
composedSignal.unsubscribe();
|
|
23447
|
-
|
|
23481
|
+
});
|
|
23448
23482
|
|
|
23449
|
-
|
|
23483
|
+
let requestContentLength;
|
|
23450
23484
|
|
|
23451
|
-
|
|
23452
|
-
|
|
23453
|
-
|
|
23454
|
-
|
|
23455
|
-
|
|
23456
|
-
|
|
23457
|
-
|
|
23458
|
-
|
|
23459
|
-
|
|
23460
|
-
|
|
23485
|
+
try {
|
|
23486
|
+
if (
|
|
23487
|
+
onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
|
|
23488
|
+
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
|
|
23489
|
+
) {
|
|
23490
|
+
let _request = new Request(url, {
|
|
23491
|
+
method: 'POST',
|
|
23492
|
+
body: data,
|
|
23493
|
+
duplex: "half"
|
|
23494
|
+
});
|
|
23461
23495
|
|
|
23462
|
-
|
|
23496
|
+
let contentTypeHeader;
|
|
23463
23497
|
|
|
23464
|
-
|
|
23465
|
-
|
|
23466
|
-
|
|
23498
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
23499
|
+
headers.setContentType(contentTypeHeader)
|
|
23500
|
+
}
|
|
23467
23501
|
|
|
23468
|
-
|
|
23469
|
-
|
|
23470
|
-
|
|
23471
|
-
|
|
23472
|
-
|
|
23502
|
+
if (_request.body) {
|
|
23503
|
+
const [onProgress, flush] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)(
|
|
23504
|
+
requestContentLength,
|
|
23505
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onUploadProgress))
|
|
23506
|
+
);
|
|
23473
23507
|
|
|
23474
|
-
|
|
23508
|
+
data = (0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
23509
|
+
}
|
|
23475
23510
|
}
|
|
23476
|
-
}
|
|
23477
23511
|
|
|
23478
|
-
|
|
23479
|
-
|
|
23480
|
-
|
|
23512
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(withCredentials)) {
|
|
23513
|
+
withCredentials = withCredentials ? 'include' : 'omit';
|
|
23514
|
+
}
|
|
23481
23515
|
|
|
23482
|
-
|
|
23483
|
-
|
|
23484
|
-
|
|
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
|
-
});
|
|
23516
|
+
// Cloudflare Workers throws when credentials are defined
|
|
23517
|
+
// see https://github.com/cloudflare/workerd/issues/902
|
|
23518
|
+
const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
|
|
23494
23519
|
|
|
23495
|
-
|
|
23520
|
+
const resolvedOptions = {
|
|
23521
|
+
...fetchOptions,
|
|
23522
|
+
signal: composedSignal,
|
|
23523
|
+
method: method.toUpperCase(),
|
|
23524
|
+
headers: headers.normalize().toJSON(),
|
|
23525
|
+
body: data,
|
|
23526
|
+
duplex: "half",
|
|
23527
|
+
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
23528
|
+
};
|
|
23496
23529
|
|
|
23497
|
-
|
|
23530
|
+
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
23498
23531
|
|
|
23499
|
-
|
|
23500
|
-
const options = {};
|
|
23532
|
+
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
|
|
23501
23533
|
|
|
23502
|
-
|
|
23503
|
-
options[prop] = response[prop];
|
|
23504
|
-
});
|
|
23534
|
+
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
23505
23535
|
|
|
23506
|
-
|
|
23536
|
+
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
23537
|
+
const options = {};
|
|
23507
23538
|
|
|
23508
|
-
|
|
23509
|
-
|
|
23510
|
-
|
|
23511
|
-
) || [];
|
|
23539
|
+
['status', 'statusText', 'headers'].forEach(prop => {
|
|
23540
|
+
options[prop] = response[prop];
|
|
23541
|
+
});
|
|
23512
23542
|
|
|
23513
|
-
|
|
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
|
-
}
|
|
23543
|
+
const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFiniteNumber(response.headers.get('content-length'));
|
|
23521
23544
|
|
|
23522
|
-
|
|
23545
|
+
const [onProgress, flush] = onDownloadProgress && (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventDecorator)(
|
|
23546
|
+
responseContentLength,
|
|
23547
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_5__.asyncDecorator)(onDownloadProgress), true)
|
|
23548
|
+
) || [];
|
|
23523
23549
|
|
|
23524
|
-
|
|
23550
|
+
response = new Response(
|
|
23551
|
+
(0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_6__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
23552
|
+
flush && flush();
|
|
23553
|
+
unsubscribe && unsubscribe();
|
|
23554
|
+
}),
|
|
23555
|
+
options
|
|
23556
|
+
);
|
|
23557
|
+
}
|
|
23525
23558
|
|
|
23526
|
-
|
|
23559
|
+
responseType = responseType || 'text';
|
|
23527
23560
|
|
|
23528
|
-
|
|
23529
|
-
|
|
23530
|
-
|
|
23531
|
-
|
|
23532
|
-
|
|
23533
|
-
|
|
23534
|
-
|
|
23535
|
-
|
|
23561
|
+
let responseData = await resolvers[_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(resolvers, responseType) || 'text'](response, config);
|
|
23562
|
+
|
|
23563
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
23564
|
+
|
|
23565
|
+
return await new Promise((resolve, reject) => {
|
|
23566
|
+
(0,_core_settle_js__WEBPACK_IMPORTED_MODULE_7__["default"])(resolve, reject, {
|
|
23567
|
+
data: responseData,
|
|
23568
|
+
headers: _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].from(response.headers),
|
|
23569
|
+
status: response.status,
|
|
23570
|
+
statusText: response.statusText,
|
|
23571
|
+
config,
|
|
23572
|
+
request
|
|
23573
|
+
})
|
|
23536
23574
|
})
|
|
23537
|
-
})
|
|
23538
|
-
|
|
23539
|
-
|
|
23540
|
-
|
|
23541
|
-
|
|
23542
|
-
|
|
23543
|
-
|
|
23544
|
-
|
|
23545
|
-
|
|
23546
|
-
|
|
23547
|
-
|
|
23575
|
+
} catch (err) {
|
|
23576
|
+
unsubscribe && unsubscribe();
|
|
23577
|
+
|
|
23578
|
+
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
23579
|
+
throw Object.assign(
|
|
23580
|
+
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NETWORK, config, request),
|
|
23581
|
+
{
|
|
23582
|
+
cause: err.cause || err
|
|
23583
|
+
}
|
|
23584
|
+
)
|
|
23585
|
+
}
|
|
23586
|
+
|
|
23587
|
+
throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(err, err && err.code, config, request);
|
|
23548
23588
|
}
|
|
23589
|
+
}
|
|
23590
|
+
}
|
|
23591
|
+
|
|
23592
|
+
const seedCache = new Map();
|
|
23593
|
+
|
|
23594
|
+
const getFetch = (config) => {
|
|
23595
|
+
let env = config ? config.env : {};
|
|
23596
|
+
const {fetch, Request, Response} = env;
|
|
23597
|
+
const seeds = [
|
|
23598
|
+
Request, Response, fetch
|
|
23599
|
+
];
|
|
23549
23600
|
|
|
23550
|
-
|
|
23601
|
+
let len = seeds.length, i = len,
|
|
23602
|
+
seed, target, map = seedCache;
|
|
23603
|
+
|
|
23604
|
+
while (i--) {
|
|
23605
|
+
seed = seeds[i];
|
|
23606
|
+
target = map.get(seed);
|
|
23607
|
+
|
|
23608
|
+
target === undefined && map.set(seed, target = (i ? new Map() : factory(env)))
|
|
23609
|
+
|
|
23610
|
+
map = target;
|
|
23551
23611
|
}
|
|
23552
|
-
}));
|
|
23553
23612
|
|
|
23613
|
+
return target;
|
|
23614
|
+
};
|
|
23554
23615
|
|
|
23616
|
+
const adapter = getFetch();
|
|
23617
|
+
|
|
23618
|
+
/* harmony default export */ __webpack_exports__["default"] = (adapter);
|
|
23555
23619
|
|
|
23556
23620
|
|
|
23557
23621
|
/***/ }),
|
|
@@ -23680,15 +23744,18 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
23680
23744
|
};
|
|
23681
23745
|
|
|
23682
23746
|
// Handle low level network errors
|
|
23683
|
-
|
|
23684
|
-
|
|
23685
|
-
|
|
23686
|
-
|
|
23687
|
-
|
|
23688
|
-
|
|
23689
|
-
|
|
23747
|
+
request.onerror = function handleError(event) {
|
|
23748
|
+
// Browsers deliver a ProgressEvent in XHR onerror
|
|
23749
|
+
// (message may be empty; when present, surface it)
|
|
23750
|
+
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
23751
|
+
const msg = event && event.message ? event.message : 'Network Error';
|
|
23752
|
+
const err = new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](msg, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_NETWORK, config, request);
|
|
23753
|
+
// attach the underlying event for consumers who want details
|
|
23754
|
+
err.event = event || null;
|
|
23755
|
+
reject(err);
|
|
23756
|
+
request = null;
|
|
23690
23757
|
};
|
|
23691
|
-
|
|
23758
|
+
|
|
23692
23759
|
// Handle timeout
|
|
23693
23760
|
request.ontimeout = function handleTimeout() {
|
|
23694
23761
|
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
@@ -24288,8 +24355,6 @@ class Axios {
|
|
|
24288
24355
|
|
|
24289
24356
|
let newConfig = config;
|
|
24290
24357
|
|
|
24291
|
-
i = 0;
|
|
24292
|
-
|
|
24293
24358
|
while (i < len) {
|
|
24294
24359
|
const onFulfilled = requestInterceptorChain[i++];
|
|
24295
24360
|
const onRejected = requestInterceptorChain[i++];
|
|
@@ -24462,11 +24527,18 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
|
24462
24527
|
return prop !== 'isAxiosError';
|
|
24463
24528
|
});
|
|
24464
24529
|
|
|
24465
|
-
|
|
24530
|
+
const msg = error && error.message ? error.message : 'Error';
|
|
24466
24531
|
|
|
24467
|
-
|
|
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
|
-
|
|
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.
|
|
25528
|
+
const VERSION = "1.12.2";
|
|
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); //
|
|
26279
|
-
} else if ((
|
|
26280
|
-
//
|
|
26281
|
-
const
|
|
26282
|
-
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
|
+
});
|
|
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;
|
|
@@ -27487,7 +27561,7 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
27487
27561
|
result[targetKey] = merge({}, val);
|
|
27488
27562
|
} else if (isArray(val)) {
|
|
27489
27563
|
result[targetKey] = val.slice();
|
|
27490
|
-
} else {
|
|
27564
|
+
} else if (!skipUndefined || !isUndefined(val)) {
|
|
27491
27565
|
result[targetKey] = val;
|
|
27492
27566
|
}
|
|
27493
27567
|
}
|
|
@@ -27769,6 +27843,8 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
27769
27843
|
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
27770
27844
|
}
|
|
27771
27845
|
|
|
27846
|
+
|
|
27847
|
+
|
|
27772
27848
|
/**
|
|
27773
27849
|
* If the thing is a FormData object, return true, otherwise return false.
|
|
27774
27850
|
*
|
|
@@ -29377,7 +29453,7 @@ function createClient(params) {
|
|
|
29377
29453
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
29378
29454
|
var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
29379
29455
|
var userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(// @ts-expect-error
|
|
29380
|
-
"".concat(sdkMain, "/").concat("11.57.
|
|
29456
|
+
"".concat(sdkMain, "/").concat("11.57.2"), params.application, params.integration, params.feature);
|
|
29381
29457
|
var adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
|
|
29382
29458
|
userAgent: userAgent
|
|
29383
29459
|
}));
|