contentful-management 7.45.5 → 7.45.6

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.
@@ -4353,6 +4353,7 @@ var match = String.prototype.match;
4353
4353
  var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
4354
4354
  var gOPS = Object.getOwnPropertySymbols;
4355
4355
  var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
4356
+ var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
4356
4357
  var isEnumerable = Object.prototype.propertyIsEnumerable;
4357
4358
 
4358
4359
  var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
@@ -4365,7 +4366,7 @@ var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPr
4365
4366
 
4366
4367
  var inspectCustom = __webpack_require__(/*! ./util.inspect */ 1).custom;
4367
4368
  var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null;
4368
- var toStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol' ? Symbol.toStringTag : null;
4369
+ var toStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag !== 'undefined' ? Symbol.toStringTag : null;
4369
4370
 
4370
4371
  module.exports = function inspect_(obj, options, depth, seen) {
4371
4372
  var opts = options || {};
@@ -4382,8 +4383,8 @@ module.exports = function inspect_(obj, options, depth, seen) {
4382
4383
  throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
4383
4384
  }
4384
4385
  var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
4385
- if (typeof customInspect !== 'boolean') {
4386
- throw new TypeError('option "customInspect", if provided, must be `true` or `false`');
4386
+ if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
4387
+ throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
4387
4388
  }
4388
4389
 
4389
4390
  if (
@@ -4455,8 +4456,8 @@ module.exports = function inspect_(obj, options, depth, seen) {
4455
4456
  return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + keys.join(', ') + ' }' : '');
4456
4457
  }
4457
4458
  if (isSymbol(obj)) {
4458
- var symString = symToString.call(obj);
4459
- return typeof obj === 'object' ? markBoxed(symString) : symString;
4459
+ var symString = hasShammedSymbols ? String(obj).replace(/^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
4460
+ return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
4460
4461
  }
4461
4462
  if (isElement(obj)) {
4462
4463
  var s = '<' + String(obj.nodeName).toLowerCase();
@@ -4485,7 +4486,7 @@ module.exports = function inspect_(obj, options, depth, seen) {
4485
4486
  if (typeof obj === 'object' && customInspect) {
4486
4487
  if (inspectSymbol && typeof obj[inspectSymbol] === 'function') {
4487
4488
  return obj[inspectSymbol]();
4488
- } else if (typeof obj.inspect === 'function') {
4489
+ } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
4489
4490
  return obj.inspect();
4490
4491
  }
4491
4492
  }
@@ -4559,6 +4560,9 @@ function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toString
4559
4560
 
4560
4561
  // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
4561
4562
  function isSymbol(obj) {
4563
+ if (hasShammedSymbols) {
4564
+ return obj && typeof obj === 'object' && obj instanceof Symbol;
4565
+ }
4562
4566
  if (typeof obj === 'symbol') {
4563
4567
  return true;
4564
4568
  }
@@ -4766,17 +4770,28 @@ function arrObjKeys(obj, inspect) {
4766
4770
  xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
4767
4771
  }
4768
4772
  }
4773
+ var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
4774
+ var symMap;
4775
+ if (hasShammedSymbols) {
4776
+ symMap = {};
4777
+ for (var k = 0; k < syms.length; k++) {
4778
+ symMap['$' + syms[k]] = syms[k];
4779
+ }
4780
+ }
4781
+
4769
4782
  for (var key in obj) { // eslint-disable-line no-restricted-syntax
4770
4783
  if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
4771
4784
  if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
4772
- if ((/[^\w$]/).test(key)) {
4785
+ if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
4786
+ // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
4787
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
4788
+ } else if ((/[^\w$]/).test(key)) {
4773
4789
  xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
4774
4790
  } else {
4775
4791
  xs.push(key + ': ' + inspect(obj[key], obj));
4776
4792
  }
4777
4793
  }
4778
4794
  if (typeof gOPS === 'function') {
4779
- var syms = gOPS(obj);
4780
4795
  for (var j = 0; j < syms.length; j++) {
4781
4796
  if (isEnumerable.call(obj, syms[j])) {
4782
4797
  xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
@@ -9710,7 +9725,7 @@ function createClient(params) {
9710
9725
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9711
9726
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
9712
9727
  var userAgent = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["getUserAgentHeader"])( // @ts-expect-error
9713
- "".concat(sdkMain, "/").concat("7.45.5"), params.application, params.integration, params.feature);
9728
+ "".concat(sdkMain, "/").concat("7.45.6"), params.application, params.integration, params.feature);
9714
9729
  var adapter = Object(_create_adapter__WEBPACK_IMPORTED_MODULE_1__["createAdapter"])(params); // Parameters<?> and ReturnType<?> only return the types of the last overload
9715
9730
  // https://github.com/microsoft/TypeScript/issues/26591
9716
9731
  // @ts-expect-error
@@ -15337,13 +15352,15 @@ function createSpaceApi(makeRequest) {
15337
15352
  * }
15338
15353
  * },
15339
15354
  * environment: {
15340
- * type: 'Link',
15341
- * linkType: 'Environment',
15342
- * id: '<environment_id>'
15355
+ * sys: {
15356
+ * type: 'Link',
15357
+ * linkType: 'Environment',
15358
+ * id: '<environment_id>'
15359
+ * }
15343
15360
  * },
15344
15361
  * action: 'publish',
15345
15362
  * scheduledFor: {
15346
- * dateTime: <ISO_date_string>,
15363
+ * datetime: <ISO_date_string>,
15347
15364
  * timezone: 'Europe/Berlin'
15348
15365
  * }
15349
15366
  * }))
@@ -15390,13 +15407,15 @@ function createSpaceApi(makeRequest) {
15390
15407
  * }
15391
15408
  * },
15392
15409
  * environment: {
15393
- * type: 'Link',
15394
- * linkType: 'Environment',
15395
- * id: '<environment_id>'
15410
+ * sys: {
15411
+ * type: 'Link',
15412
+ * linkType: 'Environment',
15413
+ * id: '<environment_id>'
15414
+ * }
15396
15415
  * },
15397
15416
  * action: 'publish',
15398
15417
  * scheduledFor: {
15399
- * dateTime: <ISO_date_string>,
15418
+ * datetime: <ISO_date_string>,
15400
15419
  * timezone: 'Europe/Berlin'
15401
15420
  * }
15402
15421
  * })
@@ -17866,13 +17885,15 @@ function getInstanceMethods(makeRequest) {
17866
17885
  * }
17867
17886
  * },
17868
17887
  * environment: {
17869
- * type: 'Link',
17870
- * linkType: 'Environment',
17871
- * id: '<environment_id>'
17888
+ * sys: {
17889
+ * type: 'Link',
17890
+ * linkType: 'Environment',
17891
+ * id: '<environment_id>'
17892
+ * }
17872
17893
  * },
17873
17894
  * action: 'publish',
17874
17895
  * scheduledFor: {
17875
- * dateTime: <ISO_date_string>,
17896
+ * datetime: <ISO_date_string>,
17876
17897
  * timezone: 'Europe/Berlin'
17877
17898
  * }
17878
17899
  * })
@@ -17929,13 +17950,15 @@ function getInstanceMethods(makeRequest) {
17929
17950
  * }
17930
17951
  * },
17931
17952
  * environment: {
17932
- * type: 'Link',
17933
- * linkType: 'Environment',
17934
- * id: '<environment_id>'
17953
+ * sys: {
17954
+ * type: 'Link',
17955
+ * linkType: 'Environment',
17956
+ * id: '<environment_id>'
17957
+ * }
17935
17958
  * },
17936
17959
  * action: 'publish',
17937
17960
  * scheduledFor: {
17938
- * dateTime: <ISO_date_string>,
17961
+ * datetime: <ISO_date_string>,
17939
17962
  * timezone: 'Europe/Berlin'
17940
17963
  * }
17941
17964
  * })