mirror of
https://github.com/HuLaSpark/HuLa.git
synced 2026-08-30 17:14:56 +08:00
d2be80a5db
* fix(common): 🐛 chatmain scroll behavior * fix(common): 🐛 chatMain scroll bug * fix(common): 🐛 p2p chat sendTime * feat(mobile): ✨ added friend/group page and functionality * fix(common): 🐛 order group member * style(common): 💄 refactor layout center * fix(agreement): 🐛 chat and announcements * fix(common): 🐛 group basic information editing * refactor(common): ♻️ union config * ci(config): 🎡 change some configuration * refactor(common): ♻️ config yudao * fix(common): 🐛 exit group * refactor(common): ♻️ tencent config * fix(common): 🐛 network config * feat(mobile): ✨ added Friend or Group Message Page * fix(common): 🐛 exit group error * feat(message): ✨ add message management settings * fix(mobile): 🐛 fix the issue where the mobile client fails to locate the configuration file * fix(mobile): 🐛 resolve mobile misidentification of local and production environments * feat(mobile): ✨ optimize the maximum width of bot messages and reply messages * feat(mobile): ✨ optimize the maximum width of image messages * feat(common): ✨ msg multi choose relay * build(vite): 📦 update startup and vite configuration * perf(message forwarding): ⚡ optimize message forwarding styles * fix(common): 🐛 msg time block * feat(mobile): ✨ added ability to view detailed information about friends * feat(mobile): ✨ add functionality to remove friends * fix(style): 🐛 fix special message not centered issue * fix(mobile): 🐛 fix hmr host bug * fix(mobile): 🐛 fix contact page not showing friend requests * feat(common): ✨ msg merge * feat(mobile): ✨ added chatroom redirection feature on friend detail page * fix(common): 🐛 merge msg display * feat(mobile): ✨ add file and image uploader components * fix(common): 🐛 send new msg error when scroll too top * fix(common): 🐛 reconstruct the notification module * fix(system): 🐛 fix some style and logic issues --------- Co-authored-by: wanwanruwoxin <254693270@qq.com> Co-authored-by: 卡仔 <1271013637@qq.com> Co-authored-by: 乾乾 <1046762075@qq.com>
59 lines
1.7 KiB
JavaScript
Vendored
59 lines
1.7 KiB
JavaScript
Vendored
import chalk from 'chalk'
|
|
import { execSync } from 'child_process'
|
|
import { dirname, join } from 'path'
|
|
import { fileURLToPath } from 'url'
|
|
|
|
const __filename = fileURLToPath(import.meta.url)
|
|
const __dirname = dirname(__filename)
|
|
|
|
/**
|
|
* 执行单个检查脚本
|
|
* @param {string} scriptPath - 脚本路径
|
|
* @param {string} description - 检查描述
|
|
*/
|
|
async function runScript(scriptPath, description) {
|
|
const startTime = performance.now()
|
|
console.log(chalk.blue(`\n[HuLa ${new Date().toLocaleTimeString()}] 开始${description}...\n`))
|
|
|
|
try {
|
|
execSync(`node ${scriptPath}`, { stdio: 'inherit' })
|
|
const duration = ((performance.now() - startTime) / 1000).toFixed(2)
|
|
console.log(chalk.green(`\n✅ ${description}完成 (${duration}s)\n`))
|
|
return true
|
|
} catch (_error) {
|
|
console.error(chalk.red(`\n❌ ${description}失败`))
|
|
return false
|
|
}
|
|
}
|
|
|
|
async function main() {
|
|
console.log(chalk.cyan('正在检查HuLa需要的环境配置...\n'))
|
|
|
|
/** @type {CheckItem[]} */
|
|
const checks = [
|
|
{
|
|
script: join(__dirname, 'check-dependencies.js'),
|
|
description: '环境检查'
|
|
}
|
|
]
|
|
|
|
const startTime = performance.now()
|
|
|
|
for (const check of checks) {
|
|
const success = await runScript(check.script, check.description)
|
|
if (!success) {
|
|
console.error(chalk.red(`\n${check.description}未通过,终止检查流程\n`))
|
|
process.exit(1)
|
|
}
|
|
}
|
|
|
|
const totalDuration = ((performance.now() - startTime) / 1000).toFixed(2)
|
|
console.log(chalk.green(`\n✨ 所有检查通过!总用时:${totalDuration}s\n`))
|
|
}
|
|
|
|
main().catch((error) => {
|
|
console.error(chalk.red('\n检查过程中发生错误:'))
|
|
console.error(chalk.yellow(error.stack || error))
|
|
process.exit(1)
|
|
})
|