@orkestrel/terminal 0.0.6 → 0.0.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.
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +4 -4
- package/dist/src/core/index.d.ts +4 -4
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +7 -7
- package/dist/src/server/index.d.ts +7 -7
- package/dist/src/server/index.js.map +1 -1
- package/package.json +7 -5
|
@@ -56,7 +56,7 @@ export declare interface CheckboxChoice {
|
|
|
56
56
|
*/
|
|
57
57
|
export declare interface CheckboxOptions {
|
|
58
58
|
readonly message: string;
|
|
59
|
-
readonly choices:
|
|
59
|
+
readonly choices: ReadonlyArray<string | CheckboxChoice>;
|
|
60
60
|
readonly min?: number;
|
|
61
61
|
readonly max?: number;
|
|
62
62
|
readonly styler?: StylerInterface;
|
|
@@ -1207,7 +1207,7 @@ export declare type PromptValue = string | boolean | readonly string[];
|
|
|
1207
1207
|
export declare function reconstructValidationRules(value: unknown): ValidationRules | undefined;
|
|
1208
1208
|
|
|
1209
1209
|
/** Read a `choices` option as a list of bare strings / full choices — each element narrowed by `guard`, off-shape elements stringified. */
|
|
1210
|
-
export declare function resolveChoices<TChoice extends PromptChoice | CheckboxChoice>(options: Readonly<Record<string, unknown>>, guard: Guard<TChoice>):
|
|
1210
|
+
export declare function resolveChoices<TChoice extends PromptChoice | CheckboxChoice>(options: Readonly<Record<string, unknown>>, guard: Guard<TChoice>): ReadonlyArray<string | TChoice>;
|
|
1211
1211
|
|
|
1212
1212
|
/** Read one option by key, narrowed by `guard` — `undefined` when absent or off-shape (§14, never an `as`). */
|
|
1213
1213
|
export declare function resolveOption<T>(options: Readonly<Record<string, unknown>>, key: string, guard: Guard<T>): T | undefined;
|
|
@@ -1269,7 +1269,7 @@ export declare const RULE_MESSAGES: Readonly<{
|
|
|
1269
1269
|
* {@link CheckboxChoice} objects) as returned by {@link resolveChoices}
|
|
1270
1270
|
* @returns The same choices with every `name` / `description` control-stripped
|
|
1271
1271
|
*/
|
|
1272
|
-
export declare function sanitizeChoiceLabels<TChoice extends PromptChoice | CheckboxChoice>(choices:
|
|
1272
|
+
export declare function sanitizeChoiceLabels<TChoice extends PromptChoice | CheckboxChoice>(choices: ReadonlyArray<string | TChoice>): ReadonlyArray<string | TChoice>;
|
|
1273
1273
|
|
|
1274
1274
|
/**
|
|
1275
1275
|
* Options for a single-selection {@link import('./helpers.js').selectReduce} prompt.
|
|
@@ -1281,7 +1281,7 @@ export declare function sanitizeChoiceLabels<TChoice extends PromptChoice | Chec
|
|
|
1281
1281
|
*/
|
|
1282
1282
|
export declare interface SelectOptions {
|
|
1283
1283
|
readonly message: string;
|
|
1284
|
-
readonly choices:
|
|
1284
|
+
readonly choices: ReadonlyArray<string | PromptChoice>;
|
|
1285
1285
|
readonly default?: string;
|
|
1286
1286
|
readonly styler?: StylerInterface;
|
|
1287
1287
|
}
|
package/dist/src/core/index.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export declare interface CheckboxChoice {
|
|
|
56
56
|
*/
|
|
57
57
|
export declare interface CheckboxOptions {
|
|
58
58
|
readonly message: string;
|
|
59
|
-
readonly choices:
|
|
59
|
+
readonly choices: ReadonlyArray<string | CheckboxChoice>;
|
|
60
60
|
readonly min?: number;
|
|
61
61
|
readonly max?: number;
|
|
62
62
|
readonly styler?: StylerInterface;
|
|
@@ -1207,7 +1207,7 @@ export declare type PromptValue = string | boolean | readonly string[];
|
|
|
1207
1207
|
export declare function reconstructValidationRules(value: unknown): ValidationRules | undefined;
|
|
1208
1208
|
|
|
1209
1209
|
/** Read a `choices` option as a list of bare strings / full choices — each element narrowed by `guard`, off-shape elements stringified. */
|
|
1210
|
-
export declare function resolveChoices<TChoice extends PromptChoice | CheckboxChoice>(options: Readonly<Record<string, unknown>>, guard: Guard<TChoice>):
|
|
1210
|
+
export declare function resolveChoices<TChoice extends PromptChoice | CheckboxChoice>(options: Readonly<Record<string, unknown>>, guard: Guard<TChoice>): ReadonlyArray<string | TChoice>;
|
|
1211
1211
|
|
|
1212
1212
|
/** Read one option by key, narrowed by `guard` — `undefined` when absent or off-shape (§14, never an `as`). */
|
|
1213
1213
|
export declare function resolveOption<T>(options: Readonly<Record<string, unknown>>, key: string, guard: Guard<T>): T | undefined;
|
|
@@ -1269,7 +1269,7 @@ export declare const RULE_MESSAGES: Readonly<{
|
|
|
1269
1269
|
* {@link CheckboxChoice} objects) as returned by {@link resolveChoices}
|
|
1270
1270
|
* @returns The same choices with every `name` / `description` control-stripped
|
|
1271
1271
|
*/
|
|
1272
|
-
export declare function sanitizeChoiceLabels<TChoice extends PromptChoice | CheckboxChoice>(choices:
|
|
1272
|
+
export declare function sanitizeChoiceLabels<TChoice extends PromptChoice | CheckboxChoice>(choices: ReadonlyArray<string | TChoice>): ReadonlyArray<string | TChoice>;
|
|
1273
1273
|
|
|
1274
1274
|
/**
|
|
1275
1275
|
* Options for a single-selection {@link import('./helpers.js').selectReduce} prompt.
|
|
@@ -1281,7 +1281,7 @@ export declare function sanitizeChoiceLabels<TChoice extends PromptChoice | Chec
|
|
|
1281
1281
|
*/
|
|
1282
1282
|
export declare interface SelectOptions {
|
|
1283
1283
|
readonly message: string;
|
|
1284
|
-
readonly choices:
|
|
1284
|
+
readonly choices: ReadonlyArray<string | PromptChoice>;
|
|
1285
1285
|
readonly default?: string;
|
|
1286
1286
|
readonly styler?: StylerInterface;
|
|
1287
1287
|
}
|