contentful 9.2.6 → 9.2.7

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.
@@ -3441,7 +3441,7 @@ __webpack_require__.r(__webpack_exports__);
3441
3441
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "freezeSys", function() { return freezeSys; });
3442
3442
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUserAgentHeader", function() { return getUserAgentHeader; });
3443
3443
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toPlainObject", function() { return toPlainObject; });
3444
- /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/fast-copy.js");
3444
+ /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/contentful-sdk-core/node_modules/fast-copy/dist/umd/index.js");
3445
3445
  /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fast_copy__WEBPACK_IMPORTED_MODULE_0__);
3446
3446
  /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! qs */ "../node_modules/qs/lib/index.js");
3447
3447
  /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_1__);
@@ -3511,7 +3511,13 @@ function _wrapRegExp() {
3511
3511
  var g = _groups.get(re);
3512
3512
 
3513
3513
  return Object.keys(g).reduce(function (groups, name) {
3514
- return groups[name] = result[g[name]], groups;
3514
+ var i = g[name];
3515
+ if ("number" == typeof i) groups[name] = result[i];else {
3516
+ for (var k = 0; void 0 === result[i[k]] && k + 1 < i.length;) k++;
3517
+
3518
+ groups[name] = result[i[k]];
3519
+ }
3520
+ return groups;
3515
3521
  }, Object.create(null));
3516
3522
  }
3517
3523
 
@@ -3575,11 +3581,10 @@ function _inherits(subClass, superClass) {
3575
3581
  }
3576
3582
 
3577
3583
  function _setPrototypeOf(o, p) {
3578
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
3584
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
3579
3585
  o.__proto__ = p;
3580
3586
  return o;
3581
3587
  };
3582
-
3583
3588
  return _setPrototypeOf(o, p);
3584
3589
  }
3585
3590
 
@@ -4295,6 +4300,426 @@ function errorHandler(errorResponse) {
4295
4300
 
4296
4301
  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "../node_modules/process/browser.js")))
4297
4302
 
4303
+ /***/ }),
4304
+
4305
+ /***/ "../node_modules/contentful-sdk-core/node_modules/fast-copy/dist/umd/index.js":
4306
+ /*!************************************************************************************!*\
4307
+ !*** ../node_modules/contentful-sdk-core/node_modules/fast-copy/dist/umd/index.js ***!
4308
+ \************************************************************************************/
4309
+ /*! no static exports found */
4310
+ /***/ (function(module, exports, __webpack_require__) {
4311
+
4312
+ (function (global, factory) {
4313
+ true ? factory(exports) :
4314
+ undefined;
4315
+ })(this, (function (exports) { 'use strict';
4316
+
4317
+ var toStringFunction = Function.prototype.toString;
4318
+ var create = Object.create;
4319
+ var toStringObject = Object.prototype.toString;
4320
+ /**
4321
+ * @classdesc Fallback cache for when WeakMap is not natively supported
4322
+ */
4323
+ var LegacyCache = /** @class */ (function () {
4324
+ function LegacyCache() {
4325
+ this._keys = [];
4326
+ this._values = [];
4327
+ }
4328
+ LegacyCache.prototype.has = function (key) {
4329
+ return !!~this._keys.indexOf(key);
4330
+ };
4331
+ LegacyCache.prototype.get = function (key) {
4332
+ return this._values[this._keys.indexOf(key)];
4333
+ };
4334
+ LegacyCache.prototype.set = function (key, value) {
4335
+ this._keys.push(key);
4336
+ this._values.push(value);
4337
+ };
4338
+ return LegacyCache;
4339
+ }());
4340
+ function createCacheLegacy() {
4341
+ return new LegacyCache();
4342
+ }
4343
+ function createCacheModern() {
4344
+ return new WeakMap();
4345
+ }
4346
+ /**
4347
+ * Get a new cache object to prevent circular references.
4348
+ */
4349
+ var createCache = typeof WeakMap !== 'undefined' ? createCacheModern : createCacheLegacy;
4350
+ /**
4351
+ * Get an empty version of the object with the same prototype it has.
4352
+ */
4353
+ function getCleanClone(prototype) {
4354
+ if (!prototype) {
4355
+ return create(null);
4356
+ }
4357
+ var Constructor = prototype.constructor;
4358
+ if (Constructor === Object) {
4359
+ return prototype === Object.prototype ? {} : create(prototype);
4360
+ }
4361
+ if (~toStringFunction.call(Constructor).indexOf('[native code]')) {
4362
+ try {
4363
+ return new Constructor();
4364
+ }
4365
+ catch (_a) { }
4366
+ }
4367
+ return create(prototype);
4368
+ }
4369
+ function getRegExpFlagsLegacy(regExp) {
4370
+ var flags = '';
4371
+ if (regExp.global) {
4372
+ flags += 'g';
4373
+ }
4374
+ if (regExp.ignoreCase) {
4375
+ flags += 'i';
4376
+ }
4377
+ if (regExp.multiline) {
4378
+ flags += 'm';
4379
+ }
4380
+ if (regExp.unicode) {
4381
+ flags += 'u';
4382
+ }
4383
+ if (regExp.sticky) {
4384
+ flags += 'y';
4385
+ }
4386
+ return flags;
4387
+ }
4388
+ function getRegExpFlagsModern(regExp) {
4389
+ return regExp.flags;
4390
+ }
4391
+ /**
4392
+ * Get the flags to apply to the copied regexp.
4393
+ */
4394
+ var getRegExpFlags = /test/g.flags === 'g' ? getRegExpFlagsModern : getRegExpFlagsLegacy;
4395
+ function getTagLegacy(value) {
4396
+ var type = toStringObject.call(value);
4397
+ return type.substring(8, type.length - 1);
4398
+ }
4399
+ function getTagModern(value) {
4400
+ return value[Symbol.toStringTag] || getTagLegacy(value);
4401
+ }
4402
+ /**
4403
+ * Get the tag of the value passed, so that the correct copier can be used.
4404
+ */
4405
+ var getTag = typeof Symbol !== 'undefined' ? getTagModern : getTagLegacy;
4406
+
4407
+ var defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;
4408
+ var _a = Object.prototype, hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;
4409
+ var SUPPORTS_SYMBOL = typeof getOwnPropertySymbols === 'function';
4410
+ function getStrictPropertiesModern(object) {
4411
+ return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));
4412
+ }
4413
+ /**
4414
+ * Get the properites used when copying objects strictly. This includes both keys and symbols.
4415
+ */
4416
+ var getStrictProperties = SUPPORTS_SYMBOL
4417
+ ? getStrictPropertiesModern
4418
+ : getOwnPropertyNames;
4419
+ /**
4420
+ * Striclty copy all properties contained on the object.
4421
+ */
4422
+ function copyOwnPropertiesStrict(value, clone, state) {
4423
+ var properties = getStrictProperties(value);
4424
+ for (var index = 0, length_1 = properties.length, property = void 0, descriptor = void 0; index < length_1; ++index) {
4425
+ property = properties[index];
4426
+ if (property === 'callee' || property === 'caller') {
4427
+ continue;
4428
+ }
4429
+ descriptor = getOwnPropertyDescriptor(value, property);
4430
+ if (!descriptor) {
4431
+ // In extra edge cases where the property descriptor cannot be retrived, fall back to
4432
+ // the loose assignment.
4433
+ clone[property] = state.copier(value[property], state);
4434
+ continue;
4435
+ }
4436
+ // Only clone the value if actually a value, not a getter / setter.
4437
+ if (!descriptor.get && !descriptor.set) {
4438
+ descriptor.value = state.copier(descriptor.value, state);
4439
+ }
4440
+ try {
4441
+ defineProperty(clone, property, descriptor);
4442
+ }
4443
+ catch (error) {
4444
+ // Tee above can fail on node in edge cases, so fall back to the loose assignment.
4445
+ clone[property] = descriptor.value;
4446
+ }
4447
+ }
4448
+ return clone;
4449
+ }
4450
+ /**
4451
+ * Deeply copy the indexed values in the array.
4452
+ */
4453
+ function copyArrayLoose(array, state) {
4454
+ var clone = new state.Constructor();
4455
+ // set in the cache immediately to be able to reuse the object recursively
4456
+ state.cache.set(array, clone);
4457
+ for (var index = 0, length_2 = array.length; index < length_2; ++index) {
4458
+ clone[index] = state.copier(array[index], state);
4459
+ }
4460
+ return clone;
4461
+ }
4462
+ /**
4463
+ * Deeply copy the indexed values in the array, as well as any custom properties.
4464
+ */
4465
+ function copyArrayStrict(array, state) {
4466
+ var clone = new state.Constructor();
4467
+ // set in the cache immediately to be able to reuse the object recursively
4468
+ state.cache.set(array, clone);
4469
+ return copyOwnPropertiesStrict(array, clone, state);
4470
+ }
4471
+ /**
4472
+ * Copy the contents of the ArrayBuffer.
4473
+ */
4474
+ function copyArrayBuffer(arrayBuffer, _state) {
4475
+ return arrayBuffer.slice(0);
4476
+ }
4477
+ /**
4478
+ * Create a new Blob with the contents of the original.
4479
+ */
4480
+ function copyBlob(blob, _state) {
4481
+ return blob.slice(0, blob.size, blob.type);
4482
+ }
4483
+ /**
4484
+ * Create a new DataView with the contents of the original.
4485
+ */
4486
+ function copyDataView(dataView, state) {
4487
+ return new state.Constructor(copyArrayBuffer(dataView.buffer));
4488
+ }
4489
+ /**
4490
+ * Create a new Date based on the time of the original.
4491
+ */
4492
+ function copyDate(date, state) {
4493
+ return new state.Constructor(date.getTime());
4494
+ }
4495
+ /**
4496
+ * Deeply copy the keys and values of the original.
4497
+ */
4498
+ function copyMapLoose(map, state) {
4499
+ var clone = new state.Constructor();
4500
+ // set in the cache immediately to be able to reuse the object recursively
4501
+ state.cache.set(map, clone);
4502
+ map.forEach(function (value, key) {
4503
+ clone.set(key, state.copier(value, state));
4504
+ });
4505
+ return clone;
4506
+ }
4507
+ /**
4508
+ * Deeply copy the keys and values of the original, as well as any custom properties.
4509
+ */
4510
+ function copyMapStrict(map, state) {
4511
+ return copyOwnPropertiesStrict(map, copyMapLoose(map, state), state);
4512
+ }
4513
+ function copyObjectLooseLegacy(object, state) {
4514
+ var clone = getCleanClone(state.prototype);
4515
+ // set in the cache immediately to be able to reuse the object recursively
4516
+ state.cache.set(object, clone);
4517
+ for (var key in object) {
4518
+ if (hasOwnProperty.call(object, key)) {
4519
+ clone[key] = state.copier(object[key], state);
4520
+ }
4521
+ }
4522
+ return clone;
4523
+ }
4524
+ function copyObjectLooseModern(object, state) {
4525
+ var clone = getCleanClone(state.prototype);
4526
+ // set in the cache immediately to be able to reuse the object recursively
4527
+ state.cache.set(object, clone);
4528
+ for (var key in object) {
4529
+ if (hasOwnProperty.call(object, key)) {
4530
+ clone[key] = state.copier(object[key], state);
4531
+ }
4532
+ }
4533
+ var symbols = getOwnPropertySymbols(object);
4534
+ for (var index = 0, length_3 = symbols.length, symbol = void 0; index < length_3; ++index) {
4535
+ symbol = symbols[index];
4536
+ if (propertyIsEnumerable.call(object, symbol)) {
4537
+ clone[symbol] = state.copier(object[symbol], state);
4538
+ }
4539
+ }
4540
+ return clone;
4541
+ }
4542
+ /**
4543
+ * Deeply copy the properties (keys and symbols) and values of the original.
4544
+ */
4545
+ var copyObjectLoose = SUPPORTS_SYMBOL
4546
+ ? copyObjectLooseModern
4547
+ : copyObjectLooseLegacy;
4548
+ /**
4549
+ * Deeply copy the properties (keys and symbols) and values of the original, as well
4550
+ * as any hidden or non-enumerable properties.
4551
+ */
4552
+ function copyObjectStrict(object, state) {
4553
+ var clone = getCleanClone(state.prototype);
4554
+ // set in the cache immediately to be able to reuse the object recursively
4555
+ state.cache.set(object, clone);
4556
+ return copyOwnPropertiesStrict(object, clone, state);
4557
+ }
4558
+ /**
4559
+ * Create a new primitive wrapper from the value of the original.
4560
+ */
4561
+ function copyPrimitiveWrapper(primitiveObject, state) {
4562
+ return new state.Constructor(primitiveObject.valueOf());
4563
+ }
4564
+ /**
4565
+ * Create a new RegExp based on the value and flags of the original.
4566
+ */
4567
+ function copyRegExp(regExp, state) {
4568
+ var clone = new state.Constructor(regExp.source, getRegExpFlags(regExp));
4569
+ clone.lastIndex = regExp.lastIndex;
4570
+ return clone;
4571
+ }
4572
+ /**
4573
+ * Return the original value (an identity function).
4574
+ *
4575
+ * @note
4576
+ * THis is used for objects that cannot be copied, such as WeakMap.
4577
+ */
4578
+ function copySelf(value, _state) {
4579
+ return value;
4580
+ }
4581
+ /**
4582
+ * Deeply copy the values of the original.
4583
+ */
4584
+ function copySetLoose(set, state) {
4585
+ var clone = new state.Constructor();
4586
+ // set in the cache immediately to be able to reuse the object recursively
4587
+ state.cache.set(set, clone);
4588
+ set.forEach(function (value) {
4589
+ clone.add(state.copier(value, state));
4590
+ });
4591
+ return clone;
4592
+ }
4593
+ /**
4594
+ * Deeply copy the values of the original, as well as any custom properties.
4595
+ */
4596
+ function copySetStrict(set, state) {
4597
+ return copyOwnPropertiesStrict(set, copySetLoose(set, state), state);
4598
+ }
4599
+
4600
+ var isArray = Array.isArray;
4601
+ var assign = Object.assign, getPrototypeOf = Object.getPrototypeOf;
4602
+ var DEFAULT_LOOSE_OPTIONS = {
4603
+ array: copyArrayLoose,
4604
+ arrayBuffer: copyArrayBuffer,
4605
+ blob: copyBlob,
4606
+ dataView: copyDataView,
4607
+ date: copyDate,
4608
+ error: copySelf,
4609
+ map: copyMapLoose,
4610
+ object: copyObjectLoose,
4611
+ regExp: copyRegExp,
4612
+ set: copySetLoose,
4613
+ };
4614
+ var DEFAULT_STRICT_OPTIONS = assign({}, DEFAULT_LOOSE_OPTIONS, {
4615
+ array: copyArrayStrict,
4616
+ map: copyMapStrict,
4617
+ object: copyObjectStrict,
4618
+ set: copySetStrict,
4619
+ });
4620
+ /**
4621
+ * Get the copiers used for each specific object tag.
4622
+ */
4623
+ function getTagSpecificCopiers(options) {
4624
+ return {
4625
+ Arguments: options.object,
4626
+ Array: options.array,
4627
+ ArrayBuffer: options.arrayBuffer,
4628
+ Blob: options.blob,
4629
+ Boolean: copyPrimitiveWrapper,
4630
+ DataView: options.dataView,
4631
+ Date: options.date,
4632
+ Error: options.error,
4633
+ Float32Array: options.arrayBuffer,
4634
+ Float64Array: options.arrayBuffer,
4635
+ Int8Array: options.arrayBuffer,
4636
+ Int16Array: options.arrayBuffer,
4637
+ Int32Array: options.arrayBuffer,
4638
+ Map: options.map,
4639
+ Number: copyPrimitiveWrapper,
4640
+ Object: options.object,
4641
+ Promise: copySelf,
4642
+ RegExp: options.regExp,
4643
+ Set: options.set,
4644
+ String: copyPrimitiveWrapper,
4645
+ WeakMap: copySelf,
4646
+ WeakSet: copySelf,
4647
+ Uint8Array: options.arrayBuffer,
4648
+ Uint8ClampedArray: options.arrayBuffer,
4649
+ Uint16Array: options.arrayBuffer,
4650
+ Uint32Array: options.arrayBuffer,
4651
+ Uint64Array: options.arrayBuffer,
4652
+ };
4653
+ }
4654
+ /**
4655
+ * Create a custom copier based on the object-specific copy methods passed.
4656
+ */
4657
+ function createCopier(options) {
4658
+ var normalizedOptions = assign({}, DEFAULT_LOOSE_OPTIONS, options);
4659
+ var tagSpecificCopiers = getTagSpecificCopiers(normalizedOptions);
4660
+ var array = tagSpecificCopiers.Array, object = tagSpecificCopiers.Object;
4661
+ function copier(value, state) {
4662
+ state.prototype = state.Constructor = undefined;
4663
+ if (!value || typeof value !== 'object') {
4664
+ return value;
4665
+ }
4666
+ if (state.cache.has(value)) {
4667
+ return state.cache.get(value);
4668
+ }
4669
+ state.prototype = value.__proto__ || getPrototypeOf(value);
4670
+ state.Constructor = state.prototype && state.prototype.constructor;
4671
+ // plain objects
4672
+ if (!state.Constructor || state.Constructor === Object) {
4673
+ return object(value, state);
4674
+ }
4675
+ // arrays
4676
+ if (isArray(value)) {
4677
+ return array(value, state);
4678
+ }
4679
+ var tagSpecificCopier = tagSpecificCopiers[getTag(value)];
4680
+ if (tagSpecificCopier) {
4681
+ return tagSpecificCopier(value, state);
4682
+ }
4683
+ return typeof value.then === 'function' ? value : object(value, state);
4684
+ }
4685
+ return function copy(value) {
4686
+ return copier(value, {
4687
+ Constructor: undefined,
4688
+ cache: createCache(),
4689
+ copier: copier,
4690
+ prototype: undefined,
4691
+ });
4692
+ };
4693
+ }
4694
+ /**
4695
+ * Create a custom copier based on the object-specific copy methods passed, defaulting to the
4696
+ * same internals as `copyStrict`.
4697
+ */
4698
+ function createStrictCopier(options) {
4699
+ return createCopier(assign({}, DEFAULT_STRICT_OPTIONS, options));
4700
+ }
4701
+ /**
4702
+ * Copy an value deeply as much as possible, where strict recreation of object properties
4703
+ * are maintained. All properties (including non-enumerable ones) are copied with their
4704
+ * original property descriptors on both objects and arrays.
4705
+ */
4706
+ var copyStrict = createStrictCopier({});
4707
+ /**
4708
+ * Copy an value deeply as much as possible.
4709
+ */
4710
+ var index = createCopier({});
4711
+
4712
+ exports.copyStrict = copyStrict;
4713
+ exports.createCopier = createCopier;
4714
+ exports.createStrictCopier = createStrictCopier;
4715
+ exports["default"] = index;
4716
+
4717
+ Object.defineProperty(exports, '__esModule', { value: true });
4718
+
4719
+ }));
4720
+ //# sourceMappingURL=index.js.map
4721
+
4722
+
4298
4723
  /***/ }),
4299
4724
 
4300
4725
  /***/ "../node_modules/fast-copy/dist/fast-copy.js":
@@ -9349,7 +9774,7 @@ function createClient(params) {
9349
9774
  environment: 'master'
9350
9775
  };
9351
9776
  const config = _objectSpread(_objectSpread({}, defaultConfig), params);
9352
- const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.2.6"}`, config.application, config.integration);
9777
+ const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.2.7"}`, config.application, config.integration);
9353
9778
  config.headers = _objectSpread(_objectSpread({}, config.headers), {}, {
9354
9779
  'Content-Type': 'application/vnd.contentful.delivery.v1+json',
9355
9780
  'X-Contentful-User-Agent': userAgentHeader