Skip to content

Commit be0f703

Browse files
committed
chore: quick update to latest main
Signed-off-by: Alexander Mangel <[email protected]>
1 parent ac11a15 commit be0f703

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/prompts/src/spinner.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ import {
1111
} from './common.js';
1212

1313
export interface SpinnerOptions extends CommonOptions {
14-
indicator?: 'dots' | 'timer';
14+
indicator?: 'dots' | 'timer' | "custom";
1515
onCancel?: () => void;
1616
cancelMessage?: string;
1717
errorMessage?: string;
18+
frames?: string[];
19+
delay?: number;
1820
}
1921

2022
export interface SpinnerResult {
@@ -30,9 +32,10 @@ export const spinner = ({
3032
output = process.stdout,
3133
cancelMessage,
3234
errorMessage,
35+
...props
3336
}: SpinnerOptions = {}): SpinnerResult => {
34-
const frames = unicode ? ['◒', '◐', '◓', '◑'] : ['•', 'o', 'O', '0'];
35-
const delay = unicode ? 80 : 120;
37+
const frames = props.frames ? props.frames : unicode ? ['◒', '◐', '◓', '◑'] : ['•', 'o', 'O', '0'];
38+
const delay = props.delay ? props.delay : unicode ? 80 : 120;
3639
const isCI = process.env.CI === 'true';
3740

3841
let unblock: () => void;

0 commit comments

Comments
 (0)