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