import { xhsServices, program } from '../common.ts'; program .command('get-userinfo') .description('获取用户信息') .action(async () => { const client = xhsServices.getClient(); const res = await client.getSelfInfoV2(); console.log(res); }); const getUserById = async (userId: string) => { const client = xhsServices.getClient(); const res = await client.getUserInfoFromHtml(userId); console.log(res); }; program .command('get-userinfo-by-id ') .description('获取用户信息') .action(async (userId: string) => { await getUserById(userId); });