teamix-evo 0.17.0 → 0.18.1
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 +36 -36
- package/dist/core/index.d.ts +3 -1
- package/dist/core/index.js +12 -1
- package/dist/core/index.js.map +1 -1
- package/dist/index.js +605 -197
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -167,42 +167,42 @@ TEAMIX_DEBUG=1 teamix-evo tokens init opentrek
|
|
|
167
167
|
|
|
168
168
|
## 命令参考
|
|
169
169
|
|
|
170
|
-
| 命令
|
|
171
|
-
|
|
|
172
|
-
| `teamix-evo init [-y] [--dry-run] [--variant <n>]`
|
|
173
|
-
| `teamix-evo update [--dry-run] [--cwd <dir>]`
|
|
174
|
-
| `teamix-evo migrate [--cwd <dir>] [--json]`
|
|
175
|
-
| `teamix-evo graft [--variant <v>] [--json] [--cwd <dir>]` | 叠加 Teamix Evo 到传统组件库项目(双栈共存,ADR 0047)
|
|
176
|
-
| `teamix-evo restore [ts] [--list] [-y]`
|
|
177
|
-
| `teamix-evo switch <new-variant> [--apply] [-y]`
|
|
178
|
-
| `teamix-evo tokens init <variant>`
|
|
179
|
-
| `teamix-evo tokens list-variants`
|
|
180
|
-
| `teamix-evo tokens list`
|
|
181
|
-
| `teamix-evo tokens update`
|
|
182
|
-
| `teamix-evo tokens uninstall`
|
|
183
|
-
| `teamix-evo tokens audit`
|
|
184
|
-
| `teamix-evo tokens diagnose`
|
|
185
|
-
| `teamix-evo tokens treat [--lock-baseline] [--apply]`
|
|
186
|
-
| `teamix-evo tokens codemod [name] [--apply] [--list]`
|
|
187
|
-
| `teamix-evo tokens reflect [--min-frequency <n>]`
|
|
188
|
-
| `teamix-evo tokens baseline-check`
|
|
189
|
-
| `teamix-evo skills init`
|
|
190
|
-
| `teamix-evo skills add <name...>`
|
|
191
|
-
| `teamix-evo skills list`
|
|
192
|
-
| `teamix-evo skills update [name...] [--dry-run]`
|
|
193
|
-
| `teamix-evo skills sync [name...]`
|
|
194
|
-
| `teamix-evo skills doctor`
|
|
195
|
-
| `teamix-evo skills uninstall`
|
|
196
|
-
| `teamix-evo ui init`
|
|
197
|
-
| `teamix-evo ui add <id...>`
|
|
198
|
-
| `teamix-evo ui list [--installed]`
|
|
199
|
-
| `teamix-evo ui promote-to-biz <id...>`
|
|
200
|
-
| `teamix-evo biz-ui list-variants`
|
|
201
|
-
| `teamix-evo biz-ui add <id...> --variant <name>`
|
|
202
|
-
| `teamix-evo blocks add <id...>`
|
|
203
|
-
| `teamix-evo blocks list [--installed] [--json]`
|
|
204
|
-
| `teamix-evo blocks upgrade [<id...>]`
|
|
205
|
-
| `teamix-evo lint init [-y]`
|
|
170
|
+
| 命令 | 说明 |
|
|
171
|
+
| --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
172
|
+
| `teamix-evo init [-y] [--dry-run] [--variant <n>]` | 普通版接入:检测冲突 → wizard → 静默落地(已有 npm 工程入口) |
|
|
173
|
+
| `teamix-evo update [--dry-run] [--cwd <dir>]` | 一键升级已装资源(tokens + skills,ADR 0003 三态 + ADR 0035 短路) |
|
|
174
|
+
| `teamix-evo migrate [--cwd <dir>] [--json]` | shadcn 项目迁移前置检查(AI skill 引导实际迁移) |
|
|
175
|
+
| `teamix-evo graft [--variant <v>] [--json] [--cwd <dir>]` | 叠加 Teamix Evo 到传统组件库项目(双栈共存,ADR 0047) |
|
|
176
|
+
| `teamix-evo restore [ts] [--list] [-y]` | 回滚 `.teamix-evo/` 到指定 snapshot(ADR 0019 §2 — 自身可逆) |
|
|
177
|
+
| `teamix-evo switch <new-variant> [--apply] [-y]` | variant 切换:默认 dry-run 展示 file-level diff,--apply 才真写(ADR 0019 §D3) |
|
|
178
|
+
| `teamix-evo tokens init <variant>` | 初始化 tokens |
|
|
179
|
+
| `teamix-evo tokens list-variants` | 列出可用 variant |
|
|
180
|
+
| `teamix-evo tokens list` | 查看已装机的 variant |
|
|
181
|
+
| `teamix-evo tokens update` | 更新已装资源(stub,v0.7 见 ADR 0019) |
|
|
182
|
+
| `teamix-evo tokens uninstall` | 卸载已装 tokens |
|
|
183
|
+
| `teamix-evo tokens audit` | 审计 tokens 引用(4 类:redundant / kept / migrate / custom,v3↔v4 语义比较) |
|
|
184
|
+
| `teamix-evo tokens diagnose` | 诊断 tokens 使用情况,生成分级报告(L1-L3)+ `.treatment-plan.md` |
|
|
185
|
+
| `teamix-evo tokens treat [--lock-baseline] [--apply]` | 一键 token 治理流水线:lint → codemod → lint → 报告 → 可选锁定 baseline |
|
|
186
|
+
| `teamix-evo tokens codemod [name] [--apply] [--list]` | 执行指定 token codemod(5 个可用:hsl-to-v4 / hex-to-token / tw-scale-to-semantic / space-to-gap / arbitrary-to-token) |
|
|
187
|
+
| `teamix-evo tokens reflect [--min-frequency <n>]` | 扫描重复色值,推荐新增项目级 token(反哺 overrides.css) |
|
|
188
|
+
| `teamix-evo tokens baseline-check` | 对比 baseline 检查 token 违规是否超标(CI 友好,exitCode=1 on fail) |
|
|
189
|
+
| `teamix-evo skills init` | 自举 skills(按 variant + scope 全装 — ADR 0034) |
|
|
190
|
+
| `teamix-evo skills add <name...>` | 增量装指定 skill(`<name...>` 必填) |
|
|
191
|
+
| `teamix-evo skills list` | 列出所有 skill 的安装状态 |
|
|
192
|
+
| `teamix-evo skills update [name...] [--dry-run]` | 升级 skills(双闸 + version 短路 — ADR 0035) |
|
|
193
|
+
| `teamix-evo skills sync [name...]` | 源 → IDE 镜像(漂移恢复用) |
|
|
194
|
+
| `teamix-evo skills doctor` | 检测源/镜像漂移(ADR 0013) |
|
|
195
|
+
| `teamix-evo skills uninstall` | 卸载 skills(源 + 镜像 + lock) |
|
|
196
|
+
| `teamix-evo ui init` | 初始化 ui 配置(aliases / iconLibrary / tsx / rsc) |
|
|
197
|
+
| `teamix-evo ui add <id...>` | 安装指定 ui 组件源码 |
|
|
198
|
+
| `teamix-evo ui list [--installed]` | 列出可用/已安装 ui 组件 |
|
|
199
|
+
| `teamix-evo ui promote-to-biz <id...>` | 把 ui 组件提升为业务组件(8 模式:Coexist/Preset/Wrapper/Compose/Variant/Fork/TokenOnly/ManualReview) |
|
|
200
|
+
| `teamix-evo biz-ui list-variants` | 列出 biz-ui 包内提供的业务变体 |
|
|
201
|
+
| `teamix-evo biz-ui add <id...> --variant <name>` | 安装变体感知业务组件(`--variant` 必填) |
|
|
202
|
+
| `teamix-evo blocks add <id...>` | 安装营销页区块(保留目录结构) |
|
|
203
|
+
| `teamix-evo blocks list [--installed] [--json]` | 列出可用/已安装区块 |
|
|
204
|
+
| `teamix-evo blocks upgrade [<id...>]` | 升级已安装的区块源码 |
|
|
205
|
+
| `teamix-evo lint init [-y]` | 一键安装 ESLint + Stylelint token-discipline 规则集 |
|
|
206
206
|
|
|
207
207
|
> 占位组件 → 真组件的升级流程**不是** CLI 子命令,由
|
|
208
208
|
> [`teamix-evo-manage`](../../packages/skills/src/teamix-evo-manage/SKILL.md)
|
package/dist/core/index.d.ts
CHANGED
|
@@ -664,7 +664,9 @@ interface ProjectStateReport {
|
|
|
664
664
|
declare function detectProjectState(cwd: string): Promise<ProjectStateReport>;
|
|
665
665
|
|
|
666
666
|
type LifecycleCommand = 'init' | 'migrate' | 'update' | 'graft';
|
|
667
|
-
declare function assertCommandPrecondition(command: LifecycleCommand, state: ProjectState
|
|
667
|
+
declare function assertCommandPrecondition(command: LifecycleCommand, state: ProjectState, options?: {
|
|
668
|
+
force?: boolean;
|
|
669
|
+
}): void;
|
|
668
670
|
|
|
669
671
|
/**
|
|
670
672
|
* The 8 categories of consumer-side files that `teamix-evo init` may
|
package/dist/core/index.js
CHANGED
|
@@ -2855,9 +2855,17 @@ var STATE_TO_COMMAND = {
|
|
|
2855
2855
|
"teamix-evo": "update",
|
|
2856
2856
|
other: "graft"
|
|
2857
2857
|
};
|
|
2858
|
-
|
|
2858
|
+
var FORCE_BYPASSABLE = {
|
|
2859
|
+
init: /* @__PURE__ */ new Set(["shadcn"]),
|
|
2860
|
+
migrate: /* @__PURE__ */ new Set([]),
|
|
2861
|
+
update: /* @__PURE__ */ new Set([]),
|
|
2862
|
+
graft: /* @__PURE__ */ new Set([])
|
|
2863
|
+
};
|
|
2864
|
+
function assertCommandPrecondition(command, state, options) {
|
|
2859
2865
|
const expected = VALID_STATES[command];
|
|
2860
2866
|
if (state === expected) return;
|
|
2867
|
+
const canForce = FORCE_BYPASSABLE[command].has(state);
|
|
2868
|
+
if (options?.force && canForce) return;
|
|
2861
2869
|
const stateLabel = STATE_LABELS[state];
|
|
2862
2870
|
const commandLabel = COMMAND_LABELS[command];
|
|
2863
2871
|
logger.error(
|
|
@@ -2868,6 +2876,9 @@ function assertCommandPrecondition(command, state) {
|
|
|
2868
2876
|
const suggestionLabel = COMMAND_LABELS[suggestion];
|
|
2869
2877
|
logger.info(`\u5EFA\u8BAE\u4F7F\u7528\uFF1Ateamix-evo ${suggestion}\uFF08${suggestionLabel}\uFF09`);
|
|
2870
2878
|
}
|
|
2879
|
+
if (!canForce) {
|
|
2880
|
+
logger.info("--force \u4E0D\u80FD\u7ED5\u8FC7\u6B64\u9650\u5236\u3002");
|
|
2881
|
+
}
|
|
2871
2882
|
process.exitCode = 1;
|
|
2872
2883
|
}
|
|
2873
2884
|
|