@mx-space/api-client 1.4.0 → 1.4.2

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.
Files changed (45) hide show
  1. package/.eslintcache +1 -1
  2. package/controllers/aggregate.ts +16 -10
  3. package/controllers/base.ts +4 -4
  4. package/controllers/category.ts +12 -11
  5. package/controllers/comment.ts +9 -9
  6. package/controllers/link.ts +4 -3
  7. package/controllers/note.ts +9 -9
  8. package/controllers/page.ts +8 -8
  9. package/controllers/post.ts +8 -8
  10. package/controllers/project.ts +4 -3
  11. package/controllers/recently.ts +6 -6
  12. package/controllers/say.ts +6 -5
  13. package/controllers/search.ts +9 -9
  14. package/controllers/severless.ts +5 -5
  15. package/controllers/snippet.ts +5 -5
  16. package/controllers/subscribe.ts +6 -6
  17. package/controllers/topic.ts +6 -5
  18. package/controllers/user.ts +6 -6
  19. package/dist/adaptors/axios.d.ts +1 -1
  20. package/dist/adaptors/axios.global.js +146 -95
  21. package/dist/adaptors/umi-request.d.ts +1 -1
  22. package/dist/adaptors/umi-request.global.js +22 -13
  23. package/dist/index.cjs +27 -15
  24. package/dist/index.d.ts +23 -27
  25. package/dist/index.global.js +27 -15
  26. package/dist/index.js +27 -15
  27. package/interfaces/adapter.ts +1 -1
  28. package/interfaces/client.ts +2 -2
  29. package/interfaces/request.ts +3 -1
  30. package/models/aggregate.ts +15 -7
  31. package/models/category.ts +2 -2
  32. package/models/comment.ts +2 -2
  33. package/models/link.ts +1 -1
  34. package/models/note.ts +2 -2
  35. package/models/page.ts +1 -1
  36. package/models/post.ts +2 -2
  37. package/models/project.ts +1 -1
  38. package/models/recently.ts +1 -1
  39. package/models/say.ts +1 -1
  40. package/models/snippet.ts +1 -1
  41. package/models/subscribe.ts +1 -1
  42. package/models/topic.ts +1 -1
  43. package/models/user.ts +1 -1
  44. package/package.json +8 -20
  45. package/tsconfig.json +1 -1
@@ -10741,14 +10741,14 @@
10741
10741
  }
10742
10742
  });
10743
10743
 
10744
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/bind.js
10744
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/bind.js
10745
10745
  function bind(fn, thisArg) {
10746
10746
  return function wrap() {
10747
10747
  return fn.apply(thisArg, arguments);
10748
10748
  };
10749
10749
  }
10750
10750
 
10751
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/utils.js
10751
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/utils.js
10752
10752
  var { toString } = Object.prototype;
10753
10753
  var { getPrototypeOf } = Object;
10754
10754
  var kindOf = ((cache) => (thing) => {
@@ -10793,8 +10793,9 @@
10793
10793
  var isFileList = kindOfTest("FileList");
10794
10794
  var isStream = (val) => isObject(val) && isFunction(val.pipe);
10795
10795
  var isFormData = (thing) => {
10796
- const pattern = "[object FormData]";
10797
- return thing && (typeof FormData === "function" && thing instanceof FormData || toString.call(thing) === pattern || isFunction(thing.toString) && thing.toString() === pattern);
10796
+ let kind;
10797
+ return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
10798
+ kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
10798
10799
  };
10799
10800
  var isURLSearchParams = kindOfTest("URLSearchParams");
10800
10801
  var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
@@ -11048,6 +11049,8 @@
11048
11049
  };
11049
11050
  return visit(obj, 0);
11050
11051
  };
11052
+ var isAsyncFn = kindOfTest("AsyncFunction");
11053
+ var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
11051
11054
  var utils_default = {
11052
11055
  isArray,
11053
11056
  isArrayBuffer,
@@ -11098,10 +11101,12 @@
11098
11101
  ALPHABET,
11099
11102
  generateString,
11100
11103
  isSpecCompliantForm,
11101
- toJSONObject
11104
+ toJSONObject,
11105
+ isAsyncFn,
11106
+ isThenable
11102
11107
  };
11103
11108
 
11104
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/core/AxiosError.js
11109
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/core/AxiosError.js
11105
11110
  function AxiosError(message, code, config, request, response) {
11106
11111
  Error.call(this);
11107
11112
  if (Error.captureStackTrace) {
@@ -11173,11 +11178,11 @@
11173
11178
  };
11174
11179
  var AxiosError_default = AxiosError;
11175
11180
 
11176
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/platform/node/classes/FormData.js
11181
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/platform/node/classes/FormData.js
11177
11182
  var import_form_data = __toESM(require_form_data(), 1);
11178
11183
  var FormData_default = import_form_data.default;
11179
11184
 
11180
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/toFormData.js
11185
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/toFormData.js
11181
11186
  function isVisitable(thing) {
11182
11187
  return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
11183
11188
  }
@@ -11292,7 +11297,7 @@
11292
11297
  }
11293
11298
  var toFormData_default = toFormData;
11294
11299
 
11295
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
11300
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
11296
11301
  function encode(str) {
11297
11302
  const charMap = {
11298
11303
  "!": "%21",
@@ -11325,7 +11330,7 @@
11325
11330
  };
11326
11331
  var AxiosURLSearchParams_default = AxiosURLSearchParams;
11327
11332
 
11328
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/buildURL.js
11333
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/buildURL.js
11329
11334
  function encode2(val) {
11330
11335
  return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
11331
11336
  }
@@ -11351,7 +11356,7 @@
11351
11356
  return url2;
11352
11357
  }
11353
11358
 
11354
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/core/InterceptorManager.js
11359
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/core/InterceptorManager.js
11355
11360
  var InterceptorManager = class {
11356
11361
  constructor() {
11357
11362
  this.handlers = [];
@@ -11415,18 +11420,18 @@
11415
11420
  };
11416
11421
  var InterceptorManager_default = InterceptorManager;
11417
11422
 
11418
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/defaults/transitional.js
11423
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/defaults/transitional.js
11419
11424
  var transitional_default = {
11420
11425
  silentJSONParsing: true,
11421
11426
  forcedJSONParsing: true,
11422
11427
  clarifyTimeoutError: false
11423
11428
  };
11424
11429
 
11425
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
11430
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
11426
11431
  var import_url = __toESM(__require("url"), 1);
11427
11432
  var URLSearchParams_default = import_url.default.URLSearchParams;
11428
11433
 
11429
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/platform/node/index.js
11434
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/platform/node/index.js
11430
11435
  var node_default = {
11431
11436
  isNode: true,
11432
11437
  classes: {
@@ -11437,7 +11442,7 @@
11437
11442
  protocols: ["http", "https", "file", "data"]
11438
11443
  };
11439
11444
 
11440
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/toURLEncodedForm.js
11445
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/toURLEncodedForm.js
11441
11446
  function toURLEncodedForm(data, options) {
11442
11447
  return toFormData_default(data, new node_default.classes.URLSearchParams(), Object.assign({
11443
11448
  visitor: function(value, key, path, helpers) {
@@ -11450,7 +11455,7 @@
11450
11455
  }, options));
11451
11456
  }
11452
11457
 
11453
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/formDataToJSON.js
11458
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/formDataToJSON.js
11454
11459
  function parsePropPath(name) {
11455
11460
  return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
11456
11461
  return match[0] === "[]" ? "" : match[1] || match[0];
@@ -11502,7 +11507,7 @@
11502
11507
  }
11503
11508
  var formDataToJSON_default = formDataToJSON;
11504
11509
 
11505
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/defaults/index.js
11510
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/defaults/index.js
11506
11511
  var DEFAULT_CONTENT_TYPE = {
11507
11512
  "Content-Type": void 0
11508
11513
  };
@@ -11616,7 +11621,7 @@
11616
11621
  });
11617
11622
  var defaults_default = defaults;
11618
11623
 
11619
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/parseHeaders.js
11624
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/parseHeaders.js
11620
11625
  var ignoreDuplicateOf = utils_default.toObjectSet([
11621
11626
  "age",
11622
11627
  "authorization",
@@ -11661,7 +11666,7 @@
11661
11666
  return parsed;
11662
11667
  };
11663
11668
 
11664
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/core/AxiosHeaders.js
11669
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/core/AxiosHeaders.js
11665
11670
  var $internals = Symbol("internals");
11666
11671
  function normalizeHeader(header) {
11667
11672
  return header && String(header).trim().toLowerCase();
@@ -11681,13 +11686,14 @@
11681
11686
  }
11682
11687
  return tokens;
11683
11688
  }
11684
- function isValidHeaderName(str) {
11685
- return /^[-_a-zA-Z]+$/.test(str.trim());
11686
- }
11687
- function matchHeaderValue(context, value, header, filter2) {
11689
+ var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
11690
+ function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
11688
11691
  if (utils_default.isFunction(filter2)) {
11689
11692
  return filter2.call(this, value, header);
11690
11693
  }
11694
+ if (isHeaderNameFilter) {
11695
+ value = header;
11696
+ }
11691
11697
  if (!utils_default.isString(value))
11692
11698
  return;
11693
11699
  if (utils_default.isString(filter2)) {
@@ -11795,7 +11801,7 @@
11795
11801
  let deleted = false;
11796
11802
  while (i--) {
11797
11803
  const key = keys[i];
11798
- if (!matcher || matchHeaderValue(this, this[key], key, matcher)) {
11804
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
11799
11805
  delete this[key];
11800
11806
  deleted = true;
11801
11807
  }
@@ -11870,7 +11876,7 @@
11870
11876
  utils_default.freezeMethods(AxiosHeaders);
11871
11877
  var AxiosHeaders_default = AxiosHeaders;
11872
11878
 
11873
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/core/transformData.js
11879
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/core/transformData.js
11874
11880
  function transformData(fns, response) {
11875
11881
  const config = this || defaults_default;
11876
11882
  const context = response || config;
@@ -11883,12 +11889,12 @@
11883
11889
  return data;
11884
11890
  }
11885
11891
 
11886
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/cancel/isCancel.js
11892
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/cancel/isCancel.js
11887
11893
  function isCancel(value) {
11888
11894
  return !!(value && value.__CANCEL__);
11889
11895
  }
11890
11896
 
11891
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/cancel/CanceledError.js
11897
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/cancel/CanceledError.js
11892
11898
  function CanceledError(message, config, request) {
11893
11899
  AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
11894
11900
  this.name = "CanceledError";
@@ -11898,7 +11904,7 @@
11898
11904
  });
11899
11905
  var CanceledError_default = CanceledError;
11900
11906
 
11901
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/core/settle.js
11907
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/core/settle.js
11902
11908
  function settle(resolve, reject, response) {
11903
11909
  const validateStatus2 = response.config.validateStatus;
11904
11910
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
@@ -11914,17 +11920,17 @@
11914
11920
  }
11915
11921
  }
11916
11922
 
11917
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/isAbsoluteURL.js
11923
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/isAbsoluteURL.js
11918
11924
  function isAbsoluteURL(url2) {
11919
11925
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
11920
11926
  }
11921
11927
 
11922
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/combineURLs.js
11928
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/combineURLs.js
11923
11929
  function combineURLs(baseURL, relativeURL) {
11924
11930
  return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
11925
11931
  }
11926
11932
 
11927
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/core/buildFullPath.js
11933
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/core/buildFullPath.js
11928
11934
  function buildFullPath(baseURL, requestedURL) {
11929
11935
  if (baseURL && !isAbsoluteURL(requestedURL)) {
11930
11936
  return combineURLs(baseURL, requestedURL);
@@ -11932,24 +11938,24 @@
11932
11938
  return requestedURL;
11933
11939
  }
11934
11940
 
11935
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/adapters/http.js
11941
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/adapters/http.js
11936
11942
  var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
11937
11943
  var import_http = __toESM(__require("http"), 1);
11938
11944
  var import_https = __toESM(__require("https"), 1);
11939
- var import_util = __toESM(__require("util"), 1);
11945
+ var import_util2 = __toESM(__require("util"), 1);
11940
11946
  var import_follow_redirects = __toESM(require_follow_redirects(), 1);
11941
11947
  var import_zlib = __toESM(__require("zlib"), 1);
11942
11948
 
11943
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/env/data.js
11944
- var VERSION = "1.3.1";
11949
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/env/data.js
11950
+ var VERSION = "1.4.0";
11945
11951
 
11946
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/parseProtocol.js
11952
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/parseProtocol.js
11947
11953
  function parseProtocol(url2) {
11948
11954
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
11949
11955
  return match && match[1] || "";
11950
11956
  }
11951
11957
 
11952
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/fromDataURI.js
11958
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/fromDataURI.js
11953
11959
  var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
11954
11960
  function fromDataURI(uri, asBlob, options) {
11955
11961
  const _Blob = options && options.Blob || node_default.classes.Blob;
@@ -11978,13 +11984,13 @@
11978
11984
  throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
11979
11985
  }
11980
11986
 
11981
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/adapters/http.js
11987
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/adapters/http.js
11982
11988
  var import_stream4 = __toESM(__require("stream"), 1);
11983
11989
 
11984
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/AxiosTransformStream.js
11990
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/AxiosTransformStream.js
11985
11991
  var import_stream = __toESM(__require("stream"), 1);
11986
11992
 
11987
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/throttle.js
11993
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/throttle.js
11988
11994
  function throttle(fn, freq) {
11989
11995
  let timestamp = 0;
11990
11996
  const threshold = 1e3 / freq;
@@ -12010,7 +12016,7 @@
12010
12016
  }
12011
12017
  var throttle_default = throttle;
12012
12018
 
12013
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/speedometer.js
12019
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/speedometer.js
12014
12020
  function speedometer(samplesCount, min) {
12015
12021
  samplesCount = samplesCount || 10;
12016
12022
  const bytes = new Array(samplesCount);
@@ -12046,7 +12052,7 @@
12046
12052
  }
12047
12053
  var speedometer_default = speedometer;
12048
12054
 
12049
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/AxiosTransformStream.js
12055
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/AxiosTransformStream.js
12050
12056
  var kInternals = Symbol("internals");
12051
12057
  var AxiosTransformStream = class extends import_stream.default.Transform {
12052
12058
  constructor(options) {
@@ -12196,13 +12202,14 @@
12196
12202
  };
12197
12203
  var AxiosTransformStream_default = AxiosTransformStream;
12198
12204
 
12199
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/adapters/http.js
12205
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/adapters/http.js
12200
12206
  var import_events = __toESM(__require("events"), 1);
12201
12207
 
12202
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/formDataToStream.js
12208
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/formDataToStream.js
12209
+ var import_util = __require("util");
12203
12210
  var import_stream2 = __require("stream");
12204
12211
 
12205
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/readBlob.js
12212
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/readBlob.js
12206
12213
  var { asyncIterator } = Symbol;
12207
12214
  var readBlob = async function* (blob) {
12208
12215
  if (blob.stream) {
@@ -12217,9 +12224,9 @@
12217
12224
  };
12218
12225
  var readBlob_default = readBlob;
12219
12226
 
12220
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/formDataToStream.js
12227
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/formDataToStream.js
12221
12228
  var BOUNDARY_ALPHABET = utils_default.ALPHABET.ALPHA_DIGIT + "-_";
12222
- var textEncoder = new TextEncoder();
12229
+ var textEncoder = new import_util.TextEncoder();
12223
12230
  var CRLF = "\r\n";
12224
12231
  var CRLF_BYTES = textEncoder.encode(CRLF);
12225
12232
  var CRLF_BYTES_COUNT = 2;
@@ -12296,7 +12303,7 @@
12296
12303
  };
12297
12304
  var formDataToStream_default = formDataToStream;
12298
12305
 
12299
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
12306
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
12300
12307
  var import_stream3 = __toESM(__require("stream"), 1);
12301
12308
  var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
12302
12309
  __transform(chunk, encoding, callback) {
@@ -12318,7 +12325,22 @@
12318
12325
  };
12319
12326
  var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
12320
12327
 
12321
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/adapters/http.js
12328
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/callbackify.js
12329
+ var callbackify = (fn, reducer) => {
12330
+ return utils_default.isAsyncFn(fn) ? function(...args) {
12331
+ const cb = args.pop();
12332
+ fn.apply(this, args).then((value) => {
12333
+ try {
12334
+ reducer ? cb(null, ...reducer(value)) : cb(null, value);
12335
+ } catch (err) {
12336
+ cb(err);
12337
+ }
12338
+ }, cb);
12339
+ } : fn;
12340
+ };
12341
+ var callbackify_default = callbackify;
12342
+
12343
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/adapters/http.js
12322
12344
  var zlibOptions = {
12323
12345
  flush: import_zlib.default.constants.Z_SYNC_FLUSH,
12324
12346
  finishFlush: import_zlib.default.constants.Z_SYNC_FLUSH
@@ -12375,21 +12397,47 @@
12375
12397
  };
12376
12398
  }
12377
12399
  var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
12400
+ var wrapAsync = (asyncExecutor) => {
12401
+ return new Promise((resolve, reject) => {
12402
+ let onDone;
12403
+ let isDone;
12404
+ const done = (value, isRejected) => {
12405
+ if (isDone)
12406
+ return;
12407
+ isDone = true;
12408
+ onDone && onDone(value, isRejected);
12409
+ };
12410
+ const _resolve = (value) => {
12411
+ done(value);
12412
+ resolve(value);
12413
+ };
12414
+ const _reject = (reason) => {
12415
+ done(reason, true);
12416
+ reject(reason);
12417
+ };
12418
+ asyncExecutor(_resolve, _reject, (onDoneHandler) => onDone = onDoneHandler).catch(_reject);
12419
+ });
12420
+ };
12378
12421
  var http_default = isHttpAdapterSupported && function httpAdapter(config) {
12379
- return new Promise(async function dispatchHttpRequest(resolvePromise, rejectPromise) {
12380
- let data = config.data;
12381
- const responseType = config.responseType;
12382
- const responseEncoding = config.responseEncoding;
12422
+ return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
12423
+ let { data, lookup, family } = config;
12424
+ const { responseType, responseEncoding } = config;
12383
12425
  const method = config.method.toUpperCase();
12384
- let isFinished;
12385
12426
  let isDone;
12386
12427
  let rejected = false;
12387
12428
  let req;
12429
+ if (lookup && utils_default.isAsyncFn(lookup)) {
12430
+ lookup = callbackify_default(lookup, (entry) => {
12431
+ if (utils_default.isString(entry)) {
12432
+ entry = [entry, entry.indexOf(".") < 0 ? 6 : 4];
12433
+ } else if (!utils_default.isArray(entry)) {
12434
+ throw new TypeError("lookup async function must return an array [ip: string, family: number]]");
12435
+ }
12436
+ return entry;
12437
+ });
12438
+ }
12388
12439
  const emitter = new import_events.default();
12389
- function onFinished() {
12390
- if (isFinished)
12391
- return;
12392
- isFinished = true;
12440
+ const onFinished = () => {
12393
12441
  if (config.cancelToken) {
12394
12442
  config.cancelToken.unsubscribe(abort);
12395
12443
  }
@@ -12397,23 +12445,14 @@
12397
12445
  config.signal.removeEventListener("abort", abort);
12398
12446
  }
12399
12447
  emitter.removeAllListeners();
12400
- }
12401
- function done(value, isRejected) {
12402
- if (isDone)
12403
- return;
12448
+ };
12449
+ onDone((value, isRejected) => {
12404
12450
  isDone = true;
12405
12451
  if (isRejected) {
12406
12452
  rejected = true;
12407
12453
  onFinished();
12408
12454
  }
12409
- isRejected ? rejectPromise(value) : resolvePromise(value);
12410
- }
12411
- const resolve = function resolve2(value) {
12412
- done(value);
12413
- };
12414
- const reject = function reject2(value) {
12415
- done(value, true);
12416
- };
12455
+ });
12417
12456
  function abort(reason) {
12418
12457
  emitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
12419
12458
  }
@@ -12425,7 +12464,7 @@
12425
12464
  }
12426
12465
  }
12427
12466
  const fullPath = buildFullPath(config.baseURL, config.url);
12428
- const parsed = new URL(fullPath);
12467
+ const parsed = new URL(fullPath, "http://localhost");
12429
12468
  const protocol = parsed.protocol || supportedProtocols[0];
12430
12469
  if (protocol === "data:") {
12431
12470
  let convertedData;
@@ -12486,8 +12525,8 @@
12486
12525
  headers.set(data.getHeaders());
12487
12526
  if (!headers.hasContentLength()) {
12488
12527
  try {
12489
- const knownLength = await import_util.default.promisify(data.getLength).call(data);
12490
- headers.setContentLength(knownLength);
12528
+ const knownLength = await import_util2.default.promisify(data.getLength).call(data);
12529
+ Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
12491
12530
  } catch (e) {
12492
12531
  }
12493
12532
  }
@@ -12576,6 +12615,8 @@
12576
12615
  agents: { http: config.httpAgent, https: config.httpsAgent },
12577
12616
  auth,
12578
12617
  protocol,
12618
+ family,
12619
+ lookup,
12579
12620
  beforeRedirect: dispatchBeforeRedirect,
12580
12621
  beforeRedirects: {}
12581
12622
  };
@@ -12786,7 +12827,7 @@
12786
12827
  });
12787
12828
  };
12788
12829
 
12789
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/cookies.js
12830
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/cookies.js
12790
12831
  var cookies_default = node_default.isStandardBrowserEnv ? (
12791
12832
  // Standard browser envs support document.cookie
12792
12833
  function standardBrowserEnv() {
@@ -12832,7 +12873,7 @@
12832
12873
  }()
12833
12874
  );
12834
12875
 
12835
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/isURLSameOrigin.js
12876
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/isURLSameOrigin.js
12836
12877
  var isURLSameOrigin_default = node_default.isStandardBrowserEnv ? (
12837
12878
  // Standard browser envs have full support of the APIs needed to test
12838
12879
  // whether the request URL is of the same origin as current location.
@@ -12873,7 +12914,7 @@
12873
12914
  }()
12874
12915
  );
12875
12916
 
12876
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/adapters/xhr.js
12917
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/adapters/xhr.js
12877
12918
  function progressEventReducer(listener, isDownloadStream) {
12878
12919
  let bytesNotified = 0;
12879
12920
  const _speedometer = speedometer_default(50, 250);
@@ -12912,8 +12953,12 @@
12912
12953
  config.signal.removeEventListener("abort", onCanceled);
12913
12954
  }
12914
12955
  }
12915
- if (utils_default.isFormData(requestData) && (node_default.isStandardBrowserEnv || node_default.isStandardBrowserWebWorkerEnv)) {
12916
- requestHeaders.setContentType(false);
12956
+ if (utils_default.isFormData(requestData)) {
12957
+ if (node_default.isStandardBrowserEnv || node_default.isStandardBrowserWebWorkerEnv) {
12958
+ requestHeaders.setContentType(false);
12959
+ } else {
12960
+ requestHeaders.setContentType("multipart/form-data;", false);
12961
+ }
12917
12962
  }
12918
12963
  let request = new XMLHttpRequest();
12919
12964
  if (config.auth) {
@@ -13034,7 +13079,7 @@
13034
13079
  });
13035
13080
  };
13036
13081
 
13037
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/adapters/adapters.js
13082
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/adapters/adapters.js
13038
13083
  var knownAdapters = {
13039
13084
  http: http_default,
13040
13085
  xhr: xhr_default
@@ -13079,7 +13124,7 @@
13079
13124
  adapters: knownAdapters
13080
13125
  };
13081
13126
 
13082
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/core/dispatchRequest.js
13127
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/core/dispatchRequest.js
13083
13128
  function throwIfCancellationRequested(config) {
13084
13129
  if (config.cancelToken) {
13085
13130
  config.cancelToken.throwIfRequested();
@@ -13124,7 +13169,7 @@
13124
13169
  });
13125
13170
  }
13126
13171
 
13127
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/core/mergeConfig.js
13172
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/core/mergeConfig.js
13128
13173
  var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? thing.toJSON() : thing;
13129
13174
  function mergeConfig(config1, config2) {
13130
13175
  config2 = config2 || {};
@@ -13195,7 +13240,7 @@
13195
13240
  validateStatus: mergeDirectKeys,
13196
13241
  headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
13197
13242
  };
13198
- utils_default.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
13243
+ utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
13199
13244
  const merge2 = mergeMap[prop] || mergeDeepProperties;
13200
13245
  const configValue = merge2(config1[prop], config2[prop], prop);
13201
13246
  utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
@@ -13203,7 +13248,7 @@
13203
13248
  return config;
13204
13249
  }
13205
13250
 
13206
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/validator.js
13251
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/validator.js
13207
13252
  var validators = {};
13208
13253
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
13209
13254
  validators[type] = function validator(thing) {
@@ -13261,7 +13306,7 @@
13261
13306
  validators
13262
13307
  };
13263
13308
 
13264
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/core/Axios.js
13309
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/core/Axios.js
13265
13310
  var validators2 = validator_default.validators;
13266
13311
  var Axios = class {
13267
13312
  constructor(instanceConfig) {
@@ -13295,11 +13340,17 @@
13295
13340
  clarifyTimeoutError: validators2.transitional(validators2.boolean)
13296
13341
  }, false);
13297
13342
  }
13298
- if (paramsSerializer !== void 0) {
13299
- validator_default.assertOptions(paramsSerializer, {
13300
- encode: validators2.function,
13301
- serialize: validators2.function
13302
- }, true);
13343
+ if (paramsSerializer != null) {
13344
+ if (utils_default.isFunction(paramsSerializer)) {
13345
+ config.paramsSerializer = {
13346
+ serialize: paramsSerializer
13347
+ };
13348
+ } else {
13349
+ validator_default.assertOptions(paramsSerializer, {
13350
+ encode: validators2.function,
13351
+ serialize: validators2.function
13352
+ }, true);
13353
+ }
13303
13354
  }
13304
13355
  config.method = (config.method || this.defaults.method || "get").toLowerCase();
13305
13356
  let contextHeaders;
@@ -13399,7 +13450,7 @@
13399
13450
  });
13400
13451
  var Axios_default = Axios;
13401
13452
 
13402
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/cancel/CancelToken.js
13453
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/cancel/CancelToken.js
13403
13454
  var CancelToken = class {
13404
13455
  constructor(executor) {
13405
13456
  if (typeof executor !== "function") {
@@ -13489,19 +13540,19 @@
13489
13540
  };
13490
13541
  var CancelToken_default = CancelToken;
13491
13542
 
13492
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/spread.js
13543
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/spread.js
13493
13544
  function spread(callback) {
13494
13545
  return function wrap(arr) {
13495
13546
  return callback.apply(null, arr);
13496
13547
  };
13497
13548
  }
13498
13549
 
13499
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/isAxiosError.js
13550
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/isAxiosError.js
13500
13551
  function isAxiosError(payload) {
13501
13552
  return utils_default.isObject(payload) && payload.isAxiosError === true;
13502
13553
  }
13503
13554
 
13504
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/helpers/HttpStatusCode.js
13555
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/helpers/HttpStatusCode.js
13505
13556
  var HttpStatusCode = {
13506
13557
  Continue: 100,
13507
13558
  SwitchingProtocols: 101,
@@ -13572,7 +13623,7 @@
13572
13623
  });
13573
13624
  var HttpStatusCode_default = HttpStatusCode;
13574
13625
 
13575
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/lib/axios.js
13626
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/axios.js
13576
13627
  function createInstance(defaultConfig) {
13577
13628
  const context = new Axios_default(defaultConfig);
13578
13629
  const instance = bind(Axios_default.prototype.request, context);
@@ -13604,7 +13655,7 @@
13604
13655
  axios.default = axios;
13605
13656
  var axios_default = axios;
13606
13657
 
13607
- // ../../node_modules/.pnpm/axios@1.3.1/node_modules/axios/index.js
13658
+ // ../../node_modules/.pnpm/axios@1.4.0/node_modules/axios/index.js
13608
13659
  var {
13609
13660
  Axios: Axios2,
13610
13661
  AxiosError: AxiosError2,
@@ -1,5 +1,5 @@
1
- import { RequestMethod, RequestResponse } from 'umi-request';
2
1
  import { I as IRequestAdapter } from '../adapter-be44aa1e.js';
2
+ import { RequestMethod, RequestResponse } from 'umi-request';
3
3
 
4
4
  declare const umiAdaptor: IRequestAdapter<RequestMethod<true>, RequestResponse>;
5
5