contentful-management 11.54.2 → 11.54.4

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.
@@ -1810,7 +1810,7 @@ const getMany = (http, params) => {
1810
1810
  var _params$query$pageUrl, _params$query, _params$query2;
1811
1811
  const url = (_params$query$pageUrl = (_params$query = params.query) === null || _params$query === void 0 ? void 0 : _params$query.pageUrl) !== null && _params$query$pageUrl !== void 0 ? _params$query$pageUrl : basePath(params.organizationId);
1812
1812
  return _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, url, {
1813
- params: (_params$query2 = params.query) !== null && _params$query2 !== void 0 && _params$query2.pageUrl ? {} : params.query
1813
+ params: (_params$query2 = params.query) !== null && _params$query2 !== void 0 && _params$query2.pageUrl ? undefined : params.query
1814
1814
  });
1815
1815
  };
1816
1816
  const getTotal = (http, params) => _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, `${basePath(params.organizationId)}/total`);
@@ -1946,11 +1946,10 @@ const getTotal = (http, params) => _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, `
1946
1946
  function cursorBasedCollection(path, params) {
1947
1947
  var _params$query, _params$query2;
1948
1948
  return (_params$query = params.query) !== null && _params$query !== void 0 && _params$query.pageUrl ? {
1949
- url: (_params$query2 = params.query) === null || _params$query2 === void 0 ? void 0 : _params$query2.pageUrl,
1950
- queryParams: {}
1949
+ url: (_params$query2 = params.query) === null || _params$query2 === void 0 ? void 0 : _params$query2.pageUrl
1951
1950
  } : {
1952
1951
  url: `${basePath(params.organizationId)}${path}`,
1953
- queryParams: params.query || {}
1952
+ queryParams: params.query
1954
1953
  };
1955
1954
  }
1956
1955
 
@@ -20026,6 +20025,52 @@ module.exports = URIError;
20026
20025
  module.exports = Object;
20027
20026
 
20028
20027
 
20028
+ /***/ }),
20029
+
20030
+ /***/ "../node_modules/es-set-tostringtag/index.js":
20031
+ /*!***************************************************!*\
20032
+ !*** ../node_modules/es-set-tostringtag/index.js ***!
20033
+ \***************************************************/
20034
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
20035
+
20036
+ "use strict";
20037
+
20038
+
20039
+ var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "../node_modules/get-intrinsic/index.js");
20040
+
20041
+ var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
20042
+
20043
+ var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ "../node_modules/has-tostringtag/shams.js")();
20044
+ var hasOwn = __webpack_require__(/*! hasown */ "../node_modules/hasown/index.js");
20045
+ var $TypeError = __webpack_require__(/*! es-errors/type */ "../node_modules/es-errors/type.js");
20046
+
20047
+ var toStringTag = hasToStringTag ? Symbol.toStringTag : null;
20048
+
20049
+ /** @type {import('.')} */
20050
+ module.exports = function setToStringTag(object, value) {
20051
+ var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force;
20052
+ var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;
20053
+ if (
20054
+ (typeof overrideIfSet !== 'undefined' && typeof overrideIfSet !== 'boolean')
20055
+ || (typeof nonConfigurable !== 'undefined' && typeof nonConfigurable !== 'boolean')
20056
+ ) {
20057
+ throw new $TypeError('if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans');
20058
+ }
20059
+ if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) {
20060
+ if ($defineProperty) {
20061
+ $defineProperty(object, toStringTag, {
20062
+ configurable: !nonConfigurable,
20063
+ enumerable: false,
20064
+ value: value,
20065
+ writable: false
20066
+ });
20067
+ } else {
20068
+ object[toStringTag] = value; // eslint-disable-line no-param-reassign
20069
+ }
20070
+ }
20071
+ };
20072
+
20073
+
20029
20074
  /***/ }),
20030
20075
 
20031
20076
  /***/ "../node_modules/follow-redirects/debug.js":
@@ -20755,6 +20800,9 @@ module.exports.wrap = wrap;
20755
20800
  \**************************************************/
20756
20801
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
20757
20802
 
20803
+ "use strict";
20804
+
20805
+
20758
20806
  var CombinedStream = __webpack_require__(/*! combined-stream */ "../node_modules/combined-stream/lib/combined_stream.js");
20759
20807
  var util = __webpack_require__(/*! util */ "util");
20760
20808
  var path = __webpack_require__(/*! path */ "path");
@@ -20763,23 +20811,20 @@ var https = __webpack_require__(/*! https */ "https");
20763
20811
  var parseUrl = (__webpack_require__(/*! url */ "url").parse);
20764
20812
  var fs = __webpack_require__(/*! fs */ "fs");
20765
20813
  var Stream = (__webpack_require__(/*! stream */ "stream").Stream);
20814
+ var crypto = __webpack_require__(/*! crypto */ "crypto");
20766
20815
  var mime = __webpack_require__(/*! mime-types */ "../node_modules/mime-types/index.js");
20767
20816
  var asynckit = __webpack_require__(/*! asynckit */ "../node_modules/asynckit/index.js");
20817
+ var setToStringTag = __webpack_require__(/*! es-set-tostringtag */ "../node_modules/es-set-tostringtag/index.js");
20818
+ var hasOwn = __webpack_require__(/*! hasown */ "../node_modules/hasown/index.js");
20768
20819
  var populate = __webpack_require__(/*! ./populate.js */ "../node_modules/form-data/lib/populate.js");
20769
20820
 
20770
- // Public API
20771
- module.exports = FormData;
20772
-
20773
- // make it a Stream
20774
- util.inherits(FormData, CombinedStream);
20775
-
20776
20821
  /**
20777
20822
  * Create readable "multipart/form-data" streams.
20778
20823
  * Can be used to submit forms
20779
20824
  * and file uploads to other web applications.
20780
20825
  *
20781
20826
  * @constructor
20782
- * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream
20827
+ * @param {object} options - Properties to be added/overriden for FormData and CombinedStream
20783
20828
  */
20784
20829
  function FormData(options) {
20785
20830
  if (!(this instanceof FormData)) {
@@ -20792,35 +20837,39 @@ function FormData(options) {
20792
20837
 
20793
20838
  CombinedStream.call(this);
20794
20839
 
20795
- options = options || {};
20796
- for (var option in options) {
20840
+ options = options || {}; // eslint-disable-line no-param-reassign
20841
+ for (var option in options) { // eslint-disable-line no-restricted-syntax
20797
20842
  this[option] = options[option];
20798
20843
  }
20799
20844
  }
20800
20845
 
20846
+ // make it a Stream
20847
+ util.inherits(FormData, CombinedStream);
20848
+
20801
20849
  FormData.LINE_BREAK = '\r\n';
20802
20850
  FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream';
20803
20851
 
20804
- FormData.prototype.append = function(field, value, options) {
20805
-
20806
- options = options || {};
20852
+ FormData.prototype.append = function (field, value, options) {
20853
+ options = options || {}; // eslint-disable-line no-param-reassign
20807
20854
 
20808
20855
  // allow filename as single option
20809
- if (typeof options == 'string') {
20810
- options = {filename: options};
20856
+ if (typeof options === 'string') {
20857
+ options = { filename: options }; // eslint-disable-line no-param-reassign
20811
20858
  }
20812
20859
 
20813
20860
  var append = CombinedStream.prototype.append.bind(this);
20814
20861
 
20815
20862
  // all that streamy business can't handle numbers
20816
- if (typeof value == 'number') {
20817
- value = '' + value;
20863
+ if (typeof value === 'number' || value == null) {
20864
+ value = String(value); // eslint-disable-line no-param-reassign
20818
20865
  }
20819
20866
 
20820
20867
  // https://github.com/felixge/node-form-data/issues/38
20821
20868
  if (Array.isArray(value)) {
20822
- // Please convert your array into string
20823
- // the way web server expects it
20869
+ /*
20870
+ * Please convert your array into string
20871
+ * the way web server expects it
20872
+ */
20824
20873
  this._error(new Error('Arrays are not supported.'));
20825
20874
  return;
20826
20875
  }
@@ -20836,15 +20885,17 @@ FormData.prototype.append = function(field, value, options) {
20836
20885
  this._trackLength(header, value, options);
20837
20886
  };
20838
20887
 
20839
- FormData.prototype._trackLength = function(header, value, options) {
20888
+ FormData.prototype._trackLength = function (header, value, options) {
20840
20889
  var valueLength = 0;
20841
20890
 
20842
- // used w/ getLengthSync(), when length is known.
20843
- // e.g. for streaming directly from a remote server,
20844
- // w/ a known file a size, and not wanting to wait for
20845
- // incoming file to finish to get its size.
20891
+ /*
20892
+ * used w/ getLengthSync(), when length is known.
20893
+ * e.g. for streaming directly from a remote server,
20894
+ * w/ a known file a size, and not wanting to wait for
20895
+ * incoming file to finish to get its size.
20896
+ */
20846
20897
  if (options.knownLength != null) {
20847
- valueLength += +options.knownLength;
20898
+ valueLength += Number(options.knownLength);
20848
20899
  } else if (Buffer.isBuffer(value)) {
20849
20900
  valueLength = value.length;
20850
20901
  } else if (typeof value === 'string') {
@@ -20854,12 +20905,10 @@ FormData.prototype._trackLength = function(header, value, options) {
20854
20905
  this._valueLength += valueLength;
20855
20906
 
20856
20907
  // @check why add CRLF? does this account for custom/multiple CRLFs?
20857
- this._overheadLength +=
20858
- Buffer.byteLength(header) +
20859
- FormData.LINE_BREAK.length;
20908
+ this._overheadLength += Buffer.byteLength(header) + FormData.LINE_BREAK.length;
20860
20909
 
20861
20910
  // empty or either doesn't have path or not an http response or not a stream
20862
- if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) {
20911
+ if (!value || (!value.path && !(value.readable && hasOwn(value, 'httpVersion')) && !(value instanceof Stream))) {
20863
20912
  return;
20864
20913
  }
20865
20914
 
@@ -20869,10 +20918,8 @@ FormData.prototype._trackLength = function(header, value, options) {
20869
20918
  }
20870
20919
  };
20871
20920
 
20872
- FormData.prototype._lengthRetriever = function(value, callback) {
20873
-
20874
- if (value.hasOwnProperty('fd')) {
20875
-
20921
+ FormData.prototype._lengthRetriever = function (value, callback) {
20922
+ if (hasOwn(value, 'fd')) {
20876
20923
  // take read range into a account
20877
20924
  // `end` = Infinity –> read file till the end
20878
20925
  //
@@ -20881,54 +20928,52 @@ FormData.prototype._lengthRetriever = function(value, callback) {
20881
20928
  // Fix it when node fixes it.
20882
20929
  // https://github.com/joyent/node/issues/7819
20883
20930
  if (value.end != undefined && value.end != Infinity && value.start != undefined) {
20884
-
20885
20931
  // when end specified
20886
20932
  // no need to calculate range
20887
20933
  // inclusive, starts with 0
20888
- callback(null, value.end + 1 - (value.start ? value.start : 0));
20934
+ callback(null, value.end + 1 - (value.start ? value.start : 0)); // eslint-disable-line callback-return
20889
20935
 
20890
- // not that fast snoopy
20936
+ // not that fast snoopy
20891
20937
  } else {
20892
20938
  // still need to fetch file size from fs
20893
- fs.stat(value.path, function(err, stat) {
20894
-
20895
- var fileSize;
20896
-
20939
+ fs.stat(value.path, function (err, stat) {
20897
20940
  if (err) {
20898
20941
  callback(err);
20899
20942
  return;
20900
20943
  }
20901
20944
 
20902
20945
  // update final size based on the range options
20903
- fileSize = stat.size - (value.start ? value.start : 0);
20946
+ var fileSize = stat.size - (value.start ? value.start : 0);
20904
20947
  callback(null, fileSize);
20905
20948
  });
20906
20949
  }
20907
20950
 
20908
- // or http response
20909
- } else if (value.hasOwnProperty('httpVersion')) {
20910
- callback(null, +value.headers['content-length']);
20951
+ // or http response
20952
+ } else if (hasOwn(value, 'httpVersion')) {
20953
+ callback(null, Number(value.headers['content-length'])); // eslint-disable-line callback-return
20911
20954
 
20912
- // or request stream http://github.com/mikeal/request
20913
- } else if (value.hasOwnProperty('httpModule')) {
20955
+ // or request stream http://github.com/mikeal/request
20956
+ } else if (hasOwn(value, 'httpModule')) {
20914
20957
  // wait till response come back
20915
- value.on('response', function(response) {
20958
+ value.on('response', function (response) {
20916
20959
  value.pause();
20917
- callback(null, +response.headers['content-length']);
20960
+ callback(null, Number(response.headers['content-length']));
20918
20961
  });
20919
20962
  value.resume();
20920
20963
 
20921
- // something else
20964
+ // something else
20922
20965
  } else {
20923
- callback('Unknown stream');
20966
+ callback('Unknown stream'); // eslint-disable-line callback-return
20924
20967
  }
20925
20968
  };
20926
20969
 
20927
- FormData.prototype._multiPartHeader = function(field, value, options) {
20928
- // custom header specified (as string)?
20929
- // it becomes responsible for boundary
20930
- // (e.g. to handle extra CRLFs on .NET servers)
20931
- if (typeof options.header == 'string') {
20970
+ FormData.prototype._multiPartHeader = function (field, value, options) {
20971
+ /*
20972
+ * custom header specified (as string)?
20973
+ * it becomes responsible for boundary
20974
+ * (e.g. to handle extra CRLFs on .NET servers)
20975
+ */
20976
+ if (typeof options.header === 'string') {
20932
20977
  return options.header;
20933
20978
  }
20934
20979
 
@@ -20936,7 +20981,7 @@ FormData.prototype._multiPartHeader = function(field, value, options) {
20936
20981
  var contentType = this._getContentType(value, options);
20937
20982
 
20938
20983
  var contents = '';
20939
- var headers = {
20984
+ var headers = {
20940
20985
  // add custom disposition as third element or keep it two elements if not
20941
20986
  'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []),
20942
20987
  // if no content type. allow it to be empty array
@@ -20944,77 +20989,74 @@ FormData.prototype._multiPartHeader = function(field, value, options) {
20944
20989
  };
20945
20990
 
20946
20991
  // allow custom headers.
20947
- if (typeof options.header == 'object') {
20992
+ if (typeof options.header === 'object') {
20948
20993
  populate(headers, options.header);
20949
20994
  }
20950
20995
 
20951
20996
  var header;
20952
- for (var prop in headers) {
20953
- if (!headers.hasOwnProperty(prop)) continue;
20954
- header = headers[prop];
20997
+ for (var prop in headers) { // eslint-disable-line no-restricted-syntax
20998
+ if (hasOwn(headers, prop)) {
20999
+ header = headers[prop];
20955
21000
 
20956
- // skip nullish headers.
20957
- if (header == null) {
20958
- continue;
20959
- }
21001
+ // skip nullish headers.
21002
+ if (header == null) {
21003
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
21004
+ }
20960
21005
 
20961
- // convert all headers to arrays.
20962
- if (!Array.isArray(header)) {
20963
- header = [header];
20964
- }
21006
+ // convert all headers to arrays.
21007
+ if (!Array.isArray(header)) {
21008
+ header = [header];
21009
+ }
20965
21010
 
20966
- // add non-empty headers.
20967
- if (header.length) {
20968
- contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;
21011
+ // add non-empty headers.
21012
+ if (header.length) {
21013
+ contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;
21014
+ }
20969
21015
  }
20970
21016
  }
20971
21017
 
20972
21018
  return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK;
20973
21019
  };
20974
21020
 
20975
- FormData.prototype._getContentDisposition = function(value, options) {
20976
-
20977
- var filename
20978
- , contentDisposition
20979
- ;
21021
+ FormData.prototype._getContentDisposition = function (value, options) { // eslint-disable-line consistent-return
21022
+ var filename;
20980
21023
 
20981
21024
  if (typeof options.filepath === 'string') {
20982
21025
  // custom filepath for relative paths
20983
21026
  filename = path.normalize(options.filepath).replace(/\\/g, '/');
20984
- } else if (options.filename || value.name || value.path) {
20985
- // custom filename take precedence
20986
- // formidable and the browser add a name property
20987
- // fs- and request- streams have path property
20988
- filename = path.basename(options.filename || value.name || value.path);
20989
- } else if (value.readable && value.hasOwnProperty('httpVersion')) {
21027
+ } else if (options.filename || (value && (value.name || value.path))) {
21028
+ /*
21029
+ * custom filename take precedence
21030
+ * formidable and the browser add a name property
21031
+ * fs- and request- streams have path property
21032
+ */
21033
+ filename = path.basename(options.filename || (value && (value.name || value.path)));
21034
+ } else if (value && value.readable && hasOwn(value, 'httpVersion')) {
20990
21035
  // or try http response
20991
21036
  filename = path.basename(value.client._httpMessage.path || '');
20992
21037
  }
20993
21038
 
20994
21039
  if (filename) {
20995
- contentDisposition = 'filename="' + filename + '"';
21040
+ return 'filename="' + filename + '"';
20996
21041
  }
20997
-
20998
- return contentDisposition;
20999
21042
  };
21000
21043
 
21001
- FormData.prototype._getContentType = function(value, options) {
21002
-
21044
+ FormData.prototype._getContentType = function (value, options) {
21003
21045
  // use custom content-type above all
21004
21046
  var contentType = options.contentType;
21005
21047
 
21006
21048
  // or try `name` from formidable, browser
21007
- if (!contentType && value.name) {
21049
+ if (!contentType && value && value.name) {
21008
21050
  contentType = mime.lookup(value.name);
21009
21051
  }
21010
21052
 
21011
21053
  // or try `path` from fs-, request- streams
21012
- if (!contentType && value.path) {
21054
+ if (!contentType && value && value.path) {
21013
21055
  contentType = mime.lookup(value.path);
21014
21056
  }
21015
21057
 
21016
21058
  // or if it's http-reponse
21017
- if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) {
21059
+ if (!contentType && value && value.readable && hasOwn(value, 'httpVersion')) {
21018
21060
  contentType = value.headers['content-type'];
21019
21061
  }
21020
21062
 
@@ -21024,18 +21066,18 @@ FormData.prototype._getContentType = function(value, options) {
21024
21066
  }
21025
21067
 
21026
21068
  // fallback to the default content type if `value` is not simple value
21027
- if (!contentType && typeof value == 'object') {
21069
+ if (!contentType && value && typeof value === 'object') {
21028
21070
  contentType = FormData.DEFAULT_CONTENT_TYPE;
21029
21071
  }
21030
21072
 
21031
21073
  return contentType;
21032
21074
  };
21033
21075
 
21034
- FormData.prototype._multiPartFooter = function() {
21035
- return function(next) {
21076
+ FormData.prototype._multiPartFooter = function () {
21077
+ return function (next) {
21036
21078
  var footer = FormData.LINE_BREAK;
21037
21079
 
21038
- var lastPart = (this._streams.length === 0);
21080
+ var lastPart = this._streams.length === 0;
21039
21081
  if (lastPart) {
21040
21082
  footer += this._lastBoundary();
21041
21083
  }
@@ -21044,18 +21086,18 @@ FormData.prototype._multiPartFooter = function() {
21044
21086
  }.bind(this);
21045
21087
  };
21046
21088
 
21047
- FormData.prototype._lastBoundary = function() {
21089
+ FormData.prototype._lastBoundary = function () {
21048
21090
  return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK;
21049
21091
  };
21050
21092
 
21051
- FormData.prototype.getHeaders = function(userHeaders) {
21093
+ FormData.prototype.getHeaders = function (userHeaders) {
21052
21094
  var header;
21053
21095
  var formHeaders = {
21054
21096
  'content-type': 'multipart/form-data; boundary=' + this.getBoundary()
21055
21097
  };
21056
21098
 
21057
- for (header in userHeaders) {
21058
- if (userHeaders.hasOwnProperty(header)) {
21099
+ for (header in userHeaders) { // eslint-disable-line no-restricted-syntax
21100
+ if (hasOwn(userHeaders, header)) {
21059
21101
  formHeaders[header.toLowerCase()] = userHeaders[header];
21060
21102
  }
21061
21103
  }
@@ -21063,11 +21105,14 @@ FormData.prototype.getHeaders = function(userHeaders) {
21063
21105
  return formHeaders;
21064
21106
  };
21065
21107
 
21066
- FormData.prototype.setBoundary = function(boundary) {
21108
+ FormData.prototype.setBoundary = function (boundary) {
21109
+ if (typeof boundary !== 'string') {
21110
+ throw new TypeError('FormData boundary must be a string');
21111
+ }
21067
21112
  this._boundary = boundary;
21068
21113
  };
21069
21114
 
21070
- FormData.prototype.getBoundary = function() {
21115
+ FormData.prototype.getBoundary = function () {
21071
21116
  if (!this._boundary) {
21072
21117
  this._generateBoundary();
21073
21118
  }
@@ -21075,60 +21120,55 @@ FormData.prototype.getBoundary = function() {
21075
21120
  return this._boundary;
21076
21121
  };
21077
21122
 
21078
- FormData.prototype.getBuffer = function() {
21079
- var dataBuffer = new Buffer.alloc( 0 );
21123
+ FormData.prototype.getBuffer = function () {
21124
+ var dataBuffer = new Buffer.alloc(0); // eslint-disable-line new-cap
21080
21125
  var boundary = this.getBoundary();
21081
21126
 
21082
21127
  // Create the form content. Add Line breaks to the end of data.
21083
21128
  for (var i = 0, len = this._streams.length; i < len; i++) {
21084
21129
  if (typeof this._streams[i] !== 'function') {
21085
-
21086
21130
  // Add content to the buffer.
21087
- if(Buffer.isBuffer(this._streams[i])) {
21088
- dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]);
21089
- }else {
21090
- dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]);
21131
+ if (Buffer.isBuffer(this._streams[i])) {
21132
+ dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]);
21133
+ } else {
21134
+ dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]);
21091
21135
  }
21092
21136
 
21093
21137
  // Add break after content.
21094
- if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) {
21095
- dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] );
21138
+ if (typeof this._streams[i] !== 'string' || this._streams[i].substring(2, boundary.length + 2) !== boundary) {
21139
+ dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData.LINE_BREAK)]);
21096
21140
  }
21097
21141
  }
21098
21142
  }
21099
21143
 
21100
21144
  // Add the footer and return the Buffer object.
21101
- return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] );
21145
+ return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]);
21102
21146
  };
21103
21147
 
21104
- FormData.prototype._generateBoundary = function() {
21148
+ FormData.prototype._generateBoundary = function () {
21105
21149
  // This generates a 50 character boundary similar to those used by Firefox.
21106
- // They are optimized for boyer-moore parsing.
21107
- var boundary = '--------------------------';
21108
- for (var i = 0; i < 24; i++) {
21109
- boundary += Math.floor(Math.random() * 10).toString(16);
21110
- }
21111
21150
 
21112
- this._boundary = boundary;
21151
+ // They are optimized for boyer-moore parsing.
21152
+ this._boundary = '--------------------------' + crypto.randomBytes(12).toString('hex');
21113
21153
  };
21114
21154
 
21115
21155
  // Note: getLengthSync DOESN'T calculate streams length
21116
- // As workaround one can calculate file size manually
21117
- // and add it as knownLength option
21118
- FormData.prototype.getLengthSync = function() {
21156
+ // As workaround one can calculate file size manually and add it as knownLength option
21157
+ FormData.prototype.getLengthSync = function () {
21119
21158
  var knownLength = this._overheadLength + this._valueLength;
21120
21159
 
21121
- // Don't get confused, there are 3 "internal" streams for each keyval pair
21122
- // so it basically checks if there is any value added to the form
21160
+ // Don't get confused, there are 3 "internal" streams for each keyval pair so it basically checks if there is any value added to the form
21123
21161
  if (this._streams.length) {
21124
21162
  knownLength += this._lastBoundary().length;
21125
21163
  }
21126
21164
 
21127
21165
  // https://github.com/form-data/form-data/issues/40
21128
21166
  if (!this.hasKnownLength()) {
21129
- // Some async length retrievers are present
21130
- // therefore synchronous length calculation is false.
21131
- // Please use getLength(callback) to get proper length
21167
+ /*
21168
+ * Some async length retrievers are present
21169
+ * therefore synchronous length calculation is false.
21170
+ * Please use getLength(callback) to get proper length
21171
+ */
21132
21172
  this._error(new Error('Cannot calculate proper length in synchronous way.'));
21133
21173
  }
21134
21174
 
@@ -21138,7 +21178,7 @@ FormData.prototype.getLengthSync = function() {
21138
21178
  // Public API to check if length of added values is known
21139
21179
  // https://github.com/form-data/form-data/issues/196
21140
21180
  // https://github.com/form-data/form-data/issues/262
21141
- FormData.prototype.hasKnownLength = function() {
21181
+ FormData.prototype.hasKnownLength = function () {
21142
21182
  var hasKnownLength = true;
21143
21183
 
21144
21184
  if (this._valuesToMeasure.length) {
@@ -21148,7 +21188,7 @@ FormData.prototype.hasKnownLength = function() {
21148
21188
  return hasKnownLength;
21149
21189
  };
21150
21190
 
21151
- FormData.prototype.getLength = function(cb) {
21191
+ FormData.prototype.getLength = function (cb) {
21152
21192
  var knownLength = this._overheadLength + this._valueLength;
21153
21193
 
21154
21194
  if (this._streams.length) {
@@ -21160,13 +21200,13 @@ FormData.prototype.getLength = function(cb) {
21160
21200
  return;
21161
21201
  }
21162
21202
 
21163
- asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {
21203
+ asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function (err, values) {
21164
21204
  if (err) {
21165
21205
  cb(err);
21166
21206
  return;
21167
21207
  }
21168
21208
 
21169
- values.forEach(function(length) {
21209
+ values.forEach(function (length) {
21170
21210
  knownLength += length;
21171
21211
  });
21172
21212
 
@@ -21174,31 +21214,26 @@ FormData.prototype.getLength = function(cb) {
21174
21214
  });
21175
21215
  };
21176
21216
 
21177
- FormData.prototype.submit = function(params, cb) {
21178
- var request
21179
- , options
21180
- , defaults = {method: 'post'}
21181
- ;
21182
-
21183
- // parse provided url if it's string
21184
- // or treat it as options object
21185
- if (typeof params == 'string') {
21217
+ FormData.prototype.submit = function (params, cb) {
21218
+ var request;
21219
+ var options;
21220
+ var defaults = { method: 'post' };
21186
21221
 
21187
- params = parseUrl(params);
21222
+ // parse provided url if it's string or treat it as options object
21223
+ if (typeof params === 'string') {
21224
+ params = parseUrl(params); // eslint-disable-line no-param-reassign
21225
+ /* eslint sort-keys: 0 */
21188
21226
  options = populate({
21189
21227
  port: params.port,
21190
21228
  path: params.pathname,
21191
21229
  host: params.hostname,
21192
21230
  protocol: params.protocol
21193
21231
  }, defaults);
21194
-
21195
- // use custom params
21196
- } else {
21197
-
21232
+ } else { // use custom params
21198
21233
  options = populate(params, defaults);
21199
21234
  // if no port provided use default one
21200
21235
  if (!options.port) {
21201
- options.port = options.protocol == 'https:' ? 443 : 80;
21236
+ options.port = options.protocol === 'https:' ? 443 : 80;
21202
21237
  }
21203
21238
  }
21204
21239
 
@@ -21206,14 +21241,14 @@ FormData.prototype.submit = function(params, cb) {
21206
21241
  options.headers = this.getHeaders(params.headers);
21207
21242
 
21208
21243
  // https if specified, fallback to http in any other case
21209
- if (options.protocol == 'https:') {
21244
+ if (options.protocol === 'https:') {
21210
21245
  request = https.request(options);
21211
21246
  } else {
21212
21247
  request = http.request(options);
21213
21248
  }
21214
21249
 
21215
21250
  // get content length and fire away
21216
- this.getLength(function(err, length) {
21251
+ this.getLength(function (err, length) {
21217
21252
  if (err && err !== 'Unknown stream') {
21218
21253
  this._error(err);
21219
21254
  return;
@@ -21232,7 +21267,7 @@ FormData.prototype.submit = function(params, cb) {
21232
21267
  request.removeListener('error', callback);
21233
21268
  request.removeListener('response', onResponse);
21234
21269
 
21235
- return cb.call(this, error, responce);
21270
+ return cb.call(this, error, responce); // eslint-disable-line no-invalid-this
21236
21271
  };
21237
21272
 
21238
21273
  onResponse = callback.bind(this, null);
@@ -21245,7 +21280,7 @@ FormData.prototype.submit = function(params, cb) {
21245
21280
  return request;
21246
21281
  };
21247
21282
 
21248
- FormData.prototype._error = function(err) {
21283
+ FormData.prototype._error = function (err) {
21249
21284
  if (!this.error) {
21250
21285
  this.error = err;
21251
21286
  this.pause();
@@ -21256,6 +21291,10 @@ FormData.prototype._error = function(err) {
21256
21291
  FormData.prototype.toString = function () {
21257
21292
  return '[object FormData]';
21258
21293
  };
21294
+ setToStringTag(FormData, 'FormData');
21295
+
21296
+ // Public API
21297
+ module.exports = FormData;
21259
21298
 
21260
21299
 
21261
21300
  /***/ }),
@@ -21266,12 +21305,13 @@ FormData.prototype.toString = function () {
21266
21305
  \*************************************************/
21267
21306
  /***/ ((module) => {
21268
21307
 
21269
- // populates missing values
21270
- module.exports = function(dst, src) {
21308
+ "use strict";
21271
21309
 
21272
- Object.keys(src).forEach(function(prop)
21273
- {
21274
- dst[prop] = dst[prop] || src[prop];
21310
+
21311
+ // populates missing values
21312
+ module.exports = function (dst, src) {
21313
+ Object.keys(src).forEach(function (prop) {
21314
+ dst[prop] = dst[prop] || src[prop]; // eslint-disable-line no-param-reassign
21275
21315
  });
21276
21316
 
21277
21317
  return dst;
@@ -21988,6 +22028,25 @@ module.exports = function hasSymbols() {
21988
22028
  };
21989
22029
 
21990
22030
 
22031
+ /***/ }),
22032
+
22033
+ /***/ "../node_modules/has-tostringtag/shams.js":
22034
+ /*!************************************************!*\
22035
+ !*** ../node_modules/has-tostringtag/shams.js ***!
22036
+ \************************************************/
22037
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
22038
+
22039
+ "use strict";
22040
+
22041
+
22042
+ var hasSymbols = __webpack_require__(/*! has-symbols/shams */ "../node_modules/has-symbols/shams.js");
22043
+
22044
+ /** @type {import('.')} */
22045
+ module.exports = function hasToStringTagShams() {
22046
+ return hasSymbols() && !!Symbol.toStringTag;
22047
+ };
22048
+
22049
+
21991
22050
  /***/ }),
21992
22051
 
21993
22052
  /***/ "../node_modules/hasown/index.js":
@@ -26983,8 +27042,8 @@ class Axios {
26983
27042
 
26984
27043
  if (!synchronousRequestInterceptors) {
26985
27044
  const chain = [_dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].bind(this), undefined];
26986
- chain.unshift.apply(chain, requestInterceptorChain);
26987
- chain.push.apply(chain, responseInterceptorChain);
27045
+ chain.unshift(...requestInterceptorChain);
27046
+ chain.push(...responseInterceptorChain);
26988
27047
  len = chain.length;
26989
27048
 
26990
27049
  promise = Promise.resolve(config);
@@ -27863,7 +27922,7 @@ function mergeConfig(config1, config2) {
27863
27922
  headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
27864
27923
  };
27865
27924
 
27866
- _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
27925
+ _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
27867
27926
  const merge = mergeMap[prop] || mergeDeepProperties;
27868
27927
  const configValue = merge(config1[prop], config2[prop], prop);
27869
27928
  (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
@@ -28180,7 +28239,7 @@ __webpack_require__.r(__webpack_exports__);
28180
28239
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
28181
28240
  /* harmony export */ VERSION: () => (/* binding */ VERSION)
28182
28241
  /* harmony export */ });
28183
- const VERSION = "1.10.0";
28242
+ const VERSION = "1.11.0";
28184
28243
 
28185
28244
  /***/ }),
28186
28245
 
@@ -29656,7 +29715,7 @@ function throttle(fn, freq) {
29656
29715
  clearTimeout(timer);
29657
29716
  timer = null;
29658
29717
  }
29659
- fn.apply(null, args);
29718
+ fn(...args);
29660
29719
  }
29661
29720
 
29662
29721
  const throttled = (...args) => {
@@ -29947,7 +30006,7 @@ __webpack_require__.r(__webpack_exports__);
29947
30006
 
29948
30007
 
29949
30008
  function toURLEncodedForm(data, options) {
29950
- return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].classes.URLSearchParams(), Object.assign({
30009
+ return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].classes.URLSearchParams(), {
29951
30010
  visitor: function(value, key, path, helpers) {
29952
30011
  if (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isBuffer(value)) {
29953
30012
  this.append(key, value.toString('base64'));
@@ -29955,8 +30014,9 @@ function toURLEncodedForm(data, options) {
29955
30014
  }
29956
30015
 
29957
30016
  return helpers.defaultVisitor.apply(this, arguments);
29958
- }
29959
- }, options));
30017
+ },
30018
+ ...options
30019
+ });
29960
30020
  }
29961
30021
 
29962
30022
 
@@ -30515,6 +30575,27 @@ const isPlainObject = (val) => {
30515
30575
  return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
30516
30576
  }
30517
30577
 
30578
+ /**
30579
+ * Determine if a value is an empty object (safely handles Buffers)
30580
+ *
30581
+ * @param {*} val The value to test
30582
+ *
30583
+ * @returns {boolean} True if value is an empty object, otherwise false
30584
+ */
30585
+ const isEmptyObject = (val) => {
30586
+ // Early return for non-objects or Buffers to prevent RangeError
30587
+ if (!isObject(val) || isBuffer(val)) {
30588
+ return false;
30589
+ }
30590
+
30591
+ try {
30592
+ return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
30593
+ } catch (e) {
30594
+ // Fallback for any other objects that might cause RangeError with Object.keys()
30595
+ return false;
30596
+ }
30597
+ }
30598
+
30518
30599
  /**
30519
30600
  * Determine if a value is a Date
30520
30601
  *
@@ -30637,6 +30718,11 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
30637
30718
  fn.call(null, obj[i], i, obj);
30638
30719
  }
30639
30720
  } else {
30721
+ // Buffer check
30722
+ if (isBuffer(obj)) {
30723
+ return;
30724
+ }
30725
+
30640
30726
  // Iterate over object keys
30641
30727
  const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
30642
30728
  const len = keys.length;
@@ -30650,6 +30736,10 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
30650
30736
  }
30651
30737
 
30652
30738
  function findKey(obj, key) {
30739
+ if (isBuffer(obj)){
30740
+ return null;
30741
+ }
30742
+
30653
30743
  key = key.toLowerCase();
30654
30744
  const keys = Object.keys(obj);
30655
30745
  let i = keys.length;
@@ -31003,6 +31093,11 @@ const toJSONObject = (obj) => {
31003
31093
  return;
31004
31094
  }
31005
31095
 
31096
+ //Buffer check
31097
+ if (isBuffer(source)) {
31098
+ return source;
31099
+ }
31100
+
31006
31101
  if(!('toJSON' in source)) {
31007
31102
  stack[i] = source;
31008
31103
  const target = isArray(source) ? [] : {};
@@ -31074,6 +31169,7 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
31074
31169
  isBoolean,
31075
31170
  isObject,
31076
31171
  isPlainObject,
31172
+ isEmptyObject,
31077
31173
  isReadableStream,
31078
31174
  isRequest,
31079
31175
  isResponse,
@@ -32585,7 +32681,7 @@ function createClient(params, opts = {}) {
32585
32681
  const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
32586
32682
  const userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(
32587
32683
  // @ts-expect-error
32588
- `${sdkMain}/${"11.54.2"}`, params.application, params.integration, params.feature);
32684
+ `${sdkMain}/${"11.54.4"}`, params.application, params.integration, params.feature);
32589
32685
  const adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
32590
32686
  userAgent
32591
32687
  }));