contentful 9.1.26 → 9.1.29
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 +26 -4
- package/dist/contentful.browser.js.map +1 -1
- package/dist/contentful.browser.min.js +2 -2
- package/dist/contentful.node.js +26 -4
- package/dist/contentful.node.js.map +1 -1
- package/dist/contentful.node.min.js +3 -3
- package/dist/es-modules/contentful.js +1 -1
- package/index.d.ts +2 -2
- package/package.json +6 -4
- package/print-beta-v10-message.js +15 -0
|
@@ -127,6 +127,7 @@ var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ ".
|
|
|
127
127
|
var transitionalDefaults = __webpack_require__(/*! ../defaults/transitional */ "../node_modules/axios/lib/defaults/transitional.js");
|
|
128
128
|
var AxiosError = __webpack_require__(/*! ../core/AxiosError */ "../node_modules/axios/lib/core/AxiosError.js");
|
|
129
129
|
var CanceledError = __webpack_require__(/*! ../cancel/CanceledError */ "../node_modules/axios/lib/cancel/CanceledError.js");
|
|
130
|
+
var parseProtocol = __webpack_require__(/*! ../helpers/parseProtocol */ "../node_modules/axios/lib/helpers/parseProtocol.js");
|
|
130
131
|
|
|
131
132
|
module.exports = function xhrAdapter(config) {
|
|
132
133
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
@@ -144,6 +145,10 @@ module.exports = function xhrAdapter(config) {
|
|
|
144
145
|
}
|
|
145
146
|
}
|
|
146
147
|
|
|
148
|
+
if (utils.isFormData(requestData) && utils.isStandardBrowserEnv()) {
|
|
149
|
+
delete requestHeaders['Content-Type']; // Let the browser set it
|
|
150
|
+
}
|
|
151
|
+
|
|
147
152
|
var request = new XMLHttpRequest();
|
|
148
153
|
|
|
149
154
|
// HTTP basic authentication
|
|
@@ -320,8 +325,7 @@ module.exports = function xhrAdapter(config) {
|
|
|
320
325
|
requestData = null;
|
|
321
326
|
}
|
|
322
327
|
|
|
323
|
-
var
|
|
324
|
-
var protocol = tokens.length > 1 && tokens[0];
|
|
328
|
+
var protocol = parseProtocol(fullPath);
|
|
325
329
|
|
|
326
330
|
if (protocol && [ 'http', 'https', 'file' ].indexOf(protocol) === -1) {
|
|
327
331
|
reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
|
|
@@ -1431,7 +1435,7 @@ module.exports = {
|
|
|
1431
1435
|
/***/ (function(module, exports) {
|
|
1432
1436
|
|
|
1433
1437
|
module.exports = {
|
|
1434
|
-
"version": "0.27.
|
|
1438
|
+
"version": "0.27.2"
|
|
1435
1439
|
};
|
|
1436
1440
|
|
|
1437
1441
|
/***/ }),
|
|
@@ -1863,6 +1867,24 @@ module.exports = function parseHeaders(headers) {
|
|
|
1863
1867
|
};
|
|
1864
1868
|
|
|
1865
1869
|
|
|
1870
|
+
/***/ }),
|
|
1871
|
+
|
|
1872
|
+
/***/ "../node_modules/axios/lib/helpers/parseProtocol.js":
|
|
1873
|
+
/*!**********************************************************!*\
|
|
1874
|
+
!*** ../node_modules/axios/lib/helpers/parseProtocol.js ***!
|
|
1875
|
+
\**********************************************************/
|
|
1876
|
+
/*! no static exports found */
|
|
1877
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1878
|
+
|
|
1879
|
+
"use strict";
|
|
1880
|
+
|
|
1881
|
+
|
|
1882
|
+
module.exports = function parseProtocol(url) {
|
|
1883
|
+
var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
1884
|
+
return match && match[1] || '';
|
|
1885
|
+
};
|
|
1886
|
+
|
|
1887
|
+
|
|
1866
1888
|
/***/ }),
|
|
1867
1889
|
|
|
1868
1890
|
/***/ "../node_modules/axios/lib/helpers/spread.js":
|
|
@@ -8912,7 +8934,7 @@ function createClient(params) {
|
|
|
8912
8934
|
|
|
8913
8935
|
const config = _objectSpread(_objectSpread({}, defaultConfig), params);
|
|
8914
8936
|
|
|
8915
|
-
const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.1.
|
|
8937
|
+
const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.1.29"}`, config.application, config.integration);
|
|
8916
8938
|
config.headers = _objectSpread(_objectSpread({}, config.headers), {}, {
|
|
8917
8939
|
'Content-Type': 'application/vnd.contentful.delivery.v1+json',
|
|
8918
8940
|
'X-Contentful-User-Agent': userAgentHeader
|