UNPKG

@basictech/cli

Version:

Basic CLI for creating & managing your projects

18 lines 623 B
import { AuthService } from '../lib/auth.js'; import { isOnline } from '../lib/platform.js'; import { MESSAGES } from '../lib/constants.js'; export async function AccountCommand() { // Check if online if (!(await isOnline())) { throw new Error(MESSAGES.OFFLINE); } const authService = AuthService.getInstance(); // Check if logged in const token = await authService.getToken(); if (!token) { throw new Error(MESSAGES.LOGGED_OUT); } const userInfo = await authService.getUserInfo(); console.log('Logged in user:', userInfo.email); } //# sourceMappingURL=account.js.map