@reliverse/rempts 1.6.2 → 1.7.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/LICENSE +1 -1
- package/README.md +311 -77
- package/bin/{core-impl → components}/anykey/anykey-mod.d.ts +1 -1
- package/bin/{core-impl → components}/anykey/anykey-mod.js +1 -1
- package/bin/{core-impl → components}/date/date.d.ts +1 -1
- package/bin/{core-impl → components}/editor/editor-mod.d.ts +1 -1
- package/bin/{core-impl → components}/editor/editor-mod.js +7 -7
- package/bin/{core-impl → components}/input/confirm-prompt.d.ts +1 -1
- package/bin/{core-impl → components}/input/confirm-prompt.js +1 -1
- package/bin/{core-impl → components}/input/input-prompt.d.ts +1 -1
- package/bin/{core-impl → components}/input/input-prompt.js +3 -7
- package/bin/{core-impl → components}/launcher/deprecated/_parser.ts.txt +1 -1
- package/bin/{core-impl → components}/launcher/deprecated/_utils.ts.txt +1 -1
- package/bin/{core-impl → components}/launcher/deprecated/args.ts.txt +1 -1
- package/bin/{core-impl → components}/launcher/deprecated/command.ts.txt +1 -1
- package/bin/{core-impl → components}/launcher/deprecated/launcher-mod.ts.txt +1 -1
- package/bin/{core-impl → components}/launcher/deprecated/usage.ts.txt +1 -1
- package/bin/components/launcher/launcher-mod.d.ts +177 -0
- package/bin/components/launcher/launcher-mod.js +626 -0
- package/bin/{core-impl → components}/msg-fmt/colors.d.ts +1 -1
- package/bin/{core-impl → components}/msg-fmt/logger.d.ts +1 -1
- package/bin/{core-impl → components}/msg-fmt/logger.js +1 -4
- package/bin/{core-impl → components}/msg-fmt/mapping.d.ts +1 -1
- package/bin/{core-impl → components}/msg-fmt/messages.d.ts +1 -1
- package/bin/{core-impl → components}/msg-fmt/variants.d.ts +1 -1
- package/bin/{core-impl → components}/next-steps/next-steps.d.ts +2 -2
- package/bin/{core-impl → components}/number/number-mod.d.ts +1 -1
- package/bin/{core-impl → components}/select/multiselect-prompt.d.ts +1 -1
- package/bin/{core-impl → components}/select/multiselect-prompt.js +1 -1
- package/bin/{core-impl → components}/select/nummultiselect-prompt.d.ts +1 -1
- package/bin/{core-impl → components}/select/numselect-prompt.d.ts +1 -1
- package/bin/{core-impl → components}/select/numselect-prompt.js +1 -1
- package/bin/{core-impl → components}/select/select-prompt.d.ts +1 -1
- package/bin/{core-impl → components}/select/select-prompt.js +2 -2
- package/bin/{core-impl → components}/select/toggle-prompt.d.ts +1 -1
- package/bin/{core-impl → components}/select/toggle-prompt.js +1 -1
- package/bin/{core-impl → components}/st-end/end.d.ts +1 -1
- package/bin/{core-impl → components}/st-end/start.d.ts +1 -1
- package/bin/{core-impl → components}/st-end/start.js +2 -2
- package/bin/{core-impl → components}/task/progress.d.ts +1 -1
- package/bin/{core-impl → components}/visual/animate/animate.d.ts +1 -1
- package/bin/hooks/spinner/spinner-mod.d.ts +20 -0
- package/bin/hooks/spinner/spinner-mod.js +26 -0
- package/bin/mod.d.ts +37 -0
- package/bin/mod.js +88 -0
- package/bin/{core-impl/utils → utils}/colorize.d.ts +1 -1
- package/bin/{core-impl/utils → utils}/prevent.d.ts +1 -1
- package/bin/{core-impl/utils → utils}/prevent.js +2 -2
- package/bin/{core-impl/utils → utils}/prompt-end.d.ts +1 -1
- package/bin/{core-impl/utils → utils}/prompt-end.js +2 -2
- package/bin/{core-impl/utils → utils}/stream-text.d.ts +1 -1
- package/bin/{core-impl/utils → utils}/stream-text.js +2 -2
- package/package.json +46 -24
- package/bin/core-impl/figures/figures.test.d.ts +0 -1
- package/bin/core-impl/figures/figures.test.js +0 -474
- package/bin/core-impl/launcher/launcher-mod.d.ts +0 -92
- package/bin/core-impl/launcher/launcher-mod.js +0 -371
- package/bin/main.d.ts +0 -36
- package/bin/main.js +0 -86
- /package/bin/{core-impl → components}/date/date.js +0 -0
- /package/bin/{core-impl → components}/figures/figures-mod.d.ts +0 -0
- /package/bin/{core-impl → components}/figures/figures-mod.js +0 -0
- /package/bin/{core-impl → components}/msg-fmt/colors.js +0 -0
- /package/bin/{core-impl → components}/msg-fmt/mapping.js +0 -0
- /package/bin/{core-impl → components}/msg-fmt/messages.js +0 -0
- /package/bin/{core-impl → components}/msg-fmt/terminal.d.ts +0 -0
- /package/bin/{core-impl → components}/msg-fmt/terminal.js +0 -0
- /package/bin/{core-impl → components}/msg-fmt/variants.js +0 -0
- /package/bin/{core-impl → components}/next-steps/next-steps.js +0 -0
- /package/bin/{core-impl → components}/number/number-mod.js +0 -0
- /package/bin/{core-impl → components}/results/results.d.ts +0 -0
- /package/bin/{core-impl → components}/results/results.js +0 -0
- /package/bin/{core-impl → components}/select/nummultiselect-prompt.js +0 -0
- /package/bin/{core-impl → components}/st-end/end.js +0 -0
- /package/bin/{core-impl → components}/task/progress.js +0 -0
- /package/bin/{core-impl → components}/task/spinner.d.ts +0 -0
- /package/bin/{core-impl → components}/task/spinner.js +0 -0
- /package/bin/{core-impl → components}/visual/animate/animate.js +0 -0
- /package/bin/{core-impl → components}/visual/ascii-art/ascii-art.d.ts +0 -0
- /package/bin/{core-impl → components}/visual/ascii-art/ascii-art.js +0 -0
- /package/bin/{core-types.d.ts → types.d.ts} +0 -0
- /package/bin/{core-types.js → types.js} +0 -0
- /package/bin/{core-impl/utils → utils}/colorize.js +0 -0
- /package/bin/{core-impl/utils → utils}/errors.d.ts +0 -0
- /package/bin/{core-impl/utils → utils}/errors.js +0 -0
- /package/bin/{core-impl/utils → utils}/system.d.ts +0 -0
- /package/bin/{core-impl/utils → utils}/system.js +0 -0
- /package/bin/{core-impl/utils → utils}/validate.d.ts +0 -0
- /package/bin/{core-impl/utils → utils}/validate.js +0 -0
|
@@ -1,474 +0,0 @@
|
|
|
1
|
-
import { vi, it, expect, afterAll } from "vitest";
|
|
2
|
-
afterAll(() => {
|
|
3
|
-
vi.unstubAllEnvs();
|
|
4
|
-
});
|
|
5
|
-
it("falls back to ascii figures when unicode is not supported", async () => {
|
|
6
|
-
const { default: unicodeFigures } = await import("./figures-mod.js");
|
|
7
|
-
vi.resetModules().stubEnv("TERM", "linux");
|
|
8
|
-
const { default: asciiFigures } = await import("./figures-mod.js");
|
|
9
|
-
expect(asciiFigures.checkboxOn).not.toEqual(unicodeFigures.checkboxOn);
|
|
10
|
-
expect(unicodeFigures).toMatchInlineSnapshot(`
|
|
11
|
-
{
|
|
12
|
-
"almostEqual": "\u2248",
|
|
13
|
-
"arrowDown": "\u2193",
|
|
14
|
-
"arrowLeft": "\u2190",
|
|
15
|
-
"arrowLeftRight": "\u2194",
|
|
16
|
-
"arrowRight": "\u2192",
|
|
17
|
-
"arrowUp": "\u2191",
|
|
18
|
-
"arrowUpDown": "\u2195",
|
|
19
|
-
"bullet": "\u25CF",
|
|
20
|
-
"checkboxCircleOff": "\u24BE",
|
|
21
|
-
"checkboxCircleOn": "\u24E7",
|
|
22
|
-
"checkboxOff": "\u2610",
|
|
23
|
-
"checkboxOn": "\u2612",
|
|
24
|
-
"circle": "\u25EF",
|
|
25
|
-
"circleCircle": "\u24DE",
|
|
26
|
-
"circleCross": "\u24E7",
|
|
27
|
-
"circleDotted": "\u25CC",
|
|
28
|
-
"circleDouble": "\u25CE",
|
|
29
|
-
"circleFilled": "\u25C9",
|
|
30
|
-
"circlePipe": "\u24BE",
|
|
31
|
-
"circleQuestionMark": "(?)",
|
|
32
|
-
"cross": "\u2718",
|
|
33
|
-
"dot": "\u2024",
|
|
34
|
-
"ellipsis": "\u2026",
|
|
35
|
-
"fiveEighths": "\u215D",
|
|
36
|
-
"fiveSixths": "\u215A",
|
|
37
|
-
"fourFifths": "\u2158",
|
|
38
|
-
"greaterOrEqual": "\u2265",
|
|
39
|
-
"hamburger": "\u2630",
|
|
40
|
-
"heart": "\u2665",
|
|
41
|
-
"home": "\u2302",
|
|
42
|
-
"identical": "\u2261",
|
|
43
|
-
"infinity": "\u221E",
|
|
44
|
-
"info": "\u2139",
|
|
45
|
-
"lessOrEqual": "\u2264",
|
|
46
|
-
"line": "\u2500",
|
|
47
|
-
"lineBackslash": "\u2572",
|
|
48
|
-
"lineBold": "\u2501",
|
|
49
|
-
"lineCross": "\u2573",
|
|
50
|
-
"lineDashed0": "\u2504",
|
|
51
|
-
"lineDashed1": "\u2505",
|
|
52
|
-
"lineDashed10": "\u257C",
|
|
53
|
-
"lineDashed11": "\u257E",
|
|
54
|
-
"lineDashed12": "\u2212",
|
|
55
|
-
"lineDashed13": "\u2013",
|
|
56
|
-
"lineDashed14": "\u2010",
|
|
57
|
-
"lineDashed15": "\u2043",
|
|
58
|
-
"lineDashed2": "\u2508",
|
|
59
|
-
"lineDashed3": "\u2509",
|
|
60
|
-
"lineDashed4": "\u254C",
|
|
61
|
-
"lineDashed5": "\u254D",
|
|
62
|
-
"lineDashed6": "\u2574",
|
|
63
|
-
"lineDashed7": "\u2576",
|
|
64
|
-
"lineDashed8": "\u2578",
|
|
65
|
-
"lineDashed9": "\u257A",
|
|
66
|
-
"lineDouble": "\u2550",
|
|
67
|
-
"lineDownBoldLeft": "\u2512",
|
|
68
|
-
"lineDownBoldLeftBold": "\u2513",
|
|
69
|
-
"lineDownBoldLeftBoldRight": "\u2531",
|
|
70
|
-
"lineDownBoldLeftBoldRightBold": "\u2533",
|
|
71
|
-
"lineDownBoldLeftRight": "\u2530",
|
|
72
|
-
"lineDownBoldLeftRightBold": "\u2532",
|
|
73
|
-
"lineDownBoldRight": "\u250E",
|
|
74
|
-
"lineDownBoldRightBold": "\u250F",
|
|
75
|
-
"lineDownDoubleLeft": "\u2556",
|
|
76
|
-
"lineDownDoubleLeftDouble": "\u2557",
|
|
77
|
-
"lineDownDoubleLeftDoubleRightDouble": "\u2566",
|
|
78
|
-
"lineDownDoubleLeftRight": "\u2565",
|
|
79
|
-
"lineDownDoubleRight": "\u2553",
|
|
80
|
-
"lineDownDoubleRightDouble": "\u2554",
|
|
81
|
-
"lineDownLeft": "\u2510",
|
|
82
|
-
"lineDownLeftArc": "\u256E",
|
|
83
|
-
"lineDownLeftBold": "\u2511",
|
|
84
|
-
"lineDownLeftBoldRight": "\u252D",
|
|
85
|
-
"lineDownLeftBoldRightBold": "\u252F",
|
|
86
|
-
"lineDownLeftDouble": "\u2555",
|
|
87
|
-
"lineDownLeftDoubleRightDouble": "\u2564",
|
|
88
|
-
"lineDownLeftRight": "\u252C",
|
|
89
|
-
"lineDownLeftRightBold": "\u252E",
|
|
90
|
-
"lineDownRight": "\u250C",
|
|
91
|
-
"lineDownRightArc": "\u256D",
|
|
92
|
-
"lineDownRightBold": "\u250D",
|
|
93
|
-
"lineDownRightDouble": "\u2552",
|
|
94
|
-
"lineSlash": "\u2571",
|
|
95
|
-
"lineUpBoldDownBoldLeft": "\u2528",
|
|
96
|
-
"lineUpBoldDownBoldLeftBold": "\u252B",
|
|
97
|
-
"lineUpBoldDownBoldLeftBoldRight": "\u2549",
|
|
98
|
-
"lineUpBoldDownBoldLeftBoldRightBold": "\u254B",
|
|
99
|
-
"lineUpBoldDownBoldLeftRight": "\u2542",
|
|
100
|
-
"lineUpBoldDownBoldLeftRightBold": "\u254A",
|
|
101
|
-
"lineUpBoldDownBoldRight": "\u2520",
|
|
102
|
-
"lineUpBoldDownBoldRightBold": "\u2523",
|
|
103
|
-
"lineUpBoldDownLeft": "\u2526",
|
|
104
|
-
"lineUpBoldDownLeftBold": "\u2529",
|
|
105
|
-
"lineUpBoldDownLeftBoldRight": "\u2543",
|
|
106
|
-
"lineUpBoldDownLeftBoldRightBold": "\u2547",
|
|
107
|
-
"lineUpBoldDownLeftRight": "\u2540",
|
|
108
|
-
"lineUpBoldDownLeftRightBold": "\u2544",
|
|
109
|
-
"lineUpBoldDownRight": "\u251E",
|
|
110
|
-
"lineUpBoldDownRightBold": "\u2521",
|
|
111
|
-
"lineUpBoldLeft": "\u251A",
|
|
112
|
-
"lineUpBoldLeftBold": "\u251B",
|
|
113
|
-
"lineUpBoldLeftBoldRight": "\u2539",
|
|
114
|
-
"lineUpBoldLeftBoldRightBold": "\u253B",
|
|
115
|
-
"lineUpBoldLeftRight": "\u2538",
|
|
116
|
-
"lineUpBoldLeftRightBold": "\u253A",
|
|
117
|
-
"lineUpBoldRight": "\u2516",
|
|
118
|
-
"lineUpBoldRightBold": "\u2517",
|
|
119
|
-
"lineUpDoubleDownDoubleLeft": "\u2562",
|
|
120
|
-
"lineUpDoubleDownDoubleLeftDouble": "\u2563",
|
|
121
|
-
"lineUpDoubleDownDoubleLeftDoubleRightDouble": "\u256C",
|
|
122
|
-
"lineUpDoubleDownDoubleLeftRight": "\u256B",
|
|
123
|
-
"lineUpDoubleDownDoubleRight": "\u255F",
|
|
124
|
-
"lineUpDoubleDownDoubleRightDouble": "\u2560",
|
|
125
|
-
"lineUpDoubleLeft": "\u255C",
|
|
126
|
-
"lineUpDoubleLeftDouble": "\u255D",
|
|
127
|
-
"lineUpDoubleLeftDoubleRightDouble": "\u2569",
|
|
128
|
-
"lineUpDoubleLeftRight": "\u2568",
|
|
129
|
-
"lineUpDoubleRight": "\u2559",
|
|
130
|
-
"lineUpDoubleRightDouble": "\u255A",
|
|
131
|
-
"lineUpDownBoldLeft": "\u2527",
|
|
132
|
-
"lineUpDownBoldLeftBold": "\u252A",
|
|
133
|
-
"lineUpDownBoldLeftBoldRight": "\u2545",
|
|
134
|
-
"lineUpDownBoldLeftBoldRightBold": "\u2548",
|
|
135
|
-
"lineUpDownBoldLeftRight": "\u2541",
|
|
136
|
-
"lineUpDownBoldLeftRightBold": "\u2546",
|
|
137
|
-
"lineUpDownBoldRight": "\u251F",
|
|
138
|
-
"lineUpDownBoldRightBold": "\u2522",
|
|
139
|
-
"lineUpDownLeft": "\u2524",
|
|
140
|
-
"lineUpDownLeftBold": "\u2525",
|
|
141
|
-
"lineUpDownLeftBoldRight": "\u253D",
|
|
142
|
-
"lineUpDownLeftBoldRightBold": "\u253F",
|
|
143
|
-
"lineUpDownLeftDouble": "\u2561",
|
|
144
|
-
"lineUpDownLeftDoubleRightDouble": "\u256A",
|
|
145
|
-
"lineUpDownLeftRight": "\u253C",
|
|
146
|
-
"lineUpDownLeftRightBold": "\u253E",
|
|
147
|
-
"lineUpDownRight": "\u251C",
|
|
148
|
-
"lineUpDownRightBold": "\u251D",
|
|
149
|
-
"lineUpDownRightDouble": "\u255E",
|
|
150
|
-
"lineUpLeft": "\u2518",
|
|
151
|
-
"lineUpLeftArc": "\u256F",
|
|
152
|
-
"lineUpLeftBold": "\u2519",
|
|
153
|
-
"lineUpLeftBoldRight": "\u2535",
|
|
154
|
-
"lineUpLeftBoldRightBold": "\u2537",
|
|
155
|
-
"lineUpLeftDouble": "\u255B",
|
|
156
|
-
"lineUpLeftDoubleRightDouble": "\u2567",
|
|
157
|
-
"lineUpLeftRight": "\u2534",
|
|
158
|
-
"lineUpLeftRightBold": "\u2536",
|
|
159
|
-
"lineUpRight": "\u2514",
|
|
160
|
-
"lineUpRightArc": "\u2570",
|
|
161
|
-
"lineUpRightBold": "\u2515",
|
|
162
|
-
"lineUpRightDouble": "\u2558",
|
|
163
|
-
"lineVertical": "\u2502",
|
|
164
|
-
"lineVerticalBold": "\u2503",
|
|
165
|
-
"lineVerticalDashed0": "\u2506",
|
|
166
|
-
"lineVerticalDashed1": "\u2507",
|
|
167
|
-
"lineVerticalDashed10": "\u257D",
|
|
168
|
-
"lineVerticalDashed11": "\u257F",
|
|
169
|
-
"lineVerticalDashed2": "\u250A",
|
|
170
|
-
"lineVerticalDashed3": "\u250B",
|
|
171
|
-
"lineVerticalDashed4": "\u254E",
|
|
172
|
-
"lineVerticalDashed5": "\u254F",
|
|
173
|
-
"lineVerticalDashed6": "\u2575",
|
|
174
|
-
"lineVerticalDashed7": "\u2577",
|
|
175
|
-
"lineVerticalDashed8": "\u2579",
|
|
176
|
-
"lineVerticalDashed9": "\u257B",
|
|
177
|
-
"lineVerticalDouble": "\u2551",
|
|
178
|
-
"lozenge": "\u25C6",
|
|
179
|
-
"lozengeOutline": "\u25C7",
|
|
180
|
-
"musicNote": "\u266A",
|
|
181
|
-
"musicNoteBeamed": "\u266B",
|
|
182
|
-
"mustache": "\u0DF4",
|
|
183
|
-
"nodejs": "\u2B22",
|
|
184
|
-
"notEqual": "\u2260",
|
|
185
|
-
"oneEighth": "\u215B",
|
|
186
|
-
"oneFifth": "\u2155",
|
|
187
|
-
"oneHalf": "\xBD",
|
|
188
|
-
"oneNinth": "\u2151",
|
|
189
|
-
"oneQuarter": "\xBC",
|
|
190
|
-
"oneSeventh": "\u2150",
|
|
191
|
-
"oneSixth": "\u2159",
|
|
192
|
-
"oneTenth": "\u2152",
|
|
193
|
-
"oneThird": "\u2153",
|
|
194
|
-
"play": "\u25B6",
|
|
195
|
-
"pointer": "\u276F",
|
|
196
|
-
"pointerSmall": "\u203A",
|
|
197
|
-
"questionMarkPrefix": "(?)",
|
|
198
|
-
"radioOff": "\u25EF",
|
|
199
|
-
"radioOn": "\u25C9",
|
|
200
|
-
"sevenEighths": "\u215E",
|
|
201
|
-
"smiley": "\u32E1",
|
|
202
|
-
"square": "\u2588",
|
|
203
|
-
"squareBottom": "\u2584",
|
|
204
|
-
"squareCenter": "\u25A0",
|
|
205
|
-
"squareDarkShade": "\u2593",
|
|
206
|
-
"squareLeft": "\u258C",
|
|
207
|
-
"squareLightShade": "\u2591",
|
|
208
|
-
"squareMediumShade": "\u2592",
|
|
209
|
-
"squareRight": "\u2590",
|
|
210
|
-
"squareSmall": "\u25FB",
|
|
211
|
-
"squareSmallFilled": "\u25FC",
|
|
212
|
-
"squareTop": "\u2580",
|
|
213
|
-
"star": "\u2605",
|
|
214
|
-
"subscriptEight": "\u2088",
|
|
215
|
-
"subscriptFive": "\u2085",
|
|
216
|
-
"subscriptFour": "\u2084",
|
|
217
|
-
"subscriptNine": "\u2089",
|
|
218
|
-
"subscriptOne": "\u2081",
|
|
219
|
-
"subscriptSeven": "\u2087",
|
|
220
|
-
"subscriptSix": "\u2086",
|
|
221
|
-
"subscriptThree": "\u2083",
|
|
222
|
-
"subscriptTwo": "\u2082",
|
|
223
|
-
"subscriptZero": "\u2080",
|
|
224
|
-
"threeEighths": "\u215C",
|
|
225
|
-
"threeFifths": "\u2157",
|
|
226
|
-
"threeQuarters": "\xBE",
|
|
227
|
-
"tick": "\u2714",
|
|
228
|
-
"triangleDown": "\u25BC",
|
|
229
|
-
"triangleDownSmall": "\u25BE",
|
|
230
|
-
"triangleLeft": "\u25C0",
|
|
231
|
-
"triangleLeftSmall": "\u25C2",
|
|
232
|
-
"triangleRight": "\u25B6",
|
|
233
|
-
"triangleRightSmall": "\u25B8",
|
|
234
|
-
"triangleUp": "\u25B2",
|
|
235
|
-
"triangleUpOutline": "\u25B3",
|
|
236
|
-
"triangleUpSmall": "\u25B4",
|
|
237
|
-
"twoFifths": "\u2156",
|
|
238
|
-
"twoThirds": "\u2154",
|
|
239
|
-
"warning": "\u26A0",
|
|
240
|
-
}
|
|
241
|
-
`);
|
|
242
|
-
expect(asciiFigures).toMatchInlineSnapshot(`
|
|
243
|
-
{
|
|
244
|
-
"almostEqual": "\u2248",
|
|
245
|
-
"arrowDown": "\u2193",
|
|
246
|
-
"arrowLeft": "\u2190",
|
|
247
|
-
"arrowLeftRight": "\u2194",
|
|
248
|
-
"arrowRight": "\u2192",
|
|
249
|
-
"arrowUp": "\u2191",
|
|
250
|
-
"arrowUpDown": "\u2195",
|
|
251
|
-
"bullet": "\u25CF",
|
|
252
|
-
"checkboxCircleOff": "( )",
|
|
253
|
-
"checkboxCircleOn": "(\xD7)",
|
|
254
|
-
"checkboxOff": "[ ]",
|
|
255
|
-
"checkboxOn": "[\xD7]",
|
|
256
|
-
"circle": "( )",
|
|
257
|
-
"circleCircle": "(\u25CB)",
|
|
258
|
-
"circleCross": "(\xD7)",
|
|
259
|
-
"circleDotted": "( )",
|
|
260
|
-
"circleDouble": "( )",
|
|
261
|
-
"circleFilled": "(*)",
|
|
262
|
-
"circlePipe": "(\u2502)",
|
|
263
|
-
"circleQuestionMark": "(?)",
|
|
264
|
-
"cross": "\xD7",
|
|
265
|
-
"dot": "\u2024",
|
|
266
|
-
"ellipsis": "\u2026",
|
|
267
|
-
"fiveEighths": "\u215D",
|
|
268
|
-
"fiveSixths": "\u215A",
|
|
269
|
-
"fourFifths": "\u2158",
|
|
270
|
-
"greaterOrEqual": "\u2265",
|
|
271
|
-
"hamburger": "\u2261",
|
|
272
|
-
"heart": "\u2665",
|
|
273
|
-
"home": "\u2302",
|
|
274
|
-
"identical": "\u2261",
|
|
275
|
-
"infinity": "\u221E",
|
|
276
|
-
"info": "i",
|
|
277
|
-
"lessOrEqual": "\u2264",
|
|
278
|
-
"line": "\u2500",
|
|
279
|
-
"lineBackslash": "\u2572",
|
|
280
|
-
"lineBold": "\u2501",
|
|
281
|
-
"lineCross": "\u2573",
|
|
282
|
-
"lineDashed0": "\u2504",
|
|
283
|
-
"lineDashed1": "\u2505",
|
|
284
|
-
"lineDashed10": "\u257C",
|
|
285
|
-
"lineDashed11": "\u257E",
|
|
286
|
-
"lineDashed12": "\u2212",
|
|
287
|
-
"lineDashed13": "\u2013",
|
|
288
|
-
"lineDashed14": "\u2010",
|
|
289
|
-
"lineDashed15": "\u2043",
|
|
290
|
-
"lineDashed2": "\u2508",
|
|
291
|
-
"lineDashed3": "\u2509",
|
|
292
|
-
"lineDashed4": "\u254C",
|
|
293
|
-
"lineDashed5": "\u254D",
|
|
294
|
-
"lineDashed6": "\u2574",
|
|
295
|
-
"lineDashed7": "\u2576",
|
|
296
|
-
"lineDashed8": "\u2578",
|
|
297
|
-
"lineDashed9": "\u257A",
|
|
298
|
-
"lineDouble": "\u2550",
|
|
299
|
-
"lineDownBoldLeft": "\u2512",
|
|
300
|
-
"lineDownBoldLeftBold": "\u2513",
|
|
301
|
-
"lineDownBoldLeftBoldRight": "\u2531",
|
|
302
|
-
"lineDownBoldLeftBoldRightBold": "\u2533",
|
|
303
|
-
"lineDownBoldLeftRight": "\u2530",
|
|
304
|
-
"lineDownBoldLeftRightBold": "\u2532",
|
|
305
|
-
"lineDownBoldRight": "\u250E",
|
|
306
|
-
"lineDownBoldRightBold": "\u250F",
|
|
307
|
-
"lineDownDoubleLeft": "\u2556",
|
|
308
|
-
"lineDownDoubleLeftDouble": "\u2557",
|
|
309
|
-
"lineDownDoubleLeftDoubleRightDouble": "\u2566",
|
|
310
|
-
"lineDownDoubleLeftRight": "\u2565",
|
|
311
|
-
"lineDownDoubleRight": "\u2553",
|
|
312
|
-
"lineDownDoubleRightDouble": "\u2554",
|
|
313
|
-
"lineDownLeft": "\u2510",
|
|
314
|
-
"lineDownLeftArc": "\u256E",
|
|
315
|
-
"lineDownLeftBold": "\u2511",
|
|
316
|
-
"lineDownLeftBoldRight": "\u252D",
|
|
317
|
-
"lineDownLeftBoldRightBold": "\u252F",
|
|
318
|
-
"lineDownLeftDouble": "\u2555",
|
|
319
|
-
"lineDownLeftDoubleRightDouble": "\u2564",
|
|
320
|
-
"lineDownLeftRight": "\u252C",
|
|
321
|
-
"lineDownLeftRightBold": "\u252E",
|
|
322
|
-
"lineDownRight": "\u250C",
|
|
323
|
-
"lineDownRightArc": "\u256D",
|
|
324
|
-
"lineDownRightBold": "\u250D",
|
|
325
|
-
"lineDownRightDouble": "\u2552",
|
|
326
|
-
"lineSlash": "\u2571",
|
|
327
|
-
"lineUpBoldDownBoldLeft": "\u2528",
|
|
328
|
-
"lineUpBoldDownBoldLeftBold": "\u252B",
|
|
329
|
-
"lineUpBoldDownBoldLeftBoldRight": "\u2549",
|
|
330
|
-
"lineUpBoldDownBoldLeftBoldRightBold": "\u254B",
|
|
331
|
-
"lineUpBoldDownBoldLeftRight": "\u2542",
|
|
332
|
-
"lineUpBoldDownBoldLeftRightBold": "\u254A",
|
|
333
|
-
"lineUpBoldDownBoldRight": "\u2520",
|
|
334
|
-
"lineUpBoldDownBoldRightBold": "\u2523",
|
|
335
|
-
"lineUpBoldDownLeft": "\u2526",
|
|
336
|
-
"lineUpBoldDownLeftBold": "\u2529",
|
|
337
|
-
"lineUpBoldDownLeftBoldRight": "\u2543",
|
|
338
|
-
"lineUpBoldDownLeftBoldRightBold": "\u2547",
|
|
339
|
-
"lineUpBoldDownLeftRight": "\u2540",
|
|
340
|
-
"lineUpBoldDownLeftRightBold": "\u2544",
|
|
341
|
-
"lineUpBoldDownRight": "\u251E",
|
|
342
|
-
"lineUpBoldDownRightBold": "\u2521",
|
|
343
|
-
"lineUpBoldLeft": "\u251A",
|
|
344
|
-
"lineUpBoldLeftBold": "\u251B",
|
|
345
|
-
"lineUpBoldLeftBoldRight": "\u2539",
|
|
346
|
-
"lineUpBoldLeftBoldRightBold": "\u253B",
|
|
347
|
-
"lineUpBoldLeftRight": "\u2538",
|
|
348
|
-
"lineUpBoldLeftRightBold": "\u253A",
|
|
349
|
-
"lineUpBoldRight": "\u2516",
|
|
350
|
-
"lineUpBoldRightBold": "\u2517",
|
|
351
|
-
"lineUpDoubleDownDoubleLeft": "\u2562",
|
|
352
|
-
"lineUpDoubleDownDoubleLeftDouble": "\u2563",
|
|
353
|
-
"lineUpDoubleDownDoubleLeftDoubleRightDouble": "\u256C",
|
|
354
|
-
"lineUpDoubleDownDoubleLeftRight": "\u256B",
|
|
355
|
-
"lineUpDoubleDownDoubleRight": "\u255F",
|
|
356
|
-
"lineUpDoubleDownDoubleRightDouble": "\u2560",
|
|
357
|
-
"lineUpDoubleLeft": "\u255C",
|
|
358
|
-
"lineUpDoubleLeftDouble": "\u255D",
|
|
359
|
-
"lineUpDoubleLeftDoubleRightDouble": "\u2569",
|
|
360
|
-
"lineUpDoubleLeftRight": "\u2568",
|
|
361
|
-
"lineUpDoubleRight": "\u2559",
|
|
362
|
-
"lineUpDoubleRightDouble": "\u255A",
|
|
363
|
-
"lineUpDownBoldLeft": "\u2527",
|
|
364
|
-
"lineUpDownBoldLeftBold": "\u252A",
|
|
365
|
-
"lineUpDownBoldLeftBoldRight": "\u2545",
|
|
366
|
-
"lineUpDownBoldLeftBoldRightBold": "\u2548",
|
|
367
|
-
"lineUpDownBoldLeftRight": "\u2541",
|
|
368
|
-
"lineUpDownBoldLeftRightBold": "\u2546",
|
|
369
|
-
"lineUpDownBoldRight": "\u251F",
|
|
370
|
-
"lineUpDownBoldRightBold": "\u2522",
|
|
371
|
-
"lineUpDownLeft": "\u2524",
|
|
372
|
-
"lineUpDownLeftBold": "\u2525",
|
|
373
|
-
"lineUpDownLeftBoldRight": "\u253D",
|
|
374
|
-
"lineUpDownLeftBoldRightBold": "\u253F",
|
|
375
|
-
"lineUpDownLeftDouble": "\u2561",
|
|
376
|
-
"lineUpDownLeftDoubleRightDouble": "\u256A",
|
|
377
|
-
"lineUpDownLeftRight": "\u253C",
|
|
378
|
-
"lineUpDownLeftRightBold": "\u253E",
|
|
379
|
-
"lineUpDownRight": "\u251C",
|
|
380
|
-
"lineUpDownRightBold": "\u251D",
|
|
381
|
-
"lineUpDownRightDouble": "\u255E",
|
|
382
|
-
"lineUpLeft": "\u2518",
|
|
383
|
-
"lineUpLeftArc": "\u256F",
|
|
384
|
-
"lineUpLeftBold": "\u2519",
|
|
385
|
-
"lineUpLeftBoldRight": "\u2535",
|
|
386
|
-
"lineUpLeftBoldRightBold": "\u2537",
|
|
387
|
-
"lineUpLeftDouble": "\u255B",
|
|
388
|
-
"lineUpLeftDoubleRightDouble": "\u2567",
|
|
389
|
-
"lineUpLeftRight": "\u2534",
|
|
390
|
-
"lineUpLeftRightBold": "\u2536",
|
|
391
|
-
"lineUpRight": "\u2514",
|
|
392
|
-
"lineUpRightArc": "\u2570",
|
|
393
|
-
"lineUpRightBold": "\u2515",
|
|
394
|
-
"lineUpRightDouble": "\u2558",
|
|
395
|
-
"lineVertical": "\u2502",
|
|
396
|
-
"lineVerticalBold": "\u2503",
|
|
397
|
-
"lineVerticalDashed0": "\u2506",
|
|
398
|
-
"lineVerticalDashed1": "\u2507",
|
|
399
|
-
"lineVerticalDashed10": "\u257D",
|
|
400
|
-
"lineVerticalDashed11": "\u257F",
|
|
401
|
-
"lineVerticalDashed2": "\u250A",
|
|
402
|
-
"lineVerticalDashed3": "\u250B",
|
|
403
|
-
"lineVerticalDashed4": "\u254E",
|
|
404
|
-
"lineVerticalDashed5": "\u254F",
|
|
405
|
-
"lineVerticalDashed6": "\u2575",
|
|
406
|
-
"lineVerticalDashed7": "\u2577",
|
|
407
|
-
"lineVerticalDashed8": "\u2579",
|
|
408
|
-
"lineVerticalDashed9": "\u257B",
|
|
409
|
-
"lineVerticalDouble": "\u2551",
|
|
410
|
-
"lozenge": "\u2666",
|
|
411
|
-
"lozengeOutline": "\u25CA",
|
|
412
|
-
"musicNote": "\u266A",
|
|
413
|
-
"musicNoteBeamed": "\u266B",
|
|
414
|
-
"mustache": "\u250C\u2500\u2510",
|
|
415
|
-
"nodejs": "\u2666",
|
|
416
|
-
"notEqual": "\u2260",
|
|
417
|
-
"oneEighth": "\u215B",
|
|
418
|
-
"oneFifth": "\u2155",
|
|
419
|
-
"oneHalf": "\xBD",
|
|
420
|
-
"oneNinth": "1/9",
|
|
421
|
-
"oneQuarter": "\xBC",
|
|
422
|
-
"oneSeventh": "1/7",
|
|
423
|
-
"oneSixth": "\u2159",
|
|
424
|
-
"oneTenth": "1/10",
|
|
425
|
-
"oneThird": "\u2153",
|
|
426
|
-
"play": "\u25BA",
|
|
427
|
-
"pointer": ">",
|
|
428
|
-
"pointerSmall": "\u203A",
|
|
429
|
-
"questionMarkPrefix": "(?)",
|
|
430
|
-
"radioOff": "( )",
|
|
431
|
-
"radioOn": "(*)",
|
|
432
|
-
"sevenEighths": "\u215E",
|
|
433
|
-
"smiley": "\u263A",
|
|
434
|
-
"square": "\u2588",
|
|
435
|
-
"squareBottom": "\u2584",
|
|
436
|
-
"squareCenter": "\u25A0",
|
|
437
|
-
"squareDarkShade": "\u2593",
|
|
438
|
-
"squareLeft": "\u258C",
|
|
439
|
-
"squareLightShade": "\u2591",
|
|
440
|
-
"squareMediumShade": "\u2592",
|
|
441
|
-
"squareRight": "\u2590",
|
|
442
|
-
"squareSmall": "\u25A1",
|
|
443
|
-
"squareSmallFilled": "\u25A0",
|
|
444
|
-
"squareTop": "\u2580",
|
|
445
|
-
"star": "\u2736",
|
|
446
|
-
"subscriptEight": "\u2088",
|
|
447
|
-
"subscriptFive": "\u2085",
|
|
448
|
-
"subscriptFour": "\u2084",
|
|
449
|
-
"subscriptNine": "\u2089",
|
|
450
|
-
"subscriptOne": "\u2081",
|
|
451
|
-
"subscriptSeven": "\u2087",
|
|
452
|
-
"subscriptSix": "\u2086",
|
|
453
|
-
"subscriptThree": "\u2083",
|
|
454
|
-
"subscriptTwo": "\u2082",
|
|
455
|
-
"subscriptZero": "\u2080",
|
|
456
|
-
"threeEighths": "\u215C",
|
|
457
|
-
"threeFifths": "\u2157",
|
|
458
|
-
"threeQuarters": "\xBE",
|
|
459
|
-
"tick": "\u221A",
|
|
460
|
-
"triangleDown": "\u25BC",
|
|
461
|
-
"triangleDownSmall": "\u25BE",
|
|
462
|
-
"triangleLeft": "\u25C4",
|
|
463
|
-
"triangleLeftSmall": "\u25C2",
|
|
464
|
-
"triangleRight": "\u25BA",
|
|
465
|
-
"triangleRightSmall": "\u25B8",
|
|
466
|
-
"triangleUp": "\u25B2",
|
|
467
|
-
"triangleUpOutline": "\u2206",
|
|
468
|
-
"triangleUpSmall": "\u25B4",
|
|
469
|
-
"twoFifths": "\u2156",
|
|
470
|
-
"twoThirds": "\u2154",
|
|
471
|
-
"warning": "\u203C",
|
|
472
|
-
}
|
|
473
|
-
`);
|
|
474
|
-
});
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import type { ReliArgParserOptions } from "@reliverse/reliarg";
|
|
2
|
-
type EmptyArgs = Record<string, never>;
|
|
3
|
-
type BaseArgDefinition = {
|
|
4
|
-
description?: string;
|
|
5
|
-
required?: boolean;
|
|
6
|
-
default?: any;
|
|
7
|
-
};
|
|
8
|
-
type PositionalArgDefinition = {
|
|
9
|
-
type: "positional";
|
|
10
|
-
} & BaseArgDefinition;
|
|
11
|
-
type BooleanArgDefinition = {
|
|
12
|
-
type: "boolean";
|
|
13
|
-
} & BaseArgDefinition;
|
|
14
|
-
type StringArgDefinition = {
|
|
15
|
-
type: "string";
|
|
16
|
-
} & BaseArgDefinition;
|
|
17
|
-
type NumberArgDefinition = {
|
|
18
|
-
type: "number";
|
|
19
|
-
} & BaseArgDefinition;
|
|
20
|
-
type ArrayArgDefinition = {
|
|
21
|
-
type: "array";
|
|
22
|
-
} & BaseArgDefinition;
|
|
23
|
-
export type ArgDefinition = PositionalArgDefinition | BooleanArgDefinition | StringArgDefinition | NumberArgDefinition | ArrayArgDefinition;
|
|
24
|
-
export type ArgDefinitions = Record<string, ArgDefinition>;
|
|
25
|
-
type CommandMeta = {
|
|
26
|
-
name: string;
|
|
27
|
-
version?: string;
|
|
28
|
-
description?: string;
|
|
29
|
-
hidden?: boolean;
|
|
30
|
-
aliases?: string[];
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* A subcommand can be either:
|
|
34
|
-
* 1) A string path to a module with a default export of type Command.
|
|
35
|
-
* 2) A lazy import function returning a Promise that resolves to
|
|
36
|
-
* { default: Command<any> } or directly to a Command instance.
|
|
37
|
-
*/
|
|
38
|
-
type SubCommandSpec = string | (() => Promise<{
|
|
39
|
-
default: Command<any>;
|
|
40
|
-
} | Command<any>>);
|
|
41
|
-
export type SubCommandsMap = Record<string, SubCommandSpec>;
|
|
42
|
-
type CommandContext<ARGS> = {
|
|
43
|
-
args: ARGS;
|
|
44
|
-
raw: string[];
|
|
45
|
-
};
|
|
46
|
-
type CommandRun<ARGS> = (ctx: CommandContext<ARGS>) => void | Promise<void>;
|
|
47
|
-
type DefineCommandOptions<A extends ArgDefinitions = EmptyArgs> = {
|
|
48
|
-
meta: CommandMeta;
|
|
49
|
-
args?: A;
|
|
50
|
-
run: CommandRun<InferArgTypes<A>>;
|
|
51
|
-
subCommands?: SubCommandsMap;
|
|
52
|
-
};
|
|
53
|
-
export type Command<A extends ArgDefinitions = EmptyArgs> = {
|
|
54
|
-
meta: CommandMeta;
|
|
55
|
-
args: A;
|
|
56
|
-
run: CommandRun<InferArgTypes<A>>;
|
|
57
|
-
subCommands?: SubCommandsMap;
|
|
58
|
-
};
|
|
59
|
-
export type InferArgTypes<A extends ArgDefinitions> = {
|
|
60
|
-
[K in keyof A]: A[K] extends PositionalArgDefinition ? string : A[K] extends BooleanArgDefinition ? boolean : A[K] extends StringArgDefinition ? string : A[K] extends NumberArgDefinition ? number : A[K] extends ArrayArgDefinition ? string[] : never;
|
|
61
|
-
};
|
|
62
|
-
export type FileBasedCmdsOptions = {
|
|
63
|
-
enable: boolean;
|
|
64
|
-
cmdsRootPath: string;
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* Defines a command with metadata, argument definitions,
|
|
68
|
-
* an execution function, and (optional) subCommands.
|
|
69
|
-
*/
|
|
70
|
-
export declare function defineCommand<A extends ArgDefinitions = EmptyArgs>(options: DefineCommandOptions<A>): Command<A>;
|
|
71
|
-
/**
|
|
72
|
-
* Show usage for a given command.
|
|
73
|
-
*/
|
|
74
|
-
export declare function showUsage<A extends ArgDefinitions>(command: Command<A>, parserOptions?: ReliArgParserOptions & {
|
|
75
|
-
fileBasedCmds?: FileBasedCmdsOptions;
|
|
76
|
-
autoExit?: boolean;
|
|
77
|
-
}): Promise<void>;
|
|
78
|
-
/**
|
|
79
|
-
* Primary entry point to run a command. This function supports:
|
|
80
|
-
*
|
|
81
|
-
* - File-based Subcommands: scanning for subcommands within a given commands root.
|
|
82
|
-
* - SubCommands defined within the command object.
|
|
83
|
-
* - Standard flags like --help, --version, and --debug.
|
|
84
|
-
*
|
|
85
|
-
* This function passes along remaining arguments to subcommand runners to ensure
|
|
86
|
-
* consistent parsing.
|
|
87
|
-
*/
|
|
88
|
-
export declare function runMain<A extends ArgDefinitions = EmptyArgs>(command: Command<A>, parserOptions?: ReliArgParserOptions & {
|
|
89
|
-
fileBasedCmds?: FileBasedCmdsOptions;
|
|
90
|
-
autoExit?: boolean;
|
|
91
|
-
}): Promise<void>;
|
|
92
|
-
export {};
|