Files
fidoca/.ui-pty2.mjs
2026-09-25 05:37:09 +02:00

19 lines
461 B
JavaScript

import { mount, unmount, ui } from './src/ui/index.js';
mount();
const c = await ui.confirm({ message: 'Keep?', default: true });
ui.log('CONFIRM:' + c);
const s = await ui.select({
message: 'Pick',
choices: [
{ name: 'a', value: 'A' },
{ name: 'b', value: 'B' },
{ name: 'c', value: 'C' },
],
});
ui.log('SELECT:' + s);
const t = await ui.input({ message: 'Text' });
ui.log('INPUT:' + t);
await unmount();
process.exit(0);