Files
BoosAPI/desktop/libs/markstream-vue/scripts/e2e-vue2-cli-smoke.mjs
T
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

76 lines
1.8 KiB
JavaScript

#!/usr/bin/env node
import { spawn } from 'node:child_process'
import path from 'node:path'
import process from 'node:process'
import { fileURLToPath } from 'node:url'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const repoRoot = path.resolve(__dirname, '..')
const checks = [
{
name: 'codeblock-highlight-stability',
script: path.join(repoRoot, 'scripts/e2e-codeblock-highlight-stability.mjs'),
},
{
name: 'link-tooltip-streaming',
script: path.join(repoRoot, 'scripts/e2e-link-tooltip-streaming.mjs'),
},
{
name: 'math-streaming-stability',
script: path.join(repoRoot, 'scripts/e2e-math-streaming-stability.mjs'),
},
]
function runCheck(check) {
return new Promise((resolve, reject) => {
const startedAt = Date.now()
const child = spawn(process.execPath, [check.script], {
cwd: repoRoot,
env: process.env,
stdio: 'inherit',
})
child.on('error', reject)
child.on('exit', (code, signal) => {
const durationMs = Date.now() - startedAt
if (code === 0) {
resolve({
...check,
durationMs,
ok: true,
})
return
}
reject(new Error(`${check.name} failed with ${signal ? `signal ${signal}` : `exit code ${code}`}`))
})
})
}
async function main() {
const results = []
for (const check of checks) {
console.log(`\n=== Running ${check.name} ===`)
const result = await runCheck(check)
results.push(result)
}
console.log('\n=== Vue2 CLI smoke summary ===')
console.log(JSON.stringify({
checks: results.map(result => ({
name: result.name,
durationMs: result.durationMs,
ok: result.ok,
})),
}, null, 2))
}
main().catch((error) => {
console.error('\n=== Vue2 CLI smoke failed ===')
console.error(error)
process.exit(1)
})