feat: add npm timeout, mirror support, and interactive fallback
- Add --npm-registry param for custom npm mirrors - Add --github-mirror param for GitHub API/download proxy - npm install now has 120s timeout with interactive fallback menu - On timeout/failure, prompt user to switch source or use mirror - Update docs with mirror usage examples via [HAPI](https://hapi.run) Co-Authored-By: HAPI <[email protected]>
This commit is contained in:
@@ -51,6 +51,12 @@ sudo bash install.sh --force
|
||||
# 仅安装/升级 CLI,跳过 Hub Docker 配置
|
||||
sudo bash install.sh --skip-hub
|
||||
|
||||
# 指定国内 npm 镜像
|
||||
sudo bash install.sh --npm-registry https://registry.npmmirror.com
|
||||
|
||||
# 指定 GitHub 镜像(国内环境推荐)
|
||||
sudo bash install.sh --github-mirror https://ghproxy.com --source github-official
|
||||
|
||||
# 显示帮助
|
||||
sudo bash install.sh --help
|
||||
```
|
||||
@@ -76,6 +82,12 @@ sudo bash install.sh --help
|
||||
|
||||
# 仅安装/升级 CLI
|
||||
.\install.ps1 -SkipHub
|
||||
|
||||
# 指定国内 npm 镜像
|
||||
.\install.ps1 -NpmRegistry https://registry.npmmirror.com
|
||||
|
||||
# 指定 GitHub 镜像(国内环境推荐)
|
||||
.\install.ps1 -GithubMirror https://ghproxy.com -Source github-official
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user