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:
boos
2026-06-22 11:32:57 +08:00
parent d9c78ecc73
commit e0a5f57793
2305 changed files with 449355 additions and 0 deletions
+69
View File
@@ -0,0 +1,69 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: Lint, Typecheck & Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node_version: ['lts/*']
include:
- os: macos-latest
node_version: 'lts/*'
- os: windows-latest
node_version: 'lts/*'
fail-fast: false
env:
CI: true
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Set node ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: pnpm
- run: corepack enable
- name: Setup
run: npm i -g @antfu/ni
- name: Install
run: nci
- name: Lint (Ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: pnpm lint
- name: Typecheck
run: nr typecheck
- name: Run tests
run: nr test -- --run
- name: Run SSR check
run: nr check:ssr
- name: Build (Ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: pnpm build
- name: Check package size budget (Ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: pnpm size:check
@@ -0,0 +1,22 @@
name: Docs check
on:
pull_request:
branches: [main]
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build docs
run: pnpm docs:build:ci
@@ -0,0 +1,29 @@
name: Docs parity check
on:
pull_request:
branches: [main]
push:
branches: [main]
permissions:
contents: read
jobs:
docs-parity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check docs parity
run: pnpm docs:check-zh
- name: Build docs
run: pnpm build:parser && pnpm build && pnpm docs:build
@@ -0,0 +1,24 @@
name: Types Declaration Check
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
dts-and-typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run typecheck
run: pnpm run typecheck
+58
View File
@@ -0,0 +1,58 @@
name: Deploy Docs to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: github-pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: pnpm
- name: Configure GitHub Pages
uses: actions/configure-pages@v5
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build docs for GitHub Pages
run: pnpm docs:build:gh:ci
- name: Disable Jekyll on Pages artifact
run: touch docs/.vitepress/dist/.nojekyll
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
@@ -0,0 +1,43 @@
name: pkg.pr.new
on:
pull_request:
branches: [main]
permissions:
contents: read
pull-requests: write
jobs:
publish:
# pkg.pr.new requires its GitHub App to be installed on the repository.
# Keep previews opt-in so PR CI does not fail before that external setup exists.
if: ${{ vars.PKG_PR_NEW_ENABLED == 'true' }}
name: Publish preview packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Set node lts/*
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: pnpm
- run: corepack enable
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build packages
run: |
pnpm -r --filter "./packages/**" build
pnpm build
- name: Publish preview packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm dlx pkg-pr-new publish . ./packages/markdown-parser ./packages/markstream-react ./packages/markstream-vue2
@@ -0,0 +1,136 @@
name: Release (Nightly)
on:
schedule:
# 02:15 UTC daily
- cron: '15 2 * * *'
workflow_dispatch:
inputs:
all:
description: Tag all packages even if unchanged
required: false
default: 'false'
permissions:
contents: write
jobs:
tag:
runs-on: ubuntu-latest
outputs:
created: ${{ steps.nightly.outputs.created }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Configure git identity (annotated tags)
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Create nightly tags (if needed)
id: nightly
shell: bash
run: |
set -euo pipefail
ARGS=(--push --remote origin)
if [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ inputs.all }}" == "true" ]]; then
ARGS+=(--all)
fi
OUT="$(node scripts/create-nightly-tags.mjs "${ARGS[@]}")"
echo "${OUT}"
CREATED_JSON="$(node -e 'const s=process.argv[1]; const j=JSON.parse(s); console.log(JSON.stringify(j.created||[]))' "${OUT}")"
echo "created=${CREATED_JSON}" >> "${GITHUB_OUTPUT}"
release:
needs: tag
if: ${{ needs.tag.outputs.created != '[]' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tag: ${{ fromJson(needs.tag.outputs.created) }}
steps:
- name: Parse tag
id: meta
shell: bash
run: |
set -euo pipefail
TAG="${{ matrix.tag }}"
PKG="${TAG%@*}"
ID="${TAG##*@}"
echo "pkg=${PKG}" >> "${GITHUB_OUTPUT}"
echo "name=[${PKG}] ${ID}" >> "${GITHUB_OUTPUT}"
- name: Checkout (for changelog body)
if: ${{ steps.meta.outputs.pkg == 'markstream-vue' }}
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Build changelog body (best effort)
id: changelog
if: ${{ steps.meta.outputs.pkg == 'markstream-vue' }}
shell: bash
run: |
set -euo pipefail
VERSION="$(grep -m1 '"version"' package.json | sed -E 's/.*"version": "([^"]+)".*/\1/')"
BODY_FILE="$(mktemp)"
FOUND=0
if [[ -n "${VERSION}" ]]; then
awk -v version="${VERSION}" '
BEGIN { capture = 0; found = 0 }
/^## \[/ {
if (capture == 1)
exit
if ($0 ~ "^## \\[" version "\\]") {
capture = 1
found = 1
next
}
}
capture == 1 { print }
END {
if (found == 0)
exit 2
}
' CHANGELOG.md > "${BODY_FILE}" && FOUND=1 || true
fi
if [[ "${FOUND}" == "1" && -s "${BODY_FILE}" ]]; then
echo "has_body=true" >> "${GITHUB_OUTPUT}"
echo "body_path=${BODY_FILE}" >> "${GITHUB_OUTPUT}"
else
echo "has_body=false" >> "${GITHUB_OUTPUT}"
fi
- name: Create GitHub Pre-release (markstream-vue with changelog)
if: ${{ steps.meta.outputs.pkg == 'markstream-vue' && steps.changelog.outputs.has_body == 'true' }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ matrix.tag }}
name: ${{ steps.meta.outputs.name }}
prerelease: true
generate_release_notes: true
body_path: ${{ steps.changelog.outputs.body_path }}
append_body: true
- name: Create GitHub Pre-release (fallback)
if: ${{ steps.meta.outputs.pkg != 'markstream-vue' || steps.changelog.outputs.has_body != 'true' }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ matrix.tag }}
name: ${{ steps.meta.outputs.name }}
prerelease: true
generate_release_notes: true
@@ -0,0 +1,102 @@
name: Release (Stable)
on:
push:
tags:
# Stable package tags: <pkg>@<semver>
# e.g. markstream-vue@0.0.4, markstream-react@0.0.3-beta.2
- '*@[0-9]*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Parse tag
id: meta
shell: bash
run: |
set -euo pipefail
TAG="${GITHUB_REF_NAME}"
PKG="${TAG%@*}"
VERSION="${TAG##*@}"
if [[ -z "${PKG}" || -z "${VERSION}" ]]; then
echo "Invalid tag: ${TAG}"
exit 1
fi
PRERELEASE=false
if [[ "${VERSION}" == *-* ]]; then
PRERELEASE=true
fi
echo "pkg=${PKG}" >> "${GITHUB_OUTPUT}"
echo "version=${VERSION}" >> "${GITHUB_OUTPUT}"
echo "prerelease=${PRERELEASE}" >> "${GITHUB_OUTPUT}"
echo "name=[${PKG}] ${VERSION}" >> "${GITHUB_OUTPUT}"
- name: Checkout (for changelog body)
if: ${{ steps.meta.outputs.pkg == 'markstream-vue' }}
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Build changelog body
id: changelog
if: ${{ steps.meta.outputs.pkg == 'markstream-vue' }}
shell: bash
run: |
set -euo pipefail
VERSION="${{ steps.meta.outputs.version }}"
BODY_FILE="$(mktemp)"
awk -v version="${VERSION}" '
BEGIN { capture = 0; found = 0 }
/^## \[/ {
if (capture == 1)
exit
if ($0 ~ "^## \\[" version "\\]") {
capture = 1
found = 1
next
}
}
capture == 1 { print }
END {
if (found == 0)
exit 2
}
' CHANGELOG.md > "${BODY_FILE}" || {
echo "Unable to find CHANGELOG.md section for version ${VERSION}" >&2
exit 1
}
if [[ ! -s "${BODY_FILE}" ]]; then
echo "Found empty CHANGELOG.md section for version ${VERSION}" >&2
exit 1
fi
echo "body_path=${BODY_FILE}" >> "${GITHUB_OUTPUT}"
- name: Create GitHub Release (markstream-vue)
if: ${{ steps.meta.outputs.pkg == 'markstream-vue' }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: ${{ steps.meta.outputs.name }}
prerelease: ${{ steps.meta.outputs.prerelease }}
generate_release_notes: true
body_path: ${{ steps.changelog.outputs.body_path }}
append_body: true
- name: Create GitHub Release (other packages)
if: ${{ steps.meta.outputs.pkg != 'markstream-vue' }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: ${{ steps.meta.outputs.name }}
prerelease: ${{ steps.meta.outputs.prerelease }}
generate_release_notes: true