UNPKG

@kadena/kadena-cli

Version:

Kadena CLI tool to interact with the Kadena blockchain (manage keys, transactions, etc.)

20 lines 526 B
import { readFileSync } from 'node:fs'; let stdin = null; /** should only be done once per execution, and BEFORE any prompts from inquirer */ export async function readStdin() { if (stdin !== null) { return stdin; } try { await import('ttys'); const tmp = readFileSync(0, 'utf8'); // eslint-disable-next-line require-atomic-updates if (tmp !== '') stdin = tmp; } catch (e) { /* empty */ } return stdin; } //# sourceMappingURL=stdin.js.map