@wot-ui/cli 0.0.1-beta.10 → 0.0.1-beta.11
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.
- package/README.md +50 -23
- package/data/v2.0.0.json +19838 -0
- package/data/v2.0.0.json.gz +0 -0
- package/data/v2.0.1.json +19818 -0
- package/data/v2.0.1.json.gz +0 -0
- package/data/v2.0.2.json +19818 -0
- package/data/v2.0.2.json.gz +0 -0
- package/data/v2.0.3.json +19824 -0
- package/data/v2.0.3.json.gz +0 -0
- package/data/v2.0.4.json +19829 -0
- package/data/v2.0.4.json.gz +0 -0
- package/data/v2.json +314 -312
- package/data/v2.json.gz +0 -0
- package/data/versions.json +7 -4
- package/data/versions.json.gz +0 -0
- package/dist/index.mjs +8 -5
- package/dist/{scanner-_isnOGJK.mjs → scanner-Dsl3i2de.mjs} +86 -8
- package/dist/{server-BLoIUV7u.mjs → server-CbHpaCNz.mjs} +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -49,11 +49,11 @@ wot mcp
|
|
|
49
49
|
|
|
50
50
|
### 组件知识
|
|
51
51
|
|
|
52
|
-
- `wot list`:列出可用的 wot-ui
|
|
53
|
-
- `wot info <
|
|
54
|
-
- `wot doc <
|
|
55
|
-
- `wot demo <
|
|
56
|
-
- `wot token [
|
|
52
|
+
- `wot list [keyword]`:列出可用的 wot-ui 组件,支持按名称过滤
|
|
53
|
+
- `wot info <component>`:查看组件 props、events、slots、CSS 变量
|
|
54
|
+
- `wot doc <component>`:输出组件 markdown 文档
|
|
55
|
+
- `wot demo <component> [name]`:查看 demo 列表或指定 demo 源码
|
|
56
|
+
- `wot token [component]`:查看组件 CSS 变量与默认值
|
|
57
57
|
- `wot changelog [version] [component]`:查看版本更新记录
|
|
58
58
|
|
|
59
59
|
### 项目分析
|
|
@@ -66,9 +66,20 @@ wot mcp
|
|
|
66
66
|
|
|
67
67
|
多数查询命令支持以下参数:
|
|
68
68
|
|
|
69
|
-
- `--format text
|
|
70
|
-
- `--
|
|
71
|
-
-
|
|
69
|
+
- `--format text`(默认)或 `--format json`:输出格式
|
|
70
|
+
- `--version <ver>`:指定 wot-ui 版本,支持以下格式:
|
|
71
|
+
- `2.0`(minor,自动解析到最新 patch)
|
|
72
|
+
- `2.0.4`(exact patch)
|
|
73
|
+
- `latest`(始终使用最新稳定版)
|
|
74
|
+
- 不传时自动从项目 `node_modules/@wot-ui/ui` 或 `package.json` 依赖声明检测,检测不到则回退到最新版
|
|
75
|
+
|
|
76
|
+
示例:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
wot info Button --version 2.0.0
|
|
80
|
+
wot doc Button --version 2.0
|
|
81
|
+
wot list --format json --version latest
|
|
82
|
+
```
|
|
72
83
|
|
|
73
84
|
## MCP 集成
|
|
74
85
|
|
|
@@ -103,20 +114,34 @@ wot mcp
|
|
|
103
114
|
- `docs/guide/changelog.md`
|
|
104
115
|
- `src/uni_modules/wot-ui/components/*/index.scss`
|
|
105
116
|
|
|
106
|
-
|
|
117
|
+
`data/` 目录保存每个 stable patch 版本的独立快照(`v2.0.0.json`、`v2.0.1.json`、…),以及一个始终指向最新版的 `v2.json`。
|
|
118
|
+
|
|
119
|
+
### 更新数据
|
|
107
120
|
|
|
108
|
-
|
|
121
|
+
**全量同步所有历史 tag(推荐,首次或需要补全历史版本时使用):**
|
|
109
122
|
|
|
110
123
|
```bash
|
|
111
|
-
pnpm
|
|
124
|
+
pnpm sync:clone
|
|
112
125
|
```
|
|
113
126
|
|
|
114
|
-
|
|
127
|
+
克隆 wot-ui 仓库(`--filter=tree:0 --no-checkout`,不下载文件树),按所有 stable tag 逐一 checkout + 提取,已有快照自动跳过。
|
|
128
|
+
|
|
129
|
+
**仅更新最新版本(快速,CI 单版本触发时使用):**
|
|
115
130
|
|
|
116
131
|
```bash
|
|
117
132
|
pnpm extract:clone
|
|
118
133
|
```
|
|
119
134
|
|
|
135
|
+
**使用本地已有的 wot-ui 仓库:**
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# 全量多版本
|
|
139
|
+
pnpm sync --wot-dir ../wot-ui
|
|
140
|
+
|
|
141
|
+
# 单个版本,手动指定 checkout 后提取
|
|
142
|
+
pnpm extract --wot-dir ../wot-ui --output data/v2.0.4.json
|
|
143
|
+
```
|
|
144
|
+
|
|
120
145
|
## 开发本仓库
|
|
121
146
|
|
|
122
147
|
当前根目录就是主发布包,核心源码位于 `src`,离线数据位于 `data`,提取脚本位于 `scripts`。
|
|
@@ -135,13 +160,11 @@ pnpm install
|
|
|
135
160
|
### 常用开发命令
|
|
136
161
|
|
|
137
162
|
```bash
|
|
138
|
-
pnpm lint
|
|
139
|
-
pnpm
|
|
140
|
-
pnpm
|
|
141
|
-
pnpm
|
|
142
|
-
pnpm
|
|
143
|
-
pnpm test:cli
|
|
144
|
-
pnpm typecheck:cli
|
|
163
|
+
pnpm lint # ESLint 检查
|
|
164
|
+
pnpm typecheck # TypeScript 类型检查
|
|
165
|
+
pnpm test # 单元测试
|
|
166
|
+
pnpm build # 构建产物到 dist/
|
|
167
|
+
pnpm compress # 压缩 data/*.json → data/*.json.gz(发布前自动执行)
|
|
145
168
|
```
|
|
146
169
|
|
|
147
170
|
### 本地调试 CLI
|
|
@@ -151,13 +174,16 @@ pnpm typecheck:cli
|
|
|
151
174
|
```bash
|
|
152
175
|
pnpm exec tsx src/index.ts list
|
|
153
176
|
pnpm exec tsx src/index.ts info Button
|
|
177
|
+
pnpm exec tsx src/index.ts info Button --version 2.0.0
|
|
178
|
+
pnpm exec tsx src/index.ts doc Button --version 2.0
|
|
154
179
|
```
|
|
155
180
|
|
|
156
181
|
如果要调试构建产物:
|
|
157
182
|
|
|
158
183
|
```bash
|
|
159
|
-
pnpm build
|
|
184
|
+
pnpm build
|
|
160
185
|
node dist/index.mjs list
|
|
186
|
+
node dist/index.mjs info Button --version 2.0.0
|
|
161
187
|
```
|
|
162
188
|
|
|
163
189
|
### 本地调试 MCP
|
|
@@ -170,9 +196,10 @@ MCP 走 stdio,终端无交互输出属于正常现象。若要查看 tools 与
|
|
|
170
196
|
|
|
171
197
|
## 自动化流程
|
|
172
198
|
|
|
173
|
-
- `.github/workflows/ci.yml
|
|
174
|
-
- `.github/workflows/
|
|
175
|
-
- `.github/workflows/
|
|
199
|
+
- `.github/workflows/ci.yml`:在 `push`/`PR` 时执行 lint、typecheck、build、test(多 OS × Node 版本矩阵)
|
|
200
|
+
- `.github/workflows/sync.yml`:每日 02:00 UTC 自动检测 `@wot-ui/ui` 最新版本,有更新时拉取全量多版本快照并创建同步 PR;也可手动触发单版本提取
|
|
201
|
+
- `.github/workflows/release.yml`:`v*` tag 触发自动发布 `@wot-ui/cli` 到 npm(发布前自动运行 `pnpm compress && pnpm build`,npm 包只含 `.json.gz`)
|
|
202
|
+
- `.github/workflows/coverage-upload.yml`:`v*` tag 触发,上传测试覆盖率到 Codecov
|
|
176
203
|
|
|
177
204
|
## 当前边界
|
|
178
205
|
|