Files
2026-06-11 17:11:28 +08:00

71 lines
2.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# wujie 离线依赖包(内网无网安装)
圆桌规划抽屉(`src/roundtable-embed/`)用无界(wujie)把 DeerFlow 圆桌页嵌进抽屉,需要以下
依赖。内网环境无法联网拉包,故把它们及全部传递依赖预先打成 `.tgz` 放在本目录。
## 依赖清单(共 3 个,已全部含在本目录)
| 包 | 版本 | 说明 |
|----|------|------|
| `wujie-vue3` | 2.0.2 | 无界 Vue3 封装组件(`<WujieVue>` + `bus`) |
| `wujie` | 2.0.2 | 无界内核(`wujie-vue3` 的依赖) |
| `@babel/runtime` | 7.29.7 | `wujie` 的唯一依赖(自身无下游依赖) |
> `vue@^3` 是 `wujie-vue3` 的 peer 依赖,项目本就有,无需打包。
> 经核对,上述 3 个包之外**没有任何其他传递依赖**。
## 安装(任选一种)
> 全程不联网。命令里**依赖在前、消费方在后**,让本地 tarball 互相满足 semver 范围。
### 方式 A:脚本一键装(推荐)
```powershell
# Windows PowerShell
./install-offline.ps1
```
```bash
# Linux / macOS / Git-Bash
bash ./install-offline.sh
```
脚本会自动 `cd` 到项目根、优先用 pnpm(无则 npm)离线安装。
### 方式 B:手动命令
在**项目根目录**(`parallel-agents-vue/`)执行:
```bash
# pnpm
pnpm add --offline \
./offline-deps/wujie/babel-runtime-7.29.7.tgz \
./offline-deps/wujie/wujie-2.0.2.tgz \
./offline-deps/wujie/wujie-vue3-2.0.2.tgz
# 或 npm
npm install --offline \
./offline-deps/wujie/babel-runtime-7.29.7.tgz \
./offline-deps/wujie/wujie-2.0.2.tgz \
./offline-deps/wujie/wujie-vue3-2.0.2.tgz
```
### 方式 C:纯解压兜底(连包管理器都不想用时)
npm pack 的 tarball 内层是 `package/` 目录,直接解压改名进 `node_modules`:
```bash
cd parallel-agents-vue
mkdir -p node_modules/@babel
tar -xzf offline-deps/wujie/wujie-2.0.2.tgz && rm -rf node_modules/wujie && mv package node_modules/wujie
tar -xzf offline-deps/wujie/wujie-vue3-2.0.2.tgz && rm -rf node_modules/wujie-vue3 && mv package node_modules/wujie-vue3
tar -xzf offline-deps/wujie/babel-runtime-7.29.7.tgz && rm -rf node_modules/@babel/runtime && mv package node_modules/@babel/runtime
```
(Win10+/Linux/macOS 均自带 `tar`。这三个包是纯 JS、无原生编译,复制即可用。)
## 验证
```bash
node -e "console.log(require('wujie-vue3/package.json').version, require('wujie/package.json').version, require('@babel/runtime/package.json').version)"
# 期望输出: 2.0.2 2.0.2 7.29.7
```
之后 `pnpm dev` / `npm run dev` 打开「圆桌规划抽屉(wujie)」页签即可。
## 重新生成这些 tarball(有网机器上)
```bash
cd offline-deps/wujie
npm pack wujie@2.0.2 wujie-vue3@2.0.2 @babel/runtime@7.29.7
```