contentful-management 11.39.2 → 11.40.1
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-management.browser.js +47 -75
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +49 -79
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/adapters/REST/endpoints/workflow.js +3 -0
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/es-modules/entities/workflow.js +8 -0
- package/dist/es-modules/plain/plain-client.js +1 -0
- package/dist/es-modules/plain/wrappers/wrap.test-d.js +9 -0
- package/dist/typings/adapters/REST/endpoints/workflow.d.ts +1 -0
- package/dist/typings/common-types.d.ts +6 -0
- package/dist/typings/constants/editor-interface-defaults/controls-defaults.d.ts +1 -1
- package/dist/typings/entities/workflow.d.ts +1 -0
- package/dist/typings/plain/entities/workflow.d.ts +19 -2
- package/dist/typings/plain/wrappers/wrap.d.ts +1 -7
- package/dist/typings/plain/wrappers/wrap.test-d.d.ts +1 -0
- package/package.json +3 -2
|
@@ -4333,6 +4333,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4333
4333
|
/* harmony export */ complete: () => (/* binding */ complete),
|
|
4334
4334
|
/* harmony export */ create: () => (/* binding */ create),
|
|
4335
4335
|
/* harmony export */ del: () => (/* binding */ del),
|
|
4336
|
+
/* harmony export */ get: () => (/* binding */ get),
|
|
4336
4337
|
/* harmony export */ getMany: () => (/* binding */ getMany),
|
|
4337
4338
|
/* harmony export */ update: () => (/* binding */ update)
|
|
4338
4339
|
/* harmony export */ });
|
|
@@ -4356,6 +4357,9 @@ const getMany = (http, params, headers) => _raw__WEBPACK_IMPORTED_MODULE_1__.get
|
|
|
4356
4357
|
headers,
|
|
4357
4358
|
params: params.query
|
|
4358
4359
|
});
|
|
4360
|
+
const get = (http, params, headers) => _raw__WEBPACK_IMPORTED_MODULE_1__.get(http, getWorkflowUrl(params), {
|
|
4361
|
+
headers
|
|
4362
|
+
});
|
|
4359
4363
|
const create = (http, params, rawData, headers) => {
|
|
4360
4364
|
const data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(rawData);
|
|
4361
4365
|
return _raw__WEBPACK_IMPORTED_MODULE_1__.post(http, getBaseUrl(params), data, {
|
|
@@ -17042,6 +17046,7 @@ const createPlainClient = (makeRequest, defaults) => {
|
|
|
17042
17046
|
delete: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'WorkflowDefinition', 'delete')
|
|
17043
17047
|
},
|
|
17044
17048
|
workflow: {
|
|
17049
|
+
get: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Workflow', 'get'),
|
|
17045
17050
|
getMany: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Workflow', 'getMany'),
|
|
17046
17051
|
create: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Workflow', 'create'),
|
|
17047
17052
|
update: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Workflow', 'update'),
|
|
@@ -23841,7 +23846,7 @@ function dispatchBeforeRedirect(options, responseDetails) {
|
|
|
23841
23846
|
function setProxy(options, configProxy, location) {
|
|
23842
23847
|
let proxy = configProxy;
|
|
23843
23848
|
if (!proxy && proxy !== false) {
|
|
23844
|
-
const proxyUrl =
|
|
23849
|
+
const proxyUrl = proxy_from_env__WEBPACK_IMPORTED_MODULE_0__.getProxyForUrl(location);
|
|
23845
23850
|
if (proxyUrl) {
|
|
23846
23851
|
proxy = new URL(proxyUrl);
|
|
23847
23852
|
}
|
|
@@ -24072,7 +24077,7 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
24072
24077
|
} catch (e) {
|
|
24073
24078
|
}
|
|
24074
24079
|
}
|
|
24075
|
-
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_8__["default"].isBlob(data)) {
|
|
24080
|
+
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_8__["default"].isBlob(data) || _utils_js__WEBPACK_IMPORTED_MODULE_8__["default"].isFile(data)) {
|
|
24076
24081
|
data.size && headers.setContentType(data.type || 'application/octet-stream');
|
|
24077
24082
|
headers.setContentLength(data.size || 0);
|
|
24078
24083
|
data = stream__WEBPACK_IMPORTED_MODULE_6__.Readable.from((0,_helpers_readBlob_js__WEBPACK_IMPORTED_MODULE_19__["default"])(data));
|
|
@@ -24327,7 +24332,7 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
|
|
|
24327
24332
|
}
|
|
24328
24333
|
|
|
24329
24334
|
const err = new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"](
|
|
24330
|
-
'
|
|
24335
|
+
'stream has been aborted',
|
|
24331
24336
|
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_15__["default"].ERR_BAD_RESPONSE,
|
|
24332
24337
|
config,
|
|
24333
24338
|
lastRequest
|
|
@@ -25072,9 +25077,9 @@ class Axios {
|
|
|
25072
25077
|
return await this._request(configOrUrl, config);
|
|
25073
25078
|
} catch (err) {
|
|
25074
25079
|
if (err instanceof Error) {
|
|
25075
|
-
let dummy;
|
|
25080
|
+
let dummy = {};
|
|
25076
25081
|
|
|
25077
|
-
Error.captureStackTrace ? Error.captureStackTrace(dummy
|
|
25082
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
|
|
25078
25083
|
|
|
25079
25084
|
// slice off the Error: ... line
|
|
25080
25085
|
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
|
@@ -25129,6 +25134,11 @@ class Axios {
|
|
|
25129
25134
|
}
|
|
25130
25135
|
}
|
|
25131
25136
|
|
|
25137
|
+
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(config, {
|
|
25138
|
+
baseUrl: validators.spelling('baseURL'),
|
|
25139
|
+
withXsrfToken: validators.spelling('withXSRFToken')
|
|
25140
|
+
}, true);
|
|
25141
|
+
|
|
25132
25142
|
// Set config.method
|
|
25133
25143
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
25134
25144
|
|
|
@@ -25961,7 +25971,7 @@ function mergeConfig(config1, config2) {
|
|
|
25961
25971
|
config2 = config2 || {};
|
|
25962
25972
|
const config = {};
|
|
25963
25973
|
|
|
25964
|
-
function getMergedValue(target, source, caseless) {
|
|
25974
|
+
function getMergedValue(target, source, prop, caseless) {
|
|
25965
25975
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) {
|
|
25966
25976
|
return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call({caseless}, target, source);
|
|
25967
25977
|
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) {
|
|
@@ -25973,11 +25983,11 @@ function mergeConfig(config1, config2) {
|
|
|
25973
25983
|
}
|
|
25974
25984
|
|
|
25975
25985
|
// eslint-disable-next-line consistent-return
|
|
25976
|
-
function mergeDeepProperties(a, b, caseless) {
|
|
25986
|
+
function mergeDeepProperties(a, b, prop , caseless) {
|
|
25977
25987
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) {
|
|
25978
|
-
return getMergedValue(a, b, caseless);
|
|
25988
|
+
return getMergedValue(a, b, prop , caseless);
|
|
25979
25989
|
} else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) {
|
|
25980
|
-
return getMergedValue(undefined, a, caseless);
|
|
25990
|
+
return getMergedValue(undefined, a, prop , caseless);
|
|
25981
25991
|
}
|
|
25982
25992
|
}
|
|
25983
25993
|
|
|
@@ -26035,7 +26045,7 @@ function mergeConfig(config1, config2) {
|
|
|
26035
26045
|
socketPath: defaultToConfig2,
|
|
26036
26046
|
responseEncoding: defaultToConfig2,
|
|
26037
26047
|
validateStatus: mergeDirectKeys,
|
|
26038
|
-
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
26048
|
+
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
|
|
26039
26049
|
};
|
|
26040
26050
|
|
|
26041
26051
|
_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
@@ -26355,7 +26365,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26355
26365
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
26356
26366
|
/* harmony export */ VERSION: () => (/* binding */ VERSION)
|
|
26357
26367
|
/* harmony export */ });
|
|
26358
|
-
const VERSION = "1.7.
|
|
26368
|
+
const VERSION = "1.7.8";
|
|
26359
26369
|
|
|
26360
26370
|
/***/ }),
|
|
26361
26371
|
|
|
@@ -26786,7 +26796,7 @@ function encode(val) {
|
|
|
26786
26796
|
*
|
|
26787
26797
|
* @param {string} url The base of the url (e.g., http://www.google.com)
|
|
26788
26798
|
* @param {object} [params] The params to be appended
|
|
26789
|
-
* @param {?object} options
|
|
26799
|
+
* @param {?(object|Function)} options
|
|
26790
26800
|
*
|
|
26791
26801
|
* @returns {string} The formatted url
|
|
26792
26802
|
*/
|
|
@@ -26798,6 +26808,12 @@ function buildURL(url, params, options) {
|
|
|
26798
26808
|
|
|
26799
26809
|
const _encode = options && options.encode || encode;
|
|
26800
26810
|
|
|
26811
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(options)) {
|
|
26812
|
+
options = {
|
|
26813
|
+
serialize: options
|
|
26814
|
+
};
|
|
26815
|
+
}
|
|
26816
|
+
|
|
26801
26817
|
const serializeFn = options && options.serialize;
|
|
26802
26818
|
|
|
26803
26819
|
let serializedParams;
|
|
@@ -27145,7 +27161,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27145
27161
|
|
|
27146
27162
|
const BOUNDARY_ALPHABET = _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].ALPHABET.ALPHA_DIGIT + '-_';
|
|
27147
27163
|
|
|
27148
|
-
const textEncoder = new util__WEBPACK_IMPORTED_MODULE_0__.TextEncoder();
|
|
27164
|
+
const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util__WEBPACK_IMPORTED_MODULE_0__.TextEncoder();
|
|
27149
27165
|
|
|
27150
27166
|
const CRLF = '\r\n';
|
|
27151
27167
|
const CRLF_BYTES = textEncoder.encode(CRLF);
|
|
@@ -27395,75 +27411,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27395
27411
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
27396
27412
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
27397
27413
|
/* harmony export */ });
|
|
27398
|
-
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "../node_modules/axios/lib/utils.js");
|
|
27399
27414
|
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "../node_modules/axios/lib/platform/index.js");
|
|
27400
27415
|
|
|
27401
27416
|
|
|
27417
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
|
|
27418
|
+
url = new URL(url, _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin);
|
|
27402
27419
|
|
|
27403
|
-
|
|
27404
|
-
|
|
27405
|
-
|
|
27406
|
-
|
|
27407
|
-
|
|
27408
|
-
|
|
27409
|
-
|
|
27410
|
-
|
|
27411
|
-
|
|
27412
|
-
let originURL;
|
|
27413
|
-
|
|
27414
|
-
/**
|
|
27415
|
-
* Parse a URL to discover its components
|
|
27416
|
-
*
|
|
27417
|
-
* @param {String} url The URL to be parsed
|
|
27418
|
-
* @returns {Object}
|
|
27419
|
-
*/
|
|
27420
|
-
function resolveURL(url) {
|
|
27421
|
-
let href = url;
|
|
27422
|
-
|
|
27423
|
-
if (msie) {
|
|
27424
|
-
// IE needs attribute set twice to normalize properties
|
|
27425
|
-
urlParsingNode.setAttribute('href', href);
|
|
27426
|
-
href = urlParsingNode.href;
|
|
27427
|
-
}
|
|
27428
|
-
|
|
27429
|
-
urlParsingNode.setAttribute('href', href);
|
|
27430
|
-
|
|
27431
|
-
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
|
|
27432
|
-
return {
|
|
27433
|
-
href: urlParsingNode.href,
|
|
27434
|
-
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
|
27435
|
-
host: urlParsingNode.host,
|
|
27436
|
-
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
|
27437
|
-
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
|
27438
|
-
hostname: urlParsingNode.hostname,
|
|
27439
|
-
port: urlParsingNode.port,
|
|
27440
|
-
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
|
|
27441
|
-
urlParsingNode.pathname :
|
|
27442
|
-
'/' + urlParsingNode.pathname
|
|
27443
|
-
};
|
|
27444
|
-
}
|
|
27445
|
-
|
|
27446
|
-
originURL = resolveURL(window.location.href);
|
|
27447
|
-
|
|
27448
|
-
/**
|
|
27449
|
-
* Determine if a URL shares the same origin as the current location
|
|
27450
|
-
*
|
|
27451
|
-
* @param {String} requestURL The URL to test
|
|
27452
|
-
* @returns {boolean} True if URL shares the same origin, otherwise false
|
|
27453
|
-
*/
|
|
27454
|
-
return function isURLSameOrigin(requestURL) {
|
|
27455
|
-
const parsed = (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
|
27456
|
-
return (parsed.protocol === originURL.protocol &&
|
|
27457
|
-
parsed.host === originURL.host);
|
|
27458
|
-
};
|
|
27459
|
-
})() :
|
|
27460
|
-
|
|
27461
|
-
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
27462
|
-
(function nonStandardBrowserEnv() {
|
|
27463
|
-
return function isURLSameOrigin() {
|
|
27464
|
-
return true;
|
|
27465
|
-
};
|
|
27466
|
-
})());
|
|
27420
|
+
return (
|
|
27421
|
+
origin.protocol === url.protocol &&
|
|
27422
|
+
origin.host === url.host &&
|
|
27423
|
+
(isMSIE || origin.port === url.port)
|
|
27424
|
+
);
|
|
27425
|
+
})(
|
|
27426
|
+
new URL(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin),
|
|
27427
|
+
_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator && /(msie|trident)/i.test(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator.userAgent)
|
|
27428
|
+
) : () => true);
|
|
27467
27429
|
|
|
27468
27430
|
|
|
27469
27431
|
/***/ }),
|
|
@@ -28350,6 +28312,14 @@ validators.transitional = function transitional(validator, version, message) {
|
|
|
28350
28312
|
};
|
|
28351
28313
|
};
|
|
28352
28314
|
|
|
28315
|
+
validators.spelling = function spelling(correctSpelling) {
|
|
28316
|
+
return (value, opt) => {
|
|
28317
|
+
// eslint-disable-next-line no-console
|
|
28318
|
+
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
28319
|
+
return true;
|
|
28320
|
+
}
|
|
28321
|
+
};
|
|
28322
|
+
|
|
28353
28323
|
/**
|
|
28354
28324
|
* Assert object's properties type
|
|
28355
28325
|
*
|
|
@@ -30742,7 +30712,7 @@ function createClient(params, opts = {}) {
|
|
|
30742
30712
|
const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
30743
30713
|
const userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(
|
|
30744
30714
|
// @ts-expect-error
|
|
30745
|
-
`${sdkMain}/${"11.
|
|
30715
|
+
`${sdkMain}/${"11.40.1"}`, params.application, params.integration, params.feature);
|
|
30746
30716
|
const adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
|
|
30747
30717
|
userAgent
|
|
30748
30718
|
}));
|