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.
@@ -7343,6 +7343,7 @@ var $concat = bind.call(Function.call, Array.prototype.concat);
7343
7343
  var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
7344
7344
  var $replace = bind.call(Function.call, String.prototype.replace);
7345
7345
  var $strSlice = bind.call(Function.call, String.prototype.slice);
7346
+ var $exec = bind.call(Function.call, RegExp.prototype.exec);
7346
7347
 
7347
7348
  /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
7348
7349
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
@@ -7398,6 +7399,9 @@ module.exports = function GetIntrinsic(name, allowMissing) {
7398
7399
  throw new $TypeError('"allowMissing" argument must be a boolean');
7399
7400
  }
7400
7401
 
7402
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
7403
+ throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
7404
+ }
7401
7405
  var parts = stringToPath(name);
7402
7406
  var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
7403
7407
 
@@ -8283,11 +8287,24 @@ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
8283
8287
  var booleanValueOf = Boolean.prototype.valueOf;
8284
8288
  var objectToString = Object.prototype.toString;
8285
8289
  var functionToString = Function.prototype.toString;
8286
- var match = String.prototype.match;
8290
+ var $match = String.prototype.match;
8291
+ var $slice = String.prototype.slice;
8292
+ var $replace = String.prototype.replace;
8293
+ var $toUpperCase = String.prototype.toUpperCase;
8294
+ var $toLowerCase = String.prototype.toLowerCase;
8295
+ var $test = RegExp.prototype.test;
8296
+ var $concat = Array.prototype.concat;
8297
+ var $join = Array.prototype.join;
8298
+ var $arrSlice = Array.prototype.slice;
8299
+ var $floor = Math.floor;
8287
8300
  var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
8288
8301
  var gOPS = Object.getOwnPropertySymbols;
8289
8302
  var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
8290
8303
  var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
8304
+ // ie, `has-tostringtag/shams
8305
+ var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
8306
+ ? Symbol.toStringTag
8307
+ : null;
8291
8308
  var isEnumerable = Object.prototype.propertyIsEnumerable;
8292
8309
 
8293
8310
  var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
@@ -8298,9 +8315,31 @@ var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPr
8298
8315
  : null
8299
8316
  );
8300
8317
 
8301
- var inspectCustom = __webpack_require__(/*! ./util.inspect */ "../node_modules/object-inspect/util.inspect.js").custom;
8302
- var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null;
8303
- var toStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag !== 'undefined' ? Symbol.toStringTag : null;
8318
+ function addNumericSeparator(num, str) {
8319
+ if (
8320
+ num === Infinity
8321
+ || num === -Infinity
8322
+ || num !== num
8323
+ || (num && num > -1000 && num < 1000)
8324
+ || $test.call(/e/, str)
8325
+ ) {
8326
+ return str;
8327
+ }
8328
+ var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
8329
+ if (typeof num === 'number') {
8330
+ var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
8331
+ if (int !== num) {
8332
+ var intStr = String(int);
8333
+ var dec = $slice.call(str, intStr.length + 1);
8334
+ return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
8335
+ }
8336
+ }
8337
+ return $replace.call(str, sepRegex, '$&_');
8338
+ }
8339
+
8340
+ var utilInspect = __webpack_require__(/*! ./util.inspect */ "../node_modules/object-inspect/util.inspect.js");
8341
+ var inspectCustom = utilInspect.custom;
8342
+ var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
8304
8343
 
8305
8344
  module.exports = function inspect_(obj, options, depth, seen) {
8306
8345
  var opts = options || {};
@@ -8327,8 +8366,12 @@ module.exports = function inspect_(obj, options, depth, seen) {
8327
8366
  && opts.indent !== '\t'
8328
8367
  && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
8329
8368
  ) {
8330
- throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');
8369
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
8331
8370
  }
8371
+ if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
8372
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
8373
+ }
8374
+ var numericSeparator = opts.numericSeparator;
8332
8375
 
8333
8376
  if (typeof obj === 'undefined') {
8334
8377
  return 'undefined';
@@ -8347,10 +8390,12 @@ module.exports = function inspect_(obj, options, depth, seen) {
8347
8390
  if (obj === 0) {
8348
8391
  return Infinity / obj > 0 ? '0' : '-0';
8349
8392
  }
8350
- return String(obj);
8393
+ var str = String(obj);
8394
+ return numericSeparator ? addNumericSeparator(obj, str) : str;
8351
8395
  }
8352
8396
  if (typeof obj === 'bigint') {
8353
- return String(obj) + 'n';
8397
+ var bigIntStr = String(obj) + 'n';
8398
+ return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
8354
8399
  }
8355
8400
 
8356
8401
  var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
@@ -8369,7 +8414,7 @@ module.exports = function inspect_(obj, options, depth, seen) {
8369
8414
 
8370
8415
  function inspect(value, from, noIndent) {
8371
8416
  if (from) {
8372
- seen = seen.slice();
8417
+ seen = $arrSlice.call(seen);
8373
8418
  seen.push(from);
8374
8419
  }
8375
8420
  if (noIndent) {
@@ -8384,24 +8429,24 @@ module.exports = function inspect_(obj, options, depth, seen) {
8384
8429
  return inspect_(value, opts, depth + 1, seen);
8385
8430
  }
8386
8431
 
8387
- if (typeof obj === 'function') {
8432
+ if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable
8388
8433
  var name = nameOf(obj);
8389
8434
  var keys = arrObjKeys(obj, inspect);
8390
- return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + keys.join(', ') + ' }' : '');
8435
+ return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
8391
8436
  }
8392
8437
  if (isSymbol(obj)) {
8393
- var symString = hasShammedSymbols ? String(obj).replace(/^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
8438
+ var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
8394
8439
  return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
8395
8440
  }
8396
8441
  if (isElement(obj)) {
8397
- var s = '<' + String(obj.nodeName).toLowerCase();
8442
+ var s = '<' + $toLowerCase.call(String(obj.nodeName));
8398
8443
  var attrs = obj.attributes || [];
8399
8444
  for (var i = 0; i < attrs.length; i++) {
8400
8445
  s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
8401
8446
  }
8402
8447
  s += '>';
8403
8448
  if (obj.childNodes && obj.childNodes.length) { s += '...'; }
8404
- s += '</' + String(obj.nodeName).toLowerCase() + '>';
8449
+ s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
8405
8450
  return s;
8406
8451
  }
8407
8452
  if (isArray(obj)) {
@@ -8410,16 +8455,19 @@ module.exports = function inspect_(obj, options, depth, seen) {
8410
8455
  if (indent && !singleLineValues(xs)) {
8411
8456
  return '[' + indentedJoin(xs, indent) + ']';
8412
8457
  }
8413
- return '[ ' + xs.join(', ') + ' ]';
8458
+ return '[ ' + $join.call(xs, ', ') + ' ]';
8414
8459
  }
8415
8460
  if (isError(obj)) {
8416
8461
  var parts = arrObjKeys(obj, inspect);
8462
+ if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
8463
+ return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
8464
+ }
8417
8465
  if (parts.length === 0) { return '[' + String(obj) + ']'; }
8418
- return '{ [' + String(obj) + '] ' + parts.join(', ') + ' }';
8466
+ return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
8419
8467
  }
8420
8468
  if (typeof obj === 'object' && customInspect) {
8421
- if (inspectSymbol && typeof obj[inspectSymbol] === 'function') {
8422
- return obj[inspectSymbol]();
8469
+ if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
8470
+ return utilInspect(obj, { depth: maxDepth - depth });
8423
8471
  } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
8424
8472
  return obj.inspect();
8425
8473
  }
@@ -8463,14 +8511,14 @@ module.exports = function inspect_(obj, options, depth, seen) {
8463
8511
  var ys = arrObjKeys(obj, inspect);
8464
8512
  var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
8465
8513
  var protoTag = obj instanceof Object ? '' : 'null prototype';
8466
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? toStr(obj).slice(8, -1) : protoTag ? 'Object' : '';
8514
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
8467
8515
  var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
8468
- var tag = constructorTag + (stringTag || protoTag ? '[' + [].concat(stringTag || [], protoTag || []).join(': ') + '] ' : '');
8516
+ var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
8469
8517
  if (ys.length === 0) { return tag + '{}'; }
8470
8518
  if (indent) {
8471
8519
  return tag + '{' + indentedJoin(ys, indent) + '}';
8472
8520
  }
8473
- return tag + '{ ' + ys.join(', ') + ' }';
8521
+ return tag + '{ ' + $join.call(ys, ', ') + ' }';
8474
8522
  }
8475
8523
  return String(obj);
8476
8524
  };
@@ -8481,7 +8529,7 @@ function wrapQuotes(s, defaultStyle, opts) {
8481
8529
  }
8482
8530
 
8483
8531
  function quote(s) {
8484
- return String(s).replace(/"/g, '&quot;');
8532
+ return $replace.call(String(s), /"/g, '&quot;');
8485
8533
  }
8486
8534
 
8487
8535
  function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
@@ -8532,7 +8580,7 @@ function toStr(obj) {
8532
8580
 
8533
8581
  function nameOf(f) {
8534
8582
  if (f.name) { return f.name; }
8535
- var m = match.call(functionToString.call(f), /^function\s*([\w$]+)/);
8583
+ var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
8536
8584
  if (m) { return m[1]; }
8537
8585
  return null;
8538
8586
  }
@@ -8632,10 +8680,10 @@ function inspectString(str, opts) {
8632
8680
  if (str.length > opts.maxStringLength) {
8633
8681
  var remaining = str.length - opts.maxStringLength;
8634
8682
  var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
8635
- return inspectString(str.slice(0, opts.maxStringLength), opts) + trailer;
8683
+ return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
8636
8684
  }
8637
8685
  // eslint-disable-next-line no-control-regex
8638
- var s = str.replace(/(['\\])/g, '\\$1').replace(/[\x00-\x1f]/g, lowbyte);
8686
+ var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
8639
8687
  return wrapQuotes(s, 'single', opts);
8640
8688
  }
8641
8689
 
@@ -8649,7 +8697,7 @@ function lowbyte(c) {
8649
8697
  13: 'r'
8650
8698
  }[n];
8651
8699
  if (x) { return '\\' + x; }
8652
- return '\\x' + (n < 0x10 ? '0' : '') + n.toString(16).toUpperCase();
8700
+ return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
8653
8701
  }
8654
8702
 
8655
8703
  function markBoxed(str) {
@@ -8661,7 +8709,7 @@ function weakCollectionOf(type) {
8661
8709
  }
8662
8710
 
8663
8711
  function collectionOf(type, size, entries, indent) {
8664
- var joinedEntries = indent ? indentedJoin(entries, indent) : entries.join(', ');
8712
+ var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
8665
8713
  return type + ' (' + size + ') {' + joinedEntries + '}';
8666
8714
  }
8667
8715
 
@@ -8679,20 +8727,20 @@ function getIndent(opts, depth) {
8679
8727
  if (opts.indent === '\t') {
8680
8728
  baseIndent = '\t';
8681
8729
  } else if (typeof opts.indent === 'number' && opts.indent > 0) {
8682
- baseIndent = Array(opts.indent + 1).join(' ');
8730
+ baseIndent = $join.call(Array(opts.indent + 1), ' ');
8683
8731
  } else {
8684
8732
  return null;
8685
8733
  }
8686
8734
  return {
8687
8735
  base: baseIndent,
8688
- prev: Array(depth + 1).join(baseIndent)
8736
+ prev: $join.call(Array(depth + 1), baseIndent)
8689
8737
  };
8690
8738
  }
8691
8739
 
8692
8740
  function indentedJoin(xs, indent) {
8693
8741
  if (xs.length === 0) { return ''; }
8694
8742
  var lineJoiner = '\n' + indent.prev + indent.base;
8695
- return lineJoiner + xs.join(',' + lineJoiner) + '\n' + indent.prev;
8743
+ return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
8696
8744
  }
8697
8745
 
8698
8746
  function arrObjKeys(obj, inspect) {
@@ -8719,7 +8767,7 @@ function arrObjKeys(obj, inspect) {
8719
8767
  if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
8720
8768
  // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
8721
8769
  continue; // eslint-disable-line no-restricted-syntax, no-continue
8722
- } else if ((/[^\w$]/).test(key)) {
8770
+ } else if ($test.call(/[^\w$]/, key)) {
8723
8771
  xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
8724
8772
  } else {
8725
8773
  xs.push(key + ': ' + inspect(obj[key], obj));
@@ -10015,7 +10063,7 @@ function createClient(params) {
10015
10063
  environment: 'master'
10016
10064
  };
10017
10065
  const config = _objectSpread(_objectSpread({}, defaultConfig), params);
10018
- const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.2.14"}`, config.application, config.integration);
10066
+ const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.2.16"}`, config.application, config.integration);
10019
10067
  config.headers = _objectSpread(_objectSpread({}, config.headers), {}, {
10020
10068
  'Content-Type': 'application/vnd.contentful.delivery.v1+json',
10021
10069
  'X-Contentful-User-Agent': userAgentHeader