@mx-space/api-client 1.3.3 → 1.3.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.
package/.eslintcache CHANGED
@@ -1 +1 @@
1
- [{"/Users/innei/git/mx-core/packages/api-client/__tests__/contronllers/subscribe.test.ts":"1","/Users/innei/git/mx-core/packages/api-client/controllers/index.ts":"2","/Users/innei/git/mx-core/packages/api-client/controllers/subscribe.ts":"3","/Users/innei/git/mx-core/packages/api-client/models/subscribe.ts":"4"},{"size":794,"mtime":1676258534756,"results":"5","hashOfConfig":"6"},{"size":1818,"mtime":1676258251701,"results":"7","hashOfConfig":"6"},{"size":1122,"mtime":1676258506228,"results":"8","hashOfConfig":"6"},{"size":207,"mtime":1676258101313,"results":"9","hashOfConfig":"6"},{"filePath":"10","messages":"11","suppressedMessages":"12","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1nfy72z",{"filePath":"13","messages":"14","suppressedMessages":"15","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"16","messages":"17","suppressedMessages":"18","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"19","messages":"20","suppressedMessages":"21","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/innei/git/mx-core/packages/api-client/__tests__/contronllers/subscribe.test.ts",[],[],"/Users/innei/git/mx-core/packages/api-client/controllers/index.ts",[],[],"/Users/innei/git/mx-core/packages/api-client/controllers/subscribe.ts",["22"],[],"/Users/innei/git/mx-core/packages/api-client/models/subscribe.ts",[],[],{"ruleId":"23","severity":1,"message":"24","line":11,"column":5,"nodeType":"25","messageId":"26","endLine":11,"endColumn":6},"unused-imports/no-unused-vars","'T' is defined but never used. Allowed unused vars must match /^_/u.","Identifier","unusedVar"]
1
+ [{"/Users/innei/git/mx-core/packages/api-client/__tests__/contronllers/subscribe.test.ts":"1","/Users/innei/git/mx-core/packages/api-client/controllers/index.ts":"2","/Users/innei/git/mx-core/packages/api-client/controllers/subscribe.ts":"3","/Users/innei/git/mx-core/packages/api-client/models/subscribe.ts":"4"},{"size":1248,"mtime":1676377331631,"results":"5","hashOfConfig":"6"},{"size":1818,"mtime":1676258251701,"results":"7","hashOfConfig":"8"},{"size":1343,"mtime":1676377286019,"results":"9","hashOfConfig":"6"},{"size":207,"mtime":1676258101313,"results":"10","hashOfConfig":"8"},{"filePath":"11","messages":"12","suppressedMessages":"13","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"6bq7ts",{"filePath":"14","messages":"15","suppressedMessages":"16","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1nfy72z",{"filePath":"17","messages":"18","suppressedMessages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"20","messages":"21","suppressedMessages":"22","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/innei/git/mx-core/packages/api-client/__tests__/contronllers/subscribe.test.ts",[],[],"/Users/innei/git/mx-core/packages/api-client/controllers/index.ts",[],[],"/Users/innei/git/mx-core/packages/api-client/controllers/subscribe.ts",["23"],[],"/Users/innei/git/mx-core/packages/api-client/models/subscribe.ts",[],[],{"ruleId":"24","severity":1,"message":"25","line":11,"column":5,"nodeType":"26","messageId":"27","endLine":11,"endColumn":6},"unused-imports/no-unused-vars","'T' is defined but never used. Allowed unused vars must match /^_/u.","Identifier","unusedVar"]
@@ -41,7 +41,7 @@ export class SubscribeController<ResponseWrapper> implements IController {
41
41
 
42
42
  subscribe(email: string, types: SubscribeType[]) {
43
43
  return this.proxy.post<never>({
44
- params: {
44
+ data: {
45
45
  email,
46
46
  types,
47
47
  },
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -25,6 +25,10 @@
25
25
  return to;
26
26
  };
27
27
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
28
+ // If the importer is in node compatibility mode or this is not an ESM
29
+ // file that has been converted to a CommonJS file using a Babel-
30
+ // compatible transform (i.e. "__esModule" has not been set), then set
31
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
32
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
33
  mod
30
34
  ));
@@ -9239,7 +9243,9 @@
9239
9243
  var contentType = this._getContentType(value, options);
9240
9244
  var contents = "";
9241
9245
  var headers = {
9246
+ // add custom disposition as third element or keep it two elements if not
9242
9247
  "Content-Disposition": ["form-data", 'name="' + field + '"'].concat(contentDisposition || []),
9248
+ // if no content type. allow it to be empty array
9243
9249
  "Content-Type": [].concat(contentType || [])
9244
9250
  };
9245
9251
  if (typeof options.header == "object") {
@@ -9671,7 +9677,7 @@
9671
9677
  return;
9672
9678
  }
9673
9679
  const self2 = debug;
9674
- const curr = Number(new Date());
9680
+ const curr = Number(/* @__PURE__ */ new Date());
9675
9681
  const ms = curr - (prevTime || curr);
9676
9682
  self2.diff = ms;
9677
9683
  self2.prev = prevTime;
@@ -9899,7 +9905,11 @@
9899
9905
  if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
9900
9906
  return false;
9901
9907
  }
9902
- return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
9908
+ return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
9909
+ typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
9910
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
9911
+ typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
9912
+ typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
9903
9913
  }
9904
9914
  function formatArgs(args) {
9905
9915
  args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
@@ -10216,7 +10226,7 @@
10216
10226
  if (exports.inspectOpts.hideDate) {
10217
10227
  return "";
10218
10228
  }
10219
- return new Date().toISOString() + " ";
10229
+ return (/* @__PURE__ */ new Date()).toISOString() + " ";
10220
10230
  }
10221
10231
  function log(...args) {
10222
10232
  return process.stderr.write(util2.format(...args) + "\n");
@@ -10498,7 +10508,11 @@
10498
10508
  for (var event of events) {
10499
10509
  request.on(event, eventHandlers[event]);
10500
10510
  }
10501
- this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : this._options.path;
10511
+ this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : (
10512
+ // When making a request to a proxy, […]
10513
+ // a client MUST send the target URI in absolute-form […].
10514
+ this._options.path
10515
+ );
10502
10516
  if (this._isRedirect) {
10503
10517
  var i = 0;
10504
10518
  var self2 = this;
@@ -10546,11 +10560,16 @@
10546
10560
  var beforeRedirect = this._options.beforeRedirect;
10547
10561
  if (beforeRedirect) {
10548
10562
  requestHeaders = Object.assign({
10563
+ // The Host header was set by nativeProtocol.request
10549
10564
  Host: response.req.getHeader("host")
10550
10565
  }, this._options.headers);
10551
10566
  }
10552
10567
  var method = this._options.method;
10553
- if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) {
10568
+ if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || // RFC7231§6.4.4: The 303 (See Other) status code indicates that
10569
+ // the server is redirecting the user agent to a different resource […]
10570
+ // A user agent can perform a retrieval request targeting that URI
10571
+ // (a GET or HEAD request if using HTTP) […]
10572
+ statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) {
10554
10573
  this._options.method = "GET";
10555
10574
  this._requestBodyBuffers = [];
10556
10575
  removeMatchingHeaders(/^content-/i, this._options.headers);
@@ -10659,7 +10678,10 @@
10659
10678
  function urlToOptions(urlObject) {
10660
10679
  var options = {
10661
10680
  protocol: urlObject.protocol,
10662
- hostname: urlObject.hostname.startsWith("[") ? urlObject.hostname.slice(1, -1) : urlObject.hostname,
10681
+ hostname: urlObject.hostname.startsWith("[") ? (
10682
+ /* istanbul ignore next */
10683
+ urlObject.hostname.slice(1, -1)
10684
+ ) : urlObject.hostname,
10663
10685
  hash: urlObject.hash,
10664
10686
  search: urlObject.search,
10665
10687
  pathname: urlObject.pathname,
@@ -11063,6 +11085,7 @@
11063
11085
  isHTMLForm,
11064
11086
  hasOwnProperty,
11065
11087
  hasOwnProp: hasOwnProperty,
11088
+ // an alias to avoid ESLint no-prototype-builtins detection
11066
11089
  reduceDescriptors,
11067
11090
  freezeMethods,
11068
11091
  toObjectSet,
@@ -11096,14 +11119,18 @@
11096
11119
  utils_default.inherits(AxiosError, Error, {
11097
11120
  toJSON: function toJSON() {
11098
11121
  return {
11122
+ // Standard
11099
11123
  message: this.message,
11100
11124
  name: this.name,
11125
+ // Microsoft
11101
11126
  description: this.description,
11102
11127
  number: this.number,
11128
+ // Mozilla
11103
11129
  fileName: this.fileName,
11104
11130
  lineNumber: this.lineNumber,
11105
11131
  columnNumber: this.columnNumber,
11106
11132
  stack: this.stack,
11133
+ // Axios
11107
11134
  config: utils_default.toJSONObject(this.config),
11108
11135
  code: this.code,
11109
11136
  status: this.response && this.response.status ? this.response.status : null
@@ -11125,6 +11152,7 @@
11125
11152
  "ERR_CANCELED",
11126
11153
  "ERR_NOT_SUPPORT",
11127
11154
  "ERR_INVALID_URL"
11155
+ // eslint-disable-next-line func-names
11128
11156
  ].forEach((code) => {
11129
11157
  descriptors[code] = { value: code };
11130
11158
  });
@@ -11215,6 +11243,7 @@
11215
11243
  key = removeBrackets(key);
11216
11244
  arr.forEach(function each(el, index) {
11217
11245
  !(utils_default.isUndefined(el) || el === null) && formData.append(
11246
+ // eslint-disable-next-line no-nested-ternary
11218
11247
  indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]",
11219
11248
  convertValue(el)
11220
11249
  );
@@ -11327,6 +11356,14 @@
11327
11356
  constructor() {
11328
11357
  this.handlers = [];
11329
11358
  }
11359
+ /**
11360
+ * Add a new interceptor to the stack
11361
+ *
11362
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
11363
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
11364
+ *
11365
+ * @return {Number} An ID used to remove interceptor later
11366
+ */
11330
11367
  use(fulfilled, rejected, options) {
11331
11368
  this.handlers.push({
11332
11369
  fulfilled,
@@ -11336,16 +11373,38 @@
11336
11373
  });
11337
11374
  return this.handlers.length - 1;
11338
11375
  }
11376
+ /**
11377
+ * Remove an interceptor from the stack
11378
+ *
11379
+ * @param {Number} id The ID that was returned by `use`
11380
+ *
11381
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
11382
+ */
11339
11383
  eject(id) {
11340
11384
  if (this.handlers[id]) {
11341
11385
  this.handlers[id] = null;
11342
11386
  }
11343
11387
  }
11388
+ /**
11389
+ * Clear all interceptors from the stack
11390
+ *
11391
+ * @returns {void}
11392
+ */
11344
11393
  clear() {
11345
11394
  if (this.handlers) {
11346
11395
  this.handlers = [];
11347
11396
  }
11348
11397
  }
11398
+ /**
11399
+ * Iterate over all the registered interceptors
11400
+ *
11401
+ * This method is particularly useful for skipping over any
11402
+ * interceptors that may have become `null` calling `eject`.
11403
+ *
11404
+ * @param {Function} fn The function to call for each interceptor
11405
+ *
11406
+ * @returns {void}
11407
+ */
11349
11408
  forEach(fn) {
11350
11409
  utils_default.forEach(this.handlers, function forEachHandler(h) {
11351
11410
  if (h !== null) {
@@ -11527,6 +11586,10 @@
11527
11586
  }
11528
11587
  return data;
11529
11588
  }],
11589
+ /**
11590
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
11591
+ * timeout is not created.
11592
+ */
11530
11593
  timeout: 0,
11531
11594
  xsrfCookieName: "XSRF-TOKEN",
11532
11595
  xsrfHeaderName: "X-XSRF-TOKEN",
@@ -12724,78 +12787,91 @@
12724
12787
  };
12725
12788
 
12726
12789
  // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/cookies.js
12727
- var cookies_default = node_default.isStandardBrowserEnv ? function standardBrowserEnv() {
12728
- return {
12729
- write: function write(name, value, expires, path, domain, secure) {
12730
- const cookie = [];
12731
- cookie.push(name + "=" + encodeURIComponent(value));
12732
- if (utils_default.isNumber(expires)) {
12733
- cookie.push("expires=" + new Date(expires).toGMTString());
12734
- }
12735
- if (utils_default.isString(path)) {
12736
- cookie.push("path=" + path);
12737
- }
12738
- if (utils_default.isString(domain)) {
12739
- cookie.push("domain=" + domain);
12740
- }
12741
- if (secure === true) {
12742
- cookie.push("secure");
12743
- }
12744
- document.cookie = cookie.join("; ");
12745
- },
12746
- read: function read(name) {
12747
- const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
12748
- return match ? decodeURIComponent(match[3]) : null;
12749
- },
12750
- remove: function remove(name) {
12751
- this.write(name, "", Date.now() - 864e5);
12752
- }
12753
- };
12754
- }() : function nonStandardBrowserEnv() {
12755
- return {
12756
- write: function write() {
12757
- },
12758
- read: function read() {
12759
- return null;
12760
- },
12761
- remove: function remove() {
12762
- }
12763
- };
12764
- }();
12790
+ var cookies_default = node_default.isStandardBrowserEnv ? (
12791
+ // Standard browser envs support document.cookie
12792
+ function standardBrowserEnv() {
12793
+ return {
12794
+ write: function write(name, value, expires, path, domain, secure) {
12795
+ const cookie = [];
12796
+ cookie.push(name + "=" + encodeURIComponent(value));
12797
+ if (utils_default.isNumber(expires)) {
12798
+ cookie.push("expires=" + new Date(expires).toGMTString());
12799
+ }
12800
+ if (utils_default.isString(path)) {
12801
+ cookie.push("path=" + path);
12802
+ }
12803
+ if (utils_default.isString(domain)) {
12804
+ cookie.push("domain=" + domain);
12805
+ }
12806
+ if (secure === true) {
12807
+ cookie.push("secure");
12808
+ }
12809
+ document.cookie = cookie.join("; ");
12810
+ },
12811
+ read: function read(name) {
12812
+ const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
12813
+ return match ? decodeURIComponent(match[3]) : null;
12814
+ },
12815
+ remove: function remove(name) {
12816
+ this.write(name, "", Date.now() - 864e5);
12817
+ }
12818
+ };
12819
+ }()
12820
+ ) : (
12821
+ // Non standard browser env (web workers, react-native) lack needed support.
12822
+ function nonStandardBrowserEnv() {
12823
+ return {
12824
+ write: function write() {
12825
+ },
12826
+ read: function read() {
12827
+ return null;
12828
+ },
12829
+ remove: function remove() {
12830
+ }
12831
+ };
12832
+ }()
12833
+ );
12765
12834
 
12766
12835
  // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/isURLSameOrigin.js
12767
- var isURLSameOrigin_default = node_default.isStandardBrowserEnv ? function standardBrowserEnv2() {
12768
- const msie = /(msie|trident)/i.test(navigator.userAgent);
12769
- const urlParsingNode = document.createElement("a");
12770
- let originURL;
12771
- function resolveURL(url2) {
12772
- let href = url2;
12773
- if (msie) {
12836
+ var isURLSameOrigin_default = node_default.isStandardBrowserEnv ? (
12837
+ // Standard browser envs have full support of the APIs needed to test
12838
+ // whether the request URL is of the same origin as current location.
12839
+ function standardBrowserEnv2() {
12840
+ const msie = /(msie|trident)/i.test(navigator.userAgent);
12841
+ const urlParsingNode = document.createElement("a");
12842
+ let originURL;
12843
+ function resolveURL(url2) {
12844
+ let href = url2;
12845
+ if (msie) {
12846
+ urlParsingNode.setAttribute("href", href);
12847
+ href = urlParsingNode.href;
12848
+ }
12774
12849
  urlParsingNode.setAttribute("href", href);
12775
- href = urlParsingNode.href;
12850
+ return {
12851
+ href: urlParsingNode.href,
12852
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
12853
+ host: urlParsingNode.host,
12854
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
12855
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
12856
+ hostname: urlParsingNode.hostname,
12857
+ port: urlParsingNode.port,
12858
+ pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
12859
+ };
12776
12860
  }
12777
- urlParsingNode.setAttribute("href", href);
12778
- return {
12779
- href: urlParsingNode.href,
12780
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
12781
- host: urlParsingNode.host,
12782
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
12783
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
12784
- hostname: urlParsingNode.hostname,
12785
- port: urlParsingNode.port,
12786
- pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
12861
+ originURL = resolveURL(window.location.href);
12862
+ return function isURLSameOrigin(requestURL) {
12863
+ const parsed = utils_default.isString(requestURL) ? resolveURL(requestURL) : requestURL;
12864
+ return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
12787
12865
  };
12788
- }
12789
- originURL = resolveURL(window.location.href);
12790
- return function isURLSameOrigin(requestURL) {
12791
- const parsed = utils_default.isString(requestURL) ? resolveURL(requestURL) : requestURL;
12792
- return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
12793
- };
12794
- }() : function nonStandardBrowserEnv2() {
12795
- return function isURLSameOrigin() {
12796
- return true;
12797
- };
12798
- }();
12866
+ }()
12867
+ ) : (
12868
+ // Non standard browser envs (web workers, react-native) lack needed support.
12869
+ function nonStandardBrowserEnv2() {
12870
+ return function isURLSameOrigin() {
12871
+ return true;
12872
+ };
12873
+ }()
12874
+ );
12799
12875
 
12800
12876
  // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/adapters/xhr.js
12801
12877
  function progressEventReducer(listener, isDownloadStream) {
@@ -13195,6 +13271,14 @@
13195
13271
  response: new InterceptorManager_default()
13196
13272
  };
13197
13273
  }
13274
+ /**
13275
+ * Dispatch a request
13276
+ *
13277
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
13278
+ * @param {?Object} config
13279
+ *
13280
+ * @returns {Promise} The Promise to be fulfilled
13281
+ */
13198
13282
  request(configOrUrl, config) {
13199
13283
  if (typeof configOrUrl === "string") {
13200
13284
  config = config || {};
@@ -13354,11 +13438,17 @@
13354
13438
  resolvePromise(token.reason);
13355
13439
  });
13356
13440
  }
13441
+ /**
13442
+ * Throws a `CanceledError` if cancellation has been requested.
13443
+ */
13357
13444
  throwIfRequested() {
13358
13445
  if (this.reason) {
13359
13446
  throw this.reason;
13360
13447
  }
13361
13448
  }
13449
+ /**
13450
+ * Subscribe to the cancel signal
13451
+ */
13362
13452
  subscribe(listener) {
13363
13453
  if (this.reason) {
13364
13454
  listener(this.reason);
@@ -13370,6 +13460,9 @@
13370
13460
  this._listeners = [listener];
13371
13461
  }
13372
13462
  }
13463
+ /**
13464
+ * Unsubscribe from the cancel signal
13465
+ */
13373
13466
  unsubscribe(listener) {
13374
13467
  if (!this._listeners) {
13375
13468
  return;
@@ -13379,6 +13472,10 @@
13379
13472
  this._listeners.splice(index, 1);
13380
13473
  }
13381
13474
  }
13475
+ /**
13476
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
13477
+ * cancels the `CancelToken`.
13478
+ */
13382
13479
  static source() {
13383
13480
  let cancel;
13384
13481
  const token = new CancelToken(function executor(c) {
@@ -13555,15 +13652,21 @@
13555
13652
  });
13556
13653
  var axios_default2 = axiosAdaptor;
13557
13654
  })();
13558
- /*!
13559
- * mime-db
13560
- * Copyright(c) 2014 Jonathan Ong
13561
- * Copyright(c) 2015-2022 Douglas Christopher Wilson
13562
- * MIT Licensed
13563
- */
13564
- /*!
13565
- * mime-types
13566
- * Copyright(c) 2014 Jonathan Ong
13567
- * Copyright(c) 2015 Douglas Christopher Wilson
13568
- * MIT Licensed
13569
- */
13655
+ /*! Bundled license information:
13656
+
13657
+ mime-db/index.js:
13658
+ (*!
13659
+ * mime-db
13660
+ * Copyright(c) 2014 Jonathan Ong
13661
+ * Copyright(c) 2015-2022 Douglas Christopher Wilson
13662
+ * MIT Licensed
13663
+ *)
13664
+
13665
+ mime-types/index.js:
13666
+ (*!
13667
+ * mime-types
13668
+ * Copyright(c) 2014 Jonathan Ong
13669
+ * Copyright(c) 2015 Douglas Christopher Wilson
13670
+ * MIT Licensed
13671
+ *)
13672
+ */
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -107,6 +107,7 @@
107
107
  hasContentType = new globalThis.Request("https://a.com", {
108
108
  body: new globalThis.ReadableStream(),
109
109
  method: "POST",
110
+ // @ts-expect-error - Types are outdated.
110
111
  get duplex() {
111
112
  duplexAccessed = true;
112
113
  return "half";
@@ -213,6 +214,7 @@
213
214
 
214
215
  // ../../node_modules/.pnpm/ky@0.33.2/node_modules/ky/distribution/core/Ky.js
215
216
  var Ky = class {
217
+ // eslint-disable-next-line @typescript-eslint/promise-function-async
216
218
  static create(input, options) {
217
219
  const ky2 = new Ky(input, options);
218
220
  const fn = async () => {
@@ -271,6 +273,7 @@
271
273
  }
272
274
  return result;
273
275
  }
276
+ // eslint-disable-next-line complexity
274
277
  constructor(input, options = {}) {
275
278
  Object.defineProperty(this, "request", {
276
279
  enumerable: true,
@@ -304,6 +307,7 @@
304
307
  });
305
308
  this._input = input;
306
309
  this._options = {
310
+ // TODO: credentials can be removed when the spec change is implemented in all browsers. Context: https://www.chromestatus.com/feature/4539473312350208
307
311
  credentials: this._input.credentials || "same-origin",
308
312
  ...options,
309
313
  headers: mergeHeaders(this._input.headers, options.headers),
@@ -314,6 +318,7 @@
314
318
  afterResponse: []
315
319
  }, options.hooks),
316
320
  method: normalizeRequestMethod(options.method ?? this._input.method),
321
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
317
322
  prefixUrl: String(options.prefixUrl || ""),
318
323
  retry: normalizeRetryOptions(options.retry),
319
324
  throwHttpErrors: options.throwHttpErrors !== false,
@@ -435,6 +440,7 @@
435
440
  }
436
441
  return timeout(this.request.clone(), this.abortController, this._options);
437
442
  }
443
+ /* istanbul ignore next */
438
444
  _stream(response, onDownloadProgress) {
439
445
  const totalBytes = Number(response.headers.get("content-length")) || 0;
440
446
  let transferredBytes = 0;
@@ -549,4 +555,8 @@
549
555
  var defaultKyAdaptor = createKyAdaptor($http);
550
556
  var ky_default = defaultKyAdaptor;
551
557
  })();
552
- /*! MIT License © Sindre Sorhus */
558
+ /*! Bundled license information:
559
+
560
+ ky/distribution/index.js:
561
+ (*! MIT License © Sindre Sorhus *)
562
+ */