mirror of
https://github.com/certd/certd.git
synced 2026-04-17 16:00:55 +08:00
Compare commits
21 Commits
v2_singlet
...
v1.37.17
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
786780ce9b | ||
|
|
d2e9fed62d | ||
|
|
0e5a4fb098 | ||
|
|
f223f042de | ||
|
|
cd413825ed | ||
|
|
a851c272cd | ||
|
|
412077b418 | ||
|
|
4df6f8a50e | ||
|
|
44bf4b1cc1 | ||
|
|
136e8dd7c5 | ||
|
|
024b2b04a4 | ||
|
|
5bbf210394 | ||
|
|
039c62b09b | ||
|
|
07f0aa45ef | ||
|
|
de11f44309 | ||
|
|
acee96ef17 | ||
|
|
4ed49f9dfa | ||
|
|
f68b585f8f | ||
|
|
13ddc979ec | ||
|
|
b0b7ac3efb | ||
|
|
62f8525dd5 |
58
.github/workflows/publish-atom.yaml
vendored
Normal file
58
.github/workflows/publish-atom.yaml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: publish-atomgit
|
||||
on:
|
||||
push:
|
||||
branches: ['v2-dev']
|
||||
paths:
|
||||
- "trigger/publish.trigger"
|
||||
# workflow_run:
|
||||
# workflows: [ "deploy-demo" ]
|
||||
# types:
|
||||
# - completed
|
||||
|
||||
# schedule:
|
||||
# - # 国际时间 19:17 执行,北京时间3:17 ↙↙↙ 改成你想要每天自动执行的时间
|
||||
# - cron: '17 19 * * *'
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
publish-atomgit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
lfs: true
|
||||
- name: get_certd_version
|
||||
id: get_certd_version
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const pnpmWorkspace = "./pnpm-workspace.yaml";
|
||||
fs.unlinkSync(pnpmWorkspace)
|
||||
const jsonFilePath = "./packages/ui/certd-server/package.json";
|
||||
const jsonContent = fs.readFileSync(jsonFilePath, 'utf-8');
|
||||
const pkg = JSON.parse(jsonContent)
|
||||
console.log("certd_version:",pkg.version);
|
||||
return pkg.version
|
||||
- run: |
|
||||
npm install -g pnpm
|
||||
pnpm install
|
||||
npm run build
|
||||
working-directory: ./packages/ui/certd-client
|
||||
|
||||
- name: publish_to_atomgit
|
||||
id: publish_to_atomgit
|
||||
run: |
|
||||
rm -rf ./packages/ui/certd-client/dist/**/*.gz
|
||||
zip -r ui.zip ./packages/ui/certd-client/dist
|
||||
export ATOMGIT_TOKEN=${{ secrets.ATOMGIT_TOKEN }}
|
||||
pnpm install
|
||||
npm run publish_to_atomgit
|
||||
working-directory: ./
|
||||
|
||||
11
.github/workflows/release-image.yml
vendored
11
.github/workflows/release-image.yml
vendored
@@ -117,7 +117,6 @@ jobs:
|
||||
# registry.cn-shenzhen.aliyuncs.com/handsfree/certd-agent:${{steps.get_certd_version.outputs.result}}
|
||||
# greper/certd-agent:latest
|
||||
# greper/certd-agent:${{steps.get_certd_version.outputs.result}}
|
||||
|
||||
- name: deploy-certd-doc
|
||||
uses: tyrrrz/action-http-request@master
|
||||
with:
|
||||
@@ -131,3 +130,13 @@ jobs:
|
||||
Content-Type: application/json
|
||||
retry-count: 3
|
||||
retry-delay: 5000
|
||||
|
||||
- name: publish_to_atomgit
|
||||
id: publish_to_atomgit
|
||||
run: |
|
||||
rm -rf ./packages/ui/certd-client/dist/**/*.gz
|
||||
zip -r ui.zip ./packages/ui/certd-client/dist
|
||||
export ATOMGIT_TOKEN=${{ secrets.ATOMGIT_TOKEN }}
|
||||
pnpm install
|
||||
npm run publish_to_atomgit
|
||||
working-directory: ./
|
||||
2
.npmrc
2
.npmrc
@@ -3,4 +3,4 @@ prefer-workspace-packages=true
|
||||
better_sqlite3_binary_host=https://registry.npmmirror.com/-/binary/better-sqlite3
|
||||
better_sqlite3_binary_host_mirror=https://registry.npmmirror.com/-/binary/better-sqlite3
|
||||
better-sqlite3_binary_host=https://registry.npmmirror.com/-/binary/better-sqlite3
|
||||
better-sqlite3_binary_host_mirror=https://registry.npmmirror.com/-/binary/better-sqlite3
|
||||
better-sqlite3_binary_host_mirror=https://registry.npmmirror.com/-/binary/better-sqlite3
|
||||
33
CHANGELOG.md
33
CHANGELOG.md
@@ -3,6 +3,39 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.37.17](https://github.com/certd/certd/compare/v1.37.16...v1.37.17) (2025-12-29)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 发送证书到邮箱插件的邮件模版转为使用邮箱配置中的通用模版 ([c5a3003](https://github.com/certd/certd/commit/c5a3003cf7b640500a90ec2c8961859ffe6fdb18))
|
||||
* 首页最快到期证书,不包含已禁用的流水线 ([d731956](https://github.com/certd/certd/commit/d731956b066e4dbbe24d4de7b3d3679b355eb97c))
|
||||
* 修复部署到华为obs 报错的bug ([dd19afc](https://github.com/certd/certd/commit/dd19afce928a7f36312af9df1e7e5ed3eb1e214a))
|
||||
* 修复从模版创建的流水线不会自动执行的bug ([833808c](https://github.com/certd/certd/commit/833808c5deb716122b241d3d67349d2d6a18bf45))
|
||||
* 修复流水线列表step数量统计错误的bug ([0e5a4fb](https://github.com/certd/certd/commit/0e5a4fb098d3261b690c551cf2b95198cac487e7))
|
||||
* 修复用户删除后,用相同的oauth授权登录报错用户不存在的问题 ([e505916](https://github.com/certd/certd/commit/e5059165259e4d757abc811c0c14bbc4a3dbaee9))
|
||||
* 修复站点ip监控报主站与ip证书过期时间不一致的问题 ([62f8525](https://github.com/certd/certd/commit/62f8525dd5da95dc07ed103f602644c6e5f7f8e3))
|
||||
* 修复serverchan3 没有选择tags报错的bug ([5bbf210](https://github.com/certd/certd/commit/5bbf210394883c4893c365bd16e999490b6e9b41))
|
||||
* telegram 修复消息内存在横杠无法发出的bug ([5f4469e](https://github.com/certd/certd/commit/5f4469e306187c31d8a74d53b17ea3a213420367))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 批量修改定时时间支持随机时间 ([d0f653d](https://github.com/certd/certd/commit/d0f653da9a2970920e961e7404ff04080bccd343))
|
||||
* 批量运行优化,支持普通运行和强制重新运行 ([039c62b](https://github.com/certd/certd/commit/039c62b09b37cdda35d33c6ee9adecad62dee75c))
|
||||
* 升级lego到4.30.1版本 ([136e8dd](https://github.com/certd/certd/commit/136e8dd7c5ff7199ff4b0bcca95b8a03aa847553))
|
||||
* 腾讯云EO增加请求参数打印 ([5b5deac](https://github.com/certd/certd/commit/5b5deac7d98684eda5c68384241a4d62c48d803b))
|
||||
* 优化阿里云esa清理证书时机 ([5359a76](https://github.com/certd/certd/commit/5359a7670fac5a18c4294b37a34227308a0deed6))
|
||||
* 优化源码方式部署,前端无需编译 ([13ddc97](https://github.com/certd/certd/commit/13ddc979ec7953e3db8db76dd23fd85a3b3c7997))
|
||||
* 支持部署到goedge ([44bf4b1](https://github.com/certd/certd/commit/44bf4b1cc1aafa2d711c3b8e408009f0ceb413eb))
|
||||
* 支持从阿里云商用证书订单中获取证书 ([8872466](https://github.com/certd/certd/commit/887246696861c3a0b1f99fd9ad978caea423c650))
|
||||
* 支持授权给管理员查看和下载用户证书 ([1347355](https://github.com/certd/certd/commit/1347355cb117694abe99da385352a19771a32e84))
|
||||
* 支持执行队列,避免同一时间触发流水线太多导致被限制 ([888d959](https://github.com/certd/certd/commit/888d9591fe9730b529e1c355d71f41e7ec9b479d))
|
||||
* 支持aws route53 dns ([cbb8319](https://github.com/certd/certd/commit/cbb8319cfa48673e81ec15894adc3376c173c97e))
|
||||
* 支持ucloud waf(未测试) ([a248367](https://github.com/certd/certd/commit/a248367b154c38661a6797ef64e37ec99d4e2abf))
|
||||
* 支持ucloud,上传到ussl,部署到ucdn ([e61daae](https://github.com/certd/certd/commit/e61daaee2d0dec19710cd4ec759219a071f2435e))
|
||||
* 执行队列数量支持设置 ([cd94488](https://github.com/certd/certd/commit/cd944882c3272adad4a2da94a3889a01fe05fe13))
|
||||
* aws route53 ([8caab1f](https://github.com/certd/certd/commit/8caab1fd9264df548f467b94202d567107b7a30b))
|
||||
* ip证书校验方式提示 ([773cada](https://github.com/certd/certd/commit/773cada57a01fb28ea8602062aaeec3d45109ea9))
|
||||
|
||||
## [1.37.16](https://github.com/certd/certd/compare/v1.37.15...v1.37.16) (2025-12-15)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
}
|
||||
},
|
||||
"npmClient": "pnpm",
|
||||
"version": "1.37.16"
|
||||
"version": "1.37.17"
|
||||
}
|
||||
|
||||
10
package.json
10
package.json
@@ -8,6 +8,7 @@
|
||||
"@lerna-lite/publish": "^3.9.3",
|
||||
"@lerna-lite/run": "^3.9.3",
|
||||
"@lerna-lite/version": "^3.9.3",
|
||||
"axios": "^1.9.0",
|
||||
"medium-zoom": "^1.1.0",
|
||||
"vitepress": "^2.0.0-alpha.4",
|
||||
"vitepress-plugin-lightbox": "^1.0.2"
|
||||
@@ -27,8 +28,8 @@
|
||||
"prepublishOnly1": "npm run check && lerna run build ",
|
||||
"prepublishOnly2": "npm run check && npm run before-build && lerna run build ",
|
||||
"before-build": "npm run transform-sql && cd ./packages/core/basic && time /t >build.md && git add ./build.md && git commit -m \"build: prepare to build\"",
|
||||
"deploy1": "node --experimental-json-modules deploy.js ",
|
||||
"check": "node --experimental-json-modules publish-check.js",
|
||||
"deploy1": "node --experimental-json-modules ./scripts/deploy.js ",
|
||||
"check": "node --experimental-json-modules ./scripts/publish-check.js",
|
||||
"init": "lerna run build",
|
||||
"init:dev": "lerna run build",
|
||||
"docs:dev": "vitepress dev docs",
|
||||
@@ -36,11 +37,12 @@
|
||||
"docs:preview": "vitepress preview docs",
|
||||
"pub": "echo 1",
|
||||
"dev": "pnpm run -r --parallel compile ",
|
||||
"release": "time /t >trigger/release.trigger && git add trigger/release.trigger && git commit -m \"build: release\" && git push"
|
||||
"release": "time /t >trigger/release.trigger && git add trigger/release.trigger && git commit -m \"build: release\" && git push",
|
||||
"publish_to_atomgit": "node --experimental-json-modules ./scripts/publish-atomgit.js",
|
||||
"get_version": "node --experimental-json-modules ./scripts/version.js"
|
||||
},
|
||||
"license": "AGPL-3.0",
|
||||
"dependencies": {
|
||||
"axios": "^1.7.7",
|
||||
"copyfiles": "^2.4.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"typescript": "^5.4.2"
|
||||
|
||||
@@ -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.37.17](https://github.com/publishlab/node-acme-client/compare/v1.37.16...v1.37.17) (2025-12-29)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* aws route53 ([8caab1f](https://github.com/publishlab/node-acme-client/commit/8caab1fd9264df548f467b94202d567107b7a30b))
|
||||
|
||||
## [1.37.16](https://github.com/publishlab/node-acme-client/compare/v1.37.15...v1.37.16) (2025-12-15)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"description": "Simple and unopinionated ACME client",
|
||||
"private": false,
|
||||
"author": "nmorsman",
|
||||
"version": "1.37.16",
|
||||
"version": "1.37.17",
|
||||
"type": "module",
|
||||
"module": "scr/index.js",
|
||||
"main": "src/index.js",
|
||||
@@ -18,10 +18,10 @@
|
||||
"types"
|
||||
],
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.37.16",
|
||||
"@certd/basic": "^1.37.17",
|
||||
"@peculiar/x509": "^1.11.0",
|
||||
"asn1js": "^3.0.5",
|
||||
"axios": "^1.7.2",
|
||||
"axios": "^1.9.0",
|
||||
"debug": "^4.3.5",
|
||||
"http-proxy-agent": "^7.0.2",
|
||||
"https-proxy-agent": "^7.0.5",
|
||||
|
||||
@@ -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.37.17](https://github.com/certd/certd/compare/v1.37.16...v1.37.17) (2025-12-29)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
## [1.37.16](https://github.com/certd/certd/compare/v1.37.15...v1.37.16) (2025-12-15)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1 +1 @@
|
||||
01:44
|
||||
22:29
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/basic",
|
||||
"private": false,
|
||||
"version": "1.37.16",
|
||||
"version": "1.37.17",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -18,7 +18,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"async-lock": "^1.4.1",
|
||||
"axios": "^1.7.2",
|
||||
"axios": "^1.9.0",
|
||||
"dayjs": "^1.11.7",
|
||||
"http-proxy-agent": "^7.0.2",
|
||||
"https-proxy-agent": "^7.0.5",
|
||||
|
||||
@@ -3,6 +3,16 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.37.17](https://github.com/certd/certd/compare/v1.37.16...v1.37.17) (2025-12-29)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 发送证书到邮箱插件的邮件模版转为使用邮箱配置中的通用模版 ([c5a3003](https://github.com/certd/certd/commit/c5a3003cf7b640500a90ec2c8961859ffe6fdb18))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 支持ucloud,上传到ussl,部署到ucdn ([e61daae](https://github.com/certd/certd/commit/e61daaee2d0dec19710cd4ec759219a071f2435e))
|
||||
|
||||
## [1.37.16](https://github.com/certd/certd/compare/v1.37.15...v1.37.16) (2025-12-15)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/pipeline",
|
||||
"private": false,
|
||||
"version": "1.37.16",
|
||||
"version": "1.37.17",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -18,8 +18,8 @@
|
||||
"compile": "tsc --skipLibCheck --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.37.16",
|
||||
"@certd/plus-core": "^1.37.16",
|
||||
"@certd/basic": "^1.37.17",
|
||||
"@certd/plus-core": "^1.37.17",
|
||||
"dayjs": "^1.11.7",
|
||||
"lodash-es": "^4.17.21",
|
||||
"reflect-metadata": "^0.1.13"
|
||||
|
||||
@@ -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.37.17](https://github.com/certd/certd/compare/v1.37.16...v1.37.17) (2025-12-29)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
## [1.37.16](https://github.com/certd/certd/compare/v1.37.15...v1.37.16) (2025-12-15)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-huawei",
|
||||
"private": false,
|
||||
"version": "1.37.16",
|
||||
"version": "1.37.17",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/bundle.js",
|
||||
"types": "./dist/d/index.d.ts",
|
||||
@@ -14,7 +14,7 @@
|
||||
"pub": "npm publish"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^1.7.2",
|
||||
"axios": "^1.9.0",
|
||||
"rimraf": "^5.0.5",
|
||||
"rollup": "^3.7.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.37.17](https://github.com/certd/certd/compare/v1.37.16...v1.37.17) (2025-12-29)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
## [1.37.16](https://github.com/certd/certd/compare/v1.37.15...v1.37.16) (2025-12-15)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-iframe",
|
||||
"private": false,
|
||||
"version": "1.37.16",
|
||||
"version": "1.37.17",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -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.37.17](https://github.com/certd/certd/compare/v1.37.16...v1.37.17) (2025-12-29)
|
||||
|
||||
**Note:** Version bump only for package @certd/jdcloud
|
||||
|
||||
## [1.37.16](https://github.com/certd/certd/compare/v1.37.15...v1.37.16) (2025-12-15)
|
||||
|
||||
**Note:** Version bump only for package @certd/jdcloud
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/jdcloud",
|
||||
"version": "1.37.16",
|
||||
"version": "1.37.17",
|
||||
"description": "jdcloud openApi sdk",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/bundle.js",
|
||||
|
||||
@@ -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.37.17](https://github.com/certd/certd/compare/v1.37.16...v1.37.17) (2025-12-29)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
## [1.37.16](https://github.com/certd/certd/compare/v1.37.15...v1.37.16) (2025-12-15)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-k8s",
|
||||
"private": false,
|
||||
"version": "1.37.16",
|
||||
"version": "1.37.17",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -17,7 +17,7 @@
|
||||
"pub": "npm publish"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.37.16",
|
||||
"@certd/basic": "^1.37.17",
|
||||
"@kubernetes/client-node": "0.21.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -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.37.17](https://github.com/certd/certd/compare/v1.37.16...v1.37.17) (2025-12-29)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 执行队列数量支持设置 ([cd94488](https://github.com/certd/certd/commit/cd944882c3272adad4a2da94a3889a01fe05fe13))
|
||||
|
||||
## [1.37.16](https://github.com/certd/certd/compare/v1.37.15...v1.37.16) (2025-12-15)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/lib-server",
|
||||
"version": "1.37.16",
|
||||
"version": "1.37.17",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
@@ -28,11 +28,11 @@
|
||||
],
|
||||
"license": "AGPL",
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.37.16",
|
||||
"@certd/basic": "^1.37.16",
|
||||
"@certd/pipeline": "^1.37.16",
|
||||
"@certd/plugin-lib": "^1.37.16",
|
||||
"@certd/plus-core": "^1.37.16",
|
||||
"@certd/acme-client": "^1.37.17",
|
||||
"@certd/basic": "^1.37.17",
|
||||
"@certd/pipeline": "^1.37.17",
|
||||
"@certd/plugin-lib": "^1.37.17",
|
||||
"@certd/plus-core": "^1.37.17",
|
||||
"@midwayjs/cache": "3.14.0",
|
||||
"@midwayjs/core": "3.20.11",
|
||||
"@midwayjs/i18n": "3.20.13",
|
||||
|
||||
@@ -54,7 +54,7 @@ export class UserTaskQueue{
|
||||
|
||||
export class ExecutorQueue{
|
||||
queues: Record<number, UserTaskQueue> = {};
|
||||
maxRunningCount: number = 8;
|
||||
maxRunningCount: number = 10;
|
||||
|
||||
|
||||
setMaxRunningCount(count: number) {
|
||||
|
||||
@@ -14,7 +14,7 @@ export const uploadTmpFileCacheKey = 'tmpfile_key_';
|
||||
/**
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class FileService {
|
||||
async saveFile(userId: number, tmpCacheKey: any, permission: 'public' | 'private') {
|
||||
if (tmpCacheKey.startsWith(`/${permission}`)) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { IOcrService } from "@certd/plugin-lib";
|
||||
/**
|
||||
*/
|
||||
@Provide("ocrService")
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class OcrService implements IOcrService {
|
||||
@Inject()
|
||||
plusService: PlusService;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { SysInstallInfo, SysLicenseInfo, SysSettingsService } from '../../settin
|
||||
import { merge } from 'lodash-es';
|
||||
import fs from 'fs';
|
||||
@Provide("plusService")
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class PlusService {
|
||||
@Inject()
|
||||
sysSettingsService: SysSettingsService;
|
||||
|
||||
@@ -10,7 +10,7 @@ import {EncryptService} from './encrypt-service.js';
|
||||
* 授权
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, {allowDowngrade: true})
|
||||
export class AccessService extends BaseService<AccessEntity> {
|
||||
@InjectEntityModel(AccessEntity)
|
||||
repository: Repository<AccessEntity>;
|
||||
|
||||
@@ -9,7 +9,7 @@ import { AddonEntity } from "../entity/addon.js";
|
||||
* Addon
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class AddonService extends BaseService<AddonEntity> {
|
||||
@InjectEntityModel(AddonEntity)
|
||||
repository: Repository<AddonEntity>;
|
||||
|
||||
@@ -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.37.17](https://github.com/certd/certd/compare/v1.37.16...v1.37.17) (2025-12-29)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
## [1.37.16](https://github.com/certd/certd/compare/v1.37.15...v1.37.16) (2025-12-15)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/midway-flyway-js",
|
||||
"version": "1.37.16",
|
||||
"version": "1.37.17",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
|
||||
@@ -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.37.17](https://github.com/certd/certd/compare/v1.37.16...v1.37.17) (2025-12-29)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 支持从阿里云商用证书订单中获取证书 ([8872466](https://github.com/certd/certd/commit/887246696861c3a0b1f99fd9ad978caea423c650))
|
||||
* ip证书校验方式提示 ([773cada](https://github.com/certd/certd/commit/773cada57a01fb28ea8602062aaeec3d45109ea9))
|
||||
|
||||
## [1.37.16](https://github.com/certd/certd/compare/v1.37.15...v1.37.16) (2025-12-15)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/plugin-cert",
|
||||
"private": false,
|
||||
"version": "1.37.16",
|
||||
"version": "1.37.17",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -17,10 +17,10 @@
|
||||
"compile": "tsc --skipLibCheck --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.37.16",
|
||||
"@certd/basic": "^1.37.16",
|
||||
"@certd/pipeline": "^1.37.16",
|
||||
"@certd/plugin-lib": "^1.37.16",
|
||||
"@certd/acme-client": "^1.37.17",
|
||||
"@certd/basic": "^1.37.17",
|
||||
"@certd/pipeline": "^1.37.17",
|
||||
"@certd/plugin-lib": "^1.37.17",
|
||||
"@google-cloud/publicca": "^1.3.0",
|
||||
"dayjs": "^1.11.7",
|
||||
"jszip": "^3.10.1",
|
||||
|
||||
@@ -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.37.17](https://github.com/certd/certd/compare/v1.37.16...v1.37.17) (2025-12-29)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-lib
|
||||
|
||||
## [1.37.16](https://github.com/certd/certd/compare/v1.37.15...v1.37.16) (2025-12-15)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-lib
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/plugin-lib",
|
||||
"private": false,
|
||||
"version": "1.37.16",
|
||||
"version": "1.37.17",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -22,8 +22,8 @@
|
||||
"@alicloud/pop-core": "^1.7.10",
|
||||
"@alicloud/tea-util": "^1.4.10",
|
||||
"@aws-sdk/client-s3": "^3.787.0",
|
||||
"@certd/basic": "^1.37.16",
|
||||
"@certd/pipeline": "^1.37.16",
|
||||
"@certd/basic": "^1.37.17",
|
||||
"@certd/pipeline": "^1.37.17",
|
||||
"@kubernetes/client-node": "0.21.0",
|
||||
"ali-oss": "^6.22.0",
|
||||
"basic-ftp": "^5.0.5",
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
FROM node:22-alpine AS builder
|
||||
|
||||
RUN apk add build-base
|
||||
RUN wget -O - https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2 | tar -xj && \
|
||||
cd jemalloc-5.3.0 && \
|
||||
./configure && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
|
||||
WORKDIR /workspace/
|
||||
COPY . /workspace/
|
||||
# armv7 目前只能用node18, pnpm9不支持node18,所以pnpm只能用8.15.7版本
|
||||
@@ -14,6 +23,12 @@ RUN cd /workspace/certd-server && pnpm install && npm run build-on-docker
|
||||
FROM node:22-alpine
|
||||
EXPOSE 7001
|
||||
EXPOSE 7002
|
||||
|
||||
# 安装jemalloc内存分配器,优化内存占用
|
||||
COPY --from=builder /usr/local/lib/libjemalloc.so.2 /usr/local/lib/
|
||||
ENV LD_PRELOAD=/usr/local/lib/libjemalloc.so.2
|
||||
|
||||
|
||||
RUN apk add --no-cache openssl
|
||||
RUN apk add --no-cache openjdk8
|
||||
WORKDIR /app/
|
||||
@@ -21,7 +36,7 @@ COPY --from=builder /workspace/certd-server/ /app/
|
||||
|
||||
COPY ./patch/ssh2/*.js /app/node_modules/.pnpm/node_modules/ssh2/lib/protocol/
|
||||
|
||||
ENV LEGO_VERSION=4.22.2
|
||||
ENV LEGO_VERSION=4.30.1
|
||||
ENV LEGO_DOWNLOAD_DIR=/app/tools/lego
|
||||
RUN mkdir -p $LEGO_DOWNLOAD_DIR
|
||||
|
||||
|
||||
@@ -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.37.17](https://github.com/certd/certd/compare/v1.37.16...v1.37.17) (2025-12-29)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 批量修改定时时间支持随机时间 ([d0f653d](https://github.com/certd/certd/commit/d0f653da9a2970920e961e7404ff04080bccd343))
|
||||
* 批量运行优化,支持普通运行和强制重新运行 ([039c62b](https://github.com/certd/certd/commit/039c62b09b37cdda35d33c6ee9adecad62dee75c))
|
||||
* 优化源码方式部署,前端无需编译 ([13ddc97](https://github.com/certd/certd/commit/13ddc979ec7953e3db8db76dd23fd85a3b3c7997))
|
||||
* 支持部署到goedge ([44bf4b1](https://github.com/certd/certd/commit/44bf4b1cc1aafa2d711c3b8e408009f0ceb413eb))
|
||||
* 支持从阿里云商用证书订单中获取证书 ([8872466](https://github.com/certd/certd/commit/887246696861c3a0b1f99fd9ad978caea423c650))
|
||||
* 支持授权给管理员查看和下载用户证书 ([1347355](https://github.com/certd/certd/commit/1347355cb117694abe99da385352a19771a32e84))
|
||||
* 执行队列数量支持设置 ([cd94488](https://github.com/certd/certd/commit/cd944882c3272adad4a2da94a3889a01fe05fe13))
|
||||
* aws route53 ([8caab1f](https://github.com/certd/certd/commit/8caab1fd9264df548f467b94202d567107b7a30b))
|
||||
|
||||
## [1.37.16](https://github.com/certd/certd/compare/v1.37.15...v1.37.16) (2025-12-15)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/ui-client",
|
||||
"version": "1.37.16",
|
||||
"version": "1.37.17",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite --open",
|
||||
@@ -50,7 +50,7 @@
|
||||
"@vueuse/core": "^10.11.0",
|
||||
"ant-design-vue": "^4.2.6",
|
||||
"async-validator": "^4.2.5",
|
||||
"axios": "^1.7.2",
|
||||
"axios": "^1.9.0",
|
||||
"axios-mock-adapter": "^1.22.0",
|
||||
"base64-js": "^1.5.1",
|
||||
"better-scroll": "^2.5.1",
|
||||
@@ -106,8 +106,8 @@
|
||||
"zod-defaults": "^0.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@certd/lib-iframe": "^1.37.16",
|
||||
"@certd/pipeline": "^1.37.16",
|
||||
"@certd/lib-iframe": "^1.37.17",
|
||||
"@certd/pipeline": "^1.37.17",
|
||||
"@rollup/plugin-commonjs": "^25.0.7",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@types/chai": "^4.3.12",
|
||||
|
||||
@@ -138,6 +138,7 @@ const getOptions = async () => {
|
||||
onError(err: any) {
|
||||
hasError.value = true;
|
||||
message.value = `获取选项出错:${err.message}`;
|
||||
optionsRef.value = [];
|
||||
},
|
||||
showErrorNotify: false,
|
||||
}
|
||||
|
||||
@@ -159,6 +159,7 @@ export default {
|
||||
selectedCount: "Selected {count} items",
|
||||
batchDelete: "Batch Delete",
|
||||
batchForceRerun: "Force Rerun",
|
||||
batchRerun: "Rerun",
|
||||
applyCertificate: "Apply for Certificate",
|
||||
pipelineExecutionRecords: "Pipeline Execution Records",
|
||||
confirm: "Confirm",
|
||||
|
||||
@@ -165,6 +165,7 @@ export default {
|
||||
selectedCount: "已选择 {count} 项",
|
||||
batchDelete: "批量删除",
|
||||
batchForceRerun: "强制重新运行",
|
||||
batchRerun: "重新运行",
|
||||
applyCertificate: "申请证书",
|
||||
pipelineExecutionRecords: "流水线执行记录",
|
||||
confirm: "确认",
|
||||
@@ -774,7 +775,7 @@ export default {
|
||||
|
||||
pipelineMaxRunningCount: "同时最大运行流水线数量",
|
||||
pipelineMaxRunningCountHelper: "同一个用户同时运行的最大流水线数量,避免同时触发太多导致ACME账户被限制",
|
||||
pipelineMaxRunningCountRecommend: "推荐5-10",
|
||||
pipelineMaxRunningCountRecommend: "推荐5-15,默认10",
|
||||
|
||||
fixedCertExpireDays: "固定证书有效期天数",
|
||||
fixedCertExpireDaysHelper: "固定证书有效期天数,有助于列表进度条整齐显示",
|
||||
|
||||
@@ -59,7 +59,7 @@ export default {
|
||||
vip_group_priority: "可加VIP群,您的需求将优先实现",
|
||||
unlimited_site_certificate_monitoring: "站点证书监控无限制",
|
||||
more_notification_methods: "更多通知方式",
|
||||
plugins_fully_open: "插件全开放,群辉等更多插件",
|
||||
plugins_fully_open: "插件全开放,群晖等更多插件",
|
||||
click_to_get_7_day_trial: "点击获取7天试用",
|
||||
years: "年",
|
||||
afdian_support_vip: "新用户开通永久专业版立享50优惠券",
|
||||
|
||||
@@ -117,11 +117,11 @@ export async function BatchDelete(pipelineIds: number[]): Promise<void> {
|
||||
data: { ids: pipelineIds },
|
||||
});
|
||||
}
|
||||
export async function BatchRerun(pipelineIds: number[]): Promise<void> {
|
||||
export async function BatchRerun(pipelineIds: number[], force: boolean): Promise<void> {
|
||||
return await request({
|
||||
url: apiPrefix + "/batchRerun",
|
||||
method: "post",
|
||||
data: { ids: pipelineIds },
|
||||
data: { ids: pipelineIds, force },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
<template>
|
||||
<fs-button icon="icon-park-outline:replay-music" class="need-plus" type="link" :text="t('certd.batchRerun')" @click="openFormDialog"></fs-button>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { compute, dict, useFormWrapper } from "@fast-crud/fast-crud";
|
||||
import * as api from "../api";
|
||||
import { useSettingStore } from "/@/store/settings";
|
||||
import { useI18n } from "/src/locales";
|
||||
import { computed } from "vue";
|
||||
const { t } = useI18n();
|
||||
|
||||
const props = defineProps<{
|
||||
selectedRowKeys: any[];
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
change: any;
|
||||
}>();
|
||||
async function batchUpdateRequest(form: any) {
|
||||
await api.BatchRerun(props.selectedRowKeys, form.force ?? false);
|
||||
emit("change");
|
||||
}
|
||||
|
||||
const { openCrudFormDialog } = useFormWrapper();
|
||||
|
||||
const settingStore = useSettingStore();
|
||||
|
||||
async function openFormDialog() {
|
||||
settingStore.checkPlus();
|
||||
const crudOptions: any = {
|
||||
columns: {
|
||||
force: {
|
||||
title: "运行模式",
|
||||
form: {
|
||||
value: false,
|
||||
required: true,
|
||||
helper: "强制重新运行:清除流水线所有状态,全部重新执行\n普通运行:成功过的任务会跳过",
|
||||
component: {
|
||||
name: "fs-dict-radio",
|
||||
vModel: "value",
|
||||
style: {
|
||||
marginTop: "5px",
|
||||
},
|
||||
dict: dict({
|
||||
data: [
|
||||
{
|
||||
label: "普通运行",
|
||||
value: false,
|
||||
},
|
||||
{
|
||||
label: "强制重新运行",
|
||||
value: true,
|
||||
},
|
||||
],
|
||||
}),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
form: {
|
||||
mode: "edit",
|
||||
initialForm: {
|
||||
clear: false,
|
||||
},
|
||||
//@ts-ignore
|
||||
async doSubmit({ form }) {
|
||||
await batchUpdateRequest(form);
|
||||
},
|
||||
col: {
|
||||
span: 22,
|
||||
},
|
||||
labelCol: {
|
||||
style: {
|
||||
width: "100px",
|
||||
},
|
||||
},
|
||||
wrapper: {
|
||||
title: t("certd.batchRerun"),
|
||||
width: 600,
|
||||
},
|
||||
},
|
||||
} as any;
|
||||
await openCrudFormDialog({ crudOptions });
|
||||
}
|
||||
</script>
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="batch-actions-inner">
|
||||
<span>{{ t("certd.selectedCount", { count: selectedRowKeys.length }) }}</span>
|
||||
<fs-button icon="ion:trash-outline" class="color-red" type="link" :text="t('certd.batchDelete')" @click="batchDelete"></fs-button>
|
||||
<fs-button icon="icon-park-outline:replay-music" class="need-plus" type="link" :text="t('certd.batchForceRerun')" @click="batchRerun"></fs-button>
|
||||
<batch-rerun :selected-row-keys="selectedRowKeys" @change="batchFinished"></batch-rerun>
|
||||
<change-group :selected-row-keys="selectedRowKeys" @change="batchFinished"></change-group>
|
||||
<change-notification :selected-row-keys="selectedRowKeys" @change="batchFinished"></change-notification>
|
||||
<change-trigger :selected-row-keys="selectedRowKeys" @change="batchFinished"></change-trigger>
|
||||
@@ -28,6 +28,7 @@ import { dict, useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "./crud";
|
||||
import ChangeGroup from "./components/change-group.vue";
|
||||
import ChangeTrigger from "./components/change-trigger.vue";
|
||||
import BatchRerun from "./components/batch-rerun.vue";
|
||||
import { Modal, notification } from "ant-design-vue";
|
||||
import * as api from "./api";
|
||||
import { useI18n } from "/src/locales";
|
||||
@@ -75,20 +76,6 @@ function batchDelete() {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function batchRerun() {
|
||||
settingStore.checkPlus();
|
||||
Modal.confirm({
|
||||
title: "确认强制重新运行吗",
|
||||
content: "确定要强制重新运行选中流水线吗?(20条一批执行)",
|
||||
async onOk() {
|
||||
await api.BatchRerun(selectedRowKeys.value);
|
||||
notification.success({ message: "任务已提交" });
|
||||
await crudExpose.doRefresh();
|
||||
selectedRowKeys.value = [];
|
||||
},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style lang="less">
|
||||
.batch-actions {
|
||||
|
||||
@@ -1 +1 @@
|
||||
LEGO_VERSION=4.22.2
|
||||
LEGO_VERSION=4.30.1
|
||||
|
||||
@@ -3,6 +3,35 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.37.17](https://github.com/certd/certd/compare/v1.37.16...v1.37.17) (2025-12-29)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 发送证书到邮箱插件的邮件模版转为使用邮箱配置中的通用模版 ([c5a3003](https://github.com/certd/certd/commit/c5a3003cf7b640500a90ec2c8961859ffe6fdb18))
|
||||
* 首页最快到期证书,不包含已禁用的流水线 ([d731956](https://github.com/certd/certd/commit/d731956b066e4dbbe24d4de7b3d3679b355eb97c))
|
||||
* 修复部署到华为obs 报错的bug ([dd19afc](https://github.com/certd/certd/commit/dd19afce928a7f36312af9df1e7e5ed3eb1e214a))
|
||||
* 修复从模版创建的流水线不会自动执行的bug ([833808c](https://github.com/certd/certd/commit/833808c5deb716122b241d3d67349d2d6a18bf45))
|
||||
* 修复流水线列表step数量统计错误的bug ([0e5a4fb](https://github.com/certd/certd/commit/0e5a4fb098d3261b690c551cf2b95198cac487e7))
|
||||
* 修复用户删除后,用相同的oauth授权登录报错用户不存在的问题 ([e505916](https://github.com/certd/certd/commit/e5059165259e4d757abc811c0c14bbc4a3dbaee9))
|
||||
* 修复站点ip监控报主站与ip证书过期时间不一致的问题 ([62f8525](https://github.com/certd/certd/commit/62f8525dd5da95dc07ed103f602644c6e5f7f8e3))
|
||||
* 修复serverchan3 没有选择tags报错的bug ([5bbf210](https://github.com/certd/certd/commit/5bbf210394883c4893c365bd16e999490b6e9b41))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 批量修改定时时间支持随机时间 ([d0f653d](https://github.com/certd/certd/commit/d0f653da9a2970920e961e7404ff04080bccd343))
|
||||
* 批量运行优化,支持普通运行和强制重新运行 ([039c62b](https://github.com/certd/certd/commit/039c62b09b37cdda35d33c6ee9adecad62dee75c))
|
||||
* 升级lego到4.30.1版本 ([136e8dd](https://github.com/certd/certd/commit/136e8dd7c5ff7199ff4b0bcca95b8a03aa847553))
|
||||
* 腾讯云EO增加请求参数打印 ([5b5deac](https://github.com/certd/certd/commit/5b5deac7d98684eda5c68384241a4d62c48d803b))
|
||||
* 优化阿里云esa清理证书时机 ([5359a76](https://github.com/certd/certd/commit/5359a7670fac5a18c4294b37a34227308a0deed6))
|
||||
* 支持部署到goedge ([44bf4b1](https://github.com/certd/certd/commit/44bf4b1cc1aafa2d711c3b8e408009f0ceb413eb))
|
||||
* 支持授权给管理员查看和下载用户证书 ([1347355](https://github.com/certd/certd/commit/1347355cb117694abe99da385352a19771a32e84))
|
||||
* 支持执行队列,避免同一时间触发流水线太多导致被限制 ([888d959](https://github.com/certd/certd/commit/888d9591fe9730b529e1c355d71f41e7ec9b479d))
|
||||
* 支持aws route53 dns ([cbb8319](https://github.com/certd/certd/commit/cbb8319cfa48673e81ec15894adc3376c173c97e))
|
||||
* 支持ucloud waf(未测试) ([a248367](https://github.com/certd/certd/commit/a248367b154c38661a6797ef64e37ec99d4e2abf))
|
||||
* 支持ucloud,上传到ussl,部署到ucdn ([e61daae](https://github.com/certd/certd/commit/e61daaee2d0dec19710cd4ec759219a071f2435e))
|
||||
* 执行队列数量支持设置 ([cd94488](https://github.com/certd/certd/commit/cd944882c3272adad4a2da94a3889a01fe05fe13))
|
||||
* aws route53 ([8caab1f](https://github.com/certd/certd/commit/8caab1fd9264df548f467b94202d567107b7a30b))
|
||||
|
||||
## [1.37.16](https://github.com/certd/certd/compare/v1.37.15...v1.37.16) (2025-12-15)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/ui-server",
|
||||
"version": "1.37.16",
|
||||
"version": "1.37.17",
|
||||
"description": "fast-server base midway",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
@@ -46,20 +46,20 @@
|
||||
"@aws-sdk/client-iam": "^3.699.0",
|
||||
"@aws-sdk/client-route-53": "^3.957.0",
|
||||
"@aws-sdk/client-s3": "^3.705.0",
|
||||
"@certd/acme-client": "^1.37.16",
|
||||
"@certd/basic": "^1.37.16",
|
||||
"@certd/commercial-core": "^1.37.16",
|
||||
"@certd/acme-client": "^1.37.17",
|
||||
"@certd/basic": "^1.37.17",
|
||||
"@certd/commercial-core": "^1.37.17",
|
||||
"@certd/cv4pve-api-javascript": "^8.4.2",
|
||||
"@certd/jdcloud": "^1.37.16",
|
||||
"@certd/lib-huawei": "^1.37.16",
|
||||
"@certd/lib-k8s": "^1.37.16",
|
||||
"@certd/lib-server": "^1.37.16",
|
||||
"@certd/midway-flyway-js": "^1.37.16",
|
||||
"@certd/pipeline": "^1.37.16",
|
||||
"@certd/plugin-cert": "^1.37.16",
|
||||
"@certd/plugin-lib": "^1.37.16",
|
||||
"@certd/plugin-plus": "^1.37.16",
|
||||
"@certd/plus-core": "^1.37.16",
|
||||
"@certd/jdcloud": "^1.37.17",
|
||||
"@certd/lib-huawei": "^1.37.17",
|
||||
"@certd/lib-k8s": "^1.37.17",
|
||||
"@certd/lib-server": "^1.37.17",
|
||||
"@certd/midway-flyway-js": "^1.37.17",
|
||||
"@certd/pipeline": "^1.37.17",
|
||||
"@certd/plugin-cert": "^1.37.17",
|
||||
"@certd/plugin-lib": "^1.37.17",
|
||||
"@certd/plugin-plus": "^1.37.17",
|
||||
"@certd/plus-core": "^1.37.17",
|
||||
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.120",
|
||||
"@huaweicloud/huaweicloud-sdk-core": "^3.1.120",
|
||||
"@koa/cors": "^5.0.0",
|
||||
@@ -78,7 +78,7 @@
|
||||
"@ucloud-sdks/ucloud-sdk-js": "^0.2.4",
|
||||
"@volcengine/openapi": "^1.28.1",
|
||||
"ali-oss": "^6.21.0",
|
||||
"axios": "^1.7.2",
|
||||
"axios": "^1.9.0",
|
||||
"basic-ftp": "^5.0.5",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"better-sqlite3": "^11.1.2",
|
||||
|
||||
@@ -192,8 +192,8 @@ export class PipelineController extends CrudController<PipelineService> {
|
||||
}
|
||||
|
||||
@Post('/batchRerun', { summary: Constants.per.authOnly })
|
||||
async batchRerun(@Body('ids') ids: number[]) {
|
||||
await this.service.batchRerun(ids, this.getUserId());
|
||||
async batchRerun(@Body('ids') ids: number[], @Body('force') force: boolean) {
|
||||
await this.service.batchRerun(ids, this.getUserId(), force);
|
||||
return this.ok({});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import crypto from 'crypto';
|
||||
import {SafeService} from "../sys/settings/safe-service.js";
|
||||
|
||||
@Autoload()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class AutoAInitSite {
|
||||
@Inject()
|
||||
userService: UserService;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { logger } from "@certd/basic";
|
||||
import { PluginService } from "../plugin/service/plugin-service.js";
|
||||
|
||||
@Autoload()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class AutoBLoadPlugins {
|
||||
@Inject()
|
||||
pluginService: PluginService;
|
||||
|
||||
@@ -13,7 +13,7 @@ import {UserService} from "../sys/authority/service/user-service.js";
|
||||
import {Between} from "typeorm";
|
||||
|
||||
@Autoload()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class AutoCRegisterCron {
|
||||
@Inject()
|
||||
pipelineService: PipelineService;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { UserSuiteService } from '@certd/commercial-core';
|
||||
import { Autoload, Init, Inject, Scope, ScopeEnum } from '@midwayjs/core';
|
||||
|
||||
@Autoload()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class AutoDMitterRegister {
|
||||
@Inject()
|
||||
userSuiteService: UserSuiteService;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { CertInfo, EVENT_CERT_APPLY_SUCCESS } from "@certd/plugin-cert";
|
||||
import { PipelineEvent } from "@certd/pipeline";
|
||||
|
||||
@Autoload()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class AutoEPipelineEmitterRegister {
|
||||
@Inject()
|
||||
certInfoService: CertInfoService;
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Application } from '@midwayjs/koa';
|
||||
import { httpsServer, HttpsServerOptions } from './https/server.js';
|
||||
|
||||
@Autoload()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class AutoZPrint {
|
||||
@Inject()
|
||||
sysSettingsService: SysSettingsService;
|
||||
@@ -49,7 +49,7 @@ export class AutoZPrint {
|
||||
}
|
||||
setInterval(() => {
|
||||
const mu = process.memoryUsage();
|
||||
logger.info(`rss:${format(mu.rss)},heapUsed: ${format(mu.heapUsed)},heapTotal: ${format(mu.heapTotal)},external: ${format(mu.external)}`);
|
||||
logger.info(`rss:${format(mu.rss)},heapUsed: ${format(mu.heapUsed)},heapTotal: ${format(mu.heapTotal)},external: ${format(mu.external)},arrayBuffers: ${format(mu.arrayBuffers)}`);
|
||||
}, 20000);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { ICaptchaAddon } from "../../../plugins/plugin-captcha/api.js";
|
||||
import { AddonGetterService } from "../../pipeline/service/addon-getter-service.js";
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class CaptchaService {
|
||||
@Inject()
|
||||
sysSettingsService: SysSettingsService;
|
||||
|
||||
@@ -10,7 +10,7 @@ import { EmailService } from './email-service.js';
|
||||
/**
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class CodeService {
|
||||
@Inject()
|
||||
sysSettingsService: SysSettingsService;
|
||||
|
||||
@@ -30,7 +30,7 @@ export type EmailConfig = {
|
||||
usePlus?: boolean;
|
||||
} & SendMailOptions;
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class EmailService implements IEmailService {
|
||||
@Inject()
|
||||
settingsService: UserSettingsService;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { merge } from 'lodash-es';
|
||||
import { GroupEntity } from '../entity/group.js';
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class GroupService extends BaseService<GroupEntity> {
|
||||
@InjectEntityModel(GroupEntity)
|
||||
repository: Repository<GroupEntity>;
|
||||
|
||||
@@ -15,7 +15,7 @@ import { CnameRecordEntity } from "../../cname/entity/cname-record.js";
|
||||
*
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, {allowDowngrade: true})
|
||||
export class DomainService extends BaseService<DomainEntity> {
|
||||
@InjectEntityModel(DomainEntity)
|
||||
repository: Repository<DomainEntity>;
|
||||
|
||||
@@ -9,7 +9,7 @@ import { CommonProviders } from './common-provider.js';
|
||||
* 授权
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class CnameProviderService extends BaseService<CnameProviderEntity> {
|
||||
@InjectEntityModel(CnameProviderEntity)
|
||||
repository: Repository<CnameProviderEntity>;
|
||||
|
||||
@@ -37,7 +37,7 @@ type CnameCheckCacheValue = {
|
||||
* 授权
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class CnameRecordService extends BaseService<CnameRecordEntity> {
|
||||
@InjectEntityModel(CnameRecordEntity)
|
||||
repository: Repository<CnameRecordEntity>;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { SqlAdapter } from './d.js';
|
||||
import { MysqlAdapter } from './mysql.js';
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class DbAdapter implements SqlAdapter {
|
||||
adapter: SqlAdapter;
|
||||
@Config('typeorm.dataSource.default.type')
|
||||
|
||||
@@ -22,7 +22,7 @@ import { OauthBoundService } from "./oauth-bound-service.js";
|
||||
/**
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, {allowDowngrade: true})
|
||||
export class LoginService {
|
||||
@Inject()
|
||||
userService: UserService;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { OauthBoundEntity } from "../entity/oauth-bound.js";
|
||||
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class OauthBoundService extends BaseService<OauthBoundEntity> {
|
||||
|
||||
@InjectEntityModel(OauthBoundEntity)
|
||||
|
||||
@@ -7,7 +7,7 @@ import { UserService } from "../../sys/authority/service/user-service.js";
|
||||
* 授权
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class TwoFactorService {
|
||||
@Inject()
|
||||
userSettingsService: UserSettingsService;
|
||||
|
||||
@@ -14,7 +14,7 @@ const UserSettingCache = new LocalCache({
|
||||
* 授权
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class UserSettingsService extends BaseService<UserSettingsEntity> {
|
||||
@InjectEntityModel(UserSettingsEntity)
|
||||
repository: Repository<UserSettingsEntity>;
|
||||
|
||||
@@ -12,7 +12,7 @@ import { DomainVerifierGetter } from "../../pipeline/service/getter/domain-verif
|
||||
|
||||
|
||||
@Provide("CertInfoFacade")
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class CertInfoFacade {
|
||||
|
||||
@Inject()
|
||||
|
||||
@@ -16,7 +16,7 @@ export type UploadCertReq = {
|
||||
|
||||
|
||||
@Provide("CertInfoService")
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class CertInfoService extends BaseService<CertInfoEntity> {
|
||||
@InjectEntityModel(CertInfoEntity)
|
||||
repository: Repository<CertInfoEntity>;
|
||||
|
||||
@@ -18,7 +18,7 @@ import {Cron} from "../../cron/cron.js";
|
||||
import { dnsContainer } from "./dns-custom.js";
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, {allowDowngrade: true})
|
||||
export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
||||
@InjectEntityModel(SiteInfoEntity)
|
||||
repository: Repository<SiteInfoEntity>;
|
||||
@@ -210,7 +210,7 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
||||
if (item.error) {
|
||||
errorMessage += `${item.ipAddress}:${item.error}; \n`;
|
||||
} else if (item.certExpiresTime !== certExpiresTime) {
|
||||
errorMessage += `${item.ipAddress}:与主站证书过期时间不一致; \n`;
|
||||
errorMessage += `${item.ipAddress}:与主站证书过期时间不一致(主站:${dayjs(certExpiresTime).format("YYYY-MM-DD")},IP:${dayjs(item.certExpiresTime).format("YYYY-MM-DD")}); \n`;
|
||||
} else {
|
||||
errorCount--;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import { dnsContainer } from "./dns-custom.js";
|
||||
const dns = dnsSdk.promises;
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class SiteIpService extends BaseService<SiteIpEntity> {
|
||||
@InjectEntityModel(SiteIpEntity)
|
||||
repository: Repository<SiteIpEntity>;
|
||||
@@ -175,7 +175,11 @@ export class SiteIpService extends BaseService<SiteIpEntity> {
|
||||
|
||||
await this.update(updateData);
|
||||
logger.info(`测试站点ip成功: id=${updateData.id},ip=${entity.ipAddress},expiresTime=${updateData.certExpiresTime}`)
|
||||
return updateData
|
||||
|
||||
return {
|
||||
...updateData,
|
||||
ipAddress: entity.ipAddress,
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
logger.error("check site ip error", e);
|
||||
|
||||
@@ -15,7 +15,7 @@ export type OpenKey = {
|
||||
scope: string;
|
||||
};
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class OpenKeyService extends BaseService<OpenKeyEntity> {
|
||||
@InjectEntityModel(OpenKeyEntity)
|
||||
repository: Repository<OpenKeyEntity>;
|
||||
|
||||
@@ -7,7 +7,7 @@ import { AddonService, newAddon, PermissionException, ValidateException } from "
|
||||
* Addon
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class AddonGetterService {
|
||||
|
||||
@Inject()
|
||||
|
||||
@@ -3,7 +3,7 @@ import { pluginGroups, pluginRegistry } from '@certd/pipeline';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class BuiltInPluginService {
|
||||
getList() {
|
||||
const collection = pluginRegistry.storage;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Inject, Provide, Scope, ScopeEnum } from "@midwayjs/core";
|
||||
import { SiteInfo ,ISiteInfoGetter} from "@certd/plugin-lib";
|
||||
|
||||
@Provide("siteInfoGetter")
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class SiteInfoGetter implements ISiteInfoGetter{
|
||||
@Inject()
|
||||
sysSettingsService: SysSettingsService;
|
||||
|
||||
@@ -70,7 +70,7 @@ export class TaskServiceGetter implements IServiceGetter{
|
||||
}
|
||||
}
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class TaskServiceBuilder {
|
||||
@ApplicationContext()
|
||||
appCtx: IMidwayContainer;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { HistoryLogEntity } from '../entity/history-log.js';
|
||||
* 证书申请
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class HistoryLogService extends BaseService<HistoryLogEntity> {
|
||||
@InjectEntityModel(HistoryLogEntity)
|
||||
repository: Repository<HistoryLogEntity>;
|
||||
|
||||
@@ -16,7 +16,7 @@ import { logger } from '@certd/basic';
|
||||
* 证书申请
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class HistoryService extends BaseService<HistoryEntity> {
|
||||
@InjectEntityModel(HistoryEntity)
|
||||
repository: Repository<HistoryEntity>;
|
||||
|
||||
@@ -16,7 +16,7 @@ import { EmailService } from '../../basic/service/email-service.js';
|
||||
import { isComm, isPlus } from '@certd/plus-core';
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class NotificationService extends BaseService<NotificationEntity> {
|
||||
@InjectEntityModel(NotificationEntity)
|
||||
repository: Repository<NotificationEntity>;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { PipelineGroupEntity } from '../entity/pipeline-group.js';
|
||||
import { merge } from 'lodash-es';
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class PipelineGroupService extends BaseService<PipelineGroupEntity> {
|
||||
@InjectEntityModel(PipelineGroupEntity)
|
||||
repository: Repository<PipelineGroupEntity>;
|
||||
|
||||
@@ -56,7 +56,7 @@ const runningTasks: Map<string | number, Executor> = new Map();
|
||||
* 证书申请
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class PipelineService extends BaseService<PipelineEntity> {
|
||||
@InjectEntityModel(PipelineEntity)
|
||||
repository: Repository<PipelineEntity>;
|
||||
@@ -131,7 +131,9 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
||||
let stepCount = 0;
|
||||
if (pipeline.stages) {
|
||||
RunnableCollection.each(pipeline.stages, (runnable: any) => {
|
||||
stepCount++;
|
||||
if (runnable.runnableType === "step") {
|
||||
stepCount++;
|
||||
}
|
||||
});
|
||||
}
|
||||
// @ts-ignore
|
||||
@@ -898,7 +900,7 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
||||
}
|
||||
}
|
||||
|
||||
async batchRerun(ids: number[], userId: any) {
|
||||
async batchRerun(ids: number[], userId: any, force: boolean) {
|
||||
if (!isPlus()) {
|
||||
throw new NeedVIPException("此功能需要升级专业版");
|
||||
}
|
||||
@@ -919,18 +921,20 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
||||
ids = list.map(item => item.id);
|
||||
|
||||
//异步执行
|
||||
this.startBatchRerun(ids);
|
||||
this.startBatchRerun(userId,ids, force);
|
||||
}
|
||||
|
||||
async startBatchRerun(ids: number[]) {
|
||||
//20条一批
|
||||
const batchSize = 20;
|
||||
for (let i = 0; i < ids.length; i += batchSize) {
|
||||
const batchIds = ids.slice(i, i + batchSize);
|
||||
const batchPromises = batchIds.map(async (id) => {
|
||||
await this.run(id, null, "ALL");
|
||||
startBatchRerun(userId:number, ids: number[], force: boolean) {
|
||||
for (const id of ids) {
|
||||
executorQueue.addTask(userId,{
|
||||
task: async () => {
|
||||
if (force) {
|
||||
await this.run(id, null, "ALL");
|
||||
} else {
|
||||
await this.run(id, null);
|
||||
}
|
||||
}
|
||||
});
|
||||
await Promise.all(batchPromises);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { StorageEntity } from '../entity/storage.js';
|
||||
/**
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class StorageService extends BaseService<StorageEntity> {
|
||||
@InjectEntityModel(StorageEntity)
|
||||
repository: Repository<StorageEntity>;
|
||||
|
||||
@@ -6,7 +6,7 @@ import {SubDomainEntity} from '../entity/sub-domain.js';
|
||||
import {EmailService} from '../../basic/service/email-service.js';
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class SubDomainService extends BaseService<SubDomainEntity> {
|
||||
@InjectEntityModel(SubDomainEntity)
|
||||
repository: Repository<SubDomainEntity>;
|
||||
|
||||
@@ -9,7 +9,7 @@ import {PipelineEntity} from "../entity/pipeline.js";
|
||||
import {Pipeline} from "@certd/pipeline";
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, {allowDowngrade: true})
|
||||
export class TemplateService extends BaseService<TemplateEntity> {
|
||||
@InjectEntityModel(TemplateEntity)
|
||||
repository: Repository<TemplateEntity>;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Inject, Provide, Scope, ScopeEnum } from '@midwayjs/core';
|
||||
import { SysInstallInfo, SysSettingsService } from '@certd/lib-server';
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class UrlService implements IUrlService {
|
||||
@Inject()
|
||||
sysSettingsService: SysSettingsService;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { IPluginConfigService, PluginConfig } from '@certd/pipeline';
|
||||
import { PluginConfigService } from './plugin-config-service.js';
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class PluginConfigGetter implements IPluginConfigService {
|
||||
@Inject()
|
||||
pluginConfigService: PluginConfigService;
|
||||
|
||||
@@ -22,7 +22,7 @@ export type PluginFindReq = {
|
||||
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class PluginConfigService {
|
||||
@Inject()
|
||||
pluginService: PluginService;
|
||||
|
||||
@@ -20,7 +20,7 @@ export type PluginImportReq = {
|
||||
};
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, {allowDowngrade: true})
|
||||
export class PluginService extends BaseService<PluginEntity> {
|
||||
@InjectEntityModel(PluginEntity)
|
||||
repository: Repository<PluginEntity>;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { IUsedCountService } from '@certd/commercial-core';
|
||||
import { SiteInfoService } from '../../monitor/service/site-info-service.js';
|
||||
|
||||
@Provide('myCountService')
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class MyCountService implements IUsedCountService {
|
||||
@Inject()
|
||||
pipelineService: PipelineService;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { RoleService } from './role-service.js';
|
||||
* 权限校验
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class AuthService {
|
||||
@Inject()
|
||||
roleService: RoleService;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { PermissionEntity } from '../entity/permission.js';
|
||||
* 权限资源
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class PermissionService extends BaseService<PermissionEntity> {
|
||||
@InjectEntityModel(PermissionEntity)
|
||||
repository: Repository<PermissionEntity>;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { RolePermissionEntity } from '../entity/role-permission.js';
|
||||
* 角色->权限
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class RolePermissionService extends BaseService<RolePermissionEntity> {
|
||||
@InjectEntityModel(RolePermissionEntity)
|
||||
repository: Repository<RolePermissionEntity>;
|
||||
|
||||
@@ -13,7 +13,7 @@ import { LRUCache } from 'lru-cache';
|
||||
* 角色
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class RoleService extends BaseService<RoleEntity> {
|
||||
@InjectEntityModel(RoleEntity)
|
||||
repository: Repository<RoleEntity>;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { UserRoleEntity } from '../entity/user-role.js';
|
||||
* 用户->角色
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class UserRoleService extends BaseService<UserRoleEntity> {
|
||||
@InjectEntityModel(UserRoleEntity)
|
||||
repository: Repository<UserRoleEntity>;
|
||||
|
||||
@@ -23,7 +23,7 @@ export const AdminRoleId = 1
|
||||
* 系统用户
|
||||
*/
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class UserService extends BaseService<UserEntity> {
|
||||
|
||||
@InjectEntityModel(UserEntity)
|
||||
|
||||
@@ -12,7 +12,7 @@ export type NetTestResult = {
|
||||
}
|
||||
|
||||
@Provide('nettestService')
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class NetTestService {
|
||||
/**
|
||||
* 执行Telnet测试
|
||||
|
||||
@@ -47,7 +47,7 @@ export const hiddenStatus = new HiddenStatus();
|
||||
|
||||
|
||||
@Provide('safeService')
|
||||
@Scope(ScopeEnum.Singleton, { allowDowngrade: true })
|
||||
@Scope(ScopeEnum.Request, {allowDowngrade: true})
|
||||
export class SafeService {
|
||||
|
||||
@Inject()
|
||||
|
||||
@@ -41,4 +41,5 @@ export * from './plugin-xinnetconnet/index.js'
|
||||
export * from './plugin-oauth/index.js'
|
||||
export * from './plugin-cmcc/index.js'
|
||||
export * from './plugin-template/index.js'
|
||||
export * from './plugin-ucloud/index.js'
|
||||
export * from './plugin-ucloud/index.js'
|
||||
export * from './plugin-goedge/index.js'
|
||||
|
||||
@@ -162,9 +162,6 @@ export class AliyunDeployCertToESA extends AbstractTaskPlugin {
|
||||
this.logger.error("清理站点[${siteId}]证书失败",e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
269
packages/ui/certd-server/src/plugins/plugin-goedge/access.ts
Normal file
269
packages/ui/certd-server/src/plugins/plugin-goedge/access.ts
Normal file
@@ -0,0 +1,269 @@
|
||||
import { AccessInput, BaseAccess, IsAccess } from "@certd/pipeline";
|
||||
import { HttpRequestConfig } from "@certd/basic";
|
||||
import { CertInfo, CertReader } from "@certd/plugin-cert";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
|
||||
/**
|
||||
*/
|
||||
@IsAccess({
|
||||
name: "goedge",
|
||||
title: "GoEdge授权",
|
||||
icon: "fa-solid:leaf:#6C6BF6",
|
||||
order: 100
|
||||
})
|
||||
export class GoEdgeAccess extends BaseAccess {
|
||||
|
||||
@AccessInput({
|
||||
title: "系统地址",
|
||||
component: {
|
||||
name: "a-input",
|
||||
vModel: "value"
|
||||
},
|
||||
helper: "例如:http://yourdomain.com:8002, 需要在API节点配置中开启HTTP访问地址",
|
||||
encrypt: false,
|
||||
required: true
|
||||
})
|
||||
endpoint!: string;
|
||||
|
||||
@AccessInput({
|
||||
title: "用户类型",
|
||||
component: {
|
||||
name: "a-select",
|
||||
vModel: "value",
|
||||
options: [
|
||||
{
|
||||
label: "用户",
|
||||
value: "user"
|
||||
},
|
||||
{
|
||||
label: "管理员",
|
||||
value: "admin"
|
||||
}
|
||||
]
|
||||
},
|
||||
encrypt: false,
|
||||
required: true
|
||||
})
|
||||
userType!: string;
|
||||
|
||||
@AccessInput({
|
||||
title: "accessKeyId",
|
||||
helper: `用户AccessKey: 在”平台用户-用户-详情-AccessKey” 或 商业版的“访问控制” 中创建。
|
||||
管理员AccessKey:在”系统用户-用户-详情-AccessKey” 中创建。`,
|
||||
component: {
|
||||
name: "a-input",
|
||||
vModel: "value"
|
||||
},
|
||||
encrypt: false,
|
||||
required: true
|
||||
})
|
||||
accessKeyId!: string;
|
||||
|
||||
@AccessInput({
|
||||
title: "accessKey",
|
||||
component: {
|
||||
name: "a-input",
|
||||
vModel: "value"
|
||||
},
|
||||
encrypt: true,
|
||||
required: true
|
||||
})
|
||||
accessKey!: string;
|
||||
|
||||
|
||||
|
||||
@AccessInput({
|
||||
title: "测试",
|
||||
component: {
|
||||
name: "api-test",
|
||||
action: "TestRequest"
|
||||
},
|
||||
helper: "点击测试接口是否正常"
|
||||
})
|
||||
testRequest = true;
|
||||
|
||||
accessToken: { expiresAt: number, token: string }
|
||||
|
||||
async onTestRequest() {
|
||||
await this.getCertList({ pageSize: 1 });
|
||||
return "ok"
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param req "id": 600,
|
||||
"isOn": true,
|
||||
"name": "124.220.225.222",
|
||||
"description": "",
|
||||
"certData": null,
|
||||
"keyData": null,
|
||||
"serverName": "",
|
||||
"isCA": false,
|
||||
"isACME": false,
|
||||
"timeBeginAt": 1763856000,
|
||||
"timeEndAt": 1771718399,
|
||||
"dnsNames": [
|
||||
"124.220.225.222" //domain
|
||||
],
|
||||
"commonNames": [
|
||||
"ZeroSSL ECC Domain Secure Site CA",
|
||||
"USERTrust ECC Certification Authority"
|
||||
],
|
||||
"ocsp": null,
|
||||
"ocspExpiresAt": 0,
|
||||
"ocspError": ""
|
||||
* @returns
|
||||
*/
|
||||
async getCertList(req: { pageNo?: number, pageSize?: number, query?: string, onlyUser?: boolean, userId?: number }) {
|
||||
const pageNo = req.pageNo ?? 1;
|
||||
const pageSize = req.pageSize ?? 20;
|
||||
const body: any = {
|
||||
keyword: req.query ?? "",
|
||||
offset: (pageNo - 1) * pageSize,
|
||||
size: pageSize,
|
||||
}
|
||||
if (req.onlyUser) {
|
||||
body["onlyUser"] = true;
|
||||
}
|
||||
if (req.userId) {
|
||||
body["userId"] = req.userId;
|
||||
}
|
||||
|
||||
const countRes = await this.doRequest({
|
||||
url: `/SSLCertService/countSSLCerts`,
|
||||
method: "POST",
|
||||
data: body
|
||||
});
|
||||
const total = countRes.count || 9999;
|
||||
|
||||
const res = await this.doRequest({
|
||||
url: `/SSLCertService/listSSLCerts`,
|
||||
method: "POST",
|
||||
data: body
|
||||
});
|
||||
// this.ctx.logger.info("getCertList",JSON.stringify(res));
|
||||
const sslCertsJSON = this.ctx.utils.hash.base64Decode(res.sslCertsJSON) || "[]";
|
||||
const sslCerts = JSON.parse(sslCertsJSON) as CertInfo[];
|
||||
return {
|
||||
total: total,
|
||||
list: sslCerts || [],
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
}
|
||||
}
|
||||
|
||||
async doCertReplace(req: { certId: number, cert: CertInfo }) {
|
||||
|
||||
let sslCert:any = {}
|
||||
try {
|
||||
const res = await this.doRequest({
|
||||
url: `/SSLCertService/findEnabledSSLCertConfig`,
|
||||
method: "POST",
|
||||
data: {
|
||||
sslCertId: req.certId,
|
||||
}
|
||||
});
|
||||
const sslCertJSON = this.ctx.utils.hash.base64Decode(res.sslCertJSON) || "{}";
|
||||
sslCert = JSON.parse(sslCertJSON);
|
||||
} catch (error) {
|
||||
this.ctx.logger.error("获取原来的证书详情失败", error);
|
||||
}
|
||||
|
||||
const certReader = new CertReader(req.cert);
|
||||
const dnsNames = certReader.getAllDomains()
|
||||
|
||||
// /product/sslcenter/{id}
|
||||
return await this.doRequest({
|
||||
url: `/SSLCertService/updateSSLCert`,
|
||||
method: "POST",
|
||||
data: {
|
||||
sslCertId: req.certId,
|
||||
certData: this.ctx.utils.hash.base64(req.cert.crt),
|
||||
keyData: this.ctx.utils.hash.base64(req.cert.key),
|
||||
isOn: sslCert.isOn ?? true,
|
||||
name: sslCert.name || certReader.buildCertName(),
|
||||
description: sslCert.description || "upload by certd",
|
||||
serverName: sslCert.serverName,
|
||||
timeBeginAt: certReader.detail.notBefore.getTime() / 1000,
|
||||
timeEndAt: certReader.detail.notAfter.getTime() / 1000,
|
||||
dnsNames: dnsNames,
|
||||
/**
|
||||
* // 是否启用
|
||||
bool isOn;
|
||||
|
||||
// 名称
|
||||
string name;
|
||||
|
||||
// 描述(备注)
|
||||
string description;
|
||||
string serverName;
|
||||
bool isCA;
|
||||
bytes certData;
|
||||
bytes keyData;
|
||||
int64 timeBeginAt;
|
||||
int64 timeEndAt;
|
||||
[]string dnsNames;
|
||||
[]string commonNames;
|
||||
*/
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
async getToken() {
|
||||
// /APIAccessTokenService/getAPIAccessToken
|
||||
if (this.accessToken && this.accessToken.expiresAt > dayjs().unix()) {
|
||||
return this.accessToken;
|
||||
}
|
||||
|
||||
const res = await this.doRequest({
|
||||
url: "/APIAccessTokenService/getAPIAccessToken",
|
||||
method: "POST",
|
||||
data: {
|
||||
type: this.userType,
|
||||
"accessKeyId": this.accessKeyId,
|
||||
"accessKey": this.accessKey,
|
||||
}
|
||||
});
|
||||
this.accessToken = res;
|
||||
return res;
|
||||
}
|
||||
|
||||
async doRequest(req: HttpRequestConfig) {
|
||||
|
||||
const headers: Record<string, string> = {}
|
||||
if (!req.url.endsWith("/getAPIAccessToken")) {
|
||||
if (!this.accessToken || this.accessToken.expiresAt < dayjs().unix()) {
|
||||
await this.getToken();
|
||||
}
|
||||
headers["X-Edge-Access-Token"] = this.accessToken.token;
|
||||
}
|
||||
let endpoint = this.endpoint;
|
||||
if (endpoint.endsWith("/")) {
|
||||
endpoint = endpoint.slice(0, -1);
|
||||
}
|
||||
const res = await this.ctx.http.request({
|
||||
url: req.url,
|
||||
baseURL: endpoint,
|
||||
method: req.method || "POST",
|
||||
data: req.data,
|
||||
params: req.params,
|
||||
headers: {
|
||||
...headers,
|
||||
...req.headers
|
||||
},
|
||||
// httpProxy: this.httpProxy||undefined,
|
||||
});
|
||||
|
||||
if (res.code === 200) {
|
||||
return res.data;
|
||||
}
|
||||
throw new Error(res.message || res);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
new GoEdgeAccess();
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user