Files
boos e0a5f57793 feat(desktop): embed BoosAPI Desktop client as a subproject
Vendor the rebranded BoosAPI Desktop client (Tauri + Vue) into metapi as
a monorepo subdirectory under desktop/. Source only — node_modules,
dist, Cargo target and the upstream .git history are excluded.

desktop/ keeps its own independent Cargo workspace (desktop/src-tauri
with crates/*); it is not part of the backend boosapi crate, so a
`cargo check` at the metapi root still compiles only the backend. Build
the desktop app from desktop/src-tauri per desktop/README.md.

Note: app icons are still placeholder assets pending the final BoosAPI
logo. The updater signing keys live outside the repo and are not
included.
2026-06-22 11:32:57 +08:00

2.3 KiB
Raw Permalink Blame History

Monorepo 迁移(重定向)

该页面已迁移到中文指南目录:

  • 新页面:/zh/guide/monorepo-migration

如果你的链接仍指向 /zh/monorepo-migration,页面将自动跳转。

<script> if (typeof window !== 'undefined') { window.location.replace('/zh/guide/monorepo-migration') } </script> # Monorepo 迁移指南

概览

为了解耦解析器与渲染器,项目将解析器抽离为独立包 stream-markdown-parser,以便跨框架复用和更灵活的打包策略。

包结构

markstream-vue/
├── packages/
│   └── markdown-parser/          # stream-markdown-parser
│       ├── src/
│       │   ├── index.ts          # 入口
│       │   ├── config.ts         # KaTeX 配置等
│       │   ├── types.ts
│       │   ├── parser/
│       │   └── plugins/
├── src/                          # 主 Vue 包
└── playground/

变更概览

1. 新增包:stream-markdown-parser

  • 纯 JS/TS,无 Vue 依赖
  • 框架无关,可用于任意 JavaScript 项目
  • 单个入口导出常用函数:getMarkdown、parseMarkdownToStructure 等

2. 对主包的影响

markstream-vue 仍作为主要交付包,但现在依赖 stream-markdown-parser:

{
  "dependencies": {
    "stream-markdown-parser": "workspace:*"
  }
}

3. 导入变更

对内部开发者:

  • 旧:
import { getMarkdown } from './utils/markdown'
  • 新:
import { getMarkdown } from 'stream-markdown-parser'

对外部用户:API 保持一致——更改主要是内部实现与包结构。

构建与测试

  • 构建解析器包:
cd packages/markdown-parser
pnpm build
  • 构建主包:
cd ../..
pnpm build
  • 运行测试:
pnpm test

好处

  • 更好的可复用性与更小的 bundle
  • 清晰的边界与独立的版本策略
  • 更便于单元测试与 CI 的维护

迁移建议

  • 在代码中把 import 指向新的 stream-markdown-parser。
  • 为 parser 提供单独的测试文件与基线,以便快速发现破坏性更改。
  • 将 parser 的发行流程独立于主包。