mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-25 05:07:05 +00:00
refactor: unify runtime directories and environment variables to HAPI_HOME
Consolidate CLI and server runtime directories from ~/.config/hapi/ (CLI) and ~/.hapi-server/ (Server) to a single ~/.hapi/ directory. Unify environment variables from HAPI_HOME_DIR (CLI) and HAPI_BOT_DATA_DIR (Server) to a single HAPI_HOME variable across both applications. Update all documentation and configuration references accordingly. Bump bun-types to 1.3.5.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Handles CLI_API_TOKEN initialization with priority:
|
||||
* 1. Environment variable (highest - allows temporary override)
|
||||
* 2. Settings file (~/.config/hapi/settings.json)
|
||||
* 2. Settings file (~/.hapi/settings.json)
|
||||
* 3. Interactive prompt (only when both above are missing)
|
||||
*/
|
||||
|
||||
@@ -57,7 +57,7 @@ async function promptForToken(): Promise<string> {
|
||||
if (!token.trim()) {
|
||||
throw new Error('Token cannot be empty')
|
||||
}
|
||||
console.log(chalk.green('\nToken saved to ~/.config/hapi/settings.json'))
|
||||
console.log(chalk.green(`\nToken saved to ${configuration.settingsFile}`))
|
||||
return token.trim()
|
||||
} finally {
|
||||
rl.close()
|
||||
|
||||
Reference in New Issue
Block a user