mirror of
https://github.com/certd/certd.git
synced 2026-04-03 22:20:51 +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) {
|
||||
|
||||
@@ -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({});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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--;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./plugins/index.js";
|
||||
export * from "./access.js";
|
||||
@@ -0,0 +1 @@
|
||||
export * from './plugin-refresh-cert.js'
|
||||
@@ -0,0 +1,131 @@
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, PageSearch, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||
import { CertApplyPluginNames, CertInfo } from "@certd/plugin-cert";
|
||||
import { createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from "@certd/plugin-lib";
|
||||
import { GoEdgeAccess } from "../access.js";
|
||||
|
||||
@IsTaskPlugin({
|
||||
//命名规范,插件类型+功能(就是目录plugin-demo中的demo),大写字母开头,驼峰命名
|
||||
name: "GoEdgeRefreshCert",
|
||||
title: "GoEdge-更新证书",
|
||||
desc: "GoEdge",
|
||||
icon: "fa-solid:leaf:#6C6BF6",
|
||||
//插件分组
|
||||
group: pluginGroups.cdn.key,
|
||||
needPlus: false,
|
||||
default: {
|
||||
//默认值配置照抄即可
|
||||
strategy: {
|
||||
runStrategy: RunStrategy.SkipWhenSucceed
|
||||
}
|
||||
}
|
||||
})
|
||||
//类名规范,跟上面插件名称(name)一致
|
||||
export class GoEdgeRefreshCert extends AbstractTaskPlugin {
|
||||
//证书选择,此项必须要有
|
||||
@TaskInput({
|
||||
title: "域名证书",
|
||||
helper: "请选择前置任务输出的域名证书",
|
||||
component: {
|
||||
name: "output-selector",
|
||||
from: [...CertApplyPluginNames]
|
||||
}
|
||||
// required: true, // 必填
|
||||
})
|
||||
cert!: CertInfo;
|
||||
|
||||
@TaskInput(createCertDomainGetterInputDefine({ props: { required: false } }))
|
||||
certDomains!: string[];
|
||||
|
||||
|
||||
//授权选择框
|
||||
@TaskInput({
|
||||
title: "GoEdge授权",
|
||||
component: {
|
||||
name: "access-selector",
|
||||
type: "goedge" //固定授权类型
|
||||
},
|
||||
required: true //必填
|
||||
})
|
||||
accessId!: string;
|
||||
//
|
||||
|
||||
|
||||
@TaskInput({
|
||||
title: "用户id",
|
||||
component: {
|
||||
name: "a-input-number",
|
||||
vModel: "value"
|
||||
},
|
||||
helper:"用于查询用户证书,点击用户详情->浏览器地址中userId值,如:/users/user?userId=1\n如果为空,则查询管理员证书",
|
||||
required: false //必填
|
||||
})
|
||||
userId!: number;
|
||||
|
||||
@TaskInput(
|
||||
createRemoteSelectInputDefine({
|
||||
title: "证书Id",
|
||||
helper: "要更新的GoEdge证书id",
|
||||
pager:true,
|
||||
search:true,
|
||||
action: GoEdgeRefreshCert.prototype.onGetCertList.name
|
||||
})
|
||||
)
|
||||
certList!: number[];
|
||||
|
||||
//插件实例化时执行的方法
|
||||
async onInstance() {
|
||||
}
|
||||
|
||||
//插件执行方法
|
||||
async execute(): Promise<void> {
|
||||
const access = await this.getAccess<GoEdgeAccess>(this.accessId);
|
||||
|
||||
for (const item of this.certList) {
|
||||
this.logger.info(`----------- 开始更新证书:${item}`);
|
||||
await access.doCertReplace({
|
||||
certId: item,
|
||||
cert: this.cert
|
||||
});
|
||||
this.logger.info(`----------- 更新证书${item}成功`);
|
||||
}
|
||||
|
||||
this.logger.info("部署完成");
|
||||
}
|
||||
|
||||
async onGetCertList(req: PageSearch = {}) {
|
||||
const access = await this.getAccess<GoEdgeAccess>(this.accessId);
|
||||
|
||||
const pageNo = req.pageNo ?? 1;
|
||||
const pageSize = req.pageSize ?? 100;
|
||||
const res = await access.getCertList({
|
||||
pageNo,
|
||||
pageSize,
|
||||
query: req.searchKey,
|
||||
userId: this.userId,
|
||||
onlyUser: this.userId !== undefined
|
||||
});
|
||||
const total = res.total;
|
||||
const list = res.list;
|
||||
if (!list || list.length === 0) {
|
||||
throw new Error("没有找到证书,请先在控制台上传一次证书且关联站点");
|
||||
}
|
||||
|
||||
const options = list.map((item: any) => {
|
||||
return {
|
||||
label: `${item.name}<${item.id}>`,
|
||||
value: item.id,
|
||||
domain: item.dnsNames || [],
|
||||
title: item.dnsNames?.join(",") || ""
|
||||
};
|
||||
});
|
||||
return {
|
||||
list: this.ctx.utils.options.buildGroupOptions(options, this.certDomains),
|
||||
total: total,
|
||||
pageNo: pageNo,
|
||||
pageSize: pageSize
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
//实例化一下,注册插件
|
||||
new GoEdgeRefreshCert();
|
||||
@@ -56,7 +56,7 @@ export class ServerChan3Notification extends BaseNotification {
|
||||
data: {
|
||||
text: body.title,
|
||||
desp: body.content + '\n\n[查看详情](' + body.url + ')',
|
||||
tags: this.tags.join('|'),
|
||||
tags: this.tags?.join('|') || undefined,
|
||||
short: this.short,
|
||||
},
|
||||
skipSslVerify: this.skipSslVerify,
|
||||
|
||||
@@ -19,10 +19,8 @@ export class RainyunAccess extends BaseAccess {
|
||||
title: "ApiKey",
|
||||
component: {
|
||||
placeholder: "api-key",
|
||||
component: {
|
||||
name: "a-input",
|
||||
vModel: "value"
|
||||
}
|
||||
name: "a-input",
|
||||
vModel: "value"
|
||||
},
|
||||
helper:"https://app.rainyun.com/account/settings/api-key",
|
||||
encrypt: true,
|
||||
|
||||
@@ -21,6 +21,7 @@ export class CommonEmailTemplateProvider extends BaseEmailTemplateProvider imple
|
||||
{label:"URL",value:"url"}
|
||||
]
|
||||
},
|
||||
helper:"html格式下${content}建议使用pre标签包裹:例如:<pre>${content}</pre>",
|
||||
col: { span: 24 },
|
||||
})
|
||||
paramIntro = "";
|
||||
|
||||
113
pnpm-lock.yaml
generated
113
pnpm-lock.yaml
generated
@@ -8,9 +8,6 @@ importers:
|
||||
|
||||
.:
|
||||
dependencies:
|
||||
axios:
|
||||
specifier: ^1.7.7
|
||||
version: 1.9.0(debug@4.4.1)
|
||||
copyfiles:
|
||||
specifier: ^2.4.1
|
||||
version: 2.4.1
|
||||
@@ -33,6 +30,9 @@ importers:
|
||||
'@lerna-lite/version':
|
||||
specifier: ^3.9.3
|
||||
version: 3.12.3(@lerna-lite/publish@3.12.3)(@lerna-lite/run@3.12.3)(@types/node@22.15.18)(typescript@5.8.3)
|
||||
axios:
|
||||
specifier: ^1.9.0
|
||||
version: 1.9.0(debug@4.4.1)
|
||||
medium-zoom:
|
||||
specifier: ^1.1.0
|
||||
version: 1.1.0
|
||||
@@ -55,7 +55,7 @@ importers:
|
||||
specifier: ^3.0.5
|
||||
version: 3.0.6
|
||||
axios:
|
||||
specifier: ^1.7.2
|
||||
specifier: ^1.9.0
|
||||
version: 1.9.0(debug@4.4.1)
|
||||
debug:
|
||||
specifier: ^4.3.5
|
||||
@@ -128,7 +128,7 @@ importers:
|
||||
specifier: ^1.4.1
|
||||
version: 1.4.1
|
||||
axios:
|
||||
specifier: ^1.7.2
|
||||
specifier: ^1.9.0
|
||||
version: 1.9.0(debug@4.4.1)
|
||||
dayjs:
|
||||
specifier: ^1.11.7
|
||||
@@ -214,7 +214,7 @@ importers:
|
||||
version: link:../basic
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.37.16
|
||||
version: link:../../pro/plus-core
|
||||
version: 1.37.16
|
||||
dayjs:
|
||||
specifier: ^1.11.7
|
||||
version: 1.11.13
|
||||
@@ -286,7 +286,7 @@ importers:
|
||||
packages/libs/lib-huawei:
|
||||
dependencies:
|
||||
axios:
|
||||
specifier: ^1.7.2
|
||||
specifier: ^1.9.0
|
||||
version: 1.9.0(debug@4.4.1)
|
||||
rimraf:
|
||||
specifier: ^5.0.5
|
||||
@@ -462,7 +462,7 @@ importers:
|
||||
version: link:../../plugins/plugin-lib
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.37.16
|
||||
version: link:../../pro/plus-core
|
||||
version: 1.37.16
|
||||
'@midwayjs/cache':
|
||||
specifier: 3.14.0
|
||||
version: 3.14.0
|
||||
@@ -1131,7 +1131,7 @@ importers:
|
||||
specifier: ^4.2.5
|
||||
version: 4.2.5
|
||||
axios:
|
||||
specifier: ^1.7.2
|
||||
specifier: ^1.9.0
|
||||
version: 1.9.0(debug@4.4.1)
|
||||
axios-mock-adapter:
|
||||
specifier: ^1.22.0
|
||||
@@ -1490,7 +1490,7 @@ importers:
|
||||
version: link:../../core/basic
|
||||
'@certd/commercial-core':
|
||||
specifier: ^1.37.16
|
||||
version: link:../../pro/commercial-core
|
||||
version: 1.37.16(better-sqlite3@11.10.0)(encoding@0.1.13)(mysql2@3.14.1)(pg@8.16.0)(reflect-metadata@0.2.2)(ts-node@10.9.2(@types/node@18.19.100)(typescript@5.8.3))
|
||||
'@certd/cv4pve-api-javascript':
|
||||
specifier: ^8.4.2
|
||||
version: 8.4.2
|
||||
@@ -1520,10 +1520,10 @@ importers:
|
||||
version: link:../../plugins/plugin-lib
|
||||
'@certd/plugin-plus':
|
||||
specifier: ^1.37.16
|
||||
version: link:../../pro/plugin-plus
|
||||
version: 1.37.16(encoding@0.1.13)
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.37.16
|
||||
version: link:../../pro/plus-core
|
||||
version: 1.37.16
|
||||
'@huaweicloud/huaweicloud-sdk-cdn':
|
||||
specifier: ^3.1.120
|
||||
version: 3.1.149
|
||||
@@ -1579,7 +1579,7 @@ importers:
|
||||
specifier: ^6.21.0
|
||||
version: 6.23.0
|
||||
axios:
|
||||
specifier: ^1.7.2
|
||||
specifier: ^1.9.0
|
||||
version: 1.9.0(debug@4.4.1)
|
||||
basic-ftp:
|
||||
specifier: ^5.0.5
|
||||
@@ -2879,9 +2879,18 @@ packages:
|
||||
'@better-scroll/zoom@2.5.1':
|
||||
resolution: {integrity: sha512-aGvFY5ooeZWS4RcxQLD+pGLpQHQxpPy0sMZV3yadcd2QK53PK9gS4Dp+BYfRv8lZ4/P2LoNEhr6Wq1DN6+uPlA==}
|
||||
|
||||
'@certd/commercial-core@1.37.16':
|
||||
resolution: {integrity: sha512-JH6wlx88ljh2m2QiTJ1dvI/Up3jjOTEQqD/x3cfVmXHYfT//QFIL/O6cRIFKLWxN5Q+0k4YHmCDw/DI+WWdwlQ==}
|
||||
|
||||
'@certd/cv4pve-api-javascript@8.4.2':
|
||||
resolution: {integrity: sha512-udGce7ewrVl4DmZvX+17PjsnqsdDIHEDatr8QP0AVrY2p+8JkaSPW4mXCKiLGf82C9K2+GXgT+qNIqgW7tfF9Q==}
|
||||
|
||||
'@certd/plugin-plus@1.37.16':
|
||||
resolution: {integrity: sha512-lzxyHyq9K+sDDFlPICs/0/W1nODvxTwk7N+qI1gskTbNpPt5CY1b47sPhwLb6oRTeW2/8iVdmt283GECFEAXXg==}
|
||||
|
||||
'@certd/plus-core@1.37.16':
|
||||
resolution: {integrity: sha512-PAyDMlLy/r5kx03A6pH4ICUAdPR9WZroGOx/ivJJo0Auk07uHU/kyXMfSCB6LytUHH0tOy36K+zuTCTdGr2NOA==}
|
||||
|
||||
'@certd/vue-js-cron-core@6.0.3':
|
||||
resolution: {integrity: sha512-kqzoAMhYz9j6FGNWEODRYtt4NpUEUwjpkU89z5WVg2tCtOcI5VhwyUGOd8AxiBCRfd6PtXvzuqw85PaOps9wrQ==}
|
||||
|
||||
@@ -15437,12 +15446,84 @@ snapshots:
|
||||
dependencies:
|
||||
'@better-scroll/core': 2.5.1
|
||||
|
||||
'@certd/commercial-core@1.37.16(better-sqlite3@11.10.0)(encoding@0.1.13)(mysql2@3.14.1)(pg@8.16.0)(reflect-metadata@0.2.2)(ts-node@10.9.2(@types/node@18.19.100)(typescript@5.8.3))':
|
||||
dependencies:
|
||||
'@certd/basic': link:packages/core/basic
|
||||
'@certd/lib-server': link:packages/libs/lib-server
|
||||
'@certd/pipeline': link:packages/core/pipeline
|
||||
'@certd/plugin-plus': 1.37.16(encoding@0.1.13)
|
||||
'@certd/plus-core': 1.37.16
|
||||
'@midwayjs/core': 3.20.11
|
||||
'@midwayjs/koa': 3.20.13
|
||||
'@midwayjs/logger': 3.4.2
|
||||
'@midwayjs/typeorm': 3.20.11
|
||||
alipay-sdk: 4.14.0
|
||||
dayjs: 1.11.13
|
||||
typeorm: 0.3.24(better-sqlite3@11.10.0)(mysql2@3.14.1)(pg@8.16.0)(reflect-metadata@0.2.2)(ts-node@10.9.2(@types/node@18.19.100)(typescript@5.8.3))
|
||||
wechatpay-node-v3: 2.2.1
|
||||
transitivePeerDependencies:
|
||||
- '@google-cloud/spanner'
|
||||
- '@sap/hana-client'
|
||||
- babel-plugin-macros
|
||||
- better-sqlite3
|
||||
- encoding
|
||||
- hdb-pool
|
||||
- ioredis
|
||||
- mongodb
|
||||
- mssql
|
||||
- mysql2
|
||||
- oracledb
|
||||
- pg
|
||||
- pg-native
|
||||
- pg-query-stream
|
||||
- proxy-agent
|
||||
- redis
|
||||
- reflect-metadata
|
||||
- sql.js
|
||||
- sqlite3
|
||||
- supports-color
|
||||
- ts-node
|
||||
- typeorm-aurora-data-api-driver
|
||||
|
||||
'@certd/cv4pve-api-javascript@8.4.2':
|
||||
dependencies:
|
||||
debug: 4.4.1(supports-color@8.1.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@certd/plugin-plus@1.37.16(encoding@0.1.13)':
|
||||
dependencies:
|
||||
'@alicloud/pop-core': 1.8.0
|
||||
'@baiducloud/sdk': 1.0.3
|
||||
'@certd/basic': link:packages/core/basic
|
||||
'@certd/lib-k8s': link:packages/libs/lib-k8s
|
||||
'@certd/pipeline': link:packages/core/pipeline
|
||||
'@certd/plugin-cert': link:packages/plugins/plugin-cert
|
||||
'@certd/plugin-lib': link:packages/plugins/plugin-lib
|
||||
'@certd/plus-core': 1.37.16
|
||||
ali-oss: 6.23.0
|
||||
baidu-aip-sdk: 4.16.16
|
||||
basic-ftp: 5.0.5
|
||||
cos-nodejs-sdk-v5: 2.14.7
|
||||
crypto-js: 4.2.0
|
||||
dayjs: 1.11.13
|
||||
form-data: 4.0.2
|
||||
https-proxy-agent: 7.0.6
|
||||
js-yaml: 4.1.0
|
||||
jsencrypt: 3.3.2
|
||||
jsrsasign: 11.1.0
|
||||
qiniu: 7.14.0
|
||||
tencentcloud-sdk-nodejs: 4.1.112(encoding@0.1.13)
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
- proxy-agent
|
||||
- supports-color
|
||||
|
||||
'@certd/plus-core@1.37.16':
|
||||
dependencies:
|
||||
'@certd/basic': link:packages/core/basic
|
||||
dayjs: 1.11.13
|
||||
|
||||
'@certd/vue-js-cron-core@6.0.3':
|
||||
dependencies:
|
||||
mustache: 4.2.0
|
||||
@@ -21295,13 +21376,13 @@ snapshots:
|
||||
resolve: 1.22.10
|
||||
semver: 6.3.1
|
||||
|
||||
eslint-plugin-prettier@3.4.1(eslint-config-prettier@8.10.0(eslint@7.32.0))(eslint@7.32.0)(prettier@2.8.8):
|
||||
eslint-plugin-prettier@3.4.1(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@7.32.0)(prettier@2.8.8):
|
||||
dependencies:
|
||||
eslint: 7.32.0
|
||||
prettier: 2.8.8
|
||||
prettier-linter-helpers: 1.0.0
|
||||
optionalDependencies:
|
||||
eslint-config-prettier: 8.10.0(eslint@7.32.0)
|
||||
eslint-config-prettier: 8.10.0(eslint@8.57.0)
|
||||
|
||||
eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@2.8.8):
|
||||
dependencies:
|
||||
@@ -23715,7 +23796,7 @@ snapshots:
|
||||
eslint: 7.32.0
|
||||
eslint-config-prettier: 8.10.0(eslint@7.32.0)
|
||||
eslint-plugin-node: 11.1.0(eslint@7.32.0)
|
||||
eslint-plugin-prettier: 3.4.1(eslint-config-prettier@8.10.0(eslint@7.32.0))(eslint@7.32.0)(prettier@2.8.8)
|
||||
eslint-plugin-prettier: 3.4.1(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@7.32.0)(prettier@2.8.8)
|
||||
execa: 5.1.1
|
||||
inquirer: 7.3.3
|
||||
json5: 2.2.3
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import http from 'axios'
|
||||
import fs from 'fs'
|
||||
//读取 packages/core/pipline/package.json的版本号
|
||||
import {default as packageJson} from './packages/core/pipeline/package.json' assert { type: "json" };
|
||||
import {default as packageJson} from '../packages/core/pipeline/package.json' assert { type: "json" };
|
||||
|
||||
const certdVersion = packageJson.version
|
||||
console.log("certdVersion", certdVersion)
|
||||
181
scripts/publish-atomgit.js
Normal file
181
scripts/publish-atomgit.js
Normal file
@@ -0,0 +1,181 @@
|
||||
import fs from 'fs'
|
||||
import axios from 'axios'
|
||||
|
||||
|
||||
const AtomgitAccessToken = process.env.ATOMGIT_TOKEN
|
||||
// CHANGELOG.md
|
||||
const changelog = fs.readFileSync('./CHANGELOG.md', 'utf8')
|
||||
// 解析CHANGELOG.md
|
||||
let lines = changelog.split('\n')
|
||||
const versionLineIndex = lines.findIndex(line => line.startsWith('## '))
|
||||
const versionLine = lines[versionLineIndex]
|
||||
// ## [1.37.16](https://github.com/certd/certd/compare/v1.37.15...v1.37.16) (2025-12-15)
|
||||
const versionTitle = versionLine.match(/\[(.*?)\]/)[1]
|
||||
|
||||
const contentStart = versionLineIndex + 1
|
||||
lines = lines.slice(contentStart)
|
||||
const contentEnd = lines.findIndex(line => {
|
||||
return line.startsWith('## ')
|
||||
})
|
||||
const content = lines.slice(0, contentEnd).join('\n')
|
||||
console.log("-------title------/n")
|
||||
console.log(versionTitle)
|
||||
console.log("-------content------/n")
|
||||
console.log(content)
|
||||
|
||||
/**
|
||||
* 创建仓库Release
|
||||
POST
|
||||
https://api.atomgit.com/api/v5/repos/:owner/:repo/releases
|
||||
Request
|
||||
Path Parameters
|
||||
owner
|
||||
string
|
||||
required
|
||||
仓库所属空间地址(企业、组织或个人的地址path)
|
||||
|
||||
repo
|
||||
string
|
||||
required
|
||||
仓库路径
|
||||
|
||||
Query Parameters
|
||||
access_token
|
||||
string
|
||||
required
|
||||
用户授权码
|
||||
|
||||
application/json
|
||||
Body
|
||||
tag_name
|
||||
string
|
||||
required
|
||||
tag名称
|
||||
|
||||
name
|
||||
string
|
||||
required
|
||||
release名称
|
||||
|
||||
body
|
||||
string
|
||||
required
|
||||
release描述
|
||||
|
||||
target_commitish
|
||||
string
|
||||
分支名称或者commit SHA,如果tag不存在,需要新建tag则传入该参数,如果不传入该参数,则为默认分支的最新提交
|
||||
*/
|
||||
|
||||
// 创建release
|
||||
async function createRelease() {
|
||||
const response = await axios.request({
|
||||
method: 'POST',
|
||||
url: `https://api.atomgit.com/api/v5/repos/certd/certd/releases`,
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
params: {
|
||||
access_token: AtomgitAccessToken
|
||||
},
|
||||
data: {
|
||||
tag_name: `v${versionTitle}`,
|
||||
name: `v${versionTitle}`,
|
||||
body: content,
|
||||
target_commitish: 'v2'
|
||||
},
|
||||
}
|
||||
)
|
||||
console.log("createRelease success")
|
||||
return response.data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取Release附件上传地址
|
||||
GET
|
||||
https://api.atomgit.com/api/v5/repos/:owner/:repo/releases/:tag/upload_url
|
||||
Request
|
||||
Path Parameters
|
||||
owner
|
||||
string
|
||||
required
|
||||
仓库所属空间地址(企业、组织或个人的地址path)
|
||||
|
||||
repo
|
||||
string
|
||||
required
|
||||
仓库路径
|
||||
|
||||
tag
|
||||
string
|
||||
required
|
||||
tag名称
|
||||
|
||||
Query Parameters
|
||||
access_token
|
||||
string
|
||||
required
|
||||
用户授权码
|
||||
|
||||
file_name
|
||||
string
|
||||
required
|
||||
要上传的文件名称
|
||||
|
||||
Responses
|
||||
200
|
||||
Response Headers
|
||||
application/json
|
||||
Schema
|
||||
Example (auto)
|
||||
Schema
|
||||
url
|
||||
string
|
||||
required
|
||||
上传的地址,使用put请求
|
||||
|
||||
headers
|
||||
object
|
||||
|
||||
*/
|
||||
async function getUploadUrl() {
|
||||
const response = await axios.request({
|
||||
method: 'GET',
|
||||
url: `https://api.atomgit.com/api/v5/repos/certd/certd/releases/v${versionTitle}/upload_url`,
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
params: {
|
||||
access_token: AtomgitAccessToken,
|
||||
file_name: `ui-${versionTitle}.zip`
|
||||
},
|
||||
}
|
||||
)
|
||||
console.log("getUploadUrl success:",response.data?.url)
|
||||
return response.data // {url: string, headers: any}
|
||||
}
|
||||
|
||||
async function uploadFile(url, headers, data) {
|
||||
const response = await axios.request({
|
||||
method: 'PUT',
|
||||
url,
|
||||
headers,
|
||||
data,
|
||||
}
|
||||
)
|
||||
return response.data
|
||||
}
|
||||
|
||||
async function publishToAtomgit() {
|
||||
const release = await createRelease()
|
||||
const uploadUrl = await getUploadUrl()
|
||||
const fileName = `ui.zip`
|
||||
const fileData = fs.createReadStream(fileName)
|
||||
const contentLength = fs.statSync(fileName).size
|
||||
uploadUrl.headers['Content-Length'] = contentLength
|
||||
const response = await uploadFile(uploadUrl.url, uploadUrl.headers, fileData)
|
||||
console.log("uploadFile success:")
|
||||
console.log("publishToAtomgit success")
|
||||
}
|
||||
|
||||
publishToAtomgit()
|
||||
3
scripts/version.js
Normal file
3
scripts/version.js
Normal file
@@ -0,0 +1,3 @@
|
||||
import fs from 'fs'
|
||||
const pkg = JSON.parse(fs.readFileSync('./packages/ui/certd-server/package.json'))
|
||||
console.log(pkg.version)
|
||||
32
start.sh
32
start.sh
@@ -18,10 +18,10 @@ fi
|
||||
# fi
|
||||
# find ./packages -mindepth 1 -maxdepth 1 -type d ! -name 'ui' -exec rm -rf {} +
|
||||
# echo "删除成功"
|
||||
|
||||
echo "修改 pnpm-workspace.yaml"
|
||||
cat > pnpm-workspace.yaml << EOF
|
||||
packages:
|
||||
- 'packages/ui/**'
|
||||
- 'packages/ui/certd-server'
|
||||
EOF
|
||||
|
||||
|
||||
@@ -43,17 +43,31 @@ $SUDO_CMD npm install -g pnpm --registry https://registry.npmmirror.com
|
||||
echo "安装依赖"
|
||||
$SUDO_CMD pnpm install --registry https://registry.npmmirror.com
|
||||
|
||||
echo "开始构建"
|
||||
echo "构建certd-client"
|
||||
export NODE_OPTIONS=--max-old-space-size=32768
|
||||
cd packages/ui/certd-client
|
||||
$SUDO_CMD_E pnpm run build
|
||||
cp -r dist/* ../certd-server/public
|
||||
|
||||
# 获取版本号
|
||||
version=$(node --experimental-json-modules ./scripts/version.js)
|
||||
echo "当前版本号为: $version"
|
||||
|
||||
echo "开始构建"
|
||||
cd packages/ui/certd-server
|
||||
echo "构建certd-server"
|
||||
cd ../certd-server
|
||||
$SUDO_CMD_E pnpm run build
|
||||
echo "构建完成"
|
||||
|
||||
|
||||
echo "下载前端ui"
|
||||
# 如果zip有了就不下载
|
||||
if [ -f ui-$version.zip ]; then
|
||||
echo "ui-$version.zip 已经存在,不需要下载"
|
||||
else
|
||||
# 下载之前清理一下
|
||||
rm -rf ui-*.zip
|
||||
# https://atomgit.com/certd/certd/releases/download/v1.37.16/ui-1.37.16.zip
|
||||
# 判断是否下载失败
|
||||
wget https://atomgit.com/certd/certd/releases/download/v$version/ui-$version.zip
|
||||
# 覆盖解压缩
|
||||
unzip -o ui-$version.zip -d ./public
|
||||
|
||||
echo "启动服务"
|
||||
|
||||
# 前台运行
|
||||
|
||||
1
trigger/publish.trigger
Normal file
1
trigger/publish.trigger
Normal file
@@ -0,0 +1 @@
|
||||
6
|
||||
Reference in New Issue
Block a user