mirror of
https://github.com/certd/certd.git
synced 2026-04-14 20:40:53 +08:00
Merge remote-tracking branch 'origin/v2-dev' into v2-dev
This commit is contained in:
@@ -8,7 +8,7 @@ import { AliyunAccess, AliyunClient } from '@certd/plugin-lib';
|
||||
title: '阿里云',
|
||||
desc: '阿里云DNS解析提供商',
|
||||
accessType: 'aliyun',
|
||||
icon: 'ant-design:aliyun-outlined',
|
||||
icon: 'svg:icon-aliyun',
|
||||
})
|
||||
export class AliyunDnsProvider extends AbstractDnsProvider {
|
||||
client: any;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { AliyunAccess, AliyunClient, AliyunSslClient, createCertDomainGetterInpu
|
||||
@IsTaskPlugin({
|
||||
name: 'AliyunDeployCertToALB',
|
||||
title: '阿里云-部署至ALB(应用负载均衡)',
|
||||
icon: 'ant-design:aliyun-outlined',
|
||||
icon: 'svg:icon-aliyun',
|
||||
group: pluginGroups.aliyun.key,
|
||||
desc: 'ALB,更新监听器的默认证书',
|
||||
needPlus: false,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { CertApplyPluginNames} from '@certd/plugin-cert';
|
||||
@IsTaskPlugin({
|
||||
name: 'DeployCertToAliyunCDN',
|
||||
title: '阿里云-部署证书至CDN',
|
||||
icon: 'ant-design:aliyun-outlined',
|
||||
icon: 'svg:icon-aliyun',
|
||||
group: pluginGroups.aliyun.key,
|
||||
desc: '自动部署域名证书至阿里云CDN',
|
||||
default: {
|
||||
|
||||
@@ -6,7 +6,7 @@ import { CertApplyPluginNames} from '@certd/plugin-cert';
|
||||
@IsTaskPlugin({
|
||||
name: 'DeployCertToAliyunDCDN',
|
||||
title: '阿里云-部署证书至DCDN',
|
||||
icon: 'ant-design:aliyun-outlined',
|
||||
icon: 'svg:icon-aliyun',
|
||||
group: pluginGroups.aliyun.key,
|
||||
desc: '依赖证书申请前置任务,自动部署域名证书至阿里云DCDN',
|
||||
default: {
|
||||
|
||||
@@ -6,7 +6,7 @@ import { CertApplyPluginNames} from '@certd/plugin-cert';
|
||||
@IsTaskPlugin({
|
||||
name: 'AliyunDeployCertToFC',
|
||||
title: '阿里云-部署至阿里云FC(3.0)',
|
||||
icon: 'ant-design:aliyun-outlined',
|
||||
icon: 'svg:icon-aliyun',
|
||||
group: pluginGroups.aliyun.key,
|
||||
desc: '部署证书到阿里云函数计算(FC3.0),【注意】证书的加密算法必须选择【pkcs1旧版】',
|
||||
needPlus: true,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { CertApplyPluginNames} from '@certd/plugin-cert';
|
||||
@IsTaskPlugin({
|
||||
name: 'AliyunDeployCertToNLB',
|
||||
title: '阿里云-部署至NLB(网络负载均衡)',
|
||||
icon: 'ant-design:aliyun-outlined',
|
||||
icon: 'svg:icon-aliyun',
|
||||
group: pluginGroups.aliyun.key,
|
||||
desc: 'NLB,网络负载均衡,更新监听器的默认证书',
|
||||
needPlus: false,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { CertApplyPluginNames} from '@certd/plugin-cert';
|
||||
@IsTaskPlugin({
|
||||
name: 'DeployCertToAliyunOSS',
|
||||
title: '阿里云-部署证书至OSS',
|
||||
icon: 'ant-design:aliyun-outlined',
|
||||
icon: 'svg:icon-aliyun',
|
||||
group: pluginGroups.aliyun.key,
|
||||
desc: '自动部署域名证书至阿里云OSS',
|
||||
default: {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { CertApplyPluginNames} from '@certd/plugin-cert';
|
||||
@IsTaskPlugin({
|
||||
name: 'AliyunDeployCertToSLB',
|
||||
title: '阿里云-部署至SLB(传统负载均衡)',
|
||||
icon: 'ant-design:aliyun-outlined',
|
||||
icon: 'svg:icon-aliyun',
|
||||
group: pluginGroups.aliyun.key,
|
||||
desc: '部署证书到阿里云SLB(传统负载均衡)',
|
||||
needPlus: false,
|
||||
|
||||
@@ -6,7 +6,7 @@ import { CertApplyPluginNames} from '@certd/plugin-cert';
|
||||
@IsTaskPlugin({
|
||||
name: 'AliyunDeployCertToWaf',
|
||||
title: '阿里云-部署至阿里云WAF',
|
||||
icon: 'ant-design:aliyun-outlined',
|
||||
icon: 'svg:icon-aliyun',
|
||||
group: pluginGroups.aliyun.key,
|
||||
desc: '部署证书到阿里云WAF',
|
||||
needPlus: true,
|
||||
|
||||
@@ -24,7 +24,7 @@ const regionDict = [
|
||||
@IsTaskPlugin({
|
||||
name: 'uploadCertToAliyun',
|
||||
title: '阿里云-上传证书到阿里云',
|
||||
icon: 'ant-design:aliyun-outlined',
|
||||
icon: 'svg:icon-aliyun',
|
||||
group: pluginGroups.aliyun.key,
|
||||
desc: '如果不想在阿里云上同一份证书上传多次,可以把此任务作为前置任务,其他阿里云任务证书那一项选择此任务的输出',
|
||||
default: {
|
||||
|
||||
@@ -37,7 +37,7 @@ export const AwsRegions = [
|
||||
name: 'aws',
|
||||
title: '亚马逊云aws授权',
|
||||
desc: '',
|
||||
icon: 'ant-design:aws-outlined',
|
||||
icon: 'svg:icon-aws',
|
||||
})
|
||||
export class AwsAccess extends BaseAccess {
|
||||
@AccessInput({
|
||||
|
||||
@@ -10,7 +10,7 @@ import { CertApplyPluginNames} from '@certd/plugin-cert';
|
||||
name: 'AwsDeployToCloudFront',
|
||||
title: 'AWS-部署证书到CloudFront',
|
||||
desc: '部署证书到 AWS CloudFront',
|
||||
icon: 'clarity:plugin-line',
|
||||
icon: 'svg:icon-aws',
|
||||
group: pluginGroups.aws.key,
|
||||
needPlus: true,
|
||||
default: {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { CertApplyPluginNames} from '@certd/plugin-cert';
|
||||
name: 'AwsUploadToACM',
|
||||
title: 'AWS-上传证书到ACM',
|
||||
desc: '上传证书 AWS ACM',
|
||||
icon: 'clarity:plugin-line',
|
||||
icon: 'svg:icon-aws',
|
||||
group: pluginGroups.aws.key,
|
||||
default: {
|
||||
strategy: {
|
||||
|
||||
@@ -179,6 +179,21 @@ export class UploadCertToHostPlugin extends AbstractTaskPlugin {
|
||||
})
|
||||
accessId!: string;
|
||||
|
||||
@TaskInput({
|
||||
title: '上传方式',
|
||||
helper: '选择上传方式,sftp或者scp',
|
||||
value:"sftp",
|
||||
component: {
|
||||
name: 'a-select',
|
||||
options: [
|
||||
{ value: 'sftp', label: 'sftp' },
|
||||
{ value: 'scp', label: 'scp' },
|
||||
],
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
uploadType: string = 'sftp';
|
||||
|
||||
@TaskInput({
|
||||
title: '自动创建远程目录',
|
||||
helper: '是否自动创建远程目录,如果关闭则你需要自己确保远程目录存在',
|
||||
@@ -249,18 +264,7 @@ export class UploadCertToHostPlugin extends AbstractTaskPlugin {
|
||||
|
||||
async onInstance() {}
|
||||
|
||||
// copyFile(srcFile: string, destFile: string) {
|
||||
// if (!srcFile || !destFile) {
|
||||
// this.logger.warn(`srcFile:${srcFile} 或 destFile:${destFile} 为空,不复制`);
|
||||
// return;
|
||||
// }
|
||||
// const dir = destFile.substring(0, destFile.lastIndexOf('/'));
|
||||
// if (!fs.existsSync(dir)) {
|
||||
// fs.mkdirSync(dir, { recursive: true });
|
||||
// }
|
||||
// fs.copyFileSync(srcFile, destFile);
|
||||
// this.logger.info(`复制文件:${srcFile} => ${destFile}`);
|
||||
// }
|
||||
|
||||
async execute(): Promise<void> {
|
||||
const { cert, accessId } = this;
|
||||
let { crtPath, keyPath, icPath, pfxPath, derPath, jksPath, onePath } = this;
|
||||
@@ -268,16 +272,6 @@ export class UploadCertToHostPlugin extends AbstractTaskPlugin {
|
||||
|
||||
const handle = async (opts: CertReaderHandleContext) => {
|
||||
const { tmpCrtPath, tmpKeyPath, tmpDerPath, tmpJksPath, tmpPfxPath, tmpIcPath, tmpOnePath } = opts;
|
||||
// if (this.copyToThisHost) {
|
||||
// this.logger.info('复制到目标路径');
|
||||
// this.copyFile(tmpCrtPath, crtPath);
|
||||
// this.copyFile(tmpKeyPath, keyPath);
|
||||
// this.copyFile(tmpIcPath, this.icPath);
|
||||
// this.copyFile(tmpPfxPath, this.pfxPath);
|
||||
// this.copyFile(tmpDerPath, this.derPath);
|
||||
// this.logger.warn('复制到当前主机功能已迁移到 “复制到本机”插件,请尽快换成复制到本机插件');
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (accessId == null) {
|
||||
this.logger.error('复制到当前主机功能已迁移到 “复制到本机”插件,请换成复制到本机插件');
|
||||
@@ -355,7 +349,9 @@ export class UploadCertToHostPlugin extends AbstractTaskPlugin {
|
||||
connectConf,
|
||||
transports,
|
||||
mkdirs: this.mkdirs,
|
||||
uploadType: this.uploadType,
|
||||
});
|
||||
|
||||
this.logger.info('上传文件到服务器成功');
|
||||
//输出
|
||||
this.hostCrtPath = crtPath;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { IsAccess, AccessInput, BaseAccess } from '@certd/pipeline';
|
||||
name: 'proxmox',
|
||||
title: 'proxmox',
|
||||
desc: '',
|
||||
icon: 'svg:icon-dogecloud',
|
||||
icon: 'svg:icon-proxmox',
|
||||
})
|
||||
export class ProxmoxAccess extends BaseAccess {
|
||||
/**
|
||||
|
||||
@@ -8,7 +8,7 @@ import { CertApplyPluginNames} from '@certd/plugin-cert';
|
||||
//命名规范,插件名称+功能(就是目录plugin-demo中的demo),大写字母开头,驼峰命名
|
||||
name: 'ProxmoxUploadCert',
|
||||
title: '上传证书到Proxmox',
|
||||
icon: 'clarity:plugin-line',
|
||||
icon: 'svg:icon-proxmox',
|
||||
//插件分组
|
||||
group: pluginGroups.other.key,
|
||||
needPlus: true,
|
||||
|
||||
@@ -8,7 +8,7 @@ import { CertApplyPluginNames} from '@certd/plugin-cert';
|
||||
@IsTaskPlugin({
|
||||
name: 'QnapDeploy',
|
||||
title: '威联通-部署证书到威联通',
|
||||
icon: 'simple-icons:qnap',
|
||||
icon: 'svg:icon-qnap',
|
||||
group: pluginGroups.panel.key,
|
||||
desc: '部署证书到qnap',
|
||||
default: {
|
||||
|
||||
@@ -17,7 +17,7 @@ type westRecord = {
|
||||
name: 'west',
|
||||
title: '西部数码',
|
||||
desc: 'west dns provider',
|
||||
icon: 'tabler:map-west',
|
||||
icon: 'svg:icon-xibushuma',
|
||||
// 这里是对应的云平台的access类型名称
|
||||
accessType: 'west',
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user