Compare commits

...

22 Commits

Author SHA1 Message Date
xiaojunnuo
d23792fda2 v1.34.5 2025-05-20 01:38:18 +08:00
xiaojunnuo
b5cbb8e450 build: prepare to build 2025-05-20 01:35:39 +08:00
xiaojunnuo
fc037b4518 Merge remote-tracking branch 'origin/v2-dev' into v2-dev 2025-05-20 01:13:50 +08:00
xiaojunnuo
c04921f42b docs: 2025-05-20 01:13:01 +08:00
xiaojunnuo
8af3463668 perf: aaWaf、cdnfly站点选择支持查询 2025-05-20 01:11:26 +08:00
xiaojunnuo
094565ccd6 perf: 支持部署到宝塔aaWAF 2025-05-20 00:27:18 +08:00
xiaojunnuo
07b9769504 docs: 2025-05-19 11:34:59 +08:00
xiaojunnuo
566b12f5d1 perf: 1panel增加授权测试按钮 2025-05-19 10:58:28 +08:00
xiaojunnuo
a560999d13 perf: 优化钉钉通知标题颜色 2025-05-17 01:13:36 +08:00
xiaojunnuo
a818a3d293 perf: 优化飞书通知为卡片模式 2025-05-17 00:47:28 +08:00
xiaojunnuo
905219e523 build: publish 2025-05-17 00:05:31 +08:00
xiaojunnuo
c675b87040 build: trigger build image 2025-05-17 00:05:13 +08:00
xiaojunnuo
e2dadfdc40 v1.34.4 2025-05-17 00:03:13 +08:00
xiaojunnuo
a66f9aa04d build: prepare to build 2025-05-16 23:58:51 +08:00
xiaojunnuo
863e74dd2e fix: 修复自建插件保存丢失部署策略的bug 2025-05-16 23:50:18 +08:00
xiaojunnuo
aebb07c5cc perf: 调整小助手,仅在登录之后显示 2025-05-16 23:14:43 +08:00
xiaojunnuo
677fec0a0b fix: 修复插件导入的bug 2025-05-16 08:55:54 +08:00
xiaojunnuo
61f06faaf5 chore: 2025-05-16 08:42:31 +08:00
xiaojunnuo
fcf8309c23 fix: 修复导入在线插件不生效的bug 2025-05-16 08:38:38 +08:00
xiaojunnuo
76b19a4980 fix: 修复部署flexcdn问题 2025-05-16 08:38:16 +08:00
xiaojunnuo
b71e30755d build: publish 2025-05-16 00:14:32 +08:00
xiaojunnuo
fe196d1b20 build: trigger build image 2025-05-16 00:14:14 +08:00
53 changed files with 588 additions and 218 deletions

View File

@@ -3,6 +3,29 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
### Performance Improvements
* 1panel增加授权测试按钮 ([566b12f](https://github.com/certd/certd/commit/566b12f5d14ce10e8f5cf1807c58f7bf27f0d199))
* 优化钉钉通知标题颜色 ([a560999](https://github.com/certd/certd/commit/a560999d13eed18d08dd32ee530166569e3f8746))
* 优化飞书通知为卡片模式 ([a818a3d](https://github.com/certd/certd/commit/a818a3d293e22fb46979bc77055c05621a6fed81))
* 支持部署到宝塔aaWAF ([094565c](https://github.com/certd/certd/commit/094565ccd619ef671c6c11ce5fb7fd54a7a21d1c))
* aaWaf、cdnfly站点选择支持查询 ([8af3463](https://github.com/certd/certd/commit/8af3463668a40b9b99febb02e3b4e0d9d8d719b4))
## [1.34.4](https://github.com/certd/certd/compare/v1.34.3...v1.34.4) (2025-05-16)
### Bug Fixes
* 修复部署flexcdn问题 ([76b19a4](https://github.com/certd/certd/commit/76b19a4980f8edba5238543b82a7811e1003746c))
* 修复插件导入的bug ([677fec0](https://github.com/certd/certd/commit/677fec0a0b6fceb4966705e471bbfeeda91610c7))
* 修复导入在线插件不生效的bug ([fcf8309](https://github.com/certd/certd/commit/fcf8309c238208281ecb4575b2c3cfe50c11d783))
* 修复自建插件保存丢失部署策略的bug ([863e74d](https://github.com/certd/certd/commit/863e74dd2e3912f950ff5025b5ed0070aeb37035))
### Performance Improvements
* 调整小助手,仅在登录之后显示 ([aebb07c](https://github.com/certd/certd/commit/aebb07c5cc8b1f233b9d203ff017ac60e6971a85))
## [1.34.3](https://github.com/certd/certd/compare/v1.34.2...v1.34.3) (2025-05-15)
### Performance Improvements

View File

@@ -1 +1 @@
20:28
00:05

View File

@@ -91,14 +91,14 @@ export default defineConfig({
{text: "多数据库支持", link: "/guide/install/database.md"},
{text: "开放接口", link: "/guide/open/index.md"},
{
text: "站点安全", link: "/guide/feature/safe"
text: "站点安全", link: "/guide/feature/safe/"
},
{
text: "插件列表", items: [
{text: "授权提供商", link: "/guide/plugins/access"},
{text: "DNS提供商", link: "/guide/plugins/dns-provider"},
{text: "任务插件", link: "/guide/plugins/deploy"},
{text: "通知插件", link: "/guide/plugins/notification"},
{text: "授权提供商", link: "/guide/plugins/access.md"},
{text: "DNS提供商", link: "/guide/plugins/dns-provider.md"},
{text: "任务插件", link: "/guide/plugins/deploy.md"},
{text: "通知插件", link: "/guide/plugins/notification.md"},
]
},
]
@@ -106,7 +106,7 @@ export default defineConfig({
{
text: "常见问题",
items: [
{text: "QA", link: "/guide/qa/use"},
{text: "QA", link: "/guide/qa/use.md"},
{text: "常见报错处理", link: "/guide/qa/"},
{text: "群晖证书部署", link: "/guide/use/synology/"},
{text: "腾讯云密钥获取", link: "/guide/use/tencent/"},
@@ -139,7 +139,6 @@ export default defineConfig({
{text: "捐赠", link: "/guide/donate/"},
{text: "开源协议", link: "/guide/license/"},
{text: "我的其他开源项目", link: "/guide/link/"},
]
}
],

View File

@@ -3,6 +3,29 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.4](https://github.com/certd/certd/compare/v1.34.3...v1.34.4) (2025-05-16)
### Bug Fixes
* 修复部署flexcdn问题 ([76b19a4](https://github.com/certd/certd/commit/76b19a4980f8edba5238543b82a7811e1003746c))
* 修复插件导入的bug ([677fec0](https://github.com/certd/certd/commit/677fec0a0b6fceb4966705e471bbfeeda91610c7))
* 修复导入在线插件不生效的bug ([fcf8309](https://github.com/certd/certd/commit/fcf8309c238208281ecb4575b2c3cfe50c11d783))
* 修复自建插件保存丢失部署策略的bug ([863e74d](https://github.com/certd/certd/commit/863e74dd2e3912f950ff5025b5ed0070aeb37035))
### Performance Improvements
* 调整小助手,仅在登录之后显示 ([aebb07c](https://github.com/certd/certd/commit/aebb07c5cc8b1f233b9d203ff017ac60e6971a85))
## [1.34.3](https://github.com/certd/certd/compare/v1.34.2...v1.34.3) (2025-05-15)
### Performance Improvements
* 宝塔插件、1panel 改成完全免费版 ([a53b6cd](https://github.com/certd/certd/commit/a53b6cd28ff2ce5662ada82379ea44a06b179b81))
* 添加 FlexCDN 更新证书插件 ([bf040d4](https://github.com/certd/certd/commit/bf040d4c428d29c06fbaca5e29100e0c583b2b0b))
* 小助手可以关闭 ([3e2101a](https://github.com/certd/certd/commit/3e2101aa5b56548614102e900d59819ce8c7e97c))
* 支持部署到maoyun cdn ([68f333f](https://github.com/certd/certd/commit/68f333fb87ce85eed27436ecb0f76351c0ccb0d1))
* 支持AI分析报错 ([aa96859](https://github.com/certd/certd/commit/aa96859798166426e485947a6590464de189de05))
## [1.34.2](https://github.com/certd/certd/compare/v1.34.1...v1.34.2) (2025-05-11)
### Bug Fixes

View File

@@ -9,5 +9,5 @@
}
},
"npmClient": "pnpm",
"version": "1.34.3"
"version": "1.34.5"
}

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.5](https://github.com/publishlab/node-acme-client/compare/v1.34.4...v1.34.5) (2025-05-19)
**Note:** Version bump only for package @certd/acme-client
## [1.34.4](https://github.com/publishlab/node-acme-client/compare/v1.34.3...v1.34.4) (2025-05-16)
**Note:** Version bump only for package @certd/acme-client
## [1.34.3](https://github.com/publishlab/node-acme-client/compare/v1.34.2...v1.34.3) (2025-05-15)
**Note:** Version bump only for package @certd/acme-client

View File

@@ -3,7 +3,7 @@
"description": "Simple and unopinionated ACME client",
"private": false,
"author": "nmorsman",
"version": "1.34.3",
"version": "1.34.5",
"type": "module",
"module": "scr/index.js",
"main": "src/index.js",
@@ -18,7 +18,7 @@
"types"
],
"dependencies": {
"@certd/basic": "^1.34.3",
"@certd/basic": "^1.34.5",
"@peculiar/x509": "^1.11.0",
"asn1js": "^3.0.5",
"axios": "^1.7.2",
@@ -69,5 +69,5 @@
"bugs": {
"url": "https://github.com/publishlab/node-acme-client/issues"
},
"gitHead": "a1e504c1387e9b0554c8d030cb53c5058e7d683a"
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
}

View File

@@ -3,6 +3,19 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
### Performance Improvements
* 支持部署到宝塔aaWAF ([094565c](https://github.com/certd/certd/commit/094565ccd619ef671c6c11ce5fb7fd54a7a21d1c))
## [1.34.4](https://github.com/certd/certd/compare/v1.34.3...v1.34.4) (2025-05-16)
### Bug Fixes
* 修复导入在线插件不生效的bug ([fcf8309](https://github.com/certd/certd/commit/fcf8309c238208281ecb4575b2c3cfe50c11d783))
* 修复自建插件保存丢失部署策略的bug ([863e74d](https://github.com/certd/certd/commit/863e74dd2e3912f950ff5025b5ed0070aeb37035))
## [1.34.3](https://github.com/certd/certd/compare/v1.34.2...v1.34.3) (2025-05-15)
**Note:** Version bump only for package @certd/basic

View File

@@ -1 +1 @@
00:08
01:35

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/basic",
"private": false,
"version": "1.34.3",
"version": "1.34.5",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -45,5 +45,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "a1e504c1387e9b0554c8d030cb53c5058e7d683a"
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
}

View File

@@ -1,39 +1,39 @@
export * from './util.request.js';
export * from './util.env.js';
export * from './util.log.js';
export * from './util.file.js';
export * from './util.sp.js';
export * from './util.promise.js';
export * from './util.hash.js';
export * from './util.merge.js';
export * from './util.cache.js';
export * from './util.string.js';
export * from './util.lock.js';
export * from './util.mitter.js';
export * from './util.id.js';
export * from './util.domain.js';
export * from './util.amount.js';
import { stringUtils } from './util.string.js';
import sleep from './util.sleep.js';
import { http, download } from './util.request.js';
export * from "./util.request.js";
export * from "./util.env.js";
export * from "./util.log.js";
export * from "./util.file.js";
export * from "./util.sp.js";
export * from "./util.promise.js";
export * from "./util.hash.js";
export * from "./util.merge.js";
export * from "./util.cache.js";
export * from "./util.string.js";
export * from "./util.lock.js";
export * from "./util.mitter.js";
export * from "./util.id.js";
export * from "./util.domain.js";
export * from "./util.amount.js";
import { stringUtils } from "./util.string.js";
import sleep from "./util.sleep.js";
import { http, download } from "./util.request.js";
import { mergeUtils } from './util.merge.js';
import { sp } from './util.sp.js';
import { hashUtils } from './util.hash.js';
import { promises } from './util.promise.js';
import { fileUtils } from './util.file.js';
import * as _ from 'lodash-es';
import { cache } from './util.cache.js';
import dayjs from 'dayjs';
import { domainUtils } from './util.domain.js';
import { optionsUtils } from './util.options.js';
import { amountUtils } from './util.amount.js';
import { nanoid } from 'nanoid';
import * as id from './util.id.js';
import { locker } from './util.lock.js';
import { mitter } from './util.mitter.js';
import { mergeUtils } from "./util.merge.js";
import { sp } from "./util.sp.js";
import { hashUtils } from "./util.hash.js";
import { promises } from "./util.promise.js";
import { fileUtils } from "./util.file.js";
import * as _ from "lodash-es";
import { cache } from "./util.cache.js";
import dayjs from "dayjs";
import { domainUtils } from "./util.domain.js";
import { optionsUtils } from "./util.options.js";
import { amountUtils } from "./util.amount.js";
import { nanoid } from "nanoid";
import * as id from "./util.id.js";
import { locker } from "./util.lock.js";
import { mitter } from "./util.mitter.js";
import * as request from './util.request.js';
import * as request from "./util.request.js";
export const utils = {
sleep,
http,

View File

@@ -14,9 +14,13 @@ function hmacSha256(data: string, digest: BinaryToTextEncoding = "base64") {
function base64(data: string) {
return Buffer.from(data).toString("base64");
}
function base64Decode(data: string) {
return Buffer.from(data, "base64").toString("utf8");
}
export const hashUtils = {
md5,
sha256,
base64,
base64Decode,
hmacSha256,
};

View File

@@ -91,6 +91,13 @@ export function createAxiosService({ logger }: { logger: Logger }) {
// 请求拦截
service.interceptors.request.use(
(config: any) => {
if (config.logParams == null) {
config.logParams = false;
}
if (config.logRes == null) {
config.logRes = false;
}
logger.info(`http request:${config.url}method:${config.method}`);
if (config.logParams !== false && config.params) {
logger.info(`params:${JSON.stringify(config.params)}`);
@@ -202,6 +209,10 @@ export function createAxiosService({ logger }: { logger: Logger }) {
logger.error("AggregateError", error);
}
const err = new HttpError(error);
if (error.response?.config?.logParams === false) {
delete err.request?.params;
delete err.request?.data;
}
return Promise.reject(err);
}
);

View File

@@ -3,6 +3,19 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
### Performance Improvements
* 优化钉钉通知标题颜色 ([a560999](https://github.com/certd/certd/commit/a560999d13eed18d08dd32ee530166569e3f8746))
* 优化飞书通知为卡片模式 ([a818a3d](https://github.com/certd/certd/commit/a818a3d293e22fb46979bc77055c05621a6fed81))
## [1.34.4](https://github.com/certd/certd/compare/v1.34.3...v1.34.4) (2025-05-16)
### Bug Fixes
* 修复导入在线插件不生效的bug ([fcf8309](https://github.com/certd/certd/commit/fcf8309c238208281ecb4575b2c3cfe50c11d783))
## [1.34.3](https://github.com/certd/certd/compare/v1.34.2...v1.34.3) (2025-05-15)
**Note:** Version bump only for package @certd/pipeline

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/pipeline",
"private": false,
"version": "1.34.3",
"version": "1.34.5",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -17,8 +17,8 @@
"pub": "npm publish"
},
"dependencies": {
"@certd/basic": "^1.34.3",
"@certd/plus-core": "^1.34.3",
"@certd/basic": "^1.34.5",
"@certd/plus-core": "^1.34.5",
"dayjs": "^1.11.7",
"lodash-es": "^4.17.21",
"reflect-metadata": "^0.1.13"
@@ -44,5 +44,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "a1e504c1387e9b0554c8d030cb53c5058e7d683a"
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
}

View File

@@ -218,7 +218,7 @@ export class Executor {
returnType: ResultType.error,
runnable: t,
});
errorMessage += `任务${t.title}执行失败,错误详情:${e.message}`;
errorMessage += `任务${t.title}执行失败,错误详情${e.message}`;
}
}
if (errorList.length > 0) {
@@ -438,7 +438,7 @@ export class Executor {
const runnableError = error as RunnableError;
content = `流水线ID:${this.pipeline.id}运行ID:${this.runtime.id}\n\n`;
for (const re of runnableError.errors) {
content += ` - ${re.runnable.title} 执行失败\n 错误详情:${re.e.message}\n\n`;
content += ` - ${re.runnable.title} 执行失败错误详情${re.e?.error?.message}\n\n`;
}
} else {
content = `流水线ID:${this.pipeline.id}运行ID:${this.runtime.id}\n\n${this.currentStatusMap?.currentStep?.title} 执行失败\n\n错误详情:${error.message}`;

View File

@@ -48,6 +48,11 @@ export class Registry<T = any> {
logger.info(`注册插件:${this.type}:${key}`);
}
unRegister(key: string) {
delete this.storage[key];
logger.info(`反注册插件:${this.type}:${key}`);
}
get(name: string): RegistryItem<T> {
if (!name) {
throw new Error("插件名称不能为空");

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
**Note:** Version bump only for package @certd/lib-huawei
## [1.34.4](https://github.com/certd/certd/compare/v1.34.3...v1.34.4) (2025-05-16)
**Note:** Version bump only for package @certd/lib-huawei
## [1.34.3](https://github.com/certd/certd/compare/v1.34.2...v1.34.3) (2025-05-15)
**Note:** Version bump only for package @certd/lib-huawei

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/lib-huawei",
"private": false,
"version": "1.34.3",
"version": "1.34.5",
"main": "./dist/bundle.js",
"module": "./dist/bundle.js",
"types": "./dist/d/index.d.ts",
@@ -24,5 +24,5 @@
"prettier": "^2.8.8",
"tslib": "^2.8.1"
},
"gitHead": "a1e504c1387e9b0554c8d030cb53c5058e7d683a"
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
}

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
**Note:** Version bump only for package @certd/lib-iframe
## [1.34.4](https://github.com/certd/certd/compare/v1.34.3...v1.34.4) (2025-05-16)
**Note:** Version bump only for package @certd/lib-iframe
## [1.34.3](https://github.com/certd/certd/compare/v1.34.2...v1.34.3) (2025-05-15)
**Note:** Version bump only for package @certd/lib-iframe

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/lib-iframe",
"private": false,
"version": "1.34.3",
"version": "1.34.5",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -31,5 +31,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "a1e504c1387e9b0554c8d030cb53c5058e7d683a"
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
}

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
**Note:** Version bump only for package @certd/jdcloud
## [1.34.4](https://github.com/certd/certd/compare/v1.34.3...v1.34.4) (2025-05-16)
**Note:** Version bump only for package @certd/jdcloud
## [1.34.3](https://github.com/certd/certd/compare/v1.34.2...v1.34.3) (2025-05-15)
**Note:** Version bump only for package @certd/jdcloud

View File

@@ -1,6 +1,6 @@
{
"name": "@certd/jdcloud",
"version": "1.34.3",
"version": "1.34.5",
"description": "jdcloud openApi sdk",
"main": "./dist/bundle.js",
"module": "./dist/bundle.js",
@@ -61,5 +61,5 @@
"fetch"
]
},
"gitHead": "a1e504c1387e9b0554c8d030cb53c5058e7d683a"
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
}

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
**Note:** Version bump only for package @certd/lib-k8s
## [1.34.4](https://github.com/certd/certd/compare/v1.34.3...v1.34.4) (2025-05-16)
**Note:** Version bump only for package @certd/lib-k8s
## [1.34.3](https://github.com/certd/certd/compare/v1.34.2...v1.34.3) (2025-05-15)
**Note:** Version bump only for package @certd/lib-k8s

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/lib-k8s",
"private": false,
"version": "1.34.3",
"version": "1.34.5",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -17,7 +17,7 @@
"pub": "npm publish"
},
"dependencies": {
"@certd/basic": "^1.34.3",
"@certd/basic": "^1.34.5",
"@kubernetes/client-node": "0.21.0"
},
"devDependencies": {
@@ -32,5 +32,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "a1e504c1387e9b0554c8d030cb53c5058e7d683a"
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
}

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
**Note:** Version bump only for package @certd/lib-server
## [1.34.4](https://github.com/certd/certd/compare/v1.34.3...v1.34.4) (2025-05-16)
**Note:** Version bump only for package @certd/lib-server
## [1.34.3](https://github.com/certd/certd/compare/v1.34.2...v1.34.3) (2025-05-15)
### Performance Improvements

View File

@@ -1,6 +1,6 @@
{
"name": "@certd/lib-server",
"version": "1.34.3",
"version": "1.34.5",
"description": "midway with flyway, sql upgrade way ",
"private": false,
"type": "module",
@@ -27,10 +27,10 @@
],
"license": "AGPL",
"dependencies": {
"@certd/acme-client": "^1.34.3",
"@certd/basic": "^1.34.3",
"@certd/pipeline": "^1.34.3",
"@certd/plus-core": "^1.34.3",
"@certd/acme-client": "^1.34.5",
"@certd/basic": "^1.34.5",
"@certd/pipeline": "^1.34.5",
"@certd/plus-core": "^1.34.5",
"@midwayjs/cache": "~3.14.0",
"@midwayjs/core": "~3.20.3",
"@midwayjs/i18n": "~3.20.3",
@@ -61,5 +61,5 @@
"typeorm": "^0.3.11",
"typescript": "^5.4.2"
},
"gitHead": "a1e504c1387e9b0554c8d030cb53c5058e7d683a"
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
}

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.34.4](https://github.com/certd/certd/compare/v1.34.3...v1.34.4) (2025-05-16)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.34.3](https://github.com/certd/certd/compare/v1.34.2...v1.34.3) (2025-05-15)
**Note:** Version bump only for package @certd/midway-flyway-js

View File

@@ -1,6 +1,6 @@
{
"name": "@certd/midway-flyway-js",
"version": "1.34.3",
"version": "1.34.5",
"description": "midway with flyway, sql upgrade way ",
"private": false,
"type": "module",
@@ -46,5 +46,5 @@
"typeorm": "^0.3.11",
"typescript": "^5.4.2"
},
"gitHead": "a1e504c1387e9b0554c8d030cb53c5058e7d683a"
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
}

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
**Note:** Version bump only for package @certd/plugin-cert
## [1.34.4](https://github.com/certd/certd/compare/v1.34.3...v1.34.4) (2025-05-16)
**Note:** Version bump only for package @certd/plugin-cert
## [1.34.3](https://github.com/certd/certd/compare/v1.34.2...v1.34.3) (2025-05-15)
**Note:** Version bump only for package @certd/plugin-cert

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-cert",
"private": false,
"version": "1.34.3",
"version": "1.34.5",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -16,10 +16,10 @@
"pub": "npm publish"
},
"dependencies": {
"@certd/acme-client": "^1.34.3",
"@certd/basic": "^1.34.3",
"@certd/pipeline": "^1.34.3",
"@certd/plugin-lib": "^1.34.3",
"@certd/acme-client": "^1.34.5",
"@certd/basic": "^1.34.5",
"@certd/pipeline": "^1.34.5",
"@certd/plugin-lib": "^1.34.5",
"@google-cloud/publicca": "^1.3.0",
"dayjs": "^1.11.7",
"jszip": "^3.10.1",
@@ -43,5 +43,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "a1e504c1387e9b0554c8d030cb53c5058e7d683a"
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
}

View File

@@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
### Performance Improvements
* aaWaf、cdnfly站点选择支持查询 ([8af3463](https://github.com/certd/certd/commit/8af3463668a40b9b99febb02e3b4e0d9d8d719b4))
## [1.34.4](https://github.com/certd/certd/compare/v1.34.3...v1.34.4) (2025-05-16)
**Note:** Version bump only for package @certd/plugin-lib
## [1.34.3](https://github.com/certd/certd/compare/v1.34.2...v1.34.3) (2025-05-15)
### Performance Improvements

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-lib",
"private": false,
"version": "1.34.3",
"version": "1.34.5",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -18,8 +18,8 @@
"dependencies": {
"@alicloud/pop-core": "^1.7.10",
"@aws-sdk/client-s3": "^3.787.0",
"@certd/basic": "^1.34.3",
"@certd/pipeline": "^1.34.3",
"@certd/basic": "^1.34.5",
"@certd/pipeline": "^1.34.5",
"@kubernetes/client-node": "0.21.0",
"ali-oss": "^6.22.0",
"basic-ftp": "^5.0.5",
@@ -50,5 +50,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "a1e504c1387e9b0554c8d030cb53c5058e7d683a"
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
}

View File

@@ -38,6 +38,7 @@ export function createRemoteSelectInputDefine(opts?: {
required?: boolean;
rules?: any;
mergeScript?: string;
search?: boolean;
}) {
const title = opts?.title || "请选择";
const certDomainsInputKey = opts?.certDomainsInputKey || "certDomains";
@@ -47,6 +48,7 @@ export function createRemoteSelectInputDefine(opts?: {
const type = opts?.type || "plugin";
const watches = opts?.watches || [];
const helper = opts?.helper || "请选择";
const search = opts?.search ?? false;
let mode = "tags";
if (opts.multi === false) {
mode = undefined;
@@ -63,6 +65,7 @@ export function createRemoteSelectInputDefine(opts?: {
type,
typeName,
action,
search,
watches: [certDomainsInputKey, accessIdInputKey, ...watches],
},
rules: opts?.rules,

View File

@@ -3,6 +3,23 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
### Performance Improvements
* aaWaf、cdnfly站点选择支持查询 ([8af3463](https://github.com/certd/certd/commit/8af3463668a40b9b99febb02e3b4e0d9d8d719b4))
## [1.34.4](https://github.com/certd/certd/compare/v1.34.3...v1.34.4) (2025-05-16)
### Bug Fixes
* 修复插件导入的bug ([677fec0](https://github.com/certd/certd/commit/677fec0a0b6fceb4966705e471bbfeeda91610c7))
* 修复自建插件保存丢失部署策略的bug ([863e74d](https://github.com/certd/certd/commit/863e74dd2e3912f950ff5025b5ed0070aeb37035))
### Performance Improvements
* 调整小助手,仅在登录之后显示 ([aebb07c](https://github.com/certd/certd/commit/aebb07c5cc8b1f233b9d203ff017ac60e6971a85))
## [1.34.3](https://github.com/certd/certd/compare/v1.34.2...v1.34.3) (2025-05-15)
### Performance Improvements

View File

@@ -1,6 +1,6 @@
{
"name": "@certd/ui-client",
"version": "1.34.3",
"version": "1.34.5",
"private": true,
"scripts": {
"dev": "vite --open",
@@ -102,8 +102,8 @@
"zod-defaults": "^0.1.3"
},
"devDependencies": {
"@certd/lib-iframe": "^1.34.3",
"@certd/pipeline": "^1.34.3",
"@certd/lib-iframe": "^1.34.5",
"@certd/pipeline": "^1.34.5",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@types/chai": "^4.3.12",

View File

@@ -3,7 +3,6 @@
<FsFormProvider>
<contextHolder />
<router-view />
<MaxKBChat v-if="settingsStore.sysPublic.aiChatEnabled !== false" ref="chatBox" />
</FsFormProvider>
</AConfigProvider>
</template>
@@ -49,7 +48,7 @@ localeChanged("zh-cn");
provide("fn:router.reload", reload);
provide("fn:locale.changed", localeChanged);
const settingsStore = useSettingStore();
const { isDark } = usePreferences();
const { tokens } = useAntdDesignTokens();
@@ -74,13 +73,5 @@ const tokenTheme = computed(() => {
// const settingStore = useSettingStore();
// settingStore.init();
const chatBox = ref();
// onMounted(async () => {
// await util.sleep(2000);
// await chatBox.value.openChat({ q: "hello" });
// });
const openChat = (q: string) => {
chatBox.value.openChat({ q });
};
provide("fn:ai.open", openChat);
</script>

View File

@@ -1,7 +1,26 @@
<template>
<div class="remote-select">
<div class="flex flex-row">
<a-select class="remote-select-input" show-search :filter-option="filterOption" :options="optionsRef" :value="value" v-bind="attrs" @click="onClick" @update:value="emit('update:value', $event)" />
<a-select class="remote-select-input" show-search :filter-option="filterOption" :options="optionsRef" :value="value" v-bind="attrs" @click="onClick" @update:value="emit('update:value', $event)">
<template #dropdownRender="{ menuNode: menu }">
<template v-if="search">
<div class="flex w-full" style="padding: 4px 8px">
<a-input ref="inputRef" v-model:value="searchKeyRef" class="flex-1" allow-clear placeholder="查询关键字" @keydown.enter="doSearch" />
<a-button class="ml-2" :loading="loading" type="text" @click="doSearch">
<template #icon>
<search-outlined />
</template>
查询
</a-button>
</div>
<div v-if="hasError" class="helper p-2" :class="{ error: hasError }">
{{ message }}
</div>
<a-divider style="margin: 4px 0" />
</template>
<v-nodes :vnodes="menu" />
</template>
</a-select>
<div class="ml-5">
<fs-button :loading="loading" title="刷新选项" icon="ion:refresh-outline" @click="refreshOptions"></fs-button>
</div>
@@ -13,16 +32,29 @@
</template>
<script setup lang="ts">
import { ComponentPropsType, doRequest } from "/@/components/plugins/lib";
import { inject, ref, useAttrs, watch } from "vue";
import { defineComponent, inject, ref, useAttrs, watch } from "vue";
import { PluginDefine } from "@certd/pipeline";
defineOptions({
name: "RemoteSelect",
});
const VNodes = defineComponent({
props: {
vnodes: {
type: Object,
required: true,
},
},
render() {
return this.vnodes;
},
});
const props = defineProps<
{
watches: string[];
search: boolean;
} & ComponentPropsType
>();
@@ -36,6 +68,7 @@ const getCurrentPluginDefine: any = inject("getCurrentPluginDefine");
const getScope: any = inject("get:scope");
const getPluginType: any = inject("get:plugin:type");
const searchKeyRef = ref("");
const optionsRef = ref([]);
const message = ref("");
const hasError = ref(false);
@@ -81,6 +114,9 @@ const getOptions = async () => {
typeName: form.type,
action: props.action,
input,
data: {
searchKey: props.search ? searchKeyRef.value : "",
},
},
{
onError(err: any) {
@@ -114,6 +150,10 @@ async function refreshOptions() {
await getOptions();
}
async function doSearch() {
await refreshOptions();
}
watch(
() => {
const values = [];

View File

@@ -1,17 +1,16 @@
<script lang="ts" setup>
import { BasicLayout, LockScreen, UserDropdown } from "/@/vben/layouts";
import { computed, onErrorCaptured, onMounted } from "vue";
import { preferences } from "/@/vben/preferences";
import { useAccessStore } from "/@/vben/stores";
import { computed, onErrorCaptured, onMounted, provide, ref } from "vue";
import { useUserStore } from "/@/store/user";
import VipButton from "/@/components/vip-button/index.vue";
import TutorialButton from "/@/components/tutorial/index.vue";
import { useSettingStore } from "/@/store/settings";
import PageFooter from "./components/footer/index.vue";
import { useRouter } from "vue-router";
import MaxKBChat from "/@/components/ai/index.vue";
const userStore = useUserStore();
const accessStore = useAccessStore();
const router = useRouter();
const menus = computed(() => [
@@ -56,6 +55,12 @@ onMounted(async () => {
function goGithub() {
window.open("https://github.com/certd/certd");
}
const settingsStore = useSettingStore();
const chatBox = ref();
const openChat = (q: string) => {
chatBox.value.openChat({ q });
};
provide("fn:ai.open", openChat);
</script>
<template>
@@ -79,6 +84,7 @@ function goGithub() {
</template>
<template #footer>
<PageFooter></PageFooter>
<MaxKBChat v-if="settingsStore.sysPublic.aiChatEnabled !== false" ref="chatBox" />
</template>
</BasicLayout>
</template>

View File

@@ -488,7 +488,7 @@ const idMainContent = ELEMENT_ID_MAIN_CONTENT;
</template>
</LayoutContent>
<LayoutFooter v-if="footerEnable" class="hidden md:block" :fixed="footerFixed" :height="footerHeight" :show="!isFullContent" :width="footerWidth" :z-index="zIndex">
<LayoutFooter v-if="footerEnable" class="hidden md:block" :fixed="footerFixed" :height="footerHeight" :show="!isFullContent" :width="footerWidth" :z-index="zIndex + 2">
<slot name="footer"></slot>
</LayoutFooter>
</div>

View File

@@ -23,7 +23,7 @@
</a-tab-pane>
</a-tabs>
<template #footer>
<fs-button key="aiChat" type="primary" icon="ion:color-wand-outline" @click="taskModal.onAiChat">AI分析</fs-button>
<fs-button v-if="settingsStore.sysPublic.aiChatEnabled !== false" key="aiChat" type="primary" icon="ion:color-wand-outline" @click="taskModal.onAiChat">AI分析</fs-button>
<fs-button key="cancel" icon="ion:close-circle-outline" @click="taskModal.onOk">关闭</fs-button>
<fs-button key="submit" icon="ion:checkmark-circle-outline" type="primary" @click="taskModal.onOk">确定</fs-button>
</template>
@@ -35,7 +35,7 @@ import { computed, inject, nextTick, Ref, ref, watch } from "vue";
import { RunHistory } from "../../type";
import PiStatusShow from "/@/views/certd/pipeline/pipeline/component/status-show.vue";
import { usePreferences } from "/@/vben/preferences";
import { useSettingStore } from "/@/store/settings/index";
export default {
name: "PiTaskView",
components: { PiStatusShow },
@@ -70,7 +70,7 @@ export default {
for (let log of logs) {
logText += log + "\n";
}
const maxLength = 5000;
const maxLength = 2500;
if (logText.length > maxLength) {
logText = logText.substring(logText.length - maxLength);
}
@@ -172,6 +172,7 @@ export default {
taskModal.value.open = false;
}
const settingsStore = useSettingStore();
return {
detail,
taskModal,
@@ -180,6 +181,7 @@ export default {
taskViewClose,
tabPosition,
triggerRun,
settingsStore,
};
},
};

View File

@@ -43,6 +43,8 @@
</a-tabs>
<a-form-item>
<a-button type="primary" size="large" html-type="submit" :loading="loading" class="login-button">登录</a-button>
<div class="mt-2"><a href="https://certd.docmirror.cn/guide/use/forgotpasswd/" target="_blank">忘记管理员密码</a></div>
</a-form-item>
<a-form-item class="user-login-other">

View File

@@ -91,6 +91,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
},
afterSubmit() {
notification.success({ message: "操作成功" });
crudExpose.doRefresh();
},
async doSubmit({ form }: any) {
return await api.ImportPlugin({
@@ -203,12 +204,14 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
},
form: {
onSuccess(opts: any) {
router.push({
name: "SysPluginEdit",
query: {
id: opts.res.id,
},
});
if (opts.res?.id) {
router.push({
name: "SysPluginEdit",
query: {
id: opts.res.id,
},
});
}
},
},
columns: {

View File

@@ -3,6 +3,23 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
### Performance Improvements
* 1panel增加授权测试按钮 ([566b12f](https://github.com/certd/certd/commit/566b12f5d14ce10e8f5cf1807c58f7bf27f0d199))
* 优化钉钉通知标题颜色 ([a560999](https://github.com/certd/certd/commit/a560999d13eed18d08dd32ee530166569e3f8746))
* 优化飞书通知为卡片模式 ([a818a3d](https://github.com/certd/certd/commit/a818a3d293e22fb46979bc77055c05621a6fed81))
## [1.34.4](https://github.com/certd/certd/compare/v1.34.3...v1.34.4) (2025-05-16)
### Bug Fixes
* 修复部署flexcdn问题 ([76b19a4](https://github.com/certd/certd/commit/76b19a4980f8edba5238543b82a7811e1003746c))
* 修复插件导入的bug ([677fec0](https://github.com/certd/certd/commit/677fec0a0b6fceb4966705e471bbfeeda91610c7))
* 修复导入在线插件不生效的bug ([fcf8309](https://github.com/certd/certd/commit/fcf8309c238208281ecb4575b2c3cfe50c11d783))
* 修复自建插件保存丢失部署策略的bug ([863e74d](https://github.com/certd/certd/commit/863e74dd2e3912f950ff5025b5ed0070aeb37035))
## [1.34.3](https://github.com/certd/certd/compare/v1.34.2...v1.34.3) (2025-05-15)
### Performance Improvements

View File

@@ -1,6 +1,6 @@
{
"name": "@certd/ui-server",
"version": "1.34.3",
"version": "1.34.5",
"description": "fast-server base midway",
"private": true,
"type": "module",
@@ -41,19 +41,19 @@
"@aws-sdk/client-acm": "^3.699.0",
"@aws-sdk/client-cloudfront": "^3.699.0",
"@aws-sdk/client-s3": "^3.705.0",
"@certd/acme-client": "^1.34.3",
"@certd/basic": "^1.34.3",
"@certd/commercial-core": "^1.34.3",
"@certd/jdcloud": "^1.34.3",
"@certd/lib-huawei": "^1.34.3",
"@certd/lib-k8s": "^1.34.3",
"@certd/lib-server": "^1.34.3",
"@certd/midway-flyway-js": "^1.34.3",
"@certd/pipeline": "^1.34.3",
"@certd/plugin-cert": "^1.34.3",
"@certd/plugin-lib": "^1.34.3",
"@certd/plugin-plus": "^1.34.3",
"@certd/plus-core": "^1.34.3",
"@certd/acme-client": "^1.34.5",
"@certd/basic": "^1.34.5",
"@certd/commercial-core": "^1.34.5",
"@certd/jdcloud": "^1.34.5",
"@certd/lib-huawei": "^1.34.5",
"@certd/lib-k8s": "^1.34.5",
"@certd/lib-server": "^1.34.5",
"@certd/midway-flyway-js": "^1.34.5",
"@certd/pipeline": "^1.34.5",
"@certd/plugin-cert": "^1.34.5",
"@certd/plugin-lib": "^1.34.5",
"@certd/plugin-plus": "^1.34.5",
"@certd/plus-core": "^1.34.5",
"@corsinvest/cv4pve-api-javascript": "^8.3.0",
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.120",
"@huaweicloud/huaweicloud-sdk-core": "^3.1.120",

View File

@@ -44,9 +44,6 @@ export class PluginController extends CrudController<PluginService> {
async update(@Body(ALL) bean: any) {
const res = await super.update(bean);
// 更新插件配置
const info = await this.service.info(bean.id)
await this.service.registerPlugin(info)
return res
}
@@ -57,12 +54,12 @@ export class PluginController extends CrudController<PluginService> {
@Post('/delete', { summary: 'sys:settings:edit' })
async delete(@Query('id') id: number) {
return super.delete(id);
return super.deleteByIds([id]);
}
@Post('/deleteByIds', { summary: 'sys:settings:edit' })
async deleteByIds(@Body('ids') ids: number[]) {
const res = await this.service.delete(ids);
const res = await this.service.deleteByIds(ids);
return this.ok(res);
}

View File

@@ -193,10 +193,49 @@ export class PluginService extends BaseService<PluginEntity> {
throw new Error(`插件类型${param.pluginType}不支持`);
}
return await super.add({
const res= await super.add({
...param,
...plugin
});
await this.registerById(res.id);
return res
}
async registerById(id: any) {
const item = await this.info(id);
if (!item) {
return;
}
if(item.type === "builtIn"){
return;
}
await this.registerPlugin(item);
}
async unRegisterById(id: any){
const item = await this.info(id);
if (!item) {
return;
}
if (item.type === "builtIn") {
return;
}
let name = item.name;
if (item.author){
name = `${item.author}/${item.name}`
}
if (item.pluginType === "access"){
accessRegistry.unRegister(name)
}else if (item.pluginType === "deploy"){
pluginRegistry.unRegister(name)
}else if (item.pluginType === "dnsProvider"){
dnsProviderRegistry.unRegister(name)
}else if (item.pluginType === "notification"){
notificationRegistry.unRegister(name)
}else{
logger.warn(`不支持的插件类型:${item.pluginType}`)
}
}
async update(param: any) {
@@ -211,7 +250,11 @@ export class PluginService extends BaseService<PluginEntity> {
throw new Error(`插件${param.author}/${param.name}已存在`);
}
return await super.update(param);
const res= await super.update(param);
await this.registerById(param.id);
return res
}
async compile(code: string) {
@@ -307,12 +350,15 @@ export class PluginService extends BaseService<PluginEntity> {
async registerPlugin(plugin: PluginEntity) {
const metadata = plugin.metadata ? yaml.load(plugin.metadata) : {};
const extra = plugin.extra ? yaml.load(plugin.extra) : {};
const item = {
...plugin,
...metadata
...metadata,
...extra
};
delete item.metadata;
delete item.content;
delete item.extra;
if (item.author) {
item.name = item.author + "/" + item.name;
}
@@ -395,29 +441,37 @@ export class PluginService extends BaseService<PluginEntity> {
...loaded,
metadata: yaml.dump(metadata),
extra: yaml.dump(extra),
content: req.content,
content: loaded.content,
disabled: false
};
if (!pluginEntity.pluginType) {
throw new Error(`插件类型不能为空`);
}
if (old) {
if (!req.override) {
throw new Error(`插件${loaded.author}/${loaded.name}已存在`);
}
//update
pluginEntity.id = old.id;
await this.update(pluginEntity);
} else {
if (!old) {
//add
const {id} = await this.add(pluginEntity);
pluginEntity.id = id;
} else{
if (!req.override) {
throw new Error(`插件${loaded.author}/${loaded.name}已存在`);
}
pluginEntity.id = old.id;
}
//update
await this.update(pluginEntity);
return {
id: pluginEntity.id
};
}
async deleteByIds(ids:any[]){
await super.delete(ids);
for (const id of ids) {
await this.unRegisterById(id)
}
}
}

View File

@@ -20,3 +20,4 @@ export * from './plugin-volcengine/index.js'
export * from './plugin-jdcloud/index.js'
export * from './plugin-51dns/index.js'
export * from './plugin-notification/index.js'
export * from './plugin-flex/index.js'

View File

@@ -15,9 +15,9 @@ import { FlexCDNClient } from "../client.js";
default: {
//默认值配置照抄即可
strategy: {
runStrategy: RunStrategy.SkipWhenSucceed,
},
},
runStrategy: RunStrategy.SkipWhenSucceed
}
}
})
//类名规范跟上面插件名称name一致
export class FlexCDNRefreshCert extends AbstractTaskPlugin {
@@ -27,8 +27,8 @@ export class FlexCDNRefreshCert extends AbstractTaskPlugin {
helper: "请选择前置任务输出的域名证书",
component: {
name: "output-selector",
from: [...CertApplyPluginNames],
},
from: [...CertApplyPluginNames]
}
// required: true, // 必填
})
cert!: CertInfo;
@@ -41,9 +41,9 @@ export class FlexCDNRefreshCert extends AbstractTaskPlugin {
title: "FlexCDN授权",
component: {
name: "access-selector",
type: "FlexCDN", //固定授权类型
type: "flexcdn" //固定授权类型
},
required: true, //必填
required: true //必填
})
accessId!: string;
//
@@ -52,13 +52,14 @@ export class FlexCDNRefreshCert extends AbstractTaskPlugin {
createRemoteSelectInputDefine({
title: "证书Id",
helper: "要更新的Flex证书id",
action: FlexCDNRefreshCert.prototype.onGetCertList.name,
action: FlexCDNRefreshCert.prototype.onGetCertList.name
})
)
certList!: number[];
//插件实例化时执行的方法
async onInstance() {}
async onInstance() {
}
//插件执行方法
async execute(): Promise<void> {
@@ -67,30 +68,35 @@ export class FlexCDNRefreshCert extends AbstractTaskPlugin {
const client = new FlexCDNClient({
http: this.ctx.http,
logger: this.logger,
access,
access
});
await client.getToken();
for (const item of this.certList) {
this.logger.info(`开始更新证书:${item}`);
this.logger.info(`----------- 开始更新证书:${item}`);
const res = await client.doRequest({
url: `/SSLCertService/findEnabledSSLCertConfig`,
data: {
sslCertId: item,
},
sslCertId: item
}
});
const sslCert = JSON.parse(this.ctx.utils.hash.base64Decode(res.sslCertJSON))
this.logger.info(`证书信息:${sslCert.name}${sslCert.dnsNames}`);
const body = {
name: sslCert.name,
sslCertId: item,
certData: this.ctx.utils.hash.base64(this.cert.crt),
keyData: this.ctx.utils.hash.base64(this.cert.key)
};
await client.doRequest({
url: `/SSLCertService/updateSSLCert`,
data: {
...res,
sslCertId: item,
certData: this.cert.crt,
keyData: this.cert.key,
},
...body
}
});
this.logger.info(`更新证书${item}成功`);
this.logger.info(`----------- 更新证书${item}成功`);
}
this.logger.info("部署完成");
@@ -101,28 +107,29 @@ export class FlexCDNRefreshCert extends AbstractTaskPlugin {
const client = new FlexCDNClient({
http: this.ctx.http,
logger: this.logger,
access,
access
});
await client.getToken();
const res = await client.doRequest({
url: "/SSLCertService/listSSLCerts",
data: { size: 1000},
method: "POST",
data: { size: 1000 },
method: "POST"
});
const list = res.sslCertsJSON;
const list = JSON.parse(this.ctx.utils.hash.base64Decode(res.sslCertsJSON));
if (!list || list.length === 0) {
throw new Error("没有找到证书,请先在控制台上传一次证书且关联网站");
}
const options = list.map((item: any) => {
return {
label: `${item.name}<${item.id}-${item.firstServerName}>`,
label: `${item.name}<${item.id}-${item.dnsNames[0]}>`,
value: item.id,
domain: JSON.parse(item.serverNamesJSON),
domain: item.dnsNames
};
});
return this.ctx.utils.options.buildGroupOptions(options, this.certDomains);
}
}
//实例化一下,注册插件
new FlexCDNRefreshCert();

View File

@@ -125,15 +125,17 @@ export class DingTalkNotification extends BaseNotification {
at.isAtAll = true;
}
const color = body.errorMessage?'red':'green';
const res = await this.http.request({
url: webhook,
method: 'POST',
data: {
at: at,
text: {
content: `${body.title}\n${body.content}\n查看详情: ${body.url}`,
markdown: {
title: body.title,
text: `<font color='${color}'>${body.title}</font>\n\n\n ${body.content}\n\n\n[查看详情](${body.url})`,
},
msgtype:"text"
msgtype:"markdown"
},
});
if(res.errcode>100){

View File

@@ -98,11 +98,11 @@ export class DingTalkNotification extends BaseNotification {
if(nameIndex>0){
name = id.substring(nameIndex+1)
}
return `<at user_id="${id}">${name}</at>`
return `<at id=${id}>${name}</at>`
}).join("");
}
if(this.isAtAll){
atText = `<at user_id="all">所有人</at>`
atText = `<at id=all>所有人</at>`
}
if (atText){
@@ -118,16 +118,78 @@ export class DingTalkNotification extends BaseNotification {
}
}
const cardBody = {
"msg_type": "interactive",
"card": {
"schema": "2.0",
"config": {
"update_multi": true,
"style": {
"text_size": {
"normal_v2": {
"default": "normal",
"pc": "normal",
"mobile": "heading"
}
}
}
},
"header": {
"title": {
"tag": "plain_text",
"content": body.title
},
"subtitle": {
"tag": "plain_text",
"content": ""
},
"template": body.errorMessage?"red":"green",
"padding": "12px 12px 12px 12px"
},
"body": {
"direction": "vertical",
"padding": "12px 12px 12px 12px",
"elements": [
{
"tag": "markdown",
"content": body.content+atText,
"text_align": "left",
"text_size": "normal_v2",
"margin": "0px 0px 0px 0px"
},
{
"tag": "button",
"text": {
"tag": "plain_text",
"content": "查看详情"
},
"type": "default",
"width": "default",
"size": "medium",
"behaviors": [
{
"type": "open_url",
"default_url": body.url,
"pc_url": "",
"ios_url": "",
"android_url": ""
}
],
"margin": "0px 0px 0px 0px"
}
]
},
}
}
const res = await this.http.request({
url: webhook,
method: 'POST',
data: {
...sign,
content: {
text: `${body.title}\n${body.content}\n查看详情: ${body.url}${atText}`,
},
msg_type:"text"
...cardBody
},
});
if(res.code>100){

View File

@@ -110,6 +110,7 @@ export class UpyunDeployToCdn extends AbstractTaskPlugin {
this.logger.info(`登录成功`);
const certId = await upyunClient.uploadCert(cookie, this.cert);
this.logger.info(`上传证书成功:${certId}`);
await this.ctx.utils.sleep(5000);
for (const item of this.cdnList) {
const data :any= {

82
pnpm-lock.yaml generated
View File

@@ -46,7 +46,7 @@ importers:
packages/core/acme-client:
dependencies:
'@certd/basic':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../basic
'@peculiar/x509':
specifier: ^1.11.0
@@ -207,10 +207,10 @@ importers:
packages/core/pipeline:
dependencies:
'@certd/basic':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../basic
'@certd/plus-core':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../pro/plus-core
dayjs:
specifier: ^1.11.7
@@ -415,7 +415,7 @@ importers:
packages/libs/lib-k8s:
dependencies:
'@certd/basic':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/basic
'@kubernetes/client-node':
specifier: 0.21.0
@@ -455,16 +455,16 @@ importers:
packages/libs/lib-server:
dependencies:
'@certd/acme-client':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/acme-client
'@certd/basic':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/basic
'@certd/pipeline':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/pipeline
'@certd/plus-core':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../pro/plus-core
'@midwayjs/cache':
specifier: ~3.14.0
@@ -607,16 +607,16 @@ importers:
packages/plugins/plugin-cert:
dependencies:
'@certd/acme-client':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/acme-client
'@certd/basic':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/basic
'@certd/pipeline':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/pipeline
'@certd/plugin-lib':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../plugin-lib
'@google-cloud/publicca':
specifier: ^1.3.0
@@ -689,10 +689,10 @@ importers:
specifier: ^3.787.0
version: 3.810.0(aws-crt@1.26.2)
'@certd/basic':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/basic
'@certd/pipeline':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/pipeline
'@kubernetes/client-node':
specifier: 0.21.0
@@ -780,19 +780,19 @@ importers:
packages/pro/commercial-core:
dependencies:
'@certd/basic':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/basic
'@certd/lib-server':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../libs/lib-server
'@certd/pipeline':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/pipeline
'@certd/plugin-plus':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../plugin-plus
'@certd/plus-core':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../plus-core
'@midwayjs/core':
specifier: ~3.20.3
@@ -877,22 +877,22 @@ importers:
specifier: ^1.0.2
version: 1.0.3
'@certd/basic':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/basic
'@certd/lib-k8s':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../libs/lib-k8s
'@certd/pipeline':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/pipeline
'@certd/plugin-cert':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../plugins/plugin-cert
'@certd/plugin-lib':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../plugins/plugin-lib
'@certd/plus-core':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../plus-core
ali-oss:
specifier: ^6.21.0
@@ -995,7 +995,7 @@ importers:
packages/pro/plus-core:
dependencies:
'@certd/basic':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/basic
dayjs:
specifier: ^1.11.7
@@ -1285,10 +1285,10 @@ importers:
version: 0.1.3(zod@3.24.4)
devDependencies:
'@certd/lib-iframe':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../libs/lib-iframe
'@certd/pipeline':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/pipeline
'@rollup/plugin-commonjs':
specifier: ^25.0.7
@@ -1468,43 +1468,43 @@ importers:
specifier: ^3.705.0
version: 3.810.0(aws-crt@1.26.2)
'@certd/acme-client':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/acme-client
'@certd/basic':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/basic
'@certd/commercial-core':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../pro/commercial-core
'@certd/jdcloud':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../libs/lib-jdcloud
'@certd/lib-huawei':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../libs/lib-huawei
'@certd/lib-k8s':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../libs/lib-k8s
'@certd/lib-server':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../libs/lib-server
'@certd/midway-flyway-js':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../libs/midway-flyway-js
'@certd/pipeline':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../core/pipeline
'@certd/plugin-cert':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../plugins/plugin-cert
'@certd/plugin-lib':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../plugins/plugin-lib
'@certd/plugin-plus':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../pro/plugin-plus
'@certd/plus-core':
specifier: ^1.34.2
specifier: ^1.34.4
version: link:../../pro/plus-core
'@corsinvest/cv4pve-api-javascript':
specifier: ^8.3.0