mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-03-12 23:45:11 +08:00
parent
245f0ed5d5
commit
5419a13936
@ -71,6 +71,8 @@ pl_nodejs_setsrc (char *option)
|
||||
chsrc_note2 (msg);
|
||||
}
|
||||
|
||||
chsrc_set_measure_upstream (PL_NodeJS_NPM_Upstream_Measure_URL);
|
||||
|
||||
bool npm_exist, yarn_exist, pnpm_exist;
|
||||
pl_nodejs_check_cmd (&npm_exist, &yarn_exist, &pnpm_exist);
|
||||
|
||||
|
@ -40,6 +40,8 @@ pl_nodejs_yarn_getsrc (char *option)
|
||||
void
|
||||
pl_nodejs_yarn_setsrc (char *option)
|
||||
{
|
||||
chsrc_set_measure_upstream (PL_NodeJS_NPM_Upstream_Measure_URL);
|
||||
|
||||
Source_t source;
|
||||
chsrc_yield_for_the_source (pl_nodejs);
|
||||
if (ProgMode_Target_Group!=true)
|
||||
|
@ -5,16 +5,17 @@
|
||||
* Contributors : Nul None <nul@none.org>
|
||||
* Created On : <2023-09-09>
|
||||
* Major Revision : 1
|
||||
* Last Modified : <2024-09-23>
|
||||
* Last Modified : <2024-11-22>
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
static MirrorSite_t
|
||||
NpmMirror = {
|
||||
"npmmirror", "npmmirror", "npmmirror (阿里云赞助)", "https://npmmirror.com/",
|
||||
// 注意,下面这个是跳转后的地址,不确定未来会不会改变
|
||||
{NotSkip, NA, NA, "https://cdn.npmmirror.com/packages/%40tensorflow/tfjs/4.10.0/tfjs-4.10.0.tgz"} // 29MB
|
||||
{NotSkip, NA, NA, "https://cdn.npmmirror.com/packages/%40tensorflow/tfjs/4.22.0/tfjs-4.22.0.tgz"} // 29MB
|
||||
};
|
||||
|
||||
#define PL_NodeJS_NPM_Upstream_Measure_URL "https://registry.npmjs.org/@tensorflow/tfjs/-/tfjs-4.22.0.tgz"
|
||||
|
||||
/**
|
||||
* @update 2024-09-23
|
||||
@ -28,10 +29,10 @@ NpmMirror = {
|
||||
*/
|
||||
static Source_t
|
||||
pl_nodejs_sources[] = {
|
||||
{&UpstreamProvider, "https://registry.npmjs.org/"}, // @note 根据 pnpm 官网,有最后的斜线
|
||||
{&NpmMirror, "https://registry.npmmirror.com"},
|
||||
{&Huawei, "https://mirrors.huaweicloud.com/repository/npm/"},
|
||||
{&Tencent, "https://mirrors.cloud.tencent.com/npm/"},
|
||||
{&UpstreamProvider, "https://registry.npmjs.org/"}, /* @note 根据 pnpm 官网,有最后的斜线 */
|
||||
{&NpmMirror, "https://registry.npmmirror.com"},
|
||||
{&Huawei, "https://mirrors.huaweicloud.com/repository/npm/"},
|
||||
{&Tencent, "https://mirrors.cloud.tencent.com/npm/"},
|
||||
};
|
||||
def_sources_n(pl_nodejs);
|
||||
|
||||
@ -45,13 +46,13 @@ def_sources_n(pl_nodejs);
|
||||
*/
|
||||
static Source_t
|
||||
pl_nodejs_binary_release_sources[] = {
|
||||
{&UpstreamProvider, "https://nodejs.org/dist/"},
|
||||
{&NpmMirror, "https://npmmirror.com/mirrors"},
|
||||
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/nodejs-release/"},
|
||||
{&Bfsu, "https://mirrors.bfsu.edu.cn/nodejs-release/"},
|
||||
{&Ustc, "https://mirrors.ustc.edu.cn/node/"},
|
||||
{&UpstreamProvider, "https://nodejs.org/dist/"},
|
||||
{&NpmMirror, "https://npmmirror.com/mirrors"},
|
||||
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/nodejs-release/"},
|
||||
{&Bfsu, "https://mirrors.bfsu.edu.cn/nodejs-release/"},
|
||||
{&Ustc, "https://mirrors.ustc.edu.cn/node/"},
|
||||
|
||||
{&Huawei, "https://mirrors.huaweicloud.com/nodejs/"},
|
||||
{&Tencent, "https://mirrors.cloud.tencent.com/nodejs-release/"},
|
||||
{&Huawei, "https://mirrors.huaweicloud.com/nodejs/"},
|
||||
{&Tencent, "https://mirrors.cloud.tencent.com/nodejs-release/"},
|
||||
};
|
||||
def_sources_n(pl_nodejs_binary_release);
|
||||
|
@ -26,6 +26,8 @@ pl_nodejs_npm_getsrc (char *option)
|
||||
void
|
||||
pl_nodejs_npm_setsrc (char *option)
|
||||
{
|
||||
chsrc_set_measure_upstream (PL_NodeJS_NPM_Upstream_Measure_URL);
|
||||
|
||||
Source_t source;
|
||||
chsrc_yield_for_the_source (pl_nodejs);
|
||||
if (ProgMode_Target_Group!=true)
|
||||
|
@ -27,6 +27,8 @@ pl_nodejs_pnpm_getsrc (char *option)
|
||||
void
|
||||
pl_nodejs_pnpm_setsrc (char *option)
|
||||
{
|
||||
chsrc_set_measure_upstream (PL_NodeJS_NPM_Upstream_Measure_URL);
|
||||
|
||||
Source_t source;
|
||||
chsrc_yield_for_the_source (pl_nodejs);
|
||||
if (ProgMode_Target_Group!=true)
|
||||
|
Loading…
x
Reference in New Issue
Block a user