mirror of
https://github.com/certd/certd.git
synced 2026-04-05 07:20:56 +08:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
590ff67fcb | ||
|
|
209e1adf53 | ||
|
|
53c08484a3 | ||
|
|
c6ca832737 | ||
|
|
853fdc70a2 | ||
|
|
dc4f811eaa | ||
|
|
d23c8b4a2a | ||
|
|
00c0dcc81d | ||
|
|
f77feefdb8 | ||
|
|
2e346e5369 | ||
|
|
17023f6b55 |
2
.github/workflows/deploy-demo.yml
vendored
2
.github/workflows/deploy-demo.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
||||
with:
|
||||
time: '10' # for 60 seconds
|
||||
- name: deploy-certd-demo
|
||||
uses: tyrrrz/action-http-request@master
|
||||
uses: tyrrrz/action-http-request@prime
|
||||
with:
|
||||
# 通过webhook 触发 certd-demo来部署
|
||||
url: ${{ secrets.WEBHOOK_CERTD_DEMO }}
|
||||
|
||||
2
.github/workflows/release-image.yml
vendored
2
.github/workflows/release-image.yml
vendored
@@ -118,7 +118,7 @@ jobs:
|
||||
# greper/certd-agent:latest
|
||||
# greper/certd-agent:${{steps.get_certd_version.outputs.result}}
|
||||
- name: deploy-certd-doc
|
||||
uses: tyrrrz/action-http-request@master
|
||||
uses: tyrrrz/action-http-request@prime
|
||||
with:
|
||||
url: ${{ secrets.WEBHOOK_CERTD_DOC }}
|
||||
method: POST
|
||||
|
||||
11
CHANGELOG.md
11
CHANGELOG.md
@@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复企业管理模式下,切换用户登录后,丢失项目列表的bug ([d23c8b4](https://github.com/certd/certd/commit/d23c8b4a2a5f5ab17822c6ee1d4108ac7280b9d1))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 支持迁移个人数据到企业项目中 ([c6ca832](https://github.com/certd/certd/commit/c6ca83273779ed84de1b23b5e477063af043d015))
|
||||
* install tip ([853fdc7](https://github.com/certd/certd/commit/853fdc70a263b62d75c9ff3970607e6bf1c1593b))
|
||||
|
||||
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -3,6 +3,34 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复部署到openwrt错误的bug ([2e3d0cc](https://github.com/certd/certd/commit/2e3d0cc57c16c48ad435bc8fde729bacaedde9f5))
|
||||
* 修复发件邮箱无法输入的bug ([27b0348](https://github.com/certd/certd/commit/27b0348e1d3d752f418f851965d6afbc26c0160c))
|
||||
* 修复复制流水线保存后丢失分组和排序号的问题 ([bc32648](https://github.com/certd/certd/commit/bc326489abc1d50a0930b4f47aa2d62d3a486798))
|
||||
* 修复获取群辉deviceid报错的bug ([79be392](https://github.com/certd/certd/commit/79be392775a2c91848dd5a66a2618adc4e4b48f6))
|
||||
* 修复京东云域名申请证书报错的bug ([d9c0130](https://github.com/certd/certd/commit/d9c0130b59997144a3c274d456635b800135e43f))
|
||||
* 修复偶尔下载证书报未授权的错误 ([316537e](https://github.com/certd/certd/commit/316537eb4dcbe5ec57784e8bf95ee3cdfd21dce7))
|
||||
* 修复dcdn多个域名同时部署时 可能会出现证书名称重复的bug ([78c2ced](https://github.com/certd/certd/commit/78c2ced43b1a73d142b0ed783b162b97f545ab06))
|
||||
* 优化dcdn部署上传多次证书 偶尔报 The CertName already exists的问题 ([72f850f](https://github.com/certd/certd/commit/72f850f675b500d12ebff2338d1b99d6fab476e1))
|
||||
* **cert-plugin:** 优化又拍云客户端错误处理逻辑,当域名已绑定证书时不再抛出异常。 ([92c9ac3](https://github.com/certd/certd/commit/92c9ac382692e6c84140ff787759ab6d39ccbe96))
|
||||
* esxi部署失败的bug ([1e44115](https://github.com/certd/certd/commit/1e441154617e6516a9a3610412bf597128c62696))
|
||||
|
||||
### Features
|
||||
|
||||
* 支持企业级管理模式,项目管理,细分权限 ([3734083](https://github.com/certd/certd/commit/37340838b6a61a94b86bfa13cf5da88b26f1315a))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 【破坏性更新】错误返回信息msg字段名统一改成message,与成功的返回结构一致 ([51ab6d6](https://github.com/certd/certd/commit/51ab6d6da1bb551b55b3a6a4a9a945c8d6ace806))
|
||||
* 当域名管理中没有域名时,创建流水线时不展开域名选择框 ([bb0afe1](https://github.com/certd/certd/commit/bb0afe1fa7b0fc52fde051d24fbe6be69d52f4cc))
|
||||
* 任务步骤页面增加串行执行提示说明 ([787f6ef](https://github.com/certd/certd/commit/787f6ef52893d8dc912ee2a7a5b8ce2b73c108c9))
|
||||
* 站点监控支持指定ip地址检查 ([83d81b6](https://github.com/certd/certd/commit/83d81b64b3adb375366039e07c87d1ad79121c13))
|
||||
* AI开发插件 skills 定义初步 ([1f68fad](https://github.com/certd/certd/commit/1f68faddb97a978c5a5e731a8895b4bb0587ad83))
|
||||
* http请求增加建立连接超时配置 ([3c85602](https://github.com/certd/certd/commit/3c85602ab1fc1953cdc06a6cd75a971d14119179))
|
||||
|
||||
## [1.38.12](https://github.com/certd/certd/compare/v1.38.11...v1.38.12) (2026-02-18)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -16,7 +16,6 @@ https://1panel.cn/docs/installation/online_installation/
|
||||
|
||||

|
||||
|
||||
|
||||

|
||||
|
||||
#### 1.2 访问测试:
|
||||
@@ -40,6 +39,9 @@ admin/123456
|
||||
1. 打开`docker-compose.yaml`,整个内容复制下来
|
||||
https://gitee.com/certd/certd/raw/v2/docker/run/docker-compose.yaml
|
||||
|
||||
::: tip
|
||||
默认使用SQLite数据库,如果需要使用MySQL、PostgreSQL数据库,请参考[多数据库支持](./install/database.md)
|
||||
:::
|
||||
|
||||
2. 然后到 `1Panel->容器->编排->新建编排`
|
||||
输入名称,粘贴`docker-compose.yaml`原文内容
|
||||
@@ -49,7 +51,10 @@ admin/123456
|
||||

|
||||
|
||||
> 默认使用sqlite数据库,数据保存在`/data/certd`目录下,您可以手动备份该目录
|
||||
> certd还支持`mysql`和`postgresql`数据库,[点我了解如何切换其他数据库](../database)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#### 2.2 访问测试
|
||||
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
点击确定,等待启动完成
|
||||

|
||||
|
||||
> certd默认使用sqlite数据库,另外支持`mysql`和`postgresql`数据库,[点我了解如何切换其他数据库](../database)
|
||||
::: tip
|
||||
默认安装使用SQLite数据库,如果需要使用MySQL、PostgreSQL数据库,请参考[多数据库支持](./install/database.md)
|
||||
:::
|
||||
|
||||
|
||||
## 二、访问应用
|
||||
|
||||
@@ -42,8 +42,9 @@ docker compose up -d
|
||||
> 如果提示 没有docker compose命令,请安装docker-compose
|
||||
> https://docs.docker.com/compose/install/linux/
|
||||
|
||||
> certd默认使用sqlite数据库,另外还支持`mysql`和`postgresql`数据库,[点我了解如何切换其他数据库](../database)
|
||||
|
||||
::: tip
|
||||
默认安装使用SQLite数据库,如果需要使用MySQL、PostgreSQL数据库,请参考[多数据库支持](./install/database.md)
|
||||
:::
|
||||
|
||||
### 3. 访问测试
|
||||
|
||||
|
||||
@@ -28,6 +28,11 @@ https://certd.handsfree.work/
|
||||
2. [Docker方式部署](./install/docker/)
|
||||
3. [源码方式部署](./install/source/)
|
||||
|
||||
::: tip
|
||||
默认安装使用SQLite数据库,如果需要使用MySQL、PostgreSQL数据库,请参考[多数据库支持](./install/database.md)
|
||||
:::
|
||||
|
||||
|
||||
|
||||
### 2. 访问测试
|
||||
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
}
|
||||
},
|
||||
"npmClient": "pnpm",
|
||||
"version": "1.39.0"
|
||||
"version": "1.39.1"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.39.1](https://github.com/publishlab/node-acme-client/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
# [1.39.0](https://github.com/publishlab/node-acme-client/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||
|
||||
**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.39.0",
|
||||
"version": "1.39.1",
|
||||
"type": "module",
|
||||
"module": "scr/index.js",
|
||||
"main": "src/index.js",
|
||||
@@ -18,7 +18,7 @@
|
||||
"types"
|
||||
],
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.39.0",
|
||||
"@certd/basic": "^1.39.1",
|
||||
"@peculiar/x509": "^1.11.0",
|
||||
"asn1js": "^3.0.5",
|
||||
"axios": "^1.9.0",
|
||||
@@ -70,5 +70,5 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/publishlab/node-acme-client/issues"
|
||||
},
|
||||
"gitHead": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
||||
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1 +1 @@
|
||||
01:15
|
||||
23:44
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/basic",
|
||||
"private": false,
|
||||
"version": "1.39.0",
|
||||
"version": "1.39.1",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -47,5 +47,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
||||
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
||||
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/pipeline",
|
||||
"private": false,
|
||||
"version": "1.39.0",
|
||||
"version": "1.39.1",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -18,8 +18,8 @@
|
||||
"compile": "tsc --skipLibCheck --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.39.0",
|
||||
"@certd/plus-core": "^1.39.0",
|
||||
"@certd/basic": "^1.39.1",
|
||||
"@certd/plus-core": "^1.39.1",
|
||||
"dayjs": "^1.11.7",
|
||||
"lodash-es": "^4.17.21",
|
||||
"reflect-metadata": "^0.1.13"
|
||||
@@ -45,5 +45,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
||||
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-huawei",
|
||||
"private": false,
|
||||
"version": "1.39.0",
|
||||
"version": "1.39.1",
|
||||
"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": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
||||
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-iframe",
|
||||
"private": false,
|
||||
"version": "1.39.0",
|
||||
"version": "1.39.1",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -31,5 +31,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
||||
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/jdcloud
|
||||
|
||||
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||
|
||||
**Note:** Version bump only for package @certd/jdcloud
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/jdcloud",
|
||||
"version": "1.39.0",
|
||||
"version": "1.39.1",
|
||||
"description": "jdcloud openApi sdk",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/bundle.js",
|
||||
@@ -56,5 +56,5 @@
|
||||
"fetch"
|
||||
]
|
||||
},
|
||||
"gitHead": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
||||
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-k8s",
|
||||
"private": false,
|
||||
"version": "1.39.0",
|
||||
"version": "1.39.1",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -17,7 +17,7 @@
|
||||
"pub": "npm publish"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.39.0",
|
||||
"@certd/basic": "^1.39.1",
|
||||
"@kubernetes/client-node": "0.21.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -32,5 +32,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
||||
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-server
|
||||
|
||||
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/lib-server",
|
||||
"version": "1.39.0",
|
||||
"version": "1.39.1",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
@@ -28,11 +28,11 @@
|
||||
],
|
||||
"license": "AGPL",
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.39.0",
|
||||
"@certd/basic": "^1.39.0",
|
||||
"@certd/pipeline": "^1.39.0",
|
||||
"@certd/plugin-lib": "^1.39.0",
|
||||
"@certd/plus-core": "^1.39.0",
|
||||
"@certd/acme-client": "^1.39.1",
|
||||
"@certd/basic": "^1.39.1",
|
||||
"@certd/pipeline": "^1.39.1",
|
||||
"@certd/plugin-lib": "^1.39.1",
|
||||
"@certd/plus-core": "^1.39.1",
|
||||
"@midwayjs/cache": "3.14.0",
|
||||
"@midwayjs/core": "3.20.11",
|
||||
"@midwayjs/i18n": "3.20.13",
|
||||
@@ -64,5 +64,5 @@
|
||||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
||||
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/midway-flyway-js",
|
||||
"version": "1.39.0",
|
||||
"version": "1.39.1",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
@@ -46,5 +46,5 @@
|
||||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
||||
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-cert
|
||||
|
||||
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-cert
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/plugin-cert",
|
||||
"private": false,
|
||||
"version": "1.39.0",
|
||||
"version": "1.39.1",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -17,10 +17,10 @@
|
||||
"compile": "tsc --skipLibCheck --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.39.0",
|
||||
"@certd/basic": "^1.39.0",
|
||||
"@certd/pipeline": "^1.39.0",
|
||||
"@certd/plugin-lib": "^1.39.0",
|
||||
"@certd/acme-client": "^1.39.1",
|
||||
"@certd/basic": "^1.39.1",
|
||||
"@certd/pipeline": "^1.39.1",
|
||||
"@certd/plugin-lib": "^1.39.1",
|
||||
"psl": "^1.9.0",
|
||||
"punycode.js": "^2.3.1"
|
||||
},
|
||||
@@ -38,5 +38,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
||||
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-lib
|
||||
|
||||
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-lib
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/plugin-lib",
|
||||
"private": false,
|
||||
"version": "1.39.0",
|
||||
"version": "1.39.1",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -22,10 +22,10 @@
|
||||
"@alicloud/pop-core": "^1.7.10",
|
||||
"@alicloud/tea-util": "^1.4.11",
|
||||
"@aws-sdk/client-s3": "^3.964.0",
|
||||
"@certd/acme-client": "^1.39.0",
|
||||
"@certd/basic": "^1.39.0",
|
||||
"@certd/pipeline": "^1.39.0",
|
||||
"@certd/plus-core": "^1.39.0",
|
||||
"@certd/acme-client": "^1.39.1",
|
||||
"@certd/basic": "^1.39.1",
|
||||
"@certd/pipeline": "^1.39.1",
|
||||
"@certd/plus-core": "^1.39.1",
|
||||
"@kubernetes/client-node": "0.21.0",
|
||||
"ali-oss": "^6.22.0",
|
||||
"basic-ftp": "^5.0.5",
|
||||
@@ -57,5 +57,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "49457505cdf8156fd9d936b8e9ace0b48e43a6b2"
|
||||
"gitHead": "3bb29abe32c311e1cf840f97d485d1147411992a"
|
||||
}
|
||||
|
||||
@@ -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.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复企业管理模式下,切换用户登录后,丢失项目列表的bug ([d23c8b4](https://github.com/certd/certd/commit/d23c8b4a2a5f5ab17822c6ee1d4108ac7280b9d1))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 支持迁移个人数据到企业项目中 ([c6ca832](https://github.com/certd/certd/commit/c6ca83273779ed84de1b23b5e477063af043d015))
|
||||
|
||||
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/ui-client",
|
||||
"version": "1.39.0",
|
||||
"version": "1.39.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite --open",
|
||||
@@ -106,8 +106,8 @@
|
||||
"zod-defaults": "^0.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@certd/lib-iframe": "^1.39.0",
|
||||
"@certd/pipeline": "^1.39.0",
|
||||
"@certd/lib-iframe": "^1.39.1",
|
||||
"@certd/pipeline": "^1.39.1",
|
||||
"@rollup/plugin-commonjs": "^25.0.7",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@types/chai": "^4.3.12",
|
||||
|
||||
@@ -127,6 +127,21 @@ export const certdResources = [
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "certd.sysResources.currentProject",
|
||||
name: "ProjectMemberManager",
|
||||
path: "/certd/project/detail",
|
||||
component: "/certd/project/detail/index.vue",
|
||||
meta: {
|
||||
show: () => {
|
||||
const projectStore = useProjectStore();
|
||||
return projectStore.isEnterprise;
|
||||
},
|
||||
isMenu: true,
|
||||
icon: "ion:apps",
|
||||
auth: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "certd.settings",
|
||||
name: "MineSetting",
|
||||
@@ -263,21 +278,6 @@ export const certdResources = [
|
||||
isMenu: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "certd.sysResources.projectMemberManager",
|
||||
name: "ProjectMemberManager",
|
||||
path: "/certd/project/detail",
|
||||
component: "/certd/project/detail/index.vue",
|
||||
meta: {
|
||||
show: () => {
|
||||
const projectStore = useProjectStore();
|
||||
return projectStore.isEnterprise;
|
||||
},
|
||||
isMenu: true,
|
||||
icon: "ion:apps",
|
||||
auth: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -15,11 +15,18 @@ export type ProjectItem = {
|
||||
export const useProjectStore = defineStore("app.project", () => {
|
||||
const myProjects = ref([]);
|
||||
const inited = ref(false);
|
||||
const currentProjectId = ref(); // 直接调用
|
||||
|
||||
function $reset() {
|
||||
myProjects.value = [];
|
||||
currentProjectId.value = "";
|
||||
inited.value = false;
|
||||
}
|
||||
const userStore = useUserStore();
|
||||
const userId = userStore.getUserInfo?.id;
|
||||
const lastProjectIdCacheKey = "currentProjectId:" + userId;
|
||||
const lastProjectId = LocalStorage.get(lastProjectIdCacheKey);
|
||||
const currentProjectId = ref(lastProjectId); // 直接调用
|
||||
currentProjectId.value = lastProjectId;
|
||||
|
||||
const projects = computed(() => {
|
||||
return myProjects.value;
|
||||
@@ -118,11 +125,6 @@ export const useProjectStore = defineStore("app.project", () => {
|
||||
return false;
|
||||
}
|
||||
|
||||
function $reset() {
|
||||
myProjects.value = [];
|
||||
currentProjectId.value = "";
|
||||
}
|
||||
|
||||
return {
|
||||
projects,
|
||||
myProjects,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useFormWrapper } from "@fast-crud/fast-crud";
|
||||
import { merge } from "lodash-es";
|
||||
|
||||
export type FormOptionReq = {
|
||||
title: string;
|
||||
@@ -7,6 +8,7 @@ export type FormOptionReq = {
|
||||
body?: any;
|
||||
initialForm?: any;
|
||||
zIndex?: number;
|
||||
wrapper?: any;
|
||||
};
|
||||
|
||||
export function useFormDialog() {
|
||||
@@ -14,19 +16,23 @@ export function useFormDialog() {
|
||||
|
||||
async function openFormDialog(req: FormOptionReq) {
|
||||
function createCrudOptions() {
|
||||
const warpper = merge(
|
||||
{
|
||||
zIndex: req.zIndex,
|
||||
title: req.title,
|
||||
saveRemind: false,
|
||||
slots: {
|
||||
"form-body-top": req.body,
|
||||
},
|
||||
},
|
||||
req.wrapper
|
||||
);
|
||||
return {
|
||||
crudOptions: {
|
||||
columns: req.columns,
|
||||
form: {
|
||||
initialForm: req.initialForm,
|
||||
wrapper: {
|
||||
zIndex: req.zIndex,
|
||||
title: req.title,
|
||||
saveRemind: false,
|
||||
slots: {
|
||||
"form-body-top": req.body,
|
||||
},
|
||||
},
|
||||
wrapper: warpper,
|
||||
async afterSubmit() {},
|
||||
async doSubmit({ form }: any) {
|
||||
if (req.onSubmit) {
|
||||
|
||||
@@ -73,3 +73,17 @@ export async function ApproveJoin(form: any) {
|
||||
data: form,
|
||||
});
|
||||
}
|
||||
|
||||
export async function GetSelfResources() {
|
||||
return await request({
|
||||
url: "/enterprise/transfer/selfResources",
|
||||
method: "post",
|
||||
});
|
||||
}
|
||||
|
||||
export async function TransferResources() {
|
||||
return await request({
|
||||
url: "/enterprise/transfer/doTransfer",
|
||||
method: "post",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -9,8 +9,12 @@
|
||||
<fs-values-format :model-value="project.permission" :dict="projectPermissionDict"></fs-values-format>
|
||||
<a-divider type="vertical"></a-divider>
|
||||
<fs-values-format :model-value="project.status" :dict="projectMemberStatusDict"></fs-values-format> -->
|
||||
<a-divider type="vertical"></a-divider>
|
||||
<a-button class="mr-5" type="primary" @click="openTransferDialog">个人数据迁移</a-button>
|
||||
<a-button v-if="userStore.isAdmin" type="primary" @click="goProjectManager">{{ t("certd.project.projectManage") }}</a-button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="more"></div>
|
||||
</template>
|
||||
<fs-crud ref="crudRef" v-bind="crudBinding">
|
||||
<template #pagination-left>
|
||||
@@ -29,11 +33,13 @@ import createCrudOptions from "./crud";
|
||||
import { message, Modal } from "ant-design-vue";
|
||||
import { DeleteBatch } from "./api";
|
||||
import { useI18n } from "/src/locales";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { useProjectStore } from "/@/store/project";
|
||||
import { request } from "/@/api/service";
|
||||
import { useDicts } from "../../dicts";
|
||||
import { useCrudPermission } from "/@/plugin/permission";
|
||||
import { useUserStore } from "/@/store/user";
|
||||
import { useTransfer } from "./use";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -49,6 +55,14 @@ if (!projectId) {
|
||||
projectId = projectStore.currentProject?.id;
|
||||
}
|
||||
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
function goProjectManager() {
|
||||
router.push(`/sys/enterprise/project`);
|
||||
}
|
||||
|
||||
const { openTransferDialog } = useTransfer();
|
||||
|
||||
const { projectPermissionDict, projectMemberStatusDict, userDict } = useDicts();
|
||||
|
||||
const project: Ref<any> = ref({});
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
import { dict } from "@fast-crud/fast-crud";
|
||||
import { useDicts } from "../../dicts";
|
||||
import { useFormDialog } from "/@/use/use-dialog";
|
||||
|
||||
export function useApprove() {
|
||||
const { openFormDialog } = useFormDialog();
|
||||
const { projectPermissionDict, projectMemberStatusDict, userDict } = useDicts();
|
||||
function openApproveDialog({ id, permission, onSubmit }: { id: any; permission: any; onSubmit: any }) {
|
||||
openFormDialog({
|
||||
title: "审批加入申请",
|
||||
columns: {
|
||||
permission: {
|
||||
title: "成员权限",
|
||||
type: "dict-select",
|
||||
dict: projectPermissionDict,
|
||||
},
|
||||
status: {
|
||||
title: "审批结果",
|
||||
type: "dict-radio",
|
||||
dict: dict({
|
||||
data: [
|
||||
{
|
||||
label: "通过",
|
||||
value: "approved",
|
||||
},
|
||||
{
|
||||
label: "拒绝",
|
||||
value: "rejected",
|
||||
},
|
||||
],
|
||||
}),
|
||||
},
|
||||
},
|
||||
onSubmit: onSubmit,
|
||||
initialForm: {
|
||||
id: id,
|
||||
permission: permission,
|
||||
status: "approved",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
openApproveDialog,
|
||||
};
|
||||
}
|
||||
134
packages/ui/certd-client/src/views/certd/project/detail/use.tsx
Normal file
134
packages/ui/certd-client/src/views/certd/project/detail/use.tsx
Normal file
@@ -0,0 +1,134 @@
|
||||
import { dict } from "@fast-crud/fast-crud";
|
||||
import { useDicts } from "../../dicts";
|
||||
import { useFormDialog } from "/@/use/use-dialog";
|
||||
import * as api from "./api";
|
||||
import { useProjectStore } from "/@/store/project";
|
||||
import { message, Modal } from "ant-design-vue";
|
||||
import { Ref, ref } from "vue";
|
||||
export function useApprove() {
|
||||
const { openFormDialog } = useFormDialog();
|
||||
const { projectPermissionDict, projectMemberStatusDict, userDict } = useDicts();
|
||||
function openApproveDialog({ id, permission, onSubmit }: { id: any; permission: any; onSubmit: any }) {
|
||||
openFormDialog({
|
||||
title: "审批加入申请",
|
||||
columns: {
|
||||
permission: {
|
||||
title: "成员权限",
|
||||
type: "dict-select",
|
||||
dict: projectPermissionDict,
|
||||
},
|
||||
status: {
|
||||
title: "审批结果",
|
||||
type: "dict-radio",
|
||||
dict: dict({
|
||||
data: [
|
||||
{
|
||||
label: "通过",
|
||||
value: "approved",
|
||||
},
|
||||
{
|
||||
label: "拒绝",
|
||||
value: "rejected",
|
||||
},
|
||||
],
|
||||
}),
|
||||
},
|
||||
},
|
||||
onSubmit: onSubmit,
|
||||
initialForm: {
|
||||
id: id,
|
||||
permission: permission,
|
||||
status: "approved",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
openApproveDialog,
|
||||
};
|
||||
}
|
||||
|
||||
export function useTransfer() {
|
||||
const { openFormDialog } = useFormDialog();
|
||||
|
||||
async function doTransfer() {
|
||||
Modal.confirm({
|
||||
title: "请确认",
|
||||
content: () => (
|
||||
<div>
|
||||
<p>确认迁移个人资源数据到当前项目?</p>
|
||||
<p class="text-red-500">注意;此操作不可逆,一旦迁移,数据将无法还原回个人用户名下。</p>
|
||||
</div>
|
||||
),
|
||||
okText: "确认",
|
||||
okType: "primary",
|
||||
onOk: async () => {
|
||||
await api.TransferResources();
|
||||
message.success("迁移成功");
|
||||
await loadMyResources();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const selfResources: Ref = ref({});
|
||||
|
||||
const projectStore = useProjectStore();
|
||||
|
||||
async function loadMyResources() {
|
||||
selfResources.value = await api.GetSelfResources();
|
||||
}
|
||||
async function openTransferDialog() {
|
||||
await loadMyResources();
|
||||
openFormDialog({
|
||||
title: "迁移我的个人资源到当前企业项目",
|
||||
wrapper: {
|
||||
buttons: {
|
||||
ok: {
|
||||
show: false,
|
||||
},
|
||||
reset: {
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
body() {
|
||||
return (
|
||||
<div class="p-8">
|
||||
<div class="flex flex-row items-center justify-evenly w-full">
|
||||
<div>
|
||||
<h3 class="text-lg font-bold">我原有的个人资源数量</h3>
|
||||
<div class="mt-4">
|
||||
<p>流水线:{selfResources.value.pipeline}</p>
|
||||
<p>流水线历史:{selfResources.value.history}</p>
|
||||
<p>流水线历史日志:{selfResources.value.historyLog}</p>
|
||||
<p>流水线分组:{selfResources.value.pipelineGroup}</p>
|
||||
<p>存储:{selfResources.value.storage}</p>
|
||||
<p>证书:{selfResources.value.certInfo}</p>
|
||||
<p>授权:{selfResources.value.access}</p>
|
||||
<p>站点监控:{selfResources.value.siteMonitor}</p>
|
||||
<p>通知:{selfResources.value.notification}</p>
|
||||
<p>站点监控分组:{selfResources.value.group}</p>
|
||||
|
||||
<p>流水线模版:{selfResources.value.template}</p>
|
||||
<p>域名:{selfResources.value.domain}</p>
|
||||
<p>子域名托管:{selfResources.value.subdomain}</p>
|
||||
<p>cname记录:{selfResources.value.cnameRecord}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-2xl font-bold"> 迁移到→ </div>
|
||||
<div>项目:"{projectStore.currentProject?.name}"</div>
|
||||
</div>
|
||||
<div class="flex flex-row items-center justify-center w-full">
|
||||
<a-button type="primary" onClick={doTransfer}>
|
||||
确认迁移
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
return {
|
||||
openTransferDialog,
|
||||
};
|
||||
}
|
||||
@@ -3,6 +3,12 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 支持迁移个人数据到企业项目中 ([c6ca832](https://github.com/certd/certd/commit/c6ca83273779ed84de1b23b5e477063af043d015))
|
||||
|
||||
# [1.39.0](https://github.com/certd/certd/compare/v1.38.12...v1.39.0) (2026-03-07)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/ui-server",
|
||||
"version": "1.39.0",
|
||||
"version": "1.39.1",
|
||||
"description": "fast-server base midway",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
@@ -50,20 +50,20 @@
|
||||
"@aws-sdk/client-route-53": "^3.964.0",
|
||||
"@aws-sdk/client-s3": "^3.964.0",
|
||||
"@aws-sdk/client-sts": "^3.990.0",
|
||||
"@certd/acme-client": "^1.39.0",
|
||||
"@certd/basic": "^1.39.0",
|
||||
"@certd/commercial-core": "^1.39.0",
|
||||
"@certd/acme-client": "^1.39.1",
|
||||
"@certd/basic": "^1.39.1",
|
||||
"@certd/commercial-core": "^1.39.1",
|
||||
"@certd/cv4pve-api-javascript": "^8.4.2",
|
||||
"@certd/jdcloud": "^1.39.0",
|
||||
"@certd/lib-huawei": "^1.39.0",
|
||||
"@certd/lib-k8s": "^1.39.0",
|
||||
"@certd/lib-server": "^1.39.0",
|
||||
"@certd/midway-flyway-js": "^1.39.0",
|
||||
"@certd/pipeline": "^1.39.0",
|
||||
"@certd/plugin-cert": "^1.39.0",
|
||||
"@certd/plugin-lib": "^1.39.0",
|
||||
"@certd/plugin-plus": "^1.39.0",
|
||||
"@certd/plus-core": "^1.39.0",
|
||||
"@certd/jdcloud": "^1.39.1",
|
||||
"@certd/lib-huawei": "^1.39.1",
|
||||
"@certd/lib-k8s": "^1.39.1",
|
||||
"@certd/lib-server": "^1.39.1",
|
||||
"@certd/midway-flyway-js": "^1.39.1",
|
||||
"@certd/pipeline": "^1.39.1",
|
||||
"@certd/plugin-cert": "^1.39.1",
|
||||
"@certd/plugin-lib": "^1.39.1",
|
||||
"@certd/plugin-plus": "^1.39.1",
|
||||
"@certd/plus-core": "^1.39.1",
|
||||
"@google-cloud/publicca": "^1.3.0",
|
||||
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.185",
|
||||
"@huaweicloud/huaweicloud-sdk-core": "^3.1.185",
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
import { BaseController, Constants } from '@certd/lib-server';
|
||||
import { Controller, Inject, Post, Provide } from '@midwayjs/core';
|
||||
import { TransferService } from '../../../modules/sys/enterprise/service/transfer-service.js';
|
||||
|
||||
/**
|
||||
*/
|
||||
@Provide()
|
||||
@Controller('/api/enterprise/transfer')
|
||||
export class TransferController extends BaseController {
|
||||
@Inject()
|
||||
service: TransferService;
|
||||
|
||||
|
||||
getService(): TransferService {
|
||||
return this.service;
|
||||
}
|
||||
|
||||
/**
|
||||
* 我自己的资源
|
||||
* @param body
|
||||
* @returns
|
||||
*/
|
||||
@Post('/selfResources', { summary: Constants.per.authOnly })
|
||||
async selfResources() {
|
||||
const userId = this.getUserId();
|
||||
const res = await this.service.getUserResources(userId);
|
||||
return this.ok(res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 迁移项目
|
||||
* @param body
|
||||
* @returns
|
||||
*/
|
||||
@Post('/doTransfer', { summary: Constants.per.authOnly })
|
||||
async doTransfer() {
|
||||
const {projectId} = await this.getProjectUserIdRead();
|
||||
const userId = this.getUserId();
|
||||
await this.service.transferAll(userId,projectId);
|
||||
return this.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
import { isEnterprise } from "@certd/lib-server";
|
||||
import { ApplicationContext, IMidwayContainer, Provide, Scope, ScopeEnum } from "@midwayjs/core";
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class TransferService {
|
||||
@ApplicationContext()
|
||||
appCtx: IMidwayContainer;
|
||||
|
||||
|
||||
async getServices() {
|
||||
const getService = async (key: string) => {
|
||||
return await this.appCtx.getAsync(key);
|
||||
}
|
||||
const serviceNames = [
|
||||
"pipeline",
|
||||
"certInfo",
|
||||
"siteInfo",
|
||||
"domain",
|
||||
"cnameRecord",
|
||||
"group",
|
||||
"pipelineGroup",
|
||||
"notification",
|
||||
"subDomain",
|
||||
"template",
|
||||
"openKey",
|
||||
"siteIp",
|
||||
"access",
|
||||
"history",
|
||||
"historyLog",
|
||||
"storage",
|
||||
]
|
||||
|
||||
const services: any = {}
|
||||
for (const key of serviceNames) {
|
||||
services[key] = await getService(`${key}Service`);
|
||||
}
|
||||
return services;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户资源
|
||||
* @param userId
|
||||
* @returns
|
||||
*/
|
||||
async getUserResources(userId: number) {
|
||||
|
||||
const query = {
|
||||
userId,
|
||||
}
|
||||
|
||||
const services = await this.getServices();
|
||||
|
||||
const counts: any = {}
|
||||
let totalCount = 0;
|
||||
for (const key of Object.keys(services)) {
|
||||
const count = await services[key].repository.count({ where: query });
|
||||
counts[key] = count;
|
||||
totalCount += count;
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
...counts,
|
||||
totalCount,
|
||||
}
|
||||
}
|
||||
|
||||
async transferAll(userId: number, projectId: number) {
|
||||
|
||||
if (!isEnterprise()) {
|
||||
throw new Error('当前非企业模式,不支持资源迁移到项目');
|
||||
}
|
||||
if (projectId === 0) {
|
||||
throw new Error('项目ID不能为0');
|
||||
}
|
||||
if (userId == null) {
|
||||
throw new Error('用户ID不能为空');
|
||||
}
|
||||
|
||||
const query = {
|
||||
userId,
|
||||
}
|
||||
const services = await this.getServices();
|
||||
for (const key of Object.keys(services)) {
|
||||
await services[key].repository.update(query, {
|
||||
userId: -1,
|
||||
projectId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
23:21
|
||||
01:18
|
||||
|
||||
@@ -1 +1 @@
|
||||
00:12
|
||||
01:57
|
||||
|
||||
Reference in New Issue
Block a user