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:
13
test/upload.ts
Normal file
13
test/upload.ts
Normal 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);
|
||||
Reference in New Issue
Block a user