feat: refactor deploy command to enhance file upload process and user handling

- Updated the deploy command to include a new username retrieval mechanism, falling back to the organization if not specified.
- Introduced uploadFilesV2 function to streamline file upload logic, including hash checking to prevent redundant uploads.
- Modified queryAppVersion to accept a create parameter for better version management.
- Added a new test file to validate the uploadFilesV2 functionality.
This commit is contained in:
2026-02-02 17:57:50 +08:00
parent 310d727321
commit 5774391bbe
6 changed files with 373 additions and 166 deletions

13
test/upload.ts Normal file
View File

@@ -0,0 +1,13 @@
import { uploadFilesV2 } from '../src/command/deploy.ts';
import path from 'path';
import fs from 'fs';
const files = ['test-cli.html'];
const res = await uploadFilesV2(files, path.resolve('./test'), {
key: 'test',
version: '1.0.4',
username: 'root',
})
console.log(res);