contentful-management 7.45.1 → 7.45.2

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.
@@ -24,7 +24,7 @@ function createClient(params) {
24
24
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
25
25
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
26
26
  var userAgent = getUserAgentHeader( // @ts-expect-error
27
- "".concat(sdkMain, "/").concat("7.45.1"), params.application, params.integration, params.feature);
27
+ "".concat(sdkMain, "/").concat("7.45.2"), params.application, params.integration, params.feature);
28
28
  var adapter = createAdapter(params); // Parameters<?> and ReturnType<?> only return the types of the last overload
29
29
  // https://github.com/microsoft/TypeScript/issues/26591
30
30
  // @ts-expect-error
@@ -24,7 +24,7 @@ export var asIterator = function asIterator(fn, params) {
24
24
  var _this = this;
25
25
 
26
26
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
27
- var _yield$currentResult, total, items, skip, limit, value, endOfPage, endOfList;
27
+ var _yield$currentResult, _yield$currentResult$, total, _yield$currentResult$2, items, _yield$currentResult$3, skip, _yield$currentResult$4, limit, value, endOfPage, endOfList;
28
28
 
29
29
  return regeneratorRuntime.wrap(function _callee$(_context) {
30
30
  while (1) {
@@ -35,13 +35,17 @@ export var asIterator = function asIterator(fn, params) {
35
35
 
36
36
  case 2:
37
37
  _yield$currentResult = _context.sent;
38
- total = _yield$currentResult.total;
39
- items = _yield$currentResult.items;
40
- skip = _yield$currentResult.skip;
41
- limit = _yield$currentResult.limit;
38
+ _yield$currentResult$ = _yield$currentResult.total;
39
+ total = _yield$currentResult$ === void 0 ? 0 : _yield$currentResult$;
40
+ _yield$currentResult$2 = _yield$currentResult.items;
41
+ items = _yield$currentResult$2 === void 0 ? [] : _yield$currentResult$2;
42
+ _yield$currentResult$3 = _yield$currentResult.skip;
43
+ skip = _yield$currentResult$3 === void 0 ? 0 : _yield$currentResult$3;
44
+ _yield$currentResult$4 = _yield$currentResult.limit;
45
+ limit = _yield$currentResult$4 === void 0 ? 100 : _yield$currentResult$4;
42
46
 
43
47
  if (!(total === _this.current)) {
44
- _context.next = 9;
48
+ _context.next = 13;
45
49
  break;
46
50
  }
47
51
 
@@ -50,7 +54,7 @@ export var asIterator = function asIterator(fn, params) {
50
54
  value: null
51
55
  });
52
56
 
53
- case 9:
57
+ case 13:
54
58
  value = items[_this.current++ - skip];
55
59
  endOfPage = _this.current % limit === 0;
56
60
  endOfList = _this.current === total;
@@ -69,7 +73,7 @@ export var asIterator = function asIterator(fn, params) {
69
73
  value: value
70
74
  });
71
75
 
72
- case 14:
76
+ case 18:
73
77
  case "end":
74
78
  return _context.stop();
75
79
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentful-management",
3
- "version": "7.45.1",
3
+ "version": "7.45.2",
4
4
  "description": "Client for Contentful's Content Management API",
5
5
  "homepage": "https://www.contentful.com/developers/documentation/content-management-api/",
6
6
  "main": "./dist/contentful-management.node.js",