Merge remote-tracking branch 'origin/v2-dev' into v2-dev

This commit is contained in:
xiaojunnuo
2025-05-20 01:13:50 +08:00
44 changed files with 341 additions and 125 deletions

View File

@@ -3,6 +3,15 @@
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))
## [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.4",
"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.4",
"@certd/basic": "^1.34.4",
"@certd/commercial-core": "^1.34.4",
"@certd/jdcloud": "^1.34.4",
"@certd/lib-huawei": "^1.34.4",
"@certd/lib-k8s": "^1.34.4",
"@certd/lib-server": "^1.34.4",
"@certd/midway-flyway-js": "^1.34.4",
"@certd/pipeline": "^1.34.4",
"@certd/plugin-cert": "^1.34.4",
"@certd/plugin-lib": "^1.34.4",
"@certd/plugin-plus": "^1.34.4",
"@certd/plus-core": "^1.34.4",
"@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
}

View File

@@ -350,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;
}

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){