mirror of
https://github.com/certd/certd.git
synced 2026-04-09 01:30:57 +08:00
Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce4dc9e3fa | ||
|
|
3d2c6e6032 | ||
|
|
6000a0cfe3 | ||
|
|
b80c60997a | ||
|
|
35e45f0df1 | ||
|
|
e65f5b9f78 | ||
|
|
5969f71e67 | ||
|
|
b1307863eb | ||
|
|
9d0abe993b | ||
|
|
c53bb7cf67 | ||
|
|
0cea26c628 | ||
|
|
610c919c72 | ||
|
|
2c35f94f7c | ||
|
|
cd9a3870b3 | ||
|
|
e11373f23a | ||
|
|
f591635fc1 | ||
|
|
474b57ca61 | ||
|
|
8671887abc | ||
|
|
8274d1baa5 | ||
|
|
bde601bfff | ||
|
|
a2e0951042 | ||
|
|
3c9a8a38dd | ||
|
|
4c067fd39f |
21
CHANGELOG.md
21
CHANGELOG.md
@@ -3,6 +3,27 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.36.2](https://github.com/certd/certd/compare/v1.36.1...v1.36.2) (2025-07-06)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复notification编辑按钮无法打开对话框的bug ([0cea26c](https://github.com/certd/certd/commit/0cea26c6287f52adf273b4a525c37bea8555c68c))
|
||||
* 优化更新飞牛os证书有效期,修复某些情况下部署证书后飞牛无法访问https的bug ([610c919](https://github.com/certd/certd/commit/610c919c72037becc0ed326f5d5b18c963dfcb3a))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 证书检查支持自定义dns服务器 ([c53bb7c](https://github.com/certd/certd/commit/c53bb7cf677faa32729709ae0c10359db5194d7a))
|
||||
|
||||
## [1.36.1](https://github.com/certd/certd/compare/v1.36.0...v1.36.1) (2025-07-02)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复通知和触发器无法编辑的bug ([a2e0951](https://github.com/certd/certd/commit/a2e09510426680eb425c0d7ad337f39d3f052054))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 支持部署到七牛云DCDN ([bde601b](https://github.com/certd/certd/commit/bde601bfffb4f7345d97e1e3b064520816d31555))
|
||||
|
||||
# [1.36.0](https://github.com/certd/certd/compare/v1.35.5...v1.36.0) (2025-07-01)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Certd
|
||||
|
||||
[English](./README_en.md) | [中文](./README.md)
|
||||
|
||||
Certd® 是一个免费的全自动证书管理系统,让你的网站证书永不过期。
|
||||
后缀d取自linux守护进程的命名风格,意为证书守护进程
|
||||
|
||||
@@ -195,8 +197,7 @@ https://afdian.com/a/greper
|
||||
|
||||
## 十一、我的其他项目(求Star)
|
||||
|
||||
| 项目名称 | stars | 项目描述 |
|
||||
|---------------------------------------------------------|-------------------------------------------------------------------------------------------------------|-----------------------------------|
|
||||
| [袖手AI](https://ai.handsfree.work/) | | 袖手GPT,国内可用,无需FQ,每日免费额度 |
|
||||
| 项目名称 | stars | 项目描述 |
|
||||
| --------- |--------- |----------- |
|
||||
| [fast-crud](https://gitee.com/fast-crud/fast-crud/) | <img alt="GitHub stars" src="https://img.shields.io/github/stars/fast-crud/fast-crud?logo=github"/> | 基于vue3的crud快速开发框架 |
|
||||
| [dev-sidecar](https://github.com/docmirror/dev-sidecar/) | <img alt="GitHub stars" src="https://img.shields.io/github/stars/docmirror/dev-sidecar?logo=github"/> | 直连访问github工具,无需FQ,解决github无法访问的问题 |
|
||||
| [dev-sidecar](https://github.com/docmirror/dev-sidecar/) | <img alt="GitHub stars" src="https://img.shields.io/github/stars/docmirror/dev-sidecar?logo=github"/> | 直连访问github工具,无需FQ,解决github无法访问的问题 |
|
||||
|
||||
183
README_en.md
Normal file
183
README_en.md
Normal file
@@ -0,0 +1,183 @@
|
||||
# Certd
|
||||
|
||||
[English](./README_en.md) | [中文](./README.md)
|
||||
|
||||
Certd® is a free, fully automated certificate management system that ensures your website certificates never expire. The suffix 'd' is inspired by the naming convention of Linux daemons, representing a certificate daemon.
|
||||
|
||||
> We pioneered the pipeline-based certificate application and deployment model, which has been "referenced" by multiple projects. Being copied is also a form of success.
|
||||
|
||||
> Regarding certificate renewal:
|
||||
>* In fact, it's impossible to renew or reissue a certificate without modifying the certificate file itself.
|
||||
>* What we refer to as renewal is essentially applying for a new certificate following the full process and redeploying it.
|
||||
>* Free certificates expire in 90 days, which may be shortened in the future. Therefore, automated deployment is essential.
|
||||
|
||||
> The number of pipelines is now unlimited. Welcome to use it.
|
||||
|
||||
## 1. Features
|
||||
This project not only supports automated certificate application but also automated certificate deployment and updates, ensuring your certificates never expire.
|
||||
|
||||
* Fully automated certificate application (supports domains registered with all registrars and multiple domain verification methods such as DNS-01, HTTP-01, and CNAME proxy).
|
||||
* Fully automated certificate deployment and updates (currently supports deployment to over 70 plugins, including hosts, Alibaba Cloud, Tencent Cloud, etc.).
|
||||
* Supports wildcard domains/pan-domains, allows multiple domains in a single certificate, and supports various certificate formats such as pem, pfx, der, and jks.
|
||||
* 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.
|
||||
* Open API support.
|
||||
* Site certificate monitoring.
|
||||
* Multi-user management.
|
||||
* Multi-language support (Chinese and English switching).
|
||||
* Downward compatibility across all versions, with one-click worry-free upgrades.
|
||||
|
||||

|
||||
|
||||
## 2. Online Experience
|
||||
Visit the official demo site and register to experience it.
|
||||
|
||||
https://certd.handfree.work/
|
||||
|
||||
> Note: Data will be cleaned up irregularly, and scheduled tasks may be stopped. For production use, please deploy it yourself.
|
||||
> The content contains sensitive information. Make sure to deploy it locally for production use.
|
||||
|
||||

|
||||
|
||||
## 3. Usage Tutorial
|
||||
Just 3 steps to ensure your certificates never expire.
|
||||
|
||||
### 1. Create a Certificate Pipeline
|
||||

|
||||
|
||||
> After successful addition, you can directly run the pipeline to apply for a certificate.
|
||||
|
||||
### 2. Add a Deployment Task
|
||||
Normally, we need to deploy certificates to applications. Certd supports a wide range of deployment plugins. You can choose based on your needs, such as deploying to Nginx, Alibaba Cloud, Tencent Cloud, K8S, CDN, Baota, 1Panel, etc.
|
||||
|
||||
Here's a demonstration of deploying certificates to a host's Nginx:
|
||||

|
||||
|
||||
If the current deployment plugins don't meet your needs, you can also download them manually and deploy them yourself.
|
||||

|
||||
|
||||
### 3. Run Scheduled Tasks
|
||||

|
||||
|
||||
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
|
||||
-------> [Click here to view detailed usage steps](./step.md) <--------
|
||||
↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
|
||||
|
||||
For more tutorials, please visit the official documentation [certd.docmirror.cn](https://certd.docmirror.cn/guide/).
|
||||
|
||||
## 4. On-Premises Deployment
|
||||
Since certificates, authorization information, and other data are highly sensitive, please make sure to deploy them on-premises to ensure data security.
|
||||
|
||||
You can choose one of the following deployment methods based on your needs:
|
||||
|
||||
1. 【Recommended】[Docker Deployment](https://certd.docmirror.cn/guide/install/docker/)
|
||||
2. 【Recommended】[BT Panel Deployment](https://certd.docmirror.cn/guide/install/docker/)
|
||||
3. 【Recommended】[1Panel Deployment](https://certd.docmirror.cn/guide/install/1panel/)
|
||||
4. 【Recommended】[Rainyun One-Click Deployment](https://app.rainyun.com/apps/rca/store/6646/?ref=NzExMDQ2_): Double your first recharge, only $2.2 per month.
|
||||
[<img src="https://rainyun-apps.cn-nb1.rains3.com/materials/deploy-on-rainyun-cn.svg">](https://app.rainyun.com/apps/rca/store/6646/?ref=NzExMDQ2_)
|
||||
5. 【Not Recommended】[Source Code Deployment](https://certd.docmirror.cn/guide/install/source/)
|
||||
|
||||
#### Docker Image Information:
|
||||
* Domestic Image Addresses:
|
||||
* `registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest`
|
||||
* `registry.cn-shenzhen.aliyuncs.com/handsfree/certd:armv7`, `[version]-armv7`
|
||||
* DockerHub Addresses:
|
||||
* `https://hub.docker.com/r/greper/certd`
|
||||
* `greper/certd:latest`
|
||||
* `greper/certd:armv7`, `greper/certd:[version]-armv7`
|
||||
* GitHub Packages Addresses:
|
||||
* `ghcr.io/certd/certd:latest`
|
||||
* `ghcr.io/certd/certd:armv7`, `ghcr.io/certd/certd:[version]-armv7`
|
||||
|
||||
* Images are built automatically by `Actions`, with a transparent process. Please use them with confidence.
|
||||
* [Click here to view image build logs](https://github.com/certd/certd/actions/workflows/build-image.yml)
|
||||
|
||||

|
||||
|
||||
> Note:
|
||||
> * The certificates, authorization information, and other data stored in this application are highly sensitive. Please take appropriate security measures.
|
||||
> * Make sure to use the HTTPS protocol to access this application to avoid man-in-the-middle attacks.
|
||||
> * Make sure to use a web application firewall to protect this application from attacks such as XSS and SQL injection.
|
||||
> * Make sure to secure the server itself to prevent database leakage.
|
||||
> * Make sure to back up your data to avoid data loss.
|
||||
> * [Click here for more production safety suggestions](https://certd.docmirror.cn/guide/feature/safe/)
|
||||
|
||||
## 5. Ecosystem
|
||||
|
||||
### 1. Client Tool: SSL-Assistant
|
||||
`SSL Assistant` is a certificate deployment and management assistant client that runs on hosts. It supports automatic scanning of the host's `Nginx` configuration and pulling certificates from `Certd` for deployment. This tool is very useful when you don't want to expose your SSH host password.
|
||||
|
||||
Open-source Address: https://github.com/Youngxj/SSL-Assistant
|
||||
|
||||
## 6. More Help
|
||||
Please visit the official documentation: [https://certd.docmirror.cn/](https://certd.docmirror.cn/guide/).
|
||||
|
||||
* Upgrade Method: [Upgrade Guide](https://certd.docmirror.cn/guide/install/upgrade/)
|
||||
* Common Issues: [Forgot Password](https://certd.docmirror.cn/guide/use/forgotpasswd/)
|
||||
* Multi-Database: [Multi-Database Configuration](https://certd.docmirror.cn/guide/install/database/)
|
||||
* Site Security: [Site Security Features](https://certd.docmirror.cn/guide/feature/safe/)
|
||||
* Changelog: [CHANGELOG](./CHANGELOG.md)
|
||||
|
||||
## 7. Contact the Author
|
||||
If you have any questions, feel free to join the group chat (please mention 'certd' in your message).
|
||||
|
||||
| Join Group | WeChat Group | QQ Group |
|
||||
|---------|-------|-------|
|
||||
| QR Code | <img height="230" src="./docs/guide/contact/images/wx.png"> | <img height="230" src="./docs/guide/contact/images/qq.png"> |
|
||||
|
||||
You can also add the author as a friend.
|
||||
|
||||
| Add Author as Friend | WeChat QQ |
|
||||
|---------|-------|-------|
|
||||
| QR Code | <img height="230" src="./docs/guide/contact/images/me.png"> |
|
||||
|
||||
## 8. Donation
|
||||
************************
|
||||
Support open-source projects and contribute with love. I've joined Afdian.
|
||||
https://afdian.com/a/greper
|
||||
|
||||
Benefits of Contribution:
|
||||
1. Join the exclusive contributor group and get one-on-one technical support from the author.
|
||||
2. Your requests will be prioritized and implemented as professional edition features.
|
||||
3. Receive a one-year professional edition activation code.
|
||||
|
||||
Comparison of Professional Edition Privileges:
|
||||
|
||||
| Feature | Free Edition | Professional Edition |
|
||||
|---------|---------------------------------------|--------------------------------|
|
||||
| Free Certificate Application | Unlimited for free | Unlimited for free |
|
||||
| Number of Domains | Unlimited | Unlimited |
|
||||
| Number of Certificate Pipelines | Unlimited | Unlimited |
|
||||
| Site Certificate Monitoring | Limited to 1 | Unlimited |
|
||||
| Automatic Deployment Plugins | Most plugins such as Alibaba Cloud CDN, Tencent Cloud, QiNiu CDN, Host Deployment, Baota, 1Panel | Synology |
|
||||
| Notifications | Email, Custom Webhook | Email without configuration, WeChat Work, DingTalk, Lark, anpush, ServerChan, etc. |
|
||||
|
||||
************************
|
||||
|
||||
## 9. Contribute Code
|
||||
|
||||
1. For local development, please refer to the [Plugin Contribution Guide](https://certd.docmirror.cn/guide/development/).
|
||||
2. As a contributor, you agree that your contributed code is subject to the following license:
|
||||
1. The open-source license can be adjusted to be more or less restrictive.
|
||||
2. It can be used for commercial purposes.
|
||||
|
||||
Thank you to the following contributors.
|
||||
|
||||
<a href="https://github.com/certd/certd/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=certd/certd" />
|
||||
</a>
|
||||
|
||||
## 10. Open-Source License
|
||||
* This project follows the GNU Affero General Public License (AGPL).
|
||||
* Individuals and companies are allowed to use, copy, modify, and distribute this project freely for internal use. Any form of commercial use is prohibited without obtaining commercial authorization.
|
||||
* Without commercial authorization, any modification of the logo, copyright information, and license-related code is prohibited.
|
||||
* For commercial authorization, please contact the author.
|
||||
|
||||
## 11. My Other Projects (Please Star)
|
||||
|
||||
| Project Name | Stars | Project Description |
|
||||
|----------------|---------------|--------------|
|
||||
| [fast-crud](https://gitee.com/fast-crud/fast-crud/) | <img alt="GitHub stars" src="https://img.shields.io/github/stars/fast-crud/fast-crud?logo=github"/> | A fast CRUD development framework based on Vue3. |
|
||||
| [dev-sidecar](https://github.com/docmirror/dev-sidecar/) | <img alt="GitHub stars" src="https://img.shields.io/github/stars/docmirror/dev-sidecar?logo=github"/> | A tool to access GitHub directly without a VPN, solving the problem of inaccessible GitHub. |
|
||||
@@ -1 +1 @@
|
||||
17:16
|
||||
23:01
|
||||
|
||||
@@ -3,6 +3,37 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.36.1](https://github.com/certd/certd/compare/v1.36.0...v1.36.1) (2025-07-02)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复通知和触发器无法编辑的bug ([a2e0951](https://github.com/certd/certd/commit/a2e09510426680eb425c0d7ad337f39d3f052054))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 支持部署到七牛云DCDN ([bde601b](https://github.com/certd/certd/commit/bde601bfffb4f7345d97e1e3b064520816d31555))
|
||||
|
||||
# [1.36.0](https://github.com/certd/certd/compare/v1.35.5...v1.36.0) (2025-07-01)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 支持自定义证书生成插件 ([481cc02](https://github.com/certd/certd/commit/481cc029fafaf280aa844cd3ca30f4653ec35d55))
|
||||
|
||||
### Features
|
||||
|
||||
* 支持模版创建流水线 ([2559f0e](https://github.com/certd/certd/commit/2559f0e822db095d1d26a7f1d517622dce22a5c2))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 阿里云waf cname站点选择支持翻页及域名查询 ([4cf9858](https://github.com/certd/certd/commit/4cf98584dacc5999752732f136246647a2f1f07d))
|
||||
* 部署到ssh主机命令支持前置命令 ([991b741](https://github.com/certd/certd/commit/991b741cbe223b342f534157da63b71e81661f8e))
|
||||
* 模版导入流水线 ([dcc8c56](https://github.com/certd/certd/commit/dcc8c569693432579709ce63656665a76bcf9a44))
|
||||
* 添加用户资料编辑功能 ([7c0f43c](https://github.com/certd/certd/commit/7c0f43c8a3052f73afee3e93c9fcbc43c44ab690))
|
||||
* 优化阿里云waf的日志信息 ([821c6d8](https://github.com/certd/certd/commit/821c6d807d4b3cc5092d09a6282b8cbafb9e7c9f))
|
||||
* 优化中英文翻译与切换 ([acaa8b1](https://github.com/certd/certd/commit/acaa8b173183b4423584ee070e6e332e0ac0eb2d))
|
||||
* 站点IP监控前先同步一下IP ([a080b60](https://github.com/certd/certd/commit/a080b606ab6e289d96b17ef7d2879b4603f889ba))
|
||||
* 支持选择运行策略设置 ([60f055f](https://github.com/certd/certd/commit/60f055f293ce237c21cd9050333dad9609eceac1))
|
||||
|
||||
## [1.35.5](https://github.com/certd/certd/compare/v1.35.4...v1.35.5) (2025-06-20)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
}
|
||||
},
|
||||
"npmClient": "pnpm",
|
||||
"version": "1.36.0"
|
||||
"version": "1.36.2"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.36.2](https://github.com/publishlab/node-acme-client/compare/v1.36.1...v1.36.2) (2025-07-06)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
## [1.36.1](https://github.com/publishlab/node-acme-client/compare/v1.36.0...v1.36.1) (2025-07-02)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
# [1.36.0](https://github.com/publishlab/node-acme-client/compare/v1.35.5...v1.36.0) (2025-07-01)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"description": "Simple and unopinionated ACME client",
|
||||
"private": false,
|
||||
"author": "nmorsman",
|
||||
"version": "1.36.0",
|
||||
"version": "1.36.2",
|
||||
"type": "module",
|
||||
"module": "scr/index.js",
|
||||
"main": "src/index.js",
|
||||
@@ -18,7 +18,7 @@
|
||||
"types"
|
||||
],
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.36.0",
|
||||
"@certd/basic": "^1.36.2",
|
||||
"@peculiar/x509": "^1.11.0",
|
||||
"asn1js": "^3.0.5",
|
||||
"axios": "^1.7.2",
|
||||
@@ -69,5 +69,5 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/publishlab/node-acme-client/issues"
|
||||
},
|
||||
"gitHead": "7feece597a0d323c929b315f99750f1832b7a063"
|
||||
"gitHead": "8671887abcdfb93a7ecb709f223bd6add6f03c67"
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ export default async (client, userOpts) => {
|
||||
log(`开始第${j}个任务`);
|
||||
results.push(task());
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
log(`wait ${waitTime}s`)
|
||||
log(`wait ${Math.floor(waitTime/1000)}s`)
|
||||
await wait(waitTime);
|
||||
}
|
||||
return Promise.all(results);
|
||||
|
||||
@@ -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.36.2](https://github.com/certd/certd/compare/v1.36.1...v1.36.2) (2025-07-06)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 证书检查支持自定义dns服务器 ([c53bb7c](https://github.com/certd/certd/commit/c53bb7cf677faa32729709ae0c10359db5194d7a))
|
||||
|
||||
## [1.36.1](https://github.com/certd/certd/compare/v1.36.0...v1.36.1) (2025-07-02)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
# [1.36.0](https://github.com/certd/certd/compare/v1.35.5...v1.36.0) (2025-07-01)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
@@ -1 +1 @@
|
||||
23:22
|
||||
00:43
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/basic",
|
||||
"private": false,
|
||||
"version": "1.36.0",
|
||||
"version": "1.36.2",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -45,5 +45,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "7feece597a0d323c929b315f99750f1832b7a063"
|
||||
"gitHead": "8671887abcdfb93a7ecb709f223bd6add6f03c67"
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import { locker } from "./util.lock.js";
|
||||
import { mitter } from "./util.mitter.js";
|
||||
|
||||
import * as request from "./util.request.js";
|
||||
export * from "./util.cache.js";
|
||||
export const utils = {
|
||||
sleep,
|
||||
http,
|
||||
|
||||
@@ -1,8 +1,53 @@
|
||||
// LRUCache
|
||||
|
||||
import { LRUCache } from 'lru-cache';
|
||||
import { LRUCache } from "lru-cache";
|
||||
|
||||
export const cache = new LRUCache<string, any>({
|
||||
max: 1000,
|
||||
ttl: 1000 * 60 * 10,
|
||||
});
|
||||
|
||||
export class LocalCache<V = any> {
|
||||
cache: Map<string, { value: V; expiresAt: number }>;
|
||||
constructor(opts: { clearInterval?: number } = {}) {
|
||||
this.cache = new Map();
|
||||
setInterval(() => {
|
||||
this.clearExpires();
|
||||
}, opts.clearInterval ?? 5 * 60 * 1000);
|
||||
}
|
||||
|
||||
get(key: string): V | undefined {
|
||||
const entry = this.cache.get(key);
|
||||
if (!entry) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// 检查是否过期
|
||||
if (Date.now() > entry.expiresAt) {
|
||||
this.cache.delete(key);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return entry.value;
|
||||
}
|
||||
|
||||
set(key: string, value: V, ttl = 300000) {
|
||||
// 默认5分钟 (300000毫秒)
|
||||
this.cache.set(key, {
|
||||
value,
|
||||
expiresAt: Date.now() + ttl,
|
||||
});
|
||||
}
|
||||
|
||||
clear() {
|
||||
this.cache.clear();
|
||||
}
|
||||
|
||||
clearExpires() {
|
||||
for (const [key, entry] of this.cache) {
|
||||
if (entry.expiresAt < Date.now()) {
|
||||
this.cache.delete(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export default function (timeout: number) {
|
||||
return new Promise((resolve) => {
|
||||
return new Promise(resolve => {
|
||||
setTimeout(() => {
|
||||
resolve({});
|
||||
}, timeout);
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.36.2](https://github.com/certd/certd/compare/v1.36.1...v1.36.2) (2025-07-06)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
||||
## [1.36.1](https://github.com/certd/certd/compare/v1.36.0...v1.36.1) (2025-07-02)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
||||
# [1.36.0](https://github.com/certd/certd/compare/v1.35.5...v1.36.0) (2025-07-01)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/pipeline",
|
||||
"private": false,
|
||||
"version": "1.36.0",
|
||||
"version": "1.36.2",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -17,8 +17,8 @@
|
||||
"pub": "npm publish"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.36.0",
|
||||
"@certd/plus-core": "^1.36.0",
|
||||
"@certd/basic": "^1.36.2",
|
||||
"@certd/plus-core": "^1.36.1",
|
||||
"dayjs": "^1.11.7",
|
||||
"lodash-es": "^4.17.21",
|
||||
"reflect-metadata": "^0.1.13"
|
||||
@@ -44,5 +44,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "7feece597a0d323c929b315f99750f1832b7a063"
|
||||
"gitHead": "8671887abcdfb93a7ecb709f223bd6add6f03c67"
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import { FormItemProps, HistoryResult, Pipeline } from "../dt/index.js";
|
||||
import { HttpClient, ILogger, utils } from "@certd/basic";
|
||||
import * as _ from "lodash-es";
|
||||
import { IEmailService } from "../service/index.js";
|
||||
import { isPlus } from "@certd/plus-core";
|
||||
|
||||
export type NotificationBody = {
|
||||
userId?: number;
|
||||
@@ -81,9 +80,6 @@ export abstract class BaseNotification implements INotification {
|
||||
logger!: ILogger;
|
||||
|
||||
async doSend(body: NotificationBody) {
|
||||
if (this.define.needPlus && !isPlus()) {
|
||||
body.content = `${body.content}\n\n注意:此通知渠道已调整为专业版功能,后续版本将不再支持发送,请尽快修改或升级为专业版`;
|
||||
}
|
||||
return await this.send(body);
|
||||
}
|
||||
abstract send(body: NotificationBody): Promise<void>;
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.36.2](https://github.com/certd/certd/compare/v1.36.1...v1.36.2) (2025-07-06)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
## [1.36.1](https://github.com/certd/certd/compare/v1.36.0...v1.36.1) (2025-07-02)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
# [1.36.0](https://github.com/certd/certd/compare/v1.35.5...v1.36.0) (2025-07-01)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-huawei",
|
||||
"private": false,
|
||||
"version": "1.36.0",
|
||||
"version": "1.36.2",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/bundle.js",
|
||||
"types": "./dist/d/index.d.ts",
|
||||
@@ -24,5 +24,5 @@
|
||||
"prettier": "^2.8.8",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"gitHead": "7feece597a0d323c929b315f99750f1832b7a063"
|
||||
"gitHead": "8671887abcdfb93a7ecb709f223bd6add6f03c67"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.36.2](https://github.com/certd/certd/compare/v1.36.1...v1.36.2) (2025-07-06)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
## [1.36.1](https://github.com/certd/certd/compare/v1.36.0...v1.36.1) (2025-07-02)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
# [1.36.0](https://github.com/certd/certd/compare/v1.35.5...v1.36.0) (2025-07-01)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-iframe",
|
||||
"private": false,
|
||||
"version": "1.36.0",
|
||||
"version": "1.36.2",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -31,5 +31,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "7feece597a0d323c929b315f99750f1832b7a063"
|
||||
"gitHead": "8671887abcdfb93a7ecb709f223bd6add6f03c67"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.36.2](https://github.com/certd/certd/compare/v1.36.1...v1.36.2) (2025-07-06)
|
||||
|
||||
**Note:** Version bump only for package @certd/jdcloud
|
||||
|
||||
## [1.36.1](https://github.com/certd/certd/compare/v1.36.0...v1.36.1) (2025-07-02)
|
||||
|
||||
**Note:** Version bump only for package @certd/jdcloud
|
||||
|
||||
# [1.36.0](https://github.com/certd/certd/compare/v1.35.5...v1.36.0) (2025-07-01)
|
||||
|
||||
**Note:** Version bump only for package @certd/jdcloud
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/jdcloud",
|
||||
"version": "1.36.0",
|
||||
"version": "1.36.2",
|
||||
"description": "jdcloud openApi sdk",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/bundle.js",
|
||||
@@ -61,5 +61,5 @@
|
||||
"fetch"
|
||||
]
|
||||
},
|
||||
"gitHead": "7feece597a0d323c929b315f99750f1832b7a063"
|
||||
"gitHead": "8671887abcdfb93a7ecb709f223bd6add6f03c67"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.36.2](https://github.com/certd/certd/compare/v1.36.1...v1.36.2) (2025-07-06)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
## [1.36.1](https://github.com/certd/certd/compare/v1.36.0...v1.36.1) (2025-07-02)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
# [1.36.0](https://github.com/certd/certd/compare/v1.35.5...v1.36.0) (2025-07-01)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-k8s",
|
||||
"private": false,
|
||||
"version": "1.36.0",
|
||||
"version": "1.36.2",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -17,7 +17,7 @@
|
||||
"pub": "npm publish"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.36.0",
|
||||
"@certd/basic": "^1.36.2",
|
||||
"@kubernetes/client-node": "0.21.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -32,5 +32,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "7feece597a0d323c929b315f99750f1832b7a063"
|
||||
"gitHead": "8671887abcdfb93a7ecb709f223bd6add6f03c67"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.36.2](https://github.com/certd/certd/compare/v1.36.1...v1.36.2) (2025-07-06)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-server
|
||||
|
||||
## [1.36.1](https://github.com/certd/certd/compare/v1.36.0...v1.36.1) (2025-07-02)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-server
|
||||
|
||||
# [1.36.0](https://github.com/certd/certd/compare/v1.35.5...v1.36.0) (2025-07-01)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-server
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/lib-server",
|
||||
"version": "1.36.0",
|
||||
"version": "1.36.2",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
@@ -27,10 +27,10 @@
|
||||
],
|
||||
"license": "AGPL",
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.36.0",
|
||||
"@certd/basic": "^1.36.0",
|
||||
"@certd/pipeline": "^1.36.0",
|
||||
"@certd/plus-core": "^1.36.0",
|
||||
"@certd/acme-client": "^1.36.2",
|
||||
"@certd/basic": "^1.36.2",
|
||||
"@certd/pipeline": "^1.36.2",
|
||||
"@certd/plus-core": "^1.36.1",
|
||||
"@midwayjs/cache": "~3.14.0",
|
||||
"@midwayjs/core": "~3.20.3",
|
||||
"@midwayjs/i18n": "~3.20.3",
|
||||
@@ -61,5 +61,5 @@
|
||||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "7feece597a0d323c929b315f99750f1832b7a063"
|
||||
"gitHead": "8671887abcdfb93a7ecb709f223bd6add6f03c67"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.36.2](https://github.com/certd/certd/compare/v1.36.1...v1.36.2) (2025-07-06)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
## [1.36.1](https://github.com/certd/certd/compare/v1.36.0...v1.36.1) (2025-07-02)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
# [1.36.0](https://github.com/certd/certd/compare/v1.35.5...v1.36.0) (2025-07-01)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/midway-flyway-js",
|
||||
"version": "1.36.0",
|
||||
"version": "1.36.2",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
@@ -46,5 +46,5 @@
|
||||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "7feece597a0d323c929b315f99750f1832b7a063"
|
||||
"gitHead": "8671887abcdfb93a7ecb709f223bd6add6f03c67"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.36.2](https://github.com/certd/certd/compare/v1.36.1...v1.36.2) (2025-07-06)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-cert
|
||||
|
||||
## [1.36.1](https://github.com/certd/certd/compare/v1.36.0...v1.36.1) (2025-07-02)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-cert
|
||||
|
||||
# [1.36.0](https://github.com/certd/certd/compare/v1.35.5...v1.36.0) (2025-07-01)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/plugin-cert",
|
||||
"private": false,
|
||||
"version": "1.36.0",
|
||||
"version": "1.36.2",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -16,10 +16,10 @@
|
||||
"pub": "npm publish"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.36.0",
|
||||
"@certd/basic": "^1.36.0",
|
||||
"@certd/pipeline": "^1.36.0",
|
||||
"@certd/plugin-lib": "^1.36.0",
|
||||
"@certd/acme-client": "^1.36.2",
|
||||
"@certd/basic": "^1.36.2",
|
||||
"@certd/pipeline": "^1.36.2",
|
||||
"@certd/plugin-lib": "^1.36.2",
|
||||
"@google-cloud/publicca": "^1.3.0",
|
||||
"dayjs": "^1.11.7",
|
||||
"jszip": "^3.10.1",
|
||||
@@ -43,5 +43,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "7feece597a0d323c929b315f99750f1832b7a063"
|
||||
"gitHead": "8671887abcdfb93a7ecb709f223bd6add6f03c67"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.36.2](https://github.com/certd/certd/compare/v1.36.1...v1.36.2) (2025-07-06)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-lib
|
||||
|
||||
## [1.36.1](https://github.com/certd/certd/compare/v1.36.0...v1.36.1) (2025-07-02)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-lib
|
||||
|
||||
# [1.36.0](https://github.com/certd/certd/compare/v1.35.5...v1.36.0) (2025-07-01)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-lib
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/plugin-lib",
|
||||
"private": false,
|
||||
"version": "1.36.0",
|
||||
"version": "1.36.2",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -21,8 +21,8 @@
|
||||
"@alicloud/pop-core": "^1.7.10",
|
||||
"@alicloud/tea-util": "^1.4.10",
|
||||
"@aws-sdk/client-s3": "^3.787.0",
|
||||
"@certd/basic": "^1.36.0",
|
||||
"@certd/pipeline": "^1.36.0",
|
||||
"@certd/basic": "^1.36.2",
|
||||
"@certd/pipeline": "^1.36.2",
|
||||
"@kubernetes/client-node": "0.21.0",
|
||||
"ali-oss": "^6.22.0",
|
||||
"basic-ftp": "^5.0.5",
|
||||
@@ -53,5 +53,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "7feece597a0d323c929b315f99750f1832b7a063"
|
||||
"gitHead": "8671887abcdfb93a7ecb709f223bd6add6f03c67"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,22 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.36.2](https://github.com/certd/certd/compare/v1.36.1...v1.36.2) (2025-07-06)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复notification编辑按钮无法打开对话框的bug ([0cea26c](https://github.com/certd/certd/commit/0cea26c6287f52adf273b4a525c37bea8555c68c))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 证书检查支持自定义dns服务器 ([c53bb7c](https://github.com/certd/certd/commit/c53bb7cf677faa32729709ae0c10359db5194d7a))
|
||||
|
||||
## [1.36.1](https://github.com/certd/certd/compare/v1.36.0...v1.36.1) (2025-07-02)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复通知和触发器无法编辑的bug ([a2e0951](https://github.com/certd/certd/commit/a2e09510426680eb425c0d7ad337f39d3f052054))
|
||||
|
||||
# [1.36.0](https://github.com/certd/certd/compare/v1.35.5...v1.36.0) (2025-07-01)
|
||||
|
||||
### Features
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/ui-client",
|
||||
"version": "1.36.0",
|
||||
"version": "1.36.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite --open",
|
||||
@@ -103,8 +103,8 @@
|
||||
"zod-defaults": "^0.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@certd/lib-iframe": "^1.36.0",
|
||||
"@certd/pipeline": "^1.36.0",
|
||||
"@certd/lib-iframe": "^1.36.2",
|
||||
"@certd/pipeline": "^1.36.2",
|
||||
"@rollup/plugin-commonjs": "^25.0.7",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@types/chai": "^4.3.12",
|
||||
|
||||
@@ -67,3 +67,8 @@ footer {
|
||||
margin-inline-end: calc(-3em - 8px);
|
||||
padding-inline-end: calc(3em + 8px);
|
||||
}
|
||||
|
||||
|
||||
.ant-progress .ant-progress-text{
|
||||
width:3em;
|
||||
}
|
||||
@@ -47,6 +47,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
const { openSiteIpMonitorDialog } = useSiteIpMonitor();
|
||||
const { openSiteImportDialog } = useSiteImport();
|
||||
return {
|
||||
id: "siteMonitorCrud",
|
||||
crudOptions: {
|
||||
request: {
|
||||
pageRequest,
|
||||
@@ -117,7 +118,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
},
|
||||
rowHandle: {
|
||||
fixed: "right",
|
||||
width: 240,
|
||||
width: 280,
|
||||
buttons: {
|
||||
check: {
|
||||
order: 0,
|
||||
|
||||
@@ -45,6 +45,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
const { openSiteIpImportDialog } = useSiteIpMonitor();
|
||||
return {
|
||||
crudOptions: {
|
||||
id: "siteIpCrud",
|
||||
request: {
|
||||
pageRequest,
|
||||
addRequest,
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
</div>
|
||||
<div class="helper">{{ t("certd.monitor.setting.monitorRetryTimes") }}</div>
|
||||
</a-form-item>
|
||||
<!-- <a-form-item :label="t('certd.monitor.setting.dnsServer')" :name="['dnsServer']">
|
||||
<a-form-item :label="t('certd.monitor.setting.dnsServer')" :name="['dnsServer']">
|
||||
<div class="flex">
|
||||
<a-select v-model:value="formState.dnsServer" mode="tags" :open="false" />
|
||||
</div>
|
||||
<div class="helper">{{ t("certd.monitor.setting.dnsServerHelper") }}</div>
|
||||
</a-form-item> -->
|
||||
</a-form-item>
|
||||
<a-form-item :label="t('certd.monitor.setting.monitorCronSetting')" :name="['cron']">
|
||||
<div class="flex flex-baseline">
|
||||
<cron-editor v-model="formState.cron" :disabled="!settingsStore.isPlus" :allow-every-min="userStore.isAdmin" />
|
||||
|
||||
@@ -3,9 +3,8 @@ import { computed, provide, ref, toRef } from "vue";
|
||||
import { useReference } from "/@/use/use-refrence";
|
||||
import { forEach, get, merge, set } from "lodash-es";
|
||||
import { Modal } from "ant-design-vue";
|
||||
import * as api from "/@/views/sys/cname/provider/api";
|
||||
import { mitter } from "/@/utils/util.mitt";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useI18n } from "/src/locales";
|
||||
|
||||
export function notificationProvide(api: any) {
|
||||
provide("notificationApi", api);
|
||||
|
||||
@@ -91,6 +91,7 @@ import { nanoid } from "nanoid";
|
||||
import PiNotificationFormEmail from "./pi-notification-form-email.vue";
|
||||
import NotificationSelector from "/@/views/certd/notification/notification-selector/index.vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -151,7 +152,7 @@ const notificationDrawerOnAfterVisibleChange = (val: any) => {
|
||||
|
||||
const notificationOpen = (notification: any, emit: any) => {
|
||||
callback.value = emit;
|
||||
currentNotification.value = _.cloneDeep(notification);
|
||||
currentNotification.value = cloneDeep(notification);
|
||||
console.log("currentNotificationOpen", currentNotification.value);
|
||||
notificationDrawerShow();
|
||||
};
|
||||
@@ -210,6 +211,16 @@ function onSelectedChange(node: any) {
|
||||
|
||||
const labelCol = { span: 6 };
|
||||
const wrapperCol = { span: 16 };
|
||||
|
||||
defineExpose({
|
||||
notificationAdd,
|
||||
notificationEdit,
|
||||
notificationView,
|
||||
notificationDelete,
|
||||
notificationSave,
|
||||
notificationOpen,
|
||||
notificationDrawerShow,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
|
||||
@@ -190,6 +190,7 @@ export default {
|
||||
...useTriggerForm(),
|
||||
labelCol: { span: 6 },
|
||||
wrapperCol: { span: 16 },
|
||||
t,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3,6 +3,22 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.36.2](https://github.com/certd/certd/compare/v1.36.1...v1.36.2) (2025-07-06)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 优化更新飞牛os证书有效期,修复某些情况下部署证书后飞牛无法访问https的bug ([610c919](https://github.com/certd/certd/commit/610c919c72037becc0ed326f5d5b18c963dfcb3a))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 证书检查支持自定义dns服务器 ([c53bb7c](https://github.com/certd/certd/commit/c53bb7cf677faa32729709ae0c10359db5194d7a))
|
||||
|
||||
## [1.36.1](https://github.com/certd/certd/compare/v1.36.0...v1.36.1) (2025-07-02)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 支持部署到七牛云DCDN ([bde601b](https://github.com/certd/certd/commit/bde601bfffb4f7345d97e1e3b064520816d31555))
|
||||
|
||||
# [1.36.0](https://github.com/certd/certd/compare/v1.35.5...v1.36.0) (2025-07-01)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/ui-server",
|
||||
"version": "1.36.0",
|
||||
"version": "1.36.2",
|
||||
"description": "fast-server base midway",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
@@ -42,20 +42,20 @@
|
||||
"@aws-sdk/client-cloudfront": "^3.699.0",
|
||||
"@aws-sdk/client-iam": "^3.699.0",
|
||||
"@aws-sdk/client-s3": "^3.705.0",
|
||||
"@certd/acme-client": "^1.36.0",
|
||||
"@certd/basic": "^1.36.0",
|
||||
"@certd/commercial-core": "^1.36.0",
|
||||
"@certd/acme-client": "^1.36.2",
|
||||
"@certd/basic": "^1.36.2",
|
||||
"@certd/commercial-core": "^1.36.1",
|
||||
"@certd/cv4pve-api-javascript": "^8.4.1",
|
||||
"@certd/jdcloud": "^1.36.0",
|
||||
"@certd/lib-huawei": "^1.36.0",
|
||||
"@certd/lib-k8s": "^1.36.0",
|
||||
"@certd/lib-server": "^1.36.0",
|
||||
"@certd/midway-flyway-js": "^1.36.0",
|
||||
"@certd/pipeline": "^1.36.0",
|
||||
"@certd/plugin-cert": "^1.36.0",
|
||||
"@certd/plugin-lib": "^1.36.0",
|
||||
"@certd/plugin-plus": "^1.36.0",
|
||||
"@certd/plus-core": "^1.36.0",
|
||||
"@certd/jdcloud": "^1.36.2",
|
||||
"@certd/lib-huawei": "^1.36.2",
|
||||
"@certd/lib-k8s": "^1.36.2",
|
||||
"@certd/lib-server": "^1.36.2",
|
||||
"@certd/midway-flyway-js": "^1.36.2",
|
||||
"@certd/pipeline": "^1.36.2",
|
||||
"@certd/plugin-cert": "^1.36.2",
|
||||
"@certd/plugin-lib": "^1.36.2",
|
||||
"@certd/plugin-plus": "^1.36.1",
|
||||
"@certd/plus-core": "^1.36.1",
|
||||
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.120",
|
||||
"@huaweicloud/huaweicloud-sdk-core": "^3.1.120",
|
||||
"@koa/cors": "^5.0.0",
|
||||
@@ -82,7 +82,6 @@
|
||||
"cross-env": "^7.0.3",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dayjs": "^1.11.7",
|
||||
"dns2": "^2.1.0",
|
||||
"form-data": "^4.0.0",
|
||||
"glob": "^11.0.0",
|
||||
"https-proxy-agent": "^7.0.5",
|
||||
|
||||
@@ -27,6 +27,7 @@ export class UserSiteMonitorSetting extends BaseSettings {
|
||||
notificationId?:number= 0;
|
||||
cron?:string = undefined;
|
||||
retryTimes?:number = 3;
|
||||
dnsServer?:string[] = undefined;
|
||||
}
|
||||
|
||||
export class UserEmailSetting extends BaseSettings {
|
||||
|
||||
@@ -3,8 +3,13 @@ import { InjectEntityModel } from "@midwayjs/typeorm";
|
||||
import { Repository } from "typeorm";
|
||||
import { BaseService, BaseSettings } from "@certd/lib-server";
|
||||
import { UserSettingsEntity } from "../entity/user-settings.js";
|
||||
import { mergeUtils } from "@certd/basic";
|
||||
import { LocalCache, mergeUtils } from "@certd/basic";
|
||||
const {merge} = mergeUtils
|
||||
|
||||
const UserSettingCache = new LocalCache({
|
||||
clearInterval: 5 * 60 * 1000,
|
||||
});
|
||||
|
||||
/**
|
||||
* 授权
|
||||
*/
|
||||
@@ -75,14 +80,26 @@ export class UserSettingsService extends BaseService<UserSettingsEntity> {
|
||||
}
|
||||
|
||||
|
||||
async getSetting<T>( userId: number,type: any): Promise<T> {
|
||||
async getSetting<T>( userId: number,type: any, cache:boolean = false): Promise<T> {
|
||||
if(!userId){
|
||||
throw new Error('userId is required');
|
||||
}
|
||||
const key = type.__key__;
|
||||
const cacheKey = key + '_' + userId;
|
||||
if (cache) {
|
||||
const settings: T = UserSettingCache.get(cacheKey);
|
||||
if (settings) {
|
||||
return settings;
|
||||
}
|
||||
}
|
||||
|
||||
let newSetting: T = new type();
|
||||
const savedSettings = await this.getSettingByKey(key, userId);
|
||||
newSetting = merge(newSetting, savedSettings);
|
||||
|
||||
if (cache) {
|
||||
UserSettingCache.set(cacheKey, newSetting);
|
||||
}
|
||||
return newSetting;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
import { LocalCache } from '@certd/basic';
|
||||
import dnsSdk from 'dns'
|
||||
const dns = dnsSdk.promises
|
||||
|
||||
export class DnsCustom{
|
||||
resolver: any;
|
||||
|
||||
constructor(dnsServers:string[]) {
|
||||
const resolver = new dns.Resolver();
|
||||
resolver.setServers(dnsServers);
|
||||
this.resolver = resolver;
|
||||
}
|
||||
async resolve(hostname:string,options:any):Promise<string[]>{
|
||||
// { family: undefined, hints: 0, all: true }
|
||||
|
||||
const cnames = await this.resolver.resolveCname(hostname)
|
||||
let cnameIps = []
|
||||
// deep
|
||||
if (cnames && cnames.length > 0) {
|
||||
for (let cname of cnames) {
|
||||
const cnameIp = await this.resolve(cname,options)
|
||||
if (cnameIp && cnameIp.length > 0) {
|
||||
cnameIps.push(...cnameIp)
|
||||
}
|
||||
}
|
||||
}
|
||||
let v4 = []
|
||||
let v6 = []
|
||||
|
||||
const {family, all} = options
|
||||
if(family === 6 && !all){
|
||||
v6= await this.resolver.resolve6(hostname)
|
||||
}
|
||||
if(family === 4 && !all){
|
||||
v4 = await this.resolver.resolve4(hostname)
|
||||
}
|
||||
|
||||
if(all){
|
||||
v4 = await this.resolver.resolve4(hostname)
|
||||
v6 = await this.resolver.resolve6(hostname)
|
||||
}
|
||||
|
||||
return [...v4,...v6,...cnameIps]
|
||||
}
|
||||
|
||||
async resolve4(hostname:string,options:any):Promise<string[]>{
|
||||
return await this.resolver.resolve4(hostname,options)
|
||||
}
|
||||
async resolve6(hostname:string,options:any):Promise<string[]>{
|
||||
return await this.resolver.resolve6(hostname,options)
|
||||
}
|
||||
async resolveAny(hostname:string,options:any):Promise<string[]>{
|
||||
return await this.resolver.resolveAny(hostname,options)
|
||||
}
|
||||
|
||||
async resolveCname(hostname:string,options:any):Promise<string[]>{
|
||||
return await this.resolver.resolveCname(hostname,options)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
export class DnsContainer{
|
||||
bucket: LocalCache<DnsCustom> = new LocalCache()
|
||||
|
||||
constructor() {}
|
||||
getDns(server:string[]){
|
||||
const key = server.join(',')
|
||||
let dns = this.bucket.get(key)
|
||||
if (dns){
|
||||
return dns
|
||||
}
|
||||
dns = new DnsCustom(server)
|
||||
this.bucket.set(key,dns)
|
||||
return dns
|
||||
}
|
||||
}
|
||||
|
||||
export const dnsContainer = new DnsContainer()
|
||||
@@ -15,6 +15,7 @@ import {UserSiteMonitorSetting} from "../../mine/service/models.js";
|
||||
import {SiteIpService} from "./site-ip-service.js";
|
||||
import {SiteIpEntity} from "../entity/site-ip.js";
|
||||
import {Cron} from "../../cron/cron.js";
|
||||
import { dnsContainer } from "./dns-custom.js";
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Request, {allowDowngrade: true})
|
||||
@@ -108,6 +109,14 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
||||
if (!site?.domain) {
|
||||
throw new Error("站点域名不能为空");
|
||||
}
|
||||
|
||||
const setting = await this.userSettingsService.getSetting<UserSiteMonitorSetting>(site.userId, UserSiteMonitorSetting);
|
||||
const dnsServer = setting.dnsServer
|
||||
let resolver = null
|
||||
if (dnsServer && dnsServer.length > 0) {
|
||||
resolver = dnsContainer.getDns(dnsServer) as any
|
||||
}
|
||||
|
||||
try {
|
||||
await this.update({
|
||||
id: site.id,
|
||||
@@ -117,7 +126,8 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
||||
const res = await siteTester.test({
|
||||
host: site.domain,
|
||||
port: site.httpsPort,
|
||||
retryTimes
|
||||
retryTimes,
|
||||
resolver
|
||||
});
|
||||
|
||||
const certi: PeerCertificate = res.certificate;
|
||||
|
||||
@@ -7,11 +7,15 @@ import {NotificationService} from "../../pipeline/service/notification-service.j
|
||||
import {UserSuiteService} from "@certd/commercial-core";
|
||||
import {UserSettingsService} from "../../mine/service/user-settings-service.js";
|
||||
import {SiteIpEntity} from "../entity/site-ip.js";
|
||||
import dns from "dns";
|
||||
import {logger, safePromise} from "@certd/basic";
|
||||
import dnsSdk from "dns";
|
||||
import {logger} from "@certd/basic";
|
||||
import dayjs from "dayjs";
|
||||
import {siteTester} from "./site-tester.js";
|
||||
import {PeerCertificate} from "tls";
|
||||
import { UserSiteMonitorSetting } from "../../mine/service/models.js";
|
||||
import { dnsContainer } from "./dns-custom.js";
|
||||
|
||||
const dns = dnsSdk.promises;
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
@@ -62,11 +66,20 @@ export class SiteIpService extends BaseService<SiteIpEntity> {
|
||||
async sync(entity: SiteInfoEntity,check:boolean = true) {
|
||||
|
||||
const domain = entity.domain;
|
||||
|
||||
const setting = await this.userSettingsService.getSetting<UserSiteMonitorSetting>(entity.userId, UserSiteMonitorSetting);
|
||||
|
||||
const dnsServer = setting.dnsServer
|
||||
let resolver = dns
|
||||
if (dnsServer && dnsServer.length > 0) {
|
||||
resolver = dnsContainer.getDns(dnsServer) as any
|
||||
}
|
||||
|
||||
//从域名解析中获取所有ip
|
||||
const ips = await this.getAllIpsFromDomain(domain);
|
||||
const ips = await this.getAllIpsFromDomain(domain,resolver);
|
||||
if (ips.length === 0 ) {
|
||||
logger.warn(`没有发现${domain}的IP`)
|
||||
return
|
||||
return
|
||||
}
|
||||
|
||||
const oldIps = await this.repository.find({
|
||||
@@ -86,7 +99,7 @@ export class SiteIpService extends BaseService<SiteIpEntity> {
|
||||
hasChanged = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(hasChanged){
|
||||
logger.info(`发现${domain}的IP变化,需要更新,旧IP:${oldIps.map(ip=>ip.ipAddress).join(",")},新IP:${ips.join(",")}`)
|
||||
//有变化需要更新
|
||||
@@ -213,30 +226,26 @@ export class SiteIpService extends BaseService<SiteIpEntity> {
|
||||
})
|
||||
}
|
||||
|
||||
async getAllIpsFromDomain(domain: string) {
|
||||
const getFromV4 = safePromise<string[]>((resolve, reject) => {
|
||||
dns.resolve4(domain, (err, addresses) => {
|
||||
if (err) {
|
||||
logger.error(`[${domain}] resolve4 error`, err)
|
||||
resolve([])
|
||||
return;
|
||||
}
|
||||
resolve(addresses);
|
||||
});
|
||||
});
|
||||
async getAllIpsFromDomain(domain: string,resolver:any = dns):Promise<string[]> {
|
||||
const getFromV4 = async ():Promise<string[]> => {
|
||||
try{
|
||||
return await resolver.resolve4(domain);
|
||||
}catch (err) {
|
||||
logger.error(`[${domain}] resolve4 error`, err)
|
||||
return []
|
||||
}
|
||||
}
|
||||
const getFromV6 = async ():Promise<string[]> => {
|
||||
try{
|
||||
return await resolver.resolve6(domain);
|
||||
}catch (err) {
|
||||
logger.error(`[${domain}] resolve6 error`, err)
|
||||
return []
|
||||
}
|
||||
}
|
||||
|
||||
const getFromV6 = safePromise<string[]>((resolve, reject) => {
|
||||
dns.resolve6(domain, (err, addresses) => {
|
||||
if (err) {
|
||||
logger.error("[${domain}] resolve6 error", err)
|
||||
resolve([])
|
||||
return;
|
||||
}
|
||||
resolve(addresses);
|
||||
});
|
||||
});
|
||||
|
||||
return Promise.all([getFromV4, getFromV6]).then(res => {
|
||||
return Promise.all([getFromV4(), getFromV6()]).then(res => {
|
||||
return [...res[0], ...res[1]];
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ import { logger, safePromise, utils } from "@certd/basic";
|
||||
import { merge } from "lodash-es";
|
||||
import https from "https";
|
||||
import { PeerCertificate } from "tls";
|
||||
// import { TCPClient } from "dns2";
|
||||
|
||||
export type SiteTestReq = {
|
||||
host: string; // 只用域名部分
|
||||
@@ -11,7 +10,7 @@ export type SiteTestReq = {
|
||||
retryTimes?: number;
|
||||
ipAddress?: string;
|
||||
|
||||
dnsServer?: string[];
|
||||
resolver?: any;
|
||||
};
|
||||
|
||||
export type SiteTestRes = {
|
||||
@@ -52,6 +51,7 @@ export class SiteTester {
|
||||
req
|
||||
);
|
||||
|
||||
let customLookup = null
|
||||
if (req.ipAddress) {
|
||||
//使用固定的ip
|
||||
const ipAddress = req.ipAddress;
|
||||
@@ -61,37 +61,20 @@ export class SiteTester {
|
||||
servername: options.host
|
||||
};
|
||||
options.host = ipAddress;
|
||||
}else if (req.resolver ) {
|
||||
// 非ip address 请求时
|
||||
const resolver = req.resolver
|
||||
customLookup = async (hostname:string, options:any, callback)=> {
|
||||
console.log(hostname, options);
|
||||
|
||||
// { family: undefined, hints: 0, all: true }
|
||||
const res = await resolver.resolve(hostname, options)
|
||||
console.log("custom lookup res:",res)
|
||||
callback(null, res);
|
||||
}
|
||||
}
|
||||
|
||||
// let dnsClients = [];
|
||||
// if (req.dnsServer && req.dnsServer.length > 0) {
|
||||
// for (let dns of req.dnsServer) {
|
||||
// const dnsClient = TCPClient({ dns });
|
||||
// dnsClients.push(dnsClient);
|
||||
// }
|
||||
// }
|
||||
|
||||
// async function customLookup(hostname, options, callback) {
|
||||
// for (let client of dnsClients) {
|
||||
// try {
|
||||
// const result = await client.resolve(hostname, options);
|
||||
// return callback(null, result);
|
||||
// } catch (e) {
|
||||
// this.logger.error(e);
|
||||
// }
|
||||
// }
|
||||
// try {
|
||||
// // 使用自定义DNS解析
|
||||
// const response = await dnsClients
|
||||
// const address = response.answers[0].address;
|
||||
// callback(null, address, 4);
|
||||
// } catch (err) {
|
||||
// // 解析失败时回退到系统DNS
|
||||
// require('dns').lookup(hostname, options, callback);
|
||||
// }
|
||||
// }
|
||||
|
||||
options.agent = new https.Agent({ keepAlive: false });
|
||||
options.agent = new https.Agent({ keepAlive: false, lookup: customLookup });
|
||||
|
||||
// 创建 HTTPS 请求
|
||||
const requestPromise = safePromise((resolve, reject) => {
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
import { Inject, Provide, Scope, ScopeEnum } from '@midwayjs/core';
|
||||
import { BaseService, SysInstallInfo, SysSettingsService, SysSiteInfo, ValidateException } from '@certd/lib-server';
|
||||
import {
|
||||
BaseService,
|
||||
NeedVIPException,
|
||||
SysInstallInfo,
|
||||
SysSettingsService,
|
||||
SysSiteInfo,
|
||||
ValidateException
|
||||
} from "@certd/lib-server";
|
||||
import { InjectEntityModel } from '@midwayjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
import { NotificationEntity } from '../entity/notification.js';
|
||||
import { NotificationInstanceConfig, notificationRegistry, NotificationSendReq, sendNotification } from '@certd/pipeline';
|
||||
import { http, utils } from '@certd/basic';
|
||||
import { EmailService } from '../../basic/service/email-service.js';
|
||||
import { isComm } from '@certd/plus-core';
|
||||
import { isComm, isPlus } from '@certd/plus-core';
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
@@ -46,6 +53,7 @@ export class NotificationService extends BaseService<NotificationEntity> {
|
||||
}
|
||||
|
||||
async add(bean: NotificationEntity) {
|
||||
this.checkNeedPlus(bean.type);
|
||||
const res = await super.add(bean);
|
||||
if(bean.isDefault){
|
||||
await this.setDefault(res.id, bean.userId);
|
||||
@@ -54,14 +62,28 @@ export class NotificationService extends BaseService<NotificationEntity> {
|
||||
}
|
||||
|
||||
async update(bean: NotificationEntity) {
|
||||
|
||||
const old = await this.info(bean.id);
|
||||
this.checkNeedPlus(old.type);
|
||||
|
||||
delete bean.userId;
|
||||
delete bean.type
|
||||
const res = await super.update(bean);
|
||||
if(bean.isDefault){
|
||||
const old = await this.info(bean.id);
|
||||
await this.setDefault(bean.id, old.userId);
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
checkNeedPlus(type: string){
|
||||
const define = this.getDefineByType(type)
|
||||
//@ts-ignore
|
||||
if (define.needPlus && !isPlus()) {
|
||||
throw new NeedVIPException("此通知类型为专业版功能,请升级到专业版或以上级别");
|
||||
}
|
||||
}
|
||||
|
||||
async getById(id: number, userId: number): Promise<NotificationInstanceConfig> {
|
||||
if (!id) {
|
||||
throw new ValidateException('id不能为空');
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||
import { CertApplyPluginNames, CertInfo } from "@certd/plugin-cert";
|
||||
import { CertApplyPluginNames, CertInfo, CertReader } from "@certd/plugin-cert";
|
||||
import {
|
||||
createCertDomainGetterInputDefine,
|
||||
createRemoteSelectInputDefine,
|
||||
SshAccess,
|
||||
SshClient
|
||||
} from "@certd/plugin-lib";
|
||||
import path from "node:path";
|
||||
|
||||
@IsTaskPlugin({
|
||||
//命名规范,插件类型+功能(就是目录plugin-demo中的demo),大写字母开头,驼峰命名
|
||||
@@ -75,6 +76,9 @@ export class FnOSDeployToNAS extends AbstractTaskPlugin {
|
||||
//复制证书
|
||||
const list = await this.doGetCertList()
|
||||
|
||||
const certReader = new CertReader(this.cert);
|
||||
const expiresAt = certReader.expires;
|
||||
const validFrom = certReader.detail.notBefore.getTime()
|
||||
for (const target of this.certList) {
|
||||
this.logger.info(`----------- 准备部署:${target}`);
|
||||
let found = false
|
||||
@@ -83,6 +87,7 @@ export class FnOSDeployToNAS extends AbstractTaskPlugin {
|
||||
this.logger.info(`----------- 找到证书,开始部署:${item.sum},${item.domain}`)
|
||||
const certPath = item.certificate;
|
||||
const keyPath = item.privateKey;
|
||||
const certDir = path.dirname(keyPath)
|
||||
const cmd = `
|
||||
sudo tee ${certPath} > /dev/null <<'EOF'
|
||||
${this.cert.crt}
|
||||
@@ -90,6 +95,11 @@ EOF
|
||||
sudo tee ${keyPath} > /dev/null <<'EOF'
|
||||
${this.cert.key}
|
||||
EOF
|
||||
|
||||
sudo chmod 0755 "${certDir}/" -R
|
||||
|
||||
sudo -u postgres psql -d trim_connect -c "UPDATE cert SET valid_to=${expiresAt},valid_from=${validFrom} WHERE private_key='${item.privateKey}'"
|
||||
|
||||
`
|
||||
const res = await client.exec({
|
||||
connectConf: access,
|
||||
@@ -113,9 +123,9 @@ EOF
|
||||
|
||||
const restartCmd= `
|
||||
echo "正在重启相关服务..."
|
||||
systemctl restart webdav.service
|
||||
systemctl restart smbftpd.service
|
||||
systemctl restart trim_nginx.service
|
||||
sudo systemctl restart webdav.service
|
||||
sudo systemctl restart smbftpd.service
|
||||
sudo systemctl restart trim_nginx.service
|
||||
echo "服务重启完成!"
|
||||
`
|
||||
await client.exec({
|
||||
|
||||
@@ -5,10 +5,10 @@ import { optionsUtils } from '@certd/basic/dist/utils/util.options.js';
|
||||
import { CertApplyPluginNames} from '@certd/plugin-cert';
|
||||
@IsTaskPlugin({
|
||||
name: 'QiniuDeployCertToCDN',
|
||||
title: '七牛云-部署证书至CDN',
|
||||
title: '七牛云-部署证书至CDN/DCDN',
|
||||
icon: 'svg:icon-qiniuyun',
|
||||
group: pluginGroups.qiniu.key,
|
||||
desc: '自动部署域名证书至七牛云CDN',
|
||||
desc: '自动部署域名证书至七牛云CDN、DCDN',
|
||||
default: {
|
||||
strategy: {
|
||||
runStrategy: RunStrategy.SkipWhenSucceed,
|
||||
|
||||
203
pnpm-lock.yaml
generated
203
pnpm-lock.yaml
generated
@@ -46,7 +46,7 @@ importers:
|
||||
packages/core/acme-client:
|
||||
dependencies:
|
||||
'@certd/basic':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../basic
|
||||
'@peculiar/x509':
|
||||
specifier: ^1.11.0
|
||||
@@ -207,11 +207,11 @@ importers:
|
||||
packages/core/pipeline:
|
||||
dependencies:
|
||||
'@certd/basic':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../basic
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.35.5
|
||||
version: link:../../pro/plus-core
|
||||
specifier: ^1.36.1
|
||||
version: 1.36.1
|
||||
dayjs:
|
||||
specifier: ^1.11.7
|
||||
version: 1.11.13
|
||||
@@ -415,7 +415,7 @@ importers:
|
||||
packages/libs/lib-k8s:
|
||||
dependencies:
|
||||
'@certd/basic':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../core/basic
|
||||
'@kubernetes/client-node':
|
||||
specifier: 0.21.0
|
||||
@@ -455,17 +455,17 @@ importers:
|
||||
packages/libs/lib-server:
|
||||
dependencies:
|
||||
'@certd/acme-client':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../core/acme-client
|
||||
'@certd/basic':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../core/basic
|
||||
'@certd/pipeline':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../core/pipeline
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.35.5
|
||||
version: link:../../pro/plus-core
|
||||
specifier: ^1.36.1
|
||||
version: 1.36.1
|
||||
'@midwayjs/cache':
|
||||
specifier: ~3.14.0
|
||||
version: 3.14.0
|
||||
@@ -607,16 +607,16 @@ importers:
|
||||
packages/plugins/plugin-cert:
|
||||
dependencies:
|
||||
'@certd/acme-client':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../core/acme-client
|
||||
'@certd/basic':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../core/basic
|
||||
'@certd/pipeline':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../core/pipeline
|
||||
'@certd/plugin-lib':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../plugin-lib
|
||||
'@google-cloud/publicca':
|
||||
specifier: ^1.3.0
|
||||
@@ -698,10 +698,10 @@ importers:
|
||||
specifier: ^3.787.0
|
||||
version: 3.810.0(aws-crt@1.26.2)
|
||||
'@certd/basic':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../core/basic
|
||||
'@certd/pipeline':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../core/pipeline
|
||||
'@kubernetes/client-node':
|
||||
specifier: 0.21.0
|
||||
@@ -789,19 +789,19 @@ importers:
|
||||
packages/pro/commercial-core:
|
||||
dependencies:
|
||||
'@certd/basic':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.0
|
||||
version: link:../../core/basic
|
||||
'@certd/lib-server':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.0
|
||||
version: link:../../libs/lib-server
|
||||
'@certd/pipeline':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.0
|
||||
version: link:../../core/pipeline
|
||||
'@certd/plugin-plus':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.0
|
||||
version: link:../plugin-plus
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.0
|
||||
version: link:../plus-core
|
||||
'@midwayjs/core':
|
||||
specifier: ~3.20.3
|
||||
@@ -886,22 +886,22 @@ importers:
|
||||
specifier: ^1.0.2
|
||||
version: 1.0.3
|
||||
'@certd/basic':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.0
|
||||
version: link:../../core/basic
|
||||
'@certd/lib-k8s':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.0
|
||||
version: link:../../libs/lib-k8s
|
||||
'@certd/pipeline':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.0
|
||||
version: link:../../core/pipeline
|
||||
'@certd/plugin-cert':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.0
|
||||
version: link:../../plugins/plugin-cert
|
||||
'@certd/plugin-lib':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.0
|
||||
version: link:../../plugins/plugin-lib
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.0
|
||||
version: link:../plus-core
|
||||
ali-oss:
|
||||
specifier: ^6.21.0
|
||||
@@ -1004,7 +1004,7 @@ importers:
|
||||
packages/pro/plus-core:
|
||||
dependencies:
|
||||
'@certd/basic':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.0
|
||||
version: link:../../core/basic
|
||||
dayjs:
|
||||
specifier: ^1.11.7
|
||||
@@ -1294,10 +1294,10 @@ importers:
|
||||
version: 0.1.3(zod@3.24.4)
|
||||
devDependencies:
|
||||
'@certd/lib-iframe':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../libs/lib-iframe
|
||||
'@certd/pipeline':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../core/pipeline
|
||||
'@rollup/plugin-commonjs':
|
||||
specifier: ^25.0.7
|
||||
@@ -1480,47 +1480,47 @@ importers:
|
||||
specifier: ^3.705.0
|
||||
version: 3.810.0(aws-crt@1.26.2)
|
||||
'@certd/acme-client':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../core/acme-client
|
||||
'@certd/basic':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../core/basic
|
||||
'@certd/commercial-core':
|
||||
specifier: ^1.35.5
|
||||
version: link:../../pro/commercial-core
|
||||
specifier: ^1.36.1
|
||||
version: 1.36.1(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.1
|
||||
version: 8.4.1
|
||||
'@certd/jdcloud':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../libs/lib-jdcloud
|
||||
'@certd/lib-huawei':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../libs/lib-huawei
|
||||
'@certd/lib-k8s':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../libs/lib-k8s
|
||||
'@certd/lib-server':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../libs/lib-server
|
||||
'@certd/midway-flyway-js':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../libs/midway-flyway-js
|
||||
'@certd/pipeline':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../core/pipeline
|
||||
'@certd/plugin-cert':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../plugins/plugin-cert
|
||||
'@certd/plugin-lib':
|
||||
specifier: ^1.35.5
|
||||
specifier: ^1.36.1
|
||||
version: link:../../plugins/plugin-lib
|
||||
'@certd/plugin-plus':
|
||||
specifier: ^1.35.5
|
||||
version: link:../../pro/plugin-plus
|
||||
specifier: ^1.36.1
|
||||
version: 1.36.1(encoding@0.1.13)
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.35.5
|
||||
version: link:../../pro/plus-core
|
||||
specifier: ^1.36.1
|
||||
version: 1.36.1
|
||||
'@huaweicloud/huaweicloud-sdk-cdn':
|
||||
specifier: ^3.1.120
|
||||
version: 3.1.149
|
||||
@@ -1599,9 +1599,6 @@ importers:
|
||||
dayjs:
|
||||
specifier: ^1.11.7
|
||||
version: 1.11.13
|
||||
dns2:
|
||||
specifier: ^2.1.0
|
||||
version: 2.1.0
|
||||
form-data:
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.2
|
||||
@@ -1840,6 +1837,9 @@ packages:
|
||||
'@alicloud/credentials@2.4.3':
|
||||
resolution: {integrity: sha512-r2thNtthchTz/c8/HryGSey1vY0UZx2FkAvb+vd+j7xhD/v/KUwnp8RJNQKNG3E4kfs4wSx2bgDSkcPAiXHQLQ==}
|
||||
|
||||
'@alicloud/credentials@2.4.4':
|
||||
resolution: {integrity: sha512-/eRAGSKcniLIFQ1UCpDhB/IrHUZisQ1sc65ws/c2avxUMpXwH1rWAohb76SVAUJhiF4mwvLzLJM1Mn1XL4Xe/Q==}
|
||||
|
||||
'@alicloud/darabonba-array@0.1.1':
|
||||
resolution: {integrity: sha512-UPP7p9//jywqM8EN6BjSbw1ovl/BzqreXdi5FmxT6m3PmFxsxabe+yamjeopyf2Gi0p3WqwJTBCeNji5eYUsJw==}
|
||||
|
||||
@@ -2760,9 +2760,18 @@ packages:
|
||||
'@better-scroll/zoom@2.5.1':
|
||||
resolution: {integrity: sha512-aGvFY5ooeZWS4RcxQLD+pGLpQHQxpPy0sMZV3yadcd2QK53PK9gS4Dp+BYfRv8lZ4/P2LoNEhr6Wq1DN6+uPlA==}
|
||||
|
||||
'@certd/commercial-core@1.36.1':
|
||||
resolution: {integrity: sha512-CpZ7K7s0JoXJ8MD3FyeryKnA62fvX3DKVQ7XkSSomaqgH/a8DgP4QrJGrt2ytIYtu2SzJvJsBfy14UhVM6174Q==}
|
||||
|
||||
'@certd/cv4pve-api-javascript@8.4.1':
|
||||
resolution: {integrity: sha512-jxlRieJmCA0Z9LnwX6Ra6ZekRGJEu8o8RGYoKU0Jjkhc9jm6ChEbVyfE7Iw49/hlpA+2yaHdAXb46au/afCISg==}
|
||||
|
||||
'@certd/plugin-plus@1.36.1':
|
||||
resolution: {integrity: sha512-Bd3tFwn/jDrpSWqUH9488YxFHnEIGI15NFoqQaLv58L+Ycm7mRbyTUC/S3xpiUkfhDI6wqvKL8SOtdpgo0IEzA==}
|
||||
|
||||
'@certd/plus-core@1.36.1':
|
||||
resolution: {integrity: sha512-TiRpqWCC7RGJxmVaDkSkMAFYe2zehRqZFKmNcfG8DZJTgKpQhd98HvXlyXCJD5qUtPmyvFoffTD1Q8bGqN84Vw==}
|
||||
|
||||
'@colors/colors@1.5.0':
|
||||
resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==}
|
||||
engines: {node: '>=0.1.90'}
|
||||
@@ -7138,9 +7147,6 @@ packages:
|
||||
resolution: {integrity: sha512-SIEkjrG7cZ9GWZQYk/mH+mWtcRPly/3ibVuXO/tP/MFoWz6KiRK77tSMq6YQBPl7RljPtXPQ/JhxbNuCdi1bNw==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
dns2@2.1.0:
|
||||
resolution: {integrity: sha512-m27K11aQalRbmUs7RLaz6aPyceLjAoqjPRNTdE7qUouQpl+PC8Bi67O+i9SuJUPbQC8dxFrczAxfmTPuTKHNkw==}
|
||||
|
||||
doctrine@2.1.0:
|
||||
resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
@@ -13588,6 +13594,15 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@alicloud/credentials@2.4.4':
|
||||
dependencies:
|
||||
'@alicloud/tea-typescript': 1.8.0
|
||||
httpx: 2.3.3
|
||||
ini: 1.3.8
|
||||
kitx: 2.2.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@alicloud/darabonba-array@0.1.1':
|
||||
dependencies:
|
||||
'@alicloud/tea-typescript': 1.8.0
|
||||
@@ -13639,7 +13654,7 @@ snapshots:
|
||||
|
||||
'@alicloud/gateway-pop@0.0.6':
|
||||
dependencies:
|
||||
'@alicloud/credentials': 2.4.3
|
||||
'@alicloud/credentials': 2.4.4
|
||||
'@alicloud/darabonba-array': 0.1.1
|
||||
'@alicloud/darabonba-encode-util': 0.0.2
|
||||
'@alicloud/darabonba-map': 0.0.1
|
||||
@@ -13673,7 +13688,7 @@ snapshots:
|
||||
|
||||
'@alicloud/openapi-core@1.0.4':
|
||||
dependencies:
|
||||
'@alicloud/credentials': 2.4.3
|
||||
'@alicloud/credentials': 2.4.4
|
||||
'@alicloud/gateway-pop': 0.0.6
|
||||
'@alicloud/gateway-spi': 0.0.8
|
||||
'@darabonba/typescript': 1.0.3
|
||||
@@ -15432,12 +15447,84 @@ snapshots:
|
||||
dependencies:
|
||||
'@better-scroll/core': 2.5.1
|
||||
|
||||
'@certd/commercial-core@1.36.1(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.36.1(encoding@0.1.13)
|
||||
'@certd/plus-core': 1.36.1
|
||||
'@midwayjs/core': 3.20.4
|
||||
'@midwayjs/koa': 3.20.5
|
||||
'@midwayjs/logger': 3.4.2
|
||||
'@midwayjs/typeorm': 3.20.4
|
||||
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.1':
|
||||
dependencies:
|
||||
debug: 4.4.1(supports-color@8.1.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@certd/plugin-plus@1.36.1(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.36.1
|
||||
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.37(encoding@0.1.13)
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
- proxy-agent
|
||||
- supports-color
|
||||
|
||||
'@certd/plus-core@1.36.1':
|
||||
dependencies:
|
||||
'@certd/basic': link:packages/core/basic
|
||||
dayjs: 1.11.13
|
||||
|
||||
'@colors/colors@1.5.0':
|
||||
optional: true
|
||||
|
||||
@@ -21030,8 +21117,6 @@ snapshots:
|
||||
test-value: 3.0.0
|
||||
walk-back: 5.1.1
|
||||
|
||||
dns2@2.1.0: {}
|
||||
|
||||
doctrine@2.1.0:
|
||||
dependencies:
|
||||
esutils: 2.0.3
|
||||
@@ -21514,13 +21599,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:
|
||||
@@ -24228,7 +24313,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
|
||||
|
||||
Reference in New Issue
Block a user