diff --git a/docs/guide/plugins/access.md b/docs/guide/plugins/access.md index 6b46221de..9196c3117 100644 --- a/docs/guide/plugins/access.md +++ b/docs/guide/plugins/access.md @@ -2,6 +2,74 @@ | 序号 | 名称 | 说明 | |-----|-----|-----| +| 1.| **主机登录授权** | | +| 2.| **阿里云授权** | | +| 3.| **阿里云ESA授权** | | +| 4.| **华为云授权** | | +| 5.| **腾讯云** | | +| 6.| **京东云** | | +| 7.| **火山引擎** | | +| 8.| **七牛云授权** | | +| 9.| **百度云授权** | | +| 10.| **baota授权** | | +| 11.| **天翼云授权** | | +| 12.| **51dns授权** | | +| 13.| **SFTP授权** | | +| 14.| **阿里云OSS授权** | 包含地域和Bucket | +| 15.| **APISIX授权** | | +| 16.| **亚马逊云aws授权** | | +| 17.| **亚马逊云科技(国区)授权** | | +| 18.| **CacheFly** | CacheFly | +| 19.| **EAB授权** | ZeroSSL证书申请需要EAB授权 | +| 20.| **google cloud** | 谷歌云授权 | +| 21.| **cloudflare授权** | | +| 22.| **中国移动CND授权** | | +| 23.| **授权插件示例** | | +| 24.| **dns.la授权** | | +| 25.| **多吉云** | | +| 26.| **Dokploy授权** | | +| 27.| **farcdn授权** | | +| 28.| **FlexCDN授权** | | +| 29.| **Gcore** | Gcore | +| 30.| **Github授权** | | +| 31.| **godaddy授权** | | +| 32.| **金山云授权** | | +| 33.| **FTP授权** | | +| 34.| **七牛OSS授权** | | +| 35.| **腾讯云COS授权** | 腾讯云对象存储授权,包含地域和存储桶 | +| 36.| **s3/minio授权** | S3/minio oss授权 | +| 37.| **namesilo授权** | | +| 38.| **1panel授权** | 账号和密码 | +| 39.| **支付宝** | | +| 40.| **白山云授权** | | +| 41.| **宝塔云WAF授权** | 用于连接和管理宝塔云WAF服务的授权配置 | +| 42.| **cdnfly授权** | | +| 43.| **k8s授权** | | +| 44.| **括彩云cdn授权** | 括彩云CDN,每月免费30G,[注册即领](https://kuocaicdn.com/register?code=8mn536rrzfbf8) | +| 45.| **LeCDN授权** | | +| 46.| **lucky** | | +| 47.| **猫云授权** | | +| 48.| **plesk授权** | | +| 49.| **长亭雷池授权** | | +| 50.| **群晖登录授权** | | +| 51.| **uniCloud** | unicloud授权 | +| 52.| **微信支付** | | +| 53.| **易盾rcdn授权** | 易盾CDN,每月免费30G,[注册即领](https://rhcdn.yiduncdn.com/register?code=8mn536rrzfbf8) | +| 54.| **易发云短信** | sms.yfyidc.cn/ | +| 55.| **易盾DCDN授权** | https://user.yiduncdn.com | +| 56.| **易支付** | | +| 57.| **proxmox** | | +| 58.| **UCloud授权** | 优刻得授权 | +| 59.| **又拍云** | | +| 60.| **网宿授权** | | +| 61.| **西部数码授权** | | +| 62.| **我爱云授权** | 我爱云CDN | +| 63.| **新网授权(代理方式)** | | +| 64.| **新网授权** | | +| 65.| **新网互联授权** | 仅支持代理账号,ip需要加入白名单 | +| 66.| **Zenlayer授权** | Zenlayer授权 | +| 67.| **GoEdge授权** | | +| 68.| **雨云授权** | https://app.rainyun.com/ | - ` - } - - let mdContent = ""; - mdContent = "# 授权列表\n"; - mdContent += genMd(plugins.access); - mdContent += addTableStyle() - fs.writeFileSync("../../../docs/guide/plugins/access.md", mdContent); - - mdContent = "# DNS提供商\n"; - mdContent += genMd(plugins.dnsProvider); - mdContent += addTableStyle() - fs.writeFileSync("../../../docs/guide/plugins/dns-provider.md", mdContent); - - - mdContent = "# 通知插件\n"; - mdContent += genMd(plugins.notification); - mdContent += addTableStyle() - fs.writeFileSync("../../../docs/guide/plugins/notification.md", mdContent); - - - mdContent = "# 任务插件\n"; - mdContent += `共 \`${plugins.deploy.length}\` 款任务插件 \n` - let index =0 - for (const key in pluginGroups) { - index++ - const group = pluginGroups[key]; - mdContent += `## ${index}. ${group.title}\n`; - mdContent += genMd(group.plugins); - } - mdContent += addTableStyle() - fs.writeFileSync("../../../docs/guide/plugins/deploy.md", mdContent); - - process.exit() -} - -genPluginMd() diff --git a/packages/ui/certd-server/export-plugin-yaml.js b/packages/ui/certd-server/export-plugin-yaml.js index 99e2f566e..db43c26e3 100644 --- a/packages/ui/certd-server/export-plugin-yaml.js +++ b/packages/ui/certd-server/export-plugin-yaml.js @@ -6,6 +6,8 @@ import { pathToFileURL } from "node:url"; import * as yaml from "js-yaml"; import { AbstractTaskPlugin, BaseAccess, BaseNotification} from "@certd/pipeline"; import { BaseAddon} from "@certd/lib-server"; +import { dnsProviderRegistry } from "@certd/plugin-cert"; +import { pluginRegistry ,accessRegistry,notificationRegistry,pluginGroups} from "@certd/pipeline"; function scanDir(dir) { const files = fs.readdirSync(dir); @@ -117,9 +119,117 @@ async function genMetadata(){ } } } - process.exit() } + + +async function genPluginMd() { + const plugins = { + access: [], + deploy: [], + dnsProvider: [], + notification: [] + }; + + plugins.access = accessRegistry.getDefineList(); + plugins.deploy = pluginRegistry.getDefineList(); + plugins.dnsProvider = dnsProviderRegistry.getDefineList(); + plugins.notification = notificationRegistry.getDefineList(); + + +// function genMd(list) { +// let mdContent = ` +// +// +// +// +// +// +// `; +// let i = 0; +// for (const x of list) { +// i++ +// mdContent += ``; +// } +// mdContent += `
序号名称说明
${i}. ${x.title} ${x.desc||''}
`; +// return mdContent; +// } + + // function genMd(list) { + // let mdContent = ``; + // let i = 0; + // for (const x of list) { + // i++ + // mdContent += `${i}. **${x.title}** \n${x.desc||''} \n\n\n`; + // } + // return mdContent; + // } + + function genMd(list) { + let mdContent = ` +| 序号 | 名称 | 说明 | +|-----|-----|-----| +`; + let i = 0; + for (const x of list) { + i++ + mdContent += `| ${i}.| **${x.title}** | ${x.desc||''} | \n`; + } + return mdContent; + } + + function addTableStyle(){ + return ` + + ` + } + + let mdContent = ""; + mdContent = "# 授权列表\n"; + mdContent += genMd(plugins.access); + mdContent += addTableStyle() + fs.writeFileSync("../../../docs/guide/plugins/access.md", mdContent); + + mdContent = "# DNS提供商\n"; + mdContent += genMd(plugins.dnsProvider); + mdContent += addTableStyle() + fs.writeFileSync("../../../docs/guide/plugins/dns-provider.md", mdContent); + + + mdContent = "# 通知插件\n"; + mdContent += genMd(plugins.notification); + mdContent += addTableStyle() + fs.writeFileSync("../../../docs/guide/plugins/notification.md", mdContent); + + + mdContent = "# 任务插件\n"; + mdContent += `共 \`${plugins.deploy.length}\` 款任务插件 \n` + let index =0 + for (const key in pluginGroups) { + index++ + const group = pluginGroups[key]; + mdContent += `## ${index}. ${group.title}\n`; + mdContent += genMd(group.plugins); + } + mdContent += addTableStyle() + fs.writeFileSync("../../../docs/guide/plugins/deploy.md", mdContent); + +} + + + // import why from 'why-is-node-running' // setTimeout(() => why(), 100); // 延迟打印原因 -genMetadata() +async function main(){ + await genMetadata() + await genPluginMd() + process.exit() +} +main() diff --git a/packages/ui/certd-server/package.json b/packages/ui/certd-server/package.json index 25cf82fb5..ae1656ea8 100644 --- a/packages/ui/certd-server/package.json +++ b/packages/ui/certd-server/package.json @@ -23,9 +23,8 @@ "lint": "mwts check", "lint:fix": "mwts fix", "ci": "npm run cov", - "build": "cross-env NODE_ENV=production mwtsc --cleanOutDir --skipLibCheck && npm run export-metadata && npm run export-md", + "build": "cross-env NODE_ENV=production mwtsc --cleanOutDir --skipLibCheck && npm run export-metadata", "export-metadata": "node export-plugin-yaml.js", - "export-md": "node export-plugin-md.js", "dev-build": "echo 1", "build-on-docker": "node ./before-build.js && npm run build", "up-mw-deps": "npx midway-version -u -w",