@reliverse/rempts 1.7.65 → 2.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +1534 -1431
  3. package/cleanup.mjs +33 -0
  4. package/dist/cancel.d.ts +31 -0
  5. package/dist/cancel.js +28 -0
  6. package/dist/ffi.d.ts +1 -0
  7. package/dist/ffi.js +165 -0
  8. package/dist/group.d.ts +16 -0
  9. package/dist/group.js +22 -0
  10. package/dist/launcher/command.d.ts +8 -0
  11. package/dist/launcher/command.js +10 -0
  12. package/dist/launcher/discovery.d.ts +3 -0
  13. package/dist/launcher/discovery.js +207 -0
  14. package/dist/launcher/errors.d.ts +15 -0
  15. package/dist/launcher/errors.js +31 -0
  16. package/dist/launcher/help.d.ts +3 -0
  17. package/dist/launcher/help.js +145 -0
  18. package/dist/launcher/mod.d.ts +12 -0
  19. package/dist/launcher/mod.js +222 -0
  20. package/dist/launcher/parser.d.ts +14 -0
  21. package/dist/launcher/parser.js +255 -0
  22. package/dist/launcher/registry.d.ts +10 -0
  23. package/dist/launcher/registry.js +42 -0
  24. package/dist/launcher/types.d.ts +78 -0
  25. package/dist/launcher/validator.d.ts +3 -0
  26. package/dist/launcher/validator.js +39 -0
  27. package/dist/mod.d.ts +6 -0
  28. package/dist/mod.js +6 -0
  29. package/dist/prompt.d.ts +13 -0
  30. package/dist/prompt.js +53 -0
  31. package/dist/selection.d.ts +92 -0
  32. package/dist/selection.js +191 -0
  33. package/dist/spinner.d.ts +26 -0
  34. package/dist/spinner.js +141 -0
  35. package/dist/utils.d.ts +3 -0
  36. package/dist/utils.js +11 -0
  37. package/package.json +41 -47
  38. package/bin/libs/animate/animate-mod.ts.txt +0 -78
  39. package/bin/libs/anykey/anykey-mod.d.ts +0 -12
  40. package/bin/libs/anykey/anykey-mod.js +0 -125
  41. package/bin/libs/cancel/cancel.d.ts +0 -45
  42. package/bin/libs/cancel/cancel.js +0 -72
  43. package/bin/libs/confirm/confirm-alias.d.ts +0 -2
  44. package/bin/libs/confirm/confirm-alias.js +0 -2
  45. package/bin/libs/confirm/confirm-mod.d.ts +0 -5
  46. package/bin/libs/confirm/confirm-mod.js +0 -179
  47. package/bin/libs/date/date.d.ts +0 -2
  48. package/bin/libs/date/date.js +0 -254
  49. package/bin/libs/editor/editor-mod.d.ts +0 -25
  50. package/bin/libs/editor/editor-mod.js +0 -1133
  51. package/bin/libs/figures/figures-mod.d.ts +0 -461
  52. package/bin/libs/figures/figures-mod.js +0 -285
  53. package/bin/libs/group/group-mod.d.ts +0 -33
  54. package/bin/libs/group/group-mod.js +0 -89
  55. package/bin/libs/input/input-alias.d.ts +0 -5
  56. package/bin/libs/input/input-alias.js +0 -4
  57. package/bin/libs/input/input-mod.d.ts +0 -16
  58. package/bin/libs/input/input-mod.js +0 -370
  59. package/bin/libs/intro/intro-alias.d.ts +0 -3
  60. package/bin/libs/intro/intro-alias.js +0 -3
  61. package/bin/libs/intro/intro-mod.d.ts +0 -19
  62. package/bin/libs/intro/intro-mod.js +0 -71
  63. package/bin/libs/launcher/command-runner.d.ts +0 -31
  64. package/bin/libs/launcher/command-runner.js +0 -229
  65. package/bin/libs/launcher/launcher-alias.d.ts +0 -2
  66. package/bin/libs/launcher/launcher-alias.js +0 -2
  67. package/bin/libs/launcher/launcher-mod.d.ts +0 -66
  68. package/bin/libs/launcher/launcher-mod.js +0 -1037
  69. package/bin/libs/launcher/launcher-types.d.ts +0 -176
  70. package/bin/libs/launcher/launcher-types.js +0 -0
  71. package/bin/libs/log/log-alias.d.ts +0 -1
  72. package/bin/libs/log/log-alias.js +0 -2
  73. package/bin/libs/msg-fmt/colors.d.ts +0 -30
  74. package/bin/libs/msg-fmt/colors.js +0 -42
  75. package/bin/libs/msg-fmt/mapping.d.ts +0 -3
  76. package/bin/libs/msg-fmt/mapping.js +0 -41
  77. package/bin/libs/msg-fmt/messages.d.ts +0 -35
  78. package/bin/libs/msg-fmt/messages.js +0 -305
  79. package/bin/libs/msg-fmt/terminal.d.ts +0 -15
  80. package/bin/libs/msg-fmt/terminal.js +0 -60
  81. package/bin/libs/msg-fmt/variants.d.ts +0 -11
  82. package/bin/libs/msg-fmt/variants.js +0 -52
  83. package/bin/libs/multiselect/multiselect-alias.d.ts +0 -2
  84. package/bin/libs/multiselect/multiselect-alias.js +0 -2
  85. package/bin/libs/multiselect/multiselect-prompt.d.ts +0 -2
  86. package/bin/libs/multiselect/multiselect-prompt.js +0 -340
  87. package/bin/libs/next-steps/next-steps.d.ts +0 -13
  88. package/bin/libs/next-steps/next-steps.js +0 -24
  89. package/bin/libs/number/number-mod.d.ts +0 -28
  90. package/bin/libs/number/number-mod.js +0 -234
  91. package/bin/libs/outro/outro-alias.d.ts +0 -3
  92. package/bin/libs/outro/outro-alias.js +0 -3
  93. package/bin/libs/outro/outro-mod.d.ts +0 -7
  94. package/bin/libs/outro/outro-mod.js +0 -49
  95. package/bin/libs/reliarg/reliarg-mod.d.ts +0 -76
  96. package/bin/libs/reliarg/reliarg-mod.js +0 -276
  97. package/bin/libs/results/results.d.ts +0 -7
  98. package/bin/libs/results/results.js +0 -27
  99. package/bin/libs/select/nummultiselect-prompt.d.ts +0 -6
  100. package/bin/libs/select/nummultiselect-prompt.js +0 -141
  101. package/bin/libs/select/numselect-prompt.d.ts +0 -7
  102. package/bin/libs/select/numselect-prompt.js +0 -111
  103. package/bin/libs/select/select-alias.d.ts +0 -9
  104. package/bin/libs/select/select-alias.js +0 -9
  105. package/bin/libs/select/select-prompt.d.ts +0 -5
  106. package/bin/libs/select/select-prompt.js +0 -311
  107. package/bin/libs/select/toggle-prompt.d.ts +0 -5
  108. package/bin/libs/select/toggle-prompt.js +0 -207
  109. package/bin/libs/spinner/spinner-impl.d.ts +0 -70
  110. package/bin/libs/spinner/spinner-impl.js +0 -336
  111. package/bin/libs/spinner/spinner-mod.d.ts +0 -167
  112. package/bin/libs/spinner/spinner-mod.js +0 -447
  113. package/bin/libs/utils/colorize.d.ts +0 -2
  114. package/bin/libs/utils/colorize.js +0 -122
  115. package/bin/libs/utils/errors.d.ts +0 -1
  116. package/bin/libs/utils/errors.js +0 -17
  117. package/bin/libs/utils/prevent.d.ts +0 -8
  118. package/bin/libs/utils/prevent.js +0 -62
  119. package/bin/libs/utils/prompt-end.d.ts +0 -8
  120. package/bin/libs/utils/prompt-end.js +0 -36
  121. package/bin/libs/utils/stream-text.d.ts +0 -18
  122. package/bin/libs/utils/stream-text.js +0 -138
  123. package/bin/libs/utils/system.d.ts +0 -6
  124. package/bin/libs/utils/system.js +0 -7
  125. package/bin/libs/utils/validate.d.ts +0 -21
  126. package/bin/libs/utils/validate.js +0 -17
  127. package/bin/libs/visual/visual-mod.ts.txt +0 -19
  128. package/bin/mod.d.ts +0 -50
  129. package/bin/mod.js +0 -127
  130. package/bin/types.d.ts +0 -372
  131. /package/{bin → dist/launcher}/types.js +0 -0
package/bin/types.d.ts DELETED
@@ -1,372 +0,0 @@
1
- export type MsgType = "M_NULL" | "M_INFO_NULL" | "M_START" | "M_MIDDLE" | "M_GENERAL" | "M_GENERAL_NULL" | "M_INFO" | "M_ERROR" | "M_ERROR_NULL" | "M_END" | "M_NEWLINE" | "M_BAR";
2
- export type TypographyName = "bold" | "strikethrough" | "underline" | "italic" | "none";
3
- export type BorderColorName = "reset" | "inverse" | "dim" | "black" | "red" | "redBright" | "green" | "greenBright" | "yellow" | "yellowBright" | "blue" | "blueBright" | "magenta" | "magentaBright" | "cyan" | "cyanBright" | "bgCyan" | "bgCyanBright" | "white" | "gray";
4
- export type ColorName = BorderColorName | "gradientGradient" | "rainbowGradient" | "cristalGradient" | "mindGradient" | "passionGradient" | "viceGradient" | "retroGradient" | "none";
5
- type AnimationName = "rainbow" | "pulse" | "glitch" | "radar" | "neon" | "karaoke";
6
- export type VariantName = "doubleBox" | "none";
7
- export interface MsgConfig {
8
- symbol: string;
9
- prefix?: string;
10
- color?: (text: string) => string;
11
- newLineBefore?: boolean;
12
- newLineAfter?: boolean;
13
- suffix?: string;
14
- }
15
- export interface PromptOptions {
16
- schema?: any;
17
- title?: string;
18
- titleColor?: ColorName;
19
- titleTypography?: TypographyName;
20
- titleVariant?: VariantName;
21
- titleAnimation?: AnimationName;
22
- titleAnimationDelay?: number;
23
- content?: string;
24
- contentColor?: ColorName;
25
- contentTypography?: TypographyName;
26
- contentVariant?: VariantName;
27
- hint?: string;
28
- placeholder?: string;
29
- validate?: (value: any) => boolean | string | undefined | Promise<boolean | string | undefined>;
30
- defaultColor?: ColorName;
31
- defaultTypography?: TypographyName;
32
- choices?: ChoiceOptions[];
33
- variantOptions?: {
34
- box?: {
35
- limit?: number;
36
- };
37
- };
38
- action?: () => Promise<void>;
39
- border?: boolean;
40
- borderColor?: BorderColorName;
41
- additionalLinesToDelete?: number;
42
- hintPlaceholderColor?: ColorName;
43
- hints?: string[];
44
- required?: boolean;
45
- initial?: any[];
46
- endTitle?: string;
47
- endTitleColor?: ColorName;
48
- horizontalLine?: boolean;
49
- horizontalLineLength?: number;
50
- symbol?: string;
51
- customSymbol?: string;
52
- }
53
- interface ChoiceRequiredOptions {
54
- id: string;
55
- title: string;
56
- }
57
- interface ChoiceOptionalOptions {
58
- description?: string;
59
- titleTypography?: TypographyName;
60
- action?: () => Promise<void>;
61
- }
62
- export type ChoiceOptions = ChoiceRequiredOptions & ChoiceOptionalOptions;
63
- export interface SelectOption<T> {
64
- value: T;
65
- label: string;
66
- hint?: string;
67
- disabled?: boolean;
68
- }
69
- /**
70
- * Standard terminal colors supported by most terminals
71
- */
72
- export type StandardColor = "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray";
73
- /**
74
- * All possible output colors including special colors
75
- */
76
- export type OutputColor = StandardColor | "dim";
77
- export interface EditorExitResult {
78
- saved: boolean;
79
- content: string | null;
80
- filename: string | null;
81
- }
82
- export type MessageKind = "log" | "info" | "warn" | "error" | "success";
83
- type VerboseKind = `${MessageKind}-verbose`;
84
- export type AllKinds = MessageKind | VerboseKind;
85
- export interface MessageConfig {
86
- type: "M_INFO" | "M_ERROR";
87
- titleColor?: "retroGradient" | "viceGradient" | "yellowBright";
88
- titleTypography?: "bold";
89
- contentColor?: "dim";
90
- contentTypography?: "italic";
91
- }
92
- export interface StreamOptions {
93
- delay?: number;
94
- spinner?: {
95
- frames?: string[];
96
- delay?: number;
97
- };
98
- }
99
- export interface ProgressBarOptions {
100
- total: number;
101
- width?: number;
102
- completeChar?: string;
103
- incompleteChar?: string;
104
- format?: string;
105
- colorize?: boolean;
106
- increment?: number;
107
- desiredTotalTime?: number;
108
- }
109
- export interface ProgressBar {
110
- update: (value: number) => Promise<void>;
111
- increment: (amount?: number) => Promise<void>;
112
- render: () => Promise<void>;
113
- }
114
- /**
115
- * Union type for available prompt types.
116
- */
117
- export type PromptType = "input" | "inputmasked" | "select" | "multiselect" | "nummultiselect" | "numselect" | "toggle" | "confirm" | "spinner" | "progressbar" | "results" | "nextsteps" | "date" | "end";
118
- export interface ConfirmPromptOptions {
119
- title?: string;
120
- message?: string;
121
- defaultValue?: boolean;
122
- initialValue?: boolean;
123
- content?: string;
124
- titleColor?: ColorName;
125
- titleTypography?: TypographyName;
126
- titleVariant?: VariantName;
127
- contentColor?: ColorName;
128
- contentTypography?: TypographyName;
129
- contentVariant?: VariantName;
130
- borderColor?: BorderColorName;
131
- hintPlaceholderColor?: ColorName;
132
- variantOptions?: any;
133
- action?: () => Promise<void>;
134
- displayInstructions?: boolean;
135
- debug?: boolean;
136
- endTitle?: string;
137
- endTitleColor?: ColorName;
138
- border?: boolean;
139
- terminalWidth?: number;
140
- }
141
- export interface StreamTextOptions {
142
- /**
143
- * Text to stream
144
- */
145
- text: string;
146
- /**
147
- * Delay between each character in milliseconds
148
- * @default 50
149
- */
150
- delay?: number;
151
- /**
152
- * Whether to show cursor while streaming
153
- * @default false
154
- */
155
- showCursor?: boolean;
156
- /**
157
- * Color to use for the text
158
- * @default undefined (no color)
159
- */
160
- color?: ColorName;
161
- /**
162
- * Whether to inject a newline at the end
163
- * @default true
164
- */
165
- newline?: boolean;
166
- /**
167
- * Whether to clear the line before streaming
168
- * @default false
169
- */
170
- clearLine?: boolean;
171
- /**
172
- * Callback function to update the spinner text
173
- */
174
- onProgress?: (currentText: string) => void;
175
- }
176
- export interface PreventWrongTerminalSizeOptions {
177
- isDev?: boolean;
178
- shouldExit?: boolean;
179
- minWidth?: number;
180
- minHeight?: number;
181
- sizeErrorDescription?: string;
182
- }
183
- /**
184
- * InputPromptOptions
185
- *
186
- * Extended options for handling user input prompts, including validation
187
- * and UI styling. Inherits from PromptOptions.
188
- */
189
- export type InputPromptOptions = {
190
- border?: boolean;
191
- borderColor?: BorderColorName;
192
- content?: string;
193
- contentColor?: ColorName;
194
- contentTypography?: TypographyName;
195
- contentVariant?: VariantName;
196
- customSymbol?: string;
197
- defaultValue?: string;
198
- initialValue?: string;
199
- endTitle?: string;
200
- endTitleColor?: ColorName;
201
- hardcoded?: {
202
- userInput?: string;
203
- errorMessage?: string;
204
- showPlaceholder?: boolean;
205
- };
206
- hint?: string;
207
- hintPlaceholderColor?: ColorName;
208
- message?: string;
209
- mode?: "plain" | "password";
210
- mask?: string;
211
- placeholder?: string;
212
- schema?: any;
213
- shouldStream?: boolean;
214
- streamDelay?: number;
215
- symbol?: SymbolName;
216
- symbolColor?: ColorName;
217
- title?: string;
218
- titleColor?: ColorName;
219
- titleTypography?: TypographyName;
220
- titleVariant?: VariantName;
221
- validate?: (value: string) => string | boolean | undefined | Promise<string | boolean | undefined>;
222
- variantOptions?: unknown;
223
- } & PromptOptions;
224
- export interface RenderParams {
225
- border: boolean;
226
- borderColor?: BorderColorName;
227
- content?: string;
228
- contentColor?: ColorName;
229
- contentTypography?: TypographyName;
230
- contentVariant?: VariantName;
231
- customSymbol?: string;
232
- errorMessage: string;
233
- hint?: string;
234
- hintPlaceholderColor?: ColorName;
235
- mask?: string;
236
- placeholder?: string;
237
- symbol?: SymbolName;
238
- symbolColor?: ColorName;
239
- title?: string;
240
- titleColor?: ColorName;
241
- titleTypography?: TypographyName;
242
- titleVariant?: VariantName;
243
- userInput: string;
244
- isRerender?: boolean;
245
- }
246
- /**
247
- * Known symbol names that will have IntelliSense support
248
- */
249
- export type SymbolName = "pointer" | "start" | "middle" | "end" | "line" | "corner_top_right" | "step_active" | "step_error" | "log" | "success" | "info" | "warn" | "error";
250
- export type Symbols = Record<SymbolName, string>;
251
- export interface FmtMsgOptions {
252
- type: MsgType;
253
- title?: string;
254
- titleAfterAnim?: string;
255
- content?: string | undefined;
256
- titleColor?: ColorName;
257
- titleTypography?: TypographyName;
258
- titleVariant?: VariantName;
259
- contentColor?: ColorName;
260
- contentTypography?: TypographyName;
261
- contentVariant?: VariantName;
262
- hint?: string;
263
- hintPlaceholderColor?: ColorName;
264
- hintTypography?: TypographyName;
265
- border?: boolean;
266
- borderColor?: ColorName;
267
- dontRemoveBar?: boolean;
268
- variantOptions?: {
269
- box?: {
270
- limit?: number;
271
- };
272
- };
273
- errorMessage?: string;
274
- addNewLineBefore?: boolean;
275
- addNewLineAfter?: boolean;
276
- placeholder?: string;
277
- horizontalLine?: boolean;
278
- horizontalLineLength?: number;
279
- terminalWidth?: number;
280
- instructions?: string;
281
- wrapTitle?: boolean;
282
- wrapContent?: boolean;
283
- symbol?: SymbolName;
284
- customSymbol?: string;
285
- symbolColor?: ColorName;
286
- noNewLine?: boolean;
287
- }
288
- export interface TogglePromptParams<T extends string> {
289
- title?: string;
290
- message?: string;
291
- content?: string;
292
- options?: [T, T];
293
- defaultValue?: T;
294
- initialValue?: T;
295
- borderColor?: BorderColorName;
296
- titleColor?: ColorName;
297
- titleTypography?: TypographyName;
298
- titleVariant?: VariantName;
299
- contentColor?: ColorName;
300
- contentTypography?: TypographyName;
301
- border?: boolean;
302
- endTitle?: string;
303
- endTitleColor?: ColorName;
304
- displayInstructions?: boolean;
305
- debug?: boolean;
306
- }
307
- export interface SeparatorOption {
308
- separator: true;
309
- width?: number;
310
- symbol?: SymbolName;
311
- }
312
- export interface SelectPromptParams<T extends string> {
313
- title?: string;
314
- message?: string;
315
- content?: string;
316
- options?: (SelectOption<T> | SeparatorOption)[];
317
- optionsArray?: {
318
- value: T;
319
- label?: string;
320
- hint?: string;
321
- }[];
322
- defaultValue?: T;
323
- initialValue?: T;
324
- required?: boolean;
325
- borderColor?: BorderColorName;
326
- titleColor?: ColorName;
327
- titleTypography?: TypographyName;
328
- titleVariant?: VariantName;
329
- contentColor?: ColorName;
330
- contentTypography?: TypographyName;
331
- border?: boolean;
332
- endTitle?: string;
333
- endTitleColor?: ColorName;
334
- debug?: boolean;
335
- terminalWidth?: number;
336
- displayInstructions?: boolean;
337
- shouldStream?: boolean;
338
- streamDelay?: number;
339
- }
340
- export interface MultiselectPromptParams<T extends string> {
341
- title?: string;
342
- message?: string;
343
- content?: string;
344
- options: (SelectOption<T> | SeparatorOption)[];
345
- defaultValue?: T[];
346
- initialValues?: T[];
347
- borderColor?: BorderColorName;
348
- titleColor?: ColorName;
349
- titleTypography?: TypographyName;
350
- titleVariant?: VariantName;
351
- contentColor?: ColorName;
352
- contentTypography?: TypographyName;
353
- border?: boolean;
354
- endTitle?: string;
355
- endTitleColor?: ColorName;
356
- debug?: boolean;
357
- terminalWidth?: number;
358
- displayInstructions?: boolean;
359
- required?: boolean;
360
- minSelect?: number;
361
- maxSelect?: number;
362
- selectAll?: boolean;
363
- }
364
- export type DatePromptOptions = PromptOptions & {
365
- dateFormat: string;
366
- dateKind: "birthday" | "other";
367
- defaultValue?: string;
368
- endTitle?: string;
369
- endTitleColor?: ColorName;
370
- border?: boolean;
371
- };
372
- export {};
File without changes