@modern-js/repo-generator 0.0.0-next-20240228075637 → 0.0.0-next-20240228095700

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 (3) hide show
  1. package/dist/index.js +597 -506
  2. package/package.json +13 -13
  3. package/src/index.ts +1 -10
package/dist/index.js CHANGED
@@ -18187,9 +18187,9 @@ var require_src3 = __commonJS({
18187
18187
  }
18188
18188
  });
18189
18189
 
18190
- // ../../../../node_modules/.pnpm/follow-redirects@1.15.1/node_modules/follow-redirects/debug.js
18190
+ // ../../../../node_modules/.pnpm/follow-redirects@1.15.5/node_modules/follow-redirects/debug.js
18191
18191
  var require_debug = __commonJS({
18192
- "../../../../node_modules/.pnpm/follow-redirects@1.15.1/node_modules/follow-redirects/debug.js"(exports, module2) {
18192
+ "../../../../node_modules/.pnpm/follow-redirects@1.15.5/node_modules/follow-redirects/debug.js"(exports, module2) {
18193
18193
  "use strict";
18194
18194
  var debug;
18195
18195
  module2.exports = function() {
@@ -18208,9 +18208,9 @@ var require_debug = __commonJS({
18208
18208
  }
18209
18209
  });
18210
18210
 
18211
- // ../../../../node_modules/.pnpm/follow-redirects@1.15.1/node_modules/follow-redirects/index.js
18211
+ // ../../../../node_modules/.pnpm/follow-redirects@1.15.5/node_modules/follow-redirects/index.js
18212
18212
  var require_follow_redirects = __commonJS({
18213
- "../../../../node_modules/.pnpm/follow-redirects@1.15.1/node_modules/follow-redirects/index.js"(exports, module2) {
18213
+ "../../../../node_modules/.pnpm/follow-redirects@1.15.5/node_modules/follow-redirects/index.js"(exports, module2) {
18214
18214
  "use strict";
18215
18215
  var url2 = require("url");
18216
18216
  var URL2 = url2.URL;
@@ -18219,6 +18219,25 @@ var require_follow_redirects = __commonJS({
18219
18219
  var Writable = require("stream").Writable;
18220
18220
  var assert = require("assert");
18221
18221
  var debug = require_debug();
18222
+ var useNativeURL = false;
18223
+ try {
18224
+ assert(new URL2());
18225
+ } catch (error) {
18226
+ useNativeURL = error.code === "ERR_INVALID_URL";
18227
+ }
18228
+ var preservedUrlFields = [
18229
+ "auth",
18230
+ "host",
18231
+ "hostname",
18232
+ "href",
18233
+ "path",
18234
+ "pathname",
18235
+ "port",
18236
+ "protocol",
18237
+ "query",
18238
+ "search",
18239
+ "hash"
18240
+ ];
18222
18241
  var events = ["abort", "aborted", "connect", "error", "socket", "timeout"];
18223
18242
  var eventHandlers = /* @__PURE__ */ Object.create(null);
18224
18243
  events.forEach(function(event) {
@@ -18226,13 +18245,19 @@ var require_follow_redirects = __commonJS({
18226
18245
  this._redirectable.emit(event, arg1, arg2, arg3);
18227
18246
  };
18228
18247
  });
18248
+ var InvalidUrlError = createErrorType(
18249
+ "ERR_INVALID_URL",
18250
+ "Invalid URL",
18251
+ TypeError
18252
+ );
18229
18253
  var RedirectionError = createErrorType(
18230
18254
  "ERR_FR_REDIRECTION_FAILURE",
18231
18255
  "Redirected request failed"
18232
18256
  );
18233
18257
  var TooManyRedirectsError = createErrorType(
18234
18258
  "ERR_FR_TOO_MANY_REDIRECTS",
18235
- "Maximum number of redirects exceeded"
18259
+ "Maximum number of redirects exceeded",
18260
+ RedirectionError
18236
18261
  );
18237
18262
  var MaxBodyLengthExceededError = createErrorType(
18238
18263
  "ERR_FR_MAX_BODY_LENGTH_EXCEEDED",
@@ -18242,6 +18267,7 @@ var require_follow_redirects = __commonJS({
18242
18267
  "ERR_STREAM_WRITE_AFTER_END",
18243
18268
  "write after end"
18244
18269
  );
18270
+ var destroy2 = Writable.prototype.destroy || noop2;
18245
18271
  function RedirectableRequest(options, responseCallback) {
18246
18272
  Writable.call(this);
18247
18273
  this._sanitizeOptions(options);
@@ -18257,23 +18283,33 @@ var require_follow_redirects = __commonJS({
18257
18283
  }
18258
18284
  var self3 = this;
18259
18285
  this._onNativeResponse = function(response) {
18260
- self3._processResponse(response);
18286
+ try {
18287
+ self3._processResponse(response);
18288
+ } catch (cause) {
18289
+ self3.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
18290
+ }
18261
18291
  };
18262
18292
  this._performRequest();
18263
18293
  }
18264
18294
  RedirectableRequest.prototype = Object.create(Writable.prototype);
18265
18295
  RedirectableRequest.prototype.abort = function() {
18266
- abortRequest(this._currentRequest);
18296
+ destroyRequest(this._currentRequest);
18297
+ this._currentRequest.abort();
18267
18298
  this.emit("abort");
18268
18299
  };
18300
+ RedirectableRequest.prototype.destroy = function(error) {
18301
+ destroyRequest(this._currentRequest, error);
18302
+ destroy2.call(this, error);
18303
+ return this;
18304
+ };
18269
18305
  RedirectableRequest.prototype.write = function(data, encoding, callback) {
18270
18306
  if (this._ending) {
18271
18307
  throw new WriteAfterEndError();
18272
18308
  }
18273
- if (!(typeof data === "string" || typeof data === "object" && "length" in data)) {
18309
+ if (!isString5(data) && !isBuffer2(data)) {
18274
18310
  throw new TypeError("data should be a string, Buffer or Uint8Array");
18275
18311
  }
18276
- if (typeof encoding === "function") {
18312
+ if (isFunction5(encoding)) {
18277
18313
  callback = encoding;
18278
18314
  encoding = null;
18279
18315
  }
@@ -18293,10 +18329,10 @@ var require_follow_redirects = __commonJS({
18293
18329
  }
18294
18330
  };
18295
18331
  RedirectableRequest.prototype.end = function(data, encoding, callback) {
18296
- if (typeof data === "function") {
18332
+ if (isFunction5(data)) {
18297
18333
  callback = data;
18298
18334
  data = encoding = null;
18299
- } else if (typeof encoding === "function") {
18335
+ } else if (isFunction5(encoding)) {
18300
18336
  callback = encoding;
18301
18337
  encoding = null;
18302
18338
  }
@@ -18346,6 +18382,7 @@ var require_follow_redirects = __commonJS({
18346
18382
  self3.removeListener("abort", clearTimer);
18347
18383
  self3.removeListener("error", clearTimer);
18348
18384
  self3.removeListener("response", clearTimer);
18385
+ self3.removeListener("close", clearTimer);
18349
18386
  if (callback) {
18350
18387
  self3.removeListener("timeout", callback);
18351
18388
  }
@@ -18365,6 +18402,7 @@ var require_follow_redirects = __commonJS({
18365
18402
  this.on("abort", clearTimer);
18366
18403
  this.on("error", clearTimer);
18367
18404
  this.on("response", clearTimer);
18405
+ this.on("close", clearTimer);
18368
18406
  return this;
18369
18407
  };
18370
18408
  [
@@ -18408,8 +18446,7 @@ var require_follow_redirects = __commonJS({
18408
18446
  var protocol = this._options.protocol;
18409
18447
  var nativeProtocol = this._options.nativeProtocols[protocol];
18410
18448
  if (!nativeProtocol) {
18411
- this.emit("error", new TypeError("Unsupported protocol " + protocol));
18412
- return;
18449
+ throw new TypeError("Unsupported protocol " + protocol);
18413
18450
  }
18414
18451
  if (this._options.agents) {
18415
18452
  var scheme = protocol.slice(0, -1);
@@ -18423,7 +18460,7 @@ var require_follow_redirects = __commonJS({
18423
18460
  this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : (
18424
18461
  // When making a request to a proxy, […]
18425
18462
  // a client MUST send the target URI in absolute-form […].
18426
- this._currentUrl = this._options.path
18463
+ this._options.path
18427
18464
  );
18428
18465
  if (this._isRedirect) {
18429
18466
  var i = 0;
@@ -18462,11 +18499,10 @@ var require_follow_redirects = __commonJS({
18462
18499
  this._requestBodyBuffers = [];
18463
18500
  return;
18464
18501
  }
18465
- abortRequest(this._currentRequest);
18502
+ destroyRequest(this._currentRequest);
18466
18503
  response.destroy();
18467
18504
  if (++this._redirectCount > this._options.maxRedirects) {
18468
- this.emit("error", new TooManyRedirectsError());
18469
- return;
18505
+ throw new TooManyRedirectsError();
18470
18506
  }
18471
18507
  var requestHeaders;
18472
18508
  var beforeRedirect = this._options.beforeRedirect;
@@ -18487,24 +18523,17 @@ var require_follow_redirects = __commonJS({
18487
18523
  removeMatchingHeaders(/^content-/i, this._options.headers);
18488
18524
  }
18489
18525
  var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
18490
- var currentUrlParts = url2.parse(this._currentUrl);
18526
+ var currentUrlParts = parseUrl(this._currentUrl);
18491
18527
  var currentHost = currentHostHeader || currentUrlParts.host;
18492
18528
  var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost }));
18493
- var redirectUrl;
18494
- try {
18495
- redirectUrl = url2.resolve(currentUrl, location);
18496
- } catch (cause) {
18497
- this.emit("error", new RedirectionError(cause));
18498
- return;
18499
- }
18500
- debug("redirecting to", redirectUrl);
18529
+ var redirectUrl = resolveUrl(location, currentUrl);
18530
+ debug("redirecting to", redirectUrl.href);
18501
18531
  this._isRedirect = true;
18502
- var redirectUrlParts = url2.parse(redirectUrl);
18503
- Object.assign(this._options, redirectUrlParts);
18504
- if (redirectUrlParts.protocol !== currentUrlParts.protocol && redirectUrlParts.protocol !== "https:" || redirectUrlParts.host !== currentHost && !isSubdomain(redirectUrlParts.host, currentHost)) {
18532
+ spreadUrlObject(redirectUrl, this._options);
18533
+ if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
18505
18534
  removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
18506
18535
  }
18507
- if (typeof beforeRedirect === "function") {
18536
+ if (isFunction5(beforeRedirect)) {
18508
18537
  var responseDetails = {
18509
18538
  headers: response.headers,
18510
18539
  statusCode
@@ -18514,19 +18543,10 @@ var require_follow_redirects = __commonJS({
18514
18543
  method,
18515
18544
  headers: requestHeaders
18516
18545
  };
18517
- try {
18518
- beforeRedirect(this._options, responseDetails, requestDetails);
18519
- } catch (err) {
18520
- this.emit("error", err);
18521
- return;
18522
- }
18546
+ beforeRedirect(this._options, responseDetails, requestDetails);
18523
18547
  this._sanitizeOptions(this._options);
18524
18548
  }
18525
- try {
18526
- this._performRequest();
18527
- } catch (cause) {
18528
- this.emit("error", new RedirectionError(cause));
18529
- }
18549
+ this._performRequest();
18530
18550
  };
18531
18551
  function wrap(protocols) {
18532
18552
  var exports2 = {
@@ -18539,21 +18559,16 @@ var require_follow_redirects = __commonJS({
18539
18559
  var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
18540
18560
  var wrappedProtocol = exports2[scheme] = Object.create(nativeProtocol);
18541
18561
  function request(input, options, callback) {
18542
- if (typeof input === "string") {
18543
- var urlStr = input;
18544
- try {
18545
- input = urlToOptions(new URL2(urlStr));
18546
- } catch (err) {
18547
- input = url2.parse(urlStr);
18548
- }
18549
- } else if (URL2 && input instanceof URL2) {
18550
- input = urlToOptions(input);
18562
+ if (isURL(input)) {
18563
+ input = spreadUrlObject(input);
18564
+ } else if (isString5(input)) {
18565
+ input = spreadUrlObject(parseUrl(input));
18551
18566
  } else {
18552
18567
  callback = options;
18553
- options = input;
18568
+ options = validateUrl(input);
18554
18569
  input = { protocol };
18555
18570
  }
18556
- if (typeof options === "function") {
18571
+ if (isFunction5(options)) {
18557
18572
  callback = options;
18558
18573
  options = null;
18559
18574
  }
@@ -18562,6 +18577,9 @@ var require_follow_redirects = __commonJS({
18562
18577
  maxBodyLength: exports2.maxBodyLength
18563
18578
  }, input, options);
18564
18579
  options.nativeProtocols = nativeProtocols;
18580
+ if (!isString5(options.host) && !isString5(options.hostname)) {
18581
+ options.hostname = "::1";
18582
+ }
18565
18583
  assert.equal(options.protocol, protocol, "protocol mismatch");
18566
18584
  debug("options", options);
18567
18585
  return new RedirectableRequest(options, callback);
@@ -18580,23 +18598,43 @@ var require_follow_redirects = __commonJS({
18580
18598
  }
18581
18599
  function noop2() {
18582
18600
  }
18583
- function urlToOptions(urlObject) {
18584
- var options = {
18585
- protocol: urlObject.protocol,
18586
- hostname: urlObject.hostname.startsWith("[") ? (
18587
- /* istanbul ignore next */
18588
- urlObject.hostname.slice(1, -1)
18589
- ) : urlObject.hostname,
18590
- hash: urlObject.hash,
18591
- search: urlObject.search,
18592
- pathname: urlObject.pathname,
18593
- path: urlObject.pathname + urlObject.search,
18594
- href: urlObject.href
18595
- };
18596
- if (urlObject.port !== "") {
18597
- options.port = Number(urlObject.port);
18601
+ function parseUrl(input) {
18602
+ var parsed;
18603
+ if (useNativeURL) {
18604
+ parsed = new URL2(input);
18605
+ } else {
18606
+ parsed = validateUrl(url2.parse(input));
18607
+ if (!isString5(parsed.protocol)) {
18608
+ throw new InvalidUrlError({ input });
18609
+ }
18598
18610
  }
18599
- return options;
18611
+ return parsed;
18612
+ }
18613
+ function resolveUrl(relative, base) {
18614
+ return useNativeURL ? new URL2(relative, base) : parseUrl(url2.resolve(base, relative));
18615
+ }
18616
+ function validateUrl(input) {
18617
+ if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
18618
+ throw new InvalidUrlError({ input: input.href || input });
18619
+ }
18620
+ if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) {
18621
+ throw new InvalidUrlError({ input: input.href || input });
18622
+ }
18623
+ return input;
18624
+ }
18625
+ function spreadUrlObject(urlObject, target) {
18626
+ var spread3 = target || {};
18627
+ for (var key of preservedUrlFields) {
18628
+ spread3[key] = urlObject[key];
18629
+ }
18630
+ if (spread3.hostname.startsWith("[")) {
18631
+ spread3.hostname = spread3.hostname.slice(1, -1);
18632
+ }
18633
+ if (spread3.port !== "") {
18634
+ spread3.port = Number(spread3.port);
18635
+ }
18636
+ spread3.path = spread3.search ? spread3.pathname + spread3.search : spread3.pathname;
18637
+ return spread3;
18600
18638
  }
18601
18639
  function removeMatchingHeaders(regex2, headers) {
18602
18640
  var lastValue;
@@ -18608,33 +18646,50 @@ var require_follow_redirects = __commonJS({
18608
18646
  }
18609
18647
  return lastValue === null || typeof lastValue === "undefined" ? void 0 : String(lastValue).trim();
18610
18648
  }
18611
- function createErrorType(code, defaultMessage) {
18612
- function CustomError(cause) {
18649
+ function createErrorType(code, message, baseClass) {
18650
+ function CustomError(properties) {
18613
18651
  Error.captureStackTrace(this, this.constructor);
18614
- if (!cause) {
18615
- this.message = defaultMessage;
18616
- } else {
18617
- this.message = defaultMessage + ": " + cause.message;
18618
- this.cause = cause;
18619
- }
18652
+ Object.assign(this, properties || {});
18653
+ this.code = code;
18654
+ this.message = this.cause ? message + ": " + this.cause.message : message;
18620
18655
  }
18621
- CustomError.prototype = new Error();
18622
- CustomError.prototype.constructor = CustomError;
18623
- CustomError.prototype.name = "Error [" + code + "]";
18624
- CustomError.prototype.code = code;
18656
+ CustomError.prototype = new (baseClass || Error)();
18657
+ Object.defineProperties(CustomError.prototype, {
18658
+ constructor: {
18659
+ value: CustomError,
18660
+ enumerable: false
18661
+ },
18662
+ name: {
18663
+ value: "Error [" + code + "]",
18664
+ enumerable: false
18665
+ }
18666
+ });
18625
18667
  return CustomError;
18626
18668
  }
18627
- function abortRequest(request) {
18669
+ function destroyRequest(request, error) {
18628
18670
  for (var event of events) {
18629
18671
  request.removeListener(event, eventHandlers[event]);
18630
18672
  }
18631
18673
  request.on("error", noop2);
18632
- request.abort();
18674
+ request.destroy(error);
18633
18675
  }
18634
18676
  function isSubdomain(subdomain, domain) {
18635
- const dot = subdomain.length - domain.length - 1;
18677
+ assert(isString5(subdomain) && isString5(domain));
18678
+ var dot = subdomain.length - domain.length - 1;
18636
18679
  return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
18637
18680
  }
18681
+ function isString5(value) {
18682
+ return typeof value === "string" || value instanceof String;
18683
+ }
18684
+ function isFunction5(value) {
18685
+ return typeof value === "function";
18686
+ }
18687
+ function isBuffer2(value) {
18688
+ return typeof value === "object" && "length" in value;
18689
+ }
18690
+ function isURL(value) {
18691
+ return URL2 && value instanceof URL2;
18692
+ }
18638
18693
  module2.exports = wrap({ http: http2, https: https2 });
18639
18694
  module2.exports.wrap = wrap;
18640
18695
  }
@@ -28508,7 +28563,7 @@ var require_binary_search = __commonJS({
28508
28563
  var require_quick_sort = __commonJS({
28509
28564
  "../../../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/quick-sort.js"(exports) {
28510
28565
  "use strict";
28511
- function swap(ary, x, y) {
28566
+ function swap2(ary, x, y) {
28512
28567
  var temp = ary[x];
28513
28568
  ary[x] = ary[y];
28514
28569
  ary[y] = temp;
@@ -28520,15 +28575,15 @@ var require_quick_sort = __commonJS({
28520
28575
  if (p < r) {
28521
28576
  var pivotIndex = randomIntInRange(p, r);
28522
28577
  var i = p - 1;
28523
- swap(ary, pivotIndex, r);
28578
+ swap2(ary, pivotIndex, r);
28524
28579
  var pivot = ary[r];
28525
28580
  for (var j = p; j < r; j++) {
28526
28581
  if (comparator(ary[j], pivot) <= 0) {
28527
28582
  i += 1;
28528
- swap(ary, i, j);
28583
+ swap2(ary, i, j);
28529
28584
  }
28530
28585
  }
28531
- swap(ary, i + 1, j);
28586
+ swap2(ary, i + 1, j);
28532
28587
  var q = i + 1;
28533
28588
  doQuickSort(ary, comparator, p, q - 1);
28534
28589
  doQuickSort(ary, comparator, q + 1, r);
@@ -31404,9 +31459,9 @@ var require_ejs = __commonJS({
31404
31459
  }
31405
31460
  });
31406
31461
 
31407
- // ../../../../node_modules/.pnpm/@modern-js+utils@2.45.0/node_modules/@modern-js/utils/dist/compiled/chalk/index.js
31462
+ // ../../../../node_modules/.pnpm/@modern-js+utils@2.39.2/node_modules/@modern-js/utils/dist/compiled/chalk/index.js
31408
31463
  var require_chalk = __commonJS({
31409
- "../../../../node_modules/.pnpm/@modern-js+utils@2.45.0/node_modules/@modern-js/utils/dist/compiled/chalk/index.js"(exports, module2) {
31464
+ "../../../../node_modules/.pnpm/@modern-js+utils@2.39.2/node_modules/@modern-js/utils/dist/compiled/chalk/index.js"(exports, module2) {
31410
31465
  "use strict";
31411
31466
  (() => {
31412
31467
  var e = { 44: (e2, t2, n2) => {
@@ -64208,10 +64263,10 @@ var require_extend_node = __commonJS({
64208
64263
  length = void 0;
64209
64264
  }
64210
64265
  } else {
64211
- var swap = encoding;
64266
+ var swap2 = encoding;
64212
64267
  encoding = offset;
64213
64268
  offset = length;
64214
- length = swap;
64269
+ length = swap2;
64215
64270
  }
64216
64271
  offset = +offset || 0;
64217
64272
  var remaining = this.length - offset;
@@ -64265,10 +64320,10 @@ var require_extend_node = __commonJS({
64265
64320
  length = void 0;
64266
64321
  }
64267
64322
  } else {
64268
- var swap = encoding;
64323
+ var swap2 = encoding;
64269
64324
  encoding = offset;
64270
64325
  offset = length;
64271
- length = swap;
64326
+ length = swap2;
64272
64327
  }
64273
64328
  encoding = String(encoding || "utf8").toLowerCase();
64274
64329
  if (Buffer2.isNativeEncoding(encoding))
@@ -68789,7 +68844,6 @@ __export(src_exports, {
68789
68844
  default: () => src_default
68790
68845
  });
68791
68846
  module.exports = __toCommonJS(src_exports);
68792
- var import_path18 = __toESM(require("path"));
68793
68847
  var import_lodash15 = require("@modern-js/utils/lodash");
68794
68848
 
68795
68849
  // ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/esm/_define_property.js
@@ -68801,12 +68855,12 @@ function _define_property(obj, key, value) {
68801
68855
  return obj;
68802
68856
  }
68803
68857
 
68804
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
68858
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
68805
68859
  var import_utils46 = require("@modern-js/utils");
68806
68860
  var import_lodash6 = require("@modern-js/utils/lodash");
68807
68861
  var import_comment_json = __toESM(require_src2());
68808
68862
 
68809
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.4/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
68863
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.5/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
68810
68864
  var import_utils = require("@modern-js/utils");
68811
68865
  async function canUseNvm() {
68812
68866
  try {
@@ -68856,7 +68910,7 @@ async function canUsePnpm() {
68856
68910
  }
68857
68911
  }
68858
68912
 
68859
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.4/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
68913
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.5/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
68860
68914
  var import_utils2 = require("@modern-js/utils");
68861
68915
  function execaWithStreamLog(command, args, options) {
68862
68916
  const promise = (0, import_utils2.execa)(command, args, {
@@ -68952,7 +69006,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
68952
69006
  throw new Error("please install pnpm first");
68953
69007
  }
68954
69008
 
68955
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.4/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
69009
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.5/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
68956
69010
  var NpmAPI = class {
68957
69011
  npmInstall({ cwd, registryUrl, ignoreScripts }) {
68958
69012
  return npmInstall({
@@ -68981,7 +69035,7 @@ var NpmAPI = class {
68981
69035
  }
68982
69036
  };
68983
69037
 
68984
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
69038
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
68985
69039
  var import_utils4 = require("@modern-js/utils");
68986
69040
  async function canUseGit() {
68987
69041
  try {
@@ -69056,7 +69110,7 @@ async function gitCommit(cwd, commitMessage) {
69056
69110
  });
69057
69111
  }
69058
69112
 
69059
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
69113
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
69060
69114
  var GitAPI = class {
69061
69115
  async isInGitRepo(cwd = this.generatorCore.outputPath) {
69062
69116
  const canUse = await canUseGit();
@@ -69108,7 +69162,7 @@ var GitAPI = class {
69108
69162
  }
69109
69163
  };
69110
69164
 
69111
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/logger/constants.js
69165
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/logger/constants.js
69112
69166
  var LoggerLevel;
69113
69167
  (function(LoggerLevel2) {
69114
69168
  LoggerLevel2["Error"] = "error";
@@ -69129,7 +69183,7 @@ var LevelPriority = [
69129
69183
  LoggerLevel.Stream
69130
69184
  ];
69131
69185
 
69132
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/logger/index.js
69186
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/logger/index.js
69133
69187
  var import_utils6 = require("@modern-js/utils");
69134
69188
  var Logger = class {
69135
69189
  get currentLevelIndex() {
@@ -69190,23 +69244,23 @@ var Logger = class {
69190
69244
  }
69191
69245
  };
69192
69246
 
69193
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
69247
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
69194
69248
  var import_path7 = __toESM(require("path"));
69195
69249
 
69196
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
69250
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
69197
69251
  var import_path4 = __toESM(require("path"));
69198
69252
  var import_events = require("events");
69199
69253
  var import_utils11 = require("@modern-js/utils");
69200
69254
 
69201
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
69255
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
69202
69256
  var import_path2 = __toESM(require("path"));
69203
69257
  var import_utils8 = require("@modern-js/utils");
69204
69258
 
69205
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
69259
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
69206
69260
  var import_path = __toESM(require("path"));
69207
69261
  var import_utils7 = require("@modern-js/utils");
69208
69262
 
69209
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/materials/constants.js
69263
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/constants.js
69210
69264
  var IMAGE_EXT_LIST = [
69211
69265
  ".jpg",
69212
69266
  ".jpeg",
@@ -69220,7 +69274,7 @@ var IMAGE_EXT_LIST = [
69220
69274
  ".wmf"
69221
69275
  ];
69222
69276
 
69223
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
69277
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
69224
69278
  var FS_RESOURCE = "_codesmith_core_fs_resource";
69225
69279
  var FsResource = class {
69226
69280
  async value() {
@@ -69246,7 +69300,7 @@ var FsResource = class {
69246
69300
  }
69247
69301
  };
69248
69302
 
69249
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
69303
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
69250
69304
  var promisifyGlob = function(pattern, options) {
69251
69305
  return new Promise((resolve, reject) => {
69252
69306
  (0, import_utils8.glob)(pattern, options, (err, files) => err === null ? resolve(files) : reject(err));
@@ -69274,7 +69328,7 @@ var FsMaterial = class {
69274
69328
  }
69275
69329
  };
69276
69330
 
69277
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/nodeRequire.js
69331
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/nodeRequire.js
69278
69332
  var nodeRequire = (path18) => {
69279
69333
  try {
69280
69334
  const module2 = __non_webpack_require__(path18);
@@ -69291,11 +69345,11 @@ var nodeRequire = (path18) => {
69291
69345
  }
69292
69346
  };
69293
69347
 
69294
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
69348
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
69295
69349
  var import_path3 = __toESM(require("path"));
69296
69350
  var import_utils10 = require("@modern-js/utils");
69297
69351
 
69298
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
69352
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
69299
69353
  var import_utils9 = require("@modern-js/utils");
69300
69354
  async function fsExists(path18) {
69301
69355
  try {
@@ -69306,7 +69360,7 @@ async function fsExists(path18) {
69306
69360
  }
69307
69361
  }
69308
69362
 
69309
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
69363
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
69310
69364
  var MaxTimes = 5;
69311
69365
  async function getGeneratorDir(generator) {
69312
69366
  let result = generator;
@@ -69325,7 +69379,7 @@ async function getGeneratorDir(generator) {
69325
69379
  return result;
69326
69380
  }
69327
69381
 
69328
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
69382
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
69329
69383
  var GeneratorCore = class {
69330
69384
  get lifeCycleMethod() {
69331
69385
  return {
@@ -69530,10 +69584,10 @@ check path: ${import_utils11.chalk.blue.underline(generator)} exist a package.js
69530
69584
  }
69531
69585
  };
69532
69586
 
69533
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
69587
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
69534
69588
  var import_path6 = __toESM(require("path"));
69535
69589
 
69536
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
69590
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
69537
69591
  var import_path5 = __toESM(require("path"));
69538
69592
  var import_utils12 = require("@modern-js/utils");
69539
69593
  async function canUseYarn2() {
@@ -69581,7 +69635,6 @@ async function runInstall(targetDir, registryUrl) {
69581
69635
  "install",
69582
69636
  "--prod",
69583
69637
  "--reporter=silent",
69584
- "--prefer-offline",
69585
69638
  "--ignore-scripts"
69586
69639
  ];
69587
69640
  if (registryUrl) {
@@ -69604,7 +69657,6 @@ async function runInstall(targetDir, registryUrl) {
69604
69657
  "install",
69605
69658
  "--production",
69606
69659
  "--loglevel=error",
69607
- "--prefer-offline",
69608
69660
  "--ignore-scripts"
69609
69661
  ];
69610
69662
  if (registryUrl) {
@@ -69614,7 +69666,7 @@ async function runInstall(targetDir, registryUrl) {
69614
69666
  }
69615
69667
  }
69616
69668
 
69617
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/timeoutPromise.js
69669
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/timeoutPromise.js
69618
69670
  async function timeoutPromise(promise, ms, reason = "Operation") {
69619
69671
  let timeoutId = null;
69620
69672
  const delayPromise = (ms2) => new Promise((resolve) => {
@@ -69636,18 +69688,18 @@ async function timeoutPromise(promise, ms, reason = "Operation") {
69636
69688
  }
69637
69689
  }
69638
69690
 
69639
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
69691
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
69640
69692
  var import_os = __toESM(require("os"));
69641
69693
  var import_utils38 = require("@modern-js/utils");
69642
69694
 
69643
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/bind.js
69695
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/bind.js
69644
69696
  function bind(fn, thisArg) {
69645
69697
  return function wrap() {
69646
69698
  return fn.apply(thisArg, arguments);
69647
69699
  };
69648
69700
  }
69649
69701
 
69650
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/utils.js
69702
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/utils.js
69651
69703
  var { toString } = Object.prototype;
69652
69704
  var { getPrototypeOf } = Object;
69653
69705
  var kindOf = ((cache) => (thing) => {
@@ -70006,7 +70058,7 @@ var utils_default = {
70006
70058
  isThenable
70007
70059
  };
70008
70060
 
70009
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/core/AxiosError.js
70061
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/AxiosError.js
70010
70062
  function AxiosError(message, code, config, request, response) {
70011
70063
  Error.call(this);
70012
70064
  if (Error.captureStackTrace) {
@@ -70078,11 +70130,11 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
70078
70130
  };
70079
70131
  var AxiosError_default = AxiosError;
70080
70132
 
70081
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/platform/node/classes/FormData.js
70133
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/platform/node/classes/FormData.js
70082
70134
  var import_form_data = __toESM(require_form_data());
70083
70135
  var FormData_default = import_form_data.default;
70084
70136
 
70085
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/toFormData.js
70137
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/toFormData.js
70086
70138
  function isVisitable(thing) {
70087
70139
  return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
70088
70140
  }
@@ -70197,7 +70249,7 @@ function toFormData(obj, formData, options) {
70197
70249
  }
70198
70250
  var toFormData_default = toFormData;
70199
70251
 
70200
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
70252
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
70201
70253
  function encode(str) {
70202
70254
  const charMap = {
70203
70255
  "!": "%21",
@@ -70230,7 +70282,7 @@ prototype2.toString = function toString2(encoder) {
70230
70282
  };
70231
70283
  var AxiosURLSearchParams_default = AxiosURLSearchParams;
70232
70284
 
70233
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/buildURL.js
70285
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/buildURL.js
70234
70286
  function encode2(val) {
70235
70287
  return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
70236
70288
  }
@@ -70256,7 +70308,7 @@ function buildURL(url2, params, options) {
70256
70308
  return url2;
70257
70309
  }
70258
70310
 
70259
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/core/InterceptorManager.js
70311
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/InterceptorManager.js
70260
70312
  var InterceptorManager = class {
70261
70313
  constructor() {
70262
70314
  this.handlers = [];
@@ -70320,18 +70372,18 @@ var InterceptorManager = class {
70320
70372
  };
70321
70373
  var InterceptorManager_default = InterceptorManager;
70322
70374
 
70323
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/defaults/transitional.js
70375
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/defaults/transitional.js
70324
70376
  var transitional_default = {
70325
70377
  silentJSONParsing: true,
70326
70378
  forcedJSONParsing: true,
70327
70379
  clarifyTimeoutError: false
70328
70380
  };
70329
70381
 
70330
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
70382
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
70331
70383
  var import_url = __toESM(require("url"));
70332
70384
  var URLSearchParams_default = import_url.default.URLSearchParams;
70333
70385
 
70334
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/platform/node/index.js
70386
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/platform/node/index.js
70335
70387
  var node_default = {
70336
70388
  isNode: true,
70337
70389
  classes: {
@@ -70342,11 +70394,33 @@ var node_default = {
70342
70394
  protocols: ["http", "https", "file", "data"]
70343
70395
  };
70344
70396
 
70345
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/toURLEncodedForm.js
70397
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/platform/common/utils.js
70398
+ var utils_exports = {};
70399
+ __export(utils_exports, {
70400
+ hasBrowserEnv: () => hasBrowserEnv,
70401
+ hasStandardBrowserEnv: () => hasStandardBrowserEnv,
70402
+ hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv
70403
+ });
70404
+ var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
70405
+ var hasStandardBrowserEnv = ((product) => {
70406
+ return hasBrowserEnv && ["ReactNative", "NativeScript", "NS"].indexOf(product) < 0;
70407
+ })(typeof navigator !== "undefined" && navigator.product);
70408
+ var hasStandardBrowserWebWorkerEnv = (() => {
70409
+ return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
70410
+ self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
70411
+ })();
70412
+
70413
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/platform/index.js
70414
+ var platform_default = {
70415
+ ...utils_exports,
70416
+ ...node_default
70417
+ };
70418
+
70419
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/toURLEncodedForm.js
70346
70420
  function toURLEncodedForm(data, options) {
70347
- return toFormData_default(data, new node_default.classes.URLSearchParams(), Object.assign({
70421
+ return toFormData_default(data, new platform_default.classes.URLSearchParams(), Object.assign({
70348
70422
  visitor: function(value, key, path18, helpers) {
70349
- if (node_default.isNode && utils_default.isBuffer(value)) {
70423
+ if (platform_default.isNode && utils_default.isBuffer(value)) {
70350
70424
  this.append(key, value.toString("base64"));
70351
70425
  return false;
70352
70426
  }
@@ -70355,7 +70429,7 @@ function toURLEncodedForm(data, options) {
70355
70429
  }, options));
70356
70430
  }
70357
70431
 
70358
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/formDataToJSON.js
70432
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/formDataToJSON.js
70359
70433
  function parsePropPath(name) {
70360
70434
  return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
70361
70435
  return match[0] === "[]" ? "" : match[1] || match[0];
@@ -70376,6 +70450,8 @@ function arrayToObject(arr) {
70376
70450
  function formDataToJSON(formData) {
70377
70451
  function buildPath(path18, value, target, index) {
70378
70452
  let name = path18[index++];
70453
+ if (name === "__proto__")
70454
+ return true;
70379
70455
  const isNumericKey = Number.isFinite(+name);
70380
70456
  const isLast = index >= path18.length;
70381
70457
  name = !name && utils_default.isArray(target) ? target.length : name;
@@ -70407,7 +70483,7 @@ function formDataToJSON(formData) {
70407
70483
  }
70408
70484
  var formDataToJSON_default = formDataToJSON;
70409
70485
 
70410
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/defaults/index.js
70486
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/defaults/index.js
70411
70487
  function stringifySafely(rawValue, parser, encoder) {
70412
70488
  if (utils_default.isString(rawValue)) {
70413
70489
  try {
@@ -70433,9 +70509,6 @@ var defaults = {
70433
70509
  }
70434
70510
  const isFormData2 = utils_default.isFormData(data);
70435
70511
  if (isFormData2) {
70436
- if (!hasJSONContentType) {
70437
- return data;
70438
- }
70439
70512
  return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
70440
70513
  }
70441
70514
  if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data)) {
@@ -70498,8 +70571,8 @@ var defaults = {
70498
70571
  maxContentLength: -1,
70499
70572
  maxBodyLength: -1,
70500
70573
  env: {
70501
- FormData: node_default.classes.FormData,
70502
- Blob: node_default.classes.Blob
70574
+ FormData: platform_default.classes.FormData,
70575
+ Blob: platform_default.classes.Blob
70503
70576
  },
70504
70577
  validateStatus: function validateStatus(status) {
70505
70578
  return status >= 200 && status < 300;
@@ -70516,7 +70589,7 @@ utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method
70516
70589
  });
70517
70590
  var defaults_default = defaults;
70518
70591
 
70519
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/parseHeaders.js
70592
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/parseHeaders.js
70520
70593
  var ignoreDuplicateOf = utils_default.toObjectSet([
70521
70594
  "age",
70522
70595
  "authorization",
@@ -70561,7 +70634,7 @@ var parseHeaders_default = (rawHeaders) => {
70561
70634
  return parsed;
70562
70635
  };
70563
70636
 
70564
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/core/AxiosHeaders.js
70637
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/AxiosHeaders.js
70565
70638
  var $internals = Symbol("internals");
70566
70639
  function normalizeHeader(header) {
70567
70640
  return header && String(header).trim().toLowerCase();
@@ -70779,7 +70852,7 @@ utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
70779
70852
  utils_default.freezeMethods(AxiosHeaders);
70780
70853
  var AxiosHeaders_default = AxiosHeaders;
70781
70854
 
70782
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/core/transformData.js
70855
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/transformData.js
70783
70856
  function transformData(fns, response) {
70784
70857
  const config = this || defaults_default;
70785
70858
  const context = response || config;
@@ -70792,12 +70865,12 @@ function transformData(fns, response) {
70792
70865
  return data;
70793
70866
  }
70794
70867
 
70795
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/cancel/isCancel.js
70868
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/cancel/isCancel.js
70796
70869
  function isCancel(value) {
70797
70870
  return !!(value && value.__CANCEL__);
70798
70871
  }
70799
70872
 
70800
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/cancel/CanceledError.js
70873
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/cancel/CanceledError.js
70801
70874
  function CanceledError(message, config, request) {
70802
70875
  AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
70803
70876
  this.name = "CanceledError";
@@ -70807,7 +70880,7 @@ utils_default.inherits(CanceledError, AxiosError_default, {
70807
70880
  });
70808
70881
  var CanceledError_default = CanceledError;
70809
70882
 
70810
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/core/settle.js
70883
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/settle.js
70811
70884
  function settle(resolve, reject, response) {
70812
70885
  const validateStatus2 = response.config.validateStatus;
70813
70886
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
@@ -70823,17 +70896,17 @@ function settle(resolve, reject, response) {
70823
70896
  }
70824
70897
  }
70825
70898
 
70826
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/isAbsoluteURL.js
70899
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/isAbsoluteURL.js
70827
70900
  function isAbsoluteURL(url2) {
70828
70901
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
70829
70902
  }
70830
70903
 
70831
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/combineURLs.js
70904
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/combineURLs.js
70832
70905
  function combineURLs(baseURL, relativeURL) {
70833
- return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
70906
+ return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
70834
70907
  }
70835
70908
 
70836
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/core/buildFullPath.js
70909
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/buildFullPath.js
70837
70910
  function buildFullPath(baseURL, requestedURL) {
70838
70911
  if (baseURL && !isAbsoluteURL(requestedURL)) {
70839
70912
  return combineURLs(baseURL, requestedURL);
@@ -70841,7 +70914,7 @@ function buildFullPath(baseURL, requestedURL) {
70841
70914
  return requestedURL;
70842
70915
  }
70843
70916
 
70844
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/adapters/http.js
70917
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/adapters/http.js
70845
70918
  var import_proxy_from_env = __toESM(require_proxy_from_env());
70846
70919
  var import_http = __toESM(require("http"));
70847
70920
  var import_https = __toESM(require("https"));
@@ -70849,19 +70922,19 @@ var import_util2 = __toESM(require("util"));
70849
70922
  var import_follow_redirects = __toESM(require_follow_redirects());
70850
70923
  var import_zlib = __toESM(require("zlib"));
70851
70924
 
70852
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/env/data.js
70853
- var VERSION = "1.6.0";
70925
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/env/data.js
70926
+ var VERSION = "1.6.7";
70854
70927
 
70855
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/parseProtocol.js
70928
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/parseProtocol.js
70856
70929
  function parseProtocol(url2) {
70857
70930
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
70858
70931
  return match && match[1] || "";
70859
70932
  }
70860
70933
 
70861
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/fromDataURI.js
70934
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/fromDataURI.js
70862
70935
  var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
70863
70936
  function fromDataURI(uri, asBlob, options) {
70864
- const _Blob = options && options.Blob || node_default.classes.Blob;
70937
+ const _Blob = options && options.Blob || platform_default.classes.Blob;
70865
70938
  const protocol = parseProtocol(uri);
70866
70939
  if (asBlob === void 0 && _Blob) {
70867
70940
  asBlob = true;
@@ -70887,13 +70960,13 @@ function fromDataURI(uri, asBlob, options) {
70887
70960
  throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
70888
70961
  }
70889
70962
 
70890
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/adapters/http.js
70963
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/adapters/http.js
70891
70964
  var import_stream4 = __toESM(require("stream"));
70892
70965
 
70893
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/AxiosTransformStream.js
70966
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/AxiosTransformStream.js
70894
70967
  var import_stream = __toESM(require("stream"));
70895
70968
 
70896
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/throttle.js
70969
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/throttle.js
70897
70970
  function throttle(fn, freq) {
70898
70971
  let timestamp = 0;
70899
70972
  const threshold = 1e3 / freq;
@@ -70919,7 +70992,7 @@ function throttle(fn, freq) {
70919
70992
  }
70920
70993
  var throttle_default = throttle;
70921
70994
 
70922
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/speedometer.js
70995
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/speedometer.js
70923
70996
  function speedometer(samplesCount, min) {
70924
70997
  samplesCount = samplesCount || 10;
70925
70998
  const bytes = new Array(samplesCount);
@@ -70955,7 +71028,7 @@ function speedometer(samplesCount, min) {
70955
71028
  }
70956
71029
  var speedometer_default = speedometer;
70957
71030
 
70958
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/AxiosTransformStream.js
71031
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/AxiosTransformStream.js
70959
71032
  var kInternals = Symbol("internals");
70960
71033
  var AxiosTransformStream = class extends import_stream.default.Transform {
70961
71034
  constructor(options) {
@@ -71105,14 +71178,14 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
71105
71178
  };
71106
71179
  var AxiosTransformStream_default = AxiosTransformStream;
71107
71180
 
71108
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/adapters/http.js
71181
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/adapters/http.js
71109
71182
  var import_events2 = __toESM(require("events"));
71110
71183
 
71111
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/formDataToStream.js
71184
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/formDataToStream.js
71112
71185
  var import_util = require("util");
71113
71186
  var import_stream2 = require("stream");
71114
71187
 
71115
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/readBlob.js
71188
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/readBlob.js
71116
71189
  var { asyncIterator } = Symbol;
71117
71190
  var readBlob = async function* (blob) {
71118
71191
  if (blob.stream) {
@@ -71127,7 +71200,7 @@ var readBlob = async function* (blob) {
71127
71200
  };
71128
71201
  var readBlob_default = readBlob;
71129
71202
 
71130
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/formDataToStream.js
71203
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/formDataToStream.js
71131
71204
  var BOUNDARY_ALPHABET = utils_default.ALPHABET.ALPHA_DIGIT + "-_";
71132
71205
  var textEncoder = new import_util.TextEncoder();
71133
71206
  var CRLF = "\r\n";
@@ -71206,7 +71279,7 @@ var formDataToStream = (form, headersHandler, options) => {
71206
71279
  };
71207
71280
  var formDataToStream_default = formDataToStream;
71208
71281
 
71209
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
71282
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
71210
71283
  var import_stream3 = __toESM(require("stream"));
71211
71284
  var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
71212
71285
  __transform(chunk, encoding, callback) {
@@ -71228,7 +71301,7 @@ var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
71228
71301
  };
71229
71302
  var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
71230
71303
 
71231
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/callbackify.js
71304
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/callbackify.js
71232
71305
  var callbackify = (fn, reducer) => {
71233
71306
  return utils_default.isAsyncFn(fn) ? function(...args) {
71234
71307
  const cb = args.pop();
@@ -71243,7 +71316,7 @@ var callbackify = (fn, reducer) => {
71243
71316
  };
71244
71317
  var callbackify_default = callbackify;
71245
71318
 
71246
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/adapters/http.js
71319
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/adapters/http.js
71247
71320
  var zlibOptions = {
71248
71321
  flush: import_zlib.default.constants.Z_SYNC_FLUSH,
71249
71322
  finishFlush: import_zlib.default.constants.Z_SYNC_FLUSH
@@ -71255,15 +71328,15 @@ var brotliOptions = {
71255
71328
  var isBrotliSupported = utils_default.isFunction(import_zlib.default.createBrotliDecompress);
71256
71329
  var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
71257
71330
  var isHttps = /https:?/;
71258
- var supportedProtocols = node_default.protocols.map((protocol) => {
71331
+ var supportedProtocols = platform_default.protocols.map((protocol) => {
71259
71332
  return protocol + ":";
71260
71333
  });
71261
- function dispatchBeforeRedirect(options) {
71334
+ function dispatchBeforeRedirect(options, responseDetails) {
71262
71335
  if (options.beforeRedirects.proxy) {
71263
71336
  options.beforeRedirects.proxy(options);
71264
71337
  }
71265
71338
  if (options.beforeRedirects.config) {
71266
- options.beforeRedirects.config(options);
71339
+ options.beforeRedirects.config(options, responseDetails);
71267
71340
  }
71268
71341
  }
71269
71342
  function setProxy(options, configProxy, location) {
@@ -71343,6 +71416,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
71343
71416
  const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
71344
71417
  lookup = (hostname, opt, cb) => {
71345
71418
  _lookup(hostname, opt, (err, arg0, arg1) => {
71419
+ if (err) {
71420
+ return cb(err);
71421
+ }
71346
71422
  const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
71347
71423
  opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
71348
71424
  });
@@ -71739,57 +71815,44 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
71739
71815
  });
71740
71816
  };
71741
71817
 
71742
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/cookies.js
71743
- var cookies_default = node_default.isStandardBrowserEnv ? (
71818
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/cookies.js
71819
+ var cookies_default = platform_default.hasStandardBrowserEnv ? (
71744
71820
  // Standard browser envs support document.cookie
71745
- function standardBrowserEnv() {
71746
- return {
71747
- write: function write(name, value, expires, path18, domain, secure) {
71748
- const cookie = [];
71749
- cookie.push(name + "=" + encodeURIComponent(value));
71750
- if (utils_default.isNumber(expires)) {
71751
- cookie.push("expires=" + new Date(expires).toGMTString());
71752
- }
71753
- if (utils_default.isString(path18)) {
71754
- cookie.push("path=" + path18);
71755
- }
71756
- if (utils_default.isString(domain)) {
71757
- cookie.push("domain=" + domain);
71758
- }
71759
- if (secure === true) {
71760
- cookie.push("secure");
71761
- }
71762
- document.cookie = cookie.join("; ");
71763
- },
71764
- read: function read(name) {
71765
- const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
71766
- return match ? decodeURIComponent(match[3]) : null;
71767
- },
71768
- remove: function remove(name) {
71769
- this.write(name, "", Date.now() - 864e5);
71770
- }
71771
- };
71772
- }()
71821
+ {
71822
+ write(name, value, expires, path18, domain, secure) {
71823
+ const cookie = [name + "=" + encodeURIComponent(value)];
71824
+ utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
71825
+ utils_default.isString(path18) && cookie.push("path=" + path18);
71826
+ utils_default.isString(domain) && cookie.push("domain=" + domain);
71827
+ secure === true && cookie.push("secure");
71828
+ document.cookie = cookie.join("; ");
71829
+ },
71830
+ read(name) {
71831
+ const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
71832
+ return match ? decodeURIComponent(match[3]) : null;
71833
+ },
71834
+ remove(name) {
71835
+ this.write(name, "", Date.now() - 864e5);
71836
+ }
71837
+ }
71773
71838
  ) : (
71774
- // Non standard browser env (web workers, react-native) lack needed support.
71775
- function nonStandardBrowserEnv() {
71776
- return {
71777
- write: function write() {
71778
- },
71779
- read: function read() {
71780
- return null;
71781
- },
71782
- remove: function remove() {
71783
- }
71784
- };
71785
- }()
71839
+ // Non-standard browser env (web workers, react-native) lack needed support.
71840
+ {
71841
+ write() {
71842
+ },
71843
+ read() {
71844
+ return null;
71845
+ },
71846
+ remove() {
71847
+ }
71848
+ }
71786
71849
  );
71787
71850
 
71788
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/isURLSameOrigin.js
71789
- var isURLSameOrigin_default = node_default.isStandardBrowserEnv ? (
71851
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/isURLSameOrigin.js
71852
+ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? (
71790
71853
  // Standard browser envs have full support of the APIs needed to test
71791
71854
  // whether the request URL is of the same origin as current location.
71792
- function standardBrowserEnv2() {
71855
+ function standardBrowserEnv() {
71793
71856
  const msie = /(msie|trident)/i.test(navigator.userAgent);
71794
71857
  const urlParsingNode = document.createElement("a");
71795
71858
  let originURL;
@@ -71819,14 +71882,14 @@ var isURLSameOrigin_default = node_default.isStandardBrowserEnv ? (
71819
71882
  }()
71820
71883
  ) : (
71821
71884
  // Non standard browser envs (web workers, react-native) lack needed support.
71822
- function nonStandardBrowserEnv2() {
71885
+ function nonStandardBrowserEnv() {
71823
71886
  return function isURLSameOrigin() {
71824
71887
  return true;
71825
71888
  };
71826
71889
  }()
71827
71890
  );
71828
71891
 
71829
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/adapters/xhr.js
71892
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/adapters/xhr.js
71830
71893
  function progressEventReducer(listener, isDownloadStream) {
71831
71894
  let bytesNotified = 0;
71832
71895
  const _speedometer = speedometer_default(50, 250);
@@ -71855,7 +71918,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
71855
71918
  return new Promise(function dispatchXhrRequest(resolve, reject) {
71856
71919
  let requestData = config.data;
71857
71920
  const requestHeaders = AxiosHeaders_default.from(config.headers).normalize();
71858
- const responseType = config.responseType;
71921
+ let { responseType, withXSRFToken } = config;
71859
71922
  let onCanceled;
71860
71923
  function done() {
71861
71924
  if (config.cancelToken) {
@@ -71867,12 +71930,11 @@ var xhr_default = isXHRAdapterSupported && function(config) {
71867
71930
  }
71868
71931
  let contentType;
71869
71932
  if (utils_default.isFormData(requestData)) {
71870
- if (node_default.isStandardBrowserEnv || node_default.isStandardBrowserWebWorkerEnv) {
71933
+ if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
71871
71934
  requestHeaders.setContentType(false);
71872
- } else if (!requestHeaders.getContentType(/^\s*multipart\/form-data/)) {
71873
- requestHeaders.setContentType("multipart/form-data");
71874
- } else if (utils_default.isString(contentType = requestHeaders.getContentType())) {
71875
- requestHeaders.setContentType(contentType.replace(/^\s*(multipart\/form-data);+/, "$1"));
71935
+ } else if ((contentType = requestHeaders.getContentType()) !== false) {
71936
+ const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
71937
+ requestHeaders.setContentType([type || "multipart/form-data", ...tokens].join("; "));
71876
71938
  }
71877
71939
  }
71878
71940
  let request = new XMLHttpRequest();
@@ -71947,10 +72009,13 @@ var xhr_default = isXHRAdapterSupported && function(config) {
71947
72009
  ));
71948
72010
  request = null;
71949
72011
  };
71950
- if (node_default.isStandardBrowserEnv) {
71951
- const xsrfValue = isURLSameOrigin_default(fullPath) && config.xsrfCookieName && cookies_default.read(config.xsrfCookieName);
71952
- if (xsrfValue) {
71953
- requestHeaders.set(config.xsrfHeaderName, xsrfValue);
72012
+ if (platform_default.hasStandardBrowserEnv) {
72013
+ withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
72014
+ if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(fullPath)) {
72015
+ const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies_default.read(config.xsrfCookieName);
72016
+ if (xsrfValue) {
72017
+ requestHeaders.set(config.xsrfHeaderName, xsrfValue);
72018
+ }
71954
72019
  }
71955
72020
  }
71956
72021
  requestData === void 0 && requestHeaders.setContentType(null);
@@ -71986,7 +72051,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
71986
72051
  }
71987
72052
  }
71988
72053
  const protocol = parseProtocol(fullPath);
71989
- if (protocol && node_default.protocols.indexOf(protocol) === -1) {
72054
+ if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
71990
72055
  reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
71991
72056
  return;
71992
72057
  }
@@ -71994,7 +72059,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
71994
72059
  });
71995
72060
  };
71996
72061
 
71997
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/adapters/adapters.js
72062
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/adapters/adapters.js
71998
72063
  var knownAdapters = {
71999
72064
  http: http_default,
72000
72065
  xhr: xhr_default
@@ -72047,7 +72112,7 @@ var adapters_default = {
72047
72112
  adapters: knownAdapters
72048
72113
  };
72049
72114
 
72050
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/core/dispatchRequest.js
72115
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/dispatchRequest.js
72051
72116
  function throwIfCancellationRequested(config) {
72052
72117
  if (config.cancelToken) {
72053
72118
  config.cancelToken.throwIfRequested();
@@ -72092,7 +72157,7 @@ function dispatchRequest(config) {
72092
72157
  });
72093
72158
  }
72094
72159
 
72095
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/core/mergeConfig.js
72160
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/mergeConfig.js
72096
72161
  var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? thing.toJSON() : thing;
72097
72162
  function mergeConfig(config1, config2) {
72098
72163
  config2 = config2 || {};
@@ -72144,6 +72209,7 @@ function mergeConfig(config1, config2) {
72144
72209
  timeout: defaultToConfig2,
72145
72210
  timeoutMessage: defaultToConfig2,
72146
72211
  withCredentials: defaultToConfig2,
72212
+ withXSRFToken: defaultToConfig2,
72147
72213
  adapter: defaultToConfig2,
72148
72214
  responseType: defaultToConfig2,
72149
72215
  xsrfCookieName: defaultToConfig2,
@@ -72171,7 +72237,7 @@ function mergeConfig(config1, config2) {
72171
72237
  return config;
72172
72238
  }
72173
72239
 
72174
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/validator.js
72240
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/validator.js
72175
72241
  var validators = {};
72176
72242
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
72177
72243
  validators[type] = function validator(thing) {
@@ -72229,7 +72295,7 @@ var validator_default = {
72229
72295
  validators
72230
72296
  };
72231
72297
 
72232
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/core/Axios.js
72298
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/core/Axios.js
72233
72299
  var validators2 = validator_default.validators;
72234
72300
  var Axios = class {
72235
72301
  constructor(instanceConfig) {
@@ -72247,7 +72313,24 @@ var Axios = class {
72247
72313
  *
72248
72314
  * @returns {Promise} The Promise to be fulfilled
72249
72315
  */
72250
- request(configOrUrl, config) {
72316
+ async request(configOrUrl, config) {
72317
+ try {
72318
+ return await this._request(configOrUrl, config);
72319
+ } catch (err) {
72320
+ if (err instanceof Error) {
72321
+ let dummy;
72322
+ Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
72323
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
72324
+ if (!err.stack) {
72325
+ err.stack = stack;
72326
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
72327
+ err.stack += "\n" + stack;
72328
+ }
72329
+ }
72330
+ throw err;
72331
+ }
72332
+ }
72333
+ _request(configOrUrl, config) {
72251
72334
  if (typeof configOrUrl === "string") {
72252
72335
  config = config || {};
72253
72336
  config.url = configOrUrl;
@@ -72372,7 +72455,7 @@ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(m
72372
72455
  });
72373
72456
  var Axios_default = Axios;
72374
72457
 
72375
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/cancel/CancelToken.js
72458
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/cancel/CancelToken.js
72376
72459
  var CancelToken = class _CancelToken {
72377
72460
  constructor(executor) {
72378
72461
  if (typeof executor !== "function") {
@@ -72462,19 +72545,19 @@ var CancelToken = class _CancelToken {
72462
72545
  };
72463
72546
  var CancelToken_default = CancelToken;
72464
72547
 
72465
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/spread.js
72548
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/spread.js
72466
72549
  function spread(callback) {
72467
72550
  return function wrap(arr) {
72468
72551
  return callback.apply(null, arr);
72469
72552
  };
72470
72553
  }
72471
72554
 
72472
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/isAxiosError.js
72555
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/isAxiosError.js
72473
72556
  function isAxiosError(payload) {
72474
72557
  return utils_default.isObject(payload) && payload.isAxiosError === true;
72475
72558
  }
72476
72559
 
72477
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/helpers/HttpStatusCode.js
72560
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/helpers/HttpStatusCode.js
72478
72561
  var HttpStatusCode = {
72479
72562
  Continue: 100,
72480
72563
  SwitchingProtocols: 101,
@@ -72545,7 +72628,7 @@ Object.entries(HttpStatusCode).forEach(([key, value]) => {
72545
72628
  });
72546
72629
  var HttpStatusCode_default = HttpStatusCode;
72547
72630
 
72548
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/lib/axios.js
72631
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/lib/axios.js
72549
72632
  function createInstance(defaultConfig) {
72550
72633
  const context = new Axios_default(defaultConfig);
72551
72634
  const instance = bind(Axios_default.prototype.request, context);
@@ -72578,7 +72661,7 @@ axios.HttpStatusCode = HttpStatusCode_default;
72578
72661
  axios.default = axios;
72579
72662
  var axios_default = axios;
72580
72663
 
72581
- // ../../../../node_modules/.pnpm/axios@1.6.0/node_modules/axios/index.js
72664
+ // ../../../../node_modules/.pnpm/axios@1.6.7/node_modules/axios/index.js
72582
72665
  var {
72583
72666
  Axios: Axios2,
72584
72667
  AxiosError: AxiosError2,
@@ -72598,17 +72681,17 @@ var {
72598
72681
  mergeConfig: mergeConfig2
72599
72682
  } = axios_default;
72600
72683
 
72601
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
72684
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
72602
72685
  var import_tar = __toESM(require_tar());
72603
72686
 
72604
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
72687
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
72605
72688
  var import_utils36 = require("@modern-js/utils");
72606
72689
 
72607
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/constants.js
72690
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/constants.js
72608
72691
  var NPM_API_TIMEOUT = 3e4;
72609
72692
  var CATCHE_VALIDITY_PREIOD = 12 * 3600 * 1e3;
72610
72693
 
72611
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
72694
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
72612
72695
  async function getNpmTarballUrl(pkgName, pkgVersion, options) {
72613
72696
  const { registryUrl } = options || {};
72614
72697
  const params = [
@@ -72631,7 +72714,7 @@ async function getNpmTarballUrl(pkgName, pkgVersion, options) {
72631
72714
  }
72632
72715
  }
72633
72716
 
72634
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmVersion.js
72717
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmVersion.js
72635
72718
  var import_utils37 = require("@modern-js/utils");
72636
72719
  async function getNpmVersion(packageName, options) {
72637
72720
  const { version, registryUrl } = options || {};
@@ -72653,7 +72736,7 @@ async function getNpmVersion(packageName, options) {
72653
72736
  return stdout;
72654
72737
  }
72655
72738
 
72656
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
72739
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
72657
72740
  async function isValidCache(cacheDir) {
72658
72741
  if (await fsExists(`${cacheDir}/.codesmith.completed`)) {
72659
72742
  const preCacheTimeStr = await import_utils38.fs.readFile(`${cacheDir}/.codesmith.completed`, {
@@ -72733,7 +72816,7 @@ async function downloadPackage(pkgName, pkgVersion = "latest", options = {}) {
72733
72816
  return targetDir;
72734
72817
  }
72735
72818
 
72736
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/getPackageInfo.js
72819
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getPackageInfo.js
72737
72820
  var import_utils39 = require("@modern-js/utils");
72738
72821
  function getPackageInfo(packageName) {
72739
72822
  if (!packageName) {
@@ -72758,7 +72841,7 @@ function getPackageInfo(packageName) {
72758
72841
  };
72759
72842
  }
72760
72843
 
72761
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
72844
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
72762
72845
  var MaterialsManager = class {
72763
72846
  loadLocalGenerator(generator) {
72764
72847
  if (!import_path6.default.isAbsolute(generator)) {
@@ -72789,7 +72872,7 @@ var MaterialsManager = class {
72789
72872
  }
72790
72873
  };
72791
72874
 
72792
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
72875
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
72793
72876
  var CodeSmith = class {
72794
72877
  async forge({ tasks, pwd }) {
72795
72878
  var _this_logger_timing, _this_logger;
@@ -72833,7 +72916,7 @@ var CodeSmith = class {
72833
72916
  }
72834
72917
  };
72835
72918
 
72836
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
72919
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
72837
72920
  var import_handlebars = __toESM(require_lib());
72838
72921
  function renderString(template, fullData, registers) {
72839
72922
  const helpers = {
@@ -72847,7 +72930,7 @@ function renderString(template, fullData, registers) {
72847
72930
  return import_handlebars.default.compile(template)(fullData) || "";
72848
72931
  }
72849
72932
 
72850
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
72933
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
72851
72934
  var HandlebarsAPI = class {
72852
72935
  async registerHelp(helpers) {
72853
72936
  this.registers.helpers = {
@@ -72897,13 +72980,13 @@ var HandlebarsAPI = class {
72897
72980
  }
72898
72981
  };
72899
72982
 
72900
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
72983
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
72901
72984
  var import_ejs = __toESM(require_ejs());
72902
72985
  function renderString2(template, fullData) {
72903
72986
  return import_ejs.default.render(template, fullData) || "";
72904
72987
  }
72905
72988
 
72906
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
72989
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
72907
72990
  var EjsAPI = class {
72908
72991
  async renderTemplate(templateResource, target, parameters = {}) {
72909
72992
  if (templateResource._type !== FS_RESOURCE) {
@@ -72936,7 +73019,7 @@ var EjsAPI = class {
72936
73019
  }
72937
73020
  };
72938
73021
 
72939
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
73022
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
72940
73023
  var import_path8 = __toESM(require("path"));
72941
73024
  var import_utils43 = require("@modern-js/utils");
72942
73025
  var FsAPI = class {
@@ -72964,7 +73047,7 @@ var FsAPI = class {
72964
73047
  }
72965
73048
  };
72966
73049
 
72967
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
73050
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
72968
73051
  var import_lodash2 = require("@modern-js/utils/lodash");
72969
73052
 
72970
73053
  // ../../../../node_modules/.pnpm/@formily+shared@2.2.24/node_modules/@formily/shared/esm/checkers.js
@@ -82599,10 +82682,10 @@ var Schema = (
82599
82682
  }()
82600
82683
  );
82601
82684
 
82602
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
82685
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
82603
82686
  var import_inquirer = __toESM(require_inquirer());
82604
82687
 
82605
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
82688
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
82606
82689
  var import_lodash = require("@modern-js/utils/lodash");
82607
82690
  function validateSchema(schema) {
82608
82691
  const { type, properties } = schema;
@@ -82694,7 +82777,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
82694
82777
  return getQuestionFromSchema(schema, configValue, validateMap, initValue);
82695
82778
  }
82696
82779
 
82697
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
82780
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
82698
82781
  var compileRule = (rule, scope) => {
82699
82782
  const state = Schema.compile(rule, {
82700
82783
  $self: {},
@@ -82798,7 +82881,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
82798
82881
  return answers;
82799
82882
  }
82800
82883
 
82801
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
82884
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
82802
82885
  var CLIReader = class {
82803
82886
  getAnswers() {
82804
82887
  return this.answers;
@@ -82829,7 +82912,7 @@ var CLIReader = class {
82829
82912
  }
82830
82913
  };
82831
82914
 
82832
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
82915
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
82833
82916
  var FormilyAPI = class {
82834
82917
  mergeAnswers(answers, configValue) {
82835
82918
  const inputData = (0, import_lodash2.merge)(answers, configValue);
@@ -82852,7 +82935,7 @@ var FormilyAPI = class {
82852
82935
  }
82853
82936
  };
82854
82937
 
82855
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
82938
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
82856
82939
  var import_inquirer3 = __toESM(require_inquirer2());
82857
82940
 
82858
82941
  // ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.37.2/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
@@ -82918,7 +83001,7 @@ var I18n = class {
82918
83001
  }
82919
83002
  };
82920
83003
 
82921
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
83004
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
82922
83005
  var ZH_LOCALE = {
82923
83006
  environment: {
82924
83007
  node_version: "请升级 Node 版本至 LIS",
@@ -82945,7 +83028,7 @@ var ZH_LOCALE = {
82945
83028
  }
82946
83029
  };
82947
83030
 
82948
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
83031
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
82949
83032
  var EN_LOCALE = {
82950
83033
  environment: {
82951
83034
  node_version: "please upgrade node to lts version",
@@ -82972,14 +83055,14 @@ var EN_LOCALE = {
82972
83055
  }
82973
83056
  };
82974
83057
 
82975
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
83058
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
82976
83059
  var i18n = new I18n();
82977
83060
  var localeKeys = i18n.init("zh", {
82978
83061
  zh: ZH_LOCALE,
82979
83062
  en: EN_LOCALE
82980
83063
  });
82981
83064
 
82982
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
83065
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
82983
83066
  var import_lodash5 = require("@modern-js/utils/lodash");
82984
83067
  function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
82985
83068
  for (const question of questions) {
@@ -83007,7 +83090,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
83007
83090
  return questions;
83008
83091
  }
83009
83092
 
83010
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
83093
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
83011
83094
  var import_path10 = __toESM(require("path"));
83012
83095
  var import_utils45 = require("@modern-js/utils");
83013
83096
  var NODE_MAJOR_VERSION_MAP = {
@@ -83055,7 +83138,7 @@ async function checkUseNvm(cwd, logger2) {
83055
83138
  }
83056
83139
  }
83057
83140
 
83058
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
83141
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
83059
83142
  var AppAPI = class {
83060
83143
  async checkEnvironment(nodeVersion) {
83061
83144
  if (import_utils46.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
@@ -84260,194 +84343,8 @@ var SolutionSchemas = {
84260
84343
  custom: getBaseSchema
84261
84344
  };
84262
84345
 
84263
- // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_async_to_generator.js
84264
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
84265
- try {
84266
- var info = gen[key](arg);
84267
- var value = info.value;
84268
- } catch (error) {
84269
- reject(error);
84270
- return;
84271
- }
84272
- if (info.done)
84273
- resolve(value);
84274
- else
84275
- Promise.resolve(value).then(_next, _throw);
84276
- }
84277
- function _async_to_generator(fn) {
84278
- return function() {
84279
- var self3 = this, args = arguments;
84280
- return new Promise(function(resolve, reject) {
84281
- var gen = fn.apply(self3, args);
84282
- function _next(value) {
84283
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
84284
- }
84285
- function _throw(err) {
84286
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
84287
- }
84288
- _next(void 0);
84289
- });
84290
- };
84291
- }
84292
-
84293
- // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_class_call_check.js
84294
- function _class_call_check(instance, Constructor) {
84295
- if (!(instance instanceof Constructor))
84296
- throw new TypeError("Cannot call a class as a function");
84297
- }
84298
-
84299
- // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_create_class.js
84300
- function _defineProperties(target, props) {
84301
- for (var i = 0; i < props.length; i++) {
84302
- var descriptor = props[i];
84303
- descriptor.enumerable = descriptor.enumerable || false;
84304
- descriptor.configurable = true;
84305
- if ("value" in descriptor)
84306
- descriptor.writable = true;
84307
- Object.defineProperty(target, descriptor.key, descriptor);
84308
- }
84309
- }
84310
- function _create_class(Constructor, protoProps, staticProps) {
84311
- if (protoProps)
84312
- _defineProperties(Constructor.prototype, protoProps);
84313
- if (staticProps)
84314
- _defineProperties(Constructor, staticProps);
84315
- return Constructor;
84316
- }
84317
-
84318
- // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_spread.js
84319
- function _object_spread(target) {
84320
- for (var i = 1; i < arguments.length; i++) {
84321
- var source = arguments[i] != null ? arguments[i] : {};
84322
- var ownKeys2 = Object.keys(source);
84323
- if (typeof Object.getOwnPropertySymbols === "function") {
84324
- ownKeys2 = ownKeys2.concat(
84325
- Object.getOwnPropertySymbols(source).filter(function(sym) {
84326
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
84327
- })
84328
- );
84329
- }
84330
- ownKeys2.forEach(function(key) {
84331
- _define_property2(target, key, source[key]);
84332
- });
84333
- }
84334
- return target;
84335
- }
84336
-
84337
- // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_spread_props.js
84338
- function ownKeys(object, enumerableOnly) {
84339
- var keys = Object.keys(object);
84340
- if (Object.getOwnPropertySymbols) {
84341
- var symbols = Object.getOwnPropertySymbols(object);
84342
- if (enumerableOnly) {
84343
- symbols = symbols.filter(function(sym) {
84344
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
84345
- });
84346
- }
84347
- keys.push.apply(keys, symbols);
84348
- }
84349
- return keys;
84350
- }
84351
- function _object_spread_props(target, source) {
84352
- source = source != null ? source : {};
84353
- if (Object.getOwnPropertyDescriptors)
84354
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
84355
- else {
84356
- ownKeys(Object(source)).forEach(function(key) {
84357
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
84358
- });
84359
- }
84360
- return target;
84361
- }
84362
-
84363
- // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_without_properties_loose.js
84364
- function _object_without_properties_loose(source, excluded) {
84365
- if (source == null)
84366
- return {};
84367
- var target = {};
84368
- var sourceKeys = Object.keys(source);
84369
- var key, i;
84370
- for (i = 0; i < sourceKeys.length; i++) {
84371
- key = sourceKeys[i];
84372
- if (excluded.indexOf(key) >= 0)
84373
- continue;
84374
- target[key] = source[key];
84375
- }
84376
- return target;
84377
- }
84378
-
84379
- // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_without_properties.js
84380
- function _object_without_properties(source, excluded) {
84381
- if (source == null)
84382
- return {};
84383
- var target = _object_without_properties_loose(source, excluded);
84384
- var key, i;
84385
- if (Object.getOwnPropertySymbols) {
84386
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
84387
- for (i = 0; i < sourceSymbolKeys.length; i++) {
84388
- key = sourceSymbolKeys[i];
84389
- if (excluded.indexOf(key) >= 0)
84390
- continue;
84391
- if (!Object.prototype.propertyIsEnumerable.call(source, key))
84392
- continue;
84393
- target[key] = source[key];
84394
- }
84395
- }
84396
- return target;
84397
- }
84398
-
84399
- // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_array_like_to_array.js
84400
- function _array_like_to_array(arr, len) {
84401
- if (len == null || len > arr.length)
84402
- len = arr.length;
84403
- for (var i = 0, arr2 = new Array(len); i < len; i++)
84404
- arr2[i] = arr[i];
84405
- return arr2;
84406
- }
84407
-
84408
- // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_array_without_holes.js
84409
- function _array_without_holes(arr) {
84410
- if (Array.isArray(arr))
84411
- return _array_like_to_array(arr);
84412
- }
84413
-
84414
- // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_iterable_to_array.js
84415
- function _iterable_to_array(iter) {
84416
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
84417
- return Array.from(iter);
84418
- }
84419
- }
84420
-
84421
- // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_non_iterable_spread.js
84422
- function _non_iterable_spread() {
84423
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
84424
- }
84425
-
84426
- // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_unsupported_iterable_to_array.js
84427
- function _unsupported_iterable_to_array(o, minLen) {
84428
- if (!o)
84429
- return;
84430
- if (typeof o === "string")
84431
- return _array_like_to_array(o, minLen);
84432
- var n = Object.prototype.toString.call(o).slice(8, -1);
84433
- if (n === "Object" && o.constructor)
84434
- n = o.constructor.name;
84435
- if (n === "Map" || n === "Set")
84436
- return Array.from(n);
84437
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
84438
- return _array_like_to_array(o, minLen);
84439
- }
84440
-
84441
- // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_to_consumable_array.js
84442
- function _to_consumable_array(arr) {
84443
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
84444
- }
84445
-
84446
- // ../../generator-plugin/dist/esm/index.js
84447
- var import_path17 = __toESM(require("path"));
84448
-
84449
84346
  // ../../generator-utils/dist/esm/index.js
84450
- var import_path11 = __toESM(require("path"));
84347
+ var import_path12 = __toESM(require("path"));
84451
84348
  var import_utils49 = require("@modern-js/utils");
84452
84349
 
84453
84350
  // ../../generator-utils/dist/esm/utils/stripAnsi.js
@@ -84568,6 +84465,17 @@ async function getAvailableVersion(packageName, currentVersion, registry2) {
84568
84465
  return currentVersion;
84569
84466
  }
84570
84467
 
84468
+ // ../../generator-utils/dist/esm/utils/getGeneratorPath.js
84469
+ var import_path11 = __toESM(require("path"));
84470
+ var getGeneratorPath = (generator, distTag) => {
84471
+ if (process.env.CODESMITH_ENV === "development") {
84472
+ return import_path11.default.dirname(require.resolve(generator));
84473
+ } else if (distTag) {
84474
+ return `${generator}@${distTag}`;
84475
+ }
84476
+ return generator;
84477
+ };
84478
+
84571
84479
  // ../../generator-utils/dist/esm/index.js
84572
84480
  var import_utils50 = require("@modern-js/utils");
84573
84481
  async function getPackageVersion(packageName, registry2) {
@@ -84615,13 +84523,13 @@ async function getModernPluginVersion(solution, packageName, options = {
84615
84523
  if (!packageName.startsWith("@modern-js") || packageName.includes("electron") || packageName.includes("codesmith") || packageName.includes("easy-form") || packageName.startsWith("@modern-js-reduck")) {
84616
84524
  return getLatetPluginVersion("latest");
84617
84525
  }
84618
- let pkgPath = import_path11.default.join(require.resolve(SolutionToolsMap[solution], {
84526
+ let pkgPath = import_path12.default.join(require.resolve(SolutionToolsMap[solution], {
84619
84527
  paths: [
84620
84528
  cwd
84621
84529
  ]
84622
84530
  }), "../../..", "package.json");
84623
84531
  if (solution === Solution.Module) {
84624
- pkgPath = import_path11.default.join(require.resolve(SolutionToolsMap[solution], {
84532
+ pkgPath = import_path12.default.join(require.resolve(SolutionToolsMap[solution], {
84625
84533
  paths: [
84626
84534
  cwd
84627
84535
  ]
@@ -84642,17 +84550,201 @@ async function getModernPluginVersion(solution, packageName, options = {
84642
84550
  return getLatetPluginVersion();
84643
84551
  }
84644
84552
 
84553
+ // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_async_to_generator.js
84554
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
84555
+ try {
84556
+ var info = gen[key](arg);
84557
+ var value = info.value;
84558
+ } catch (error) {
84559
+ reject(error);
84560
+ return;
84561
+ }
84562
+ if (info.done)
84563
+ resolve(value);
84564
+ else
84565
+ Promise.resolve(value).then(_next, _throw);
84566
+ }
84567
+ function _async_to_generator(fn) {
84568
+ return function() {
84569
+ var self3 = this, args = arguments;
84570
+ return new Promise(function(resolve, reject) {
84571
+ var gen = fn.apply(self3, args);
84572
+ function _next(value) {
84573
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
84574
+ }
84575
+ function _throw(err) {
84576
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
84577
+ }
84578
+ _next(void 0);
84579
+ });
84580
+ };
84581
+ }
84582
+
84583
+ // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_class_call_check.js
84584
+ function _class_call_check(instance, Constructor) {
84585
+ if (!(instance instanceof Constructor))
84586
+ throw new TypeError("Cannot call a class as a function");
84587
+ }
84588
+
84589
+ // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_create_class.js
84590
+ function _defineProperties(target, props) {
84591
+ for (var i = 0; i < props.length; i++) {
84592
+ var descriptor = props[i];
84593
+ descriptor.enumerable = descriptor.enumerable || false;
84594
+ descriptor.configurable = true;
84595
+ if ("value" in descriptor)
84596
+ descriptor.writable = true;
84597
+ Object.defineProperty(target, descriptor.key, descriptor);
84598
+ }
84599
+ }
84600
+ function _create_class(Constructor, protoProps, staticProps) {
84601
+ if (protoProps)
84602
+ _defineProperties(Constructor.prototype, protoProps);
84603
+ if (staticProps)
84604
+ _defineProperties(Constructor, staticProps);
84605
+ return Constructor;
84606
+ }
84607
+
84608
+ // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_spread.js
84609
+ function _object_spread(target) {
84610
+ for (var i = 1; i < arguments.length; i++) {
84611
+ var source = arguments[i] != null ? arguments[i] : {};
84612
+ var ownKeys2 = Object.keys(source);
84613
+ if (typeof Object.getOwnPropertySymbols === "function") {
84614
+ ownKeys2 = ownKeys2.concat(
84615
+ Object.getOwnPropertySymbols(source).filter(function(sym) {
84616
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
84617
+ })
84618
+ );
84619
+ }
84620
+ ownKeys2.forEach(function(key) {
84621
+ _define_property2(target, key, source[key]);
84622
+ });
84623
+ }
84624
+ return target;
84625
+ }
84626
+
84627
+ // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_spread_props.js
84628
+ function ownKeys(object, enumerableOnly) {
84629
+ var keys = Object.keys(object);
84630
+ if (Object.getOwnPropertySymbols) {
84631
+ var symbols = Object.getOwnPropertySymbols(object);
84632
+ if (enumerableOnly) {
84633
+ symbols = symbols.filter(function(sym) {
84634
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
84635
+ });
84636
+ }
84637
+ keys.push.apply(keys, symbols);
84638
+ }
84639
+ return keys;
84640
+ }
84641
+ function _object_spread_props(target, source) {
84642
+ source = source != null ? source : {};
84643
+ if (Object.getOwnPropertyDescriptors)
84644
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
84645
+ else {
84646
+ ownKeys(Object(source)).forEach(function(key) {
84647
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
84648
+ });
84649
+ }
84650
+ return target;
84651
+ }
84652
+
84653
+ // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_without_properties_loose.js
84654
+ function _object_without_properties_loose(source, excluded) {
84655
+ if (source == null)
84656
+ return {};
84657
+ var target = {};
84658
+ var sourceKeys = Object.keys(source);
84659
+ var key, i;
84660
+ for (i = 0; i < sourceKeys.length; i++) {
84661
+ key = sourceKeys[i];
84662
+ if (excluded.indexOf(key) >= 0)
84663
+ continue;
84664
+ target[key] = source[key];
84665
+ }
84666
+ return target;
84667
+ }
84668
+
84669
+ // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_without_properties.js
84670
+ function _object_without_properties(source, excluded) {
84671
+ if (source == null)
84672
+ return {};
84673
+ var target = _object_without_properties_loose(source, excluded);
84674
+ var key, i;
84675
+ if (Object.getOwnPropertySymbols) {
84676
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
84677
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
84678
+ key = sourceSymbolKeys[i];
84679
+ if (excluded.indexOf(key) >= 0)
84680
+ continue;
84681
+ if (!Object.prototype.propertyIsEnumerable.call(source, key))
84682
+ continue;
84683
+ target[key] = source[key];
84684
+ }
84685
+ }
84686
+ return target;
84687
+ }
84688
+
84689
+ // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_array_like_to_array.js
84690
+ function _array_like_to_array(arr, len) {
84691
+ if (len == null || len > arr.length)
84692
+ len = arr.length;
84693
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
84694
+ arr2[i] = arr[i];
84695
+ return arr2;
84696
+ }
84697
+
84698
+ // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_array_without_holes.js
84699
+ function _array_without_holes(arr) {
84700
+ if (Array.isArray(arr))
84701
+ return _array_like_to_array(arr);
84702
+ }
84703
+
84704
+ // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_iterable_to_array.js
84705
+ function _iterable_to_array(iter) {
84706
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
84707
+ return Array.from(iter);
84708
+ }
84709
+ }
84710
+
84711
+ // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_non_iterable_spread.js
84712
+ function _non_iterable_spread() {
84713
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
84714
+ }
84715
+
84716
+ // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_unsupported_iterable_to_array.js
84717
+ function _unsupported_iterable_to_array(o, minLen) {
84718
+ if (!o)
84719
+ return;
84720
+ if (typeof o === "string")
84721
+ return _array_like_to_array(o, minLen);
84722
+ var n = Object.prototype.toString.call(o).slice(8, -1);
84723
+ if (n === "Object" && o.constructor)
84724
+ n = o.constructor.name;
84725
+ if (n === "Map" || n === "Set")
84726
+ return Array.from(n);
84727
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
84728
+ return _array_like_to_array(o, minLen);
84729
+ }
84730
+
84731
+ // ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_to_consumable_array.js
84732
+ function _to_consumable_array(arr) {
84733
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
84734
+ }
84735
+
84645
84736
  // ../../generator-plugin/dist/esm/index.js
84737
+ var import_path18 = __toESM(require("path"));
84646
84738
  var import_lodash14 = require("@modern-js/utils/lodash");
84647
84739
 
84648
84740
  // ../../generator-plugin/dist/esm/context/file.js
84649
- var import_path13 = __toESM(require("path"));
84741
+ var import_path14 = __toESM(require("path"));
84650
84742
 
84651
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.4/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
84743
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.5/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
84652
84744
  var import_comment_json2 = __toESM(require_src2());
84653
84745
  var declarationUpdate = __toESM(require_dist());
84654
84746
 
84655
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.4/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
84747
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.5/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
84656
84748
  async function editJson(generatorCore, resource, getNewJsonValue) {
84657
84749
  const originJsonValue = await resource.value();
84658
84750
  const newJsonString = await getNewJsonValue(originJsonValue.content);
@@ -84665,7 +84757,7 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
84665
84757
  return newJsonString;
84666
84758
  }
84667
84759
 
84668
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.4/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
84760
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.5/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
84669
84761
  var JsonAPI = class {
84670
84762
  async get(resource) {
84671
84763
  const originJsonValue = await resource.value();
@@ -84711,7 +84803,7 @@ var JsonAPI = class {
84711
84803
  };
84712
84804
 
84713
84805
  // ../../generator-plugin/dist/esm/utils/file.js
84714
- var import_path12 = __toESM(require("path"));
84806
+ var import_path13 = __toESM(require("path"));
84715
84807
  var import_utils52 = require("@modern-js/utils");
84716
84808
  var FileType;
84717
84809
  (function(FileType22) {
@@ -84761,20 +84853,20 @@ function _fileExists() {
84761
84853
  return _fileExists.apply(this, arguments);
84762
84854
  }
84763
84855
  function dropFileRootFolder(file) {
84764
- var fileParts = import_path12.default.normalize(file).split(import_path12.default.sep);
84856
+ var fileParts = import_path13.default.normalize(file).split(import_path13.default.sep);
84765
84857
  fileParts.shift();
84766
- return fileParts.join(import_path12.default.sep);
84858
+ return fileParts.join(import_path13.default.sep);
84767
84859
  }
84768
84860
  function dropFileRootPath(file, rootPath) {
84769
84861
  var fileRootPath = rootPath ? file.replace(rootPath, "") : dropFileRootFolder(file);
84770
- return fileRootPath.startsWith(import_path12.default.sep) ? fileRootPath : "".concat(import_path12.default.sep).concat(fileRootPath);
84862
+ return fileRootPath.startsWith(import_path13.default.sep) ? fileRootPath : "".concat(import_path13.default.sep).concat(fileRootPath);
84771
84863
  }
84772
84864
  function isAbsoluteOrRelativeFileTo(relativePath) {
84773
84865
  var isFile2 = function(file) {
84774
84866
  return import_utils50.fs.existsSync(file) && import_utils50.fs.lstatSync(file).isFile();
84775
84867
  };
84776
84868
  return function(fileName) {
84777
- return isFile2(fileName) || isFile2(import_path12.default.join(relativePath, fileName));
84869
+ return isFile2(fileName) || isFile2(import_path13.default.join(relativePath, fileName));
84778
84870
  };
84779
84871
  }
84780
84872
  function addFile(config, projectPath, templatePath, renderString3) {
@@ -84786,7 +84878,7 @@ function _addFile() {
84786
84878
  return __generator(this, function(_state) {
84787
84879
  switch (_state.label) {
84788
84880
  case 0:
84789
- fileDestPath = import_path12.default.join(projectPath, config.file);
84881
+ fileDestPath = import_path13.default.join(projectPath, config.file);
84790
84882
  return [
84791
84883
  4,
84792
84884
  fileExists(fileDestPath)
@@ -84798,13 +84890,13 @@ function _addFile() {
84798
84890
  }
84799
84891
  return [
84800
84892
  4,
84801
- import_utils50.fs.mkdir(import_path12.default.dirname(fileDestPath), {
84893
+ import_utils50.fs.mkdir(import_path13.default.dirname(fileDestPath), {
84802
84894
  recursive: true
84803
84895
  })
84804
84896
  ];
84805
84897
  case 2:
84806
84898
  _state.sent();
84807
- absTemplatePath = config.templateFile ? import_path12.default.join(templatePath, config.templateFile) : null;
84899
+ absTemplatePath = config.templateFile ? import_path13.default.join(templatePath, config.templateFile) : null;
84808
84900
  if (!(absTemplatePath != null && (config.type === "binary" || Object.keys(config.data || {}).length === 0)))
84809
84901
  return [
84810
84902
  3,
@@ -84874,9 +84966,9 @@ function _addManyFiles() {
84874
84966
  config.templateFiles = config.templateFiles();
84875
84967
  }
84876
84968
  config.templateFiles = config.templateFiles.map(function(templateFile2) {
84877
- return import_path12.default.join(templatePath, templateFile2);
84969
+ return import_path13.default.join(templatePath, templateFile2);
84878
84970
  });
84879
- config.templateBase = ((_config_templateBase = config.templateBase) === null || _config_templateBase === void 0 ? void 0 : _config_templateBase.startsWith(import_path12.default.sep)) ? config.templateBase : "".concat(import_path12.default.sep).concat(config.templateBase || "");
84971
+ 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 || "");
84880
84972
  templateFiles = import_utils52.globby.sync(config.templateFiles, {
84881
84973
  braceExpansion: false,
84882
84974
  dot: config.dot
@@ -84904,10 +84996,10 @@ function _addManyFiles() {
84904
84996
  5
84905
84997
  ];
84906
84998
  templateFile = _step.value;
84907
- absTemplatePath = import_path12.default.resolve(templatePath, templateFile);
84999
+ absTemplatePath = import_path13.default.resolve(templatePath, templateFile);
84908
85000
  targetFile = dropFileRootPath(templateFile, config.templateBase);
84909
85001
  fileCfg = _object_spread_props(_object_spread({}, config), {
84910
- file: import_path12.default.join(config.destination, config.fileNameFunc ? config.fileNameFunc(targetFile) : targetFile),
85002
+ file: import_path13.default.join(config.destination, config.fileNameFunc ? config.fileNameFunc(targetFile) : targetFile),
84911
85003
  templateFile: absTemplatePath,
84912
85004
  force: true
84913
85005
  });
@@ -85202,14 +85294,14 @@ var PluginFileAPI = /* @__PURE__ */ function() {
85202
85294
  case 0:
85203
85295
  return [
85204
85296
  4,
85205
- import_utils50.fs.readFile(import_path13.default.join(_this.projectPath, fileName), "utf-8")
85297
+ import_utils50.fs.readFile(import_path14.default.join(_this.projectPath, fileName), "utf-8")
85206
85298
  ];
85207
85299
  case 1:
85208
85300
  content = _state.sent();
85209
85301
  newContent = update(content.split("\n"));
85210
85302
  return [
85211
85303
  4,
85212
- import_utils50.fs.writeFile(import_path13.default.join(_this.projectPath, fileName), newContent.join("\n"), "utf-8")
85304
+ import_utils50.fs.writeFile(import_path14.default.join(_this.projectPath, fileName), newContent.join("\n"), "utf-8")
85213
85305
  ];
85214
85306
  case 2:
85215
85307
  _state.sent();
@@ -85230,7 +85322,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
85230
85322
  return __generator(this, function(_state) {
85231
85323
  switch (_state.label) {
85232
85324
  case 0:
85233
- file = import_path13.default.join(_this.projectPath, fileName);
85325
+ file = import_path14.default.join(_this.projectPath, fileName);
85234
85326
  return [
85235
85327
  4,
85236
85328
  fileExists(file)
@@ -85266,7 +85358,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
85266
85358
  return __generator(this, function(_state) {
85267
85359
  switch (_state.label) {
85268
85360
  case 0:
85269
- dir = import_path13.default.join(_this.projectPath, dirName);
85361
+ dir = import_path14.default.join(_this.projectPath, dirName);
85270
85362
  _state.label = 1;
85271
85363
  case 1:
85272
85364
  _state.trys.push([
@@ -85323,7 +85415,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
85323
85415
  return __generator(this, function(_state) {
85324
85416
  return [
85325
85417
  2,
85326
- fileExists(import_path13.default.join(_this.projectPath, fileName))
85418
+ fileExists(import_path14.default.join(_this.projectPath, fileName))
85327
85419
  ];
85328
85420
  });
85329
85421
  })();
@@ -85337,7 +85429,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
85337
85429
  return __generator(this, function(_state) {
85338
85430
  return [
85339
85431
  2,
85340
- import_utils50.fs.readdir(import_path13.default.join(_this.projectPath, dir))
85432
+ import_utils50.fs.readdir(import_path14.default.join(_this.projectPath, dir))
85341
85433
  ];
85342
85434
  });
85343
85435
  })();
@@ -85743,11 +85835,18 @@ var PluginNpmAPI = /* @__PURE__ */ function() {
85743
85835
  }();
85744
85836
 
85745
85837
  // ../../new-action/dist/esm/utils/index.js
85746
- var import_path14 = __toESM(require("path"));
85838
+ var import_path15 = __toESM(require("path"));
85747
85839
  var import_utils53 = require("@modern-js/utils");
85840
+ var swap = (obj) => {
85841
+ return Object.keys(obj).reduce((acc, key) => {
85842
+ acc[obj[key]] = key;
85843
+ return acc;
85844
+ }, {});
85845
+ };
85846
+ var dependenceToSolution = swap(SolutionToolsMap);
85748
85847
  function alreadyRepo(cwd = process.cwd()) {
85749
85848
  try {
85750
- return import_utils50.fs.existsSync(import_path14.default.resolve(cwd, "package.json"));
85849
+ return import_utils50.fs.existsSync(import_path15.default.resolve(cwd, "package.json"));
85751
85850
  } catch (e) {
85752
85851
  return false;
85753
85852
  }
@@ -85766,7 +85865,7 @@ var readJson = (jsonPath) => {
85766
85865
  }
85767
85866
  };
85768
85867
  function hasEnabledFunction(action2, dependencies, devDependencies, peerDependencies, cwd) {
85769
- const packageJsonPath = import_path14.default.normalize(`${cwd}/package.json`);
85868
+ const packageJsonPath = import_path15.default.normalize(`${cwd}/package.json`);
85770
85869
  const packageJson = readJson(packageJsonPath);
85771
85870
  if (!dependencies[action2] && !devDependencies[action2]) {
85772
85871
  return false;
@@ -85785,9 +85884,9 @@ function hasEnabledFunction(action2, dependencies, devDependencies, peerDependen
85785
85884
  }
85786
85885
  return false;
85787
85886
  }
85788
- function getGeneratorPath(generator, distTag) {
85887
+ function getGeneratorPath2(generator, distTag) {
85789
85888
  if (process.env.CODESMITH_ENV === "development") {
85790
- return import_path14.default.dirname(require.resolve(generator));
85889
+ return import_path15.default.dirname(require.resolve(generator));
85791
85890
  } else if (distTag) {
85792
85891
  return `${generator}@${distTag}`;
85793
85892
  }
@@ -85844,7 +85943,7 @@ var MWANewAction = async (options) => {
85844
85943
  });
85845
85944
  const actionType = ans.actionType;
85846
85945
  const action2 = ans[actionType];
85847
- const generator = getGeneratorPath(MWANewActionGenerators[actionType][action2], distTag);
85946
+ const generator = getGeneratorPath2(MWANewActionGenerators[actionType][action2], distTag);
85848
85947
  if (!generator) {
85849
85948
  throw new Error(`no valid option`);
85850
85949
  }
@@ -85940,7 +86039,7 @@ var ModuleNewAction = async (options) => {
85940
86039
  });
85941
86040
  const actionType = ans.actionType;
85942
86041
  const action2 = ans[actionType];
85943
- const generator = getGeneratorPath(ModuleNewActionGenerators[actionType][action2], distTag);
86042
+ const generator = getGeneratorPath2(ModuleNewActionGenerators[actionType][action2], distTag);
85944
86043
  if (!generator) {
85945
86044
  throw new Error(`no valid option`);
85946
86045
  }
@@ -85996,7 +86095,7 @@ var ModuleNewAction = async (options) => {
85996
86095
  };
85997
86096
 
85998
86097
  // ../../new-action/dist/esm/monorepo.js
85999
- var import_path15 = __toESM(require("path"));
86098
+ var import_path16 = __toESM(require("path"));
86000
86099
  var import_lodash12 = require("@modern-js/utils/lodash");
86001
86100
  var REPO_GENERATOR = "@modern-js/repo-generator";
86002
86101
  var MonorepoNewAction = async (options) => {
@@ -86019,10 +86118,10 @@ var MonorepoNewAction = async (options) => {
86019
86118
  }
86020
86119
  const plugins = plugin.map((plugin2) => {
86021
86120
  try {
86022
- return import_path15.default.join(require.resolve(plugin2), "../../");
86121
+ return import_path16.default.join(require.resolve(plugin2), "../../");
86023
86122
  } catch (e) {
86024
86123
  try {
86025
- return import_path15.default.join(require.resolve(plugin2), "../../../../");
86124
+ return import_path16.default.join(require.resolve(plugin2), "../../../../");
86026
86125
  } catch (e2) {
86027
86126
  return plugin2;
86028
86127
  }
@@ -86300,7 +86399,7 @@ var PluginContext = /* @__PURE__ */ function() {
86300
86399
  }();
86301
86400
 
86302
86401
  // ../../generator-plugin/dist/esm/utils/index.js
86303
- var import_path16 = __toESM(require("path"));
86402
+ var import_path17 = __toESM(require("path"));
86304
86403
 
86305
86404
  // ../../generator-plugin/dist/esm/utils/module.js
86306
86405
  var import_lodash13 = require("@modern-js/utils/lodash");
@@ -86384,7 +86483,7 @@ function _installPlugins() {
86384
86483
  switch (_state2.label) {
86385
86484
  case 0:
86386
86485
  if (plugin.startsWith("file:")) {
86387
- pluginPath = import_path16.default.join(process.cwd(), plugin.slice(5));
86486
+ pluginPath = import_path17.default.join(process.cwd(), plugin.slice(5));
86388
86487
  return [
86389
86488
  2,
86390
86489
  {
@@ -86393,7 +86492,7 @@ function _installPlugins() {
86393
86492
  }
86394
86493
  ];
86395
86494
  }
86396
- if (import_path16.default.isAbsolute(plugin)) {
86495
+ if (import_path17.default.isAbsolute(plugin)) {
86397
86496
  return [
86398
86497
  2,
86399
86498
  {
@@ -86505,7 +86604,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
86505
86604
  ];
86506
86605
  return [
86507
86606
  4,
86508
- import_utils50.fs.readJSON(import_path17.default.join(process.cwd(), plugin.slice(5), "package.json"))
86607
+ import_utils50.fs.readJSON(import_path18.default.join(process.cwd(), plugin.slice(5), "package.json"))
86509
86608
  ];
86510
86609
  case 1:
86511
86610
  pkgJSON = _state2.sent();
@@ -86514,14 +86613,14 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
86514
86613
  6
86515
86614
  ];
86516
86615
  case 2:
86517
- if (!import_path17.default.isAbsolute(plugin))
86616
+ if (!import_path18.default.isAbsolute(plugin))
86518
86617
  return [
86519
86618
  3,
86520
86619
  4
86521
86620
  ];
86522
86621
  return [
86523
86622
  4,
86524
- import_utils50.fs.readJSON(import_path17.default.join(plugin, "package.json"))
86623
+ import_utils50.fs.readJSON(import_path18.default.join(plugin, "package.json"))
86525
86624
  ];
86526
86625
  case 3:
86527
86626
  pkgJSON = _state2.sent();
@@ -86791,7 +86890,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
86791
86890
  5
86792
86891
  ];
86793
86892
  info = _step.value;
86794
- (_info_context = info.context) === null || _info_context === void 0 ? void 0 : _info_context.handlePrepareContext(generatorCore, solution, import_path17.default.join(basePath, projectPath), import_path17.default.join(info.templatePath, "templates"), restData);
86893
+ (_info_context = info.context) === null || _info_context === void 0 ? void 0 : _info_context.handlePrepareContext(generatorCore, solution, import_path18.default.join(basePath, projectPath), import_path18.default.join(info.templatePath, "templates"), restData);
86795
86894
  onForgedFunc = (_info_context1 = info.context) === null || _info_context1 === void 0 ? void 0 : _info_context1.lifeCycleFuncMap[LifeCycle2.OnForged];
86796
86895
  if (!(onForgedFunc && (0, import_lodash14.isFunction)(onForgedFunc)))
86797
86896
  return [
@@ -86918,14 +87017,6 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
86918
87017
  }();
86919
87018
 
86920
87019
  // src/index.ts
86921
- var getGeneratorPath2 = (generator, distTag) => {
86922
- if (process.env.CODESMITH_ENV === "development") {
86923
- return import_path18.default.dirname(require.resolve(generator));
86924
- } else if (distTag) {
86925
- return `${generator}@${distTag}`;
86926
- }
86927
- return generator;
86928
- };
86929
87020
  var mergeDefaultConfig = (context) => {
86930
87021
  const { defaultSolution } = context.config;
86931
87022
  if (defaultSolution) {
@@ -86966,7 +87057,7 @@ var handleTemplateFile = async (context, generator, appApi, generatorPlugin) =>
86966
87057
  generator.logger.error("solution is not valid ");
86967
87058
  }
86968
87059
  await appApi.runSubGenerator(
86969
- getGeneratorPath2(solutionGenerator, context.config.distTag),
87060
+ getGeneratorPath(solutionGenerator, context.config.distTag),
86970
87061
  void 0,
86971
87062
  {
86972
87063
  ...isMonorepo ? MonorepoNewActionConfig[solution] || {} : {},