contentful-management 11.40.2 → 11.40.3
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 +16 -25
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +16 -25
- 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 +2 -2
|
@@ -22031,8 +22031,7 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
22031
22031
|
var bracketEqualsPos = part.indexOf(']=');
|
|
22032
22032
|
var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
|
|
22033
22033
|
|
|
22034
|
-
var key;
|
|
22035
|
-
var val;
|
|
22034
|
+
var key, val;
|
|
22036
22035
|
if (pos === -1) {
|
|
22037
22036
|
key = options.decoder(part, defaults.decoder, charset, 'key');
|
|
22038
22037
|
val = options.strictNullHandling ? null : '';
|
|
@@ -22047,7 +22046,7 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
22047
22046
|
}
|
|
22048
22047
|
|
|
22049
22048
|
if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
|
|
22050
|
-
val = interpretNumericEntities(
|
|
22049
|
+
val = interpretNumericEntities(val);
|
|
22051
22050
|
}
|
|
22052
22051
|
|
|
22053
22052
|
if (part.indexOf('[]=') > -1) {
|
|
@@ -22077,7 +22076,7 @@ var parseObject = function (chain, val, options, valuesParsed) {
|
|
|
22077
22076
|
? []
|
|
22078
22077
|
: [].concat(leaf);
|
|
22079
22078
|
} else {
|
|
22080
|
-
obj = options.plainObjects ?
|
|
22079
|
+
obj = options.plainObjects ? Object.create(null) : {};
|
|
22081
22080
|
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
|
22082
22081
|
var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;
|
|
22083
22082
|
var index = parseInt(decodedRoot, 10);
|
|
@@ -22219,11 +22218,11 @@ module.exports = function (str, opts) {
|
|
|
22219
22218
|
var options = normalizeParseOptions(opts);
|
|
22220
22219
|
|
|
22221
22220
|
if (str === '' || str === null || typeof str === 'undefined') {
|
|
22222
|
-
return options.plainObjects ?
|
|
22221
|
+
return options.plainObjects ? Object.create(null) : {};
|
|
22223
22222
|
}
|
|
22224
22223
|
|
|
22225
22224
|
var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
|
|
22226
|
-
var obj = options.plainObjects ?
|
|
22225
|
+
var obj = options.plainObjects ? Object.create(null) : {};
|
|
22227
22226
|
|
|
22228
22227
|
// Iterate over the keys and setup the new object
|
|
22229
22228
|
|
|
@@ -22287,13 +22286,11 @@ var defaults = {
|
|
|
22287
22286
|
arrayFormat: 'indices',
|
|
22288
22287
|
charset: 'utf-8',
|
|
22289
22288
|
charsetSentinel: false,
|
|
22290
|
-
commaRoundTrip: false,
|
|
22291
22289
|
delimiter: '&',
|
|
22292
22290
|
encode: true,
|
|
22293
22291
|
encodeDotInKeys: false,
|
|
22294
22292
|
encoder: utils.encode,
|
|
22295
22293
|
encodeValuesOnly: false,
|
|
22296
|
-
filter: void undefined,
|
|
22297
22294
|
format: defaultFormat,
|
|
22298
22295
|
formatter: formats.formatters[defaultFormat],
|
|
22299
22296
|
// deprecated
|
|
@@ -22405,7 +22402,7 @@ var stringify = function stringify(
|
|
|
22405
22402
|
objKeys = sort ? keys.sort(sort) : keys;
|
|
22406
22403
|
}
|
|
22407
22404
|
|
|
22408
|
-
var encodedPrefix = encodeDotInKeys ?
|
|
22405
|
+
var encodedPrefix = encodeDotInKeys ? prefix.replace(/\./g, '%2E') : prefix;
|
|
22409
22406
|
|
|
22410
22407
|
var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix;
|
|
22411
22408
|
|
|
@@ -22415,15 +22412,13 @@ var stringify = function stringify(
|
|
|
22415
22412
|
|
|
22416
22413
|
for (var j = 0; j < objKeys.length; ++j) {
|
|
22417
22414
|
var key = objKeys[j];
|
|
22418
|
-
var value = typeof key === 'object' &&
|
|
22419
|
-
? key.value
|
|
22420
|
-
: obj[key];
|
|
22415
|
+
var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
|
|
22421
22416
|
|
|
22422
22417
|
if (skipNulls && value === null) {
|
|
22423
22418
|
continue;
|
|
22424
22419
|
}
|
|
22425
22420
|
|
|
22426
|
-
var encodedKey = allowDots && encodeDotInKeys ?
|
|
22421
|
+
var encodedKey = allowDots && encodeDotInKeys ? key.replace(/\./g, '%2E') : key;
|
|
22427
22422
|
var keyPrefix = isArray(obj)
|
|
22428
22423
|
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix
|
|
22429
22424
|
: adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']');
|
|
@@ -22514,7 +22509,7 @@ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
|
|
|
22514
22509
|
arrayFormat: arrayFormat,
|
|
22515
22510
|
charset: charset,
|
|
22516
22511
|
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
|
22517
|
-
commaRoundTrip:
|
|
22512
|
+
commaRoundTrip: opts.commaRoundTrip,
|
|
22518
22513
|
delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
|
|
22519
22514
|
encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
|
|
22520
22515
|
encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys,
|
|
@@ -22565,13 +22560,12 @@ module.exports = function (object, opts) {
|
|
|
22565
22560
|
var sideChannel = getSideChannel();
|
|
22566
22561
|
for (var i = 0; i < objKeys.length; ++i) {
|
|
22567
22562
|
var key = objKeys[i];
|
|
22568
|
-
var value = obj[key];
|
|
22569
22563
|
|
|
22570
|
-
if (options.skipNulls &&
|
|
22564
|
+
if (options.skipNulls && obj[key] === null) {
|
|
22571
22565
|
continue;
|
|
22572
22566
|
}
|
|
22573
22567
|
pushToArray(keys, stringify(
|
|
22574
|
-
|
|
22568
|
+
obj[key],
|
|
22575
22569
|
key,
|
|
22576
22570
|
generateArrayPrefix,
|
|
22577
22571
|
commaRoundTrip,
|
|
@@ -22654,7 +22648,7 @@ var compactQueue = function compactQueue(queue) {
|
|
|
22654
22648
|
};
|
|
22655
22649
|
|
|
22656
22650
|
var arrayToObject = function arrayToObject(source, options) {
|
|
22657
|
-
var obj = options && options.plainObjects ?
|
|
22651
|
+
var obj = options && options.plainObjects ? Object.create(null) : {};
|
|
22658
22652
|
for (var i = 0; i < source.length; ++i) {
|
|
22659
22653
|
if (typeof source[i] !== 'undefined') {
|
|
22660
22654
|
obj[i] = source[i];
|
|
@@ -22670,14 +22664,11 @@ var merge = function merge(target, source, options) {
|
|
|
22670
22664
|
return target;
|
|
22671
22665
|
}
|
|
22672
22666
|
|
|
22673
|
-
if (typeof source !== 'object'
|
|
22667
|
+
if (typeof source !== 'object') {
|
|
22674
22668
|
if (isArray(target)) {
|
|
22675
22669
|
target.push(source);
|
|
22676
22670
|
} else if (target && typeof target === 'object') {
|
|
22677
|
-
if (
|
|
22678
|
-
(options && (options.plainObjects || options.allowPrototypes))
|
|
22679
|
-
|| !has.call(Object.prototype, source)
|
|
22680
|
-
) {
|
|
22671
|
+
if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
|
|
22681
22672
|
target[source] = true;
|
|
22682
22673
|
}
|
|
22683
22674
|
} else {
|
|
@@ -22731,7 +22722,7 @@ var assign = function assignSingleSource(target, source) {
|
|
|
22731
22722
|
}, target);
|
|
22732
22723
|
};
|
|
22733
22724
|
|
|
22734
|
-
var decode = function (str,
|
|
22725
|
+
var decode = function (str, decoder, charset) {
|
|
22735
22726
|
var strWithoutPlus = str.replace(/\+/g, ' ');
|
|
22736
22727
|
if (charset === 'iso-8859-1') {
|
|
22737
22728
|
// unescape never throws, no try...catch needed:
|
|
@@ -30712,7 +30703,7 @@ function createClient(params, opts = {}) {
|
|
|
30712
30703
|
const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
30713
30704
|
const userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(
|
|
30714
30705
|
// @ts-expect-error
|
|
30715
|
-
`${sdkMain}/${"11.40.
|
|
30706
|
+
`${sdkMain}/${"11.40.3"}`, params.application, params.integration, params.feature);
|
|
30716
30707
|
const adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
|
|
30717
30708
|
userAgent
|
|
30718
30709
|
}));
|