adastra-cli-kit
Version:
Adastra ✨ CLI Kit is a bunch of utils and modules that are shared across CLI apps like `create-adastra` and `adastra-cli` to have one source of truth for both these two packages. Its an internal private package not intended for external distribution.
32 lines (26 loc) • 1.43 kB
TypeScript
import { Ora } from 'ora';
import * as chalk from 'chalk';
declare const forceUnicode: () => void;
declare const enableAscii: () => boolean;
declare const hookExit: () => (() => NodeJS.Process);
declare const sleep: (ms: number) => Promise<number>;
declare const random: (...arr: any[]) => any;
declare const randomBetween: (min: number, max: number) => number;
declare const getAdastraVersion: () => Promise<string>;
declare const getUserName: () => Promise<string>;
declare const align: (text: string, dir: 'start' | 'end' | 'center', len: number) => string;
declare const rocketAscii = "\u25A0\u25B6";
/**
* Generate loading spinner with rocket flames!
* @param text display text next to rocket
* @returns Ora spinner for running .stop()
*/
declare function loadWithRocketGradient(text: string): Promise<Ora>;
declare const say: (messages?: string | string[], { clear }?: {
clear?: boolean | undefined;
}) => Promise<void>;
declare const label: (text: string, c?: chalk.ChalkInstance, t?: chalk.ChalkInstance) => string;
declare const colored: (text: string, c?: chalk.ChalkInstance) => string;
declare const prefixed: (text: string, c?: string) => string;
declare const generateProjectName: () => string;
export { align, colored, enableAscii, forceUnicode, generateProjectName, getAdastraVersion, getUserName, hookExit, label, loadWithRocketGradient, prefixed, random, randomBetween, rocketAscii, say, sleep };