@exem-ui/migration 0.1.0-next.20260309055529
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/LICENSE +190 -0
- package/README.md +87 -0
- package/dist/index.js +1363 -0
- package/dist/index.js.map +1 -0
- package/package.json +40 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1363 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
|
|
28
|
+
// ../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
29
|
+
var require_src = __commonJS({
|
|
30
|
+
"../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports, module) {
|
|
31
|
+
"use strict";
|
|
32
|
+
var ESC = "\x1B";
|
|
33
|
+
var CSI = `${ESC}[`;
|
|
34
|
+
var beep = "\x07";
|
|
35
|
+
var cursor = {
|
|
36
|
+
to(x2, y3) {
|
|
37
|
+
if (!y3) return `${CSI}${x2 + 1}G`;
|
|
38
|
+
return `${CSI}${y3 + 1};${x2 + 1}H`;
|
|
39
|
+
},
|
|
40
|
+
move(x2, y3) {
|
|
41
|
+
let ret = "";
|
|
42
|
+
if (x2 < 0) ret += `${CSI}${-x2}D`;
|
|
43
|
+
else if (x2 > 0) ret += `${CSI}${x2}C`;
|
|
44
|
+
if (y3 < 0) ret += `${CSI}${-y3}A`;
|
|
45
|
+
else if (y3 > 0) ret += `${CSI}${y3}B`;
|
|
46
|
+
return ret;
|
|
47
|
+
},
|
|
48
|
+
up: (count = 1) => `${CSI}${count}A`,
|
|
49
|
+
down: (count = 1) => `${CSI}${count}B`,
|
|
50
|
+
forward: (count = 1) => `${CSI}${count}C`,
|
|
51
|
+
backward: (count = 1) => `${CSI}${count}D`,
|
|
52
|
+
nextLine: (count = 1) => `${CSI}E`.repeat(count),
|
|
53
|
+
prevLine: (count = 1) => `${CSI}F`.repeat(count),
|
|
54
|
+
left: `${CSI}G`,
|
|
55
|
+
hide: `${CSI}?25l`,
|
|
56
|
+
show: `${CSI}?25h`,
|
|
57
|
+
save: `${ESC}7`,
|
|
58
|
+
restore: `${ESC}8`
|
|
59
|
+
};
|
|
60
|
+
var scroll = {
|
|
61
|
+
up: (count = 1) => `${CSI}S`.repeat(count),
|
|
62
|
+
down: (count = 1) => `${CSI}T`.repeat(count)
|
|
63
|
+
};
|
|
64
|
+
var erase = {
|
|
65
|
+
screen: `${CSI}2J`,
|
|
66
|
+
up: (count = 1) => `${CSI}1J`.repeat(count),
|
|
67
|
+
down: (count = 1) => `${CSI}J`.repeat(count),
|
|
68
|
+
line: `${CSI}2K`,
|
|
69
|
+
lineEnd: `${CSI}K`,
|
|
70
|
+
lineStart: `${CSI}1K`,
|
|
71
|
+
lines(count) {
|
|
72
|
+
let clear = "";
|
|
73
|
+
for (let i = 0; i < count; i++)
|
|
74
|
+
clear += this.line + (i < count - 1 ? cursor.up() : "");
|
|
75
|
+
if (count)
|
|
76
|
+
clear += cursor.left;
|
|
77
|
+
return clear;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
module.exports = { cursor, scroll, erase, beep };
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
// ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
85
|
+
var require_picocolors = __commonJS({
|
|
86
|
+
"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) {
|
|
87
|
+
"use strict";
|
|
88
|
+
var p2 = process || {};
|
|
89
|
+
var argv = p2.argv || [];
|
|
90
|
+
var env = p2.env || {};
|
|
91
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p2.platform === "win32" || (p2.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
92
|
+
var formatter = (open, close, replace = open) => (input) => {
|
|
93
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
94
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
95
|
+
};
|
|
96
|
+
var replaceClose = (string, close, replace, index) => {
|
|
97
|
+
let result = "", cursor = 0;
|
|
98
|
+
do {
|
|
99
|
+
result += string.substring(cursor, index) + replace;
|
|
100
|
+
cursor = index + close.length;
|
|
101
|
+
index = string.indexOf(close, cursor);
|
|
102
|
+
} while (~index);
|
|
103
|
+
return result + string.substring(cursor);
|
|
104
|
+
};
|
|
105
|
+
var createColors = (enabled = isColorSupported) => {
|
|
106
|
+
let f = enabled ? formatter : () => String;
|
|
107
|
+
return {
|
|
108
|
+
isColorSupported: enabled,
|
|
109
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
110
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
111
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
112
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
113
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
114
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
115
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
116
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
117
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
118
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
119
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
120
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
121
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
122
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
123
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
124
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
125
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
126
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
127
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
128
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
129
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
130
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
131
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
132
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
133
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
134
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
135
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
136
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
137
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
138
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
139
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
140
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
141
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
142
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
143
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
144
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
145
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
146
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
147
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
148
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
149
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
module.exports = createColors();
|
|
153
|
+
module.exports.createColors = createColors;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
// src/index.ts
|
|
158
|
+
import { existsSync } from "fs";
|
|
159
|
+
import { resolve } from "path";
|
|
160
|
+
|
|
161
|
+
// ../../node_modules/.pnpm/@clack+prompts@0.10.1/node_modules/@clack/prompts/dist/index.mjs
|
|
162
|
+
import { stripVTControlCharacters as S2 } from "util";
|
|
163
|
+
|
|
164
|
+
// ../../node_modules/.pnpm/@clack+core@0.4.2/node_modules/@clack/core/dist/index.mjs
|
|
165
|
+
var import_sisteransi = __toESM(require_src(), 1);
|
|
166
|
+
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
167
|
+
import { stdin as j, stdout as M } from "process";
|
|
168
|
+
import * as g from "readline";
|
|
169
|
+
import O from "readline";
|
|
170
|
+
import { Writable as X } from "stream";
|
|
171
|
+
function DD({ onlyFirst: e2 = false } = {}) {
|
|
172
|
+
const t = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
173
|
+
return new RegExp(t, e2 ? void 0 : "g");
|
|
174
|
+
}
|
|
175
|
+
var uD = DD();
|
|
176
|
+
function P(e2) {
|
|
177
|
+
if (typeof e2 != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof e2}\``);
|
|
178
|
+
return e2.replace(uD, "");
|
|
179
|
+
}
|
|
180
|
+
function L(e2) {
|
|
181
|
+
return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
|
|
182
|
+
}
|
|
183
|
+
var W = { exports: {} };
|
|
184
|
+
(function(e2) {
|
|
185
|
+
var u2 = {};
|
|
186
|
+
e2.exports = u2, u2.eastAsianWidth = function(F2) {
|
|
187
|
+
var s = F2.charCodeAt(0), i = F2.length == 2 ? F2.charCodeAt(1) : 0, D2 = s;
|
|
188
|
+
return 55296 <= s && s <= 56319 && 56320 <= i && i <= 57343 && (s &= 1023, i &= 1023, D2 = s << 10 | i, D2 += 65536), D2 == 12288 || 65281 <= D2 && D2 <= 65376 || 65504 <= D2 && D2 <= 65510 ? "F" : D2 == 8361 || 65377 <= D2 && D2 <= 65470 || 65474 <= D2 && D2 <= 65479 || 65482 <= D2 && D2 <= 65487 || 65490 <= D2 && D2 <= 65495 || 65498 <= D2 && D2 <= 65500 || 65512 <= D2 && D2 <= 65518 ? "H" : 4352 <= D2 && D2 <= 4447 || 4515 <= D2 && D2 <= 4519 || 4602 <= D2 && D2 <= 4607 || 9001 <= D2 && D2 <= 9002 || 11904 <= D2 && D2 <= 11929 || 11931 <= D2 && D2 <= 12019 || 12032 <= D2 && D2 <= 12245 || 12272 <= D2 && D2 <= 12283 || 12289 <= D2 && D2 <= 12350 || 12353 <= D2 && D2 <= 12438 || 12441 <= D2 && D2 <= 12543 || 12549 <= D2 && D2 <= 12589 || 12593 <= D2 && D2 <= 12686 || 12688 <= D2 && D2 <= 12730 || 12736 <= D2 && D2 <= 12771 || 12784 <= D2 && D2 <= 12830 || 12832 <= D2 && D2 <= 12871 || 12880 <= D2 && D2 <= 13054 || 13056 <= D2 && D2 <= 19903 || 19968 <= D2 && D2 <= 42124 || 42128 <= D2 && D2 <= 42182 || 43360 <= D2 && D2 <= 43388 || 44032 <= D2 && D2 <= 55203 || 55216 <= D2 && D2 <= 55238 || 55243 <= D2 && D2 <= 55291 || 63744 <= D2 && D2 <= 64255 || 65040 <= D2 && D2 <= 65049 || 65072 <= D2 && D2 <= 65106 || 65108 <= D2 && D2 <= 65126 || 65128 <= D2 && D2 <= 65131 || 110592 <= D2 && D2 <= 110593 || 127488 <= D2 && D2 <= 127490 || 127504 <= D2 && D2 <= 127546 || 127552 <= D2 && D2 <= 127560 || 127568 <= D2 && D2 <= 127569 || 131072 <= D2 && D2 <= 194367 || 177984 <= D2 && D2 <= 196605 || 196608 <= D2 && D2 <= 262141 ? "W" : 32 <= D2 && D2 <= 126 || 162 <= D2 && D2 <= 163 || 165 <= D2 && D2 <= 166 || D2 == 172 || D2 == 175 || 10214 <= D2 && D2 <= 10221 || 10629 <= D2 && D2 <= 10630 ? "Na" : D2 == 161 || D2 == 164 || 167 <= D2 && D2 <= 168 || D2 == 170 || 173 <= D2 && D2 <= 174 || 176 <= D2 && D2 <= 180 || 182 <= D2 && D2 <= 186 || 188 <= D2 && D2 <= 191 || D2 == 198 || D2 == 208 || 215 <= D2 && D2 <= 216 || 222 <= D2 && D2 <= 225 || D2 == 230 || 232 <= D2 && D2 <= 234 || 236 <= D2 && D2 <= 237 || D2 == 240 || 242 <= D2 && D2 <= 243 || 247 <= D2 && D2 <= 250 || D2 == 252 || D2 == 254 || D2 == 257 || D2 == 273 || D2 == 275 || D2 == 283 || 294 <= D2 && D2 <= 295 || D2 == 299 || 305 <= D2 && D2 <= 307 || D2 == 312 || 319 <= D2 && D2 <= 322 || D2 == 324 || 328 <= D2 && D2 <= 331 || D2 == 333 || 338 <= D2 && D2 <= 339 || 358 <= D2 && D2 <= 359 || D2 == 363 || D2 == 462 || D2 == 464 || D2 == 466 || D2 == 468 || D2 == 470 || D2 == 472 || D2 == 474 || D2 == 476 || D2 == 593 || D2 == 609 || D2 == 708 || D2 == 711 || 713 <= D2 && D2 <= 715 || D2 == 717 || D2 == 720 || 728 <= D2 && D2 <= 731 || D2 == 733 || D2 == 735 || 768 <= D2 && D2 <= 879 || 913 <= D2 && D2 <= 929 || 931 <= D2 && D2 <= 937 || 945 <= D2 && D2 <= 961 || 963 <= D2 && D2 <= 969 || D2 == 1025 || 1040 <= D2 && D2 <= 1103 || D2 == 1105 || D2 == 8208 || 8211 <= D2 && D2 <= 8214 || 8216 <= D2 && D2 <= 8217 || 8220 <= D2 && D2 <= 8221 || 8224 <= D2 && D2 <= 8226 || 8228 <= D2 && D2 <= 8231 || D2 == 8240 || 8242 <= D2 && D2 <= 8243 || D2 == 8245 || D2 == 8251 || D2 == 8254 || D2 == 8308 || D2 == 8319 || 8321 <= D2 && D2 <= 8324 || D2 == 8364 || D2 == 8451 || D2 == 8453 || D2 == 8457 || D2 == 8467 || D2 == 8470 || 8481 <= D2 && D2 <= 8482 || D2 == 8486 || D2 == 8491 || 8531 <= D2 && D2 <= 8532 || 8539 <= D2 && D2 <= 8542 || 8544 <= D2 && D2 <= 8555 || 8560 <= D2 && D2 <= 8569 || D2 == 8585 || 8592 <= D2 && D2 <= 8601 || 8632 <= D2 && D2 <= 8633 || D2 == 8658 || D2 == 8660 || D2 == 8679 || D2 == 8704 || 8706 <= D2 && D2 <= 8707 || 8711 <= D2 && D2 <= 8712 || D2 == 8715 || D2 == 8719 || D2 == 8721 || D2 == 8725 || D2 == 8730 || 8733 <= D2 && D2 <= 8736 || D2 == 8739 || D2 == 8741 || 8743 <= D2 && D2 <= 8748 || D2 == 8750 || 8756 <= D2 && D2 <= 8759 || 8764 <= D2 && D2 <= 8765 || D2 == 8776 || D2 == 8780 || D2 == 8786 || 8800 <= D2 && D2 <= 8801 || 8804 <= D2 && D2 <= 8807 || 8810 <= D2 && D2 <= 8811 || 8814 <= D2 && D2 <= 8815 || 8834 <= D2 && D2 <= 8835 || 8838 <= D2 && D2 <= 8839 || D2 == 8853 || D2 == 8857 || D2 == 8869 || D2 == 8895 || D2 == 8978 || 9312 <= D2 && D2 <= 9449 || 9451 <= D2 && D2 <= 9547 || 9552 <= D2 && D2 <= 9587 || 9600 <= D2 && D2 <= 9615 || 9618 <= D2 && D2 <= 9621 || 9632 <= D2 && D2 <= 9633 || 9635 <= D2 && D2 <= 9641 || 9650 <= D2 && D2 <= 9651 || 9654 <= D2 && D2 <= 9655 || 9660 <= D2 && D2 <= 9661 || 9664 <= D2 && D2 <= 9665 || 9670 <= D2 && D2 <= 9672 || D2 == 9675 || 9678 <= D2 && D2 <= 9681 || 9698 <= D2 && D2 <= 9701 || D2 == 9711 || 9733 <= D2 && D2 <= 9734 || D2 == 9737 || 9742 <= D2 && D2 <= 9743 || 9748 <= D2 && D2 <= 9749 || D2 == 9756 || D2 == 9758 || D2 == 9792 || D2 == 9794 || 9824 <= D2 && D2 <= 9825 || 9827 <= D2 && D2 <= 9829 || 9831 <= D2 && D2 <= 9834 || 9836 <= D2 && D2 <= 9837 || D2 == 9839 || 9886 <= D2 && D2 <= 9887 || 9918 <= D2 && D2 <= 9919 || 9924 <= D2 && D2 <= 9933 || 9935 <= D2 && D2 <= 9953 || D2 == 9955 || 9960 <= D2 && D2 <= 9983 || D2 == 10045 || D2 == 10071 || 10102 <= D2 && D2 <= 10111 || 11093 <= D2 && D2 <= 11097 || 12872 <= D2 && D2 <= 12879 || 57344 <= D2 && D2 <= 63743 || 65024 <= D2 && D2 <= 65039 || D2 == 65533 || 127232 <= D2 && D2 <= 127242 || 127248 <= D2 && D2 <= 127277 || 127280 <= D2 && D2 <= 127337 || 127344 <= D2 && D2 <= 127386 || 917760 <= D2 && D2 <= 917999 || 983040 <= D2 && D2 <= 1048573 || 1048576 <= D2 && D2 <= 1114109 ? "A" : "N";
|
|
189
|
+
}, u2.characterLength = function(F2) {
|
|
190
|
+
var s = this.eastAsianWidth(F2);
|
|
191
|
+
return s == "F" || s == "W" || s == "A" ? 2 : 1;
|
|
192
|
+
};
|
|
193
|
+
function t(F2) {
|
|
194
|
+
return F2.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
|
|
195
|
+
}
|
|
196
|
+
u2.length = function(F2) {
|
|
197
|
+
for (var s = t(F2), i = 0, D2 = 0; D2 < s.length; D2++) i = i + this.characterLength(s[D2]);
|
|
198
|
+
return i;
|
|
199
|
+
}, u2.slice = function(F2, s, i) {
|
|
200
|
+
textLen = u2.length(F2), s = s || 0, i = i || 1, s < 0 && (s = textLen + s), i < 0 && (i = textLen + i);
|
|
201
|
+
for (var D2 = "", r = 0, n = t(F2), E = 0; E < n.length; E++) {
|
|
202
|
+
var a = n[E], o2 = u2.length(a);
|
|
203
|
+
if (r >= s - (o2 == 2 ? 1 : 0)) if (r + o2 <= i) D2 += a;
|
|
204
|
+
else break;
|
|
205
|
+
r += o2;
|
|
206
|
+
}
|
|
207
|
+
return D2;
|
|
208
|
+
};
|
|
209
|
+
})(W);
|
|
210
|
+
var tD = W.exports;
|
|
211
|
+
var eD = L(tD);
|
|
212
|
+
var FD = function() {
|
|
213
|
+
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
214
|
+
};
|
|
215
|
+
var sD = L(FD);
|
|
216
|
+
function p(e2, u2 = {}) {
|
|
217
|
+
if (typeof e2 != "string" || e2.length === 0 || (u2 = { ambiguousIsNarrow: true, ...u2 }, e2 = P(e2), e2.length === 0)) return 0;
|
|
218
|
+
e2 = e2.replace(sD(), " ");
|
|
219
|
+
const t = u2.ambiguousIsNarrow ? 1 : 2;
|
|
220
|
+
let F2 = 0;
|
|
221
|
+
for (const s of e2) {
|
|
222
|
+
const i = s.codePointAt(0);
|
|
223
|
+
if (i <= 31 || i >= 127 && i <= 159 || i >= 768 && i <= 879) continue;
|
|
224
|
+
switch (eD.eastAsianWidth(s)) {
|
|
225
|
+
case "F":
|
|
226
|
+
case "W":
|
|
227
|
+
F2 += 2;
|
|
228
|
+
break;
|
|
229
|
+
case "A":
|
|
230
|
+
F2 += t;
|
|
231
|
+
break;
|
|
232
|
+
default:
|
|
233
|
+
F2 += 1;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
return F2;
|
|
237
|
+
}
|
|
238
|
+
var w = 10;
|
|
239
|
+
var N = (e2 = 0) => (u2) => `\x1B[${u2 + e2}m`;
|
|
240
|
+
var I = (e2 = 0) => (u2) => `\x1B[${38 + e2};5;${u2}m`;
|
|
241
|
+
var R = (e2 = 0) => (u2, t, F2) => `\x1B[${38 + e2};2;${u2};${t};${F2}m`;
|
|
242
|
+
var C = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
|
|
243
|
+
Object.keys(C.modifier);
|
|
244
|
+
var iD = Object.keys(C.color);
|
|
245
|
+
var rD = Object.keys(C.bgColor);
|
|
246
|
+
[...iD, ...rD];
|
|
247
|
+
function CD() {
|
|
248
|
+
const e2 = /* @__PURE__ */ new Map();
|
|
249
|
+
for (const [u2, t] of Object.entries(C)) {
|
|
250
|
+
for (const [F2, s] of Object.entries(t)) C[F2] = { open: `\x1B[${s[0]}m`, close: `\x1B[${s[1]}m` }, t[F2] = C[F2], e2.set(s[0], s[1]);
|
|
251
|
+
Object.defineProperty(C, u2, { value: t, enumerable: false });
|
|
252
|
+
}
|
|
253
|
+
return Object.defineProperty(C, "codes", { value: e2, enumerable: false }), C.color.close = "\x1B[39m", C.bgColor.close = "\x1B[49m", C.color.ansi = N(), C.color.ansi256 = I(), C.color.ansi16m = R(), C.bgColor.ansi = N(w), C.bgColor.ansi256 = I(w), C.bgColor.ansi16m = R(w), Object.defineProperties(C, { rgbToAnsi256: { value: (u2, t, F2) => u2 === t && t === F2 ? u2 < 8 ? 16 : u2 > 248 ? 231 : Math.round((u2 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u2 / 255 * 5) + 6 * Math.round(t / 255 * 5) + Math.round(F2 / 255 * 5), enumerable: false }, hexToRgb: { value: (u2) => {
|
|
254
|
+
const t = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u2.toString(16));
|
|
255
|
+
if (!t) return [0, 0, 0];
|
|
256
|
+
let [F2] = t;
|
|
257
|
+
F2.length === 3 && (F2 = [...F2].map((i) => i + i).join(""));
|
|
258
|
+
const s = Number.parseInt(F2, 16);
|
|
259
|
+
return [s >> 16 & 255, s >> 8 & 255, s & 255];
|
|
260
|
+
}, enumerable: false }, hexToAnsi256: { value: (u2) => C.rgbToAnsi256(...C.hexToRgb(u2)), enumerable: false }, ansi256ToAnsi: { value: (u2) => {
|
|
261
|
+
if (u2 < 8) return 30 + u2;
|
|
262
|
+
if (u2 < 16) return 90 + (u2 - 8);
|
|
263
|
+
let t, F2, s;
|
|
264
|
+
if (u2 >= 232) t = ((u2 - 232) * 10 + 8) / 255, F2 = t, s = t;
|
|
265
|
+
else {
|
|
266
|
+
u2 -= 16;
|
|
267
|
+
const r = u2 % 36;
|
|
268
|
+
t = Math.floor(u2 / 36) / 5, F2 = Math.floor(r / 6) / 5, s = r % 6 / 5;
|
|
269
|
+
}
|
|
270
|
+
const i = Math.max(t, F2, s) * 2;
|
|
271
|
+
if (i === 0) return 30;
|
|
272
|
+
let D2 = 30 + (Math.round(s) << 2 | Math.round(F2) << 1 | Math.round(t));
|
|
273
|
+
return i === 2 && (D2 += 60), D2;
|
|
274
|
+
}, enumerable: false }, rgbToAnsi: { value: (u2, t, F2) => C.ansi256ToAnsi(C.rgbToAnsi256(u2, t, F2)), enumerable: false }, hexToAnsi: { value: (u2) => C.ansi256ToAnsi(C.hexToAnsi256(u2)), enumerable: false } }), C;
|
|
275
|
+
}
|
|
276
|
+
var ED = CD();
|
|
277
|
+
var d = /* @__PURE__ */ new Set(["\x1B", "\x9B"]);
|
|
278
|
+
var oD = 39;
|
|
279
|
+
var y = "\x07";
|
|
280
|
+
var V = "[";
|
|
281
|
+
var nD = "]";
|
|
282
|
+
var G = "m";
|
|
283
|
+
var _ = `${nD}8;;`;
|
|
284
|
+
var z = (e2) => `${d.values().next().value}${V}${e2}${G}`;
|
|
285
|
+
var K = (e2) => `${d.values().next().value}${_}${e2}${y}`;
|
|
286
|
+
var aD = (e2) => e2.split(" ").map((u2) => p(u2));
|
|
287
|
+
var k = (e2, u2, t) => {
|
|
288
|
+
const F2 = [...u2];
|
|
289
|
+
let s = false, i = false, D2 = p(P(e2[e2.length - 1]));
|
|
290
|
+
for (const [r, n] of F2.entries()) {
|
|
291
|
+
const E = p(n);
|
|
292
|
+
if (D2 + E <= t ? e2[e2.length - 1] += n : (e2.push(n), D2 = 0), d.has(n) && (s = true, i = F2.slice(r + 1).join("").startsWith(_)), s) {
|
|
293
|
+
i ? n === y && (s = false, i = false) : n === G && (s = false);
|
|
294
|
+
continue;
|
|
295
|
+
}
|
|
296
|
+
D2 += E, D2 === t && r < F2.length - 1 && (e2.push(""), D2 = 0);
|
|
297
|
+
}
|
|
298
|
+
!D2 && e2[e2.length - 1].length > 0 && e2.length > 1 && (e2[e2.length - 2] += e2.pop());
|
|
299
|
+
};
|
|
300
|
+
var hD = (e2) => {
|
|
301
|
+
const u2 = e2.split(" ");
|
|
302
|
+
let t = u2.length;
|
|
303
|
+
for (; t > 0 && !(p(u2[t - 1]) > 0); ) t--;
|
|
304
|
+
return t === u2.length ? e2 : u2.slice(0, t).join(" ") + u2.slice(t).join("");
|
|
305
|
+
};
|
|
306
|
+
var lD = (e2, u2, t = {}) => {
|
|
307
|
+
if (t.trim !== false && e2.trim() === "") return "";
|
|
308
|
+
let F2 = "", s, i;
|
|
309
|
+
const D2 = aD(e2);
|
|
310
|
+
let r = [""];
|
|
311
|
+
for (const [E, a] of e2.split(" ").entries()) {
|
|
312
|
+
t.trim !== false && (r[r.length - 1] = r[r.length - 1].trimStart());
|
|
313
|
+
let o2 = p(r[r.length - 1]);
|
|
314
|
+
if (E !== 0 && (o2 >= u2 && (t.wordWrap === false || t.trim === false) && (r.push(""), o2 = 0), (o2 > 0 || t.trim === false) && (r[r.length - 1] += " ", o2++)), t.hard && D2[E] > u2) {
|
|
315
|
+
const c = u2 - o2, f = 1 + Math.floor((D2[E] - c - 1) / u2);
|
|
316
|
+
Math.floor((D2[E] - 1) / u2) < f && r.push(""), k(r, a, u2);
|
|
317
|
+
continue;
|
|
318
|
+
}
|
|
319
|
+
if (o2 + D2[E] > u2 && o2 > 0 && D2[E] > 0) {
|
|
320
|
+
if (t.wordWrap === false && o2 < u2) {
|
|
321
|
+
k(r, a, u2);
|
|
322
|
+
continue;
|
|
323
|
+
}
|
|
324
|
+
r.push("");
|
|
325
|
+
}
|
|
326
|
+
if (o2 + D2[E] > u2 && t.wordWrap === false) {
|
|
327
|
+
k(r, a, u2);
|
|
328
|
+
continue;
|
|
329
|
+
}
|
|
330
|
+
r[r.length - 1] += a;
|
|
331
|
+
}
|
|
332
|
+
t.trim !== false && (r = r.map((E) => hD(E)));
|
|
333
|
+
const n = [...r.join(`
|
|
334
|
+
`)];
|
|
335
|
+
for (const [E, a] of n.entries()) {
|
|
336
|
+
if (F2 += a, d.has(a)) {
|
|
337
|
+
const { groups: c } = new RegExp(`(?:\\${V}(?<code>\\d+)m|\\${_}(?<uri>.*)${y})`).exec(n.slice(E).join("")) || { groups: {} };
|
|
338
|
+
if (c.code !== void 0) {
|
|
339
|
+
const f = Number.parseFloat(c.code);
|
|
340
|
+
s = f === oD ? void 0 : f;
|
|
341
|
+
} else c.uri !== void 0 && (i = c.uri.length === 0 ? void 0 : c.uri);
|
|
342
|
+
}
|
|
343
|
+
const o2 = ED.codes.get(Number(s));
|
|
344
|
+
n[E + 1] === `
|
|
345
|
+
` ? (i && (F2 += K("")), s && o2 && (F2 += z(o2))) : a === `
|
|
346
|
+
` && (s && o2 && (F2 += z(s)), i && (F2 += K(i)));
|
|
347
|
+
}
|
|
348
|
+
return F2;
|
|
349
|
+
};
|
|
350
|
+
function Y(e2, u2, t) {
|
|
351
|
+
return String(e2).normalize().replace(/\r\n/g, `
|
|
352
|
+
`).split(`
|
|
353
|
+
`).map((F2) => lD(F2, u2, t)).join(`
|
|
354
|
+
`);
|
|
355
|
+
}
|
|
356
|
+
var xD = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
357
|
+
var B = { actions: new Set(xD), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]) };
|
|
358
|
+
function $(e2, u2) {
|
|
359
|
+
if (typeof e2 == "string") return B.aliases.get(e2) === u2;
|
|
360
|
+
for (const t of e2) if (t !== void 0 && $(t, u2)) return true;
|
|
361
|
+
return false;
|
|
362
|
+
}
|
|
363
|
+
function BD(e2, u2) {
|
|
364
|
+
if (e2 === u2) return;
|
|
365
|
+
const t = e2.split(`
|
|
366
|
+
`), F2 = u2.split(`
|
|
367
|
+
`), s = [];
|
|
368
|
+
for (let i = 0; i < Math.max(t.length, F2.length); i++) t[i] !== F2[i] && s.push(i);
|
|
369
|
+
return s;
|
|
370
|
+
}
|
|
371
|
+
var AD = globalThis.process.platform.startsWith("win");
|
|
372
|
+
var S = Symbol("clack:cancel");
|
|
373
|
+
function pD(e2) {
|
|
374
|
+
return e2 === S;
|
|
375
|
+
}
|
|
376
|
+
function m(e2, u2) {
|
|
377
|
+
const t = e2;
|
|
378
|
+
t.isTTY && t.setRawMode(u2);
|
|
379
|
+
}
|
|
380
|
+
var gD = Object.defineProperty;
|
|
381
|
+
var vD = (e2, u2, t) => u2 in e2 ? gD(e2, u2, { enumerable: true, configurable: true, writable: true, value: t }) : e2[u2] = t;
|
|
382
|
+
var h = (e2, u2, t) => (vD(e2, typeof u2 != "symbol" ? u2 + "" : u2, t), t);
|
|
383
|
+
var x = class {
|
|
384
|
+
constructor(u2, t = true) {
|
|
385
|
+
h(this, "input"), h(this, "output"), h(this, "_abortSignal"), h(this, "rl"), h(this, "opts"), h(this, "_render"), h(this, "_track", false), h(this, "_prevFrame", ""), h(this, "_subscribers", /* @__PURE__ */ new Map()), h(this, "_cursor", 0), h(this, "state", "initial"), h(this, "error", ""), h(this, "value");
|
|
386
|
+
const { input: F2 = j, output: s = M, render: i, signal: D2, ...r } = u2;
|
|
387
|
+
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 = D2, this.input = F2, this.output = s;
|
|
388
|
+
}
|
|
389
|
+
unsubscribe() {
|
|
390
|
+
this._subscribers.clear();
|
|
391
|
+
}
|
|
392
|
+
setSubscriber(u2, t) {
|
|
393
|
+
const F2 = this._subscribers.get(u2) ?? [];
|
|
394
|
+
F2.push(t), this._subscribers.set(u2, F2);
|
|
395
|
+
}
|
|
396
|
+
on(u2, t) {
|
|
397
|
+
this.setSubscriber(u2, { cb: t });
|
|
398
|
+
}
|
|
399
|
+
once(u2, t) {
|
|
400
|
+
this.setSubscriber(u2, { cb: t, once: true });
|
|
401
|
+
}
|
|
402
|
+
emit(u2, ...t) {
|
|
403
|
+
const F2 = this._subscribers.get(u2) ?? [], s = [];
|
|
404
|
+
for (const i of F2) i.cb(...t), i.once && s.push(() => F2.splice(F2.indexOf(i), 1));
|
|
405
|
+
for (const i of s) i();
|
|
406
|
+
}
|
|
407
|
+
prompt() {
|
|
408
|
+
return new Promise((u2, t) => {
|
|
409
|
+
if (this._abortSignal) {
|
|
410
|
+
if (this._abortSignal.aborted) return this.state = "cancel", this.close(), u2(S);
|
|
411
|
+
this._abortSignal.addEventListener("abort", () => {
|
|
412
|
+
this.state = "cancel", this.close();
|
|
413
|
+
}, { once: true });
|
|
414
|
+
}
|
|
415
|
+
const F2 = new X();
|
|
416
|
+
F2._write = (s, i, D2) => {
|
|
417
|
+
this._track && (this.value = this.rl?.line.replace(/\t/g, ""), this._cursor = this.rl?.cursor ?? 0, this.emit("value", this.value)), D2();
|
|
418
|
+
}, this.input.pipe(F2), this.rl = O.createInterface({ input: this.input, output: F2, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), O.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), m(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
419
|
+
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), m(this.input, false), u2(this.value);
|
|
420
|
+
}), this.once("cancel", () => {
|
|
421
|
+
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), m(this.input, false), u2(S);
|
|
422
|
+
});
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
onKeypress(u2, t) {
|
|
426
|
+
if (this.state === "error" && (this.state = "active"), t?.name && (!this._track && B.aliases.has(t.name) && this.emit("cursor", B.aliases.get(t.name)), B.actions.has(t.name) && this.emit("cursor", t.name)), u2 && (u2.toLowerCase() === "y" || u2.toLowerCase() === "n") && this.emit("confirm", u2.toLowerCase() === "y"), u2 === " " && this.opts.placeholder && (this.value || (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u2 && this.emit("key", u2.toLowerCase()), t?.name === "return") {
|
|
427
|
+
if (!this.value && this.opts.placeholder && (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder)), this.opts.validate) {
|
|
428
|
+
const F2 = this.opts.validate(this.value);
|
|
429
|
+
F2 && (this.error = F2 instanceof Error ? F2.message : F2, this.state = "error", this.rl?.write(this.value));
|
|
430
|
+
}
|
|
431
|
+
this.state !== "error" && (this.state = "submit");
|
|
432
|
+
}
|
|
433
|
+
$([u2, t?.name, t?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
434
|
+
}
|
|
435
|
+
close() {
|
|
436
|
+
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
437
|
+
`), m(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
438
|
+
}
|
|
439
|
+
restoreCursor() {
|
|
440
|
+
const u2 = Y(this._prevFrame, process.stdout.columns, { hard: true }).split(`
|
|
441
|
+
`).length - 1;
|
|
442
|
+
this.output.write(import_sisteransi.cursor.move(-999, u2 * -1));
|
|
443
|
+
}
|
|
444
|
+
render() {
|
|
445
|
+
const u2 = Y(this._render(this) ?? "", process.stdout.columns, { hard: true });
|
|
446
|
+
if (u2 !== this._prevFrame) {
|
|
447
|
+
if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
|
|
448
|
+
else {
|
|
449
|
+
const t = BD(this._prevFrame, u2);
|
|
450
|
+
if (this.restoreCursor(), t && t?.length === 1) {
|
|
451
|
+
const F2 = t[0];
|
|
452
|
+
this.output.write(import_sisteransi.cursor.move(0, F2)), this.output.write(import_sisteransi.erase.lines(1));
|
|
453
|
+
const s = u2.split(`
|
|
454
|
+
`);
|
|
455
|
+
this.output.write(s[F2]), this._prevFrame = u2, this.output.write(import_sisteransi.cursor.move(0, s.length - F2 - 1));
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
458
|
+
if (t && t?.length > 1) {
|
|
459
|
+
const F2 = t[0];
|
|
460
|
+
this.output.write(import_sisteransi.cursor.move(0, F2)), this.output.write(import_sisteransi.erase.down());
|
|
461
|
+
const s = u2.split(`
|
|
462
|
+
`).slice(F2);
|
|
463
|
+
this.output.write(s.join(`
|
|
464
|
+
`)), this._prevFrame = u2;
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
this.output.write(import_sisteransi.erase.down());
|
|
468
|
+
}
|
|
469
|
+
this.output.write(u2), this.state === "initial" && (this.state = "active"), this._prevFrame = u2;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
var A;
|
|
474
|
+
A = /* @__PURE__ */ new WeakMap();
|
|
475
|
+
var OD = Object.defineProperty;
|
|
476
|
+
var PD = (e2, u2, t) => u2 in e2 ? OD(e2, u2, { enumerable: true, configurable: true, writable: true, value: t }) : e2[u2] = t;
|
|
477
|
+
var J = (e2, u2, t) => (PD(e2, typeof u2 != "symbol" ? u2 + "" : u2, t), t);
|
|
478
|
+
var LD = class extends x {
|
|
479
|
+
constructor(u2) {
|
|
480
|
+
super(u2, false), J(this, "options"), J(this, "cursor", 0), this.options = u2.options, this.cursor = this.options.findIndex(({ value: t }) => t === u2.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (t) => {
|
|
481
|
+
switch (t) {
|
|
482
|
+
case "left":
|
|
483
|
+
case "up":
|
|
484
|
+
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
485
|
+
break;
|
|
486
|
+
case "down":
|
|
487
|
+
case "right":
|
|
488
|
+
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
489
|
+
break;
|
|
490
|
+
}
|
|
491
|
+
this.changeValue();
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
get _value() {
|
|
495
|
+
return this.options[this.cursor];
|
|
496
|
+
}
|
|
497
|
+
changeValue() {
|
|
498
|
+
this.value = this._value.value;
|
|
499
|
+
}
|
|
500
|
+
};
|
|
501
|
+
var RD = class extends x {
|
|
502
|
+
get valueWithCursor() {
|
|
503
|
+
if (this.state === "submit") return this.value;
|
|
504
|
+
if (this.cursor >= this.value.length) return `${this.value}\u2588`;
|
|
505
|
+
const u2 = this.value.slice(0, this.cursor), [t, ...F2] = this.value.slice(this.cursor);
|
|
506
|
+
return `${u2}${import_picocolors.default.inverse(t)}${F2.join("")}`;
|
|
507
|
+
}
|
|
508
|
+
get cursor() {
|
|
509
|
+
return this._cursor;
|
|
510
|
+
}
|
|
511
|
+
constructor(u2) {
|
|
512
|
+
super(u2), this.on("finalize", () => {
|
|
513
|
+
this.value || (this.value = u2.defaultValue);
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
// ../../node_modules/.pnpm/@clack+prompts@0.10.1/node_modules/@clack/prompts/dist/index.mjs
|
|
519
|
+
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
520
|
+
var import_sisteransi2 = __toESM(require_src(), 1);
|
|
521
|
+
import y2 from "process";
|
|
522
|
+
function ce() {
|
|
523
|
+
return y2.platform !== "win32" ? y2.env.TERM !== "linux" : !!y2.env.CI || !!y2.env.WT_SESSION || !!y2.env.TERMINUS_SUBLIME || y2.env.ConEmuTask === "{cmd::Cmder}" || y2.env.TERM_PROGRAM === "Terminus-Sublime" || y2.env.TERM_PROGRAM === "vscode" || y2.env.TERM === "xterm-256color" || y2.env.TERM === "alacritty" || y2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
524
|
+
}
|
|
525
|
+
var V2 = ce();
|
|
526
|
+
var u = (t, n) => V2 ? t : n;
|
|
527
|
+
var le = u("\u25C6", "*");
|
|
528
|
+
var L2 = u("\u25A0", "x");
|
|
529
|
+
var W2 = u("\u25B2", "x");
|
|
530
|
+
var C2 = u("\u25C7", "o");
|
|
531
|
+
var ue = u("\u250C", "T");
|
|
532
|
+
var o = u("\u2502", "|");
|
|
533
|
+
var d2 = u("\u2514", "\u2014");
|
|
534
|
+
var k2 = u("\u25CF", ">");
|
|
535
|
+
var P2 = u("\u25CB", " ");
|
|
536
|
+
var A2 = u("\u25FB", "[\u2022]");
|
|
537
|
+
var T = u("\u25FC", "[+]");
|
|
538
|
+
var F = u("\u25FB", "[ ]");
|
|
539
|
+
var $e = u("\u25AA", "\u2022");
|
|
540
|
+
var _2 = u("\u2500", "-");
|
|
541
|
+
var me = u("\u256E", "+");
|
|
542
|
+
var de = u("\u251C", "+");
|
|
543
|
+
var pe = u("\u256F", "+");
|
|
544
|
+
var q = u("\u25CF", "\u2022");
|
|
545
|
+
var D = u("\u25C6", "*");
|
|
546
|
+
var U = u("\u25B2", "!");
|
|
547
|
+
var K2 = u("\u25A0", "x");
|
|
548
|
+
var b2 = (t) => {
|
|
549
|
+
switch (t) {
|
|
550
|
+
case "initial":
|
|
551
|
+
case "active":
|
|
552
|
+
return import_picocolors2.default.cyan(le);
|
|
553
|
+
case "cancel":
|
|
554
|
+
return import_picocolors2.default.red(L2);
|
|
555
|
+
case "error":
|
|
556
|
+
return import_picocolors2.default.yellow(W2);
|
|
557
|
+
case "submit":
|
|
558
|
+
return import_picocolors2.default.green(C2);
|
|
559
|
+
}
|
|
560
|
+
};
|
|
561
|
+
var G2 = (t) => {
|
|
562
|
+
const { cursor: n, options: r, style: i } = t, s = t.maxItems ?? Number.POSITIVE_INFINITY, c = Math.max(process.stdout.rows - 4, 0), a = Math.min(c, Math.max(s, 5));
|
|
563
|
+
let l2 = 0;
|
|
564
|
+
n >= l2 + a - 3 ? l2 = Math.max(Math.min(n - a + 3, r.length - a), 0) : n < l2 + 2 && (l2 = Math.max(n - 2, 0));
|
|
565
|
+
const $2 = a < r.length && l2 > 0, g2 = a < r.length && l2 + a < r.length;
|
|
566
|
+
return r.slice(l2, l2 + a).map((p2, v2, f) => {
|
|
567
|
+
const j2 = v2 === 0 && $2, E = v2 === f.length - 1 && g2;
|
|
568
|
+
return j2 || E ? import_picocolors2.default.dim("...") : i(p2, v2 + l2 === n);
|
|
569
|
+
});
|
|
570
|
+
};
|
|
571
|
+
var he = (t) => new RD({ validate: t.validate, placeholder: t.placeholder, defaultValue: t.defaultValue, initialValue: t.initialValue, render() {
|
|
572
|
+
const n = `${import_picocolors2.default.gray(o)}
|
|
573
|
+
${b2(this.state)} ${t.message}
|
|
574
|
+
`, r = t.placeholder ? import_picocolors2.default.inverse(t.placeholder[0]) + import_picocolors2.default.dim(t.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), i = this.value ? this.valueWithCursor : r;
|
|
575
|
+
switch (this.state) {
|
|
576
|
+
case "error":
|
|
577
|
+
return `${n.trim()}
|
|
578
|
+
${import_picocolors2.default.yellow(o)} ${i}
|
|
579
|
+
${import_picocolors2.default.yellow(d2)} ${import_picocolors2.default.yellow(this.error)}
|
|
580
|
+
`;
|
|
581
|
+
case "submit":
|
|
582
|
+
return `${n}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(this.value || t.placeholder)}`;
|
|
583
|
+
case "cancel":
|
|
584
|
+
return `${n}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(this.value ?? ""))}${this.value?.trim() ? `
|
|
585
|
+
${import_picocolors2.default.gray(o)}` : ""}`;
|
|
586
|
+
default:
|
|
587
|
+
return `${n}${import_picocolors2.default.cyan(o)} ${i}
|
|
588
|
+
${import_picocolors2.default.cyan(d2)}
|
|
589
|
+
`;
|
|
590
|
+
}
|
|
591
|
+
} }).prompt();
|
|
592
|
+
var ve = (t) => {
|
|
593
|
+
const n = (r, i) => {
|
|
594
|
+
const s = r.label ?? String(r.value);
|
|
595
|
+
switch (i) {
|
|
596
|
+
case "selected":
|
|
597
|
+
return `${import_picocolors2.default.dim(s)}`;
|
|
598
|
+
case "active":
|
|
599
|
+
return `${import_picocolors2.default.green(k2)} ${s} ${r.hint ? import_picocolors2.default.dim(`(${r.hint})`) : ""}`;
|
|
600
|
+
case "cancelled":
|
|
601
|
+
return `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s))}`;
|
|
602
|
+
default:
|
|
603
|
+
return `${import_picocolors2.default.dim(P2)} ${import_picocolors2.default.dim(s)}`;
|
|
604
|
+
}
|
|
605
|
+
};
|
|
606
|
+
return new LD({ options: t.options, initialValue: t.initialValue, render() {
|
|
607
|
+
const r = `${import_picocolors2.default.gray(o)}
|
|
608
|
+
${b2(this.state)} ${t.message}
|
|
609
|
+
`;
|
|
610
|
+
switch (this.state) {
|
|
611
|
+
case "submit":
|
|
612
|
+
return `${r}${import_picocolors2.default.gray(o)} ${n(this.options[this.cursor], "selected")}`;
|
|
613
|
+
case "cancel":
|
|
614
|
+
return `${r}${import_picocolors2.default.gray(o)} ${n(this.options[this.cursor], "cancelled")}
|
|
615
|
+
${import_picocolors2.default.gray(o)}`;
|
|
616
|
+
default:
|
|
617
|
+
return `${r}${import_picocolors2.default.cyan(o)} ${G2({ cursor: this.cursor, options: this.options, maxItems: t.maxItems, style: (i, s) => n(i, s ? "active" : "inactive") }).join(`
|
|
618
|
+
${import_picocolors2.default.cyan(o)} `)}
|
|
619
|
+
${import_picocolors2.default.cyan(d2)}
|
|
620
|
+
`;
|
|
621
|
+
}
|
|
622
|
+
} }).prompt();
|
|
623
|
+
};
|
|
624
|
+
var xe = (t = "") => {
|
|
625
|
+
process.stdout.write(`${import_picocolors2.default.gray(d2)} ${import_picocolors2.default.red(t)}
|
|
626
|
+
|
|
627
|
+
`);
|
|
628
|
+
};
|
|
629
|
+
var Ie = (t = "") => {
|
|
630
|
+
process.stdout.write(`${import_picocolors2.default.gray(ue)} ${t}
|
|
631
|
+
`);
|
|
632
|
+
};
|
|
633
|
+
var Se = (t = "") => {
|
|
634
|
+
process.stdout.write(`${import_picocolors2.default.gray(o)}
|
|
635
|
+
${import_picocolors2.default.gray(d2)} ${t}
|
|
636
|
+
|
|
637
|
+
`);
|
|
638
|
+
};
|
|
639
|
+
var M2 = { message: (t = "", { symbol: n = import_picocolors2.default.gray(o) } = {}) => {
|
|
640
|
+
const r = [`${import_picocolors2.default.gray(o)}`];
|
|
641
|
+
if (t) {
|
|
642
|
+
const [i, ...s] = t.split(`
|
|
643
|
+
`);
|
|
644
|
+
r.push(`${n} ${i}`, ...s.map((c) => `${import_picocolors2.default.gray(o)} ${c}`));
|
|
645
|
+
}
|
|
646
|
+
process.stdout.write(`${r.join(`
|
|
647
|
+
`)}
|
|
648
|
+
`);
|
|
649
|
+
}, info: (t) => {
|
|
650
|
+
M2.message(t, { symbol: import_picocolors2.default.blue(q) });
|
|
651
|
+
}, success: (t) => {
|
|
652
|
+
M2.message(t, { symbol: import_picocolors2.default.green(D) });
|
|
653
|
+
}, step: (t) => {
|
|
654
|
+
M2.message(t, { symbol: import_picocolors2.default.green(C2) });
|
|
655
|
+
}, warn: (t) => {
|
|
656
|
+
M2.message(t, { symbol: import_picocolors2.default.yellow(U) });
|
|
657
|
+
}, warning: (t) => {
|
|
658
|
+
M2.warn(t);
|
|
659
|
+
}, error: (t) => {
|
|
660
|
+
M2.message(t, { symbol: import_picocolors2.default.red(K2) });
|
|
661
|
+
} };
|
|
662
|
+
var J2 = `${import_picocolors2.default.gray(o)} `;
|
|
663
|
+
|
|
664
|
+
// src/index.ts
|
|
665
|
+
var import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
666
|
+
|
|
667
|
+
// src/migrations/001-exemble/index.ts
|
|
668
|
+
var migration = {
|
|
669
|
+
id: "001",
|
|
670
|
+
title: "eXemble\uD300 \u2192 @exem-ui \uB9C8\uC774\uADF8\uB808\uC774\uC158",
|
|
671
|
+
description: "@exem/* \uD328\uD0A4\uC9C0 \uACBD\uB85C \uD1B5\uD569, \uCEF4\uD3EC\uB10C\uD2B8 API \uBCC0\uACBD, CSS \uD1A0\uD070 \uB9AC\uB124\uC774\uBC0D\uC744 \uD55C \uBC88\uC5D0 \uCC98\uB9AC\uD569\uB2C8\uB2E4.",
|
|
672
|
+
autoRules: [
|
|
673
|
+
// ── 패키지명 치환 (@exem/*) ──
|
|
674
|
+
{
|
|
675
|
+
id: "pkg-react",
|
|
676
|
+
description: "@exem/react \u2192 @exem-ui/react",
|
|
677
|
+
find: /(['"])@exem\/react\1/g,
|
|
678
|
+
replace: "$1@exem-ui/react$1"
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
id: "pkg-icon",
|
|
682
|
+
description: "@exem/icon \u2192 @exem-ui/react/icon",
|
|
683
|
+
find: /(['"])@exem\/icon\1/g,
|
|
684
|
+
replace: "$1@exem-ui/react/icon$1"
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
id: "pkg-design-token",
|
|
688
|
+
description: "@exem/design-token \u2192 @exem-ui/core",
|
|
689
|
+
find: /(['"])@exem\/design-token\1/g,
|
|
690
|
+
replace: "$1@exem-ui/core$1"
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
id: "pkg-tailwind",
|
|
694
|
+
description: "@exem/tailwindcss3 \u2192 @exem-ui/tailwindcss3",
|
|
695
|
+
find: /(['"])@exem\/tailwindcss3\1/g,
|
|
696
|
+
replace: "$1@exem-ui/tailwindcss3$1"
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
id: "pkg-stylesheet",
|
|
700
|
+
description: "@exem/stylesheet \u2192 @exem-ui/core/css",
|
|
701
|
+
find: /(['"])@exem\/stylesheet\1/g,
|
|
702
|
+
replace: "$1@exem-ui/core/css$1"
|
|
703
|
+
},
|
|
704
|
+
// ── 일부 프로젝트에서 @exem-fe/* 사용 ──
|
|
705
|
+
{
|
|
706
|
+
id: "pkg-react-fe",
|
|
707
|
+
description: "@exem-fe/react \u2192 @exem-ui/react",
|
|
708
|
+
find: /(['"])@exem-fe\/react\1/g,
|
|
709
|
+
replace: "$1@exem-ui/react$1"
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
id: "pkg-icon-fe",
|
|
713
|
+
description: "@exem-fe/icon \u2192 @exem-ui/react/icon",
|
|
714
|
+
find: /(['"])@exem-fe\/icon\1/g,
|
|
715
|
+
replace: "$1@exem-ui/react/icon$1"
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
id: "pkg-design-token-fe",
|
|
719
|
+
description: "@exem-fe/design-token \u2192 @exem-ui/core",
|
|
720
|
+
find: /(['"])@exem-fe\/design-token\1/g,
|
|
721
|
+
replace: "$1@exem-ui/core$1"
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
id: "pkg-tailwind-fe",
|
|
725
|
+
description: "@exem-fe/tailwindcss3-plugin \u2192 @exem-ui/tailwindcss3",
|
|
726
|
+
find: /(['"])@exem-fe\/tailwindcss3-plugin\1/g,
|
|
727
|
+
replace: "$1@exem-ui/tailwindcss3$1"
|
|
728
|
+
},
|
|
729
|
+
// ── Button variant ──
|
|
730
|
+
{
|
|
731
|
+
id: "btn-variant-text",
|
|
732
|
+
description: 'variant="text" \u2192 variant="invisible"',
|
|
733
|
+
find: /variant\s*=\s*(['"])text\1/g,
|
|
734
|
+
replace: "variant=$1invisible$1"
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
id: "btn-variant-text-dynamic",
|
|
738
|
+
description: "variant: 'text' \u2192 variant: 'invisible'",
|
|
739
|
+
find: /variant\s*:\s*(['"])text\1/g,
|
|
740
|
+
replace: "variant: $1invisible$1"
|
|
741
|
+
},
|
|
742
|
+
// ── ButtonGroup variant ──
|
|
743
|
+
{
|
|
744
|
+
id: "btngroup-variant-default",
|
|
745
|
+
description: 'ButtonGroup variant="default" \u2192 variant="contained"',
|
|
746
|
+
find: /(<ButtonGroup[^>]*?)variant\s*=\s*(['"])default\2/g,
|
|
747
|
+
replace: "$1variant=$2contained$2"
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
id: "btngroup-variant-icononly",
|
|
751
|
+
description: 'ButtonGroup variant="iconOnly" \u2192 iconOnly variant="contained"',
|
|
752
|
+
find: /(<ButtonGroup[^>]*?)variant\s*=\s*(['"])iconOnly\2/g,
|
|
753
|
+
replace: "$1iconOnly variant=$2contained$2"
|
|
754
|
+
},
|
|
755
|
+
// ── Modal ──
|
|
756
|
+
{
|
|
757
|
+
id: "modal-footer-actions",
|
|
758
|
+
description: "Modal.FooterActions \u2192 Modal.Actions",
|
|
759
|
+
find: /Modal\.FooterActions/g,
|
|
760
|
+
replace: "Modal.Actions"
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
id: "modal-footer-actions-type",
|
|
764
|
+
description: "ModalFooterActionsProps \u2192 ModalActionsProps",
|
|
765
|
+
find: /ModalFooterActionsProps/g,
|
|
766
|
+
replace: "ModalActionsProps"
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
id: "modal-fullsize",
|
|
770
|
+
description: 'size="fullSize" \u2192 size="fullsize"',
|
|
771
|
+
find: /size\s*=\s*(['"])fullSize\1/g,
|
|
772
|
+
replace: "size=$1fullsize$1"
|
|
773
|
+
},
|
|
774
|
+
// ── CSS 토큰 ──
|
|
775
|
+
{
|
|
776
|
+
id: "token-rounded-circle",
|
|
777
|
+
description: "rounded-circle \u2192 rounded-full",
|
|
778
|
+
find: /rounded-circle/g,
|
|
779
|
+
replace: "rounded-full"
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
id: "token-surface-primary",
|
|
783
|
+
description: "surface-primary-* \u2192 solid-primary-*",
|
|
784
|
+
find: /surface-primary-(default|hovered|disabled)/g,
|
|
785
|
+
replace: "solid-primary-$1"
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
id: "token-surface-accent",
|
|
789
|
+
description: "surface-accent-* \u2192 solid-accent-*",
|
|
790
|
+
find: /surface-accent-(default|hovered|disabled)/g,
|
|
791
|
+
replace: "solid-accent-$1"
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
id: "token-surface-critical",
|
|
795
|
+
description: "surface-critical-* \u2192 solid-critical-*",
|
|
796
|
+
find: /surface-critical-(default|hovered|disabled)/g,
|
|
797
|
+
replace: "solid-critical-$1"
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
id: "token-material-scroll",
|
|
801
|
+
description: "material-scroll \u2192 component-scroll",
|
|
802
|
+
find: /material-scroll/g,
|
|
803
|
+
replace: "component-scroll"
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
id: "token-material-tooltip",
|
|
807
|
+
description: "material-tooltip \u2192 component-tooltip",
|
|
808
|
+
find: /material-tooltip/g,
|
|
809
|
+
replace: "component-tooltip"
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
id: "token-material-toast",
|
|
813
|
+
description: "material-toast \u2192 component-toast",
|
|
814
|
+
find: /material-toast/g,
|
|
815
|
+
replace: "component-toast"
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
id: "token-interaction-selected",
|
|
819
|
+
description: "interaction-selected \u2192 elevation-accent",
|
|
820
|
+
find: /interaction-selected/g,
|
|
821
|
+
replace: "elevation-accent"
|
|
822
|
+
}
|
|
823
|
+
],
|
|
824
|
+
manualChecks: [
|
|
825
|
+
{
|
|
826
|
+
id: "tabs-size-prop",
|
|
827
|
+
description: "Tabs size prop\uC774 \uC81C\uAC70\uB428",
|
|
828
|
+
find: /<Tabs(?![.\w])[^>]*\bsize\s*=/g,
|
|
829
|
+
suggestion: "size prop\uC744 \uC81C\uAC70\uD558\uC138\uC694. primary: h-9, secondary: h-8\uB85C \uACE0\uC815\uB429\uB2C8\uB2E4."
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
id: "btngroup-color-prop",
|
|
833
|
+
description: "ButtonGroup color prop\uC774 \uC81C\uAC70\uB428",
|
|
834
|
+
find: /<ButtonGroup[^>]*\bcolor\s*=/g,
|
|
835
|
+
suggestion: "color prop\uC744 \uC81C\uAC70\uD558\uC138\uC694. variant\uC5D0 \uB530\uB77C \uC790\uB3D9 \uACB0\uC815\uB429\uB2C8\uB2E4 (contained\u2192assistive, outlined\u2192primary)."
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
id: "use-toast-hook",
|
|
839
|
+
description: "useToast() \u2192 toast() \uD568\uC218\uB85C \uC804\uD658 \uAD8C\uC7A5 (deprecated)",
|
|
840
|
+
find: /useToast\s*\(/g,
|
|
841
|
+
suggestion: "import { toast } from '@exem-ui/react' \uD6C4 toast(), toast.success() \uB4F1 \uC0AC\uC6A9"
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
id: "toast-reactnode-input",
|
|
845
|
+
description: "toast()\uC5D0 ReactNode \uC9C1\uC811 \uC804\uB2EC \uBD88\uAC00 \u2192 toast.custom() \uC0AC\uC6A9",
|
|
846
|
+
find: /toast\s*\(\s*</g,
|
|
847
|
+
suggestion: "toast(<Component />) \u2192 toast.custom(<Component />) \uC73C\uB85C \uBCC0\uACBD\uD558\uC138\uC694."
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
id: "datepicker-mode",
|
|
851
|
+
description: "DatePicker mode prop \u2192 type prop\uC73C\uB85C \uBCC0\uACBD",
|
|
852
|
+
find: /<DatePicker[^>]*\bmode\s*=/g,
|
|
853
|
+
suggestion: 'mode="single" \u2192 type="single", mode="range" \u2192 type="range"'
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
id: "loading-default-size",
|
|
857
|
+
description: "Loading \uAE30\uBCF8 size\uAC00 medium \u2192 large\uB85C \uBCC0\uACBD\uB428",
|
|
858
|
+
find: /<Loading(?![^>]*\bsize\s*=)[^>]*\/?>/g,
|
|
859
|
+
suggestion: '\uAE30\uC874 \uB3D9\uC791 \uC720\uC9C0\uAC00 \uD544\uC694\uD558\uBA74 size="medium"\uC744 \uBA85\uC2DC\uD558\uC138\uC694.'
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
id: "breadcrumb-separator",
|
|
863
|
+
description: 'Breadcrumb.Separator \uC544\uC774\uCF58 \u2192 "/" \uD14D\uC2A4\uD2B8\uB85C \uBCC0\uACBD\uB428',
|
|
864
|
+
find: /<Breadcrumb\.Separator\s*\/?\s*>/g,
|
|
865
|
+
suggestion: "\uC544\uC774\uCF58 \uC720\uC9C0: <Breadcrumb.Separator><ChevronRightIcon size={16} /></Breadcrumb.Separator>"
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
id: "colorpicker",
|
|
869
|
+
description: "ColorPicker\uAC00 \uB514\uC790\uC778\uC2DC\uC2A4\uD15C\uC5D0 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC74C",
|
|
870
|
+
find: /\bColorPicker\b/g,
|
|
871
|
+
suggestion: "ColorPicker \uCF54\uB4DC\uB97C \uD504\uB85C\uC81D\uD2B8 \uB0B4\uBD80 \uCEF4\uD3EC\uB10C\uD2B8\uB85C \uC774\uB3D9\uD558\uC138\uC694."
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
id: "css-var-radius",
|
|
875
|
+
description: "CSS \uBCC0\uC218 \uAE30\uBC18 radius(--radius-*)\uAC00 \uACE0\uC815 px \uAC12\uC73C\uB85C \uBCC0\uACBD\uB428",
|
|
876
|
+
find: /var\(--radius-/g,
|
|
877
|
+
suggestion: "CSS \uBCC0\uC218 \uB300\uC2E0 Tailwind \uD074\uB798\uC2A4(rounded-weak \uB4F1)\uB97C \uC0AC\uC6A9\uD558\uC138\uC694. \uAC12\uC774 \uCD95\uC18C\uB418\uC5C8\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4."
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
id: "elevation-inverse-toast",
|
|
881
|
+
description: "bg-elevation-inverse (Toast \uC804\uC6A9) \u2192 bg-component-toast",
|
|
882
|
+
find: /elevation-inverse/g,
|
|
883
|
+
suggestion: "Toast \uBC30\uACBD\uC73C\uB85C \uC0AC\uC6A9 \uC2DC bg-component-toast\uB85C \uBCC0\uACBD. \uB2E4\uB978 \uC6A9\uB3C4\uB77C\uBA74 \uC720\uC9C0."
|
|
884
|
+
}
|
|
885
|
+
]
|
|
886
|
+
};
|
|
887
|
+
var exemble_default = migration;
|
|
888
|
+
|
|
889
|
+
// src/migrations/002-team-fe/index.ts
|
|
890
|
+
var migration2 = {
|
|
891
|
+
id: "002",
|
|
892
|
+
title: "FE 1\uD300 \u2192 @exem-ui \uB9C8\uC774\uADF8\uB808\uC774\uC158",
|
|
893
|
+
description: "@exem-fe/* \uD328\uD0A4\uC9C0 \uACBD\uB85C \uD1B5\uD569, \uCEF4\uD3EC\uB10C\uD2B8 API \uBCC0\uACBD, CSS \uD1A0\uD070 \uB9AC\uB124\uC774\uBC0D\uC744 \uD55C \uBC88\uC5D0 \uCC98\uB9AC\uD569\uB2C8\uB2E4.",
|
|
894
|
+
autoRules: [
|
|
895
|
+
// ── 패키지명 치환 ──
|
|
896
|
+
{
|
|
897
|
+
id: "pkg-react",
|
|
898
|
+
description: "@exem-fe/react \u2192 @exem-ui/react",
|
|
899
|
+
find: /(['"])@exem-fe\/react\1/g,
|
|
900
|
+
replace: "$1@exem-ui/react$1"
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
id: "pkg-icon",
|
|
904
|
+
description: "@exem-fe/icon \u2192 @exem-ui/react/icon",
|
|
905
|
+
find: /(['"])@exem-fe\/icon\1/g,
|
|
906
|
+
replace: "$1@exem-ui/react/icon$1"
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
id: "pkg-design-token",
|
|
910
|
+
description: "@exem-fe/design-token \u2192 @exem-ui/core",
|
|
911
|
+
find: /(['"])@exem-fe\/design-token\1/g,
|
|
912
|
+
replace: "$1@exem-ui/core$1"
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
id: "pkg-stylesheet",
|
|
916
|
+
description: "@exem-fe/stylesheet \u2192 @exem-ui/core/css",
|
|
917
|
+
find: /(['"])@exem-fe\/stylesheet(?:\/css)?\1/g,
|
|
918
|
+
replace: "$1@exem-ui/core/css$1"
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
id: "pkg-tailwind",
|
|
922
|
+
description: "@exem-fe/tailwindcss-plugin \u2192 @exem-ui/tailwindcss3",
|
|
923
|
+
find: /(['"])@exem-fe\/tailwindcss(?:3)?-plugin\1/g,
|
|
924
|
+
replace: "$1@exem-ui/tailwindcss3$1"
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
id: "pkg-ui-react",
|
|
928
|
+
description: "@exem-fe/ui/react \u2192 @exem-ui/react",
|
|
929
|
+
find: /(['"])@exem-fe\/ui\/react\1/g,
|
|
930
|
+
replace: "$1@exem-ui/react$1"
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
id: "pkg-ui-tailwind",
|
|
934
|
+
description: "@exem-fe/ui/tailwind \u2192 @exem-ui/tailwindcss3",
|
|
935
|
+
find: /(['"])@exem-fe\/ui\/tailwind\1/g,
|
|
936
|
+
replace: "$1@exem-ui/tailwindcss3$1"
|
|
937
|
+
},
|
|
938
|
+
// ── Button variant ──
|
|
939
|
+
{
|
|
940
|
+
id: "btn-variant-text",
|
|
941
|
+
description: 'variant="text" \u2192 variant="invisible"',
|
|
942
|
+
find: /variant\s*=\s*(['"])text\1/g,
|
|
943
|
+
replace: "variant=$1invisible$1"
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
id: "btn-variant-text-dynamic",
|
|
947
|
+
description: "variant: 'text' \u2192 variant: 'invisible'",
|
|
948
|
+
find: /variant\s*:\s*(['"])text\1/g,
|
|
949
|
+
replace: "variant: $1invisible$1"
|
|
950
|
+
},
|
|
951
|
+
// ── ButtonGroup variant ──
|
|
952
|
+
{
|
|
953
|
+
id: "btngroup-variant-default",
|
|
954
|
+
description: 'ButtonGroup variant="default" \u2192 variant="contained"',
|
|
955
|
+
find: /(<ButtonGroup[^>]*?)variant\s*=\s*(['"])default\2/g,
|
|
956
|
+
replace: "$1variant=$2contained$2"
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
id: "btngroup-variant-icononly",
|
|
960
|
+
description: 'ButtonGroup variant="iconOnly" \u2192 iconOnly variant="contained"',
|
|
961
|
+
find: /(<ButtonGroup[^>]*?)variant\s*=\s*(['"])iconOnly\2/g,
|
|
962
|
+
replace: "$1iconOnly variant=$2contained$2"
|
|
963
|
+
},
|
|
964
|
+
// ── Modal ──
|
|
965
|
+
{
|
|
966
|
+
id: "modal-footer-actions",
|
|
967
|
+
description: "Modal.FooterActions \u2192 Modal.Actions",
|
|
968
|
+
find: /Modal\.FooterActions/g,
|
|
969
|
+
replace: "Modal.Actions"
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
id: "modal-footer-actions-type",
|
|
973
|
+
description: "ModalFooterActionsProps \u2192 ModalActionsProps",
|
|
974
|
+
find: /ModalFooterActionsProps/g,
|
|
975
|
+
replace: "ModalActionsProps"
|
|
976
|
+
},
|
|
977
|
+
// ── Tooltip size ──
|
|
978
|
+
{
|
|
979
|
+
id: "tooltip-size-xlarge",
|
|
980
|
+
description: 'size="xLarge" \u2192 size="xlarge"',
|
|
981
|
+
find: /size\s*=\s*(['"])xLarge\1/g,
|
|
982
|
+
replace: "size=$1xlarge$1"
|
|
983
|
+
},
|
|
984
|
+
// ── CSS 토큰 ──
|
|
985
|
+
{
|
|
986
|
+
id: "token-rounded-circle",
|
|
987
|
+
description: "rounded-circle \u2192 rounded-full",
|
|
988
|
+
find: /rounded-circle/g,
|
|
989
|
+
replace: "rounded-full"
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
id: "token-surface-primary",
|
|
993
|
+
description: "surface-primary-* \u2192 solid-primary-*",
|
|
994
|
+
find: /surface-primary-(default|hovered|disabled)/g,
|
|
995
|
+
replace: "solid-primary-$1"
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
id: "token-surface-accent",
|
|
999
|
+
description: "surface-accent-* \u2192 solid-accent-*",
|
|
1000
|
+
find: /surface-accent-(default|hovered|disabled)/g,
|
|
1001
|
+
replace: "solid-accent-$1"
|
|
1002
|
+
},
|
|
1003
|
+
{
|
|
1004
|
+
id: "token-surface-critical",
|
|
1005
|
+
description: "surface-critical-* \u2192 solid-critical-*",
|
|
1006
|
+
find: /surface-critical-(default|hovered|disabled)/g,
|
|
1007
|
+
replace: "solid-critical-$1"
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
id: "token-material-scroll",
|
|
1011
|
+
description: "material-scroll \u2192 component-scroll",
|
|
1012
|
+
find: /material-scroll/g,
|
|
1013
|
+
replace: "component-scroll"
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
id: "token-material-tooltip",
|
|
1017
|
+
description: "material-tooltip \u2192 component-tooltip",
|
|
1018
|
+
find: /material-tooltip/g,
|
|
1019
|
+
replace: "component-tooltip"
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
id: "token-interaction-selected",
|
|
1023
|
+
description: "interaction-selected \u2192 elevation-accent",
|
|
1024
|
+
find: /interaction-selected/g,
|
|
1025
|
+
replace: "elevation-accent"
|
|
1026
|
+
}
|
|
1027
|
+
],
|
|
1028
|
+
manualChecks: [
|
|
1029
|
+
{
|
|
1030
|
+
id: "textfield-no-variant",
|
|
1031
|
+
description: '<TextField>\uC5D0 variant="fill" \uB610\uB294 variant="line" \uCD94\uAC00 \uD544\uC694',
|
|
1032
|
+
find: /<TextField(?![.\w])(?![^>]*variant\s*=)/g,
|
|
1033
|
+
suggestion: '<TextField variant="fill" ...>'
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
id: "textarea-no-variant",
|
|
1037
|
+
description: '<TextArea>\uC5D0 variant="fill" \uB610\uB294 variant="line" \uCD94\uAC00 \uD544\uC694',
|
|
1038
|
+
find: /<TextArea(?![.\w])(?![^>]*variant\s*=)/g,
|
|
1039
|
+
suggestion: '<TextArea variant="fill" ...>'
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
id: "select-no-variant",
|
|
1043
|
+
description: '<Select>\uC5D0 variant="fill" \uB610\uB294 variant="line" \uCD94\uAC00 \uD544\uC694',
|
|
1044
|
+
find: /<Select(?!\.)(?![^>]*variant\s*=)(?![^>]*>)/g,
|
|
1045
|
+
suggestion: '<Select variant="fill" ...>'
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
id: "use-toast-hook",
|
|
1049
|
+
description: "useToast() \u2192 toast() \uD568\uC218\uB85C \uC804\uD658 \uAD8C\uC7A5 (deprecated)",
|
|
1050
|
+
find: /useToast\s*\(/g,
|
|
1051
|
+
suggestion: "import { toast } from '@exem-ui/react' \uD6C4 toast.success(), toast.error() \uB4F1 \uC0AC\uC6A9"
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
id: "toast-options-type",
|
|
1055
|
+
description: "ToastOptions \uD0C0\uC785\uBA85 \uBCC0\uACBD \uD655\uC778",
|
|
1056
|
+
find: /import\s+(?:type\s+)?{[^}]*\bToastOptions\b[^}]*}\s*from\s*['"]@exem-fe\/react['"]/g,
|
|
1057
|
+
suggestion: "sonner\uC758 Options \u2192 SonnerToastOptions, \uC0C8 ToastOptions\uB294 { title, description, action, close }"
|
|
1058
|
+
},
|
|
1059
|
+
{
|
|
1060
|
+
id: "segment-ongray",
|
|
1061
|
+
description: "Segment onGray prop \uC81C\uAC70\uB428",
|
|
1062
|
+
find: /onGray/g,
|
|
1063
|
+
suggestion: "onGray prop\uC744 \uC81C\uAC70\uD558\uC138\uC694. \uBC30\uACBD\uC0C9\uC740 bg-elevation-elevation-2\uB85C \uACE0\uC815\uB429\uB2C8\uB2E4."
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
id: "loading-tone",
|
|
1067
|
+
description: "Loading tone prop \uC81C\uAC70\uB428",
|
|
1068
|
+
find: /<Loading[^>]*\btone\s*=/g,
|
|
1069
|
+
suggestion: "tone prop\uC744 \uC81C\uAC70\uD558\uC138\uC694. dim prop\uC744 \uB300\uC2E0 \uC0AC\uC6A9\uD558\uC138\uC694."
|
|
1070
|
+
},
|
|
1071
|
+
{
|
|
1072
|
+
id: "loading-default-size",
|
|
1073
|
+
description: "Loading \uAE30\uBCF8 size\uAC00 medium \u2192 large\uB85C \uBCC0\uACBD\uB428",
|
|
1074
|
+
find: /<Loading(?![^>]*\bsize\s*=)[^>]*\/?>/g,
|
|
1075
|
+
suggestion: '\uAE30\uC874 \uB3D9\uC791 \uC720\uC9C0\uAC00 \uD544\uC694\uD558\uBA74 size="medium"\uC744 \uBA85\uC2DC\uD558\uC138\uC694.'
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
id: "modal-show-close-icon",
|
|
1079
|
+
description: "Modal.Content\uC758 showCloseIcon \u2192 Modal.Header\uB85C \uC774\uB3D9\uB428",
|
|
1080
|
+
find: /<Modal\.Content[^>]*showCloseIcon/g,
|
|
1081
|
+
suggestion: "showCloseIcon\uC744 Modal.Content\uC5D0\uC11C \uC81C\uAC70\uD558\uACE0 Modal.Header\uC5D0 \uCD94\uAC00\uD558\uC138\uC694."
|
|
1082
|
+
},
|
|
1083
|
+
{
|
|
1084
|
+
id: "table-import",
|
|
1085
|
+
description: "Table \uCEF4\uD3EC\uB10C\uD2B8\uAC00 \uB514\uC790\uC778\uC2DC\uC2A4\uD15C\uC5D0\uC11C \uC81C\uAC70\uB428",
|
|
1086
|
+
find: /import\s+(?:type\s+)?{[^}]*\bTable\b[^}]*}\s*from\s*['"]@exem-fe\/react['"]/g,
|
|
1087
|
+
suggestion: "Table \uAD00\uB828 \uCF54\uB4DC\uB97C \uD504\uB85C\uC81D\uD2B8 \uB0B4\uBD80 \uCEF4\uD3EC\uB10C\uD2B8\uB85C \uC774\uB3D9\uD558\uC138\uC694."
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
id: "breadcrumb-separator",
|
|
1091
|
+
description: 'Breadcrumb.Separator \uC544\uC774\uCF58 \u2192 "/" \uD14D\uC2A4\uD2B8\uB85C \uBCC0\uACBD\uB428',
|
|
1092
|
+
find: /<Breadcrumb\.Separator\s*\/?\s*>/g,
|
|
1093
|
+
suggestion: "\uC544\uC774\uCF58 \uC720\uC9C0: <Breadcrumb.Separator><ChevronRightIcon size={16} /></Breadcrumb.Separator>"
|
|
1094
|
+
}
|
|
1095
|
+
]
|
|
1096
|
+
};
|
|
1097
|
+
var team_fe_default = migration2;
|
|
1098
|
+
|
|
1099
|
+
// src/migrations/index.ts
|
|
1100
|
+
var migrations = [exemble_default, team_fe_default];
|
|
1101
|
+
|
|
1102
|
+
// src/runner.ts
|
|
1103
|
+
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
1104
|
+
import { execSync } from "child_process";
|
|
1105
|
+
import { readFileSync, writeFileSync } from "fs";
|
|
1106
|
+
import { relative } from "path";
|
|
1107
|
+
var EXTENSIONS = [".ts", ".tsx", ".js", ".jsx", ".mjs", ".mts"];
|
|
1108
|
+
var IGNORE_DIRS = ["node_modules", "dist", ".next", ".nuxt", ".output", "build", ".git"];
|
|
1109
|
+
function collectFiles(dir) {
|
|
1110
|
+
const files = [];
|
|
1111
|
+
try {
|
|
1112
|
+
const extArgs = EXTENSIONS.map((e2) => `-name "*${e2}"`).join(" -o ");
|
|
1113
|
+
const ignoreArgs = IGNORE_DIRS.map((d3) => `! -path "*/${d3}/*"`).join(" ");
|
|
1114
|
+
const output = execSync(`find "${dir}" -type f \\( ${extArgs} \\) ${ignoreArgs}`, {
|
|
1115
|
+
encoding: "utf-8",
|
|
1116
|
+
maxBuffer: 50 * 1024 * 1024
|
|
1117
|
+
});
|
|
1118
|
+
for (const line of output.trim().split("\n")) {
|
|
1119
|
+
if (line) {
|
|
1120
|
+
files.push(line);
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
} catch {
|
|
1124
|
+
}
|
|
1125
|
+
return files;
|
|
1126
|
+
}
|
|
1127
|
+
function applyAutoRules(content, migration3, relPath, autoChanges) {
|
|
1128
|
+
let modified = content;
|
|
1129
|
+
for (const rule of migration3.autoRules) {
|
|
1130
|
+
const regex = new RegExp(rule.find.source, rule.find.flags);
|
|
1131
|
+
const matches = modified.match(regex);
|
|
1132
|
+
if (matches && matches.length > 0) {
|
|
1133
|
+
autoChanges.push({
|
|
1134
|
+
file: relPath,
|
|
1135
|
+
description: rule.description,
|
|
1136
|
+
count: matches.length
|
|
1137
|
+
});
|
|
1138
|
+
modified = modified.replace(regex, rule.replace);
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
return modified;
|
|
1142
|
+
}
|
|
1143
|
+
function collectManualWarnings(content, migration3, relPath, manualWarnings) {
|
|
1144
|
+
for (const check of migration3.manualChecks) {
|
|
1145
|
+
const regex = new RegExp(check.find.source, check.find.flags);
|
|
1146
|
+
const lines = content.split("\n");
|
|
1147
|
+
for (let i = 0; i < lines.length; i++) {
|
|
1148
|
+
if (regex.test(lines[i])) {
|
|
1149
|
+
manualWarnings.push({
|
|
1150
|
+
file: relPath,
|
|
1151
|
+
line: i + 1,
|
|
1152
|
+
description: check.description,
|
|
1153
|
+
suggestion: check.suggestion
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
regex.lastIndex = 0;
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
function printAutoChanges(autoChanges) {
|
|
1161
|
+
process.stdout.write(`${import_picocolors3.default.bold(import_picocolors3.default.green("v \uC790\uB3D9 \uCE58\uD658 \uD56D\uBAA9"))}
|
|
1162
|
+
`);
|
|
1163
|
+
process.stdout.write(`${import_picocolors3.default.dim("-".repeat(60))}
|
|
1164
|
+
`);
|
|
1165
|
+
const grouped = /* @__PURE__ */ new Map();
|
|
1166
|
+
for (const ch of autoChanges) {
|
|
1167
|
+
if (!grouped.has(ch.description)) {
|
|
1168
|
+
grouped.set(ch.description, []);
|
|
1169
|
+
}
|
|
1170
|
+
grouped.get(ch.description).push(ch);
|
|
1171
|
+
}
|
|
1172
|
+
for (const [desc, items] of grouped) {
|
|
1173
|
+
const total = items.reduce((s, i) => s + i.count, 0);
|
|
1174
|
+
process.stdout.write(
|
|
1175
|
+
` ${import_picocolors3.default.green("->")} ${desc} ${import_picocolors3.default.dim(`(${total}\uAC74, ${items.length}\uAC1C \uD30C\uC77C)`)}
|
|
1176
|
+
`
|
|
1177
|
+
);
|
|
1178
|
+
for (const item of items.slice(0, 5)) {
|
|
1179
|
+
process.stdout.write(` ${import_picocolors3.default.dim(item.file)} ${import_picocolors3.default.dim(`(${item.count}\uAC74)`)}
|
|
1180
|
+
`);
|
|
1181
|
+
}
|
|
1182
|
+
if (items.length > 5) {
|
|
1183
|
+
process.stdout.write(` ${import_picocolors3.default.dim(`... \uC678 ${items.length - 5}\uAC1C \uD30C\uC77C`)}
|
|
1184
|
+
`);
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
process.stdout.write("\n");
|
|
1188
|
+
}
|
|
1189
|
+
function printManualWarnings(manualWarnings) {
|
|
1190
|
+
process.stdout.write(`${import_picocolors3.default.bold(import_picocolors3.default.yellow("! \uC218\uB3D9 \uD655\uC778 \uD544\uC694 \uD56D\uBAA9"))}
|
|
1191
|
+
`);
|
|
1192
|
+
process.stdout.write(`${import_picocolors3.default.dim("-".repeat(60))}
|
|
1193
|
+
`);
|
|
1194
|
+
const grouped = /* @__PURE__ */ new Map();
|
|
1195
|
+
for (const w2 of manualWarnings) {
|
|
1196
|
+
if (!grouped.has(w2.description)) {
|
|
1197
|
+
grouped.set(w2.description, []);
|
|
1198
|
+
}
|
|
1199
|
+
grouped.get(w2.description).push(w2);
|
|
1200
|
+
}
|
|
1201
|
+
for (const [desc, items] of grouped) {
|
|
1202
|
+
process.stdout.write(` ${import_picocolors3.default.yellow("!")} ${desc} ${import_picocolors3.default.dim(`(${items.length}\uAC74)`)}
|
|
1203
|
+
`);
|
|
1204
|
+
process.stdout.write(` ${import_picocolors3.default.dim("\uD574\uACB0:")} ${items[0].suggestion}
|
|
1205
|
+
`);
|
|
1206
|
+
for (const item of items.slice(0, 3)) {
|
|
1207
|
+
process.stdout.write(` ${import_picocolors3.default.dim(`${item.file}:${item.line}`)}
|
|
1208
|
+
`);
|
|
1209
|
+
}
|
|
1210
|
+
if (items.length > 3) {
|
|
1211
|
+
process.stdout.write(` ${import_picocolors3.default.dim(`... \uC678 ${items.length - 3}\uAC74`)}
|
|
1212
|
+
`);
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
process.stdout.write("\n");
|
|
1216
|
+
}
|
|
1217
|
+
function run(migration3, targetDir, apply) {
|
|
1218
|
+
process.stdout.write(`
|
|
1219
|
+
${import_picocolors3.default.bold(`=== [${migration3.id}] ${migration3.title} ===`)}
|
|
1220
|
+
`);
|
|
1221
|
+
process.stdout.write(`${import_picocolors3.default.dim("\uB300\uC0C1:")} ${targetDir}
|
|
1222
|
+
`);
|
|
1223
|
+
process.stdout.write(
|
|
1224
|
+
`${import_picocolors3.default.dim("\uBAA8\uB4DC:")} ${apply ? import_picocolors3.default.red("\uC2E4\uC81C \uC801\uC6A9 (--apply)") : import_picocolors3.default.green("\uBBF8\uB9AC\uBCF4\uAE30 (dry-run)")}
|
|
1225
|
+
|
|
1226
|
+
`
|
|
1227
|
+
);
|
|
1228
|
+
const files = collectFiles(targetDir);
|
|
1229
|
+
process.stdout.write(`${import_picocolors3.default.dim(`\uC2A4\uCE94 \uB300\uC0C1: ${files.length}\uAC1C \uD30C\uC77C`)}
|
|
1230
|
+
|
|
1231
|
+
`);
|
|
1232
|
+
const autoChanges = [];
|
|
1233
|
+
const manualWarnings = [];
|
|
1234
|
+
let filesModified = 0;
|
|
1235
|
+
for (const filePath of files) {
|
|
1236
|
+
let content;
|
|
1237
|
+
try {
|
|
1238
|
+
content = readFileSync(filePath, "utf-8");
|
|
1239
|
+
} catch {
|
|
1240
|
+
continue;
|
|
1241
|
+
}
|
|
1242
|
+
const relPath = relative(targetDir, filePath);
|
|
1243
|
+
const modified = applyAutoRules(content, migration3, relPath, autoChanges);
|
|
1244
|
+
collectManualWarnings(modified, migration3, relPath, manualWarnings);
|
|
1245
|
+
if (modified !== content) {
|
|
1246
|
+
filesModified++;
|
|
1247
|
+
if (apply) {
|
|
1248
|
+
writeFileSync(filePath, modified, "utf-8");
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
const totalAutoChanges = autoChanges.reduce((s, c) => s + c.count, 0);
|
|
1253
|
+
if (autoChanges.length > 0) {
|
|
1254
|
+
printAutoChanges(autoChanges);
|
|
1255
|
+
}
|
|
1256
|
+
if (manualWarnings.length > 0) {
|
|
1257
|
+
printManualWarnings(manualWarnings);
|
|
1258
|
+
}
|
|
1259
|
+
process.stdout.write(`${import_picocolors3.default.bold("--- \uC694\uC57D ---")}
|
|
1260
|
+
`);
|
|
1261
|
+
process.stdout.write(
|
|
1262
|
+
` \uC790\uB3D9 \uCE58\uD658: ${import_picocolors3.default.green(`${totalAutoChanges}\uAC74`)} (${filesModified}\uAC1C \uD30C\uC77C)
|
|
1263
|
+
`
|
|
1264
|
+
);
|
|
1265
|
+
process.stdout.write(` \uC218\uB3D9 \uD655\uC778: ${import_picocolors3.default.yellow(`${manualWarnings.length}\uAC74`)}
|
|
1266
|
+
`);
|
|
1267
|
+
if (!apply && totalAutoChanges > 0) {
|
|
1268
|
+
process.stdout.write(
|
|
1269
|
+
`
|
|
1270
|
+
${import_picocolors3.default.cyan("--apply \uD50C\uB798\uADF8\uB97C \uCD94\uAC00\uD558\uBA74 \uC790\uB3D9 \uCE58\uD658\uC774 \uC2E4\uC81C\uB85C \uC801\uC6A9\uB429\uB2C8\uB2E4.")}
|
|
1271
|
+
`
|
|
1272
|
+
);
|
|
1273
|
+
}
|
|
1274
|
+
if (apply && totalAutoChanges > 0) {
|
|
1275
|
+
process.stdout.write(`
|
|
1276
|
+
${import_picocolors3.default.green("v \uC790\uB3D9 \uCE58\uD658\uC774 \uC801\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.")}
|
|
1277
|
+
`);
|
|
1278
|
+
}
|
|
1279
|
+
process.stdout.write("\n");
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
// src/index.ts
|
|
1283
|
+
async function main() {
|
|
1284
|
+
const args = process.argv.slice(2);
|
|
1285
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
1286
|
+
showHelp();
|
|
1287
|
+
process.exit(0);
|
|
1288
|
+
}
|
|
1289
|
+
Ie(import_picocolors4.default.bold("@exem-ui/migration"));
|
|
1290
|
+
const pathArg = args.find((a) => !a.startsWith("-"));
|
|
1291
|
+
let targetDir;
|
|
1292
|
+
if (pathArg) {
|
|
1293
|
+
targetDir = resolve(pathArg);
|
|
1294
|
+
} else {
|
|
1295
|
+
const input = await he({
|
|
1296
|
+
message: "\uB9C8\uC774\uADF8\uB808\uC774\uC158\uD560 \uD504\uB85C\uC81D\uD2B8 \uACBD\uB85C\uB97C \uC785\uB825\uD558\uC138\uC694",
|
|
1297
|
+
placeholder: "./my-project",
|
|
1298
|
+
validate: (value) => {
|
|
1299
|
+
if (!value) {
|
|
1300
|
+
return "\uACBD\uB85C\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694.";
|
|
1301
|
+
}
|
|
1302
|
+
if (!existsSync(resolve(value))) {
|
|
1303
|
+
return "\uD574\uB2F9 \uACBD\uB85C\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.";
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
});
|
|
1307
|
+
if (pD(input)) {
|
|
1308
|
+
xe("\uCDE8\uC18C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");
|
|
1309
|
+
process.exit(0);
|
|
1310
|
+
}
|
|
1311
|
+
targetDir = resolve(input);
|
|
1312
|
+
}
|
|
1313
|
+
if (!existsSync(targetDir)) {
|
|
1314
|
+
xe(`\uACBD\uB85C\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: ${targetDir}`);
|
|
1315
|
+
process.exit(1);
|
|
1316
|
+
}
|
|
1317
|
+
const selected = await ve({
|
|
1318
|
+
message: "\uC2E4\uD589\uD560 \uB9C8\uC774\uADF8\uB808\uC774\uC158\uC744 \uC120\uD0DD\uD558\uC138\uC694",
|
|
1319
|
+
options: migrations.map((m2) => ({
|
|
1320
|
+
value: m2.id,
|
|
1321
|
+
label: `${import_picocolors4.default.dim(m2.id)} ${m2.title}`,
|
|
1322
|
+
hint: m2.description
|
|
1323
|
+
}))
|
|
1324
|
+
});
|
|
1325
|
+
if (pD(selected)) {
|
|
1326
|
+
xe("\uCDE8\uC18C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");
|
|
1327
|
+
process.exit(0);
|
|
1328
|
+
}
|
|
1329
|
+
const migration3 = migrations.find((m2) => m2.id === selected);
|
|
1330
|
+
if (!migration3) {
|
|
1331
|
+
xe("\uB9C8\uC774\uADF8\uB808\uC774\uC158\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");
|
|
1332
|
+
process.exit(1);
|
|
1333
|
+
}
|
|
1334
|
+
const apply = args.includes("--apply");
|
|
1335
|
+
if (!apply) {
|
|
1336
|
+
M2.info(`${import_picocolors4.default.dim("dry-run \uBAA8\uB4DC\uC785\uB2C8\uB2E4. \uC2E4\uC81C \uC801\uC6A9\uD558\uB824\uBA74 --apply \uD50C\uB798\uADF8\uB97C \uCD94\uAC00\uD558\uC138\uC694.")}`);
|
|
1337
|
+
}
|
|
1338
|
+
run(migration3, targetDir, apply);
|
|
1339
|
+
Se(import_picocolors4.default.dim("\uB9C8\uC774\uADF8\uB808\uC774\uC158 \uC644\uB8CC"));
|
|
1340
|
+
}
|
|
1341
|
+
function showHelp() {
|
|
1342
|
+
process.stdout.write(`
|
|
1343
|
+
${import_picocolors4.default.bold("@exem-ui/migration")} - \uBC84\uC804\uBCC4 codemod \uB9C8\uC774\uADF8\uB808\uC774\uC158 \uB3C4\uAD6C
|
|
1344
|
+
|
|
1345
|
+
${import_picocolors4.default.yellow("\uC0AC\uC6A9\uBC95:")}
|
|
1346
|
+
npx @exem-ui/migration <\uD504\uB85C\uC81D\uD2B8-\uACBD\uB85C> ${import_picocolors4.default.dim("# \uC778\uD130\uB799\uD2F0\uBE0C \uC120\uD0DD + dry-run")}
|
|
1347
|
+
npx @exem-ui/migration <\uD504\uB85C\uC81D\uD2B8-\uACBD\uB85C> --apply ${import_picocolors4.default.dim("# \uC778\uD130\uB799\uD2F0\uBE0C \uC120\uD0DD + \uC2E4\uC81C \uC801\uC6A9")}
|
|
1348
|
+
|
|
1349
|
+
${import_picocolors4.default.yellow("\uB9C8\uC774\uADF8\uB808\uC774\uC158 \uBAA9\uB85D:")}
|
|
1350
|
+
${migrations.map((m2) => ` ${import_picocolors4.default.cyan(m2.id)} ${m2.title}`).join("\n")}
|
|
1351
|
+
|
|
1352
|
+
${import_picocolors4.default.yellow("\uC635\uC158:")}
|
|
1353
|
+
--apply \uC790\uB3D9 \uCE58\uD658\uC744 \uC2E4\uC81C\uB85C \uC801\uC6A9 (\uAE30\uBCF8: dry-run)
|
|
1354
|
+
--help \uC774 \uB3C4\uC6C0\uB9D0 \uD45C\uC2DC
|
|
1355
|
+
|
|
1356
|
+
`);
|
|
1357
|
+
}
|
|
1358
|
+
main().catch((err) => {
|
|
1359
|
+
process.stderr.write(`${import_picocolors4.default.red("\uC624\uB958:")} ${err instanceof Error ? err.message : err}
|
|
1360
|
+
`);
|
|
1361
|
+
process.exit(1);
|
|
1362
|
+
});
|
|
1363
|
+
//# sourceMappingURL=index.js.map
|