mirror of
https://github.com/RubyMetric/chsrc
synced 2026-02-26 09:01:15 +08:00
所有语言设置 scope 信息
This commit is contained in:
@@ -17,7 +17,11 @@ pl_dart_flutter_prelude (void)
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 2, "@czyt", "@xrgzs");
|
||||
|
||||
chef_allow_local_mode (this, CanNot, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unknown);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unknown);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_allow_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ pl_dart_prelude (void)
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 2, "@czyt", "@xrgzs");
|
||||
|
||||
chef_allow_local_mode (this, FullyCan, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unknown);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unknown);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_allow_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -31,7 +31,11 @@ pl_go_prelude ()
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 2, "@czyt", "@techoc");
|
||||
|
||||
chef_allow_local_mode (this, CanNot, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unknown);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_deny_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ pl_haskell_prelude ()
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 1, "@hezonglun");
|
||||
|
||||
chef_allow_local_mode (this, CanNot, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unknown);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unknown);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_deny_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,15 @@ pl_java_prelude ()
|
||||
chef_set_cooks (this, 2, "@BingChunMoLi", "@ccmywish");
|
||||
chef_set_sauciers (this, 0);
|
||||
|
||||
chef_allow_local_mode (this, CanNot, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unknown);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Able_And_Implemented);
|
||||
/**
|
||||
* TODO: 当前实现将首先尝试 SystemScope, 若失败则尝试 UserScope
|
||||
* 所以并不是真正意义上的某种 Scope,而是两者的叠加,后续考虑强制执行用户所选择的 Scope 以达到用户期待
|
||||
*/
|
||||
chef_set_default_scope (this, SystemScope);
|
||||
|
||||
chef_deny_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ pl_js_bun_prelude (void)
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 1, "@lontten");
|
||||
|
||||
chef_allow_local_mode (this, FullyCan, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unknown);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_allow_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ pl_js_yarn_prelude (void)
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 1, "@MrWillCom");
|
||||
|
||||
chef_allow_local_mode (this, FullyCan, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_allow_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -25,9 +25,12 @@ pl_js_group_prelude (void)
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 2, "@lontten", "@MrWillCom");
|
||||
|
||||
chef_allow_local_mode (this, PartiallyCan,
|
||||
"支持 npm, yarn v2, pnpm, 不支持 yarn v1",
|
||||
"Support npm, yarn v2, pnpm, not yarn v1");
|
||||
/* ProjectScope 支持 npm, yarn v2, pnpm, 不支持 yarn v1 */
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unknown);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_allow_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
@@ -59,7 +62,11 @@ pl_js_nodejs_binary_prelude (void)
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 0);
|
||||
|
||||
chef_allow_local_mode (this, CanNot, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unknown);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unknown);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_allow_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ pl_js_npm_prelude (void)
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 1, "@MrWillCom");
|
||||
|
||||
chef_allow_local_mode (this, FullyCan, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_allow_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ pl_js_nvm_prelude (void)
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 0);
|
||||
|
||||
chef_allow_local_mode (this, CanNot, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unknown);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_allow_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ pl_js_pnpm_prelude (void)
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 0);
|
||||
|
||||
chef_allow_local_mode (this, FullyCan, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_allow_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ pl_julia_prelude ()
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 1, "@hezonglun");
|
||||
|
||||
chef_allow_local_mode (this, CanNot, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unknown);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unknown);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_allow_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -24,7 +24,11 @@ pl_lua_prelude ()
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 1, "@hezonglun");
|
||||
|
||||
chef_allow_local_mode (this, CanNot, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unknown);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unknown);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_deny_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ pl_nuget_prelude ()
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 0);
|
||||
|
||||
chef_allow_local_mode (this, CanNot, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unknown);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unknown);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_deny_english(this);
|
||||
chef_deny_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ pl_ocaml_prelude ()
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 1, "@hezonglun");
|
||||
|
||||
chef_allow_local_mode (this, CanNot, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unknown);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unknown);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_deny_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ pl_php_prelude ()
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 1, "@hezonglun");
|
||||
|
||||
chef_allow_local_mode (this, FullyCan, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unknown);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unknown);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_deny_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ pl_perl_prelude ()
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 2, "@hezonglun", "@Mikachu2333");
|
||||
|
||||
chef_allow_local_mode (this, CanNot, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unknown);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unknown);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_deny_english (this);
|
||||
chef_allow_user_define (this);
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ pl_python_pdm_prelude (void)
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 0);
|
||||
|
||||
chef_allow_local_mode (this, FullyCan, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_allow_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,12 @@ pl_python_poetry_prelude (void)
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 0);
|
||||
|
||||
chef_allow_local_mode (this, FullyCan, "Poetry 默认使用项目级换源", "Poetry uses project-level source changing by default");
|
||||
/* Poetry 仅支持项目级换源 */
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Unable);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
|
||||
chef_set_default_scope (this, ProjectScope);
|
||||
|
||||
chef_allow_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
@@ -41,12 +46,7 @@ pl_python_poetry_setsrc (char *option)
|
||||
if (chsrc_in_standalone_mode())
|
||||
chsrc_confirm_source(&source);
|
||||
|
||||
char *cmd = NULL;
|
||||
|
||||
if (!chsrc_in_project_scope_mode())
|
||||
chsrc_alert2 ("Poetry 仅支持项目级换源");
|
||||
|
||||
cmd = xy_2strcat ("poetry source add my_mirror ", source.url);
|
||||
char *cmd = xy_2strcat ("poetry source add my_mirror ", source.url);
|
||||
chsrc_run (cmd, RunOpt_No_Last_New_Line);
|
||||
|
||||
if (chsrc_in_standalone_mode())
|
||||
|
||||
@@ -19,7 +19,11 @@ pl_python_rye_prelude (void)
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 0);
|
||||
|
||||
chef_allow_local_mode (this, FullyCan, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unknown);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_allow_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -41,7 +41,12 @@ pl_python_group_prelude (void)
|
||||
chef_set_cooks (this, 2, "@ccmywish", "@happy-game");
|
||||
chef_set_sauciers (this, 3, "@xyx1926885268", "@Kattos", "@Mikachu2333");
|
||||
|
||||
chef_allow_local_mode (this, PartiallyCan, "部分包管理器支持项目级换源", "Some package managers support project-level source changing");
|
||||
/* 部分包管理器支持 ProjectScope,但是为了让流程执行下去,我们这里都写 ScopeCap_Able_And_Implemented */
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_allow_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ pl_python_pip_prelude (void)
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 1, "@happy-game");
|
||||
|
||||
chef_allow_local_mode (this, CanNot, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unable);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_allow_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ pl_python_uv_prelude (void)
|
||||
chef_set_cooks (this, 2, "@happy-game", "@MingriLingran");
|
||||
chef_set_sauciers (this, 2, "@Kattos", "@ccmywish");
|
||||
|
||||
chef_allow_local_mode (this, FullyCan, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Able_But_Not_Implemented);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_allow_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ pl_r_prelude ()
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 1, "@hezonglun");
|
||||
|
||||
chef_allow_local_mode (this, CanNot, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unknown);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unknown);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_deny_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -24,7 +24,12 @@ pl_ruby_prelude (void)
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 1, "@BingChunMoLi");
|
||||
|
||||
chef_allow_local_mode (this, PartiallyCan, "支持 bundler. 不支持 gem", "Support bundler. Not support gem");
|
||||
/* 支持 bundler. 不支持 gem */
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_allow_english(this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ pl_rust_cargo_prelude (void)
|
||||
chef_set_cooks (this, 2, "@Mikachu2333", "@ccmywish");
|
||||
chef_set_sauciers (this, 1, "@happy-game");
|
||||
|
||||
chef_allow_local_mode (this, FullyCan, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Able_But_Not_Implemented);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_deny_english (this);
|
||||
chef_allow_user_define (this);
|
||||
|
||||
|
||||
@@ -20,7 +20,11 @@ pl_rust_rustup_prelude (void)
|
||||
chef_set_cooks (this, 1, "@ccmywish");
|
||||
chef_set_sauciers (this, 2, "@Yangmoooo", "@Mikachu2333");
|
||||
|
||||
chef_allow_local_mode (this, CanNot, NULL, NULL);
|
||||
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unable);
|
||||
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
|
||||
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
|
||||
chef_set_default_scope (this, UserScope);
|
||||
|
||||
chef_deny_english (this);
|
||||
chef_allow_user_define(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user