mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
Merge branch 'v2-dev' into v2
This commit is contained in:
@@ -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.27.4](https://github.com/publishlab/node-acme-client/compare/v1.27.3...v1.27.4) (2024-11-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
## [1.27.3](https://github.com/publishlab/node-acme-client/compare/v1.27.2...v1.27.3) (2024-11-13)
|
||||
|
||||
**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.27.3",
|
||||
"version": "1.27.4",
|
||||
"type": "module",
|
||||
"module": "scr/index.js",
|
||||
"main": "src/index.js",
|
||||
@@ -18,7 +18,7 @@
|
||||
"types"
|
||||
],
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.27.3",
|
||||
"@certd/basic": "^1.27.4",
|
||||
"@peculiar/x509": "^1.11.0",
|
||||
"asn1js": "^3.0.5",
|
||||
"axios": "^1.7.2",
|
||||
@@ -65,5 +65,5 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/publishlab/node-acme-client/issues"
|
||||
},
|
||||
"gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
|
||||
"gitHead": "339554bdbf61c4784614747734a420e744e13bfb"
|
||||
}
|
||||
|
||||
@@ -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.27.4](https://github.com/certd/certd/compare/v1.27.3...v1.27.4) (2024-11-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
## [1.27.3](https://github.com/certd/certd/compare/v1.27.2...v1.27.3) (2024-11-13)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1 +1 @@
|
||||
00:16
|
||||
21:51
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/basic",
|
||||
"private": false,
|
||||
"version": "1.27.3",
|
||||
"version": "1.27.4",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -43,5 +43,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
|
||||
"gitHead": "339554bdbf61c4784614747734a420e744e13bfb"
|
||||
}
|
||||
|
||||
@@ -202,6 +202,9 @@ export type HttpClient = {
|
||||
request<D = any, R = any>(config: HttpRequestConfig<D>): Promise<HttpClientResponse<R>>;
|
||||
};
|
||||
|
||||
// const http_proxy_backup = process.env.HTTP_PROXY || process.env.http_proxy;
|
||||
// const https_proxy_backup = process.env.HTTPS_PROXY || process.env.https_proxy;
|
||||
|
||||
export type CreateAgentOptions = {
|
||||
httpProxy?: string;
|
||||
httpsProxy?: string;
|
||||
@@ -216,20 +219,28 @@ export function createAgent(opts: CreateAgentOptions = {}) {
|
||||
);
|
||||
|
||||
let httpAgent, httpsAgent;
|
||||
const httpProxy = opts.httpProxy || process.env.HTTP_PROXY || process.env.http_proxy;
|
||||
const httpProxy = opts.httpProxy;
|
||||
if (httpProxy) {
|
||||
process.env.HTTP_PROXY = httpProxy;
|
||||
process.env.http_proxy = httpProxy;
|
||||
logger.info('use httpProxy:', httpProxy);
|
||||
httpAgent = new HttpProxyAgent(httpProxy, opts as any);
|
||||
merge(httpAgent.options, opts);
|
||||
} else {
|
||||
process.env.HTTP_PROXY = '';
|
||||
process.env.http_proxy = '';
|
||||
httpAgent = new nodeHttp.Agent(opts);
|
||||
}
|
||||
const httpsProxy = opts.httpsProxy || process.env.HTTPS_PROXY || process.env.https_proxy;
|
||||
const httpsProxy = opts.httpsProxy;
|
||||
if (httpsProxy) {
|
||||
process.env.HTTPS_PROXY = httpProxy;
|
||||
process.env.https_proxy = httpProxy;
|
||||
logger.info('use httpsProxy:', httpsProxy);
|
||||
httpsAgent = new HttpsProxyAgent(httpsProxy, opts as any);
|
||||
merge(httpsAgent.options, opts);
|
||||
} else {
|
||||
process.env.HTTPS_PROXY = '';
|
||||
process.env.https_proxy = '';
|
||||
httpsAgent = new https.Agent(opts);
|
||||
}
|
||||
return {
|
||||
|
||||
@@ -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.27.4](https://github.com/certd/certd/compare/v1.27.3...v1.27.4) (2024-11-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
||||
## [1.27.3](https://github.com/certd/certd/compare/v1.27.2...v1.27.3) (2024-11-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/pipeline",
|
||||
"private": false,
|
||||
"version": "1.27.3",
|
||||
"version": "1.27.4",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -16,8 +16,8 @@
|
||||
"test": "mocha --loader=ts-node/esm"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.27.3",
|
||||
"@certd/plus-core": "^1.27.3",
|
||||
"@certd/basic": "^1.27.4",
|
||||
"@certd/plus-core": "^1.27.4",
|
||||
"dayjs": "^1.11.7",
|
||||
"lodash-es": "^4.17.21",
|
||||
"reflect-metadata": "^0.1.13"
|
||||
@@ -43,5 +43,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
|
||||
"gitHead": "339554bdbf61c4784614747734a420e744e13bfb"
|
||||
}
|
||||
|
||||
@@ -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.27.4](https://github.com/certd/certd/compare/v1.27.3...v1.27.4) (2024-11-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
## [1.27.3](https://github.com/certd/certd/compare/v1.27.2...v1.27.3) (2024-11-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-huawei",
|
||||
"private": false,
|
||||
"version": "1.27.3",
|
||||
"version": "1.27.4",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/bundle.js",
|
||||
"types": "./dist/d/index.d.ts",
|
||||
@@ -21,5 +21,5 @@
|
||||
"prettier": "^2.8.8",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
|
||||
"gitHead": "339554bdbf61c4784614747734a420e744e13bfb"
|
||||
}
|
||||
|
||||
@@ -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.27.4](https://github.com/certd/certd/compare/v1.27.3...v1.27.4) (2024-11-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
## [1.27.3](https://github.com/certd/certd/compare/v1.27.2...v1.27.3) (2024-11-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-iframe",
|
||||
"private": false,
|
||||
"version": "1.27.3",
|
||||
"version": "1.27.4",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -30,5 +30,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
|
||||
"gitHead": "339554bdbf61c4784614747734a420e744e13bfb"
|
||||
}
|
||||
|
||||
@@ -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.27.4](https://github.com/certd/certd/compare/v1.27.3...v1.27.4) (2024-11-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
## [1.27.3](https://github.com/certd/certd/compare/v1.27.2...v1.27.3) (2024-11-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-k8s",
|
||||
"private": false,
|
||||
"version": "1.27.3",
|
||||
"version": "1.27.4",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -16,7 +16,7 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.27.3",
|
||||
"@certd/basic": "^1.27.4",
|
||||
"@kubernetes/client-node": "0.21.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -31,5 +31,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
|
||||
"gitHead": "339554bdbf61c4784614747734a420e744e13bfb"
|
||||
}
|
||||
|
||||
@@ -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.27.4](https://github.com/certd/certd/compare/v1.27.3...v1.27.4) (2024-11-14)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 公共cname服务支持关闭 ([f4ae512](https://github.com/certd/certd/commit/f4ae5125dc4cd97816976779cb3586b5ee78947e))
|
||||
|
||||
## [1.27.3](https://github.com/certd/certd/compare/v1.27.2...v1.27.3) (2024-11-13)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/lib-server",
|
||||
"version": "1.27.3",
|
||||
"version": "1.27.4",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
@@ -27,10 +27,10 @@
|
||||
],
|
||||
"license": "AGPL",
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.27.3",
|
||||
"@certd/basic": "^1.27.3",
|
||||
"@certd/pipeline": "^1.27.3",
|
||||
"@certd/plus-core": "^1.27.3",
|
||||
"@certd/acme-client": "^1.27.4",
|
||||
"@certd/basic": "^1.27.4",
|
||||
"@certd/pipeline": "^1.27.4",
|
||||
"@certd/plus-core": "^1.27.4",
|
||||
"@midwayjs/cache": "~3.14.0",
|
||||
"@midwayjs/core": "~3.17.1",
|
||||
"@midwayjs/i18n": "~3.17.3",
|
||||
@@ -61,5 +61,5 @@
|
||||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
|
||||
"gitHead": "339554bdbf61c4784614747734a420e744e13bfb"
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ export class SysPrivateSettings extends BaseSettings {
|
||||
httpsProxy? = '';
|
||||
httpProxy? = '';
|
||||
dnsResultOrder? = '';
|
||||
commonCnameEnabled?: boolean = true;
|
||||
|
||||
removeSecret() {
|
||||
const clone = cloneDeep(this);
|
||||
|
||||
@@ -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.27.4](https://github.com/certd/certd/compare/v1.27.3...v1.27.4) (2024-11-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
## [1.27.3](https://github.com/certd/certd/compare/v1.27.2...v1.27.3) (2024-11-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/midway-flyway-js",
|
||||
"version": "1.27.3",
|
||||
"version": "1.27.4",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
@@ -46,5 +46,5 @@
|
||||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
|
||||
"gitHead": "339554bdbf61c4784614747734a420e744e13bfb"
|
||||
}
|
||||
|
||||
@@ -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.27.4](https://github.com/certd/certd/compare/v1.27.3...v1.27.4) (2024-11-14)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复未设置pfx密码,导致jks转换报错的bug ([c3cfbd8](https://github.com/certd/certd/commit/c3cfbd8474155aed4379f91075de37d5d8c73ef0))
|
||||
|
||||
## [1.27.3](https://github.com/certd/certd/compare/v1.27.2...v1.27.3) (2024-11-13)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/plugin-cert",
|
||||
"private": false,
|
||||
"version": "1.27.3",
|
||||
"version": "1.27.4",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -15,9 +15,9 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.27.3",
|
||||
"@certd/basic": "^1.27.3",
|
||||
"@certd/pipeline": "^1.27.3",
|
||||
"@certd/acme-client": "^1.27.4",
|
||||
"@certd/basic": "^1.27.4",
|
||||
"@certd/pipeline": "^1.27.4",
|
||||
"@google-cloud/publicca": "^1.3.0",
|
||||
"dayjs": "^1.11.7",
|
||||
"jszip": "^3.10.1",
|
||||
@@ -40,5 +40,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
|
||||
"gitHead": "339554bdbf61c4784614747734a420e744e13bfb"
|
||||
}
|
||||
|
||||
@@ -49,15 +49,14 @@ export abstract class CertApplyBasePlugin extends AbstractTaskPlugin {
|
||||
email!: string;
|
||||
|
||||
@TaskInput({
|
||||
title: "PFX证书密码",
|
||||
title: "证书密码",
|
||||
component: {
|
||||
name: "input-password",
|
||||
vModel: "value",
|
||||
},
|
||||
required: false,
|
||||
order: 100,
|
||||
// helper: "PFX、jks格式证书是否加密;jks必须设置密码,不传则默认123456",
|
||||
helper: "PFX证书是否加密",
|
||||
helper: "PFX、jks格式证书是否加密;jks必须设置密码,不传则默认123456",
|
||||
})
|
||||
pfxPassword!: string;
|
||||
|
||||
@@ -74,16 +73,6 @@ export abstract class CertApplyBasePlugin extends AbstractTaskPlugin {
|
||||
})
|
||||
renewDays!: number;
|
||||
|
||||
// @TaskInput({
|
||||
// title: "强制更新",
|
||||
// component: {
|
||||
// name: "a-switch",
|
||||
// vModel: "checked",
|
||||
// },
|
||||
// order: 100,
|
||||
// helper: "是否强制重新申请证书",
|
||||
// })
|
||||
// forceUpdate!: string;
|
||||
|
||||
@TaskInput({
|
||||
title: "成功后邮件通知",
|
||||
|
||||
@@ -106,8 +106,8 @@ export class CertConverter {
|
||||
const p12Path = path.join(os.tmpdir(), "/certd/tmp/", randomStr + `_cert.p12`);
|
||||
const { tmpCrtPath, tmpKeyPath } = opts;
|
||||
let passwordArg = "-passout pass:";
|
||||
if (pfxPassword) {
|
||||
passwordArg = `-password pass:${pfxPassword}`;
|
||||
if (jksPassword) {
|
||||
passwordArg = `-password pass:${jksPassword}`;
|
||||
}
|
||||
await this.exec(`openssl pkcs12 -export -in ${tmpCrtPath} -inkey ${tmpKeyPath} -out ${p12Path} -name certd ${passwordArg}`);
|
||||
|
||||
@@ -117,7 +117,7 @@ export class CertConverter {
|
||||
fs.mkdirSync(dir, { recursive: true });
|
||||
}
|
||||
await this.exec(
|
||||
`keytool -importkeystore -srckeystore ${p12Path} -srcstoretype PKCS12 -srcstorepass "${pfxPassword}" -destkeystore ${jksPath} -deststoretype PKCS12 -deststorepass "${jksPassword}" `
|
||||
`keytool -importkeystore -srckeystore ${p12Path} -srcstoretype PKCS12 -srcstorepass "${jksPassword}" -destkeystore ${jksPath} -deststoretype PKCS12 -deststorepass "${jksPassword}" `
|
||||
);
|
||||
fs.unlinkSync(p12Path);
|
||||
return jksPath;
|
||||
|
||||
@@ -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.27.4](https://github.com/certd/certd/compare/v1.27.3...v1.27.4) (2024-11-14)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 公共cname服务支持关闭 ([f4ae512](https://github.com/certd/certd/commit/f4ae5125dc4cd97816976779cb3586b5ee78947e))
|
||||
|
||||
## [1.27.3](https://github.com/certd/certd/compare/v1.27.2...v1.27.3) (2024-11-13)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/ui-client",
|
||||
"version": "1.27.3",
|
||||
"version": "1.27.4",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite --open",
|
||||
@@ -65,8 +65,8 @@
|
||||
"vuedraggable": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@certd/lib-iframe": "^1.27.3",
|
||||
"@certd/pipeline": "^1.27.3",
|
||||
"@certd/lib-iframe": "^1.27.4",
|
||||
"@certd/pipeline": "^1.27.4",
|
||||
"@rollup/plugin-commonjs": "^25.0.7",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@types/chai": "^4.3.12",
|
||||
|
||||
+27
-2
@@ -8,7 +8,7 @@
|
||||
<pi-status-show :status="item.node.status?.result" type="icon"></pi-status-show>
|
||||
</div>
|
||||
</template>
|
||||
<div class="pi-task-view-logs" style="overflow: auto">
|
||||
<div class="pi-task-view-logs" :class="item.node.id" style="overflow: auto">
|
||||
<template v-for="(logItem, index) of item.logs" :key="index">
|
||||
<span :class="logItem.color"> {{ logItem.time }}</span> <span>{{ logItem.content }}</span>
|
||||
</template>
|
||||
@@ -19,7 +19,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { computed, inject, Ref, ref } from "vue";
|
||||
import { computed, inject, nextTick, Ref, ref, watch } from "vue";
|
||||
import { RunHistory } from "../../type";
|
||||
import PiStatusShow from "/@/views/certd/pipeline/pipeline/component/status-show.vue";
|
||||
|
||||
@@ -61,6 +61,7 @@ export default {
|
||||
if (currentHistory?.value?.logs != null) {
|
||||
node.logs = computed(() => {
|
||||
if (currentHistory?.value?.logs && currentHistory.value?.logs[node.node.id] != null) {
|
||||
console.log("log changed", node.node.id);
|
||||
const logs = currentHistory.value?.logs[node.node.id];
|
||||
const list = [];
|
||||
for (let log of logs) {
|
||||
@@ -78,6 +79,30 @@ export default {
|
||||
}
|
||||
return [];
|
||||
});
|
||||
|
||||
watch(
|
||||
() => {
|
||||
return node.logs.value.length;
|
||||
},
|
||||
async () => {
|
||||
let el = document.querySelector(`.pi-task-view-logs.${node.node.id}`);
|
||||
console.log("el", el);
|
||||
//判断当前是否在底部
|
||||
const isBottom = el ? el.scrollHeight - el.scrollTop === el.clientHeight : true;
|
||||
await nextTick();
|
||||
el = document.querySelector(`.pi-task-view-logs.${node.node.id}`);
|
||||
//如果在底部则滚动到底部
|
||||
if (isBottom && el) {
|
||||
el?.scrollTo({
|
||||
top: el.scrollHeight,
|
||||
behavior: "smooth"
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ export type SysPrivateSetting = {
|
||||
httpProxy?: string;
|
||||
httpsProxy?: string;
|
||||
dnsResultOrder?: string;
|
||||
commonCnameEnabled?: boolean;
|
||||
};
|
||||
|
||||
export const SettingKeys = {
|
||||
|
||||
@@ -65,7 +65,8 @@
|
||||
<a-form :model="testFormState" name="basic" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }" autocomplete="off" @finish="onTestSend">
|
||||
<a-form-item label="测试收件邮箱" name="receiver" :rules="[{ required: true, message: '请输入测试收件邮箱' }]">
|
||||
<a-input v-model:value="testFormState.receiver" />
|
||||
<div class="helper">发送失败???可以试试使用官方邮件服务器↗↗↗↗↗↗↗↗</div>
|
||||
<div class="helper">发送失败???<a href="https://certd.docmirror.cn/guide/use/email/" target="_blank">邮件配置帮助文档</a></div>
|
||||
<div class="helper">您还可以试试使用官方邮件服务器↗↗↗↗↗↗↗↗</div>
|
||||
</a-form-item>
|
||||
<a-form-item :wrapper-col="{ offset: 8, span: 16 }">
|
||||
<a-button type="primary" :loading="testFormState.loading" html-type="submit">测试</a-button>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<a-form-item label="管理其他用户流水线" :name="['public', 'managerOtherUserPipeline']">
|
||||
<a-switch v-model:checked="formState.public.managerOtherUserPipeline" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="ICP备案号" :name="['public', 'icpNo']">
|
||||
<a-input v-model:value="formState.public.icpNo" placeholder="粤ICP备xxxxxxx号" />
|
||||
</a-form-item>
|
||||
@@ -37,7 +38,7 @@
|
||||
<a-input v-model:value="formState.private.httpsProxy" placeholder="http://192.168.1.2:18010/" />
|
||||
<a-button class="ml-5" type="primary" :loading="testProxyLoading" title="保存后,再点击测试" @click="testProxy">测试</a-button>
|
||||
</div>
|
||||
<div class="helper">一般这两个代理填一样的</div>
|
||||
<div class="helper">一般这两个代理填一样的,保存后再测试</div>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="双栈网络" :name="['private', 'dnsResultOrder']">
|
||||
@@ -48,6 +49,11 @@
|
||||
</a-select>
|
||||
<div class="helper">如果选择IPv6优先,需要在docker-compose.yaml中启用ipv6</div>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="启用公共CNAME服务" :name="['private', 'commonCnameEnabled']">
|
||||
<a-switch v-model:checked="formState.private.commonCnameEnabled" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item :wrapper-col="{ offset: 8, span: 16 }">
|
||||
<a-button :loading="saveLoading" type="primary" html-type="submit">保存</a-button>
|
||||
</a-form-item>
|
||||
|
||||
@@ -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.27.4](https://github.com/certd/certd/compare/v1.27.3...v1.27.4) (2024-11-14)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 公共cname服务支持关闭 ([f4ae512](https://github.com/certd/certd/commit/f4ae5125dc4cd97816976779cb3586b5ee78947e))
|
||||
|
||||
## [1.27.3](https://github.com/certd/certd/compare/v1.27.2...v1.27.3) (2024-11-13)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/ui-server",
|
||||
"version": "1.27.3",
|
||||
"version": "1.27.4",
|
||||
"description": "fast-server base midway",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
@@ -29,17 +29,17 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@alicloud/pop-core": "^1.7.10",
|
||||
"@certd/acme-client": "^1.27.3",
|
||||
"@certd/basic": "^1.27.3",
|
||||
"@certd/commercial-core": "^1.27.3",
|
||||
"@certd/lib-huawei": "^1.27.3",
|
||||
"@certd/lib-k8s": "^1.27.3",
|
||||
"@certd/lib-server": "^1.27.3",
|
||||
"@certd/midway-flyway-js": "^1.27.3",
|
||||
"@certd/pipeline": "^1.27.3",
|
||||
"@certd/plugin-cert": "^1.27.3",
|
||||
"@certd/plugin-plus": "^1.27.3",
|
||||
"@certd/plus-core": "^1.27.3",
|
||||
"@certd/acme-client": "^1.27.4",
|
||||
"@certd/basic": "^1.27.4",
|
||||
"@certd/commercial-core": "^1.27.4",
|
||||
"@certd/lib-huawei": "^1.27.4",
|
||||
"@certd/lib-k8s": "^1.27.4",
|
||||
"@certd/lib-server": "^1.27.4",
|
||||
"@certd/midway-flyway-js": "^1.27.4",
|
||||
"@certd/pipeline": "^1.27.4",
|
||||
"@certd/plugin-cert": "^1.27.4",
|
||||
"@certd/plugin-plus": "^1.27.4",
|
||||
"@certd/plus-core": "^1.27.4",
|
||||
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.120",
|
||||
"@huaweicloud/huaweicloud-sdk-core": "^3.1.120",
|
||||
"@koa/cors": "^5.0.0",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Provide, Scope, ScopeEnum } from '@midwayjs/core';
|
||||
import { Inject, Provide, Scope, ScopeEnum } from '@midwayjs/core';
|
||||
import { InjectEntityModel } from '@midwayjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
import { BaseService, ListReq, ValidateException } from '@certd/lib-server';
|
||||
import { BaseService, ListReq, SysPrivateSettings, SysSettingsService, ValidateException } from '@certd/lib-server';
|
||||
import { CnameProviderEntity } from '../entity/cname-provider.js';
|
||||
import { CommonProviders } from './common-provider.js';
|
||||
|
||||
@@ -14,6 +14,9 @@ export class CnameProviderService extends BaseService<CnameProviderEntity> {
|
||||
@InjectEntityModel(CnameProviderEntity)
|
||||
repository: Repository<CnameProviderEntity>;
|
||||
|
||||
@Inject()
|
||||
settingsService: SysSettingsService;
|
||||
|
||||
//@ts-ignore
|
||||
getRepository() {
|
||||
return this.repository;
|
||||
@@ -85,7 +88,10 @@ export class CnameProviderService extends BaseService<CnameProviderEntity> {
|
||||
if (founds && founds.length > 0) {
|
||||
return founds[0];
|
||||
}
|
||||
if (CommonProviders.length > 0) {
|
||||
|
||||
const sysPrivateSettings = await this.settingsService.getSetting<SysPrivateSettings>(SysPrivateSettings);
|
||||
|
||||
if (sysPrivateSettings.commonCnameEnabled !== false && CommonProviders.length > 0) {
|
||||
return CommonProviders[0] as CnameProviderEntity;
|
||||
}
|
||||
return null;
|
||||
@@ -93,8 +99,12 @@ export class CnameProviderService extends BaseService<CnameProviderEntity> {
|
||||
|
||||
async list(req: ListReq): Promise<any[]> {
|
||||
const list = await super.list(req);
|
||||
const sysPrivateSettings = await this.settingsService.getSetting<SysPrivateSettings>(SysPrivateSettings);
|
||||
|
||||
return [...list, ...CommonProviders];
|
||||
if (sysPrivateSettings.commonCnameEnabled !== false) {
|
||||
return [...list, ...CommonProviders];
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
async info(id: any, infoIgnoreProperty?: any): Promise<any | null> {
|
||||
|
||||
@@ -135,5 +135,6 @@ export class RoleService extends BaseService<RoleEntity> {
|
||||
if (urs.length > 0) {
|
||||
throw new Error('该角色已被用户使用,无法删除');
|
||||
}
|
||||
await this.deleteWhere({ id: In(idArr) });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,26 @@
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from '@certd/pipeline';
|
||||
import { CertInfo, CertReader } from '@certd/plugin-cert';
|
||||
import { isDev } from '../../../utils/env.js';
|
||||
import { isDev } from '@certd/basic';
|
||||
|
||||
@IsTaskPlugin({
|
||||
name: 'demoTest',
|
||||
title: 'Demo测试插件',
|
||||
icon: 'clarity:plugin-line',
|
||||
//插件分组
|
||||
group: pluginGroups.other.key,
|
||||
default: {
|
||||
strategy: {
|
||||
runStrategy: RunStrategy.SkipWhenSucceed,
|
||||
},
|
||||
},
|
||||
// 你开发的插件要删除此项,否则不会在生产环墋中显示
|
||||
deprecated: isDev() ? '测试插件,生产环境不显示' : undefined,
|
||||
})
|
||||
export class DemoTestPlugin extends AbstractTaskPlugin {
|
||||
//测试参数
|
||||
@TaskInput({
|
||||
title: '属性示例',
|
||||
value: '默认值',
|
||||
component: {
|
||||
//前端组件配置,具体配置见组件文档 https://www.antdv.com/components/input-cn
|
||||
name: 'a-input',
|
||||
@@ -57,7 +61,7 @@ export class DemoTestPlugin extends AbstractTaskPlugin {
|
||||
name: 'output-selector',
|
||||
from: ['CertApply', 'CertApplyLego'],
|
||||
},
|
||||
// required: true,
|
||||
// required: true, // 必填
|
||||
})
|
||||
cert!: CertInfo;
|
||||
|
||||
@@ -70,6 +74,7 @@ export class DemoTestPlugin extends AbstractTaskPlugin {
|
||||
type: 'demo', //固定授权类型
|
||||
},
|
||||
// rules: [{ required: true, message: '此项必填' }],
|
||||
// required: true, //必填
|
||||
})
|
||||
accessId!: string;
|
||||
|
||||
@@ -98,8 +103,5 @@ export class DemoTestPlugin extends AbstractTaskPlugin {
|
||||
this.logger.info('授权id:', accessId);
|
||||
}
|
||||
}
|
||||
//TODO 这里实例化插件,进行注册
|
||||
if (isDev()) {
|
||||
//你的实现 要去掉这个if,不然生产环境将不会显示
|
||||
new DemoTestPlugin();
|
||||
}
|
||||
//实例化一下,注册插件
|
||||
new DemoTestPlugin();
|
||||
|
||||
Reference in New Issue
Block a user