contentful 11.4.4 → 11.4.5
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.
- package/dist/contentful.browser.js +2679 -2669
- package/dist/contentful.browser.min.js +1 -1
- package/dist/contentful.cjs +2436 -2431
- package/dist/esm/contentful.js +1 -1
- package/dist/esm/create-contentful-api.js +5 -5
- package/dist/stats-browser-min.html +2230 -2123
- package/dist/types/create-contentful-api.d.ts +3 -3
- package/dist/types/make-client.d.ts +1 -1
- package/dist/types/paged-sync.d.ts +2 -2
- package/dist/types/types/asset.d.ts +5 -5
- package/dist/types/types/client.d.ts +11 -11
- package/dist/types/types/collection.d.ts +2 -2
- package/dist/types/types/concept-scheme.d.ts +2 -2
- package/dist/types/types/concept.d.ts +2 -2
- package/dist/types/types/content-type.d.ts +4 -4
- package/dist/types/types/entry.d.ts +11 -11
- package/dist/types/types/link.d.ts +1 -1
- package/dist/types/types/locale.d.ts +2 -2
- package/dist/types/types/metadata.d.ts +1 -1
- package/dist/types/types/query/equality.d.ts +2 -2
- package/dist/types/types/query/existence.d.ts +3 -3
- package/dist/types/types/query/location.d.ts +2 -2
- package/dist/types/types/query/order.d.ts +5 -5
- package/dist/types/types/query/query.d.ts +17 -17
- package/dist/types/types/query/range.d.ts +2 -2
- package/dist/types/types/query/reference.d.ts +2 -2
- package/dist/types/types/query/search.d.ts +2 -2
- package/dist/types/types/query/select.d.ts +4 -4
- package/dist/types/types/query/set.d.ts +2 -2
- package/dist/types/types/query/subset.d.ts +2 -2
- package/dist/types/types/query/util.d.ts +2 -2
- package/dist/types/types/space.d.ts +2 -2
- package/dist/types/types/sync.d.ts +6 -6
- package/dist/types/types/sys.d.ts +3 -3
- package/dist/types/types/tag.d.ts +3 -3
- package/dist/types/utils/client-helpers.d.ts +1 -1
- package/package.json +16 -13
package/dist/esm/contentful.js
CHANGED
|
@@ -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.
|
|
40
|
+
const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.4.5"}`, 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 ===
|
|
50
|
-
const host = params === null || params ===
|
|
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;
|
|
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 ===
|
|
65
|
+
const includeContentSourceMaps = (_a = config === null || config === undefined ? undefined : config.params) === null || _a === undefined ? undefined : _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 !==
|
|
293
|
+
removeUnresolved: withoutUnresolvableLinks !== null && withoutUnresolvableLinks !== undefined ? 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.
|
|
371
|
+
version: "11.4.5",
|
|
372
372
|
getSpace,
|
|
373
373
|
getContentType,
|
|
374
374
|
getContentTypes,
|