mirror of
https://github.com/certd/certd.git
synced 2026-04-03 14:10:54 +08:00
Merge branch 'v2-dev' of https://github.com/certd/certd into v2-dev
This commit is contained in:
@@ -247,7 +247,7 @@ async function getAuthoritativeDnsResolver(recordName, logger = log) {
|
||||
|
||||
try {
|
||||
/* Resolve root domain by SOA */
|
||||
const domain = await resolveDomainBySoaRecord(recordNam,logger);
|
||||
const domain = await resolveDomainBySoaRecord(recordName,logger);
|
||||
|
||||
/* Resolve authoritative NS addresses */
|
||||
logger(`获取到权威NS服务器name: ${domain}`);
|
||||
|
||||
@@ -185,6 +185,8 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
|
||||
if (res == null) {
|
||||
throw new Error("授权不存在,可能已被删除,请前往任务配置里面重新选择授权");
|
||||
}
|
||||
res.ctx.logger = this.logger;
|
||||
res.ctx.http = this.http;
|
||||
// @ts-ignore
|
||||
if (this.logger?.addSecret) {
|
||||
// 隐藏加密信息,不在日志中输出
|
||||
|
||||
@@ -27,6 +27,7 @@ export const pluginGroups = {
|
||||
tencent: new PluginGroup("tencent", "腾讯云", 4, "svg:icon-tencentcloud"),
|
||||
volcengine: new PluginGroup("volcengine", "火山引擎", 4, "svg:icon-volcengine"),
|
||||
jdcloud: new PluginGroup("jdcloud", "京东云", 4, "svg:icon-jdcloud"),
|
||||
ucloud: new PluginGroup("ucloud", "UCloud", 4, "svg:icon-ucloud"),
|
||||
baidu: new PluginGroup("baidu", "百度云", 4, "ant-design:baidu-outlined"),
|
||||
qiniu: new PluginGroup("qiniu", "七牛云", 5, "svg:icon-qiniuyun"),
|
||||
aws: new PluginGroup("aws", "亚马逊云", 6, "svg:icon-aws"),
|
||||
|
||||
@@ -55,15 +55,39 @@
|
||||
<ul class="icon_lists dib-box">
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">social-foursquare</div>
|
||||
<div class="code-name">&#xe8fb;</div>
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">飞牛</div>
|
||||
<div class="code-name">&#xe60a;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">ksyun-logo</div>
|
||||
<div class="code-name">&#xe65a;</div>
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">金山云logo</div>
|
||||
<div class="code-name">&#xe8ad;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">中国移动</div>
|
||||
<div class="code-name">&#xe989;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">xinnet</div>
|
||||
<div class="code-name">&#xe643;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">ucloud</div>
|
||||
<div class="code-name">&#xe717;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">social-foursquare</div>
|
||||
<div class="code-name">&#xe8fb;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
@@ -228,7 +252,7 @@
|
||||
<pre><code class="language-css"
|
||||
>@font-face {
|
||||
font-family: 'iconfont';
|
||||
src: url('iconfont.svg?t=1754884110189#iconfont') format('svg');
|
||||
src: url('iconfont.svg?t=1766772710945#iconfont') format('svg');
|
||||
}
|
||||
</code></pre>
|
||||
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
||||
@@ -255,23 +279,59 @@
|
||||
<ul class="icon_lists dib-box">
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-four"></span>
|
||||
<span class="icon iconfont icon-fnos"></span>
|
||||
<div class="name">
|
||||
social-foursquare
|
||||
飞牛
|
||||
</div>
|
||||
<div class="code-name">.icon-four
|
||||
<div class="code-name">.icon-fnos
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-ksyun"></span>
|
||||
<div class="name">
|
||||
ksyun-logo
|
||||
金山云logo
|
||||
</div>
|
||||
<div class="code-name">.icon-ksyun
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-cmcc"></span>
|
||||
<div class="name">
|
||||
中国移动
|
||||
</div>
|
||||
<div class="code-name">.icon-cmcc
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-xinnet"></span>
|
||||
<div class="name">
|
||||
xinnet
|
||||
</div>
|
||||
<div class="code-name">.icon-xinnet
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-ucloud"></span>
|
||||
<div class="name">
|
||||
ucloud
|
||||
</div>
|
||||
<div class="code-name">.icon-ucloud
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-four"></span>
|
||||
<div class="name">
|
||||
social-foursquare
|
||||
</div>
|
||||
<div class="code-name">.icon-four
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-rainyun"></span>
|
||||
<div class="name">
|
||||
@@ -517,20 +577,52 @@
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-four"></use>
|
||||
<use xlink:href="#icon-fnos"></use>
|
||||
</svg>
|
||||
<div class="name">social-foursquare</div>
|
||||
<div class="code-name">#icon-four</div>
|
||||
<div class="name">飞牛</div>
|
||||
<div class="code-name">#icon-fnos</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-ksyun"></use>
|
||||
</svg>
|
||||
<div class="name">ksyun-logo</div>
|
||||
<div class="name">金山云logo</div>
|
||||
<div class="code-name">#icon-ksyun</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-cmcc"></use>
|
||||
</svg>
|
||||
<div class="name">中国移动</div>
|
||||
<div class="code-name">#icon-cmcc</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-xinnet"></use>
|
||||
</svg>
|
||||
<div class="name">xinnet</div>
|
||||
<div class="code-name">#icon-xinnet</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-ucloud"></use>
|
||||
</svg>
|
||||
<div class="name">ucloud</div>
|
||||
<div class="code-name">#icon-ucloud</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-four"></use>
|
||||
</svg>
|
||||
<div class="name">social-foursquare</div>
|
||||
<div class="code-name">#icon-four</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-rainyun"></use>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 4688792 */
|
||||
src: url('iconfont.svg?t=1754884110189#iconfont') format('svg');
|
||||
src: url('iconfont.svg?t=1766772710945#iconfont') format('svg');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
@@ -11,12 +11,28 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-four:before {
|
||||
content: "\e8fb";
|
||||
.icon-fnos:before {
|
||||
content: "\e60a";
|
||||
}
|
||||
|
||||
.icon-ksyun:before {
|
||||
content: "\e65a";
|
||||
content: "\e8ad";
|
||||
}
|
||||
|
||||
.icon-cmcc:before {
|
||||
content: "\e989";
|
||||
}
|
||||
|
||||
.icon-xinnet:before {
|
||||
content: "\e643";
|
||||
}
|
||||
|
||||
.icon-ucloud:before {
|
||||
content: "\e717";
|
||||
}
|
||||
|
||||
.icon-four:before {
|
||||
content: "\e8fb";
|
||||
}
|
||||
|
||||
.icon-rainyun:before {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -5,6 +5,41 @@
|
||||
"css_prefix_text": "icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "45984300",
|
||||
"name": "飞牛",
|
||||
"font_class": "fnos",
|
||||
"unicode": "e60a",
|
||||
"unicode_decimal": 58890
|
||||
},
|
||||
{
|
||||
"icon_id": "21785199",
|
||||
"name": "金山云logo",
|
||||
"font_class": "ksyun",
|
||||
"unicode": "e8ad",
|
||||
"unicode_decimal": 59565
|
||||
},
|
||||
{
|
||||
"icon_id": "17262195",
|
||||
"name": "中国移动",
|
||||
"font_class": "cmcc",
|
||||
"unicode": "e989",
|
||||
"unicode_decimal": 59785
|
||||
},
|
||||
{
|
||||
"icon_id": "3445787",
|
||||
"name": "xinnet",
|
||||
"font_class": "xinnet",
|
||||
"unicode": "e643",
|
||||
"unicode_decimal": 58947
|
||||
},
|
||||
{
|
||||
"icon_id": "41854093",
|
||||
"name": "ucloud",
|
||||
"font_class": "ucloud",
|
||||
"unicode": "e717",
|
||||
"unicode_decimal": 59159
|
||||
},
|
||||
{
|
||||
"icon_id": "544964",
|
||||
"name": "social-foursquare",
|
||||
@@ -12,13 +47,6 @@
|
||||
"unicode": "e8fb",
|
||||
"unicode_decimal": 59643
|
||||
},
|
||||
{
|
||||
"icon_id": "8567079",
|
||||
"name": "ksyun-logo",
|
||||
"font_class": "ksyun",
|
||||
"unicode": "e65a",
|
||||
"unicode_decimal": 58970
|
||||
},
|
||||
{
|
||||
"icon_id": "42174864",
|
||||
"name": "雨-copy",
|
||||
|
||||
@@ -14,9 +14,17 @@
|
||||
/>
|
||||
<missing-glyph />
|
||||
|
||||
<glyph glyph-name="four" unicode="" d="M769.629867 861.866667c0 0-438.0864 0-508.209067 0C191.287467 861.866667 170.666667 808.964267 170.666667 775.650133c0-33.3376 0-809.898667 0-809.898666 0-37.527467 20.106667-51.4496 31.3984-56.036267 11.304533-4.597333 42.487467-8.471467 61.169066 13.1584 0 0 239.933867 279.242667 244.053334 283.3792 6.231467 6.250667 6.231467 6.250667 12.4672 6.250667 12.4672 0 104.942933 0 155.236266 0 65.224533 0 75.712 46.653867 82.525867 74.1376 5.672533 23.016533 69.309867 349.7856 90.564267 453.4592C864.305067 819.214933 844.256 861.866667 769.629867 861.866667zM757.5168 286.641067c5.672533 23.016533 69.309867 349.7856 90.564267 453.4592M739.6096 723.904l-21.3312-110.365867c-2.549333-12.053333-17.678933-24.736-31.707733-24.736-14.026667 0-204.622933 0-204.622934 0C459.675733 588.8 443.733333 575.7056 443.733333 553.3824l0-28.689067c0-22.3424 16.040533-38.173867 38.325334-38.173866 0 0 158.894933 0 174.609066 0 15.7312 0 31.168-17.2992 27.767467-34.144-3.4176-16.8704-19.383467-99.3472-21.2992-108.565334-1.924267-9.233067-12.469333-25.013333-31.170133-25.013333-15.761067 0-137.1072 0-137.1072 0-24.970667 0-32.520533-3.2704-49.224534-24.091733-16.718933-20.842667-166.946133-201.796267-166.946133-201.796267-1.521067-1.7536-3.008-1.245867-3.008 0.6656L275.68 725.5552c0 14.2592 12.3584 30.9824 30.888533 30.9824 0 0 391.921067 0 407.835734 0C729.412267 756.539733 743.441067 742.391467 739.6096 723.904z" horiz-adv-x="1024" />
|
||||
<glyph glyph-name="fnos" unicode="" d="M144.482434 896h730.821577c67.983402-28.323585 116.141145-76.481328 144.46473-144.46473v-730.821577c-28.323585-67.983402-76.481328-116.141145-144.46473-144.46473h-730.821577c-67.983402 28.323585-116.141145 76.481328-144.46473 144.46473v730.821577c28.323585 67.983402 76.481328 116.141145 144.46473 144.46473zM229.461687 632.564315c-1.665593-32.445079 1.164216-66.43678 8.497926-101.975103 17.990108-19.800166 40.654075-29.717245 67.983402-29.742739-18.63595-17.208299-27.133876-38.453112-25.493776-63.73444-84.486373 1.053743-117.058921 43.543369-97.726141 127.46888a431.320697 431.320697 0 0 0 46.738589 67.983402zM781.826833 632.564315c66.938158-53.536929 75.436083-114.44156 25.493776-182.705394a3226.917178 3226.917178 0 0 0-399.40249-12.746888v-237.941909h50.987552c-9.883087 77.900481 24.108614 109.062373 101.975104 93.477179a275.647203 275.647203 0 0 0 4.248962 67.983402 80.458357 80.458357 0 0 0 21.244813 12.746888 571.281527 571.281527 0 0 0 169.958507-4.248962c-32.436581-40.280166-74.926207-60.105826-127.46888-59.485477 11.149278-79.387618-22.842423-107.719701-101.975104-84.979254a347.871071 347.871071 0 0 0-4.248962-76.481327 59.273029 59.273029 0 0 0-29.742739-21.244814 361.14483 361.14483 0 0 0-110.473029 0 59.273029 59.273029 0 0 0-29.742739 21.244814 814.381676 814.381676 0 0 0-12.746888 161.460581 814.381676 814.381676 0 0 0 12.746888 161.46058 305.415436 305.415436 0 0 0 38.240664 29.742739l365.410789 8.497925c15.576697 4.248963 25.493776 14.166041 29.742738 29.742739 5.761593 31.62078 4.34244 62.782672-4.248962 93.477178z" horiz-adv-x="1024" />
|
||||
|
||||
<glyph glyph-name="ksyun" unicode="" d="M765.457 75.317c-3.34 0-6.63 0.215-9.937 0.354h5.055v0.086c-51.304 1.425-97.07 24.545-128.508 60.633l-0.591-0.035-3.1 4.473c-0.674 0.82-1.386 1.614-2.042 2.451l-9.393 13.59 0.185 0.173-6.552 9.444c-0.056-0.069-0.1-0.138-0.151-0.198l-89.26 129.086-0.221-0.026c-11.154 14.712-28.757 24.264-48.64 24.264-10.982 0-21.26-2.94-30.16-8.016a104.014 104.014 0 0 0 7.117-11.767l144.994-221.015 0.302 0.181c14.453-23.991 40.672-40.084 70.72-40.084 11.496 0 22.434 2.357 32.38 6.604-23.15-22.93-54.986-37.115-90.145-37.115-46.033 0-86.278 24.355-108.867 60.805h-0.289l-64.475 98.628c-35.82-55.668-98.126-92.628-169.227-92.628-1.675 0-3.294 0.208-4.957 0.251v0.111c-125.861 2.66-227.127 105.328-227.127 231.834 0 119.944 91 218.623 207.729 230.8 27.415 126.561 139.986 221.4 274.757 221.4 139.196 0 254.699-101.167 277.171-233.97 112.178-13.248 199.207-108.604 199.207-224.343 0-124.805-101.17-225.971-225.975-225.971z m0 360.781c-26.715 0-51.55-7.873-72.5-21.28a186.8 186.8 0 0 1 11.13 63.584c0 104.403-84.634 189.033-189.033 189.033s-189.032-84.63-189.032-189.033c0-16.603 2.261-32.652 6.324-47.967-20.082 11.072-43.142 17.409-67.695 17.409-77.566 0-140.448-62.882-140.448-140.444 0-77.571 62.882-140.448 140.448-140.448v-0.027c54.52 0 99.642 39.723 108.31 91.783 0.48 2.866 0.864 5.767 1.145 8.702 0.267 3.125 0.479 6.26 0.479 9.445 0 32.116-16.469 60.321-41.346 76.682 7.524 1.74 15.333 2.728 23.392 2.728 32.271 0 60.896-14.794 79.988-37.759 21.117 23.108 51.351 37.68 85.043 37.68 41.367 0 77.553-21.897 97.963-54.709h0.086l61.375-91.04c18.833-26.296 49.556-43.512 84.37-43.512v-0.44c74.454 0 134.811 60.348 134.811 134.802s-60.356 134.811-134.81 134.811z" horiz-adv-x="1024" />
|
||||
<glyph glyph-name="ksyun" unicode="" d="M718.5408 442.1632c-4.1984 0-8.3968 0.7168-12.5952 0.7168a103.8336 103.8336 0 0 1-67.8912-25.088 139.6736 139.6736 0 0 1 13.6192 60.3136 133.12 133.12 0 0 1-2.4576 25.7024 139.5712 139.5712 0 0 1-274.432 0 133.12 133.12 0 0 1-2.4576-25.7024 139.6736 139.6736 0 0 1 13.6192-60.3136 103.8336 103.8336 0 0 1-67.8912 25.088c-4.1984 0-8.3968 0-12.5952-0.7168a104.5504 104.5504 0 1 1 101.0688-159.4368 116.736 116.736 0 0 1 6.144 11.0592 105.1648 105.1648 0 0 1 4.9152 76.6976 62.6688 62.6688 0 0 0 27.3408-20.48l2.6624-3.8912a83.2512 83.2512 0 0 0 133.9392 3.3792l4.7104-6.8608 51.2-73.9328a84.0704 84.0704 0 0 1 62.464-34.6112h5.5296a104.5504 104.5504 0 0 1 12.5952 208.384zM512 896a512 512 0 1 1 512-512A512 512 0 0 1 512 896z m200.8064-732.3648h-6.8608a152.4736 152.4736 0 0 0-120.5248 58.9824S509.2352 331.3664 508.0064 332.8a42.1888 42.1888 0 0 1-32.4608 15.2576 40.96 40.96 0 0 1-24.064-7.5776l122.88-175.4112a62.5664 62.5664 0 0 1 77.0048-20.48A97.5872 97.5872 0 0 0 593.92 112.4352a97.0752 97.0752 0 0 0-95.5392 39.1168l-49.4592 70.656a174.8992 174.8992 0 1 0-143.36 290.5088 209.7152 209.7152 0 0 0 413.9008 0 174.7968 174.7968 0 0 0-6.144-349.0816z" horiz-adv-x="1024" />
|
||||
|
||||
<glyph glyph-name="cmcc" unicode="" d="M922.8575 285.75C845.75 386.25 730.625 489.45 698.8925 514.575 676.25 532.5 654.4625 541.5 632.6975 541.5a95.3025 95.3025 0 0 1-61.6575-25.125c-3.63-3.5925-9.0675-8.0775-15.4125-13.4625-45.3375-37.695-186.795-166.0275-190.4175-169.6125a58.9425 58.9425 0 0 0-39.9-16.155 69.2175 69.2175 0 0 0-43.5 20.64A1055.0475 1055.0475 0 0 0 166.625 447.27c-34.455 38.5875-63.4725 72.69-63.4725 72.69s-6.345-12.5625-9.975-22.4325a17.025 17.025 0 0 1 0.9075-14.3625C113.1275 456.24 199.25 354.8325 317.15 253.425A100.2675 100.2675 0 0 1 383.3375 226.5a95.3025 95.3025 0 0 1 61.6575 25.125c3.63 3.5925 9.0675 8.0775 15.4125 13.4625 45.3375 37.695 131.4825 115.77 171.375 152.565 9.0675 8.0775 15.4125 13.4625 18.135 16.155a58.9425 58.9425 0 0 0 39.9 16.155 74.295 74.295 0 0 0 43.5-20.64c25.3875-21.54 66.195-59.25 115.155-109.5 35.3625-37.695 63.4725-71.7975 63.4725-72.69 0 0 6.345 13.4625 9.975 22.4325a16.125 16.125 0 0 1 0.9375 16.185zM469.61 660.9525c-39.8025-28.95-202.635-180.0225-234.3-216.21a550.5 550.5 0 0 1 57-53.4 19.8 19.8 0 0 1 28.95 3.615c62.4225 63.3225 190.8825 176.4075 208.065 189.975 47.9475 40.71 104.94 44.325 155.595 6.33 124.8375-94.05 236.1075-241.5075 255.105-268.65 0 0 2.715 13.5675 4.5 25.3275a28.5975 28.5975 0 0 1-3.615 20.805c-117.6 169.1775-242.4225 274.11-290.37 300.345-54.2775 28.0425-117.6 38.0025-180.93-8.1375zM337.505 748.7025c-80.4825-65.13-184.5-161.025-210.75-189.975a706.5 706.5 0 0 1 50.6625-54.2775 11.1225 11.1225 0 0 1 17.19 1.8075c79.605 76.8975 165.5475 155.6025 216.2025 194.505 84.135 65.1375 183.645 71.4675 280.44-5.43a1192.665 1192.665 0 0 0 114.8925-104.94 1623 1623 0 0 0 141.12-180 206.505 206.505 0 0 1-4.5 37.995 57.8325 57.8325 0 0 1-5.43 14.475 857.025 857.025 0 0 1-100.4325 145.59C728.3375 735.135 660.4925 773.13 616.1675 796.65 557.36 826.5 444.2825 835.5525 337.505 748.7025zM554.6375 113.64c39.8025 28.95 202.6425 180 234.3 216.21a615.465 615.465 0 0 1-57 54.2775 19.8 19.8 0 0 1-28.95-3.615c-62.3925-63.3225-190.8525-176.4075-208.0425-189.975-47.9475-40.71-104.94-44.325-156.5025-6.33C213.605 278.2875 103.235 425.745 84.2375 453.7875c0 0-2.715-13.5675-4.5-25.3275a28.5975 28.5975 0 0 1 3.6-20.8125c117.6-169.1625 242.4375-274.11 290.385-300.36 54.2775-29.8275 117.6075-39.75 180.915 6.3525zM686.75 25.8975c80.5125 65.1375 184.545 161.025 210.75 189.975a706.5 706.5 0 0 1-50.6625 54.2775 11.1225 11.1225 0 0 1-17.19-1.8075C750.05 191.445 664.1075 112.74 613.4525 73.8375c-84.135-65.1375-183.645-71.4675-280.44 5.43a1192.6725 1192.6725 0 0 0-114.8925 104.9625A1623 1623 0 0 0 77 364.23a214.4325 214.4325 0 0 1 4.5-37.995 57.8325 57.8325 0 0 1 5.4525-14.505 857.025 857.025 0 0 1 100.4175-145.65c108.555-126.6 176.4-164.61 220.725-188.1 58.8075-29.8875 171.885-38.9325 278.655 47.9175z" horiz-adv-x="1024" />
|
||||
|
||||
<glyph glyph-name="xinnet" unicode="" d="M449.695 233.805h-88.57v26.492l74.139 5.63 9.618 22.795-127.737-8.113-0.617-2.771v-177.932l28.119 8.282 13.398 3.923v0.03l3.08 0.91v99.226h23.988v-112.394l44.58 13.168v99.226h8.25zM304.441 276.603h-48.809s-6.702 11.83-28.222 11.83c-21.525 0-27.389-11.83-27.389-11.83h-48.383v-21.643l141.504 0.102 11.299 21.541zM304.513 233.38h-20.7l7.837 14.765h-43.566l-11.614-14.934h-18.218l-10.865 14.861h-45.663l8.036-14.692h-18.233v-21.33h141.42zM161.927 164.311l-13.801-57.507h40.163l11.728 57.507zM256.84 164.311l9.477-55.332h38.3l-10.506 55.332zM304.733 194.389h-53.886v10.74h-44.438v-10.74h-54.771v-21.446h54.771v-48.318h-8.643v-0.111h-0.188v-24.631h13.742l39.527 24.954v48.106h42.296zM864.869 288.799H593.381v-188.916l44.496 12.932V265.246h188.049zM877.851 288.577l-44.705-26.382v-138.056h-36.295v-24.18h36.975l7.072 4.223 36.953 20zM734.63 248.512h-36.384l-8.753-21.764-9.535 24.053h-36.402l26.135-64.327-25.837-62.403h36.394l8.878 22.154 8.792-22.154h36.403l-25.344 62.403zM826.948 248.512H790.55l-9.685-24.121-9.843 23.793H734.63l26.974-62.699-25.413-61.414h36.394l9.023 22.51 7.39-18.144H825.4l-24.559 57.048zM380.676 634.375c0-18.175-13.885-32.909-30.973-32.909-17.115 0-30.994 14.734-30.994 32.909 0 18.184 13.879 32.903 30.994 32.903 17.088 0 30.973-14.719 30.973-32.903M708.995 555.937c-17.526 18.575-35.742 16.512-35.742 16.512h-101.77v-188.863h44.27V525.21h35.131s11.535 0.583 19.521-7.881c7.973-8.491 7.723-19.026 7.723-19.026v-114.718h44.496V519.638c-0.001 0 0.293 21.58-13.629 36.299M952.059 619.991h44.539v-214.982l-44.539-40.773zM923.821 565.444h100.994v-47.234H923.821zM327.123 502.904v-119.319h44.508V528.96c-11.426-8.281-26.541-17.127-44.508-26.056M208.431 456.805c-49.177-15.085-95.271-24.986-131.765-29.172l-27.514-44.048h100.25l26.299 53.23 23.829-53.23h100.255l-50.09 86.893c-13.222-4.714-26.999-9.32-41.264-13.673M384.299 570.887c-4.249 15.558-46.788 17.206-106.439 6.753 32.997 4.075 55.276 1.879 57.824-7.445 3.938-14.56-41.703-41.739-106.182-64.657l-4.818 8.344 75.1 135.905H199.53l-23.831-53.233-26.297 53.233H49.151l81.398-135.905-24.658-39.493c-33.66-4.29-56.458-2.133-59.02 7.278-2.77 10.262 18.963 26.743 54.58 43.6C37.942 498.585-3.402 470.228 1.158 453.44c6.298-23.116 97.141-15.564 202.949 16.861 105.786 32.439 186.461 77.47 180.192 100.586M873.015 443.356c-10.421-13.998-26.54-22.961-44.674-22.961-25.423 0-46.964 17.714-54.271 42.163h144.285a106.258 106.258 0 0 1 1.601 18.312c0 53.732-41.021 97.293-91.614 97.293-50.556 0-91.57-43.561-91.57-97.293 0-53.725 41.015-97.285 91.57-97.285 38.085 0 70.728 24.677 84.548 59.771h-39.875z m-44.674 98.009c25.456 0 47.013-17.729 54.296-42.172H774.069c7.308 24.443 28.849 42.172 54.272 42.172M533.527 555.937c-17.575 18.575-35.783 16.512-35.783 16.512h-101.78v-188.863h44.301V525.21h35.108s11.542 0.583 19.518-7.881c8.002-8.491 7.725-19.026 7.725-19.026v-114.718h44.495V519.638c-0.001 0 0.289 21.58-13.584 36.299M974.67 115.784c-22.534 0-40.867 18.328-40.867 40.857 0 22.528 18.333 40.856 40.867 40.856 22.529 0 40.857-18.328 40.857-40.856 0-22.529-18.328-40.857-40.857-40.857z m0 78.714c-20.88 0-37.867-16.982-37.867-37.856 0-20.875 16.987-37.857 37.867-37.857 20.875 0 37.857 16.982 37.857 37.857 0 20.874-16.982 37.856-37.857 37.856zM993.532 133.594h-6.949l-7.567 12.662c-1.512 2.532-2.896 4.255-4.152 5.167-1.256 0.913-2.758 1.37-4.505 1.37h-4.24v-19.199h-5.889v45.611h13.898c4.436 0 7.91-1.069 10.424-3.209 2.512-2.14 3.769-5.134 3.769-8.981 0-6.321-3.377-10.424-10.129-12.309v-0.146a9.343 9.343 0 0 0 3.253-2.268c0.913-0.981 2.096-2.66 3.549-5.035l8.538-13.663z m-27.414 40.459v-16.107h6.949c2.689 0 4.873 0.785 6.552 2.355s2.518 3.632 2.518 6.184c0 2.375-0.766 4.23-2.297 5.565s-3.759 2.003-6.684 2.003h-7.038z" horiz-adv-x="1024" />
|
||||
|
||||
<glyph glyph-name="ucloud" unicode="" d="M945.883 829.294v-592.457c0-191.927-150.162-342.09-342.089-342.09h-108.47c-191.927 0-342.09 150.163-342.09 342.09V562.249h100.06v91.794h83.456v83.383h66.78v-542.28A149.504 149.504 0 0 1 553.69 44.91h16.823a149.723 149.723 0 0 1 150.163 150.235V829.294h225.28z m-734.28-183.589v-58.441h-58.369v58.441h58.368z m83.455 91.721v-58.368h-50.03v58.368h50.03z m-83.383 0v-41.691h-50.102v41.691h50.03z m-91.794-8.265v-33.426H78.117v33.5h41.691z m275.31 100.133v-58.515H336.75V829.294h58.514z m-100.133-8.412v-41.691h-50.03V820.882h50.03z m-91.794 0v-33.353h-41.691V820.882h41.691z m-91.794-8.338v-25.015H78.117V812.544h33.353zM278.382 896v-25.015h-25.088V896h25.088z m-75.118 0v-25.015h-33.353V896h33.353z" horiz-adv-x="1024" />
|
||||
|
||||
<glyph glyph-name="four" unicode="" d="M769.629867 861.866667c0 0-438.0864 0-508.209067 0C191.287467 861.866667 170.666667 808.964267 170.666667 775.650133c0-33.3376 0-809.898667 0-809.898666 0-37.527467 20.106667-51.4496 31.3984-56.036267 11.304533-4.597333 42.487467-8.471467 61.169066 13.1584 0 0 239.933867 279.242667 244.053334 283.3792 6.231467 6.250667 6.231467 6.250667 12.4672 6.250667 12.4672 0 104.942933 0 155.236266 0 65.224533 0 75.712 46.653867 82.525867 74.1376 5.672533 23.016533 69.309867 349.7856 90.564267 453.4592C864.305067 819.214933 844.256 861.866667 769.629867 861.866667zM757.5168 286.641067c5.672533 23.016533 69.309867 349.7856 90.564267 453.4592M739.6096 723.904l-21.3312-110.365867c-2.549333-12.053333-17.678933-24.736-31.707733-24.736-14.026667 0-204.622933 0-204.622934 0C459.675733 588.8 443.733333 575.7056 443.733333 553.3824l0-28.689067c0-22.3424 16.040533-38.173867 38.325334-38.173866 0 0 158.894933 0 174.609066 0 15.7312 0 31.168-17.2992 27.767467-34.144-3.4176-16.8704-19.383467-99.3472-21.2992-108.565334-1.924267-9.233067-12.469333-25.013333-31.170133-25.013333-15.761067 0-137.1072 0-137.1072 0-24.970667 0-32.520533-3.2704-49.224534-24.091733-16.718933-20.842667-166.946133-201.796267-166.946133-201.796267-1.521067-1.7536-3.008-1.245867-3.008 0.6656L275.68 725.5552c0 14.2592 12.3584 30.9824 30.888533 30.9824 0 0 391.921067 0 407.835734 0C729.412267 756.539733 743.441067 742.391467 739.6096 723.904z" horiz-adv-x="1024" />
|
||||
|
||||
<glyph glyph-name="rainyun" unicode="" d="M718.134993 776.973274c-70.87597 0-133.984711-37.986607-175.005393-97.211733-25.971674 39.685689-67.113719 65.414637-113.595733 65.414637-70.390519 0-128.766104-58.861037-140.05286-135.926519h-54.49197c-83.13363 0-150.368711-77.308207-150.368711-172.699496 0-95.391289 67.356444-172.699496 150.368711-172.699496h483.145956c123.426133 0 223.429215 114.809363 223.429214 256.43994 0 141.873304-100.003081 256.682667-223.429214 256.682667zM718.134993 805.49357c-66.264178 0-128.644741-29.855289-175.005393-82.76954-30.70483 32.768-70.754607 50.972444-113.595733 50.972444-74.759585 0-139.081956-55.948326-160.077748-135.926518h-34.467082c-96.847644 0-175.612207-90.294044-175.612207-201.219793s78.764563-201.09843 175.612207-201.09843h483.145956c137.140148 0 248.672711 127.7952 248.672711 284.960237 0 157.2864-111.532563 285.0816-248.672711 285.0816z m0-513.001244H234.989037c-69.055526 0-125.246578 64.686459-125.246578 144.1792s56.191052 144.1792 125.246578 144.1792h54.49197c12.379022 0 22.816237 10.073126 24.879408 23.787141 9.466311 64.929185 58.011496 112.139378 115.173452 112.139377 37.015704 0 70.997333-19.6608 93.328118-53.885155 4.733156-7.160415 12.014933-11.408119 19.903526-11.529482 7.403141 0 15.291733 3.883615 20.146252 10.922667 37.986607 54.856059 94.420385 86.289067 155.101867 86.289067 109.34803 0 198.307081-102.308978 198.307081-228.041008 0.121363-125.73203-88.837689-228.041007-198.185718-228.041007zM216.056415 169.915733L66.658607-1.084681c-9.8304-11.165393-9.709037-29.248474 0.242726-40.292504 4.854519-5.461333 11.286756-8.252681 17.718993-8.252682 6.5536 0 12.985837 2.791348 17.961718 8.495408l149.397808 171.000415c9.8304 11.165393 9.709037 29.248474-0.242726 40.292503-9.951763 11.165393-25.971674 11.04403-35.680711-0.242726zM448.223763 170.158459c-9.951763 11.04403-25.850311 10.922667-35.680711-0.242726l-74.638222-85.439526c-9.8304-11.165393-9.709037-29.248474 0.242726-40.292503 4.854519-5.461333 11.286756-8.252681 17.718992-8.252682 6.5536 0 12.985837 2.791348 17.961719 8.495408l74.638222 85.439526c9.8304 11.286756 9.709037 29.248474-0.242726 40.292503zM808.793126 169.915733l-74.638222-85.439526c-9.8304-11.165393-9.709037-29.248474 0.242726-40.292503 4.854519-5.461333 11.286756-8.252681 17.718992-8.252682 6.5536 0 12.985837 2.791348 17.961719 8.495408l74.638222 85.439526c9.8304 11.165393 9.709037 29.248474-0.242726 40.292503-9.951763 11.165393-25.850311 11.04403-35.680711-0.242726zM612.427852 169.915733L463.030044-1.084681c-9.8304-11.165393-9.709037-29.248474 0.242726-40.292504 4.854519-5.461333 11.286756-8.252681 17.718993-8.252682 6.5536 0 12.985837 2.791348 17.961718 8.495408l149.276445 171.000415c9.8304 11.165393 9.709037 29.248474-0.242726 40.292503-9.8304 11.165393-25.850311 11.04403-35.559348-0.242726z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 86 KiB |
@@ -63,6 +63,9 @@ async function openFormDialog() {
|
||||
form: {
|
||||
value: true,
|
||||
helper: "是否给流水线随机设置一个时间",
|
||||
show: compute(({ form }) => {
|
||||
return form.clear !== true;
|
||||
}),
|
||||
component: {
|
||||
name: "fs-dict-switch",
|
||||
vModel: "checked",
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
"@midwayjs/upload": "3.20.13",
|
||||
"@midwayjs/validate": "3.20.13",
|
||||
"@peculiar/x509": "^1.11.0",
|
||||
"@ucloud-sdks/ucloud-sdk-js": "^0.2.4",
|
||||
"@volcengine/openapi": "^1.28.1",
|
||||
"ali-oss": "^6.21.0",
|
||||
"axios": "^1.7.2",
|
||||
|
||||
@@ -40,4 +40,5 @@ export * from './plugin-xinnet/index.js'
|
||||
export * from './plugin-xinnetconnet/index.js'
|
||||
export * from './plugin-oauth/index.js'
|
||||
export * from './plugin-cmcc/index.js'
|
||||
export * from './plugin-template/index.js'
|
||||
export * from './plugin-template/index.js'
|
||||
export * from './plugin-ucloud/index.js'
|
||||
@@ -1,9 +1,10 @@
|
||||
import { AccessInput, BaseAccess, IsAccess } from '@certd/pipeline';
|
||||
|
||||
export const AwsRegions = [
|
||||
{ label: 'cn-north-1', value: 'cn-north-1' },
|
||||
{ label: 'cn-northwest-1', value: 'cn-northwest-1' },
|
||||
{ label: '---------------', value: '--',disabled: true },
|
||||
{ label: '------中国区------', value: 'cn',disabled: true },
|
||||
{ label: '北京', value: 'cn-north-1' },
|
||||
{ label: '宁夏', value: 'cn-northwest-1' },
|
||||
{ label: '------海外-----', value: 'out',disabled: true },
|
||||
{ label: 'us-east-1', value: 'us-east-1' },
|
||||
{ label: 'us-east-2', value: 'us-east-2' },
|
||||
{ label: 'us-west-1', value: 'us-west-1' },
|
||||
@@ -72,7 +73,7 @@ export class AwsAccess extends BaseAccess {
|
||||
options: AwsRegions,
|
||||
},
|
||||
required: true,
|
||||
helper: '请选择您的默认AWS区域,默认us-east-1',
|
||||
helper: '请选择您的默认AWS区域,主要区分中国区还是海外区即可',
|
||||
options: AwsRegions,
|
||||
})
|
||||
region = '';
|
||||
|
||||
@@ -32,7 +32,7 @@ export class AwsRoute53Provider extends AbstractDnsProvider {
|
||||
fullRecord: fullRecord,
|
||||
type: type,
|
||||
value: value,
|
||||
action: 'CREATE',
|
||||
action: 'UPSERT',
|
||||
});
|
||||
return {
|
||||
hostedZoneId: ZoneId,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// 导入所需的 SDK 模块
|
||||
import { AwsAccess } from '../access.js';
|
||||
import { CertInfo } from '@certd/plugin-cert';
|
||||
import {ILogger, utils} from '@certd/basic';
|
||||
type AwsClientOptions = { access: AwsAccess; region: string, logger:ILogger };
|
||||
import { ILogger, utils } from '@certd/basic';
|
||||
type AwsClientOptions = { access: AwsAccess; region: string, logger: ILogger };
|
||||
|
||||
export class AwsClient {
|
||||
options: AwsClientOptions;
|
||||
@@ -52,24 +52,24 @@ export class AwsClient {
|
||||
});
|
||||
}
|
||||
|
||||
async route53GetHostedZoneId(name:string) :Promise<{ZoneId:string,ZoneName:string}> {
|
||||
async route53GetHostedZoneId(name: string): Promise<{ ZoneId: string, ZoneName: string }> {
|
||||
const hostedZones = await this.route53ListHostedZones(name);
|
||||
const zoneId = hostedZones[0].Id.replace('/hostedzone/','');
|
||||
const zoneId = hostedZones[0].Id.replace('/hostedzone/', '');
|
||||
this.logger.info(`获取到hostedZoneId:${zoneId},name:${hostedZones[0].Name}`);
|
||||
return {
|
||||
ZoneId: zoneId,
|
||||
ZoneName: hostedZones[0].Name,
|
||||
};
|
||||
}
|
||||
async route53ListHostedZones(name:string) :Promise<{Id:string,Name:string}[]> {
|
||||
const { ListHostedZonesByNameCommand } =await import("@aws-sdk/client-route-53"); // ES Modules import
|
||||
async route53ListHostedZones(name: string): Promise<{ Id: string, Name: string }[]> {
|
||||
const { ListHostedZonesByNameCommand } = await import("@aws-sdk/client-route-53"); // ES Modules import
|
||||
|
||||
const client = await this.route53ClientGet();
|
||||
const input = { // ListHostedZonesByNameRequest
|
||||
DNSName: name,
|
||||
};
|
||||
const command = new ListHostedZonesByNameCommand(input);
|
||||
const response = await this.doRequest(()=>client.send(command));
|
||||
const response = await this.doRequest(() => client.send(command));
|
||||
if (response.HostedZones.length === 0) {
|
||||
throw new Error(`找不到 HostedZone ${name}`);
|
||||
}
|
||||
@@ -77,9 +77,10 @@ export class AwsClient {
|
||||
return response.HostedZones;
|
||||
}
|
||||
|
||||
async route53ChangeRecord(req:{
|
||||
hostedZoneId:string,fullRecord:string,type:string, value:string, action:"CREATE"|"DELETE"}){
|
||||
const { ChangeResourceRecordSetsCommand} =await import("@aws-sdk/client-route-53"); // ES Modules import
|
||||
async route53ChangeRecord(req: {
|
||||
hostedZoneId: string, fullRecord: string, type: string, value: string, action: "UPSERT" | "DELETE"
|
||||
}) {
|
||||
const { ChangeResourceRecordSetsCommand } = await import("@aws-sdk/client-route-53"); // ES Modules import
|
||||
// const { Route53Client, ChangeResourceRecordSetsCommand } = require("@aws-sdk/client-route-53"); // CommonJS import
|
||||
// import type { Route53ClientConfig } from "@aws-sdk/client-route-53";
|
||||
const client = await this.route53ClientGet();
|
||||
@@ -88,9 +89,9 @@ export class AwsClient {
|
||||
ChangeBatch: { // ChangeBatch
|
||||
Changes: [ // Changes // required
|
||||
{ // Change
|
||||
Action: req.action as any , // required
|
||||
Action: req.action as any, // required
|
||||
ResourceRecordSet: { // ResourceRecordSet
|
||||
Name: req.fullRecord+".", // required
|
||||
Name: req.fullRecord, // required
|
||||
Type: req.type.toUpperCase() as any,
|
||||
ResourceRecords: [ // ResourceRecords
|
||||
{ // ResourceRecord
|
||||
@@ -103,9 +104,9 @@ export class AwsClient {
|
||||
],
|
||||
},
|
||||
};
|
||||
this.logger.info(`添加域名解析参数:${JSON.stringify(input)}`);
|
||||
this.logger.info(`设置域名解析参数:${JSON.stringify(input)}`);
|
||||
const command = new ChangeResourceRecordSetsCommand(input);
|
||||
const response = await this.doRequest(()=>client.send(command));
|
||||
const response = await this.doRequest(() => client.send(command));
|
||||
console.log('Add record successful:', JSON.stringify(response));
|
||||
await utils.sleep(3000);
|
||||
return response;
|
||||
@@ -120,10 +121,10 @@ export class AwsClient {
|
||||
// };*/
|
||||
}
|
||||
|
||||
async doRequest<T>(call:()=>Promise<T>):Promise<T>{
|
||||
try{
|
||||
async doRequest<T>(call: () => Promise<T>): Promise<T> {
|
||||
try {
|
||||
return await call();
|
||||
}catch(err){
|
||||
} catch (err) {
|
||||
this.logger.error(`调用接口失败:${err.Error?.Message || err.message},requestId:${err.requestId}`);
|
||||
throw err;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import { CmccClient } from "./cmcc-client.js";
|
||||
name: "cmcc",
|
||||
title: "中国移动CND授权",
|
||||
desc: "",
|
||||
icon: "clarity:plugin-line"
|
||||
icon: "svg:cmcc"
|
||||
})
|
||||
export class CmccAccess extends BaseAccess {
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import { CmccAccess } from "./access.js";
|
||||
name: "CmccDeployCertToCdn",
|
||||
title: "中国移动-部署证书到CDN",
|
||||
desc: "中国移动自动部署证书到CDN",
|
||||
icon: "svg:icon-lucky",
|
||||
icon: "svg:icon-cmcc",
|
||||
//插件分组
|
||||
group: pluginGroups.cdn.key,
|
||||
needPlus: true,
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
//命名规范,插件类型+功能(就是目录plugin-demo中的demo),大写字母开头,驼峰命名
|
||||
name: "FnOSDeployToNAS",
|
||||
title: "飞牛NAS-部署证书",
|
||||
icon: "svg:icon-lucky",
|
||||
icon: "svg:icon-fnos",
|
||||
//插件分组
|
||||
group: pluginGroups.panel.key,
|
||||
needPlus: false,
|
||||
|
||||
@@ -16,7 +16,7 @@ import {KsyunAccess} from "../access.js";
|
||||
name: "KsyunRefreshCert",
|
||||
title: "金山云-更新CDN证书",
|
||||
desc: "金山云自动更新CDN证书",
|
||||
icon: "svg:icon-lucky",
|
||||
icon: "svg:icon-ksyun",
|
||||
//插件分组
|
||||
group: pluginGroups.cdn.key,
|
||||
needPlus: false,
|
||||
|
||||
@@ -9,7 +9,7 @@ import { CertInfo } from "@certd/plugin-cert";
|
||||
name: "rainyun",
|
||||
title: "雨云授权",
|
||||
desc: "https://app.rainyun.com/",
|
||||
icon: "svg:icon-lucky",
|
||||
icon: "svg:icon-rainyun",
|
||||
order: 100
|
||||
})
|
||||
export class RainyunAccess extends BaseAccess {
|
||||
|
||||
@@ -6,7 +6,7 @@ import { RainyunAccess } from "./access.js";
|
||||
title: "雨云",
|
||||
desc: "雨云DNS解析提供商",
|
||||
accessType: "rainyun",
|
||||
icon: "svg:icon-lucky",
|
||||
icon: "svg:icon-rainyun",
|
||||
})
|
||||
export class RainyunDnsProvider extends AbstractDnsProvider {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import { RainyunAccess } from "../access.js";
|
||||
name: "RainyunRefreshCert",
|
||||
title: "雨云-更新证书",
|
||||
desc: "app.rainyun.com",
|
||||
icon: "svg:icon-lucky",
|
||||
icon: "svg:icon-rainyun",
|
||||
//插件分组
|
||||
group: pluginGroups.cdn.key,
|
||||
needPlus: false,
|
||||
|
||||
214
packages/ui/certd-server/src/plugins/plugin-ucloud/access.ts
Normal file
214
packages/ui/certd-server/src/plugins/plugin-ucloud/access.ts
Normal file
@@ -0,0 +1,214 @@
|
||||
import { IsAccess, AccessInput, BaseAccess } from '@certd/pipeline';
|
||||
import { CertInfo, CertReader } from '@certd/plugin-cert';
|
||||
|
||||
/**
|
||||
* 这个注解将注册一个授权配置
|
||||
* 在certd的后台管理系统中,用户可以选择添加此类型的授权
|
||||
*/
|
||||
@IsAccess({
|
||||
name: 'ucloud',
|
||||
title: 'UCloud授权',
|
||||
icon: 'svg:icon-ucloud',
|
||||
desc: '优刻得授权',
|
||||
})
|
||||
export class UCloudAccess extends BaseAccess {
|
||||
|
||||
/**
|
||||
* 授权属性配置
|
||||
*/
|
||||
@AccessInput({
|
||||
title: '项目Id',
|
||||
component: {
|
||||
placeholder: '项目Id',
|
||||
},
|
||||
helper: "[项目管理](https://console.ucloud.cn/uaccount/iam/project_manage)项目ID列获取",
|
||||
required: true,
|
||||
encrypt: false,
|
||||
})
|
||||
projectId = '';
|
||||
|
||||
|
||||
/**
|
||||
* 授权属性配置
|
||||
*/
|
||||
@AccessInput({
|
||||
title: '公钥',
|
||||
component: {
|
||||
placeholder: '公钥',
|
||||
},
|
||||
helper: "[Api管理](https://console.ucloud.cn/uaccount/api_manage)获取",
|
||||
required: true,
|
||||
encrypt: false,
|
||||
})
|
||||
publicKey = '';
|
||||
|
||||
@AccessInput({
|
||||
title: '私钥',
|
||||
component: {
|
||||
name: "a-input-password",
|
||||
vModel: "value",
|
||||
placeholder: '私钥',
|
||||
},
|
||||
required: true,
|
||||
encrypt: true,
|
||||
})
|
||||
privateKey = '';
|
||||
|
||||
|
||||
|
||||
@AccessInput({
|
||||
title: "测试",
|
||||
component: {
|
||||
name: "api-test",
|
||||
action: "TestRequest"
|
||||
},
|
||||
helper: "点击测试接口是否正常"
|
||||
})
|
||||
testRequest = true;
|
||||
|
||||
client: any;
|
||||
|
||||
async onTestRequest() {
|
||||
await this.ProjectList();
|
||||
return "ok";
|
||||
}
|
||||
|
||||
|
||||
async getClient() {
|
||||
if (this.client) {
|
||||
return this.client;
|
||||
}
|
||||
const { Client } = await import('@ucloud-sdks/ucloud-sdk-js');
|
||||
const client = new Client({
|
||||
config: {
|
||||
region: 'cn-bj2',
|
||||
projectId: this.projectId || "",
|
||||
baseUrl: "https://api.ucloud.cn"
|
||||
},
|
||||
credential: {
|
||||
publicKey: this.publicKey,
|
||||
privateKey: this.privateKey,
|
||||
}
|
||||
});
|
||||
this.client = client;
|
||||
return client
|
||||
}
|
||||
|
||||
async ProjectList() {
|
||||
const client = await this.getClient();
|
||||
const resp = await client.uaccount().getProjectList({
|
||||
"Action": "GetProjectList"
|
||||
});
|
||||
this.ctx.logger.info(`获取到项目列表:${JSON.stringify(resp)}`);
|
||||
return resp;
|
||||
}
|
||||
|
||||
async GetRegion() {
|
||||
const client = await this.getClient();
|
||||
const res = await client.uaccount().getRegion({
|
||||
"Action": "GetRegion"
|
||||
});
|
||||
this.ctx.logger.info(`获取到区域列表:${JSON.stringify(res)}`);
|
||||
return res;
|
||||
}
|
||||
|
||||
async CdnDominList(req: { PageNo: number, PageSize: number }) {
|
||||
const client = await this.getClient();
|
||||
const resp = await client.ucdn().getUcdnDomainInfoList({
|
||||
"Action": "GetUcdnDomainInfoList",
|
||||
"ProjectId": this.projectId || "",
|
||||
"PageNo": req.PageNo,
|
||||
"PageSize": req.PageSize,
|
||||
});
|
||||
this.ctx.logger.info(`获取到CDN域名列表:${JSON.stringify(resp)}`);
|
||||
return resp;
|
||||
}
|
||||
|
||||
async CdnAddCert(req: { certName: string, cert: CertInfo }) {
|
||||
const client = await this.getClient();
|
||||
const resp = await client.ucdn().addCertificate({
|
||||
"Action": "AddCertificate",
|
||||
"ProjectId": this.projectId || "",
|
||||
"CertName": req.certName,
|
||||
"UserCert": req.cert.crt,
|
||||
"PrivateKey": req.cert.key
|
||||
});
|
||||
this.ctx.logger.info(`添加CDN证书:${JSON.stringify(resp)}`);
|
||||
return resp;
|
||||
}
|
||||
|
||||
|
||||
async SslUploadCert(req: { cert: CertInfo }) {
|
||||
const { cert } = req
|
||||
/**
|
||||
&SslPublicKey=lXUzWbSR
|
||||
&SslCaKey=lXUzWbSR
|
||||
&SslMD5=lXUzWbSR
|
||||
&CertificateName=GoodCertcification
|
||||
*/
|
||||
const certReader = new CertReader(cert)
|
||||
const certName = certReader.buildCertName()
|
||||
const crtBase64 = this.ctx.utils.hash.base64(cert.crt)
|
||||
const keyBase64 = this.ctx.utils.hash.base64(cert.key)
|
||||
const allDomains = certReader.getAllDomains().join(",")
|
||||
|
||||
this.ctx.logger.info(`----------- 上传USSL证书,certName:${certName},domains:${allDomains}`);
|
||||
try {
|
||||
const resp = await this.invoke({
|
||||
Action: "UploadNormalCertificate",
|
||||
"SslPublicKey": crtBase64,
|
||||
"SslPrivateKey": keyBase64,
|
||||
"CertificateName": certName,
|
||||
"SslMD5": this.ctx.utils.hash.md5(crtBase64 + keyBase64)
|
||||
});
|
||||
this.ctx.logger.info(`----------- 上传USSL证书成功,certId:${resp.CertificateID}`);
|
||||
return { type: "ussl", id: resp.CertificateID, name: certName, resourceId: resp.LongResourceID,domains:allDomains }
|
||||
} catch (err) {
|
||||
|
||||
if(err.message.includes("重复上传证书")){
|
||||
//查找证书
|
||||
const certList = await this.SslGetCertList(certReader.getMainDomain());
|
||||
|
||||
const cert = certList.find((item: any) => item.Domains === allDomains)
|
||||
if(cert){
|
||||
this.ctx.logger.info(`----------- 找到已存在证书,certId:${cert.CertificateID}`);
|
||||
return { type: "ussl", id: cert.CertificateID, name: certName, domains: cert.Domains }
|
||||
}
|
||||
}
|
||||
|
||||
this.ctx.logger.error(`上传USSL证书失败:${err}`);
|
||||
throw err;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
async SslGetCertList(domain: string) {
|
||||
const resp = await this.invoke({
|
||||
Action: "GetCertificateList",
|
||||
Mode: "trust",
|
||||
Domain: domain,
|
||||
Sort:"2"
|
||||
});
|
||||
return resp.CertificateList||[];
|
||||
}
|
||||
|
||||
|
||||
async invoke(req: { Action: string, [key: string]: any }) {
|
||||
const { Request } = await import('@ucloud-sdks/ucloud-sdk-js');
|
||||
const client = await this.getClient();
|
||||
const resp = await client.invoke(new Request({
|
||||
...req
|
||||
}));
|
||||
this.ctx.logger.info(`请求UCloud API:${JSON.stringify(resp)}`);
|
||||
const res = resp.data || {}
|
||||
if (res.RetCode !== 0) {
|
||||
throw new Error(res.Message)
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
new UCloudAccess();
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from './access.js';
|
||||
export * from './plugins/index.js';
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from './plugin-deploy-to-cdn.js';
|
||||
export * from './plugin-upload-to-ussl.js';
|
||||
@@ -0,0 +1,189 @@
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, PageSearch, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||
import { CertApplyPluginNames, CertInfo } from "@certd/plugin-cert";
|
||||
import { createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from "@certd/plugin-lib";
|
||||
import { UCloudAccess } from "../access.js";
|
||||
|
||||
@IsTaskPlugin({
|
||||
//命名规范,插件类型+功能(就是目录plugin-demo中的demo),大写字母开头,驼峰命名
|
||||
name: "UCloudDeployToCDN",
|
||||
title: "UCloud-部署到CDN",
|
||||
desc: "将证书部署到UCloud CDN",
|
||||
icon: "svg:icon-ucloud",
|
||||
//插件分组
|
||||
group: pluginGroups.ucloud.key,
|
||||
needPlus: false,
|
||||
default: {
|
||||
//默认值配置照抄即可
|
||||
strategy: {
|
||||
runStrategy: RunStrategy.SkipWhenSucceed
|
||||
}
|
||||
}
|
||||
})
|
||||
//类名规范,跟上面插件名称(name)一致
|
||||
export class UCloudDeployToCDN extends AbstractTaskPlugin {
|
||||
//证书选择,此项必须要有
|
||||
@TaskInput({
|
||||
title: "域名证书",
|
||||
helper: "请选择前置任务输出的域名证书",
|
||||
component: {
|
||||
name: "output-selector",
|
||||
from: [...CertApplyPluginNames, ":UCloudCertId:"]
|
||||
}
|
||||
// required: true, // 必填
|
||||
})
|
||||
cert!: CertInfo | { type: string, id: number, name: string };
|
||||
|
||||
@TaskInput(createCertDomainGetterInputDefine({ props: { required: false } }))
|
||||
certDomains!: string[];
|
||||
|
||||
//授权选择框
|
||||
@TaskInput({
|
||||
title: "UCloud授权",
|
||||
component: {
|
||||
name: "access-selector",
|
||||
type: "ucloud" //固定授权类型
|
||||
},
|
||||
required: true //必填
|
||||
})
|
||||
accessId!: string;
|
||||
//
|
||||
|
||||
@TaskInput(
|
||||
createRemoteSelectInputDefine({
|
||||
title: "域名列表",
|
||||
helper: "要更新的UCloud域名列表",
|
||||
|
||||
action: UCloudDeployToCDN.prototype.onGetDomainList.name
|
||||
})
|
||||
)
|
||||
domainList!: string[];
|
||||
|
||||
//插件实例化时执行的方法
|
||||
async onInstance() {
|
||||
}
|
||||
|
||||
//插件执行方法
|
||||
async execute(): Promise<void> {
|
||||
const access = await this.getAccess<UCloudAccess>(this.accessId);
|
||||
let certType = "ussl"
|
||||
let certId = 0
|
||||
let certName = this.appendTimeSuffix("certd")
|
||||
// @ts-ignore
|
||||
if (this.cert?.id) {
|
||||
//从上一步传过来的ssl证书
|
||||
// @ts-ignore
|
||||
certId = this.cert.id
|
||||
// @ts-ignore
|
||||
certName = this.cert.name
|
||||
|
||||
} else {
|
||||
const cert = await access.SslUploadCert({
|
||||
cert: this.cert as CertInfo
|
||||
});
|
||||
certId = cert.id
|
||||
certName = cert.name
|
||||
}
|
||||
|
||||
for (const item of this.domainList) {
|
||||
this.logger.info(`----------- 开始更新域名:${item}`);
|
||||
await this.deployToCdn({
|
||||
access: access,
|
||||
certName: certName,
|
||||
domain: item,
|
||||
certId: certId,
|
||||
certType: certType
|
||||
});
|
||||
this.logger.info(`----------- 更新域名证书${item}成功`);
|
||||
}
|
||||
|
||||
this.logger.info("部署完成");
|
||||
}
|
||||
|
||||
|
||||
async deployToCdn(req: { access: any, domain: string, certId: number, certType: string, certName: string }) {
|
||||
const { access, domain, certId, certType, certName } = req
|
||||
|
||||
const domainsRes = await access.invoke({
|
||||
"Action": "GetUcdnDomainConfig",
|
||||
"ProjectId": access.projectId,
|
||||
"Domain": [
|
||||
domain
|
||||
]
|
||||
});
|
||||
|
||||
const domainList = domainsRes.DomainList || [];
|
||||
const domainConf = domainList.find((item: any) => item.Domain === domain);
|
||||
if (!domainConf) {
|
||||
throw new Error(`没有找到CDN域名${domain}`);
|
||||
}
|
||||
|
||||
const domainId = domainConf.DomainId;
|
||||
const httpsStatusAbroad = domainConf.HttpsStatusAbroad;
|
||||
let httpsStatusCn = domainConf.HttpsStatusCn;
|
||||
if (httpsStatusAbroad === "disable" && httpsStatusCn === "disable") {
|
||||
this.logger.info(`原CDN域名HTTPS未开启,将开启国内加速`);
|
||||
httpsStatusCn = "enable"
|
||||
}
|
||||
|
||||
|
||||
const body: any = {
|
||||
"Action": "UpdateUcdnDomainHttpsConfigV2",
|
||||
"DomainId": domainId,
|
||||
"CertName": certName,
|
||||
"CertId": certId,
|
||||
"CertType": certType,
|
||||
EnableHttp2: domainConf.EnableHttp2 ||"0",
|
||||
RedirectHttp2Https: domainConf.RedirectHttp2Https || "0",
|
||||
TlsVersion: domainConf.TlsVersion || "tlsv1.0,tlsv1.1,tlsv1.2,tlsv1.3"
|
||||
}
|
||||
if (httpsStatusAbroad === "enable") {
|
||||
body.HttpsStatusAbroad = httpsStatusAbroad;
|
||||
}
|
||||
if (httpsStatusCn === "enable") {
|
||||
body.HttpsStatusCn = httpsStatusCn;
|
||||
}
|
||||
this.logger.info(`----------- 更新CDN域名HTTPS配置${domainId},${JSON.stringify(body)}`);
|
||||
const resp = await access.invoke(body);
|
||||
this.logger.info(`----------- 部署CDN证书${domainId}成功,${JSON.stringify(resp)}`);
|
||||
}
|
||||
|
||||
async onGetDomainList(req: PageSearch = {}) {
|
||||
const access = await this.getAccess<UCloudAccess>(this.accessId);
|
||||
|
||||
const pageNo = req.pageNo ?? 1;
|
||||
const pageSize = req.pageSize ?? 100;
|
||||
const res = await access.CdnDominList(
|
||||
{
|
||||
PageNo: pageNo,
|
||||
PageSize: pageSize
|
||||
}
|
||||
);
|
||||
const total = res.TotalCount;
|
||||
const list = res.DomainInfoList || [];
|
||||
if (!list || list.length === 0) {
|
||||
throw new Error("没有找到CDN域名,请先在控制台创建CDN域名");
|
||||
}
|
||||
|
||||
/**
|
||||
* "Domain": "ucloud.certd.handsfree.work",
|
||||
"DomainId": "ucdn-1kwdtph5ygbb"
|
||||
*/
|
||||
const options = list.map((item: any) => {
|
||||
return {
|
||||
label: `${item.Domain}<${item.DomainId}>`,
|
||||
value: `${item.Domain}`,
|
||||
domain: item.Domain
|
||||
};
|
||||
});
|
||||
return {
|
||||
list: this.ctx.utils.options.buildGroupOptions(options, this.certDomains),
|
||||
total: total,
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//实例化一下,注册插件
|
||||
new UCloudDeployToCDN();
|
||||
@@ -0,0 +1,189 @@
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, PageSearch, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||
import { CertApplyPluginNames, CertInfo } from "@certd/plugin-cert";
|
||||
import { createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from "@certd/plugin-lib";
|
||||
import { UCloudAccess } from "../access.js";
|
||||
|
||||
@IsTaskPlugin({
|
||||
//命名规范,插件类型+功能(就是目录plugin-demo中的demo),大写字母开头,驼峰命名
|
||||
name: "UCloudDeployToWaf",
|
||||
title: "UCloud-部署到WAF",
|
||||
desc: "将证书部署到UCloud WAF",
|
||||
icon: "svg:icon-ucloud",
|
||||
//插件分组
|
||||
group: pluginGroups.ucloud.key,
|
||||
needPlus: false,
|
||||
default: {
|
||||
//默认值配置照抄即可
|
||||
strategy: {
|
||||
runStrategy: RunStrategy.SkipWhenSucceed
|
||||
}
|
||||
}
|
||||
})
|
||||
//类名规范,跟上面插件名称(name)一致
|
||||
export class UCloudDeployToCDN extends AbstractTaskPlugin {
|
||||
//证书选择,此项必须要有
|
||||
@TaskInput({
|
||||
title: "域名证书",
|
||||
helper: "请选择前置任务输出的域名证书",
|
||||
component: {
|
||||
name: "output-selector",
|
||||
from: [...CertApplyPluginNames, ":UCloudCertId:"]
|
||||
}
|
||||
// required: true, // 必填
|
||||
})
|
||||
cert!: CertInfo | { type: string, id: number, name: string };
|
||||
|
||||
@TaskInput(createCertDomainGetterInputDefine({ props: { required: false } }))
|
||||
certDomains!: string[];
|
||||
|
||||
//授权选择框
|
||||
@TaskInput({
|
||||
title: "UCloud授权",
|
||||
component: {
|
||||
name: "access-selector",
|
||||
type: "ucloud" //固定授权类型
|
||||
},
|
||||
required: true //必填
|
||||
})
|
||||
accessId!: string;
|
||||
//
|
||||
|
||||
@TaskInput(
|
||||
createRemoteSelectInputDefine({
|
||||
title: "域名列表",
|
||||
helper: "要更新的UCloud域名列表",
|
||||
|
||||
action: UCloudDeployToCDN.prototype.onGetDomainList.name
|
||||
})
|
||||
)
|
||||
domainList!: string[];
|
||||
|
||||
//插件实例化时执行的方法
|
||||
async onInstance() {
|
||||
}
|
||||
|
||||
//插件执行方法
|
||||
async execute(): Promise<void> {
|
||||
const access = await this.getAccess<UCloudAccess>(this.accessId);
|
||||
let certType = "ussl"
|
||||
let certId = 0
|
||||
let certName = this.appendTimeSuffix("certd")
|
||||
// @ts-ignore
|
||||
if (this.cert?.id) {
|
||||
//从上一步传过来的ssl证书
|
||||
// @ts-ignore
|
||||
certId = this.cert.id
|
||||
// @ts-ignore
|
||||
certName = this.cert.name
|
||||
|
||||
} else {
|
||||
const cert = await access.SslUploadCert({
|
||||
cert: this.cert as CertInfo
|
||||
});
|
||||
certId = cert.id
|
||||
certName = cert.name
|
||||
}
|
||||
|
||||
for (const item of this.domainList) {
|
||||
this.logger.info(`----------- 开始更新域名:${item}`);
|
||||
await this.deployToCdn({
|
||||
access: access,
|
||||
certName: certName,
|
||||
domain: item,
|
||||
certId: certId,
|
||||
certType: certType
|
||||
});
|
||||
this.logger.info(`----------- 更新域名证书${item}成功`);
|
||||
}
|
||||
|
||||
this.logger.info("部署完成");
|
||||
}
|
||||
|
||||
|
||||
async deployToCdn(req: { access: any, domain: string, certId: number, certType: string, certName: string }) {
|
||||
const { access, domain, certId, certType, certName } = req
|
||||
|
||||
const domainsRes = await access.invoke({
|
||||
"Action": "GetUcdnDomainConfig",
|
||||
"ProjectId": access.projectId,
|
||||
"Domain": [
|
||||
domain
|
||||
]
|
||||
});
|
||||
|
||||
const domainList = domainsRes.DomainList || [];
|
||||
const domainConf = domainList.find((item: any) => item.Domain === domain);
|
||||
if (!domainConf) {
|
||||
throw new Error(`没有找到CDN域名${domain}`);
|
||||
}
|
||||
|
||||
const domainId = domainConf.DomainId;
|
||||
const httpsStatusAbroad = domainConf.HttpsStatusAbroad;
|
||||
let httpsStatusCn = domainConf.HttpsStatusCn;
|
||||
if (httpsStatusAbroad === "disable" && httpsStatusCn === "disable") {
|
||||
this.logger.info(`原CDN域名HTTPS未开启,将开启国内加速`);
|
||||
httpsStatusCn = "enable"
|
||||
}
|
||||
|
||||
|
||||
const body: any = {
|
||||
"Action": "UpdateUcdnDomainHttpsConfigV2",
|
||||
"DomainId": domainId,
|
||||
"CertName": certName,
|
||||
"CertId": certId,
|
||||
"CertType": certType,
|
||||
EnableHttp2: domainConf.EnableHttp2 ||"0",
|
||||
RedirectHttp2Https: domainConf.RedirectHttp2Https || "0",
|
||||
TlsVersion: domainConf.TlsVersion || "tlsv1.0,tlsv1.1,tlsv1.2,tlsv1.3"
|
||||
}
|
||||
if (httpsStatusAbroad === "enable") {
|
||||
body.HttpsStatusAbroad = httpsStatusAbroad;
|
||||
}
|
||||
if (httpsStatusCn === "enable") {
|
||||
body.HttpsStatusCn = httpsStatusCn;
|
||||
}
|
||||
this.logger.info(`----------- 更新CDN域名HTTPS配置${domainId},${JSON.stringify(body)}`);
|
||||
const resp = await access.invoke(body);
|
||||
this.logger.info(`----------- 部署CDN证书${domainId}成功,${JSON.stringify(resp)}`);
|
||||
}
|
||||
|
||||
async onGetDomainList(req: PageSearch = {}) {
|
||||
const access = await this.getAccess<UCloudAccess>(this.accessId);
|
||||
|
||||
const pageNo = req.pageNo ?? 1;
|
||||
const pageSize = req.pageSize ?? 100;
|
||||
const res = await access.CdnDominList(
|
||||
{
|
||||
PageNo: pageNo,
|
||||
PageSize: pageSize
|
||||
}
|
||||
);
|
||||
const total = res.TotalCount;
|
||||
const list = res.DomainInfoList || [];
|
||||
if (!list || list.length === 0) {
|
||||
throw new Error("没有找到CDN域名,请先在控制台创建CDN域名");
|
||||
}
|
||||
|
||||
/**
|
||||
* "Domain": "ucloud.certd.handsfree.work",
|
||||
"DomainId": "ucdn-1kwdtph5ygbb"
|
||||
*/
|
||||
const options = list.map((item: any) => {
|
||||
return {
|
||||
label: `${item.Domain}<${item.DomainId}>`,
|
||||
value: `${item.Domain}`,
|
||||
domain: item.Domain
|
||||
};
|
||||
});
|
||||
return {
|
||||
list: this.ctx.utils.options.buildGroupOptions(options, this.certDomains),
|
||||
total: total,
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//实例化一下,注册插件
|
||||
new UCloudDeployToCDN();
|
||||
@@ -0,0 +1,73 @@
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput, TaskOutput } from "@certd/pipeline";
|
||||
import { CertApplyPluginNames, CertInfo } from "@certd/plugin-cert";
|
||||
import { UCloudAccess } from "../access.js";
|
||||
|
||||
@IsTaskPlugin({
|
||||
//命名规范,插件类型+功能(就是目录plugin-demo中的demo),大写字母开头,驼峰命名
|
||||
name: "UCloudUploadToUSSL",
|
||||
title: "UCloud-上传到USSL",
|
||||
desc: "将证书上传到UCloud USSL",
|
||||
icon: "svg:icon-ucloud",
|
||||
//插件分组
|
||||
group: pluginGroups.ucloud.key,
|
||||
needPlus: false,
|
||||
default: {
|
||||
//默认值配置照抄即可
|
||||
strategy: {
|
||||
runStrategy: RunStrategy.SkipWhenSucceed
|
||||
}
|
||||
}
|
||||
})
|
||||
//类名规范,跟上面插件名称(name)一致
|
||||
export class UCloudUploadToUSSL extends AbstractTaskPlugin {
|
||||
//证书选择,此项必须要有
|
||||
@TaskInput({
|
||||
title: "域名证书",
|
||||
helper: "请选择前置任务输出的域名证书",
|
||||
component: {
|
||||
name: "output-selector",
|
||||
from: [...CertApplyPluginNames]
|
||||
}
|
||||
// required: true, // 必填
|
||||
})
|
||||
cert!: CertInfo;
|
||||
|
||||
|
||||
|
||||
//授权选择框
|
||||
@TaskInput({
|
||||
title: "UCloud授权",
|
||||
component: {
|
||||
name: "access-selector",
|
||||
type: "ucloud" //固定授权类型
|
||||
},
|
||||
required: true //必填
|
||||
})
|
||||
accessId!: string;
|
||||
//
|
||||
|
||||
@TaskOutput({
|
||||
title: "证书ID",
|
||||
type: "UCloudCertId",
|
||||
})
|
||||
certId!: {type:string,id:number,name:string};
|
||||
|
||||
|
||||
//插件实例化时执行的方法
|
||||
async onInstance() {
|
||||
}
|
||||
|
||||
//插件执行方法
|
||||
async execute(): Promise<void> {
|
||||
const access = await this.getAccess<UCloudAccess>(this.accessId);
|
||||
const certId = await access.SslUploadCert({cert:this.cert});
|
||||
this.certId = certId;
|
||||
this.logger.info("部署完成");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//实例化一下,注册插件
|
||||
new UCloudUploadToUSSL();
|
||||
@@ -10,7 +10,7 @@ import { CertInfo } from "@certd/plugin-cert";
|
||||
name: "wangsu",
|
||||
title: "网宿授权",
|
||||
desc: "",
|
||||
icon: "svg:icon-lucky"
|
||||
icon: "svg:icon-wangsu"
|
||||
})
|
||||
export class WangsuAccess extends BaseAccess {
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import { WangsuAccess } from "../access.js";
|
||||
name: "WangsuRefreshCert",
|
||||
title: "网宿-更新证书",
|
||||
desc: "网宿证书自动更新",
|
||||
icon: "svg:icon-lucky",
|
||||
icon: "svg:icon-wangsu",
|
||||
//插件分组
|
||||
group: pluginGroups.cdn.key,
|
||||
needPlus: false,
|
||||
|
||||
@@ -7,7 +7,7 @@ import crypto from "crypto";
|
||||
@IsAccess({
|
||||
name: "xinnetagent",
|
||||
title: "新网授权(代理方式)",
|
||||
icon: "lsicon:badge-new-filled",
|
||||
icon: "svg:icon-xinnet",
|
||||
desc: ""
|
||||
})
|
||||
export class XinnetAgentAccess extends BaseAccess {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { XinnetClient } from "@certd/plugin-plus";
|
||||
@IsAccess({
|
||||
name: "xinnet",
|
||||
title: "新网授权",
|
||||
icon: "lsicon:badge-new-filled",
|
||||
icon: "svg:icon-xinnet",
|
||||
desc: ""
|
||||
})
|
||||
export class XinnetAccess extends BaseAccess {
|
||||
|
||||
@@ -11,7 +11,7 @@ export type XinnetAgentRecord = {
|
||||
name: "xinnetagent",
|
||||
title: "新网(代理方式)",
|
||||
desc: "新网域名解析(代理方式)",
|
||||
icon: "lsicon:badge-new-filled",
|
||||
icon: "svg:icon-xinnet",
|
||||
// 这里是对应的 cloudflare的access类型名称
|
||||
accessType: "xinnetagent",
|
||||
order: 7
|
||||
|
||||
@@ -16,7 +16,7 @@ export type XinnetRecord = {
|
||||
name: "xinnet",
|
||||
title: "新网",
|
||||
desc: "新网域名解析",
|
||||
icon: "lsicon:badge-new-filled",
|
||||
icon: "svg:icon-xinnet",
|
||||
// 这里是对应的 cloudflare的access类型名称
|
||||
accessType: "xinnet",
|
||||
order: 7
|
||||
|
||||
@@ -7,7 +7,7 @@ import { IsAccess, AccessInput, BaseAccess } from '@certd/pipeline';
|
||||
@IsAccess({
|
||||
name: 'xinnetconnect',
|
||||
title: '新网互联授权',
|
||||
icon: 'lsicon:badge-new-filled',
|
||||
icon: 'svg:icon-xinnet',
|
||||
desc: '仅支持代理账号,ip需要加入白名单',
|
||||
})
|
||||
export class XinnetConnectAccess extends BaseAccess {
|
||||
|
||||
@@ -14,7 +14,7 @@ export type XinnetConnectRecord = {
|
||||
name: 'xinnetconnect',
|
||||
title: '新网互联',
|
||||
desc: '新网互联',
|
||||
icon: 'lsicon:badge-new-filled',
|
||||
icon: 'svg:icon-xinnet',
|
||||
// 这里是对应的 cloudflare的access类型名称
|
||||
accessType: 'xinnetconnect',
|
||||
order:999,
|
||||
|
||||
127
pnpm-lock.yaml
generated
127
pnpm-lock.yaml
generated
@@ -214,7 +214,7 @@ importers:
|
||||
version: link:../basic
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.37.16
|
||||
version: 1.37.16
|
||||
version: link:../../pro/plus-core
|
||||
dayjs:
|
||||
specifier: ^1.11.7
|
||||
version: 1.11.13
|
||||
@@ -462,7 +462,7 @@ importers:
|
||||
version: link:../../plugins/plugin-lib
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.37.16
|
||||
version: 1.37.16
|
||||
version: link:../../pro/plus-core
|
||||
'@midwayjs/cache':
|
||||
specifier: 3.14.0
|
||||
version: 3.14.0
|
||||
@@ -783,19 +783,19 @@ importers:
|
||||
packages/pro/commercial-core:
|
||||
dependencies:
|
||||
'@certd/basic':
|
||||
specifier: ^1.37.15
|
||||
specifier: ^1.37.16
|
||||
version: link:../../core/basic
|
||||
'@certd/lib-server':
|
||||
specifier: ^1.37.15
|
||||
specifier: ^1.37.16
|
||||
version: link:../../libs/lib-server
|
||||
'@certd/pipeline':
|
||||
specifier: ^1.37.15
|
||||
specifier: ^1.37.16
|
||||
version: link:../../core/pipeline
|
||||
'@certd/plugin-plus':
|
||||
specifier: ^1.37.15
|
||||
specifier: ^1.37.16
|
||||
version: link:../plugin-plus
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.37.15
|
||||
specifier: ^1.37.16
|
||||
version: link:../plus-core
|
||||
'@midwayjs/core':
|
||||
specifier: 3.20.11
|
||||
@@ -880,22 +880,22 @@ importers:
|
||||
specifier: ^1.0.2
|
||||
version: 1.0.3
|
||||
'@certd/basic':
|
||||
specifier: ^1.37.15
|
||||
specifier: ^1.37.16
|
||||
version: link:../../core/basic
|
||||
'@certd/lib-k8s':
|
||||
specifier: ^1.37.15
|
||||
specifier: ^1.37.16
|
||||
version: link:../../libs/lib-k8s
|
||||
'@certd/pipeline':
|
||||
specifier: ^1.37.15
|
||||
specifier: ^1.37.16
|
||||
version: link:../../core/pipeline
|
||||
'@certd/plugin-cert':
|
||||
specifier: ^1.37.15
|
||||
specifier: ^1.37.16
|
||||
version: link:../../plugins/plugin-cert
|
||||
'@certd/plugin-lib':
|
||||
specifier: ^1.37.15
|
||||
specifier: ^1.37.16
|
||||
version: link:../../plugins/plugin-lib
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.37.15
|
||||
specifier: ^1.37.16
|
||||
version: link:../plus-core
|
||||
ali-oss:
|
||||
specifier: ^6.21.0
|
||||
@@ -998,7 +998,7 @@ importers:
|
||||
packages/pro/plus-core:
|
||||
dependencies:
|
||||
'@certd/basic':
|
||||
specifier: ^1.37.15
|
||||
specifier: ^1.37.16
|
||||
version: link:../../core/basic
|
||||
dayjs:
|
||||
specifier: ^1.11.7
|
||||
@@ -1490,7 +1490,7 @@ importers:
|
||||
version: link:../../core/basic
|
||||
'@certd/commercial-core':
|
||||
specifier: ^1.37.16
|
||||
version: 1.37.16(better-sqlite3@11.10.0)(encoding@0.1.13)(mysql2@3.14.1)(pg@8.16.0)(reflect-metadata@0.2.2)(ts-node@10.9.2(@types/node@18.19.100)(typescript@5.8.3))
|
||||
version: link:../../pro/commercial-core
|
||||
'@certd/cv4pve-api-javascript':
|
||||
specifier: ^8.4.2
|
||||
version: 8.4.2
|
||||
@@ -1520,10 +1520,10 @@ importers:
|
||||
version: link:../../plugins/plugin-lib
|
||||
'@certd/plugin-plus':
|
||||
specifier: ^1.37.16
|
||||
version: 1.37.16(encoding@0.1.13)
|
||||
version: link:../../pro/plugin-plus
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.37.16
|
||||
version: 1.37.16
|
||||
version: link:../../pro/plus-core
|
||||
'@huaweicloud/huaweicloud-sdk-cdn':
|
||||
specifier: ^3.1.120
|
||||
version: 3.1.149
|
||||
@@ -1569,6 +1569,9 @@ importers:
|
||||
'@peculiar/x509':
|
||||
specifier: ^1.11.0
|
||||
version: 1.12.3
|
||||
'@ucloud-sdks/ucloud-sdk-js':
|
||||
specifier: ^0.2.4
|
||||
version: 0.2.4
|
||||
'@volcengine/openapi':
|
||||
specifier: ^1.28.1
|
||||
version: 1.30.1(buffer@6.0.3)
|
||||
@@ -2876,18 +2879,9 @@ packages:
|
||||
'@better-scroll/zoom@2.5.1':
|
||||
resolution: {integrity: sha512-aGvFY5ooeZWS4RcxQLD+pGLpQHQxpPy0sMZV3yadcd2QK53PK9gS4Dp+BYfRv8lZ4/P2LoNEhr6Wq1DN6+uPlA==}
|
||||
|
||||
'@certd/commercial-core@1.37.16':
|
||||
resolution: {integrity: sha512-JH6wlx88ljh2m2QiTJ1dvI/Up3jjOTEQqD/x3cfVmXHYfT//QFIL/O6cRIFKLWxN5Q+0k4YHmCDw/DI+WWdwlQ==}
|
||||
|
||||
'@certd/cv4pve-api-javascript@8.4.2':
|
||||
resolution: {integrity: sha512-udGce7ewrVl4DmZvX+17PjsnqsdDIHEDatr8QP0AVrY2p+8JkaSPW4mXCKiLGf82C9K2+GXgT+qNIqgW7tfF9Q==}
|
||||
|
||||
'@certd/plugin-plus@1.37.16':
|
||||
resolution: {integrity: sha512-lzxyHyq9K+sDDFlPICs/0/W1nODvxTwk7N+qI1gskTbNpPt5CY1b47sPhwLb6oRTeW2/8iVdmt283GECFEAXXg==}
|
||||
|
||||
'@certd/plus-core@1.37.16':
|
||||
resolution: {integrity: sha512-PAyDMlLy/r5kx03A6pH4ICUAdPR9WZroGOx/ivJJo0Auk07uHU/kyXMfSCB6LytUHH0tOy36K+zuTCTdGr2NOA==}
|
||||
|
||||
'@certd/vue-js-cron-core@6.0.3':
|
||||
resolution: {integrity: sha512-kqzoAMhYz9j6FGNWEODRYtt4NpUEUwjpkU89z5WVg2tCtOcI5VhwyUGOd8AxiBCRfd6PtXvzuqw85PaOps9wrQ==}
|
||||
|
||||
@@ -5364,6 +5358,9 @@ packages:
|
||||
resolution: {integrity: sha512-ar0tjQfObzhSaW3C3QNmTc5ofj0hDoNQ5XWrCy6zDyabdr0TWhCkClp+rywGNj/odAFBVzzJrK4tEq5M4Hmu4w==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@ucloud-sdks/ucloud-sdk-js@0.2.4':
|
||||
resolution: {integrity: sha512-jAE8IEagtLXoj172/YMmwnMHDH+DlwgvSmMYtEge618oa/Wkn1BwSofRAx1r5afjBkDGLRdGN9+X+53Y+akqag==}
|
||||
|
||||
'@ungap/structured-clone@1.3.0':
|
||||
resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==}
|
||||
|
||||
@@ -15440,84 +15437,12 @@ snapshots:
|
||||
dependencies:
|
||||
'@better-scroll/core': 2.5.1
|
||||
|
||||
'@certd/commercial-core@1.37.16(better-sqlite3@11.10.0)(encoding@0.1.13)(mysql2@3.14.1)(pg@8.16.0)(reflect-metadata@0.2.2)(ts-node@10.9.2(@types/node@18.19.100)(typescript@5.8.3))':
|
||||
dependencies:
|
||||
'@certd/basic': link:packages/core/basic
|
||||
'@certd/lib-server': link:packages/libs/lib-server
|
||||
'@certd/pipeline': link:packages/core/pipeline
|
||||
'@certd/plugin-plus': 1.37.16(encoding@0.1.13)
|
||||
'@certd/plus-core': 1.37.16
|
||||
'@midwayjs/core': 3.20.11
|
||||
'@midwayjs/koa': 3.20.13
|
||||
'@midwayjs/logger': 3.4.2
|
||||
'@midwayjs/typeorm': 3.20.11
|
||||
alipay-sdk: 4.14.0
|
||||
dayjs: 1.11.13
|
||||
typeorm: 0.3.24(better-sqlite3@11.10.0)(mysql2@3.14.1)(pg@8.16.0)(reflect-metadata@0.2.2)(ts-node@10.9.2(@types/node@18.19.100)(typescript@5.8.3))
|
||||
wechatpay-node-v3: 2.2.1
|
||||
transitivePeerDependencies:
|
||||
- '@google-cloud/spanner'
|
||||
- '@sap/hana-client'
|
||||
- babel-plugin-macros
|
||||
- better-sqlite3
|
||||
- encoding
|
||||
- hdb-pool
|
||||
- ioredis
|
||||
- mongodb
|
||||
- mssql
|
||||
- mysql2
|
||||
- oracledb
|
||||
- pg
|
||||
- pg-native
|
||||
- pg-query-stream
|
||||
- proxy-agent
|
||||
- redis
|
||||
- reflect-metadata
|
||||
- sql.js
|
||||
- sqlite3
|
||||
- supports-color
|
||||
- ts-node
|
||||
- typeorm-aurora-data-api-driver
|
||||
|
||||
'@certd/cv4pve-api-javascript@8.4.2':
|
||||
dependencies:
|
||||
debug: 4.4.1(supports-color@8.1.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@certd/plugin-plus@1.37.16(encoding@0.1.13)':
|
||||
dependencies:
|
||||
'@alicloud/pop-core': 1.8.0
|
||||
'@baiducloud/sdk': 1.0.3
|
||||
'@certd/basic': link:packages/core/basic
|
||||
'@certd/lib-k8s': link:packages/libs/lib-k8s
|
||||
'@certd/pipeline': link:packages/core/pipeline
|
||||
'@certd/plugin-cert': link:packages/plugins/plugin-cert
|
||||
'@certd/plugin-lib': link:packages/plugins/plugin-lib
|
||||
'@certd/plus-core': 1.37.16
|
||||
ali-oss: 6.23.0
|
||||
baidu-aip-sdk: 4.16.16
|
||||
basic-ftp: 5.0.5
|
||||
cos-nodejs-sdk-v5: 2.14.7
|
||||
crypto-js: 4.2.0
|
||||
dayjs: 1.11.13
|
||||
form-data: 4.0.2
|
||||
https-proxy-agent: 7.0.6
|
||||
js-yaml: 4.1.0
|
||||
jsencrypt: 3.3.2
|
||||
jsrsasign: 11.1.0
|
||||
qiniu: 7.14.0
|
||||
tencentcloud-sdk-nodejs: 4.1.112(encoding@0.1.13)
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
- proxy-agent
|
||||
- supports-color
|
||||
|
||||
'@certd/plus-core@1.37.16':
|
||||
dependencies:
|
||||
'@certd/basic': link:packages/core/basic
|
||||
dayjs: 1.11.13
|
||||
|
||||
'@certd/vue-js-cron-core@6.0.3':
|
||||
dependencies:
|
||||
mustache: 4.2.0
|
||||
@@ -18700,6 +18625,12 @@ snapshots:
|
||||
'@typescript-eslint/types': 8.32.1
|
||||
eslint-visitor-keys: 4.2.0
|
||||
|
||||
'@ucloud-sdks/ucloud-sdk-js@0.2.4':
|
||||
dependencies:
|
||||
axios: 0.21.4(debug@4.4.1)
|
||||
transitivePeerDependencies:
|
||||
- debug
|
||||
|
||||
'@ungap/structured-clone@1.3.0': {}
|
||||
|
||||
'@uppy/companion-client@2.2.2':
|
||||
|
||||
Reference in New Issue
Block a user