create-rstack 1.4.5 → 1.5.1

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/dist/index.js CHANGED
@@ -1,15 +1,14 @@
1
- import __rslib_shim_module__ from 'module';
1
+ import 'module';
2
2
  /*#__PURE__*/ import.meta.url;
3
- import * as __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__ from "node:fs";
4
- import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
5
- import * as __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__ from "node:url";
6
- import * as __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__ from "node:util";
7
- import * as __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__ from "node:process";
8
- import * as __WEBPACK_EXTERNAL_MODULE_node_readline_91c31510__ from "node:readline";
9
- import * as __WEBPACK_EXTERNAL_MODULE_node_stream_444d1c2b__ from "node:stream";
10
- import * as __WEBPACK_EXTERNAL_MODULE_process__ from "process";
11
- import * as __WEBPACK_EXTERNAL_MODULE_os__ from "os";
12
- import * as __WEBPACK_EXTERNAL_MODULE_tty__ from "tty";
3
+ import node_fs from "node:fs";
4
+ import node_path, { dirname } from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+ import { stripVTControlCharacters } from "node:util";
7
+ import node_process, { stdin, stdout } from "node:process";
8
+ import node_readline from "node:readline";
9
+ import { Writable } from "node:stream";
10
+ import node_os from "node:os";
11
+ import node_tty from "node:tty";
13
12
  var __webpack_modules__ = {
14
13
  "./node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js": function(module) {
15
14
  var isMergeableObject = function(value) {
@@ -459,11 +458,11 @@ var W = {
459
458
  return i;
460
459
  }, u.slice = function(F, s, i) {
461
460
  textLen = u.length(F), s = s || 0, i = i || 1, s < 0 && (s = textLen + s), i < 0 && (i = textLen + i);
462
- for(var D = "", r = 0, n = t(F), E = 0; E < n.length; E++){
461
+ for(var D = "", C = 0, n = t(F), E = 0; E < n.length; E++){
463
462
  var a = n[E], o = u.length(a);
464
- if (r >= s - (2 == o ? 1 : 0)) if (r + o <= i) D += a;
463
+ if (C >= s - (2 == o ? 1 : 0)) if (C + o <= i) D += a;
465
464
  else break;
466
- r += o;
465
+ C += o;
467
466
  }
468
467
  return D;
469
468
  };
@@ -498,7 +497,7 @@ function dist_p(e, u = {}) {
498
497
  }
499
498
  return F;
500
499
  }
501
- const dist_w = 10, dist_N = (e = 0)=>(u)=>`\x1B[${u + e}m`, dist_I = (e = 0)=>(u)=>`\x1B[${38 + e};5;${u}m`, dist_R = (e = 0)=>(u, t, F)=>`\x1B[${38 + e};2;${u};${t};${F}m`, C = {
500
+ const dist_w = 10, dist_N = (e = 0)=>(u)=>`\x1B[${u + e}m`, dist_I = (e = 0)=>(u)=>`\x1B[${38 + e};5;${u}m`, dist_R = (e = 0)=>(u, t, F)=>`\x1B[${38 + e};2;${u};${t};${F}m`, dist_r = {
502
501
  modifier: {
503
502
  reset: [
504
503
  0,
@@ -686,28 +685,28 @@ const dist_w = 10, dist_N = (e = 0)=>(u)=>`\x1B[${u + e}m`, dist_I = (e = 0)=>(u
686
685
  ]
687
686
  }
688
687
  };
689
- Object.keys(C.modifier);
690
- const iD = Object.keys(C.color), rD = Object.keys(C.bgColor);
688
+ Object.keys(dist_r.modifier);
689
+ const iD = Object.keys(dist_r.color), CD = Object.keys(dist_r.bgColor);
691
690
  [
692
691
  ...iD,
693
- ...rD
692
+ ...CD
694
693
  ];
695
- function CD() {
694
+ function rD() {
696
695
  const e = new Map;
697
- for (const [u, t] of Object.entries(C)){
698
- for (const [F, s] of Object.entries(t))C[F] = {
696
+ for (const [u, t] of Object.entries(dist_r)){
697
+ for (const [F, s] of Object.entries(t))dist_r[F] = {
699
698
  open: `\x1B[${s[0]}m`,
700
699
  close: `\x1B[${s[1]}m`
701
- }, t[F] = C[F], e.set(s[0], s[1]);
702
- Object.defineProperty(C, u, {
700
+ }, t[F] = dist_r[F], e.set(s[0], s[1]);
701
+ Object.defineProperty(dist_r, u, {
703
702
  value: t,
704
703
  enumerable: !1
705
704
  });
706
705
  }
707
- return Object.defineProperty(C, "codes", {
706
+ return Object.defineProperty(dist_r, "codes", {
708
707
  value: e,
709
708
  enumerable: !1
710
- }), C.color.close = "\x1B[39m", C.bgColor.close = "\x1B[49m", C.color.ansi = dist_N(), C.color.ansi256 = dist_I(), C.color.ansi16m = dist_R(), C.bgColor.ansi = dist_N(dist_w), C.bgColor.ansi256 = dist_I(dist_w), C.bgColor.ansi16m = dist_R(dist_w), Object.defineProperties(C, {
709
+ }), dist_r.color.close = "\x1B[39m", dist_r.bgColor.close = "\x1B[49m", dist_r.color.ansi = dist_N(), dist_r.color.ansi256 = dist_I(), dist_r.color.ansi16m = dist_R(), dist_r.bgColor.ansi = dist_N(dist_w), dist_r.bgColor.ansi256 = dist_I(dist_w), dist_r.bgColor.ansi16m = dist_R(dist_w), Object.defineProperties(dist_r, {
711
710
  rgbToAnsi256: {
712
711
  value: (u, t, F)=>u === t && t === F ? u < 8 ? 16 : u > 248 ? 231 : Math.round((u - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u / 255 * 5) + 6 * Math.round(t / 255 * 5) + Math.round(F / 255 * 5),
713
712
  enumerable: !1
@@ -734,7 +733,7 @@ function CD() {
734
733
  enumerable: !1
735
734
  },
736
735
  hexToAnsi256: {
737
- value: (u)=>C.rgbToAnsi256(...C.hexToRgb(u)),
736
+ value: (u)=>dist_r.rgbToAnsi256(...dist_r.hexToRgb(u)),
738
737
  enumerable: !1
739
738
  },
740
739
  ansi256ToAnsi: {
@@ -745,8 +744,8 @@ function CD() {
745
744
  if (u >= 232) t = ((u - 232) * 10 + 8) / 255, F = t, s = t;
746
745
  else {
747
746
  u -= 16;
748
- const r = u % 36;
749
- t = Math.floor(u / 36) / 5, F = Math.floor(r / 6) / 5, s = r % 6 / 5;
747
+ const C = u % 36;
748
+ t = Math.floor(u / 36) / 5, F = Math.floor(C / 6) / 5, s = C % 6 / 5;
750
749
  }
751
750
  const i = 2 * Math.max(t, F, s);
752
751
  if (0 === i) return 30;
@@ -756,16 +755,16 @@ function CD() {
756
755
  enumerable: !1
757
756
  },
758
757
  rgbToAnsi: {
759
- value: (u, t, F)=>C.ansi256ToAnsi(C.rgbToAnsi256(u, t, F)),
758
+ value: (u, t, F)=>dist_r.ansi256ToAnsi(dist_r.rgbToAnsi256(u, t, F)),
760
759
  enumerable: !1
761
760
  },
762
761
  hexToAnsi: {
763
- value: (u)=>C.ansi256ToAnsi(C.hexToAnsi256(u)),
762
+ value: (u)=>dist_r.ansi256ToAnsi(dist_r.hexToAnsi256(u)),
764
763
  enumerable: !1
765
764
  }
766
- }), C;
765
+ }), dist_r;
767
766
  }
768
- const ED = CD(), d = new Set([
767
+ const ED = rD(), d = new Set([
769
768
  "\x1B",
770
769
  "\x9B"
771
770
  ]), oD = 39, y = "\x07", V = "[", nD = "]", G = "m", _ = `${nD}8;;`, dist_z = (e)=>`${d.values().next().value}${V}${e}${G}`, K = (e)=>`${d.values().next().value}${_}${e}${y}`, aD = (e)=>e.split(" ").map((u)=>dist_p(u)), k = (e, u, t)=>{
@@ -773,13 +772,13 @@ const ED = CD(), d = new Set([
773
772
  ...u
774
773
  ];
775
774
  let s = !1, i = !1, D = dist_p(P(e[e.length - 1]));
776
- for (const [r, n] of F.entries()){
775
+ for (const [C, n] of F.entries()){
777
776
  const E = dist_p(n);
778
- if (D + E <= t ? e[e.length - 1] += n : (e.push(n), D = 0), d.has(n) && (s = !0, i = F.slice(r + 1).join("").startsWith(_)), s) {
777
+ if (D + E <= t ? e[e.length - 1] += n : (e.push(n), D = 0), d.has(n) && (s = !0, i = F.slice(C + 1).join("").startsWith(_)), s) {
779
778
  i ? n === y && (s = !1, i = !1) : n === G && (s = !1);
780
779
  continue;
781
780
  }
782
- D += E, D === t && r < F.length - 1 && (e.push(""), D = 0);
781
+ D += E, D === t && C < F.length - 1 && (e.push(""), D = 0);
783
782
  }
784
783
  !D && e[e.length - 1].length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
785
784
  }, hD = (e)=>{
@@ -791,33 +790,33 @@ const ED = CD(), d = new Set([
791
790
  if (!1 !== t.trim && "" === e.trim()) return "";
792
791
  let F = "", s, i;
793
792
  const D = aD(e);
794
- let r = [
793
+ let C = [
795
794
  ""
796
795
  ];
797
796
  for (const [E, a] of e.split(" ").entries()){
798
- !1 !== t.trim && (r[r.length - 1] = r[r.length - 1].trimStart());
799
- let o = dist_p(r[r.length - 1]);
800
- if (0 !== E && (o >= u && (!1 === t.wordWrap || !1 === t.trim) && (r.push(""), o = 0), (o > 0 || !1 === t.trim) && (r[r.length - 1] += " ", o++)), t.hard && D[E] > u) {
797
+ !1 !== t.trim && (C[C.length - 1] = C[C.length - 1].trimStart());
798
+ let o = dist_p(C[C.length - 1]);
799
+ if (0 !== E && (o >= u && (!1 === t.wordWrap || !1 === t.trim) && (C.push(""), o = 0), (o > 0 || !1 === t.trim) && (C[C.length - 1] += " ", o++)), t.hard && D[E] > u) {
801
800
  const c = u - o, f = 1 + Math.floor((D[E] - c - 1) / u);
802
- Math.floor((D[E] - 1) / u) < f && r.push(""), k(r, a, u);
801
+ Math.floor((D[E] - 1) / u) < f && C.push(""), k(C, a, u);
803
802
  continue;
804
803
  }
805
804
  if (o + D[E] > u && o > 0 && D[E] > 0) {
806
805
  if (!1 === t.wordWrap && o < u) {
807
- k(r, a, u);
806
+ k(C, a, u);
808
807
  continue;
809
808
  }
810
- r.push("");
809
+ C.push("");
811
810
  }
812
811
  if (o + D[E] > u && !1 === t.wordWrap) {
813
- k(r, a, u);
812
+ k(C, a, u);
814
813
  continue;
815
814
  }
816
- r[r.length - 1] += a;
815
+ C[C.length - 1] += a;
817
816
  }
818
- !1 !== t.trim && (r = r.map((E)=>hD(E)));
817
+ !1 !== t.trim && (C = C.map((E)=>hD(E)));
819
818
  const n = [
820
- ...r.join(`
819
+ ...C.join(`
821
820
  `)
822
821
  ];
823
822
  for (const [E, a] of n.entries()){
@@ -911,8 +910,8 @@ var gD = Object.defineProperty, vD = (e, u, t)=>u in e ? gD(e, u, {
911
910
  class x {
912
911
  constructor(u, t = !0){
913
912
  dist_h(this, "input"), dist_h(this, "output"), dist_h(this, "_abortSignal"), dist_h(this, "rl"), dist_h(this, "opts"), dist_h(this, "_render"), dist_h(this, "_track", !1), dist_h(this, "_prevFrame", ""), dist_h(this, "_subscribers", new Map), dist_h(this, "_cursor", 0), dist_h(this, "state", "initial"), dist_h(this, "error", ""), dist_h(this, "value");
914
- const { input: F = __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__.stdin, output: s = __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__.stdout, render: i, signal: D, ...r } = u;
915
- this.opts = r, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i.bind(this), this._track = t, this._abortSignal = D, this.input = F, this.output = s;
913
+ const { input: F = stdin, output: s = stdout, render: i, signal: D, ...C } = u;
914
+ this.opts = C, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i.bind(this), this._track = t, this._abortSignal = D, this.input = F, this.output = s;
916
915
  }
917
916
  unsubscribe() {
918
917
  this._subscribers.clear();
@@ -947,17 +946,17 @@ class x {
947
946
  once: !0
948
947
  });
949
948
  }
950
- const F = new __WEBPACK_EXTERNAL_MODULE_node_stream_444d1c2b__.Writable;
949
+ const F = new Writable;
951
950
  F._write = (s, i, D)=>{
952
951
  this._track && (this.value = this.rl?.line.replace(/\t/g, ""), this._cursor = this.rl?.cursor ?? 0, this.emit("value", this.value)), D();
953
- }, this.input.pipe(F), this.rl = __WEBPACK_EXTERNAL_MODULE_node_readline_91c31510__["default"].createInterface({
952
+ }, this.input.pipe(F), this.rl = node_readline.createInterface({
954
953
  input: this.input,
955
954
  output: F,
956
955
  tabSize: 2,
957
956
  prompt: "",
958
957
  escapeCodeTimeout: 50,
959
958
  terminal: !0
960
- }), __WEBPACK_EXTERNAL_MODULE_node_readline_91c31510__["default"].emitKeypressEvents(this.input, this.rl), this.rl.prompt(), void 0 !== this.opts.initialValue && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), dist_m(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", ()=>{
959
+ }), node_readline.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), void 0 !== this.opts.initialValue && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), dist_m(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", ()=>{
961
960
  this.output.write(src.cursor.show), this.output.off("resize", this.render), dist_m(this.input, !1), u(this.value);
962
961
  }), this.once("cancel", ()=>{
963
962
  this.output.write(src.cursor.show), this.output.off("resize", this.render), dist_m(this.input, !1), u(dist_S);
@@ -966,7 +965,7 @@ class x {
966
965
  }
967
966
  onKeypress(u, t) {
968
967
  if ("error" === this.state && (this.state = "active"), t?.name && (!this._track && dist_B.aliases.has(t.name) && this.emit("cursor", dist_B.aliases.get(t.name)), dist_B.actions.has(t.name) && this.emit("cursor", t.name)), u && ("y" === u.toLowerCase() || "n" === u.toLowerCase()) && this.emit("confirm", "y" === u.toLowerCase()), " " === u && this.opts.placeholder && (this.value || (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u && this.emit("key", u.toLowerCase()), t?.name === "return") {
969
- if (!this.value && this.opts.placeholder && (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder)), this.opts.validate) {
968
+ if (this.opts.validate) {
970
969
  const F = this.opts.validate(this.value);
971
970
  F && (this.error = F instanceof Error ? F.message : F, this.state = "error", this.rl?.write(this.value));
972
971
  }
@@ -1110,7 +1109,7 @@ class RD extends x {
1110
1109
  }
1111
1110
  }
1112
1111
  function ce() {
1113
- return "win32" !== __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].platform ? "linux" !== __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERM : !!__WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.CI || !!__WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.WT_SESSION || !!__WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERMINUS_SUBLIME || "{cmd::Cmder}" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.ConEmuTask || "Terminus-Sublime" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERM_PROGRAM || "vscode" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERM_PROGRAM || "xterm-256color" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERM || "alacritty" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERM || "JetBrains-JediTerm" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERMINAL_EMULATOR;
1112
+ return "win32" !== node_process.platform ? "linux" !== node_process.env.TERM : !!node_process.env.CI || !!node_process.env.WT_SESSION || !!node_process.env.TERMINUS_SUBLIME || "{cmd::Cmder}" === node_process.env.ConEmuTask || "Terminus-Sublime" === node_process.env.TERM_PROGRAM || "vscode" === node_process.env.TERM_PROGRAM || "xterm-256color" === node_process.env.TERM || "alacritty" === node_process.env.TERM || "JetBrains-JediTerm" === node_process.env.TERMINAL_EMULATOR;
1114
1113
  }
1115
1114
  const dist_V = ce(), dist_u = (t, n)=>dist_V ? t : n, le = dist_u("\u25C6", "*"), dist_L = dist_u("\u25A0", "x"), dist_W = dist_u("\u25B2", "x"), dist_C = dist_u("\u25C7", "o"), dist_o = (dist_u("\u250C", "T"), dist_u("\u2502", "|")), dist_d = dist_u("\u2514", "\u2014"), dist_k = dist_u("\u25CF", ">"), dist_P = dist_u("\u25CB", " "), dist_A = dist_u("\u25FB", "[\u2022]"), dist_T = dist_u("\u25FC", "[+]"), dist_F = dist_u("\u25FB", "[ ]"), dist_ = (dist_u("\u25AA", "\u2022"), dist_u("\u2500", "-")), me = dist_u("\u256E", "+"), de = dist_u("\u251C", "+"), pe = dist_u("\u256F", "+"), dist_b = (dist_u("\u25CF", "\u2022"), dist_u("\u25C6", "*"), dist_u("\u25B2", "!"), dist_u("\u25A0", "x"), (t)=>{
1116
1115
  switch(t){
@@ -1261,10 +1260,10 @@ ${picocolors.cyan(dist_d)}
1261
1260
  const r = `
1262
1261
  ${t}
1263
1262
  `.split(`
1264
- `), i = (0, __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__.stripVTControlCharacters)(n).length, s = Math.max(r.reduce((a, l)=>{
1265
- const $ = (0, __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__.stripVTControlCharacters)(l);
1263
+ `), i = stripVTControlCharacters(n).length, s = Math.max(r.reduce((a, l)=>{
1264
+ const $ = stripVTControlCharacters(l);
1266
1265
  return $.length > a ? $.length : a;
1267
- }, 0), i) + 2, c = r.map((a)=>`${picocolors.gray(dist_o)} ${picocolors.dim(a)}${" ".repeat(s - (0, __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__.stripVTControlCharacters)(a).length)}${picocolors.gray(dist_o)}`).join(`
1266
+ }, 0), i) + 2, c = r.map((a)=>`${picocolors.gray(dist_o)} ${picocolors.dim(a)}${" ".repeat(s - stripVTControlCharacters(a).length)}${picocolors.gray(dist_o)}`).join(`
1268
1267
  `);
1269
1268
  process.stdout.write(`${picocolors.gray(dist_o)}
1270
1269
  ${picocolors.green(dist_C)} ${picocolors.reset(n)} ${picocolors.gray(dist_.repeat(Math.max(s - i - 1, 1)) + me)}
@@ -1286,22 +1285,29 @@ var cjs = __webpack_require__("./node_modules/.pnpm/deepmerge@4.3.1/node_modules
1286
1285
  var cjs_default = /*#__PURE__*/ __webpack_require__.n(cjs);
1287
1286
  var minimist = __webpack_require__("./node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/index.js");
1288
1287
  var minimist_default = /*#__PURE__*/ __webpack_require__.n(minimist);
1289
- function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : __WEBPACK_EXTERNAL_MODULE_process__["default"].argv) {
1290
- const prefix = flag.startsWith("-") ? "" : 1 === flag.length ? "-" : "--";
1288
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : node_process.argv) {
1289
+ const prefix = flag.startsWith('-') ? '' : 1 === flag.length ? '-' : '--';
1291
1290
  const position = argv.indexOf(prefix + flag);
1292
- const terminatorPosition = argv.indexOf("--");
1291
+ const terminatorPosition = argv.indexOf('--');
1293
1292
  return -1 !== position && (-1 === terminatorPosition || position < terminatorPosition);
1294
1293
  }
1295
- var { env } = __WEBPACK_EXTERNAL_MODULE_process__["default"];
1296
- var flagForceColor;
1297
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
1298
- else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
1294
+ const { env } = node_process;
1295
+ let flagForceColor;
1296
+ if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false') || hasFlag('color=never')) flagForceColor = 0;
1297
+ else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) flagForceColor = 1;
1299
1298
  function envForceColor() {
1300
- if ("FORCE_COLOR" in env) {
1301
- if ("true" === env.FORCE_COLOR) return 1;
1302
- if ("false" === env.FORCE_COLOR) return 0;
1303
- return 0 === env.FORCE_COLOR.length ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
1304
- }
1299
+ if (!('FORCE_COLOR' in env)) return;
1300
+ if ('true' === env.FORCE_COLOR) return 1;
1301
+ if ('false' === env.FORCE_COLOR) return 0;
1302
+ if (0 === env.FORCE_COLOR.length) return 1;
1303
+ const level = Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
1304
+ if (![
1305
+ 0,
1306
+ 1,
1307
+ 2,
1308
+ 3
1309
+ ].includes(level)) return;
1310
+ return level;
1305
1311
  }
1306
1312
  function translateLevel(level) {
1307
1313
  if (0 === level) return false;
@@ -1318,45 +1324,48 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
1318
1324
  const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
1319
1325
  if (0 === forceColor) return 0;
1320
1326
  if (sniffFlags) {
1321
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
1322
- if (hasFlag("color=256")) return 2;
1327
+ if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) return 3;
1328
+ if (hasFlag('color=256')) return 2;
1323
1329
  }
1324
- if ("TF_BUILD" in env && "AGENT_NAME" in env) return 1;
1330
+ if ('TF_BUILD' in env && 'AGENT_NAME' in env) return 1;
1325
1331
  if (haveStream && !streamIsTTY && void 0 === forceColor) return 0;
1326
1332
  const min = forceColor || 0;
1327
- if ("dumb" === env.TERM) return min;
1328
- if ("win32" === __WEBPACK_EXTERNAL_MODULE_process__["default"].platform) {
1329
- const osRelease = __WEBPACK_EXTERNAL_MODULE_os__["default"].release().split(".");
1333
+ if ('dumb' === env.TERM) return min;
1334
+ if ('win32' === node_process.platform) {
1335
+ const osRelease = node_os.release().split('.');
1330
1336
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
1331
1337
  return 1;
1332
1338
  }
1333
- if ("CI" in env) {
1334
- if ("GITHUB_ACTIONS" in env || "GITEA_ACTIONS" in env) return 3;
1339
+ if ('CI' in env) {
1340
+ if ([
1341
+ 'GITHUB_ACTIONS',
1342
+ 'GITEA_ACTIONS',
1343
+ 'CIRCLECI'
1344
+ ].some((key)=>key in env)) return 3;
1335
1345
  if ([
1336
- "TRAVIS",
1337
- "CIRCLECI",
1338
- "APPVEYOR",
1339
- "GITLAB_CI",
1340
- "BUILDKITE",
1341
- "DRONE"
1342
- ].some((sign)=>sign in env) || "codeship" === env.CI_NAME) return 1;
1346
+ 'TRAVIS',
1347
+ 'APPVEYOR',
1348
+ 'GITLAB_CI',
1349
+ 'BUILDKITE',
1350
+ 'DRONE'
1351
+ ].some((sign)=>sign in env) || 'codeship' === env.CI_NAME) return 1;
1343
1352
  return min;
1344
1353
  }
1345
- if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
1346
- if ("truecolor" === env.COLORTERM) return 3;
1347
- if ("xterm-kitty" === env.TERM) return 3;
1348
- if ("TERM_PROGRAM" in env) {
1349
- const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
1354
+ if ('TEAMCITY_VERSION' in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
1355
+ if ('truecolor' === env.COLORTERM) return 3;
1356
+ if ('xterm-kitty' === env.TERM) return 3;
1357
+ if ('TERM_PROGRAM' in env) {
1358
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
1350
1359
  switch(env.TERM_PROGRAM){
1351
- case "iTerm.app":
1360
+ case 'iTerm.app':
1352
1361
  return version >= 3 ? 3 : 2;
1353
- case "Apple_Terminal":
1362
+ case 'Apple_Terminal':
1354
1363
  return 2;
1355
1364
  }
1356
1365
  }
1357
1366
  if (/-256(color)?$/i.test(env.TERM)) return 2;
1358
1367
  if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
1359
- if ("COLORTERM" in env) return 1;
1368
+ if ('COLORTERM' in env) return 1;
1360
1369
  return min;
1361
1370
  }
1362
1371
  function createSupportsColor(stream, options = {}) {
@@ -1366,49 +1375,49 @@ function createSupportsColor(stream, options = {}) {
1366
1375
  });
1367
1376
  return translateLevel(level);
1368
1377
  }
1369
- var supportsColor = {
1378
+ const supportsColor = {
1370
1379
  stdout: createSupportsColor({
1371
- isTTY: __WEBPACK_EXTERNAL_MODULE_tty__["default"].isatty(1)
1380
+ isTTY: node_tty.isatty(1)
1372
1381
  }),
1373
1382
  stderr: createSupportsColor({
1374
- isTTY: __WEBPACK_EXTERNAL_MODULE_tty__["default"].isatty(2)
1383
+ isTTY: node_tty.isatty(2)
1375
1384
  })
1376
1385
  };
1377
- var supports_color_default = supportsColor;
1378
- var colorLevel = supports_color_default.stdout ? supports_color_default.stdout.level : 0;
1379
- var errorStackRegExp = /at\s.*:\d+:\d+[\s\)]*$/;
1380
- var anonymousErrorStackRegExp = /at\s.*\(<anonymous>\)$/;
1381
- var isErrorStackMessage = (message)=>errorStackRegExp.test(message) || anonymousErrorStackRegExp.test(message);
1382
- var formatter = (open, close, replace = open)=>colorLevel >= 2 ? (input)=>{
1383
- let string = "" + input;
1386
+ const supports_color = supportsColor;
1387
+ const colorLevel = supports_color.stdout ? supports_color.stdout.level : 0;
1388
+ let errorStackRegExp = /at\s.*:\d+:\d+[\s\)]*$/;
1389
+ let anonymousErrorStackRegExp = /at\s.*\(<anonymous>\)$/;
1390
+ let isErrorStackMessage = (message)=>errorStackRegExp.test(message) || anonymousErrorStackRegExp.test(message);
1391
+ let formatter = (open, close, replace = open)=>colorLevel >= 2 ? (input)=>{
1392
+ let string = '' + input;
1384
1393
  let index = string.indexOf(close, open.length);
1385
1394
  return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
1386
1395
  } : String;
1387
- var replaceClose = (string, close, replace, index)=>{
1396
+ let replaceClose = (string, close, replace, index)=>{
1388
1397
  let start = string.substring(0, index) + replace;
1389
1398
  let end = string.substring(index + close.length);
1390
1399
  let nextIndex = end.indexOf(close);
1391
1400
  return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;
1392
1401
  };
1393
- var bold = formatter("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m");
1394
- var red = formatter("\x1B[31m", "\x1B[39m");
1395
- var green = formatter("\x1B[32m", "\x1B[39m");
1396
- var yellow = formatter("\x1B[33m", "\x1B[39m");
1397
- var magenta = formatter("\x1B[35m", "\x1B[39m");
1398
- var cyan = formatter("\x1B[36m", "\x1B[39m");
1399
- var gray = formatter("\x1B[90m", "\x1B[39m");
1400
- var startColor = [
1402
+ const bold = formatter('\x1b[1m', '\x1b[22m', '\x1b[22m\x1b[1m');
1403
+ const red = formatter('\x1b[31m', '\x1b[39m');
1404
+ const green = formatter('\x1b[32m', '\x1b[39m');
1405
+ const yellow = formatter('\x1b[33m', '\x1b[39m');
1406
+ const magenta = formatter('\x1b[35m', '\x1b[39m');
1407
+ const cyan = formatter('\x1b[36m', '\x1b[39m');
1408
+ const gray = formatter('\x1b[90m', '\x1b[39m');
1409
+ let startColor = [
1401
1410
  189,
1402
1411
  255,
1403
1412
  243
1404
1413
  ];
1405
- var endColor = [
1414
+ let endColor = [
1406
1415
  74,
1407
1416
  194,
1408
1417
  154
1409
1418
  ];
1410
- var isWord = (char)=>!/[\s\n]/.test(char);
1411
- var gradient = (message)=>{
1419
+ let isWord = (char)=>!/[\s\n]/.test(char);
1420
+ let gradient = (message)=>{
1412
1421
  if (colorLevel < 3) return 2 === colorLevel ? bold(cyan(message)) : message;
1413
1422
  let chars = [
1414
1423
  ...message
@@ -1420,108 +1429,108 @@ var gradient = (message)=>{
1420
1429
  let rStep = (endColor[0] - r) / steps;
1421
1430
  let gStep = (endColor[1] - g) / steps;
1422
1431
  let bStep = (endColor[2] - b) / steps;
1423
- let output = "";
1432
+ let output = '';
1424
1433
  for (let char of chars){
1425
1434
  if (isWord(char)) {
1426
1435
  r += rStep;
1427
1436
  g += gStep;
1428
1437
  b += bStep;
1429
1438
  }
1430
- output += `\x1B[38;2;${Math.round(r)};${Math.round(g)};${Math.round(b)}m${char}\x1B[39m`;
1439
+ output += `\x1b[38;2;${Math.round(r)};${Math.round(g)};${Math.round(b)}m${char}\x1b[39m`;
1431
1440
  }
1432
1441
  return bold(output);
1433
1442
  };
1434
- var LOG_LEVEL = {
1443
+ let LOG_LEVEL = {
1444
+ silent: -1,
1435
1445
  error: 0,
1436
1446
  warn: 1,
1437
1447
  info: 2,
1438
- log: 3,
1439
- verbose: 4
1448
+ log: 2,
1449
+ verbose: 3
1440
1450
  };
1441
- var LOG_TYPES = {
1451
+ let LOG_TYPES = {
1442
1452
  error: {
1443
- label: "error",
1444
- level: "error",
1453
+ label: 'error',
1454
+ level: 'error',
1445
1455
  color: red
1446
1456
  },
1447
1457
  warn: {
1448
- label: "warn",
1449
- level: "warn",
1458
+ label: 'warn',
1459
+ level: 'warn',
1450
1460
  color: yellow
1451
1461
  },
1452
1462
  info: {
1453
- label: "info",
1454
- level: "info",
1463
+ label: 'info',
1464
+ level: 'info',
1455
1465
  color: cyan
1456
1466
  },
1457
1467
  start: {
1458
- label: "start",
1459
- level: "info",
1468
+ label: 'start',
1469
+ level: 'info',
1460
1470
  color: cyan
1461
1471
  },
1462
1472
  ready: {
1463
- label: "ready",
1464
- level: "info",
1473
+ label: 'ready',
1474
+ level: 'info',
1465
1475
  color: green
1466
1476
  },
1467
1477
  success: {
1468
- label: "success",
1469
- level: "info",
1478
+ label: 'success',
1479
+ level: 'info',
1470
1480
  color: green
1471
1481
  },
1472
1482
  log: {
1473
- level: "log"
1483
+ level: 'info'
1474
1484
  },
1475
1485
  debug: {
1476
- label: "debug",
1477
- level: "verbose",
1486
+ label: 'debug',
1487
+ level: 'verbose',
1478
1488
  color: magenta
1479
1489
  }
1480
1490
  };
1481
- var createLogger = (options = {})=>{
1482
- let maxLevel = options.level || "log";
1491
+ let createLogger = (options = {})=>{
1492
+ let maxLevel = options.level || 'info';
1483
1493
  let log = (type, message, ...args)=>{
1484
1494
  if (LOG_LEVEL[LOG_TYPES[type].level] > LOG_LEVEL[maxLevel]) return;
1485
1495
  if (null == message) return console.log();
1486
1496
  let logType = LOG_TYPES[type];
1487
- let label = "";
1488
- let text = "";
1489
- if ("label" in logType) {
1490
- label = (logType.label || "").padEnd(7);
1497
+ let label = '';
1498
+ let text = '';
1499
+ if ('label' in logType) {
1500
+ label = (logType.label || '').padEnd(7);
1491
1501
  label = bold(logType.color ? logType.color(label) : label);
1492
1502
  }
1493
1503
  if (message instanceof Error) if (message.stack) {
1494
- let [name, ...rest] = message.stack.split("\n");
1495
- if (name.startsWith("Error: ")) name = name.slice(7);
1496
- text = `${name}
1497
- ${gray(rest.join("\n"))}`;
1504
+ let [name, ...rest] = message.stack.split('\n');
1505
+ if (name.startsWith('Error: ')) name = name.slice(7);
1506
+ text = `${name}\n${gray(rest.join('\n'))}`;
1498
1507
  } else text = message.message;
1499
- else if ("error" === logType.level && "string" == typeof message) {
1500
- let lines = message.split("\n");
1501
- text = lines.map((line)=>isErrorStackMessage(line) ? gray(line) : line).join("\n");
1508
+ else if ('error' === logType.level && 'string' == typeof message) {
1509
+ let lines = message.split('\n');
1510
+ text = lines.map((line)=>isErrorStackMessage(line) ? gray(line) : line).join('\n');
1502
1511
  } else text = `${message}`;
1503
1512
  console.log(label.length ? `${label} ${text}` : text, ...args);
1504
1513
  };
1505
- let logger2 = {
1506
- greet: (message)=>log("log", gradient(message))
1514
+ let logger = {
1515
+ greet: (message)=>log('log', gradient(message))
1507
1516
  };
1508
1517
  Object.keys(LOG_TYPES).forEach((key)=>{
1509
- logger2[key] = (...args)=>log(key, ...args);
1518
+ logger[key] = (...args)=>log(key, ...args);
1510
1519
  });
1511
- Object.defineProperty(logger2, "level", {
1520
+ Object.defineProperty(logger, 'level', {
1512
1521
  get: ()=>maxLevel,
1513
1522
  set (val) {
1514
1523
  maxLevel = val;
1515
1524
  }
1516
1525
  });
1517
- logger2.override = (customLogger)=>{
1518
- Object.assign(logger2, customLogger);
1526
+ logger.override = (customLogger)=>{
1527
+ Object.assign(logger, customLogger);
1519
1528
  };
1520
- return logger2;
1529
+ return logger;
1521
1530
  };
1522
- var logger = createLogger();
1523
- const src_filename = (0, __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__.fileURLToPath)(import.meta.url);
1524
- const src_dirname = (0, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.dirname)(src_filename);
1531
+ let src_logger = createLogger();
1532
+ const src_filename = fileURLToPath(import.meta.url);
1533
+ const src_dirname = dirname(src_filename);
1525
1534
  function cancelAndExit() {
1526
1535
  xe('Operation cancelled.');
1527
1536
  process.exit(0);
@@ -1533,7 +1542,7 @@ function checkCancel(value) {
1533
1542
  function formatProjectName(input) {
1534
1543
  const formatted = input.trim().replace(/\/+$/g, '');
1535
1544
  return {
1536
- packageName: formatted.startsWith('@') ? formatted : __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].basename(formatted),
1545
+ packageName: formatted.startsWith('@') ? formatted : node_path.basename(formatted),
1537
1546
  targetDir: formatted
1538
1547
  };
1539
1548
  }
@@ -1547,11 +1556,11 @@ function pkgFromUserAgent(userAgent) {
1547
1556
  };
1548
1557
  }
1549
1558
  function isEmptyDir(path) {
1550
- const files = __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].readdirSync(path);
1559
+ const files = node_fs.readdirSync(path);
1551
1560
  return 0 === files.length || 1 === files.length && '.git' === files[0];
1552
1561
  }
1553
1562
  function logHelpMessage(name, templates) {
1554
- logger.log(`
1563
+ src_logger.log(`
1555
1564
  Usage: create-${name} [options]
1556
1565
 
1557
1566
  Options:
@@ -1596,8 +1605,8 @@ async function getTools({ tools, dir, template }) {
1596
1605
  function upperFirst(str) {
1597
1606
  return str.charAt(0).toUpperCase() + str.slice(1);
1598
1607
  }
1599
- const readJSON = async (path)=>JSON.parse(await __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].promises.readFile(path, 'utf-8'));
1600
- const readPackageJson = async (filePath)=>readJSON(__WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(filePath, 'package.json'));
1608
+ const readJSON = async (path)=>JSON.parse(await node_fs.promises.readFile(path, 'utf-8'));
1609
+ const readPackageJson = async (filePath)=>readJSON(node_path.join(filePath, 'package.json'));
1601
1610
  async function create({ name, root, templates, skipFiles, getTemplateName, mapESLintTemplate, version, noteInformation }) {
1602
1611
  const argv = minimist_default()(process.argv.slice(2), {
1603
1612
  alias: {
@@ -1607,7 +1616,7 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
1607
1616
  }
1608
1617
  });
1609
1618
  console.log('');
1610
- logger.greet(`\u{25C6} Create ${upperFirst(name)} Project`);
1619
+ src_logger.greet(`\u{25C6} Create ${upperFirst(name)} Project`);
1611
1620
  if (argv.help) return void logHelpMessage(name, templates);
1612
1621
  const cwd = process.cwd();
1613
1622
  const pkgInfo = pkgFromUserAgent(process.env.npm_config_user_agent);
@@ -1624,8 +1633,8 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
1624
1633
  const formatted = formatProjectName(projectName);
1625
1634
  const { targetDir } = formatted;
1626
1635
  const packageName = argv['package-name'] || formatted.packageName;
1627
- const distFolder = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].isAbsolute(targetDir) ? targetDir : __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(cwd, targetDir);
1628
- if (!argv.override && __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].existsSync(distFolder) && !isEmptyDir(distFolder)) {
1636
+ const distFolder = node_path.isAbsolute(targetDir) ? targetDir : node_path.join(cwd, targetDir);
1637
+ if (!argv.override && node_fs.existsSync(distFolder) && !isEmptyDir(distFolder)) {
1629
1638
  const option = checkCancel(await ve({
1630
1639
  message: `"${targetDir}" is not empty, please choose:`,
1631
1640
  options: [
@@ -1643,9 +1652,9 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
1643
1652
  }
1644
1653
  const templateName = await getTemplateName(argv);
1645
1654
  const tools = await getTools(argv);
1646
- const srcFolder = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(root, `template-${templateName}`);
1647
- const commonFolder = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(root, 'template-common');
1648
- if (!__WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].existsSync(srcFolder)) throw new Error(`Invalid input: template "${templateName}" not found.`);
1655
+ const srcFolder = node_path.join(root, `template-${templateName}`);
1656
+ const commonFolder = node_path.join(root, 'template-common');
1657
+ if (!node_fs.existsSync(srcFolder)) throw new Error(`Invalid input: template "${templateName}" not found.`);
1649
1658
  copyFolder({
1650
1659
  from: commonFolder,
1651
1660
  to: distFolder,
@@ -1659,13 +1668,13 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
1659
1668
  packageName,
1660
1669
  skipFiles
1661
1670
  });
1662
- const packageRoot = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].resolve(src_dirname, '..');
1671
+ const packageRoot = node_path.resolve(src_dirname, '..');
1663
1672
  for (const tool of tools){
1664
- const toolFolder = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(packageRoot, `template-${tool}`);
1673
+ const toolFolder = node_path.join(packageRoot, `template-${tool}`);
1665
1674
  if ('eslint' === tool) {
1666
1675
  const eslintTemplateName = mapESLintTemplate(templateName);
1667
1676
  if (!eslintTemplateName) continue;
1668
- const subFolder = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(toolFolder, eslintTemplateName);
1677
+ const subFolder = node_path.join(toolFolder, eslintTemplateName);
1669
1678
  copyFolder({
1670
1679
  from: subFolder,
1671
1680
  to: distFolder,
@@ -1684,12 +1693,14 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
1684
1693
  });
1685
1694
  if ('biome' === tool) {
1686
1695
  const packageJson = await readPackageJson(distFolder);
1687
- let biomeVersion = packageJson.devDependencies?.['@biomejs/biome'] ?? '1.9.4';
1696
+ let biomeVersion = packageJson.devDependencies?.['@biomejs/biome'] ?? '2.0.0';
1688
1697
  biomeVersion = biomeVersion.replace(/\^/, '');
1689
- const biomeJsonPath = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(distFolder, 'biome.json');
1690
- const biomeJson = await readJSON(biomeJsonPath);
1698
+ const biomeJsonTemplatePath = node_path.join(distFolder, 'biome.json.template');
1699
+ const biomeJsonPath = node_path.join(distFolder, 'biome.json');
1700
+ const biomeJson = await readJSON(biomeJsonTemplatePath);
1691
1701
  biomeJson.$schema = biomeJson.$schema.replace('{version}', biomeVersion);
1692
- await __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].promises.writeFile(biomeJsonPath, `${JSON.stringify(biomeJson, null, 2)}\n`, 'utf-8');
1702
+ await node_fs.promises.writeFile(biomeJsonPath, `${JSON.stringify(biomeJson, null, 2)}\n`, 'utf-8');
1703
+ await node_fs.promises.rm(biomeJsonTemplatePath);
1693
1704
  }
1694
1705
  }
1695
1706
  const nextSteps = noteInformation ? noteInformation : [
@@ -1708,9 +1719,9 @@ function sortObjectKeys(obj) {
1708
1719
  return sortedObj;
1709
1720
  }
1710
1721
  function mergePackageJson(targetPackage, extraPackage) {
1711
- if (!__WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].existsSync(targetPackage)) return;
1712
- const targetJson = JSON.parse(__WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].readFileSync(targetPackage, 'utf-8'));
1713
- const extraJson = JSON.parse(__WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].readFileSync(extraPackage, 'utf-8'));
1722
+ if (!node_fs.existsSync(targetPackage)) return;
1723
+ const targetJson = JSON.parse(node_fs.readFileSync(targetPackage, 'utf-8'));
1724
+ const extraJson = JSON.parse(node_fs.readFileSync(extraPackage, 'utf-8'));
1714
1725
  const mergedJson = cjs_default()(targetJson, extraJson);
1715
1726
  mergedJson.name = targetJson.name || extraJson.name;
1716
1727
  for (const key of [
@@ -1718,7 +1729,7 @@ function mergePackageJson(targetPackage, extraPackage) {
1718
1729
  'dependencies',
1719
1730
  'devDependencies'
1720
1731
  ])if (key in mergedJson) mergedJson[key] = sortObjectKeys(mergedJson[key]);
1721
- __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].writeFileSync(targetPackage, `${JSON.stringify(mergedJson, null, 2)}\n`);
1732
+ node_fs.writeFileSync(targetPackage, `${JSON.stringify(mergedJson, null, 2)}\n`);
1722
1733
  }
1723
1734
  function copyFolder({ from, to, version, packageName, isMergePackageJson, skipFiles = [] }) {
1724
1735
  const renameFiles = {
@@ -1729,14 +1740,14 @@ function copyFolder({ from, to, version, packageName, isMergePackageJson, skipFi
1729
1740
  'dist',
1730
1741
  ...skipFiles
1731
1742
  ];
1732
- __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].mkdirSync(to, {
1743
+ node_fs.mkdirSync(to, {
1733
1744
  recursive: true
1734
1745
  });
1735
- for (const file of __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].readdirSync(from)){
1746
+ for (const file of node_fs.readdirSync(from)){
1736
1747
  if (allSkipFiles.includes(file)) continue;
1737
- const srcFile = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].resolve(from, file);
1738
- const distFile = renameFiles[file] ? __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].resolve(to, renameFiles[file]) : __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].resolve(to, file);
1739
- const stat = __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].statSync(srcFile);
1748
+ const srcFile = node_path.resolve(from, file);
1749
+ const distFile = renameFiles[file] ? node_path.resolve(to, renameFiles[file]) : node_path.resolve(to, file);
1750
+ const stat = node_fs.statSync(srcFile);
1740
1751
  if (stat.isDirectory()) copyFolder({
1741
1752
  from: srcFile,
1742
1753
  to: distFile,
@@ -1744,13 +1755,13 @@ function copyFolder({ from, to, version, packageName, isMergePackageJson, skipFi
1744
1755
  skipFiles
1745
1756
  });
1746
1757
  else if ('package.json' === file) {
1747
- const targetPackage = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].resolve(to, 'package.json');
1748
- if (isMergePackageJson && __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].existsSync(targetPackage)) mergePackageJson(targetPackage, srcFile);
1758
+ const targetPackage = node_path.resolve(to, 'package.json');
1759
+ if (isMergePackageJson && node_fs.existsSync(targetPackage)) mergePackageJson(targetPackage, srcFile);
1749
1760
  else {
1750
- __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].copyFileSync(srcFile, distFile);
1761
+ node_fs.copyFileSync(srcFile, distFile);
1751
1762
  updatePackageJson(distFile, version, packageName);
1752
1763
  }
1753
- } else __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].copyFileSync(srcFile, distFile);
1764
+ } else node_fs.copyFileSync(srcFile, distFile);
1754
1765
  }
1755
1766
  }
1756
1767
  const isStableVersion = (version)=>[
@@ -1761,7 +1772,7 @@ const isStableVersion = (version)=>[
1761
1772
  'nightly'
1762
1773
  ].every((tag)=>!version.includes(tag));
1763
1774
  const updatePackageJson = (pkgJsonPath, version, name)=>{
1764
- let content = __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].readFileSync(pkgJsonPath, 'utf-8');
1775
+ let content = node_fs.readFileSync(pkgJsonPath, 'utf-8');
1765
1776
  if ('string' == typeof version) {
1766
1777
  const targetVersion = isStableVersion(version) ? `^${version}` : version;
1767
1778
  content = content.replace(/workspace:\*/g, targetVersion);
@@ -1772,6 +1783,6 @@ const updatePackageJson = (pkgJsonPath, version, name)=>{
1772
1783
  if (pkg.devDependencies?.[name]) pkg.devDependencies[name] = ver;
1773
1784
  }
1774
1785
  if (name && '.' !== name) pkg.name = name;
1775
- __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].writeFileSync(pkgJsonPath, `${JSON.stringify(pkg, null, 2)}\n`);
1786
+ node_fs.writeFileSync(pkgJsonPath, `${JSON.stringify(pkg, null, 2)}\n`);
1776
1787
  };
1777
1788
  export { checkCancel, copyFolder, create, mergePackageJson, fe as multiselect, ve as select, he as text };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rstack",
3
- "version": "1.4.5",
3
+ "version": "1.5.1",
4
4
  "description": "Create a new Rstack project",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,7 +28,7 @@
28
28
  "lint": "biome check .",
29
29
  "lint:write": "biome check . --write",
30
30
  "prepare": "simple-git-hooks && npm run build",
31
- "test": "node test/index.js",
31
+ "test": "rstest run",
32
32
  "bump": "npx bumpp"
33
33
  },
34
34
  "simple-git-hooks": {
@@ -40,20 +40,21 @@
40
40
  ]
41
41
  },
42
42
  "devDependencies": {
43
- "@biomejs/biome": "^1.9.4",
44
- "@clack/prompts": "^0.10.1",
45
- "@microsoft/api-extractor": "^7.52.6",
46
- "@rslib/core": "0.6.8",
43
+ "@biomejs/biome": "2.0.0",
44
+ "@clack/prompts": "^0.11.0",
45
+ "@microsoft/api-extractor": "^7.52.8",
46
+ "@rslib/core": "0.10.1",
47
+ "@rstest/core": "0.0.1",
47
48
  "@types/minimist": "^1.2.5",
48
- "@types/node": "22.15.3",
49
+ "@types/node": "22.15.32",
49
50
  "deepmerge": "^4.3.1",
50
51
  "minimist": "^1.2.8",
51
52
  "picocolors": "^1.1.1",
52
- "rslog": "^1.2.3",
53
+ "rslog": "^1.2.7",
53
54
  "simple-git-hooks": "^2.13.0",
54
55
  "typescript": "^5.8.3"
55
56
  },
56
- "packageManager": "pnpm@10.10.0",
57
+ "packageManager": "pnpm@10.12.1",
57
58
  "publishConfig": {
58
59
  "access": "public",
59
60
  "provenance": true,
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "$schema": "https://biomejs.dev/schemas/{version}/schema.json",
3
- "organizeImports": {
4
- "enabled": true
3
+ "assist": {
4
+ "actions": {
5
+ "source": {
6
+ "organizeImports": "on"
7
+ }
8
+ }
5
9
  },
6
10
  "vcs": {
7
11
  "enabled": true,
@@ -7,6 +7,6 @@
7
7
  "format": "biome format --write"
8
8
  },
9
9
  "devDependencies": {
10
- "@biomejs/biome": "^1.9.4"
10
+ "@biomejs/biome": "2.0.0"
11
11
  }
12
12
  }
@@ -1,8 +1,8 @@
1
1
  import { fixupConfigRules } from '@eslint/compat';
2
2
  import js from '@eslint/js';
3
- import reactHooks from 'eslint-plugin-react-hooks';
4
3
  import reactJsx from 'eslint-plugin-react/configs/jsx-runtime.js';
5
4
  import react from 'eslint-plugin-react/configs/recommended.js';
5
+ import reactHooks from 'eslint-plugin-react-hooks';
6
6
  import globals from 'globals';
7
7
 
8
8
  export default [
@@ -6,11 +6,11 @@
6
6
  "lint": "eslint ."
7
7
  },
8
8
  "devDependencies": {
9
- "@eslint/compat": "^1.2.8",
10
- "@eslint/js": "^9.25.1",
11
- "eslint": "^9.25.1",
9
+ "@eslint/compat": "^1.3.0",
10
+ "@eslint/js": "^9.29.0",
11
+ "eslint": "^9.29.0",
12
12
  "eslint-plugin-react": "^7.37.5",
13
13
  "eslint-plugin-react-hooks": "^5.2.0",
14
- "globals": "^16.0.0"
14
+ "globals": "^16.2.0"
15
15
  }
16
16
  }
@@ -1,8 +1,8 @@
1
1
  import { fixupConfigRules } from '@eslint/compat';
2
2
  import js from '@eslint/js';
3
- import reactHooks from 'eslint-plugin-react-hooks';
4
3
  import reactJsx from 'eslint-plugin-react/configs/jsx-runtime.js';
5
4
  import react from 'eslint-plugin-react/configs/recommended.js';
5
+ import reactHooks from 'eslint-plugin-react-hooks';
6
6
  import globals from 'globals';
7
7
  import ts from 'typescript-eslint';
8
8
 
@@ -6,12 +6,12 @@
6
6
  "lint": "eslint ."
7
7
  },
8
8
  "devDependencies": {
9
- "@eslint/compat": "^1.2.8",
10
- "@eslint/js": "^9.25.1",
11
- "eslint": "^9.25.1",
9
+ "@eslint/compat": "^1.3.0",
10
+ "@eslint/js": "^9.29.0",
11
+ "eslint": "^9.29.0",
12
12
  "eslint-plugin-react": "^7.37.5",
13
13
  "eslint-plugin-react-hooks": "^5.2.0",
14
- "globals": "^16.0.0",
15
- "typescript-eslint": "^8.31.1"
14
+ "globals": "^16.2.0",
15
+ "typescript-eslint": "^8.34.1"
16
16
  }
17
17
  }
@@ -6,9 +6,9 @@
6
6
  "lint": "eslint ."
7
7
  },
8
8
  "devDependencies": {
9
- "@eslint/js": "^9.25.1",
10
- "eslint": "^9.25.1",
11
- "eslint-plugin-svelte": "^3.5.1",
12
- "globals": "^16.0.0"
9
+ "@eslint/js": "^9.29.0",
10
+ "eslint": "^9.29.0",
11
+ "eslint-plugin-svelte": "^3.9.2",
12
+ "globals": "^16.2.0"
13
13
  }
14
14
  }
@@ -6,11 +6,11 @@
6
6
  "lint": "eslint ."
7
7
  },
8
8
  "devDependencies": {
9
- "@eslint/js": "^9.25.1",
10
- "eslint": "^9.25.1",
11
- "eslint-plugin-svelte": "^3.5.1",
12
- "globals": "^16.0.0",
13
- "typescript-eslint": "^8.31.1"
9
+ "@eslint/js": "^9.29.0",
10
+ "eslint": "^9.29.0",
11
+ "eslint-plugin-svelte": "^3.9.2",
12
+ "globals": "^16.2.0",
13
+ "typescript-eslint": "^8.34.1"
14
14
  },
15
15
  "type": "module"
16
16
  }
@@ -6,8 +6,8 @@
6
6
  "lint": "eslint ."
7
7
  },
8
8
  "devDependencies": {
9
- "@eslint/js": "^9.25.1",
10
- "eslint": "^9.25.1",
11
- "globals": "^16.0.0"
9
+ "@eslint/js": "^9.29.0",
10
+ "eslint": "^9.29.0",
11
+ "globals": "^16.2.0"
12
12
  }
13
13
  }
@@ -6,9 +6,9 @@
6
6
  "lint": "eslint ."
7
7
  },
8
8
  "devDependencies": {
9
- "@eslint/js": "^9.25.1",
10
- "eslint": "^9.25.1",
11
- "globals": "^16.0.0",
12
- "typescript-eslint": "^8.31.1"
9
+ "@eslint/js": "^9.29.0",
10
+ "eslint": "^9.29.0",
11
+ "globals": "^16.2.0",
12
+ "typescript-eslint": "^8.34.1"
13
13
  }
14
14
  }
@@ -1,6 +1,6 @@
1
1
  import js from '@eslint/js';
2
- import pluginVue from 'eslint-plugin-vue';
3
2
  import { defineConfig, globalIgnores } from 'eslint/config';
3
+ import pluginVue from 'eslint-plugin-vue';
4
4
  import globals from 'globals';
5
5
 
6
6
  export default defineConfig([
@@ -6,9 +6,9 @@
6
6
  "lint": "eslint ."
7
7
  },
8
8
  "devDependencies": {
9
- "@eslint/js": "^9.25.1",
10
- "eslint": "^9.25.1",
11
- "eslint-plugin-vue": "^10.1.0",
12
- "globals": "^16.0.0"
9
+ "@eslint/js": "^9.29.0",
10
+ "eslint": "^9.29.0",
11
+ "eslint-plugin-vue": "^10.2.0",
12
+ "globals": "^16.2.0"
13
13
  }
14
14
  }
@@ -2,8 +2,8 @@ import {
2
2
  defineConfigWithVueTs,
3
3
  vueTsConfigs,
4
4
  } from '@vue/eslint-config-typescript';
5
- import pluginVue from 'eslint-plugin-vue';
6
5
  import { globalIgnores } from 'eslint/config';
6
+ import pluginVue from 'eslint-plugin-vue';
7
7
  import globals from 'globals';
8
8
 
9
9
  // To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
@@ -6,10 +6,10 @@
6
6
  "lint": "eslint ."
7
7
  },
8
8
  "devDependencies": {
9
- "@vue/eslint-config-typescript": "^14.5.0",
10
- "eslint": "^9.25.1",
11
- "eslint-plugin-vue": "^10.1.0",
12
- "globals": "^16.0.0",
13
- "typescript-eslint": "^8.31.1"
9
+ "@vue/eslint-config-typescript": "^14.5.1",
10
+ "eslint": "^9.29.0",
11
+ "eslint-plugin-vue": "^10.2.0",
12
+ "globals": "^16.2.0",
13
+ "typescript-eslint": "^8.34.1"
14
14
  }
15
15
  }