contentful 11.8.9 → 11.8.11
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.cjs
CHANGED
|
@@ -8,7 +8,7 @@ var require$$4 = require('https');
|
|
|
8
8
|
var require$$0$2 = require('url');
|
|
9
9
|
var require$$6 = require('fs');
|
|
10
10
|
var require$$8 = require('crypto');
|
|
11
|
-
var require$$
|
|
11
|
+
var require$$6$1 = require('http2');
|
|
12
12
|
var require$$4$1 = require('assert');
|
|
13
13
|
var require$$0$4 = require('tty');
|
|
14
14
|
var require$$0$3 = require('os');
|
|
@@ -14690,10 +14690,10 @@ var followRedirectsExports = followRedirects$1.exports;
|
|
|
14690
14690
|
const FormData$1 = form_data;
|
|
14691
14691
|
const crypto = require$$8;
|
|
14692
14692
|
const url = require$$0$2;
|
|
14693
|
-
const http2 = require$$3$1;
|
|
14694
14693
|
const proxyFromEnv = proxyFromEnv$1;
|
|
14695
14694
|
const http = require$$3;
|
|
14696
14695
|
const https = require$$4;
|
|
14696
|
+
const http2 = require$$6$1;
|
|
14697
14697
|
const util = require$$1;
|
|
14698
14698
|
const followRedirects = followRedirectsExports;
|
|
14699
14699
|
const zlib = require$$9;
|
|
@@ -14710,6 +14710,7 @@ const url__default = /*#__PURE__*/_interopDefaultLegacy(url);
|
|
|
14710
14710
|
const proxyFromEnv__default = /*#__PURE__*/_interopDefaultLegacy(proxyFromEnv);
|
|
14711
14711
|
const http__default = /*#__PURE__*/_interopDefaultLegacy(http);
|
|
14712
14712
|
const https__default = /*#__PURE__*/_interopDefaultLegacy(https);
|
|
14713
|
+
const http2__default = /*#__PURE__*/_interopDefaultLegacy(http2);
|
|
14713
14714
|
const util__default = /*#__PURE__*/_interopDefaultLegacy(util);
|
|
14714
14715
|
const followRedirects__default = /*#__PURE__*/_interopDefaultLegacy(followRedirects);
|
|
14715
14716
|
const zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib);
|
|
@@ -16559,7 +16560,7 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
|
16559
16560
|
}
|
|
16560
16561
|
return requestedURL;
|
|
16561
16562
|
}
|
|
16562
|
-
const VERSION = "1.13.
|
|
16563
|
+
const VERSION = "1.13.2";
|
|
16563
16564
|
function parseProtocol(url) {
|
|
16564
16565
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
16565
16566
|
return match && match[1] || '';
|
|
@@ -17039,12 +17040,6 @@ const brotliOptions = {
|
|
|
17039
17040
|
flush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH,
|
|
17040
17041
|
finishFlush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH
|
|
17041
17042
|
};
|
|
17042
|
-
const {
|
|
17043
|
-
HTTP2_HEADER_SCHEME,
|
|
17044
|
-
HTTP2_HEADER_METHOD,
|
|
17045
|
-
HTTP2_HEADER_PATH,
|
|
17046
|
-
HTTP2_HEADER_STATUS
|
|
17047
|
-
} = http2.constants;
|
|
17048
17043
|
const isBrotliSupported = utils$1$1.isFunction(zlib__default["default"].createBrotliDecompress);
|
|
17049
17044
|
const {
|
|
17050
17045
|
http: httpFollow,
|
|
@@ -17066,8 +17061,8 @@ class Http2Sessions {
|
|
|
17066
17061
|
options = Object.assign({
|
|
17067
17062
|
sessionTimeout: 1000
|
|
17068
17063
|
}, options);
|
|
17069
|
-
let authoritySessions;
|
|
17070
|
-
if (authoritySessions
|
|
17064
|
+
let authoritySessions = this.sessions[authority];
|
|
17065
|
+
if (authoritySessions) {
|
|
17071
17066
|
let len = authoritySessions.length;
|
|
17072
17067
|
for (let i = 0; i < len; i++) {
|
|
17073
17068
|
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
@@ -17076,7 +17071,7 @@ class Http2Sessions {
|
|
|
17076
17071
|
}
|
|
17077
17072
|
}
|
|
17078
17073
|
}
|
|
17079
|
-
const session =
|
|
17074
|
+
const session = http2__default["default"].connect(authority, options);
|
|
17080
17075
|
let removed;
|
|
17081
17076
|
const removeSession = () => {
|
|
17082
17077
|
if (removed) {
|
|
@@ -17088,11 +17083,12 @@ class Http2Sessions {
|
|
|
17088
17083
|
i = len;
|
|
17089
17084
|
while (i--) {
|
|
17090
17085
|
if (entries[i][0] === session) {
|
|
17091
|
-
entries.splice(i, 1);
|
|
17092
17086
|
if (len === 1) {
|
|
17093
17087
|
delete this.sessions[authority];
|
|
17094
|
-
|
|
17088
|
+
} else {
|
|
17089
|
+
entries.splice(i, 1);
|
|
17095
17090
|
}
|
|
17091
|
+
return;
|
|
17096
17092
|
}
|
|
17097
17093
|
}
|
|
17098
17094
|
};
|
|
@@ -17122,9 +17118,8 @@ class Http2Sessions {
|
|
|
17122
17118
|
};
|
|
17123
17119
|
}
|
|
17124
17120
|
session.once('close', removeSession);
|
|
17125
|
-
let
|
|
17126
|
-
|
|
17127
|
-
entries ? this.sessions[authority].push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
17121
|
+
let entry = [session, options];
|
|
17122
|
+
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
17128
17123
|
return session;
|
|
17129
17124
|
}
|
|
17130
17125
|
}
|
|
@@ -17242,6 +17237,12 @@ const http2Transport = {
|
|
|
17242
17237
|
headers
|
|
17243
17238
|
} = options;
|
|
17244
17239
|
const session = http2Sessions.getSession(authority, http2Options);
|
|
17240
|
+
const {
|
|
17241
|
+
HTTP2_HEADER_SCHEME,
|
|
17242
|
+
HTTP2_HEADER_METHOD,
|
|
17243
|
+
HTTP2_HEADER_PATH,
|
|
17244
|
+
HTTP2_HEADER_STATUS
|
|
17245
|
+
} = http2__default["default"].constants;
|
|
17245
17246
|
const http2Headers = {
|
|
17246
17247
|
[HTTP2_HEADER_SCHEME]: options.protocol.replace(':', ''),
|
|
17247
17248
|
[HTTP2_HEADER_METHOD]: options.method,
|
|
@@ -17707,6 +17708,9 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
17707
17708
|
}
|
|
17708
17709
|
abort(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req));
|
|
17709
17710
|
});
|
|
17711
|
+
} else {
|
|
17712
|
+
// explicitly reset the socket timeout value for a possible `keep-alive` request
|
|
17713
|
+
req.setTimeout(0);
|
|
17710
17714
|
}
|
|
17711
17715
|
|
|
17712
17716
|
// Send the request
|
|
@@ -23418,7 +23422,7 @@ function createContentfulApi({
|
|
|
23418
23422
|
http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;
|
|
23419
23423
|
}
|
|
23420
23424
|
return {
|
|
23421
|
-
version: "11.8.
|
|
23425
|
+
version: "11.8.11",
|
|
23422
23426
|
getSpace,
|
|
23423
23427
|
getContentType,
|
|
23424
23428
|
getContentTypes,
|
|
@@ -23543,7 +23547,7 @@ function createClient(params) {
|
|
|
23543
23547
|
environment: 'master'
|
|
23544
23548
|
};
|
|
23545
23549
|
const config = Object.assign(Object.assign({}, defaultConfig), params);
|
|
23546
|
-
const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.8.
|
|
23550
|
+
const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.8.11"}`, config.application, config.integration);
|
|
23547
23551
|
config.headers = Object.assign(Object.assign({}, config.headers), {
|
|
23548
23552
|
'Content-Type': 'application/vnd.contentful.delivery.v1+json',
|
|
23549
23553
|
'X-Contentful-User-Agent': userAgentHeader
|
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.8.
|
|
40
|
+
const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.8.11"}`, 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) {
|
|
@@ -425,7 +425,7 @@ function createContentfulApi({ http, getGlobalOptions }, options) {
|
|
|
425
425
|
http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;
|
|
426
426
|
}
|
|
427
427
|
return {
|
|
428
|
-
version: "11.8.
|
|
428
|
+
version: "11.8.11",
|
|
429
429
|
getSpace,
|
|
430
430
|
getContentType,
|
|
431
431
|
getContentTypes,
|