contentful-management 11.55.0-canary.1 → 11.55.0-canary.3

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.
@@ -3489,6 +3489,7 @@ const queryForRelease = (http, params) => {
3489
3489
  "use strict";
3490
3490
  __webpack_require__.r(__webpack_exports__);
3491
3491
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3492
+ /* harmony export */ createWithId: () => (/* binding */ createWithId),
3492
3493
  /* harmony export */ get: () => (/* binding */ get),
3493
3494
  /* harmony export */ getMany: () => (/* binding */ getMany),
3494
3495
  /* harmony export */ patch: () => (/* binding */ patch),
@@ -3537,6 +3538,17 @@ const patch = (http, params, data, headers) => {
3537
3538
  }, headers)
3538
3539
  });
3539
3540
  };
3541
+ const createWithId = (http, params, rawData, headers) => {
3542
+ params.query = _objectSpread(_objectSpread({}, params.query), {}, {
3543
+ 'sys.schemaVersion': 'Release.V2'
3544
+ });
3545
+ const data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(rawData);
3546
+ return _raw__WEBPACK_IMPORTED_MODULE_1__.put(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/entries/${params.entryId}`, data, {
3547
+ headers: _objectSpread({
3548
+ 'X-Contentful-Content-Type': params.contentTypeId
3549
+ }, headers)
3550
+ });
3551
+ };
3540
3552
 
3541
3553
  /***/ }),
3542
3554
 
@@ -18316,7 +18328,8 @@ const createPlainClient = (makeRequest, defaults) => {
18316
18328
  get: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'get'),
18317
18329
  getMany: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'getMany'),
18318
18330
  update: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'update'),
18319
- patch: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'patch')
18331
+ patch: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'patch'),
18332
+ createWithId: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'createWithId')
18320
18333
  },
18321
18334
  archive: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Release', 'archive'),
18322
18335
  get: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Release', 'get'),
@@ -20128,6 +20141,52 @@ module.exports = URIError;
20128
20141
  module.exports = Object;
20129
20142
 
20130
20143
 
20144
+ /***/ }),
20145
+
20146
+ /***/ "../node_modules/es-set-tostringtag/index.js":
20147
+ /*!***************************************************!*\
20148
+ !*** ../node_modules/es-set-tostringtag/index.js ***!
20149
+ \***************************************************/
20150
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
20151
+
20152
+ "use strict";
20153
+
20154
+
20155
+ var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "../node_modules/get-intrinsic/index.js");
20156
+
20157
+ var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
20158
+
20159
+ var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ "../node_modules/has-tostringtag/shams.js")();
20160
+ var hasOwn = __webpack_require__(/*! hasown */ "../node_modules/hasown/index.js");
20161
+ var $TypeError = __webpack_require__(/*! es-errors/type */ "../node_modules/es-errors/type.js");
20162
+
20163
+ var toStringTag = hasToStringTag ? Symbol.toStringTag : null;
20164
+
20165
+ /** @type {import('.')} */
20166
+ module.exports = function setToStringTag(object, value) {
20167
+ var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force;
20168
+ var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;
20169
+ if (
20170
+ (typeof overrideIfSet !== 'undefined' && typeof overrideIfSet !== 'boolean')
20171
+ || (typeof nonConfigurable !== 'undefined' && typeof nonConfigurable !== 'boolean')
20172
+ ) {
20173
+ throw new $TypeError('if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans');
20174
+ }
20175
+ if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) {
20176
+ if ($defineProperty) {
20177
+ $defineProperty(object, toStringTag, {
20178
+ configurable: !nonConfigurable,
20179
+ enumerable: false,
20180
+ value: value,
20181
+ writable: false
20182
+ });
20183
+ } else {
20184
+ object[toStringTag] = value; // eslint-disable-line no-param-reassign
20185
+ }
20186
+ }
20187
+ };
20188
+
20189
+
20131
20190
  /***/ }),
20132
20191
 
20133
20192
  /***/ "../node_modules/follow-redirects/debug.js":
@@ -20857,6 +20916,9 @@ module.exports.wrap = wrap;
20857
20916
  \**************************************************/
20858
20917
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
20859
20918
 
20919
+ "use strict";
20920
+
20921
+
20860
20922
  var CombinedStream = __webpack_require__(/*! combined-stream */ "../node_modules/combined-stream/lib/combined_stream.js");
20861
20923
  var util = __webpack_require__(/*! util */ "util");
20862
20924
  var path = __webpack_require__(/*! path */ "path");
@@ -20865,23 +20927,20 @@ var https = __webpack_require__(/*! https */ "https");
20865
20927
  var parseUrl = (__webpack_require__(/*! url */ "url").parse);
20866
20928
  var fs = __webpack_require__(/*! fs */ "fs");
20867
20929
  var Stream = (__webpack_require__(/*! stream */ "stream").Stream);
20930
+ var crypto = __webpack_require__(/*! crypto */ "crypto");
20868
20931
  var mime = __webpack_require__(/*! mime-types */ "../node_modules/mime-types/index.js");
20869
20932
  var asynckit = __webpack_require__(/*! asynckit */ "../node_modules/asynckit/index.js");
20933
+ var setToStringTag = __webpack_require__(/*! es-set-tostringtag */ "../node_modules/es-set-tostringtag/index.js");
20934
+ var hasOwn = __webpack_require__(/*! hasown */ "../node_modules/hasown/index.js");
20870
20935
  var populate = __webpack_require__(/*! ./populate.js */ "../node_modules/form-data/lib/populate.js");
20871
20936
 
20872
- // Public API
20873
- module.exports = FormData;
20874
-
20875
- // make it a Stream
20876
- util.inherits(FormData, CombinedStream);
20877
-
20878
20937
  /**
20879
20938
  * Create readable "multipart/form-data" streams.
20880
20939
  * Can be used to submit forms
20881
20940
  * and file uploads to other web applications.
20882
20941
  *
20883
20942
  * @constructor
20884
- * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream
20943
+ * @param {object} options - Properties to be added/overriden for FormData and CombinedStream
20885
20944
  */
20886
20945
  function FormData(options) {
20887
20946
  if (!(this instanceof FormData)) {
@@ -20894,35 +20953,39 @@ function FormData(options) {
20894
20953
 
20895
20954
  CombinedStream.call(this);
20896
20955
 
20897
- options = options || {};
20898
- for (var option in options) {
20956
+ options = options || {}; // eslint-disable-line no-param-reassign
20957
+ for (var option in options) { // eslint-disable-line no-restricted-syntax
20899
20958
  this[option] = options[option];
20900
20959
  }
20901
20960
  }
20902
20961
 
20962
+ // make it a Stream
20963
+ util.inherits(FormData, CombinedStream);
20964
+
20903
20965
  FormData.LINE_BREAK = '\r\n';
20904
20966
  FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream';
20905
20967
 
20906
- FormData.prototype.append = function(field, value, options) {
20907
-
20908
- options = options || {};
20968
+ FormData.prototype.append = function (field, value, options) {
20969
+ options = options || {}; // eslint-disable-line no-param-reassign
20909
20970
 
20910
20971
  // allow filename as single option
20911
- if (typeof options == 'string') {
20912
- options = {filename: options};
20972
+ if (typeof options === 'string') {
20973
+ options = { filename: options }; // eslint-disable-line no-param-reassign
20913
20974
  }
20914
20975
 
20915
20976
  var append = CombinedStream.prototype.append.bind(this);
20916
20977
 
20917
20978
  // all that streamy business can't handle numbers
20918
- if (typeof value == 'number') {
20919
- value = '' + value;
20979
+ if (typeof value === 'number' || value == null) {
20980
+ value = String(value); // eslint-disable-line no-param-reassign
20920
20981
  }
20921
20982
 
20922
20983
  // https://github.com/felixge/node-form-data/issues/38
20923
20984
  if (Array.isArray(value)) {
20924
- // Please convert your array into string
20925
- // the way web server expects it
20985
+ /*
20986
+ * Please convert your array into string
20987
+ * the way web server expects it
20988
+ */
20926
20989
  this._error(new Error('Arrays are not supported.'));
20927
20990
  return;
20928
20991
  }
@@ -20938,15 +21001,17 @@ FormData.prototype.append = function(field, value, options) {
20938
21001
  this._trackLength(header, value, options);
20939
21002
  };
20940
21003
 
20941
- FormData.prototype._trackLength = function(header, value, options) {
21004
+ FormData.prototype._trackLength = function (header, value, options) {
20942
21005
  var valueLength = 0;
20943
21006
 
20944
- // used w/ getLengthSync(), when length is known.
20945
- // e.g. for streaming directly from a remote server,
20946
- // w/ a known file a size, and not wanting to wait for
20947
- // incoming file to finish to get its size.
21007
+ /*
21008
+ * used w/ getLengthSync(), when length is known.
21009
+ * e.g. for streaming directly from a remote server,
21010
+ * w/ a known file a size, and not wanting to wait for
21011
+ * incoming file to finish to get its size.
21012
+ */
20948
21013
  if (options.knownLength != null) {
20949
- valueLength += +options.knownLength;
21014
+ valueLength += Number(options.knownLength);
20950
21015
  } else if (Buffer.isBuffer(value)) {
20951
21016
  valueLength = value.length;
20952
21017
  } else if (typeof value === 'string') {
@@ -20956,12 +21021,10 @@ FormData.prototype._trackLength = function(header, value, options) {
20956
21021
  this._valueLength += valueLength;
20957
21022
 
20958
21023
  // @check why add CRLF? does this account for custom/multiple CRLFs?
20959
- this._overheadLength +=
20960
- Buffer.byteLength(header) +
20961
- FormData.LINE_BREAK.length;
21024
+ this._overheadLength += Buffer.byteLength(header) + FormData.LINE_BREAK.length;
20962
21025
 
20963
21026
  // empty or either doesn't have path or not an http response or not a stream
20964
- if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) {
21027
+ if (!value || (!value.path && !(value.readable && hasOwn(value, 'httpVersion')) && !(value instanceof Stream))) {
20965
21028
  return;
20966
21029
  }
20967
21030
 
@@ -20971,10 +21034,8 @@ FormData.prototype._trackLength = function(header, value, options) {
20971
21034
  }
20972
21035
  };
20973
21036
 
20974
- FormData.prototype._lengthRetriever = function(value, callback) {
20975
-
20976
- if (value.hasOwnProperty('fd')) {
20977
-
21037
+ FormData.prototype._lengthRetriever = function (value, callback) {
21038
+ if (hasOwn(value, 'fd')) {
20978
21039
  // take read range into a account
20979
21040
  // `end` = Infinity –> read file till the end
20980
21041
  //
@@ -20983,54 +21044,52 @@ FormData.prototype._lengthRetriever = function(value, callback) {
20983
21044
  // Fix it when node fixes it.
20984
21045
  // https://github.com/joyent/node/issues/7819
20985
21046
  if (value.end != undefined && value.end != Infinity && value.start != undefined) {
20986
-
20987
21047
  // when end specified
20988
21048
  // no need to calculate range
20989
21049
  // inclusive, starts with 0
20990
- callback(null, value.end + 1 - (value.start ? value.start : 0));
21050
+ callback(null, value.end + 1 - (value.start ? value.start : 0)); // eslint-disable-line callback-return
20991
21051
 
20992
- // not that fast snoopy
21052
+ // not that fast snoopy
20993
21053
  } else {
20994
21054
  // still need to fetch file size from fs
20995
- fs.stat(value.path, function(err, stat) {
20996
-
20997
- var fileSize;
20998
-
21055
+ fs.stat(value.path, function (err, stat) {
20999
21056
  if (err) {
21000
21057
  callback(err);
21001
21058
  return;
21002
21059
  }
21003
21060
 
21004
21061
  // update final size based on the range options
21005
- fileSize = stat.size - (value.start ? value.start : 0);
21062
+ var fileSize = stat.size - (value.start ? value.start : 0);
21006
21063
  callback(null, fileSize);
21007
21064
  });
21008
21065
  }
21009
21066
 
21010
- // or http response
21011
- } else if (value.hasOwnProperty('httpVersion')) {
21012
- callback(null, +value.headers['content-length']);
21067
+ // or http response
21068
+ } else if (hasOwn(value, 'httpVersion')) {
21069
+ callback(null, Number(value.headers['content-length'])); // eslint-disable-line callback-return
21013
21070
 
21014
- // or request stream http://github.com/mikeal/request
21015
- } else if (value.hasOwnProperty('httpModule')) {
21071
+ // or request stream http://github.com/mikeal/request
21072
+ } else if (hasOwn(value, 'httpModule')) {
21016
21073
  // wait till response come back
21017
- value.on('response', function(response) {
21074
+ value.on('response', function (response) {
21018
21075
  value.pause();
21019
- callback(null, +response.headers['content-length']);
21076
+ callback(null, Number(response.headers['content-length']));
21020
21077
  });
21021
21078
  value.resume();
21022
21079
 
21023
- // something else
21080
+ // something else
21024
21081
  } else {
21025
- callback('Unknown stream');
21082
+ callback('Unknown stream'); // eslint-disable-line callback-return
21026
21083
  }
21027
21084
  };
21028
21085
 
21029
- FormData.prototype._multiPartHeader = function(field, value, options) {
21030
- // custom header specified (as string)?
21031
- // it becomes responsible for boundary
21032
- // (e.g. to handle extra CRLFs on .NET servers)
21033
- if (typeof options.header == 'string') {
21086
+ FormData.prototype._multiPartHeader = function (field, value, options) {
21087
+ /*
21088
+ * custom header specified (as string)?
21089
+ * it becomes responsible for boundary
21090
+ * (e.g. to handle extra CRLFs on .NET servers)
21091
+ */
21092
+ if (typeof options.header === 'string') {
21034
21093
  return options.header;
21035
21094
  }
21036
21095
 
@@ -21038,7 +21097,7 @@ FormData.prototype._multiPartHeader = function(field, value, options) {
21038
21097
  var contentType = this._getContentType(value, options);
21039
21098
 
21040
21099
  var contents = '';
21041
- var headers = {
21100
+ var headers = {
21042
21101
  // add custom disposition as third element or keep it two elements if not
21043
21102
  'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []),
21044
21103
  // if no content type. allow it to be empty array
@@ -21046,77 +21105,74 @@ FormData.prototype._multiPartHeader = function(field, value, options) {
21046
21105
  };
21047
21106
 
21048
21107
  // allow custom headers.
21049
- if (typeof options.header == 'object') {
21108
+ if (typeof options.header === 'object') {
21050
21109
  populate(headers, options.header);
21051
21110
  }
21052
21111
 
21053
21112
  var header;
21054
- for (var prop in headers) {
21055
- if (!headers.hasOwnProperty(prop)) continue;
21056
- header = headers[prop];
21113
+ for (var prop in headers) { // eslint-disable-line no-restricted-syntax
21114
+ if (hasOwn(headers, prop)) {
21115
+ header = headers[prop];
21057
21116
 
21058
- // skip nullish headers.
21059
- if (header == null) {
21060
- continue;
21061
- }
21117
+ // skip nullish headers.
21118
+ if (header == null) {
21119
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
21120
+ }
21062
21121
 
21063
- // convert all headers to arrays.
21064
- if (!Array.isArray(header)) {
21065
- header = [header];
21066
- }
21122
+ // convert all headers to arrays.
21123
+ if (!Array.isArray(header)) {
21124
+ header = [header];
21125
+ }
21067
21126
 
21068
- // add non-empty headers.
21069
- if (header.length) {
21070
- contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;
21127
+ // add non-empty headers.
21128
+ if (header.length) {
21129
+ contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;
21130
+ }
21071
21131
  }
21072
21132
  }
21073
21133
 
21074
21134
  return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK;
21075
21135
  };
21076
21136
 
21077
- FormData.prototype._getContentDisposition = function(value, options) {
21078
-
21079
- var filename
21080
- , contentDisposition
21081
- ;
21137
+ FormData.prototype._getContentDisposition = function (value, options) { // eslint-disable-line consistent-return
21138
+ var filename;
21082
21139
 
21083
21140
  if (typeof options.filepath === 'string') {
21084
21141
  // custom filepath for relative paths
21085
21142
  filename = path.normalize(options.filepath).replace(/\\/g, '/');
21086
- } else if (options.filename || value.name || value.path) {
21087
- // custom filename take precedence
21088
- // formidable and the browser add a name property
21089
- // fs- and request- streams have path property
21090
- filename = path.basename(options.filename || value.name || value.path);
21091
- } else if (value.readable && value.hasOwnProperty('httpVersion')) {
21143
+ } else if (options.filename || (value && (value.name || value.path))) {
21144
+ /*
21145
+ * custom filename take precedence
21146
+ * formidable and the browser add a name property
21147
+ * fs- and request- streams have path property
21148
+ */
21149
+ filename = path.basename(options.filename || (value && (value.name || value.path)));
21150
+ } else if (value && value.readable && hasOwn(value, 'httpVersion')) {
21092
21151
  // or try http response
21093
21152
  filename = path.basename(value.client._httpMessage.path || '');
21094
21153
  }
21095
21154
 
21096
21155
  if (filename) {
21097
- contentDisposition = 'filename="' + filename + '"';
21156
+ return 'filename="' + filename + '"';
21098
21157
  }
21099
-
21100
- return contentDisposition;
21101
21158
  };
21102
21159
 
21103
- FormData.prototype._getContentType = function(value, options) {
21104
-
21160
+ FormData.prototype._getContentType = function (value, options) {
21105
21161
  // use custom content-type above all
21106
21162
  var contentType = options.contentType;
21107
21163
 
21108
21164
  // or try `name` from formidable, browser
21109
- if (!contentType && value.name) {
21165
+ if (!contentType && value && value.name) {
21110
21166
  contentType = mime.lookup(value.name);
21111
21167
  }
21112
21168
 
21113
21169
  // or try `path` from fs-, request- streams
21114
- if (!contentType && value.path) {
21170
+ if (!contentType && value && value.path) {
21115
21171
  contentType = mime.lookup(value.path);
21116
21172
  }
21117
21173
 
21118
21174
  // or if it's http-reponse
21119
- if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) {
21175
+ if (!contentType && value && value.readable && hasOwn(value, 'httpVersion')) {
21120
21176
  contentType = value.headers['content-type'];
21121
21177
  }
21122
21178
 
@@ -21126,18 +21182,18 @@ FormData.prototype._getContentType = function(value, options) {
21126
21182
  }
21127
21183
 
21128
21184
  // fallback to the default content type if `value` is not simple value
21129
- if (!contentType && typeof value == 'object') {
21185
+ if (!contentType && value && typeof value === 'object') {
21130
21186
  contentType = FormData.DEFAULT_CONTENT_TYPE;
21131
21187
  }
21132
21188
 
21133
21189
  return contentType;
21134
21190
  };
21135
21191
 
21136
- FormData.prototype._multiPartFooter = function() {
21137
- return function(next) {
21192
+ FormData.prototype._multiPartFooter = function () {
21193
+ return function (next) {
21138
21194
  var footer = FormData.LINE_BREAK;
21139
21195
 
21140
- var lastPart = (this._streams.length === 0);
21196
+ var lastPart = this._streams.length === 0;
21141
21197
  if (lastPart) {
21142
21198
  footer += this._lastBoundary();
21143
21199
  }
@@ -21146,18 +21202,18 @@ FormData.prototype._multiPartFooter = function() {
21146
21202
  }.bind(this);
21147
21203
  };
21148
21204
 
21149
- FormData.prototype._lastBoundary = function() {
21205
+ FormData.prototype._lastBoundary = function () {
21150
21206
  return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK;
21151
21207
  };
21152
21208
 
21153
- FormData.prototype.getHeaders = function(userHeaders) {
21209
+ FormData.prototype.getHeaders = function (userHeaders) {
21154
21210
  var header;
21155
21211
  var formHeaders = {
21156
21212
  'content-type': 'multipart/form-data; boundary=' + this.getBoundary()
21157
21213
  };
21158
21214
 
21159
- for (header in userHeaders) {
21160
- if (userHeaders.hasOwnProperty(header)) {
21215
+ for (header in userHeaders) { // eslint-disable-line no-restricted-syntax
21216
+ if (hasOwn(userHeaders, header)) {
21161
21217
  formHeaders[header.toLowerCase()] = userHeaders[header];
21162
21218
  }
21163
21219
  }
@@ -21165,11 +21221,14 @@ FormData.prototype.getHeaders = function(userHeaders) {
21165
21221
  return formHeaders;
21166
21222
  };
21167
21223
 
21168
- FormData.prototype.setBoundary = function(boundary) {
21224
+ FormData.prototype.setBoundary = function (boundary) {
21225
+ if (typeof boundary !== 'string') {
21226
+ throw new TypeError('FormData boundary must be a string');
21227
+ }
21169
21228
  this._boundary = boundary;
21170
21229
  };
21171
21230
 
21172
- FormData.prototype.getBoundary = function() {
21231
+ FormData.prototype.getBoundary = function () {
21173
21232
  if (!this._boundary) {
21174
21233
  this._generateBoundary();
21175
21234
  }
@@ -21177,60 +21236,55 @@ FormData.prototype.getBoundary = function() {
21177
21236
  return this._boundary;
21178
21237
  };
21179
21238
 
21180
- FormData.prototype.getBuffer = function() {
21181
- var dataBuffer = new Buffer.alloc( 0 );
21239
+ FormData.prototype.getBuffer = function () {
21240
+ var dataBuffer = new Buffer.alloc(0); // eslint-disable-line new-cap
21182
21241
  var boundary = this.getBoundary();
21183
21242
 
21184
21243
  // Create the form content. Add Line breaks to the end of data.
21185
21244
  for (var i = 0, len = this._streams.length; i < len; i++) {
21186
21245
  if (typeof this._streams[i] !== 'function') {
21187
-
21188
21246
  // Add content to the buffer.
21189
- if(Buffer.isBuffer(this._streams[i])) {
21190
- dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]);
21191
- }else {
21192
- dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]);
21247
+ if (Buffer.isBuffer(this._streams[i])) {
21248
+ dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]);
21249
+ } else {
21250
+ dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]);
21193
21251
  }
21194
21252
 
21195
21253
  // Add break after content.
21196
- if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) {
21197
- dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] );
21254
+ if (typeof this._streams[i] !== 'string' || this._streams[i].substring(2, boundary.length + 2) !== boundary) {
21255
+ dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData.LINE_BREAK)]);
21198
21256
  }
21199
21257
  }
21200
21258
  }
21201
21259
 
21202
21260
  // Add the footer and return the Buffer object.
21203
- return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] );
21261
+ return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]);
21204
21262
  };
21205
21263
 
21206
- FormData.prototype._generateBoundary = function() {
21264
+ FormData.prototype._generateBoundary = function () {
21207
21265
  // This generates a 50 character boundary similar to those used by Firefox.
21208
- // They are optimized for boyer-moore parsing.
21209
- var boundary = '--------------------------';
21210
- for (var i = 0; i < 24; i++) {
21211
- boundary += Math.floor(Math.random() * 10).toString(16);
21212
- }
21213
21266
 
21214
- this._boundary = boundary;
21267
+ // They are optimized for boyer-moore parsing.
21268
+ this._boundary = '--------------------------' + crypto.randomBytes(12).toString('hex');
21215
21269
  };
21216
21270
 
21217
21271
  // Note: getLengthSync DOESN'T calculate streams length
21218
- // As workaround one can calculate file size manually
21219
- // and add it as knownLength option
21220
- FormData.prototype.getLengthSync = function() {
21272
+ // As workaround one can calculate file size manually and add it as knownLength option
21273
+ FormData.prototype.getLengthSync = function () {
21221
21274
  var knownLength = this._overheadLength + this._valueLength;
21222
21275
 
21223
- // Don't get confused, there are 3 "internal" streams for each keyval pair
21224
- // so it basically checks if there is any value added to the form
21276
+ // 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
21225
21277
  if (this._streams.length) {
21226
21278
  knownLength += this._lastBoundary().length;
21227
21279
  }
21228
21280
 
21229
21281
  // https://github.com/form-data/form-data/issues/40
21230
21282
  if (!this.hasKnownLength()) {
21231
- // Some async length retrievers are present
21232
- // therefore synchronous length calculation is false.
21233
- // Please use getLength(callback) to get proper length
21283
+ /*
21284
+ * Some async length retrievers are present
21285
+ * therefore synchronous length calculation is false.
21286
+ * Please use getLength(callback) to get proper length
21287
+ */
21234
21288
  this._error(new Error('Cannot calculate proper length in synchronous way.'));
21235
21289
  }
21236
21290
 
@@ -21240,7 +21294,7 @@ FormData.prototype.getLengthSync = function() {
21240
21294
  // Public API to check if length of added values is known
21241
21295
  // https://github.com/form-data/form-data/issues/196
21242
21296
  // https://github.com/form-data/form-data/issues/262
21243
- FormData.prototype.hasKnownLength = function() {
21297
+ FormData.prototype.hasKnownLength = function () {
21244
21298
  var hasKnownLength = true;
21245
21299
 
21246
21300
  if (this._valuesToMeasure.length) {
@@ -21250,7 +21304,7 @@ FormData.prototype.hasKnownLength = function() {
21250
21304
  return hasKnownLength;
21251
21305
  };
21252
21306
 
21253
- FormData.prototype.getLength = function(cb) {
21307
+ FormData.prototype.getLength = function (cb) {
21254
21308
  var knownLength = this._overheadLength + this._valueLength;
21255
21309
 
21256
21310
  if (this._streams.length) {
@@ -21262,13 +21316,13 @@ FormData.prototype.getLength = function(cb) {
21262
21316
  return;
21263
21317
  }
21264
21318
 
21265
- asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {
21319
+ asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function (err, values) {
21266
21320
  if (err) {
21267
21321
  cb(err);
21268
21322
  return;
21269
21323
  }
21270
21324
 
21271
- values.forEach(function(length) {
21325
+ values.forEach(function (length) {
21272
21326
  knownLength += length;
21273
21327
  });
21274
21328
 
@@ -21276,31 +21330,26 @@ FormData.prototype.getLength = function(cb) {
21276
21330
  });
21277
21331
  };
21278
21332
 
21279
- FormData.prototype.submit = function(params, cb) {
21280
- var request
21281
- , options
21282
- , defaults = {method: 'post'}
21283
- ;
21284
-
21285
- // parse provided url if it's string
21286
- // or treat it as options object
21287
- if (typeof params == 'string') {
21333
+ FormData.prototype.submit = function (params, cb) {
21334
+ var request;
21335
+ var options;
21336
+ var defaults = { method: 'post' };
21288
21337
 
21289
- params = parseUrl(params);
21338
+ // parse provided url if it's string or treat it as options object
21339
+ if (typeof params === 'string') {
21340
+ params = parseUrl(params); // eslint-disable-line no-param-reassign
21341
+ /* eslint sort-keys: 0 */
21290
21342
  options = populate({
21291
21343
  port: params.port,
21292
21344
  path: params.pathname,
21293
21345
  host: params.hostname,
21294
21346
  protocol: params.protocol
21295
21347
  }, defaults);
21296
-
21297
- // use custom params
21298
- } else {
21299
-
21348
+ } else { // use custom params
21300
21349
  options = populate(params, defaults);
21301
21350
  // if no port provided use default one
21302
21351
  if (!options.port) {
21303
- options.port = options.protocol == 'https:' ? 443 : 80;
21352
+ options.port = options.protocol === 'https:' ? 443 : 80;
21304
21353
  }
21305
21354
  }
21306
21355
 
@@ -21308,14 +21357,14 @@ FormData.prototype.submit = function(params, cb) {
21308
21357
  options.headers = this.getHeaders(params.headers);
21309
21358
 
21310
21359
  // https if specified, fallback to http in any other case
21311
- if (options.protocol == 'https:') {
21360
+ if (options.protocol === 'https:') {
21312
21361
  request = https.request(options);
21313
21362
  } else {
21314
21363
  request = http.request(options);
21315
21364
  }
21316
21365
 
21317
21366
  // get content length and fire away
21318
- this.getLength(function(err, length) {
21367
+ this.getLength(function (err, length) {
21319
21368
  if (err && err !== 'Unknown stream') {
21320
21369
  this._error(err);
21321
21370
  return;
@@ -21334,7 +21383,7 @@ FormData.prototype.submit = function(params, cb) {
21334
21383
  request.removeListener('error', callback);
21335
21384
  request.removeListener('response', onResponse);
21336
21385
 
21337
- return cb.call(this, error, responce);
21386
+ return cb.call(this, error, responce); // eslint-disable-line no-invalid-this
21338
21387
  };
21339
21388
 
21340
21389
  onResponse = callback.bind(this, null);
@@ -21347,7 +21396,7 @@ FormData.prototype.submit = function(params, cb) {
21347
21396
  return request;
21348
21397
  };
21349
21398
 
21350
- FormData.prototype._error = function(err) {
21399
+ FormData.prototype._error = function (err) {
21351
21400
  if (!this.error) {
21352
21401
  this.error = err;
21353
21402
  this.pause();
@@ -21358,6 +21407,10 @@ FormData.prototype._error = function(err) {
21358
21407
  FormData.prototype.toString = function () {
21359
21408
  return '[object FormData]';
21360
21409
  };
21410
+ setToStringTag(FormData, 'FormData');
21411
+
21412
+ // Public API
21413
+ module.exports = FormData;
21361
21414
 
21362
21415
 
21363
21416
  /***/ }),
@@ -21368,12 +21421,13 @@ FormData.prototype.toString = function () {
21368
21421
  \*************************************************/
21369
21422
  /***/ ((module) => {
21370
21423
 
21371
- // populates missing values
21372
- module.exports = function(dst, src) {
21424
+ "use strict";
21373
21425
 
21374
- Object.keys(src).forEach(function(prop)
21375
- {
21376
- dst[prop] = dst[prop] || src[prop];
21426
+
21427
+ // populates missing values
21428
+ module.exports = function (dst, src) {
21429
+ Object.keys(src).forEach(function (prop) {
21430
+ dst[prop] = dst[prop] || src[prop]; // eslint-disable-line no-param-reassign
21377
21431
  });
21378
21432
 
21379
21433
  return dst;
@@ -22090,6 +22144,25 @@ module.exports = function hasSymbols() {
22090
22144
  };
22091
22145
 
22092
22146
 
22147
+ /***/ }),
22148
+
22149
+ /***/ "../node_modules/has-tostringtag/shams.js":
22150
+ /*!************************************************!*\
22151
+ !*** ../node_modules/has-tostringtag/shams.js ***!
22152
+ \************************************************/
22153
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
22154
+
22155
+ "use strict";
22156
+
22157
+
22158
+ var hasSymbols = __webpack_require__(/*! has-symbols/shams */ "../node_modules/has-symbols/shams.js");
22159
+
22160
+ /** @type {import('.')} */
22161
+ module.exports = function hasToStringTagShams() {
22162
+ return hasSymbols() && !!Symbol.toStringTag;
22163
+ };
22164
+
22165
+
22093
22166
  /***/ }),
22094
22167
 
22095
22168
  /***/ "../node_modules/hasown/index.js":
@@ -27085,8 +27158,8 @@ class Axios {
27085
27158
 
27086
27159
  if (!synchronousRequestInterceptors) {
27087
27160
  const chain = [_dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].bind(this), undefined];
27088
- chain.unshift.apply(chain, requestInterceptorChain);
27089
- chain.push.apply(chain, responseInterceptorChain);
27161
+ chain.unshift(...requestInterceptorChain);
27162
+ chain.push(...responseInterceptorChain);
27090
27163
  len = chain.length;
27091
27164
 
27092
27165
  promise = Promise.resolve(config);
@@ -27965,7 +28038,7 @@ function mergeConfig(config1, config2) {
27965
28038
  headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
27966
28039
  };
27967
28040
 
27968
- _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
28041
+ _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
27969
28042
  const merge = mergeMap[prop] || mergeDeepProperties;
27970
28043
  const configValue = merge(config1[prop], config2[prop], prop);
27971
28044
  (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
@@ -28282,7 +28355,7 @@ __webpack_require__.r(__webpack_exports__);
28282
28355
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
28283
28356
  /* harmony export */ VERSION: () => (/* binding */ VERSION)
28284
28357
  /* harmony export */ });
28285
- const VERSION = "1.10.0";
28358
+ const VERSION = "1.11.0";
28286
28359
 
28287
28360
  /***/ }),
28288
28361
 
@@ -29758,7 +29831,7 @@ function throttle(fn, freq) {
29758
29831
  clearTimeout(timer);
29759
29832
  timer = null;
29760
29833
  }
29761
- fn.apply(null, args);
29834
+ fn(...args);
29762
29835
  }
29763
29836
 
29764
29837
  const throttled = (...args) => {
@@ -30049,7 +30122,7 @@ __webpack_require__.r(__webpack_exports__);
30049
30122
 
30050
30123
 
30051
30124
  function toURLEncodedForm(data, options) {
30052
- return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].classes.URLSearchParams(), Object.assign({
30125
+ return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].classes.URLSearchParams(), {
30053
30126
  visitor: function(value, key, path, helpers) {
30054
30127
  if (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isBuffer(value)) {
30055
30128
  this.append(key, value.toString('base64'));
@@ -30057,8 +30130,9 @@ function toURLEncodedForm(data, options) {
30057
30130
  }
30058
30131
 
30059
30132
  return helpers.defaultVisitor.apply(this, arguments);
30060
- }
30061
- }, options));
30133
+ },
30134
+ ...options
30135
+ });
30062
30136
  }
30063
30137
 
30064
30138
 
@@ -30617,6 +30691,27 @@ const isPlainObject = (val) => {
30617
30691
  return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
30618
30692
  }
30619
30693
 
30694
+ /**
30695
+ * Determine if a value is an empty object (safely handles Buffers)
30696
+ *
30697
+ * @param {*} val The value to test
30698
+ *
30699
+ * @returns {boolean} True if value is an empty object, otherwise false
30700
+ */
30701
+ const isEmptyObject = (val) => {
30702
+ // Early return for non-objects or Buffers to prevent RangeError
30703
+ if (!isObject(val) || isBuffer(val)) {
30704
+ return false;
30705
+ }
30706
+
30707
+ try {
30708
+ return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
30709
+ } catch (e) {
30710
+ // Fallback for any other objects that might cause RangeError with Object.keys()
30711
+ return false;
30712
+ }
30713
+ }
30714
+
30620
30715
  /**
30621
30716
  * Determine if a value is a Date
30622
30717
  *
@@ -30739,6 +30834,11 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
30739
30834
  fn.call(null, obj[i], i, obj);
30740
30835
  }
30741
30836
  } else {
30837
+ // Buffer check
30838
+ if (isBuffer(obj)) {
30839
+ return;
30840
+ }
30841
+
30742
30842
  // Iterate over object keys
30743
30843
  const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
30744
30844
  const len = keys.length;
@@ -30752,6 +30852,10 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
30752
30852
  }
30753
30853
 
30754
30854
  function findKey(obj, key) {
30855
+ if (isBuffer(obj)){
30856
+ return null;
30857
+ }
30858
+
30755
30859
  key = key.toLowerCase();
30756
30860
  const keys = Object.keys(obj);
30757
30861
  let i = keys.length;
@@ -31105,6 +31209,11 @@ const toJSONObject = (obj) => {
31105
31209
  return;
31106
31210
  }
31107
31211
 
31212
+ //Buffer check
31213
+ if (isBuffer(source)) {
31214
+ return source;
31215
+ }
31216
+
31108
31217
  if(!('toJSON' in source)) {
31109
31218
  stack[i] = source;
31110
31219
  const target = isArray(source) ? [] : {};
@@ -31176,6 +31285,7 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
31176
31285
  isBoolean,
31177
31286
  isObject,
31178
31287
  isPlainObject,
31288
+ isEmptyObject,
31179
31289
  isReadableStream,
31180
31290
  isRequest,
31181
31291
  isResponse,
@@ -32687,7 +32797,7 @@ function createClient(params, opts = {}) {
32687
32797
  const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
32688
32798
  const userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(
32689
32799
  // @ts-expect-error
32690
- `${sdkMain}/${"11.55.0-canary.1"}`, params.application, params.integration, params.feature);
32800
+ `${sdkMain}/${"11.55.0-canary.3"}`, params.application, params.integration, params.feature);
32691
32801
  const adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
32692
32802
  userAgent
32693
32803
  }));