Files
cli/test/upload.ts
abearxiong 5774391bbe 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.
2026-02-02 17:57:50 +08:00

13 lines
280 B
TypeScript

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);