From 138dc286f68ba0ad1fd62754232fda572a3f7e0a Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Thu, 5 Dec 2024 13:34:21 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=88=A0=E9=99=A4cloudflare=20cdn?= =?UTF-8?q?=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/plugins/plugin-cloudflare/index.ts | 1 - .../plugin-cloudflare/plugins/index.ts | 1 - .../plugins/plugin-deploy-to-cdn.ts | 92 ------------------- 3 files changed, 94 deletions(-) delete mode 100644 packages/ui/certd-server/src/plugins/plugin-cloudflare/plugins/index.ts delete mode 100644 packages/ui/certd-server/src/plugins/plugin-cloudflare/plugins/plugin-deploy-to-cdn.ts diff --git a/packages/ui/certd-server/src/plugins/plugin-cloudflare/index.ts b/packages/ui/certd-server/src/plugins/plugin-cloudflare/index.ts index bce2c52d..db899c71 100644 --- a/packages/ui/certd-server/src/plugins/plugin-cloudflare/index.ts +++ b/packages/ui/certd-server/src/plugins/plugin-cloudflare/index.ts @@ -1,3 +1,2 @@ export * from './dns-provider.js'; -export * from './plugins/index.js'; export * from './access.js'; diff --git a/packages/ui/certd-server/src/plugins/plugin-cloudflare/plugins/index.ts b/packages/ui/certd-server/src/plugins/plugin-cloudflare/plugins/index.ts deleted file mode 100644 index cd1308a9..00000000 --- a/packages/ui/certd-server/src/plugins/plugin-cloudflare/plugins/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './plugin-deploy-to-cdn.js'; diff --git a/packages/ui/certd-server/src/plugins/plugin-cloudflare/plugins/plugin-deploy-to-cdn.ts b/packages/ui/certd-server/src/plugins/plugin-cloudflare/plugins/plugin-deploy-to-cdn.ts deleted file mode 100644 index 85bdf26f..00000000 --- a/packages/ui/certd-server/src/plugins/plugin-cloudflare/plugins/plugin-deploy-to-cdn.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from '@certd/pipeline'; -import { CertInfo, CertReader } from '@certd/plugin-cert'; - -@IsTaskPlugin({ - name: 'CloudflareDeployToCDN', - title: '部署证书到CF CDN', - icon: 'simple-icons:cloudflare', - group: pluginGroups.other.key, - desc: '暂未实现,不可用', - default: { - strategy: { - runStrategy: RunStrategy.SkipWhenSucceed, - }, - }, -}) -export class CloudflareDeployToCDNPlugin extends AbstractTaskPlugin { - //测试参数 - @TaskInput({ - title: '属性示例', - component: { - //前端组件配置,具体配置见组件文档 https://www.antdv.com/components/input-cn - name: 'a-input', - }, - }) - text!: string; - - //测试参数 - @TaskInput({ - title: '选择框', - component: { - //前端组件配置,具体配置见组件文档 https://www.antdv.com/components/select-cn - name: 'a-auto-complete', - vModel: 'value', - options: [ - { value: '1', label: '选项1' }, - { value: '2', label: '选项2' }, - ], - }, - }) - select!: string; - - //测试参数 - @TaskInput({ - title: 'switch', - component: { - //前端组件配置,具体配置见组件文档 https://www.antdv.com/components/switch-cn - name: 'a-switch', - vModel: 'checked', - }, - }) - switch!: boolean; - //证书选择,此项必须要有 - @TaskInput({ - title: '域名证书', - helper: '请选择前置任务输出的域名证书', - component: { - name: 'output-selector', - from: ['CertApply', 'CertApplyLego'], - }, - required: true, - }) - cert!: CertInfo; - - //授权选择框 - @TaskInput({ - title: 'demo授权', - helper: 'demoAccess授权', - component: { - name: 'access-selector', - type: 'plugins', - }, - rules: [{ required: true, message: '此项必填' }], - }) - accessId!: string; - - async onInstance() {} - async execute(): Promise { - const { select, text, cert, accessId } = this; - const certReader = new CertReader(cert); - const access = await this.accessService.getById(accessId); - this.logger.debug('access', access); - this.logger.debug('certReader', certReader); - this.logger.info('DemoTestPlugin execute'); - this.logger.info('text:', text); - this.logger.info('select:', select); - this.logger.info('switch:', this.switch); - this.logger.info('授权id:', accessId); - //TODO 这里实现你要部署的执行方法 - } -} -//TODO 这里实例化插件,进行注册 -new CloudflareDeployToCDNPlugin();