UNPKG

@oada/cli

Version:

CLI OADA client

23 lines 763 B
import Command from '../../BaseCommand.js'; import { expandPath } from '../../io.js'; import getConn from '../../connections.js'; import { shell } from '../../highlight.js'; const examples = [shell `$ oada touch /bookmarks`]; class Touch extends Command { async run() { const { argv: paths } = await this.parse(Touch); const conn = getConn(this.iconfig); for (const p of paths) { const pp = expandPath(conn, `${p}`); for await (const path of pp) { await conn.put({ path, data: {} }); } } } } Touch.description = 'perform and "OADA touch"'; Touch.aliases = ['touch']; Touch.examples = examples; Touch.strict = false; export default Touch; //# sourceMappingURL=touch.js.map