用途:asc-plugins 用于管理扩展 asc CLI 的插件。插件是可执行程序,安装在 ~/.asc/plugins/<name>/ 下,用于处理 ASC 生命周期事件,例如发送 Slack 消息、发布到 Telegram、触发 webhook,或在构建上传、版本提交时运行自定义自动化。
主要能力:提供 list(列出已安装插件)、install(从本地目录安装)、uninstall、enable/disable(禁用后仍保留安装,仅抑制触发)、run(手动测试插件)等命令。支持的事件包括 build.uploaded、version.submitted、version.approved、version.rejected。
插件协议:插件目录需包含 manifest.json(名称、版本、描述、订阅事件)和可执行文件 run(任意语言,需 chmod +x)。asc 通过 stdin 向插件传入 JSON,包含 event 与 payload(如 appId、buildId、timestamp、metadata);插件通过 stdout 返回 JSON,如 {"success": true, "message": "..."}。退出码 0 表示成功,非 0 会记录到 stderr,且不影响其他插件继续执行。
使用方式:可用 asc plugins install <path> 安装,用 asc plugins run --name <name> --event <event> [--app-id <id>] [--version-id <id>] [--build-id <id>] 手动测试,再通过 asc builds upload 或 asc versions submit 触发自动事件。asc plugins list 支持 --pretty,并返回包含 affordances 的 JSON 输出。
限制:资料未提供插件数量上限、并发执行、超时、权限或安全隔离等细节;插件失败不会阻塞主命令或其他插件。