contentful-management 11.47.3 → 11.48.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.
@@ -4840,6 +4840,13 @@ __webpack_require__.r(__webpack_exports__);
4840
4840
 
4841
4841
  // Interfaces for each “exclusive” shape
4842
4842
 
4843
+ // Helper type for creating property paths with comparison operators
4844
+ // For example "sys.createdAt[gte]", P = sys.createdAt, O = gte
4845
+
4846
+ // Helper types to ensure only one start operator can be used and only one end operator can be used
4847
+
4848
+ // Type for valid date range combinations - only start, only end, or both
4849
+
4843
4850
  /**
4844
4851
  * @private
4845
4852
  */
@@ -8674,7 +8681,17 @@ function createEnvironmentApi(makeRequest) {
8674
8681
  * environment.getFunctionLogs(
8675
8682
  * '<app-installation-id>',
8676
8683
  * '<function-id>',
8677
- * { limit: 10 },
8684
+ * {
8685
+ * query: {
8686
+ * // optional limit
8687
+ * limit: 10,
8688
+ * // optional interval query
8689
+ * 'sys.createdAt[gte]': start,
8690
+ * 'sys.createdAt[lt]': end,
8691
+ * // optional cursor based pagination parameters
8692
+ * pagePrev: '<page_prev>',
8693
+ * },
8694
+ * },
8678
8695
  * )
8679
8696
  * )
8680
8697
  * .then((functionLogs) => console.log(functionLog.items))
@@ -24486,6 +24503,17 @@ module.exports = require("assert");
24486
24503
 
24487
24504
  /***/ }),
24488
24505
 
24506
+ /***/ "crypto":
24507
+ /*!*************************!*\
24508
+ !*** external "crypto" ***!
24509
+ \*************************/
24510
+ /***/ ((module) => {
24511
+
24512
+ "use strict";
24513
+ module.exports = require("crypto");
24514
+
24515
+ /***/ }),
24516
+
24489
24517
  /***/ "events":
24490
24518
  /*!*************************!*\
24491
24519
  !*** external "events" ***!
@@ -25237,7 +25265,7 @@ const buildAddressEntry = (address, family) => resolveFamily(_utils_js__WEBPACK_
25237
25265
  }
25238
25266
 
25239
25267
  // Parse url
25240
- const fullPath = (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_12__["default"])(config.baseURL, config.url);
25268
+ const fullPath = (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_12__["default"])(config.baseURL, config.url, config.allowAbsoluteUrls);
25241
25269
  const parsed = new URL(fullPath, _platform_index_js__WEBPACK_IMPORTED_MODULE_9__["default"].hasBrowserEnv ? _platform_index_js__WEBPACK_IMPORTED_MODULE_9__["default"].origin : undefined);
25242
25270
  const protocol = parsed.protocol || supportedProtocols[0];
25243
25271
 
@@ -26380,6 +26408,15 @@ class Axios {
26380
26408
  }
26381
26409
  }
26382
26410
 
26411
+ // Set config.allowAbsoluteUrls
26412
+ if (config.allowAbsoluteUrls !== undefined) {
26413
+ // do nothing
26414
+ } else if (this.defaults.allowAbsoluteUrls !== undefined) {
26415
+ config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
26416
+ } else {
26417
+ config.allowAbsoluteUrls = true;
26418
+ }
26419
+
26383
26420
  _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(config, {
26384
26421
  baseUrl: validators.spelling('baseURL'),
26385
26422
  withXsrfToken: validators.spelling('withXSRFToken')
@@ -26475,7 +26512,7 @@ class Axios {
26475
26512
 
26476
26513
  getUri(config) {
26477
26514
  config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config);
26478
- const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__["default"])(config.baseURL, config.url);
26515
+ const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__["default"])(config.baseURL, config.url, config.allowAbsoluteUrls);
26479
26516
  return (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(fullPath, config.params, config.paramsSerializer);
26480
26517
  }
26481
26518
  }
@@ -27071,8 +27108,9 @@ __webpack_require__.r(__webpack_exports__);
27071
27108
  *
27072
27109
  * @returns {string} The combined full path
27073
27110
  */
27074
- function buildFullPath(baseURL, requestedURL) {
27075
- if (baseURL && !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL)) {
27111
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
27112
+ let isRelativeUrl = !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL);
27113
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
27076
27114
  return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURL, requestedURL);
27077
27115
  }
27078
27116
  return requestedURL;
@@ -27611,7 +27649,7 @@ __webpack_require__.r(__webpack_exports__);
27611
27649
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27612
27650
  /* harmony export */ VERSION: () => (/* binding */ VERSION)
27613
27651
  /* harmony export */ });
27614
- const VERSION = "1.7.9";
27652
+ const VERSION = "1.8.4";
27615
27653
 
27616
27654
  /***/ }),
27617
27655
 
@@ -28398,14 +28436,16 @@ __webpack_require__.r(__webpack_exports__);
28398
28436
  /* harmony export */ });
28399
28437
  /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! util */ "util");
28400
28438
  /* harmony import */ var stream__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! stream */ "stream");
28401
- /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "../node_modules/axios/lib/utils.js");
28402
- /* harmony import */ var _readBlob_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./readBlob.js */ "../node_modules/axios/lib/helpers/readBlob.js");
28439
+ /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils.js */ "../node_modules/axios/lib/utils.js");
28440
+ /* harmony import */ var _readBlob_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./readBlob.js */ "../node_modules/axios/lib/helpers/readBlob.js");
28441
+ /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../platform/index.js */ "../node_modules/axios/lib/platform/index.js");
28442
+
28403
28443
 
28404
28444
 
28405
28445
 
28406
28446
 
28407
28447
 
28408
- const BOUNDARY_ALPHABET = _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].ALPHABET.ALPHA_DIGIT + '-_';
28448
+ const BOUNDARY_ALPHABET = _platform_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].ALPHABET.ALPHA_DIGIT + '-_';
28409
28449
 
28410
28450
  const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util__WEBPACK_IMPORTED_MODULE_0__.TextEncoder();
28411
28451
 
@@ -28416,7 +28456,7 @@ const CRLF_BYTES_COUNT = 2;
28416
28456
  class FormDataPart {
28417
28457
  constructor(name, value) {
28418
28458
  const {escapeName} = this.constructor;
28419
- const isStringValue = _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isString(value);
28459
+ const isStringValue = _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isString(value);
28420
28460
 
28421
28461
  let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${
28422
28462
  !isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ''
@@ -28443,10 +28483,10 @@ class FormDataPart {
28443
28483
 
28444
28484
  const {value} = this;
28445
28485
 
28446
- if(_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isTypedArray(value)) {
28486
+ if(_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isTypedArray(value)) {
28447
28487
  yield value;
28448
28488
  } else {
28449
- yield* (0,_readBlob_js__WEBPACK_IMPORTED_MODULE_3__["default"])(value);
28489
+ yield* (0,_readBlob_js__WEBPACK_IMPORTED_MODULE_4__["default"])(value);
28450
28490
  }
28451
28491
 
28452
28492
  yield CRLF_BYTES;
@@ -28465,10 +28505,10 @@ const formDataToStream = (form, headersHandler, options) => {
28465
28505
  const {
28466
28506
  tag = 'form-data-boundary',
28467
28507
  size = 25,
28468
- boundary = tag + '-' + _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].generateString(size, BOUNDARY_ALPHABET)
28508
+ boundary = tag + '-' + _platform_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].generateString(size, BOUNDARY_ALPHABET)
28469
28509
  } = options || {};
28470
28510
 
28471
- if(!_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isFormData(form)) {
28511
+ if(!_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFormData(form)) {
28472
28512
  throw TypeError('FormData instance required');
28473
28513
  }
28474
28514
 
@@ -28488,7 +28528,7 @@ const formDataToStream = (form, headersHandler, options) => {
28488
28528
 
28489
28529
  contentLength += boundaryBytes.byteLength * parts.length;
28490
28530
 
28491
- contentLength = _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].toFiniteNumber(contentLength);
28531
+ contentLength = _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].toFiniteNumber(contentLength);
28492
28532
 
28493
28533
  const computedHeaders = {
28494
28534
  'Content-Type': `multipart/form-data; boundary=${boundary}`
@@ -28897,7 +28937,7 @@ __webpack_require__.r(__webpack_exports__);
28897
28937
 
28898
28938
  newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(headers);
28899
28939
 
28900
- newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_3__["default"])(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
28940
+ newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_3__["default"])(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
28901
28941
 
28902
28942
  // HTTP basic authentication
28903
28943
  if (auth) {
@@ -29745,18 +29785,45 @@ __webpack_require__.r(__webpack_exports__);
29745
29785
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
29746
29786
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
29747
29787
  /* harmony export */ });
29748
- /* harmony import */ var _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classes/URLSearchParams.js */ "../node_modules/axios/lib/platform/node/classes/URLSearchParams.js");
29749
- /* harmony import */ var _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classes/FormData.js */ "../node_modules/axios/lib/platform/node/classes/FormData.js");
29788
+ /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! crypto */ "crypto");
29789
+ /* harmony import */ var _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classes/URLSearchParams.js */ "../node_modules/axios/lib/platform/node/classes/URLSearchParams.js");
29790
+ /* harmony import */ var _classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./classes/FormData.js */ "../node_modules/axios/lib/platform/node/classes/FormData.js");
29791
+
29792
+
29750
29793
 
29751
29794
 
29795
+ const ALPHA = 'abcdefghijklmnopqrstuvwxyz'
29796
+
29797
+ const DIGIT = '0123456789';
29798
+
29799
+ const ALPHABET = {
29800
+ DIGIT,
29801
+ ALPHA,
29802
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
29803
+ }
29804
+
29805
+ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
29806
+ let str = '';
29807
+ const {length} = alphabet;
29808
+ const randomValues = new Uint32Array(size);
29809
+ crypto__WEBPACK_IMPORTED_MODULE_0__.randomFillSync(randomValues);
29810
+ for (let i = 0; i < size; i++) {
29811
+ str += alphabet[randomValues[i] % length];
29812
+ }
29813
+
29814
+ return str;
29815
+ }
29816
+
29752
29817
 
29753
29818
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
29754
29819
  isNode: true,
29755
29820
  classes: {
29756
- URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"],
29757
- FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"],
29821
+ URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__["default"],
29822
+ FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__["default"],
29758
29823
  Blob: typeof Blob !== 'undefined' && Blob || null
29759
29824
  },
29825
+ ALPHABET,
29826
+ generateString,
29760
29827
  protocols: [ 'http', 'https', 'file', 'data' ]
29761
29828
  });
29762
29829
 
@@ -30379,26 +30446,6 @@ const toFiniteNumber = (value, defaultValue) => {
30379
30446
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
30380
30447
  }
30381
30448
 
30382
- const ALPHA = 'abcdefghijklmnopqrstuvwxyz'
30383
-
30384
- const DIGIT = '0123456789';
30385
-
30386
- const ALPHABET = {
30387
- DIGIT,
30388
- ALPHA,
30389
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
30390
- }
30391
-
30392
- const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
30393
- let str = '';
30394
- const {length} = alphabet;
30395
- while (size--) {
30396
- str += alphabet[Math.random() * length|0]
30397
- }
30398
-
30399
- return str;
30400
- }
30401
-
30402
30449
  /**
30403
30450
  * If the thing is a FormData object, return true, otherwise return false.
30404
30451
  *
@@ -30526,8 +30573,6 @@ const asap = typeof queueMicrotask !== 'undefined' ?
30526
30573
  findKey,
30527
30574
  global: _global,
30528
30575
  isContextDefined,
30529
- ALPHABET,
30530
- generateString,
30531
30576
  isSpecCompliantForm,
30532
30577
  toJSONObject,
30533
30578
  isAsyncFn,
@@ -31991,7 +32036,7 @@ function createClient(params, opts = {}) {
31991
32036
  const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
31992
32037
  const userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(
31993
32038
  // @ts-expect-error
31994
- `${sdkMain}/${"11.47.3"}`, params.application, params.integration, params.feature);
32039
+ `${sdkMain}/${"11.48.1"}`, params.application, params.integration, params.feature);
31995
32040
  const adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
31996
32041
  userAgent
31997
32042
  }));