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.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { getMarkdown } from 'stream-markdown-parser'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
function extractFenceTokens(md: ReturnType<typeof getMarkdown>, src: string) {
|
||||
const tokens = md.parse(src, {}) as any[]
|
||||
return tokens.filter((t: any) => t.type === 'fence')
|
||||
}
|
||||
|
||||
describe('fence streaming plugin', () => {
|
||||
it('sets closed=true for closed ``` fences', () => {
|
||||
const md = getMarkdown('t')
|
||||
const src = '```ts\nconst a=1\n```\n'
|
||||
const [f] = extractFenceTokens(md, src)
|
||||
expect(f?.meta?.closed).toBe(true)
|
||||
})
|
||||
|
||||
it('sets closed=false for unclosed ``` fences', () => {
|
||||
const md = getMarkdown('t')
|
||||
const src = '```ts\nconst a=1\n' // no closing fence
|
||||
const [f] = extractFenceTokens(md, src)
|
||||
expect(f?.meta?.closed).toBe(false)
|
||||
})
|
||||
|
||||
it('supports ~~~ fences and closed detection', () => {
|
||||
const md = getMarkdown('t')
|
||||
const src = '~~~js\nlet x=1\n~~~\n'
|
||||
const [f] = extractFenceTokens(md, src)
|
||||
expect(f?.meta?.closed).toBe(true)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user