wechen-agent-editor-v1 1.1.9 → 1.2.0
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 +20 -5
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -196,11 +196,25 @@ npm 7+ 会校验整棵依赖树的 peer。冲突常来自宿主已有包,未
|
|
|
196
196
|
{
|
|
197
197
|
"dependencies": {
|
|
198
198
|
"@monaco-editor/react": "^4.6.0",
|
|
199
|
-
"wechen-agent-editor-v1": "^1.1.
|
|
199
|
+
"wechen-agent-editor-v1": "^1.1.9"
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
+
### 集成排错
|
|
205
|
+
|
|
206
|
+
| 现象 | 可能原因 | 处理 |
|
|
207
|
+
|------|----------|------|
|
|
208
|
+
| 代码编辑区空白 / 控制台 Monaco worker 报错 | 未配置 **Monaco worker** | 按 README「Monaco Worker」在应用入口引导 worker |
|
|
209
|
+
| 画布不可见或高度为 0 | 父级无 **定高** 或 flex 链缺 `minHeight: 0` | 使用「嵌入 flex 布局」示例;或传编辑器 **`minHeight`** |
|
|
210
|
+
| 连线异常、Handle 无响应、样式错乱 | **`@xyflow/react` 双实例** | `npm ls @xyflow/react`;保证宿主与编辑器共用 **单实例**(见上文 peer 说明) |
|
|
211
|
+
| `ref.deleteEdge(id)` 无效 | 持久化载体无稳定 **`edges[].id`** | 优先存 **`snapshot.flow` / `flowJson`**;仅存 DTO 时导出须含 **`edges[].id`**,回灌后用 **新** id |
|
|
212
|
+
| 存库后连线形状与编辑时不一致 | 仅存拓扑 DTO、缺 **layout** | 使用 **`flowJson`** 或 DTO **`edges[].layout`**(见「连线布局」) |
|
|
213
|
+
|
|
214
|
+
Playground **`?tab=overview`** 提供术语表与持久化对比;工程清单见 **`docs/ENGINEERING-BASELINE.md`**。
|
|
215
|
+
|
|
216
|
+
> **`package.json` 的 `repository` / `homepage` / `bugs`** 若为占位 URL,表示尚未绑定公开仓库;私有 fork 可忽略,发版前请改为真实地址。
|
|
217
|
+
|
|
204
218
|
---
|
|
205
219
|
|
|
206
220
|
## 使用
|
|
@@ -617,6 +631,7 @@ npm install
|
|
|
617
631
|
npm install --prefix playground
|
|
618
632
|
npm run dev # Playground 文档站(分 Tab 演示;ref 全表见 ?tab=ref-api,见 playground/README.md)
|
|
619
633
|
npm run dev:minimal # 仅最小宿主集成(对照 README「快速开始」)
|
|
634
|
+
npm run baseline # 工程基线:测试数、最大 LOC、dist 体积(见 docs/ENGINEERING-BASELINE.md)
|
|
620
635
|
```
|
|
621
636
|
|
|
622
637
|
浏览器地址以终端输出为准(默认 `http://localhost:5173`)。
|
|
@@ -634,8 +649,8 @@ npm run dev:minimal # 仅最小宿主集成(对照 README「快速开始
|
|
|
634
649
|
|
|
635
650
|
### 发版清单
|
|
636
651
|
|
|
637
|
-
1. 确认 `package.json` **`version`** 已 bump
|
|
638
|
-
2. 执行 **`npm install`**(同步 lock)→ **`npm run release:prep`**(`test` + `build` + `pack:check` + playground build
|
|
652
|
+
1. 确认 `package.json` **`version`** 已 bump(**以 `package.json` 为准**,当前 **1.1.9**)。
|
|
653
|
+
2. 执行 **`npm install`**(同步 lock)→ **`npm run release:prep`**(`test` + `build` + `pack:check` + playground build + **基线摘要**),或分步执行;可单独运行 **`npm run baseline`** 查看 LOC/体积指标。
|
|
639
654
|
3. **`npm whoami`** 确认已登录 **registry.npmjs.org**;scoped 包首次发布需 **`--access public`**(`publishConfig` 已配置)。
|
|
640
655
|
4. 执行 **`npm run release`**(或 `npm publish`),发后验证:
|
|
641
656
|
|
|
@@ -644,6 +659,6 @@ npm view wechen-agent-editor-v1 version
|
|
|
644
659
|
npm pack --dry-run # 确认 tarball 仅含 dist、LICENSE
|
|
645
660
|
```
|
|
646
661
|
|
|
647
|
-
5. 在空目录烟测:`npm install wechen-agent-editor-v1
|
|
662
|
+
5. 在空目录烟测:`npm install wechen-agent-editor-v1@<version>`(`<version>` 与 `package.json` 一致),`import { WechenAgentEditor } from "wechen-agent-editor-v1"`。
|
|
648
663
|
|
|
649
|
-
发版前可将 `repository` / `bugs` / `homepage` 中的占位 URL
|
|
664
|
+
发版前可将 `repository` / `bugs` / `homepage` 中的占位 URL 换成真实仓库地址(私有仓库可仅在内部文档记录,见「集成排错」说明)。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wechen-agent-editor-v1",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Wechen Agent:可执行的 AI 流程编排编辑器(React Flow),节点即模块、边即执行顺序;Monaco + Ant Design,面向 npm",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"dev": "npm --prefix playground run dev",
|
|
59
59
|
"dev:minimal": "npm --prefix playground run dev:minimal",
|
|
60
60
|
"pack:check": "npm pack --dry-run",
|
|
61
|
+
"baseline": "node scripts/print-project-baseline.mjs",
|
|
61
62
|
"release:prep": "node scripts/release-prep.mjs",
|
|
62
63
|
"release": "npm publish --access public --registry=https://registry.npmjs.org/",
|
|
63
64
|
"release:cn": "npm publish --access public --registry=https://registry.npmmirror.com/",
|