@astrojs/cli-kit
Advanced tools
Comparing version 0.4.0 to 0.4.1
/// <reference types="node" resolution-mode="require"/> | ||
type Message = string | Promise<string>; | ||
export declare const say: (msg?: Message | Message[], { clear, hat, stdin, stdout }?: { | ||
export declare const say: (msg?: Message | Message[], { clear, hat, tie, stdin, stdout }?: { | ||
clear?: boolean | undefined; | ||
hat?: string | undefined; | ||
tie?: string | undefined; | ||
stdin?: (NodeJS.ReadStream & { | ||
@@ -7,0 +8,0 @@ fd: 0; |
@@ -7,3 +7,3 @@ import readline from 'node:readline'; | ||
import { strip } from '../prompt/util/clear.js'; | ||
export const say = async (msg = [], { clear = false, hat = '', stdin = process.stdin, stdout = process.stdout } = {}) => { | ||
export const say = async (msg = [], { clear = false, hat = '', tie = '', stdin = process.stdin, stdout = process.stdout } = {}) => { | ||
const messages = Array.isArray(msg) ? msg : [msg]; | ||
@@ -53,6 +53,7 @@ const rl = readline.createInterface({ input: stdin, escapeCodeTimeout: 50 }); | ||
const head = h.repeat(3 - strip(hat).split('').length); | ||
const bottom = h.repeat(3 - strip(tie).split('').length); | ||
return [ | ||
`${tl}${h.repeat(2)}${hat}${head}${tr} ${color.bold(color.cyan('Houston:'))}`, | ||
`${v} ${eye} ${color.cyanBright(mouth)} ${eye} ${msg}`, | ||
`${bl}${h.repeat(5)}${br}`, | ||
`${bl}${h.repeat(2)}${tie}${bottom}${br}`, | ||
].join('\n'); | ||
@@ -59,0 +60,0 @@ }; |
@@ -22,3 +22,3 @@ /** | ||
validator: any; | ||
set value(arg: any); | ||
set value(v: any); | ||
get value(): any; | ||
@@ -25,0 +25,0 @@ errorMsg: any; |
@@ -0,2 +1,3 @@ | ||
/// <reference types="node" resolution-mode="require"/> | ||
import type { Key } from "node:readline"; | ||
export declare const action: (key: Key, isSelect: boolean) => false | "first" | "abort" | "last" | "reset" | "down" | "up" | "submit" | "delete" | "deleteForward" | "exit" | "next" | "nextPage" | "prevPage" | "home" | "end" | "right" | "left" | undefined; |
{ | ||
"name": "@astrojs/cli-kit", | ||
"type": "module", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "types": "./dist/index.d.ts", |
57493
1773