@astrojs/cli-kit
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -6,3 +6,3 @@ import readline from 'node:readline'; | ||
import { action } from '../prompt/util/action.js'; | ||
import { strip, wrap } from '../prompt/util/clear.js'; | ||
import { strip } from '../prompt/util/clear.js'; | ||
export const say = async (msg = [], { clear = false, hat = '', stdin = process.stdin, stdout = process.stdout } = {}) => { | ||
@@ -53,9 +53,6 @@ const messages = Array.isArray(msg) ? msg : [msg]; | ||
const head = h.repeat(3 - strip(hat).split('').length); | ||
const prefix = ' '.repeat(9); | ||
const [message, secondMessage = '', ...lines] = wrap(`${prefix}${msg}`, prefix).split('\n'); | ||
return [ | ||
`${tl}${h.repeat(2)}${hat}${head}${tr} ${color.bold(color.cyan('Houston:'))}`, | ||
`${v} ${eye} ${color.cyanBright(mouth)} ${eye} ${message.trimStart()}`, | ||
`${bl}${h.repeat(5)}${br} ${secondMessage.trimStart()}`, | ||
...lines | ||
`${v} ${eye} ${color.cyanBright(mouth)} ${eye} ${msg}`, | ||
`${bl}${h.repeat(5)}${br}`, | ||
].join('\n'); | ||
@@ -69,3 +66,4 @@ }; | ||
let j = 0; | ||
for (const word of [''].concat(_message)) { | ||
for (let word of [''].concat(_message)) { | ||
word = await word; | ||
if (word) | ||
@@ -85,3 +83,4 @@ msg.push(word); | ||
await sleep(100); | ||
const text = '\n' + face(_message.join(' '), { mouth: useAscii() ? 'u' : '◡', eye: useAscii() ? '^' : '◠' }); | ||
const tmp = await Promise.all(_message).then(res => res.join(' ')); | ||
const text = '\n' + face(tmp, { mouth: useAscii() ? 'u' : '◡', eye: useAscii() ? '^' : '◠' }); | ||
logUpdate(text); | ||
@@ -88,0 +87,0 @@ if (!cancelled) |
{ | ||
"name": "@astrojs/cli-kit", | ||
"type": "module", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "types": "./dist/index.d.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53759
1668