done-coding-create 0.11.18 → 0.11.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { c as m } from "./index-d1258ba5.js";
2
+ import { c as m } from "./index-0729467f.js";
3
3
  import "@done-coding/cli-utils";
4
4
  import "node:child_process";
5
5
  import "node:fs";
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import { readCliConfig as To, log as R, HooksNameEnum as v, createSubcommand as St, getRootScriptName as Gn, xPrompts as T, getConfigFileCommonOptions as Tt, addHuskyHooks as Co, initHandlerCommon as Ao, readConfigFile as ge, lookForParentTarget as qn, decryptAES as $o, encryptAES as No, getCurrentBranchName as Po, getCommitByHookName as jo, resolveMergeInfoByGitReflogAction as xo, checkCurrentIsRebasing as Fo, resolveMergeInfoByCommitMsg as Bo, getCurrentBranchLastCommitList as Uo, getLastReflogList as Do, createMainCommand as Lo } from "@done-coding/cli-utils";
3
- import { execSync as Y } from "node:child_process";
2
+ import { readCliConfig as To, log as R, HooksNameEnum as v, createSubcommand as St, getRootScriptName as Gn, xPrompts as S, getConfigFileCommonOptions as Tt, addHuskyHooks as Co, initHandlerCommon as Ao, readConfigFile as ge, lookForParentTarget as qn, decryptAES as $o, encryptAES as No, getCurrentBranchName as Po, getCommitByHookName as jo, resolveMergeInfoByGitReflogAction as xo, checkCurrentIsRebasing as Fo, resolveMergeInfoByCommitMsg as Bo, getCurrentBranchLastCommitList as Uo, getLastReflogList as Do, createMainCommand as Lo } from "@done-coding/cli-utils";
3
+ import { execSync as q } from "node:child_process";
4
4
  import gt, { existsSync as on, rmSync as je } from "node:fs";
5
5
  import Ee, { resolve as Io } from "node:path";
6
6
  import { getConfigPath as Mo, batchCompileHandler as ko, MODULE_DEFAULT_CONFIG_RELATIVE_PATH as Ho } from "@done-coding/cli-template";
7
7
  import { getTargetRepoUrl as Go } from "@done-coding/cli-git";
8
8
  const Kn = "自定义模版路径", Wn = "某个git平台用户仓库", se = {
9
9
  name: "create-done-coding",
10
- version: "0.11.18",
10
+ version: "0.11.19",
11
11
  description: "项目创建命令行工具",
12
12
  bin: "es/cli.mjs",
13
13
  cliConfig: {
@@ -187,7 +187,7 @@ var Os = Array.prototype, ws = Function.prototype, Ge = Object.prototype, ut = $
187
187
  }(), Zn = ws.toString, ie = Ge.hasOwnProperty, Pt = Ge.toString, vs = RegExp(
188
188
  "^" + Zn.call(ie).replace(is, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
189
189
  ), an = $t.Symbol, Ss = Qn(Object.getPrototypeOf, Object), Ts = Ge.propertyIsEnumerable, Cs = Os.splice, cn = an ? an.isConcatSpreadable : void 0, yt = Object.getOwnPropertySymbols, un = Math.max, As = er($t, "Map"), Oe = er(Object, "create");
190
- function W(e) {
190
+ function z(e) {
191
191
  var t = -1, n = e ? e.length : 0;
192
192
  for (this.clear(); ++t < n; ) {
193
193
  var r = e[t];
@@ -216,11 +216,11 @@ function xs(e, t) {
216
216
  var n = this.__data__;
217
217
  return n[e] = Oe && t === void 0 ? At : t, this;
218
218
  }
219
- W.prototype.clear = $s;
220
- W.prototype.delete = Ns;
221
- W.prototype.get = Ps;
222
- W.prototype.has = js;
223
- W.prototype.set = xs;
219
+ z.prototype.clear = $s;
220
+ z.prototype.delete = Ns;
221
+ z.prototype.get = Ps;
222
+ z.prototype.has = js;
223
+ z.prototype.set = xs;
224
224
  function ae(e) {
225
225
  var t = -1, n = e ? e.length : 0;
226
226
  for (this.clear(); ++t < n; ) {
@@ -263,9 +263,9 @@ function ce(e) {
263
263
  }
264
264
  function Is() {
265
265
  this.__data__ = {
266
- hash: new W(),
266
+ hash: new z(),
267
267
  map: new (As || ae)(),
268
- string: new W()
268
+ string: new z()
269
269
  };
270
270
  }
271
271
  function Ms(e) {
@@ -319,8 +319,8 @@ function zs(e, t, n, r) {
319
319
  for (; ++o < a; ) {
320
320
  var c = e[o], p = n ? n(c) : c;
321
321
  if (c = r || c !== 0 ? c : 0, i && p === p) {
322
- for (var m = f; m--; )
323
- if (t[m] === p)
322
+ for (var g = f; g--; )
323
+ if (t[g] === p)
324
324
  continue e;
325
325
  u.push(c);
326
326
  } else
@@ -672,11 +672,11 @@ function Gi(e) {
672
672
  }
673
673
  var qi = Hi;
674
674
  const pn = /* @__PURE__ */ Ct(qi);
675
- var Ki = "Expected a function", hn = "__lodash_placeholder__", z = 1, Je = 2, Wi = 4, K = 8, be = 16, te = 32, we = 64, dr = 128, zi = 256, mr = 512, dn = 1 / 0, Ji = 9007199254740991, Vi = 17976931348623157e292, mn = NaN, Xi = [
675
+ var Ki = "Expected a function", hn = "__lodash_placeholder__", J = 1, Je = 2, Wi = 4, W = 8, be = 16, te = 32, we = 64, dr = 128, zi = 256, mr = 512, dn = 1 / 0, Ji = 9007199254740991, Vi = 17976931348623157e292, mn = NaN, Xi = [
676
676
  ["ary", dr],
677
- ["bind", z],
677
+ ["bind", J],
678
678
  ["bindKey", Je],
679
- ["curry", K],
679
+ ["curry", W],
680
680
  ["curryRight", be],
681
681
  ["flip", mr],
682
682
  ["partial", te],
@@ -774,12 +774,12 @@ function Aa(e, t, n, r) {
774
774
  return c;
775
775
  }
776
776
  function $a(e, t, n, r) {
777
- for (var o = -1, s = e.length, i = -1, a = n.length, u = -1, f = t.length, c = Le(s - a, 0), p = Array(c + f), m = !r; ++o < c; )
777
+ for (var o = -1, s = e.length, i = -1, a = n.length, u = -1, f = t.length, c = Le(s - a, 0), p = Array(c + f), g = !r; ++o < c; )
778
778
  p[o] = e[o];
779
- for (var y = o; ++u < f; )
780
- p[y + u] = t[u];
779
+ for (var m = o; ++u < f; )
780
+ p[m + u] = t[u];
781
781
  for (; ++i < a; )
782
- (m || o < s) && (p[y + n[i]] = e[o++]);
782
+ (g || o < s) && (p[m + n[i]] = e[o++]);
783
783
  return p;
784
784
  }
785
785
  function Na(e, t) {
@@ -789,7 +789,7 @@ function Na(e, t) {
789
789
  return t;
790
790
  }
791
791
  function Pa(e, t, n) {
792
- var r = t & z, o = ve(e);
792
+ var r = t & J, o = ve(e);
793
793
  function s() {
794
794
  var i = this && this !== $e && this instanceof s ? o : e;
795
795
  return i.apply(r ? n : this, arguments);
@@ -846,13 +846,13 @@ function ja(e, t, n) {
846
846
  return o;
847
847
  }
848
848
  function Ft(e, t, n, r, o, s, i, a, u, f) {
849
- var c = t & dr, p = t & z, m = t & Je, y = t & (K | be), h = t & mr, g = m ? void 0 : ve(e);
849
+ var c = t & dr, p = t & J, g = t & Je, m = t & (W | be), h = t & mr, y = g ? void 0 : ve(e);
850
850
  function d() {
851
851
  for (var b = arguments.length, E = Array(b), O = b; O--; )
852
852
  E[O] = arguments[O];
853
- if (y)
854
- var $ = Or(d), S = Ea(E, $);
855
- if (r && (E = Aa(E, r, o, y)), s && (E = $a(E, s, i, y)), b -= S, y && b < f) {
853
+ if (m)
854
+ var $ = Or(d), T = Ea(E, $);
855
+ if (r && (E = Aa(E, r, o, m)), s && (E = $a(E, s, i, m)), b -= T, m && b < f) {
856
856
  var F = yr(E, $);
857
857
  return Rr(
858
858
  e,
@@ -867,27 +867,27 @@ function Ft(e, t, n, r, o, s, i, a, u, f) {
867
867
  f - b
868
868
  );
869
869
  }
870
- var B = p ? n : this, I = m ? B[e] : e;
871
- return b = E.length, a ? E = Ia(E, a) : h && b > 1 && E.reverse(), c && u < b && (E.length = u), this && this !== $e && this instanceof d && (I = g || ve(I)), I.apply(B, E);
870
+ var B = p ? n : this, I = g ? B[e] : e;
871
+ return b = E.length, a ? E = Ia(E, a) : h && b > 1 && E.reverse(), c && u < b && (E.length = u), this && this !== $e && this instanceof d && (I = y || ve(I)), I.apply(B, E);
872
872
  }
873
873
  return d;
874
874
  }
875
875
  function xa(e, t, n, r) {
876
- var o = t & z, s = ve(e);
876
+ var o = t & J, s = ve(e);
877
877
  function i() {
878
- for (var a = -1, u = arguments.length, f = -1, c = r.length, p = Array(c + u), m = this && this !== $e && this instanceof i ? s : e; ++f < c; )
878
+ for (var a = -1, u = arguments.length, f = -1, c = r.length, p = Array(c + u), g = this && this !== $e && this instanceof i ? s : e; ++f < c; )
879
879
  p[f] = r[f];
880
880
  for (; u--; )
881
881
  p[f++] = arguments[++a];
882
- return gr(m, o ? n : this, p);
882
+ return gr(g, o ? n : this, p);
883
883
  }
884
884
  return i;
885
885
  }
886
886
  function Rr(e, t, n, r, o, s, i, a, u, f) {
887
- var c = t & K, p = c ? i : void 0, m = c ? void 0 : i, y = c ? s : void 0, h = c ? void 0 : s;
888
- t |= c ? te : we, t &= ~(c ? we : te), t & Wi || (t &= ~(z | Je));
889
- var g = n(e, t, o, y, p, h, m, a, u, f);
890
- return g.placeholder = r, wr(g, e, t);
887
+ var c = t & W, p = c ? i : void 0, g = c ? void 0 : i, m = c ? s : void 0, h = c ? void 0 : s;
888
+ t |= c ? te : we, t &= ~(c ? we : te), t & Wi || (t &= ~(J | Je));
889
+ var y = n(e, t, o, m, p, h, g, a, u, f);
890
+ return y.placeholder = r, wr(y, e, t);
891
891
  }
892
892
  function Fa(e, t, n, r, o, s, i, a) {
893
893
  var u = t & Je;
@@ -898,7 +898,7 @@ function Fa(e, t, n, r, o, s, i, a) {
898
898
  var c = r, p = o;
899
899
  r = o = void 0;
900
900
  }
901
- var m = [
901
+ var g = [
902
902
  e,
903
903
  t,
904
904
  n,
@@ -910,11 +910,11 @@ function Fa(e, t, n, r, o, s, i, a) {
910
910
  i,
911
911
  a
912
912
  ];
913
- if (e = m[0], t = m[1], n = m[2], r = m[3], o = m[4], a = m[9] = m[9] == null ? u ? 0 : e.length : Le(m[9] - f, 0), !a && t & (K | be) && (t &= ~(K | be)), !t || t == z)
914
- var y = Pa(e, t, n);
913
+ if (e = g[0], t = g[1], n = g[2], r = g[3], o = g[4], a = g[9] = g[9] == null ? u ? 0 : e.length : Le(g[9] - f, 0), !a && t & (W | be) && (t &= ~(W | be)), !t || t == J)
914
+ var m = Pa(e, t, n);
915
915
  else
916
- t == K || t == be ? y = ja(e, t, a) : (t == te || t == (z | te)) && !o.length ? y = xa(e, t, n, r) : y = Ft.apply(void 0, m);
917
- return wr(y, e, t);
916
+ t == W || t == be ? m = ja(e, t, a) : (t == te || t == (J | te)) && !o.length ? m = xa(e, t, n, r) : m = Ft.apply(void 0, g);
917
+ return wr(m, e, t);
918
918
  }
919
919
  function Or(e) {
920
920
  var t = e;
@@ -976,7 +976,7 @@ function ka(e, t) {
976
976
  }
977
977
  function Bt(e, t, n) {
978
978
  t = n ? void 0 : t;
979
- var r = Fa(e, K, void 0, void 0, void 0, void 0, void 0, t);
979
+ var r = Fa(e, W, void 0, void 0, void 0, void 0, void 0, t);
980
980
  return r.placeholder = Bt.placeholder, r;
981
981
  }
982
982
  function Ha(e) {
@@ -1088,38 +1088,38 @@ class Ya {
1088
1088
  });
1089
1089
  if (c)
1090
1090
  return c;
1091
- const m = {
1091
+ const g = {
1092
1092
  uiConfig: u,
1093
1093
  cacheConfig: f
1094
- }, y = {
1094
+ }, m = {
1095
1095
  ...a,
1096
1096
  BASE_PATH: this.basePath,
1097
1097
  TIMEOUT: this.timeout,
1098
1098
  debug: r
1099
1099
  };
1100
1100
  try {
1101
- const h = await this.issue(y, m);
1101
+ const h = await this.issue(m, g);
1102
1102
  return p == null || p(h, f), h;
1103
1103
  } catch (h) {
1104
- const g = await Za(() => {
1104
+ const y = await Za(() => {
1105
1105
  var d;
1106
1106
  return r && P({
1107
1107
  stage: N.DEAL_ERROR,
1108
1108
  data: h
1109
1109
  }), ((d = this.beforeError) == null ? void 0 : d.call(this, h, {
1110
1110
  apiConfig: n,
1111
- extendConfig: m
1111
+ extendConfig: g
1112
1112
  })) || {
1113
1113
  canShowErrorToast: !0,
1114
1114
  newError: h
1115
1115
  };
1116
1116
  }, r);
1117
- if (g.reload)
1117
+ if (y.reload)
1118
1118
  return r && P({
1119
1119
  stage: N.DEAL_ERROR_RESULT_RELOAD
1120
1120
  }), this.request(n, r);
1121
1121
  {
1122
- const { newError: d, canShowErrorToast: b = !0 } = g;
1122
+ const { newError: d, canShowErrorToast: b = !0 } = y;
1123
1123
  b && (u.errorToast ?? !0) && ((o = this.showToast) == null || o.call(this, d.message));
1124
1124
  let E;
1125
1125
  return d instanceof re ? E = d : d.isBusinessError ? E = new Jn(d) : E = new Re(d), r && P({
@@ -1248,7 +1248,7 @@ var wc = Array.prototype, vc = Function.prototype, Ve = Object.prototype, ft = D
1248
1248
  }(), Ar = vc.toString, ue = Ve.hasOwnProperty, It = Ve.toString, Sc = RegExp(
1249
1249
  "^" + Ar.call(ue).replace(ac, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1250
1250
  ), Rn = Dt.Symbol, Tc = Cr(Object.getPrototypeOf, Object), Cc = Ve.propertyIsEnumerable, Ac = wc.splice, On = Rn ? Rn.isConcatSpreadable : void 0, Et = Object.getOwnPropertySymbols, wn = Math.max, $c = Nr(Dt, "Map"), Se = Nr(Object, "create");
1251
- function J(e) {
1251
+ function V(e) {
1252
1252
  var t = -1, n = e ? e.length : 0;
1253
1253
  for (this.clear(); ++t < n; ) {
1254
1254
  var r = e[t];
@@ -1277,11 +1277,11 @@ function Fc(e, t) {
1277
1277
  var n = this.__data__;
1278
1278
  return n[e] = Se && t === void 0 ? Ut : t, this;
1279
1279
  }
1280
- J.prototype.clear = Nc;
1281
- J.prototype.delete = Pc;
1282
- J.prototype.get = jc;
1283
- J.prototype.has = xc;
1284
- J.prototype.set = Fc;
1280
+ V.prototype.clear = Nc;
1281
+ V.prototype.delete = Pc;
1282
+ V.prototype.get = jc;
1283
+ V.prototype.has = xc;
1284
+ V.prototype.set = Fc;
1285
1285
  function le(e) {
1286
1286
  var t = -1, n = e ? e.length : 0;
1287
1287
  for (this.clear(); ++t < n; ) {
@@ -1324,9 +1324,9 @@ function fe(e) {
1324
1324
  }
1325
1325
  function Mc() {
1326
1326
  this.__data__ = {
1327
- hash: new J(),
1327
+ hash: new V(),
1328
1328
  map: new ($c || le)(),
1329
- string: new J()
1329
+ string: new V()
1330
1330
  };
1331
1331
  }
1332
1332
  function kc(e) {
@@ -1380,8 +1380,8 @@ function Jc(e, t, n, r) {
1380
1380
  for (; ++o < a; ) {
1381
1381
  var c = e[o], p = n ? n(c) : c;
1382
1382
  if (c = r || c !== 0 ? c : 0, i && p === p) {
1383
- for (var m = f; m--; )
1384
- if (t[m] === p)
1383
+ for (var g = f; g--; )
1384
+ if (t[g] === p)
1385
1385
  continue e;
1386
1386
  u.push(c);
1387
1387
  } else
@@ -1556,7 +1556,7 @@ var Bu = Array.prototype, Uu = Function.prototype, Lr = Object.prototype, pt = H
1556
1556
  }(), Ir = Uu.toString, Gt = Lr.hasOwnProperty, Mr = Lr.toString, Du = RegExp(
1557
1557
  "^" + Ir.call(Gt).replace(Au, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1558
1558
  ), Sn = Ht.Symbol, Lu = Bu.splice, Iu = kr(Ht, "Map"), Te = kr(Object, "create"), Tn = Sn ? Sn.prototype : void 0, Cn = Tn ? Tn.toString : void 0;
1559
- function V(e) {
1559
+ function X(e) {
1560
1560
  var t = -1, n = e ? e.length : 0;
1561
1561
  for (this.clear(); ++t < n; ) {
1562
1562
  var r = e[t];
@@ -1585,11 +1585,11 @@ function qu(e, t) {
1585
1585
  var n = this.__data__;
1586
1586
  return n[e] = Te && t === void 0 ? Ur : t, this;
1587
1587
  }
1588
- V.prototype.clear = Mu;
1589
- V.prototype.delete = ku;
1590
- V.prototype.get = Hu;
1591
- V.prototype.has = Gu;
1592
- V.prototype.set = qu;
1588
+ X.prototype.clear = Mu;
1589
+ X.prototype.delete = ku;
1590
+ X.prototype.get = Hu;
1591
+ X.prototype.has = Gu;
1592
+ X.prototype.set = qu;
1593
1593
  function pe(e) {
1594
1594
  var t = -1, n = e ? e.length : 0;
1595
1595
  for (this.clear(); ++t < n; ) {
@@ -1623,7 +1623,7 @@ pe.prototype.delete = Wu;
1623
1623
  pe.prototype.get = zu;
1624
1624
  pe.prototype.has = Ju;
1625
1625
  pe.prototype.set = Vu;
1626
- function Q(e) {
1626
+ function Z(e) {
1627
1627
  var t = -1, n = e ? e.length : 0;
1628
1628
  for (this.clear(); ++t < n; ) {
1629
1629
  var r = e[t];
@@ -1632,9 +1632,9 @@ function Q(e) {
1632
1632
  }
1633
1633
  function Xu() {
1634
1634
  this.__data__ = {
1635
- hash: new V(),
1635
+ hash: new X(),
1636
1636
  map: new (Iu || pe)(),
1637
- string: new V()
1637
+ string: new X()
1638
1638
  };
1639
1639
  }
1640
1640
  function Qu(e) {
@@ -1649,11 +1649,11 @@ function Yu(e) {
1649
1649
  function el(e, t) {
1650
1650
  return Ye(this, e).set(e, t), this;
1651
1651
  }
1652
- Q.prototype.clear = Xu;
1653
- Q.prototype.delete = Qu;
1654
- Q.prototype.get = Zu;
1655
- Q.prototype.has = Yu;
1656
- Q.prototype.set = el;
1652
+ Z.prototype.clear = Xu;
1653
+ Z.prototype.delete = Qu;
1654
+ Z.prototype.get = Zu;
1655
+ Z.prototype.has = Yu;
1656
+ Z.prototype.set = el;
1657
1657
  function Ze(e, t) {
1658
1658
  for (var n = e.length; n--; )
1659
1659
  if (fl(e[n][0], t))
@@ -1740,9 +1740,9 @@ function qt(e, t) {
1740
1740
  var i = e.apply(this, r);
1741
1741
  return n.cache = s.set(o, i), i;
1742
1742
  };
1743
- return n.cache = new (qt.Cache || Q)(), n;
1743
+ return n.cache = new (qt.Cache || Z)(), n;
1744
1744
  }
1745
- qt.Cache = Q;
1745
+ qt.Cache = Z;
1746
1746
  function fl(e, t) {
1747
1747
  return e === t || e !== e && t !== t;
1748
1748
  }
@@ -1799,25 +1799,25 @@ const yl = /* @__PURE__ */ vr(gl), qr = ({
1799
1799
  ...a,
1800
1800
  basePath: e,
1801
1801
  timeout: t,
1802
- issue: ({ TIMEOUT: c, DEBUG: p, ...m }) => u({
1802
+ issue: ({ TIMEOUT: c, DEBUG: p, ...g }) => u({
1803
1803
  timeout: c,
1804
- ..._u(m, ["BASE_PATH"])
1805
- }).then((y) => _i(y, a, p)).catch((y) => {
1806
- if (y instanceof re)
1804
+ ..._u(g, ["BASE_PATH"])
1805
+ }).then((m) => _i(m, a, p)).catch((m) => {
1806
+ if (m instanceof re)
1807
1807
  return p && P(
1808
1808
  {
1809
1809
  stage: N.NETWORK_ERROR_ORIGIN,
1810
- data: y
1810
+ data: m
1811
1811
  },
1812
1812
  H.ERROR
1813
- ), Promise.reject(y);
1814
- const { response: h, request: g } = y;
1813
+ ), Promise.reject(m);
1814
+ const { response: h, request: y } = m;
1815
1815
  let d, b;
1816
- h ? (d = h.status, b = h.statusText) : g ? (d = M.NO_RESPONSE, i.isAxiosError(y) ? y.message.includes("timeout of") ? (d = M.NO_RESPONSE_TIMEOUT, b = "请求超时") : yl(globalThis, "navigator.onLine") === !1 ? (d = M.NO_RESPONSE_OFFLINE, b = "网络未连接") : b = y.message : b = _e(y) ?? "未响应") : (d = M.REQUEST_ERROR, b = _e(y) ?? "发起请求出错");
1816
+ h ? (d = h.status, b = h.statusText) : y ? (d = M.NO_RESPONSE, i.isAxiosError(m) ? m.message.includes("timeout of") ? (d = M.NO_RESPONSE_TIMEOUT, b = "请求超时") : yl(globalThis, "navigator.onLine") === !1 ? (d = M.NO_RESPONSE_OFFLINE, b = "网络未连接") : b = m.message : b = _e(m) ?? "未响应") : (d = M.REQUEST_ERROR, b = _e(m) ?? "发起请求出错");
1817
1817
  const E = new Re({
1818
1818
  code: d,
1819
1819
  message: b,
1820
- cause: y
1820
+ cause: m
1821
1821
  });
1822
1822
  return p && P(
1823
1823
  {
@@ -1880,7 +1880,7 @@ function Jr(e, t) {
1880
1880
  return o;
1881
1881
  return null;
1882
1882
  }
1883
- const q = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Vr = (e) => !Ce(e) && e !== q;
1883
+ const K = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Vr = (e) => !Ce(e) && e !== K;
1884
1884
  function _t() {
1885
1885
  const { caseless: e } = Vr(this) && this || {}, t = {}, n = (r, o) => {
1886
1886
  const s = e && Jr(t, o) || o;
@@ -1991,14 +1991,14 @@ const Zl = (e) => {
1991
1991
  return r;
1992
1992
  };
1993
1993
  return n(e, 0);
1994
- }, Yl = x("AsyncFunction"), ef = (e) => e && (nt(e) || A(e)) && A(e.then) && A(e.catch), Qr = ((e, t) => e ? setImmediate : t ? ((n, r) => (q.addEventListener("message", ({ source: o, data: s }) => {
1995
- o === q && s === n && r.length && r.shift()();
1994
+ }, Yl = x("AsyncFunction"), ef = (e) => e && (nt(e) || A(e)) && A(e.then) && A(e.catch), Qr = ((e, t) => e ? setImmediate : t ? ((n, r) => (K.addEventListener("message", ({ source: o, data: s }) => {
1995
+ o === K && s === n && r.length && r.shift()();
1996
1996
  }, !1), (o) => {
1997
- r.push(o), q.postMessage(n, "*");
1997
+ r.push(o), K.postMessage(n, "*");
1998
1998
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
1999
1999
  typeof setImmediate == "function",
2000
- A(q.postMessage)
2001
- ), tf = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || Qr, l = {
2000
+ A(K.postMessage)
2001
+ ), tf = typeof queueMicrotask < "u" ? queueMicrotask.bind(K) : typeof process < "u" && process.nextTick || Qr, l = {
2002
2002
  isArray: he,
2003
2003
  isArrayBuffer: Wr,
2004
2004
  isBuffer: _l,
@@ -2047,7 +2047,7 @@ const Zl = (e) => {
2047
2047
  noop: Vl,
2048
2048
  toFiniteNumber: Xl,
2049
2049
  findKey: Jr,
2050
- global: q,
2050
+ global: K,
2051
2051
  isContextDefined: Vr,
2052
2052
  isSpecCompliantForm: Ql,
2053
2053
  toJSONObject: Zl,
@@ -2131,8 +2131,8 @@ function rt(e, t, n) {
2131
2131
  metaTokens: !0,
2132
2132
  dots: !1,
2133
2133
  indexes: !1
2134
- }, !1, function(g, d) {
2135
- return !l.isUndefined(d[g]);
2134
+ }, !1, function(y, d) {
2135
+ return !l.isUndefined(d[y]);
2136
2136
  });
2137
2137
  const r = n.metaTokens, o = n.visitor || c, s = n.dots, i = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && l.isSpecCompliantForm(t);
2138
2138
  if (!l.isFunction(o))
@@ -2146,45 +2146,45 @@ function rt(e, t, n) {
2146
2146
  throw new _("Blob is not supported. Use a Buffer instead.");
2147
2147
  return l.isArrayBuffer(h) || l.isTypedArray(h) ? u && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
2148
2148
  }
2149
- function c(h, g, d) {
2149
+ function c(h, y, d) {
2150
2150
  let b = h;
2151
2151
  if (h && !d && typeof h == "object") {
2152
- if (l.endsWith(g, "{}"))
2153
- g = r ? g : g.slice(0, -2), h = JSON.stringify(h);
2154
- else if (l.isArray(h) && rf(h) || (l.isFileList(h) || l.endsWith(g, "[]")) && (b = l.toArray(h)))
2155
- return g = eo(g), b.forEach(function(O, $) {
2152
+ if (l.endsWith(y, "{}"))
2153
+ y = r ? y : y.slice(0, -2), h = JSON.stringify(h);
2154
+ else if (l.isArray(h) && rf(h) || (l.isFileList(h) || l.endsWith(y, "[]")) && (b = l.toArray(h)))
2155
+ return y = eo(y), b.forEach(function(O, $) {
2156
2156
  !(l.isUndefined(O) || O === null) && t.append(
2157
2157
  // eslint-disable-next-line no-nested-ternary
2158
- i === !0 ? $n([g], $, s) : i === null ? g : g + "[]",
2158
+ i === !0 ? $n([y], $, s) : i === null ? y : y + "[]",
2159
2159
  f(O)
2160
2160
  );
2161
2161
  }), !1;
2162
2162
  }
2163
- return bt(h) ? !0 : (t.append($n(d, g, s), f(h)), !1);
2163
+ return bt(h) ? !0 : (t.append($n(d, y, s), f(h)), !1);
2164
2164
  }
2165
- const p = [], m = Object.assign(of, {
2165
+ const p = [], g = Object.assign(of, {
2166
2166
  defaultVisitor: c,
2167
2167
  convertValue: f,
2168
2168
  isVisitable: bt
2169
2169
  });
2170
- function y(h, g) {
2170
+ function m(h, y) {
2171
2171
  if (!l.isUndefined(h)) {
2172
2172
  if (p.indexOf(h) !== -1)
2173
- throw Error("Circular reference detected in " + g.join("."));
2173
+ throw Error("Circular reference detected in " + y.join("."));
2174
2174
  p.push(h), l.forEach(h, function(b, E) {
2175
2175
  (!(l.isUndefined(b) || b === null) && o.call(
2176
2176
  t,
2177
2177
  b,
2178
2178
  l.isString(E) ? E.trim() : E,
2179
- g,
2180
- m
2181
- )) === !0 && y(b, g ? g.concat(E) : [E]);
2179
+ y,
2180
+ g
2181
+ )) === !0 && m(b, y ? y.concat(E) : [E]);
2182
2182
  }), p.pop();
2183
2183
  }
2184
2184
  }
2185
2185
  if (!l.isObject(e))
2186
2186
  throw new TypeError("data must be an object");
2187
- return y(e), t;
2187
+ return m(e), t;
2188
2188
  }
2189
2189
  function Nn(e) {
2190
2190
  const t = {
@@ -2656,13 +2656,13 @@ function Cf(e, t) {
2656
2656
  return t = t !== void 0 ? t : 1e3, function(u) {
2657
2657
  const f = Date.now(), c = r[s];
2658
2658
  i || (i = f), n[o] = u, r[o] = f;
2659
- let p = s, m = 0;
2659
+ let p = s, g = 0;
2660
2660
  for (; p !== o; )
2661
- m += n[p++], p = p % e;
2661
+ g += n[p++], p = p % e;
2662
2662
  if (o = (o + 1) % e, o === s && (s = (s + 1) % e), f - i < t)
2663
2663
  return;
2664
- const y = c && f - c;
2665
- return y ? Math.round(m * 1e3 / y) : void 0;
2664
+ const m = c && f - c;
2665
+ return m ? Math.round(g * 1e3 / m) : void 0;
2666
2666
  };
2667
2667
  }
2668
2668
  function Af(e, t) {
@@ -2744,18 +2744,18 @@ function ao(e, t, n) {
2744
2744
  return e && (r || n == !1) ? jf(e, t) : t;
2745
2745
  }
2746
2746
  const Bn = (e) => e instanceof j ? { ...e } : e;
2747
- function X(e, t) {
2747
+ function Q(e, t) {
2748
2748
  t = t || {};
2749
2749
  const n = {};
2750
- function r(f, c, p, m) {
2751
- return l.isPlainObject(f) && l.isPlainObject(c) ? l.merge.call({ caseless: m }, f, c) : l.isPlainObject(c) ? l.merge({}, c) : l.isArray(c) ? c.slice() : c;
2750
+ function r(f, c, p, g) {
2751
+ return l.isPlainObject(f) && l.isPlainObject(c) ? l.merge.call({ caseless: g }, f, c) : l.isPlainObject(c) ? l.merge({}, c) : l.isArray(c) ? c.slice() : c;
2752
2752
  }
2753
- function o(f, c, p, m) {
2753
+ function o(f, c, p, g) {
2754
2754
  if (l.isUndefined(c)) {
2755
2755
  if (!l.isUndefined(f))
2756
- return r(void 0, f, p, m);
2756
+ return r(void 0, f, p, g);
2757
2757
  } else
2758
- return r(f, c, p, m);
2758
+ return r(f, c, p, g);
2759
2759
  }
2760
2760
  function s(f, c) {
2761
2761
  if (!l.isUndefined(c))
@@ -2806,12 +2806,12 @@ function X(e, t) {
2806
2806
  headers: (f, c, p) => o(Bn(f), Bn(c), p, !0)
2807
2807
  };
2808
2808
  return l.forEach(Object.keys(Object.assign({}, e, t)), function(c) {
2809
- const p = u[c] || o, m = p(e[c], t[c], c);
2810
- l.isUndefined(m) && p !== a || (n[c] = m);
2809
+ const p = u[c] || o, g = p(e[c], t[c], c);
2810
+ l.isUndefined(g) && p !== a || (n[c] = g);
2811
2811
  }), n;
2812
2812
  }
2813
2813
  const co = (e) => {
2814
- const t = X({}, e);
2814
+ const t = Q({}, e);
2815
2815
  let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: i, auth: a } = t;
2816
2816
  t.headers = i = j.from(i), t.url = no(ao(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
2817
2817
  "Authorization",
@@ -2836,9 +2836,9 @@ const co = (e) => {
2836
2836
  const o = co(e);
2837
2837
  let s = o.data;
2838
2838
  const i = j.from(o.headers).normalize();
2839
- let { responseType: a, onUploadProgress: u, onDownloadProgress: f } = o, c, p, m, y, h;
2840
- function g() {
2841
- y && y(), h && h(), o.cancelToken && o.cancelToken.unsubscribe(c), o.signal && o.signal.removeEventListener("abort", c);
2839
+ let { responseType: a, onUploadProgress: u, onDownloadProgress: f } = o, c, p, g, m, h;
2840
+ function y() {
2841
+ m && m(), h && h(), o.cancelToken && o.cancelToken.unsubscribe(c), o.signal && o.signal.removeEventListener("abort", c);
2842
2842
  }
2843
2843
  let d = new XMLHttpRequest();
2844
2844
  d.open(o.method.toUpperCase(), o.url, !0), d.timeout = o.timeout;
@@ -2847,7 +2847,7 @@ const co = (e) => {
2847
2847
  return;
2848
2848
  const O = j.from(
2849
2849
  "getAllResponseHeaders" in d && d.getAllResponseHeaders()
2850
- ), S = {
2850
+ ), T = {
2851
2851
  data: !a || a === "text" || a === "json" ? d.responseText : d.response,
2852
2852
  status: d.status,
2853
2853
  statusText: d.statusText,
@@ -2856,10 +2856,10 @@ const co = (e) => {
2856
2856
  request: d
2857
2857
  };
2858
2858
  io(function(B) {
2859
- n(B), g();
2859
+ n(B), y();
2860
2860
  }, function(B) {
2861
- r(B), g();
2862
- }, S), d = null;
2861
+ r(B), y();
2862
+ }, T), d = null;
2863
2863
  }
2864
2864
  "onloadend" in d ? d.onloadend = b : d.onreadystatechange = function() {
2865
2865
  !d || d.readyState !== 4 || d.status === 0 && !(d.responseURL && d.responseURL.indexOf("file:") === 0) || setTimeout(b);
@@ -2869,16 +2869,16 @@ const co = (e) => {
2869
2869
  r(new _("Network Error", _.ERR_NETWORK, e, d)), d = null;
2870
2870
  }, d.ontimeout = function() {
2871
2871
  let $ = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
2872
- const S = o.transitional || ro;
2872
+ const T = o.transitional || ro;
2873
2873
  o.timeoutErrorMessage && ($ = o.timeoutErrorMessage), r(new _(
2874
2874
  $,
2875
- S.clarifyTimeoutError ? _.ETIMEDOUT : _.ECONNABORTED,
2875
+ T.clarifyTimeoutError ? _.ETIMEDOUT : _.ECONNABORTED,
2876
2876
  e,
2877
2877
  d
2878
2878
  )), d = null;
2879
- }, s === void 0 && i.setContentType(null), "setRequestHeader" in d && l.forEach(i.toJSON(), function($, S) {
2880
- d.setRequestHeader(S, $);
2881
- }), l.isUndefined(o.withCredentials) || (d.withCredentials = !!o.withCredentials), a && a !== "json" && (d.responseType = o.responseType), f && ([m, h] = Me(f, !0), d.addEventListener("progress", m)), u && d.upload && ([p, y] = Me(u), d.upload.addEventListener("progress", p), d.upload.addEventListener("loadend", y)), (o.cancelToken || o.signal) && (c = (O) => {
2879
+ }, s === void 0 && i.setContentType(null), "setRequestHeader" in d && l.forEach(i.toJSON(), function($, T) {
2880
+ d.setRequestHeader(T, $);
2881
+ }), l.isUndefined(o.withCredentials) || (d.withCredentials = !!o.withCredentials), a && a !== "json" && (d.responseType = o.responseType), f && ([g, h] = Me(f, !0), d.addEventListener("progress", g)), u && d.upload && ([p, m] = Me(u), d.upload.addEventListener("progress", p), d.upload.addEventListener("loadend", m)), (o.cancelToken || o.signal) && (c = (O) => {
2882
2882
  d && (r(!O || O.type ? new de(null, e, d) : O), d.abort(), d = null);
2883
2883
  }, o.cancelToken && o.cancelToken.subscribe(c), o.signal && (o.signal.aborted ? c() : o.signal.addEventListener("abort", c)));
2884
2884
  const E = Tf(o.url);
@@ -2954,8 +2954,8 @@ const co = (e) => {
2954
2954
  }
2955
2955
  let p = c.byteLength;
2956
2956
  if (n) {
2957
- let m = s += p;
2958
- n(m);
2957
+ let g = s += p;
2958
+ n(g);
2959
2959
  }
2960
2960
  u.enqueue(new Uint8Array(c));
2961
2961
  } catch (f) {
@@ -3024,34 +3024,34 @@ const Hf = async (e) => {
3024
3024
  responseType: f,
3025
3025
  headers: c,
3026
3026
  withCredentials: p = "same-origin",
3027
- fetchOptions: m
3027
+ fetchOptions: g
3028
3028
  } = co(e);
3029
3029
  f = f ? (f + "").toLowerCase() : "text";
3030
- let y = Uf([o, s && s.toAbortSignal()], i), h;
3031
- const g = y && y.unsubscribe && (() => {
3032
- y.unsubscribe();
3030
+ let m = Uf([o, s && s.toAbortSignal()], i), h;
3031
+ const y = m && m.unsubscribe && (() => {
3032
+ m.unsubscribe();
3033
3033
  });
3034
3034
  let d;
3035
3035
  try {
3036
3036
  if (u && kf && n !== "get" && n !== "head" && (d = await Gf(c, r)) !== 0) {
3037
- let S = new Request(t, {
3037
+ let T = new Request(t, {
3038
3038
  method: "POST",
3039
3039
  body: r,
3040
3040
  duplex: "half"
3041
3041
  }), F;
3042
- if (l.isFormData(r) && (F = S.headers.get("content-type")) && c.setContentType(F), S.body) {
3042
+ if (l.isFormData(r) && (F = T.headers.get("content-type")) && c.setContentType(F), T.body) {
3043
3043
  const [B, I] = xn(
3044
3044
  d,
3045
3045
  Me(Fn(u))
3046
3046
  );
3047
- r = Un(S.body, Dn, B, I);
3047
+ r = Un(T.body, Dn, B, I);
3048
3048
  }
3049
3049
  }
3050
3050
  l.isString(p) || (p = p ? "include" : "omit");
3051
3051
  const b = "credentials" in Request.prototype;
3052
3052
  h = new Request(t, {
3053
- ...m,
3054
- signal: y,
3053
+ ...g,
3054
+ signal: m,
3055
3055
  method: n.toUpperCase(),
3056
3056
  headers: c.normalize().toJSON(),
3057
3057
  body: r,
@@ -3060,10 +3060,10 @@ const Hf = async (e) => {
3060
3060
  });
3061
3061
  let E = await fetch(h);
3062
3062
  const O = Ot && (f === "stream" || f === "response");
3063
- if (Ot && (a || O && g)) {
3064
- const S = {};
3063
+ if (Ot && (a || O && y)) {
3064
+ const T = {};
3065
3065
  ["status", "statusText", "headers"].forEach((rn) => {
3066
- S[rn] = E[rn];
3066
+ T[rn] = E[rn];
3067
3067
  });
3068
3068
  const F = l.toFiniteNumber(E.headers.get("content-length")), [B, I] = a && xn(
3069
3069
  F,
@@ -3071,15 +3071,15 @@ const Hf = async (e) => {
3071
3071
  ) || [];
3072
3072
  E = new Response(
3073
3073
  Un(E.body, Dn, B, () => {
3074
- I && I(), g && g();
3074
+ I && I(), y && y();
3075
3075
  }),
3076
- S
3076
+ T
3077
3077
  );
3078
3078
  }
3079
3079
  f = f || "text";
3080
3080
  let $ = await ke[l.findKey(ke, f) || "text"](E, e);
3081
- return !O && g && g(), await new Promise((S, F) => {
3082
- io(S, F, {
3081
+ return !O && y && y(), await new Promise((T, F) => {
3082
+ io(T, F, {
3083
3083
  data: $,
3084
3084
  headers: j.from(E.headers),
3085
3085
  status: E.status,
@@ -3089,7 +3089,7 @@ const Hf = async (e) => {
3089
3089
  });
3090
3090
  });
3091
3091
  } catch (b) {
3092
- throw g && g(), b && b.name === "TypeError" && /fetch/i.test(b.message) ? Object.assign(
3092
+ throw y && y(), b && b.name === "TypeError" && /fetch/i.test(b.message) ? Object.assign(
3093
3093
  new _("Network Error", _.ERR_NETWORK, e, h),
3094
3094
  {
3095
3095
  cause: b.cause || b
@@ -3245,7 +3245,7 @@ class He {
3245
3245
  }
3246
3246
  }
3247
3247
  _request(t, n) {
3248
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = X(this.defaults, n);
3248
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Q(this.defaults, n);
3249
3249
  const { transitional: r, paramsSerializer: o, headers: s } = n;
3250
3250
  r !== void 0 && Be.assertOptions(r, {
3251
3251
  silentJSONParsing: U.transitional(U.boolean),
@@ -3272,49 +3272,49 @@ class He {
3272
3272
  ), n.headers = j.concat(i, s);
3273
3273
  const a = [];
3274
3274
  let u = !0;
3275
- this.interceptors.request.forEach(function(g) {
3276
- typeof g.runWhen == "function" && g.runWhen(n) === !1 || (u = u && g.synchronous, a.unshift(g.fulfilled, g.rejected));
3275
+ this.interceptors.request.forEach(function(y) {
3276
+ typeof y.runWhen == "function" && y.runWhen(n) === !1 || (u = u && y.synchronous, a.unshift(y.fulfilled, y.rejected));
3277
3277
  });
3278
3278
  const f = [];
3279
- this.interceptors.response.forEach(function(g) {
3280
- f.push(g.fulfilled, g.rejected);
3279
+ this.interceptors.response.forEach(function(y) {
3280
+ f.push(y.fulfilled, y.rejected);
3281
3281
  });
3282
- let c, p = 0, m;
3282
+ let c, p = 0, g;
3283
3283
  if (!u) {
3284
3284
  const h = [In.bind(this), void 0];
3285
- for (h.unshift.apply(h, a), h.push.apply(h, f), m = h.length, c = Promise.resolve(n); p < m; )
3285
+ for (h.unshift.apply(h, a), h.push.apply(h, f), g = h.length, c = Promise.resolve(n); p < g; )
3286
3286
  c = c.then(h[p++], h[p++]);
3287
3287
  return c;
3288
3288
  }
3289
- m = a.length;
3290
- let y = n;
3291
- for (p = 0; p < m; ) {
3292
- const h = a[p++], g = a[p++];
3289
+ g = a.length;
3290
+ let m = n;
3291
+ for (p = 0; p < g; ) {
3292
+ const h = a[p++], y = a[p++];
3293
3293
  try {
3294
- y = h(y);
3294
+ m = h(m);
3295
3295
  } catch (d) {
3296
- g.call(this, d);
3296
+ y.call(this, d);
3297
3297
  break;
3298
3298
  }
3299
3299
  }
3300
3300
  try {
3301
- c = In.call(this, y);
3301
+ c = In.call(this, m);
3302
3302
  } catch (h) {
3303
3303
  return Promise.reject(h);
3304
3304
  }
3305
- for (p = 0, m = f.length; p < m; )
3305
+ for (p = 0, g = f.length; p < g; )
3306
3306
  c = c.then(f[p++], f[p++]);
3307
3307
  return c;
3308
3308
  }
3309
3309
  getUri(t) {
3310
- t = X(this.defaults, t);
3310
+ t = Q(this.defaults, t);
3311
3311
  const n = ao(t.baseURL, t.url, t.allowAbsoluteUrls);
3312
3312
  return no(n, t.params, t.paramsSerializer);
3313
3313
  }
3314
3314
  }
3315
3315
  l.forEach(["delete", "get", "head", "options"], function(t) {
3316
3316
  He.prototype[t] = function(n, r) {
3317
- return this.request(X(r || {}, {
3317
+ return this.request(Q(r || {}, {
3318
3318
  method: t,
3319
3319
  url: n,
3320
3320
  data: (r || {}).data
@@ -3324,7 +3324,7 @@ l.forEach(["delete", "get", "head", "options"], function(t) {
3324
3324
  l.forEach(["post", "put", "patch"], function(t) {
3325
3325
  function n(r) {
3326
3326
  return function(s, i, a) {
3327
- return this.request(X(a || {}, {
3327
+ return this.request(Q(a || {}, {
3328
3328
  method: t,
3329
3329
  headers: r ? {
3330
3330
  "Content-Type": "multipart/form-data"
@@ -3492,7 +3492,7 @@ const Xf = vt;
3492
3492
  function ho(e) {
3493
3493
  const t = new Ue(e), n = Kr(Ue.prototype.request, t);
3494
3494
  return l.extend(n, Ue.prototype, t, { allOwnKeys: !0 }), l.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
3495
- return ho(X(e, o));
3495
+ return ho(Q(e, o));
3496
3496
  }, n;
3497
3497
  }
3498
3498
  const w = ho(Xt);
@@ -3509,14 +3509,14 @@ w.all = function(t) {
3509
3509
  };
3510
3510
  w.spread = Jf;
3511
3511
  w.isAxiosError = Vf;
3512
- w.mergeConfig = X;
3512
+ w.mergeConfig = Q;
3513
3513
  w.AxiosHeaders = j;
3514
3514
  w.formToJSON = (e) => oo(l.isHTMLForm(e) ? new FormData(e) : e);
3515
3515
  w.getAdapter = fo.getAdapter;
3516
3516
  w.HttpStatusCode = Xf;
3517
3517
  w.default = w;
3518
3518
  const Qf = w;
3519
- var Z = /* @__PURE__ */ ((e) => (e.INIT = "init", e.CLONE = "clone", e.HOOKS = "hooks", e.CHECK = "check", e))(Z || {}), ne = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.CLONE_CONFIG = "cloneConfig", e))(ne || {}), L = /* @__PURE__ */ ((e) => (e.GITHUB = "github", e.GITEE = "gitee", e))(L || {}), Pe = /* @__PURE__ */ ((e) => (e.REVERSE_MERGE = "reverseMerge", e))(Pe || {}), D = /* @__PURE__ */ ((e) => (e.REFLOG_ACTION = "reflog-action", e.COMMIT_MSG = "commit-msg", e.COMMIT_RECORD = "commit-record", e.PRE_REBASE = "pre-rebase", e))(D || {});
3519
+ var Y = /* @__PURE__ */ ((e) => (e.INIT = "init", e.CLONE = "clone", e.HOOKS = "hooks", e.CHECK = "check", e))(Y || {}), ne = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.CLONE_CONFIG = "cloneConfig", e))(ne || {}), L = /* @__PURE__ */ ((e) => (e.GITHUB = "github", e.GITEE = "gitee", e))(L || {}), Pe = /* @__PURE__ */ ((e) => (e.REVERSE_MERGE = "reverseMerge", e))(Pe || {}), D = /* @__PURE__ */ ((e) => (e.REFLOG_ACTION = "reflog-action", e.COMMIT_MSG = "commit-msg", e.COMMIT_RECORD = "commit-record", e.PRE_REBASE = "pre-rebase", e))(D || {});
3520
3520
  const Zf = 3e4, kn = Math.random(), mo = {
3521
3521
  timeout: Zf,
3522
3522
  getBusinessCode() {
@@ -3648,7 +3648,7 @@ const Zf = 3e4, kn = Math.random(), mo = {
3648
3648
  platform: e,
3649
3649
  username: t
3650
3650
  };
3651
- e || (n.platform = (await T(en())).platform), t || (n.username = (await T(tn())).username);
3651
+ e || (n.platform = (await S(en())).platform), t || (n.username = (await S(tn())).username);
3652
3652
  const { platform: r, username: o } = n;
3653
3653
  let s = [];
3654
3654
  const i = sp({
@@ -3688,7 +3688,7 @@ const Zf = 3e4, kn = Math.random(), mo = {
3688
3688
  return;
3689
3689
  } else
3690
3690
  R.stage(`共${s.length}个仓库`);
3691
- const { repoUrl: f } = await T({
3691
+ const { repoUrl: f } = await S({
3692
3692
  name: "repoUrl",
3693
3693
  type: "select",
3694
3694
  message: "选择仓库",
@@ -3715,7 +3715,7 @@ const Zf = 3e4, kn = Math.random(), mo = {
3715
3715
  v.PRE_REBASE
3716
3716
  ], at = (e) => {
3717
3717
  const {
3718
- [Z.CHECK]: { [Pe.REVERSE_MERGE]: t }
3718
+ [Y.CHECK]: { [Pe.REVERSE_MERGE]: t }
3719
3719
  } = e;
3720
3720
  return t;
3721
3721
  }, fp = (e) => Math.max(
@@ -3752,7 +3752,7 @@ const Zf = 3e4, kn = Math.random(), mo = {
3752
3752
  );
3753
3753
  return s || R.skip(`跳过: 允许${r} => ${o}`), s;
3754
3754
  }, hp = {
3755
- [Z.CHECK]: {
3755
+ [Y.CHECK]: {
3756
3756
  [Pe.REVERSE_MERGE]: {
3757
3757
  [/^test$/.source]: {
3758
3758
  includeRebase: !0,
@@ -3772,7 +3772,7 @@ const Zf = 3e4, kn = Math.random(), mo = {
3772
3772
  default: ne.DEFAULT
3773
3773
  }
3774
3774
  }), mp = (e) => {
3775
- Y(`npm pkg set scripts.postprepare="${e} init"`);
3775
+ q(`npm pkg set scripts.postprepare="${e} init"`);
3776
3776
  }, gp = async (e) => {
3777
3777
  const { type: t } = e;
3778
3778
  switch (t) {
@@ -3789,7 +3789,7 @@ const Zf = 3e4, kn = Math.random(), mo = {
3789
3789
  });
3790
3790
  }
3791
3791
  case ne.CLONE_CONFIG: {
3792
- const { rootDir: n } = e, { platform: r } = await T(en()), { username: o } = await T(tn()), { accessToken: s } = await T(ap);
3792
+ const { rootDir: n } = e, { platform: r } = await S(en()), { username: o } = await S(tn()), { accessToken: s } = await S(ap);
3793
3793
  return ip({
3794
3794
  rootDir: n,
3795
3795
  platform: r,
@@ -3801,7 +3801,7 @@ const Zf = 3e4, kn = Math.random(), mo = {
3801
3801
  throw new Error(`未知的初始化类型: ${t}`);
3802
3802
  }
3803
3803
  }, yp = {
3804
- command: Z.INIT,
3804
+ command: Y.INIT,
3805
3805
  describe: "初始化配置文件",
3806
3806
  options: dp(),
3807
3807
  handler: gp
@@ -3823,12 +3823,12 @@ const Zf = 3e4, kn = Math.random(), mo = {
3823
3823
  }
3824
3824
  }), Ro = async (e) => {
3825
3825
  const t = await cp(e), { projectName: n } = e;
3826
- Y(
3826
+ q(
3827
3827
  `git clone ${t} ${n ? `${n} ` : ""}--depth=1`,
3828
3828
  { stdio: "inherit" }
3829
3829
  ), R.success(`克隆${t}成功`);
3830
3830
  }, bp = {
3831
- command: `${Z.CLONE} <platform> <username>`,
3831
+ command: `${Y.CLONE} <platform> <username>`,
3832
3832
  describe: "从选择的git平台克隆代码",
3833
3833
  options: Ep(),
3834
3834
  positionals: _p(),
@@ -3910,19 +3910,19 @@ const Zf = 3e4, kn = Math.random(), mo = {
3910
3910
  o.forEach((u, f) => {
3911
3911
  var c;
3912
3912
  const p = u.mergeInfo || ((c = a[u.hash]) == null ? void 0 : c.mergeInfo);
3913
- p && Object.entries(n).forEach(([m]) => {
3914
- const y = s[m];
3915
- if (f > y) {
3916
- R.skip(`${m} 只检测${y + 1}条, 超出不再检测`);
3913
+ p && Object.entries(n).forEach(([g]) => {
3914
+ const m = s[g];
3915
+ if (f > m) {
3916
+ R.skip(`${g} 只检测${m + 1}条, 超出不再检测`);
3917
3917
  return;
3918
3918
  }
3919
3919
  const h = nn({
3920
3920
  mergeInfo: p,
3921
3921
  configMap: n,
3922
3922
  currentBranch: t
3923
- }), { fromBranch: g } = p;
3923
+ }), { fromBranch: y } = p;
3924
3924
  if (h) {
3925
- const d = `发现${g}被合并
3925
+ const d = `发现${y}被合并
3926
3926
  本次提交版本 ${u.hash}
3927
3927
  提交注释 ${u.message}
3928
3928
  提交人: ${u.committer}
@@ -4011,7 +4011,7 @@ const Zf = 3e4, kn = Math.random(), mo = {
4011
4011
  throw new Error(`不支持的检测类型${n}`);
4012
4012
  }
4013
4013
  }, Ap = {
4014
- command: `${Z.CHECK} <type>`,
4014
+ command: `${Y.CHECK} <type>`,
4015
4015
  describe: "检查git操作",
4016
4016
  options: Rp(),
4017
4017
  positionals: Op(),
@@ -4069,7 +4069,7 @@ const Zf = 3e4, kn = Math.random(), mo = {
4069
4069
  R.error(`${t} 当前未支持处理`);
4070
4070
  }
4071
4071
  }, jp = {
4072
- command: `${Z.HOOKS} <name> [args...]`,
4072
+ command: `${Y.HOOKS} <name> [args...]`,
4073
4073
  describe: "git钩子回调",
4074
4074
  options: $p(),
4075
4075
  positionals: Np(),
@@ -4083,9 +4083,9 @@ const Zf = 3e4, kn = Math.random(), mo = {
4083
4083
  ].map(St), Gn({ packageJson: Zt });
4084
4084
  const Bp = async (e) => {
4085
4085
  console.log("克隆done-coding系列项目"), console.log("选择平台:");
4086
- const { platform: t } = await T(en(L.GITEE));
4086
+ const { platform: t } = await S(en(L.GITEE));
4087
4087
  console.log("选择用户名:");
4088
- const { username: n } = await T(
4088
+ const { username: n } = await S(
4089
4089
  tn(
4090
4090
  {
4091
4091
  [L.GITHUB]: "done-coding",
@@ -4117,101 +4117,110 @@ const Bp = async (e) => {
4117
4117
  R.info("仅仅(从done-coding系列项目列表中)克隆远程仓库"), await Bp(t);
4118
4118
  return;
4119
4119
  }
4120
- const o = ((t ?? (await T(Ko)).projectName) || "").trim();
4120
+ const o = ((t ?? (await S(Ko)).projectName) || "").trim();
4121
4121
  if (!o)
4122
4122
  return R.error("项目名称不能为空"), process.exit(1);
4123
4123
  if (o.includes(" ") || o.includes("\\") || o.includes("/"))
4124
4124
  return R.error(`项目名称\`${o}\`不能包含空格或者\\或者/`), process.exit(1);
4125
4125
  const s = Io(process.cwd(), o);
4126
4126
  if (on(s)) {
4127
- const { isRemove: h } = await T(Vo());
4128
- if (h === !0)
4127
+ const { isRemove: m } = await S(Vo());
4128
+ if (m === !0)
4129
4129
  je(s, { recursive: !0, force: !0 });
4130
4130
  else
4131
4131
  return R.error(`项目${o}已存在`), process.exit(1);
4132
4132
  }
4133
- const { template: i } = await T(await zo());
4133
+ const { template: i } = await S(await zo());
4134
4134
  let a = "", u = "";
4135
4135
  if (i === Kn) {
4136
- const { customUrl: h } = await T(Xo);
4137
- a = h;
4136
+ const { customUrl: m } = await S(Xo);
4137
+ a = m;
4138
4138
  } else if (i === Wn)
4139
4139
  a = await Go();
4140
4140
  else {
4141
- const h = (await zn()).find(
4142
- (g) => g.name === i
4141
+ const m = (await zn()).find(
4142
+ (h) => h.name === i
4143
4143
  );
4144
- if (!h)
4144
+ if (!m)
4145
4145
  return R.error(`模板${i}不存在`), process.exit(1);
4146
- if (!h.url)
4146
+ if (!m.url)
4147
4147
  return R.error(`模板${i}仓库地址不存在`), process.exit(1);
4148
- if (a = h.url, typeof h.branch == "string")
4149
- u = h.branch;
4150
- else if (Array.isArray(h.branch) && h.branch.length > 0) {
4151
- const { targetBranch: g } = await T({
4148
+ if (a = m.url, typeof m.branch == "string")
4149
+ u = m.branch;
4150
+ else if (Array.isArray(m.branch) && m.branch.length > 0) {
4151
+ const { targetBranch: h } = await S({
4152
4152
  type: "select",
4153
4153
  name: "targetBranch",
4154
4154
  message: "请选择模板分支",
4155
- choices: h.branch.map((d) => ({
4156
- title: d.name,
4157
- value: d.name,
4158
- description: d.description
4155
+ choices: m.branch.map((y) => ({
4156
+ title: y.name,
4157
+ value: y.name,
4158
+ description: y.description
4159
4159
  }))
4160
4160
  // initial: 0,
4161
4161
  });
4162
- u = g;
4162
+ u = h;
4163
4163
  }
4164
4164
  }
4165
4165
  const f = qn(".git");
4166
- let c = "";
4167
- if (!f && u) {
4168
- const { localBranchName: h } = await T({
4169
- type: "text",
4170
- name: "localBranchName",
4171
- message: "请输入克隆到本地后的分支名",
4172
- initial: "master"
4166
+ if (R.stage("正在初始化项目,请稍等..."), q(
4167
+ `git clone${u ? ` -b ${u}` : ""} ${a} ${o} --depth=1`,
4168
+ { stdio: "inherit" }
4169
+ ), !f && u) {
4170
+ const { isChangeBranchName: m } = await S({
4171
+ type: "confirm",
4172
+ name: "isChangeBranchName",
4173
+ message: `是否要重命名指定克隆分支名(${u})在本地的分支名`,
4174
+ initial: !1
4173
4175
  });
4174
- c = h;
4176
+ if (m) {
4177
+ const { localBranchName: h } = await S({
4178
+ type: "text",
4179
+ name: "localBranchName",
4180
+ message: "请输入克隆到本地后的分支名",
4181
+ initial: "master"
4182
+ });
4183
+ q(`git branch -m ${h}`, {
4184
+ cwd: s,
4185
+ stdio: "inherit"
4186
+ });
4187
+ }
4175
4188
  }
4176
- R.stage("正在初始化项目,请稍等..."), Y(
4177
- `git clone${u ? ` -b ${u} ${c}` : ""} ${a} ${o} --depth=1`,
4178
- { stdio: "inherit" }
4179
- );
4180
- const p = Ho, m = Mo({
4189
+ const c = Ho, p = Mo({
4181
4190
  rootDir: s,
4182
- configPath: p
4191
+ configPath: c
4183
4192
  });
4184
- if (m && (await ko({
4193
+ if (p && (await ko({
4185
4194
  rootDir: s,
4186
- configPath: p,
4195
+ configPath: c,
4187
4196
  extraEnvData: {
4188
4197
  $projectName: o
4189
4198
  }
4190
- }), je(m, { force: !0 }), R.stage("模板项目配置注入成功, 模版项目配置文件已删除")), R.stage("项目初始化完成"), f) {
4191
- const h = Ee.resolve(s), g = Ee.resolve(h, ".git");
4192
- if (!on(g))
4199
+ }), je(p, { force: !0 }), R.stage("模板项目配置注入成功, 模版项目配置文件已删除")), R.stage("项目初始化完成"), f) {
4200
+ const m = Ee.resolve(s), h = Ee.resolve(m, ".git");
4201
+ if (!on(h))
4193
4202
  throw new Error("git目录不存在");
4194
- je(g, { recursive: !0, force: !0 }), R.stage(
4195
- `项目创建在父级git仓库${f}中,已删除${o}目录下的.git(${g})`
4203
+ je(h, { recursive: !0, force: !0 }), R.stage(
4204
+ `项目创建在父级git仓库${f}中,已删除${o}目录下的.git(${h})`
4196
4205
  );
4197
- } else if ((await T(Jo)).saveGitHistory)
4198
- Y("git remote rename origin upstream && git fetch --unshallow", {
4206
+ } else if ((await S(Jo)).saveGitHistory)
4207
+ q("git remote rename origin upstream && git fetch --unshallow", {
4199
4208
  cwd: s,
4200
4209
  stdio: "inherit"
4201
4210
  }), R.stage(
4202
4211
  "已经将origin重命名为upstream,后续可以与模板git仓库有完整的交互"
4203
4212
  ), R.success("已保存git历史记录");
4204
4213
  else {
4205
- const g = Ee.resolve(s, ".git");
4206
- je(g, { recursive: !0, force: !0 }), Y("git init", {
4214
+ const h = Ee.resolve(s, ".git");
4215
+ je(h, { recursive: !0, force: !0 }), q("git init", {
4207
4216
  cwd: s,
4208
4217
  stdio: "inherit"
4209
4218
  });
4210
4219
  }
4211
- const { gitCommitMessage: y } = await T(
4220
+ const { gitCommitMessage: g } = await S(
4212
4221
  Qo(o)
4213
4222
  );
4214
- Y(`git add . && git commit -m '${y}'`, {
4223
+ q(`git add . && git commit -m '${g}'`, {
4215
4224
  cwd: s,
4216
4225
  stdio: "inherit"
4217
4226
  }), R.success(`项目${o}初始化完成`), R.info(`
package/es/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { S as d, e as s, a as p, b as c, h as b, d as l } from "./index-d1258ba5.js";
2
+ import { S as d, e as s, a as p, b as c, h as b, d as l } from "./index-0729467f.js";
3
3
  import "@done-coding/cli-utils";
4
4
  import "node:child_process";
5
5
  import "node:fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "done-coding-create",
3
- "version": "0.11.18",
3
+ "version": "0.11.19",
4
4
  "description": "项目创建命令行工具",
5
5
  "module": "es/index.mjs",
6
6
  "type": "module",
@@ -46,6 +46,6 @@
46
46
  "@done-coding/cli-template": "0.8.4",
47
47
  "@done-coding/cli-utils": "0.7.7"
48
48
  },
49
- "gitHead": "85266dee9219d30f35adba2a02dcaf2e2ff4ed52",
49
+ "gitHead": "95ae24a11e3c835b473c7ba492fae83afed1adb5",
50
50
  "scripts": {}
51
51
  }