add install base

This commit is contained in:
2025-05-17 03:32:38 +08:00
parent 717e434ce0
commit 035ddc248c
28 changed files with 667 additions and 260 deletions

View File

@@ -1,8 +1,9 @@
import fs from 'node:fs';
import path from 'node:path';
import { checkFileExists, AssistantConfig, AssistantConfigData } from '@/module/assistant/index.ts';
import { checkFileExists, AssistantConfig, AssistantConfigData, parseHomeArg, parseHelpArg } from '@/module/assistant/index.ts';
import { chalk } from '@/module/chalk.ts';
import { HttpsPem } from '@/module/assistant/https/sign.ts';
export { parseHomeArg, parseHelpArg };
export type AssistantInitOptions = {
path?: string;
init?: boolean;
@@ -30,7 +31,8 @@ export class AssistantInit extends AssistantConfig {
super.init();
} else {
super.init();
console.log(chalk.yellow('助手路径已存在'));
const assistantConfig = this;
console.log(chalk.yellow('助手路径已存在'), chalk.green(assistantConfig.configDir));
}
this.createAssistantConfig();
this.createEnvConfig();