contentful 11.4.6 → 11.5.0

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.
@@ -72,14 +72,14 @@ function AsyncFromSyncIterator(r) {
72
72
  },
73
73
  return: function (r) {
74
74
  var n = this.s.return;
75
- return undefined === n ? Promise.resolve({
75
+ return void 0 === n ? Promise.resolve({
76
76
  value: r,
77
77
  done: true
78
78
  }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
79
79
  },
80
80
  throw: function (r) {
81
81
  var n = this.s.return;
82
- return undefined === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
82
+ return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
83
83
  }
84
84
  }, new AsyncFromSyncIterator(r);
85
85
  }
@@ -135,7 +135,7 @@ function _setPrototypeOf(t, e) {
135
135
  function _toPrimitive(t, r) {
136
136
  if ("object" != typeof t || !t) return t;
137
137
  var e = t[Symbol.toPrimitive];
138
- if (undefined !== e) {
138
+ if (void 0 !== e) {
139
139
  var i = e.call(t, r);
140
140
  if ("object" != typeof i) return i;
141
141
  throw new TypeError("@@toPrimitive must return a primitive value.");
@@ -202,7 +202,7 @@ function AsyncGenerator(e) {
202
202
  };
203
203
  t ? t = t.next = i : (r = t = i, resume(e, n));
204
204
  });
205
- }, "function" != typeof e.return && (this.return = undefined);
205
+ }, "function" != typeof e.return && (this.return = void 0);
206
206
  }
207
207
  AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () {
208
208
  return this;
@@ -215,7 +215,7 @@ AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator ||
215
215
  };
216
216
  function _wrapRegExp() {
217
217
  _wrapRegExp = function (e, r) {
218
- return new BabelRegExp(e, undefined, r);
218
+ return new BabelRegExp(e, void 0, r);
219
219
  };
220
220
  var e = RegExp.prototype,
221
221
  r = new WeakMap();
@@ -228,7 +228,7 @@ function _wrapRegExp() {
228
228
  return Object.keys(p).reduce(function (r, t) {
229
229
  var o = p[t];
230
230
  if ("number" == typeof o) r[t] = e[o];else {
231
- for (var i = 0; undefined === e[o[i]] && i + 1 < o.length;) i++;
231
+ for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++;
232
232
  r[t] = e[o[i]];
233
233
  }
234
234
  return r;
@@ -18057,7 +18057,7 @@ var getStrictProperties = SUPPORTS_SYMBOL ? getStrictPropertiesModern : getOwnPr
18057
18057
  */
18058
18058
  function copyOwnPropertiesStrict(value, clone, state) {
18059
18059
  var properties = getStrictProperties(value);
18060
- for (var index = 0, length_1 = properties.length, property = undefined, descriptor = undefined; index < length_1; ++index) {
18060
+ for (var index = 0, length_1 = properties.length, property = void 0, descriptor = void 0; index < length_1; ++index) {
18061
18061
  property = properties[index];
18062
18062
  if (property === 'callee' || property === 'caller') {
18063
18063
  continue;
@@ -18166,7 +18166,7 @@ function copyObjectLooseModern(object, state) {
18166
18166
  }
18167
18167
  }
18168
18168
  var symbols = getOwnPropertySymbols$1(object);
18169
- for (var index = 0, length_3 = symbols.length, symbol = undefined; index < length_3; ++index) {
18169
+ for (var index = 0, length_3 = symbols.length, symbol = void 0; index < length_3; ++index) {
18170
18170
  symbol = symbols[index];
18171
18171
  if (propertyIsEnumerable$1.call(object, symbol)) {
18172
18172
  clone[symbol] = state.copier(object[symbol], state);
@@ -18698,7 +18698,7 @@ function pThrottle({
18698
18698
  if (delay > 0) {
18699
18699
  timeoutId = setTimeout(execute, delay);
18700
18700
  queue.set(timeoutId, reject);
18701
- onDelay === null || onDelay === undefined || onDelay(...arguments_);
18701
+ onDelay === null || onDelay === void 0 || onDelay(...arguments_);
18702
18702
  } else {
18703
18703
  execute();
18704
18704
  }
@@ -18728,7 +18728,7 @@ function calculateLimit(type, max = 7) {
18728
18728
  let limit = max;
18729
18729
  if (PERCENTAGE_REGEX.test(type)) {
18730
18730
  var _type$match;
18731
- const groups = (_type$match = type.match(PERCENTAGE_REGEX)) === null || _type$match === undefined ? undefined : _type$match.groups;
18731
+ const groups = (_type$match = type.match(PERCENTAGE_REGEX)) === null || _type$match === void 0 ? void 0 : _type$match.groups;
18732
18732
  if (groups && groups.value) {
18733
18733
  const percentage = parseInt(groups.value) / 100;
18734
18734
  limit = Math.round(max * percentage);
@@ -19262,7 +19262,7 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
19262
19262
  if (!allowMissing) {
19263
19263
  throw new $TypeError$3('base intrinsic for ' + name + ' exists, but the property is not available.');
19264
19264
  }
19265
- return undefined;
19265
+ return void 0;
19266
19266
  }
19267
19267
  if ($gOPD$1 && i + 1 >= parts.length) {
19268
19268
  var desc = $gOPD$1(value, part);
@@ -20425,7 +20425,7 @@ var stringify$2 = function stringify(object, prefix, generateArrayPrefix, commaR
20425
20425
  var tmpSc = sideChannel;
20426
20426
  var step = 0;
20427
20427
  var findFlag = false;
20428
- while ((tmpSc = tmpSc.get(sentinel)) !== undefined && !findFlag) {
20428
+ while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) {
20429
20429
  // Where object last appeared in the ref tree
20430
20430
  var pos = tmpSc.get(object);
20431
20431
  step += 1;
@@ -20476,7 +20476,7 @@ var stringify$2 = function stringify(object, prefix, generateArrayPrefix, commaR
20476
20476
  obj = utils$1.maybeMap(obj, encoder);
20477
20477
  }
20478
20478
  objKeys = [{
20479
- value: obj.length > 0 ? obj.join(',') || null : undefined
20479
+ value: obj.length > 0 ? obj.join(',') || null : void 0
20480
20480
  }];
20481
20481
  } else if (isArray$2(filter)) {
20482
20482
  objKeys = filter;
@@ -21240,10 +21240,10 @@ function errorHandler(errorResponse) {
21240
21240
  if (!isPlainObject$1(response) || !isPlainObject$1(config)) {
21241
21241
  throw errorResponse;
21242
21242
  }
21243
- const data = response === null || response === undefined ? undefined : response.data;
21243
+ const data = response === null || response === void 0 ? void 0 : response.data;
21244
21244
  const errorData = {
21245
- status: response === null || response === undefined ? undefined : response.status,
21246
- statusText: response === null || response === undefined ? undefined : response.statusText,
21245
+ status: response === null || response === void 0 ? void 0 : response.status,
21246
+ statusText: response === null || response === void 0 ? void 0 : response.statusText,
21247
21247
  message: '',
21248
21248
  details: {}
21249
21249
  };
@@ -21266,15 +21266,15 @@ function errorHandler(errorResponse) {
21266
21266
  if ('details' in data) {
21267
21267
  errorData.details = data.details || {};
21268
21268
  }
21269
- errorName = (_data$sys = data.sys) === null || _data$sys === undefined ? undefined : _data$sys.id;
21269
+ errorName = (_data$sys = data.sys) === null || _data$sys === void 0 ? void 0 : _data$sys.id;
21270
21270
  }
21271
21271
  const error = new Error();
21272
- error.name = errorName && errorName !== 'Unknown' ? errorName : `${response === null || response === undefined ? undefined : response.status} ${response === null || response === undefined ? undefined : response.statusText}`;
21272
+ error.name = errorName && errorName !== 'Unknown' ? errorName : `${response === null || response === void 0 ? void 0 : response.status} ${response === null || response === void 0 ? void 0 : response.statusText}`;
21273
21273
  try {
21274
21274
  error.message = JSON.stringify(errorData, null, ' ');
21275
21275
  } catch (_unused) {
21276
21276
  var _errorData$message;
21277
- error.message = (_errorData$message = errorData === null || errorData === undefined ? undefined : errorData.message) !== null && _errorData$message !== undefined ? _errorData$message : '';
21277
+ error.message = (_errorData$message = errorData === null || errorData === void 0 ? void 0 : errorData.message) !== null && _errorData$message !== void 0 ? _errorData$message : '';
21278
21278
  }
21279
21279
  throw error;
21280
21280
  }
@@ -21352,10 +21352,10 @@ Object.fromEntries(Object.entries(L).map(t => t.reverse()));
21352
21352
  function w(t, n) {
21353
21353
  return G(t, n);
21354
21354
  }
21355
- var x, F;
21355
+ var x, k;
21356
21356
  function ne() {
21357
- if (F) return x;
21358
- F = 1;
21357
+ if (k) return x;
21358
+ k = 1;
21359
21359
  var t = Object.prototype.hasOwnProperty,
21360
21360
  n = Object.prototype.toString;
21361
21361
  return x = function (e, r, s) {
@@ -21396,7 +21396,7 @@ function re() {
21396
21396
  }, n.remove = function (o, e) {
21397
21397
  var r = Array.isArray(e) ? e : n.parse(e),
21398
21398
  s = r[r.length - 1];
21399
- if (s === undefined) throw new Error('Invalid JSON pointer for remove: "' + e + '"');
21399
+ if (s === void 0) throw new Error('Invalid JSON pointer for remove: "' + e + '"');
21400
21400
  var c = n.get(o, r.slice(0, -1));
21401
21401
  if (Array.isArray(c)) {
21402
21402
  var i = +s;
@@ -21447,7 +21447,7 @@ const oe = ({
21447
21447
  const r = n[t];
21448
21448
  if (r) {
21449
21449
  delete n[t];
21450
- const s = C(o, t);
21450
+ const s = b(o, t);
21451
21451
  for (const c of s) {
21452
21452
  n[c] = r;
21453
21453
  const i = p.get(o, c),
@@ -21455,7 +21455,7 @@ const oe = ({
21455
21455
  p.set(o, c, u);
21456
21456
  }
21457
21457
  } else {
21458
- const s = C(o, t);
21458
+ const s = b(o, t);
21459
21459
  for (const c of s) {
21460
21460
  const i = p.get(o, c),
21461
21461
  u = w(i, e);
@@ -21463,13 +21463,13 @@ const oe = ({
21463
21463
  }
21464
21464
  }
21465
21465
  },
21466
- C = (t, n = "") => {
21466
+ b = (t, n = "") => {
21467
21467
  const o = [],
21468
21468
  e = p.get(t, n);
21469
- if (e.content) for (let r = 0; r < e.content.length; r++) e.content[r].nodeType === "text" ? o.push(`${n}/content/${r}/value`) : o.push(...C(t, `${n}/content/${r}`));
21469
+ if (e.content) for (let r = 0; r < e.content.length; r++) e.content[r].nodeType === "text" ? o.push(`${n}/content/${r}/value`) : o.push(...b(t, `${n}/content/${r}`));
21470
21470
  return o;
21471
21471
  },
21472
- b = ({
21472
+ C = ({
21473
21473
  entityId: t,
21474
21474
  entityType: n,
21475
21475
  space: o,
@@ -21540,10 +21540,7 @@ const $ = (t, n, o, e, r) => {
21540
21540
  const {
21541
21541
  contentSourceMaps: s
21542
21542
  } = t.sys;
21543
- if (!s) {
21544
- console.error("Content source maps data is missing");
21545
- return;
21546
- }
21543
+ if (!s) return;
21547
21544
  const {
21548
21545
  mappings: c
21549
21546
  } = s;
@@ -21569,7 +21566,7 @@ const $ = (t, n, o, e, r) => {
21569
21566
  }
21570
21567
  const A = t.sys.locale;
21571
21568
  if (A) {
21572
- const E = b({
21569
+ const E = C({
21573
21570
  entityId: m,
21574
21571
  entityType: v,
21575
21572
  space: a,
@@ -21583,7 +21580,7 @@ const $ = (t, n, o, e, r) => {
21583
21580
  });
21584
21581
  P(y, h, E, t, f, c);
21585
21582
  } else Object.keys(h).forEach(S => {
21586
- const T = b({
21583
+ const T = C({
21587
21584
  entityId: m,
21588
21585
  entityType: v,
21589
21586
  space: a,
@@ -21605,7 +21602,7 @@ const $ = (t, n, o, e, r) => {
21605
21602
  const e = Q(t);
21606
21603
  if (e.sys && "items" in e) {
21607
21604
  const s = e;
21608
- if (!((r = s.sys) != null && r.contentSourceMapsLookup)) return console.error("Content source maps lookup data is missing"), s;
21605
+ if (!((r = s.sys) != null && r.contentSourceMapsLookup)) return s;
21609
21606
  const {
21610
21607
  contentSourceMapsLookup: {
21611
21608
  fieldTypes: c,
@@ -21721,7 +21718,7 @@ var getObjectCloneLoose = function (object, realm, handleCopy, cache) {
21721
21718
  }
21722
21719
  if (SYMBOL_PROPERTIES) {
21723
21720
  var symbols = getOwnPropertySymbols(object);
21724
- for (var index = 0, length_1 = symbols.length, symbol = undefined; index < length_1; ++index) {
21721
+ for (var index = 0, length_1 = symbols.length, symbol = void 0; index < length_1; ++index) {
21725
21722
  symbol = symbols[index];
21726
21723
  if (propertyIsEnumerable.call(object, symbol)) {
21727
21724
  clone[symbol] = handleCopy(object[symbol], cache);
@@ -21747,7 +21744,7 @@ var getObjectCloneStrict = function (object, realm, handleCopy, cache) {
21747
21744
  // set in the cache immediately to be able to reuse the object recursively
21748
21745
  cache.set(object, clone);
21749
21746
  var properties = SYMBOL_PROPERTIES ? getOwnPropertyNames(object).concat(getOwnPropertySymbols(object)) : getOwnPropertyNames(object);
21750
- for (var index = 0, length_2 = properties.length, property = undefined, descriptor = undefined; index < length_2; ++index) {
21747
+ for (var index = 0, length_2 = properties.length, property = void 0, descriptor = void 0; index < length_2; ++index) {
21751
21748
  property = properties[index];
21752
21749
  if (property !== 'callee' && property !== 'caller') {
21753
21750
  descriptor = getOwnPropertyDescriptor(object, property);
@@ -21970,7 +21967,7 @@ copy.default = copy;
21970
21967
  copy.strict = function strictCopy(value, options) {
21971
21968
  return copy(value, {
21972
21969
  isStrict: true,
21973
- realm: options ? options.realm : undefined
21970
+ realm: options ? options.realm : void 0
21974
21971
  });
21975
21972
  };
21976
21973
 
@@ -22605,8 +22602,8 @@ function createContentfulApi({
22605
22602
  function maybeEnableSourceMaps(query = {}) {
22606
22603
  var _a, _b;
22607
22604
  const params = http.httpClientParams;
22608
- const includeContentSourceMaps = (_a = params === null || params === undefined ? undefined : params.includeContentSourceMaps) !== null && _a !== undefined ? _a : (_b = params === null || params === undefined ? undefined : params.alphaFeatures) === null || _b === undefined ? undefined : _b.includeContentSourceMaps;
22609
- const host = params === null || params === undefined ? undefined : params.host;
22605
+ const includeContentSourceMaps = (_a = params === null || params === void 0 ? void 0 : params.includeContentSourceMaps) !== null && _a !== void 0 ? _a : (_b = params === null || params === void 0 ? void 0 : params.alphaFeatures) === null || _b === void 0 ? void 0 : _b.includeContentSourceMaps;
22606
+ const host = params === null || params === void 0 ? void 0 : params.host;
22610
22607
  const areAllowed = checkIncludeContentSourceMapsParamIsAllowed(host, includeContentSourceMaps);
22611
22608
  if (areAllowed) {
22612
22609
  query.includeContentSourceMaps = true;
@@ -22621,7 +22618,7 @@ function createContentfulApi({
22621
22618
  }
22622
22619
  function maybeEncodeCPAResponse(data, config) {
22623
22620
  var _a;
22624
- const includeContentSourceMaps = (_a = config === null || config === undefined ? undefined : config.params) === null || _a === undefined ? undefined : _a.includeContentSourceMaps;
22621
+ const includeContentSourceMaps = (_a = config === null || config === void 0 ? void 0 : config.params) === null || _a === void 0 ? void 0 : _a.includeContentSourceMaps;
22625
22622
  if (includeContentSourceMaps) {
22626
22623
  return fe(data);
22627
22624
  }
@@ -22891,7 +22888,7 @@ function createContentfulApi({
22891
22888
  } = options;
22892
22889
  return resolveCircular(data, {
22893
22890
  resolveLinks: !withoutLinkResolution,
22894
- removeUnresolved: withoutUnresolvableLinks !== null && withoutUnresolvableLinks !== undefined ? withoutUnresolvableLinks : false
22891
+ removeUnresolved: withoutUnresolvableLinks !== null && withoutUnresolvableLinks !== void 0 ? withoutUnresolvableLinks : false
22895
22892
  });
22896
22893
  }
22897
22894
  function getConceptScheme(id, query = {}) {
@@ -22965,7 +22962,7 @@ function createContentfulApi({
22965
22962
  http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;
22966
22963
  }
22967
22964
  return {
22968
- version: "11.4.6",
22965
+ version: "11.5.0",
22969
22966
  getSpace,
22970
22967
  getContentType,
22971
22968
  getContentTypes,
@@ -23088,7 +23085,7 @@ function createClient(params) {
23088
23085
  environment: 'master'
23089
23086
  };
23090
23087
  const config = Object.assign(Object.assign({}, defaultConfig), params);
23091
- const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.4.6"}`, config.application, config.integration);
23088
+ const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.5.0"}`, config.application, config.integration);
23092
23089
  config.headers = Object.assign(Object.assign({}, config.headers), {
23093
23090
  'Content-Type': 'application/vnd.contentful.delivery.v1+json',
23094
23091
  'X-Contentful-User-Agent': userAgentHeader
@@ -37,7 +37,7 @@ function createClient(params) {
37
37
  environment: 'master',
38
38
  };
39
39
  const config = Object.assign(Object.assign({}, defaultConfig), params);
40
- const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.4.6"}`, config.application, config.integration);
40
+ const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.5.0"}`, config.application, config.integration);
41
41
  config.headers = Object.assign(Object.assign({}, config.headers), { 'Content-Type': 'application/vnd.contentful.delivery.v1+json', 'X-Contentful-User-Agent': userAgentHeader });
42
42
  const http = createHttpClient(axios, config);
43
43
  if (!http.defaults.baseURL) {
@@ -46,8 +46,8 @@ function createContentfulApi({ http, getGlobalOptions }, options) {
46
46
  function maybeEnableSourceMaps(query = {}) {
47
47
  var _a, _b;
48
48
  const params = http.httpClientParams;
49
- const includeContentSourceMaps = (_a = params === null || params === undefined ? undefined : params.includeContentSourceMaps) !== null && _a !== undefined ? _a : (_b = params === null || params === undefined ? undefined : params.alphaFeatures) === null || _b === undefined ? undefined : _b.includeContentSourceMaps;
50
- const host = params === null || params === undefined ? undefined : params.host;
49
+ const includeContentSourceMaps = (_a = params === null || params === void 0 ? void 0 : params.includeContentSourceMaps) !== null && _a !== void 0 ? _a : (_b = params === null || params === void 0 ? void 0 : params.alphaFeatures) === null || _b === void 0 ? void 0 : _b.includeContentSourceMaps;
50
+ const host = params === null || params === void 0 ? void 0 : params.host;
51
51
  const areAllowed = checkIncludeContentSourceMapsParamIsAllowed(host, includeContentSourceMaps);
52
52
  if (areAllowed) {
53
53
  query.includeContentSourceMaps = true;
@@ -62,7 +62,7 @@ function createContentfulApi({ http, getGlobalOptions }, options) {
62
62
  }
63
63
  function maybeEncodeCPAResponse(data, config) {
64
64
  var _a;
65
- const includeContentSourceMaps = (_a = config === null || config === undefined ? undefined : config.params) === null || _a === undefined ? undefined : _a.includeContentSourceMaps;
65
+ const includeContentSourceMaps = (_a = config === null || config === void 0 ? void 0 : config.params) === null || _a === void 0 ? void 0 : _a.includeContentSourceMaps;
66
66
  if (includeContentSourceMaps) {
67
67
  return encodeCPAResponse(data);
68
68
  }
@@ -290,7 +290,7 @@ function createContentfulApi({ http, getGlobalOptions }, options) {
290
290
  const { withoutLinkResolution, withoutUnresolvableLinks } = options;
291
291
  return resolveCircular(data, {
292
292
  resolveLinks: !withoutLinkResolution,
293
- removeUnresolved: withoutUnresolvableLinks !== null && withoutUnresolvableLinks !== undefined ? withoutUnresolvableLinks : false,
293
+ removeUnresolved: withoutUnresolvableLinks !== null && withoutUnresolvableLinks !== void 0 ? withoutUnresolvableLinks : false,
294
294
  });
295
295
  }
296
296
  function getConceptScheme(id, query = {}) {
@@ -368,7 +368,7 @@ function createContentfulApi({ http, getGlobalOptions }, options) {
368
368
  http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;
369
369
  }
370
370
  return {
371
- version: "11.4.6",
371
+ version: "11.5.0",
372
372
  getSpace,
373
373
  getContentType,
374
374
  getContentTypes,