add sync download
This commit is contained in:
@@ -9,9 +9,8 @@ import inquirer from 'inquirer';
|
||||
import { packLib, unpackLib } from './publish.ts';
|
||||
import chalk from 'chalk';
|
||||
import { installDeps } from '@/uitls/npm.ts';
|
||||
import cryptojs from 'crypto-js';
|
||||
import { upload } from '@/module/download/upload.ts';
|
||||
const MD5 = cryptojs.MD5;
|
||||
import { getHash } from '@/uitls/hash.ts';
|
||||
/**
|
||||
* 获取package.json 中的 basename, version, user, appKey
|
||||
* @returns
|
||||
@@ -150,10 +149,7 @@ const command = new Command('deploy')
|
||||
console.error('error', error);
|
||||
}
|
||||
});
|
||||
export const getHash = (file: string) => {
|
||||
const content = fs.readFileSync(file, 'utf-8');
|
||||
return MD5(content).toString();
|
||||
};
|
||||
|
||||
type UploadFileOptions = {
|
||||
key: string;
|
||||
version: string;
|
||||
|
||||
Reference in New Issue
Block a user