Compare commits

..

11 Commits

Author SHA1 Message Date
xiaojunnuo 678b70cee8 v1.40.2 2026-05-20 00:38:50 +08:00
xiaojunnuo c0ca8da4ed build: prepare to build 2026-05-20 00:35:35 +08:00
xiaojunnuo a07dcb1cf5 chore: 1 2026-05-20 00:34:20 +08:00
xiaojunnuo cb4a86d1d5 build: prepare to build 2026-05-20 00:26:45 +08:00
xiaojunnuo 0499347588 fix(certd-server): 调整首页缓存控制头的判断逻辑
新增对首页路径 / 和 /index.html 的强制不缓存处理,确保首页始终获取最新内容
2026-05-20 00:21:42 +08:00
xiaojunnuo cb08e061d2 perf(controller): 更换版本获取源并添加版本标准化处理
将npm镜像源的版本查询替换为AtomGit仓库的最新release接口,新增normalizeReleaseVersion方法标准化版本号格式,移除v前缀
2026-05-19 22:58:03 +08:00
xiaojunnuo 9bf7ca400f build: release 2026-05-19 00:58:34 +08:00
xiaojunnuo 9f75e30af3 Merge branch 'v2' of https://github.com/certd/certd into v2 2026-05-19 00:55:41 +08:00
xiaojunnuo 3f0243ba9a build: publish 2026-05-19 00:38:56 +08:00
xiaojunnuo 1a9b367c9d build: trigger build image 2026-05-19 00:38:44 +08:00
Robert Silén a88d14a3bd dos: Document MariaDB support in README (#737)
Mention MariaDB in the database feature list. Install docs and TypeORM
already support type=mariadb; the app uses the mysql2 driver.
2026-05-17 00:40:41 +08:00
38 changed files with 170 additions and 65 deletions
+10
View File
@@ -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.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19)
### Bug Fixes
* **certd-server:** 调整首页缓存控制头的判断逻辑 ([0499347](https://github.com/certd/certd/commit/0499347588ee544862420ab9a5afd2546d61bc6c))
### Performance Improvements
* **controller:** 更换版本获取源并添加版本标准化处理 ([cb08e06](https://github.com/certd/certd/commit/cb08e061d257ba23a0fefdbfb046a8c759def828))
## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18)
### Bug Fixes
+1 -1
View File
@@ -34,7 +34,7 @@ Certd® 是一个免费的全自动证书管理系统,让你的网站证书永
* **多种通知方式**: 邮件通知、webhook通知、企微、钉钉、飞书、anpush等多种通知方式
* **私有化部署**: 数据保存本地,安装简单快捷,镜像由Github Actions构建,过程公开透明
* **多重安全保障**: 授权加密,站点隐藏,2FA,密码防爆破等多重安全保障
* **多数据库支持**:支持SQLite、PostgreSQL、MySQL
* **多数据库支持**:支持SQLite、PostgreSQL、MySQL、MariaDB
* **开放接口支持**: 提供RESTful API接口,方便集成到其他系统
* **站点证书监控**: 定时监控网站证书的过期时间
* **多用户管理**: 用户可以管理自己的证书流水线
+1 -1
View File
@@ -31,7 +31,7 @@ This project not only supports automated certificate application but also automa
* Multiple notification methods, including email, webhook, WeChat Work, DingTalk, Lark, and anpush.
* On-premises deployment, local data storage, simple and quick installation. Images are built by Github Actions, with a transparent process.
* Multiple security measures, including authorization encryption, site hiding, 2FA, and password brute-force protection.
* Supports multiple databases such as SQLite, PostgreSQL, and MySQL.
* Supports multiple databases such as SQLite, PostgreSQL, MySQL, and MariaDB.
* Open API support.
* Site certificate monitoring.
* Multi-user management.
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18)
### Bug Fixes
* 固化华为云sdk版本,避免华为云调用报错 ([59b9ffa](https://github.com/certd/certd/commit/59b9ffadd05faf3982151c48f8d83cbd97419865))
* **email-service:** 优化商业版测试邮件内容中带的url链接 ([667e7b1](https://github.com/certd/certd/commit/667e7b185bf26558972be01720872f48352b5876))
### Performance Improvements
* 商业版支持限制泛域名数量 ([c63745d](https://github.com/certd/certd/commit/c63745d1ba30904428ba6b13ab0785298baa5cae))
* **suite:** 商业版用户已购套餐支持修改 ([bdb3d09](https://github.com/certd/certd/commit/bdb3d09c09fc73e7e5e3401f6ef5588bf8ad5088))
# [1.40.0](https://github.com/certd/certd/compare/v1.39.16...v1.40.0) (2026-05-14)
### Bug Fixes
+1 -1
View File
@@ -9,5 +9,5 @@
}
},
"npmClient": "pnpm",
"version": "1.40.1"
"version": "1.40.2"
}
+4
View File
@@ -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.40.2](https://github.com/publishlab/node-acme-client/compare/v1.40.1...v1.40.2) (2026-05-19)
**Note:** Version bump only for package @certd/acme-client
## [1.40.1](https://github.com/publishlab/node-acme-client/compare/v1.40.0...v1.40.1) (2026-05-18)
**Note:** Version bump only for package @certd/acme-client
+3 -3
View File
@@ -3,7 +3,7 @@
"description": "Simple and unopinionated ACME client",
"private": false,
"author": "nmorsman",
"version": "1.40.1",
"version": "1.40.2",
"type": "module",
"module": "./dist/index.js",
"main": "./dist/index.js",
@@ -18,7 +18,7 @@
"types"
],
"dependencies": {
"@certd/basic": "^1.40.1",
"@certd/basic": "^1.40.2",
"@peculiar/x509": "^1.11.0",
"asn1js": "^3.0.5",
"axios": "^1.9.0",
@@ -76,5 +76,5 @@
"bugs": {
"url": "https://github.com/publishlab/node-acme-client/issues"
},
"gitHead": "5801f34b3a40cbbd591805e401613b397bec9775"
"gitHead": "73996f055bbff996ee776e7788e5a5cb500fc197"
}
+4
View File
@@ -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.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19)
**Note:** Version bump only for package @certd/basic
## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18)
**Note:** Version bump only for package @certd/basic
+1 -1
View File
@@ -1 +1 @@
00:34
00:35
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@certd/basic",
"private": false,
"version": "1.40.1",
"version": "1.40.2",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -52,5 +52,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "5801f34b3a40cbbd591805e401613b397bec9775"
"gitHead": "73996f055bbff996ee776e7788e5a5cb500fc197"
}
+4
View File
@@ -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.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19)
**Note:** Version bump only for package @certd/pipeline
## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18)
**Note:** Version bump only for package @certd/pipeline
+4 -4
View File
@@ -1,7 +1,7 @@
{
"name": "@certd/pipeline",
"private": false,
"version": "1.40.1",
"version": "1.40.2",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -19,8 +19,8 @@
"compile": "tsc --skipLibCheck --watch"
},
"dependencies": {
"@certd/basic": "^1.40.1",
"@certd/plus-core": "^1.40.1",
"@certd/basic": "^1.40.2",
"@certd/plus-core": "^1.40.2",
"dayjs": "^1.11.7",
"lodash-es": "^4.17.21",
"reflect-metadata": "^0.1.13"
@@ -49,5 +49,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "5801f34b3a40cbbd591805e401613b397bec9775"
"gitHead": "73996f055bbff996ee776e7788e5a5cb500fc197"
}
+4
View File
@@ -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.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19)
**Note:** Version bump only for package @certd/lib-huawei
## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18)
**Note:** Version bump only for package @certd/lib-huawei
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@certd/lib-huawei",
"private": false,
"version": "1.40.1",
"version": "1.40.2",
"main": "./dist/bundle.js",
"module": "./dist/bundle.js",
"types": "./dist/d/index.d.ts",
@@ -27,5 +27,5 @@
"prettier": "^2.8.8",
"tslib": "^2.8.1"
},
"gitHead": "5801f34b3a40cbbd591805e401613b397bec9775"
"gitHead": "73996f055bbff996ee776e7788e5a5cb500fc197"
}
+4
View File
@@ -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.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19)
**Note:** Version bump only for package @certd/lib-iframe
## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18)
**Note:** Version bump only for package @certd/lib-iframe
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@certd/lib-iframe",
"private": false,
"version": "1.40.1",
"version": "1.40.2",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -34,5 +34,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "5801f34b3a40cbbd591805e401613b397bec9775"
"gitHead": "73996f055bbff996ee776e7788e5a5cb500fc197"
}
+4
View File
@@ -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.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19)
**Note:** Version bump only for package @certd/jdcloud
## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18)
**Note:** Version bump only for package @certd/jdcloud
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@certd/jdcloud",
"version": "1.40.1",
"version": "1.40.2",
"description": "jdcloud openApi sdk",
"main": "./dist/bundle.js",
"module": "./dist/bundle.js",
@@ -59,5 +59,5 @@
"fetch"
]
},
"gitHead": "5801f34b3a40cbbd591805e401613b397bec9775"
"gitHead": "73996f055bbff996ee776e7788e5a5cb500fc197"
}
+4
View File
@@ -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.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19)
**Note:** Version bump only for package @certd/lib-k8s
## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18)
**Note:** Version bump only for package @certd/lib-k8s
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@certd/lib-k8s",
"private": false,
"version": "1.40.1",
"version": "1.40.2",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -19,7 +19,7 @@
"compile": "tsc --skipLibCheck --watch"
},
"dependencies": {
"@certd/basic": "^1.40.1",
"@certd/basic": "^1.40.2",
"@kubernetes/client-node": "0.21.0"
},
"devDependencies": {
@@ -36,5 +36,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "5801f34b3a40cbbd591805e401613b397bec9775"
"gitHead": "73996f055bbff996ee776e7788e5a5cb500fc197"
}
+4
View File
@@ -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.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19)
**Note:** Version bump only for package @certd/lib-server
## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18)
**Note:** Version bump only for package @certd/lib-server
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@certd/lib-server",
"version": "1.40.1",
"version": "1.40.2",
"description": "midway with flyway, sql upgrade way ",
"private": false,
"type": "module",
@@ -29,11 +29,11 @@
],
"license": "AGPL",
"dependencies": {
"@certd/acme-client": "^1.40.1",
"@certd/basic": "^1.40.1",
"@certd/pipeline": "^1.40.1",
"@certd/plugin-lib": "^1.40.1",
"@certd/plus-core": "^1.40.1",
"@certd/acme-client": "^1.40.2",
"@certd/basic": "^1.40.2",
"@certd/pipeline": "^1.40.2",
"@certd/plugin-lib": "^1.40.2",
"@certd/plus-core": "^1.40.2",
"@midwayjs/cache": "3.14.0",
"@midwayjs/core": "3.20.11",
"@midwayjs/i18n": "3.20.13",
@@ -69,5 +69,5 @@
"typeorm": "^0.3.11",
"typescript": "^5.4.2"
},
"gitHead": "5801f34b3a40cbbd591805e401613b397bec9775"
"gitHead": "73996f055bbff996ee776e7788e5a5cb500fc197"
}
@@ -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.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18)
**Note:** Version bump only for package @certd/midway-flyway-js
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@certd/midway-flyway-js",
"version": "1.40.1",
"version": "1.40.2",
"description": "midway with flyway, sql upgrade way ",
"private": false,
"type": "module",
@@ -49,5 +49,5 @@
"typeorm": "^0.3.11",
"typescript": "^5.4.2"
},
"gitHead": "5801f34b3a40cbbd591805e401613b397bec9775"
"gitHead": "73996f055bbff996ee776e7788e5a5cb500fc197"
}
@@ -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.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19)
**Note:** Version bump only for package @certd/plugin-cert
## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18)
**Note:** Version bump only for package @certd/plugin-cert
+6 -6
View File
@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-cert",
"private": false,
"version": "1.40.1",
"version": "1.40.2",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -18,10 +18,10 @@
"compile": "tsc --skipLibCheck --watch"
},
"dependencies": {
"@certd/acme-client": "^1.40.1",
"@certd/basic": "^1.40.1",
"@certd/pipeline": "^1.40.1",
"@certd/plugin-lib": "^1.40.1",
"@certd/acme-client": "^1.40.2",
"@certd/basic": "^1.40.2",
"@certd/pipeline": "^1.40.2",
"@certd/plugin-lib": "^1.40.2",
"psl": "^1.9.0",
"punycode.js": "^2.3.1"
},
@@ -41,5 +41,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "5801f34b3a40cbbd591805e401613b397bec9775"
"gitHead": "73996f055bbff996ee776e7788e5a5cb500fc197"
}
+4
View File
@@ -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.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19)
**Note:** Version bump only for package @certd/plugin-lib
## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18)
**Note:** Version bump only for package @certd/plugin-lib
+6 -6
View File
@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-lib",
"private": false,
"version": "1.40.1",
"version": "1.40.2",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -23,10 +23,10 @@
"@alicloud/pop-core": "^1.7.10",
"@alicloud/tea-util": "^1.4.11",
"@aws-sdk/client-s3": "^3.964.0",
"@certd/acme-client": "^1.40.1",
"@certd/basic": "^1.40.1",
"@certd/pipeline": "^1.40.1",
"@certd/plus-core": "^1.40.1",
"@certd/acme-client": "^1.40.2",
"@certd/basic": "^1.40.2",
"@certd/pipeline": "^1.40.2",
"@certd/plus-core": "^1.40.2",
"@kubernetes/client-node": "0.21.0",
"ali-oss": "^6.22.0",
"basic-ftp": "^5.0.5",
@@ -61,5 +61,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "5801f34b3a40cbbd591805e401613b397bec9775"
"gitHead": "73996f055bbff996ee776e7788e5a5cb500fc197"
}
+4
View File
@@ -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.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19)
**Note:** Version bump only for package @certd/ui-client
## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18)
### Performance Improvements
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@certd/ui-client",
"version": "1.40.1",
"version": "1.40.2",
"private": true,
"scripts": {
"dev": "vite --open",
@@ -106,8 +106,8 @@
"zod-defaults": "^0.1.3"
},
"devDependencies": {
"@certd/lib-iframe": "^1.40.1",
"@certd/pipeline": "^1.40.1",
"@certd/lib-iframe": "^1.40.2",
"@certd/pipeline": "^1.40.2",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@types/chai": "^4.3.12",
@@ -204,6 +204,7 @@ const hasNewVersion = computed(() => {
return isNewVersion(version.value, latestVersion.value);
});
async function loadLatestVersion() {
// version.value = settingsStore.app.version; //
latestVersion.value = await api.GetLatestVersion();
console.log("latestVersion", latestVersion.value);
+10
View File
@@ -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.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19)
### Bug Fixes
* **certd-server:** 调整首页缓存控制头的判断逻辑 ([0499347](https://github.com/certd/certd/commit/0499347588ee544862420ab9a5afd2546d61bc6c))
### Performance Improvements
* **controller:** 更换版本获取源并添加版本标准化处理 ([cb08e06](https://github.com/certd/certd/commit/cb08e061d257ba23a0fefdbfb046a8c759def828))
## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18)
### Bug Fixes
+14 -14
View File
@@ -1,6 +1,6 @@
{
"name": "@certd/ui-server",
"version": "1.40.1",
"version": "1.40.2",
"description": "fast-server base midway",
"private": true,
"type": "module",
@@ -53,20 +53,20 @@
"@aws-sdk/client-sts": "^3.990.0",
"@azure/arm-dns": "^5.1.0",
"@azure/identity": "^4.13.1",
"@certd/acme-client": "^1.40.1",
"@certd/basic": "^1.40.1",
"@certd/commercial-core": "^1.40.1",
"@certd/acme-client": "^1.40.2",
"@certd/basic": "^1.40.2",
"@certd/commercial-core": "^1.40.2",
"@certd/cv4pve-api-javascript": "^8.4.2",
"@certd/jdcloud": "^1.40.1",
"@certd/lib-huawei": "^1.40.1",
"@certd/lib-k8s": "^1.40.1",
"@certd/lib-server": "^1.40.1",
"@certd/midway-flyway-js": "^1.40.1",
"@certd/pipeline": "^1.40.1",
"@certd/plugin-cert": "^1.40.1",
"@certd/plugin-lib": "^1.40.1",
"@certd/plugin-plus": "^1.40.1",
"@certd/plus-core": "^1.40.1",
"@certd/jdcloud": "^1.40.2",
"@certd/lib-huawei": "^1.40.2",
"@certd/lib-k8s": "^1.40.2",
"@certd/lib-server": "^1.40.2",
"@certd/midway-flyway-js": "^1.40.2",
"@certd/pipeline": "^1.40.2",
"@certd/plugin-cert": "^1.40.2",
"@certd/plugin-lib": "^1.40.2",
"@certd/plugin-plus": "^1.40.2",
"@certd/plus-core": "^1.40.2",
"@google-cloud/dns": "^5.3.1",
"@google-cloud/publicca": "^1.3.0",
"@huaweicloud/huaweicloud-sdk-cdn": "3.1.185",
@@ -124,7 +124,9 @@ export class MainConfiguration {
this.app.getMiddleware().insertFirst(async (ctx: IMidwayKoaContext, next: NextFunction) => {
await next();
if (shouldSetDefaultNoCache(ctx.path, ctx.response.get('Cache-Control'))) {
const path = ctx.path;
// 如果是首页则强制设置为不缓存
if (path === '/' || path === '/index.html' || shouldSetDefaultNoCache(path, ctx.response.get('Cache-Control')) ) {
ctx.response.set('Cache-Control', 'public,max-age=0');
}
});
@@ -0,0 +1,17 @@
/// <reference types="mocha" />
/// <reference types="node" />
import assert from "node:assert/strict";
import { normalizeReleaseVersion } from "./app-controller.js";
describe("AppController.normalizeReleaseVersion", () => {
it("normalizes AtomGit release tag names", () => {
assert.equal(normalizeReleaseVersion({ tag_name: "v1.40.0" }), "1.40.0");
assert.equal(normalizeReleaseVersion({ tag_name: "1.40.0" }), "1.40.0");
});
it("falls back to release name when tag_name is empty", () => {
assert.equal(normalizeReleaseVersion({ name: "v1.40.0" }), "1.40.0");
});
});
@@ -3,6 +3,11 @@ import { BaseController, Constants, FileService, SysSettingsService, SysSiteInfo
import { http, logger } from '@certd/basic';
import { isComm } from '@certd/plus-core';
export function normalizeReleaseVersion(release: { tag_name?: string; name?: string }) {
const version = release?.tag_name || release?.name || '';
return version.replace(/^v/i, '');
}
/**
*/
@Provide()
@@ -17,12 +22,12 @@ export class AppController extends BaseController {
async latest(): Promise<any> {
try {
const res = await http.request({
url: 'https://registry.npmmirror.com/@certd/pipeline',
url: 'https://api.atomgit.com/api/v5/repos/certd/certd/releases/latest',
method: 'get',
logRes: false,
timeout: 5000,
});
const latest = res['dist-tags'].latest;
const latest = normalizeReleaseVersion(res);
return this.ok(latest);
} catch (e: any) {
logger.error(e);
+1 -1
View File
@@ -1 +1 @@
00:49
00:38
+1 -1
View File
@@ -1 +1 @@
01:14
00:58