feat: 升级midway,支持esm

This commit is contained in:
xiaojunnuo
2024-07-15 00:30:33 +08:00
parent 970c7fd8a0
commit 485e603b51
246 changed files with 3821 additions and 1532 deletions
@@ -6,7 +6,7 @@ import {
RunStrategy,
TaskInput,
} from '@certd/pipeline';
import { SshClient } from '../../lib/ssh';
import { SshClient } from '../../lib/ssh.js';
@IsTaskPlugin({
name: 'hostShellExecute',
@@ -1,2 +1,2 @@
export * from './host-shell-execute';
export * from './upload-to-host';
export * from './host-shell-execute/index.js';
export * from './upload-to-host/index.js';
@@ -7,10 +7,10 @@ import {
TaskInput,
TaskOutput,
} from '@certd/pipeline';
import { SshClient } from '../../lib/ssh';
import { SshClient } from '../../lib/ssh.js';
import { CertInfo, CertReader } from '@certd/plugin-cert';
import * as fs from 'fs';
import {SshAccess} from "../../access";
import { SshAccess } from '../../access/index.js';
@IsTaskPlugin({
name: 'uploadCertToHost',
@@ -113,7 +113,7 @@ export class UploadCertToHostPlugin extends AbstractTaskPlugin {
throw new Error('主机登录授权配置不能为空');
}
this.logger.info('准备上传到服务器');
const connectConf:SshAccess = await this.accessService.getById(accessId);
const connectConf: SshAccess = await this.accessService.getById(accessId);
const sshClient = new SshClient(this.logger);
await sshClient.uploadFiles({
connectConf,