mirror of
https://github.com/certd/certd.git
synced 2026-04-14 12:30:54 +08:00
Compare commits
14 Commits
v1.36.10
...
v2-dev-ord
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
69e6f2362e | ||
|
|
ab84835362 | ||
|
|
41ce8489dc | ||
|
|
edf089ec9e | ||
|
|
0ae9a3605c | ||
|
|
7f9c4e52ac | ||
|
|
35947f96a8 | ||
|
|
b0f91f1eea | ||
|
|
13dfca1749 | ||
|
|
9d9cd8a362 | ||
|
|
5e5c41fda5 | ||
|
|
3ebdc52b3e | ||
|
|
8656059151 | ||
|
|
a6d38f2458 |
@@ -3,6 +3,12 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 安全更新,备份数据库插件仅限管理员运行 ([13dfca1](https://github.com/certd/certd/commit/13dfca1749275526c82465a17c482b607c820fdd))
|
||||||
|
|
||||||
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
16:54
|
12:27
|
||||||
|
|||||||
@@ -3,6 +3,26 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 安全更新,备份数据库插件仅限管理员运行 ([13dfca1](https://github.com/certd/certd/commit/13dfca1749275526c82465a17c482b607c820fdd))
|
||||||
|
|
||||||
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 企业微信通知改成text类型,因为markdown类型不支持@用户 ([747d266](https://github.com/certd/certd/commit/747d26674248082e678a3fd5ecc94712641a2716))
|
||||||
|
* api接口获取不到证书的bug ([05a33a0](https://github.com/certd/certd/commit/05a33a0ec9999e2802f6c7b23cc1c61a2b9e963d))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 部署到阿里云oss插件支持选择上传到阿里云cas中的证书 ([2ea2c8c](https://github.com/certd/certd/commit/2ea2c8c05fc40f79595f1bbde67c1413558bf684))
|
||||||
|
* 优化子域名托管的说明 ([b15f514](https://github.com/certd/certd/commit/b15f514018b728acb0922ee3f93c1f302eb5d471))
|
||||||
|
* 账号即将过期通知 ([e403450](https://github.com/certd/certd/commit/e40345095f31e2fb8e2333a6647466659133fa0c))
|
||||||
|
* 子域名托管重复域名不允许添加 ([ffc0c7b](https://github.com/certd/certd/commit/ffc0c7bb7b16d9904fd2d905d1c4e1d4854e92a9))
|
||||||
|
|
||||||
## [1.36.9](https://github.com/certd/certd/compare/v1.36.7...v1.36.9) (2025-07-15)
|
## [1.36.9](https://github.com/certd/certd/compare/v1.36.7...v1.36.9) (2025-07-15)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -9,5 +9,5 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"npmClient": "pnpm",
|
"npmClient": "pnpm",
|
||||||
"version": "1.36.10"
|
"version": "1.36.11"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.11](https://github.com/publishlab/node-acme-client/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
## [1.36.10](https://github.com/publishlab/node-acme-client/compare/v1.36.9...v1.36.10) (2025-07-18)
|
## [1.36.10](https://github.com/publishlab/node-acme-client/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/acme-client
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"description": "Simple and unopinionated ACME client",
|
"description": "Simple and unopinionated ACME client",
|
||||||
"private": false,
|
"private": false,
|
||||||
"author": "nmorsman",
|
"author": "nmorsman",
|
||||||
"version": "1.36.10",
|
"version": "1.36.11",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"module": "scr/index.js",
|
"module": "scr/index.js",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"types"
|
"types"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/basic": "^1.36.10",
|
"@certd/basic": "^1.36.11",
|
||||||
"@peculiar/x509": "^1.11.0",
|
"@peculiar/x509": "^1.11.0",
|
||||||
"asn1js": "^3.0.5",
|
"asn1js": "^3.0.5",
|
||||||
"axios": "^1.7.2",
|
"axios": "^1.7.2",
|
||||||
@@ -69,5 +69,5 @@
|
|||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/publishlab/node-acme-client/issues"
|
"url": "https://github.com/publishlab/node-acme-client/issues"
|
||||||
},
|
},
|
||||||
"gitHead": "4a36fd2ec343794c5442e4402b21fa6869dfd90e"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/basic
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
23:02
|
12:23
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/basic",
|
"name": "@certd/basic",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.10",
|
"version": "1.36.11",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -45,5 +45,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "4a36fd2ec343794c5442e4402b21fa6869dfd90e"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 安全更新,备份数据库插件仅限管理员运行 ([13dfca1](https://github.com/certd/certd/commit/13dfca1749275526c82465a17c482b607c820fdd))
|
||||||
|
|
||||||
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/pipeline
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/pipeline",
|
"name": "@certd/pipeline",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.10",
|
"version": "1.36.11",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -17,8 +17,8 @@
|
|||||||
"pub": "npm publish"
|
"pub": "npm publish"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/basic": "^1.36.10",
|
"@certd/basic": "^1.36.11",
|
||||||
"@certd/plus-core": "^1.36.10",
|
"@certd/plus-core": "^1.36.11",
|
||||||
"dayjs": "^1.11.7",
|
"dayjs": "^1.11.7",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"reflect-metadata": "^0.1.13"
|
"reflect-metadata": "^0.1.13"
|
||||||
@@ -44,5 +44,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "4a36fd2ec343794c5442e4402b21fa6869dfd90e"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -352,6 +352,7 @@ export class Executor {
|
|||||||
pipeline: this.pipeline,
|
pipeline: this.pipeline,
|
||||||
runtime: this.runtime,
|
runtime: this.runtime,
|
||||||
step,
|
step,
|
||||||
|
define: cloneDeep(define),
|
||||||
lastStatus,
|
lastStatus,
|
||||||
http,
|
http,
|
||||||
download,
|
download,
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ export type PluginDefine = Registrable & {
|
|||||||
form: any;
|
form: any;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
onlyAdmin?: boolean;
|
||||||
needPlus?: boolean;
|
needPlus?: boolean;
|
||||||
showRunStrategy?: boolean;
|
showRunStrategy?: boolean;
|
||||||
pluginType?: string; //类型
|
pluginType?: string; //类型
|
||||||
@@ -85,6 +86,7 @@ export type TaskInstanceContext = {
|
|||||||
runtime: RunHistory;
|
runtime: RunHistory;
|
||||||
//步骤定义
|
//步骤定义
|
||||||
step: Step;
|
step: Step;
|
||||||
|
define: PluginDefine;
|
||||||
//日志
|
//日志
|
||||||
logger: ILogger;
|
logger: ILogger;
|
||||||
//当前步骤输入参数跟上一次执行比较是否有变化
|
//当前步骤输入参数跟上一次执行比较是否有变化
|
||||||
@@ -162,6 +164,12 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
|
|||||||
this.registerSecret(cert.key);
|
this.registerSecret(cert.key);
|
||||||
this.registerSecret(cert.one);
|
this.registerSecret(cert.one);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.ctx.define.onlyAdmin) {
|
||||||
|
if (!this.isAdmin()) {
|
||||||
|
throw new Error("只有管理员才能运行此任务");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAccess<T = any>(accessId: string | number, isCommon = false) {
|
async getAccess<T = any>(accessId: string | number, isCommon = false) {
|
||||||
|
|||||||
@@ -30,4 +30,5 @@ export const pluginGroups = {
|
|||||||
qiniu: new PluginGroup("qiniu", "七牛云", 5, "svg:icon-qiniuyun"),
|
qiniu: new PluginGroup("qiniu", "七牛云", 5, "svg:icon-qiniuyun"),
|
||||||
aws: new PluginGroup("aws", "亚马逊云", 6, "svg:icon-aws"),
|
aws: new PluginGroup("aws", "亚马逊云", 6, "svg:icon-aws"),
|
||||||
other: new PluginGroup("other", "其他", 10, "clarity:plugin-line"),
|
other: new PluginGroup("other", "其他", 10, "clarity:plugin-line"),
|
||||||
|
admin: new PluginGroup("admin", "管理", 11, "ion:settings-outline"),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-huawei
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-huawei",
|
"name": "@certd/lib-huawei",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.10",
|
"version": "1.36.11",
|
||||||
"main": "./dist/bundle.js",
|
"main": "./dist/bundle.js",
|
||||||
"module": "./dist/bundle.js",
|
"module": "./dist/bundle.js",
|
||||||
"types": "./dist/d/index.d.ts",
|
"types": "./dist/d/index.d.ts",
|
||||||
@@ -24,5 +24,5 @@
|
|||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
"tslib": "^2.8.1"
|
"tslib": "^2.8.1"
|
||||||
},
|
},
|
||||||
"gitHead": "4a36fd2ec343794c5442e4402b21fa6869dfd90e"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-iframe
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-iframe",
|
"name": "@certd/lib-iframe",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.10",
|
"version": "1.36.11",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -31,5 +31,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "4a36fd2ec343794c5442e4402b21fa6869dfd90e"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/jdcloud
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/jdcloud",
|
"name": "@certd/jdcloud",
|
||||||
"version": "1.36.10",
|
"version": "1.36.11",
|
||||||
"description": "jdcloud openApi sdk",
|
"description": "jdcloud openApi sdk",
|
||||||
"main": "./dist/bundle.js",
|
"main": "./dist/bundle.js",
|
||||||
"module": "./dist/bundle.js",
|
"module": "./dist/bundle.js",
|
||||||
@@ -61,5 +61,5 @@
|
|||||||
"fetch"
|
"fetch"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"gitHead": "4a36fd2ec343794c5442e4402b21fa6869dfd90e"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-k8s
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-k8s",
|
"name": "@certd/lib-k8s",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.10",
|
"version": "1.36.11",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
"pub": "npm publish"
|
"pub": "npm publish"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/basic": "^1.36.10",
|
"@certd/basic": "^1.36.11",
|
||||||
"@kubernetes/client-node": "0.21.0"
|
"@kubernetes/client-node": "0.21.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -32,5 +32,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "4a36fd2ec343794c5442e4402b21fa6869dfd90e"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export * from './lib/k8s.client.js';
|
export * from "./lib/k8s.client.js";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { CoreV1Api, KubeConfig, NetworkingV1Api, V1Ingress, V1Secret } from '@kubernetes/client-node';
|
import { CoreV1Api, KubeConfig, NetworkingV1Api, V1Ingress, V1Secret } from "@kubernetes/client-node";
|
||||||
import dns from 'dns';
|
import dns from "dns";
|
||||||
import { ILogger } from '@certd/basic';
|
import { ILogger } from "@certd/basic";
|
||||||
import _ from 'lodash-es';
|
import _ from "lodash-es";
|
||||||
|
|
||||||
export type K8sClientOpts = {
|
export type K8sClientOpts = {
|
||||||
kubeConfigStr: string;
|
kubeConfigStr: string;
|
||||||
@@ -9,6 +9,7 @@ export type K8sClientOpts = {
|
|||||||
//{ [domain]:{ip:'xxx.xx.xxx'} }
|
//{ [domain]:{ip:'xxx.xx.xxx'} }
|
||||||
//暂时没用
|
//暂时没用
|
||||||
lookup?: any;
|
lookup?: any;
|
||||||
|
skipTLSVerify?: boolean;
|
||||||
};
|
};
|
||||||
export class K8sClient {
|
export class K8sClient {
|
||||||
kubeconfig!: KubeConfig;
|
kubeconfig!: KubeConfig;
|
||||||
@@ -16,10 +17,12 @@ export class K8sClient {
|
|||||||
lookup!: (hostnameReq: any, options: any, callback: any) => void;
|
lookup!: (hostnameReq: any, options: any, callback: any) => void;
|
||||||
client!: CoreV1Api;
|
client!: CoreV1Api;
|
||||||
logger: ILogger;
|
logger: ILogger;
|
||||||
|
skipTLSVerify?: boolean;
|
||||||
constructor(opts: K8sClientOpts) {
|
constructor(opts: K8sClientOpts) {
|
||||||
this.kubeConfigStr = opts.kubeConfigStr;
|
this.kubeConfigStr = opts.kubeConfigStr;
|
||||||
this.logger = opts.logger;
|
this.logger = opts.logger;
|
||||||
this.setLookup(opts.lookup);
|
this.setLookup(opts.lookup);
|
||||||
|
this.skipTLSVerify = opts.skipTLSVerify;
|
||||||
this.init();
|
this.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,6 +30,18 @@ export class K8sClient {
|
|||||||
const kubeconfig = new KubeConfig();
|
const kubeconfig = new KubeConfig();
|
||||||
kubeconfig.loadFromString(this.kubeConfigStr);
|
kubeconfig.loadFromString(this.kubeConfigStr);
|
||||||
this.kubeconfig = kubeconfig;
|
this.kubeconfig = kubeconfig;
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (this.skipTLSVerify == true) {
|
||||||
|
for (const cluster of kubeconfig.getClusters()) {
|
||||||
|
// @ts-ignore
|
||||||
|
cluster["skipTLSVerify"] = this.skipTLSVerify;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.logger.warn("skipTLSVerify error", e);
|
||||||
|
}
|
||||||
|
|
||||||
this.client = kubeconfig.makeApiClient(CoreV1Api);
|
this.client = kubeconfig.makeApiClient(CoreV1Api);
|
||||||
|
|
||||||
// const reqOpts = { kubeconfig, request: {} } as any;
|
// const reqOpts = { kubeconfig, request: {} } as any;
|
||||||
@@ -47,9 +62,9 @@ export class K8sClient {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.lookup = (hostnameReq: any, options: any, callback: any) => {
|
this.lookup = (hostnameReq: any, options: any, callback: any) => {
|
||||||
this.logger.info('custom lookup', hostnameReq, localRecords);
|
this.logger.info("custom lookup", hostnameReq, localRecords);
|
||||||
if (localRecords[hostnameReq]) {
|
if (localRecords[hostnameReq]) {
|
||||||
this.logger.info('local record', hostnameReq, localRecords[hostnameReq]);
|
this.logger.info("local record", hostnameReq, localRecords[hostnameReq]);
|
||||||
callback(null, localRecords[hostnameReq].ip, 4);
|
callback(null, localRecords[hostnameReq].ip, 4);
|
||||||
} else {
|
} else {
|
||||||
dns.lookup(hostnameReq, options, callback);
|
dns.lookup(hostnameReq, options, callback);
|
||||||
@@ -63,7 +78,7 @@ export class K8sClient {
|
|||||||
* @returns secretsList
|
* @returns secretsList
|
||||||
*/
|
*/
|
||||||
async getSecrets(opts: { namespace: string }) {
|
async getSecrets(opts: { namespace: string }) {
|
||||||
const namespace = opts.namespace || 'default';
|
const namespace = opts.namespace || "default";
|
||||||
return await this.client.listNamespacedSecret(namespace);
|
return await this.client.listNamespacedSecret(namespace);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,9 +88,9 @@ export class K8sClient {
|
|||||||
* @returns {Promise<*>}
|
* @returns {Promise<*>}
|
||||||
*/
|
*/
|
||||||
async createSecret(opts: { namespace: string; body: V1Secret }) {
|
async createSecret(opts: { namespace: string; body: V1Secret }) {
|
||||||
const namespace = opts.namespace || 'default';
|
const namespace = opts.namespace || "default";
|
||||||
const created = await this.client.createNamespacedSecret(namespace, opts.body);
|
const created = await this.client.createNamespacedSecret(namespace, opts.body);
|
||||||
this.logger.info('new secrets:', opts.body);
|
this.logger.info("new secrets:", opts.body);
|
||||||
return created.body;
|
return created.body;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,24 +104,24 @@ export class K8sClient {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
async patchSecret(opts: { namespace: string; secretName: string; body: V1Secret }) {
|
async patchSecret(opts: { namespace: string; secretName: string; body: V1Secret }) {
|
||||||
const namespace = opts.namespace || 'default';
|
const namespace = opts.namespace || "default";
|
||||||
const secretName = opts.secretName;
|
const secretName = opts.secretName;
|
||||||
if (secretName == null) {
|
if (secretName == null) {
|
||||||
throw new Error('secretName 不能为空');
|
throw new Error("secretName 不能为空");
|
||||||
}
|
}
|
||||||
this.logger.info('patch secret:', secretName, namespace);
|
this.logger.info("patch secret:", secretName, namespace);
|
||||||
const oldSecret = await this.client.readNamespacedSecret(secretName, namespace);
|
const oldSecret = await this.client.readNamespacedSecret(secretName, namespace);
|
||||||
const newSecret = _.merge(oldSecret.body, opts.body);
|
const newSecret = _.merge(oldSecret.body, opts.body);
|
||||||
const res = await this.client.replaceNamespacedSecret(secretName, namespace, newSecret);
|
const res = await this.client.replaceNamespacedSecret(secretName, namespace, newSecret);
|
||||||
this.logger.info('secret updated');
|
this.logger.info("secret updated");
|
||||||
return res.body;
|
return res.body;
|
||||||
}
|
}
|
||||||
|
|
||||||
async getIngressList(opts: { namespace: string }) {
|
async getIngressList(opts: { namespace: string }) {
|
||||||
const namespace = opts.namespace || 'default';
|
const namespace = opts.namespace || "default";
|
||||||
const client = this.kubeconfig.makeApiClient(NetworkingV1Api);
|
const client = this.kubeconfig.makeApiClient(NetworkingV1Api);
|
||||||
const res = await client.listNamespacedIngress(namespace);
|
const res = await client.listNamespacedIngress(namespace);
|
||||||
this.logger.info('ingress list get:', res.body);
|
this.logger.info("ingress list get:", res.body);
|
||||||
return res.body;
|
return res.body;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,17 +137,17 @@ export class K8sClient {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
async patchIngress(opts: { namespace: string; ingressName: string; body: V1Ingress }) {
|
async patchIngress(opts: { namespace: string; ingressName: string; body: V1Ingress }) {
|
||||||
const namespace = opts.namespace || 'default';
|
const namespace = opts.namespace || "default";
|
||||||
const ingressName = opts.ingressName;
|
const ingressName = opts.ingressName;
|
||||||
if (!ingressName) {
|
if (!ingressName) {
|
||||||
throw new Error('ingressName 不能为空');
|
throw new Error("ingressName 不能为空");
|
||||||
}
|
}
|
||||||
this.logger.info('patch ingress:', ingressName, namespace);
|
this.logger.info("patch ingress:", ingressName, namespace);
|
||||||
const client = this.kubeconfig.makeApiClient(NetworkingV1Api);
|
const client = this.kubeconfig.makeApiClient(NetworkingV1Api);
|
||||||
const oldIngress = await client.readNamespacedIngress(ingressName, namespace);
|
const oldIngress = await client.readNamespacedIngress(ingressName, namespace);
|
||||||
const newIngress = _.merge(oldIngress.body, opts.body);
|
const newIngress = _.merge(oldIngress.body, opts.body);
|
||||||
const res = await client.replaceNamespacedIngress(ingressName, namespace, newIngress);
|
const res = await client.replaceNamespacedIngress(ingressName, namespace, newIngress);
|
||||||
this.logger.info('ingress patched', opts.body);
|
this.logger.info("ingress patched", opts.body);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-server
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-server",
|
"name": "@certd/lib-server",
|
||||||
"version": "1.36.10",
|
"version": "1.36.11",
|
||||||
"description": "midway with flyway, sql upgrade way ",
|
"description": "midway with flyway, sql upgrade way ",
|
||||||
"private": false,
|
"private": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -27,10 +27,10 @@
|
|||||||
],
|
],
|
||||||
"license": "AGPL",
|
"license": "AGPL",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/acme-client": "^1.36.10",
|
"@certd/acme-client": "^1.36.11",
|
||||||
"@certd/basic": "^1.36.10",
|
"@certd/basic": "^1.36.11",
|
||||||
"@certd/pipeline": "^1.36.10",
|
"@certd/pipeline": "^1.36.11",
|
||||||
"@certd/plus-core": "^1.36.10",
|
"@certd/plus-core": "^1.36.11",
|
||||||
"@midwayjs/cache": "~3.14.0",
|
"@midwayjs/cache": "~3.14.0",
|
||||||
"@midwayjs/core": "~3.20.3",
|
"@midwayjs/core": "~3.20.3",
|
||||||
"@midwayjs/i18n": "~3.20.3",
|
"@midwayjs/i18n": "~3.20.3",
|
||||||
@@ -61,5 +61,5 @@
|
|||||||
"typeorm": "^0.3.11",
|
"typeorm": "^0.3.11",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "4a36fd2ec343794c5442e4402b21fa6869dfd90e"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/midway-flyway-js",
|
"name": "@certd/midway-flyway-js",
|
||||||
"version": "1.36.10",
|
"version": "1.36.11",
|
||||||
"description": "midway with flyway, sql upgrade way ",
|
"description": "midway with flyway, sql upgrade way ",
|
||||||
"private": false,
|
"private": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -46,5 +46,5 @@
|
|||||||
"typeorm": "^0.3.11",
|
"typeorm": "^0.3.11",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "4a36fd2ec343794c5442e4402b21fa6869dfd90e"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|
||||||
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/plugin-cert
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/plugin-cert",
|
"name": "@certd/plugin-cert",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.10",
|
"version": "1.36.11",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
@@ -16,10 +16,10 @@
|
|||||||
"pub": "npm publish"
|
"pub": "npm publish"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/acme-client": "^1.36.10",
|
"@certd/acme-client": "^1.36.11",
|
||||||
"@certd/basic": "^1.36.10",
|
"@certd/basic": "^1.36.11",
|
||||||
"@certd/pipeline": "^1.36.10",
|
"@certd/pipeline": "^1.36.11",
|
||||||
"@certd/plugin-lib": "^1.36.10",
|
"@certd/plugin-lib": "^1.36.11",
|
||||||
"@google-cloud/publicca": "^1.3.0",
|
"@google-cloud/publicca": "^1.3.0",
|
||||||
"dayjs": "^1.11.7",
|
"dayjs": "^1.11.7",
|
||||||
"jszip": "^3.10.1",
|
"jszip": "^3.10.1",
|
||||||
@@ -43,5 +43,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "4a36fd2ec343794c5442e4402b21fa6869dfd90e"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|
||||||
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/plugin-lib
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/plugin-lib",
|
"name": "@certd/plugin-lib",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.10",
|
"version": "1.36.11",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
@@ -21,8 +21,8 @@
|
|||||||
"@alicloud/pop-core": "^1.7.10",
|
"@alicloud/pop-core": "^1.7.10",
|
||||||
"@alicloud/tea-util": "^1.4.10",
|
"@alicloud/tea-util": "^1.4.10",
|
||||||
"@aws-sdk/client-s3": "^3.787.0",
|
"@aws-sdk/client-s3": "^3.787.0",
|
||||||
"@certd/basic": "^1.36.10",
|
"@certd/basic": "^1.36.11",
|
||||||
"@certd/pipeline": "^1.36.10",
|
"@certd/pipeline": "^1.36.11",
|
||||||
"@kubernetes/client-node": "0.21.0",
|
"@kubernetes/client-node": "0.21.0",
|
||||||
"ali-oss": "^6.22.0",
|
"ali-oss": "^6.22.0",
|
||||||
"basic-ftp": "^5.0.5",
|
"basic-ftp": "^5.0.5",
|
||||||
@@ -53,5 +53,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "4a36fd2ec343794c5442e4402b21fa6869dfd90e"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
1
packages/ui/certd-client/.gitignore
vendored
1
packages/ui/certd-client/.gitignore
vendored
@@ -9,3 +9,4 @@ yarn.lock
|
|||||||
/.idea/
|
/.idea/
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
vite-profile.cpuprofile
|
vite-profile.cpuprofile
|
||||||
|
!build
|
||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/ui-client
|
||||||
|
|
||||||
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
### Performance Improvements
|
### Performance Improvements
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/ui-client",
|
"name": "@certd/ui-client",
|
||||||
"version": "1.36.10",
|
"version": "1.36.11",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --open",
|
"dev": "vite --open",
|
||||||
@@ -103,8 +103,8 @@
|
|||||||
"zod-defaults": "^0.1.3"
|
"zod-defaults": "^0.1.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@certd/lib-iframe": "^1.36.10",
|
"@certd/lib-iframe": "^1.36.11",
|
||||||
"@certd/pipeline": "^1.36.10",
|
"@certd/pipeline": "^1.36.11",
|
||||||
"@rollup/plugin-commonjs": "^25.0.7",
|
"@rollup/plugin-commonjs": "^25.0.7",
|
||||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||||
"@types/chai": "^4.3.12",
|
"@types/chai": "^4.3.12",
|
||||||
|
|||||||
@@ -280,6 +280,10 @@ function openUpgrade() {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const productListUrl = computed(() => {
|
||||||
|
return `http://localhost:1017/subject/#/product/list?appKey=${settingStore.installInfo.appKey}&subjectId=${settingStore.installInfo.siteId}`;
|
||||||
|
});
|
||||||
|
|
||||||
const modalRef = modal.confirm({
|
const modalRef = modal.confirm({
|
||||||
title,
|
title,
|
||||||
async onOk() {
|
async onOk() {
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ export default {
|
|||||||
runCount: "Run Count",
|
runCount: "Run Count",
|
||||||
expiringCerts: "Soon-to-Expire Certificates",
|
expiringCerts: "Soon-to-Expire Certificates",
|
||||||
supportedTasks: "Overview of Supported Deployment Tasks",
|
supportedTasks: "Overview of Supported Deployment Tasks",
|
||||||
|
changeLog: "Change Log",
|
||||||
},
|
},
|
||||||
steps: {
|
steps: {
|
||||||
createPipeline: "Create Certificate Pipeline",
|
createPipeline: "Create Certificate Pipeline",
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ export default {
|
|||||||
runCount: "运行次数",
|
runCount: "运行次数",
|
||||||
expiringCerts: "最快到期证书",
|
expiringCerts: "最快到期证书",
|
||||||
supportedTasks: "已支持的部署任务总览",
|
supportedTasks: "已支持的部署任务总览",
|
||||||
|
changeLog: "更新日志",
|
||||||
},
|
},
|
||||||
steps: {
|
steps: {
|
||||||
createPipeline: "创建证书流水线",
|
createPipeline: "创建证书流水线",
|
||||||
|
|||||||
@@ -112,7 +112,8 @@ function menuIcon(menu: MenuRecordRaw) {
|
|||||||
|
|
||||||
.vben-normal-menu__name,
|
.vben-normal-menu__name,
|
||||||
.vben-normal-menu__icon {
|
.vben-normal-menu__icon {
|
||||||
@apply text-primary-foreground font-semibold;
|
//@apply text-primary-foreground font-semibold;
|
||||||
|
@apply font-semibold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,43 +26,45 @@
|
|||||||
</template>
|
</template>
|
||||||
<div class="flex-col h-100 w-100 overflow-hidden">
|
<div class="flex-col h-100 w-100 overflow-hidden">
|
||||||
<a-tabs v-model:active-key="pluginGroupActive" tab-position="left" class="flex-1 overflow-hidden">
|
<a-tabs v-model:active-key="pluginGroupActive" tab-position="left" class="flex-1 overflow-hidden">
|
||||||
<a-tab-pane v-for="group of computedPluginGroups" :key="group.key" class="scroll-y">
|
<template v-for="group of computedPluginGroups" :key="group.key">
|
||||||
<template #tab>
|
<a-tab-pane v-if="(group.key === 'admin' && userStore.isAdmin) || group.key !== 'admin'" :key="group.key" class="scroll-y">
|
||||||
<div class="cd-step-form-tab-label">
|
<template #tab>
|
||||||
<fs-icon :icon="group.icon" class="mr-2" />
|
<div class="cd-step-form-tab-label">
|
||||||
<div>{{ group.title }}</div>
|
<fs-icon :icon="group.icon" class="mr-2" />
|
||||||
</div>
|
<div>{{ group.title }}</div>
|
||||||
</template>
|
</div>
|
||||||
<a-row v-if="!group.plugins || group.plugins.length === 0" :gutter="10">
|
</template>
|
||||||
<a-col class="flex-o">
|
<a-row v-if="!group.plugins || group.plugins.length === 0" :gutter="10">
|
||||||
<div class="flex-o m-10">没有找到插件</div>
|
<a-col class="flex-o">
|
||||||
</a-col>
|
<div class="flex-o m-10">没有找到插件</div>
|
||||||
</a-row>
|
</a-col>
|
||||||
<a-row v-else :gutter="10">
|
</a-row>
|
||||||
<a-col v-for="item of group.plugins" :key="item.key" class="step-plugin w-full md:w-[50%]">
|
<a-row v-else :gutter="10">
|
||||||
<a-card
|
<a-col v-for="item of group.plugins" :key="item.key" class="step-plugin w-full md:w-[50%]">
|
||||||
hoverable
|
<a-card
|
||||||
:class="{ current: item.name === currentStep.type }"
|
hoverable
|
||||||
@click="stepTypeSelected(item)"
|
:class="{ current: item.name === currentStep.type }"
|
||||||
@dblclick="
|
@click="stepTypeSelected(item)"
|
||||||
stepTypeSelected(item);
|
@dblclick="
|
||||||
stepTypeSave();
|
stepTypeSelected(item);
|
||||||
"
|
stepTypeSave();
|
||||||
>
|
"
|
||||||
<a-card-meta>
|
>
|
||||||
<template #title>
|
<a-card-meta>
|
||||||
<fs-icon class="plugin-icon" :icon="item.icon || 'clarity:plugin-line'"></fs-icon>
|
<template #title>
|
||||||
<span class="title" :title="item.title">{{ item.title }}</span>
|
<fs-icon class="plugin-icon" :icon="item.icon || 'clarity:plugin-line'"></fs-icon>
|
||||||
<vip-button v-if="item.needPlus" mode="icon" />
|
<span class="title" :title="item.title">{{ item.title }}</span>
|
||||||
</template>
|
<vip-button v-if="item.needPlus" mode="icon" />
|
||||||
<template #description>
|
</template>
|
||||||
<span :title="item.desc" v-html="transformDesc(item.desc)"></span>
|
<template #description>
|
||||||
</template>
|
<span :title="item.desc" v-html="transformDesc(item.desc)"></span>
|
||||||
</a-card-meta>
|
</template>
|
||||||
</a-card>
|
</a-card-meta>
|
||||||
</a-col>
|
</a-card>
|
||||||
</a-row>
|
</a-col>
|
||||||
</a-tab-pane>
|
</a-row>
|
||||||
|
</a-tab-pane>
|
||||||
|
</template>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@@ -124,6 +126,7 @@ import { useReference } from "/@/use/use-refrence";
|
|||||||
import { useSettingStore } from "/@/store/settings";
|
import { useSettingStore } from "/@/store/settings";
|
||||||
import { mitter } from "/@/utils/util.mitt";
|
import { mitter } from "/@/utils/util.mitt";
|
||||||
import { utils } from "/@/utils";
|
import { utils } from "/@/utils";
|
||||||
|
import { useUserStore } from "/@/store/user";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "PiStepForm",
|
name: "PiStepForm",
|
||||||
@@ -138,7 +141,7 @@ const props = defineProps({
|
|||||||
const emit = defineEmits(["update"]);
|
const emit = defineEmits(["update"]);
|
||||||
|
|
||||||
const pluginStore = usePluginStore();
|
const pluginStore = usePluginStore();
|
||||||
|
const userStore = useUserStore();
|
||||||
function transformDesc(desc: string = "") {
|
function transformDesc(desc: string = "") {
|
||||||
return utils.transformLink(desc);
|
return utils.transformLink(desc);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,10 @@
|
|||||||
</a-tag>
|
</a-tag>
|
||||||
</a-badge>
|
</a-badge>
|
||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" />
|
||||||
|
<a-tag color="blue" class="flex-inline pointer mr-0" @click="openChangeLogUrl()">
|
||||||
|
{{ t("certd.dashboard.changeLog") }}
|
||||||
|
</a-tag>
|
||||||
|
<a-divider type="vertical" />
|
||||||
<vip-button mode="nav" style="font-size: 12px"></vip-button>
|
<vip-button mode="nav" style="font-size: 12px"></vip-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="settingsStore.isComm">
|
<template v-if="settingsStore.isComm">
|
||||||
@@ -255,6 +259,9 @@ onMounted(async () => {
|
|||||||
function openUpgradeUrl() {
|
function openUpgradeUrl() {
|
||||||
window.open("https://certd.docmirror.cn/guide/install/upgrade.html");
|
window.open("https://certd.docmirror.cn/guide/install/upgrade.html");
|
||||||
}
|
}
|
||||||
|
function openChangeLogUrl() {
|
||||||
|
window.open("https://certd.docmirror.cn/guide/changelogs/CHANGELOG.html");
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 安全更新,备份数据库插件仅限管理员运行 ([13dfca1](https://github.com/certd/certd/commit/13dfca1749275526c82465a17c482b607c820fdd))
|
||||||
|
|
||||||
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/ui-server",
|
"name": "@certd/ui-server",
|
||||||
"version": "1.36.10",
|
"version": "1.36.11",
|
||||||
"description": "fast-server base midway",
|
"description": "fast-server base midway",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -42,20 +42,20 @@
|
|||||||
"@aws-sdk/client-cloudfront": "^3.699.0",
|
"@aws-sdk/client-cloudfront": "^3.699.0",
|
||||||
"@aws-sdk/client-iam": "^3.699.0",
|
"@aws-sdk/client-iam": "^3.699.0",
|
||||||
"@aws-sdk/client-s3": "^3.705.0",
|
"@aws-sdk/client-s3": "^3.705.0",
|
||||||
"@certd/acme-client": "^1.36.10",
|
"@certd/acme-client": "^1.36.11",
|
||||||
"@certd/basic": "^1.36.10",
|
"@certd/basic": "^1.36.11",
|
||||||
"@certd/commercial-core": "^1.36.10",
|
"@certd/commercial-core": "^1.36.11",
|
||||||
"@certd/cv4pve-api-javascript": "^8.4.1",
|
"@certd/cv4pve-api-javascript": "^8.4.1",
|
||||||
"@certd/jdcloud": "^1.36.10",
|
"@certd/jdcloud": "^1.36.11",
|
||||||
"@certd/lib-huawei": "^1.36.10",
|
"@certd/lib-huawei": "^1.36.11",
|
||||||
"@certd/lib-k8s": "^1.36.10",
|
"@certd/lib-k8s": "^1.36.11",
|
||||||
"@certd/lib-server": "^1.36.10",
|
"@certd/lib-server": "^1.36.11",
|
||||||
"@certd/midway-flyway-js": "^1.36.10",
|
"@certd/midway-flyway-js": "^1.36.11",
|
||||||
"@certd/pipeline": "^1.36.10",
|
"@certd/pipeline": "^1.36.11",
|
||||||
"@certd/plugin-cert": "^1.36.10",
|
"@certd/plugin-cert": "^1.36.11",
|
||||||
"@certd/plugin-lib": "^1.36.10",
|
"@certd/plugin-lib": "^1.36.11",
|
||||||
"@certd/plugin-plus": "^1.36.10",
|
"@certd/plugin-plus": "^1.36.11",
|
||||||
"@certd/plus-core": "^1.36.10",
|
"@certd/plus-core": "^1.36.11",
|
||||||
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.120",
|
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.120",
|
||||||
"@huaweicloud/huaweicloud-sdk-core": "^3.1.120",
|
"@huaweicloud/huaweicloud-sdk-core": "^3.1.120",
|
||||||
"@koa/cors": "^5.0.0",
|
"@koa/cors": "^5.0.0",
|
||||||
|
|||||||
@@ -30,3 +30,4 @@ export * from './plugin-github/index.js'
|
|||||||
export * from './plugin-namesilo/index.js'
|
export * from './plugin-namesilo/index.js'
|
||||||
export * from './plugin-proxmox/index.js'
|
export * from './plugin-proxmox/index.js'
|
||||||
export * from './plugin-wangsu/index.js'
|
export * from './plugin-wangsu/index.js'
|
||||||
|
export * from './plugin-admin/index.js'
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export * from './plugin-restart.js';
|
||||||
|
export * from './plugin-script.js';
|
||||||
|
export * from './plugin-db-backup.js';
|
||||||
@@ -14,14 +14,15 @@ const defaultFilePrefix = 'db_backup';
|
|||||||
name: 'DBBackupPlugin',
|
name: 'DBBackupPlugin',
|
||||||
title: '数据库备份',
|
title: '数据库备份',
|
||||||
icon: 'lucide:database-backup',
|
icon: 'lucide:database-backup',
|
||||||
desc: '仅支持备份SQLite数据库',
|
desc: '【仅管理员可用】仅支持备份SQLite数据库',
|
||||||
group: pluginGroups.other.key,
|
group: pluginGroups.admin.key,
|
||||||
showRunStrategy: true,
|
showRunStrategy: true,
|
||||||
default: {
|
default: {
|
||||||
strategy: {
|
strategy: {
|
||||||
runStrategy: RunStrategy.AlwaysRun,
|
runStrategy: RunStrategy.AlwaysRun,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
onlyAdmin:true,
|
||||||
needPlus: true,
|
needPlus: true,
|
||||||
})
|
})
|
||||||
export class DBBackupPlugin extends AbstractPlusTaskPlugin {
|
export class DBBackupPlugin extends AbstractPlusTaskPlugin {
|
||||||
@@ -157,6 +158,11 @@ export class DBBackupPlugin extends AbstractPlusTaskPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async execute(): Promise<void> {
|
async execute(): Promise<void> {
|
||||||
|
|
||||||
|
if (!this.isAdmin()) {
|
||||||
|
throw new Error('只有管理员才能运行此任务');
|
||||||
|
}
|
||||||
|
|
||||||
this.logger.info('开始备份数据库');
|
this.logger.info('开始备份数据库');
|
||||||
|
|
||||||
let dbPath = process.env.certd_typeorm_dataSource_default_database;
|
let dbPath = process.env.certd_typeorm_dataSource_default_database;
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy } from '@certd/pipeline';
|
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy } from '@certd/pipeline';
|
||||||
import { httpsServer } from '../../../modules/auto/https/server.js';
|
import { httpsServer } from '../../modules/auto/https/server.js';
|
||||||
|
|
||||||
@IsTaskPlugin({
|
@IsTaskPlugin({
|
||||||
name: 'RestartCertd',
|
name: 'RestartCertd',
|
||||||
title: '重启 Certd',
|
title: '重启 Certd',
|
||||||
icon: 'mdi:restart',
|
icon: 'mdi:restart',
|
||||||
desc: '【仅管理员可用】 重启 certd的https服务,用于更新 Certd 的 ssl 证书',
|
desc: '【仅管理员可用】 重启 certd的https服务,用于更新 Certd 的 ssl 证书',
|
||||||
group: pluginGroups.other.key,
|
group: pluginGroups.admin.key,
|
||||||
|
onlyAdmin:true,
|
||||||
default: {
|
default: {
|
||||||
strategy: {
|
strategy: {
|
||||||
runStrategy: RunStrategy.SkipWhenSucceed,
|
runStrategy: RunStrategy.SkipWhenSucceed,
|
||||||
@@ -11,8 +11,9 @@ export type CustomScriptContext = {
|
|||||||
title: '自定义js脚本',
|
title: '自定义js脚本',
|
||||||
icon: 'ri:javascript-line',
|
icon: 'ri:javascript-line',
|
||||||
desc: '【仅管理员】运行自定义js脚本执行',
|
desc: '【仅管理员】运行自定义js脚本执行',
|
||||||
group: pluginGroups.other.key,
|
group: pluginGroups.admin.key,
|
||||||
showRunStrategy: true,
|
showRunStrategy: true,
|
||||||
|
onlyAdmin: true,
|
||||||
default: {
|
default: {
|
||||||
strategy: {
|
strategy: {
|
||||||
runStrategy: RunStrategy.SkipWhenSucceed,
|
runStrategy: RunStrategy.SkipWhenSucceed,
|
||||||
@@ -1,5 +1,2 @@
|
|||||||
export * from './plugin-restart.js';
|
|
||||||
export * from './plugin-script.js';
|
|
||||||
export * from './plugin-wait.js';
|
export * from './plugin-wait.js';
|
||||||
export * from './plugin-db-backup.js';
|
|
||||||
export * from './plugin-deploy-to-mail.js';
|
export * from './plugin-deploy-to-mail.js';
|
||||||
|
|||||||
@@ -136,6 +136,18 @@ export class DeployCertToTencentTKEIngressPlugin extends AbstractTaskPlugin {
|
|||||||
ingressName!: string | string[];
|
ingressName!: string | string[];
|
||||||
|
|
||||||
|
|
||||||
|
@TaskInput({
|
||||||
|
title: "忽略证书校验",
|
||||||
|
required: false,
|
||||||
|
helper: "是否忽略证书校验",
|
||||||
|
component: {
|
||||||
|
name: "a-switch",
|
||||||
|
vModel: "checked",
|
||||||
|
}
|
||||||
|
})
|
||||||
|
skipTLSVerify!:boolean
|
||||||
|
|
||||||
|
|
||||||
// @TaskInput({ title: "集群内网ip", helper: "如果开启了外网的话,无需设置" })
|
// @TaskInput({ title: "集群内网ip", helper: "如果开启了外网的话,无需设置" })
|
||||||
// clusterIp!: string;
|
// clusterIp!: string;
|
||||||
|
|
||||||
@@ -163,7 +175,8 @@ export class DeployCertToTencentTKEIngressPlugin extends AbstractTaskPlugin {
|
|||||||
this.logger.info("kubeconfig已成功获取");
|
this.logger.info("kubeconfig已成功获取");
|
||||||
const k8sClient = new this.K8sClient({
|
const k8sClient = new this.K8sClient({
|
||||||
kubeConfigStr,
|
kubeConfigStr,
|
||||||
logger: this.logger
|
logger: this.logger,
|
||||||
|
skipTLSVerify: this.skipTLSVerify,
|
||||||
});
|
});
|
||||||
// if (this.clusterIp != null) {
|
// if (this.clusterIp != null) {
|
||||||
// if (!this.clusterDomain) {
|
// if (!this.clusterDomain) {
|
||||||
|
|||||||
823
pnpm-lock.yaml
generated
823
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user