@kontent-ai/delivery-sdk 14.4.0 → 14.6.0
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/bundles/kontent-delivery.umd.js +173 -118
- package/dist/bundles/kontent-delivery.umd.js.map +1 -1
- package/dist/bundles/kontent-delivery.umd.min.js +1 -1
- package/dist/bundles/kontent-delivery.umd.min.js.map +1 -1
- package/dist/bundles/report.json +1 -1
- package/dist/bundles/report.min.json +1 -1
- package/dist/bundles/stats.json +7548 -7416
- package/dist/bundles/stats.min.json +10413 -10274
- package/dist/cjs/contracts/contracts.d.ts +1 -0
- package/dist/cjs/mappers/item.mapper.js +3 -2
- package/dist/cjs/mappers/item.mapper.js.map +1 -1
- package/dist/cjs/mappers/sync.mapper.js +3 -2
- package/dist/cjs/mappers/sync.mapper.js.map +1 -1
- package/dist/cjs/models/item-models.d.ts +4 -0
- package/dist/cjs/sdk-info.generated.js +1 -1
- package/dist/es6/contracts/contracts.d.ts +1 -0
- package/dist/es6/mappers/item.mapper.js +3 -2
- package/dist/es6/mappers/item.mapper.js.map +1 -1
- package/dist/es6/mappers/sync.mapper.js +3 -2
- package/dist/es6/mappers/sync.mapper.js.map +1 -1
- package/dist/es6/models/item-models.d.ts +4 -0
- package/dist/es6/sdk-info.generated.js +1 -1
- package/dist/esnext/contracts/contracts.d.ts +1 -0
- package/dist/esnext/mappers/item.mapper.js +3 -2
- package/dist/esnext/mappers/item.mapper.js.map +1 -1
- package/dist/esnext/mappers/sync.mapper.js +3 -2
- package/dist/esnext/mappers/sync.mapper.js.map +1 -1
- package/dist/esnext/models/item-models.d.ts +4 -0
- package/dist/esnext/sdk-info.generated.js +1 -1
- package/lib/contracts/contracts.ts +1 -0
- package/lib/mappers/item.mapper.ts +2 -1
- package/lib/mappers/sync.mapper.ts +2 -1
- package/lib/models/item-models.ts +5 -0
- package/lib/sdk-info.generated.ts +1 -1
- package/package.json +15 -15
- package/readme.md +1 -1
|
@@ -2206,7 +2206,7 @@ class ItemMapper {
|
|
|
2206
2206
|
};
|
|
2207
2207
|
}
|
|
2208
2208
|
createContentItem(item) {
|
|
2209
|
-
var _a;
|
|
2209
|
+
var _a, _b;
|
|
2210
2210
|
const contentItem = {
|
|
2211
2211
|
elements: {},
|
|
2212
2212
|
system: {
|
|
@@ -2218,7 +2218,8 @@ class ItemMapper {
|
|
|
2218
2218
|
name: item.system.name,
|
|
2219
2219
|
sitemapLocations: item.system.sitemap_locations,
|
|
2220
2220
|
type: item.system.type,
|
|
2221
|
-
workflowStep: (_a = item.system.workflow_step) !== null && _a !== void 0 ? _a : null
|
|
2221
|
+
workflowStep: (_a = item.system.workflow_step) !== null && _a !== void 0 ? _a : null,
|
|
2222
|
+
workflow: (_b = item.system.workflow) !== null && _b !== void 0 ? _b : null
|
|
2222
2223
|
}
|
|
2223
2224
|
};
|
|
2224
2225
|
return contentItem;
|
|
@@ -2269,7 +2270,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2269
2270
|
exports.SyncMapper = void 0;
|
|
2270
2271
|
class SyncMapper {
|
|
2271
2272
|
mapContentItemDelta(itemDeltaContract) {
|
|
2272
|
-
var _a;
|
|
2273
|
+
var _a, _b;
|
|
2273
2274
|
const systemContract = itemDeltaContract.data.system;
|
|
2274
2275
|
const elements = itemDeltaContract.data.elements
|
|
2275
2276
|
? itemDeltaContract.data.elements
|
|
@@ -2288,7 +2289,8 @@ class SyncMapper {
|
|
|
2288
2289
|
name: systemContract.name,
|
|
2289
2290
|
sitemapLocations: systemContract.sitemap_locations,
|
|
2290
2291
|
type: systemContract.type,
|
|
2291
|
-
workflowStep: (_a = systemContract.workflow_step) !== null && _a !== void 0 ? _a : null
|
|
2292
|
+
workflowStep: (_a = systemContract.workflow_step) !== null && _a !== void 0 ? _a : null,
|
|
2293
|
+
workflow: (_b = systemContract.workflow) !== null && _b !== void 0 ? _b : null
|
|
2292
2294
|
}
|
|
2293
2295
|
}
|
|
2294
2296
|
};
|
|
@@ -5398,7 +5400,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
5398
5400
|
exports.sdkInfo = void 0;
|
|
5399
5401
|
exports.sdkInfo = {
|
|
5400
5402
|
host: 'npmjs.com',
|
|
5401
|
-
version: '14.
|
|
5403
|
+
version: '14.6.0',
|
|
5402
5404
|
name: '@kontent-ai/delivery-sdk'
|
|
5403
5405
|
};
|
|
5404
5406
|
|
|
@@ -7500,7 +7502,7 @@ for (let i = 0; i < 256; ++i) {
|
|
|
7500
7502
|
function unsafeStringify(arr, offset = 0) {
|
|
7501
7503
|
// Note: Be careful editing this code! It's been tuned for performance
|
|
7502
7504
|
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
7503
|
-
return
|
|
7505
|
+
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
7504
7506
|
}
|
|
7505
7507
|
|
|
7506
7508
|
function stringify(arr, offset = 0) {
|
|
@@ -7910,7 +7912,7 @@ const knownAdapters = {
|
|
|
7910
7912
|
}
|
|
7911
7913
|
|
|
7912
7914
|
_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(knownAdapters, (fn, value) => {
|
|
7913
|
-
if(fn) {
|
|
7915
|
+
if (fn) {
|
|
7914
7916
|
try {
|
|
7915
7917
|
Object.defineProperty(fn, 'name', {value});
|
|
7916
7918
|
} catch (e) {
|
|
@@ -7920,6 +7922,10 @@ _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(knownAdapters, (fn, va
|
|
|
7920
7922
|
}
|
|
7921
7923
|
});
|
|
7922
7924
|
|
|
7925
|
+
const renderReason = (reason) => `- ${reason}`;
|
|
7926
|
+
|
|
7927
|
+
const isResolvedHandle = (adapter) => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isFunction(adapter) || adapter === null || adapter === false;
|
|
7928
|
+
|
|
7923
7929
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
7924
7930
|
getAdapter: (adapters) => {
|
|
7925
7931
|
adapters = _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isArray(adapters) ? adapters : [adapters];
|
|
@@ -7928,30 +7934,44 @@ _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(knownAdapters, (fn, va
|
|
|
7928
7934
|
let nameOrAdapter;
|
|
7929
7935
|
let adapter;
|
|
7930
7936
|
|
|
7937
|
+
const rejectedReasons = {};
|
|
7938
|
+
|
|
7931
7939
|
for (let i = 0; i < length; i++) {
|
|
7932
7940
|
nameOrAdapter = adapters[i];
|
|
7933
|
-
|
|
7941
|
+
let id;
|
|
7942
|
+
|
|
7943
|
+
adapter = nameOrAdapter;
|
|
7944
|
+
|
|
7945
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
7946
|
+
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
7947
|
+
|
|
7948
|
+
if (adapter === undefined) {
|
|
7949
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](`Unknown adapter '${id}'`);
|
|
7950
|
+
}
|
|
7951
|
+
}
|
|
7952
|
+
|
|
7953
|
+
if (adapter) {
|
|
7934
7954
|
break;
|
|
7935
7955
|
}
|
|
7956
|
+
|
|
7957
|
+
rejectedReasons[id || '#' + i] = adapter;
|
|
7936
7958
|
}
|
|
7937
7959
|
|
|
7938
7960
|
if (!adapter) {
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
'
|
|
7961
|
+
|
|
7962
|
+
const reasons = Object.entries(rejectedReasons)
|
|
7963
|
+
.map(([id, state]) => `adapter ${id} ` +
|
|
7964
|
+
(state === false ? 'is not supported by the environment' : 'is not available in the build')
|
|
7943
7965
|
);
|
|
7944
|
-
}
|
|
7945
7966
|
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
`Unknown adapter '${nameOrAdapter}'`
|
|
7950
|
-
);
|
|
7951
|
-
}
|
|
7967
|
+
let s = length ?
|
|
7968
|
+
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
|
|
7969
|
+
'as no adapter specified';
|
|
7952
7970
|
|
|
7953
|
-
|
|
7954
|
-
|
|
7971
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
|
|
7972
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
7973
|
+
'ERR_NOT_SUPPORT'
|
|
7974
|
+
);
|
|
7955
7975
|
}
|
|
7956
7976
|
|
|
7957
7977
|
return adapter;
|
|
@@ -7982,7 +8002,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7982
8002
|
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
|
|
7983
8003
|
/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js");
|
|
7984
8004
|
/* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../helpers/parseProtocol.js */ "./node_modules/axios/lib/helpers/parseProtocol.js");
|
|
7985
|
-
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/
|
|
8005
|
+
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
|
|
7986
8006
|
/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");
|
|
7987
8007
|
/* harmony import */ var _helpers_speedometer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/speedometer.js */ "./node_modules/axios/lib/helpers/speedometer.js");
|
|
7988
8008
|
|
|
@@ -8036,7 +8056,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
8036
8056
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
8037
8057
|
let requestData = config.data;
|
|
8038
8058
|
const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(config.headers).normalize();
|
|
8039
|
-
|
|
8059
|
+
let {responseType, withXSRFToken} = config;
|
|
8040
8060
|
let onCanceled;
|
|
8041
8061
|
function done() {
|
|
8042
8062
|
if (config.cancelToken) {
|
|
@@ -8048,11 +8068,15 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
8048
8068
|
}
|
|
8049
8069
|
}
|
|
8050
8070
|
|
|
8071
|
+
let contentType;
|
|
8072
|
+
|
|
8051
8073
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isFormData(requestData)) {
|
|
8052
|
-
if (_platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].
|
|
8074
|
+
if (_platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].hasStandardBrowserEnv || _platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].hasStandardBrowserWebWorkerEnv) {
|
|
8053
8075
|
requestHeaders.setContentType(false); // Let the browser set it
|
|
8054
|
-
} else {
|
|
8055
|
-
|
|
8076
|
+
} else if ((contentType = requestHeaders.getContentType()) !== false) {
|
|
8077
|
+
// fix semicolon duplication issue for ReactNative FormData implementation
|
|
8078
|
+
const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
|
|
8079
|
+
requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
|
|
8056
8080
|
}
|
|
8057
8081
|
}
|
|
8058
8082
|
|
|
@@ -8168,13 +8192,16 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
8168
8192
|
// Add xsrf header
|
|
8169
8193
|
// This is only done if running in a standard browser environment.
|
|
8170
8194
|
// Specifically not if we're in a web worker, or react-native.
|
|
8171
|
-
if
|
|
8172
|
-
|
|
8173
|
-
|
|
8174
|
-
|
|
8195
|
+
if(_platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].hasStandardBrowserEnv) {
|
|
8196
|
+
withXSRFToken && _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
|
|
8197
|
+
|
|
8198
|
+
if (withXSRFToken || (withXSRFToken !== false && (0,_helpers_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_9__["default"])(fullPath))) {
|
|
8199
|
+
// Add xsrf header
|
|
8200
|
+
const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && _helpers_cookies_js__WEBPACK_IMPORTED_MODULE_10__["default"].read(config.xsrfCookieName);
|
|
8175
8201
|
|
|
8176
|
-
|
|
8177
|
-
|
|
8202
|
+
if (xsrfValue) {
|
|
8203
|
+
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
8204
|
+
}
|
|
8178
8205
|
}
|
|
8179
8206
|
}
|
|
8180
8207
|
|
|
@@ -8267,7 +8294,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8267
8294
|
/* harmony import */ var _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers/spread.js */ "./node_modules/axios/lib/helpers/spread.js");
|
|
8268
8295
|
/* harmony import */ var _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helpers/isAxiosError.js */ "./node_modules/axios/lib/helpers/isAxiosError.js");
|
|
8269
8296
|
/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");
|
|
8270
|
-
/* harmony import */ var
|
|
8297
|
+
/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js");
|
|
8298
|
+
/* harmony import */ var _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers/HttpStatusCode.js */ "./node_modules/axios/lib/helpers/HttpStatusCode.js");
|
|
8299
|
+
|
|
8271
8300
|
|
|
8272
8301
|
|
|
8273
8302
|
|
|
@@ -8348,7 +8377,9 @@ axios.AxiosHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__["defaul
|
|
|
8348
8377
|
|
|
8349
8378
|
axios.formToJSON = thing => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__["default"])(_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
8350
8379
|
|
|
8351
|
-
axios.
|
|
8380
|
+
axios.getAdapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__["default"].getAdapter;
|
|
8381
|
+
|
|
8382
|
+
axios.HttpStatusCode = _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__["default"];
|
|
8352
8383
|
|
|
8353
8384
|
axios.default = axios;
|
|
8354
8385
|
|
|
@@ -8647,15 +8678,13 @@ class Axios {
|
|
|
8647
8678
|
// Set config.method
|
|
8648
8679
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
8649
8680
|
|
|
8650
|
-
let contextHeaders;
|
|
8651
|
-
|
|
8652
8681
|
// Flatten headers
|
|
8653
|
-
contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].merge(
|
|
8682
|
+
let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].merge(
|
|
8654
8683
|
headers.common,
|
|
8655
8684
|
headers[config.method]
|
|
8656
8685
|
);
|
|
8657
8686
|
|
|
8658
|
-
|
|
8687
|
+
headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(
|
|
8659
8688
|
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
8660
8689
|
(method) => {
|
|
8661
8690
|
delete headers[method];
|
|
@@ -9190,7 +9219,17 @@ class AxiosHeaders {
|
|
|
9190
9219
|
|
|
9191
9220
|
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
|
9192
9221
|
|
|
9193
|
-
|
|
9222
|
+
// reserved names hotfix
|
|
9223
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
9224
|
+
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
9225
|
+
return {
|
|
9226
|
+
get: () => value,
|
|
9227
|
+
set(headerValue) {
|
|
9228
|
+
this[mapped] = headerValue;
|
|
9229
|
+
}
|
|
9230
|
+
}
|
|
9231
|
+
});
|
|
9232
|
+
|
|
9194
9233
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].freezeMethods(AxiosHeaders);
|
|
9195
9234
|
|
|
9196
9235
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosHeaders);
|
|
@@ -9511,6 +9550,7 @@ function mergeConfig(config1, config2) {
|
|
|
9511
9550
|
timeout: defaultToConfig2,
|
|
9512
9551
|
timeoutMessage: defaultToConfig2,
|
|
9513
9552
|
withCredentials: defaultToConfig2,
|
|
9553
|
+
withXSRFToken: defaultToConfig2,
|
|
9514
9554
|
adapter: defaultToConfig2,
|
|
9515
9555
|
responseType: defaultToConfig2,
|
|
9516
9556
|
xsrfCookieName: defaultToConfig2,
|
|
@@ -9645,7 +9685,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9645
9685
|
/* harmony import */ var _transitional_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transitional.js */ "./node_modules/axios/lib/defaults/transitional.js");
|
|
9646
9686
|
/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js");
|
|
9647
9687
|
/* harmony import */ var _helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/toURLEncodedForm.js */ "./node_modules/axios/lib/helpers/toURLEncodedForm.js");
|
|
9648
|
-
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/
|
|
9688
|
+
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
|
|
9649
9689
|
/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js");
|
|
9650
9690
|
|
|
9651
9691
|
|
|
@@ -9657,10 +9697,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9657
9697
|
|
|
9658
9698
|
|
|
9659
9699
|
|
|
9660
|
-
const DEFAULT_CONTENT_TYPE = {
|
|
9661
|
-
'Content-Type': undefined
|
|
9662
|
-
};
|
|
9663
|
-
|
|
9664
9700
|
/**
|
|
9665
9701
|
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
9666
9702
|
* of the input
|
|
@@ -9799,19 +9835,16 @@ const defaults = {
|
|
|
9799
9835
|
|
|
9800
9836
|
headers: {
|
|
9801
9837
|
common: {
|
|
9802
|
-
'Accept': 'application/json, text/plain, */*'
|
|
9838
|
+
'Accept': 'application/json, text/plain, */*',
|
|
9839
|
+
'Content-Type': undefined
|
|
9803
9840
|
}
|
|
9804
9841
|
}
|
|
9805
9842
|
};
|
|
9806
9843
|
|
|
9807
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head'],
|
|
9844
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
9808
9845
|
defaults.headers[method] = {};
|
|
9809
9846
|
});
|
|
9810
9847
|
|
|
9811
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
9812
|
-
defaults.headers[method] = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(DEFAULT_CONTENT_TYPE);
|
|
9813
|
-
});
|
|
9814
|
-
|
|
9815
9848
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults);
|
|
9816
9849
|
|
|
9817
9850
|
|
|
@@ -9848,7 +9881,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9848
9881
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9849
9882
|
/* harmony export */ VERSION: () => (/* binding */ VERSION)
|
|
9850
9883
|
/* harmony export */ });
|
|
9851
|
-
const VERSION = "1.
|
|
9884
|
+
const VERSION = "1.6.2";
|
|
9852
9885
|
|
|
9853
9886
|
/***/ }),
|
|
9854
9887
|
|
|
@@ -10150,59 +10183,49 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10150
10183
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
10151
10184
|
/* harmony export */ });
|
|
10152
10185
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
10153
|
-
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/
|
|
10186
|
+
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
|
|
10154
10187
|
|
|
10155
10188
|
|
|
10156
10189
|
|
|
10190
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ?
|
|
10157
10191
|
|
|
10192
|
+
// Standard browser envs support document.cookie
|
|
10193
|
+
{
|
|
10194
|
+
write(name, value, expires, path, domain, secure) {
|
|
10195
|
+
const cookie = [name + '=' + encodeURIComponent(value)];
|
|
10158
10196
|
|
|
10159
|
-
|
|
10197
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
|
|
10160
10198
|
|
|
10161
|
-
|
|
10162
|
-
(function standardBrowserEnv() {
|
|
10163
|
-
return {
|
|
10164
|
-
write: function write(name, value, expires, path, domain, secure) {
|
|
10165
|
-
const cookie = [];
|
|
10166
|
-
cookie.push(name + '=' + encodeURIComponent(value));
|
|
10199
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(path) && cookie.push('path=' + path);
|
|
10167
10200
|
|
|
10168
|
-
|
|
10169
|
-
cookie.push('expires=' + new Date(expires).toGMTString());
|
|
10170
|
-
}
|
|
10201
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(domain) && cookie.push('domain=' + domain);
|
|
10171
10202
|
|
|
10172
|
-
|
|
10173
|
-
cookie.push('path=' + path);
|
|
10174
|
-
}
|
|
10203
|
+
secure === true && cookie.push('secure');
|
|
10175
10204
|
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
}
|
|
10205
|
+
document.cookie = cookie.join('; ');
|
|
10206
|
+
},
|
|
10179
10207
|
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10208
|
+
read(name) {
|
|
10209
|
+
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
10210
|
+
return (match ? decodeURIComponent(match[3]) : null);
|
|
10211
|
+
},
|
|
10183
10212
|
|
|
10184
|
-
|
|
10185
|
-
|
|
10213
|
+
remove(name) {
|
|
10214
|
+
this.write(name, '', Date.now() - 86400000);
|
|
10215
|
+
}
|
|
10216
|
+
}
|
|
10186
10217
|
|
|
10187
|
-
|
|
10188
|
-
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
10189
|
-
return (match ? decodeURIComponent(match[3]) : null);
|
|
10190
|
-
},
|
|
10218
|
+
:
|
|
10191
10219
|
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
|
|
10195
|
-
|
|
10196
|
-
|
|
10220
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
10221
|
+
{
|
|
10222
|
+
write() {},
|
|
10223
|
+
read() {
|
|
10224
|
+
return null;
|
|
10225
|
+
},
|
|
10226
|
+
remove() {}
|
|
10227
|
+
});
|
|
10197
10228
|
|
|
10198
|
-
// Non standard browser env (web workers, react-native) lack needed support.
|
|
10199
|
-
(function nonStandardBrowserEnv() {
|
|
10200
|
-
return {
|
|
10201
|
-
write: function write() {},
|
|
10202
|
-
read: function read() { return null; },
|
|
10203
|
-
remove: function remove() {}
|
|
10204
|
-
};
|
|
10205
|
-
})());
|
|
10206
10229
|
|
|
10207
10230
|
|
|
10208
10231
|
/***/ }),
|
|
@@ -10383,13 +10406,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10383
10406
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
10384
10407
|
/* harmony export */ });
|
|
10385
10408
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
10386
|
-
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/
|
|
10409
|
+
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
|
|
10387
10410
|
|
|
10388
10411
|
|
|
10389
10412
|
|
|
10390
10413
|
|
|
10391
10414
|
|
|
10392
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].
|
|
10415
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ?
|
|
10393
10416
|
|
|
10394
10417
|
// Standard browser envs have full support of the APIs needed to test
|
|
10395
10418
|
// whether the request URL is of the same origin as current location.
|
|
@@ -10399,7 +10422,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10399
10422
|
let originURL;
|
|
10400
10423
|
|
|
10401
10424
|
/**
|
|
10402
|
-
* Parse a URL to discover
|
|
10425
|
+
* Parse a URL to discover its components
|
|
10403
10426
|
*
|
|
10404
10427
|
* @param {String} url The URL to be parsed
|
|
10405
10428
|
* @returns {Object}
|
|
@@ -10920,7 +10943,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10920
10943
|
/* harmony export */ });
|
|
10921
10944
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
10922
10945
|
/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js");
|
|
10923
|
-
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/
|
|
10946
|
+
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
|
|
10924
10947
|
|
|
10925
10948
|
|
|
10926
10949
|
|
|
@@ -11120,6 +11143,33 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11120
11143
|
|
|
11121
11144
|
|
|
11122
11145
|
|
|
11146
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
11147
|
+
isBrowser: true,
|
|
11148
|
+
classes: {
|
|
11149
|
+
URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
11150
|
+
FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
11151
|
+
Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"]
|
|
11152
|
+
},
|
|
11153
|
+
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
11154
|
+
});
|
|
11155
|
+
|
|
11156
|
+
|
|
11157
|
+
/***/ }),
|
|
11158
|
+
|
|
11159
|
+
/***/ "./node_modules/axios/lib/platform/common/utils.js":
|
|
11160
|
+
/*!*********************************************************!*\
|
|
11161
|
+
!*** ./node_modules/axios/lib/platform/common/utils.js ***!
|
|
11162
|
+
\*********************************************************/
|
|
11163
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
11164
|
+
|
|
11165
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11166
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11167
|
+
/* harmony export */ hasBrowserEnv: () => (/* binding */ hasBrowserEnv),
|
|
11168
|
+
/* harmony export */ hasStandardBrowserEnv: () => (/* binding */ hasStandardBrowserEnv),
|
|
11169
|
+
/* harmony export */ hasStandardBrowserWebWorkerEnv: () => (/* binding */ hasStandardBrowserWebWorkerEnv)
|
|
11170
|
+
/* harmony export */ });
|
|
11171
|
+
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
11172
|
+
|
|
11123
11173
|
/**
|
|
11124
11174
|
* Determine if we're running in a standard browser environment
|
|
11125
11175
|
*
|
|
@@ -11137,18 +11187,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11137
11187
|
*
|
|
11138
11188
|
* @returns {boolean}
|
|
11139
11189
|
*/
|
|
11140
|
-
const
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
product === 'NativeScript' ||
|
|
11145
|
-
product === 'NS')
|
|
11146
|
-
) {
|
|
11147
|
-
return false;
|
|
11148
|
-
}
|
|
11149
|
-
|
|
11150
|
-
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
11151
|
-
})();
|
|
11190
|
+
const hasStandardBrowserEnv = (
|
|
11191
|
+
(product) => {
|
|
11192
|
+
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
|
|
11193
|
+
})(typeof navigator !== 'undefined' && navigator.product);
|
|
11152
11194
|
|
|
11153
11195
|
/**
|
|
11154
11196
|
* Determine if we're running in a standard browser webWorker environment
|
|
@@ -11159,7 +11201,7 @@ const isStandardBrowserEnv = (() => {
|
|
|
11159
11201
|
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
|
|
11160
11202
|
* This leads to a problem when axios post `FormData` in webWorker
|
|
11161
11203
|
*/
|
|
11162
|
-
|
|
11204
|
+
const hasStandardBrowserWebWorkerEnv = (() => {
|
|
11163
11205
|
return (
|
|
11164
11206
|
typeof WorkerGlobalScope !== 'undefined' &&
|
|
11165
11207
|
// eslint-disable-next-line no-undef
|
|
@@ -11169,16 +11211,28 @@ const isStandardBrowserEnv = (() => {
|
|
|
11169
11211
|
})();
|
|
11170
11212
|
|
|
11171
11213
|
|
|
11214
|
+
|
|
11215
|
+
|
|
11216
|
+
/***/ }),
|
|
11217
|
+
|
|
11218
|
+
/***/ "./node_modules/axios/lib/platform/index.js":
|
|
11219
|
+
/*!**************************************************!*\
|
|
11220
|
+
!*** ./node_modules/axios/lib/platform/index.js ***!
|
|
11221
|
+
\**************************************************/
|
|
11222
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
11223
|
+
|
|
11224
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11225
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11226
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11227
|
+
/* harmony export */ });
|
|
11228
|
+
/* harmony import */ var _node_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node/index.js */ "./node_modules/axios/lib/platform/browser/index.js");
|
|
11229
|
+
/* harmony import */ var _common_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/utils.js */ "./node_modules/axios/lib/platform/common/utils.js");
|
|
11230
|
+
|
|
11231
|
+
|
|
11232
|
+
|
|
11172
11233
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
11176
|
-
FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
11177
|
-
Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"]
|
|
11178
|
-
},
|
|
11179
|
-
isStandardBrowserEnv,
|
|
11180
|
-
isStandardBrowserWebWorkerEnv,
|
|
11181
|
-
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
11234
|
+
..._common_utils_js__WEBPACK_IMPORTED_MODULE_0__,
|
|
11235
|
+
..._node_index_js__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
11182
11236
|
});
|
|
11183
11237
|
|
|
11184
11238
|
|
|
@@ -11737,8 +11791,9 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
11737
11791
|
const reducedDescriptors = {};
|
|
11738
11792
|
|
|
11739
11793
|
forEach(descriptors, (descriptor, name) => {
|
|
11740
|
-
|
|
11741
|
-
|
|
11794
|
+
let ret;
|
|
11795
|
+
if ((ret = reducer(descriptor, name, obj)) !== false) {
|
|
11796
|
+
reducedDescriptors[name] = ret || descriptor;
|
|
11742
11797
|
}
|
|
11743
11798
|
});
|
|
11744
11799
|
|