chore: sync skill to v2.2.1

- NW 7.40 E2E-verified compatibility matrix in SKILL.md
- DDIC fixes: include namespace, tabletype exists check, DDIC delete lock Accept
- New commands: clone, enhancement, history, unit-test
- 665 tests, 96% coverage
This commit is contained in:
2026-07-10 19:13:46 +08:00
parent 3a7fba0860
commit 38e99638c5
16 changed files with 951 additions and 16 deletions
+16
View File
@@ -37,6 +37,10 @@ from sapcli.commands import (
cmd_activate,
cmd_upload,
cmd_syntax_check,
cmd_unit_test,
cmd_history,
cmd_clone,
cmd_enhancement,
)
from sapcli.auth import cmd_auth_login, cmd_auth_logout, cmd_auth_status
from sapcli.exceptions import SapCliError, ConfigError
@@ -101,6 +105,15 @@ def main() -> None:
cmd_auth_status(args)
return
# clone 自行按 --from/--to profile 构建源/目标连接,跳过默认登录
if args.command == "clone":
try:
cmd_clone(args, None)
except SapCliError as e:
print(f"\n{e}")
sys.exit(1)
return
# 加载配置
try:
sap_cfg, loaded_from = load_config(args.config, profile=getattr(args, "profile", None))
@@ -146,6 +159,9 @@ def main() -> None:
"show-table": cmd_show_table,
"read-table": cmd_read_table,
"run-program": cmd_run_program,
"unit-test": cmd_unit_test,
"history": cmd_history,
"enhancement": cmd_enhancement,
}
# 批量 sync 参数校验
+23
View File
@@ -260,4 +260,27 @@ CDS View:
p_run = subparsers.add_parser("run-program", help="远程执行 ABAP 程序 (SA38)")
p_run.add_argument("--name", required=True, help="程序名")
# ── unit-test ──
sp_unit = subparsers.add_parser("unit-test", help="运行 ABAP Unit 测试")
sp_unit.add_argument("--name", required=True, help="对象名称")
sp_unit.add_argument("--type", required=True, help="对象类型")
# ── history ──
sp_history = subparsers.add_parser("history", help="查看对象版本历史")
sp_history.add_argument("--name", required=True, help="对象名称")
sp_history.add_argument("--type", required=True, help="对象类型")
# ── clone ──
sp_clone = subparsers.add_parser("clone", help="跨系统克隆对象")
sp_clone.add_argument("--name", required=True, help="对象名称")
sp_clone.add_argument("--type", required=True, help="对象类型")
sp_clone.add_argument("--from", dest="from_profile", required=True, help="源系统 profile")
sp_clone.add_argument("--to", dest="to_profile", required=True, help="目标系统 profile")
sp_clone.add_argument("--corr_nr", default=None, help="目标系统的传输请求号")
# ── enhancement ──
sp_enh = subparsers.add_parser("enhancement", help="查询对象的增强实现")
sp_enh.add_argument("--name", required=True, help="对象名称")
sp_enh.add_argument("--type", required=True, help="对象类型")
return parser