contentful-management 11.39.2 → 11.40.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.
@@ -4293,6 +4293,7 @@ __webpack_require__.r(__webpack_exports__);
4293
4293
  /* harmony export */ complete: function() { return /* binding */ complete; },
4294
4294
  /* harmony export */ create: function() { return /* binding */ create; },
4295
4295
  /* harmony export */ del: function() { return /* binding */ del; },
4296
+ /* harmony export */ get: function() { return /* binding */ get; },
4296
4297
  /* harmony export */ getMany: function() { return /* binding */ getMany; },
4297
4298
  /* harmony export */ update: function() { return /* binding */ update; }
4298
4299
  /* harmony export */ });
@@ -4325,6 +4326,11 @@ var getMany = function getMany(http, params, headers) {
4325
4326
  params: params.query
4326
4327
  });
4327
4328
  };
4329
+ var get = function get(http, params, headers) {
4330
+ return _raw__WEBPACK_IMPORTED_MODULE_1__.get(http, getWorkflowUrl(params), {
4331
+ headers: headers
4332
+ });
4333
+ };
4328
4334
  var create = function create(http, params, rawData, headers) {
4329
4335
  var data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(rawData);
4330
4336
  return _raw__WEBPACK_IMPORTED_MODULE_1__.post(http, getBaseUrl(params), data, {
@@ -18017,6 +18023,7 @@ var createPlainClient = function createPlainClient(makeRequest, defaults) {
18017
18023
  delete: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'WorkflowDefinition', 'delete')
18018
18024
  },
18019
18025
  workflow: {
18026
+ get: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Workflow', 'get'),
18020
18027
  getMany: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Workflow', 'getMany'),
18021
18028
  create: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Workflow', 'create'),
18022
18029
  update: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Workflow', 'update'),
@@ -22220,9 +22227,9 @@ class Axios {
22220
22227
  return await this._request(configOrUrl, config);
22221
22228
  } catch (err) {
22222
22229
  if (err instanceof Error) {
22223
- let dummy;
22230
+ let dummy = {};
22224
22231
 
22225
- Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
22232
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
22226
22233
 
22227
22234
  // slice off the Error: ... line
22228
22235
  const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
@@ -22277,6 +22284,11 @@ class Axios {
22277
22284
  }
22278
22285
  }
22279
22286
 
22287
+ _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(config, {
22288
+ baseUrl: validators.spelling('baseURL'),
22289
+ withXsrfToken: validators.spelling('withXSRFToken')
22290
+ }, true);
22291
+
22280
22292
  // Set config.method
22281
22293
  config.method = (config.method || this.defaults.method || 'get').toLowerCase();
22282
22294
 
@@ -23100,7 +23112,7 @@ function mergeConfig(config1, config2) {
23100
23112
  config2 = config2 || {};
23101
23113
  const config = {};
23102
23114
 
23103
- function getMergedValue(target, source, caseless) {
23115
+ function getMergedValue(target, source, prop, caseless) {
23104
23116
  if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) {
23105
23117
  return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call({caseless}, target, source);
23106
23118
  } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) {
@@ -23112,11 +23124,11 @@ function mergeConfig(config1, config2) {
23112
23124
  }
23113
23125
 
23114
23126
  // eslint-disable-next-line consistent-return
23115
- function mergeDeepProperties(a, b, caseless) {
23127
+ function mergeDeepProperties(a, b, prop , caseless) {
23116
23128
  if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) {
23117
- return getMergedValue(a, b, caseless);
23129
+ return getMergedValue(a, b, prop , caseless);
23118
23130
  } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) {
23119
- return getMergedValue(undefined, a, caseless);
23131
+ return getMergedValue(undefined, a, prop , caseless);
23120
23132
  }
23121
23133
  }
23122
23134
 
@@ -23174,7 +23186,7 @@ function mergeConfig(config1, config2) {
23174
23186
  socketPath: defaultToConfig2,
23175
23187
  responseEncoding: defaultToConfig2,
23176
23188
  validateStatus: mergeDirectKeys,
23177
- headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
23189
+ headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
23178
23190
  };
23179
23191
 
23180
23192
  _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
@@ -23488,7 +23500,7 @@ __webpack_require__.r(__webpack_exports__);
23488
23500
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23489
23501
  /* harmony export */ VERSION: function() { return /* binding */ VERSION; }
23490
23502
  /* harmony export */ });
23491
- const VERSION = "1.7.7";
23503
+ const VERSION = "1.7.8";
23492
23504
 
23493
23505
  /***/ }),
23494
23506
 
@@ -23709,7 +23721,7 @@ function encode(val) {
23709
23721
  *
23710
23722
  * @param {string} url The base of the url (e.g., http://www.google.com)
23711
23723
  * @param {object} [params] The params to be appended
23712
- * @param {?object} options
23724
+ * @param {?(object|Function)} options
23713
23725
  *
23714
23726
  * @returns {string} The formatted url
23715
23727
  */
@@ -23721,6 +23733,12 @@ function buildURL(url, params, options) {
23721
23733
 
23722
23734
  const _encode = options && options.encode || encode;
23723
23735
 
23736
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(options)) {
23737
+ options = {
23738
+ serialize: options
23739
+ };
23740
+ }
23741
+
23724
23742
  const serializeFn = options && options.serialize;
23725
23743
 
23726
23744
  let serializedParams;
@@ -24073,75 +24091,21 @@ function isAxiosError(payload) {
24073
24091
 
24074
24092
  "use strict";
24075
24093
  __webpack_require__.r(__webpack_exports__);
24076
- /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "../node_modules/axios/lib/utils.js");
24077
24094
  /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "../node_modules/axios/lib/platform/index.js");
24078
24095
 
24079
24096
 
24097
+ /* harmony default export */ __webpack_exports__["default"] = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
24098
+ url = new URL(url, _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin);
24080
24099
 
24081
-
24082
-
24083
- /* harmony default export */ __webpack_exports__["default"] = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ?
24084
-
24085
- // Standard browser envs have full support of the APIs needed to test
24086
- // whether the request URL is of the same origin as current location.
24087
- (function standardBrowserEnv() {
24088
- const msie = _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator && /(msie|trident)/i.test(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator.userAgent);
24089
- const urlParsingNode = document.createElement('a');
24090
- let originURL;
24091
-
24092
- /**
24093
- * Parse a URL to discover its components
24094
- *
24095
- * @param {String} url The URL to be parsed
24096
- * @returns {Object}
24097
- */
24098
- function resolveURL(url) {
24099
- let href = url;
24100
-
24101
- if (msie) {
24102
- // IE needs attribute set twice to normalize properties
24103
- urlParsingNode.setAttribute('href', href);
24104
- href = urlParsingNode.href;
24105
- }
24106
-
24107
- urlParsingNode.setAttribute('href', href);
24108
-
24109
- // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
24110
- return {
24111
- href: urlParsingNode.href,
24112
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
24113
- host: urlParsingNode.host,
24114
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
24115
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
24116
- hostname: urlParsingNode.hostname,
24117
- port: urlParsingNode.port,
24118
- pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
24119
- urlParsingNode.pathname :
24120
- '/' + urlParsingNode.pathname
24121
- };
24122
- }
24123
-
24124
- originURL = resolveURL(window.location.href);
24125
-
24126
- /**
24127
- * Determine if a URL shares the same origin as the current location
24128
- *
24129
- * @param {String} requestURL The URL to test
24130
- * @returns {boolean} True if URL shares the same origin, otherwise false
24131
- */
24132
- return function isURLSameOrigin(requestURL) {
24133
- const parsed = (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(requestURL)) ? resolveURL(requestURL) : requestURL;
24134
- return (parsed.protocol === originURL.protocol &&
24135
- parsed.host === originURL.host);
24136
- };
24137
- })() :
24138
-
24139
- // Non standard browser envs (web workers, react-native) lack needed support.
24140
- (function nonStandardBrowserEnv() {
24141
- return function isURLSameOrigin() {
24142
- return true;
24143
- };
24144
- })());
24100
+ return (
24101
+ origin.protocol === url.protocol &&
24102
+ origin.host === url.host &&
24103
+ (isMSIE || origin.port === url.port)
24104
+ );
24105
+ })(
24106
+ new URL(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin),
24107
+ _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator && /(msie|trident)/i.test(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator.userAgent)
24108
+ ) : () => true);
24145
24109
 
24146
24110
 
24147
24111
  /***/ }),
@@ -24994,6 +24958,14 @@ validators.transitional = function transitional(validator, version, message) {
24994
24958
  };
24995
24959
  };
24996
24960
 
24961
+ validators.spelling = function spelling(correctSpelling) {
24962
+ return (value, opt) => {
24963
+ // eslint-disable-next-line no-console
24964
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
24965
+ return true;
24966
+ }
24967
+ };
24968
+
24997
24969
  /**
24998
24970
  * Assert object's properties type
24999
24971
  *
@@ -27386,7 +27358,7 @@ function createClient(params) {
27386
27358
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
27387
27359
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
27388
27360
  var userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(// @ts-expect-error
27389
- "".concat(sdkMain, "/").concat("11.39.2"), params.application, params.integration, params.feature);
27361
+ "".concat(sdkMain, "/").concat("11.40.0"), params.application, params.integration, params.feature);
27390
27362
  var adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
27391
27363
  userAgent: userAgent
27392
27364
  }));