@reliverse/rempts 1.7.44 → 1.7.46

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 (134) hide show
  1. package/README.md +1 -1
  2. package/dist-npm/bin/mod.d.mts +2333 -0
  3. package/dist-npm/bin/mod.mjs +8310 -0
  4. package/package.json +82 -42
  5. package/bin/libs/animate/animate-mod.d.ts +0 -14
  6. package/bin/libs/animate/animate-mod.js +0 -62
  7. package/bin/libs/anykey/anykey-mod.d.ts +0 -12
  8. package/bin/libs/anykey/anykey-mod.js +0 -125
  9. package/bin/libs/cancel/cancel.d.ts +0 -45
  10. package/bin/libs/cancel/cancel.js +0 -72
  11. package/bin/libs/confirm/confirm-alias.d.ts +0 -2
  12. package/bin/libs/confirm/confirm-alias.js +0 -2
  13. package/bin/libs/confirm/confirm-mod.d.ts +0 -5
  14. package/bin/libs/confirm/confirm-mod.js +0 -179
  15. package/bin/libs/date/date.d.ts +0 -2
  16. package/bin/libs/date/date.js +0 -236
  17. package/bin/libs/editor/editor-mod.d.ts +0 -25
  18. package/bin/libs/editor/editor-mod.js +0 -897
  19. package/bin/libs/figures/figures-mod.d.ts +0 -461
  20. package/bin/libs/figures/figures-mod.js +0 -285
  21. package/bin/libs/group/group-mod.d.ts +0 -33
  22. package/bin/libs/group/group-mod.js +0 -93
  23. package/bin/libs/input/input-alias.d.ts +0 -5
  24. package/bin/libs/input/input-alias.js +0 -4
  25. package/bin/libs/input/input-mod.d.ts +0 -16
  26. package/bin/libs/input/input-mod.js +0 -372
  27. package/bin/libs/intro/intro-alias.d.ts +0 -2
  28. package/bin/libs/intro/intro-alias.js +0 -3
  29. package/bin/libs/intro/intro-mod.d.ts +0 -20
  30. package/bin/libs/intro/intro-mod.js +0 -81
  31. package/bin/libs/launcher/command-runner.d.ts +0 -18
  32. package/bin/libs/launcher/command-runner.js +0 -79
  33. package/bin/libs/launcher/command-typed.d.ts +0 -16
  34. package/bin/libs/launcher/command-typed.js +0 -60
  35. package/bin/libs/launcher/launcher-alias.d.ts +0 -2
  36. package/bin/libs/launcher/launcher-alias.js +0 -2
  37. package/bin/libs/launcher/launcher-mod.d.ts +0 -162
  38. package/bin/libs/launcher/launcher-mod.js +0 -1222
  39. package/bin/libs/launcher/launcher-types.d.ts +0 -159
  40. package/bin/libs/launcher/launcher-types.js +0 -0
  41. package/bin/libs/launcher/trpc-orpc-support/completions.d.ts +0 -4
  42. package/bin/libs/launcher/trpc-orpc-support/completions.js +0 -45
  43. package/bin/libs/launcher/trpc-orpc-support/errors.d.ts +0 -11
  44. package/bin/libs/launcher/trpc-orpc-support/errors.js +0 -10
  45. package/bin/libs/launcher/trpc-orpc-support/index.d.ts +0 -34
  46. package/bin/libs/launcher/trpc-orpc-support/index.js +0 -641
  47. package/bin/libs/launcher/trpc-orpc-support/json-schema.d.ts +0 -17
  48. package/bin/libs/launcher/trpc-orpc-support/json-schema.js +0 -168
  49. package/bin/libs/launcher/trpc-orpc-support/json.d.ts +0 -44
  50. package/bin/libs/launcher/trpc-orpc-support/json.js +0 -41
  51. package/bin/libs/launcher/trpc-orpc-support/logging.d.ts +0 -11
  52. package/bin/libs/launcher/trpc-orpc-support/logging.js +0 -26
  53. package/bin/libs/launcher/trpc-orpc-support/parse-procedure.d.ts +0 -2
  54. package/bin/libs/launcher/trpc-orpc-support/parse-procedure.js +0 -486
  55. package/bin/libs/launcher/trpc-orpc-support/prompts.d.ts +0 -18
  56. package/bin/libs/launcher/trpc-orpc-support/prompts.js +0 -534
  57. package/bin/libs/launcher/trpc-orpc-support/standard-schema/contract.d.ts +0 -53
  58. package/bin/libs/launcher/trpc-orpc-support/standard-schema/contract.js +0 -0
  59. package/bin/libs/launcher/trpc-orpc-support/standard-schema/errors.d.ts +0 -9
  60. package/bin/libs/launcher/trpc-orpc-support/standard-schema/errors.js +0 -47
  61. package/bin/libs/launcher/trpc-orpc-support/standard-schema/utils.d.ts +0 -3
  62. package/bin/libs/launcher/trpc-orpc-support/standard-schema/utils.js +0 -6
  63. package/bin/libs/launcher/trpc-orpc-support/trpc-compat.d.ts +0 -71
  64. package/bin/libs/launcher/trpc-orpc-support/trpc-compat.js +0 -11
  65. package/bin/libs/launcher/trpc-orpc-support/types.d.ts +0 -276
  66. package/bin/libs/launcher/trpc-orpc-support/types.js +0 -0
  67. package/bin/libs/launcher/trpc-orpc-support/util.d.ts +0 -9
  68. package/bin/libs/launcher/trpc-orpc-support/util.js +0 -9
  69. package/bin/libs/log/log-alias.d.ts +0 -1
  70. package/bin/libs/log/log-alias.js +0 -2
  71. package/bin/libs/msg-fmt/colors.d.ts +0 -30
  72. package/bin/libs/msg-fmt/colors.js +0 -42
  73. package/bin/libs/msg-fmt/logger.d.ts +0 -17
  74. package/bin/libs/msg-fmt/logger.js +0 -103
  75. package/bin/libs/msg-fmt/mapping.d.ts +0 -3
  76. package/bin/libs/msg-fmt/mapping.js +0 -49
  77. package/bin/libs/msg-fmt/messages.d.ts +0 -35
  78. package/bin/libs/msg-fmt/messages.js +0 -319
  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 -348
  87. package/bin/libs/next-steps/next-steps.d.ts +0 -14
  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 -194
  91. package/bin/libs/outro/outro-alias.d.ts +0 -2
  92. package/bin/libs/outro/outro-alias.js +0 -3
  93. package/bin/libs/outro/outro-mod.d.ts +0 -8
  94. package/bin/libs/outro/outro-mod.js +0 -55
  95. package/bin/libs/results/results.d.ts +0 -7
  96. package/bin/libs/results/results.js +0 -27
  97. package/bin/libs/select/nummultiselect-prompt.d.ts +0 -6
  98. package/bin/libs/select/nummultiselect-prompt.js +0 -105
  99. package/bin/libs/select/numselect-prompt.d.ts +0 -7
  100. package/bin/libs/select/numselect-prompt.js +0 -115
  101. package/bin/libs/select/select-alias.d.ts +0 -9
  102. package/bin/libs/select/select-alias.js +0 -9
  103. package/bin/libs/select/select-prompt.d.ts +0 -5
  104. package/bin/libs/select/select-prompt.js +0 -314
  105. package/bin/libs/select/toggle-prompt.d.ts +0 -5
  106. package/bin/libs/select/toggle-prompt.js +0 -209
  107. package/bin/libs/spinner/spinner-alias.d.ts +0 -1
  108. package/bin/libs/spinner/spinner-alias.js +0 -2
  109. package/bin/libs/spinner/spinner-mod.d.ts +0 -106
  110. package/bin/libs/spinner/spinner-mod.js +0 -265
  111. package/bin/libs/task/progress.d.ts +0 -2
  112. package/bin/libs/task/progress.js +0 -57
  113. package/bin/libs/task/task-spin.d.ts +0 -15
  114. package/bin/libs/task/task-spin.js +0 -110
  115. package/bin/libs/utils/colorize.d.ts +0 -2
  116. package/bin/libs/utils/colorize.js +0 -135
  117. package/bin/libs/utils/errors.d.ts +0 -1
  118. package/bin/libs/utils/errors.js +0 -17
  119. package/bin/libs/utils/prevent.d.ts +0 -8
  120. package/bin/libs/utils/prevent.js +0 -65
  121. package/bin/libs/utils/prompt-end.d.ts +0 -8
  122. package/bin/libs/utils/prompt-end.js +0 -34
  123. package/bin/libs/utils/stream-text.d.ts +0 -18
  124. package/bin/libs/utils/stream-text.js +0 -136
  125. package/bin/libs/utils/system.d.ts +0 -6
  126. package/bin/libs/utils/system.js +0 -7
  127. package/bin/libs/utils/validate.d.ts +0 -21
  128. package/bin/libs/utils/validate.js +0 -17
  129. package/bin/libs/visual/visual-mod.d.ts +0 -6
  130. package/bin/libs/visual/visual-mod.js +0 -13
  131. package/bin/mod.d.ts +0 -69
  132. package/bin/mod.js +0 -159
  133. package/bin/types.d.ts +0 -371
  134. package/bin/types.js +0 -0
@@ -1,162 +0,0 @@
1
- import type { ReliArgParserOptions } from "@reliverse/reliarg";
2
- import type { ArgDefinitions, Command, DefineCommandOptions, EmptyArgs, FileBasedOptions } from "./launcher-types.js";
3
- import type { AnyRouter } from "./trpc-orpc-support/trpc-compat.js";
4
- import type { Logger, OmeletteInstanceLike, Promptable } from "./trpc-orpc-support/types.js";
5
- /**
6
- * Defines a command with metadata, argument definitions,
7
- * an execution function, and (optional) subCommands.
8
- */
9
- export declare function defineCommand<A extends ArgDefinitions = EmptyArgs>(options: DefineCommandOptions<A>): Command<A>;
10
- /**
11
- * Show usage for a given command.
12
- */
13
- export declare function showUsage<A extends ArgDefinitions>(command: Command<A>, parserOptions?: ReliArgParserOptions & {
14
- fileBased?: FileBasedOptions;
15
- autoExit?: boolean;
16
- metaSettings?: {
17
- showDescriptionOnMain?: boolean;
18
- };
19
- _fileBasedCurrentDir?: string;
20
- _fileBasedPathSegments?: string[];
21
- _isSubcommand?: boolean;
22
- }, globalCliMeta?: {
23
- name?: string;
24
- version?: string;
25
- description?: string;
26
- }): Promise<void>;
27
- /**
28
- * Primary entry point to run a command. This function supports:
29
- *
30
- * - File-based Commands: scanning for commands within a given commands root.
31
- * - Commands defined within the command object.
32
- * - Standard flags like --help, --version, and --debug.
33
- * - RPC functionality: tRPC/oRPC router integration with automatic CLI generation.
34
- *
35
- * This function passes along remaining arguments to command runners to ensure
36
- * consistent parsing.
37
- */
38
- export declare function createCli<A extends ArgDefinitions = EmptyArgs>(options: Command<A> | {
39
- name?: string;
40
- version?: string;
41
- description?: string;
42
- mainCommand?: Command<A>;
43
- fileBased?: FileBasedOptions;
44
- autoExit?: boolean;
45
- metaSettings?: {
46
- showDescriptionOnMain?: boolean;
47
- };
48
- meta?: Command<A>["meta"];
49
- args?: Command<A>["args"];
50
- run?: Command<A>["run"];
51
- commands?: Command<A>["commands"];
52
- onCmdInit?: Command<A>["onCmdInit"];
53
- onCmdExit?: Command<A>["onCmdExit"];
54
- onLauncherInit?: Command<A>["onLauncherInit"];
55
- onLauncherExit?: Command<A>["onLauncherExit"];
56
- rpc?: {
57
- /** A tRPC router. Procedures will become CLI commands. */
58
- router: AnyRouter;
59
- /** Context to be supplied when invoking the router. */
60
- context?: any;
61
- /** The `@trpc/server` module to use for calling procedures. Required when using trpc v10. */
62
- trpcServer?: any | Promise<any>;
63
- /** Usage code examples to display in `--help` output. */
64
- usage?: string | string[];
65
- /** Dependencies for schema validation libraries */
66
- "@valibot/to-json-schema"?: {
67
- toJsonSchema: (input: unknown, options?: {
68
- errorMode?: "throw" | "ignore" | "warn";
69
- }) => any;
70
- };
71
- effect?: {
72
- Schema: {
73
- isSchema: (input: unknown) => input is "JSONSchemaMakeable";
74
- };
75
- JSONSchema: {
76
- make: (input: "JSONSchemaMakeable") => any;
77
- };
78
- };
79
- };
80
- rpcRunParams?: {
81
- argv?: string[];
82
- logger?: Logger;
83
- completion?: OmeletteInstanceLike | (() => Promise<OmeletteInstanceLike>);
84
- prompts?: Promptable;
85
- /** Format an error thrown by the root procedure before logging to `logger.error` */
86
- formatError?: (error: unknown) => string;
87
- process?: {
88
- exit: (code: number) => never;
89
- };
90
- };
91
- }, legacyParserOptions?: ReliArgParserOptions & {
92
- fileBased?: FileBasedOptions;
93
- autoExit?: boolean;
94
- metaSettings?: {
95
- showDescriptionOnMain?: boolean;
96
- };
97
- }): Promise<void> & {
98
- run(_ctx?: any): Promise<void>;
99
- };
100
- /**
101
- * Helper to define argument definitions with improved type inference
102
- * for IntelliSense and validation for array defaults against options.
103
- */
104
- export declare function defineArgs<A extends ArgDefinitions>(args: A): A;
105
- /**
106
- * Programmatically run a command with subcommand support and flexible argument handling.
107
- * This function can handle subcommands (including nested), positional arguments, and automatically normalizes
108
- * template literals and space-separated strings.
109
- *
110
- * @param command The command definition (from defineCommand)
111
- * @param argv The argv array to parse (default: []). Supports template literals and subcommands.
112
- * @param parserOptions Optional reliArgParser options
113
- *
114
- * @example
115
- * ```ts
116
- * // ✅ Single command with template literals
117
- * await runCmdWithSubcommands(cmd, [`--dev ${isDev}`]);
118
- *
119
- * // ✅ Subcommand with arguments
120
- * await runCmdWithSubcommands(cmd, [`build --input src/mod.ts --someBoolean`]);
121
- *
122
- * // ✅ Subcommand with positional arguments
123
- * await runCmdWithSubcommands(cmd, [`build src/mod.ts --someBoolean`]);
124
- *
125
- * // ✅ Nested subcommands
126
- * await runCmdWithSubcommands(cmd, [`build someSubCmd src/mod.ts --no-cjs`]);
127
- * await runCmdWithSubcommands(cmd, [`build sub1 sub2 sub3 file.ts --flag`]);
128
- *
129
- * // ✅ Mixed array with subcommands
130
- * await runCmdWithSubcommands(cmd, [
131
- * `build someSubCmd src/mod.ts`,
132
- * "--no-cjs",
133
- * "--verbose"
134
- * ]);
135
- * ```
136
- */
137
- export declare function runCmdWithSubcommands<A extends ArgDefinitions = EmptyArgs>(command: Command<A>, argv?: string[], parserOptions?: ReliArgParserOptions & {
138
- fileBased?: FileBasedOptions;
139
- autoExit?: boolean;
140
- }): Promise<any>;
141
- /**
142
- * Programmatically run a command's run() handler with parsed arguments.
143
- * Does not handle subcommands, file-based commands, or global hooks.
144
- * Suitable for use in demos, tests, or programmatic invocation.
145
- *
146
- * @param command The command definition (from defineCommand)
147
- * @param argv The argv array to parse (default: []). Each argument should be a separate array element.
148
- * @param parserOptions Optional reliArgParser options
149
- *
150
- * @example
151
- * **each argument as separate array element**:
152
- * ```ts
153
- * await runCmd(cmd, ["--dev", "true"]);
154
- * await runCmd(cmd, ["--name", "John", "--verbose"]);
155
- * ```
156
- * **automatic normalization of template literals**:
157
- * ```ts
158
- * await runCmd(cmd, [`--dev ${isDev}`]); // Automatically converted to ["--dev", "true"]
159
- * await runCmd(cmd, [`--dev ${isDev} --build mod.ts`]); // ["--dev", "true", "--build", "mod.ts"]
160
- * ```
161
- */
162
- export declare function runCmd<A extends ArgDefinitions = EmptyArgs>(command: Command<A>, argv?: string[], parserOptions?: ReliArgParserOptions): Promise<void>;