@modern-js/repo-generator 0.0.0-nightly-20240819170736 → 0.0.0-nightly-20240821170648

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 (2) hide show
  1. package/dist/index.js +849 -552
  2. package/package.json +12 -12
package/dist/index.js CHANGED
@@ -10313,9 +10313,9 @@ var require_src = __commonJS({
10313
10313
  }
10314
10314
  });
10315
10315
 
10316
- // ../../../../node_modules/.pnpm/follow-redirects@1.15.5/node_modules/follow-redirects/debug.js
10316
+ // ../../../../node_modules/.pnpm/follow-redirects@1.15.6/node_modules/follow-redirects/debug.js
10317
10317
  var require_debug = __commonJS({
10318
- "../../../../node_modules/.pnpm/follow-redirects@1.15.5/node_modules/follow-redirects/debug.js"(exports, module2) {
10318
+ "../../../../node_modules/.pnpm/follow-redirects@1.15.6/node_modules/follow-redirects/debug.js"(exports, module2) {
10319
10319
  "use strict";
10320
10320
  var debug;
10321
10321
  module2.exports = function() {
@@ -10334,9 +10334,9 @@ var require_debug = __commonJS({
10334
10334
  }
10335
10335
  });
10336
10336
 
10337
- // ../../../../node_modules/.pnpm/follow-redirects@1.15.5/node_modules/follow-redirects/index.js
10337
+ // ../../../../node_modules/.pnpm/follow-redirects@1.15.6/node_modules/follow-redirects/index.js
10338
10338
  var require_follow_redirects = __commonJS({
10339
- "../../../../node_modules/.pnpm/follow-redirects@1.15.5/node_modules/follow-redirects/index.js"(exports, module2) {
10339
+ "../../../../node_modules/.pnpm/follow-redirects@1.15.6/node_modules/follow-redirects/index.js"(exports, module2) {
10340
10340
  "use strict";
10341
10341
  var url2 = require("url");
10342
10342
  var URL2 = url2.URL;
@@ -10657,7 +10657,7 @@ var require_follow_redirects = __commonJS({
10657
10657
  this._isRedirect = true;
10658
10658
  spreadUrlObject(redirectUrl, this._options);
10659
10659
  if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
10660
- removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
10660
+ removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
10661
10661
  }
10662
10662
  if (isFunction5(beforeRedirect)) {
10663
10663
  var responseDetails = {
@@ -23585,9 +23585,9 @@ var require_lib = __commonJS({
23585
23585
  }
23586
23586
  });
23587
23587
 
23588
- // ../../../../node_modules/.pnpm/@modern-js+utils@2.58.0/node_modules/@modern-js/utils/dist/compiled/chalk/index.js
23588
+ // ../../../../node_modules/.pnpm/@modern-js+utils@2.58.1/node_modules/@modern-js/utils/dist/compiled/chalk/index.js
23589
23589
  var require_chalk = __commonJS({
23590
- "../../../../node_modules/.pnpm/@modern-js+utils@2.58.0/node_modules/@modern-js/utils/dist/compiled/chalk/index.js"(exports, module2) {
23590
+ "../../../../node_modules/.pnpm/@modern-js+utils@2.58.1/node_modules/@modern-js/utils/dist/compiled/chalk/index.js"(exports, module2) {
23591
23591
  "use strict";
23592
23592
  (() => {
23593
23593
  var e = { 44: (e2, t2, n2) => {
@@ -44204,7 +44204,7 @@ var require_end_of_stream = __commonJS({
44204
44204
  }
44205
44205
  function noop2() {
44206
44206
  }
44207
- function isRequest(stream4) {
44207
+ function isRequest2(stream4) {
44208
44208
  return stream4.setHeader && typeof stream4.abort === "function";
44209
44209
  }
44210
44210
  function eos(stream4, opts, callback) {
@@ -44252,7 +44252,7 @@ var require_end_of_stream = __commonJS({
44252
44252
  var onrequest = function onrequest2() {
44253
44253
  stream4.req.on("finish", onfinish);
44254
44254
  };
44255
- if (isRequest(stream4)) {
44255
+ if (isRequest2(stream4)) {
44256
44256
  stream4.on("complete", onfinish);
44257
44257
  stream4.on("abort", onclose);
44258
44258
  if (stream4.req)
@@ -45516,7 +45516,7 @@ var require_pipeline = __commonJS({
45516
45516
  if (err)
45517
45517
  throw err;
45518
45518
  }
45519
- function isRequest(stream4) {
45519
+ function isRequest2(stream4) {
45520
45520
  return stream4.setHeader && typeof stream4.abort === "function";
45521
45521
  }
45522
45522
  function destroyer(stream4, reading, writing, callback) {
@@ -45543,7 +45543,7 @@ var require_pipeline = __commonJS({
45543
45543
  if (destroyed)
45544
45544
  return;
45545
45545
  destroyed = true;
45546
- if (isRequest(stream4))
45546
+ if (isRequest2(stream4))
45547
45547
  return stream4.abort();
45548
45548
  if (typeof stream4.destroy === "function")
45549
45549
  return stream4.destroy();
@@ -58637,9 +58637,9 @@ var require_esprima = __commonJS({
58637
58637
  }();
58638
58638
  exports2.ComputedMemberExpression = ComputedMemberExpression;
58639
58639
  var ConditionalExpression = function() {
58640
- function ConditionalExpression2(test, consequent, alternate) {
58640
+ function ConditionalExpression2(test2, consequent, alternate) {
58641
58641
  this.type = syntax_1.Syntax.ConditionalExpression;
58642
- this.test = test;
58642
+ this.test = test2;
58643
58643
  this.consequent = consequent;
58644
58644
  this.alternate = alternate;
58645
58645
  }
@@ -58671,10 +58671,10 @@ var require_esprima = __commonJS({
58671
58671
  }();
58672
58672
  exports2.Directive = Directive;
58673
58673
  var DoWhileStatement = function() {
58674
- function DoWhileStatement2(body, test) {
58674
+ function DoWhileStatement2(body, test2) {
58675
58675
  this.type = syntax_1.Syntax.DoWhileStatement;
58676
58676
  this.body = body;
58677
- this.test = test;
58677
+ this.test = test2;
58678
58678
  }
58679
58679
  return DoWhileStatement2;
58680
58680
  }();
@@ -58751,10 +58751,10 @@ var require_esprima = __commonJS({
58751
58751
  }();
58752
58752
  exports2.ForOfStatement = ForOfStatement;
58753
58753
  var ForStatement = function() {
58754
- function ForStatement2(init, test, update, body) {
58754
+ function ForStatement2(init, test2, update, body) {
58755
58755
  this.type = syntax_1.Syntax.ForStatement;
58756
58756
  this.init = init;
58757
- this.test = test;
58757
+ this.test = test2;
58758
58758
  this.update = update;
58759
58759
  this.body = body;
58760
58760
  }
@@ -58796,9 +58796,9 @@ var require_esprima = __commonJS({
58796
58796
  }();
58797
58797
  exports2.Identifier = Identifier;
58798
58798
  var IfStatement = function() {
58799
- function IfStatement2(test, consequent, alternate) {
58799
+ function IfStatement2(test2, consequent, alternate) {
58800
58800
  this.type = syntax_1.Syntax.IfStatement;
58801
- this.test = test;
58801
+ this.test = test2;
58802
58802
  this.consequent = consequent;
58803
58803
  this.alternate = alternate;
58804
58804
  }
@@ -58994,9 +58994,9 @@ var require_esprima = __commonJS({
58994
58994
  }();
58995
58995
  exports2.Super = Super;
58996
58996
  var SwitchCase = function() {
58997
- function SwitchCase2(test, consequent) {
58997
+ function SwitchCase2(test2, consequent) {
58998
58998
  this.type = syntax_1.Syntax.SwitchCase;
58999
- this.test = test;
58999
+ this.test = test2;
59000
59000
  this.consequent = consequent;
59001
59001
  }
59002
59002
  return SwitchCase2;
@@ -59102,9 +59102,9 @@ var require_esprima = __commonJS({
59102
59102
  }();
59103
59103
  exports2.VariableDeclarator = VariableDeclarator;
59104
59104
  var WhileStatement = function() {
59105
- function WhileStatement2(test, body) {
59105
+ function WhileStatement2(test2, body) {
59106
59106
  this.type = syntax_1.Syntax.WhileStatement;
59107
- this.test = test;
59107
+ this.test = test2;
59108
59108
  this.body = body;
59109
59109
  }
59110
59110
  return WhileStatement2;
@@ -60804,7 +60804,7 @@ var require_esprima = __commonJS({
60804
60804
  var alternate = null;
60805
60805
  this.expectKeyword("if");
60806
60806
  this.expect("(");
60807
- var test = this.parseExpression();
60807
+ var test2 = this.parseExpression();
60808
60808
  if (!this.match(")") && this.config.tolerant) {
60809
60809
  this.tolerateUnexpectedToken(this.nextToken());
60810
60810
  consequent = this.finalize(this.createNode(), new Node.EmptyStatement());
@@ -60816,7 +60816,7 @@ var require_esprima = __commonJS({
60816
60816
  alternate = this.parseIfClause();
60817
60817
  }
60818
60818
  }
60819
- return this.finalize(node, new Node.IfStatement(test, consequent, alternate));
60819
+ return this.finalize(node, new Node.IfStatement(test2, consequent, alternate));
60820
60820
  };
60821
60821
  Parser3.prototype.parseDoWhileStatement = function() {
60822
60822
  var node = this.createNode();
@@ -60827,7 +60827,7 @@ var require_esprima = __commonJS({
60827
60827
  this.context.inIteration = previousInIteration;
60828
60828
  this.expectKeyword("while");
60829
60829
  this.expect("(");
60830
- var test = this.parseExpression();
60830
+ var test2 = this.parseExpression();
60831
60831
  if (!this.match(")") && this.config.tolerant) {
60832
60832
  this.tolerateUnexpectedToken(this.nextToken());
60833
60833
  } else {
@@ -60836,14 +60836,14 @@ var require_esprima = __commonJS({
60836
60836
  this.nextToken();
60837
60837
  }
60838
60838
  }
60839
- return this.finalize(node, new Node.DoWhileStatement(body, test));
60839
+ return this.finalize(node, new Node.DoWhileStatement(body, test2));
60840
60840
  };
60841
60841
  Parser3.prototype.parseWhileStatement = function() {
60842
60842
  var node = this.createNode();
60843
60843
  var body;
60844
60844
  this.expectKeyword("while");
60845
60845
  this.expect("(");
60846
- var test = this.parseExpression();
60846
+ var test2 = this.parseExpression();
60847
60847
  if (!this.match(")") && this.config.tolerant) {
60848
60848
  this.tolerateUnexpectedToken(this.nextToken());
60849
60849
  body = this.finalize(this.createNode(), new Node.EmptyStatement());
@@ -60854,11 +60854,11 @@ var require_esprima = __commonJS({
60854
60854
  body = this.parseStatement();
60855
60855
  this.context.inIteration = previousInIteration;
60856
60856
  }
60857
- return this.finalize(node, new Node.WhileStatement(test, body));
60857
+ return this.finalize(node, new Node.WhileStatement(test2, body));
60858
60858
  };
60859
60859
  Parser3.prototype.parseForStatement = function() {
60860
60860
  var init = null;
60861
- var test = null;
60861
+ var test2 = null;
60862
60862
  var update = null;
60863
60863
  var forIn = true;
60864
60864
  var left, right;
@@ -60968,7 +60968,7 @@ var require_esprima = __commonJS({
60968
60968
  }
60969
60969
  if (typeof left === "undefined") {
60970
60970
  if (!this.match(";")) {
60971
- test = this.parseExpression();
60971
+ test2 = this.parseExpression();
60972
60972
  }
60973
60973
  this.expect(";");
60974
60974
  if (!this.match(")")) {
@@ -60986,7 +60986,7 @@ var require_esprima = __commonJS({
60986
60986
  body = this.isolateCoverGrammar(this.parseStatement);
60987
60987
  this.context.inIteration = previousInIteration;
60988
60988
  }
60989
- return typeof left === "undefined" ? this.finalize(node, new Node.ForStatement(init, test, update, body)) : forIn ? this.finalize(node, new Node.ForInStatement(left, right, body)) : this.finalize(node, new Node.ForOfStatement(left, right, body));
60989
+ return typeof left === "undefined" ? this.finalize(node, new Node.ForStatement(init, test2, update, body)) : forIn ? this.finalize(node, new Node.ForInStatement(left, right, body)) : this.finalize(node, new Node.ForOfStatement(left, right, body));
60990
60990
  };
60991
60991
  Parser3.prototype.parseContinueStatement = function() {
60992
60992
  var node = this.createNode();
@@ -61055,13 +61055,13 @@ var require_esprima = __commonJS({
61055
61055
  };
61056
61056
  Parser3.prototype.parseSwitchCase = function() {
61057
61057
  var node = this.createNode();
61058
- var test;
61058
+ var test2;
61059
61059
  if (this.matchKeyword("default")) {
61060
61060
  this.nextToken();
61061
- test = null;
61061
+ test2 = null;
61062
61062
  } else {
61063
61063
  this.expectKeyword("case");
61064
- test = this.parseExpression();
61064
+ test2 = this.parseExpression();
61065
61065
  }
61066
61066
  this.expect(":");
61067
61067
  var consequent = [];
@@ -61071,7 +61071,7 @@ var require_esprima = __commonJS({
61071
61071
  }
61072
61072
  consequent.push(this.parseStatementListItem());
61073
61073
  }
61074
- return this.finalize(node, new Node.SwitchCase(test, consequent));
61074
+ return this.finalize(node, new Node.SwitchCase(test2, consequent));
61075
61075
  };
61076
61076
  Parser3.prototype.parseSwitchStatement = function() {
61077
61077
  var node = this.createNode();
@@ -68876,7 +68876,7 @@ __export(src_exports, {
68876
68876
  module.exports = __toCommonJS(src_exports);
68877
68877
  var import_lodash14 = require("@modern-js/utils/lodash");
68878
68878
 
68879
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/logger/constants.js
68879
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/logger/constants.js
68880
68880
  var LoggerLevel;
68881
68881
  (function(LoggerLevel2) {
68882
68882
  LoggerLevel2["Error"] = "error";
@@ -68897,7 +68897,7 @@ var LevelPriority = [
68897
68897
  "stream"
68898
68898
  ];
68899
68899
 
68900
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/logger/index.js
68900
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/logger/index.js
68901
68901
  var import_utils = require("@modern-js/utils");
68902
68902
  var Logger = class {
68903
68903
  get currentLevelIndex() {
@@ -68958,22 +68958,22 @@ var Logger = class {
68958
68958
  }
68959
68959
  };
68960
68960
 
68961
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
68961
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
68962
68962
  var import_path7 = __toESM(require("path"));
68963
68963
 
68964
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
68964
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
68965
68965
  var import_events = require("events");
68966
68966
  var import_path4 = __toESM(require("path"));
68967
68967
 
68968
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
68968
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
68969
68969
  var import_path2 = __toESM(require("path"));
68970
68970
  var import_utils3 = require("@modern-js/utils");
68971
68971
 
68972
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
68972
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
68973
68973
  var import_path = __toESM(require("path"));
68974
68974
  var import_utils2 = require("@modern-js/utils");
68975
68975
 
68976
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/constants.js
68976
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/constants.js
68977
68977
  var IMAGE_EXT_LIST = [
68978
68978
  ".jpg",
68979
68979
  ".jpeg",
@@ -68987,7 +68987,7 @@ var IMAGE_EXT_LIST = [
68987
68987
  ".wmf"
68988
68988
  ];
68989
68989
 
68990
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
68990
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
68991
68991
  var FS_RESOURCE = "_codesmith_core_fs_resource";
68992
68992
  var FsResource = class {
68993
68993
  async value() {
@@ -69010,7 +69010,7 @@ var FsResource = class {
69010
69010
  }
69011
69011
  };
69012
69012
 
69013
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
69013
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
69014
69014
  var promisifyGlob = (pattern, options) => new Promise((resolve, reject) => {
69015
69015
  (0, import_utils3.glob)(pattern, options, (err, files) => err === null ? resolve(files) : reject(err));
69016
69016
  });
@@ -69035,11 +69035,11 @@ var FsMaterial = class {
69035
69035
  }
69036
69036
  };
69037
69037
 
69038
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
69038
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
69039
69039
  var import_path3 = __toESM(require("path"));
69040
69040
  var import_utils5 = require("@modern-js/utils");
69041
69041
 
69042
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
69042
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
69043
69043
  var import_utils4 = require("@modern-js/utils");
69044
69044
  async function fsExists(path17) {
69045
69045
  try {
@@ -69050,7 +69050,7 @@ async function fsExists(path17) {
69050
69050
  }
69051
69051
  }
69052
69052
 
69053
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
69053
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
69054
69054
  var MaxTimes = 5;
69055
69055
  async function getGeneratorDir(generator) {
69056
69056
  let result = generator;
@@ -69069,7 +69069,7 @@ async function getGeneratorDir(generator) {
69069
69069
  return result;
69070
69070
  }
69071
69071
 
69072
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/nodeRequire.js
69072
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/nodeRequire.js
69073
69073
  var nodeRequire = (path17) => {
69074
69074
  try {
69075
69075
  const module2 = __non_webpack_require__(path17);
@@ -69086,7 +69086,7 @@ var nodeRequire = (path17) => {
69086
69086
  }
69087
69087
  };
69088
69088
 
69089
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
69089
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
69090
69090
  var import_utils6 = require("@modern-js/utils");
69091
69091
  var GeneratorCore = class {
69092
69092
  get lifeCycleMethod() {
@@ -69286,10 +69286,10 @@ check path: ${import_utils6.chalk.blue.underline(generator)} exist a package.jso
69286
69286
  }
69287
69287
  };
69288
69288
 
69289
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
69289
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
69290
69290
  var import_path6 = __toESM(require("path"));
69291
69291
 
69292
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
69292
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
69293
69293
  var import_path5 = __toESM(require("path"));
69294
69294
  var import_utils7 = require("@modern-js/utils");
69295
69295
  async function canUseYarn() {
@@ -69369,7 +69369,7 @@ async function runInstall(targetDir, registryUrl, logger2) {
69369
69369
  }
69370
69370
  }
69371
69371
 
69372
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/timeoutPromise.js
69372
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/timeoutPromise.js
69373
69373
  async function timeoutPromise(promise, ms, reason = "Operation") {
69374
69374
  let timeoutId = null;
69375
69375
  const delayPromise = (ms2) => new Promise((resolve) => {
@@ -69391,24 +69391,24 @@ async function timeoutPromise(promise, ms, reason = "Operation") {
69391
69391
  }
69392
69392
  }
69393
69393
 
69394
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
69394
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
69395
69395
  var import_os = __toESM(require("os"));
69396
69396
 
69397
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/constants.js
69397
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/constants.js
69398
69398
  var NPM_API_TIMEOUT = 3e4;
69399
69399
  var CATCHE_VALIDITY_PREIOD = 12 * 3600 * 1e3;
69400
69400
 
69401
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
69402
- var import_utils33 = require("@modern-js/utils");
69401
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
69402
+ var import_utils36 = require("@modern-js/utils");
69403
69403
 
69404
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/bind.js
69404
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/bind.js
69405
69405
  function bind(fn, thisArg) {
69406
69406
  return function wrap() {
69407
69407
  return fn.apply(thisArg, arguments);
69408
69408
  };
69409
69409
  }
69410
69410
 
69411
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/utils.js
69411
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/utils.js
69412
69412
  var { toString } = Object.prototype;
69413
69413
  var { getPrototypeOf } = Object;
69414
69414
  var kindOf = ((cache) => (thing) => {
@@ -69458,6 +69458,7 @@ var isFormData = (thing) => {
69458
69458
  kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
69459
69459
  };
69460
69460
  var isURLSearchParams = kindOfTest("URLSearchParams");
69461
+ var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
69461
69462
  var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
69462
69463
  function forEach(obj, fn, { allOwnKeys = false } = {}) {
69463
69464
  if (obj === null || typeof obj === "undefined") {
@@ -69667,8 +69668,7 @@ var toObjectSet = (arrayOrString, delimiter) => {
69667
69668
  var noop = () => {
69668
69669
  };
69669
69670
  var toFiniteNumber = (value, defaultValue) => {
69670
- value = +value;
69671
- return Number.isFinite(value) ? value : defaultValue;
69671
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
69672
69672
  };
69673
69673
  var ALPHA = "abcdefghijklmnopqrstuvwxyz";
69674
69674
  var DIGIT = "0123456789";
@@ -69712,6 +69712,26 @@ var toJSONObject = (obj) => {
69712
69712
  };
69713
69713
  var isAsyncFn = kindOfTest("AsyncFunction");
69714
69714
  var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
69715
+ var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
69716
+ if (setImmediateSupported) {
69717
+ return setImmediate;
69718
+ }
69719
+ return postMessageSupported ? ((token, callbacks) => {
69720
+ _global.addEventListener("message", ({ source, data }) => {
69721
+ if (source === _global && data === token) {
69722
+ callbacks.length && callbacks.shift()();
69723
+ }
69724
+ }, false);
69725
+ return (cb) => {
69726
+ callbacks.push(cb);
69727
+ _global.postMessage(token, "*");
69728
+ };
69729
+ })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
69730
+ })(
69731
+ typeof setImmediate === "function",
69732
+ isFunction(_global.postMessage)
69733
+ );
69734
+ var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
69715
69735
  var utils_default = {
69716
69736
  isArray,
69717
69737
  isArrayBuffer,
@@ -69723,6 +69743,10 @@ var utils_default = {
69723
69743
  isBoolean,
69724
69744
  isObject,
69725
69745
  isPlainObject,
69746
+ isReadableStream,
69747
+ isRequest,
69748
+ isResponse,
69749
+ isHeaders,
69726
69750
  isUndefined,
69727
69751
  isDate,
69728
69752
  isFile,
@@ -69764,10 +69788,12 @@ var utils_default = {
69764
69788
  isSpecCompliantForm,
69765
69789
  toJSONObject,
69766
69790
  isAsyncFn,
69767
- isThenable
69791
+ isThenable,
69792
+ setImmediate: _setImmediate,
69793
+ asap
69768
69794
  };
69769
69795
 
69770
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/AxiosError.js
69796
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/AxiosError.js
69771
69797
  function AxiosError(message, code, config, request, response) {
69772
69798
  Error.call(this);
69773
69799
  if (Error.captureStackTrace) {
@@ -69839,11 +69865,11 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
69839
69865
  };
69840
69866
  var AxiosError_default = AxiosError;
69841
69867
 
69842
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/platform/node/classes/FormData.js
69868
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/platform/node/classes/FormData.js
69843
69869
  var import_form_data = __toESM(require_form_data());
69844
69870
  var FormData_default = import_form_data.default;
69845
69871
 
69846
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/toFormData.js
69872
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/toFormData.js
69847
69873
  function isVisitable(thing) {
69848
69874
  return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
69849
69875
  }
@@ -69958,7 +69984,7 @@ function toFormData(obj, formData, options) {
69958
69984
  }
69959
69985
  var toFormData_default = toFormData;
69960
69986
 
69961
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
69987
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
69962
69988
  function encode(str) {
69963
69989
  const charMap = {
69964
69990
  "!": "%21",
@@ -69991,7 +70017,7 @@ prototype2.toString = function toString2(encoder) {
69991
70017
  };
69992
70018
  var AxiosURLSearchParams_default = AxiosURLSearchParams;
69993
70019
 
69994
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/buildURL.js
70020
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/buildURL.js
69995
70021
  function encode2(val) {
69996
70022
  return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
69997
70023
  }
@@ -70017,7 +70043,7 @@ function buildURL(url2, params, options) {
70017
70043
  return url2;
70018
70044
  }
70019
70045
 
70020
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/InterceptorManager.js
70046
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/InterceptorManager.js
70021
70047
  var InterceptorManager = class {
70022
70048
  constructor() {
70023
70049
  this.handlers = [];
@@ -70081,18 +70107,18 @@ var InterceptorManager = class {
70081
70107
  };
70082
70108
  var InterceptorManager_default = InterceptorManager;
70083
70109
 
70084
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/defaults/transitional.js
70110
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/defaults/transitional.js
70085
70111
  var transitional_default = {
70086
70112
  silentJSONParsing: true,
70087
70113
  forcedJSONParsing: true,
70088
70114
  clarifyTimeoutError: false
70089
70115
  };
70090
70116
 
70091
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
70117
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
70092
70118
  var import_url = __toESM(require("url"));
70093
70119
  var URLSearchParams_default = import_url.default.URLSearchParams;
70094
70120
 
70095
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/platform/node/index.js
70121
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/platform/node/index.js
70096
70122
  var node_default = {
70097
70123
  isNode: true,
70098
70124
  classes: {
@@ -70103,12 +70129,13 @@ var node_default = {
70103
70129
  protocols: ["http", "https", "file", "data"]
70104
70130
  };
70105
70131
 
70106
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/platform/common/utils.js
70132
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/platform/common/utils.js
70107
70133
  var utils_exports = {};
70108
70134
  __export(utils_exports, {
70109
70135
  hasBrowserEnv: () => hasBrowserEnv,
70110
70136
  hasStandardBrowserEnv: () => hasStandardBrowserEnv,
70111
- hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv
70137
+ hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv,
70138
+ origin: () => origin
70112
70139
  });
70113
70140
  var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
70114
70141
  var hasStandardBrowserEnv = ((product) => {
@@ -70118,14 +70145,15 @@ var hasStandardBrowserWebWorkerEnv = (() => {
70118
70145
  return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
70119
70146
  self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
70120
70147
  })();
70148
+ var origin = hasBrowserEnv && window.location.href || "http://localhost";
70121
70149
 
70122
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/platform/index.js
70150
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/platform/index.js
70123
70151
  var platform_default = {
70124
70152
  ...utils_exports,
70125
70153
  ...node_default
70126
70154
  };
70127
70155
 
70128
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/toURLEncodedForm.js
70156
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/toURLEncodedForm.js
70129
70157
  function toURLEncodedForm(data, options) {
70130
70158
  return toFormData_default(data, new platform_default.classes.URLSearchParams(), Object.assign({
70131
70159
  visitor: function(value, key, path17, helpers) {
@@ -70138,7 +70166,7 @@ function toURLEncodedForm(data, options) {
70138
70166
  }, options));
70139
70167
  }
70140
70168
 
70141
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/formDataToJSON.js
70169
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/formDataToJSON.js
70142
70170
  function parsePropPath(name) {
70143
70171
  return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
70144
70172
  return match[0] === "[]" ? "" : match[1] || match[0];
@@ -70192,7 +70220,7 @@ function formDataToJSON(formData) {
70192
70220
  }
70193
70221
  var formDataToJSON_default = formDataToJSON;
70194
70222
 
70195
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/defaults/index.js
70223
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/defaults/index.js
70196
70224
  function stringifySafely(rawValue, parser, encoder) {
70197
70225
  if (utils_default.isString(rawValue)) {
70198
70226
  try {
@@ -70208,7 +70236,7 @@ function stringifySafely(rawValue, parser, encoder) {
70208
70236
  }
70209
70237
  var defaults = {
70210
70238
  transitional: transitional_default,
70211
- adapter: ["xhr", "http"],
70239
+ adapter: ["xhr", "http", "fetch"],
70212
70240
  transformRequest: [function transformRequest(data, headers) {
70213
70241
  const contentType = headers.getContentType() || "";
70214
70242
  const hasJSONContentType = contentType.indexOf("application/json") > -1;
@@ -70220,7 +70248,7 @@ var defaults = {
70220
70248
  if (isFormData2) {
70221
70249
  return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
70222
70250
  }
70223
- if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data)) {
70251
+ if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
70224
70252
  return data;
70225
70253
  }
70226
70254
  if (utils_default.isArrayBufferView(data)) {
@@ -70254,6 +70282,9 @@ var defaults = {
70254
70282
  const transitional2 = this.transitional || defaults.transitional;
70255
70283
  const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
70256
70284
  const JSONRequested = this.responseType === "json";
70285
+ if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
70286
+ return data;
70287
+ }
70257
70288
  if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
70258
70289
  const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
70259
70290
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
@@ -70298,7 +70329,7 @@ utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method
70298
70329
  });
70299
70330
  var defaults_default = defaults;
70300
70331
 
70301
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/parseHeaders.js
70332
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/parseHeaders.js
70302
70333
  var ignoreDuplicateOf = utils_default.toObjectSet([
70303
70334
  "age",
70304
70335
  "authorization",
@@ -70343,7 +70374,7 @@ var parseHeaders_default = (rawHeaders) => {
70343
70374
  return parsed;
70344
70375
  };
70345
70376
 
70346
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/AxiosHeaders.js
70377
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/AxiosHeaders.js
70347
70378
  var $internals = Symbol("internals");
70348
70379
  function normalizeHeader(header) {
70349
70380
  return header && String(header).trim().toLowerCase();
@@ -70417,6 +70448,10 @@ var AxiosHeaders = class {
70417
70448
  setHeaders(header, valueOrRewrite);
70418
70449
  } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
70419
70450
  setHeaders(parseHeaders_default(header), valueOrRewrite);
70451
+ } else if (utils_default.isHeaders(header)) {
70452
+ for (const [key, value] of header.entries()) {
70453
+ setHeader(value, key, rewrite);
70454
+ }
70420
70455
  } else {
70421
70456
  header != null && setHeader(valueOrRewrite, header, rewrite);
70422
70457
  }
@@ -70561,7 +70596,7 @@ utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
70561
70596
  utils_default.freezeMethods(AxiosHeaders);
70562
70597
  var AxiosHeaders_default = AxiosHeaders;
70563
70598
 
70564
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/transformData.js
70599
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/transformData.js
70565
70600
  function transformData(fns, response) {
70566
70601
  const config = this || defaults_default;
70567
70602
  const context = response || config;
@@ -70574,12 +70609,12 @@ function transformData(fns, response) {
70574
70609
  return data;
70575
70610
  }
70576
70611
 
70577
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/cancel/isCancel.js
70612
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/cancel/isCancel.js
70578
70613
  function isCancel(value) {
70579
70614
  return !!(value && value.__CANCEL__);
70580
70615
  }
70581
70616
 
70582
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/cancel/CanceledError.js
70617
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/cancel/CanceledError.js
70583
70618
  function CanceledError(message, config, request) {
70584
70619
  AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
70585
70620
  this.name = "CanceledError";
@@ -70589,7 +70624,7 @@ utils_default.inherits(CanceledError, AxiosError_default, {
70589
70624
  });
70590
70625
  var CanceledError_default = CanceledError;
70591
70626
 
70592
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/settle.js
70627
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/settle.js
70593
70628
  function settle(resolve, reject, response) {
70594
70629
  const validateStatus2 = response.config.validateStatus;
70595
70630
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
@@ -70605,17 +70640,17 @@ function settle(resolve, reject, response) {
70605
70640
  }
70606
70641
  }
70607
70642
 
70608
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/isAbsoluteURL.js
70643
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/isAbsoluteURL.js
70609
70644
  function isAbsoluteURL(url2) {
70610
70645
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
70611
70646
  }
70612
70647
 
70613
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/combineURLs.js
70648
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/combineURLs.js
70614
70649
  function combineURLs(baseURL, relativeURL) {
70615
70650
  return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
70616
70651
  }
70617
70652
 
70618
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/buildFullPath.js
70653
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/buildFullPath.js
70619
70654
  function buildFullPath(baseURL, requestedURL) {
70620
70655
  if (baseURL && !isAbsoluteURL(requestedURL)) {
70621
70656
  return combineURLs(baseURL, requestedURL);
@@ -70623,7 +70658,7 @@ function buildFullPath(baseURL, requestedURL) {
70623
70658
  return requestedURL;
70624
70659
  }
70625
70660
 
70626
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/adapters/http.js
70661
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/http.js
70627
70662
  var import_proxy_from_env = __toESM(require_proxy_from_env());
70628
70663
  var import_http = __toESM(require("http"));
70629
70664
  var import_https = __toESM(require("https"));
@@ -70631,16 +70666,16 @@ var import_util2 = __toESM(require("util"));
70631
70666
  var import_follow_redirects = __toESM(require_follow_redirects());
70632
70667
  var import_zlib = __toESM(require("zlib"));
70633
70668
 
70634
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/env/data.js
70635
- var VERSION = "1.6.7";
70669
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/env/data.js
70670
+ var VERSION = "1.7.4";
70636
70671
 
70637
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/parseProtocol.js
70672
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/parseProtocol.js
70638
70673
  function parseProtocol(url2) {
70639
70674
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
70640
70675
  return match && match[1] || "";
70641
70676
  }
70642
70677
 
70643
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/fromDataURI.js
70678
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/fromDataURI.js
70644
70679
  var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
70645
70680
  function fromDataURI(uri, asBlob, options) {
70646
70681
  const _Blob = options && options.Blob || platform_default.classes.Blob;
@@ -70669,75 +70704,11 @@ function fromDataURI(uri, asBlob, options) {
70669
70704
  throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
70670
70705
  }
70671
70706
 
70672
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/adapters/http.js
70707
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/http.js
70673
70708
  var import_stream4 = __toESM(require("stream"));
70674
70709
 
70675
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/AxiosTransformStream.js
70710
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/AxiosTransformStream.js
70676
70711
  var import_stream = __toESM(require("stream"));
70677
-
70678
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/throttle.js
70679
- function throttle(fn, freq) {
70680
- let timestamp = 0;
70681
- const threshold = 1e3 / freq;
70682
- let timer = null;
70683
- return function throttled(force, args) {
70684
- const now = Date.now();
70685
- if (force || now - timestamp > threshold) {
70686
- if (timer) {
70687
- clearTimeout(timer);
70688
- timer = null;
70689
- }
70690
- timestamp = now;
70691
- return fn.apply(null, args);
70692
- }
70693
- if (!timer) {
70694
- timer = setTimeout(() => {
70695
- timer = null;
70696
- timestamp = Date.now();
70697
- return fn.apply(null, args);
70698
- }, threshold - (now - timestamp));
70699
- }
70700
- };
70701
- }
70702
- var throttle_default = throttle;
70703
-
70704
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/speedometer.js
70705
- function speedometer(samplesCount, min) {
70706
- samplesCount = samplesCount || 10;
70707
- const bytes = new Array(samplesCount);
70708
- const timestamps = new Array(samplesCount);
70709
- let head = 0;
70710
- let tail = 0;
70711
- let firstSampleTS;
70712
- min = min !== void 0 ? min : 1e3;
70713
- return function push(chunkLength) {
70714
- const now = Date.now();
70715
- const startedAt = timestamps[tail];
70716
- if (!firstSampleTS) {
70717
- firstSampleTS = now;
70718
- }
70719
- bytes[head] = chunkLength;
70720
- timestamps[head] = now;
70721
- let i = tail;
70722
- let bytesCount = 0;
70723
- while (i !== head) {
70724
- bytesCount += bytes[i++];
70725
- i = i % samplesCount;
70726
- }
70727
- head = (head + 1) % samplesCount;
70728
- if (head === tail) {
70729
- tail = (tail + 1) % samplesCount;
70730
- }
70731
- if (now - firstSampleTS < min) {
70732
- return;
70733
- }
70734
- const passed = startedAt && now - startedAt;
70735
- return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
70736
- };
70737
- }
70738
- var speedometer_default = speedometer;
70739
-
70740
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/AxiosTransformStream.js
70741
70712
  var kInternals = Symbol("internals");
70742
70713
  var AxiosTransformStream = class extends import_stream.default.Transform {
70743
70714
  constructor(options) {
@@ -70754,11 +70725,8 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
70754
70725
  super({
70755
70726
  readableHighWaterMark: options.chunkSize
70756
70727
  });
70757
- const self3 = this;
70758
70728
  const internals = this[kInternals] = {
70759
- length: options.length,
70760
70729
  timeWindow: options.timeWindow,
70761
- ticksRate: options.ticksRate,
70762
70730
  chunkSize: options.chunkSize,
70763
70731
  maxRate: options.maxRate,
70764
70732
  minChunkSize: options.minChunkSize,
@@ -70769,7 +70737,6 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
70769
70737
  bytes: 0,
70770
70738
  onReadCallback: null
70771
70739
  };
70772
- const _speedometer = speedometer_default(internals.ticksRate * options.samplesCount, internals.timeWindow);
70773
70740
  this.on("newListener", (event) => {
70774
70741
  if (event === "progress") {
70775
70742
  if (!internals.isCaptured) {
@@ -70777,31 +70744,6 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
70777
70744
  }
70778
70745
  }
70779
70746
  });
70780
- let bytesNotified = 0;
70781
- internals.updateProgress = throttle_default(function throttledHandler() {
70782
- const totalBytes = internals.length;
70783
- const bytesTransferred = internals.bytesSeen;
70784
- const progressBytes = bytesTransferred - bytesNotified;
70785
- if (!progressBytes || self3.destroyed)
70786
- return;
70787
- const rate = _speedometer(progressBytes);
70788
- bytesNotified = bytesTransferred;
70789
- process.nextTick(() => {
70790
- self3.emit("progress", {
70791
- "loaded": bytesTransferred,
70792
- "total": totalBytes,
70793
- "progress": totalBytes ? bytesTransferred / totalBytes : void 0,
70794
- "bytes": progressBytes,
70795
- "rate": rate ? rate : void 0,
70796
- "estimated": rate && totalBytes && bytesTransferred <= totalBytes ? (totalBytes - bytesTransferred) / rate : void 0
70797
- });
70798
- });
70799
- }, internals.ticksRate);
70800
- const onFinish = () => {
70801
- internals.updateProgress(true);
70802
- };
70803
- this.once("end", onFinish);
70804
- this.once("error", onFinish);
70805
70747
  }
70806
70748
  _read(size) {
70807
70749
  const internals = this[kInternals];
@@ -70811,7 +70753,6 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
70811
70753
  return super._read(size);
70812
70754
  }
70813
70755
  _transform(chunk, encoding, callback) {
70814
- const self3 = this;
70815
70756
  const internals = this[kInternals];
70816
70757
  const maxRate = internals.maxRate;
70817
70758
  const readableHighWaterMark = this.readableHighWaterMark;
@@ -70819,14 +70760,12 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
70819
70760
  const divider = 1e3 / timeWindow;
70820
70761
  const bytesThreshold = maxRate / divider;
70821
70762
  const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
70822
- function pushChunk(_chunk, _callback) {
70763
+ const pushChunk = (_chunk, _callback) => {
70823
70764
  const bytes = Buffer.byteLength(_chunk);
70824
70765
  internals.bytesSeen += bytes;
70825
70766
  internals.bytes += bytes;
70826
- if (internals.isCaptured) {
70827
- internals.updateProgress();
70828
- }
70829
- if (self3.push(_chunk)) {
70767
+ internals.isCaptured && this.emit("progress", internals.bytesSeen);
70768
+ if (this.push(_chunk)) {
70830
70769
  process.nextTick(_callback);
70831
70770
  } else {
70832
70771
  internals.onReadCallback = () => {
@@ -70834,7 +70773,7 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
70834
70773
  process.nextTick(_callback);
70835
70774
  };
70836
70775
  }
70837
- }
70776
+ };
70838
70777
  const transformChunk = (_chunk, _callback) => {
70839
70778
  const chunkSize = Buffer.byteLength(_chunk);
70840
70779
  let chunkRemainder = null;
@@ -70880,21 +70819,17 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
70880
70819
  }
70881
70820
  });
70882
70821
  }
70883
- setLength(length) {
70884
- this[kInternals].length = +length;
70885
- return this;
70886
- }
70887
70822
  };
70888
70823
  var AxiosTransformStream_default = AxiosTransformStream;
70889
70824
 
70890
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/adapters/http.js
70891
- var import_events2 = __toESM(require("events"));
70825
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/http.js
70826
+ var import_events2 = require("events");
70892
70827
 
70893
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/formDataToStream.js
70828
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/formDataToStream.js
70894
70829
  var import_util = require("util");
70895
70830
  var import_stream2 = require("stream");
70896
70831
 
70897
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/readBlob.js
70832
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/readBlob.js
70898
70833
  var { asyncIterator } = Symbol;
70899
70834
  var readBlob = async function* (blob) {
70900
70835
  if (blob.stream) {
@@ -70909,7 +70844,7 @@ var readBlob = async function* (blob) {
70909
70844
  };
70910
70845
  var readBlob_default = readBlob;
70911
70846
 
70912
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/formDataToStream.js
70847
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/formDataToStream.js
70913
70848
  var BOUNDARY_ALPHABET = utils_default.ALPHABET.ALPHA_DIGIT + "-_";
70914
70849
  var textEncoder = new import_util.TextEncoder();
70915
70850
  var CRLF = "\r\n";
@@ -70988,7 +70923,7 @@ var formDataToStream = (form, headersHandler, options) => {
70988
70923
  };
70989
70924
  var formDataToStream_default = formDataToStream;
70990
70925
 
70991
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
70926
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
70992
70927
  var import_stream3 = __toESM(require("stream"));
70993
70928
  var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
70994
70929
  __transform(chunk, encoding, callback) {
@@ -71010,7 +70945,7 @@ var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
71010
70945
  };
71011
70946
  var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
71012
70947
 
71013
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/callbackify.js
70948
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/callbackify.js
71014
70949
  var callbackify = (fn, reducer) => {
71015
70950
  return utils_default.isAsyncFn(fn) ? function(...args) {
71016
70951
  const cb = args.pop();
@@ -71025,7 +70960,113 @@ var callbackify = (fn, reducer) => {
71025
70960
  };
71026
70961
  var callbackify_default = callbackify;
71027
70962
 
71028
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/adapters/http.js
70963
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/speedometer.js
70964
+ function speedometer(samplesCount, min) {
70965
+ samplesCount = samplesCount || 10;
70966
+ const bytes = new Array(samplesCount);
70967
+ const timestamps = new Array(samplesCount);
70968
+ let head = 0;
70969
+ let tail = 0;
70970
+ let firstSampleTS;
70971
+ min = min !== void 0 ? min : 1e3;
70972
+ return function push(chunkLength) {
70973
+ const now = Date.now();
70974
+ const startedAt = timestamps[tail];
70975
+ if (!firstSampleTS) {
70976
+ firstSampleTS = now;
70977
+ }
70978
+ bytes[head] = chunkLength;
70979
+ timestamps[head] = now;
70980
+ let i = tail;
70981
+ let bytesCount = 0;
70982
+ while (i !== head) {
70983
+ bytesCount += bytes[i++];
70984
+ i = i % samplesCount;
70985
+ }
70986
+ head = (head + 1) % samplesCount;
70987
+ if (head === tail) {
70988
+ tail = (tail + 1) % samplesCount;
70989
+ }
70990
+ if (now - firstSampleTS < min) {
70991
+ return;
70992
+ }
70993
+ const passed = startedAt && now - startedAt;
70994
+ return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
70995
+ };
70996
+ }
70997
+ var speedometer_default = speedometer;
70998
+
70999
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/throttle.js
71000
+ function throttle(fn, freq) {
71001
+ let timestamp = 0;
71002
+ let threshold = 1e3 / freq;
71003
+ let lastArgs;
71004
+ let timer;
71005
+ const invoke = (args, now = Date.now()) => {
71006
+ timestamp = now;
71007
+ lastArgs = null;
71008
+ if (timer) {
71009
+ clearTimeout(timer);
71010
+ timer = null;
71011
+ }
71012
+ fn.apply(null, args);
71013
+ };
71014
+ const throttled = (...args) => {
71015
+ const now = Date.now();
71016
+ const passed = now - timestamp;
71017
+ if (passed >= threshold) {
71018
+ invoke(args, now);
71019
+ } else {
71020
+ lastArgs = args;
71021
+ if (!timer) {
71022
+ timer = setTimeout(() => {
71023
+ timer = null;
71024
+ invoke(lastArgs);
71025
+ }, threshold - passed);
71026
+ }
71027
+ }
71028
+ };
71029
+ const flush = () => lastArgs && invoke(lastArgs);
71030
+ return [throttled, flush];
71031
+ }
71032
+ var throttle_default = throttle;
71033
+
71034
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/progressEventReducer.js
71035
+ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
71036
+ let bytesNotified = 0;
71037
+ const _speedometer = speedometer_default(50, 250);
71038
+ return throttle_default((e) => {
71039
+ const loaded = e.loaded;
71040
+ const total = e.lengthComputable ? e.total : void 0;
71041
+ const progressBytes = loaded - bytesNotified;
71042
+ const rate = _speedometer(progressBytes);
71043
+ const inRange = loaded <= total;
71044
+ bytesNotified = loaded;
71045
+ const data = {
71046
+ loaded,
71047
+ total,
71048
+ progress: total ? loaded / total : void 0,
71049
+ bytes: progressBytes,
71050
+ rate: rate ? rate : void 0,
71051
+ estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
71052
+ event: e,
71053
+ lengthComputable: total != null,
71054
+ [isDownloadStream ? "download" : "upload"]: true
71055
+ };
71056
+ listener(data);
71057
+ }, freq);
71058
+ };
71059
+ var progressEventDecorator = (total, throttled) => {
71060
+ const lengthComputable = total != null;
71061
+ return [(loaded) => throttled[0]({
71062
+ lengthComputable,
71063
+ total,
71064
+ loaded
71065
+ }), throttled[1]];
71066
+ };
71067
+ var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
71068
+
71069
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/http.js
71029
71070
  var zlibOptions = {
71030
71071
  flush: import_zlib.default.constants.Z_SYNC_FLUSH,
71031
71072
  finishFlush: import_zlib.default.constants.Z_SYNC_FLUSH
@@ -71040,6 +71081,10 @@ var isHttps = /https:?/;
71040
71081
  var supportedProtocols = platform_default.protocols.map((protocol) => {
71041
71082
  return protocol + ":";
71042
71083
  });
71084
+ var flushOnFinish = (stream4, [throttled, flush]) => {
71085
+ stream4.on("end", flush).on("error", flush);
71086
+ return throttled;
71087
+ };
71043
71088
  function dispatchBeforeRedirect(options, responseDetails) {
71044
71089
  if (options.beforeRedirects.proxy) {
71045
71090
  options.beforeRedirects.proxy(options);
@@ -71133,7 +71178,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
71133
71178
  });
71134
71179
  };
71135
71180
  }
71136
- const emitter = new import_events2.default();
71181
+ const emitter = new import_events2.EventEmitter();
71137
71182
  const onFinished = () => {
71138
71183
  if (config.cancelToken) {
71139
71184
  config.cancelToken.unsubscribe(abort);
@@ -71161,7 +71206,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
71161
71206
  }
71162
71207
  }
71163
71208
  const fullPath = buildFullPath(config.baseURL, config.url);
71164
- const parsed = new URL(fullPath, "http://localhost");
71209
+ const parsed = new URL(fullPath, utils_default.hasBrowserEnv ? platform_default.origin : void 0);
71165
71210
  const protocol = parsed.protocol || supportedProtocols[0];
71166
71211
  if (protocol === "data:") {
71167
71212
  let convertedData;
@@ -71205,8 +71250,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
71205
71250
  }
71206
71251
  const headers = AxiosHeaders_default.from(config.headers).normalize();
71207
71252
  headers.set("User-Agent", "axios/" + VERSION, false);
71208
- const onDownloadProgress = config.onDownloadProgress;
71209
- const onUploadProgress = config.onUploadProgress;
71253
+ const { onUploadProgress, onDownloadProgress } = config;
71210
71254
  const maxRate = config.maxRate;
71211
71255
  let maxUploadRate = void 0;
71212
71256
  let maxDownloadRate = void 0;
@@ -71265,14 +71309,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
71265
71309
  data = import_stream4.default.Readable.from(data, { objectMode: false });
71266
71310
  }
71267
71311
  data = import_stream4.default.pipeline([data, new AxiosTransformStream_default({
71268
- length: contentLength,
71269
71312
  maxRate: utils_default.toFiniteNumber(maxUploadRate)
71270
71313
  })], utils_default.noop);
71271
- onUploadProgress && data.on("progress", (progress) => {
71272
- onUploadProgress(Object.assign(progress, {
71273
- upload: true
71274
- }));
71275
- });
71314
+ onUploadProgress && data.on("progress", flushOnFinish(
71315
+ data,
71316
+ progressEventDecorator(
71317
+ contentLength,
71318
+ progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
71319
+ )
71320
+ ));
71276
71321
  }
71277
71322
  let auth = void 0;
71278
71323
  if (config.auth) {
@@ -71353,16 +71398,17 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
71353
71398
  return;
71354
71399
  const streams = [res];
71355
71400
  const responseLength = +res.headers["content-length"];
71356
- if (onDownloadProgress) {
71401
+ if (onDownloadProgress || maxDownloadRate) {
71357
71402
  const transformStream = new AxiosTransformStream_default({
71358
- length: utils_default.toFiniteNumber(responseLength),
71359
71403
  maxRate: utils_default.toFiniteNumber(maxDownloadRate)
71360
71404
  });
71361
- onDownloadProgress && transformStream.on("progress", (progress) => {
71362
- onDownloadProgress(Object.assign(progress, {
71363
- download: true
71364
- }));
71365
- });
71405
+ onDownloadProgress && transformStream.on("progress", flushOnFinish(
71406
+ transformStream,
71407
+ progressEventDecorator(
71408
+ responseLength,
71409
+ progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
71410
+ )
71411
+ ));
71366
71412
  streams.push(transformStream);
71367
71413
  }
71368
71414
  let responseStream = res;
@@ -71524,40 +71570,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
71524
71570
  });
71525
71571
  };
71526
71572
 
71527
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/cookies.js
71528
- var cookies_default = platform_default.hasStandardBrowserEnv ? (
71529
- // Standard browser envs support document.cookie
71530
- {
71531
- write(name, value, expires, path17, domain, secure) {
71532
- const cookie = [name + "=" + encodeURIComponent(value)];
71533
- utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
71534
- utils_default.isString(path17) && cookie.push("path=" + path17);
71535
- utils_default.isString(domain) && cookie.push("domain=" + domain);
71536
- secure === true && cookie.push("secure");
71537
- document.cookie = cookie.join("; ");
71538
- },
71539
- read(name) {
71540
- const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
71541
- return match ? decodeURIComponent(match[3]) : null;
71542
- },
71543
- remove(name) {
71544
- this.write(name, "", Date.now() - 864e5);
71545
- }
71546
- }
71547
- ) : (
71548
- // Non-standard browser env (web workers, react-native) lack needed support.
71549
- {
71550
- write() {
71551
- },
71552
- read() {
71553
- return null;
71554
- },
71555
- remove() {
71556
- }
71557
- }
71558
- );
71559
-
71560
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/isURLSameOrigin.js
71573
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/isURLSameOrigin.js
71561
71574
  var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? (
71562
71575
  // Standard browser envs have full support of the APIs needed to test
71563
71576
  // whether the request URL is of the same origin as current location.
@@ -71598,63 +71611,172 @@ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? (
71598
71611
  }()
71599
71612
  );
71600
71613
 
71601
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/adapters/xhr.js
71602
- function progressEventReducer(listener, isDownloadStream) {
71603
- let bytesNotified = 0;
71604
- const _speedometer = speedometer_default(50, 250);
71605
- return (e) => {
71606
- const loaded = e.loaded;
71607
- const total = e.lengthComputable ? e.total : void 0;
71608
- const progressBytes = loaded - bytesNotified;
71609
- const rate = _speedometer(progressBytes);
71610
- const inRange = loaded <= total;
71611
- bytesNotified = loaded;
71612
- const data = {
71613
- loaded,
71614
- total,
71615
- progress: total ? loaded / total : void 0,
71616
- bytes: progressBytes,
71617
- rate: rate ? rate : void 0,
71618
- estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
71619
- event: e
71620
- };
71621
- data[isDownloadStream ? "download" : "upload"] = true;
71622
- listener(data);
71614
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/cookies.js
71615
+ var cookies_default = platform_default.hasStandardBrowserEnv ? (
71616
+ // Standard browser envs support document.cookie
71617
+ {
71618
+ write(name, value, expires, path17, domain, secure) {
71619
+ const cookie = [name + "=" + encodeURIComponent(value)];
71620
+ utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
71621
+ utils_default.isString(path17) && cookie.push("path=" + path17);
71622
+ utils_default.isString(domain) && cookie.push("domain=" + domain);
71623
+ secure === true && cookie.push("secure");
71624
+ document.cookie = cookie.join("; ");
71625
+ },
71626
+ read(name) {
71627
+ const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
71628
+ return match ? decodeURIComponent(match[3]) : null;
71629
+ },
71630
+ remove(name) {
71631
+ this.write(name, "", Date.now() - 864e5);
71632
+ }
71633
+ }
71634
+ ) : (
71635
+ // Non-standard browser env (web workers, react-native) lack needed support.
71636
+ {
71637
+ write() {
71638
+ },
71639
+ read() {
71640
+ return null;
71641
+ },
71642
+ remove() {
71643
+ }
71644
+ }
71645
+ );
71646
+
71647
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/mergeConfig.js
71648
+ var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
71649
+ function mergeConfig(config1, config2) {
71650
+ config2 = config2 || {};
71651
+ const config = {};
71652
+ function getMergedValue(target, source, caseless) {
71653
+ if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
71654
+ return utils_default.merge.call({ caseless }, target, source);
71655
+ } else if (utils_default.isPlainObject(source)) {
71656
+ return utils_default.merge({}, source);
71657
+ } else if (utils_default.isArray(source)) {
71658
+ return source.slice();
71659
+ }
71660
+ return source;
71661
+ }
71662
+ function mergeDeepProperties(a, b, caseless) {
71663
+ if (!utils_default.isUndefined(b)) {
71664
+ return getMergedValue(a, b, caseless);
71665
+ } else if (!utils_default.isUndefined(a)) {
71666
+ return getMergedValue(void 0, a, caseless);
71667
+ }
71668
+ }
71669
+ function valueFromConfig2(a, b) {
71670
+ if (!utils_default.isUndefined(b)) {
71671
+ return getMergedValue(void 0, b);
71672
+ }
71673
+ }
71674
+ function defaultToConfig2(a, b) {
71675
+ if (!utils_default.isUndefined(b)) {
71676
+ return getMergedValue(void 0, b);
71677
+ } else if (!utils_default.isUndefined(a)) {
71678
+ return getMergedValue(void 0, a);
71679
+ }
71680
+ }
71681
+ function mergeDirectKeys(a, b, prop) {
71682
+ if (prop in config2) {
71683
+ return getMergedValue(a, b);
71684
+ } else if (prop in config1) {
71685
+ return getMergedValue(void 0, a);
71686
+ }
71687
+ }
71688
+ const mergeMap = {
71689
+ url: valueFromConfig2,
71690
+ method: valueFromConfig2,
71691
+ data: valueFromConfig2,
71692
+ baseURL: defaultToConfig2,
71693
+ transformRequest: defaultToConfig2,
71694
+ transformResponse: defaultToConfig2,
71695
+ paramsSerializer: defaultToConfig2,
71696
+ timeout: defaultToConfig2,
71697
+ timeoutMessage: defaultToConfig2,
71698
+ withCredentials: defaultToConfig2,
71699
+ withXSRFToken: defaultToConfig2,
71700
+ adapter: defaultToConfig2,
71701
+ responseType: defaultToConfig2,
71702
+ xsrfCookieName: defaultToConfig2,
71703
+ xsrfHeaderName: defaultToConfig2,
71704
+ onUploadProgress: defaultToConfig2,
71705
+ onDownloadProgress: defaultToConfig2,
71706
+ decompress: defaultToConfig2,
71707
+ maxContentLength: defaultToConfig2,
71708
+ maxBodyLength: defaultToConfig2,
71709
+ beforeRedirect: defaultToConfig2,
71710
+ transport: defaultToConfig2,
71711
+ httpAgent: defaultToConfig2,
71712
+ httpsAgent: defaultToConfig2,
71713
+ cancelToken: defaultToConfig2,
71714
+ socketPath: defaultToConfig2,
71715
+ responseEncoding: defaultToConfig2,
71716
+ validateStatus: mergeDirectKeys,
71717
+ headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
71623
71718
  };
71719
+ utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
71720
+ const merge9 = mergeMap[prop] || mergeDeepProperties;
71721
+ const configValue = merge9(config1[prop], config2[prop], prop);
71722
+ utils_default.isUndefined(configValue) && merge9 !== mergeDirectKeys || (config[prop] = configValue);
71723
+ });
71724
+ return config;
71624
71725
  }
71726
+
71727
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/resolveConfig.js
71728
+ var resolveConfig_default = (config) => {
71729
+ const newConfig = mergeConfig({}, config);
71730
+ let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
71731
+ newConfig.headers = headers = AxiosHeaders_default.from(headers);
71732
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
71733
+ if (auth) {
71734
+ headers.set(
71735
+ "Authorization",
71736
+ "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
71737
+ );
71738
+ }
71739
+ let contentType;
71740
+ if (utils_default.isFormData(data)) {
71741
+ if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
71742
+ headers.setContentType(void 0);
71743
+ } else if ((contentType = headers.getContentType()) !== false) {
71744
+ const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
71745
+ headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
71746
+ }
71747
+ }
71748
+ if (platform_default.hasStandardBrowserEnv) {
71749
+ withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
71750
+ if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
71751
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
71752
+ if (xsrfValue) {
71753
+ headers.set(xsrfHeaderName, xsrfValue);
71754
+ }
71755
+ }
71756
+ }
71757
+ return newConfig;
71758
+ };
71759
+
71760
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/xhr.js
71625
71761
  var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
71626
71762
  var xhr_default = isXHRAdapterSupported && function(config) {
71627
71763
  return new Promise(function dispatchXhrRequest(resolve, reject) {
71628
- let requestData = config.data;
71629
- const requestHeaders = AxiosHeaders_default.from(config.headers).normalize();
71630
- let { responseType, withXSRFToken } = config;
71764
+ const _config = resolveConfig_default(config);
71765
+ let requestData = _config.data;
71766
+ const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
71767
+ let { responseType, onUploadProgress, onDownloadProgress } = _config;
71631
71768
  let onCanceled;
71769
+ let uploadThrottled, downloadThrottled;
71770
+ let flushUpload, flushDownload;
71632
71771
  function done() {
71633
- if (config.cancelToken) {
71634
- config.cancelToken.unsubscribe(onCanceled);
71635
- }
71636
- if (config.signal) {
71637
- config.signal.removeEventListener("abort", onCanceled);
71638
- }
71639
- }
71640
- let contentType;
71641
- if (utils_default.isFormData(requestData)) {
71642
- if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
71643
- requestHeaders.setContentType(false);
71644
- } else if ((contentType = requestHeaders.getContentType()) !== false) {
71645
- const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
71646
- requestHeaders.setContentType([type || "multipart/form-data", ...tokens].join("; "));
71647
- }
71772
+ flushUpload && flushUpload();
71773
+ flushDownload && flushDownload();
71774
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
71775
+ _config.signal && _config.signal.removeEventListener("abort", onCanceled);
71648
71776
  }
71649
71777
  let request = new XMLHttpRequest();
71650
- if (config.auth) {
71651
- const username = config.auth.username || "";
71652
- const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
71653
- requestHeaders.set("Authorization", "Basic " + btoa(username + ":" + password));
71654
- }
71655
- const fullPath = buildFullPath(config.baseURL, config.url);
71656
- request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
71657
- request.timeout = config.timeout;
71778
+ request.open(_config.method.toUpperCase(), _config.url, true);
71779
+ request.timeout = _config.timeout;
71658
71780
  function onloadend() {
71659
71781
  if (!request) {
71660
71782
  return;
@@ -71705,10 +71827,10 @@ var xhr_default = isXHRAdapterSupported && function(config) {
71705
71827
  request = null;
71706
71828
  };
71707
71829
  request.ontimeout = function handleTimeout() {
71708
- let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
71709
- const transitional2 = config.transitional || transitional_default;
71710
- if (config.timeoutErrorMessage) {
71711
- timeoutErrorMessage = config.timeoutErrorMessage;
71830
+ let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
71831
+ const transitional2 = _config.transitional || transitional_default;
71832
+ if (_config.timeoutErrorMessage) {
71833
+ timeoutErrorMessage = _config.timeoutErrorMessage;
71712
71834
  }
71713
71835
  reject(new AxiosError_default(
71714
71836
  timeoutErrorMessage,
@@ -71718,34 +71840,28 @@ var xhr_default = isXHRAdapterSupported && function(config) {
71718
71840
  ));
71719
71841
  request = null;
71720
71842
  };
71721
- if (platform_default.hasStandardBrowserEnv) {
71722
- withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
71723
- if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(fullPath)) {
71724
- const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies_default.read(config.xsrfCookieName);
71725
- if (xsrfValue) {
71726
- requestHeaders.set(config.xsrfHeaderName, xsrfValue);
71727
- }
71728
- }
71729
- }
71730
71843
  requestData === void 0 && requestHeaders.setContentType(null);
71731
71844
  if ("setRequestHeader" in request) {
71732
71845
  utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
71733
71846
  request.setRequestHeader(key, val);
71734
71847
  });
71735
71848
  }
71736
- if (!utils_default.isUndefined(config.withCredentials)) {
71737
- request.withCredentials = !!config.withCredentials;
71849
+ if (!utils_default.isUndefined(_config.withCredentials)) {
71850
+ request.withCredentials = !!_config.withCredentials;
71738
71851
  }
71739
71852
  if (responseType && responseType !== "json") {
71740
- request.responseType = config.responseType;
71853
+ request.responseType = _config.responseType;
71741
71854
  }
71742
- if (typeof config.onDownloadProgress === "function") {
71743
- request.addEventListener("progress", progressEventReducer(config.onDownloadProgress, true));
71855
+ if (onDownloadProgress) {
71856
+ [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
71857
+ request.addEventListener("progress", downloadThrottled);
71744
71858
  }
71745
- if (typeof config.onUploadProgress === "function" && request.upload) {
71746
- request.upload.addEventListener("progress", progressEventReducer(config.onUploadProgress));
71859
+ if (onUploadProgress && request.upload) {
71860
+ [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
71861
+ request.upload.addEventListener("progress", uploadThrottled);
71862
+ request.upload.addEventListener("loadend", flushUpload);
71747
71863
  }
71748
- if (config.cancelToken || config.signal) {
71864
+ if (_config.cancelToken || _config.signal) {
71749
71865
  onCanceled = (cancel) => {
71750
71866
  if (!request) {
71751
71867
  return;
@@ -71754,12 +71870,12 @@ var xhr_default = isXHRAdapterSupported && function(config) {
71754
71870
  request.abort();
71755
71871
  request = null;
71756
71872
  };
71757
- config.cancelToken && config.cancelToken.subscribe(onCanceled);
71758
- if (config.signal) {
71759
- config.signal.aborted ? onCanceled() : config.signal.addEventListener("abort", onCanceled);
71873
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
71874
+ if (_config.signal) {
71875
+ _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
71760
71876
  }
71761
71877
  }
71762
- const protocol = parseProtocol(fullPath);
71878
+ const protocol = parseProtocol(_config.url);
71763
71879
  if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
71764
71880
  reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
71765
71881
  return;
@@ -71768,10 +71884,268 @@ var xhr_default = isXHRAdapterSupported && function(config) {
71768
71884
  });
71769
71885
  };
71770
71886
 
71771
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/adapters/adapters.js
71887
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/composeSignals.js
71888
+ var composeSignals = (signals, timeout) => {
71889
+ let controller = new AbortController();
71890
+ let aborted;
71891
+ const onabort = function(cancel) {
71892
+ if (!aborted) {
71893
+ aborted = true;
71894
+ unsubscribe();
71895
+ const err = cancel instanceof Error ? cancel : this.reason;
71896
+ controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
71897
+ }
71898
+ };
71899
+ let timer = timeout && setTimeout(() => {
71900
+ onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT));
71901
+ }, timeout);
71902
+ const unsubscribe = () => {
71903
+ if (signals) {
71904
+ timer && clearTimeout(timer);
71905
+ timer = null;
71906
+ signals.forEach((signal2) => {
71907
+ signal2 && (signal2.removeEventListener ? signal2.removeEventListener("abort", onabort) : signal2.unsubscribe(onabort));
71908
+ });
71909
+ signals = null;
71910
+ }
71911
+ };
71912
+ signals.forEach((signal2) => signal2 && signal2.addEventListener && signal2.addEventListener("abort", onabort));
71913
+ const { signal } = controller;
71914
+ signal.unsubscribe = unsubscribe;
71915
+ return [signal, () => {
71916
+ timer && clearTimeout(timer);
71917
+ timer = null;
71918
+ }];
71919
+ };
71920
+ var composeSignals_default = composeSignals;
71921
+
71922
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/trackStream.js
71923
+ var streamChunk = function* (chunk, chunkSize) {
71924
+ let len = chunk.byteLength;
71925
+ if (!chunkSize || len < chunkSize) {
71926
+ yield chunk;
71927
+ return;
71928
+ }
71929
+ let pos = 0;
71930
+ let end;
71931
+ while (pos < len) {
71932
+ end = pos + chunkSize;
71933
+ yield chunk.slice(pos, end);
71934
+ pos = end;
71935
+ }
71936
+ };
71937
+ var readBytes = async function* (iterable, chunkSize, encode3) {
71938
+ for await (const chunk of iterable) {
71939
+ yield* streamChunk(ArrayBuffer.isView(chunk) ? chunk : await encode3(String(chunk)), chunkSize);
71940
+ }
71941
+ };
71942
+ var trackStream = (stream4, chunkSize, onProgress, onFinish, encode3) => {
71943
+ const iterator = readBytes(stream4, chunkSize, encode3);
71944
+ let bytes = 0;
71945
+ let done;
71946
+ let _onFinish = (e) => {
71947
+ if (!done) {
71948
+ done = true;
71949
+ onFinish && onFinish(e);
71950
+ }
71951
+ };
71952
+ return new ReadableStream({
71953
+ async pull(controller) {
71954
+ try {
71955
+ const { done: done2, value } = await iterator.next();
71956
+ if (done2) {
71957
+ _onFinish();
71958
+ controller.close();
71959
+ return;
71960
+ }
71961
+ let len = value.byteLength;
71962
+ if (onProgress) {
71963
+ let loadedBytes = bytes += len;
71964
+ onProgress(loadedBytes);
71965
+ }
71966
+ controller.enqueue(new Uint8Array(value));
71967
+ } catch (err) {
71968
+ _onFinish(err);
71969
+ throw err;
71970
+ }
71971
+ },
71972
+ cancel(reason) {
71973
+ _onFinish(reason);
71974
+ return iterator.return();
71975
+ }
71976
+ }, {
71977
+ highWaterMark: 2
71978
+ });
71979
+ };
71980
+
71981
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/fetch.js
71982
+ var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
71983
+ var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
71984
+ var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
71985
+ var test = (fn, ...args) => {
71986
+ try {
71987
+ return !!fn(...args);
71988
+ } catch (e) {
71989
+ return false;
71990
+ }
71991
+ };
71992
+ var supportsRequestStream = isReadableStreamSupported && test(() => {
71993
+ let duplexAccessed = false;
71994
+ const hasContentType = new Request(platform_default.origin, {
71995
+ body: new ReadableStream(),
71996
+ method: "POST",
71997
+ get duplex() {
71998
+ duplexAccessed = true;
71999
+ return "half";
72000
+ }
72001
+ }).headers.has("Content-Type");
72002
+ return duplexAccessed && !hasContentType;
72003
+ });
72004
+ var DEFAULT_CHUNK_SIZE = 64 * 1024;
72005
+ var supportsResponseStream = isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
72006
+ var resolvers = {
72007
+ stream: supportsResponseStream && ((res) => res.body)
72008
+ };
72009
+ isFetchSupported && ((res) => {
72010
+ ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
72011
+ !resolvers[type] && (resolvers[type] = utils_default.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
72012
+ throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config);
72013
+ });
72014
+ });
72015
+ })(new Response());
72016
+ var getBodyLength = async (body) => {
72017
+ if (body == null) {
72018
+ return 0;
72019
+ }
72020
+ if (utils_default.isBlob(body)) {
72021
+ return body.size;
72022
+ }
72023
+ if (utils_default.isSpecCompliantForm(body)) {
72024
+ return (await new Request(body).arrayBuffer()).byteLength;
72025
+ }
72026
+ if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) {
72027
+ return body.byteLength;
72028
+ }
72029
+ if (utils_default.isURLSearchParams(body)) {
72030
+ body = body + "";
72031
+ }
72032
+ if (utils_default.isString(body)) {
72033
+ return (await encodeText(body)).byteLength;
72034
+ }
72035
+ };
72036
+ var resolveBodyLength = async (headers, body) => {
72037
+ const length = utils_default.toFiniteNumber(headers.getContentLength());
72038
+ return length == null ? getBodyLength(body) : length;
72039
+ };
72040
+ var fetch_default = isFetchSupported && (async (config) => {
72041
+ let {
72042
+ url: url2,
72043
+ method,
72044
+ data,
72045
+ signal,
72046
+ cancelToken,
72047
+ timeout,
72048
+ onDownloadProgress,
72049
+ onUploadProgress,
72050
+ responseType,
72051
+ headers,
72052
+ withCredentials = "same-origin",
72053
+ fetchOptions
72054
+ } = resolveConfig_default(config);
72055
+ responseType = responseType ? (responseType + "").toLowerCase() : "text";
72056
+ let [composedSignal, stopTimeout] = signal || cancelToken || timeout ? composeSignals_default([signal, cancelToken], timeout) : [];
72057
+ let finished, request;
72058
+ const onFinish = () => {
72059
+ !finished && setTimeout(() => {
72060
+ composedSignal && composedSignal.unsubscribe();
72061
+ });
72062
+ finished = true;
72063
+ };
72064
+ let requestContentLength;
72065
+ try {
72066
+ if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
72067
+ let _request = new Request(url2, {
72068
+ method: "POST",
72069
+ body: data,
72070
+ duplex: "half"
72071
+ });
72072
+ let contentTypeHeader;
72073
+ if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
72074
+ headers.setContentType(contentTypeHeader);
72075
+ }
72076
+ if (_request.body) {
72077
+ const [onProgress, flush] = progressEventDecorator(
72078
+ requestContentLength,
72079
+ progressEventReducer(asyncDecorator(onUploadProgress))
72080
+ );
72081
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush, encodeText);
72082
+ }
72083
+ }
72084
+ if (!utils_default.isString(withCredentials)) {
72085
+ withCredentials = withCredentials ? "include" : "omit";
72086
+ }
72087
+ request = new Request(url2, {
72088
+ ...fetchOptions,
72089
+ signal: composedSignal,
72090
+ method: method.toUpperCase(),
72091
+ headers: headers.normalize().toJSON(),
72092
+ body: data,
72093
+ duplex: "half",
72094
+ credentials: withCredentials
72095
+ });
72096
+ let response = await fetch(request);
72097
+ const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
72098
+ if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) {
72099
+ const options = {};
72100
+ ["status", "statusText", "headers"].forEach((prop) => {
72101
+ options[prop] = response[prop];
72102
+ });
72103
+ const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
72104
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
72105
+ responseContentLength,
72106
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
72107
+ ) || [];
72108
+ response = new Response(
72109
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
72110
+ flush && flush();
72111
+ isStreamResponse && onFinish();
72112
+ }, encodeText),
72113
+ options
72114
+ );
72115
+ }
72116
+ responseType = responseType || "text";
72117
+ let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
72118
+ !isStreamResponse && onFinish();
72119
+ stopTimeout && stopTimeout();
72120
+ return await new Promise((resolve, reject) => {
72121
+ settle(resolve, reject, {
72122
+ data: responseData,
72123
+ headers: AxiosHeaders_default.from(response.headers),
72124
+ status: response.status,
72125
+ statusText: response.statusText,
72126
+ config,
72127
+ request
72128
+ });
72129
+ });
72130
+ } catch (err) {
72131
+ onFinish();
72132
+ if (err && err.name === "TypeError" && /fetch/i.test(err.message)) {
72133
+ throw Object.assign(
72134
+ new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request),
72135
+ {
72136
+ cause: err.cause || err
72137
+ }
72138
+ );
72139
+ }
72140
+ throw AxiosError_default.from(err, err && err.code, config, request);
72141
+ }
72142
+ });
72143
+
72144
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/adapters/adapters.js
71772
72145
  var knownAdapters = {
71773
72146
  http: http_default,
71774
- xhr: xhr_default
72147
+ xhr: xhr_default,
72148
+ fetch: fetch_default
71775
72149
  };
71776
72150
  utils_default.forEach(knownAdapters, (fn, value) => {
71777
72151
  if (fn) {
@@ -71821,7 +72195,7 @@ var adapters_default = {
71821
72195
  adapters: knownAdapters
71822
72196
  };
71823
72197
 
71824
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/dispatchRequest.js
72198
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/dispatchRequest.js
71825
72199
  function throwIfCancellationRequested(config) {
71826
72200
  if (config.cancelToken) {
71827
72201
  config.cancelToken.throwIfRequested();
@@ -71866,87 +72240,7 @@ function dispatchRequest(config) {
71866
72240
  });
71867
72241
  }
71868
72242
 
71869
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/mergeConfig.js
71870
- var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? thing.toJSON() : thing;
71871
- function mergeConfig(config1, config2) {
71872
- config2 = config2 || {};
71873
- const config = {};
71874
- function getMergedValue(target, source, caseless) {
71875
- if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
71876
- return utils_default.merge.call({ caseless }, target, source);
71877
- } else if (utils_default.isPlainObject(source)) {
71878
- return utils_default.merge({}, source);
71879
- } else if (utils_default.isArray(source)) {
71880
- return source.slice();
71881
- }
71882
- return source;
71883
- }
71884
- function mergeDeepProperties(a, b, caseless) {
71885
- if (!utils_default.isUndefined(b)) {
71886
- return getMergedValue(a, b, caseless);
71887
- } else if (!utils_default.isUndefined(a)) {
71888
- return getMergedValue(void 0, a, caseless);
71889
- }
71890
- }
71891
- function valueFromConfig2(a, b) {
71892
- if (!utils_default.isUndefined(b)) {
71893
- return getMergedValue(void 0, b);
71894
- }
71895
- }
71896
- function defaultToConfig2(a, b) {
71897
- if (!utils_default.isUndefined(b)) {
71898
- return getMergedValue(void 0, b);
71899
- } else if (!utils_default.isUndefined(a)) {
71900
- return getMergedValue(void 0, a);
71901
- }
71902
- }
71903
- function mergeDirectKeys(a, b, prop) {
71904
- if (prop in config2) {
71905
- return getMergedValue(a, b);
71906
- } else if (prop in config1) {
71907
- return getMergedValue(void 0, a);
71908
- }
71909
- }
71910
- const mergeMap = {
71911
- url: valueFromConfig2,
71912
- method: valueFromConfig2,
71913
- data: valueFromConfig2,
71914
- baseURL: defaultToConfig2,
71915
- transformRequest: defaultToConfig2,
71916
- transformResponse: defaultToConfig2,
71917
- paramsSerializer: defaultToConfig2,
71918
- timeout: defaultToConfig2,
71919
- timeoutMessage: defaultToConfig2,
71920
- withCredentials: defaultToConfig2,
71921
- withXSRFToken: defaultToConfig2,
71922
- adapter: defaultToConfig2,
71923
- responseType: defaultToConfig2,
71924
- xsrfCookieName: defaultToConfig2,
71925
- xsrfHeaderName: defaultToConfig2,
71926
- onUploadProgress: defaultToConfig2,
71927
- onDownloadProgress: defaultToConfig2,
71928
- decompress: defaultToConfig2,
71929
- maxContentLength: defaultToConfig2,
71930
- maxBodyLength: defaultToConfig2,
71931
- beforeRedirect: defaultToConfig2,
71932
- transport: defaultToConfig2,
71933
- httpAgent: defaultToConfig2,
71934
- httpsAgent: defaultToConfig2,
71935
- cancelToken: defaultToConfig2,
71936
- socketPath: defaultToConfig2,
71937
- responseEncoding: defaultToConfig2,
71938
- validateStatus: mergeDirectKeys,
71939
- headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
71940
- };
71941
- utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
71942
- const merge9 = mergeMap[prop] || mergeDeepProperties;
71943
- const configValue = merge9(config1[prop], config2[prop], prop);
71944
- utils_default.isUndefined(configValue) && merge9 !== mergeDirectKeys || (config[prop] = configValue);
71945
- });
71946
- return config;
71947
- }
71948
-
71949
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/validator.js
72243
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/validator.js
71950
72244
  var validators = {};
71951
72245
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
71952
72246
  validators[type] = function validator(thing) {
@@ -72004,7 +72298,7 @@ var validator_default = {
72004
72298
  validators
72005
72299
  };
72006
72300
 
72007
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/Axios.js
72301
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/core/Axios.js
72008
72302
  var validators2 = validator_default.validators;
72009
72303
  var Axios = class {
72010
72304
  constructor(instanceConfig) {
@@ -72030,10 +72324,13 @@ var Axios = class {
72030
72324
  let dummy;
72031
72325
  Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
72032
72326
  const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
72033
- if (!err.stack) {
72034
- err.stack = stack;
72035
- } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
72036
- err.stack += "\n" + stack;
72327
+ try {
72328
+ if (!err.stack) {
72329
+ err.stack = stack;
72330
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
72331
+ err.stack += "\n" + stack;
72332
+ }
72333
+ } catch (e) {
72037
72334
  }
72038
72335
  }
72039
72336
  throw err;
@@ -72164,7 +72461,7 @@ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(m
72164
72461
  });
72165
72462
  var Axios_default = Axios;
72166
72463
 
72167
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/cancel/CancelToken.js
72464
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/cancel/CancelToken.js
72168
72465
  var CancelToken = class _CancelToken {
72169
72466
  constructor(executor) {
72170
72467
  if (typeof executor !== "function") {
@@ -72254,19 +72551,19 @@ var CancelToken = class _CancelToken {
72254
72551
  };
72255
72552
  var CancelToken_default = CancelToken;
72256
72553
 
72257
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/spread.js
72554
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/spread.js
72258
72555
  function spread(callback) {
72259
72556
  return function wrap(arr) {
72260
72557
  return callback.apply(null, arr);
72261
72558
  };
72262
72559
  }
72263
72560
 
72264
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/isAxiosError.js
72561
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/isAxiosError.js
72265
72562
  function isAxiosError(payload) {
72266
72563
  return utils_default.isObject(payload) && payload.isAxiosError === true;
72267
72564
  }
72268
72565
 
72269
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/HttpStatusCode.js
72566
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/HttpStatusCode.js
72270
72567
  var HttpStatusCode = {
72271
72568
  Continue: 100,
72272
72569
  SwitchingProtocols: 101,
@@ -72337,7 +72634,7 @@ Object.entries(HttpStatusCode).forEach(([key, value]) => {
72337
72634
  });
72338
72635
  var HttpStatusCode_default = HttpStatusCode;
72339
72636
 
72340
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/axios.js
72637
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/axios.js
72341
72638
  function createInstance(defaultConfig) {
72342
72639
  const context = new Axios_default(defaultConfig);
72343
72640
  const instance = bind(Axios_default.prototype.request, context);
@@ -72370,7 +72667,7 @@ axios.HttpStatusCode = HttpStatusCode_default;
72370
72667
  axios.default = axios;
72371
72668
  var axios_default = axios;
72372
72669
 
72373
- // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/index.js
72670
+ // ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/index.js
72374
72671
  var {
72375
72672
  Axios: Axios2,
72376
72673
  AxiosError: AxiosError2,
@@ -72390,11 +72687,11 @@ var {
72390
72687
  mergeConfig: mergeConfig2
72391
72688
  } = axios_default;
72392
72689
 
72393
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
72690
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
72394
72691
  var import_tar = __toESM(require_tar());
72395
72692
 
72396
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
72397
- var import_utils31 = require("@modern-js/utils");
72693
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
72694
+ var import_utils34 = require("@modern-js/utils");
72398
72695
  async function getNpmTarballUrl(pkgName, pkgVersion, options) {
72399
72696
  const { registryUrl } = options || {};
72400
72697
  const params = [
@@ -72407,7 +72704,7 @@ async function getNpmTarballUrl(pkgName, pkgVersion, options) {
72407
72704
  params.push("--registry");
72408
72705
  params.push(registryUrl);
72409
72706
  }
72410
- const getPkgInfoPromise = (0, import_utils31.execa)("npm", params);
72707
+ const getPkgInfoPromise = (0, import_utils34.execa)("npm", params);
72411
72708
  const { stdout } = await timeoutPromise(getPkgInfoPromise, NPM_API_TIMEOUT, `Get npm tarball of '${pkgName}'`);
72412
72709
  try {
72413
72710
  const pkgDistInfo = JSON.parse(stdout);
@@ -72417,8 +72714,8 @@ async function getNpmTarballUrl(pkgName, pkgVersion, options) {
72417
72714
  }
72418
72715
  }
72419
72716
 
72420
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmVersion.js
72421
- var import_utils32 = require("@modern-js/utils");
72717
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmVersion.js
72718
+ var import_utils35 = require("@modern-js/utils");
72422
72719
  async function getNpmVersion(packageName, options) {
72423
72720
  const { version, registryUrl } = options || {};
72424
72721
  const params = [
@@ -72434,15 +72731,15 @@ async function getNpmVersion(packageName, options) {
72434
72731
  params.push("--registry");
72435
72732
  params.push(registryUrl);
72436
72733
  }
72437
- const getPkgInfoPromise = (0, import_utils32.execa)("npm", params);
72734
+ const getPkgInfoPromise = (0, import_utils35.execa)("npm", params);
72438
72735
  const { stdout } = await timeoutPromise(getPkgInfoPromise, NPM_API_TIMEOUT, `Get npm version of '${packageName}'`);
72439
72736
  return stdout;
72440
72737
  }
72441
72738
 
72442
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
72739
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
72443
72740
  async function isValidCache(cacheDir) {
72444
72741
  if (await fsExists(`${cacheDir}/.codesmith.completed`)) {
72445
- const preCacheTimeStr = await import_utils33.fs.readFile(`${cacheDir}/.codesmith.completed`, {
72742
+ const preCacheTimeStr = await import_utils36.fs.readFile(`${cacheDir}/.codesmith.completed`, {
72446
72743
  encoding: "utf-8"
72447
72744
  });
72448
72745
  const preCacheTime = preCacheTimeStr ? new Date(preCacheTimeStr) : /* @__PURE__ */ new Date(0);
@@ -72465,7 +72762,7 @@ async function downloadAndDecompressTargz(tarballPkg, targetDir) {
72465
72762
  }
72466
72763
  const randomId = Math.floor(Math.random() * 1e4);
72467
72764
  const tempTgzFilePath = `${import_os.default.tmpdir()}/temp-${randomId}.tgz`;
72468
- const dest = import_utils33.fs.createWriteStream(tempTgzFilePath);
72765
+ const dest = import_utils36.fs.createWriteStream(tempTgzFilePath);
72469
72766
  await new Promise((resolve, reject) => {
72470
72767
  response.data.pipe(dest);
72471
72768
  response.data.on("error", (err) => {
@@ -72476,7 +72773,7 @@ async function downloadAndDecompressTargz(tarballPkg, targetDir) {
72476
72773
  });
72477
72774
  });
72478
72775
  await new Promise((resolve, reject) => {
72479
- import_utils33.fs.createReadStream(tempTgzFilePath).pipe(import_tar.default.x({
72776
+ import_utils36.fs.createReadStream(tempTgzFilePath).pipe(import_tar.default.x({
72480
72777
  strip: 1,
72481
72778
  C: `${targetDir}`
72482
72779
  })).on("finish", () => {
@@ -72490,7 +72787,7 @@ async function downloadPackage(pkgName, pkgVersion = "latest", options = {}) {
72490
72787
  var _logger_debug;
72491
72788
  const { registryUrl, install, logger: logger2 } = options;
72492
72789
  let version;
72493
- if (!import_utils33.semver.valid(pkgVersion)) {
72790
+ if (!import_utils36.semver.valid(pkgVersion)) {
72494
72791
  version = await getNpmVersion(pkgName, {
72495
72792
  registryUrl,
72496
72793
  version: pkgVersion
@@ -72506,8 +72803,8 @@ async function downloadPackage(pkgName, pkgVersion = "latest", options = {}) {
72506
72803
  if (await fsExists(targetDir) && await isValidCache(targetDir)) {
72507
72804
  return targetDir;
72508
72805
  }
72509
- await import_utils33.fs.remove(targetDir);
72510
- await import_utils33.fs.mkdirp(targetDir);
72806
+ await import_utils36.fs.remove(targetDir);
72807
+ await import_utils36.fs.mkdirp(targetDir);
72511
72808
  const tarballPkg = await getNpmTarballUrl(pkgName, version, {
72512
72809
  registryUrl
72513
72810
  });
@@ -72515,14 +72812,14 @@ async function downloadPackage(pkgName, pkgVersion = "latest", options = {}) {
72515
72812
  if (install) {
72516
72813
  await runInstall(targetDir, registryUrl, logger2);
72517
72814
  }
72518
- await import_utils33.fs.writeFile(`${targetDir}/.codesmith.completed`, (/* @__PURE__ */ new Date()).toISOString(), {
72815
+ await import_utils36.fs.writeFile(`${targetDir}/.codesmith.completed`, (/* @__PURE__ */ new Date()).toISOString(), {
72519
72816
  encoding: "utf-8"
72520
72817
  });
72521
72818
  return targetDir;
72522
72819
  }
72523
72820
 
72524
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/getPackageInfo.js
72525
- var import_utils34 = require("@modern-js/utils");
72821
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getPackageInfo.js
72822
+ var import_utils37 = require("@modern-js/utils");
72526
72823
  function getPackageInfo(packageName) {
72527
72824
  if (!packageName) {
72528
72825
  throw new Error("package is not exisit");
@@ -72531,7 +72828,7 @@ function getPackageInfo(packageName) {
72531
72828
  let pkgVersion = "latest";
72532
72829
  let pkgName = packageName;
72533
72830
  if (!packageName.startsWith("@") && splitAt.length === 2 || packageName.startsWith("@") && splitAt.length === 3) {
72534
- const semverValid = import_utils34.semver.valid(splitAt[splitAt.length - 1]);
72831
+ const semverValid = import_utils37.semver.valid(splitAt[splitAt.length - 1]);
72535
72832
  if (semverValid === null) {
72536
72833
  pkgVersion = splitAt[splitAt.length - 1];
72537
72834
  pkgName = packageName.slice(0, packageName.lastIndexOf("@"));
@@ -72546,7 +72843,7 @@ function getPackageInfo(packageName) {
72546
72843
  };
72547
72844
  }
72548
72845
 
72549
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
72846
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
72550
72847
  var MaterialsManager = class {
72551
72848
  loadLocalGenerator(generator) {
72552
72849
  if (!import_path6.default.isAbsolute(generator)) {
@@ -72574,7 +72871,7 @@ var MaterialsManager = class {
72574
72871
  }
72575
72872
  };
72576
72873
 
72577
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
72874
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
72578
72875
  var CodeSmith = class {
72579
72876
  async forge({ tasks, pwd }) {
72580
72877
  var _this_logger_timing, _this_logger;
@@ -72615,13 +72912,13 @@ var CodeSmith = class {
72615
72912
  }
72616
72913
  };
72617
72914
 
72618
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.0_@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
72915
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
72619
72916
  var import_ejs = __toESM(require_ejs());
72620
72917
  function renderString(template, fullData) {
72621
72918
  return import_ejs.default.render(template, fullData) || "";
72622
72919
  }
72623
72920
 
72624
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.0_@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
72921
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
72625
72922
  var EjsAPI = class {
72626
72923
  async renderTemplate(templateResource, target, parameters = {}) {
72627
72924
  if (templateResource._type !== FS_RESOURCE) {
@@ -72653,17 +72950,17 @@ var EjsAPI = class {
72653
72950
  }
72654
72951
  };
72655
72952
 
72656
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.0_@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
72953
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
72657
72954
  var import_path8 = __toESM(require("path"));
72658
- var import_utils37 = require("@modern-js/utils");
72955
+ var import_utils40 = require("@modern-js/utils");
72659
72956
  var FsAPI = class {
72660
72957
  async renderFile(resource, target) {
72661
72958
  if (resource._type !== FS_RESOURCE) {
72662
72959
  throw new Error("resource not match");
72663
72960
  }
72664
72961
  const filePath = import_path8.default.resolve(this.generatorCore.outputPath, target.toString());
72665
- await import_utils37.fs.mkdirp(import_path8.default.dirname(filePath));
72666
- await import_utils37.fs.copyFile(resource.filePath, filePath);
72962
+ await import_utils40.fs.mkdirp(import_path8.default.dirname(filePath));
72963
+ await import_utils40.fs.copyFile(resource.filePath, filePath);
72667
72964
  }
72668
72965
  async renderDir(material, findGlob, target, options) {
72669
72966
  const resourceMap = await material.find(findGlob, {
@@ -72680,11 +72977,11 @@ var FsAPI = class {
72680
72977
  }
72681
72978
  };
72682
72979
 
72683
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.0_@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
72684
- var import_utils38 = require("@modern-js/utils");
72980
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
72981
+ var import_utils41 = require("@modern-js/utils");
72685
72982
  async function canUseGit() {
72686
72983
  try {
72687
- await (0, import_utils38.execa)("git", [
72984
+ await (0, import_utils41.execa)("git", [
72688
72985
  "--version"
72689
72986
  ], {
72690
72987
  env: process.env
@@ -72696,7 +72993,7 @@ async function canUseGit() {
72696
72993
  }
72697
72994
  async function isInGitRepo(cwd) {
72698
72995
  try {
72699
- await (0, import_utils38.execa)("git", [
72996
+ await (0, import_utils41.execa)("git", [
72700
72997
  "rev-parse",
72701
72998
  "--is-inside-work-tree"
72702
72999
  ], {
@@ -72709,13 +73006,13 @@ async function isInGitRepo(cwd) {
72709
73006
  }
72710
73007
  }
72711
73008
  async function initGitRepo(cwd, defaultBranch) {
72712
- await (0, import_utils38.execa)("git", [
73009
+ await (0, import_utils41.execa)("git", [
72713
73010
  "init"
72714
73011
  ], {
72715
73012
  env: process.env,
72716
73013
  cwd
72717
73014
  });
72718
- const { stdout } = await (0, import_utils38.execa)("git", [
73015
+ const { stdout } = await (0, import_utils41.execa)("git", [
72719
73016
  "symbolic-ref",
72720
73017
  "--short",
72721
73018
  "HEAD"
@@ -72724,7 +73021,7 @@ async function initGitRepo(cwd, defaultBranch) {
72724
73021
  cwd
72725
73022
  });
72726
73023
  if (stdout !== defaultBranch) {
72727
- await (0, import_utils38.execa)("git", [
73024
+ await (0, import_utils41.execa)("git", [
72728
73025
  "checkout",
72729
73026
  "-b",
72730
73027
  defaultBranch
@@ -72735,7 +73032,7 @@ async function initGitRepo(cwd, defaultBranch) {
72735
73032
  }
72736
73033
  }
72737
73034
  async function gitAdd(cwd) {
72738
- await (0, import_utils38.execa)("git", [
73035
+ await (0, import_utils41.execa)("git", [
72739
73036
  "add",
72740
73037
  "-A"
72741
73038
  ], {
@@ -72744,7 +73041,7 @@ async function gitAdd(cwd) {
72744
73041
  });
72745
73042
  }
72746
73043
  async function gitCommit(cwd, commitMessage) {
72747
- await (0, import_utils38.execa)("git", [
73044
+ await (0, import_utils41.execa)("git", [
72748
73045
  "commit",
72749
73046
  "-m",
72750
73047
  commitMessage,
@@ -72755,7 +73052,7 @@ async function gitCommit(cwd, commitMessage) {
72755
73052
  });
72756
73053
  }
72757
73054
 
72758
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.0_@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
73055
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
72759
73056
  var GitAPI = class {
72760
73057
  async isInGitRepo(cwd = this.generatorCore.outputPath) {
72761
73058
  const canUse = await canUseGit();
@@ -72805,7 +73102,7 @@ var GitAPI = class {
72805
73102
  }
72806
73103
  };
72807
73104
 
72808
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.0_@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
73105
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
72809
73106
  var import_handlebars = __toESM(require_lib());
72810
73107
  function renderString2(template, fullData, registers) {
72811
73108
  const helpers = {
@@ -72819,7 +73116,7 @@ function renderString2(template, fullData, registers) {
72819
73116
  return import_handlebars.default.compile(template)(fullData) || "";
72820
73117
  }
72821
73118
 
72822
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.0_@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
73119
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
72823
73120
  var HandlebarsAPI = class {
72824
73121
  async registerHelp(helpers) {
72825
73122
  this.registers.helpers = {
@@ -72867,11 +73164,11 @@ var HandlebarsAPI = class {
72867
73164
  }
72868
73165
  };
72869
73166
 
72870
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.0/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
72871
- var import_utils41 = require("@modern-js/utils");
73167
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
73168
+ var import_utils44 = require("@modern-js/utils");
72872
73169
  async function canUseNvm() {
72873
73170
  try {
72874
- await (0, import_utils41.execa)("source ~/.nvm/nvm.sh", {
73171
+ await (0, import_utils44.execa)("source ~/.nvm/nvm.sh", {
72875
73172
  env: process.env,
72876
73173
  shell: true
72877
73174
  });
@@ -72882,7 +73179,7 @@ async function canUseNvm() {
72882
73179
  }
72883
73180
  async function canUseNpm() {
72884
73181
  try {
72885
- await (0, import_utils41.execa)("npm", [
73182
+ await (0, import_utils44.execa)("npm", [
72886
73183
  "--version"
72887
73184
  ], {
72888
73185
  env: process.env
@@ -72894,7 +73191,7 @@ async function canUseNpm() {
72894
73191
  }
72895
73192
  async function canUseYarn2() {
72896
73193
  try {
72897
- await (0, import_utils41.execa)("yarn", [
73194
+ await (0, import_utils44.execa)("yarn", [
72898
73195
  "--version"
72899
73196
  ], {
72900
73197
  env: process.env
@@ -72906,7 +73203,7 @@ async function canUseYarn2() {
72906
73203
  }
72907
73204
  async function canUsePnpm2() {
72908
73205
  try {
72909
- await (0, import_utils41.execa)("pnpm", [
73206
+ await (0, import_utils44.execa)("pnpm", [
72910
73207
  "--version"
72911
73208
  ], {
72912
73209
  env: process.env
@@ -72917,10 +73214,10 @@ async function canUsePnpm2() {
72917
73214
  }
72918
73215
  }
72919
73216
 
72920
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.0/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
72921
- var import_utils42 = require("@modern-js/utils");
73217
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
73218
+ var import_utils45 = require("@modern-js/utils");
72922
73219
  function execaWithStreamLog(command, args, options) {
72923
- const promise = (0, import_utils42.execa)(command, args, {
73220
+ const promise = (0, import_utils45.execa)(command, args, {
72924
73221
  ...options,
72925
73222
  stdin: "inherit",
72926
73223
  stdout: "inherit",
@@ -72929,7 +73226,7 @@ function execaWithStreamLog(command, args, options) {
72929
73226
  return promise;
72930
73227
  }
72931
73228
  async function runInstallWithNvm(command, options) {
72932
- await (0, import_utils42.execa)(`~/.nvm/nvm-exec ${command}`, {
73229
+ await (0, import_utils45.execa)(`~/.nvm/nvm-exec ${command}`, {
72933
73230
  ...options,
72934
73231
  shell: true,
72935
73232
  stdin: "inherit",
@@ -73013,7 +73310,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
73013
73310
  throw new Error("please install pnpm first");
73014
73311
  }
73015
73312
 
73016
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.0/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
73313
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
73017
73314
  var NpmAPI = class {
73018
73315
  npmInstall({ cwd, registryUrl, ignoreScripts }) {
73019
73316
  return npmInstall({
@@ -73041,7 +73338,7 @@ var NpmAPI = class {
73041
73338
  }
73042
73339
  };
73043
73340
 
73044
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
73341
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
73045
73342
  var import_lodash2 = require("@modern-js/utils/lodash");
73046
73343
 
73047
73344
  // ../../../../node_modules/.pnpm/@formily+shared@2.2.24/node_modules/@formily/shared/esm/checkers.js
@@ -82676,10 +82973,10 @@ var Schema = (
82676
82973
  }()
82677
82974
  );
82678
82975
 
82679
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
82976
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
82680
82977
  var import_inquirer = __toESM(require_inquirer());
82681
82978
 
82682
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
82979
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
82683
82980
  var import_lodash = require("@modern-js/utils/lodash");
82684
82981
  function validateSchema(schema) {
82685
82982
  const { type, properties } = schema;
@@ -82771,7 +83068,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
82771
83068
  return getQuestionFromSchema(schema, configValue, validateMap, initValue);
82772
83069
  }
82773
83070
 
82774
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
83071
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
82775
83072
  var compileRule = (rule, scope) => {
82776
83073
  const state = Schema.compile(rule, {
82777
83074
  $self: {},
@@ -82875,7 +83172,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
82875
83172
  return answers;
82876
83173
  }
82877
83174
 
82878
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
83175
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
82879
83176
  var CLIReader = class {
82880
83177
  getAnswers() {
82881
83178
  return this.answers;
@@ -82904,7 +83201,7 @@ var CLIReader = class {
82904
83201
  }
82905
83202
  };
82906
83203
 
82907
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
83204
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
82908
83205
  var FormilyAPI = class {
82909
83206
  mergeAnswers(answers, configValue) {
82910
83207
  const inputData = (0, import_lodash2.merge)(answers, configValue);
@@ -82926,8 +83223,8 @@ var FormilyAPI = class {
82926
83223
  }
82927
83224
  };
82928
83225
 
82929
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
82930
- var import_utils46 = require("@modern-js/utils");
83226
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
83227
+ var import_utils49 = require("@modern-js/utils");
82931
83228
  var import_lodash6 = require("@modern-js/utils/lodash");
82932
83229
  var import_comment_json = __toESM(require_src3());
82933
83230
  var import_inquirer3 = __toESM(require_inquirer2());
@@ -82995,7 +83292,7 @@ var I18n = class {
82995
83292
  }
82996
83293
  };
82997
83294
 
82998
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
83295
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
82999
83296
  var EN_LOCALE = {
83000
83297
  environment: {
83001
83298
  node_version: "please upgrade node to lts version",
@@ -83022,7 +83319,7 @@ var EN_LOCALE = {
83022
83319
  }
83023
83320
  };
83024
83321
 
83025
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
83322
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
83026
83323
  var ZH_LOCALE = {
83027
83324
  environment: {
83028
83325
  node_version: "请升级 Node 版本至 LIS",
@@ -83049,16 +83346,16 @@ var ZH_LOCALE = {
83049
83346
  }
83050
83347
  };
83051
83348
 
83052
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
83349
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
83053
83350
  var i18n = new I18n();
83054
83351
  var localeKeys = i18n.init("zh", {
83055
83352
  zh: ZH_LOCALE,
83056
83353
  en: EN_LOCALE
83057
83354
  });
83058
83355
 
83059
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
83356
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
83060
83357
  var import_path10 = __toESM(require("path"));
83061
- var import_utils45 = require("@modern-js/utils");
83358
+ var import_utils48 = require("@modern-js/utils");
83062
83359
  var NODE_MAJOR_VERSION_MAP = {
83063
83360
  "lts/*": 18,
83064
83361
  "lts/argon": 4,
@@ -83071,7 +83368,7 @@ var NODE_MAJOR_VERSION_MAP = {
83071
83368
  "lts/hydrogen": 18
83072
83369
  };
83073
83370
  async function getNoteVersion() {
83074
- const result = await (0, import_utils45.execa)("node", [
83371
+ const result = await (0, import_utils48.execa)("node", [
83075
83372
  "--version"
83076
83373
  ]);
83077
83374
  return result.stdout.slice(1);
@@ -83083,10 +83380,10 @@ async function checkUseNvm(cwd, logger2) {
83083
83380
  if (!await fsExists(import_path10.default.join(cwd, ".nvmrc"))) {
83084
83381
  return false;
83085
83382
  }
83086
- const nvmrcContent = (await import_utils45.fs.readFile(import_path10.default.join(cwd, ".nvmrc"), "utf-8")).replace("\n", "");
83383
+ const nvmrcContent = (await import_utils48.fs.readFile(import_path10.default.join(cwd, ".nvmrc"), "utf-8")).replace("\n", "");
83087
83384
  const expectNodeVersion = NODE_MAJOR_VERSION_MAP[nvmrcContent] || nvmrcContent;
83088
83385
  const currentNodeVersion = await getNoteVersion();
83089
- if (expectNodeVersion === import_utils45.semver.major(currentNodeVersion)) {
83386
+ if (expectNodeVersion === import_utils48.semver.major(currentNodeVersion)) {
83090
83387
  return false;
83091
83388
  }
83092
83389
  if (!await canUseNvm()) {
@@ -83104,7 +83401,7 @@ async function checkUseNvm(cwd, logger2) {
83104
83401
  }
83105
83402
  }
83106
83403
 
83107
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
83404
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
83108
83405
  var import_lodash5 = require("@modern-js/utils/lodash");
83109
83406
  function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
83110
83407
  for (const question of questions) {
@@ -83132,10 +83429,10 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
83132
83429
  return questions;
83133
83430
  }
83134
83431
 
83135
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
83432
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
83136
83433
  var AppAPI = class {
83137
83434
  async checkEnvironment(nodeVersion) {
83138
- if (import_utils46.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
83435
+ if (import_utils49.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
83139
83436
  this.generatorCore.logger.warn(i18n.t(localeKeys.environment.node_version));
83140
83437
  return false;
83141
83438
  }
@@ -83158,7 +83455,7 @@ var AppAPI = class {
83158
83455
  }
83159
83456
  let intallPromise;
83160
83457
  if (command) {
83161
- intallPromise = (0, import_utils46.execa)(command, [], {
83458
+ intallPromise = (0, import_utils49.execa)(command, [], {
83162
83459
  shell: true,
83163
83460
  stdin: "inherit",
83164
83461
  stdout: "inherit",
@@ -83289,17 +83586,17 @@ var AppAPI = class {
83289
83586
  }
83290
83587
  async updateWorkspace(folder, workspaceName = "monorepo.code-workspace") {
83291
83588
  const { filePath } = this.generatorContext.materials.default.get(workspaceName);
83292
- if (!import_utils46.fs.existsSync(filePath)) {
83589
+ if (!import_utils49.fs.existsSync(filePath)) {
83293
83590
  return;
83294
83591
  }
83295
- const content = await import_utils46.fs.readFile(filePath);
83592
+ const content = await import_utils49.fs.readFile(filePath);
83296
83593
  const workspace = (0, import_comment_json.parse)(content.toString());
83297
83594
  workspace.folders = [
83298
83595
  folder,
83299
83596
  ...workspace.folders || []
83300
83597
  ];
83301
83598
  const indent = 2;
83302
- await import_utils46.fs.writeFile(filePath, (0, import_comment_json.stringify)(workspace, null, indent), {
83599
+ await import_utils49.fs.writeFile(filePath, (0, import_comment_json.stringify)(workspace, null, indent), {
83303
83600
  encoding: "utf-8"
83304
83601
  });
83305
83602
  }
@@ -84236,7 +84533,7 @@ var SolutionSchemas = {
84236
84533
 
84237
84534
  // ../../generator-utils/dist/esm/index.js
84238
84535
  var import_path12 = __toESM(require("path"));
84239
- var import_utils49 = require("@modern-js/utils");
84536
+ var import_utils52 = require("@modern-js/utils");
84240
84537
 
84241
84538
  // ../../generator-utils/dist/esm/utils/stripAnsi.js
84242
84539
  function ansiRegex2({ onlyFirst = false } = {}) {
@@ -84281,9 +84578,9 @@ var localeKeys3 = i18n3.init("en", {
84281
84578
  });
84282
84579
 
84283
84580
  // ../../generator-utils/dist/esm/utils/package.js
84284
- var import_utils48 = require("@modern-js/utils");
84581
+ var import_utils51 = require("@modern-js/utils");
84285
84582
  async function isPackageExist(packageName, registry2) {
84286
- if (await (0, import_utils48.canUseNpm)()) {
84583
+ if (await (0, import_utils51.canUseNpm)()) {
84287
84584
  try {
84288
84585
  const args = [
84289
84586
  "view",
@@ -84293,8 +84590,8 @@ async function isPackageExist(packageName, registry2) {
84293
84590
  if (registry2) {
84294
84591
  args.push(`--registry=${registry2}`);
84295
84592
  }
84296
- const result = await (0, import_utils48.execa)("npm", args);
84297
- return (0, import_utils48.stripAnsi)(result.stdout);
84593
+ const result = await (0, import_utils51.execa)("npm", args);
84594
+ return (0, import_utils51.stripAnsi)(result.stdout);
84298
84595
  } catch (e) {
84299
84596
  return false;
84300
84597
  }
@@ -84302,7 +84599,7 @@ async function isPackageExist(packageName, registry2) {
84302
84599
  throw new Error("not found npm, please install npm before");
84303
84600
  }
84304
84601
  async function isPackageDeprecated(packageName, registry2) {
84305
- if (await (0, import_utils48.canUseNpm)()) {
84602
+ if (await (0, import_utils51.canUseNpm)()) {
84306
84603
  const args = [
84307
84604
  "view",
84308
84605
  packageName,
@@ -84311,13 +84608,13 @@ async function isPackageDeprecated(packageName, registry2) {
84311
84608
  if (registry2) {
84312
84609
  args.push(`--registry=${registry2}`);
84313
84610
  }
84314
- const result = await (0, import_utils48.execa)("npm", args);
84315
- return (0, import_utils48.stripAnsi)(result.stdout);
84611
+ const result = await (0, import_utils51.execa)("npm", args);
84612
+ return (0, import_utils51.stripAnsi)(result.stdout);
84316
84613
  }
84317
84614
  throw new Error("not found npm, please install npm before");
84318
84615
  }
84319
84616
  function semverDecrease(version) {
84320
- const versionObj = import_utils48.semver.parse(version, {
84617
+ const versionObj = import_utils51.semver.parse(version, {
84321
84618
  loose: true
84322
84619
  });
84323
84620
  if (!versionObj) {
@@ -84327,8 +84624,8 @@ function semverDecrease(version) {
84327
84624
  versionObj.prerelease = [];
84328
84625
  versionObj.patch--;
84329
84626
  const result = versionObj.format();
84330
- if (!import_utils48.semver.valid(result)) {
84331
- import_utils48.logger.debug(`Version ${result} is not valid semver`);
84627
+ if (!import_utils51.semver.valid(result)) {
84628
+ import_utils51.logger.debug(`Version ${result} is not valid semver`);
84332
84629
  return version;
84333
84630
  }
84334
84631
  return result;
@@ -84338,7 +84635,7 @@ async function getAvailableVersion(packageName, currentVersion, registry2) {
84338
84635
  let version = currentVersion;
84339
84636
  while (times) {
84340
84637
  if (!await isPackageExist(`${packageName}@${version}`, registry2) || await isPackageDeprecated(`${packageName}@${version}`, registry2)) {
84341
- version = import_utils48.semver.inc(version, "patch");
84638
+ version = import_utils51.semver.inc(version, "patch");
84342
84639
  times--;
84343
84640
  continue;
84344
84641
  }
@@ -84372,13 +84669,13 @@ var getGeneratorPath = (generator, distTag, paths) => {
84372
84669
  };
84373
84670
 
84374
84671
  // ../../generator-utils/dist/esm/index.js
84375
- var import_utils50 = require("@modern-js/utils");
84672
+ var import_utils53 = require("@modern-js/utils");
84376
84673
  async function getPackageVersion(packageName, registry2) {
84377
- const spinner = (0, import_utils49.ora)({
84674
+ const spinner = (0, import_utils52.ora)({
84378
84675
  text: "Load Generator...",
84379
84676
  spinner: "runner"
84380
84677
  }).start();
84381
- if (await (0, import_utils49.canUsePnpm)()) {
84678
+ if (await (0, import_utils52.canUsePnpm)()) {
84382
84679
  const args = [
84383
84680
  "info",
84384
84681
  packageName,
@@ -84387,11 +84684,11 @@ async function getPackageVersion(packageName, registry2) {
84387
84684
  if (registry2) {
84388
84685
  args.push(`--registry=${registry2}`);
84389
84686
  }
84390
- const result = await (0, import_utils49.execa)("pnpm", args);
84687
+ const result = await (0, import_utils52.execa)("pnpm", args);
84391
84688
  spinner.stop();
84392
84689
  return stripAnsi2(result.stdout);
84393
84690
  }
84394
- if (await (0, import_utils49.canUseNpm)()) {
84691
+ if (await (0, import_utils52.canUseNpm)()) {
84395
84692
  const args = [
84396
84693
  "view",
84397
84694
  packageName,
@@ -84400,7 +84697,7 @@ async function getPackageVersion(packageName, registry2) {
84400
84697
  if (registry2) {
84401
84698
  args.push(`--registry=${registry2}`);
84402
84699
  }
84403
- const result = await (0, import_utils49.execa)("npm", args);
84700
+ const result = await (0, import_utils52.execa)("npm", args);
84404
84701
  spinner.stop();
84405
84702
  return stripAnsi2(result.stdout);
84406
84703
  }
@@ -84430,8 +84727,8 @@ async function getModernPluginVersion(solution, packageName, options = {
84430
84727
  ]
84431
84728
  }), "../..", "package.json");
84432
84729
  }
84433
- if (import_utils49.fs.existsSync(pkgPath)) {
84434
- const pkgInfo = import_utils49.fs.readJSONSync(pkgPath);
84730
+ if (import_utils52.fs.existsSync(pkgPath)) {
84731
+ const pkgInfo = import_utils52.fs.readJSONSync(pkgPath);
84435
84732
  const modernVersion = pkgInfo.version;
84436
84733
  if (typeof modernVersion !== "string") {
84437
84734
  return getLatetPluginVersion();
@@ -84644,11 +84941,11 @@ function _create_class(Constructor, protoProps, staticProps) {
84644
84941
  // ../../generator-plugin/dist/esm/context/file.js
84645
84942
  var import_path14 = __toESM(require("path"));
84646
84943
 
84647
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.0/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
84944
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
84648
84945
  var import_comment_json2 = __toESM(require_src3());
84649
84946
  var declarationUpdate = __toESM(require_dist());
84650
84947
 
84651
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.0/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
84948
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
84652
84949
  async function editJson(generatorCore, resource, getNewJsonValue) {
84653
84950
  const originJsonValue = await resource.value();
84654
84951
  const newJsonString = await getNewJsonValue(originJsonValue.content);
@@ -84661,13 +84958,13 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
84661
84958
  return newJsonString;
84662
84959
  }
84663
84960
 
84664
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.0/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
84961
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
84665
84962
  var JsonAPI = class {
84666
84963
  async get(resource) {
84667
84964
  const originJsonValue = await resource.value();
84668
84965
  try {
84669
- const origin = import_comment_json2.default.parse(originJsonValue.content);
84670
- return origin;
84966
+ const origin2 = import_comment_json2.default.parse(originJsonValue.content);
84967
+ return origin2;
84671
84968
  } catch (e) {
84672
84969
  this.generatorCore.logger.debug("[JSON API] parse json error:", e);
84673
84970
  throw new Error("resource content is not a legal json");
@@ -84677,8 +84974,8 @@ var JsonAPI = class {
84677
84974
  await editJson(this.generatorCore, resource, async () => {
84678
84975
  const originJsonValue = await resource.value();
84679
84976
  try {
84680
- const origin = import_comment_json2.default.parse(originJsonValue.content);
84681
- const newObj = import_comment_json2.default.assign(origin, obj);
84977
+ const origin2 = import_comment_json2.default.parse(originJsonValue.content);
84978
+ const newObj = import_comment_json2.default.assign(origin2, obj);
84682
84979
  const jsonIntent = 2;
84683
84980
  return import_comment_json2.default.stringify(newObj, void 0, jsonIntent);
84684
84981
  } catch (e) {
@@ -84707,7 +85004,7 @@ var JsonAPI = class {
84707
85004
 
84708
85005
  // ../../generator-plugin/dist/esm/utils/file.js
84709
85006
  var import_path13 = __toESM(require("path"));
84710
- var import_utils52 = require("@modern-js/utils");
85007
+ var import_utils55 = require("@modern-js/utils");
84711
85008
  var FileType;
84712
85009
  (function(FileType22) {
84713
85010
  FileType22["Text"] = "text";
@@ -84732,7 +85029,7 @@ function _fileExists() {
84732
85029
  ]);
84733
85030
  return [
84734
85031
  4,
84735
- import_utils50.fs.access(filePath)
85032
+ import_utils53.fs.access(filePath)
84736
85033
  ];
84737
85034
  case 1:
84738
85035
  _state.sent();
@@ -84766,7 +85063,7 @@ function dropFileRootPath(file, rootPath) {
84766
85063
  }
84767
85064
  function isAbsoluteOrRelativeFileTo(relativePath) {
84768
85065
  var isFile2 = function(file) {
84769
- return import_utils50.fs.existsSync(file) && import_utils50.fs.lstatSync(file).isFile();
85066
+ return import_utils53.fs.existsSync(file) && import_utils53.fs.lstatSync(file).isFile();
84770
85067
  };
84771
85068
  return function(fileName) {
84772
85069
  return isFile2(fileName) || isFile2(import_path13.default.join(relativePath, fileName));
@@ -84793,7 +85090,7 @@ function _addFile() {
84793
85090
  }
84794
85091
  return [
84795
85092
  4,
84796
- import_utils50.fs.mkdir(import_path13.default.dirname(fileDestPath), {
85093
+ import_utils53.fs.mkdir(import_path13.default.dirname(fileDestPath), {
84797
85094
  recursive: true
84798
85095
  })
84799
85096
  ];
@@ -84807,13 +85104,13 @@ function _addFile() {
84807
85104
  ];
84808
85105
  return [
84809
85106
  4,
84810
- import_utils50.fs.readFile(absTemplatePath)
85107
+ import_utils53.fs.readFile(absTemplatePath)
84811
85108
  ];
84812
85109
  case 3:
84813
85110
  rawTemplate = _state.sent();
84814
85111
  return [
84815
85112
  4,
84816
- import_utils50.fs.writeFile(fileDestPath, rawTemplate)
85113
+ import_utils53.fs.writeFile(fileDestPath, rawTemplate)
84817
85114
  ];
84818
85115
  case 4:
84819
85116
  _state.sent();
@@ -84830,7 +85127,7 @@ function _addFile() {
84830
85127
  ];
84831
85128
  return [
84832
85129
  4,
84833
- import_utils50.fs.readFile(absTemplatePath, "utf8")
85130
+ import_utils53.fs.readFile(absTemplatePath, "utf8")
84834
85131
  ];
84835
85132
  case 6:
84836
85133
  template = _state.sent();
@@ -84838,7 +85135,7 @@ function _addFile() {
84838
85135
  case 7:
84839
85136
  return [
84840
85137
  4,
84841
- import_utils50.fs.writeFile(fileDestPath, renderString3(template, config.data || {}, ((_config_templateFile = config.templateFile) === null || _config_templateFile === void 0 ? void 0 : _config_templateFile.endsWith(".ejs")) ? "ejs" : "handlebars"), "utf8")
85138
+ import_utils53.fs.writeFile(fileDestPath, renderString3(template, config.data || {}, ((_config_templateFile = config.templateFile) === null || _config_templateFile === void 0 ? void 0 : _config_templateFile.endsWith(".ejs")) ? "ejs" : "handlebars"), "utf8")
84842
85139
  ];
84843
85140
  case 8:
84844
85141
  _state.sent();
@@ -84872,7 +85169,7 @@ function _addManyFiles() {
84872
85169
  return import_path13.default.join(templatePath, templateFile2);
84873
85170
  });
84874
85171
  config.templateBase = ((_config_templateBase = config.templateBase) === null || _config_templateBase === void 0 ? void 0 : _config_templateBase.startsWith(import_path13.default.sep)) ? config.templateBase : "".concat(import_path13.default.sep).concat(config.templateBase || "");
84875
- templateFiles = import_utils52.globby.sync(config.templateFiles, {
85172
+ templateFiles = import_utils55.globby.sync(config.templateFiles, {
84876
85173
  braceExpansion: false,
84877
85174
  dot: config.dot
84878
85175
  }).map(function(filePath) {
@@ -85139,14 +85436,14 @@ var PluginFileAPI = /* @__PURE__ */ function() {
85139
85436
  case 0:
85140
85437
  return [
85141
85438
  4,
85142
- import_utils50.fs.readFile(import_path14.default.join(_this.projectPath, fileName), "utf-8")
85439
+ import_utils53.fs.readFile(import_path14.default.join(_this.projectPath, fileName), "utf-8")
85143
85440
  ];
85144
85441
  case 1:
85145
85442
  content = _state.sent();
85146
85443
  newContent = update(content.split("\n"));
85147
85444
  return [
85148
85445
  4,
85149
- import_utils50.fs.writeFile(import_path14.default.join(_this.projectPath, fileName), newContent.join("\n"), "utf-8")
85446
+ import_utils53.fs.writeFile(import_path14.default.join(_this.projectPath, fileName), newContent.join("\n"), "utf-8")
85150
85447
  ];
85151
85448
  case 2:
85152
85449
  _state.sent();
@@ -85177,7 +85474,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
85177
85474
  ];
85178
85475
  return [
85179
85476
  4,
85180
- import_utils50.fs.rm(file)
85477
+ import_utils53.fs.rm(file)
85181
85478
  ];
85182
85479
  case 2:
85183
85480
  _state.sent();
@@ -85208,7 +85505,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
85208
85505
  ]);
85209
85506
  return [
85210
85507
  4,
85211
- import_utils50.fs.stat(dir)
85508
+ import_utils53.fs.stat(dir)
85212
85509
  ];
85213
85510
  case 2:
85214
85511
  stat = _state.sent();
@@ -85219,7 +85516,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
85219
85516
  ];
85220
85517
  return [
85221
85518
  4,
85222
- import_utils50.fs.rm(dir, {
85519
+ import_utils53.fs.rm(dir, {
85223
85520
  recursive: true
85224
85521
  })
85225
85522
  ];
@@ -85262,7 +85559,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
85262
85559
  return __generator(this, function(_state) {
85263
85560
  return [
85264
85561
  2,
85265
- import_utils50.fs.readdir(import_path14.default.join(_this.projectPath, dir))
85562
+ import_utils53.fs.readdir(import_path14.default.join(_this.projectPath, dir))
85266
85563
  ];
85267
85564
  });
85268
85565
  })();
@@ -85648,7 +85945,7 @@ var PluginNpmAPI = /* @__PURE__ */ function() {
85648
85945
 
85649
85946
  // ../../new-action/dist/esm/utils/index.js
85650
85947
  var import_path15 = __toESM(require("path"));
85651
- var import_utils53 = require("@modern-js/utils");
85948
+ var import_utils56 = require("@modern-js/utils");
85652
85949
  var swap = (obj) => {
85653
85950
  return Object.keys(obj).reduce((acc, key) => {
85654
85951
  acc[obj[key]] = key;
@@ -85658,20 +85955,20 @@ var swap = (obj) => {
85658
85955
  var dependenceToSolution = swap(SolutionToolsMap);
85659
85956
  function alreadyRepo(cwd = process.cwd()) {
85660
85957
  try {
85661
- return import_utils50.fs.existsSync(import_path15.default.resolve(cwd, "package.json"));
85958
+ return import_utils53.fs.existsSync(import_path15.default.resolve(cwd, "package.json"));
85662
85959
  } catch (e) {
85663
85960
  return false;
85664
85961
  }
85665
85962
  }
85666
85963
  var readJson = (jsonPath) => {
85667
- if (!import_utils50.fs.existsSync(jsonPath)) {
85964
+ if (!import_utils53.fs.existsSync(jsonPath)) {
85668
85965
  return {};
85669
85966
  }
85670
- const jsonStr = import_utils50.fs.readFileSync(jsonPath, {
85967
+ const jsonStr = import_utils53.fs.readFileSync(jsonPath, {
85671
85968
  encoding: "utf8"
85672
85969
  });
85673
85970
  try {
85674
- return import_utils53.json5.parse(jsonStr);
85971
+ return import_utils56.json5.parse(jsonStr);
85675
85972
  } catch (error) {
85676
85973
  throw Error(`${jsonPath} is not a valid json, please check and try again.`);
85677
85974
  }
@@ -85706,8 +86003,8 @@ function getGeneratorPath2(generator, distTag) {
85706
86003
  }
85707
86004
  async function usePluginNameExport(solution, options) {
85708
86005
  const solutionVersion = await getModernPluginVersion(solution, SolutionToolsMap[Solution.MWA], options);
85709
- if (import_utils53.semver.valid(solutionVersion) && import_utils53.semver.gte(solutionVersion, "2.0.0")) {
85710
- return import_utils53.semver.gt(solutionVersion, "2.24.0");
86006
+ if (import_utils56.semver.valid(solutionVersion) && import_utils56.semver.gte(solutionVersion, "2.0.0")) {
86007
+ return import_utils56.semver.gt(solutionVersion, "2.24.0");
85711
86008
  }
85712
86009
  return true;
85713
86010
  }
@@ -85788,7 +86085,7 @@ var MWANewAction = async (options) => {
85788
86085
  noNeedInstall: !needInstall
85789
86086
  }, ans, {
85790
86087
  locale: UserConfig.locale || locale,
85791
- packageManager: UserConfig.packageManager || await (0, import_utils50.getPackageManager)(cwd),
86088
+ packageManager: UserConfig.packageManager || await (0, import_utils53.getPackageManager)(cwd),
85792
86089
  distTag
85793
86090
  }, {
85794
86091
  devDependencies: devDependency ? {
@@ -85889,7 +86186,7 @@ var ModuleNewAction = async (options) => {
85889
86186
  noNeedInstall: !needInstall
85890
86187
  }, ans, {
85891
86188
  locale: UserConfig.locale || locale,
85892
- packageManager: UserConfig.packageManager || await (0, import_utils50.getPackageManager)(cwd),
86189
+ packageManager: UserConfig.packageManager || await (0, import_utils53.getPackageManager)(cwd),
85893
86190
  distTag
85894
86191
  }, {
85895
86192
  devDependencies: devDependency ? {
@@ -86138,7 +86435,7 @@ function _getPackageMeta() {
86138
86435
  params.push("--registry");
86139
86436
  params.push(registryUrl);
86140
86437
  }
86141
- getPkgInfoPromise = (0, import_utils50.execa)("npm", params);
86438
+ getPkgInfoPromise = (0, import_utils53.execa)("npm", params);
86142
86439
  return [
86143
86440
  4,
86144
86441
  timeoutPromise(getPkgInfoPromise, NPM_API_TIMEOUT2, "Get npm version of '".concat(packageName, "'"))
@@ -86306,7 +86603,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
86306
86603
  ];
86307
86604
  return [
86308
86605
  4,
86309
- import_utils50.fs.readJSON(import_path17.default.join(process.cwd(), plugin.slice(5), "package.json"))
86606
+ import_utils53.fs.readJSON(import_path17.default.join(process.cwd(), plugin.slice(5), "package.json"))
86310
86607
  ];
86311
86608
  case 1:
86312
86609
  pkgJSON = _state2.sent();
@@ -86322,7 +86619,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
86322
86619
  ];
86323
86620
  return [
86324
86621
  4,
86325
- import_utils50.fs.readJSON(import_path17.default.join(plugin, "package.json"))
86622
+ import_utils53.fs.readJSON(import_path17.default.join(plugin, "package.json"))
86326
86623
  ];
86327
86624
  case 3:
86328
86625
  pkgJSON = _state2.sent();