ErisPulse 2.1.11__py3-none-any.whl → 2.1.12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ErisPulse/Core/logger.py +1 -1
- ErisPulse/__main__.py +54 -8
- {erispulse-2.1.11.dist-info → erispulse-2.1.12.dist-info}/METADATA +1 -1
- {erispulse-2.1.11.dist-info → erispulse-2.1.12.dist-info}/RECORD +7 -7
- {erispulse-2.1.11.dist-info → erispulse-2.1.12.dist-info}/WHEEL +0 -0
- {erispulse-2.1.11.dist-info → erispulse-2.1.12.dist-info}/entry_points.txt +0 -0
- {erispulse-2.1.11.dist-info → erispulse-2.1.12.dist-info}/licenses/LICENSE +0 -0
ErisPulse/Core/logger.py
CHANGED
ErisPulse/__main__.py
CHANGED
|
@@ -474,13 +474,13 @@ def main():
|
|
|
474
474
|
|
|
475
475
|
# 列表命令
|
|
476
476
|
list_parser = subparsers.add_parser('list', help='列出已安装的模块/适配器')
|
|
477
|
-
list_parser.add_argument('--type', '-t', choices=['modules', 'adapters', 'all'], default='all',
|
|
478
|
-
help='列出类型 (modules: 仅模块, adapters: 仅适配器, all: 全部)')
|
|
477
|
+
list_parser.add_argument('--type', '-t', choices=['modules', 'adapters', 'cli', 'all'], default='all',
|
|
478
|
+
help='列出类型 (modules: 仅模块, adapters: 仅适配器, cli: 仅CLI扩展, all: 全部)')
|
|
479
479
|
|
|
480
480
|
# 远程列表命令
|
|
481
481
|
list_remote_parser = subparsers.add_parser('list-remote', help='列出远程可用的模块和适配器')
|
|
482
|
-
list_remote_parser.add_argument('--type', '-t', choices=['modules', 'adapters', 'all'], default='all',
|
|
483
|
-
help='列出类型 (modules: 仅模块, adapters: 仅适配器, all: 全部)')
|
|
482
|
+
list_remote_parser.add_argument('--type', '-t', choices=['modules', 'adapters', 'cli', 'all'], default='all',
|
|
483
|
+
help='列出类型 (modules: 仅模块, adapters: 仅适配器, cli: 仅CLI扩展, all: 全部)')
|
|
484
484
|
# 升级命令
|
|
485
485
|
upgrade_parser = subparsers.add_parser('upgrade', help='升级所有模块/适配器')
|
|
486
486
|
upgrade_parser.add_argument('--force', '-f', action='store_true', help='跳过确认直接升级')
|
|
@@ -567,6 +567,25 @@ def main():
|
|
|
567
567
|
elif args.command == "list":
|
|
568
568
|
installed = PyPIManager.get_installed_packages()
|
|
569
569
|
|
|
570
|
+
# 获取已安装的CLI扩展
|
|
571
|
+
cli_extensions = {}
|
|
572
|
+
try:
|
|
573
|
+
entry_points = importlib.metadata.entry_points()
|
|
574
|
+
if hasattr(entry_points, 'select'):
|
|
575
|
+
cli_entries = entry_points.select(group='erispulse.cli')
|
|
576
|
+
else:
|
|
577
|
+
cli_entries = entry_points.get('erispulse.cli', [])
|
|
578
|
+
|
|
579
|
+
for entry in cli_entries:
|
|
580
|
+
dist = entry.dist
|
|
581
|
+
cli_extensions[entry.name] = {
|
|
582
|
+
"package": dist.metadata["Name"],
|
|
583
|
+
"version": dist.version,
|
|
584
|
+
"summary": dist.metadata["Summary"]
|
|
585
|
+
}
|
|
586
|
+
except Exception as e:
|
|
587
|
+
console.print(f"[yellow]获取CLI扩展信息失败: {e}[/]", style="warning")
|
|
588
|
+
|
|
570
589
|
if args.type in ["modules", "all"] and installed["modules"]:
|
|
571
590
|
table = Table(title="已安装模块", box=SIMPLE)
|
|
572
591
|
table.add_column("模块名", style="green")
|
|
@@ -591,9 +610,20 @@ def main():
|
|
|
591
610
|
|
|
592
611
|
console.print(table)
|
|
593
612
|
|
|
594
|
-
|
|
613
|
+
if cli_extensions and args.type in ["cli", "all"]:
|
|
614
|
+
table = Table(title="已安装CLI扩展", box=SIMPLE)
|
|
615
|
+
table.add_column("命令名", style="magenta")
|
|
616
|
+
table.add_column("包名", style="blue")
|
|
617
|
+
table.add_column("版本")
|
|
618
|
+
table.add_column("描述")
|
|
619
|
+
|
|
620
|
+
for name, info in cli_extensions.items():
|
|
621
|
+
table.add_row(name, info["package"], info["version"], info["summary"])
|
|
622
|
+
console.print(table)
|
|
623
|
+
|
|
624
|
+
if not installed["modules"] and not installed["adapters"] and not cli_extensions:
|
|
595
625
|
console.print(Panel(
|
|
596
|
-
"没有安装任何ErisPulse
|
|
626
|
+
"没有安装任何ErisPulse模块、适配器或CLI扩展",
|
|
597
627
|
title="提示",
|
|
598
628
|
style="info"
|
|
599
629
|
))
|
|
@@ -642,10 +672,26 @@ def main():
|
|
|
642
672
|
table.add_row(name, info["package"], info["version"], info["description"])
|
|
643
673
|
|
|
644
674
|
console.print(table)
|
|
675
|
+
|
|
676
|
+
# 展示远程CLI扩展
|
|
677
|
+
if "cli_extensions" in remote_packages and args.type in ["cli", "all"] and remote_packages["cli_extensions"]:
|
|
678
|
+
table = Table(title="远程CLI扩展", box=SIMPLE)
|
|
679
|
+
table.add_column("命令名", style="magenta")
|
|
680
|
+
table.add_column("包名", style="blue")
|
|
681
|
+
table.add_column("版本")
|
|
682
|
+
table.add_column("描述")
|
|
683
|
+
|
|
684
|
+
for name, info in remote_packages["cli_extensions"].items():
|
|
685
|
+
commands = info.get("command", [])
|
|
686
|
+
command_str = ", ".join(commands) if isinstance(commands, list) else str(commands)
|
|
687
|
+
table.add_row(command_str, info["package"], info["version"], info["description"])
|
|
688
|
+
|
|
689
|
+
console.print(table)
|
|
645
690
|
|
|
646
|
-
if not remote_packages["modules"] and not remote_packages["adapters"]
|
|
691
|
+
if not remote_packages["modules"] and not remote_packages["adapters"] and \
|
|
692
|
+
(not "cli_extensions" in remote_packages or not remote_packages["cli_extensions"]):
|
|
647
693
|
console.print(Panel(
|
|
648
|
-
"
|
|
694
|
+
"没有找到远程模块、适配器或CLI扩展",
|
|
649
695
|
title="提示",
|
|
650
696
|
style="info"
|
|
651
697
|
))
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
ErisPulse/__init__.py,sha256=T-N56UQyBmpvlqwH2wGi5ptPzaJpbgF5tKkJt0DlkaM,26099
|
|
2
|
-
ErisPulse/__main__.py,sha256=
|
|
2
|
+
ErisPulse/__main__.py,sha256=A9rh8y7esZEuY8xb8R_N8zqPYSTWO_YZam1Cd6LFhP0,28190
|
|
3
3
|
ErisPulse/Core/__init__.py,sha256=tBYPahQ7-w7U6M69xy8DW0_ECa9ja-Q0y_SQqVswYBo,409
|
|
4
4
|
ErisPulse/Core/adapter.py,sha256=ZK81dibJ471FowL0MRXkS113iBcMgj_VzpTw0PzhAEo,18102
|
|
5
5
|
ErisPulse/Core/config.py,sha256=ZmwGdtHSOE7K5uOGzLYcyl3ZF3sAmeWAntqcdfDzhpM,5027
|
|
6
6
|
ErisPulse/Core/env.py,sha256=HGkzsdbxh8c1GSDJhnGP9B09Sz2ZeNbRxWieaFmAcug,18870
|
|
7
|
-
ErisPulse/Core/logger.py,sha256=
|
|
7
|
+
ErisPulse/Core/logger.py,sha256=cJzNXF-EmdWxwgiHg5Itmkwsva2Jhe9l9X4rXKiXHgc,8296
|
|
8
8
|
ErisPulse/Core/mods.py,sha256=2yIq8t9Ca9CBPRiZU0yr8Lc0XGmmkB7LlH-5FWqXjw4,7023
|
|
9
9
|
ErisPulse/Core/raiserr.py,sha256=vlyaaiOIYkyqm9dAqSW9E54JBzX-9roHDp5_r6I0yUU,5591
|
|
10
10
|
ErisPulse/Core/server.py,sha256=FkDTeLuHD5IBnWVxvYU8pHb6yCt8GzyvC1bpOiJ7G7I,9217
|
|
11
11
|
ErisPulse/Core/util.py,sha256=7rdMmn6sBFqYd4znxBCcJjuv2eyTExdeKyZopgds868,3796
|
|
12
|
-
erispulse-2.1.
|
|
13
|
-
erispulse-2.1.
|
|
14
|
-
erispulse-2.1.
|
|
15
|
-
erispulse-2.1.
|
|
16
|
-
erispulse-2.1.
|
|
12
|
+
erispulse-2.1.12.dist-info/METADATA,sha256=rfHYXiTX37hUr5YIfzkm6plWIjxUcMqSp80iSnO34VI,6259
|
|
13
|
+
erispulse-2.1.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
14
|
+
erispulse-2.1.12.dist-info/entry_points.txt,sha256=Jss71M6nEha0TA-DyVZugPYdcL14s9QpiOeIlgWxzOc,182
|
|
15
|
+
erispulse-2.1.12.dist-info/licenses/LICENSE,sha256=4jyqikiB0G0n06CEEMMTzTXjE4IShghSlB74skMSPQs,1464
|
|
16
|
+
erispulse-2.1.12.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|