UNPKG

peerchat

Version:

Peer-to-peer terminal chat

25 lines (24 loc) 817 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const command_1 = require("@oclif/command"); const chat_1 = require("../services/chat"); class PeerChat extends command_1.Command { static description = 'Peer-to-peer terminal chat running on DStack'; static flags = { version: command_1.flags.version({ char: 'v' }) }; static examples = [ '$ peerchat', '$ peerchat [ROOM] [NICKNAME]', '$ peerchat dstack myCoolNickname' ]; static args = [ { name: 'room', default: 'dstack', description: 'chat room' }, { name: 'nickname', description: 'your nickname' } ]; async run() { const { args } = this.parse(PeerChat); await (0, chat_1.run)(args.room, args.nickname); } } exports.default = PeerChat;