ErisPulse 2.1.14.dev1__tar.gz → 2.1.15.dev3__tar.gz
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-2.1.15.dev3/.github/ISSUE_TEMPLATE/config.yml +5 -0
- erispulse-2.1.15.dev3/.github/ISSUE_TEMPLATE/module_submission.md +38 -0
- erispulse-2.1.15.dev3/.github/PULL_REQUEST_TEMPLATE.md +22 -0
- erispulse-2.1.15.dev3/.github/scripts/update_packages.py +125 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/.github/workflows/auto-tag-release.yml +33 -4
- erispulse-2.1.15.dev3/.github/workflows/auto-update-packages.yml +84 -0
- erispulse-2.1.15.dev3/.worker/worker.js +118 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/PKG-INFO +34 -19
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/README.md +30 -15
- erispulse-2.1.15.dev3/SECURITY.md +25 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/devs/test.py +85 -116
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/AIDocs/ErisPulse-AdapterDev.md +547 -460
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/AIDocs/ErisPulse-Core.md +599 -459
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/AIDocs/ErisPulse-Full.md +625 -481
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/AIDocs/ErisPulse-ModuleDev.md +616 -472
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/AdapterStandards/APIResponse.md +1 -1
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/CHANGELOG.md +61 -1
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/CLI.md +74 -10
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/Development/Adapter.md +3 -3
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/Development/Module.md +6 -6
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/PlatformFeatures.md +64 -7
- {erispulse-2.1.14.dev1/style_guide → erispulse-2.1.15.dev3/docs/StyleGuide}/README.md +1 -1
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/UseCore.md +44 -11
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/api/ErisPulse/Core/adapter.md +2 -2
- erispulse-2.1.15.dev3/docs/api/ErisPulse/Core/config.md +17 -0
- erispulse-2.1.15.dev3/docs/api/ErisPulse/Core/env.md +19 -0
- erispulse-2.1.15.dev3/docs/api/ErisPulse/Core/erispulse_config.md +60 -0
- erispulse-2.1.15.dev3/docs/api/ErisPulse/Core/exceptions.md +45 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/api/ErisPulse/Core/logger.md +38 -2
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/api/ErisPulse/Core/mods.md +2 -2
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/api/ErisPulse/Core/router.md +2 -2
- erispulse-2.1.14.dev1/docs/api/ErisPulse/Core/env.md → erispulse-2.1.15.dev3/docs/api/ErisPulse/Core/storage.md +54 -53
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/api/ErisPulse/__init__.md +3 -4
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/api/ErisPulse/__main__.md +10 -5
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/examples/example-adapter/MyAdapter/Core.py +4 -4
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/examples/example-module/MyModule/Core.py +3 -3
- erispulse-2.1.15.dev3/packages.json +203 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/pyproject.toml +4 -5
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/scripts/install/install.ps1 +120 -17
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/scripts/install/install.sh +36 -12
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/src/ErisPulse/Core/__init__.py +4 -2
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/src/ErisPulse/Core/adapter.py +16 -13
- erispulse-2.1.15.dev3/src/ErisPulse/Core/config.py +78 -0
- erispulse-2.1.15.dev3/src/ErisPulse/Core/env.py +15 -0
- erispulse-2.1.15.dev3/src/ErisPulse/Core/erispulse_config.py +105 -0
- erispulse-2.1.15.dev3/src/ErisPulse/Core/exceptions.py +108 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/src/ErisPulse/Core/logger.py +79 -2
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/src/ErisPulse/Core/mods.py +22 -18
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/src/ErisPulse/Core/router.py +6 -1
- erispulse-2.1.14.dev1/src/ErisPulse/Core/env.py → erispulse-2.1.15.dev3/src/ErisPulse/Core/storage.py +64 -59
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/src/ErisPulse/__init__.py +40 -22
- erispulse-2.1.15.dev3/src/ErisPulse/__main__.py +1957 -0
- erispulse-2.1.14.dev1/CHANGELOG_1.x.md +0 -378
- erispulse-2.1.14.dev1/docs/api/ErisPulse/Core/config.md +0 -61
- erispulse-2.1.14.dev1/docs/api/ErisPulse/Core/exceptions.md +0 -74
- erispulse-2.1.14.dev1/src/ErisPulse/Core/config.py +0 -172
- erispulse-2.1.14.dev1/src/ErisPulse/Core/exceptions.py +0 -136
- erispulse-2.1.14.dev1/src/ErisPulse/__main__.py +0 -1104
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/.github/assets/docs/install_pip.gif +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/.github/assets/erispulse_logo.png +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/.github/tools/merge_md.py +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/.github/tools/update-api-docs.py +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/.github/workflows/pypi-publish.yml +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/.gitignore +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/.python-version +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/CODE_OF_CONDUCT.md +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/LICENSE +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/devs/test_adapter.py +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/devs/test_files/test.docx +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/devs/test_files/test.jpg +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/devs/test_files/test.mp4 +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/AIModuleGeneration.md +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/AdapterStandards/EventConversion.md +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/AdapterStandards/README.md +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/Development/CLI.md +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/Development/README.md +0 -0
- /erispulse-2.1.14.dev1/style_guide/DOCSTRING_SPEC.md → /erispulse-2.1.15.dev3/docs/StyleGuide/DocstringSpec.md +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/docs/quick-start.md +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/examples/example-adapter/LICENSE +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/examples/example-adapter/MyAdapter/__init__.py +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/examples/example-adapter/README.md +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/examples/example-adapter/pyproject.toml +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/examples/example-cli-module/LICENSE +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/examples/example-cli-module/README.md +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/examples/example-cli-module/my_cli_module/__init__.py +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/examples/example-cli-module/my_cli_module/cli.py +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/examples/example-cli-module/pyproject.toml +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/examples/example-module/LICENSE +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/examples/example-module/MyModule/__init__.py +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/examples/example-module/README.md +0 -0
- {erispulse-2.1.14.dev1 → erispulse-2.1.15.dev3}/examples/example-module/pyproject.toml +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 模块/适配器/CLI扩展提交
|
|
3
|
+
about: 提交一个新的模块、适配器或CLI扩展到 ErisPulse 生态系统
|
|
4
|
+
title: '[提交] '
|
|
5
|
+
labels: 'submission'
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 提交类型
|
|
11
|
+
<!-- 请在适用的选项前打勾 -->
|
|
12
|
+
- [ ] 模块 (Module)
|
|
13
|
+
- [ ] 适配器 (Adapter)
|
|
14
|
+
- [ ] CLI 扩展 (CLI Extension)
|
|
15
|
+
|
|
16
|
+
## 基本信息
|
|
17
|
+
- **名称**:
|
|
18
|
+
- **描述**:
|
|
19
|
+
- **作者**:
|
|
20
|
+
- **仓库地址**:
|
|
21
|
+
|
|
22
|
+
## 技术信息
|
|
23
|
+
- **最低 SDK 版本要求** (如适用):
|
|
24
|
+
- **依赖项** (如适用):
|
|
25
|
+
|
|
26
|
+
## 其他信息
|
|
27
|
+
- [ ] 官方维护
|
|
28
|
+
- **标签** (用逗号分隔):
|
|
29
|
+
|
|
30
|
+
## 检查清单
|
|
31
|
+
<!-- 请确认以下事项 -->
|
|
32
|
+
- [ ] 代码遵循 ErisPulse 开发规范
|
|
33
|
+
- [ ] 包含适当的文档
|
|
34
|
+
- [ ] 包含测试用例(如适用)
|
|
35
|
+
- [ ] 已在 PyPI 发布(如适用)
|
|
36
|
+
|
|
37
|
+
## 备注
|
|
38
|
+
<!-- 其他需要说明的信息 -->
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
## 提交类型
|
|
2
|
+
<!-- 请在适用的选项前打勾 -->
|
|
3
|
+
- [ ] 功能新增
|
|
4
|
+
- [ ] Bug 修复
|
|
5
|
+
- [ ] 文档更新
|
|
6
|
+
- [ ] 代码优化
|
|
7
|
+
- [ ] 其他
|
|
8
|
+
|
|
9
|
+
## 变更描述
|
|
10
|
+
<!-- 请详细描述本次提交的内容 -->
|
|
11
|
+
|
|
12
|
+
## 相关 Issue
|
|
13
|
+
<!-- 如果有相关的 Issue,请填写链接 -->
|
|
14
|
+
|
|
15
|
+
## 检查清单
|
|
16
|
+
- [ ] 代码符合项目规范
|
|
17
|
+
- [ ] 已进行充分测试
|
|
18
|
+
- [ ] 文档已更新(如适用)
|
|
19
|
+
- [ ] CHANGELOG 已更新(如适用)
|
|
20
|
+
|
|
21
|
+
## 其他说明
|
|
22
|
+
<!-- 其他需要说明的信息 -->
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
🌟 艾莉丝的版本探知魔法阵 ~
|
|
6
|
+
这是一个用于自动检测和更新 packages.json 中模块版本的魔法脚本
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import json
|
|
10
|
+
import requests
|
|
11
|
+
import os
|
|
12
|
+
from datetime import datetime, timezone
|
|
13
|
+
import re
|
|
14
|
+
|
|
15
|
+
# 魔法咒语准备
|
|
16
|
+
headers = {
|
|
17
|
+
'Authorization': f'token {os.environ["GITHUB_TOKEN"]}',
|
|
18
|
+
'Accept': 'application/vnd.github.v3+json'
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
def get_latest_pypi_version(package_name):
|
|
22
|
+
try:
|
|
23
|
+
print(f"正在探查 {package_name} 的 PyPI 版本...")
|
|
24
|
+
response = requests.get(f'https://pypi.org/pypi/{package_name}/json', timeout=10)
|
|
25
|
+
if response.status_code == 200:
|
|
26
|
+
data = response.json()
|
|
27
|
+
version = data['info']['version']
|
|
28
|
+
print(f"找到了 {package_name} 的最新版本: {version}")
|
|
29
|
+
return version
|
|
30
|
+
except Exception as e:
|
|
31
|
+
print(f"💢 探查 {package_name} 的 PyPI 版本时遇到了障碍: {e}")
|
|
32
|
+
return None
|
|
33
|
+
|
|
34
|
+
def get_latest_github_release(repo_url):
|
|
35
|
+
try:
|
|
36
|
+
print(f"正在探查 {repo_url} 的 GitHub 发布版本...")
|
|
37
|
+
if 'github.com' in repo_url:
|
|
38
|
+
# 从仓库 URL 提取 owner/repo
|
|
39
|
+
parts = repo_url.rstrip('/').split('/')
|
|
40
|
+
owner_repo = f"{parts[-2]}/{parts[-1]}"
|
|
41
|
+
|
|
42
|
+
response = requests.get(f'https://api.github.com/repos/{owner_repo}/releases/latest', headers=headers, timeout=10)
|
|
43
|
+
if response.status_code == 200:
|
|
44
|
+
data = response.json()
|
|
45
|
+
version = data['tag_name'].lstrip('v') # 移除可能的 'v' 前缀
|
|
46
|
+
print(f"✨ 找到了 {owner_repo} 的最新发布版本: {version}")
|
|
47
|
+
return version
|
|
48
|
+
except Exception as e:
|
|
49
|
+
print(f"💢 探查 {repo_url} 的 GitHub 版本时遇到了障碍: {e}")
|
|
50
|
+
return None
|
|
51
|
+
|
|
52
|
+
def is_version_newer(new_version, old_version):
|
|
53
|
+
try:
|
|
54
|
+
def version_to_tuple(v):
|
|
55
|
+
# 移除版本字符串中的非数字和点字符(如 dev, alpha, beta 等)
|
|
56
|
+
v = re.sub(r'[^\d.]', '', v)
|
|
57
|
+
return tuple(map(int, (v.split('.'))))
|
|
58
|
+
|
|
59
|
+
return version_to_tuple(new_version) > version_to_tuple(old_version)
|
|
60
|
+
except:
|
|
61
|
+
# 如果无法解析,保守地认为需要更新
|
|
62
|
+
return new_version != old_version
|
|
63
|
+
|
|
64
|
+
def update_packages():
|
|
65
|
+
print("🌟 艾莉丝的版本探知魔法阵启动!")
|
|
66
|
+
|
|
67
|
+
# 读取当前的魔法书
|
|
68
|
+
try:
|
|
69
|
+
with open('packages.json', 'r', encoding='utf-8') as f:
|
|
70
|
+
packages = json.load(f)
|
|
71
|
+
print("成功打开了 packages.json 魔法书!")
|
|
72
|
+
except Exception as e:
|
|
73
|
+
print(f"无法打开 packages.json 魔法书: {e}")
|
|
74
|
+
return
|
|
75
|
+
|
|
76
|
+
current_time = datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%SZ')
|
|
77
|
+
packages['last_updated'] = current_time
|
|
78
|
+
print(f"更新时间戳: {current_time}")
|
|
79
|
+
|
|
80
|
+
updated_count = 0
|
|
81
|
+
|
|
82
|
+
for category in ['modules', 'adapters', 'cli_extensions']:
|
|
83
|
+
if category in packages:
|
|
84
|
+
print(f"开始探查 {category} 分类...")
|
|
85
|
+
for name, info in packages[category].items():
|
|
86
|
+
try:
|
|
87
|
+
old_version = info.get('version', '0.0.0')
|
|
88
|
+
print(f"检查 {name} (当前版本: {old_version})")
|
|
89
|
+
|
|
90
|
+
# 尝试从 PyPI 获取最新版本
|
|
91
|
+
new_version = None
|
|
92
|
+
if 'package' in info:
|
|
93
|
+
new_version = get_latest_pypi_version(info.get('package', ''))
|
|
94
|
+
|
|
95
|
+
# 如果 PyPI 获取失败,尝试从 GitHub 获取
|
|
96
|
+
if not new_version and 'repository' in info:
|
|
97
|
+
new_version = get_latest_github_release(info['repository'])
|
|
98
|
+
|
|
99
|
+
# 如果找到了新版本且版本更高,则更新
|
|
100
|
+
if new_version and is_version_newer(new_version, old_version):
|
|
101
|
+
packages[category][name]['version'] = new_version
|
|
102
|
+
print(f"更新 {name}: {old_version} -> {new_version}")
|
|
103
|
+
updated_count += 1
|
|
104
|
+
else:
|
|
105
|
+
print(f"✨ {name} 已经是最新版本啦~")
|
|
106
|
+
|
|
107
|
+
except Exception as e:
|
|
108
|
+
print(f"处理 {name} 时遇到了意外: {e}")
|
|
109
|
+
|
|
110
|
+
# 写回魔法书
|
|
111
|
+
try:
|
|
112
|
+
with open('packages.json', 'w', encoding='utf-8') as f:
|
|
113
|
+
json.dump(packages, f, ensure_ascii=False, indent=4)
|
|
114
|
+
print(f"魔法书更新完成! 共更新了 {updated_count} 个模块~")
|
|
115
|
+
except Exception as e:
|
|
116
|
+
print(f"无法保存魔法书: {e}")
|
|
117
|
+
return
|
|
118
|
+
|
|
119
|
+
if updated_count > 0:
|
|
120
|
+
print("艾莉丝的版本探知魔法大成功!")
|
|
121
|
+
else:
|
|
122
|
+
print("今天没有发现需要更新的模块呢~")
|
|
123
|
+
|
|
124
|
+
if __name__ == '__main__':
|
|
125
|
+
update_packages()
|
|
@@ -33,12 +33,16 @@ jobs:
|
|
|
33
33
|
|
|
34
34
|
commit_msg=$(git log -1 --pretty=%B)
|
|
35
35
|
commit_short=$(git rev-parse --short HEAD)
|
|
36
|
+
commit_author=$(git log -1 --pretty=%an)
|
|
37
|
+
commit_email=$(git log -1 --pretty=%ae)
|
|
36
38
|
echo "commit_short=$commit_short" >> $GITHUB_OUTPUT
|
|
39
|
+
echo "commit_author=$commit_author" >> $GITHUB_OUTPUT
|
|
40
|
+
echo "commit_email=$commit_email" >> $GITHUB_OUTPUT
|
|
37
41
|
echo "commit_msg<<EOF" >> $GITHUB_OUTPUT
|
|
38
42
|
echo "$commit_msg" >> $GITHUB_OUTPUT
|
|
39
43
|
echo "EOF" >> $GITHUB_OUTPUT
|
|
40
44
|
|
|
41
|
-
- name:
|
|
45
|
+
- name: 获取变更文件列表和贡献者
|
|
42
46
|
id: changed_files
|
|
43
47
|
shell: bash
|
|
44
48
|
run: |
|
|
@@ -52,15 +56,21 @@ jobs:
|
|
|
52
56
|
echo "before=$before" >> $GITHUB_OUTPUT
|
|
53
57
|
echo "after=$after" >> $GITHUB_OUTPUT
|
|
54
58
|
|
|
59
|
+
# 获取变更文件列表
|
|
55
60
|
files=$(git diff --name-only $before..$after | head -n 50 | xargs)
|
|
56
61
|
file_count=$(git diff --name-only $before..$after | wc -l)
|
|
57
62
|
|
|
58
63
|
if [ "$file_count" -gt 50 ]; then
|
|
59
64
|
files="$files ..."
|
|
60
65
|
fi
|
|
61
|
-
|
|
62
66
|
echo "files=$files" >> $GITHUB_OUTPUT
|
|
63
67
|
|
|
68
|
+
# 获取贡献者列表
|
|
69
|
+
contributors=$(git log $before..$after --format="%an <%ae>" | sort -u)
|
|
70
|
+
echo "contributors<<EOF" >> $GITHUB_OUTPUT
|
|
71
|
+
echo "$contributors" >> $GITHUB_OUTPUT
|
|
72
|
+
echo "EOF" >> $GITHUB_OUTPUT
|
|
73
|
+
|
|
64
74
|
- name: 施展版本魔法
|
|
65
75
|
env:
|
|
66
76
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -68,19 +78,37 @@ jobs:
|
|
|
68
78
|
run: |
|
|
69
79
|
version="${{ steps.info.outputs.version }}"
|
|
70
80
|
commit_short="${{ steps.info.outputs.commit_short }}"
|
|
81
|
+
commit_author="${{ steps.info.outputs.commit_author }}"
|
|
82
|
+
commit_email="${{ steps.info.outputs.commit_email }}"
|
|
71
83
|
commit_msg="${{ steps.info.outputs.commit_msg }}"
|
|
72
84
|
is_dev="${{ steps.info.outputs.is_dev }}"
|
|
85
|
+
contributors="${{ steps.changed_files.outputs.contributors }}"
|
|
73
86
|
tag_name="v$version"
|
|
74
87
|
|
|
88
|
+
# 构建发布说明
|
|
75
89
|
if [ -f "docs/CHANGELOG.md" ]; then
|
|
76
90
|
changelog=$(sed -n "/^## \[$version\]/,/^## /p" docs/CHANGELOG.md | sed '1d;$d')
|
|
77
91
|
fi
|
|
92
|
+
|
|
78
93
|
if [ -z "$changelog" ]; then
|
|
79
|
-
changelog="###
|
|
94
|
+
changelog="### ✨✨ 魔法更新\n\n- $commit_msg ($commit_short)\n\n"
|
|
95
|
+
else
|
|
96
|
+
changelog="$changelog\n\n"
|
|
80
97
|
fi
|
|
98
|
+
|
|
99
|
+
# 添加贡献者信息
|
|
100
|
+
changelog="${changelog}### 🧙♀️ 魔法贡献者\n\n"
|
|
101
|
+
while IFS= read -r contributor; do
|
|
102
|
+
changelog="${changelog}- ${contributor}\n"
|
|
103
|
+
done <<< "$contributors"
|
|
104
|
+
|
|
105
|
+
# 添加提交信息
|
|
106
|
+
changelog="${changelog}\n### 📜 魔法卷轴更新\n\n"
|
|
107
|
+
changelog="${changelog}- 最新提交: $commit_msg (by $commit_author, $commit_short)\n"
|
|
108
|
+
changelog="${changelog}- 变更文件: ${{ steps.changed_files.outputs.files }}\n"
|
|
81
109
|
|
|
82
110
|
if ! git rev-parse "$tag_name" >/dev/null 2>&1; then
|
|
83
|
-
echo "
|
|
111
|
+
echo "🎀🎀 施加新的魔法印记..."
|
|
84
112
|
git tag "$tag_name"
|
|
85
113
|
git push origin "$tag_name"
|
|
86
114
|
fi
|
|
@@ -97,3 +125,4 @@ jobs:
|
|
|
97
125
|
--prerelease=$is_dev
|
|
98
126
|
echo "✨ 已发布新的魔法版本 $tag_name"
|
|
99
127
|
fi
|
|
128
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
name: 🌟 艾莉丝的包管理魔法阵 ~
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: write
|
|
5
|
+
pull-requests: write
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
schedule:
|
|
9
|
+
# 每天 UTC 时间 2 点运行(北京时间 10 点)
|
|
10
|
+
- cron: '0 2 * * *'
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
auto-update-packages:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- name: 检出魔法书
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
22
|
+
|
|
23
|
+
- name: 准备魔法环境
|
|
24
|
+
uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: '3.x'
|
|
27
|
+
|
|
28
|
+
- name: 学习魔法咒语
|
|
29
|
+
run: |
|
|
30
|
+
python -m pip install --upgrade pip
|
|
31
|
+
pip install requests
|
|
32
|
+
|
|
33
|
+
- name: 施展版本探知魔法
|
|
34
|
+
id: update
|
|
35
|
+
env:
|
|
36
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
37
|
+
run: |
|
|
38
|
+
echo "艾莉丝开始探查各个模块的最新版本了哦~"
|
|
39
|
+
|
|
40
|
+
# 运行更新脚本
|
|
41
|
+
python .github/scripts/update_packages.py
|
|
42
|
+
|
|
43
|
+
# 检查是否有更新
|
|
44
|
+
if git diff --quiet packages.json; then
|
|
45
|
+
echo "✨ 没有发现新的版本更新呢~"
|
|
46
|
+
echo "has_updates=false" >> $GITHUB_OUTPUT
|
|
47
|
+
else
|
|
48
|
+
echo "🌟 发现了新的版本信息!"
|
|
49
|
+
echo "has_updates=true" >> $GITHUB_OUTPUT
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
- name: 记录魔法日志
|
|
53
|
+
if: steps.update.outputs.has_updates == 'true'
|
|
54
|
+
run: |
|
|
55
|
+
echo "💫 艾莉丝正在记录今天的魔法发现..."
|
|
56
|
+
updated_modules=$(git diff packages.json | grep '"version":' | wc -l)
|
|
57
|
+
echo "📖 今日更新了 $updated_modules 个模块的版本信息"
|
|
58
|
+
|
|
59
|
+
- name: 保存魔法成果
|
|
60
|
+
if: steps.update.outputs.has_updates == 'true'
|
|
61
|
+
run: |
|
|
62
|
+
git config --local user.email "eris@magic-circle.dev"
|
|
63
|
+
git config --local user.name "Eris the Mage"
|
|
64
|
+
git add packages.json
|
|
65
|
+
git commit -m "✨ 艾莉丝的每日版本更新魔法 [skip ci]
|
|
66
|
+
|
|
67
|
+
🌟 自动更新了模块版本信息
|
|
68
|
+
📖 更多详情请查看 packages.json"
|
|
69
|
+
git push origin main
|
|
70
|
+
|
|
71
|
+
- name: 💤 今天的魔法工作完成
|
|
72
|
+
if: steps.update.outputs.has_updates == 'true'
|
|
73
|
+
run: |
|
|
74
|
+
echo "🌟 艾莉丝今天也努力完成了版本更新的魔法呢!"
|
|
75
|
+
echo "🌙 所有更新已直接推送到 main 分支"
|
|
76
|
+
echo "💫 明天再见啦~"
|
|
77
|
+
|
|
78
|
+
- name: 无更新时的安慰信息
|
|
79
|
+
if: steps.update.outputs.has_updates != 'true'
|
|
80
|
+
run: |
|
|
81
|
+
echo "✨ 今天没有发现需要更新的模块呢~"
|
|
82
|
+
echo "🌟 艾莉丝会继续守护着我们的魔法世界!"
|
|
83
|
+
echo "🌙 明天再见啦~"
|
|
84
|
+
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
addEventListener('fetch', event => {
|
|
2
|
+
event.respondWith(handleRequest(event.request))
|
|
3
|
+
})
|
|
4
|
+
|
|
5
|
+
const PURGE_PASSWORD = 'your_secure_password_here';
|
|
6
|
+
|
|
7
|
+
async function handleRequest(request) {
|
|
8
|
+
const url = new URL(request.url)
|
|
9
|
+
const path = url.pathname
|
|
10
|
+
|
|
11
|
+
// 标准化路径
|
|
12
|
+
const normalizedPath = path.replace(/^\/+/, '/');
|
|
13
|
+
|
|
14
|
+
if (normalizedPath === '/') {
|
|
15
|
+
return Response.redirect('https://www.erisdev.com', 301)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let response
|
|
19
|
+
|
|
20
|
+
if ( normalizedPath === '/packages.json' ||
|
|
21
|
+
normalizedPath === '/packages' ||
|
|
22
|
+
normalizedPath === '/packages.json/') {
|
|
23
|
+
response = await fetch('https://raw.githubusercontent.com/ErisPulse/ErisPulse/main/packages.json', {
|
|
24
|
+
cf: {
|
|
25
|
+
cacheEverything: true,
|
|
26
|
+
cacheTtl: 14400 // 缓存 4 小时
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
} else if ( normalizedPath === '/map.json' ||
|
|
30
|
+
normalizedPath === '/map' ||
|
|
31
|
+
normalizedPath === '/map.json/') {
|
|
32
|
+
response = await fetch('https://raw.githubusercontent.com/ErisPulse/ErisPulse-ModuleRepo/main/map.json', {
|
|
33
|
+
cf: {
|
|
34
|
+
cacheEverything: true,
|
|
35
|
+
cacheTtl: 14400
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
} else if (normalizedPath.startsWith('/archived/modules/')) {
|
|
39
|
+
const modulePath = normalizedPath.replace('/archived/modules', '');
|
|
40
|
+
response = await fetch(`https://raw.githubusercontent.com/ErisPulse/ErisPulse-ModuleRepo/main/archived/modules${modulePath}`, {
|
|
41
|
+
cf: {
|
|
42
|
+
cacheEverything: true,
|
|
43
|
+
cacheTtl: 14400
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
} else if (normalizedPath.startsWith('/purge-cache/')) {
|
|
47
|
+
// 检查密码
|
|
48
|
+
const password = normalizedPath.split('/')[2];
|
|
49
|
+
if (password === PURGE_PASSWORD) {
|
|
50
|
+
response = await purgeCache()
|
|
51
|
+
} else {
|
|
52
|
+
response = new Response(JSON.stringify({
|
|
53
|
+
error: 'Unauthorized',
|
|
54
|
+
message: 'Invalid password'
|
|
55
|
+
}), {
|
|
56
|
+
status: 401,
|
|
57
|
+
headers: {
|
|
58
|
+
'Content-Type': 'application/json'
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
response = new Response(JSON.stringify({ error: 'Not Found' }), {
|
|
64
|
+
status: 404,
|
|
65
|
+
headers: {
|
|
66
|
+
'Content-Type': 'application/json'
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (normalizedPath.endsWith('.json') ||
|
|
72
|
+
normalizedPath === '/packages' ||
|
|
73
|
+
normalizedPath === '/map' ||
|
|
74
|
+
normalizedPath.startsWith('/purge-cache/')) {
|
|
75
|
+
const newHeaders = new Headers(response.headers)
|
|
76
|
+
newHeaders.set('Content-Type', 'application/json')
|
|
77
|
+
response = new Response(response.body, {
|
|
78
|
+
status: response.status,
|
|
79
|
+
headers: newHeaders
|
|
80
|
+
})
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return response
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
async function purgeCache() {
|
|
87
|
+
try {
|
|
88
|
+
const cache = caches.default;
|
|
89
|
+
|
|
90
|
+
const packagesUrl = 'https://raw.githubusercontent.com/ErisPulse/ErisPulse/main/packages.json';
|
|
91
|
+
await cache.delete(new Request(packagesUrl));
|
|
92
|
+
const mapUrl = 'https://raw.githubusercontent.com/ErisPulse/ErisPulse-ModuleRepo/main/map.json';
|
|
93
|
+
await cache.delete(new Request(mapUrl));
|
|
94
|
+
|
|
95
|
+
// 注意:这里无法精确清除所有 archived/modules 下的缓存项
|
|
96
|
+
// 因为 Cloudflare Workers 不支持通配符删除缓存
|
|
97
|
+
|
|
98
|
+
return new Response(JSON.stringify({
|
|
99
|
+
success: true,
|
|
100
|
+
message: 'Cache purged successfully'
|
|
101
|
+
}), {
|
|
102
|
+
status: 200,
|
|
103
|
+
headers: {
|
|
104
|
+
'Content-Type': 'application/json'
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
} catch (error) {
|
|
108
|
+
return new Response(JSON.stringify({
|
|
109
|
+
success: false,
|
|
110
|
+
error: error.message
|
|
111
|
+
}), {
|
|
112
|
+
status: 500,
|
|
113
|
+
headers: {
|
|
114
|
+
'Content-Type': 'application/json'
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ErisPulse
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.15.dev3
|
|
4
4
|
Summary: ErisPulse 是一个模块化、可扩展的异步 Python SDK 框架,主要用于构建高效、可维护的机器人应用程序。
|
|
5
|
-
Author-email: "艾莉丝·格雷拉特(WSu2059)" <wsu2059@qq.com
|
|
5
|
+
Author-email: "艾莉丝·格雷拉特(WSu2059)" <wsu2059@qq.com>
|
|
6
6
|
License: MIT License
|
|
7
7
|
|
|
8
8
|
Copyright (c) 2025 ErisPulse
|
|
@@ -41,11 +41,10 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
41
41
|
Classifier: Operating System :: OS Independent
|
|
42
42
|
Classifier: Programming Language :: Python :: 3
|
|
43
43
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
44
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
45
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
46
44
|
Classifier: Programming Language :: Python :: 3.10
|
|
47
45
|
Classifier: Programming Language :: Python :: 3.11
|
|
48
46
|
Classifier: Programming Language :: Python :: 3.12
|
|
47
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
49
48
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
50
49
|
Requires-Python: >=3.8
|
|
51
50
|
Requires-Dist: aiohttp
|
|
@@ -53,6 +52,7 @@ Requires-Dist: colorama
|
|
|
53
52
|
Requires-Dist: fastapi>=0.116.1
|
|
54
53
|
Requires-Dist: hypercorn>=0.14.0
|
|
55
54
|
Requires-Dist: keyboard
|
|
55
|
+
Requires-Dist: packaging>=25.0
|
|
56
56
|
Requires-Dist: pip
|
|
57
57
|
Requires-Dist: pydantic>=2.10.6
|
|
58
58
|
Requires-Dist: python-multipart>=0.0.20
|
|
@@ -68,17 +68,26 @@ Description-Content-Type: text/markdown
|
|
|
68
68
|
[](https://github.com/FramerOrg)
|
|
69
69
|
[](https://pypi.org/project/ErisPulse/)
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
[](https://www.erisdev.com/docs.html)
|
|
73
|
-
[](https://erispulse.pages.dev/docs.html)
|
|
74
|
-
[](https://erispulse.github.io/docs.html)
|
|
75
|
-
[](https://erispulse.netlify.app/docs.htm)
|
|
71
|
+
## 文档站
|
|
76
72
|
|
|
73
|
+
[](https://www.erisdev.com/#docs)
|
|
74
|
+
[](https://erispulse.pages.dev/#docs)
|
|
75
|
+
[](https://erispulse.github.io/#docs)
|
|
76
|
+
[](https://erispulse.netlify.app/#docs)
|
|
77
|
+
|
|
78
|
+
## 模块市场
|
|
79
|
+
|
|
80
|
+
[](https://www.erisdev.com/#market)
|
|
81
|
+
[](https://erispulse.pages.dev/#market)
|
|
82
|
+
[](https://erispulse.github.io/#market)
|
|
83
|
+
[](https://erispulse.netlify.app/#market)
|
|
84
|
+
|
|
85
|
+
---
|
|
77
86
|
|
|
78
87
|
## 核心特性
|
|
79
88
|
|
|
80
89
|
| 特性 | 描述 |
|
|
81
|
-
|
|
90
|
+
|:-----|:-----|
|
|
82
91
|
| **异步架构** | 完全基于 async/await 的异步设计 |
|
|
83
92
|
| **模块化系统** | 灵活的插件和模块管理 |
|
|
84
93
|
| **热重载** | 开发时自动重载,无需重启 |
|
|
@@ -100,6 +109,7 @@ irm https://get.erisdev.com/install.ps1 -OutFile install.ps1; powershell -Execut
|
|
|
100
109
|
```
|
|
101
110
|
|
|
102
111
|
#### macOS/Linux:
|
|
112
|
+
|
|
103
113
|
```bash
|
|
104
114
|
curl -sSL https://get.erisdev.com/install.sh | tee install.sh >/dev/null && chmod +x install.sh && ./install.sh
|
|
105
115
|
```
|
|
@@ -108,14 +118,14 @@ curl -sSL https://get.erisdev.com/install.sh | tee install.sh >/dev/null && chmo
|
|
|
108
118
|
|
|
109
119
|
## 测试与开发
|
|
110
120
|
|
|
111
|
-
### 克隆项目并进入目录
|
|
121
|
+
### 1. 克隆项目并进入目录
|
|
112
122
|
|
|
113
123
|
```bash
|
|
114
124
|
git clone -b Develop/v2 https://github.com/ErisPulse/ErisPulse.git
|
|
115
125
|
cd ErisPulse
|
|
116
126
|
```
|
|
117
127
|
|
|
118
|
-
### 使用 `uv` 同步项目环境
|
|
128
|
+
### 2. 使用 `uv` 同步项目环境
|
|
119
129
|
|
|
120
130
|
```bash
|
|
121
131
|
uv sync
|
|
@@ -127,15 +137,15 @@ source .venv/bin/activate
|
|
|
127
137
|
|
|
128
138
|
> `ErisPulse` 目前正在使用 `python3.13` 进行开发(所以您同步环境时会自动安装 `3.13`),但也可以使用其他版本(版本不应低于 `3.10`)。
|
|
129
139
|
|
|
130
|
-
### 安装依赖并开始
|
|
140
|
+
### 3. 安装依赖并开始
|
|
131
141
|
|
|
132
142
|
```bash
|
|
133
143
|
uv pip install -e .
|
|
134
144
|
```
|
|
135
145
|
|
|
136
|
-
|
|
146
|
+
这将以"开发模式"安装 SDK,所有本地修改都会立即生效。
|
|
137
147
|
|
|
138
|
-
### 验证安装
|
|
148
|
+
### 4. 验证安装
|
|
139
149
|
|
|
140
150
|
运行以下命令确认 SDK 正常加载:
|
|
141
151
|
|
|
@@ -143,7 +153,7 @@ uv pip install -e .
|
|
|
143
153
|
python -c "from ErisPulse import sdk; sdk.init()"
|
|
144
154
|
```
|
|
145
155
|
|
|
146
|
-
### 运行测试
|
|
156
|
+
### 5. 运行测试
|
|
147
157
|
|
|
148
158
|
我们提供了一个交互式测试脚本,可以帮助您快速验证SDK功能:
|
|
149
159
|
|
|
@@ -158,14 +168,15 @@ uv run devs/test.py
|
|
|
158
168
|
- 工具函数测试
|
|
159
169
|
- 适配器功能测试
|
|
160
170
|
|
|
161
|
-
### 开发模式 (热重载)
|
|
171
|
+
### 6. 开发模式 (热重载)
|
|
172
|
+
|
|
162
173
|
```bash
|
|
163
174
|
epsdk run your_script.py --reload
|
|
164
175
|
```
|
|
165
176
|
|
|
166
177
|
---
|
|
167
178
|
|
|
168
|
-
##
|
|
179
|
+
## 贡献指南
|
|
169
180
|
|
|
170
181
|
我们欢迎各种形式的贡献,包括但不限于:
|
|
171
182
|
|
|
@@ -176,7 +187,7 @@ epsdk run your_script.py --reload
|
|
|
176
187
|
通过 [社区讨论](https://github.com/ErisPulse/ErisPulse/discussions) 提出新想法
|
|
177
188
|
|
|
178
189
|
3. **代码贡献**
|
|
179
|
-
提交 Pull Request 前请阅读我们的 [
|
|
190
|
+
提交 Pull Request 前请阅读我们的 [代码风格](docs/StyleGuide/DocstringSpec.md)
|
|
180
191
|
|
|
181
192
|
4. **文档改进**
|
|
182
193
|
帮助完善文档和示例代码
|
|
@@ -184,3 +195,7 @@ epsdk run your_script.py --reload
|
|
|
184
195
|
---
|
|
185
196
|
|
|
186
197
|
[加入社区讨论 →](https://github.com/ErisPulse/ErisPulse/discussions)
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
[](https://starchart.cc/ErisPulse/ErisPulse)
|