@apistudio/apim-cli
Version:
CLI for API Management Products
24 lines (20 loc) • 618 B
text/typescript
import {password} from '@inquirer/prompts';
import { ENTER_PASS, ENTER_SECRET } from '../constants/message-constants.js';
export const passwordPrompt = async(inputPassword: string | undefined): Promise<string> => {
return inputPassword || password({
message: ENTER_PASS,
mask: true,
theme: {
prefix: '>',
}
});
};
export const authTokenPrompt = async(inputAuthToken: string | undefined): Promise<string> => {
return inputAuthToken || password({
message: ENTER_SECRET,
mask: true,
theme: {
prefix: '>',
}
});
};