Merge remote-tracking branch 'refs/remotes/origin/v2-dev-plugin-yaml' into v2-dev

# Conflicts:
#	packages/ui/certd-server/export-plugin-yaml.js
pull/409/head
xiaojunnuo 2025-04-27 22:50:19 +08:00
commit 605440812f
100 changed files with 5348 additions and 50 deletions

View File

@ -32,7 +32,7 @@ export abstract class AbstractDnsProvider<T = any> implements IDnsProvider<T> {
export async function createDnsProvider(opts: { dnsProviderType: string; context: DnsProviderContext }): Promise<IDnsProvider> { export async function createDnsProvider(opts: { dnsProviderType: string; context: DnsProviderContext }): Promise<IDnsProvider> {
const { dnsProviderType, context } = opts; const { dnsProviderType, context } = opts;
const dnsProviderPlugin = dnsProviderRegistry.get(dnsProviderType); const dnsProviderPlugin = dnsProviderRegistry.get(dnsProviderType);
const DnsProviderClass = dnsProviderPlugin.target; const DnsProviderClass = await dnsProviderPlugin.target();
const dnsProviderDefine = dnsProviderPlugin.define as DnsProviderDefine; const dnsProviderDefine = dnsProviderPlugin.define as DnsProviderDefine;
if (dnsProviderDefine.deprecated) { if (dnsProviderDefine.deprecated) {
context.logger.warn(dnsProviderDefine.deprecated); context.logger.warn(dnsProviderDefine.deprecated);

View File

@ -24,7 +24,9 @@ export function IsDnsProvider(define: DnsProviderDefine): ClassDecorator {
target.define = define; target.define = define;
dnsProviderRegistry.register(define.name, { dnsProviderRegistry.register(define.name, {
define, define,
target, target: async () => {
return target;
},
}); });
}; };
} }

View File

@ -5,6 +5,7 @@ import fs from 'fs'
import { pathToFileURL } from "node:url"; import { pathToFileURL } from "node:url";
import path from 'path' import path from 'path'
import * as yaml from "js-yaml"; import * as yaml from "js-yaml";
import {AbstractTaskPlugin, BaseAccess, BaseNotification} from "@certd/pipeline";
function scanDir(dir) { function scanDir(dir) {
const files = fs.readdirSync(dir); const files = fs.readdirSync(dir);
const result = []; const result = [];
@ -29,7 +30,9 @@ export default async function loadModules(dir) {
const files = scanDir(dir); const files = scanDir(dir);
const modules = {} const modules = {}
for (const file of files) { for (const file of files) {
if(file === "dist/plugins/index.js" || file === "dist\\plugins\\index.js"){
continue
}
try { try {
// 转换为 file:// URLWindows 必需) // 转换为 file:// URLWindows 必需)
const moduleUrl = pathToFileURL(file).href const moduleUrl = pathToFileURL(file).href
@ -44,37 +47,51 @@ export default async function loadModules(dir) {
return modules; return modules;
} }
function isPrototypeOf(value,cls){
return cls.prototype.isPrototypeOf(value.prototype)
}
const modules = await loadModules('./dist/plugins'); const modules = await loadModules('./dist/plugins');
fs.rmSync("./metadata", { recursive: true });
fs.mkdirSync("./metadata", { recursive: true });
for (const key in modules) { for (const key in modules) {
console.log(key) console.log(key)
const module = modules[key] const module = modules[key]
const entry = Object.entries(module) const entry = Object.entries(module)
for (const [name, value] of entry) { for (const [name, value] of entry) {
if(key.includes("deploy-to-live")){
console.log("live",value)
}
//如果有define属性 //如果有define属性
if(value.define){ if(value.define){
//那么就是插件 //那么就是插件
let location = key.substring(4) let location = key.substring(4)
location = location.substring(0, location.length - 3) location = location.substring(0, location.length - 3)
location = location.replaceAll("\\","/")
location += ".js"
location = `../../..${location}` // 从modules/plugin/plugin-service 加载 ../../plugins目录下的文件
const pluginDefine = { const pluginDefine = {
...value.define ...value.define
} }
pluginDefine.type = "builtIn"
if(pluginDefine.accessType){ if(pluginDefine.accessType){
pluginDefine.pluginType = "dnsProvider" pluginDefine.pluginType = "dnsProvider"
}else if(pluginDefine.group){ }else if(isPrototypeOf(value,AbstractTaskPlugin)){
pluginDefine.pluginType = "deploy" pluginDefine.pluginType = "deploy"
}else{ }else if(isPrototypeOf(value,BaseNotification)){
pluginDefine.pluginType = "notification"
}else if(isPrototypeOf(value,BaseAccess)){
pluginDefine.pluginType = "access" pluginDefine.pluginType = "access"
}else{
console.log(`[warning] 未知的插件类型:${pluginDefine.name}`)
} }
delete pluginDefine.autowire delete pluginDefine.autowire
const filePath = path.join(`./src/${location}`+".yaml") const filePath = path.join(`./metadata/${pluginDefine.pluginType}_${pluginDefine.name}.yaml`)
pluginDefine.scriptFilePath = location
const data = yaml.dump(pluginDefine) const data = yaml.dump(pluginDefine)
fs.writeFileSync(filePath,data ,'utf8') fs.writeFileSync(filePath,data ,'utf8')
} }
} }
} }
process.exit()

View File

@ -0,0 +1,22 @@
name: 51dns
title: 51dns授权
icon: arcticons:dns-changer-3
desc: ''
input:
username:
title: 用户名
component:
placeholder: 用户名或手机号
required: true
encrypt: false
password:
title: 登录密码
component:
name: a-input-password
vModel: value
placeholder: 密码
required: true
encrypt: true
type: builtIn
pluginType: access
scriptFilePath: ../../../plugins/plugin-51dns/index.js

View File

@ -0,0 +1,24 @@
name: CacheFly
title: CacheFly
desc: CacheFly
icon: clarity:plugin-line
input:
username:
title: username
component:
placeholder: username
required: true
password:
title: password
component:
placeholder: password
required: true
encrypt: true
otpkey:
title: totp key
component:
placeholder: totp key
encrypt: true
type: builtIn
pluginType: access
scriptFilePath: ../../../plugins/plugin-cachefly/index.js

View File

@ -0,0 +1,24 @@
name: Gcore
title: Gcore
desc: Gcore
icon: clarity:plugin-line
input:
username:
title: username
component:
placeholder: username
required: true
password:
title: password
component:
placeholder: password
required: true
encrypt: true
otpkey:
title: totp key
component:
placeholder: totp key
encrypt: true
type: builtIn
pluginType: access
scriptFilePath: ../../../plugins/plugin-gcore/index.js

View File

@ -0,0 +1,22 @@
name: aws
title: 亚马逊云aws授权
desc: ''
icon: svg:icon-aws
input:
accessKeyId:
title: accessKeyId
component:
placeholder: accessKeyId
helper: >-
右上角->安全凭证->访问密钥,[点击前往](https://us-east-1.console.aws.amazon.com/iam/home?region=ap-east-1#/security_credentials/access-key-wizard)
required: true
secretAccessKey:
title: secretAccessKey
component:
placeholder: secretAccessKey
required: true
encrypt: true
helper: 请妥善保管您的安全访问密钥。您可以在AWS管理控制台的IAM中创建新的访问密钥。
type: builtIn
pluginType: access
scriptFilePath: ../../../plugins/plugin-aws/index.js

View File

@ -0,0 +1,24 @@
name: cloudflare
title: cloudflare授权
icon: simple-icons:cloudflare
desc: ''
input:
apiToken:
title: API Token
component:
placeholder: api token用户 API 令牌
helper: |-
前往 [获取API令牌](https://dash.cloudflare.com/profile/api-tokens),注意是令牌,不是密钥。
token权限必须包含[Zone区域-Zone区域-Edit编辑], [Zone区域-DNS-Edit编辑]
required: true
encrypt: true
proxy:
title: HTTP代理
component:
placeholder: http://xxxx.xxx.xx:10811
helper: 是否使用http代理
required: false
encrypt: false
type: builtIn
pluginType: access
scriptFilePath: ../../../plugins/plugin-cloudflare/index.js

View File

@ -0,0 +1,19 @@
name: demo
title: 授权插件示例
icon: clarity:plugin-line
desc: ''
input:
demoKeyId:
title: 密钥Id
component:
placeholder: demoKeyId
required: true
demoKeySecret:
title: 密钥串
component:
placeholder: demoKeySecret
required: true
encrypt: true
type: builtIn
pluginType: access
scriptFilePath: ../../../plugins/plugin-demo/index.js

View File

@ -0,0 +1,22 @@
name: dnsla
title: dns.la授权
icon: arcticons:dns-changer-3
desc: ''
input:
apiId:
title: APIID
component:
placeholder: APIID
helper: 从我的账户->API密钥中获取 APIID APISecret
required: true
encrypt: false
apiSecret:
title: APISecret
component:
placeholder: ''
helper: ''
required: false
encrypt: true
type: builtIn
pluginType: access
scriptFilePath: ../../../plugins/plugin-dnsla/index.js

View File

@ -0,0 +1,38 @@
name: dnspod
title: dnspod(已废弃)
desc: 腾讯云的域名解析接口已迁移到dnspod
deprecated: dnspod已废弃请换成腾讯云
icon: svg:icon-tencentcloud
input:
endpoint:
title: 端点
component:
placeholder: endpoint
name: a-auto-complete
vModel: value
options:
- value: https://dnsapi.cn
label: 中国站
- value: https://api.dnspod.com
label: 国际站
rules:
- required: true
message: 该项必填
id:
title: ID
component:
placeholder: dnspod token 的 id
rules:
- required: true
message: 该项必填
token:
title: token
component:
placeholder: 开放接口token
encrypt: true
rules:
- required: true
message: 该项必填
type: builtIn
pluginType: access
scriptFilePath: ../../../plugins/plugin-tencent/index.js

View File

@ -0,0 +1,22 @@
name: dogecloud
title: 多吉云
desc: ''
icon: svg:icon-dogecloud
input:
accessKey:
title: AccessKey
component:
placeholder: AccessKey
helper: 请前往[多吉云-密钥管理](https://console.dogecloud.com/user/keys)获取
required: true
encrypt: false
secretKey:
title: SecretKey
component:
placeholder: SecretKey
helper: 请前往[多吉云-密钥管理](https://console.dogecloud.com/user/keys)获取
required: true
encrypt: true
type: builtIn
pluginType: access
scriptFilePath: ../../../plugins/plugin-doge/index.js

View File

@ -0,0 +1,21 @@
name: huawei
title: 华为云授权
desc: ''
icon: svg:icon-huawei
input:
accessKeyId:
title: accessKeyId
component:
placeholder: accessKeyId
helper: >-
证书申请需要有dns解析权限前往[我的凭证-访问密钥](https://console.huaweicloud.com/iam/?region=cn-east-3#/mine/accessKey)获取
required: true
accessKeySecret:
title: accessKeySecret
component:
placeholder: accessKeySecret
required: true
encrypt: true
type: builtIn
pluginType: access
scriptFilePath: ../../../plugins/plugin-huawei/index.js

View File

@ -0,0 +1,20 @@
name: jdcloud
title: 京东云
desc: ''
icon: svg:icon-jdcloud
input:
accessKeyId:
title: AccessKeyID
component:
placeholder: AccessKeyID
helper: '[获取密钥](https://uc.jdcloud.com/account/accesskey)'
required: true
secretAccessKey:
title: SecretAccessKey
component:
placeholder: SecretAccessKey
required: true
encrypt: true
type: builtIn
pluginType: access
scriptFilePath: ../../../plugins/plugin-jdcloud/index.js

View File

@ -0,0 +1,19 @@
name: namesilo
title: namesilo授权
desc: ''
icon: simple-icons:namesilo
input:
apiKey:
title: API Key
component:
placeholder: api key
helper: |-
前往 [获取API Key](https://www.namesilo.com/account/api-manager)
不要勾选第一项Generate key for read-only access
勾选第二项Submitting this form...
然后点击Generate按钮
required: true
encrypt: true
type: builtIn
pluginType: access
scriptFilePath: ../../../plugins/plugin-namesilo/index.js

View File

@ -0,0 +1,34 @@
name: proxmox
title: proxmox
desc: ''
icon: svg:icon-proxmox
input:
host:
title: host
component:
placeholder: IP或域名
required: true
encrypt: false
port:
title: 端口
component:
placeholder: 端口
component:
name: a-input-number
required: true
encrypt: false
username:
title: 用户名
component:
placeholder: username
required: true
encrypt: false
password:
title: 密码
component:
placeholder: password
required: true
encrypt: true
type: builtIn
pluginType: access
scriptFilePath: ../../../plugins/plugin-proxmox/index.js

View File

@ -0,0 +1,19 @@
name: upyun
title: 又拍云
desc: ''
icon: svg:icon-upyun
input:
username:
title: 账号
component:
placeholder: 又拍云账号
required: true
password:
title: 密码
component:
placeholder: 又拍云密码
required: true
encrypt: true
type: builtIn
pluginType: access
scriptFilePath: ../../../plugins/plugin-upyun/index.js

View File

@ -0,0 +1,20 @@
name: volcengine
title: 火山引擎
desc: ''
icon: svg:icon-volcengine
input:
accessKeyId:
title: AccessKeyID
component:
placeholder: AccessKeyID
helper: '[获取密钥](https://console.volcengine.com/iam/keymanage/)'
required: true
secretAccessKey:
title: SecretAccessKey
component:
placeholder: SecretAccessKey
required: true
encrypt: true
type: builtIn
pluginType: access
scriptFilePath: ../../../plugins/plugin-volcengine/index.js

View File

@ -0,0 +1,67 @@
name: west
title: 西部数码授权
desc: ''
icon: tabler:map-west
input:
scope:
title: 权限范围
component:
name: a-select
vModel: value
options:
- value: account
label: 账户级别,对所有域名都有权限管理
- value: domain
label: 域名级别,仅能管理单个域名
helper: 选择权限范围
required: true
username:
title: 账号
helper: 你的登录账号
encrypt: false
required: false
mergeScript: |2-
return {
show:ctx.compute(({form})=>{
return form.access.scope === 'account'
})
}
apikey:
title: ApiKey
component:
placeholder: 账户级别的key对整个账户都有管理权限
helper: |-
账户级别的key对整个账户都有管理权限
前往https://www.west.cn/manager/API/APIconfig.asp手动设置“api连接密码”
encrypt: true
required: false
mergeScript: |2-
return {
show:ctx.compute(({form})=>{
return form.access.scope === 'account'
})
}
apidomainkey:
title: apidomainkey
component:
placeholder: 域名级别的key仅对单个域名有权限
helper: |-
域名级别的key仅对单个域名有权限。
前往[西部数据域名管理](https://www.west.cn/manager/domain/)点击域名右上方点击ApiKey获取密钥
encrypt: true
required: false
mergeScript: |2-
return {
show:ctx.compute(({form})=>{
return form.access.scope === 'domain'
})
}
type: builtIn
pluginType: access
scriptFilePath: ../../../plugins/plugin-west/index.js

View File

@ -0,0 +1,19 @@
name: woai
title: 我爱云授权
desc: 我爱云CDN
icon: clarity:plugin-line
input:
username:
title: 账号
component:
placeholder: 我爱云的账号
required: true
password:
title: 密码
component:
placeholder: 我爱云的密码
required: true
encrypt: true
type: builtIn
pluginType: access
scriptFilePath: ../../../plugins/plugin-woai/index.js

View File

@ -0,0 +1,145 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: AliyunDeployCertToALB
title: 阿里云-部署至ALB应用负载均衡
icon: svg:icon-aliyun
group: aliyun
desc: ALB,更新监听器的默认证书
needPlus: false
input:
cert:
title: 域名证书
helper: |-
请选择证书申请任务输出的域名证书
或者选择前置任务“上传证书到阿里云”任务的证书ID可以减少上传到阿里云的证书数量
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- uploadCertToAliyun
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: Access授权
helper: 阿里云授权AccessKeyId、AccessKeySecret
component:
name: access-selector
type: aliyun
required: true
order: 0
regionId:
title: ALB所在地区
component:
name: remote-select
vModel: value
type: plugin
typeName: AliyunDeployCertToALB
action: onGetRegionList
watches:
- certDomains
- accessId
- accessId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 请选择
order: 0
loadBalancers:
title: 负载均衡列表
component:
name: remote-select
vModel: value
mode: tags
type: plugin
typeName: AliyunDeployCertToALB
action: onGetLoadBalanceList
watches:
- certDomains
- accessId
- regionId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 要部署证书的负载均衡ID
order: 0
listeners:
title: 监听器列表
component:
name: remote-select
vModel: value
mode: tags
type: plugin
typeName: AliyunDeployCertToALB
action: onGetListenerList
watches:
- certDomains
- accessId
- loadBalancers
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 要部署证书的监听器列表
order: 0
casEndpoint:
title: 证书接入点
helper: 不会选就保持默认即可
value: cas.aliyuncs.com
component:
name: a-select
options:
- value: cas.aliyuncs.com
label: 中国大陆
- value: cas.ap-southeast-1.aliyuncs.com
label: 新加坡
- value: cas.eu-central-1.aliyuncs.com
label: 德国(法兰克福)
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-aliyun/plugin/index.js

View File

@ -0,0 +1,149 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: AliyunDeployCertToFC
title: 阿里云-部署至阿里云FC(3.0)
icon: svg:icon-aliyun
group: aliyun
desc: 部署证书到阿里云函数计算FC3.0,【注意】证书的加密算法必须选择【pkcs1旧版】
needPlus: true
input:
cert:
title: 域名证书
helper: 请选择证书申请任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
regionId:
title: FC大区
value: cn-hangzhou
component:
name: a-auto-complete
vModel: value
options:
- value: cn-qingdao
label: 华北1青岛
- value: cn-beijing
label: 华北2北京
- value: cn-zhangjiakou
label: 华北 3张家口
- value: cn-huhehaote
label: 华北5呼和浩特
- value: cn-hangzhou
label: 华东1杭州
- value: cn-shanghai
label: 华东2上海
- value: cn-shenzhen
label: 华南1深圳
- value: ap-southeast-2
label: 澳大利亚(悉尼)
- value: eu-central-1
label: 德国(法兰克福)
- value: ap-southeast-3
label: 马来西亚(吉隆坡)
- value: us-east-1
label: 美国(弗吉尼亚)
- value: us-west-1
label: 美国(硅谷)
- value: ap-northeast-1
label: 日本(东京)
- value: ap-southeast-7
label: 泰国(曼谷)
- value: cn-chengdu
label: 西南1成都
- value: ap-southeast-1
label: 新加坡
- value: ap-south-1
label: 印度(孟买)
- value: ap-southeast-5
label: 印度尼西亚(雅加达)
- value: eu-west-1
label: 英国(伦敦)
- value: cn-hongkong
label: 中国香港
required: true
order: 0
accountId:
title: 阿里云账号id
helper: 阿里云主账号ID右上角头像下方获取
component:
name: a-input
vModel: value
required: true
order: 0
accessId:
title: Access授权
helper: 阿里云授权AccessKeyId、AccessKeySecret
component:
name: access-selector
type: aliyun
required: true
order: 0
fcDomains:
title: FC域名
component:
name: remote-select
vModel: value
mode: tags
type: plugin
typeName: AliyunDeployCertToFC
action: onGetDomainList
watches:
- certDomains
- accessId
- accessId
- regionId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: |-
请选择要部署证书的域名
【注意】证书的加密算法必须选择【pkcs1旧版】否则会报'private key' has to be in PEM format错误
order: 0
protocol:
title: 域名支持的协议类型
component:
name: a-select
value: ''
options:
- value: ''
label: 保持原样适用于原来已经开启了HTTPS
- value: HTTPS
label: 仅HTTPS
- value: HTTP,HTTPS
label: HTTP与HTTPS同时支持
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-aliyun/plugin/index.js

View File

@ -0,0 +1,145 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: AliyunDeployCertToNLB
title: 阿里云-部署至NLB网络负载均衡
icon: svg:icon-aliyun
group: aliyun
desc: NLB,网络负载均衡,更新监听器的默认证书
needPlus: false
input:
cert:
title: 域名证书
helper: |-
请选择证书申请任务输出的域名证书
或者选择前置任务“上传证书到阿里云”任务的证书ID可以减少上传到阿里云的证书数量
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- uploadCertToAliyun
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: Access授权
helper: 阿里云授权AccessKeyId、AccessKeySecret
component:
name: access-selector
type: aliyun
required: true
order: 0
regionId:
title: NLB所在地区
component:
name: remote-select
vModel: value
type: plugin
typeName: AliyunDeployCertToNLB
action: onGetRegionList
watches:
- certDomains
- accessId
- accessId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 请选择
order: 0
loadBalancers:
title: 负载均衡列表
component:
name: remote-select
vModel: value
mode: tags
type: plugin
typeName: AliyunDeployCertToNLB
action: onGetLoadBalanceList
watches:
- certDomains
- accessId
- regionId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 要部署证书的负载均衡ID
order: 0
listeners:
title: 监听器列表
component:
name: remote-select
vModel: value
mode: tags
type: plugin
typeName: AliyunDeployCertToNLB
action: onGetListenerList
watches:
- certDomains
- accessId
- loadBalancers
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 要部署证书的监听器列表
order: 0
casEndpoint:
title: 证书接入点
helper: 不会选就保持默认即可
value: cas.aliyuncs.com
component:
name: a-select
options:
- value: cas.aliyuncs.com
label: 中国大陆
- value: cas.ap-southeast-1.aliyuncs.com
label: 新加坡
- value: cas.eu-central-1.aliyuncs.com
label: 德国(法兰克福)
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-aliyun/plugin/index.js

View File

@ -0,0 +1,145 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: AliyunDeployCertToSLB
title: 阿里云-部署至SLB(传统负载均衡)
icon: svg:icon-aliyun
group: aliyun
desc: 部署证书到阿里云SLB(传统负载均衡)
needPlus: false
input:
cert:
title: 域名证书
helper: |-
请选择证书申请任务输出的域名证书
或者选择前置任务“上传证书到阿里云”任务的证书ID可以减少上传到阿里云的证书数量
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- uploadCertToAliyun
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: Access授权
helper: 阿里云授权AccessKeyId、AccessKeySecret
component:
name: access-selector
type: aliyun
required: true
order: 0
regionId:
title: LB所在地区
component:
name: remote-select
vModel: value
type: plugin
typeName: AliyunDeployCertToSLB
action: onGetRegionList
watches:
- certDomains
- accessId
- accessId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 请选择
order: 0
loadBalancers:
title: 负载均衡列表
component:
name: remote-select
vModel: value
mode: tags
type: plugin
typeName: AliyunDeployCertToSLB
action: onGetLoadBalanceList
watches:
- certDomains
- accessId
- regionId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 要部署证书的负载均衡ID
order: 0
listeners:
title: 监听器列表
component:
name: remote-select
vModel: value
mode: tags
type: plugin
typeName: AliyunDeployCertToSLB
action: onGetListenerList
watches:
- certDomains
- accessId
- loadBalancers
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 要部署证书的监听器列表
order: 0
casEndpoint:
title: 证书接入点
helper: 不会选就保持默认即可
value: cas.aliyuncs.com
component:
name: a-select
options:
- value: cas.aliyuncs.com
label: 中国大陆
- value: cas.ap-southeast-1.aliyuncs.com
label: 新加坡
- value: cas.eu-central-1.aliyuncs.com
label: 德国(法兰克福)
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-aliyun/plugin/index.js

View File

@ -0,0 +1,108 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: AliyunDeployCertToWaf
title: 阿里云-部署至阿里云WAF
icon: svg:icon-aliyun
group: aliyun
desc: 部署证书到阿里云WAF
needPlus: true
input:
cert:
title: 域名证书
helper: |-
请选择证书申请任务输出的域名证书
或者选择前置任务“上传证书到阿里云”任务的证书ID可以减少上传到阿里云的证书数量
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- uploadCertToAliyun
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
regionId:
title: WAF接入点
helper: 不会选就按默认
value: cn-hangzhou
component:
name: a-select
options:
- value: cn-hangzhou
label: 中国大陆-华东1(杭州)
- value: ap-southeast-1
label: 新加坡
required: true
order: 0
casEndpoint:
title: 证书接入点
helper: 跟上面保持一致即可
value: cas.aliyuncs.com
component:
name: a-select
options:
- value: cas.aliyuncs.com
label: 中国大陆
- value: cas.ap-southeast-1.aliyuncs.com
label: 新加坡
- value: cas.eu-central-1.aliyuncs.com
label: 德国(法兰克福)
required: true
order: 0
accessId:
title: Access授权
helper: 阿里云授权AccessKeyId、AccessKeySecret
component:
name: access-selector
type: aliyun
required: true
order: 0
cnameDomains:
title: CNAME站点
component:
name: remote-select
vModel: value
mode: tags
type: plugin
typeName: AliyunDeployCertToWaf
action: onGetCnameList
watches:
- certDomains
- accessId
- accessId
- regionId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 请选择要部署证书的CNAME站点
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-aliyun/plugin/index.js

View File

@ -0,0 +1,144 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: AwsDeployToCloudFront
title: AWS-部署证书到CloudFront
desc: 部署证书到 AWS CloudFront
icon: svg:icon-aws
group: aws
needPlus: true
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- AwsUploadToACM
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
region:
title: 区域
helper: 证书上传区域
component:
name: a-auto-complete
vModel: value
options:
- label: us-east-1
value: us-east-1
- label: us-east-2
value: us-east-2
- label: us-west-1
value: us-west-1
- label: us-west-2
value: us-west-2
- label: af-south-1
value: af-south-1
- label: ap-east-1
value: ap-east-1
- label: ap-northeast-1
value: ap-northeast-1
- label: ap-northeast-2
value: ap-northeast-2
- label: ap-northeast-3
value: ap-northeast-3
- label: ap-south-1
value: ap-south-1
- label: ap-south-2
value: ap-south-2
- label: ap-southeast-1
value: ap-southeast-1
- label: ap-southeast-2
value: ap-southeast-2
- label: ap-southeast-3
value: ap-southeast-3
- label: ap-southeast-4
value: ap-southeast-4
- label: ap-southeast-5
value: ap-southeast-5
- label: ca-central-1
value: ca-central-1
- label: ca-west-1
value: ca-west-1
- label: eu-central-1
value: eu-central-1
- label: eu-central-2
value: eu-central-2
- label: eu-north-1
value: eu-north-1
- label: eu-south-1
value: eu-south-1
- label: eu-south-2
value: eu-south-2
- label: eu-west-1
value: eu-west-1
- label: eu-west-2
value: eu-west-2
- label: eu-west-3
value: eu-west-3
- label: il-central-1
value: il-central-1
- label: me-central-1
value: me-central-1
- label: me-south-1
value: me-south-1
- label: sa-east-1
value: sa-east-1
required: true
order: 0
accessId:
title: Access授权
helper: aws的授权
component:
name: access-selector
type: aws
required: true
order: 0
distributionIds:
title: 分配ID
component:
name: remote-select
vModel: value
mode: tags
type: plugin
action: onGetDistributions
watches:
- certDomains
- accessId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 请选择distributions id
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-aws/plugins/plugin-deploy-to-cloudfront.js

View File

@ -0,0 +1,104 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: AwsUploadToACM
title: AWS-上传证书到ACM
desc: 上传证书 AWS ACM
icon: svg:icon-aws
group: aws
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
accessId:
title: Access授权
helper: aws的授权
component:
name: access-selector
type: aws
required: true
order: 0
region:
title: 区域
helper: 证书上传区域
component:
name: a-auto-complete
vModel: value
options:
- label: us-east-1
value: us-east-1
- label: us-east-2
value: us-east-2
- label: us-west-1
value: us-west-1
- label: us-west-2
value: us-west-2
- label: af-south-1
value: af-south-1
- label: ap-east-1
value: ap-east-1
- label: ap-northeast-1
value: ap-northeast-1
- label: ap-northeast-2
value: ap-northeast-2
- label: ap-northeast-3
value: ap-northeast-3
- label: ap-south-1
value: ap-south-1
- label: ap-south-2
value: ap-south-2
- label: ap-southeast-1
value: ap-southeast-1
- label: ap-southeast-2
value: ap-southeast-2
- label: ap-southeast-3
value: ap-southeast-3
- label: ap-southeast-4
value: ap-southeast-4
- label: ap-southeast-5
value: ap-southeast-5
- label: ca-central-1
value: ca-central-1
- label: ca-west-1
value: ca-west-1
- label: eu-central-1
value: eu-central-1
- label: eu-central-2
value: eu-central-2
- label: eu-north-1
value: eu-north-1
- label: eu-south-1
value: eu-south-1
- label: eu-south-2
value: eu-south-2
- label: eu-west-1
value: eu-west-1
- label: eu-west-2
value: eu-west-2
- label: eu-west-3
value: eu-west-3
- label: il-central-1
value: il-central-1
- label: me-central-1
value: me-central-1
- label: me-south-1
value: me-south-1
- label: sa-east-1
value: sa-east-1
required: true
order: 0
output:
awsCertARN:
title: 证书ARN
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-aws/plugins/plugin-upload-to-acm.js

View File

@ -0,0 +1,33 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: CacheFly
title: CacheFly-部署证书到CacheFly
desc: 部署证书到 CacheFly
icon: clarity:plugin-line
group: cdn
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
accessId:
title: Access授权
helper: CacheFly 的授权
component:
name: access-selector
type: CacheFly
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-cachefly/plugins/plugin-deploy-to-cdn.js

View File

@ -0,0 +1,169 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: CopyToLocal
title: 主机-复制到本机
icon: solar:copy-bold-duotone
desc: 【仅管理员使用】实际上是复制证书到docker容器内的某个路径需要做目录映射到宿主机
group: host
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
certType:
title: 证书类型
helper: 要部署的证书格式支持pem、pfx、der、jks格式
component:
name: a-select
options:
- value: pem
label: pem(crt)用于Nginx等大部分应用
- value: pfx
label: pfx一般用于IIS
- value: der
label: der一般用于Apache
- value: jks
label: jks一般用于JAVA应用
required: true
order: 0
crtPath:
title: 证书保存路径
helper: |-
全链证书,路径要包含文件名
推荐使用相对路径将写入与数据库同级目录无需映射例如tmp/cert.pem
component:
placeholder: tmp/full_chain.pem
mergeScript: |2-
return {
show: ctx.compute(({form})=>{
return form.certType === 'pem';
})
}
required: true
rules:
- type: filepath
order: 0
keyPath:
title: 私钥保存路径
helper: |-
路径要包含文件名
推荐使用相对路径将写入与数据库同级目录无需映射例如tmp/cert.key
component:
placeholder: tmp/cert.key
mergeScript: |2-
return {
show: ctx.compute(({form})=>{
return form.certType === 'pem';
})
}
required: true
rules:
- type: filepath
order: 0
icPath:
title: 中间证书保存路径
helper: 路径要包含文件名,一般情况传上面两个文件就行了,极少数情况需要这个中间证书
component:
placeholder: /root/deploy/nginx/intermediate.pem
mergeScript: |2-
return {
show: ctx.compute(({form})=>{
return form.certType === 'pem';
})
}
rules:
- type: filepath
order: 0
pfxPath:
title: PFX证书保存路径
helper: |-
用于IIS证书部署路径要包含文件名
推荐使用相对路径将写入与数据库同级目录无需映射例如tmp/cert.pfx
component:
placeholder: tmp/cert.pfx
mergeScript: |2-
return {
show: ctx.compute(({form})=>{
return form.certType === 'pfx';
})
}
required: true
rules:
- type: filepath
order: 0
derPath:
title: DER证书保存路径
helper: |-
用于Apache证书部署路径要包含文件名
推荐使用相对路径将写入与数据库同级目录无需映射例如tmp/cert.der
.der和.cer是相同的东西改个后缀名即可
component:
placeholder: tmp/cert.der 或 tmp/cert.cer
mergeScript: |2-
return {
show: ctx.compute(({form})=>{
return form.certType === 'der';
})
}
required: true
rules:
- type: filepath
order: 0
jksPath:
title: jks证书保存路径
helper: 用于java路径要包含文件名例如tmp/cert.jks
component:
placeholder: tmp/cert.jks
mergeScript: |2-
return {
show: ctx.compute(({form})=>{
return form.certType === 'jks';
})
}
required: true
rules:
- type: filepath
order: 0
output:
hostCrtPath:
title: 证书保存路径
type: HostCrtPath
hostKeyPath:
title: 私钥保存路径
type: HostKeyPath
hostIcPath:
title: 中间证书保存路径
type: HostKeyPath
hostPfxPath:
title: PFX保存路径
type: HostPfxPath
hostDerPath:
title: DER保存路径
type: HostDerPath
hostJksPath:
title: jks保存路径
type: HostJksPath
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-host/plugin/copy-to-local/index.js

View File

@ -0,0 +1,35 @@
showRunStrategy: true
default:
strategy:
runStrategy: 1
name: CustomScript
title: 自定义js脚本
icon: ri:javascript-line
desc: 【仅管理员】运行自定义js脚本执行
group: other
input:
script:
title: 脚本
helper: 自定义js脚本[脚本编写帮助文档](https://certd.docmirror.cn/guide/use/custom-script/)
component:
name: a-textarea
vModel: value
rows: 10
style: 'background-color: #000c17;color: #fafafa;'
required: true
order: 0
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: false
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-other/plugins/plugin-script.js

View File

@ -0,0 +1,127 @@
showRunStrategy: true
default:
strategy:
runStrategy: 0
name: DBBackupPlugin
title: 数据库备份
icon: lucide:database-backup
desc: 仅支持备份SQLite数据库
group: other
needPlus: true
input:
backupMode:
title: 备份方式
value: local
component:
name: a-select
options:
- label: 本地复制
value: local
- label: ssh上传
value: ssh
- label: oss上传
value: oss
placeholder: ''
helper: 支持本地复制、ssh上传
required: true
order: 0
sshAccessId:
title: 主机登录授权
component:
name: access-selector
type: ssh
mergeScript: |2-
return {
show:ctx.compute(({form})=>{
return form.backupMode === 'ssh';
})
}
required: true
order: 0
ossType:
title: OSS类型
component:
name: a-select
options:
- value: alioss
label: 阿里云OSS
- value: s3
label: MinIO/S3
- value: qiniuoss
label: 七牛云
- value: tencentcos
label: 腾讯云COS
- value: ftp
label: Ftp
- value: sftp
label: Sftp
mergeScript: |2-
return {
show:ctx.compute(({form})=>{
return form.backupMode === 'oss';
})
}
required: true
order: 0
ossAccessId:
title: OSS授权
component:
name: access-selector
mergeScript: |2-
return {
show:ctx.compute(({form})=>{
return form.backupMode === 'oss';
}),
component:{
type: ctx.compute(({form})=>{
return form.ossType;
}),
}
}
required: true
order: 0
backupDir:
title: 备份保存目录
component:
name: a-input
type: value
placeholder: 默认certd_backup
helper: ssh方式默认保存在当前用户的certd_backup目录下本地方式默认保存在data/certd_backup目录下也可以填写绝对路径
required: false
order: 0
filePrefix:
title: 备份文件前缀
component:
name: a-input
vModel: value
placeholder: 默认db_backup
required: false
order: 0
withUpload:
title: 附加上传文件
value: true
component:
name: a-switch
vModel: checked
placeholder: 是否备份上传的头像等文件
required: false
order: 0
retainDays:
title: 删除过期备份
component:
name: a-input-number
vModel: value
placeholder: '20'
helper: 删除多少天前的备份,不填则不删除windows暂不支持
required: false
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-other/plugins/plugin-db-backup.js

View File

@ -0,0 +1,124 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: DemoTest
title: Demo-测试插件
icon: clarity:plugin-line
group: other
input:
text:
title: 属性示例
value: 默认值
component:
name: a-input
vModel: value
helper: 帮助说明,[链接](https://certd.docmirror.cn)
required: false
order: 0
select:
title: 选择框
component:
name: a-auto-complete
vModel: value
options:
- value: show
label: 动态显
- value: hide
label: 动态隐
order: 0
showText:
title: 动态显隐
helper: 我会根据选择框的值进行显隐
show: true
mergeScript: |2-
return {
show: ctx.compute(({form})=>{
return form.select === 'show';
})
}
order: 0
multiSelect:
title: 多选框
component:
name: a-select
vModel: value
mode: tags
multiple: true
options:
- value: '1'
label: 选项1
- value: '2'
label: 选项2
order: 0
switch:
title: switch
component:
name: a-switch
vModel: checked
order: 0
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: demo授权
helper: demoAccess授权
component:
name: access-selector
type: demo
order: 0
siteName:
title: 从后端获取选项
component:
name: remote-select
vModel: value
mode: tags
type: plugin
action: onGetSiteList
watches:
- certDomains
- accessId
- certDomains
- accessId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 选择时可以从后端获取选项
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-demo/plugins/plugin-test.js

View File

@ -0,0 +1,109 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: DeployCertToAliyunCDN
title: 阿里云-部署证书至CDN
icon: svg:icon-aliyun
group: aliyun
desc: 自动部署域名证书至阿里云CDN
input:
endpoint:
title: 证书服务接入点
helper: 不会选就按默认
value: cas.aliyuncs.com
component:
name: a-select
options:
- value: cas.aliyuncs.com
label: 中国大陆
- value: cas.ap-southeast-1.aliyuncs.com
label: 新加坡
- value: cas.eu-central-1.aliyuncs.com
label: 德国(法兰克福)
required: true
order: 0
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- uploadCertToAliyun
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: Access授权
helper: 阿里云授权AccessKeyId、AccessKeySecret
component:
name: access-selector
type: aliyun
required: true
order: 0
domainName:
title: CDN加速域名
component:
name: remote-select
vModel: value
mode: tags
type: plugin
typeName: DeployCertToAliyunCDN
action: onGetDomainList
watches:
- certDomains
- accessId
- certDomains
- accessId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 你在阿里云上配置的CDN加速域名比如:certd.docmirror.cn
order: 0
certRegion:
title: 证书所在地域
helper: cn-hangzhou和ap-southeast-1默认cn-hangzhou。国际站用户建议使用ap-southeast-1。
value: cn-hangzhou
component:
name: a-select
options:
- value: cn-hangzhou
label: 中国大陆
- value: ap-southeast-1
label: 新加坡
required: true
order: 0
certName:
title: 证书名称
helper: 上传后将以此名称作为前缀备注
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-aliyun/plugin/index.js

View File

@ -0,0 +1,59 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: DeployCertToAliyunDCDN
title: 阿里云-部署证书至DCDN
icon: svg:icon-aliyun
group: aliyun
desc: 依赖证书申请前置任务自动部署域名证书至阿里云DCDN
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- uploadCertToAliyun
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: Access授权
helper: 阿里云授权AccessKeyId、AccessKeySecret
component:
name: access-selector
type: aliyun
required: true
order: 0
domainName:
title: DCDN加速域名
helper: 你在阿里云上配置的CDN加速域名比如:certd.docmirror.cn
required: true
order: 0
certName:
title: 证书名称
helper: 上传后将以此名称作为前缀备注
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-aliyun/plugin/index.js

View File

@ -0,0 +1,113 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: DeployCertToAliyunOSS
title: 阿里云-部署证书至OSS
icon: svg:icon-aliyun
group: aliyun
desc: 自动部署域名证书至阿里云OSS
input:
region:
title: 大区
component:
name: a-auto-complete
vModel: value
options:
- value: oss-cn-hangzhou
label: 华东1杭州
- value: oss-cn-shanghai
label: 华东2上海
- value: oss-cn-nanjing
label: 华东5南京-本地地域)
- value: oss-cn-fuzhou
label: 华东6福州-本地地域)
- value: oss-cn-wuhan-lr
label: 华中1武汉-本地地域)
- value: oss-cn-qingdao
label: 华北1青岛
- value: oss-cn-beijing
label: 华北2北京
- value: oss-cn-zhangjiakou
label: 华北 3张家口
- value: oss-cn-huhehaote
label: 华北5呼和浩特
- value: oss-cn-wulanchabu
label: 华北6乌兰察布
- value: oss-cn-shenzhen
label: 华南1深圳
- value: oss-cn-heyuan
label: 华南2河源
- value: oss-cn-guangzhou
label: 华南3广州
- value: oss-cn-chengdu
label: 西南1成都
- value: oss-cn-hongkong
label: 中国香港
- value: oss-us-west-1
label: 美国(硅谷)①
- value: oss-us-east-1
label: 美国(弗吉尼亚)①
- value: oss-ap-northeast-1
label: 日本(东京)①
- value: oss-ap-northeast-2
label: 韩国(首尔)
- value: oss-ap-southeast-1
label: 新加坡①
- value: oss-ap-southeast-2
label: 澳大利亚(悉尼)①
- value: oss-ap-southeast-3
label: 马来西亚(吉隆坡)①
- value: oss-ap-southeast-5
label: 印度尼西亚(雅加达)①
- value: oss-ap-southeast-6
label: 菲律宾(马尼拉)
- value: oss-ap-southeast-7
label: 泰国(曼谷)
- value: oss-eu-central-1
label: 德国(法兰克福)①
- value: oss-eu-west-1
label: 英国(伦敦)
- value: oss-me-east-1
label: 阿联酋(迪拜)①
- value: oss-rg-china-mainland
label: 无地域属性(中国内地)
required: true
order: 0
bucket:
title: Bucket
helper: 存储桶名称
required: true
order: 0
domainName:
title: 绑定的域名
helper: 你在阿里云OSS上绑定的域名比如:certd.docmirror.cn
required: true
order: 0
certName:
title: 证书名称
helper: 上传后将以此名称作为前缀备注
order: 0
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
accessId:
title: Access授权
helper: 阿里云授权AccessKeyId、AccessKeySecret
component:
name: access-selector
type: aliyun
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-aliyun/plugin/index.js

View File

@ -0,0 +1,90 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: DeployCertToTencentAll
title: 腾讯云-部署证书到任意云资源
needPlus: false
icon: svg:icon-tencentcloud
group: tencent
desc: 支持负载均衡、CDN、DDoS、直播、点播、Web应用防火墙、API网关、TEO、容器服务、对象存储、轻应用服务器、云原生微服务、云开发
input:
accessId:
title: Access授权
helper: access授权
component:
name: access-selector
type: tencent
required: true
order: 0
tencentCertId:
title: 证书
helper: 请选择"证书申请任务"或“上传证书到腾讯云”前置任务的输出
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- UploadCertToTencent
required: true
order: 0
resourceType:
title: 资源类型
component:
name: a-select
vModel: value
allowClear: true
options:
- value: clb
label: 负载均衡
- value: cdn
label: CDN
- value: ddos
label: DDoS
- value: live
label: 直播
- value: vod
label: 点播
- value: waf
label: Web应用防火墙
- value: apigateway
label: API网关
- value: teo
label: TEO
- value: tke
label: 容器服务
- value: cos
label: 对象存储
- value: lighthouse
label: 轻应用服务器
- value: tse
label: 云原生微服务
- value: tcb
label: 云开发
helper: ''
required: true
order: 0
region:
title: Region
component:
name: a-input
vModel: value
allowClear: true
helper: >-
当云资源类型传入clb、waf、apigateway、cos、lighthouse、tke、tse、tcb
公共参数Region必传。[参考文档](https://cloud.tencent.com/document/product/400/91667)
order: 0
instanceIdList:
title: 云资源实例Id列表
component:
name: a-select
vModel: value
open: false
mode: tags
helper: '[参考文档](https://cloud.tencent.com/document/product/400/91667)'
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-tencent/plugin/index.js

View File

@ -0,0 +1,43 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: DeployCertToTencentCDN
title: 腾讯云-部署到CDN废弃
icon: svg:icon-tencentcloud
group: tencent
desc: 已废弃请使用v2版
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
accessId:
title: Access提供者
helper: access 授权
component:
name: access-selector
type: tencent
required: true
order: 0
certName:
title: 证书名称
helper: 证书上传后将以此参数作为名称前缀
order: 0
domainName:
title: cdn加速域名
rules:
- required: true
message: 该项必填
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-tencent/plugin/index.js

View File

@ -0,0 +1,82 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: DeployCertToTencentCLB
title: 腾讯云-部署到CLB
icon: svg:icon-tencentcloud
group: tencent
desc: 暂时只支持单向认证证书,暂时只支持通用负载均衡
input:
region:
title: 大区
component:
name: a-auto-complete
vModel: value
options:
- value: ap-guangzhou
- value: ap-beijing
- value: ap-chengdu
- value: ap-chongqing
- value: ap-hongkong
- value: ap-jakarta
- value: ap-mumbai
- value: ap-nanjing
- value: ap-seoul
- value: ap-shanghai
- value: ap-shanghai-fsi
- value: ap-shenzhen-fsi
- value: ap-singapore
- value: ap-tokyo
- value: eu-frankfurt
- value: na-ashburn
- value: na-siliconvalley
- value: na-toronto
- value: sa-saopaulo
required: true
order: 0
certName:
title: 证书名称前缀
order: 0
loadBalancerId:
title: 负载均衡ID
helper: 如果没有配置则根据域名匹配负载均衡下的监听器根据域名匹配时暂时只支持前100个
required: true
order: 0
listenerId:
title: 监听器ID
required: true
order: 0
domain:
title: 域名
required: false
component:
name: a-select
vModel: value
open: false
mode: tags
helper: 如果开启了sni则此项必须填写未开启则不要填写
order: 0
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
accessId:
title: Access提供者
helper: access授权
component:
name: access-selector
type: tencent
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-tencent/plugin/index.js

View File

@ -0,0 +1,122 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: DeployCertToTencentCosPlugin
title: 腾讯云-部署证书到COS
needPlus: false
icon: svg:icon-tencentcloud
group: tencent
desc: 部署到腾讯云COS源站域名证书【注意很不稳定需要重试很多次偶尔才能成功一次】
input:
accessId:
title: Access授权
helper: access授权
component:
name: access-selector
type: tencent
required: true
order: 0
bucket:
title: 存储桶名称
helper: 请输入存储桶名称
order: 0
region:
title: 所在地域
helper: 存储桶所在地域
component:
name: a-auto-complete
vModel: value
options:
- value: ''
label: '--------中国大陆地区-------'
disabled: true
- value: ap-beijing-1
label: 北京1区
- value: ap-beijing
label: 北京
- value: ap-nanjing
label: 南京
- value: ap-shanghai
label: 上海
- value: ap-guangzhou
label: 广州
- value: ap-chengdu
label: 成都
- value: ap-chongqing
label: 重庆
- value: ap-shenzhen-fsi
label: 深圳金融
- value: ap-shanghai-fsi
label: 上海金融
- value: ap-beijing-fsi
label: 北京金融
- value: ''
label: '--------中国香港及境外-------'
disabled: true
- value: ap-hongkong
label: 中国香港
- value: ap-singapore
label: 新加坡
- value: ap-mumbai
label: 孟买
- value: ap-jakarta
label: 雅加达
- value: ap-seoul
label: 首尔
- value: ap-bangkok
label: 曼谷
- value: ap-tokyo
label: 东京
- value: na-siliconvalley
label: 硅谷
- value: na-ashburn
label: 弗吉尼亚
- value: sa-saopaulo
label: 圣保罗
- value: eu-frankfurt
label: 法兰克福
order: 0
domains:
title: COS域名
component:
name: remote-select
vModel: value
mode: tags
type: plugin
typeName: DeployCertToTencentCosPlugin
action: onGetDomainList
watches:
- certDomains
- accessId
- bucket
- region
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 请选择域名
order: 0
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书或者选择前置任务“上传证书到腾讯云”任务的证书ID
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- UploadCertToTencent
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-tencent/plugin/index.js

View File

@ -0,0 +1,51 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: DeployCertToTencentEO
title: 腾讯云-部署到腾讯云EO
icon: svg:icon-tencentcloud
desc: 腾讯云边缘安全加速平台EO必须配置上传证书到腾讯云任务
group: tencent
input:
certId:
title: 已上传证书ID
helper: 请选择前置任务上传到腾讯云的证书
component:
name: output-selector
from: UploadCertToTencent
required: true
order: 0
accessId:
title: Access提供者
helper: access 授权
component:
name: access-selector
type: tencent
required: true
order: 0
zoneId:
title: 站点ID
helper: 类似于zone-xxxx的字符串在站点概览页面左上角或者站点列表页面站点名称下方
required: true
order: 0
certName:
title: 证书名称
helper: 证书上传后将以此参数作为名称前缀
order: 0
domainNames:
title: cdn加速域名
component:
name: a-select
vModel: value
mode: tags
open: false
helper: 支持多个域名
rules:
- required: true
message: 该项必填
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-tencent/plugin/index.js

View File

@ -0,0 +1,96 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: DeployCertToTencentTKEIngress
title: 腾讯云-部署到TKE-ingress
needPlus: true
icon: svg:icon-tencentcloud
group: tencent
desc: serverless集群请使用K8S部署插件Qcloud类型需要【上传到腾讯云】作为前置任务ApiServer未开启外网访问则需要做域名的内网IP映射
input:
region:
title: 大区
value: ap-guangzhou
required: true
order: 0
clusterId:
title: 集群ID
required: true
desc: 例如cls-6lbj1vee
request: true
order: 0
namespace:
title: 集群namespace
value: default
required: true
order: 0
secretName:
title: 证书的secret名称
required: true
order: 0
ingressName:
title: ingress名称
required: true
order: 0
ingressClass:
title: ingress类型
component:
name: a-auto-complete
vModel: value
options:
- value: qcloud
- value: nginx
helper: 可选 qcloud / nginx
order: 0
clusterDomain:
title: 集群域名
helper: 可不填,默认为:[clusterId].ccs.tencent-cloud.com
order: 0
accessId:
title: Access授权
helper: access授权
component:
name: access-selector
type: tencent
required: true
order: 0
tencentCertId:
title: 腾讯云证书id
helper: 请选择“上传证书到腾讯云”前置任务的输出
component:
name: output-selector
from: UploadCertToTencent
mergeScript: |2-
return {
show: ctx.compute(({form})=>{
return form.ingressClass === "qcloud"
})
}
required: true
order: 0
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
mergeScript: |2-
return {
show: ctx.compute(({form})=>{
return form.ingressClass === "nginx"
})
}
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-tencent/plugin/index.js

View File

@ -0,0 +1,47 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: DogeCloudDeployToCDN
title: 多吉云-部署到多吉云CDN
icon: svg:icon-dogecloud
group: cdn
input:
domain:
title: 域名
helper: CDN域名
required: true
order: 0
cert:
title: 证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
accessId:
title: 多吉云授权
helper: 多吉云AccessKey
component:
name: access-selector
type: dogecloud
rules:
- required: true
message: 此项必填
order: 0
ignoreDeployNullCode:
title: 忽略部署接口报错
helper: 当该域名部署后报错,但是实际上已经部署成功时,可以勾选
value: false
component:
name: a-switch
type: checked
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-doge/plugins/index.js

View File

@ -0,0 +1,40 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: Gcoreflush
title: Gcore-刷新Gcore证书
desc: 刷新现有的证书
icon: clarity:plugin-line
group: cdn
input:
certName:
title: 证书名称
helper: 可以修改也可以和现在的保留一致
order: 0
ssl_id:
title: 证书ID
order: 0
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
accessId:
title: Access授权
helper: Gcore
component:
name: access-selector
type: Gcore
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-gcore/plugins/plugin-flush.js

View File

@ -0,0 +1,37 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: Gcoreupload
title: Gcore-部署证书到Gcore
desc: 仅上传 并不会部署到cdn
icon: clarity:plugin-line
group: cdn
input:
certName:
title: 证书名称
helper: 作为备注
order: 0
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
accessId:
title: Access授权
helper: Gcore
component:
name: access-selector
type: Gcore
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-gcore/plugins/plugin-upload.js

View File

@ -0,0 +1,78 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: HauweiDeployCertToCDN
title: 华为云-部署证书至CDN
icon: svg:icon-huawei
group: huawei
desc: ''
input:
cert:
title: 域名证书
helper: >-
请选择前置任务输出的域名证书
如果你选择使用ccm证书ID则需要在[域名管理页面右上角开启SCM授权](https://console.huaweicloud.com/cdn/#/cdn/domain)
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- HauweiUploadToCCM
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: Access授权
helper: 华为云授权AccessKeyId、AccessKeySecret
component:
name: access-selector
type: huawei
required: true
order: 0
domains:
title: CDN域名
component:
name: remote-select
vModel: value
mode: tags
type: plugin
typeName: HauweiDeployCertToCDN
action: onGetDomainList
watches:
- certDomains
- accessId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 请选择域名或输入域名
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-huawei/plugins/deploy-to-cdn/index.js

View File

@ -0,0 +1,51 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: HauweiUploadToCCM
title: 华为云-上传证书至CCM
icon: svg:icon-huawei
group: huawei
desc: 上传证书到华为云CCM
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: Access授权
helper: 华为云授权AccessKeyId、AccessKeySecret
component:
name: access-selector
type: huawei
required: true
order: 0
output:
huaweiCertId:
title: 华为云CertId
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-huawei/plugins/upload-to-ccm/index.js

View File

@ -0,0 +1,76 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: JDCloudDeployToCDN
title: 京东云-部署证书至CDN
icon: svg:icon-jdcloud
group: jdcloud
desc: 京东云内容分发网络
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- JDCloudUploadCert
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: Access授权
helper: 京东云AccessKeyId、AccessKeySecret
component:
name: access-selector
type: jdcloud
required: true
order: 0
domainName:
title: CDN加速域名
component:
name: remote-select
vModel: value
mode: tags
type: plugin
action: onGetDomainList
watches:
- certDomains
- accessId
- certDomains
- accessId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 你在京东云上配置的CDN加速域名比如:certd.docmirror.cn
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-jdcloud/plugins/plugin-deploy-to-cdn.js

View File

@ -0,0 +1,76 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: JDCloudUpdateCert
title: 京东云-更新已有证书
icon: svg:icon-jdcloud
group: jdcloud
desc: 更新SSL数字证书中的证书
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- JDCloudUploadCert
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: Access授权
helper: 京东云AccessKeyId、AccessKeySecret
component:
name: access-selector
type: jdcloud
required: true
order: 0
certIds:
title: 要更新的证书id
component:
name: remote-select
vModel: value
mode: tags
type: plugin
action: onGetCertList
watches:
- certDomains
- accessId
- certDomains
- accessId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 您在京东云上已有的证书Id
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-jdcloud/plugins/plugin-update-cert.js

View File

@ -0,0 +1,41 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: JDCloudUploadCert
title: 京东云-上传新证书
icon: svg:icon-jdcloud
group: jdcloud
desc: 上传证书到SSL数字证书中心
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- JDCloudUploadCert
required: true
order: 0
accessId:
title: Access授权
helper: 京东云AccessKeyId、AccessKeySecret
component:
name: access-selector
type: jdcloud
required: true
order: 0
certName:
title: 证书名称前缀
helper: 证书形成默认为certd
required: false
order: 0
output:
jdcloudCertId:
title: 上传成功后的京东云CertId
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-jdcloud/plugins/plugin-upload-cert.js

View File

@ -0,0 +1,57 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: ProxmoxUploadCert
title: Proxmox-上传证书到Proxmox
icon: svg:icon-proxmox
group: panel
needPlus: true
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
order: 0
accessId:
title: Proxmox授权
component:
name: access-selector
type: proxmox
required: true
order: 0
nodes:
title: 节点
component:
name: remote-select
vModel: value
mode: tags
type: plugin
typeName: ProxmoxUploadCert
action: onGetNodeList
watches:
- certDomains
- accessId
- accessId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 要部署证书的节点
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-proxmox/plugins/plugin-upload.js

View File

@ -0,0 +1,39 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: QiniuCertUpload
title: 七牛云-上传证书到七牛云
icon: svg:icon-qiniuyun
group: qiniu
desc: 上传到七牛云
input:
certName:
title: 证书名称
helper: 上传后将以此名称作为前缀备注
order: 0
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
accessId:
title: Access授权
helper: 七牛云授权
component:
name: access-selector
type: qiniu
required: true
order: 0
output:
qiniuCertId:
title: 上传成功后的七牛云CertId
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-qiniu/plugin/upload-cert/index.js

View File

@ -0,0 +1,77 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: QiniuDeployCertToCDN
title: 七牛云-部署证书至CDN
icon: svg:icon-qiniuyun
group: qiniu
desc: 自动部署域名证书至七牛云CDN
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书或者上传到七牛云的证书id
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- QiniuCertUpload
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: Access授权
helper: 七牛云授权
component:
name: access-selector
type: qiniu
required: true
order: 0
domainName:
title: CDN加速域名
component:
name: remote-select
vModel: value
mode: tags
type: plugin
action: onGetDomainList
watches:
- certDomains
- accessId
rules:
- type: domains
allowDotStart: true
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 你在七牛云上配置的CDN加速域名比如:certd.handsfree.work
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-qiniu/plugin/index.js

View File

@ -0,0 +1,34 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: QnapDeploy
title: 威联通-部署证书到威联通
icon: svg:icon-qnap
group: panel
desc: 部署证书到qnap
needPlus: true
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
accessId:
title: ssh登录授权
helper: ssh登录授权
component:
name: access-selector
type: ssh
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-qnap/plugins/plugin-qnap.js

View File

@ -0,0 +1,14 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: RestartCertd
title: 重启 Certd
icon: mdi:restart
desc: 【仅管理员可用】 重启 certd的https服务用于更新 Certd 的 ssl 证书
group: other
input: {}
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-other/plugins/plugin-restart.js

View File

@ -0,0 +1,135 @@
showRunStrategy: false
default:
strategy:
runStrategy: 0
name: TencentActionInstancesPlugin
title: 腾讯云-实例开关机
icon: svg:icon-tencentcloud
group: tencent
desc: 腾讯云实例开关机
needPlus: false
input:
accessId:
title: Access提供者
helper: access 授权
component:
name: access-selector
type: tencent
required: true
order: 0
region:
title: 所在地域
helper: 实例所在地域
component:
name: a-auto-complete
vModel: value
options:
- value: ''
label: '--------中国大陆地区-------'
disabled: true
- value: ap-beijing-1
label: 北京1区
- value: ap-beijing
label: 北京
- value: ap-nanjing
label: 南京
- value: ap-shanghai
label: 上海
- value: ap-guangzhou
label: 广州
- value: ap-chengdu
label: 成都
- value: ap-chongqing
label: 重庆
- value: ap-shenzhen-fsi
label: 深圳金融
- value: ap-shanghai-fsi
label: 上海金融
- value: ap-beijing-fsi
label: 北京金融
- value: ''
label: '--------中国香港及境外-------'
disabled: true
- value: ap-hongkong
label: 中国香港
- value: ap-singapore
label: 新加坡
- value: ap-mumbai
label: 孟买
- value: ap-jakarta
label: 雅加达
- value: ap-seoul
label: 首尔
- value: ap-bangkok
label: 曼谷
- value: ap-tokyo
label: 东京
- value: na-siliconvalley
label: 硅谷
- value: na-ashburn
label: 弗吉尼亚
- value: sa-saopaulo
label: 圣保罗
- value: eu-frankfurt
label: 法兰克福
required: true
order: 0
instanceId:
title: 实列ID
component:
name: remote-select
vModel: value
mode: tags
type: plugin
typeName: TencentStartInstancesPlugin
action: onGetInstanceList
watches:
- certDomains
- accessId
- region
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 请选择实列
order: 0
action:
title: 操作
component:
name: a-radio-group
vModel: value
options:
- value: start
label: 开机
- value: stop
label: 关机
required: true
order: 0
charging:
title: 实例关机不收费
value: true
component:
name: a-switch
vModel: checked
placeholder: 按量计费实例关机不收费
required: false
mergeScript: |2-
return {
show: ctx.compute(({form})=>{
return form.action === 'stop';
})
}
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-tencent/plugin/start-instances/index.js

View File

@ -0,0 +1,61 @@
showRunStrategy: false
default:
strategy:
runStrategy: 0
name: TencentDeleteExpiringCert
title: 腾讯云-删除即将过期证书
icon: svg:icon-tencentcloud
group: tencent
desc: 仅删除未使用的证书
needPlus: true
input:
accessId:
title: Access提供者
helper: access 授权
component:
name: access-selector
type: tencent
required: true
order: 0
searchKey:
title: 关键字筛选
helper: 仅匹配ID、备注名称、域名包含关键字的证书可以不填
required: false
component:
name: a-input
order: 0
maxCount:
title: 最大删除数量
helper: 单次运行最大删除数量
value: 100
component:
name: a-input-number
vModel: value
required: true
order: 0
expiringDays:
title: 即将过期天数
helper: >-
仅删除有效期小于此天数的证书,
<span
class="color-red">注意:`1.26.14`版本之前Certd创建的证书流水线默认是到期前20天才更新证书需要将之前创建的证书申请任务的更新天数改为35天保证删除之前就已经替换掉即将过期证书</span>
value: 30
component:
name: a-input-number
vModel: value
required: true
order: 0
checkTimeout:
title: 检查超时时间
helper: 检查删除任务结果超时时间,单位分钟
value: 10
component:
name: a-input-number
vModel: value
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-tencent/plugin/index.js

View File

@ -0,0 +1,59 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: TencentDeployCertToCDNv2
title: 腾讯云-部署到CDN-v2
icon: svg:icon-tencentcloud
group: tencent
desc: 推荐使用
input:
accessId:
title: Access提供者
helper: access 授权
component:
name: access-selector
type: tencent
required: true
order: 0
domains:
title: CDN域名
component:
name: remote-select
vModel: value
mode: tags
type: plugin
typeName: TencentDeployCertToCDNv2
action: onGetDomainList
watches:
- certDomains
- accessId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 请选择域名或输入域名
order: 0
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书或者选择前置任务“上传证书到腾讯云”任务的证书ID
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- UploadCertToTencent
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-tencent/plugin/index.js

View File

@ -0,0 +1,60 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: TencentDeployCertToLive
title: 腾讯云-部署到腾讯云直播
icon: svg:icon-tencentcloud
desc: https://console.cloud.tencent.com/live/
group: tencent
needPlus: true
input:
accessId:
title: Access提供者
helper: access 授权
component:
name: access-selector
type: tencent
required: true
order: 0
domains:
title: 直播域名
component:
name: remote-select
vModel: value
mode: tags
type: plugin
typeName: TencentDeployCertToLive
action: onGetDomainList
watches:
- certDomains
- accessId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 请选择域名或输入域名
order: 0
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书或者选择前置任务“上传证书到腾讯云”任务的证书ID
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- UploadCertToTencent
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-tencent/plugin/deploy-to-live/index.js

View File

@ -0,0 +1,38 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: UploadCertToTencent
title: 腾讯云-上传证书到腾讯云
icon: svg:icon-tencentcloud
desc: 上传成功后输出tencentCertId
group: tencent
input:
name:
title: 证书名称
order: 0
accessId:
title: Access授权
helper: access授权
component:
name: access-selector
type: tencent
required: true
order: 0
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
output:
tencentCertId:
title: 上传成功后的腾讯云CertId
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-tencent/plugin/upload-to-tencent/index.js

View File

@ -0,0 +1,104 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: UpyunDeployToCdn
title: 又拍云-部署证书到CDN/USS
icon: svg:icon-upyun
desc: 支持又拍云CDN又拍云云存储USS
group: cdn
needPlus: true
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: Upyun授权
component:
name: access-selector
type: upyun
required: true
order: 0
cdnList:
title: 加速域名
component:
name: remote-select
vModel: value
mode: tags
type: plugin
typeName: UpyunDeployToCdn
action: onGetCdnList
watches:
- certDomains
- accessId
- accessId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 选择加速域名,可以手动输入
order: 0
forceHttps:
title: 强制HTTPS
value: keep
component:
name: a-select
vModel: value
options:
- value: 'true'
label: 强制HTTPS
- value: 'false'
label: 不强制HTTPS
- value: keep
label: 保持原样
required: true
order: 0
https:
title: 开启HTTPS
value: 'true'
component:
name: a-select
vModel: value
options:
- value: 'true'
label: 开启HTTPS
- value: 'false'
label: 关闭HTTPS
- value: keep
label: 保持原样
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-upyun/plugins/plugin-depoy-to-cdn.js

View File

@ -0,0 +1,100 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: VolcengineDeployToALB
title: 火山引擎-部署证书至ALB
icon: svg:icon-volcengine
group: volcengine
desc: 部署至火山引擎应用负载均衡
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- VolcengineUploadToCertCenter
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: Access授权
helper: 火山引擎AccessKeyId、AccessKeySecret
component:
name: access-selector
type: volcengine
required: true
order: 0
regionId:
title: Region
helper: 地区选择
component:
name: a-select
options:
- label: 北京
value: cn-beijing
- label: 上海
value: cn-shanghai
- label: 广州
value: cn-guangzhou
- label: 香港
value: cn-hongkong
- label: 柔佛
value: ap-southeast-1
- label: 雅加达
value: ap-southeast-3
value: cn-beijing
required: true
order: 0
listenerList:
title: 监听器列表
component:
name: remote-select
vModel: value
mode: tags
type: plugin
action: onGetListenerList
watches:
- certDomains
- accessId
- certDomains
- accessId
- regionId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: |-
选择要部署证书的监听器
需要在监听器中选择证书中心,进行跨服务访问授权
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-volcengine/plugins/plugin-deploy-to-alb.js

View File

@ -0,0 +1,92 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: VolcengineDeployToCDN
title: 火山引擎-部署证书至CDN
icon: svg:icon-volcengine
group: volcengine
desc: 支持网页,文件下载,音视频点播
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- VolcengineUploadToCertCenter
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: Access授权
helper: 火山引擎AccessKeyId、AccessKeySecret
component:
name: access-selector
type: volcengine
required: true
order: 0
serviceType:
title: 服务类型
helper: 网页,文件下载,音视频点播
component:
name: a-select
options:
- label: 网页
value: web
- label: 文件下载
value: download
- label: 音视频点播
value: video
value: web
required: true
order: 0
domainName:
title: CDN加速域名
component:
name: remote-select
vModel: value
mode: tags
type: plugin
action: onGetDomainList
watches:
- certDomains
- accessId
- certDomains
- accessId
- serviceType
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 你在火山引擎上配置的CDN加速域名比如:certd.docmirror.cn
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-volcengine/plugins/plugin-deploy-to-cdn.js

View File

@ -0,0 +1,110 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: VolcengineDeployToCLB
title: 火山引擎-部署证书至CLB
icon: svg:icon-volcengine
group: volcengine
desc: 部署至火山引擎负载均衡
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- VolcengineUploadToCertCenter
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: Access授权
helper: 火山引擎AccessKeyId、AccessKeySecret
component:
name: access-selector
type: volcengine
required: true
order: 0
regionId:
title: Region
helper: 地区选择
component:
name: a-select
options:
- label: 北京
value: cn-beijing
- label: 上海
value: cn-shanghai
- label: 广州
value: cn-guangzhou
- label: 深圳
value: cn-shenzhen
- label: 杭州
value: cn-hangzhou
- label: 南京
value: cn-north-1
- label: 青岛
value: cn-qingdao
- label: 重庆
value: cn-chengdu
- label: 香港
value: cn-hongkong
- label: 柔佛
value: ap-southeast-1
- label: 雅加达
value: ap-southeast-3
value: cn-beijing
required: true
order: 0
listenerList:
title: 监听器列表
component:
name: remote-select
vModel: value
mode: tags
type: plugin
action: onGetListenerList
watches:
- certDomains
- accessId
- certDomains
- accessId
- regionId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: |-
选择要部署证书的监听器
需要在监听器中选择证书中心,进行跨服务访问授权
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-volcengine/plugins/plugin-deploy-to-clb.js

View File

@ -0,0 +1,75 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: VolcengineDeployToLive
title: 火山引擎-部署证书至Live
icon: svg:icon-volcengine
group: volcengine
desc: 部署至火山引擎视频直播
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: Access授权
helper: 火山引擎AccessKeyId、AccessKeySecret
component:
name: access-selector
type: volcengine
required: true
order: 0
domainList:
title: 直播域名
component:
name: remote-select
vModel: value
mode: tags
type: plugin
action: onGetDomainList
watches:
- certDomains
- accessId
- certDomains
- accessId
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: 选择要部署证书的直播域名
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-volcengine/plugins/plugin-deploy-to-live.js

View File

@ -0,0 +1,84 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: VolcengineDeployToVOD
title: 火山引擎-部署证书至VOD
icon: svg:icon-volcengine
group: volcengine
desc: 部署至火山引擎视频点播(暂不可用)
deprecated: 暂时缺少部署ssl接口
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
- VolcengineUploadToCertCenter
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: Access授权
helper: 火山引擎AccessKeyId、AccessKeySecret
component:
name: access-selector
type: volcengine
required: true
order: 0
spaceName:
title: 空间名称
required: true
order: 0
domainList:
title: 点播域名
component:
name: remote-select
vModel: value
mode: tags
type: plugin
action: onGetDomainList
watches:
- certDomains
- accessId
- certDomains
- accessId
- spaceName
required: true
mergeScript: |2-
return {
component:{
form: ctx.compute(({form})=>{
return form
})
},
}
helper: |-
选择要部署证书的点播域名
需要先在域名管理页面进行证书中心访问授权即点击去配置SSL证书
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-volcengine/plugins/plugin-deploy-to-vod.js

View File

@ -0,0 +1,51 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: VolcengineUploadToCertCenter
title: 火山引擎-上传证书至证书中心
icon: svg:icon-volcengine
group: volcengine
desc: 上传证书至火山引擎证书中心
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
certDomains:
title: 当前证书域名
component:
name: cert-domains-getter
mergeScript: |2-
return {
component:{
inputKey: ctx.compute(({form})=>{
return form.cert
}),
}
}
required: false
order: 0
accessId:
title: Access授权
helper: 火山引擎AccessKeyId、AccessKeySecret
component:
name: access-selector
type: volcengine
required: true
order: 0
output:
volcengineCertId:
title: 上传成功后的火山引擎证书Id
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-volcengine/plugins/plugin-upload-to-cert-center.js

View File

@ -0,0 +1,23 @@
showRunStrategy: true
default:
strategy:
runStrategy: 1
name: WaitPlugin
title: 等待
icon: ri:rest-time-line
desc: 等待一段时间
group: other
input:
waitTime:
title: 等待时长
value: 30
component:
name: a-input-number
vModel: value
helper: 单位:秒
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-other/plugins/plugin-wait.js

View File

@ -0,0 +1,47 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: WoaiCDN
title: 我爱云-部署证书到我爱云CDN
desc: 部署证书到我爱云CDN
icon: clarity:plugin-line
group: cdn
input:
baseApi:
title: 接口地址(可留空)
helper: 请填写我爱云的地址, 默认为 [API](https://console.edeg.sxhjgy.cn) 末尾请不要携带`/`
component:
name: a-input
required: false
order: 0
certId:
title: 证书ID
helper: 请填写 [证书列表](https://console.edge.sxhjgy.cn/site/certificate) 中的证书的ID
component:
name: a-input
required: true
order: 0
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
accessId:
title: Access授权
helper: 我爱云的用户、密码授权
component:
name: access-selector
type: woai
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-woai/plugins/plugin-deploy-to-cdn.js

View File

@ -0,0 +1,32 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: hostShellExecute
title: 主机-执行远程主机脚本命令
icon: tabler:brand-powershell
group: host
desc: 可以执行重启nginx等操作让证书生效
input:
accessId:
title: 主机登录配置
helper: 登录
component:
name: access-selector
type: ssh
required: true
order: 0
script:
title: shell脚本命令
component:
name: a-textarea
vModel: value
rows: 6
placeholder: systemctl restart nginx
helper: 注意如果目标主机是windows且终端是cmd系统会自动将多行命令通过“&&”连接成一行
required: true
order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-host/plugin/index.js

View File

@ -0,0 +1,66 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: uploadCertToAliyun
title: 阿里云-上传证书到阿里云
icon: svg:icon-aliyun
group: aliyun
desc: 如果不想在阿里云上同一份证书上传多次,可以把此任务作为前置任务,其他阿里云任务证书那一项选择此任务的输出
input:
name:
title: 证书名称
helper: 证书上传后将以此参数作为名称前缀
order: 0
regionId:
title: 大区
value: cn-hangzhou
component:
name: a-auto-complete
vModel: value
options:
- value: cn-hangzhou
endpoint: cas.aliyuncs.com
label: cn-hangzhou-中国大陆
- value: eu-central-1
endpoint: cas.eu-central-1.aliyuncs.com
label: eu-central-1-德国(法兰克福)
- value: ap-southeast-1
endpoint: cas.ap-southeast-1.aliyuncs.com
label: ap-southeast-1-新加坡
- value: ap-southeast-3
endpoint: cas.ap-southeast-3.aliyuncs.com
label: ap-southeast-3-马来西亚(吉隆坡)
- value: ap-southeast-5
endpoint: cas.ap-southeast-5.aliyuncs.com
label: ap-southeast-5-印度尼西亚(雅加达)
- value: cn-hongkong
endpoint: cas.cn-hongkong.aliyuncs.com
label: cn-hongkong-中国香港
required: true
order: 0
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
accessId:
title: Access授权
helper: 阿里云授权AccessKeyId、AccessKeySecret
component:
name: access-selector
type: aliyun
required: true
order: 0
output:
aliyunCertId:
title: 上传成功后的阿里云CertId
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-aliyun/plugin/upload-to-aliyun/index.js

View File

@ -0,0 +1,225 @@
showRunStrategy: false
default:
strategy:
runStrategy: 1
name: uploadCertToHost
title: 主机-部署证书到SSH主机
icon: line-md:uploading-loop
group: host
desc: SFTP上传证书到主机然后SSH执行部署脚本命令
order: 1
input:
cert:
title: 域名证书
helper: 请选择前置任务输出的域名证书
component:
name: output-selector
from:
- CertApply
- CertApplyLego
- CertApplyUpload
required: true
order: 0
certType:
title: 证书格式
helper: 要部署的证书格式支持pem、pfx、der、jks
component:
name: a-select
options:
- value: pem
label: pemcrtNginx等大部分应用
- value: pfx
label: pfx一般用于IIS
- value: der
label: der一般用于Apache
- value: jks
label: jks一般用于JAVA应用
- value: one
label: 证书私钥一体crt+key简单合并为一个pem文件
required: true
order: 0
crtPath:
title: 证书保存路径
helper: 填写应用原本的证书保存路径,路径要包含证书文件名,例如:/tmp/cert.pem
component:
placeholder: /root/deploy/nginx/full_chain.pem
mergeScript: |2-
return {
show: ctx.compute(({form})=>{
return form.certType === 'pem';
})
}
required: true
rules:
- type: filepath
order: 0
keyPath:
title: 私钥保存路径
helper: 需要有写入权限,路径要包含私钥文件名,例如:/tmp/cert.key
component:
placeholder: /root/deploy/nginx/cert.key
mergeScript: |2-
return {
show: ctx.compute(({form})=>{
return form.certType === 'pem';
})
}
required: true
rules:
- type: filepath
order: 0
icPath:
title: 中间证书保存路径
helper: 路径要包含文件名,一般情况传上面两个文件即可,极少数情况需要这个中间证书
component:
placeholder: /root/deploy/nginx/intermediate.pem
mergeScript: |2-
return {
show: ctx.compute(({form})=>{
return form.certType === 'pem';
})
}
rules:
- type: filepath
order: 0
pfxPath:
title: PFX证书保存路径
helper: 填写应用原本的证书保存路径路径要包含证书文件名例如D:\iis\cert.pfx
component:
placeholder: D:\iis\cert.pfx
mergeScript: |2-
return {
show: ctx.compute(({form})=>{
return form.certType === 'pfx';
})
}
required: true
rules:
- type: filepath
order: 0
derPath:
title: DER证书保存路径
helper: 填写应用原本的证书保存路径,路径要包含证书文件名,例如:/tmp/cert.der
component:
placeholder: /root/deploy/apache/cert.der
mergeScript: |2-
return {
show: ctx.compute(({form})=>{
return form.certType === 'der';
})
}
required: true
rules:
- type: filepath
order: 0
jksPath:
title: jks证书保存路径
helper: 填写应用原本的证书保存路径,路径要包含证书文件名,例如:/tmp/cert.jks
component:
placeholder: /root/deploy/java_app/cert.jks
mergeScript: |2-
return {
show: ctx.compute(({form})=>{
return form.certType === 'jks';
})
}
required: true
rules:
- type: filepath
order: 0
onePath:
title: 一体证书保存路径
helper: 填写应用原本的证书保存路径,路径要包含证书文件名,例如:/tmp/crt_key.pem
component:
placeholder: /root/deploy/app/crt_key.pem
mergeScript: |2-
return {
show: ctx.compute(({form})=>{
return form.certType === 'one';
})
}
required: true
rules:
- type: filepath
order: 0
accessId:
title: 主机登录配置
helper: access授权
component:
name: access-selector
type: ssh
required: true
order: 0
uploadType:
title: 上传方式
helper: 选择上传方式sftp或者scp
value: sftp
component:
name: a-select
options:
- value: sftp
label: sftp
- value: scp
label: scp
required: true
order: 0
mkdirs:
title: 自动创建远程目录
helper: 是否自动创建远程目录,如果关闭则你需要自己确保远程目录存在
value: true
component:
name: a-switch
vModel: checked
order: 0
script:
title: shell脚本命令
component:
name: a-textarea
vModel: value
rows: 6
helper: |-
上传后执行脚本命令,不填则不执行
注意如果目标主机是windows且终端是cmd系统会自动将多行命令通过“&&”连接成一行
required: false
order: 0
injectEnv:
title: 注入环境变量
value: false
component:
name: a-switch
vModel: checked
helper: 是否将证书域名、路径等信息注入脚本执行环境变量中,具体的变量名称,可以运行后从日志中查看
required: false
order: 0
output:
hostCrtPath:
title: 证书保存路径
hostKeyPath:
title: 私钥保存路径
hostIcPath:
title: 中间证书保存路径
hostPfxPath:
title: PFX保存路径
hostDerPath:
title: DER保存路径
hostJksPath:
title: jks保存路径
hostOnePath:
title: 一体证书保存路径
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-host/plugin/upload-to-host/index.js

View File

@ -0,0 +1,8 @@
name: 51dns
title: 51dns
desc: 51DNS
icon: arcticons:dns-changer-3
accessType: 51dns
type: builtIn
pluginType: dnsProvider
scriptFilePath: ../../../plugins/plugin-51dns/index.js

View File

@ -0,0 +1,8 @@
name: aliyun
title: 阿里云
desc: 阿里云DNS解析提供商
accessType: aliyun
icon: svg:icon-aliyun
type: builtIn
pluginType: dnsProvider
scriptFilePath: ../../../plugins/plugin-aliyun/dns-provider/aliyun-dns-provider.js

View File

@ -0,0 +1,8 @@
name: cloudflare
title: cloudflare
desc: cloudflare dns provider
icon: simple-icons:cloudflare
accessType: cloudflare
type: builtIn
pluginType: dnsProvider
scriptFilePath: ../../../plugins/plugin-cloudflare/index.js

View File

@ -0,0 +1,8 @@
name: demo
title: Dns提供商Demo
desc: dns provider示例
icon: clarity:plugin-line
accessType: demo
type: builtIn
pluginType: dnsProvider
scriptFilePath: ../../../plugins/plugin-demo/index.js

View File

@ -0,0 +1,8 @@
name: dnsla
title: dns.la
desc: dns.la
icon: arcticons:dns-changer-3
accessType: dnsla
type: builtIn
pluginType: dnsProvider
scriptFilePath: ../../../plugins/plugin-dnsla/index.js

View File

@ -0,0 +1,9 @@
name: dnspod
title: dnspod(已过时,请尽快换成腾讯云)
desc: 已废弃,请尽快换成腾讯云类型
accessType: dnspod
deprecated: dnspod已废弃请换成腾讯云
icon: svg:icon-tencentcloud
type: builtIn
pluginType: dnsProvider
scriptFilePath: ../../../plugins/plugin-tencent/dns-provider/dnspod-dns-provider.js

View File

@ -0,0 +1,8 @@
name: huawei
title: 华为云
desc: 华为云DNS解析提供商
accessType: huawei
icon: svg:icon-huawei
type: builtIn
pluginType: dnsProvider
scriptFilePath: ../../../plugins/plugin-huawei/dns-provider/huawei-dns-provider.js

View File

@ -0,0 +1,8 @@
name: jdcloud
title: 京东云
desc: 京东云DNS解析提供商
accessType: jdcloud
icon: svg:icon-jdcloud
type: builtIn
pluginType: dnsProvider
scriptFilePath: ../../../plugins/plugin-jdcloud/index.js

View File

@ -0,0 +1,8 @@
name: namesilo
title: namesilo
desc: namesilo dns provider
icon: simple-icons:namesilo
accessType: namesilo
type: builtIn
pluginType: dnsProvider
scriptFilePath: ../../../plugins/plugin-namesilo/index.js

View File

@ -0,0 +1,8 @@
name: tencent
title: 腾讯云
desc: 腾讯云域名DNS解析提供者
accessType: tencent
icon: svg:icon-tencentcloud
type: builtIn
pluginType: dnsProvider
scriptFilePath: ../../../plugins/plugin-tencent/dns-provider/tencent-dns-provider.js

View File

@ -0,0 +1,8 @@
name: volcengine
title: 火山引擎
desc: 火山引擎DNS解析提供商
accessType: volcengine
icon: svg:icon-volcengine
type: builtIn
pluginType: dnsProvider
scriptFilePath: ../../../plugins/plugin-volcengine/volcengine-dns-provider.js

View File

@ -0,0 +1,8 @@
name: west
title: 西部数码
desc: west dns provider
icon: svg:icon-xibushuma
accessType: west
type: builtIn
pluginType: dnsProvider
scriptFilePath: ../../../plugins/plugin-west/index.js

View File

@ -0,0 +1,20 @@
name: anpush
title: AnPush
desc: https://anpush.com
needPlus: true
input:
token:
title: API密钥
component:
placeholder: ''
helper: '[获取API密钥](https://anpush.com/push/tool) '
required: true
channel:
title: 通道ID
component:
placeholder: ''
helper: '[获取通道ID](https://anpush.com/push/setting)创建通道复制通道id填入此处'
required: true
type: builtIn
pluginType: notification
scriptFilePath: ../../../plugins/plugin-notification/index.js

View File

@ -0,0 +1,21 @@
name: bark
title: Bark 通知
desc: Bark 推送通知插件
needPlus: true
input:
webhook:
title: 服务地址
component:
placeholder: https://api.day.app/your_key
required: true
helper: 你的bark服务地址+key
skipSslVerify:
title: 忽略证书校验
value: false
component:
name: a-switch
vModel: checked
required: false
type: builtIn
pluginType: notification
scriptFilePath: ../../../plugins/plugin-notification/index.js

View File

@ -0,0 +1,51 @@
name: dingtalk
title: 钉钉通知
desc: 钉钉群聊通知
needPlus: true
input:
webhook:
title: webhook地址
component:
placeholder: https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxxxxx
helper: >-
钉钉APP->群聊->设置->机器人->添加机器人->自定义->[创建机器人->复制webhook地址](https://open.dingtalk.com/document/robots/custom-robot-access)
required: true
secret:
title: 加签密钥
component:
placeholder: SECxxxxxxxxxxxxxxxxxxxxx
helper: 必须选择一种安全设置,请选择加密密钥
required: false
atUserIds:
title: '@用户ID'
component:
placeholder: 非必填,填写完一个按回车
name: a-select
vModel: value
mode: tags
multiple: true
open: false
helper: 填写要@的用户ID
required: false
atMobiles:
title: '@用户手机号'
component:
placeholder: 非必填,填写一个按回车
name: a-select
vModel: value
mode: tags
multiple: true
open: false
helper: 填写要@的用户的手机号
required: false
isAtAll:
title: '@all'
component:
placeholder: 非必填
name: a-switch
vModel: checked
helper: 是否@所有人
required: false
type: builtIn
pluginType: notification
scriptFilePath: ../../../plugins/plugin-notification/dingtalk/index.js

View File

@ -0,0 +1,38 @@
name: discord
title: Discord 通知
desc: Discord 机器人通知
needPlus: true
input:
webhook:
title: Webhook URL
component:
placeholder: https://discord.com/api/webhooks/xxxxx/xxxx
helper: >-
[Discord Webhook
说明](https://discord.com/developers/docs/resources/webhook#execute-webhook)
required: true
mentionedList:
title: 提醒指定成员
component:
name: a-select
vModel: value
mode: tags
open: false
required: false
helper: 填写成员的Id或者角色Id&id或者everyone
httpsProxy:
title: 代理
component:
placeholder: http://xxxxx:xx
helper: 使用https_proxy
required: false
skipSslVerify:
title: 忽略证书校验
value: false
component:
name: a-switch
vModel: checked
required: false
type: builtIn
pluginType: notification
scriptFilePath: ../../../plugins/plugin-notification/index.js

View File

@ -0,0 +1,18 @@
name: email
title: 电子邮件
desc: 电子邮件通知
input:
receivers:
title: 收件人邮箱
component:
name: a-select
vModel: value
mode: tags
open: false
required: true
helper: |-
可以填写多个,填写一个按回车键再填写下一个
需要先[配置邮件服务器](#/sys/settings/email)
type: builtIn
pluginType: notification
scriptFilePath: ../../../plugins/plugin-notification/index.js

View File

@ -0,0 +1,43 @@
name: feishu
title: 飞书通知
desc: 飞书群聊webhook通知
needPlus: true
input:
webhook:
title: webhook地址
component:
placeholder: https://open.feishu.cn/open-apis/bot/v2/hook/xxxxxxxxxxxxxxxx
helper: >-
飞书APP->群聊->设置->机器人->添加机器人->自定义webhook->[创建机器人->复制webhook地址](https://open.feishu.cn/document/client-docs/bot-v3/add-custom-bot?lang=zh-CN)
required: true
secret:
title: 加签密钥
component:
placeholder: SECxxxxxxxxxxxxxxxxxxxxx
helper: 必须选择一种安全设置,建议选择加密密钥
required: false
atUserIds:
title: '@用户'
component:
placeholder: 非必填,支持多个,填写完一个按回车
name: a-select
vModel: value
mode: tags
multiple: true
open: false
helper: >-
填写要@的用户ID【ou_xxxxxxxxx】
用户ID获取方法,[查看OpenId获取方法](https://open.feishu.cn/document/home/user-identity-introduction/open-id)
required: false
isAtAll:
title: '@all'
component:
placeholder: 非必填
name: a-switch
vModel: checked
helper: 是否@所有人
required: false
type: builtIn
pluginType: notification
scriptFilePath: ../../../plugins/plugin-notification/index.js

View File

@ -0,0 +1,14 @@
name: iyuu
title: 爱语飞飞微信通知(iyuu)
desc: https://iyuu.cn/
needPlus: true
input:
token:
title: Token令牌
component:
placeholder: ''
helper: https://iyuu.cn/ 微信扫码获取
required: true
type: builtIn
pluginType: notification
scriptFilePath: ../../../plugins/plugin-notification/iyuu/index.js

View File

@ -0,0 +1,32 @@
name: qywx
title: 企业微信通知
desc: 企业微信群聊机器人通知
needPlus: true
input:
webhook:
title: webhook地址
component:
placeholder: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxx
helper: '[企微群聊机器人配置说明](https://developer.work.weixin.qq.com/document/path/91770)'
required: true
mentionedList:
title: 提醒指定成员
component:
name: a-select
vModel: value
mode: tags
open: false
required: false
helper: 填写成员名字,@all 为提醒所有人
mentionedMobileList:
title: 提醒指定手机号成员
component:
name: a-select
vModel: value
mode: tags
open: false
required: false
helper: 填写成员手机号,@all 为提醒所有人
type: builtIn
pluginType: notification
scriptFilePath: ../../../plugins/plugin-notification/qywx/index.js

View File

@ -0,0 +1,37 @@
name: serverchan
title: Server酱ᵀ
desc: https://sct.ftqq.com/
needPlus: true
input:
endpoint:
title: 服务地址
value: https://sctapi.ftqq.com
required: true
sendKey:
title: SendKey
component:
placeholder: https://sctapi.ftqq.com/<SENDKEY>.send
helper: https://sct.ftqq.com/ 微信扫码获取
required: true
channel:
title: 消息通道号
component:
placeholder: 9|66
helper: 可以不填,最多两个通道,[通道配置说明](https://sct.ftqq.com/sendkey)
required: false
noip:
title: 是否隐藏IP
component:
name: a-switch
vModel: checked
required: false
skipSslVerify:
title: 忽略证书校验
value: false
component:
name: a-switch
vModel: checked
required: false
type: builtIn
pluginType: notification
scriptFilePath: ../../../plugins/plugin-notification/serverchan/index.js

View File

@ -0,0 +1,32 @@
name: serverchan3
title: Server酱³
desc: https://doc.sc3.ft07.com/serverchan3
needPlus: true
input:
apiURL:
title: ApiURL
component:
placeholder: https://uid.push.ft07.com/send/sendKey.send
required: true
tags:
title: 标签Tags
component:
name: a-select
vModel: value
mode: tags
open: false
helper: 支持多个,回车后填写下一个
required: false
short:
title: short
required: false
skipSslVerify:
title: 忽略证书校验
value: false
component:
name: a-switch
vModel: checked
required: false
type: builtIn
pluginType: notification
scriptFilePath: ../../../plugins/plugin-notification/serverchan3/index.js

View File

@ -0,0 +1,30 @@
name: slack
title: Slack通知
desc: Slack消息推送通知
needPlus: true
input:
webhook:
title: webhook地址
component:
placeholder: >-
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
helper: >-
[APPS](https://api.slack.com/apps/)->进入APP->incoming-webhooks->Add New
Webhook to Workspace
required: true
httpsProxy:
title: 代理
component:
placeholder: http://xxxxx:xx
helper: 使用https_proxy
required: false
skipSslVerify:
title: 忽略证书校验
value: false
component:
name: a-switch
vModel: checked
required: false
type: builtIn
pluginType: notification
scriptFilePath: ../../../plugins/plugin-notification/slack/index.js

View File

@ -0,0 +1,39 @@
name: telegram
title: Telegram通知
desc: Telegram Bot推送通知
needPlus: true
input:
endpoint:
title: URL
value: https://api.telegram.org
component:
placeholder: https://api.telegram.org
required: true
botToken:
title: Bot Token
component:
placeholder: 123456789:ABCdefGhijklmnopqrstUVWXyz
helper: '[token获取](https://core.telegram.org/bots/features#botfather)'
required: true
chatId:
title: 聊天ID
component:
placeholder: 聊天ID例如 123456789 或 @channelusername
helper: 用户ID(纯数字)或频道名称(@xxxx)
required: true
httpsProxy:
title: 代理
component:
placeholder: http://xxxxx:xx
helper: 使用https_proxy
required: false
skipSslVerify:
title: 忽略证书校验
value: false
component:
name: a-switch
vModel: checked
required: false
type: builtIn
pluginType: notification
scriptFilePath: ../../../plugins/plugin-notification/telegram/index.js

View File

@ -0,0 +1,43 @@
name: vocechat
title: VoceChat通知
desc: https://voce.chat
needPlus: true
input:
endpoint:
title: 服务地址
component:
placeholder: https://replace.your.domain
required: true
apiKey:
title: apiKey
component:
placeholder: ''
helper: '[获取APIKEY](https://doc.voce.chat/bot/bot-and-webhook)'
required: true
targetType:
title: 目标类型
component:
name: a-select
options:
- value: user
label: 用户
- value: channel
label: 频道
required: true
helper: 发送消息的目标类型
targetId:
title: 目标ID
component:
placeholder: 发送消息的目标ID
required: true
helper: 目标ID可以是用户ID或频道ID
skipSslVerify:
title: 忽略证书校验
value: false
component:
name: a-switch
vModel: checked
required: false
type: builtIn
pluginType: notification
scriptFilePath: ../../../plugins/plugin-notification/vocechat/index.js

View File

@ -0,0 +1,75 @@
name: webhook
title: 自定义webhook
desc: 根据模版自定义http请求
input:
webhook:
title: webhook地址
component:
placeholder: https://xxxxx.com/xxxx
col:
span: 24
required: true
method:
title: 请求方式
value: POST
component:
name: a-select
placeholder: post/put/get
options:
- value: POST
label: POST
- value: PUT
label: PUT
- value: GET
label: GET
required: true
contentType:
title: ContentType
value: application/json
component:
name: a-auto-complete
options:
- value: application/json
label: application/json
- value: application/x-www-form-urlencoded
label: application/x-www-form-urlencoded
helper: 也可以自定义填写
required: true
headers:
title: Headers
component:
name: a-textarea
vModel: value
rows: 2
col:
span: 24
helper: 一行一个格式为key=value
required: false
template:
title: 消息body模版
value: |-
{
"title":"{title}",
"content":"{content}\n[查看详情]({url})"
}
component:
name: a-textarea
rows: 4
col:
span: 24
helper: |-
根据对应的webhook接口文档构建一个json对象作为参数默认值只是一个示例一般不是正确的参数
支持变量:{title}、{content}、{url},变量用{}包裹
字符串需要双引号,使用\n换行
如果是get方式将作为query参数拼接到url上
required: true
skipSslVerify:
title: 忽略证书校验
value: false
component:
name: a-switch
vModel: checked
required: false
type: builtIn
pluginType: notification
scriptFilePath: ../../../plugins/plugin-notification/webhook/index.js

View File

@ -12,7 +12,7 @@ export class AutoBLoadPlugins {
@Init() @Init()
async init() { async init() {
logger.info('加载插件开始'); logger.info('加载插件开始');
await import("../../plugins/index.js") await this.pluginService.registerFromLocal("./metadata")
await this.pluginService.registerFromDb() await this.pluginService.registerFromDb()
logger.info('加载插件完成'); logger.info('加载插件完成');

View File

@ -1,16 +1,18 @@
import { Inject, Provide, Scope, ScopeEnum } from "@midwayjs/core"; import {Inject, Provide, Scope, ScopeEnum} from "@midwayjs/core";
import { BaseService, PageReq } from "@certd/lib-server"; import {BaseService, PageReq} from "@certd/lib-server";
import { PluginEntity } from "../entity/plugin.js"; import {PluginEntity} from "../entity/plugin.js";
import { InjectEntityModel } from "@midwayjs/typeorm"; import {InjectEntityModel} from "@midwayjs/typeorm";
import { Repository } from "typeorm"; import {Repository} from "typeorm";
import { isComm } from "@certd/plus-core"; import {isComm} from "@certd/plus-core";
import { BuiltInPluginService } from "../../pipeline/service/builtin-plugin-service.js"; import {BuiltInPluginService} from "../../pipeline/service/builtin-plugin-service.js";
import { merge } from "lodash-es"; import {merge} from "lodash-es";
import { accessRegistry, pluginRegistry } from "@certd/pipeline"; import {accessRegistry, notificationRegistry, pluginRegistry} from "@certd/pipeline";
import { dnsProviderRegistry } from "@certd/plugin-cert"; import {dnsProviderRegistry} from "@certd/plugin-cert";
import { logger } from "@certd/basic"; import {logger} from "@certd/basic";
import yaml from "js-yaml"; import yaml from "js-yaml";
import { getDefaultAccessPlugin, getDefaultDeployPlugin, getDefaultDnsPlugin } from "./default-plugin.js"; import {getDefaultAccessPlugin, getDefaultDeployPlugin, getDefaultDnsPlugin} from "./default-plugin.js";
import fs from "fs";
import path from "path";
export type PluginImportReq = { export type PluginImportReq = {
content: string, content: string,
@ -18,7 +20,7 @@ export type PluginImportReq = {
}; };
@Provide() @Provide()
@Scope(ScopeEnum.Request, { allowDowngrade: true }) @Scope(ScopeEnum.Request, {allowDowngrade: true})
export class PluginService extends BaseService<PluginEntity> { export class PluginService extends BaseService<PluginEntity> {
@InjectEntityModel(PluginEntity) @InjectEntityModel(PluginEntity)
repository: Repository<PluginEntity>; repository: Repository<PluginEntity>;
@ -136,13 +138,13 @@ export class PluginService extends BaseService<PluginEntity> {
} }
async setDisabled(opts: { id?: number; name?: string; type: string; disabled: boolean }) { async setDisabled(opts: { id?: number; name?: string; type: string; disabled: boolean }) {
const { id, name, type, disabled } = opts; const {id, name, type, disabled} = opts;
if (!type) { if (!type) {
throw new Error("参数错误: type 不能为空"); throw new Error("参数错误: type 不能为空");
} }
if (id > 0) { if (id > 0) {
//update //update
await this.repository.update({ id }, { disabled }); await this.repository.update({id}, {disabled});
return; return;
} }
@ -215,11 +217,19 @@ export class PluginService extends BaseService<PluginEntity> {
async compile(code: string) { async compile(code: string) {
const ts = await import("typescript"); const ts = await import("typescript");
return ts.transpileModule(code, { return ts.transpileModule(code, {
compilerOptions: { module: ts.ModuleKind.ESNext } compilerOptions: {module: ts.ModuleKind.ESNext}
}).outputText; }).outputText;
} }
async getPluginTarget(pluginName: string) {
private async getPluginClassFromFile(item: any) {
const scriptFilePath = item.scriptFilePath;
const res = await import((`${scriptFilePath}`))
const classNames = Object.keys(res)
return res[classNames[0]]
}
async getPluginClassFromDb(pluginName: string) {
//获取插件类实例对象 //获取插件类实例对象
let author = undefined; let author = undefined;
let name = ""; let name = "";
@ -245,7 +255,7 @@ export class PluginService extends BaseService<PluginEntity> {
// const script = await this.compile(plugin.content); // const script = await this.compile(plugin.content);
const script = plugin.content; const script = plugin.content;
const getPluginClass = new AsyncFunction(script); const getPluginClass = new AsyncFunction(script);
return await getPluginClass({ logger: logger }); return await getPluginClass({logger: logger});
} catch (e) { } catch (e) {
logger.error("编译插件失败:", e); logger.error("编译插件失败:", e);
throw e; throw e;
@ -272,8 +282,21 @@ export class PluginService extends BaseService<PluginEntity> {
} }
} }
async registerFromLocal(localDir: string) {
//scan path
const files = fs.readdirSync(localDir);
for (const file of files) {
if (!file.endsWith(".yaml")) {
continue;
}
const item = yaml.load(fs.readFileSync(path.join(localDir, file), "utf8"));
await this.registerPlugin(item);
}
}
async registerPlugin(plugin: PluginEntity) { async registerPlugin(plugin: PluginEntity) {
const metadata = yaml.load(plugin.metadata); const metadata = plugin.metadata ? yaml.load(plugin.metadata) : {};
const item = { const item = {
...plugin, ...plugin,
...metadata ...metadata
@ -290,6 +313,8 @@ export class PluginService extends BaseService<PluginEntity> {
registry = pluginRegistry; registry = pluginRegistry;
} else if (item.pluginType === "dnsProvider") { } else if (item.pluginType === "dnsProvider") {
registry = dnsProviderRegistry; registry = dnsProviderRegistry;
} else if (item.pluginType === "notification") {
registry = notificationRegistry;
} else { } else {
logger.warn(`插件${item.name}类型错误:${item.pluginType}`); logger.warn(`插件${item.name}类型错误:${item.pluginType}`);
return; return;
@ -298,7 +323,11 @@ export class PluginService extends BaseService<PluginEntity> {
registry.register(item.name, { registry.register(item.name, {
define: item, define: item,
target: async () => { target: async () => {
return await this.getPluginTarget(item.name); if (item.type === "builtIn") {
return await this.getPluginClassFromFile(item);
} else {
return await this.getPluginClassFromDb(item.name);
}
} }
}); });
} }
@ -372,11 +401,13 @@ export class PluginService extends BaseService<PluginEntity> {
await this.update(pluginEntity); await this.update(pluginEntity);
} else { } else {
//add //add
const { id } = await this.add(pluginEntity); const {id} = await this.add(pluginEntity);
pluginEntity.id = id; pluginEntity.id = id;
} }
return { return {
id: pluginEntity.id id: pluginEntity.id
}; };
} }
} }

View File

@ -1,21 +1,21 @@
export * from '@certd/plugin-cert'; export * from '@certd/plugin-cert';
export * from '@certd/plugin-plus'; export * from '@certd/plugin-plus';
export * from './plugin-aliyun/index.js'; // export * from './plugin-aliyun/index.js';
export * from './plugin-tencent/index.js'; // export * from './plugin-tencent/index.js';
export * from './plugin-host/index.js'; // export * from './plugin-host/index.js';
export * from './plugin-huawei/index.js'; // export * from './plugin-huawei/index.js';
export * from './plugin-demo/index.js'; // export * from './plugin-demo/index.js';
export * from './plugin-other/index.js'; // export * from './plugin-other/index.js';
export * from './plugin-west/index.js'; // export * from './plugin-west/index.js';
export * from './plugin-doge/index.js'; // export * from './plugin-doge/index.js';
export * from './plugin-qiniu/index.js'; // export * from './plugin-qiniu/index.js';
export * from './plugin-woai/index.js'; // export * from './plugin-woai/index.js';
export * from './plugin-cachefly/index.js'; // export * from './plugin-cachefly/index.js';
export * from './plugin-gcore/index.js'; // export * from './plugin-gcore/index.js';
export * from './plugin-qnap/index.js'; // export * from './plugin-qnap/index.js';
export * from './plugin-aws/index.js'; // export * from './plugin-aws/index.js';
export * from './plugin-dnsla/index.js'; // export * from './plugin-dnsla/index.js';
export * from './plugin-upyun/index.js'; // export * from './plugin-upyun/index.js';
export * from './plugin-volcengine/index.js' // export * from './plugin-volcengine/index.js'
export * from './plugin-jdcloud/index.js' // export * from './plugin-jdcloud/index.js'
export * from './plugin-51dns/index.js' // export * from './plugin-51dns/index.js'