Skip to content

Commit

Permalink
fix: 兼容老版本淘宝镜像
Browse files Browse the repository at this point in the history
  • Loading branch information
beezen committed Oct 31, 2023
1 parent 9fde684 commit 0e8ad73
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/actions/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ export function getUserList(options) {
return `${registryNameStr}\n${getListInfo(nucmrcConfig[registryName])}`;
})
.join("\n\n");
console.log(userList);
} else {
userList = `${colors.custom(`【${registryConfig.registryName}】`)}\n${getListInfo(
nucmrcConfig[registryConfig.registryName]
)}`;
const listStr = getListInfo(nucmrcConfig[registryConfig.registryName]);
userList = `${colors.custom(`【${registryConfig.registryName}】`)}\n${listStr}`;
console.log(listStr ? userList : defaultLog.red);
}
console.log(userList || defaultLog.red);
return userList;
}

Expand Down
8 changes: 8 additions & 0 deletions src/constants/registries.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
"home": "https://npmmirror.com",
"registry": "https://registry.npmmirror.com/"
},
"oldTaobao1": {
"home": "https://npmmirror.com",
"registry": "https://registry.npm.taobao.org"
},
"oldTaobao2": {
"home": "https://npmmirror.com",
"registry": "https://npm.taobao.org"
},
"npmMirror": {
"home": "https://skimdb.npmjs.com/",
"registry": "https://skimdb.npmjs.com/registry/"
Expand Down

0 comments on commit 0e8ad73

Please sign in to comment.