mirror of https://github.com/certd/certd
Merge branch 'v2-dev' into v2
commit
4d68a174cb
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -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.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
|
||||
|
|
|
@ -1 +1 @@
|
|||
00:14
|
||||
00:05
|
||||
|
|
|
@ -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.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
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
}
|
||||
},
|
||||
"npmClient": "pnpm",
|
||||
"version": "1.34.3"
|
||||
"version": "1.34.4"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
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/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
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"description": "Simple and unopinionated ACME client",
|
||||
"private": false,
|
||||
"author": "nmorsman",
|
||||
"version": "1.34.3",
|
||||
"version": "1.34.4",
|
||||
"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.4",
|
||||
"@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": "0b152a3cb8ef13113f9612c1bf555755e6f5b209"
|
||||
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,13 @@
|
|||
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
|
||||
|
||||
* 修复导入在线插件不生效的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
|
||||
|
|
|
@ -1 +1 @@
|
|||
00:08
|
||||
23:58
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/basic",
|
||||
"private": false,
|
||||
"version": "1.34.3",
|
||||
"version": "1.34.4",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
|
@ -45,5 +45,5 @@
|
|||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "0b152a3cb8ef13113f9612c1bf555755e6f5b209"
|
||||
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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)}`);
|
||||
|
|
|
@ -3,6 +3,12 @@
|
|||
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
|
||||
|
||||
* 修复导入在线插件不生效的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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/pipeline",
|
||||
"private": false,
|
||||
"version": "1.34.3",
|
||||
"version": "1.34.4",
|
||||
"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.4",
|
||||
"@certd/plus-core": "^1.34.4",
|
||||
"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": "0b152a3cb8ef13113f9612c1bf555755e6f5b209"
|
||||
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
|
||||
}
|
||||
|
|
|
@ -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("插件名称不能为空");
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
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)
|
||||
|
||||
**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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/lib-huawei",
|
||||
"private": false,
|
||||
"version": "1.34.3",
|
||||
"version": "1.34.4",
|
||||
"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": "0b152a3cb8ef13113f9612c1bf555755e6f5b209"
|
||||
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
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)
|
||||
|
||||
**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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/lib-iframe",
|
||||
"private": false,
|
||||
"version": "1.34.3",
|
||||
"version": "1.34.4",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
|
@ -31,5 +31,5 @@
|
|||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "0b152a3cb8ef13113f9612c1bf555755e6f5b209"
|
||||
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
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)
|
||||
|
||||
**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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@certd/jdcloud",
|
||||
"version": "1.34.3",
|
||||
"version": "1.34.4",
|
||||
"description": "jdcloud openApi sdk",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/bundle.js",
|
||||
|
@ -61,5 +61,5 @@
|
|||
"fetch"
|
||||
]
|
||||
},
|
||||
"gitHead": "0b152a3cb8ef13113f9612c1bf555755e6f5b209"
|
||||
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
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)
|
||||
|
||||
**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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/lib-k8s",
|
||||
"private": false,
|
||||
"version": "1.34.3",
|
||||
"version": "1.34.4",
|
||||
"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.4",
|
||||
"@kubernetes/client-node": "0.21.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -32,5 +32,5 @@
|
|||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "0b152a3cb8ef13113f9612c1bf555755e6f5b209"
|
||||
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
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)
|
||||
|
||||
**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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@certd/lib-server",
|
||||
"version": "1.34.3",
|
||||
"version": "1.34.4",
|
||||
"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.4",
|
||||
"@certd/basic": "^1.34.4",
|
||||
"@certd/pipeline": "^1.34.4",
|
||||
"@certd/plus-core": "^1.34.4",
|
||||
"@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": "0b152a3cb8ef13113f9612c1bf555755e6f5b209"
|
||||
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
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)
|
||||
|
||||
**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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@certd/midway-flyway-js",
|
||||
"version": "1.34.3",
|
||||
"version": "1.34.4",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
|
@ -46,5 +46,5 @@
|
|||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "0b152a3cb8ef13113f9612c1bf555755e6f5b209"
|
||||
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
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)
|
||||
|
||||
**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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/plugin-cert",
|
||||
"private": false,
|
||||
"version": "1.34.3",
|
||||
"version": "1.34.4",
|
||||
"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.4",
|
||||
"@certd/basic": "^1.34.4",
|
||||
"@certd/pipeline": "^1.34.4",
|
||||
"@certd/plugin-lib": "^1.34.4",
|
||||
"@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": "0b152a3cb8ef13113f9612c1bf555755e6f5b209"
|
||||
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
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)
|
||||
|
||||
**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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/plugin-lib",
|
||||
"private": false,
|
||||
"version": "1.34.3",
|
||||
"version": "1.34.4",
|
||||
"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.4",
|
||||
"@certd/pipeline": "^1.34.4",
|
||||
"@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": "0b152a3cb8ef13113f9612c1bf555755e6f5b209"
|
||||
"gitHead": "e2dadfdc4023c14f412940aa40c48d3e70353289"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,17 @@
|
|||
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
|
||||
|
||||
* 修复插件导入的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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@certd/ui-client",
|
||||
"version": "1.34.3",
|
||||
"version": "1.34.4",
|
||||
"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.4",
|
||||
"@certd/pipeline": "^1.34.4",
|
||||
"@rollup/plugin-commonjs": "^25.0.7",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@types/chai": "^4.3.12",
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue