contentful 11.12.2 → 11.12.3
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.
|
@@ -1949,8 +1949,8 @@ var contentful = (function (exports) {
|
|
|
1949
1949
|
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
|
1950
1950
|
|
|
1951
1951
|
// reserved names hotfix
|
|
1952
|
-
utils$1$1.reduceDescriptors(AxiosHeaders.prototype, function (
|
|
1953
|
-
var value =
|
|
1952
|
+
utils$1$1.reduceDescriptors(AxiosHeaders.prototype, function (_ref0, key) {
|
|
1953
|
+
var value = _ref0.value;
|
|
1954
1954
|
var mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
1955
1955
|
return {
|
|
1956
1956
|
get: function get() {
|
|
@@ -3186,10 +3186,10 @@ var contentful = (function (exports) {
|
|
|
3186
3186
|
headers.set(formHeaders);
|
|
3187
3187
|
return;
|
|
3188
3188
|
}
|
|
3189
|
-
Object.entries(formHeaders).forEach(function (
|
|
3190
|
-
var
|
|
3191
|
-
key =
|
|
3192
|
-
val =
|
|
3189
|
+
Object.entries(formHeaders).forEach(function (_ref1) {
|
|
3190
|
+
var _ref10 = _slicedToArray$1(_ref1, 2),
|
|
3191
|
+
key = _ref10[0],
|
|
3192
|
+
val = _ref10[1];
|
|
3193
3193
|
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
3194
3194
|
headers.set(key, val);
|
|
3195
3195
|
}
|
|
@@ -3818,7 +3818,7 @@ var contentful = (function (exports) {
|
|
|
3818
3818
|
return encoder.encode(str);
|
|
3819
3819
|
};
|
|
3820
3820
|
}(new TextEncoder()) : (/*#__PURE__*/function () {
|
|
3821
|
-
var
|
|
3821
|
+
var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(str) {
|
|
3822
3822
|
return _regeneratorRuntime.wrap(function _callee4$(_context5) {
|
|
3823
3823
|
while (1) switch (_context5.prev = _context5.next) {
|
|
3824
3824
|
case 0:
|
|
@@ -3835,7 +3835,7 @@ var contentful = (function (exports) {
|
|
|
3835
3835
|
}, _callee4);
|
|
3836
3836
|
}));
|
|
3837
3837
|
return function (_x4) {
|
|
3838
|
-
return
|
|
3838
|
+
return _ref11.apply(this, arguments);
|
|
3839
3839
|
};
|
|
3840
3840
|
}()));
|
|
3841
3841
|
var supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(function () {
|
|
@@ -3874,7 +3874,7 @@ var contentful = (function (exports) {
|
|
|
3874
3874
|
});
|
|
3875
3875
|
}();
|
|
3876
3876
|
var getBodyLength = /*#__PURE__*/function () {
|
|
3877
|
-
var
|
|
3877
|
+
var _ref12 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(body) {
|
|
3878
3878
|
var _request;
|
|
3879
3879
|
return _regeneratorRuntime.wrap(function _callee5$(_context6) {
|
|
3880
3880
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -3928,11 +3928,11 @@ var contentful = (function (exports) {
|
|
|
3928
3928
|
}, _callee5);
|
|
3929
3929
|
}));
|
|
3930
3930
|
return function getBodyLength(_x5) {
|
|
3931
|
-
return
|
|
3931
|
+
return _ref12.apply(this, arguments);
|
|
3932
3932
|
};
|
|
3933
3933
|
}();
|
|
3934
3934
|
var resolveBodyLength = /*#__PURE__*/function () {
|
|
3935
|
-
var
|
|
3935
|
+
var _ref13 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(headers, body) {
|
|
3936
3936
|
var length;
|
|
3937
3937
|
return _regeneratorRuntime.wrap(function _callee6$(_context7) {
|
|
3938
3938
|
while (1) switch (_context7.prev = _context7.next) {
|
|
@@ -3946,12 +3946,12 @@ var contentful = (function (exports) {
|
|
|
3946
3946
|
}, _callee6);
|
|
3947
3947
|
}));
|
|
3948
3948
|
return function resolveBodyLength(_x6, _x7) {
|
|
3949
|
-
return
|
|
3949
|
+
return _ref13.apply(this, arguments);
|
|
3950
3950
|
};
|
|
3951
3951
|
}();
|
|
3952
3952
|
return /*#__PURE__*/function () {
|
|
3953
|
-
var
|
|
3954
|
-
var _resolveConfig, url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, _resolveConfig$withCr, withCredentials, fetchOptions, maxContentLength, maxBodyLength, hasMaxContentLength, hasMaxBodyLength, _fetch, composedSignal, request, unsubscribe, requestContentLength, estimated, outboundLength, _request, contentTypeHeader, _progressEventDecorat, _progressEventDecorat2, onProgress, flush, isCredentialsSupported, contentType, resolvedOptions, response, declaredLength, isStreamResponse, options, responseContentLength,
|
|
3953
|
+
var _ref14 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(config) {
|
|
3954
|
+
var _resolveConfig, url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, _resolveConfig$withCr, withCredentials, fetchOptions, maxContentLength, maxBodyLength, hasMaxContentLength, hasMaxBodyLength, _fetch, composedSignal, request, unsubscribe, requestContentLength, estimated, outboundLength, _request, contentTypeHeader, _progressEventDecorat, _progressEventDecorat2, onProgress, flush, isCredentialsSupported, contentType, resolvedOptions, response, declaredLength, isStreamResponse, options, responseContentLength, _ref15, _ref16, _onProgress, _flush, bytesRead, onChunkProgress, responseData, materializedSize, canceledError;
|
|
3955
3955
|
return _regeneratorRuntime.wrap(function _callee7$(_context8) {
|
|
3956
3956
|
while (1) switch (_context8.prev = _context8.next) {
|
|
3957
3957
|
case 0:
|
|
@@ -4067,7 +4067,7 @@ var contentful = (function (exports) {
|
|
|
4067
4067
|
options[prop] = response[prop];
|
|
4068
4068
|
});
|
|
4069
4069
|
responseContentLength = utils$1$1.toFiniteNumber(response.headers.get('content-length'));
|
|
4070
|
-
|
|
4070
|
+
_ref15 = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [], _ref16 = _slicedToArray$1(_ref15, 2), _onProgress = _ref16[0], _flush = _ref16[1];
|
|
4071
4071
|
bytesRead = 0;
|
|
4072
4072
|
onChunkProgress = function onChunkProgress(loadedBytes) {
|
|
4073
4073
|
if (hasMaxContentLength) {
|
|
@@ -4155,7 +4155,7 @@ var contentful = (function (exports) {
|
|
|
4155
4155
|
}, _callee7, null, [[8, 58]]);
|
|
4156
4156
|
}));
|
|
4157
4157
|
return function (_x8) {
|
|
4158
|
-
return
|
|
4158
|
+
return _ref14.apply(this, arguments);
|
|
4159
4159
|
};
|
|
4160
4160
|
}();
|
|
4161
4161
|
};
|
|
@@ -4271,10 +4271,10 @@ var contentful = (function (exports) {
|
|
|
4271
4271
|
rejectedReasons[id || '#' + i] = adapter;
|
|
4272
4272
|
}
|
|
4273
4273
|
if (!adapter) {
|
|
4274
|
-
var reasons = Object.entries(rejectedReasons).map(function (
|
|
4275
|
-
var
|
|
4276
|
-
id =
|
|
4277
|
-
state =
|
|
4274
|
+
var reasons = Object.entries(rejectedReasons).map(function (_ref17) {
|
|
4275
|
+
var _ref18 = _slicedToArray$1(_ref17, 2),
|
|
4276
|
+
id = _ref18[0],
|
|
4277
|
+
state = _ref18[1];
|
|
4278
4278
|
return "adapter ".concat(id, " ") + (state === false ? 'is not supported by the environment' : 'is not available in the build');
|
|
4279
4279
|
});
|
|
4280
4280
|
var s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
|
|
@@ -4525,7 +4525,7 @@ var contentful = (function (exports) {
|
|
|
4525
4525
|
}
|
|
4526
4526
|
}, _callee8, this, [[0, 6]]);
|
|
4527
4527
|
}));
|
|
4528
|
-
function request(_x9,
|
|
4528
|
+
function request(_x9, _x0) {
|
|
4529
4529
|
return _request2.apply(this, arguments);
|
|
4530
4530
|
}
|
|
4531
4531
|
return request;
|
|
@@ -4922,10 +4922,10 @@ var contentful = (function (exports) {
|
|
|
4922
4922
|
SslHandshakeFailed: 525,
|
|
4923
4923
|
InvalidSslCertificate: 526
|
|
4924
4924
|
};
|
|
4925
|
-
Object.entries(HttpStatusCode).forEach(function (
|
|
4926
|
-
var
|
|
4927
|
-
key =
|
|
4928
|
-
value =
|
|
4925
|
+
Object.entries(HttpStatusCode).forEach(function (_ref19) {
|
|
4926
|
+
var _ref20 = _slicedToArray$1(_ref19, 2),
|
|
4927
|
+
key = _ref20[0],
|
|
4928
|
+
value = _ref20[1];
|
|
4929
4929
|
HttpStatusCode[value] = key;
|
|
4930
4930
|
});
|
|
4931
4931
|
|
|
@@ -8087,7 +8087,7 @@ var contentful = (function (exports) {
|
|
|
8087
8087
|
}
|
|
8088
8088
|
if (obj === null) {
|
|
8089
8089
|
if (strictNullHandling) {
|
|
8090
|
-
return encoder && !encodeValuesOnly ? encoder(prefix, defaults$1.encoder, charset, 'key', format) : prefix;
|
|
8090
|
+
return formatter(encoder && !encodeValuesOnly ? encoder(prefix, defaults$1.encoder, charset, 'key', format) : prefix);
|
|
8091
8091
|
}
|
|
8092
8092
|
obj = '';
|
|
8093
8093
|
}
|
|
@@ -8106,7 +8106,9 @@ var contentful = (function (exports) {
|
|
|
8106
8106
|
if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
|
|
8107
8107
|
// we need to join elements in
|
|
8108
8108
|
if (encodeValuesOnly && encoder) {
|
|
8109
|
-
obj = utils$1.maybeMap(obj,
|
|
8109
|
+
obj = utils$1.maybeMap(obj, function (v) {
|
|
8110
|
+
return v == null ? v : encoder(v);
|
|
8111
|
+
});
|
|
8110
8112
|
}
|
|
8111
8113
|
objKeys = [{
|
|
8112
8114
|
value: obj.length > 0 ? obj.join(',') || null : void undefined
|
|
@@ -8227,6 +8229,9 @@ var contentful = (function (exports) {
|
|
|
8227
8229
|
var sideChannel = getSideChannel();
|
|
8228
8230
|
for (var i = 0; i < objKeys.length; ++i) {
|
|
8229
8231
|
var key = objKeys[i];
|
|
8232
|
+
if (typeof key === 'undefined' || key === null) {
|
|
8233
|
+
continue;
|
|
8234
|
+
}
|
|
8230
8235
|
var value = obj[key];
|
|
8231
8236
|
if (options.skipNulls && value === null) {
|
|
8232
8237
|
continue;
|
|
@@ -8238,10 +8243,10 @@ var contentful = (function (exports) {
|
|
|
8238
8243
|
if (options.charsetSentinel) {
|
|
8239
8244
|
if (options.charset === 'iso-8859-1') {
|
|
8240
8245
|
// encodeURIComponent('✓'), the "numeric entity" representation of a checkmark
|
|
8241
|
-
prefix += 'utf8=%26%2310003%3B
|
|
8246
|
+
prefix += 'utf8=%26%2310003%3B' + options.delimiter;
|
|
8242
8247
|
} else {
|
|
8243
8248
|
// encodeURIComponent('✓')
|
|
8244
|
-
prefix += 'utf8=%E2%9C%93
|
|
8249
|
+
prefix += 'utf8=%E2%9C%93' + options.delimiter;
|
|
8245
8250
|
}
|
|
8246
8251
|
}
|
|
8247
8252
|
return joined.length > 0 ? prefix + joined : '';
|
|
@@ -8306,8 +8311,8 @@ var contentful = (function (exports) {
|
|
|
8306
8311
|
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
|
|
8307
8312
|
cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']');
|
|
8308
8313
|
var limit = options.parameterLimit === Infinity ? void undefined : options.parameterLimit;
|
|
8309
|
-
var parts = cleanStr.split(options.delimiter, options.throwOnLimitExceeded ? limit + 1 : limit);
|
|
8310
|
-
if (options.throwOnLimitExceeded && parts.length > limit) {
|
|
8314
|
+
var parts = cleanStr.split(options.delimiter, options.throwOnLimitExceeded && typeof limit !== 'undefined' ? limit + 1 : limit);
|
|
8315
|
+
if (options.throwOnLimitExceeded && typeof limit !== 'undefined' && parts.length > limit) {
|
|
8311
8316
|
throw new RangeError('Parameter limit exceeded. Only ' + limit + ' parameter' + (limit === 1 ? '' : 's') + ' allowed.');
|
|
8312
8317
|
}
|
|
8313
8318
|
var skipIndex = -1; // Keep track of where the utf8 sentinel was found
|
|
@@ -8414,8 +8419,13 @@ var contentful = (function (exports) {
|
|
|
8414
8419
|
}
|
|
8415
8420
|
return leaf;
|
|
8416
8421
|
};
|
|
8417
|
-
|
|
8418
|
-
|
|
8422
|
+
|
|
8423
|
+
// Split a key like "a[b][c[]]" into ['a', '[b]', '[c[]]'] while preserving
|
|
8424
|
+
// qs parse semantics for depth/prototype guards.
|
|
8425
|
+
var splitKeyIntoSegments = function splitKeyIntoSegments(originalKey, options) {
|
|
8426
|
+
var key = options.allowDots ? originalKey.replace(/\.([^.[]+)/g, '[$1]') : originalKey;
|
|
8427
|
+
|
|
8428
|
+
// depth <= 0 keeps the whole key as one segment
|
|
8419
8429
|
if (options.depth <= 0) {
|
|
8420
8430
|
if (!options.plainObjects && has.call(Object.prototype, key)) {
|
|
8421
8431
|
if (!options.allowPrototypes) {
|
|
@@ -8424,37 +8434,67 @@ var contentful = (function (exports) {
|
|
|
8424
8434
|
}
|
|
8425
8435
|
return [key];
|
|
8426
8436
|
}
|
|
8427
|
-
var
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
var
|
|
8431
|
-
var
|
|
8437
|
+
var segments = [];
|
|
8438
|
+
|
|
8439
|
+
// parent before the first '[' (may be empty if key starts with '[')
|
|
8440
|
+
var first = key.indexOf('[');
|
|
8441
|
+
var parent = first >= 0 ? key.slice(0, first) : key;
|
|
8432
8442
|
if (parent) {
|
|
8433
8443
|
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
|
8434
8444
|
if (!options.allowPrototypes) {
|
|
8435
8445
|
return;
|
|
8436
8446
|
}
|
|
8437
8447
|
}
|
|
8438
|
-
|
|
8439
|
-
}
|
|
8440
|
-
var
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8448
|
+
segments[segments.length] = parent;
|
|
8449
|
+
}
|
|
8450
|
+
var n = key.length;
|
|
8451
|
+
var open = first;
|
|
8452
|
+
var collected = 0;
|
|
8453
|
+
while (open >= 0 && collected < options.depth) {
|
|
8454
|
+
var level = 1;
|
|
8455
|
+
var i = open + 1;
|
|
8456
|
+
var close = -1;
|
|
8457
|
+
|
|
8458
|
+
// balance nested '[' and ']' inside this bracket group using a nesting level counter
|
|
8459
|
+
while (i < n && close < 0) {
|
|
8460
|
+
var cu = key.charCodeAt(i);
|
|
8461
|
+
if (cu === 0x5B) {
|
|
8462
|
+
// '['
|
|
8463
|
+
level += 1;
|
|
8464
|
+
} else if (cu === 0x5D) {
|
|
8465
|
+
// ']'
|
|
8466
|
+
level -= 1;
|
|
8467
|
+
if (level === 0) {
|
|
8468
|
+
close = i; // found matching close; loop will exit by condition
|
|
8469
|
+
}
|
|
8447
8470
|
}
|
|
8471
|
+
i += 1;
|
|
8448
8472
|
}
|
|
8449
|
-
|
|
8473
|
+
if (close < 0) {
|
|
8474
|
+
// Unterminated group: wrap the raw remainder in one bracket pair so it stays
|
|
8475
|
+
// a single literal segment (e.g. "[[]b" -> "[[]b]"); we do not infer missing ']'.
|
|
8476
|
+
segments[segments.length] = '[' + key.slice(open) + ']';
|
|
8477
|
+
return segments;
|
|
8478
|
+
}
|
|
8479
|
+
var seg = key.slice(open, close + 1);
|
|
8480
|
+
// prototype guard for the content of this group
|
|
8481
|
+
var content = seg.slice(1, -1);
|
|
8482
|
+
if (!options.plainObjects && has.call(Object.prototype, content) && !options.allowPrototypes) {
|
|
8483
|
+
return;
|
|
8484
|
+
}
|
|
8485
|
+
segments[segments.length] = seg;
|
|
8486
|
+
collected += 1;
|
|
8487
|
+
|
|
8488
|
+
// find the next '[' after this balanced group
|
|
8489
|
+
open = key.indexOf('[', close + 1);
|
|
8450
8490
|
}
|
|
8451
|
-
if (
|
|
8491
|
+
if (open >= 0) {
|
|
8452
8492
|
if (options.strictDepth === true) {
|
|
8453
8493
|
throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true');
|
|
8454
8494
|
}
|
|
8455
|
-
|
|
8495
|
+
segments[segments.length] = '[' + key.slice(open) + ']';
|
|
8456
8496
|
}
|
|
8457
|
-
return
|
|
8497
|
+
return segments;
|
|
8458
8498
|
};
|
|
8459
8499
|
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
|
8460
8500
|
if (!givenKey) {
|
|
@@ -10046,7 +10086,9 @@ var contentful = (function (exports) {
|
|
|
10046
10086
|
return false;
|
|
10047
10087
|
}
|
|
10048
10088
|
var isValidConfig = isValidTimelinePreviewConfig(timelinePreview);
|
|
10049
|
-
|
|
10089
|
+
// Show error if used outside of CPA.
|
|
10090
|
+
// Opt-out of the error if a custom domain is used and CPA could not be idenfified
|
|
10091
|
+
var isValidHost = typeof host === 'string' && (!host.includes('contentful') || host.startsWith('preview'));
|
|
10050
10092
|
if (isValidConfig && !isValidHost) {
|
|
10051
10093
|
throw new ValidationError('timelinePreview', "The 'timelinePreview' parameter can only be used with the CPA. Please set host to 'preview.contentful.com' or 'preview.eu.contentful.com' to enable Timeline Preview.\n ");
|
|
10052
10094
|
}
|
|
@@ -10430,58 +10472,58 @@ var contentful = (function (exports) {
|
|
|
10430
10472
|
return _internalGetEntry.apply(this, arguments);
|
|
10431
10473
|
}
|
|
10432
10474
|
function _internalGetEntry() {
|
|
10433
|
-
_internalGetEntry = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10475
|
+
_internalGetEntry = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee0(id, query, options) {
|
|
10434
10476
|
var response;
|
|
10435
|
-
return _regeneratorRuntime.wrap(function
|
|
10436
|
-
while (1) switch (
|
|
10477
|
+
return _regeneratorRuntime.wrap(function _callee0$(_context0) {
|
|
10478
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
10437
10479
|
case 0:
|
|
10438
10480
|
if (id) {
|
|
10439
|
-
|
|
10481
|
+
_context0.next = 2;
|
|
10440
10482
|
break;
|
|
10441
10483
|
}
|
|
10442
10484
|
throw notFoundError(id);
|
|
10443
10485
|
case 2:
|
|
10444
|
-
|
|
10445
|
-
|
|
10486
|
+
_context0.prev = 2;
|
|
10487
|
+
_context0.next = 5;
|
|
10446
10488
|
return internalGetEntries(Object.assign({
|
|
10447
10489
|
'sys.id': id
|
|
10448
10490
|
}, maybeEnableSourceMaps(query)), options);
|
|
10449
10491
|
case 5:
|
|
10450
|
-
response =
|
|
10492
|
+
response = _context0.sent;
|
|
10451
10493
|
if (!(response.items.length > 0)) {
|
|
10452
|
-
|
|
10494
|
+
_context0.next = 10;
|
|
10453
10495
|
break;
|
|
10454
10496
|
}
|
|
10455
|
-
return
|
|
10497
|
+
return _context0.abrupt("return", response.items[0]);
|
|
10456
10498
|
case 10:
|
|
10457
10499
|
throw notFoundError(id);
|
|
10458
10500
|
case 11:
|
|
10459
|
-
|
|
10501
|
+
_context0.next = 16;
|
|
10460
10502
|
break;
|
|
10461
10503
|
case 13:
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
errorHandler(
|
|
10504
|
+
_context0.prev = 13;
|
|
10505
|
+
_context0.t0 = _context0["catch"](2);
|
|
10506
|
+
errorHandler(_context0.t0);
|
|
10465
10507
|
case 16:
|
|
10466
10508
|
case "end":
|
|
10467
|
-
return
|
|
10509
|
+
return _context0.stop();
|
|
10468
10510
|
}
|
|
10469
|
-
},
|
|
10511
|
+
}, _callee0, null, [[2, 13]]);
|
|
10470
10512
|
}));
|
|
10471
10513
|
return _internalGetEntry.apply(this, arguments);
|
|
10472
10514
|
}
|
|
10473
|
-
function makeGetEntries(
|
|
10515
|
+
function makeGetEntries(_x0) {
|
|
10474
10516
|
return _makeGetEntries.apply(this, arguments);
|
|
10475
10517
|
}
|
|
10476
10518
|
function _makeGetEntries() {
|
|
10477
|
-
_makeGetEntries = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10519
|
+
_makeGetEntries = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee1(query) {
|
|
10478
10520
|
var options,
|
|
10479
10521
|
withAllLocales,
|
|
10480
|
-
|
|
10481
|
-
return _regeneratorRuntime.wrap(function
|
|
10482
|
-
while (1) switch (
|
|
10522
|
+
_args1 = arguments;
|
|
10523
|
+
return _regeneratorRuntime.wrap(function _callee1$(_context1) {
|
|
10524
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
10483
10525
|
case 0:
|
|
10484
|
-
options =
|
|
10526
|
+
options = _args1.length > 1 && _args1[1] !== undefined ? _args1[1] : {
|
|
10485
10527
|
withAllLocales: false,
|
|
10486
10528
|
withoutLinkResolution: false,
|
|
10487
10529
|
withoutUnresolvableLinks: false,
|
|
@@ -10492,14 +10534,14 @@ var contentful = (function (exports) {
|
|
|
10492
10534
|
validateResolveLinksParam(query);
|
|
10493
10535
|
validateRemoveUnresolvedParam(query);
|
|
10494
10536
|
validateSearchParameters(query);
|
|
10495
|
-
return
|
|
10537
|
+
return _context1.abrupt("return", internalGetEntries(withAllLocales ? Object.assign(Object.assign({}, query), {
|
|
10496
10538
|
locale: '*'
|
|
10497
10539
|
}) : query, options));
|
|
10498
10540
|
case 7:
|
|
10499
10541
|
case "end":
|
|
10500
|
-
return
|
|
10542
|
+
return _context1.stop();
|
|
10501
10543
|
}
|
|
10502
|
-
},
|
|
10544
|
+
}, _callee1);
|
|
10503
10545
|
}));
|
|
10504
10546
|
return _makeGetEntries.apply(this, arguments);
|
|
10505
10547
|
}
|
|
@@ -10509,17 +10551,17 @@ var contentful = (function (exports) {
|
|
|
10509
10551
|
// Then, apply source maps and other normalizations
|
|
10510
10552
|
return maybeEnableSourceMaps(normalizeSearchParameters(normalizeSelect(withTimelinePreview)));
|
|
10511
10553
|
}
|
|
10512
|
-
function internalGetEntries(
|
|
10554
|
+
function internalGetEntries(_x1, _x10) {
|
|
10513
10555
|
return _internalGetEntries.apply(this, arguments);
|
|
10514
10556
|
}
|
|
10515
10557
|
function _internalGetEntries() {
|
|
10516
|
-
_internalGetEntries = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10558
|
+
_internalGetEntries = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(query, options) {
|
|
10517
10559
|
var withoutLinkResolution, withoutUnresolvableLinks, withLocaleBasedPublishing, baseConfig, config, entries;
|
|
10518
|
-
return _regeneratorRuntime.wrap(function
|
|
10519
|
-
while (1) switch (
|
|
10560
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
10561
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
10520
10562
|
case 0:
|
|
10521
10563
|
withoutLinkResolution = options.withoutLinkResolution, withoutUnresolvableLinks = options.withoutUnresolvableLinks, withLocaleBasedPublishing = options.withLocaleBasedPublishing;
|
|
10522
|
-
|
|
10564
|
+
_context10.prev = 1;
|
|
10523
10565
|
baseConfig = createRequestConfig({
|
|
10524
10566
|
query: prepareQuery(query)
|
|
10525
10567
|
});
|
|
@@ -10529,47 +10571,47 @@ var contentful = (function (exports) {
|
|
|
10529
10571
|
'X-Contentful-Locale-Based-Publishing': true
|
|
10530
10572
|
});
|
|
10531
10573
|
}
|
|
10532
|
-
|
|
10574
|
+
_context10.next = 7;
|
|
10533
10575
|
return get({
|
|
10534
10576
|
context: 'environment',
|
|
10535
10577
|
path: maybeEnableTimelinePreview('entries'),
|
|
10536
10578
|
config: config
|
|
10537
10579
|
});
|
|
10538
10580
|
case 7:
|
|
10539
|
-
entries =
|
|
10540
|
-
return
|
|
10581
|
+
entries = _context10.sent;
|
|
10582
|
+
return _context10.abrupt("return", resolveCircular(entries, {
|
|
10541
10583
|
resolveLinks: !withoutLinkResolution,
|
|
10542
10584
|
removeUnresolved: withoutUnresolvableLinks !== null && withoutUnresolvableLinks !== void 0 ? withoutUnresolvableLinks : false
|
|
10543
10585
|
}));
|
|
10544
10586
|
case 11:
|
|
10545
|
-
|
|
10546
|
-
|
|
10547
|
-
errorHandler(
|
|
10587
|
+
_context10.prev = 11;
|
|
10588
|
+
_context10.t0 = _context10["catch"](1);
|
|
10589
|
+
errorHandler(_context10.t0);
|
|
10548
10590
|
case 14:
|
|
10549
10591
|
case "end":
|
|
10550
|
-
return
|
|
10592
|
+
return _context10.stop();
|
|
10551
10593
|
}
|
|
10552
|
-
},
|
|
10594
|
+
}, _callee10, null, [[1, 11]]);
|
|
10553
10595
|
}));
|
|
10554
10596
|
return _internalGetEntries.apply(this, arguments);
|
|
10555
10597
|
}
|
|
10556
|
-
function getAsset(
|
|
10598
|
+
function getAsset(_x11) {
|
|
10557
10599
|
return _getAsset.apply(this, arguments);
|
|
10558
10600
|
}
|
|
10559
10601
|
function _getAsset() {
|
|
10560
|
-
_getAsset = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10602
|
+
_getAsset = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(id) {
|
|
10561
10603
|
var query,
|
|
10562
|
-
|
|
10563
|
-
return _regeneratorRuntime.wrap(function
|
|
10564
|
-
while (1) switch (
|
|
10604
|
+
_args11 = arguments;
|
|
10605
|
+
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
10606
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
10565
10607
|
case 0:
|
|
10566
|
-
query =
|
|
10567
|
-
return
|
|
10608
|
+
query = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
|
|
10609
|
+
return _context11.abrupt("return", makeGetAsset(id, query, options));
|
|
10568
10610
|
case 2:
|
|
10569
10611
|
case "end":
|
|
10570
|
-
return
|
|
10612
|
+
return _context11.stop();
|
|
10571
10613
|
}
|
|
10572
|
-
},
|
|
10614
|
+
}, _callee11);
|
|
10573
10615
|
}));
|
|
10574
10616
|
return _getAsset.apply(this, arguments);
|
|
10575
10617
|
}
|
|
@@ -10577,19 +10619,19 @@ var contentful = (function (exports) {
|
|
|
10577
10619
|
return _getAssets.apply(this, arguments);
|
|
10578
10620
|
}
|
|
10579
10621
|
function _getAssets() {
|
|
10580
|
-
_getAssets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10622
|
+
_getAssets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12() {
|
|
10581
10623
|
var query,
|
|
10582
|
-
|
|
10583
|
-
return _regeneratorRuntime.wrap(function
|
|
10584
|
-
while (1) switch (
|
|
10624
|
+
_args12 = arguments;
|
|
10625
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
10626
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
10585
10627
|
case 0:
|
|
10586
|
-
query =
|
|
10587
|
-
return
|
|
10628
|
+
query = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
|
|
10629
|
+
return _context12.abrupt("return", makeGetAssets(query, options));
|
|
10588
10630
|
case 2:
|
|
10589
10631
|
case "end":
|
|
10590
|
-
return
|
|
10632
|
+
return _context12.stop();
|
|
10591
10633
|
}
|
|
10592
|
-
},
|
|
10634
|
+
}, _callee12);
|
|
10593
10635
|
}));
|
|
10594
10636
|
return _getAssets.apply(this, arguments);
|
|
10595
10637
|
}
|
|
@@ -10597,40 +10639,40 @@ var contentful = (function (exports) {
|
|
|
10597
10639
|
return _getAssetsWithCursor.apply(this, arguments);
|
|
10598
10640
|
}
|
|
10599
10641
|
function _getAssetsWithCursor() {
|
|
10600
|
-
_getAssetsWithCursor = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10642
|
+
_getAssetsWithCursor = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13() {
|
|
10601
10643
|
var query,
|
|
10602
10644
|
response,
|
|
10603
|
-
|
|
10604
|
-
return _regeneratorRuntime.wrap(function
|
|
10605
|
-
while (1) switch (
|
|
10645
|
+
_args13 = arguments;
|
|
10646
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
10647
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
10606
10648
|
case 0:
|
|
10607
|
-
query =
|
|
10608
|
-
|
|
10649
|
+
query = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
|
|
10650
|
+
_context13.next = 3;
|
|
10609
10651
|
return makeGetAssets(normalizeCursorPaginationParameters(query), options);
|
|
10610
10652
|
case 3:
|
|
10611
|
-
response =
|
|
10612
|
-
return
|
|
10653
|
+
response = _context13.sent;
|
|
10654
|
+
return _context13.abrupt("return", normalizeCursorPaginationResponse(response));
|
|
10613
10655
|
case 5:
|
|
10614
10656
|
case "end":
|
|
10615
|
-
return
|
|
10657
|
+
return _context13.stop();
|
|
10616
10658
|
}
|
|
10617
|
-
},
|
|
10659
|
+
}, _callee13);
|
|
10618
10660
|
}));
|
|
10619
10661
|
return _getAssetsWithCursor.apply(this, arguments);
|
|
10620
10662
|
}
|
|
10621
|
-
function makeGetAssets(
|
|
10663
|
+
function makeGetAssets(_x12) {
|
|
10622
10664
|
return _makeGetAssets.apply(this, arguments);
|
|
10623
10665
|
}
|
|
10624
10666
|
function _makeGetAssets() {
|
|
10625
|
-
_makeGetAssets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10667
|
+
_makeGetAssets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(query) {
|
|
10626
10668
|
var options,
|
|
10627
10669
|
withAllLocales,
|
|
10628
10670
|
localeSpecificQuery,
|
|
10629
|
-
|
|
10630
|
-
return _regeneratorRuntime.wrap(function
|
|
10631
|
-
while (1) switch (
|
|
10671
|
+
_args14 = arguments;
|
|
10672
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
10673
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
10632
10674
|
case 0:
|
|
10633
|
-
options =
|
|
10675
|
+
options = _args14.length > 1 && _args14[1] !== undefined ? _args14[1] : {
|
|
10634
10676
|
withAllLocales: false,
|
|
10635
10677
|
withoutLinkResolution: false,
|
|
10636
10678
|
withoutUnresolvableLinks: false,
|
|
@@ -10642,26 +10684,26 @@ var contentful = (function (exports) {
|
|
|
10642
10684
|
localeSpecificQuery = withAllLocales ? Object.assign(Object.assign({}, query), {
|
|
10643
10685
|
locale: '*'
|
|
10644
10686
|
}) : query;
|
|
10645
|
-
return
|
|
10687
|
+
return _context14.abrupt("return", internalGetAssets(localeSpecificQuery, options));
|
|
10646
10688
|
case 6:
|
|
10647
10689
|
case "end":
|
|
10648
|
-
return
|
|
10690
|
+
return _context14.stop();
|
|
10649
10691
|
}
|
|
10650
|
-
},
|
|
10692
|
+
}, _callee14);
|
|
10651
10693
|
}));
|
|
10652
10694
|
return _makeGetAssets.apply(this, arguments);
|
|
10653
10695
|
}
|
|
10654
|
-
function internalGetAsset(
|
|
10696
|
+
function internalGetAsset(_x13, _x14, _x15) {
|
|
10655
10697
|
return _internalGetAsset.apply(this, arguments);
|
|
10656
10698
|
}
|
|
10657
10699
|
function _internalGetAsset() {
|
|
10658
|
-
_internalGetAsset = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10700
|
+
_internalGetAsset = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(id, query, options) {
|
|
10659
10701
|
var withLocaleBasedPublishing, baseConfig, config;
|
|
10660
|
-
return _regeneratorRuntime.wrap(function
|
|
10661
|
-
while (1) switch (
|
|
10702
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
10703
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
10662
10704
|
case 0:
|
|
10663
10705
|
withLocaleBasedPublishing = options.withLocaleBasedPublishing;
|
|
10664
|
-
|
|
10706
|
+
_context15.prev = 1;
|
|
10665
10707
|
baseConfig = createRequestConfig({
|
|
10666
10708
|
query: prepareQuery(query)
|
|
10667
10709
|
});
|
|
@@ -10671,36 +10713,36 @@ var contentful = (function (exports) {
|
|
|
10671
10713
|
'X-Contentful-Locale-Based-Publishing': true
|
|
10672
10714
|
});
|
|
10673
10715
|
}
|
|
10674
|
-
return
|
|
10716
|
+
return _context15.abrupt("return", get({
|
|
10675
10717
|
context: 'environment',
|
|
10676
10718
|
path: maybeEnableTimelinePreview("assets/".concat(id)),
|
|
10677
10719
|
config: config
|
|
10678
10720
|
}));
|
|
10679
10721
|
case 8:
|
|
10680
|
-
|
|
10681
|
-
|
|
10682
|
-
errorHandler(
|
|
10722
|
+
_context15.prev = 8;
|
|
10723
|
+
_context15.t0 = _context15["catch"](1);
|
|
10724
|
+
errorHandler(_context15.t0);
|
|
10683
10725
|
case 11:
|
|
10684
10726
|
case "end":
|
|
10685
|
-
return
|
|
10727
|
+
return _context15.stop();
|
|
10686
10728
|
}
|
|
10687
|
-
},
|
|
10729
|
+
}, _callee15, null, [[1, 8]]);
|
|
10688
10730
|
}));
|
|
10689
10731
|
return _internalGetAsset.apply(this, arguments);
|
|
10690
10732
|
}
|
|
10691
|
-
function makeGetAsset(
|
|
10733
|
+
function makeGetAsset(_x16, _x17) {
|
|
10692
10734
|
return _makeGetAsset.apply(this, arguments);
|
|
10693
10735
|
}
|
|
10694
10736
|
function _makeGetAsset() {
|
|
10695
|
-
_makeGetAsset = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10737
|
+
_makeGetAsset = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(id, query) {
|
|
10696
10738
|
var options,
|
|
10697
10739
|
withAllLocales,
|
|
10698
10740
|
localeSpecificQuery,
|
|
10699
|
-
|
|
10700
|
-
return _regeneratorRuntime.wrap(function
|
|
10701
|
-
while (1) switch (
|
|
10741
|
+
_args16 = arguments;
|
|
10742
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
10743
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
10702
10744
|
case 0:
|
|
10703
|
-
options =
|
|
10745
|
+
options = _args16.length > 2 && _args16[2] !== undefined ? _args16[2] : {
|
|
10704
10746
|
withAllLocales: false,
|
|
10705
10747
|
withoutLinkResolution: false,
|
|
10706
10748
|
withoutUnresolvableLinks: false,
|
|
@@ -10712,26 +10754,26 @@ var contentful = (function (exports) {
|
|
|
10712
10754
|
localeSpecificQuery = withAllLocales ? Object.assign(Object.assign({}, query), {
|
|
10713
10755
|
locale: '*'
|
|
10714
10756
|
}) : query;
|
|
10715
|
-
return
|
|
10757
|
+
return _context16.abrupt("return", internalGetAsset(id, localeSpecificQuery, options));
|
|
10716
10758
|
case 6:
|
|
10717
10759
|
case "end":
|
|
10718
|
-
return
|
|
10760
|
+
return _context16.stop();
|
|
10719
10761
|
}
|
|
10720
|
-
},
|
|
10762
|
+
}, _callee16);
|
|
10721
10763
|
}));
|
|
10722
10764
|
return _makeGetAsset.apply(this, arguments);
|
|
10723
10765
|
}
|
|
10724
|
-
function internalGetAssets(
|
|
10766
|
+
function internalGetAssets(_x18, _x19) {
|
|
10725
10767
|
return _internalGetAssets.apply(this, arguments);
|
|
10726
10768
|
}
|
|
10727
10769
|
function _internalGetAssets() {
|
|
10728
|
-
_internalGetAssets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10770
|
+
_internalGetAssets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(query, options) {
|
|
10729
10771
|
var withLocaleBasedPublishing, baseConfig, config;
|
|
10730
|
-
return _regeneratorRuntime.wrap(function
|
|
10731
|
-
while (1) switch (
|
|
10772
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
10773
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
10732
10774
|
case 0:
|
|
10733
10775
|
withLocaleBasedPublishing = options.withLocaleBasedPublishing;
|
|
10734
|
-
|
|
10776
|
+
_context17.prev = 1;
|
|
10735
10777
|
baseConfig = createRequestConfig({
|
|
10736
10778
|
query: prepareQuery(query)
|
|
10737
10779
|
});
|
|
@@ -10741,40 +10783,40 @@ var contentful = (function (exports) {
|
|
|
10741
10783
|
'X-Contentful-Locale-Based-Publishing': true
|
|
10742
10784
|
});
|
|
10743
10785
|
}
|
|
10744
|
-
return
|
|
10786
|
+
return _context17.abrupt("return", get({
|
|
10745
10787
|
context: 'environment',
|
|
10746
10788
|
path: maybeEnableTimelinePreview('assets'),
|
|
10747
10789
|
config: config
|
|
10748
10790
|
}));
|
|
10749
10791
|
case 8:
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
errorHandler(
|
|
10792
|
+
_context17.prev = 8;
|
|
10793
|
+
_context17.t0 = _context17["catch"](1);
|
|
10794
|
+
errorHandler(_context17.t0);
|
|
10753
10795
|
case 11:
|
|
10754
10796
|
case "end":
|
|
10755
|
-
return
|
|
10797
|
+
return _context17.stop();
|
|
10756
10798
|
}
|
|
10757
|
-
},
|
|
10799
|
+
}, _callee17, null, [[1, 8]]);
|
|
10758
10800
|
}));
|
|
10759
10801
|
return _internalGetAssets.apply(this, arguments);
|
|
10760
10802
|
}
|
|
10761
|
-
function getTag(
|
|
10803
|
+
function getTag(_x20) {
|
|
10762
10804
|
return _getTag.apply(this, arguments);
|
|
10763
10805
|
}
|
|
10764
10806
|
function _getTag() {
|
|
10765
|
-
_getTag = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10766
|
-
return _regeneratorRuntime.wrap(function
|
|
10767
|
-
while (1) switch (
|
|
10807
|
+
_getTag = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(id) {
|
|
10808
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
10809
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
10768
10810
|
case 0:
|
|
10769
|
-
return
|
|
10811
|
+
return _context18.abrupt("return", get({
|
|
10770
10812
|
context: 'environment',
|
|
10771
10813
|
path: "tags/".concat(id)
|
|
10772
10814
|
}));
|
|
10773
10815
|
case 1:
|
|
10774
10816
|
case "end":
|
|
10775
|
-
return
|
|
10817
|
+
return _context18.stop();
|
|
10776
10818
|
}
|
|
10777
|
-
},
|
|
10819
|
+
}, _callee18);
|
|
10778
10820
|
}));
|
|
10779
10821
|
return _getTag.apply(this, arguments);
|
|
10780
10822
|
}
|
|
@@ -10782,15 +10824,15 @@ var contentful = (function (exports) {
|
|
|
10782
10824
|
return _getTags.apply(this, arguments);
|
|
10783
10825
|
}
|
|
10784
10826
|
function _getTags() {
|
|
10785
|
-
_getTags = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10827
|
+
_getTags = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19() {
|
|
10786
10828
|
var query,
|
|
10787
|
-
|
|
10788
|
-
return _regeneratorRuntime.wrap(function
|
|
10789
|
-
while (1) switch (
|
|
10829
|
+
_args19 = arguments;
|
|
10830
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
10831
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
10790
10832
|
case 0:
|
|
10791
|
-
query =
|
|
10833
|
+
query = _args19.length > 0 && _args19[0] !== undefined ? _args19[0] : {};
|
|
10792
10834
|
validateSearchParameters(query);
|
|
10793
|
-
return
|
|
10835
|
+
return _context19.abrupt("return", get({
|
|
10794
10836
|
context: 'environment',
|
|
10795
10837
|
path: 'tags',
|
|
10796
10838
|
config: createRequestConfig({
|
|
@@ -10799,20 +10841,20 @@ var contentful = (function (exports) {
|
|
|
10799
10841
|
}));
|
|
10800
10842
|
case 3:
|
|
10801
10843
|
case "end":
|
|
10802
|
-
return
|
|
10844
|
+
return _context19.stop();
|
|
10803
10845
|
}
|
|
10804
|
-
},
|
|
10846
|
+
}, _callee19);
|
|
10805
10847
|
}));
|
|
10806
10848
|
return _getTags.apply(this, arguments);
|
|
10807
10849
|
}
|
|
10808
|
-
function createAssetKey(
|
|
10850
|
+
function createAssetKey(_x21) {
|
|
10809
10851
|
return _createAssetKey.apply(this, arguments);
|
|
10810
10852
|
}
|
|
10811
10853
|
function _createAssetKey() {
|
|
10812
|
-
_createAssetKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10854
|
+
_createAssetKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(expiresAt) {
|
|
10813
10855
|
var now, currentMaxLifetime;
|
|
10814
|
-
return _regeneratorRuntime.wrap(function
|
|
10815
|
-
while (1) switch (
|
|
10856
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
10857
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
10816
10858
|
case 0:
|
|
10817
10859
|
try {
|
|
10818
10860
|
now = Math.floor(Date.now() / 1000);
|
|
@@ -10824,7 +10866,7 @@ var contentful = (function (exports) {
|
|
|
10824
10866
|
} catch (error) {
|
|
10825
10867
|
errorHandler(error);
|
|
10826
10868
|
}
|
|
10827
|
-
return
|
|
10869
|
+
return _context20.abrupt("return", post({
|
|
10828
10870
|
context: 'environment',
|
|
10829
10871
|
path: 'asset_keys',
|
|
10830
10872
|
data: {
|
|
@@ -10833,9 +10875,9 @@ var contentful = (function (exports) {
|
|
|
10833
10875
|
}));
|
|
10834
10876
|
case 2:
|
|
10835
10877
|
case "end":
|
|
10836
|
-
return
|
|
10878
|
+
return _context20.stop();
|
|
10837
10879
|
}
|
|
10838
|
-
},
|
|
10880
|
+
}, _callee20);
|
|
10839
10881
|
}));
|
|
10840
10882
|
return _createAssetKey.apply(this, arguments);
|
|
10841
10883
|
}
|
|
@@ -10843,15 +10885,15 @@ var contentful = (function (exports) {
|
|
|
10843
10885
|
return _getLocales.apply(this, arguments);
|
|
10844
10886
|
}
|
|
10845
10887
|
function _getLocales() {
|
|
10846
|
-
_getLocales = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10888
|
+
_getLocales = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21() {
|
|
10847
10889
|
var query,
|
|
10848
|
-
|
|
10849
|
-
return _regeneratorRuntime.wrap(function
|
|
10850
|
-
while (1) switch (
|
|
10890
|
+
_args21 = arguments;
|
|
10891
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
10892
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
10851
10893
|
case 0:
|
|
10852
|
-
query =
|
|
10894
|
+
query = _args21.length > 0 && _args21[0] !== undefined ? _args21[0] : {};
|
|
10853
10895
|
validateSearchParameters(query);
|
|
10854
|
-
return
|
|
10896
|
+
return _context21.abrupt("return", get({
|
|
10855
10897
|
context: 'environment',
|
|
10856
10898
|
path: 'locales',
|
|
10857
10899
|
config: createRequestConfig({
|
|
@@ -10860,46 +10902,46 @@ var contentful = (function (exports) {
|
|
|
10860
10902
|
}));
|
|
10861
10903
|
case 3:
|
|
10862
10904
|
case "end":
|
|
10863
|
-
return
|
|
10905
|
+
return _context21.stop();
|
|
10864
10906
|
}
|
|
10865
|
-
},
|
|
10907
|
+
}, _callee21);
|
|
10866
10908
|
}));
|
|
10867
10909
|
return _getLocales.apply(this, arguments);
|
|
10868
10910
|
}
|
|
10869
|
-
function sync(
|
|
10911
|
+
function sync(_x22) {
|
|
10870
10912
|
return _sync.apply(this, arguments);
|
|
10871
10913
|
}
|
|
10872
10914
|
function _sync() {
|
|
10873
|
-
_sync = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10915
|
+
_sync = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(query) {
|
|
10874
10916
|
var syncOptions,
|
|
10875
|
-
|
|
10876
|
-
return _regeneratorRuntime.wrap(function
|
|
10877
|
-
while (1) switch (
|
|
10917
|
+
_args22 = arguments;
|
|
10918
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
10919
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
10878
10920
|
case 0:
|
|
10879
|
-
syncOptions =
|
|
10921
|
+
syncOptions = _args22.length > 1 && _args22[1] !== undefined ? _args22[1] : {
|
|
10880
10922
|
paginate: true
|
|
10881
10923
|
};
|
|
10882
|
-
return
|
|
10924
|
+
return _context22.abrupt("return", makePagedSync(query, syncOptions, options));
|
|
10883
10925
|
case 2:
|
|
10884
10926
|
case "end":
|
|
10885
|
-
return
|
|
10927
|
+
return _context22.stop();
|
|
10886
10928
|
}
|
|
10887
|
-
},
|
|
10929
|
+
}, _callee22);
|
|
10888
10930
|
}));
|
|
10889
10931
|
return _sync.apply(this, arguments);
|
|
10890
10932
|
}
|
|
10891
|
-
function makePagedSync(
|
|
10933
|
+
function makePagedSync(_x23, _x24) {
|
|
10892
10934
|
return _makePagedSync.apply(this, arguments);
|
|
10893
10935
|
}
|
|
10894
10936
|
function _makePagedSync() {
|
|
10895
|
-
_makePagedSync = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10937
|
+
_makePagedSync = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(query, syncOptions) {
|
|
10896
10938
|
var options,
|
|
10897
10939
|
combinedOptions,
|
|
10898
|
-
|
|
10899
|
-
return _regeneratorRuntime.wrap(function
|
|
10900
|
-
while (1) switch (
|
|
10940
|
+
_args23 = arguments;
|
|
10941
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
10942
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
10901
10943
|
case 0:
|
|
10902
|
-
options =
|
|
10944
|
+
options = _args23.length > 2 && _args23[2] !== undefined ? _args23[2] : {
|
|
10903
10945
|
withAllLocales: false,
|
|
10904
10946
|
withoutLinkResolution: false,
|
|
10905
10947
|
withoutUnresolvableLinks: false,
|
|
@@ -10909,12 +10951,12 @@ var contentful = (function (exports) {
|
|
|
10909
10951
|
validateRemoveUnresolvedParam(query);
|
|
10910
10952
|
combinedOptions = Object.assign(Object.assign({}, syncOptions), options);
|
|
10911
10953
|
switchToEnvironment(http);
|
|
10912
|
-
return
|
|
10954
|
+
return _context23.abrupt("return", pagedSync(http, query, combinedOptions));
|
|
10913
10955
|
case 6:
|
|
10914
10956
|
case "end":
|
|
10915
|
-
return
|
|
10957
|
+
return _context23.stop();
|
|
10916
10958
|
}
|
|
10917
|
-
},
|
|
10959
|
+
}, _callee23);
|
|
10918
10960
|
}));
|
|
10919
10961
|
return _makePagedSync.apply(this, arguments);
|
|
10920
10962
|
}
|
|
@@ -10939,19 +10981,19 @@ var contentful = (function (exports) {
|
|
|
10939
10981
|
var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
10940
10982
|
return internalGetConceptScheme(id, query);
|
|
10941
10983
|
}
|
|
10942
|
-
function internalGetConceptScheme(
|
|
10984
|
+
function internalGetConceptScheme(_x25) {
|
|
10943
10985
|
return _internalGetConceptScheme.apply(this, arguments);
|
|
10944
10986
|
}
|
|
10945
10987
|
function _internalGetConceptScheme() {
|
|
10946
|
-
_internalGetConceptScheme = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10988
|
+
_internalGetConceptScheme = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(id) {
|
|
10947
10989
|
var query,
|
|
10948
|
-
|
|
10949
|
-
return _regeneratorRuntime.wrap(function
|
|
10950
|
-
while (1) switch (
|
|
10990
|
+
_args24 = arguments;
|
|
10991
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
10992
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
10951
10993
|
case 0:
|
|
10952
|
-
query =
|
|
10953
|
-
|
|
10954
|
-
return
|
|
10994
|
+
query = _args24.length > 1 && _args24[1] !== undefined ? _args24[1] : {};
|
|
10995
|
+
_context24.prev = 1;
|
|
10996
|
+
return _context24.abrupt("return", get({
|
|
10955
10997
|
context: 'environment',
|
|
10956
10998
|
path: "taxonomy/concept-schemes/".concat(id),
|
|
10957
10999
|
config: createRequestConfig({
|
|
@@ -10959,14 +11001,14 @@ var contentful = (function (exports) {
|
|
|
10959
11001
|
})
|
|
10960
11002
|
}));
|
|
10961
11003
|
case 5:
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
errorHandler(
|
|
11004
|
+
_context24.prev = 5;
|
|
11005
|
+
_context24.t0 = _context24["catch"](1);
|
|
11006
|
+
errorHandler(_context24.t0);
|
|
10965
11007
|
case 8:
|
|
10966
11008
|
case "end":
|
|
10967
|
-
return
|
|
11009
|
+
return _context24.stop();
|
|
10968
11010
|
}
|
|
10969
|
-
},
|
|
11011
|
+
}, _callee24, null, [[1, 5]]);
|
|
10970
11012
|
}));
|
|
10971
11013
|
return _internalGetConceptScheme.apply(this, arguments);
|
|
10972
11014
|
}
|
|
@@ -10978,15 +11020,15 @@ var contentful = (function (exports) {
|
|
|
10978
11020
|
return _internalGetConceptSchemes.apply(this, arguments);
|
|
10979
11021
|
}
|
|
10980
11022
|
function _internalGetConceptSchemes() {
|
|
10981
|
-
_internalGetConceptSchemes = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11023
|
+
_internalGetConceptSchemes = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25() {
|
|
10982
11024
|
var query,
|
|
10983
|
-
|
|
10984
|
-
return _regeneratorRuntime.wrap(function
|
|
10985
|
-
while (1) switch (
|
|
11025
|
+
_args25 = arguments;
|
|
11026
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
11027
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
10986
11028
|
case 0:
|
|
10987
|
-
query =
|
|
10988
|
-
|
|
10989
|
-
return
|
|
11029
|
+
query = _args25.length > 0 && _args25[0] !== undefined ? _args25[0] : {};
|
|
11030
|
+
_context25.prev = 1;
|
|
11031
|
+
return _context25.abrupt("return", get({
|
|
10990
11032
|
context: 'environment',
|
|
10991
11033
|
path: 'taxonomy/concept-schemes',
|
|
10992
11034
|
config: createRequestConfig({
|
|
@@ -10994,14 +11036,14 @@ var contentful = (function (exports) {
|
|
|
10994
11036
|
})
|
|
10995
11037
|
}));
|
|
10996
11038
|
case 5:
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
errorHandler(
|
|
11039
|
+
_context25.prev = 5;
|
|
11040
|
+
_context25.t0 = _context25["catch"](1);
|
|
11041
|
+
errorHandler(_context25.t0);
|
|
11000
11042
|
case 8:
|
|
11001
11043
|
case "end":
|
|
11002
|
-
return
|
|
11044
|
+
return _context25.stop();
|
|
11003
11045
|
}
|
|
11004
|
-
},
|
|
11046
|
+
}, _callee25, null, [[1, 5]]);
|
|
11005
11047
|
}));
|
|
11006
11048
|
return _internalGetConceptSchemes.apply(this, arguments);
|
|
11007
11049
|
}
|
|
@@ -11009,19 +11051,19 @@ var contentful = (function (exports) {
|
|
|
11009
11051
|
var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11010
11052
|
return internalGetConcept(id, query);
|
|
11011
11053
|
}
|
|
11012
|
-
function internalGetConcept(
|
|
11054
|
+
function internalGetConcept(_x26) {
|
|
11013
11055
|
return _internalGetConcept.apply(this, arguments);
|
|
11014
11056
|
}
|
|
11015
11057
|
function _internalGetConcept() {
|
|
11016
|
-
_internalGetConcept = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11058
|
+
_internalGetConcept = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(id) {
|
|
11017
11059
|
var query,
|
|
11018
|
-
|
|
11019
|
-
return _regeneratorRuntime.wrap(function
|
|
11020
|
-
while (1) switch (
|
|
11060
|
+
_args26 = arguments;
|
|
11061
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
11062
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
11021
11063
|
case 0:
|
|
11022
|
-
query =
|
|
11023
|
-
|
|
11024
|
-
return
|
|
11064
|
+
query = _args26.length > 1 && _args26[1] !== undefined ? _args26[1] : {};
|
|
11065
|
+
_context26.prev = 1;
|
|
11066
|
+
return _context26.abrupt("return", get({
|
|
11025
11067
|
context: 'environment',
|
|
11026
11068
|
path: "taxonomy/concepts/".concat(id),
|
|
11027
11069
|
config: createRequestConfig({
|
|
@@ -11029,14 +11071,14 @@ var contentful = (function (exports) {
|
|
|
11029
11071
|
})
|
|
11030
11072
|
}));
|
|
11031
11073
|
case 5:
|
|
11032
|
-
|
|
11033
|
-
|
|
11034
|
-
errorHandler(
|
|
11074
|
+
_context26.prev = 5;
|
|
11075
|
+
_context26.t0 = _context26["catch"](1);
|
|
11076
|
+
errorHandler(_context26.t0);
|
|
11035
11077
|
case 8:
|
|
11036
11078
|
case "end":
|
|
11037
|
-
return
|
|
11079
|
+
return _context26.stop();
|
|
11038
11080
|
}
|
|
11039
|
-
},
|
|
11081
|
+
}, _callee26, null, [[1, 5]]);
|
|
11040
11082
|
}));
|
|
11041
11083
|
return _internalGetConcept.apply(this, arguments);
|
|
11042
11084
|
}
|
|
@@ -11048,15 +11090,15 @@ var contentful = (function (exports) {
|
|
|
11048
11090
|
return _internalGetConcepts.apply(this, arguments);
|
|
11049
11091
|
}
|
|
11050
11092
|
function _internalGetConcepts() {
|
|
11051
|
-
_internalGetConcepts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11093
|
+
_internalGetConcepts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27() {
|
|
11052
11094
|
var query,
|
|
11053
|
-
|
|
11054
|
-
return _regeneratorRuntime.wrap(function
|
|
11055
|
-
while (1) switch (
|
|
11095
|
+
_args27 = arguments;
|
|
11096
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
11097
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
11056
11098
|
case 0:
|
|
11057
|
-
query =
|
|
11058
|
-
|
|
11059
|
-
return
|
|
11099
|
+
query = _args27.length > 0 && _args27[0] !== undefined ? _args27[0] : {};
|
|
11100
|
+
_context27.prev = 1;
|
|
11101
|
+
return _context27.abrupt("return", get({
|
|
11060
11102
|
context: 'environment',
|
|
11061
11103
|
path: 'taxonomy/concepts',
|
|
11062
11104
|
config: createRequestConfig({
|
|
@@ -11064,14 +11106,14 @@ var contentful = (function (exports) {
|
|
|
11064
11106
|
})
|
|
11065
11107
|
}));
|
|
11066
11108
|
case 5:
|
|
11067
|
-
|
|
11068
|
-
|
|
11069
|
-
errorHandler(
|
|
11109
|
+
_context27.prev = 5;
|
|
11110
|
+
_context27.t0 = _context27["catch"](1);
|
|
11111
|
+
errorHandler(_context27.t0);
|
|
11070
11112
|
case 8:
|
|
11071
11113
|
case "end":
|
|
11072
|
-
return
|
|
11114
|
+
return _context27.stop();
|
|
11073
11115
|
}
|
|
11074
|
-
},
|
|
11116
|
+
}, _callee27, null, [[1, 5]]);
|
|
11075
11117
|
}));
|
|
11076
11118
|
return _internalGetConcepts.apply(this, arguments);
|
|
11077
11119
|
}
|
|
@@ -11079,19 +11121,19 @@ var contentful = (function (exports) {
|
|
|
11079
11121
|
var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11080
11122
|
return internalGetConceptAncestors(id, query);
|
|
11081
11123
|
}
|
|
11082
|
-
function internalGetConceptAncestors(
|
|
11124
|
+
function internalGetConceptAncestors(_x27) {
|
|
11083
11125
|
return _internalGetConceptAncestors.apply(this, arguments);
|
|
11084
11126
|
}
|
|
11085
11127
|
function _internalGetConceptAncestors() {
|
|
11086
|
-
_internalGetConceptAncestors = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11128
|
+
_internalGetConceptAncestors = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(id) {
|
|
11087
11129
|
var query,
|
|
11088
|
-
|
|
11089
|
-
return _regeneratorRuntime.wrap(function
|
|
11090
|
-
while (1) switch (
|
|
11130
|
+
_args28 = arguments;
|
|
11131
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
11132
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
11091
11133
|
case 0:
|
|
11092
|
-
query =
|
|
11093
|
-
|
|
11094
|
-
return
|
|
11134
|
+
query = _args28.length > 1 && _args28[1] !== undefined ? _args28[1] : {};
|
|
11135
|
+
_context28.prev = 1;
|
|
11136
|
+
return _context28.abrupt("return", get({
|
|
11095
11137
|
context: 'environment',
|
|
11096
11138
|
path: "taxonomy/concepts/".concat(id, "/ancestors"),
|
|
11097
11139
|
config: createRequestConfig({
|
|
@@ -11099,14 +11141,14 @@ var contentful = (function (exports) {
|
|
|
11099
11141
|
})
|
|
11100
11142
|
}));
|
|
11101
11143
|
case 5:
|
|
11102
|
-
|
|
11103
|
-
|
|
11104
|
-
errorHandler(
|
|
11144
|
+
_context28.prev = 5;
|
|
11145
|
+
_context28.t0 = _context28["catch"](1);
|
|
11146
|
+
errorHandler(_context28.t0);
|
|
11105
11147
|
case 8:
|
|
11106
11148
|
case "end":
|
|
11107
|
-
return
|
|
11149
|
+
return _context28.stop();
|
|
11108
11150
|
}
|
|
11109
|
-
},
|
|
11151
|
+
}, _callee28, null, [[1, 5]]);
|
|
11110
11152
|
}));
|
|
11111
11153
|
return _internalGetConceptAncestors.apply(this, arguments);
|
|
11112
11154
|
}
|
|
@@ -11114,22 +11156,22 @@ var contentful = (function (exports) {
|
|
|
11114
11156
|
var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11115
11157
|
return internalGetConceptDescendants(id, query);
|
|
11116
11158
|
}
|
|
11117
|
-
function internalGetConceptDescendants(
|
|
11159
|
+
function internalGetConceptDescendants(_x28) {
|
|
11118
11160
|
return _internalGetConceptDescendants.apply(this, arguments);
|
|
11119
11161
|
}
|
|
11120
11162
|
/*
|
|
11121
11163
|
* Switches BaseURL to use /environments path
|
|
11122
11164
|
* */
|
|
11123
11165
|
function _internalGetConceptDescendants() {
|
|
11124
|
-
_internalGetConceptDescendants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11166
|
+
_internalGetConceptDescendants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(id) {
|
|
11125
11167
|
var query,
|
|
11126
|
-
|
|
11127
|
-
return _regeneratorRuntime.wrap(function
|
|
11128
|
-
while (1) switch (
|
|
11168
|
+
_args29 = arguments;
|
|
11169
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
11170
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
11129
11171
|
case 0:
|
|
11130
|
-
query =
|
|
11131
|
-
|
|
11132
|
-
return
|
|
11172
|
+
query = _args29.length > 1 && _args29[1] !== undefined ? _args29[1] : {};
|
|
11173
|
+
_context29.prev = 1;
|
|
11174
|
+
return _context29.abrupt("return", get({
|
|
11133
11175
|
context: 'environment',
|
|
11134
11176
|
path: "taxonomy/concepts/".concat(id, "/descendants"),
|
|
11135
11177
|
config: createRequestConfig({
|
|
@@ -11137,14 +11179,14 @@ var contentful = (function (exports) {
|
|
|
11137
11179
|
})
|
|
11138
11180
|
}));
|
|
11139
11181
|
case 5:
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
errorHandler(
|
|
11182
|
+
_context29.prev = 5;
|
|
11183
|
+
_context29.t0 = _context29["catch"](1);
|
|
11184
|
+
errorHandler(_context29.t0);
|
|
11143
11185
|
case 8:
|
|
11144
11186
|
case "end":
|
|
11145
|
-
return
|
|
11187
|
+
return _context29.stop();
|
|
11146
11188
|
}
|
|
11147
|
-
},
|
|
11189
|
+
}, _callee29, null, [[1, 5]]);
|
|
11148
11190
|
}));
|
|
11149
11191
|
return _internalGetConceptDescendants.apply(this, arguments);
|
|
11150
11192
|
}
|