perf: 支持windows文件上传

This commit is contained in:
xiaojunnuo
2024-06-27 16:38:43 +08:00
parent 37caef38ad
commit 7f61cab101
7 changed files with 113 additions and 30 deletions
@@ -10,6 +10,7 @@ import {
import { SshClient } from '../../lib/ssh';
import { CertInfo, CertReader } from '@certd/plugin-cert';
import * as fs from 'fs';
import {SshAccess} from "../../access";
@IsTaskPlugin({
name: 'uploadCertToHost',
@@ -112,7 +113,7 @@ export class UploadCertToHostPlugin extends AbstractTaskPlugin {
throw new Error('主机登录授权配置不能为空');
}
this.logger.info('准备上传到服务器');
const connectConf = await this.accessService.getById(accessId);
const connectConf:SshAccess = await this.accessService.getById(accessId);
const sshClient = new SshClient(this.logger);
await sshClient.uploadFiles({
connectConf,