mirror of
https://github.com/certd/certd.git
synced 2026-04-28 07:57:25 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1368259a1e | |||
| 81a495f267 | |||
| 693a4a6633 | |||
| 82786c580a | |||
| e19743f705 | |||
| 9166a57930 |
@@ -3,6 +3,18 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复新网找错域名的bug ([bd511f9](https://github.com/certd/certd/commit/bd511f97cb7fbdcaeff7ac899f0460a5c7b41826))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 当域名管理中没有域名时,创建流水线时不展开域名选择框 ([9166a57](https://github.com/certd/certd/commit/9166a579301a60750f0b72b6a42b0c8d730695fd))
|
||||||
|
* count tip ([e19743f](https://github.com/certd/certd/commit/e19743f70553700f1f91bff76f87370f749dd247))
|
||||||
|
* oauth支持github 和google, 修复头像显示问题 ([693a4a6](https://github.com/certd/certd/commit/693a4a663385ced3176286bf4b5f3566da83d90e))
|
||||||
|
|
||||||
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
| 序号 | 名称 | 说明 |
|
| 序号 | 名称 | 说明 |
|
||||||
|-----|-----|-----|
|
|-----|-----|-----|
|
||||||
| 1.| **证书申请(JS版)** | 免费通配符域名证书申请,支持多个域名打到同一个证书上 |
|
| 1.| **证书申请(JS版)** | 免费通配符域名证书申请,支持多个域名打到同一个证书上 |
|
||||||
| 2.| **商用证书托管** | 手动上传自定义证书后,自动部署(每次证书有更新,都需要手动上传一次) |
|
| 2.| **已有证书托管** | 手动上传自定义证书后,自动部署(每次证书有更新,都需要手动上传一次) |
|
||||||
| 3.| **获取阿里云订阅证书** | 从阿里云拉取订阅模式的商用证书 |
|
| 3.| **获取阿里云订阅证书** | 从阿里云拉取订阅模式的商用证书 |
|
||||||
| 4.| **证书申请(Lego)** | 支持海量DNS解析提供商,推荐使用,一样的免费通配符域名证书申请,支持多个域名打到同一个证书上 |
|
| 4.| **证书申请(Lego)** | 支持海量DNS解析提供商,推荐使用,一样的免费通配符域名证书申请,支持多个域名打到同一个证书上 |
|
||||||
## 2. 主机
|
## 2. 主机
|
||||||
|
|||||||
+1
-1
@@ -9,5 +9,5 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"npmClient": "pnpm",
|
"npmClient": "pnpm",
|
||||||
"version": "1.38.5"
|
"version": "1.38.6"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.6](https://github.com/publishlab/node-acme-client/compare/v1.38.5...v1.38.6) (2026-02-04)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
## [1.38.5](https://github.com/publishlab/node-acme-client/compare/v1.38.4...v1.38.5) (2026-02-02)
|
## [1.38.5](https://github.com/publishlab/node-acme-client/compare/v1.38.4...v1.38.5) (2026-02-02)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"description": "Simple and unopinionated ACME client",
|
"description": "Simple and unopinionated ACME client",
|
||||||
"private": false,
|
"private": false,
|
||||||
"author": "nmorsman",
|
"author": "nmorsman",
|
||||||
"version": "1.38.5",
|
"version": "1.38.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"module": "scr/index.js",
|
"module": "scr/index.js",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"types"
|
"types"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/basic": "^1.38.5",
|
"@certd/basic": "^1.38.6",
|
||||||
"@peculiar/x509": "^1.11.0",
|
"@peculiar/x509": "^1.11.0",
|
||||||
"asn1js": "^3.0.5",
|
"asn1js": "^3.0.5",
|
||||||
"axios": "^1.9.0",
|
"axios": "^1.9.0",
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/basic
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
23:59
|
01:13
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/basic",
|
"name": "@certd/basic",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.5",
|
"version": "1.38.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/pipeline
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/pipeline",
|
"name": "@certd/pipeline",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.5",
|
"version": "1.38.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
"compile": "tsc --skipLibCheck --watch"
|
"compile": "tsc --skipLibCheck --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/basic": "^1.38.5",
|
"@certd/basic": "^1.38.6",
|
||||||
"@certd/plus-core": "^1.38.5",
|
"@certd/plus-core": "^1.38.6",
|
||||||
"dayjs": "^1.11.7",
|
"dayjs": "^1.11.7",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"reflect-metadata": "^0.1.13"
|
"reflect-metadata": "^0.1.13"
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-huawei
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-huawei",
|
"name": "@certd/lib-huawei",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.5",
|
"version": "1.38.6",
|
||||||
"main": "./dist/bundle.js",
|
"main": "./dist/bundle.js",
|
||||||
"module": "./dist/bundle.js",
|
"module": "./dist/bundle.js",
|
||||||
"types": "./dist/d/index.d.ts",
|
"types": "./dist/d/index.d.ts",
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-iframe
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-iframe",
|
"name": "@certd/lib-iframe",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.5",
|
"version": "1.38.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/jdcloud
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/jdcloud",
|
"name": "@certd/jdcloud",
|
||||||
"version": "1.38.5",
|
"version": "1.38.6",
|
||||||
"description": "jdcloud openApi sdk",
|
"description": "jdcloud openApi sdk",
|
||||||
"main": "./dist/bundle.js",
|
"main": "./dist/bundle.js",
|
||||||
"module": "./dist/bundle.js",
|
"module": "./dist/bundle.js",
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-k8s
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-k8s",
|
"name": "@certd/lib-k8s",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.5",
|
"version": "1.38.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
"pub": "npm publish"
|
"pub": "npm publish"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/basic": "^1.38.5",
|
"@certd/basic": "^1.38.6",
|
||||||
"@kubernetes/client-node": "0.21.0"
|
"@kubernetes/client-node": "0.21.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
||||||
|
|
||||||
### Performance Improvements
|
### Performance Improvements
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-server",
|
"name": "@certd/lib-server",
|
||||||
"version": "1.38.5",
|
"version": "1.38.6",
|
||||||
"description": "midway with flyway, sql upgrade way ",
|
"description": "midway with flyway, sql upgrade way ",
|
||||||
"private": false,
|
"private": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -28,11 +28,11 @@
|
|||||||
],
|
],
|
||||||
"license": "AGPL",
|
"license": "AGPL",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/acme-client": "^1.38.5",
|
"@certd/acme-client": "^1.38.6",
|
||||||
"@certd/basic": "^1.38.5",
|
"@certd/basic": "^1.38.6",
|
||||||
"@certd/pipeline": "^1.38.5",
|
"@certd/pipeline": "^1.38.6",
|
||||||
"@certd/plugin-lib": "^1.38.5",
|
"@certd/plugin-lib": "^1.38.6",
|
||||||
"@certd/plus-core": "^1.38.5",
|
"@certd/plus-core": "^1.38.6",
|
||||||
"@midwayjs/cache": "3.14.0",
|
"@midwayjs/cache": "3.14.0",
|
||||||
"@midwayjs/core": "3.20.11",
|
"@midwayjs/core": "3.20.11",
|
||||||
"@midwayjs/i18n": "3.20.13",
|
"@midwayjs/i18n": "3.20.13",
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/midway-flyway-js",
|
"name": "@certd/midway-flyway-js",
|
||||||
"version": "1.38.5",
|
"version": "1.38.6",
|
||||||
"description": "midway with flyway, sql upgrade way ",
|
"description": "midway with flyway, sql upgrade way ",
|
||||||
"private": false,
|
"private": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|
||||||
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/plugin-cert
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/plugin-cert",
|
"name": "@certd/plugin-cert",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.5",
|
"version": "1.38.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
@@ -17,10 +17,10 @@
|
|||||||
"compile": "tsc --skipLibCheck --watch"
|
"compile": "tsc --skipLibCheck --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/acme-client": "^1.38.5",
|
"@certd/acme-client": "^1.38.6",
|
||||||
"@certd/basic": "^1.38.5",
|
"@certd/basic": "^1.38.6",
|
||||||
"@certd/pipeline": "^1.38.5",
|
"@certd/pipeline": "^1.38.6",
|
||||||
"@certd/plugin-lib": "^1.38.5",
|
"@certd/plugin-lib": "^1.38.6",
|
||||||
"psl": "^1.9.0",
|
"psl": "^1.9.0",
|
||||||
"punycode.js": "^2.3.1"
|
"punycode.js": "^2.3.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|
||||||
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/plugin-lib
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/plugin-lib",
|
"name": "@certd/plugin-lib",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.38.5",
|
"version": "1.38.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
@@ -22,10 +22,10 @@
|
|||||||
"@alicloud/pop-core": "^1.7.10",
|
"@alicloud/pop-core": "^1.7.10",
|
||||||
"@alicloud/tea-util": "^1.4.11",
|
"@alicloud/tea-util": "^1.4.11",
|
||||||
"@aws-sdk/client-s3": "^3.964.0",
|
"@aws-sdk/client-s3": "^3.964.0",
|
||||||
"@certd/acme-client": "^1.38.5",
|
"@certd/acme-client": "^1.38.6",
|
||||||
"@certd/basic": "^1.38.5",
|
"@certd/basic": "^1.38.6",
|
||||||
"@certd/pipeline": "^1.38.5",
|
"@certd/pipeline": "^1.38.6",
|
||||||
"@certd/plus-core": "^1.38.5",
|
"@certd/plus-core": "^1.38.6",
|
||||||
"@kubernetes/client-node": "0.21.0",
|
"@kubernetes/client-node": "0.21.0",
|
||||||
"ali-oss": "^6.22.0",
|
"ali-oss": "^6.22.0",
|
||||||
"basic-ftp": "^5.0.5",
|
"basic-ftp": "^5.0.5",
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 当域名管理中没有域名时,创建流水线时不展开域名选择框 ([9166a57](https://github.com/certd/certd/commit/9166a579301a60750f0b72b6a42b0c8d730695fd))
|
||||||
|
* count tip ([e19743f](https://github.com/certd/certd/commit/e19743f70553700f1f91bff76f87370f749dd247))
|
||||||
|
* oauth支持github 和google, 修复头像显示问题 ([693a4a6](https://github.com/certd/certd/commit/693a4a663385ced3176286bf4b5f3566da83d90e))
|
||||||
|
|
||||||
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/ui-client",
|
"name": "@certd/ui-client",
|
||||||
"version": "1.38.5",
|
"version": "1.38.6",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --open",
|
"dev": "vite --open",
|
||||||
@@ -106,8 +106,8 @@
|
|||||||
"zod-defaults": "^0.1.3"
|
"zod-defaults": "^0.1.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@certd/lib-iframe": "^1.38.5",
|
"@certd/lib-iframe": "^1.38.6",
|
||||||
"@certd/pipeline": "^1.38.5",
|
"@certd/pipeline": "^1.38.6",
|
||||||
"@rollup/plugin-commonjs": "^25.0.7",
|
"@rollup/plugin-commonjs": "^25.0.7",
|
||||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||||
"@types/chai": "^4.3.12",
|
"@types/chai": "^4.3.12",
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
:options="optionsRef"
|
:options="optionsRef"
|
||||||
:value="value"
|
:value="value"
|
||||||
v-bind="attrs"
|
v-bind="attrs"
|
||||||
|
:open="openProp"
|
||||||
@click="onClick"
|
@click="onClick"
|
||||||
@update:value="emit('update:value', $event)"
|
@update:value="emit('update:value', $event)"
|
||||||
>
|
>
|
||||||
@@ -56,11 +57,11 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, defineComponent, ref, Ref, useAttrs } from "vue";
|
import { computed, defineComponent, ref, Ref, useAttrs } from "vue";
|
||||||
import { request } from "/@/api/service";
|
|
||||||
import { Dicts } from "../lib/dicts";
|
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useDomainImport, useDomainImportManage } from "/@/views/certd/cert/domain/use";
|
import { Dicts } from "../lib/dicts";
|
||||||
|
import { request } from "/@/api/service";
|
||||||
import { openRouteInNewWindow } from "/@/vben/utils";
|
import { openRouteInNewWindow } from "/@/vben/utils";
|
||||||
|
import { useDomainImportManage } from "/@/views/certd/cert/domain/use";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "DomainSelector",
|
name: "DomainSelector",
|
||||||
@@ -82,6 +83,7 @@ const props = defineProps<{
|
|||||||
search?: boolean;
|
search?: boolean;
|
||||||
pager?: boolean;
|
pager?: boolean;
|
||||||
value?: any[];
|
value?: any[];
|
||||||
|
open?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
@@ -90,6 +92,15 @@ const emit = defineEmits<{
|
|||||||
|
|
||||||
const attrs = useAttrs();
|
const attrs = useAttrs();
|
||||||
|
|
||||||
|
const hasOptions: Ref = ref(null);
|
||||||
|
|
||||||
|
const openProp = computed(() => {
|
||||||
|
if (hasOptions.value == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return hasOptions.value;
|
||||||
|
});
|
||||||
|
|
||||||
const searchKeyRef = ref("");
|
const searchKeyRef = ref("");
|
||||||
const optionsRef = ref([]);
|
const optionsRef = ref([]);
|
||||||
const message = ref("");
|
const message = ref("");
|
||||||
@@ -143,6 +154,13 @@ const getOptions = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
optionsRef.value = options;
|
optionsRef.value = options;
|
||||||
|
if (hasOptions.value == null) {
|
||||||
|
if (options.length > 0) {
|
||||||
|
hasOptions.value = true;
|
||||||
|
} else {
|
||||||
|
hasOptions.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
pagerRef.value.total = list.length;
|
pagerRef.value.total = list.length;
|
||||||
if (props.pager) {
|
if (props.pager) {
|
||||||
if (res.total != null) {
|
if (res.total != null) {
|
||||||
|
|||||||
@@ -8,9 +8,20 @@
|
|||||||
<div class="flex flex-col order-count-text weight-bold">
|
<div class="flex flex-col order-count-text weight-bold">
|
||||||
<div class="count-text ml-4 flex items-center">
|
<div class="count-text ml-4 flex items-center">
|
||||||
<fs-icon icon="noto:fire" class="fs-20 mr-2"></fs-icon>
|
<fs-icon icon="noto:fire" class="fs-20 mr-2"></fs-icon>
|
||||||
<span> 今日赞助 </span>
|
<template v-if="stage.vipTotal > 0">
|
||||||
<span class="count-number color-red font-bold text-2xl ml-1 mr-1"> {{ stage.orderCount }} </span>人,
|
<span> 已有 </span>
|
||||||
<span> {{ stage.title }} </span>
|
<span class="count-number color-red font-bold text-2xl ml-1 mr-1"> {{ stage.vipTotal }} </span> 位小伙伴赞助,
|
||||||
|
<span>
|
||||||
|
{{ stage.title }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<span> 今日赞助 </span>
|
||||||
|
<span class="count-number color-red font-bold text-2xl ml-1 mr-1"> {{ stage.orderCount }} </span> 人,
|
||||||
|
<span>
|
||||||
|
{{ stage.title }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -109,14 +120,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, nextTick, onMounted, reactive, Ref, ref } from "vue";
|
|
||||||
import { message, Modal } from "ant-design-vue";
|
import { message, Modal } from "ant-design-vue";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
import { computed, nextTick, onMounted, onUnmounted, reactive, Ref, ref } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useSettingStore } from "/@/store/settings";
|
|
||||||
import * as api from "./api";
|
import * as api from "./api";
|
||||||
import { utils } from "/@/utils";
|
import { useSettingStore } from "/@/store/settings";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -230,12 +240,13 @@ const vipTypeDefine: any = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const TodayVipOrderCountRef: Ref = ref({});
|
const TodayVipOrderCountRef: Ref = ref({ enabled: false, current: 0, stages: [] });
|
||||||
|
|
||||||
async function getTodayVipOrderCount() {
|
async function getTodayVipOrderCount() {
|
||||||
const res = await api.getTodayVipOrderCount();
|
const res = await api.getTodayVipOrderCount();
|
||||||
if (res) {
|
if (res) {
|
||||||
TodayVipOrderCountRef.value = res;
|
TodayVipOrderCountRef.value = res;
|
||||||
|
TodayVipOrderCountRef.value.current = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,31 +259,50 @@ const todayOrderCount = computed(() => {
|
|||||||
}
|
}
|
||||||
const lastStage = countInfo?.stages?.[countInfo?.stages?.length - 1] || {};
|
const lastStage = countInfo?.stages?.[countInfo?.stages?.length - 1] || {};
|
||||||
lastStage.orderCount = orderCount;
|
lastStage.orderCount = orderCount;
|
||||||
|
|
||||||
|
const stages: any = [];
|
||||||
|
stages.push({
|
||||||
|
title: countInfo.title,
|
||||||
|
vipTotal: countInfo?.vipTotal || 0,
|
||||||
|
orderCount: orderCount,
|
||||||
|
bg: lastStage.bg,
|
||||||
|
});
|
||||||
|
if (lastStage.orderCount > 0) {
|
||||||
|
stages.push(lastStage);
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
enabled: enabled,
|
enabled: enabled,
|
||||||
orderCount: orderCount,
|
stages: stages,
|
||||||
title: lastStage.title || "",
|
|
||||||
stages: countInfo?.stages,
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
async function scrollOrderCount() {
|
async function scrollOrderCount() {
|
||||||
const stages = todayOrderCount.value.stages;
|
const stages = todayOrderCount.value.stages;
|
||||||
if (!stages.length) {
|
if (stages.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let index = 0;
|
let index = 0;
|
||||||
for (const stage of stages) {
|
const doScroll = () => {
|
||||||
TodayVipOrderCountRef.value.current = index;
|
TodayVipOrderCountRef.value.current = index;
|
||||||
await utils.sleep(500);
|
|
||||||
index++;
|
index++;
|
||||||
}
|
if (index >= stages.length) {
|
||||||
|
index = 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
doScroll();
|
||||||
|
scrollOrderCountIntervalRef.value = setInterval(doScroll, 7000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const scrollOrderCountIntervalRef: Ref = ref(null);
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getTodayVipOrderCount();
|
await getTodayVipOrderCount();
|
||||||
|
await nextTick();
|
||||||
await scrollOrderCount();
|
await scrollOrderCount();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
clearInterval(scrollOrderCountIntervalRef.value);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
|||||||
@@ -35,7 +35,13 @@ const menus = computed(() => [
|
|||||||
|
|
||||||
const avatar = computed(() => {
|
const avatar = computed(() => {
|
||||||
const avt = userStore.getUserInfo?.avatar;
|
const avt = userStore.getUserInfo?.avatar;
|
||||||
return avt ? `/api/basic/file/download?key=${avt}` : "";
|
if (!avt) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
if (avt.startsWith("http")) {
|
||||||
|
return avt;
|
||||||
|
}
|
||||||
|
return `/api/basic/file/download?key=${avt}`;
|
||||||
});
|
});
|
||||||
|
|
||||||
async function handleLogout() {
|
async function handleLogout() {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<a-descriptions-item :label="t('authentication.username')">{{ userInfo.username }}</a-descriptions-item>
|
<a-descriptions-item :label="t('authentication.username')">{{ userInfo.username }}</a-descriptions-item>
|
||||||
<a-descriptions-item :label="t('authentication.nickName')">{{ userInfo.nickName }}</a-descriptions-item>
|
<a-descriptions-item :label="t('authentication.nickName')">{{ userInfo.nickName }}</a-descriptions-item>
|
||||||
<a-descriptions-item :label="t('authentication.avatar')">
|
<a-descriptions-item :label="t('authentication.avatar')">
|
||||||
<a-avatar v-if="userInfo.avatar" size="large" :src="'api/basic/file/download?&key=' + userInfo.avatar" style="background-color: #eee"> </a-avatar>
|
<a-avatar v-if="userInfo.avatar" size="large" :src="userAvatar" style="background-color: #eee"> </a-avatar>
|
||||||
<a-avatar v-else size="large" style="background-color: #00b4f5">
|
<a-avatar v-else size="large" style="background-color: #00b4f5">
|
||||||
{{ userInfo.username }}
|
{{ userInfo.username }}
|
||||||
</a-avatar>
|
</a-avatar>
|
||||||
@@ -108,6 +108,17 @@ async function bind(type: string) {
|
|||||||
window.location.href = loginUrl;
|
window.location.href = loginUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const userAvatar = computed(() => {
|
||||||
|
if (isEmpty(userInfo.value.avatar)) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
if (userInfo.value.avatar.startsWith("http")) {
|
||||||
|
return userInfo.value.avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "api/basic/file/download?&key=" + userInfo.value.avatar;
|
||||||
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getUserInfo();
|
await getUserInfo();
|
||||||
await loadOauthBounds();
|
await loadOauthBounds();
|
||||||
|
|||||||
@@ -3,6 +3,16 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.38.6](https://github.com/certd/certd/compare/v1.38.5...v1.38.6) (2026-02-04)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复新网找错域名的bug ([bd511f9](https://github.com/certd/certd/commit/bd511f97cb7fbdcaeff7ac899f0460a5c7b41826))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* oauth支持github 和google, 修复头像显示问题 ([693a4a6](https://github.com/certd/certd/commit/693a4a663385ced3176286bf4b5f3566da83d90e))
|
||||||
|
|
||||||
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -22,7 +22,9 @@ input:
|
|||||||
component:
|
component:
|
||||||
name: api-test
|
name: api-test
|
||||||
action: TestRequest
|
action: TestRequest
|
||||||
helper: 点击测试接口是否正常
|
helper: |-
|
||||||
|
测试前请务必先在新网后台关闭异地登录保护、关闭动态口令验证
|
||||||
|
如果提示需要短信验证码,请等几个小时后再试
|
||||||
pluginType: access
|
pluginType: access
|
||||||
type: builtIn
|
type: builtIn
|
||||||
scriptFilePath: /plugins/plugin-xinnet/access.js
|
scriptFilePath: /plugins/plugin-xinnet/access.js
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
addonType: oauth
|
||||||
|
name: github
|
||||||
|
title: GitHub认证
|
||||||
|
desc: GitHub OAuth2登录
|
||||||
|
icon: simple-icons:github
|
||||||
|
showTest: false
|
||||||
|
input:
|
||||||
|
clientId:
|
||||||
|
title: ClientId
|
||||||
|
helper: '[GitHub Developer Settings](https://github.com/settings/developers)创建应用后获取'
|
||||||
|
required: true
|
||||||
|
clientSecretKey:
|
||||||
|
title: ClientSecretKey
|
||||||
|
component:
|
||||||
|
placeholder: ClientSecretKey / appSecretKey
|
||||||
|
required: true
|
||||||
|
pluginType: addon
|
||||||
|
type: builtIn
|
||||||
|
scriptFilePath: /plugins/plugin-oauth/oauth2/plugin-github.js
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
addonType: oauth
|
||||||
|
name: google
|
||||||
|
title: Google认证
|
||||||
|
desc: Google OAuth2登录
|
||||||
|
icon: simple-icons:google
|
||||||
|
showTest: false
|
||||||
|
input:
|
||||||
|
clientId:
|
||||||
|
title: ClientId
|
||||||
|
helper: >-
|
||||||
|
[Google Cloud
|
||||||
|
Console](https://console.cloud.google.com/apis/credentials)创建应用后获取
|
||||||
|
required: true
|
||||||
|
clientSecretKey:
|
||||||
|
title: ClientSecretKey
|
||||||
|
component:
|
||||||
|
placeholder: ClientSecretKey / appSecretKey
|
||||||
|
required: true
|
||||||
|
pluginType: addon
|
||||||
|
type: builtIn
|
||||||
|
scriptFilePath: /plugins/plugin-oauth/oauth2/plugin-google.js
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/ui-server",
|
"name": "@certd/ui-server",
|
||||||
"version": "1.38.5",
|
"version": "1.38.6",
|
||||||
"description": "fast-server base midway",
|
"description": "fast-server base midway",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -48,20 +48,20 @@
|
|||||||
"@aws-sdk/client-iam": "^3.964.0",
|
"@aws-sdk/client-iam": "^3.964.0",
|
||||||
"@aws-sdk/client-route-53": "^3.964.0",
|
"@aws-sdk/client-route-53": "^3.964.0",
|
||||||
"@aws-sdk/client-s3": "^3.964.0",
|
"@aws-sdk/client-s3": "^3.964.0",
|
||||||
"@certd/acme-client": "^1.38.5",
|
"@certd/acme-client": "^1.38.6",
|
||||||
"@certd/basic": "^1.38.5",
|
"@certd/basic": "^1.38.6",
|
||||||
"@certd/commercial-core": "^1.38.5",
|
"@certd/commercial-core": "^1.38.6",
|
||||||
"@certd/cv4pve-api-javascript": "^8.4.2",
|
"@certd/cv4pve-api-javascript": "^8.4.2",
|
||||||
"@certd/jdcloud": "^1.38.5",
|
"@certd/jdcloud": "^1.38.6",
|
||||||
"@certd/lib-huawei": "^1.38.5",
|
"@certd/lib-huawei": "^1.38.6",
|
||||||
"@certd/lib-k8s": "^1.38.5",
|
"@certd/lib-k8s": "^1.38.6",
|
||||||
"@certd/lib-server": "^1.38.5",
|
"@certd/lib-server": "^1.38.6",
|
||||||
"@certd/midway-flyway-js": "^1.38.5",
|
"@certd/midway-flyway-js": "^1.38.6",
|
||||||
"@certd/pipeline": "^1.38.5",
|
"@certd/pipeline": "^1.38.6",
|
||||||
"@certd/plugin-cert": "^1.38.5",
|
"@certd/plugin-cert": "^1.38.6",
|
||||||
"@certd/plugin-lib": "^1.38.5",
|
"@certd/plugin-lib": "^1.38.6",
|
||||||
"@certd/plugin-plus": "^1.38.5",
|
"@certd/plugin-plus": "^1.38.6",
|
||||||
"@certd/plus-core": "^1.38.5",
|
"@certd/plus-core": "^1.38.6",
|
||||||
"@google-cloud/publicca": "^1.3.0",
|
"@google-cloud/publicca": "^1.3.0",
|
||||||
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.185",
|
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.185",
|
||||||
"@huaweicloud/huaweicloud-sdk-core": "^3.1.185",
|
"@huaweicloud/huaweicloud-sdk-core": "^3.1.185",
|
||||||
|
|||||||
@@ -84,5 +84,9 @@ export function startProxyServer(opts:{port:number}) {
|
|||||||
logger.info(`[proxy] 正向代理服务器运行在 http://0.0.0.0:${port}`);
|
logger.info(`[proxy] 正向代理服务器运行在 http://0.0.0.0:${port}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
proxyServer.close(() => {
|
||||||
|
logger.info('[proxy] 正向代理服务器已关闭');
|
||||||
|
});
|
||||||
|
|
||||||
return proxyServer
|
return proxyServer
|
||||||
}
|
}
|
||||||
@@ -2,4 +2,6 @@ export * from './api.js'
|
|||||||
export * from './oidc/plugin-oidc.js'
|
export * from './oidc/plugin-oidc.js'
|
||||||
export * from './wx/plugin-wx.js'
|
export * from './wx/plugin-wx.js'
|
||||||
export * from './oauth2/plugin-gitee.js'
|
export * from './oauth2/plugin-gitee.js'
|
||||||
export * from './oauth2/plugin-clogin.js'
|
export * from './oauth2/plugin-clogin.js'
|
||||||
|
export * from './oauth2/plugin-github.js'
|
||||||
|
export * from './oauth2/plugin-google.js'
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
import { AddonInput, BaseAddon, IsAddon } from "@certd/lib-server";
|
||||||
|
import { BuildLoginUrlReq, BuildLogoutUrlReq, IOauthProvider, OnCallbackReq } from "../api.js";
|
||||||
|
|
||||||
|
@IsAddon({
|
||||||
|
addonType: "oauth",
|
||||||
|
name: 'github',
|
||||||
|
title: 'GitHub认证',
|
||||||
|
desc: 'GitHub OAuth2登录',
|
||||||
|
icon:"simple-icons:github",
|
||||||
|
showTest: false,
|
||||||
|
})
|
||||||
|
export class GithubOauthProvider extends BaseAddon implements IOauthProvider {
|
||||||
|
|
||||||
|
@AddonInput({
|
||||||
|
title: "ClientId",
|
||||||
|
helper: "[GitHub Developer Settings](https://github.com/settings/developers)创建应用后获取",
|
||||||
|
required: true,
|
||||||
|
})
|
||||||
|
clientId = "";
|
||||||
|
|
||||||
|
@AddonInput({
|
||||||
|
title: "ClientSecretKey",
|
||||||
|
component: {
|
||||||
|
placeholder: "ClientSecretKey / appSecretKey",
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
})
|
||||||
|
clientSecretKey = "";
|
||||||
|
|
||||||
|
async buildLoginUrl(params: BuildLoginUrlReq) {
|
||||||
|
|
||||||
|
let scope = "user:email" // Scope of the access request
|
||||||
|
let state:any = {
|
||||||
|
forType: params.forType || 'login',
|
||||||
|
}
|
||||||
|
state = this.ctx.utils.hash.base64(JSON.stringify(state))
|
||||||
|
|
||||||
|
const authorizeEndpoint = "https://github.com/login/oauth/authorize"
|
||||||
|
const redirectUrl = encodeURIComponent(params.redirectUri)
|
||||||
|
const loginUrl = `${authorizeEndpoint}?client_id=${this.clientId}&redirect_uri=${redirectUrl}&response_type=code&scope=${scope}&state=${state}`
|
||||||
|
return {
|
||||||
|
loginUrl,
|
||||||
|
ticketValue: {
|
||||||
|
state,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
async onCallback(req: OnCallbackReq) {
|
||||||
|
|
||||||
|
const code = req.code || ""
|
||||||
|
|
||||||
|
const tokenEndpoint = "https://github.com/login/oauth/access_token"
|
||||||
|
|
||||||
|
const uri = new URL(req.currentURL)
|
||||||
|
const redirectUri = `${uri.origin}${uri.pathname}`
|
||||||
|
const res = await this.ctx.utils.http.request( {
|
||||||
|
url: tokenEndpoint,
|
||||||
|
method: "post",
|
||||||
|
headers: {
|
||||||
|
"Accept": "application/json"
|
||||||
|
},
|
||||||
|
data:{
|
||||||
|
client_id: this.clientId,
|
||||||
|
client_secret: this.clientSecretKey,
|
||||||
|
code,
|
||||||
|
redirect_uri: redirectUri
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const tokens = res
|
||||||
|
|
||||||
|
const userInfoEndpoint = "https://api.github.com/user"
|
||||||
|
|
||||||
|
// 获取用户信息
|
||||||
|
const userInfoRes = await this.ctx.utils.http.request( {
|
||||||
|
url: userInfoEndpoint,
|
||||||
|
method: "get",
|
||||||
|
headers: {
|
||||||
|
"Authorization": `Bearer ${tokens.access_token}`,
|
||||||
|
"Accept": "application/json"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const userInfo = userInfoRes
|
||||||
|
|
||||||
|
return {
|
||||||
|
token:{
|
||||||
|
accessToken: tokens.access_token,
|
||||||
|
refreshToken: tokens.refresh_token,
|
||||||
|
expiresIn: tokens.expires_in,
|
||||||
|
},
|
||||||
|
userInfo: {
|
||||||
|
openId: userInfo.id,
|
||||||
|
nickName: userInfo.login || userInfo.name || "",
|
||||||
|
avatar: userInfo.avatar_url,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
async buildLogoutUrl(params: BuildLogoutUrlReq) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
import { AddonInput, BaseAddon, IsAddon } from "@certd/lib-server";
|
||||||
|
import { BuildLoginUrlReq, BuildLogoutUrlReq, IOauthProvider, OnCallbackReq } from "../api.js";
|
||||||
|
|
||||||
|
@IsAddon({
|
||||||
|
addonType: "oauth",
|
||||||
|
name: 'google',
|
||||||
|
title: 'Google认证',
|
||||||
|
desc: 'Google OAuth2登录',
|
||||||
|
icon:"simple-icons:google",
|
||||||
|
showTest: false,
|
||||||
|
})
|
||||||
|
export class GoogleOauthProvider extends BaseAddon implements IOauthProvider {
|
||||||
|
|
||||||
|
@AddonInput({
|
||||||
|
title: "ClientId",
|
||||||
|
helper: "[Google Cloud Console](https://console.cloud.google.com/apis/credentials)创建应用后获取",
|
||||||
|
required: true,
|
||||||
|
})
|
||||||
|
clientId = "";
|
||||||
|
|
||||||
|
@AddonInput({
|
||||||
|
title: "ClientSecretKey",
|
||||||
|
component: {
|
||||||
|
placeholder: "ClientSecretKey / appSecretKey",
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
})
|
||||||
|
clientSecretKey = "";
|
||||||
|
|
||||||
|
async buildLoginUrl(params: BuildLoginUrlReq) {
|
||||||
|
|
||||||
|
let scope = "email profile" // Scope of the access request
|
||||||
|
let state:any = {
|
||||||
|
forType: params.forType || 'login',
|
||||||
|
}
|
||||||
|
state = this.ctx.utils.hash.base64(JSON.stringify(state))
|
||||||
|
|
||||||
|
const authorizeEndpoint = "https://accounts.google.com/o/oauth2/auth"
|
||||||
|
const redirectUrl = encodeURIComponent(params.redirectUri)
|
||||||
|
const loginUrl = `${authorizeEndpoint}?client_id=${this.clientId}&redirect_uri=${redirectUrl}&response_type=code&scope=${scope}&state=${state}`
|
||||||
|
return {
|
||||||
|
loginUrl,
|
||||||
|
ticketValue: {
|
||||||
|
state,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
async onCallback(req: OnCallbackReq) {
|
||||||
|
|
||||||
|
const code = req.code || ""
|
||||||
|
|
||||||
|
const tokenEndpoint = "https://oauth2.googleapis.com/token"
|
||||||
|
|
||||||
|
const uri = new URL(req.currentURL)
|
||||||
|
const redirectUri = `${uri.origin}${uri.pathname}`
|
||||||
|
const res = await this.ctx.utils.http.request( {
|
||||||
|
url: tokenEndpoint,
|
||||||
|
method: "post",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded"
|
||||||
|
},
|
||||||
|
data:{
|
||||||
|
client_id: this.clientId,
|
||||||
|
client_secret: this.clientSecretKey,
|
||||||
|
code,
|
||||||
|
redirect_uri: redirectUri,
|
||||||
|
grant_type: "authorization_code"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const tokens = res
|
||||||
|
|
||||||
|
const userInfoEndpoint = "https://www.googleapis.com/oauth2/v3/userinfo"
|
||||||
|
|
||||||
|
// 获取用户信息
|
||||||
|
const userInfoRes = await this.ctx.utils.http.request( {
|
||||||
|
url: userInfoEndpoint,
|
||||||
|
method: "get",
|
||||||
|
headers: {
|
||||||
|
"Authorization": `Bearer ${tokens.access_token}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const userInfo = userInfoRes
|
||||||
|
|
||||||
|
return {
|
||||||
|
token:{
|
||||||
|
accessToken: tokens.access_token,
|
||||||
|
refreshToken: tokens.refresh_token,
|
||||||
|
expiresIn: tokens.expires_in,
|
||||||
|
},
|
||||||
|
userInfo: {
|
||||||
|
openId: userInfo.sub,
|
||||||
|
nickName: userInfo.name || userInfo.email || "",
|
||||||
|
avatar: userInfo.picture,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
async buildLogoutUrl(params: BuildLogoutUrlReq) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user