ErisPulse 2.2.1.dev0__py3-none-any.whl → 2.3.0__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.
Files changed (36) hide show
  1. ErisPulse/Core/Bases/__init__.py +14 -0
  2. ErisPulse/Core/Bases/adapter.py +196 -0
  3. ErisPulse/Core/Bases/module.py +54 -0
  4. ErisPulse/Core/Event/__init__.py +14 -0
  5. ErisPulse/Core/Event/base.py +15 -2
  6. ErisPulse/Core/Event/command.py +21 -2
  7. ErisPulse/Core/Event/message.py +15 -0
  8. ErisPulse/Core/Event/meta.py +15 -0
  9. ErisPulse/Core/Event/notice.py +15 -0
  10. ErisPulse/Core/Event/request.py +16 -1
  11. ErisPulse/Core/__init__.py +38 -19
  12. ErisPulse/Core/{erispulse_config.py → _self_config.py} +27 -2
  13. ErisPulse/Core/adapter.py +374 -377
  14. ErisPulse/Core/config.py +137 -38
  15. ErisPulse/Core/exceptions.py +6 -1
  16. ErisPulse/Core/lifecycle.py +167 -0
  17. ErisPulse/Core/logger.py +97 -49
  18. ErisPulse/Core/module.py +279 -56
  19. ErisPulse/Core/router.py +112 -23
  20. ErisPulse/Core/storage.py +258 -77
  21. ErisPulse/Core/ux.py +635 -0
  22. ErisPulse/__init__.py +722 -244
  23. ErisPulse/__main__.py +1 -1999
  24. ErisPulse/utils/__init__.py +17 -0
  25. ErisPulse/utils/cli.py +1092 -0
  26. ErisPulse/utils/console.py +53 -0
  27. ErisPulse/utils/package_manager.py +845 -0
  28. ErisPulse/utils/reload_handler.py +111 -0
  29. {erispulse-2.2.1.dev0.dist-info → erispulse-2.3.0.dist-info}/METADATA +24 -6
  30. erispulse-2.3.0.dist-info/RECORD +34 -0
  31. {erispulse-2.2.1.dev0.dist-info → erispulse-2.3.0.dist-info}/WHEEL +1 -1
  32. {erispulse-2.2.1.dev0.dist-info → erispulse-2.3.0.dist-info}/licenses/LICENSE +1 -1
  33. ErisPulse/Core/env.py +0 -15
  34. ErisPulse/Core/module_registry.py +0 -227
  35. erispulse-2.2.1.dev0.dist-info/RECORD +0 -26
  36. {erispulse-2.2.1.dev0.dist-info → erispulse-2.3.0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,53 @@
1
+ import sys
2
+ from rich.console import Console
3
+ from rich.theme import Theme
4
+ from rich.highlighter import RegexHighlighter
5
+
6
+ # 确保在Windows上启用颜色
7
+ if sys.platform == "win32":
8
+ from colorama import init
9
+ init()
10
+
11
+ class CommandHighlighter(RegexHighlighter):
12
+ """
13
+ 高亮CLI命令和参数
14
+
15
+ {!--< tips >!--}
16
+ 使用正则表达式匹配命令行参数和选项
17
+ {!--< /tips >!--}
18
+ """
19
+ highlights = [
20
+ r"(?P<switch>\-\-?\w+)",
21
+ r"(?P<option>\[\w+\])",
22
+ r"(?P<command>\b\w+\b)",
23
+ ]
24
+
25
+ # 主题配置
26
+ theme = Theme({
27
+ "info": "dim cyan",
28
+ "success": "bold green",
29
+ "warning": "bold yellow",
30
+ "error": "bold red",
31
+ "title": "bold magenta",
32
+ "default": "default",
33
+ "progress": "green",
34
+ "progress.remaining": "white",
35
+ "cmd": "bold blue",
36
+ "param": "italic cyan",
37
+ "switch": "bold yellow",
38
+ "module": "bold green",
39
+ "adapter": "bold yellow",
40
+ "cli": "bold magenta",
41
+ })
42
+
43
+ # 全局控制台实例
44
+ console = Console(
45
+ theme=theme,
46
+ color_system="auto",
47
+ force_terminal=True,
48
+ highlighter=CommandHighlighter()
49
+ )
50
+
51
+ __all__ = [
52
+ "console",
53
+ ]