@reliverse/rempts 1.7.52 → 1.7.53

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 (105) hide show
  1. package/bin/libs/animate/animate-mod.d.ts +14 -0
  2. package/bin/libs/animate/animate-mod.js +60 -0
  3. package/bin/libs/anykey/anykey-mod.d.ts +12 -0
  4. package/bin/libs/anykey/anykey-mod.js +125 -0
  5. package/bin/libs/cancel/cancel.d.ts +45 -0
  6. package/bin/libs/cancel/cancel.js +72 -0
  7. package/bin/libs/confirm/confirm-alias.d.ts +2 -0
  8. package/bin/libs/confirm/confirm-alias.js +2 -0
  9. package/bin/libs/confirm/confirm-mod.d.ts +5 -0
  10. package/bin/libs/confirm/confirm-mod.js +179 -0
  11. package/bin/libs/date/date.d.ts +2 -0
  12. package/bin/libs/date/date.js +214 -0
  13. package/bin/libs/editor/editor-mod.d.ts +25 -0
  14. package/bin/libs/editor/editor-mod.js +1133 -0
  15. package/bin/libs/figures/figures-mod.d.ts +461 -0
  16. package/bin/libs/figures/figures-mod.js +285 -0
  17. package/bin/libs/group/group-mod.d.ts +33 -0
  18. package/bin/libs/group/group-mod.js +89 -0
  19. package/bin/libs/input/input-alias.d.ts +5 -0
  20. package/bin/libs/input/input-alias.js +4 -0
  21. package/bin/libs/input/input-mod.d.ts +16 -0
  22. package/bin/libs/input/input-mod.js +372 -0
  23. package/bin/libs/intro/intro-alias.d.ts +3 -0
  24. package/bin/libs/intro/intro-alias.js +3 -0
  25. package/bin/libs/intro/intro-mod.d.ts +20 -0
  26. package/bin/libs/intro/intro-mod.js +77 -0
  27. package/bin/libs/launcher/command-runner.d.ts +31 -0
  28. package/bin/libs/launcher/command-runner.js +229 -0
  29. package/bin/libs/launcher/launcher-alias.d.ts +2 -0
  30. package/bin/libs/launcher/launcher-alias.js +2 -0
  31. package/bin/libs/launcher/launcher-mod.d.ts +66 -0
  32. package/bin/libs/launcher/launcher-mod.js +975 -0
  33. package/bin/libs/launcher/launcher-types.d.ts +176 -0
  34. package/bin/libs/launcher/launcher-types.js +0 -0
  35. package/bin/libs/log/log-alias.d.ts +1 -0
  36. package/bin/libs/log/log-alias.js +2 -0
  37. package/bin/libs/msg-fmt/colors.d.ts +30 -0
  38. package/bin/libs/msg-fmt/colors.js +42 -0
  39. package/bin/libs/msg-fmt/logger.d.ts +17 -0
  40. package/bin/libs/msg-fmt/logger.js +103 -0
  41. package/bin/libs/msg-fmt/mapping.d.ts +3 -0
  42. package/bin/libs/msg-fmt/mapping.js +41 -0
  43. package/bin/libs/msg-fmt/messages.d.ts +35 -0
  44. package/bin/libs/msg-fmt/messages.js +305 -0
  45. package/bin/libs/msg-fmt/terminal.d.ts +15 -0
  46. package/bin/libs/msg-fmt/terminal.js +60 -0
  47. package/bin/libs/msg-fmt/variants.d.ts +11 -0
  48. package/bin/libs/msg-fmt/variants.js +52 -0
  49. package/bin/libs/multiselect/multiselect-alias.d.ts +2 -0
  50. package/bin/libs/multiselect/multiselect-alias.js +2 -0
  51. package/bin/libs/multiselect/multiselect-prompt.d.ts +2 -0
  52. package/bin/libs/multiselect/multiselect-prompt.js +340 -0
  53. package/bin/libs/next-steps/next-steps.d.ts +13 -0
  54. package/bin/libs/next-steps/next-steps.js +24 -0
  55. package/bin/libs/number/number-mod.d.ts +28 -0
  56. package/bin/libs/number/number-mod.js +194 -0
  57. package/bin/libs/outro/outro-alias.d.ts +3 -0
  58. package/bin/libs/outro/outro-alias.js +3 -0
  59. package/bin/libs/outro/outro-mod.d.ts +8 -0
  60. package/bin/libs/outro/outro-mod.js +55 -0
  61. package/bin/libs/reliarg/reliarg-mod.d.ts +76 -0
  62. package/bin/libs/reliarg/reliarg-mod.js +276 -0
  63. package/bin/libs/results/results.d.ts +7 -0
  64. package/bin/libs/results/results.js +27 -0
  65. package/bin/libs/select/nummultiselect-prompt.d.ts +6 -0
  66. package/bin/libs/select/nummultiselect-prompt.js +101 -0
  67. package/bin/libs/select/numselect-prompt.d.ts +7 -0
  68. package/bin/libs/select/numselect-prompt.js +111 -0
  69. package/bin/libs/select/select-alias.d.ts +9 -0
  70. package/bin/libs/select/select-alias.js +9 -0
  71. package/bin/libs/select/select-prompt.d.ts +5 -0
  72. package/bin/libs/select/select-prompt.js +308 -0
  73. package/bin/libs/select/toggle-prompt.d.ts +5 -0
  74. package/bin/libs/select/toggle-prompt.js +207 -0
  75. package/bin/libs/spinner/spinner-alias.d.ts +2 -0
  76. package/bin/libs/spinner/spinner-alias.js +2 -0
  77. package/bin/libs/spinner/spinner-mod.d.ts +106 -0
  78. package/bin/libs/spinner/spinner-mod.js +255 -0
  79. package/bin/libs/task/progress.d.ts +2 -0
  80. package/bin/libs/task/progress.js +57 -0
  81. package/bin/libs/task/task-spin.d.ts +15 -0
  82. package/bin/libs/task/task-spin.js +106 -0
  83. package/bin/libs/utils/colorize.d.ts +2 -0
  84. package/bin/libs/utils/colorize.js +122 -0
  85. package/bin/libs/utils/errors.d.ts +1 -0
  86. package/bin/libs/utils/errors.js +17 -0
  87. package/bin/libs/utils/prevent.d.ts +8 -0
  88. package/bin/libs/utils/prevent.js +62 -0
  89. package/bin/libs/utils/prompt-end.d.ts +8 -0
  90. package/bin/libs/utils/prompt-end.js +34 -0
  91. package/bin/libs/utils/stream-text.d.ts +18 -0
  92. package/bin/libs/utils/stream-text.js +137 -0
  93. package/bin/libs/utils/system.d.ts +6 -0
  94. package/bin/libs/utils/system.js +7 -0
  95. package/bin/libs/utils/validate.d.ts +21 -0
  96. package/bin/libs/utils/validate.js +17 -0
  97. package/bin/libs/visual/visual-mod.d.ts +6 -0
  98. package/bin/libs/visual/visual-mod.js +13 -0
  99. package/bin/mod.d.ts +53 -0
  100. package/bin/mod.js +107 -0
  101. package/bin/types.d.ts +371 -0
  102. package/bin/types.js +0 -0
  103. package/package.json +34 -59
  104. package/dist-npm/bin/mod.d.mts +0 -1753
  105. package/dist-npm/bin/mod.mjs +0 -6779
@@ -1,1753 +0,0 @@
1
- import { AnimationName as AnimationName$1, Animation } from '@figliolia/chalk-animation';
2
- import { Readable, Writable } from 'node:stream';
3
- import { Fonts } from 'figlet';
4
- import * as _reliverse_relinka from '@reliverse/relinka';
5
- import { SpinnerName } from 'cli-spinners';
6
- import * as _reliverse_runtime from '@reliverse/runtime';
7
-
8
- 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";
9
- type TypographyName = "bold" | "strikethrough" | "underline" | "italic" | "none";
10
- type BorderColorName = "reset" | "inverse" | "dim" | "black" | "red" | "redBright" | "green" | "greenBright" | "yellow" | "yellowBright" | "blue" | "blueBright" | "magenta" | "magentaBright" | "cyan" | "cyanBright" | "bgCyan" | "bgCyanBright" | "white" | "gray";
11
- type ColorName = BorderColorName | "gradientGradient" | "rainbowGradient" | "cristalGradient" | "mindGradient" | "passionGradient" | "viceGradient" | "retroGradient" | "none";
12
- type AnimationName = "rainbow" | "pulse" | "glitch" | "radar" | "neon" | "karaoke";
13
- type VariantName$1 = "doubleBox" | "none";
14
- interface MsgConfig {
15
- symbol: string;
16
- prefix?: string;
17
- color?: (text: string) => string;
18
- newLineBefore?: boolean;
19
- newLineAfter?: boolean;
20
- suffix?: string;
21
- }
22
- interface PromptOptions {
23
- schema?: any;
24
- title?: string;
25
- titleColor?: ColorName;
26
- titleTypography?: TypographyName;
27
- titleVariant?: VariantName$1;
28
- titleAnimation?: AnimationName;
29
- titleAnimationDelay?: number;
30
- content?: string;
31
- contentColor?: ColorName;
32
- contentTypography?: TypographyName;
33
- contentVariant?: VariantName$1;
34
- hint?: string;
35
- placeholder?: string;
36
- validate?: (value: any) => boolean | string | undefined | Promise<boolean | string | undefined>;
37
- defaultColor?: ColorName;
38
- defaultTypography?: TypographyName;
39
- choices?: ChoiceOptions[];
40
- variantOptions?: {
41
- box?: {
42
- limit?: number;
43
- };
44
- };
45
- action?: () => Promise<void>;
46
- border?: boolean;
47
- borderColor?: BorderColorName;
48
- additionalLinesToDelete?: number;
49
- hintPlaceholderColor?: ColorName;
50
- hints?: string[];
51
- required?: boolean;
52
- initial?: any[];
53
- endTitle?: string;
54
- endTitleColor?: ColorName;
55
- horizontalLine?: boolean;
56
- horizontalLineLength?: number;
57
- symbol?: string;
58
- customSymbol?: string;
59
- }
60
- interface ChoiceRequiredOptions {
61
- id: string;
62
- title: string;
63
- }
64
- interface ChoiceOptionalOptions {
65
- description?: string;
66
- titleTypography?: TypographyName;
67
- action?: () => Promise<void>;
68
- }
69
- type ChoiceOptions = ChoiceRequiredOptions & ChoiceOptionalOptions;
70
- interface SelectOption<T> {
71
- value: T;
72
- label: string;
73
- hint?: string;
74
- disabled?: boolean;
75
- }
76
- /**
77
- * Standard terminal colors supported by most terminals
78
- */
79
- type StandardColor = "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray";
80
- /**
81
- * All possible output colors including special colors
82
- */
83
- type OutputColor = StandardColor | "dim";
84
- interface EditorExitResult {
85
- saved: boolean;
86
- content: string | null;
87
- filename: string | null;
88
- }
89
- type MessageKind = "log" | "info" | "warn" | "error" | "success";
90
- type VerboseKind = `${MessageKind}-verbose`;
91
- type AllKinds = MessageKind | VerboseKind;
92
- interface MessageConfig {
93
- type: "M_INFO" | "M_ERROR";
94
- titleColor?: "retroGradient" | "viceGradient" | "yellowBright";
95
- titleTypography?: "bold";
96
- contentColor?: "dim";
97
- contentTypography?: "italic";
98
- }
99
- interface StreamOptions {
100
- delay?: number;
101
- useSpinner?: boolean;
102
- spinnerFrames?: string[];
103
- spinnerDelay?: number;
104
- }
105
- interface ProgressBarOptions {
106
- total: number;
107
- width?: number;
108
- completeChar?: string;
109
- incompleteChar?: string;
110
- format?: string;
111
- colorize?: boolean;
112
- increment?: number;
113
- desiredTotalTime?: number;
114
- }
115
- interface ProgressBar {
116
- update: (value: number) => Promise<void>;
117
- increment: (amount?: number) => Promise<void>;
118
- render: () => Promise<void>;
119
- }
120
- /**
121
- * Union type for available prompt types.
122
- */
123
- type PromptType = "input" | "inputmasked" | "select" | "multiselect" | "nummultiselect" | "numselect" | "toggle" | "confirm" | "spinner" | "progressbar" | "results" | "nextsteps" | "animatedtext" | "date" | "end";
124
- interface ConfirmPromptOptions {
125
- title?: string;
126
- message?: string;
127
- defaultValue?: boolean;
128
- initialValue?: boolean;
129
- content?: string;
130
- titleColor?: ColorName;
131
- titleTypography?: TypographyName;
132
- titleVariant?: VariantName$1;
133
- contentColor?: ColorName;
134
- contentTypography?: TypographyName;
135
- contentVariant?: VariantName$1;
136
- borderColor?: BorderColorName;
137
- hintPlaceholderColor?: ColorName;
138
- variantOptions?: any;
139
- action?: () => Promise<void>;
140
- displayInstructions?: boolean;
141
- debug?: boolean;
142
- endTitle?: string;
143
- endTitleColor?: ColorName;
144
- border?: boolean;
145
- terminalWidth?: number;
146
- }
147
- interface StreamTextOptions {
148
- /**
149
- * Text to stream
150
- */
151
- text: string;
152
- /**
153
- * Delay between each character in milliseconds
154
- * @default 50
155
- */
156
- delay?: number;
157
- /**
158
- * Whether to show cursor while streaming
159
- * @default false
160
- */
161
- showCursor?: boolean;
162
- /**
163
- * Color to use for the text
164
- * @default undefined (no color)
165
- */
166
- color?: ColorName;
167
- /**
168
- * Whether to inject a newline at the end
169
- * @default true
170
- */
171
- newline?: boolean;
172
- /**
173
- * Whether to clear the line before streaming
174
- * @default false
175
- */
176
- clearLine?: boolean;
177
- /**
178
- * Callback function to update the spinner text
179
- */
180
- onProgress?: (currentText: string) => void;
181
- }
182
- interface PreventWrongTerminalSizeOptions {
183
- isDev?: boolean;
184
- shouldExit?: boolean;
185
- minWidth?: number;
186
- minHeight?: number;
187
- sizeErrorDescription?: string;
188
- }
189
- /**
190
- * InputPromptOptions
191
- *
192
- * Extended options for handling user input prompts, including validation
193
- * and UI styling. Inherits from PromptOptions.
194
- */
195
- type InputPromptOptions = {
196
- border?: boolean;
197
- borderColor?: BorderColorName;
198
- content?: string;
199
- contentColor?: ColorName;
200
- contentTypography?: TypographyName;
201
- contentVariant?: VariantName$1;
202
- customSymbol?: string;
203
- defaultValue?: string;
204
- initialValue?: string;
205
- endTitle?: string;
206
- endTitleColor?: ColorName;
207
- hardcoded?: {
208
- userInput?: string;
209
- errorMessage?: string;
210
- showPlaceholder?: boolean;
211
- };
212
- hint?: string;
213
- hintPlaceholderColor?: ColorName;
214
- message?: string;
215
- mode?: "plain" | "password";
216
- mask?: string;
217
- placeholder?: string;
218
- schema?: any;
219
- shouldStream?: boolean;
220
- streamDelay?: number;
221
- symbol?: SymbolName;
222
- symbolColor?: ColorName;
223
- title?: string;
224
- titleColor?: ColorName;
225
- titleTypography?: TypographyName;
226
- titleVariant?: VariantName$1;
227
- validate?: (value: string) => string | boolean | undefined | Promise<string | boolean | undefined>;
228
- variantOptions?: unknown;
229
- } & PromptOptions;
230
- interface RenderParams {
231
- border: boolean;
232
- borderColor?: BorderColorName;
233
- content?: string;
234
- contentColor?: ColorName;
235
- contentTypography?: TypographyName;
236
- contentVariant?: VariantName$1;
237
- customSymbol?: string;
238
- errorMessage: string;
239
- hint?: string;
240
- hintPlaceholderColor?: ColorName;
241
- mask?: string;
242
- placeholder?: string;
243
- symbol?: SymbolName;
244
- symbolColor?: ColorName;
245
- title?: string;
246
- titleColor?: ColorName;
247
- titleTypography?: TypographyName;
248
- titleVariant?: VariantName$1;
249
- userInput: string;
250
- isRerender?: boolean;
251
- }
252
- /**
253
- * Known symbol names that will have IntelliSense support
254
- */
255
- type SymbolName = "pointer" | "start" | "middle" | "end" | "line" | "corner_top_right" | "step_active" | "step_error" | "log" | "success" | "info" | "warn" | "error";
256
- type Symbols = Record<SymbolName, string>;
257
- interface FmtMsgOptions {
258
- type: MsgType;
259
- title?: string;
260
- titleAfterAnim?: string;
261
- content?: string | undefined;
262
- titleColor?: ColorName;
263
- titleTypography?: TypographyName;
264
- titleVariant?: VariantName$1;
265
- contentColor?: ColorName;
266
- contentTypography?: TypographyName;
267
- contentVariant?: VariantName$1;
268
- hint?: string;
269
- hintPlaceholderColor?: ColorName;
270
- hintTypography?: TypographyName;
271
- border?: boolean;
272
- borderColor?: ColorName;
273
- dontRemoveBar?: boolean;
274
- variantOptions?: {
275
- box?: {
276
- limit?: number;
277
- };
278
- };
279
- errorMessage?: string;
280
- addNewLineBefore?: boolean;
281
- addNewLineAfter?: boolean;
282
- placeholder?: string;
283
- horizontalLine?: boolean;
284
- horizontalLineLength?: number;
285
- terminalWidth?: number;
286
- instructions?: string;
287
- wrapTitle?: boolean;
288
- wrapContent?: boolean;
289
- symbol?: SymbolName;
290
- customSymbol?: string;
291
- symbolColor?: ColorName;
292
- noNewLine?: boolean;
293
- }
294
- interface TogglePromptParams<T extends string> {
295
- title?: string;
296
- message?: string;
297
- content?: string;
298
- options?: [T, T];
299
- defaultValue?: T;
300
- initialValue?: T;
301
- borderColor?: BorderColorName;
302
- titleColor?: ColorName;
303
- titleTypography?: TypographyName;
304
- titleVariant?: VariantName$1;
305
- contentColor?: ColorName;
306
- contentTypography?: TypographyName;
307
- border?: boolean;
308
- endTitle?: string;
309
- endTitleColor?: ColorName;
310
- displayInstructions?: boolean;
311
- debug?: boolean;
312
- }
313
- interface SeparatorOption {
314
- separator: true;
315
- width?: number;
316
- symbol?: SymbolName;
317
- }
318
- interface SelectPromptParams<T extends string> {
319
- title?: string;
320
- message?: string;
321
- content?: string;
322
- options?: (SelectOption<T> | SeparatorOption)[];
323
- optionsArray?: {
324
- value: T;
325
- label?: string;
326
- hint?: string;
327
- }[];
328
- defaultValue?: T;
329
- initialValue?: T;
330
- required?: boolean;
331
- borderColor?: BorderColorName;
332
- titleColor?: ColorName;
333
- titleTypography?: TypographyName;
334
- titleVariant?: VariantName$1;
335
- contentColor?: ColorName;
336
- contentTypography?: TypographyName;
337
- border?: boolean;
338
- endTitle?: string;
339
- endTitleColor?: ColorName;
340
- debug?: boolean;
341
- terminalWidth?: number;
342
- displayInstructions?: boolean;
343
- shouldStream?: boolean;
344
- streamDelay?: number;
345
- }
346
- interface MultiselectPromptParams<T extends string> {
347
- title?: string;
348
- message?: string;
349
- content?: string;
350
- options: (SelectOption<T> | SeparatorOption)[];
351
- defaultValue?: T[];
352
- initialValues?: T[];
353
- borderColor?: BorderColorName;
354
- titleColor?: ColorName;
355
- titleTypography?: TypographyName;
356
- titleVariant?: VariantName$1;
357
- contentColor?: ColorName;
358
- contentTypography?: TypographyName;
359
- border?: boolean;
360
- endTitle?: string;
361
- endTitleColor?: ColorName;
362
- debug?: boolean;
363
- terminalWidth?: number;
364
- displayInstructions?: boolean;
365
- required?: boolean;
366
- minSelect?: number;
367
- maxSelect?: number;
368
- selectAll?: boolean;
369
- }
370
- type DatePromptOptions = PromptOptions & {
371
- dateFormat: string;
372
- dateKind: "birthday" | "other";
373
- defaultValue?: string;
374
- endTitle?: string;
375
- endTitleColor?: ColorName;
376
- border?: boolean;
377
- };
378
-
379
- declare const animationMap: Record<AnimationName$1, (text: string) => Animation>;
380
- declare function animateText({ title, anim, delay, type, titleColor, titleTypography, border, borderColor, horizontalLineLength, }: {
381
- title: string;
382
- anim: AnimationName$1;
383
- delay?: number;
384
- type?: MsgType;
385
- titleColor?: ColorName;
386
- titleTypography?: TypographyName;
387
- borderColor?: BorderColorName;
388
- border?: boolean;
389
- horizontalLineLength?: number;
390
- }): Promise<void>;
391
-
392
- interface Options {
393
- ctrlC?: number | false | "reject";
394
- preserveLog?: boolean;
395
- hideMessage?: boolean;
396
- shouldStream?: boolean;
397
- streamDelay?: number;
398
- color?: ColorName;
399
- placeholderColor?: ColorName;
400
- }
401
- declare function anykeyPrompt(message?: string, options?: Options): Promise<void>;
402
-
403
- /**
404
- * Special value that indicates a cancelled operation
405
- */
406
- declare const CANCEL: unique symbol;
407
- /**
408
- * Type for the cancel value
409
- */
410
- type CancelValue = typeof CANCEL;
411
- declare const isWindows: boolean;
412
- /**
413
- * Sets raw mode on input stream
414
- */
415
- declare function setRawMode(input: Readable, value: boolean): void;
416
- /**
417
- * Gets the number of columns in the terminal
418
- */
419
- declare function getColumns(output: Writable): number;
420
- interface BlockOptions {
421
- input?: Readable;
422
- output?: Writable;
423
- overwrite?: boolean;
424
- hideCursor?: boolean;
425
- }
426
- /**
427
- * Creates a block for handling input with proper cursor and cleanup
428
- */
429
- declare function block({ input, output, overwrite, hideCursor, }?: BlockOptions): () => void;
430
- /**
431
- * Checks if a value represents a cancelled operation
432
- * @param value - The value to check
433
- * @returns true if the value represents a cancelled operation
434
- */
435
- declare function isCancel(value: unknown): value is CancelValue;
436
- /**
437
- * Handles cancellation of an operation
438
- * @param message - Optional message to display before exiting
439
- */
440
- declare function cancel(message?: string): never;
441
- /**
442
- * Creates a cancel value that can be returned from operations
443
- * @returns The cancel value
444
- */
445
- declare function createCancel(): CancelValue;
446
-
447
- declare const confirm: (options: ConfirmPromptOptions) => Promise<boolean>;
448
-
449
- /**
450
- * Prompts the user with a yes/no question, returning a boolean based on their input.
451
- */
452
- declare function confirmPrompt(options: ConfirmPromptOptions): Promise<boolean>;
453
-
454
- declare function datePrompt(opts: DatePromptOptions): Promise<string>;
455
-
456
- interface EditorConfig {
457
- syntaxHighlighting?: boolean;
458
- theme?: "auto" | "light" | "dark";
459
- defaultAllowSaveAs?: boolean;
460
- defaultAllowOpen?: boolean;
461
- defaultAutoCloseOnSave?: boolean;
462
- defaultReturnContentOnSave?: boolean;
463
- [key: string]: any;
464
- }
465
- interface EditorOptions {
466
- filename?: string | null;
467
- initialContent?: string | null;
468
- onSave?: (content: string, filename: string | null) => Promise<string | boolean | undefined> | string | boolean | undefined;
469
- onExit?: (content: string | null, saved: boolean, filename: string | null) => Promise<void> | void;
470
- configOverrides?: Partial<EditorConfig>;
471
- allowSaveAs?: boolean;
472
- allowOpen?: boolean;
473
- autoCloseOnSave?: boolean;
474
- returnContentOnSave?: boolean;
475
- mode?: string;
476
- cwd?: string;
477
- }
478
- declare function startEditor(options?: EditorOptions): Promise<EditorExitResult>;
479
-
480
- declare const mainSymbols: {
481
- tick: string;
482
- info: string;
483
- warning: string;
484
- cross: string;
485
- squareSmall: string;
486
- squareSmallFilled: string;
487
- circle: string;
488
- circleFilled: string;
489
- circleDotted: string;
490
- circleDouble: string;
491
- circleCircle: string;
492
- circleCross: string;
493
- circlePipe: string;
494
- radioOn: string;
495
- radioOff: string;
496
- checkboxOn: string;
497
- checkboxOff: string;
498
- checkboxCircleOn: string;
499
- checkboxCircleOff: string;
500
- pointer: string;
501
- triangleUpOutline: string;
502
- triangleLeft: string;
503
- triangleRight: string;
504
- lozenge: string;
505
- lozengeOutline: string;
506
- hamburger: string;
507
- smiley: string;
508
- mustache: string;
509
- star: string;
510
- play: string;
511
- nodejs: string;
512
- oneSeventh: string;
513
- oneNinth: string;
514
- oneTenth: string;
515
- circleQuestionMark: string;
516
- questionMarkPrefix: string;
517
- square: string;
518
- squareDarkShade: string;
519
- squareMediumShade: string;
520
- squareLightShade: string;
521
- squareTop: string;
522
- squareBottom: string;
523
- squareLeft: string;
524
- squareRight: string;
525
- squareCenter: string;
526
- bullet: string;
527
- dot: string;
528
- ellipsis: string;
529
- pointerSmall: string;
530
- triangleUp: string;
531
- triangleUpSmall: string;
532
- triangleDown: string;
533
- triangleDownSmall: string;
534
- triangleLeftSmall: string;
535
- triangleRightSmall: string;
536
- home: string;
537
- heart: string;
538
- musicNote: string;
539
- musicNoteBeamed: string;
540
- arrowUp: string;
541
- arrowDown: string;
542
- arrowLeft: string;
543
- arrowRight: string;
544
- arrowLeftRight: string;
545
- arrowUpDown: string;
546
- almostEqual: string;
547
- notEqual: string;
548
- lessOrEqual: string;
549
- greaterOrEqual: string;
550
- identical: string;
551
- infinity: string;
552
- subscriptZero: string;
553
- subscriptOne: string;
554
- subscriptTwo: string;
555
- subscriptThree: string;
556
- subscriptFour: string;
557
- subscriptFive: string;
558
- subscriptSix: string;
559
- subscriptSeven: string;
560
- subscriptEight: string;
561
- subscriptNine: string;
562
- oneHalf: string;
563
- oneThird: string;
564
- oneQuarter: string;
565
- oneFifth: string;
566
- oneSixth: string;
567
- oneEighth: string;
568
- twoThirds: string;
569
- twoFifths: string;
570
- threeQuarters: string;
571
- threeFifths: string;
572
- threeEighths: string;
573
- fourFifths: string;
574
- fiveSixths: string;
575
- fiveEighths: string;
576
- sevenEighths: string;
577
- line: string;
578
- lineBold: string;
579
- lineDouble: string;
580
- lineDashed0: string;
581
- lineDashed1: string;
582
- lineDashed2: string;
583
- lineDashed3: string;
584
- lineDashed4: string;
585
- lineDashed5: string;
586
- lineDashed6: string;
587
- lineDashed7: string;
588
- lineDashed8: string;
589
- lineDashed9: string;
590
- lineDashed10: string;
591
- lineDashed11: string;
592
- lineDashed12: string;
593
- lineDashed13: string;
594
- lineDashed14: string;
595
- lineDashed15: string;
596
- lineVertical: string;
597
- lineVerticalBold: string;
598
- lineVerticalDouble: string;
599
- lineVerticalDashed0: string;
600
- lineVerticalDashed1: string;
601
- lineVerticalDashed2: string;
602
- lineVerticalDashed3: string;
603
- lineVerticalDashed4: string;
604
- lineVerticalDashed5: string;
605
- lineVerticalDashed6: string;
606
- lineVerticalDashed7: string;
607
- lineVerticalDashed8: string;
608
- lineVerticalDashed9: string;
609
- lineVerticalDashed10: string;
610
- lineVerticalDashed11: string;
611
- lineDownLeft: string;
612
- lineDownLeftArc: string;
613
- lineDownBoldLeftBold: string;
614
- lineDownBoldLeft: string;
615
- lineDownLeftBold: string;
616
- lineDownDoubleLeftDouble: string;
617
- lineDownDoubleLeft: string;
618
- lineDownLeftDouble: string;
619
- lineDownRight: string;
620
- lineDownRightArc: string;
621
- lineDownBoldRightBold: string;
622
- lineDownBoldRight: string;
623
- lineDownRightBold: string;
624
- lineDownDoubleRightDouble: string;
625
- lineDownDoubleRight: string;
626
- lineDownRightDouble: string;
627
- lineUpLeft: string;
628
- lineUpLeftArc: string;
629
- lineUpBoldLeftBold: string;
630
- lineUpBoldLeft: string;
631
- lineUpLeftBold: string;
632
- lineUpDoubleLeftDouble: string;
633
- lineUpDoubleLeft: string;
634
- lineUpLeftDouble: string;
635
- lineUpRight: string;
636
- lineUpRightArc: string;
637
- lineUpBoldRightBold: string;
638
- lineUpBoldRight: string;
639
- lineUpRightBold: string;
640
- lineUpDoubleRightDouble: string;
641
- lineUpDoubleRight: string;
642
- lineUpRightDouble: string;
643
- lineUpDownLeft: string;
644
- lineUpBoldDownBoldLeftBold: string;
645
- lineUpBoldDownBoldLeft: string;
646
- lineUpDownLeftBold: string;
647
- lineUpBoldDownLeftBold: string;
648
- lineUpDownBoldLeftBold: string;
649
- lineUpDownBoldLeft: string;
650
- lineUpBoldDownLeft: string;
651
- lineUpDoubleDownDoubleLeftDouble: string;
652
- lineUpDoubleDownDoubleLeft: string;
653
- lineUpDownLeftDouble: string;
654
- lineUpDownRight: string;
655
- lineUpBoldDownBoldRightBold: string;
656
- lineUpBoldDownBoldRight: string;
657
- lineUpDownRightBold: string;
658
- lineUpBoldDownRightBold: string;
659
- lineUpDownBoldRightBold: string;
660
- lineUpDownBoldRight: string;
661
- lineUpBoldDownRight: string;
662
- lineUpDoubleDownDoubleRightDouble: string;
663
- lineUpDoubleDownDoubleRight: string;
664
- lineUpDownRightDouble: string;
665
- lineDownLeftRight: string;
666
- lineDownBoldLeftBoldRightBold: string;
667
- lineDownLeftBoldRightBold: string;
668
- lineDownBoldLeftRight: string;
669
- lineDownBoldLeftBoldRight: string;
670
- lineDownBoldLeftRightBold: string;
671
- lineDownLeftRightBold: string;
672
- lineDownLeftBoldRight: string;
673
- lineDownDoubleLeftDoubleRightDouble: string;
674
- lineDownDoubleLeftRight: string;
675
- lineDownLeftDoubleRightDouble: string;
676
- lineUpLeftRight: string;
677
- lineUpBoldLeftBoldRightBold: string;
678
- lineUpLeftBoldRightBold: string;
679
- lineUpBoldLeftRight: string;
680
- lineUpBoldLeftBoldRight: string;
681
- lineUpBoldLeftRightBold: string;
682
- lineUpLeftRightBold: string;
683
- lineUpLeftBoldRight: string;
684
- lineUpDoubleLeftDoubleRightDouble: string;
685
- lineUpDoubleLeftRight: string;
686
- lineUpLeftDoubleRightDouble: string;
687
- lineUpDownLeftRight: string;
688
- lineUpBoldDownBoldLeftBoldRightBold: string;
689
- lineUpDownBoldLeftBoldRightBold: string;
690
- lineUpBoldDownLeftBoldRightBold: string;
691
- lineUpBoldDownBoldLeftRightBold: string;
692
- lineUpBoldDownBoldLeftBoldRight: string;
693
- lineUpBoldDownLeftRight: string;
694
- lineUpDownBoldLeftRight: string;
695
- lineUpDownLeftBoldRight: string;
696
- lineUpDownLeftRightBold: string;
697
- lineUpBoldDownBoldLeftRight: string;
698
- lineUpDownLeftBoldRightBold: string;
699
- lineUpBoldDownLeftBoldRight: string;
700
- lineUpBoldDownLeftRightBold: string;
701
- lineUpDownBoldLeftBoldRight: string;
702
- lineUpDownBoldLeftRightBold: string;
703
- lineUpDoubleDownDoubleLeftDoubleRightDouble: string;
704
- lineUpDoubleDownDoubleLeftRight: string;
705
- lineUpDownLeftDoubleRightDouble: string;
706
- lineCross: string;
707
- lineBackslash: string;
708
- lineSlash: string;
709
- };
710
- declare const fallbackSymbols: Record<string, string>;
711
- declare const figures: {
712
- tick: string;
713
- info: string;
714
- warning: string;
715
- cross: string;
716
- squareSmall: string;
717
- squareSmallFilled: string;
718
- circle: string;
719
- circleFilled: string;
720
- circleDotted: string;
721
- circleDouble: string;
722
- circleCircle: string;
723
- circleCross: string;
724
- circlePipe: string;
725
- radioOn: string;
726
- radioOff: string;
727
- checkboxOn: string;
728
- checkboxOff: string;
729
- checkboxCircleOn: string;
730
- checkboxCircleOff: string;
731
- pointer: string;
732
- triangleUpOutline: string;
733
- triangleLeft: string;
734
- triangleRight: string;
735
- lozenge: string;
736
- lozengeOutline: string;
737
- hamburger: string;
738
- smiley: string;
739
- mustache: string;
740
- star: string;
741
- play: string;
742
- nodejs: string;
743
- oneSeventh: string;
744
- oneNinth: string;
745
- oneTenth: string;
746
- circleQuestionMark: string;
747
- questionMarkPrefix: string;
748
- square: string;
749
- squareDarkShade: string;
750
- squareMediumShade: string;
751
- squareLightShade: string;
752
- squareTop: string;
753
- squareBottom: string;
754
- squareLeft: string;
755
- squareRight: string;
756
- squareCenter: string;
757
- bullet: string;
758
- dot: string;
759
- ellipsis: string;
760
- pointerSmall: string;
761
- triangleUp: string;
762
- triangleUpSmall: string;
763
- triangleDown: string;
764
- triangleDownSmall: string;
765
- triangleLeftSmall: string;
766
- triangleRightSmall: string;
767
- home: string;
768
- heart: string;
769
- musicNote: string;
770
- musicNoteBeamed: string;
771
- arrowUp: string;
772
- arrowDown: string;
773
- arrowLeft: string;
774
- arrowRight: string;
775
- arrowLeftRight: string;
776
- arrowUpDown: string;
777
- almostEqual: string;
778
- notEqual: string;
779
- lessOrEqual: string;
780
- greaterOrEqual: string;
781
- identical: string;
782
- infinity: string;
783
- subscriptZero: string;
784
- subscriptOne: string;
785
- subscriptTwo: string;
786
- subscriptThree: string;
787
- subscriptFour: string;
788
- subscriptFive: string;
789
- subscriptSix: string;
790
- subscriptSeven: string;
791
- subscriptEight: string;
792
- subscriptNine: string;
793
- oneHalf: string;
794
- oneThird: string;
795
- oneQuarter: string;
796
- oneFifth: string;
797
- oneSixth: string;
798
- oneEighth: string;
799
- twoThirds: string;
800
- twoFifths: string;
801
- threeQuarters: string;
802
- threeFifths: string;
803
- threeEighths: string;
804
- fourFifths: string;
805
- fiveSixths: string;
806
- fiveEighths: string;
807
- sevenEighths: string;
808
- line: string;
809
- lineBold: string;
810
- lineDouble: string;
811
- lineDashed0: string;
812
- lineDashed1: string;
813
- lineDashed2: string;
814
- lineDashed3: string;
815
- lineDashed4: string;
816
- lineDashed5: string;
817
- lineDashed6: string;
818
- lineDashed7: string;
819
- lineDashed8: string;
820
- lineDashed9: string;
821
- lineDashed10: string;
822
- lineDashed11: string;
823
- lineDashed12: string;
824
- lineDashed13: string;
825
- lineDashed14: string;
826
- lineDashed15: string;
827
- lineVertical: string;
828
- lineVerticalBold: string;
829
- lineVerticalDouble: string;
830
- lineVerticalDashed0: string;
831
- lineVerticalDashed1: string;
832
- lineVerticalDashed2: string;
833
- lineVerticalDashed3: string;
834
- lineVerticalDashed4: string;
835
- lineVerticalDashed5: string;
836
- lineVerticalDashed6: string;
837
- lineVerticalDashed7: string;
838
- lineVerticalDashed8: string;
839
- lineVerticalDashed9: string;
840
- lineVerticalDashed10: string;
841
- lineVerticalDashed11: string;
842
- lineDownLeft: string;
843
- lineDownLeftArc: string;
844
- lineDownBoldLeftBold: string;
845
- lineDownBoldLeft: string;
846
- lineDownLeftBold: string;
847
- lineDownDoubleLeftDouble: string;
848
- lineDownDoubleLeft: string;
849
- lineDownLeftDouble: string;
850
- lineDownRight: string;
851
- lineDownRightArc: string;
852
- lineDownBoldRightBold: string;
853
- lineDownBoldRight: string;
854
- lineDownRightBold: string;
855
- lineDownDoubleRightDouble: string;
856
- lineDownDoubleRight: string;
857
- lineDownRightDouble: string;
858
- lineUpLeft: string;
859
- lineUpLeftArc: string;
860
- lineUpBoldLeftBold: string;
861
- lineUpBoldLeft: string;
862
- lineUpLeftBold: string;
863
- lineUpDoubleLeftDouble: string;
864
- lineUpDoubleLeft: string;
865
- lineUpLeftDouble: string;
866
- lineUpRight: string;
867
- lineUpRightArc: string;
868
- lineUpBoldRightBold: string;
869
- lineUpBoldRight: string;
870
- lineUpRightBold: string;
871
- lineUpDoubleRightDouble: string;
872
- lineUpDoubleRight: string;
873
- lineUpRightDouble: string;
874
- lineUpDownLeft: string;
875
- lineUpBoldDownBoldLeftBold: string;
876
- lineUpBoldDownBoldLeft: string;
877
- lineUpDownLeftBold: string;
878
- lineUpBoldDownLeftBold: string;
879
- lineUpDownBoldLeftBold: string;
880
- lineUpDownBoldLeft: string;
881
- lineUpBoldDownLeft: string;
882
- lineUpDoubleDownDoubleLeftDouble: string;
883
- lineUpDoubleDownDoubleLeft: string;
884
- lineUpDownLeftDouble: string;
885
- lineUpDownRight: string;
886
- lineUpBoldDownBoldRightBold: string;
887
- lineUpBoldDownBoldRight: string;
888
- lineUpDownRightBold: string;
889
- lineUpBoldDownRightBold: string;
890
- lineUpDownBoldRightBold: string;
891
- lineUpDownBoldRight: string;
892
- lineUpBoldDownRight: string;
893
- lineUpDoubleDownDoubleRightDouble: string;
894
- lineUpDoubleDownDoubleRight: string;
895
- lineUpDownRightDouble: string;
896
- lineDownLeftRight: string;
897
- lineDownBoldLeftBoldRightBold: string;
898
- lineDownLeftBoldRightBold: string;
899
- lineDownBoldLeftRight: string;
900
- lineDownBoldLeftBoldRight: string;
901
- lineDownBoldLeftRightBold: string;
902
- lineDownLeftRightBold: string;
903
- lineDownLeftBoldRight: string;
904
- lineDownDoubleLeftDoubleRightDouble: string;
905
- lineDownDoubleLeftRight: string;
906
- lineDownLeftDoubleRightDouble: string;
907
- lineUpLeftRight: string;
908
- lineUpBoldLeftBoldRightBold: string;
909
- lineUpLeftBoldRightBold: string;
910
- lineUpBoldLeftRight: string;
911
- lineUpBoldLeftBoldRight: string;
912
- lineUpBoldLeftRightBold: string;
913
- lineUpLeftRightBold: string;
914
- lineUpLeftBoldRight: string;
915
- lineUpDoubleLeftDoubleRightDouble: string;
916
- lineUpDoubleLeftRight: string;
917
- lineUpLeftDoubleRightDouble: string;
918
- lineUpDownLeftRight: string;
919
- lineUpBoldDownBoldLeftBoldRightBold: string;
920
- lineUpDownBoldLeftBoldRightBold: string;
921
- lineUpBoldDownLeftBoldRightBold: string;
922
- lineUpBoldDownBoldLeftRightBold: string;
923
- lineUpBoldDownBoldLeftBoldRight: string;
924
- lineUpBoldDownLeftRight: string;
925
- lineUpDownBoldLeftRight: string;
926
- lineUpDownLeftBoldRight: string;
927
- lineUpDownLeftRightBold: string;
928
- lineUpBoldDownBoldLeftRight: string;
929
- lineUpDownLeftBoldRightBold: string;
930
- lineUpBoldDownLeftBoldRight: string;
931
- lineUpBoldDownLeftRightBold: string;
932
- lineUpDownBoldLeftBoldRight: string;
933
- lineUpDownBoldLeftRightBold: string;
934
- lineUpDoubleDownDoubleLeftDoubleRightDouble: string;
935
- lineUpDoubleDownDoubleLeftRight: string;
936
- lineUpDownLeftDoubleRightDouble: string;
937
- lineCross: string;
938
- lineBackslash: string;
939
- lineSlash: string;
940
- } | Record<string, string>;
941
-
942
- interface GroupOptions {
943
- onCancel?: () => void;
944
- showProgress?: boolean;
945
- title?: string;
946
- }
947
- interface GroupContext<T> {
948
- results: Partial<T>;
949
- step: keyof T;
950
- stepIndex: number;
951
- totalSteps: number;
952
- }
953
- type GroupStep<T, K extends keyof T> = (context: GroupContext<T>) => Promise<T[K]> | T[K];
954
- type GroupSteps<T> = {
955
- [K in keyof T]: GroupStep<T, K>;
956
- };
957
- /**
958
- * Runs a series of prompts in sequence, where each prompt can depend on the results of previous prompts.
959
- *
960
- * @param steps Object where each key is a step name and each value is a function that returns a promise
961
- * @param options Optional configuration including onCancel callback and progress display
962
- * @returns Promise resolving to the complete results object
963
- */
964
- declare function group<T extends Record<string, any>>(steps: GroupSteps<T>, options?: GroupOptions): Promise<T>;
965
- /**
966
- * Utility function to create a step that depends on specific previous results
967
- */
968
- declare function createStep<T, K extends keyof T, D extends keyof T>(stepFunction: (context: GroupContext<T>, dependency: T[D]) => Promise<T[K]> | T[K], dependencyKey: D): GroupStep<T, K>;
969
- /**
970
- * Utility function to create a step that depends on multiple previous results
971
- */
972
- declare function createMultiStep<T, K extends keyof T, D extends (keyof T)[]>(stepFunction: (context: GroupContext<T>, dependencies: {
973
- [P in D[number]]: T[P];
974
- }) => Promise<T[K]> | T[K], dependencyKeys: D): GroupStep<T, K>;
975
-
976
- /**
977
- * inputPrompt()
978
- *
979
- * Main entry point to prompt the user for input.
980
- * - Renders a text prompt with optional hint, placeholder, and content.
981
- * - Waits for user input (supporting "plain" or "password" modes).
982
- * - Validates input with an optional TypeBox schema or custom validate() fn.
983
- * - Shows errors if invalid, re-prompts if necessary.
984
- * - Handles Ctrl+C gracefully, optionally printing an endTitle.
985
- * - Returns the user's validated input, or a default value if empty.
986
- *
987
- * @param options InputPromptOptions to customize the prompt.
988
- * @returns A Promise resolving to the validated user input (string).
989
- */
990
- declare function inputPrompt(options: InputPromptOptions): Promise<string>;
991
-
992
- declare const input: typeof inputPrompt;
993
- declare const text: typeof inputPrompt;
994
- declare const password: (options: Omit<InputPromptOptions, "mode">) => Promise<string>;
995
-
996
- type StartPromptOptions = PromptOptions & {
997
- clearConsole?: boolean;
998
- horizontalLine?: boolean;
999
- horizontalLineLength?: number;
1000
- packageName?: string;
1001
- packageVersion?: string;
1002
- terminalSizeOptions?: PreventWrongTerminalSizeOptions;
1003
- isDev?: boolean;
1004
- prevent?: {
1005
- unsupportedTTY?: boolean;
1006
- wrongTerminalSize?: boolean;
1007
- windowsHomeDirRoot?: boolean;
1008
- };
1009
- variant?: "header" | "ascii-art";
1010
- asciiArtFont?: Fonts;
1011
- };
1012
- declare function introPrompt(optionsOrTitle: StartPromptOptions | string): Promise<void>;
1013
-
1014
- declare const startPrompt: typeof introPrompt;
1015
- declare const intro: typeof introPrompt;
1016
-
1017
- /**
1018
- * Options passed to the ReliArgParser.
1019
- */
1020
- type ReliArgParserOptions = {
1021
- /**
1022
- * A list of flags that should be treated as booleans.
1023
- */
1024
- boolean?: string[];
1025
- /**
1026
- * Whether to print a warning if an unknown flag is encountered.
1027
- */
1028
- warnOnUnknown?: boolean;
1029
- /**
1030
- * Whether encountering an unknown flag should cause a thrown error.
1031
- */
1032
- strict?: boolean;
1033
- /**
1034
- * An object that maps a flag to one or more aliases (e.g. { force: "f" } or { f: ["force", "fast"] }).
1035
- */
1036
- alias?: Record<string, string | string[]>;
1037
- /**
1038
- * Default values for flags (e.g. { force: false, count: 0 }).
1039
- */
1040
- defaults?: Record<string, unknown>;
1041
- /**
1042
- * If true, allows --no-foo to set foo=false (negated booleans).
1043
- * Defaults to `true`.
1044
- */
1045
- negatedBoolean?: boolean;
1046
- /**
1047
- * A callback to determine if a flag is considered "unknown."
1048
- * If it returns false, the parser may warn or throw, depending on config.
1049
- */
1050
- unknown?: (flagName: string) => boolean;
1051
- /**
1052
- * If true, attempt to parse non-boolean string values as numbers when possible.
1053
- * Defaults to false.
1054
- */
1055
- parseNumbers?: boolean;
1056
- /**
1057
- * If true, negative numbers like -123 will not be treated as short flags
1058
- * and will be parsed as positional values.
1059
- * Defaults to true (commonly desired).
1060
- */
1061
- allowNegativeNumbers?: boolean;
1062
- /**
1063
- * If true, stop parsing flags at the first positional argument,
1064
- * pushing all subsequent arguments into result._.
1065
- * Defaults to false.
1066
- */
1067
- stopEarly?: boolean;
1068
- /**
1069
- * A list of flags that should be collected as arrays if repeated.
1070
- * e.g. { array: ["include"] } => --include file1 --include file2
1071
- * results in { include: ["file1", "file2"] }
1072
- */
1073
- array?: string[];
1074
- /**
1075
- * A list of flags that should always be treated as strings (ignoring parseNumbers).
1076
- */
1077
- string?: string[];
1078
- };
1079
-
1080
- type EmptyArgs = Record<string, never>;
1081
- interface BaseArgProps {
1082
- description?: string;
1083
- required?: boolean;
1084
- allowed?: readonly string[];
1085
- }
1086
- interface BaseArgDefinition {
1087
- type: string;
1088
- description?: string;
1089
- required?: boolean;
1090
- default?: any;
1091
- allowed?: readonly any[];
1092
- dependencies?: string[];
1093
- }
1094
- type PositionalArgDefinition = BaseArgDefinition & {
1095
- type: "positional";
1096
- default?: string;
1097
- allowed?: readonly string[];
1098
- };
1099
- type BooleanArgDefinition = BaseArgDefinition & {
1100
- type: "boolean";
1101
- default?: boolean;
1102
- allowed?: readonly boolean[];
1103
- alias?: string;
1104
- };
1105
- type StringArgDefinition = BaseArgDefinition & {
1106
- type: "string";
1107
- default?: string;
1108
- allowed?: readonly string[];
1109
- alias?: string;
1110
- };
1111
- type NumberArgDefinition = BaseArgDefinition & {
1112
- type: "number";
1113
- default?: number;
1114
- allowed?: readonly number[];
1115
- alias?: string;
1116
- };
1117
- type ArrayArgDefinition = BaseArgDefinition & {
1118
- type: "array";
1119
- default?: string | readonly string[];
1120
- allowed?: readonly string[];
1121
- alias?: string;
1122
- };
1123
- type ArgDefinition = PositionalArgDefinition | BooleanArgDefinition | StringArgDefinition | NumberArgDefinition | ArrayArgDefinition;
1124
- type ArgDefinitions = Record<string, ArgDefinition>;
1125
- interface CommandMeta {
1126
- name: string;
1127
- version?: string;
1128
- description?: string;
1129
- hidden?: boolean;
1130
- aliases?: string[];
1131
- }
1132
- /**
1133
- * A subcommand can be either:
1134
- * 1) A string path to a module with a default export of type Command.
1135
- * 2) A lazy import function returning a Promise that resolves to
1136
- * { default: Command<any> } or directly to a Command instance.
1137
- */
1138
- type CommandSpec = string | (() => Promise<{
1139
- default: Command<any>;
1140
- } | Command<any>>);
1141
- type CommandsMap = Record<string, CommandSpec>;
1142
- interface CommandContext<ARGS> {
1143
- args: ARGS;
1144
- raw: string[];
1145
- }
1146
- type CommandRun<ARGS> = (ctx: CommandContext<ARGS>) => void | Promise<void>;
1147
- type CommandHook<ARGS> = (ctx: CommandContext<ARGS>) => void | Promise<void>;
1148
- interface DefineCommandOptions<A extends ArgDefinitions = EmptyArgs> {
1149
- meta?: CommandMeta;
1150
- args?: A;
1151
- run?: CommandRun<InferArgTypes<A>>;
1152
- /**
1153
- * Object subcommands for this command.
1154
- */
1155
- commands?: CommandsMap;
1156
- /**
1157
- * @deprecated Use `commands` instead. Will be removed in a future major version.
1158
- */
1159
- subCommands?: CommandsMap;
1160
- /**
1161
- * Called before the command runs. Receives `{ args, raw }` (parsed args and raw argv).
1162
- */
1163
- onCmdInit?: CommandHook<InferArgTypes<A>>;
1164
- /**
1165
- * Called after the command finishes. Receives `{ args, raw }` (parsed args and raw argv).
1166
- */
1167
- onCmdExit?: CommandHook<InferArgTypes<A>>;
1168
- /**
1169
- * @deprecated Use onCmdInit instead
1170
- */
1171
- setup?: CommandHook<InferArgTypes<A>>;
1172
- /**
1173
- * @deprecated Use onCmdExit instead
1174
- */
1175
- cleanup?: CommandHook<InferArgTypes<A>>;
1176
- /**
1177
- * Called once per CLI process, before any command/run() is executed
1178
- */
1179
- onLauncherInit?: () => void | Promise<void>;
1180
- /**
1181
- * Called once per CLI process, after all command/run() logic is finished
1182
- */
1183
- onLauncherExit?: () => void | Promise<void>;
1184
- }
1185
- interface Command<A extends ArgDefinitions = EmptyArgs> {
1186
- meta?: CommandMeta;
1187
- args: A;
1188
- run?: CommandRun<InferArgTypes<A>>;
1189
- /**
1190
- * Object subcommands for this command.
1191
- */
1192
- commands?: CommandsMap;
1193
- /**
1194
- * @deprecated Use `commands` instead. Will be removed in a future major version.
1195
- */
1196
- subCommands?: CommandsMap;
1197
- /**
1198
- * Called before the command runs. Receives `{ args, raw }` (parsed args and raw argv).
1199
- */
1200
- onCmdInit?: CommandHook<InferArgTypes<A>>;
1201
- /**
1202
- * Called after the command finishes. Receives `{ args, raw }` (parsed args and raw argv).
1203
- */
1204
- onCmdExit?: CommandHook<InferArgTypes<A>>;
1205
- /**
1206
- * @deprecated Use onCmdInit instead
1207
- */
1208
- setup?: CommandHook<InferArgTypes<A>>;
1209
- /**
1210
- * @deprecated Use onCmdExit instead
1211
- */
1212
- cleanup?: CommandHook<InferArgTypes<A>>;
1213
- /**
1214
- * Called once per CLI process, before any command/run() is executed
1215
- */
1216
- onLauncherInit?: () => void | Promise<void>;
1217
- /**
1218
- * Called once per CLI process, after all command/run() logic is finished
1219
- */
1220
- onLauncherExit?: () => void | Promise<void>;
1221
- }
1222
- type ExtractAllowed<T extends ArgDefinition> = T extends {
1223
- type: "positional";
1224
- allowed: readonly (infer U)[];
1225
- } ? U : T extends {
1226
- type: "positional";
1227
- } ? string : T extends {
1228
- type: "boolean";
1229
- allowed: readonly (infer U)[];
1230
- } ? U : T extends {
1231
- type: "boolean";
1232
- } ? boolean : T extends {
1233
- type: "string";
1234
- allowed: readonly (infer U)[];
1235
- } ? U : T extends {
1236
- type: "string";
1237
- } ? string : T extends {
1238
- type: "number";
1239
- allowed: readonly (infer U)[];
1240
- } ? U : T extends {
1241
- type: "number";
1242
- } ? number : T extends {
1243
- type: "array";
1244
- allowed: readonly (infer U)[];
1245
- } ? U[] : T extends {
1246
- type: "array";
1247
- } ? string[] : never;
1248
- type InferArgTypes<A extends ArgDefinitions> = {
1249
- [K in keyof A]: ExtractAllowed<A[K]>;
1250
- };
1251
- interface FileBasedOptions {
1252
- enable: boolean;
1253
- cmdsRootPath: string;
1254
- }
1255
-
1256
- interface CallCmdOptions {
1257
- /** Whether to automatically exit process on errors (default: false for programmatic usage) */
1258
- autoExit?: boolean;
1259
- /** Whether to show debug output */
1260
- debug?: boolean;
1261
- /** Whether to call lifecycle hooks (onCmdInit/onCmdExit) */
1262
- useLifecycleHooks?: boolean;
1263
- /** Custom parser options for argv processing */
1264
- parserOptions?: ReliArgParserOptions;
1265
- }
1266
- /**
1267
- * Programmatically call a defineCommand command with arguments.
1268
- * Fully compatible with launcher-mod.ts execution logic.
1269
- *
1270
- * @param command - The command definition created with defineCommand()
1271
- * @param input - Either argv array (CLI-style) or args object (programmatic style)
1272
- * @param options - Optional configuration for execution
1273
- * @returns Promise resolving to the command context
1274
- *
1275
- * @example
1276
- * ```ts
1277
- * // CLI-style with argv array
1278
- * const result = await callCmd(myCommand, ['--flag', 'value', 'positional']);
1279
- *
1280
- * // Programmatic style with object
1281
- * const result = await callCmd(myCommand, { flag: true, name: 'value' });
1282
- * ```
1283
- */
1284
- declare function callCmd<A extends ArgDefinitions = EmptyArgs>(command: Command<A>, input: string[] | Partial<InferArgTypes<A>>, options?: CallCmdOptions): Promise<CommandContext<InferArgTypes<A>>>;
1285
-
1286
- /**
1287
- * Defines a command with metadata, argument definitions,
1288
- * an execution function, and (optional) subCommands.
1289
- */
1290
- declare function defineCommand<A extends ArgDefinitions = EmptyArgs>(options: DefineCommandOptions<A>): Command<A>;
1291
- /**
1292
- * Show usage for a given command.
1293
- */
1294
- declare function showUsage<A extends ArgDefinitions>(command: Command<A>, parserOptions?: ReliArgParserOptions & {
1295
- fileBased?: FileBasedOptions;
1296
- autoExit?: boolean;
1297
- metaSettings?: {
1298
- showDescriptionOnMain?: boolean;
1299
- };
1300
- _fileBasedCurrentDir?: string;
1301
- _fileBasedPathSegments?: string[];
1302
- _isSubcommand?: boolean;
1303
- }, globalCliMeta?: {
1304
- name?: string;
1305
- version?: string;
1306
- description?: string;
1307
- }): Promise<void>;
1308
- /**
1309
- * Primary entry point to run a command. This function supports:
1310
- *
1311
- * - File-based Commands: scanning for commands within a given commands root.
1312
- * - Commands defined within the command object.
1313
- * - Standard flags like --help, --version, and --debug.
1314
- *
1315
- * This function passes along remaining arguments to command runners to ensure
1316
- * consistent parsing.
1317
- */
1318
- declare function createCli<A extends ArgDefinitions = EmptyArgs>(options: Command<A> | {
1319
- name?: string;
1320
- version?: string;
1321
- description?: string;
1322
- mainCommand?: Command<A>;
1323
- fileBased?: FileBasedOptions;
1324
- autoExit?: boolean;
1325
- metaSettings?: {
1326
- showDescriptionOnMain?: boolean;
1327
- };
1328
- meta?: Command<A>["meta"];
1329
- args?: Command<A>["args"];
1330
- run?: Command<A>["run"];
1331
- commands?: Command<A>["commands"];
1332
- onCmdInit?: Command<A>["onCmdInit"];
1333
- onCmdExit?: Command<A>["onCmdExit"];
1334
- onLauncherInit?: Command<A>["onLauncherInit"];
1335
- onLauncherExit?: Command<A>["onLauncherExit"];
1336
- }, legacyParserOptions?: ReliArgParserOptions & {
1337
- fileBased?: FileBasedOptions;
1338
- autoExit?: boolean;
1339
- metaSettings?: {
1340
- showDescriptionOnMain?: boolean;
1341
- };
1342
- }): Promise<void> & {
1343
- run(_ctx?: any): Promise<void>;
1344
- };
1345
- /**
1346
- * Helper to define argument definitions with improved type inference
1347
- * for IntelliSense and validation for array defaults against options.
1348
- */
1349
- declare function defineArgs<A extends ArgDefinitions>(args: A): A;
1350
-
1351
- declare const runMain: typeof createCli;
1352
-
1353
- declare const log: _reliverse_relinka.RelinkaFunction;
1354
-
1355
- /**
1356
- * Maps complex colors (gradients, bright, background) to standard terminal colors.
1357
- * Used by ora spinners and other terminal utilities that only support basic colors.
1358
- *
1359
- * Handles:
1360
- * - Gradient colors -> solid colors (e.g., retroGradient -> cyan)
1361
- * - Bright colors -> base colors (e.g., redBright -> red)
1362
- * - Background colors -> foreground colors (e.g., bgRed -> red)
1363
- * - Special colors -> undefined (reset, inverse, dim, none)
1364
- *
1365
- * @param color The complex color to convert
1366
- * @returns A standard terminal color or undefined for special colors
1367
- */
1368
- declare function toBaseColor(color?: ColorName): StandardColor | undefined;
1369
- /**
1370
- * Maps any color type to a standard solid color for consistent display.
1371
- * Similar to toBaseColor but always returns a color (never undefined).
1372
- *
1373
- * Handles:
1374
- * - Gradient colors -> solid colors (e.g., retroGradient -> cyan)
1375
- * - Bright colors -> base colors (e.g., redBright -> red)
1376
- * - Background colors -> foreground colors (e.g., bgRed -> red)
1377
- * - Special colors (reset, inverse, none) -> dim
1378
- * - Undefined -> dim
1379
- *
1380
- * @param color The color to convert
1381
- * @returns A standard terminal color, defaulting to "dim" for special cases
1382
- */
1383
- declare function toSolidColor(color?: ColorName): OutputColor;
1384
-
1385
- /**
1386
- * Logs messages with configurable styling and formatting.
1387
- * Doesn't support streaming functionality.
1388
- */
1389
- declare function relinkaByRemptsDeprecated(kind: AllKinds, title: string, content?: string, hint?: string): void;
1390
- /**
1391
- * Asynchronous version of relinka that supports streaming functionality.
1392
- * Use this when you want animated text output with optional spinner.
1393
- *
1394
- * Streaming is controlled by the streamOpts parameter:
1395
- * - Use { useSpinner: true } for spinner animation
1396
- * - Use { delay: number } for character-by-character streaming
1397
- * - Content and hint are optional regardless of streaming
1398
- */
1399
- declare const relinkaAsyncByRemptsDeprecated: (kind: AllKinds, title: string, content?: string, hint?: string, streamOpts?: StreamOptions) => Promise<void>;
1400
- declare const throwError: (error: unknown) => never;
1401
-
1402
- declare const colorMap: Record<ColorName, (text: string) => string>;
1403
- declare const typographyMap: Record<TypographyName, (text: string) => string>;
1404
-
1405
- declare const symbols: Symbols;
1406
- /**
1407
- * Returns a colored vertical bar symbol. Prevents gradient colors for bars.
1408
- */
1409
- declare const bar: ({ borderColor }?: {
1410
- borderColor?: ColorName;
1411
- }) => string;
1412
- /**
1413
- * Main formatter function: builds the final text output based on FmtMsgOptions.
1414
- */
1415
- declare function fmt(opts: FmtMsgOptions): {
1416
- text: string;
1417
- lineCount: number;
1418
- };
1419
- /**
1420
- * Logs a formatted message to the console and records how many lines it occupies.
1421
- */
1422
- declare function msg(opts: FmtMsgOptions): void;
1423
- /**
1424
- * Undo the last printed message by deleting its lines from the terminal.
1425
- * @param count How many messages to undo. Defaults to 1.
1426
- */
1427
- declare function msgUndo(count?: number): void;
1428
- /**
1429
- * Undo all printed messages so far.
1430
- */
1431
- declare function msgUndoAll(): void;
1432
- /**
1433
- * Prints: "│ <text>" (two spaces after the bar).
1434
- * If text is empty, it just prints "│".
1435
- * If indent is 1, it prints "│ <text>" (one space).
1436
- * If indent is 2, it prints "│ <text>" (two spaces), etc.
1437
- */
1438
- declare function printLineBar(text: string, indent?: number): void;
1439
-
1440
- declare function getTerminalHeight(): number;
1441
- declare function getExactTerminalWidth(): number;
1442
- declare function getTerminalWidth(terminalWidth?: number): number;
1443
- /**
1444
- * Force line returns at specific width. This function is ANSI code friendly and it'll
1445
- * ignore invisible codes during width calculation.
1446
- * @param {string} content
1447
- * @return {string}
1448
- */
1449
- declare function breakLines(content: string, terminalWidth?: number): string;
1450
- declare function removeCursor(): void;
1451
- declare function restoreCursor(): void;
1452
- declare function deleteLastLine(): void;
1453
- declare function deleteLastLines(count: number): void;
1454
- declare function countLines(text: string): number;
1455
-
1456
- declare const variantMap: {
1457
- doubleBox: typeof createDoubleBox;
1458
- };
1459
- type ValidVariant = keyof typeof variantMap;
1460
- declare function isValidVariant(variant: string | undefined): variant is ValidVariant;
1461
- declare function applyVariant(lines: string[] | string, variant?: VariantName$1, options?: {
1462
- limit?: number;
1463
- }, borderColor?: ColorName): Promise<string>;
1464
- declare function createDoubleBox(lines: string[], limit?: number, borderColor?: ColorName): string;
1465
-
1466
- declare const multiselect: <T extends string>(params: MultiselectPromptParams<T>) => Promise<T[]>;
1467
-
1468
- declare function multiselectPrompt<T extends string>(params: MultiselectPromptParams<T>): Promise<T[]>;
1469
-
1470
- interface NextStepsPromptOptions {
1471
- title?: string;
1472
- titleColor?: ColorName;
1473
- titleVariant?: VariantName$1;
1474
- titleTypography?: TypographyName;
1475
- content: string[];
1476
- contentColor?: ColorName;
1477
- contentVariant?: VariantName$1;
1478
- contentTypography?: TypographyName;
1479
- }
1480
- declare function nextStepsPrompt(options: NextStepsPromptOptions): Promise<void>;
1481
-
1482
- type VariantName = FmtMsgOptions["titleVariant"];
1483
- interface NumberPromptOptions {
1484
- title: string;
1485
- hint?: string;
1486
- hintPlaceholderColor?: ColorName;
1487
- validate?: (value: number) => string | undefined | boolean | Promise<string | undefined | boolean>;
1488
- defaultValue?: string | number;
1489
- schema?: any;
1490
- titleColor?: ColorName;
1491
- titleTypography?: TypographyName;
1492
- titleVariant?: VariantName;
1493
- content?: string;
1494
- contentColor?: ColorName;
1495
- contentTypography?: TypographyName;
1496
- contentVariant?: VariantName;
1497
- borderColor?: BorderColorName;
1498
- variantOptions?: any;
1499
- endTitle?: string;
1500
- endTitleColor?: ColorName;
1501
- border?: boolean;
1502
- hardcoded?: {
1503
- userInput?: string;
1504
- errorMessage?: string;
1505
- };
1506
- }
1507
- declare function numberPrompt(opts: NumberPromptOptions): Promise<number>;
1508
-
1509
- type EndPromptOptions = PromptOptions & {
1510
- variant?: "footer" | "ascii-art";
1511
- asciiArtFont?: Fonts;
1512
- };
1513
- declare function outroPrompt(optionsOrTitle: EndPromptOptions | string): Promise<void>;
1514
-
1515
- declare const endPrompt: typeof outroPrompt;
1516
- declare const outro: typeof outroPrompt;
1517
-
1518
- interface ResultsType {
1519
- username: string;
1520
- }
1521
- declare function resultPrompt({ results, inline, }: {
1522
- results: ResultsType;
1523
- inline?: boolean;
1524
- }): Promise<void>;
1525
-
1526
- type NumMultiSelectPromptOptions = PromptOptions & {
1527
- defaultValue?: string[];
1528
- };
1529
- declare function numMultiSelectPrompt(opts: NumMultiSelectPromptOptions): Promise<(string | undefined)[]>;
1530
-
1531
- type NumSelectPromptOptions = PromptOptions & {
1532
- inline?: boolean;
1533
- defaultValue?: string;
1534
- };
1535
- declare function numSelectPrompt(opts: NumSelectPromptOptions): Promise<string | number>;
1536
-
1537
- declare const select: <T extends string>(params: SelectPromptParams<T>) => Promise<T>;
1538
- declare const selectSimple: <T extends string>(params: Omit<SelectPromptParams<T>, "options"> & {
1539
- options: {
1540
- value: T;
1541
- label?: string;
1542
- hint?: string;
1543
- }[];
1544
- }) => Promise<T>;
1545
-
1546
- /**
1547
- * Displays a selectable prompt in the terminal and returns the chosen value.
1548
- */
1549
- declare function selectPrompt<T extends string>(params: SelectPromptParams<T>): Promise<T>;
1550
-
1551
- /**
1552
- * A toggle prompt that lets the user choose between two options (Yes/No style).
1553
- */
1554
- declare function togglePrompt<T extends string>(params: TogglePromptParams<T>): Promise<boolean>;
1555
-
1556
- interface SpinnerOptions {
1557
- cancelMessage?: string;
1558
- color?: string;
1559
- delay?: number;
1560
- errorMessage?: string;
1561
- failText?: string;
1562
- frames?: string[];
1563
- hideCursor?: boolean;
1564
- indicator?: "dots" | "timer";
1565
- onCancel?: () => void;
1566
- prefixText?: string;
1567
- signal?: AbortSignal;
1568
- silent?: boolean;
1569
- spinner?: string;
1570
- successText?: string;
1571
- text: string;
1572
- }
1573
- interface ProgressOptions {
1574
- current: number;
1575
- total: number;
1576
- format?: "percentage" | "count" | "both";
1577
- }
1578
- interface SpinnerControls {
1579
- start: (text?: string) => SpinnerControls;
1580
- stop: (text?: string, code?: number) => void;
1581
- setText: (text: string) => void;
1582
- setProgress: (progress: ProgressOptions) => void;
1583
- succeed: (text?: string) => void;
1584
- fail: (text?: string) => void;
1585
- warn: (text?: string) => void;
1586
- info: (text?: string) => void;
1587
- isSpinning: () => boolean;
1588
- clear: () => void;
1589
- getElapsedTime: () => number;
1590
- pause: () => void;
1591
- resume: () => void;
1592
- dispose: () => void;
1593
- isCancelled: boolean;
1594
- }
1595
- /**
1596
- * Creates a terminal spinner with enhanced controls and styling options.
1597
- *
1598
- * @example
1599
- * ```typescript
1600
- * // Basic usage
1601
- * const spinner = useSpinner({ text: "Loading..." }).start();
1602
- * spinner.stop();
1603
- *
1604
- * // With progress tracking
1605
- * const spinner = useSpinner({ text: "Processing files..." }).start();
1606
- * for (let i = 0; i < files.length; i++) {
1607
- * spinner.setProgress({ current: i + 1, total: files.length });
1608
- * await processFile(files[i]);
1609
- * }
1610
- * spinner.succeed();
1611
- *
1612
- * // With custom color and spinner
1613
- * const spinner = useSpinner({
1614
- * text: "Processing...",
1615
- * color: "cyan",
1616
- * spinner: "dots"
1617
- * }).start();
1618
- *
1619
- * // With success/failure states
1620
- * const spinner = useSpinner({
1621
- * text: "Uploading...",
1622
- * successText: "Upload complete!",
1623
- * failText: "Upload failed!"
1624
- * }).start();
1625
- * try {
1626
- * await uploadFile();
1627
- * spinner.succeed();
1628
- * } catch (error) {
1629
- * spinner.fail();
1630
- * }
1631
- *
1632
- * // Using the wrapper for async operations
1633
- * await useSpinner.promise(
1634
- * async (spinner) => {
1635
- * await longOperation();
1636
- * spinner.setProgress({ current: 50, total: 100 });
1637
- * },
1638
- * {
1639
- * text: "Working...",
1640
- * successText: "Done!",
1641
- * failText: "Failed!"
1642
- * }
1643
- * );
1644
- * ```
1645
- */
1646
- declare function useSpinner(options: SpinnerOptions): SpinnerControls;
1647
- declare namespace useSpinner {
1648
- var promise: <T>(operation: (spinner: SpinnerControls) => Promise<T>, options: SpinnerOptions) => Promise<T>;
1649
- var nested: (parentOptions: SpinnerOptions) => {
1650
- start: () => {
1651
- child: (childOptions: SpinnerOptions) => SpinnerControls;
1652
- finish: (success: boolean, text?: string) => void;
1653
- dispose: () => void;
1654
- };
1655
- };
1656
- var withTiming: <T>(operation: (spinner: SpinnerControls) => Promise<T>, options: SpinnerOptions) => Promise<{
1657
- result: T;
1658
- duration: number;
1659
- }>;
1660
- }
1661
-
1662
- declare const spinner: typeof useSpinner;
1663
-
1664
- declare function taskProgressPrompt(options: ProgressBarOptions): Promise<ProgressBar>;
1665
-
1666
- type SimpleSpinnerType = "default" | "dottedCircle" | "boxSpinner";
1667
- type OraSpinnerType = Extract<SpinnerName, OraAllowedSpinners>;
1668
- type OraAllowedSpinners = "dots" | "bouncingBar" | "arc";
1669
- interface TaskOptions<T extends "simple" | "ora"> {
1670
- initialMessage: string;
1671
- successMessage?: string;
1672
- errorMessage?: string;
1673
- delay?: number;
1674
- spinnerSolution: T;
1675
- spinnerType?: T extends "simple" ? SimpleSpinnerType : OraSpinnerType;
1676
- action: (updateMessage: (message: string) => void) => Promise<void>;
1677
- }
1678
- declare function taskSpinPrompt<T extends "simple" | "ora">(options: TaskOptions<T>): Promise<void>;
1679
-
1680
- declare function colorize(text: string, colorName?: ColorName, typography?: TypographyName): string;
1681
-
1682
- declare const errorHandler: (error: Error, customMessage?: string) => never;
1683
-
1684
- declare function preventUnsupportedTTY(): void;
1685
- /**
1686
- * Prevents EISDIR errors when trying to read Windows home directory as a file
1687
- * @param filePath The file path to check
1688
- */
1689
- declare function preventWindowsHomeDirRoot(filePath: string): never | undefined;
1690
- declare function preventWrongTerminalSize({ isDev, shouldExit, minWidth, minHeight, sizeErrorDescription, }: PreventWrongTerminalSizeOptions): Promise<void>;
1691
-
1692
- /**
1693
- * Ends the prompt by optionally displaying an end message and running the action if confirmed.
1694
- * Preserves the last prompt state unless there's an endTitle.
1695
- */
1696
- declare function completePrompt(prompt: "input" | "confirm" | "select" | "multiselect" | "toggle", isCtrlC: boolean, _endTitle: string | undefined, _endTitleColor: ColorName | undefined, _titleTypography: TypographyName | undefined, _titleVariant: VariantName$1 | undefined, _border?: boolean, borderColor?: BorderColorName, action?: () => Promise<void>, value?: boolean): Promise<boolean>;
1697
- declare function renderEndLine(): void;
1698
- declare function renderEndLineInput(): void;
1699
-
1700
- /**
1701
- * Simulates streaming text output in the console, character by character
1702
- */
1703
- declare function streamText({ text, delay, showCursor, color, newline, clearLine, onProgress, }: StreamTextOptions): Promise<void>;
1704
- /**
1705
- * Simulates streaming text output in a message box
1706
- */
1707
- declare function streamTextBox({ text, delay, color, borderColor, }: Omit<StreamTextOptions, "showCursor" | "newline" | "clearLine"> & {
1708
- borderColor?: BorderColorName;
1709
- }): Promise<void>;
1710
- /**
1711
- * Simulates streaming text output with a loading spinner using ora
1712
- */
1713
- declare function streamTextWithSpinner({ text, delay, color, spinnerFrames, spinnerDelay, }: StreamTextOptions & {
1714
- spinnerFrames?: string[];
1715
- spinnerDelay?: number;
1716
- }): Promise<void>;
1717
-
1718
- declare const pm: _reliverse_runtime.PkgManagerInfo;
1719
- declare const reliversePrompts: {
1720
- name: string;
1721
- version: string;
1722
- description: string;
1723
- };
1724
-
1725
- /**
1726
- * Checks if the terminal is interactive
1727
- */
1728
- declare function isTerminalInteractive(input?: NodeJS.ReadStream & {
1729
- fd: 0;
1730
- }): boolean;
1731
- /**
1732
- * Validates a name against allowed characters
1733
- */
1734
- interface ValidationResult {
1735
- isValid: boolean;
1736
- message?: string;
1737
- }
1738
- declare function isValidName(name: string): ValidationResult;
1739
- /**
1740
- * Cleans up project name from config by removing scope and invalid characters.
1741
- * For paths with multiple segments (e.g. "@org/subpath/cli"), takes the last segment.
1742
- * This also ensures complex cases (e.g. "@some@weird/path/the-name!" returns "the-name").
1743
- */
1744
- declare function normalizeName(name: string): string;
1745
-
1746
- declare function createAsciiArt({ message, font, clearConsole, }: {
1747
- message: string;
1748
- font?: Fonts;
1749
- clearConsole?: boolean;
1750
- }): Promise<void>;
1751
-
1752
- export { CANCEL, animateText, animationMap, anykeyPrompt, applyVariant, bar, block, breakLines, callCmd, cancel, colorMap, colorize, completePrompt, confirm, confirmPrompt, countLines, createAsciiArt, createCancel, createCli, createMultiStep, createStep, datePrompt, defineArgs, defineCommand, deleteLastLine, deleteLastLines, endPrompt, errorHandler, fallbackSymbols, figures, fmt, getColumns, getExactTerminalWidth, getTerminalHeight, getTerminalWidth, group, input, inputPrompt, intro, introPrompt, isCancel, isTerminalInteractive, isValidName, isValidVariant, isWindows, log, mainSymbols, msg, msgUndo, msgUndoAll, multiselect, multiselectPrompt, nextStepsPrompt, normalizeName, numMultiSelectPrompt, numSelectPrompt, numberPrompt, outro, outroPrompt, password, pm, preventUnsupportedTTY, preventWindowsHomeDirRoot, preventWrongTerminalSize, printLineBar, relinkaAsyncByRemptsDeprecated, relinkaByRemptsDeprecated, reliversePrompts, removeCursor, renderEndLine, renderEndLineInput, restoreCursor, resultPrompt, runMain, select, selectPrompt, selectSimple, setRawMode, showUsage, spinner, startEditor, startPrompt, streamText, streamTextBox, streamTextWithSpinner, symbols, taskProgressPrompt, taskSpinPrompt, text, throwError, toBaseColor, toSolidColor, togglePrompt, typographyMap, useSpinner, variantMap };
1753
- export type { AllKinds, ArgDefinition, ArgDefinitions, ArrayArgDefinition, BaseArgDefinition, BaseArgProps, BooleanArgDefinition, BorderColorName, CallCmdOptions, CancelValue, ChoiceOptions, ColorName, Command, CommandContext, CommandHook, CommandMeta, CommandRun, CommandSpec, CommandsMap, ConfirmPromptOptions, DatePromptOptions, DefineCommandOptions, EditorExitResult, EmptyArgs, FileBasedOptions, FmtMsgOptions, GroupContext, GroupOptions, GroupStep, GroupSteps, InferArgTypes, InputPromptOptions, MessageConfig, MessageKind, MsgConfig, MsgType, MultiselectPromptParams, NumberArgDefinition, OutputColor, PositionalArgDefinition, PreventWrongTerminalSizeOptions, ProgressBar, ProgressBarOptions, PromptOptions, PromptType, RenderParams, ResultsType, SelectOption, SelectPromptParams, SeparatorOption, StandardColor, StreamOptions, StreamTextOptions, StringArgDefinition, SymbolName, Symbols, TogglePromptParams, TypographyName, VariantName$1 as VariantName };