feat(cli): add standalone downloads and installers (#528)

* feat(cli): add standalone downloads and installers

* fix(cli): silence PowerShell download progress

* fix(cli): use framework APIs for Windows verification

* fix(cli): preserve null backup path during Windows updates

* docs(cli): translate native installation quickstart into Chinese
This commit is contained in:
Yiling-J
2026-11-12 19:37:33 +08:00
committed by GitHub
parent 0325435125
commit 97c2939b5e
20 changed files with 1339 additions and 19 deletions
+8
View File
@@ -25,6 +25,7 @@ import {
import type { CallOperation } from './operations/call-operation'
import { CliError, formatCliError } from './operations/errors'
import { createProgram } from './program'
import { version } from '../package.json'
/** Runs the CLI with mocked Operation calls and captures stdout/stderr. */
function setup() {
@@ -75,6 +76,13 @@ const pendingRead = {
}
describe('shumai-cli', () => {
it('reports its package version without calling the server', async () => {
const cli = setup()
await expect(cli.run('--version')).rejects.toMatchObject({ code: 'commander.version' })
expect(cli.stdout()).toBe(`${version}\n`)
expect(cli.callOperation).not.toHaveBeenCalled()
})
const originalAllowDelete = process.env.SHUMAI_ALLOW_DELETE
afterEach(() => {