- 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.
13 lines
280 B
TypeScript
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); |