contentful 9.2.14 → 9.2.16
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.browser.js +79 -31
- package/dist/contentful.browser.js.map +1 -1
- package/dist/contentful.browser.min.js +3 -3
- package/dist/contentful.node.js +79 -31
- package/dist/contentful.node.js.map +1 -1
- package/dist/contentful.node.min.js +2 -2
- package/dist/es-modules/contentful.js +17 -16
- package/dist/es-modules/create-contentful-api.js +95 -43
- package/dist/es-modules/create-global-options.js +1 -7
- package/dist/es-modules/entities/asset-key.js +4 -10
- package/dist/es-modules/entities/asset.js +6 -13
- package/dist/es-modules/entities/content-type.js +6 -13
- package/dist/es-modules/entities/entry.js +10 -17
- package/dist/es-modules/entities/index.js +9 -18
- package/dist/es-modules/entities/locale.js +6 -13
- package/dist/es-modules/entities/space.js +3 -8
- package/dist/es-modules/entities/tag.js +6 -13
- package/dist/es-modules/mixins/stringify-safe.js +3 -10
- package/dist/es-modules/paged-sync.js +13 -15
- package/dist/es-modules/utils/normalize-select.js +1 -7
- package/dist/es-modules/utils/validate-timestamp.js +2 -10
- package/package.json +2 -2
|
@@ -4437,6 +4437,7 @@ var $concat = bind.call(Function.call, Array.prototype.concat);
|
|
|
4437
4437
|
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
4438
4438
|
var $replace = bind.call(Function.call, String.prototype.replace);
|
|
4439
4439
|
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
|
4440
|
+
var $exec = bind.call(Function.call, RegExp.prototype.exec);
|
|
4440
4441
|
|
|
4441
4442
|
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
4442
4443
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
@@ -4492,6 +4493,9 @@ module.exports = function GetIntrinsic(name, allowMissing) {
|
|
|
4492
4493
|
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
4493
4494
|
}
|
|
4494
4495
|
|
|
4496
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
4497
|
+
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
4498
|
+
}
|
|
4495
4499
|
var parts = stringToPath(name);
|
|
4496
4500
|
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
4497
4501
|
|
|
@@ -6895,11 +6899,24 @@ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
|
6895
6899
|
var booleanValueOf = Boolean.prototype.valueOf;
|
|
6896
6900
|
var objectToString = Object.prototype.toString;
|
|
6897
6901
|
var functionToString = Function.prototype.toString;
|
|
6898
|
-
var match = String.prototype.match;
|
|
6902
|
+
var $match = String.prototype.match;
|
|
6903
|
+
var $slice = String.prototype.slice;
|
|
6904
|
+
var $replace = String.prototype.replace;
|
|
6905
|
+
var $toUpperCase = String.prototype.toUpperCase;
|
|
6906
|
+
var $toLowerCase = String.prototype.toLowerCase;
|
|
6907
|
+
var $test = RegExp.prototype.test;
|
|
6908
|
+
var $concat = Array.prototype.concat;
|
|
6909
|
+
var $join = Array.prototype.join;
|
|
6910
|
+
var $arrSlice = Array.prototype.slice;
|
|
6911
|
+
var $floor = Math.floor;
|
|
6899
6912
|
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
|
6900
6913
|
var gOPS = Object.getOwnPropertySymbols;
|
|
6901
6914
|
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
|
|
6902
6915
|
var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
|
|
6916
|
+
// ie, `has-tostringtag/shams
|
|
6917
|
+
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
|
|
6918
|
+
? Symbol.toStringTag
|
|
6919
|
+
: null;
|
|
6903
6920
|
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
6904
6921
|
|
|
6905
6922
|
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
|
|
@@ -6910,9 +6927,31 @@ var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPr
|
|
|
6910
6927
|
: null
|
|
6911
6928
|
);
|
|
6912
6929
|
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6930
|
+
function addNumericSeparator(num, str) {
|
|
6931
|
+
if (
|
|
6932
|
+
num === Infinity
|
|
6933
|
+
|| num === -Infinity
|
|
6934
|
+
|| num !== num
|
|
6935
|
+
|| (num && num > -1000 && num < 1000)
|
|
6936
|
+
|| $test.call(/e/, str)
|
|
6937
|
+
) {
|
|
6938
|
+
return str;
|
|
6939
|
+
}
|
|
6940
|
+
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
6941
|
+
if (typeof num === 'number') {
|
|
6942
|
+
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
|
|
6943
|
+
if (int !== num) {
|
|
6944
|
+
var intStr = String(int);
|
|
6945
|
+
var dec = $slice.call(str, intStr.length + 1);
|
|
6946
|
+
return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
|
|
6947
|
+
}
|
|
6948
|
+
}
|
|
6949
|
+
return $replace.call(str, sepRegex, '$&_');
|
|
6950
|
+
}
|
|
6951
|
+
|
|
6952
|
+
var utilInspect = __webpack_require__(/*! ./util.inspect */ 1);
|
|
6953
|
+
var inspectCustom = utilInspect.custom;
|
|
6954
|
+
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
6916
6955
|
|
|
6917
6956
|
module.exports = function inspect_(obj, options, depth, seen) {
|
|
6918
6957
|
var opts = options || {};
|
|
@@ -6939,8 +6978,12 @@ module.exports = function inspect_(obj, options, depth, seen) {
|
|
|
6939
6978
|
&& opts.indent !== '\t'
|
|
6940
6979
|
&& !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
|
|
6941
6980
|
) {
|
|
6942
|
-
throw new TypeError('
|
|
6981
|
+
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
6943
6982
|
}
|
|
6983
|
+
if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
|
|
6984
|
+
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
6985
|
+
}
|
|
6986
|
+
var numericSeparator = opts.numericSeparator;
|
|
6944
6987
|
|
|
6945
6988
|
if (typeof obj === 'undefined') {
|
|
6946
6989
|
return 'undefined';
|
|
@@ -6959,10 +7002,12 @@ module.exports = function inspect_(obj, options, depth, seen) {
|
|
|
6959
7002
|
if (obj === 0) {
|
|
6960
7003
|
return Infinity / obj > 0 ? '0' : '-0';
|
|
6961
7004
|
}
|
|
6962
|
-
|
|
7005
|
+
var str = String(obj);
|
|
7006
|
+
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
6963
7007
|
}
|
|
6964
7008
|
if (typeof obj === 'bigint') {
|
|
6965
|
-
|
|
7009
|
+
var bigIntStr = String(obj) + 'n';
|
|
7010
|
+
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
6966
7011
|
}
|
|
6967
7012
|
|
|
6968
7013
|
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
|
|
@@ -6981,7 +7026,7 @@ module.exports = function inspect_(obj, options, depth, seen) {
|
|
|
6981
7026
|
|
|
6982
7027
|
function inspect(value, from, noIndent) {
|
|
6983
7028
|
if (from) {
|
|
6984
|
-
seen =
|
|
7029
|
+
seen = $arrSlice.call(seen);
|
|
6985
7030
|
seen.push(from);
|
|
6986
7031
|
}
|
|
6987
7032
|
if (noIndent) {
|
|
@@ -6996,24 +7041,24 @@ module.exports = function inspect_(obj, options, depth, seen) {
|
|
|
6996
7041
|
return inspect_(value, opts, depth + 1, seen);
|
|
6997
7042
|
}
|
|
6998
7043
|
|
|
6999
|
-
if (typeof obj === 'function') {
|
|
7044
|
+
if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable
|
|
7000
7045
|
var name = nameOf(obj);
|
|
7001
7046
|
var keys = arrObjKeys(obj, inspect);
|
|
7002
|
-
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' +
|
|
7047
|
+
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
|
|
7003
7048
|
}
|
|
7004
7049
|
if (isSymbol(obj)) {
|
|
7005
|
-
var symString = hasShammedSymbols ? String(obj)
|
|
7050
|
+
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
|
|
7006
7051
|
return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
7007
7052
|
}
|
|
7008
7053
|
if (isElement(obj)) {
|
|
7009
|
-
var s = '<' + String(obj.nodeName)
|
|
7054
|
+
var s = '<' + $toLowerCase.call(String(obj.nodeName));
|
|
7010
7055
|
var attrs = obj.attributes || [];
|
|
7011
7056
|
for (var i = 0; i < attrs.length; i++) {
|
|
7012
7057
|
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
|
|
7013
7058
|
}
|
|
7014
7059
|
s += '>';
|
|
7015
7060
|
if (obj.childNodes && obj.childNodes.length) { s += '...'; }
|
|
7016
|
-
s += '</' + String(obj.nodeName)
|
|
7061
|
+
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
|
|
7017
7062
|
return s;
|
|
7018
7063
|
}
|
|
7019
7064
|
if (isArray(obj)) {
|
|
@@ -7022,16 +7067,19 @@ module.exports = function inspect_(obj, options, depth, seen) {
|
|
|
7022
7067
|
if (indent && !singleLineValues(xs)) {
|
|
7023
7068
|
return '[' + indentedJoin(xs, indent) + ']';
|
|
7024
7069
|
}
|
|
7025
|
-
return '[ ' +
|
|
7070
|
+
return '[ ' + $join.call(xs, ', ') + ' ]';
|
|
7026
7071
|
}
|
|
7027
7072
|
if (isError(obj)) {
|
|
7028
7073
|
var parts = arrObjKeys(obj, inspect);
|
|
7074
|
+
if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
|
|
7075
|
+
return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
|
|
7076
|
+
}
|
|
7029
7077
|
if (parts.length === 0) { return '[' + String(obj) + ']'; }
|
|
7030
|
-
return '{ [' + String(obj) + '] ' +
|
|
7078
|
+
return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
|
|
7031
7079
|
}
|
|
7032
7080
|
if (typeof obj === 'object' && customInspect) {
|
|
7033
|
-
if (inspectSymbol && typeof obj[inspectSymbol] === 'function') {
|
|
7034
|
-
return obj
|
|
7081
|
+
if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
|
|
7082
|
+
return utilInspect(obj, { depth: maxDepth - depth });
|
|
7035
7083
|
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
|
|
7036
7084
|
return obj.inspect();
|
|
7037
7085
|
}
|
|
@@ -7075,14 +7123,14 @@ module.exports = function inspect_(obj, options, depth, seen) {
|
|
|
7075
7123
|
var ys = arrObjKeys(obj, inspect);
|
|
7076
7124
|
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
7077
7125
|
var protoTag = obj instanceof Object ? '' : 'null prototype';
|
|
7078
|
-
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? toStr(obj)
|
|
7126
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
|
|
7079
7127
|
var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
|
|
7080
|
-
var tag = constructorTag + (stringTag || protoTag ? '[' +
|
|
7128
|
+
var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
|
|
7081
7129
|
if (ys.length === 0) { return tag + '{}'; }
|
|
7082
7130
|
if (indent) {
|
|
7083
7131
|
return tag + '{' + indentedJoin(ys, indent) + '}';
|
|
7084
7132
|
}
|
|
7085
|
-
return tag + '{ ' +
|
|
7133
|
+
return tag + '{ ' + $join.call(ys, ', ') + ' }';
|
|
7086
7134
|
}
|
|
7087
7135
|
return String(obj);
|
|
7088
7136
|
};
|
|
@@ -7093,7 +7141,7 @@ function wrapQuotes(s, defaultStyle, opts) {
|
|
|
7093
7141
|
}
|
|
7094
7142
|
|
|
7095
7143
|
function quote(s) {
|
|
7096
|
-
return String(s)
|
|
7144
|
+
return $replace.call(String(s), /"/g, '"');
|
|
7097
7145
|
}
|
|
7098
7146
|
|
|
7099
7147
|
function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
@@ -7144,7 +7192,7 @@ function toStr(obj) {
|
|
|
7144
7192
|
|
|
7145
7193
|
function nameOf(f) {
|
|
7146
7194
|
if (f.name) { return f.name; }
|
|
7147
|
-
var m = match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
7195
|
+
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
7148
7196
|
if (m) { return m[1]; }
|
|
7149
7197
|
return null;
|
|
7150
7198
|
}
|
|
@@ -7244,10 +7292,10 @@ function inspectString(str, opts) {
|
|
|
7244
7292
|
if (str.length > opts.maxStringLength) {
|
|
7245
7293
|
var remaining = str.length - opts.maxStringLength;
|
|
7246
7294
|
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
|
|
7247
|
-
return inspectString(
|
|
7295
|
+
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
7248
7296
|
}
|
|
7249
7297
|
// eslint-disable-next-line no-control-regex
|
|
7250
|
-
var s =
|
|
7298
|
+
var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
|
7251
7299
|
return wrapQuotes(s, 'single', opts);
|
|
7252
7300
|
}
|
|
7253
7301
|
|
|
@@ -7261,7 +7309,7 @@ function lowbyte(c) {
|
|
|
7261
7309
|
13: 'r'
|
|
7262
7310
|
}[n];
|
|
7263
7311
|
if (x) { return '\\' + x; }
|
|
7264
|
-
return '\\x' + (n < 0x10 ? '0' : '') + n.toString(16)
|
|
7312
|
+
return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
|
|
7265
7313
|
}
|
|
7266
7314
|
|
|
7267
7315
|
function markBoxed(str) {
|
|
@@ -7273,7 +7321,7 @@ function weakCollectionOf(type) {
|
|
|
7273
7321
|
}
|
|
7274
7322
|
|
|
7275
7323
|
function collectionOf(type, size, entries, indent) {
|
|
7276
|
-
var joinedEntries = indent ? indentedJoin(entries, indent) :
|
|
7324
|
+
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
|
|
7277
7325
|
return type + ' (' + size + ') {' + joinedEntries + '}';
|
|
7278
7326
|
}
|
|
7279
7327
|
|
|
@@ -7291,20 +7339,20 @@ function getIndent(opts, depth) {
|
|
|
7291
7339
|
if (opts.indent === '\t') {
|
|
7292
7340
|
baseIndent = '\t';
|
|
7293
7341
|
} else if (typeof opts.indent === 'number' && opts.indent > 0) {
|
|
7294
|
-
baseIndent = Array(opts.indent + 1)
|
|
7342
|
+
baseIndent = $join.call(Array(opts.indent + 1), ' ');
|
|
7295
7343
|
} else {
|
|
7296
7344
|
return null;
|
|
7297
7345
|
}
|
|
7298
7346
|
return {
|
|
7299
7347
|
base: baseIndent,
|
|
7300
|
-
prev: Array(depth + 1)
|
|
7348
|
+
prev: $join.call(Array(depth + 1), baseIndent)
|
|
7301
7349
|
};
|
|
7302
7350
|
}
|
|
7303
7351
|
|
|
7304
7352
|
function indentedJoin(xs, indent) {
|
|
7305
7353
|
if (xs.length === 0) { return ''; }
|
|
7306
7354
|
var lineJoiner = '\n' + indent.prev + indent.base;
|
|
7307
|
-
return lineJoiner +
|
|
7355
|
+
return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
|
|
7308
7356
|
}
|
|
7309
7357
|
|
|
7310
7358
|
function arrObjKeys(obj, inspect) {
|
|
@@ -7331,7 +7379,7 @@ function arrObjKeys(obj, inspect) {
|
|
|
7331
7379
|
if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
|
|
7332
7380
|
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
|
|
7333
7381
|
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
|
7334
|
-
} else if ((/[^\w$]
|
|
7382
|
+
} else if ($test.call(/[^\w$]/, key)) {
|
|
7335
7383
|
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
|
|
7336
7384
|
} else {
|
|
7337
7385
|
xs.push(key + ': ' + inspect(obj[key], obj));
|
|
@@ -8841,7 +8889,7 @@ function createClient(params) {
|
|
|
8841
8889
|
environment: 'master'
|
|
8842
8890
|
};
|
|
8843
8891
|
const config = _objectSpread(_objectSpread({}, defaultConfig), params);
|
|
8844
|
-
const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.2.
|
|
8892
|
+
const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.2.16"}`, config.application, config.integration);
|
|
8845
8893
|
config.headers = _objectSpread(_objectSpread({}, config.headers), {}, {
|
|
8846
8894
|
'Content-Type': 'application/vnd.contentful.delivery.v1+json',
|
|
8847
8895
|
'X-Contentful-User-Agent': userAgentHeader
|