feat: add user info command and package management for assistant app
- Implemented a new command 'me' to view current user information in the assistant application. - Created a common configuration file for the assistant app with package details and scripts. - Added functionality to check and update package.json dependencies and devDependencies in the assistant app. - Refactored storage initialization in query module to use StorageNode.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { program, Command, assistantConfig } from '@/program.ts';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { parseHomeArg, HomeConfigDir } from '@/module/assistant/config/args.ts';
|
||||
import { execCommand } from '@/module/npm-install.ts';
|
||||
|
||||
|
||||
14
assistant/src/command/user/me.ts
Normal file
14
assistant/src/command/user/me.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { program, Command, assistantConfig } from '@/program.ts';
|
||||
import { AssistantQuery } from '@/lib.ts';
|
||||
import { logger } from '@/module/logger.ts';
|
||||
|
||||
const me = new Command('me')
|
||||
.description('查看当前用户信息')
|
||||
.action(async () => {
|
||||
const aq = new AssistantQuery(assistantConfig);
|
||||
await aq.init()
|
||||
const info = await aq.queryLogin.checkLocalUser()
|
||||
logger.info(info);
|
||||
});
|
||||
|
||||
program.addCommand(me);
|
||||
Reference in New Issue
Block a user