@bolloon/bolloon-agent 0.1.15 → 0.1.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bolloon/bolloon-agent",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "type": "module",
5
5
  "description": "P2P AI Document Agent - 全局安装后执行 `bolloon` 启动产品",
6
6
  "main": "dist/cli.js",
@@ -32,7 +32,7 @@
32
32
  "src/constraint-runtime"
33
33
  ],
34
34
  "dependencies": {
35
- "@bolloon/bolloon-agent": "^0.1.15",
35
+ "@bolloon/bolloon-agent": "^0.1.16",
36
36
  "@bolloon/constraint-runtime": "0.1.0",
37
37
  "@chainsafe/libp2p-noise": "^17.0.0",
38
38
  "@chainsafe/libp2p-yamux": "^8.0.1",
@@ -12,8 +12,11 @@ const DIST_WEB = path.join(ROOT, 'dist', 'web');
12
12
  async function main() {
13
13
  console.log('[build-web] 开始构建...');
14
14
 
15
- // 清理并创建目录
16
- await fs.rm(DIST_WEB, { recursive: true, force: true });
15
+ // 重要: 不能 rm -rf 整个 dist/web/, 否则会删掉 build:main 编译出来的
16
+ // dist/web/server.js. 只清理 web 静态资源, 保留 server.js.
17
+ for (const f of ['index.html', 'api-config.html', 'style.css', 'client.js', 'components']) {
18
+ await fs.rm(path.join(DIST_WEB, f), { recursive: true, force: true });
19
+ }
17
20
  await fs.mkdir(DIST_WEB, { recursive: true });
18
21
  await fs.mkdir(path.join(DIST_WEB, 'components', 'p2p'), { recursive: true });
19
22