From 74a1873e589890a10a896b7c2223c426019d67a2 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Mon, 21 Oct 2024 11:15:41 +0800 Subject: [PATCH 01/17] chore: 1 --- packages/core/basic/src/utils/util.request.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/core/basic/src/utils/util.request.ts b/packages/core/basic/src/utils/util.request.ts index 2bf994d4..6785654a 100644 --- a/packages/core/basic/src/utils/util.request.ts +++ b/packages/core/basic/src/utils/util.request.ts @@ -72,7 +72,10 @@ export function createAxiosService({ logger }: { logger: Logger }) { // 请求拦截 service.interceptors.request.use( (config: any) => { - logger.info(`http request:${config.url},method:${config.method},params:${JSON.stringify(config.params)}`); + logger.info(`http request:${config.url},method:${config.method}`); + if (config.logParams !== false) { + logger.info(`params:${JSON.stringify(config.params)}`); + } if (config.timeout == null) { config.timeout = 15000; } @@ -96,7 +99,11 @@ export function createAxiosService({ logger }: { logger: Logger }) { // 响应拦截 service.interceptors.response.use( (response: any) => { - logger.info('http response:', JSON.stringify(response?.data)); + if (response?.config?.logRes !== false) { + logger.info(`http response : status=${response?.status},data=${JSON.stringify(response?.data)}`); + } else { + logger.info('http response status:', response?.status); + } return response.data; }, (error: any) => { @@ -142,6 +149,9 @@ export function createAxiosService({ logger }: { logger: Logger }) { `请求出错:status:${error.response?.status},statusText:${error.response?.statusText},url:${error.config?.url},method:${error.config?.method}。` ); logger.error('返回数据:', JSON.stringify(error.response?.data)); + if (error?.config?.logRes !== false) { + logger.error('返回数据:', JSON.stringify(error.response?.data)); + } if (error.response?.data) { error.message = error.response.data.message || error.response.data.msg || error.response.data.error || error.response.data; } @@ -160,6 +170,8 @@ export type HttpClientResponse = any; export type HttpRequestConfig = { skipSslVerify?: boolean; skipCheckRes?: boolean; + logParams?: boolean; + logRes?: boolean; } & AxiosRequestConfig; export type HttpClient = { request(config: HttpRequestConfig): Promise>; From 4a7018ac2658cdffd5796371481004810a1495fe Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Mon, 21 Oct 2024 18:10:23 +0800 Subject: [PATCH 02/17] chore: 1 --- packages/ui/certd-client/src/views/certd/pipeline/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/certd-client/src/views/certd/pipeline/index.vue b/packages/ui/certd-client/src/views/certd/pipeline/index.vue index fe1e642d..341ddf6a 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/index.vue +++ b/packages/ui/certd-client/src/views/certd/pipeline/index.vue @@ -20,7 +20,7 @@ import createCrudOptions from "./crud"; import { useExpose } from "@fast-crud/fast-crud"; import PiCertdForm from "./certd-form/index.vue"; export default defineComponent({ - name: "PipelineManager", + name: "PipelineManager1", components: { PiCertdForm }, setup() { const certdFormRef = ref(); From 3db216f515ba404cb4330fdab452971b22a50f08 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 22 Oct 2024 01:01:04 +0800 Subject: [PATCH 03/17] =?UTF-8?q?fix:=20=E7=94=B3=E8=AF=B7=E8=AF=81?= =?UTF-8?q?=E4=B9=A6=E6=B2=A1=E6=9C=89=E4=BD=BF=E7=94=A8=E5=88=B0=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E8=AE=BE=E7=BD=AE=E7=9A=84http=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/acme-client/package.json | 1 + packages/core/acme-client/src/agents.js | 101 ++++++++++++++++++ packages/core/acme-client/src/api.js | 1 + packages/core/acme-client/src/axios.js | 35 ++++-- packages/core/acme-client/src/http.js | 14 +-- packages/core/acme-client/src/index.js | 1 + packages/core/acme-client/types/index.d.ts | 1 + packages/core/basic/src/utils/util.request.ts | 12 +++ packages/libs/lib-server/package.json | 1 + .../settings/service/sys-settings-service.ts | 9 +- 10 files changed, 151 insertions(+), 25 deletions(-) create mode 100644 packages/core/acme-client/src/agents.js diff --git a/packages/core/acme-client/package.json b/packages/core/acme-client/package.json index d9dd69ce..5ed6a079 100644 --- a/packages/core/acme-client/package.json +++ b/packages/core/acme-client/package.json @@ -20,6 +20,7 @@ "asn1js": "^3.0.5", "axios": "^1.7.2", "debug": "^4.3.5", + "http-proxy-agent": "^7.0.2", "https-proxy-agent": "^7.0.5", "node-forge": "^1.3.1" }, diff --git a/packages/core/acme-client/src/agents.js b/packages/core/acme-client/src/agents.js new file mode 100644 index 00000000..ca182059 --- /dev/null +++ b/packages/core/acme-client/src/agents.js @@ -0,0 +1,101 @@ +const nodeHttp = require('node:http'); +const https = require('node:https'); +const { HttpProxyAgent } = require('http-proxy-agent'); +const { HttpsProxyAgent } = require('https-proxy-agent'); +const { log } = require('./logger'); + +function createAgent(opts = {}) { + let httpAgent; + let + httpsAgent; + const httpProxy = process.env.HTTP_PROXY || process.env.http_proxy; + if (httpProxy) { + log(`acme use httpProxy:${httpProxy}`); + httpAgent = new HttpProxyAgent(httpProxy, opts); + } + else { + httpAgent = new nodeHttp.Agent(opts); + } + const httpsProxy = process.env.HTTPS_PROXY || process.env.https_proxy; + if (httpsProxy) { + log(`acme use httpsProxy:${httpsProxy}`); + httpsAgent = new HttpsProxyAgent(httpsProxy, opts); + } + else { + httpsAgent = new https.Agent(opts); + } + return { + httpAgent, + httpsAgent, + }; +} + +let defaultAgents = createAgent(); + +function getGlobalAgents() { + return defaultAgents; +} + +function setGlobalProxy(opts) { + log('acme setGlobalProxy:', opts); + if (opts.httpProxy) { + process.env.HTTP_PROXY = opts.httpProxy; + } + if (opts.httpsProxy) { + process.env.HTTPS_PROXY = opts.httpsProxy; + } + + defaultAgents = createAgent(); +} + +class HttpError extends Error { + constructor(error) { + super(error || error.message); + if (!error) { + return; + } + + if (error.message.indexOf('ssl3_get_record:wrong version number') >= 0) { + this.message = 'http协议错误,服务端要求http协议,请检查是否使用了https请求'; + } + + this.name = error.name; + this.code = error.code; + this.cause = error.cause; + + if (error.response) { + this.status = error.response.status; + this.statusText = error.response.statusText; + this.response = { + data: error.response.data, + }; + } + + let url = ''; + if (error.config) { + this.request = { + baseURL: error.config.baseURL, + url: error.config.url, + method: error.config.method, + params: error.config.params, + data: error.config.data, + }; + url = error.config.baseURL + error.config.url; + } + if (url) { + this.message = `${this.message}:${url}`; + } + + delete error.response; + delete error.config; + delete error.request; + // logger.error(error); + } +} + +module.exports = { + setGlobalProxy, + createAgent, + getGlobalAgents, + HttpError, +}; diff --git a/packages/core/acme-client/src/api.js b/packages/core/acme-client/src/api.js index 9c251ca5..70e21b5b 100644 --- a/packages/core/acme-client/src/api.js +++ b/packages/core/acme-client/src/api.js @@ -30,6 +30,7 @@ class AcmeApi { } } } + console.log(locationUrl, mapping); return locationUrl; } diff --git a/packages/core/acme-client/src/axios.js b/packages/core/acme-client/src/axios.js index 84b0cc55..2c54c0f5 100644 --- a/packages/core/acme-client/src/axios.js +++ b/packages/core/acme-client/src/axios.js @@ -1,11 +1,11 @@ /** * Axios instance */ - const axios = require('axios'); const { parseRetryAfterHeader } = require('./util'); const { log } = require('./logger'); const pkg = require('./../package.json'); +const Agents = require('./agents'); const { AxiosError } = axios; @@ -24,8 +24,8 @@ instance.defaults.acmeSettings = { httpsChallengePort: 443, tlsAlpnChallengePort: 443, - retryMaxAttempts: 5, - retryDefaultDelay: 5, + retryMaxAttempts: 3, + retryDefaultDelay: 3, }; // instance.defaults.proxy = { // host: '192.168.34.139', @@ -56,19 +56,26 @@ function isRetryableError(error) { /* https://github.com/axios/axios/blob/main/lib/core/settle.js */ function validateStatus(response) { - const validator = response.config.retryValidateStatus; - + if (!response) { + return new Error('Response is undefined'); + } + let validator = null; + if (response.config) { + validator = response.config.retryValidateStatus; + } if (!response.status || !validator || validator(response.status)) { return response; } - throw new AxiosError( + const err = new AxiosError( `Request failed with status code ${response.status}`, (Math.floor(response.status / 100) === 4) ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE, response.config, response.request, response, ); + + throw new Agents.HttpError(err); } /* Pass all responses through the error interceptor */ @@ -76,8 +83,17 @@ instance.interceptors.request.use((config) => { if (!('retryValidateStatus' in config)) { config.retryValidateStatus = config.validateStatus; } - config.validateStatus = () => false; + + const agents = Agents.getGlobalAgents(); + // if (config.skipSslVerify) { + // logger.info('跳过SSL验证'); + // agents = createAgent({ rejectUnauthorized: false } as any); + // } + // delete config.skipSslVerify; + config.httpsAgent = agents.httpsAgent; + config.httpAgent = agents.httpAgent; + config.proxy = false; // 必须 否则还会走一层代理, return config; }); @@ -86,7 +102,7 @@ instance.interceptors.response.use(null, async (error) => { const { config, response } = error; if (!config) { - return Promise.reject(error); + return Promise.reject(new Agents.HttpError(error)); } /* Pick up errors we want to retry */ @@ -115,6 +131,9 @@ instance.interceptors.response.use(null, async (error) => { } } + if (!response) { + return Promise.reject(new Agents.HttpError(error)); + } /* Validate and return response */ return validateStatus(response); }); diff --git a/packages/core/acme-client/src/http.js b/packages/core/acme-client/src/http.js index d2afec33..2e2915f6 100644 --- a/packages/core/acme-client/src/http.js +++ b/packages/core/acme-client/src/http.js @@ -3,21 +3,9 @@ */ const { createHmac, createSign, constants: { RSA_PKCS1_PADDING } } = require('crypto'); -const { HttpsProxyAgent } = require('https-proxy-agent'); const { getJwk } = require('./crypto'); const { log } = require('./logger'); -const axios1 = require('./axios'); - -const httpsProxy = process.env.HTTPS_PROXY || process.env.https_proxy; -let httpsAgent = null; -if (httpsProxy) { - httpsAgent = new HttpsProxyAgent(httpsProxy); - log(`use https_proxy:${httpsProxy}`); -} -const axios = axios1.create({ - proxy: false, - httpsAgent, -}); +const axios = require('./axios'); /** * ACME HTTP client diff --git a/packages/core/acme-client/src/index.js b/packages/core/acme-client/src/index.js index 65276df4..b0a58842 100644 --- a/packages/core/acme-client/src/index.js +++ b/packages/core/acme-client/src/index.js @@ -39,6 +39,7 @@ exports.forge = require('./crypto/forge'); */ exports.axios = require('./axios'); +exports.agents = require('./agents'); /** * Logger diff --git a/packages/core/acme-client/types/index.d.ts b/packages/core/acme-client/types/index.d.ts index 9178c840..77a0122d 100644 --- a/packages/core/acme-client/types/index.d.ts +++ b/packages/core/acme-client/types/index.d.ts @@ -192,6 +192,7 @@ export const forge: CryptoLegacyInterface; export const axios: AxiosInstance; +export const agents: any; /** * Logger */ diff --git a/packages/core/basic/src/utils/util.request.ts b/packages/core/basic/src/utils/util.request.ts index 6785654a..db9bd67b 100644 --- a/packages/core/basic/src/utils/util.request.ts +++ b/packages/core/basic/src/utils/util.request.ts @@ -35,6 +35,14 @@ export class HttpError extends Error { params: error.config?.params, data: error.config?.data, }; + let url = error.config?.url; + if (error.config?.baseURL) { + url = error.config?.baseURL + url; + } + if (url) { + this.message = `${this.message} : ${url}`; + } + this.response = { data: error.response?.data, }; @@ -62,6 +70,10 @@ export function setGlobalProxy(opts: { httpProxy?: string; httpsProxy?: string } defaultAgents = createAgent(); } +export function getGlobalAgents() { + return defaultAgents; +} + /** * @description 创建请求实例 */ diff --git a/packages/libs/lib-server/package.json b/packages/libs/lib-server/package.json index a2194076..2cf0adea 100644 --- a/packages/libs/lib-server/package.json +++ b/packages/libs/lib-server/package.json @@ -27,6 +27,7 @@ "license": "AGPL", "dependencies": { "@certd/basic": "^1.26.10", + "@certd/acme-client": "^1.26.10", "@certd/pipeline": "^1.26.10", "@midwayjs/cache": "~3.14.0", "@midwayjs/core": "~3.17.1", diff --git a/packages/libs/lib-server/src/system/settings/service/sys-settings-service.ts b/packages/libs/lib-server/src/system/settings/service/sys-settings-service.ts index 5d3f2a8f..7ae277b1 100644 --- a/packages/libs/lib-server/src/system/settings/service/sys-settings-service.ts +++ b/packages/libs/lib-server/src/system/settings/service/sys-settings-service.ts @@ -7,7 +7,7 @@ import { BaseSettings, SysInstallInfo, SysPrivateSettings, SysPublicSettings, Sy import * as _ from 'lodash-es'; import { BaseService } from '../../../basic/index.js'; import { logger, setGlobalProxy } from '@certd/basic'; - +import { agents } from '@certd/acme-client'; /** * 设置 */ @@ -23,7 +23,6 @@ export class SysSettingsService extends BaseService { getRepository() { return this.repository; } - async getById(id: any): Promise { const entity = await this.info(id); if (!entity) { @@ -129,10 +128,12 @@ export class SysSettingsService extends BaseService { async reloadPrivateSettings() { const bean = await this.getPrivateSettings(); if (bean.httpProxy || bean.httpsProxy) { - setGlobalProxy({ + const opts = { httpProxy: bean.httpProxy, httpsProxy: bean.httpsProxy, - }); + }; + setGlobalProxy(opts); + agents.setGlobalProxy(opts); } } From ffeede38afa70c5ff6f2015516bead23d2c4df87 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 22 Oct 2024 11:22:59 +0800 Subject: [PATCH 04/17] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96pfx=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E5=AF=86=E7=A0=81=E8=BE=93=E5=85=A5=E6=A1=86=EF=BC=8C?= =?UTF-8?q?=E8=AE=A9=E6=B5=8F=E8=A7=88=E5=99=A8=E4=B8=8D=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=A1=AB=E5=86=99=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/plugin/cert-plugin/base.ts | 4 +-- .../plugins/common/input-password.vue | 28 +++++++++++++++++++ .../src/components/plugins/index.ts | 2 ++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 packages/ui/certd-client/src/components/plugins/common/input-password.vue diff --git a/packages/plugins/plugin-cert/src/plugin/cert-plugin/base.ts b/packages/plugins/plugin-cert/src/plugin/cert-plugin/base.ts index 36cfd19e..e42b235b 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/base.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/base.ts @@ -50,7 +50,7 @@ export abstract class CertApplyBasePlugin extends AbstractTaskPlugin { @TaskInput({ title: "PFX证书密码", component: { - name: "a-input-password", + name: "input-password", vModel: "value", }, required: false, @@ -227,7 +227,7 @@ export abstract class CertApplyBasePlugin extends AbstractTaskPlugin { * "successNotify": true, * "pfxPassword": "123456" */ - const checkInputChanges = ["domains", "sslProvider", "privateKeyType", "dnsProviderType", "dnsProviderAccess", "pfxPassword"]; + const checkInputChanges = ["domains", "sslProvider", "privateKeyType", "dnsProviderType", "pfxPassword"]; const oldInput = JSON.stringify(pick(this.lastStatus?.input, checkInputChanges)); const thisInput = JSON.stringify(pick(this, checkInputChanges)); inputChanged = oldInput !== thisInput; diff --git a/packages/ui/certd-client/src/components/plugins/common/input-password.vue b/packages/ui/certd-client/src/components/plugins/common/input-password.vue new file mode 100644 index 00000000..6dc42141 --- /dev/null +++ b/packages/ui/certd-client/src/components/plugins/common/input-password.vue @@ -0,0 +1,28 @@ + + + diff --git a/packages/ui/certd-client/src/components/plugins/index.ts b/packages/ui/certd-client/src/components/plugins/index.ts index 6f1f7713..f9d811fe 100644 --- a/packages/ui/certd-client/src/components/plugins/index.ts +++ b/packages/ui/certd-client/src/components/plugins/index.ts @@ -5,6 +5,7 @@ import OutputSelector from "/@/components/plugins/common/output-selector/index.v import DnsProviderSelector from "/@/components/plugins/cert/dns-provider-selector/index.vue"; import DomainsVerifyPlanEditor from "/@/components/plugins/cert/domains-verify-plan-editor/index.vue"; import AccessSelector from "/@/views/certd/access/access-selector/index.vue"; +import InputPassword from "./common/input-password.vue"; export * from "./cert/index.js"; export default { install(app: any) { @@ -16,5 +17,6 @@ export default { app.component("SynologyDeviceIdGetter", SynologyIdDeviceGetter); app.component("RemoteSelect", RemoteSelect); app.component("CertDomainsGetter", CertDomainsGetter); + app.component("InputPassword", InputPassword); } }; From f8b99b81a23e7e9fd5e05ebd5caf355c41d67a90 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 22 Oct 2024 11:23:59 +0800 Subject: [PATCH 05/17] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dgoogle=E8=AF=81?= =?UTF-8?q?=E4=B9=A6*.xx.com=E4=B8=8Exx.com=E5=90=8C=E6=97=B6=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E6=97=B6=E6=8A=A5=E9=94=99=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/acme-client/src/auto.js | 47 ++++++++++++++------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/packages/core/acme-client/src/auto.js b/packages/core/acme-client/src/auto.js index d8ee534e..087d28f2 100644 --- a/packages/core/acme-client/src/auto.js +++ b/packages/core/acme-client/src/auto.js @@ -233,36 +233,39 @@ module.exports = async (client, userOpts) => { return Promise.all(results); } - log(`开始challenge,共${allChallengePromises.length}组`); - let i = 0; - // eslint-disable-next-line no-restricted-syntax - for (const challengePromises of allChallengePromises) { - i += 1; - log(`开始第${i}组`); - if (opts.signal && opts.signal.aborted) { - throw new Error('用户取消'); - } + try { + log(`开始challenge,共${allChallengePromises.length}组`); + let i = 0; + // eslint-disable-next-line no-restricted-syntax + for (const challengePromises of allChallengePromises) { + i += 1; + log(`开始第${i}组`); + if (opts.signal && opts.signal.aborted) { + throw new Error('用户取消'); + } - try { - // eslint-disable-next-line no-await-in-loop - await runPromisePa(challengePromises); - } - catch (e) { - log(`证书申请失败${e.message}`); - throw e; - } - finally { - log(`清理challenge痕迹,length:${clearTasks.length}`); try { // eslint-disable-next-line no-await-in-loop - await runAllPromise(clearTasks); + await runPromisePa(challengePromises); } catch (e) { - log('清理challenge失败'); - log(e); + log(`证书申请失败${e.message}`); + throw e; } } } + finally { + log(`清理challenge痕迹,length:${clearTasks.length}`); + try { + // eslint-disable-next-line no-await-in-loop + await runAllPromise(clearTasks); + } + catch (e) { + log('清理challenge失败'); + log(e); + } + } + log('challenge结束'); // log('[auto] Waiting for challenge valid status'); From a705182b85e51157883e48f23463263793bf3c12 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 22 Oct 2024 11:31:32 +0800 Subject: [PATCH 06/17] =?UTF-8?q?perf:=20=E7=94=B3=E8=AF=B7=E8=AF=81?= =?UTF-8?q?=E4=B9=A6=E5=90=AF=E7=94=A8=E6=96=B0=E7=9A=84=E5=8F=8D=E4=BB=A3?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/pipeline/src/core/executor.ts | 13 +++++++++++++ .../system/settings/service/sys-settings-service.ts | 12 ++++++++++-- .../plugin-cert/src/plugin/cert-plugin/acme.ts | 4 ++-- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/packages/core/pipeline/src/core/executor.ts b/packages/core/pipeline/src/core/executor.ts index 7b2256fc..7f332de8 100644 --- a/packages/core/pipeline/src/core/executor.ts +++ b/packages/core/pipeline/src/core/executor.ts @@ -128,6 +128,10 @@ export class Executor { this.runtime.skip(runnable); return resultType; } + if (resultType == ResultType.disabled) { + this.runtime.disabled(runnable); + return resultType; + } this.runtime.success(runnable); return ResultType.success; } catch (e: any) { @@ -164,12 +168,14 @@ export class Executor { let resList: ResultType[] = []; if (stage.concurrency === ConcurrencyStrategy.Parallel) { + //并行 const pList = []; for (const item of runnerList) { pList.push(item()); } resList = await Promise.all(pList); } else { + //串行 for (let i = 0; i < runnerList.length; i++) { const runner = runnerList[i]; resList[i] = await runner(); @@ -181,6 +187,7 @@ export class Executor { compositionResultType(resList: ResultType[]): ResultType { let hasSuccess = false; let hasSkip = false; + let hasDisabled = false; for (const type of resList) { if (type === ResultType.error) { return ResultType.error; @@ -188,8 +195,14 @@ export class Executor { hasSuccess = true; } else if (type === ResultType.skip) { hasSkip = true; + } else if (type === ResultType.disabled) { + hasDisabled = true; } } + if (!hasSuccess && !hasSkip && hasDisabled) { + //全是disabled + return ResultType.disabled; + } if (!hasSuccess && hasSkip) { //全是跳过 return ResultType.skip; diff --git a/packages/libs/lib-server/src/system/settings/service/sys-settings-service.ts b/packages/libs/lib-server/src/system/settings/service/sys-settings-service.ts index 7ae277b1..6d89ffbb 100644 --- a/packages/libs/lib-server/src/system/settings/service/sys-settings-service.ts +++ b/packages/libs/lib-server/src/system/settings/service/sys-settings-service.ts @@ -150,10 +150,10 @@ export class SysSettingsService extends BaseService { async backupSecret() { const settings = await this.getSettingByKey(SysSecretBackup.__key__); + const privateSettings = await this.getPrivateSettings(); + const installInfo = await this.getSetting(SysInstallInfo); if (settings == null) { const backup = new SysSecretBackup(); - const privateSettings = await this.getPrivateSettings(); - const installInfo = await this.getSetting(SysInstallInfo); if (installInfo.siteId == null || privateSettings.encryptSecret == null) { logger.error('备份密钥失败,siteId或encryptSecret为空'); return; @@ -162,6 +162,14 @@ export class SysSettingsService extends BaseService { backup.encryptSecret = privateSettings.encryptSecret; await this.saveSetting(backup); logger.info('备份密钥成功'); + } else { + //校验是否有变化 + if (settings.siteId !== installInfo.siteId) { + throw new Error(`siteId与备份不一致,可能是数据异常,请检查:backup=${settings.siteId}, current=${installInfo.siteId}`); + } + if (settings.encryptSecret !== privateSettings.encryptSecret) { + throw new Error('encryptSecret与备份不一致,可能是数据异常,请检查'); + } } } } diff --git a/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts b/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts index 14402024..0160094c 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts @@ -92,8 +92,8 @@ export class AcmeService { const urlMapping: UrlMapping = { enabled: false, mappings: { - "acme-v02.api.letsencrypt.org": this.options.reverseProxy || "letsencrypt.proxy.handsfree.work", - "dv.acme-v02.api.pki.goog": this.options.reverseProxy || "google.proxy.handsfree.work", + "acme-v02.api.letsencrypt.org": this.options.reverseProxy || "le.px.certd.handfree.work", + "dv.acme-v02.api.pki.goog": this.options.reverseProxy || "gg.px.certd.handfree.work", }, }; const conf = await this.getAccountConfig(email, urlMapping); From 41d9c3ac8398def541e65351cbe920d4a927182d Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 22 Oct 2024 16:21:35 +0800 Subject: [PATCH 07/17] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E8=AF=81?= =?UTF-8?q?=E4=B9=A6=E7=94=B3=E8=AF=B7=E9=80=9F=E5=BA=A6=E5=92=8C=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E7=8E=87=EF=BC=8C=E5=8F=8D=E4=BB=A3=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8Cgoogle=E5=9F=BA=E6=9C=AC=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E7=A8=B3=E5=AE=9A=E8=AF=B7=E6=B1=82=E3=80=82=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=AF=B7=E6=B1=82=E9=87=8D=E8=AF=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/guide/use/rerun/images/rerun.png | Bin 0 -> 10792 bytes docs/guide/use/rerun/index.md | 5 +++ packages/core/acme-client/src/auto.js | 40 +++++++++++++++--- packages/core/acme-client/src/client.js | 1 + packages/core/acme-client/src/logger.js | 6 +-- packages/core/acme-client/types/index.d.ts | 1 + .../src/plugin/cert-plugin/acme.ts | 14 +++--- .../certd-client/src/router/source/header.ts | 5 ++- .../ui/certd-client/src/style/common.less | 3 ++ .../views/certd/pipeline/pipeline/index.vue | 5 ++- .../plugins/plugin-cloudflare/dns-provider.ts | 4 ++ 11 files changed, 66 insertions(+), 18 deletions(-) create mode 100644 docs/guide/use/rerun/images/rerun.png create mode 100644 docs/guide/use/rerun/index.md diff --git a/docs/guide/use/rerun/images/rerun.png b/docs/guide/use/rerun/images/rerun.png new file mode 100644 index 0000000000000000000000000000000000000000..41f85302167f81faecc63f3c1d3535d2ddedf3fd GIT binary patch literal 10792 zcmZ8{by$>N(6)k#NC{HXB?wB#0!z12A|)j#t-#W;lyonhOGr0J$cnHawWP4b(kv3v z>=H}YhrjoI|M~uTu5(@IJoDVo%$YOy%$%qv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S&jX}syn?it6sL~6M5NzxD+!S;p*g-{t)0)-` zEoe@3Bns!6V4qGT5rxtL%&u{Nr=-0Wrcsux!v9w+bX4Sg{g8riGqfnl$40Sahefy> z>_xL?ajV&JG&1H1Cp+zUYlycz?4XB>Ve=uuE7(cTr zWCXdrVD{xUUE{P82q{#JpPZWNrE-p7f2PLDK{58q<{f3`SH+%ZqtFCUP|&~pf$(X3 z(87Z&VycTG21vHOZo6%`d(u;Cwq#ek=1}mHgI$XZ(zOx*Yax#$5I8qCw<+`C_=5z4 z#Fy245ZHv@Yf!0`($p1BcsBW5dLWqv%3FEp}j4%G5G|!^;x%yjGMbV?bLwi-z*&k{E@}vp}%i9ap1$lbyc()m&pr7k)!<13Yb|jaPmNtR8-qQUK zcfuXD5I&D|Dhm9~AP$NA08*FJmIY}A9EOyUff61C*&CtyUfCWUOm=|GSDe;oc8>jc z`wIR!_xIzyUhPC4A>Z&9?8=~zkB=}0EsuGdyFMtuO8Q%$BE;dm?iI{_h2$-kDQ<7C zI`;)+!>A+1=a!xuWur+|`Ybn(zSOot+Vp9 { authorizations.forEach((authz) => { const d = authz.identifier.value; + log(`authorization:domain = ${d}, value = ${JSON.stringify(authz)}`); + + if (authz.status === 'valid') { + log(`[auto] [${d}] Authorization already has valid status, no need to complete challenges`); + return; + } let setd = false; // eslint-disable-next-line no-restricted-syntax for (const group of domainSets) { if (!group[d]) { group[d] = authz; setd = true; + break; } } if (!setd) { @@ -197,6 +204,8 @@ module.exports = async (client, userOpts) => { } }); + // log(`domainSets:${JSON.stringify(domainSets)}`); + const allChallengePromises = []; // eslint-disable-next-line no-restricted-syntax for (const domainSet of domainSets) { @@ -252,17 +261,34 @@ module.exports = async (client, userOpts) => { log(`证书申请失败${e.message}`); throw e; } + finally { + if (client.opts.sslProvider !== 'google') { + // letsencrypt 如果同时检出两个TXT记录,会以第一个为准,就会校验失败,所以需要提前删除 + log(`清理challenge痕迹,length:${clearTasks.length}`); + try { + // eslint-disable-next-line no-await-in-loop + await runAllPromise(clearTasks); + } + catch (e) { + log('清理challenge失败'); + log(e); + } + } + } } } finally { - log(`清理challenge痕迹,length:${clearTasks.length}`); - try { + if (client.opts.sslProvider === 'google') { + // google 相同的域名txt记录是一样的,不能提前删除,否则校验失败 + log(`清理challenge痕迹,length:${clearTasks.length}`); + try { // eslint-disable-next-line no-await-in-loop - await runAllPromise(clearTasks); - } - catch (e) { - log('清理challenge失败'); - log(e); + await runAllPromise(clearTasks); + } + catch (e) { + log('清理challenge失败'); + log(e); + } } } diff --git a/packages/core/acme-client/src/client.js b/packages/core/acme-client/src/client.js index f32cd17c..f96adc37 100644 --- a/packages/core/acme-client/src/client.js +++ b/packages/core/acme-client/src/client.js @@ -558,6 +558,7 @@ class AcmeClient { const verifyFn = async (abort) => { if (this.opts.signal && this.opts.signal.aborted) { + abort(); throw new Error('用户取消'); } diff --git a/packages/core/acme-client/src/logger.js b/packages/core/acme-client/src/logger.js index 3659c517..166a7a9c 100644 --- a/packages/core/acme-client/src/logger.js +++ b/packages/core/acme-client/src/logger.js @@ -22,7 +22,7 @@ exports.setLogger = (fn) => { * @param {string} msg Message */ -exports.log = (msg) => { - debug(msg); - logger(msg); +exports.log = (...msg) => { + debug(...msg); + logger(...msg); }; diff --git a/packages/core/acme-client/types/index.d.ts b/packages/core/acme-client/types/index.d.ts index 77a0122d..56e4cf11 100644 --- a/packages/core/acme-client/types/index.d.ts +++ b/packages/core/acme-client/types/index.d.ts @@ -37,6 +37,7 @@ export type UrlMapping={ */ export interface ClientOptions { + sslProvider:string; directoryUrl: string; accountKey: PrivateKeyBuffer | PrivateKeyString; accountUrl?: string; diff --git a/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts b/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts index 0160094c..79784e04 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts @@ -89,12 +89,15 @@ export class AcmeService { } async getAcmeClient(email: string, isTest = false): Promise { + const mappings = {}; + if (this.sslProvider === "google") { + mappings["acme-v02.api.letsencrypt.org"] = this.options.reverseProxy || "le.px.certd.handfree.work"; + } else if (this.sslProvider === "letsencrypt") { + mappings["dv.acme-v02.api.pki.goog"] = this.options.reverseProxy || "gg.px.certd.handfree.work"; + } const urlMapping: UrlMapping = { enabled: false, - mappings: { - "acme-v02.api.letsencrypt.org": this.options.reverseProxy || "le.px.certd.handfree.work", - "dv.acme-v02.api.pki.goog": this.options.reverseProxy || "gg.px.certd.handfree.work", - }, + mappings, }; const conf = await this.getAccountConfig(email, urlMapping); if (conf.key == null) { @@ -119,6 +122,7 @@ export class AcmeService { } } const client = new acme.Client({ + sslProvider: this.sslProvider, directoryUrl: directoryUrl, accountKey: conf.key, accountUrl: conf.accountUrl, @@ -172,7 +176,7 @@ export class AcmeService { this.logger.info(`Would create TXT record "${fullRecord}" with value "${recordValue}"`); let domain = parseDomain(fullDomain); - this.logger.info("解析到域名domain=", domain); + this.logger.info("解析到域名domain=" + domain); if (domainsVerifyPlan) { //按照计划执行 diff --git a/packages/ui/certd-client/src/router/source/header.ts b/packages/ui/certd-client/src/router/source/header.ts index 7467caef..5a074857 100644 --- a/packages/ui/certd-client/src/router/source/header.ts +++ b/packages/ui/certd-client/src/router/source/header.ts @@ -1,7 +1,10 @@ export const headerResource = [ { title: "文档", - path: "https://certd.docmirror.cn" + path: "https://certd.docmirror.cn", + meta: { + icon: "ion:document-text-outline" + }, }, { title: "源码", diff --git a/packages/ui/certd-client/src/style/common.less b/packages/ui/certd-client/src/style/common.less index 13d8b97c..361011c2 100644 --- a/packages/ui/certd-client/src/style/common.less +++ b/packages/ui/certd-client/src/style/common.less @@ -170,6 +170,9 @@ h1, h2, h3, h4, h5, h6 { color: #1890ff; } +.iconify{ + //font-size: 16px; +} .icon-box { display: inline-flex; diff --git a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue index 3f5ec18c..70e69d7c 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue +++ b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue @@ -101,8 +101,9 @@ diff --git a/packages/ui/certd-server/src/plugins/plugin-cloudflare/dns-provider.ts b/packages/ui/certd-server/src/plugins/plugin-cloudflare/dns-provider.ts index f4b1ce1f..fe67282a 100644 --- a/packages/ui/certd-server/src/plugins/plugin-cloudflare/dns-provider.ts +++ b/packages/ui/certd-server/src/plugins/plugin-cloudflare/dns-provider.ts @@ -37,8 +37,12 @@ export class CloudflareDnsProvider extends AbstractDnsProvider } async getZoneId(domain: string) { + this.logger.info('获取zoneId:', domain); const url = `https://api.cloudflare.com/client/v4/zones?name=${domain}`; const res = await this.doRequestApi(url, null, 'get'); + if (res.result.length === 0) { + throw new Error(`未找到域名${domain}的zoneId`); + } return res.result[0].id; } From 2b89fba7eb9001b0a5290b256870f9e9547b7122 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 22 Oct 2024 16:28:38 +0800 Subject: [PATCH 08/17] chore: --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 8710a89b..e941e6ad 100644 --- a/docs/index.md +++ b/docs/index.md @@ -28,7 +28,7 @@ features: - title: 多域名、泛域名打到一个证书上 details: 支持通配符域名/泛域名,支持多个域名打到一个证书上 - title: 多证书格式支持 - details: 支持pem、pfx、der等多种证书格式 + details: 支持pem、pfx、der等多种证书格式,支持Google、Letsencrypt、ZeroSSL证书颁发机构 - title: 支持私有化部署 details: 保障数据安全 - title: 多数据库支持 From 18ee87daff6eafc2201b58e28d85aafd3cb7a5b9 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 22 Oct 2024 18:45:56 +0800 Subject: [PATCH 09/17] =?UTF-8?q?fix:=20=E5=85=81=E8=AE=B8=E4=B8=83?= =?UTF-8?q?=E7=89=9B=E4=BA=91cdn=E6=8F=92=E4=BB=B6=E8=BE=93=E5=85=A5.?= =?UTF-8?q?=E5=8F=B7=E5=BC=80=E5=A4=B4=E7=9A=84=E9=80=9A=E9=85=8D=E7=AC=A6?= =?UTF-8?q?=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../validator/__tests__/validator.spec.ts | 44 +++++++++++++++++++ .../src/plugin/validator/index.ts | 9 +++- .../plugin/deploy-to-cdn/index.ts | 4 +- 3 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 packages/ui/certd-client/src/plugin/validator/__tests__/validator.spec.ts diff --git a/packages/ui/certd-client/src/plugin/validator/__tests__/validator.spec.ts b/packages/ui/certd-client/src/plugin/validator/__tests__/validator.spec.ts new file mode 100644 index 00000000..133030c1 --- /dev/null +++ b/packages/ui/certd-client/src/plugin/validator/__tests__/validator.spec.ts @@ -0,0 +1,44 @@ +import { describe, expect, it } from "vitest"; +import { isDomain } from "/@/plugin/validator"; + +describe("domain_validator", () => { + it("ok", () => { + const value = ["a.cc.com", "*.zz.com", "a.cc.com"]; + const v = isDomain({}, value); + expect(v).to.be.true; + }); + + it("allowDotStart", () => { + let value = ["&.cc.com"]; + function test() { + return isDomain({ allowDotStart: true }, value); + } + expect(test).to.throw(Error, "域名有误:&.cc.com,请输入正确的域名"); + + value = ["a,cc.com"]; + expect(test).to.throw(Error, "域名有误:a,cc.com,请输入正确的域名"); + + value = ["&cc.com"]; + expect(test).to.throw(Error, "域名有误:&cc.com,请输入正确的域名"); + + value = [".cc.com"]; + expect(test()).to.be.true; + }); + + it("default", () => { + let value = ["&.cc.com"]; + function test() { + return isDomain({ allowDotStart: false }, value); + } + expect(test).to.throw(Error, "域名有误:&.cc.com,请输入正确的域名"); + + value = ["&cc.com"]; + expect(test).to.throw(Error, "域名有误:&cc.com,请输入正确的域名"); + + value = ["a,cc.com"]; + expect(test).to.throw(Error, "域名有误:a,cc.com,请输入正确的域名"); + + value = [".cc.com"]; + expect(test).to.throw(Error, "域名有误:.cc.com,请输入正确的域名"); + }); +}); diff --git a/packages/ui/certd-client/src/plugin/validator/index.ts b/packages/ui/certd-client/src/plugin/validator/index.ts index b0f0a156..b61d7cf1 100644 --- a/packages/ui/certd-client/src/plugin/validator/index.ts +++ b/packages/ui/certd-client/src/plugin/validator/index.ts @@ -1,6 +1,6 @@ import Validator from "async-validator"; // 自定义验证器函数 -function isDomain(rule, value) { +export function isDomain(rule: any, value: any) { if (value == null) { return true; } @@ -8,9 +8,14 @@ function isDomain(rule, value) { if (typeof value === "string") { domains = value.split(","); } + + const allowDotStart = rule.allowDotStart ? "\\.|" : ""; + const exp = `^(?:${allowDotStart}\\*\\.|[0-9a-zA-Z\u4e00-\u9fa5-]+\\.)+[0-9a-zA-Z\u4e00-\u9fa5-]+$`; + const compiled = new RegExp(exp); for (const domain of domains) { //域名可以是泛域名,中文域名,数字域名,英文域名,域名中可以包含-和. ,可以_开头 - if (!/^(?:\*\.|[0-9a-zA-Z\u4e00-\u9fa5-]+\.)+[0-9a-zA-Z\u4e00-\u9fa5-]+$/.test(domain)) { + + if (!compiled.test(domain)) { throw new Error(`域名有误:${domain},请输入正确的域名`); } } diff --git a/packages/ui/certd-server/src/plugins/plugin-qiniu/plugin/deploy-to-cdn/index.ts b/packages/ui/certd-server/src/plugins/plugin-qiniu/plugin/deploy-to-cdn/index.ts index 338486cf..97f655aa 100644 --- a/packages/ui/certd-server/src/plugins/plugin-qiniu/plugin/deploy-to-cdn/index.ts +++ b/packages/ui/certd-server/src/plugins/plugin-qiniu/plugin/deploy-to-cdn/index.ts @@ -7,7 +7,7 @@ import { CertInfo } from '@certd/plugin-cert'; title: '部署证书至七牛CDN', icon: 'svg:icon-qiniuyun', group: pluginGroups.cdn.key, - desc: '自动部署域名证书至七牛云CDN,七牛云OSS', + desc: '自动部署域名证书至七牛云CDN', default: { strategy: { runStrategy: RunStrategy.SkipWhenSucceed, @@ -25,7 +25,7 @@ export class QiniuDeployCertToCDN extends AbstractTaskPlugin { open: false, tokenSeparators: [',', ' ', ',', '、', '|'], }, - rules: [{ type: 'domains' }], + rules: [{ type: 'domains', allowDotStart: true }], required: true, }) domainName!: string | string[]; From 09847ce074a1638c31cac1770ee6f516e8b14440 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 22 Oct 2024 18:46:29 +0800 Subject: [PATCH 10/17] =?UTF-8?q?pref:=20=E5=85=81=E8=AE=B8=E5=BF=BD?= =?UTF-8?q?=E7=95=A5=E8=87=AA=E7=AD=BE=E8=AF=81=E4=B9=A6=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/basic/src/utils/util.request.ts | 13 +++++++++---- packages/ui/certd-client/package.json | 5 ++++- packages/ui/certd-client/src/api/service.ts | 6 ++++-- packages/ui/certd-client/src/api/tools.ts | 15 ++++++++++----- .../components/plugins/common/remote-select.vue | 5 +++-- 5 files changed, 30 insertions(+), 14 deletions(-) diff --git a/packages/core/basic/src/utils/util.request.ts b/packages/core/basic/src/utils/util.request.ts index db9bd67b..1167f885 100644 --- a/packages/core/basic/src/utils/util.request.ts +++ b/packages/core/basic/src/utils/util.request.ts @@ -5,6 +5,7 @@ import { HttpProxyAgent } from 'http-proxy-agent'; import { HttpsProxyAgent } from 'https-proxy-agent'; import nodeHttp from 'http'; import * as https from 'node:https'; +import { merge } from 'lodash-es'; export class HttpError extends Error { status?: number; statusText?: string; @@ -40,7 +41,7 @@ export class HttpError extends Error { url = error.config?.baseURL + url; } if (url) { - this.message = `${this.message} : ${url}`; + this.message = `${this.message} : url=${url}`; } this.response = { @@ -99,6 +100,11 @@ export function createAxiosService({ logger }: { logger: Logger }) { delete config.skipSslVerify; config.httpsAgent = agents.httpsAgent; config.httpAgent = agents.httpAgent; + + // const agent = new https.Agent({ + // rejectUnauthorized: false // 允许自签名证书 + // }); + // config.httpsAgent = agent; config.proxy = false; //必须 否则还会走一层代理, return config; }, @@ -161,9 +167,6 @@ export function createAxiosService({ logger }: { logger: Logger }) { `请求出错:status:${error.response?.status},statusText:${error.response?.statusText},url:${error.config?.url},method:${error.config?.method}。` ); logger.error('返回数据:', JSON.stringify(error.response?.data)); - if (error?.config?.logRes !== false) { - logger.error('返回数据:', JSON.stringify(error.response?.data)); - } if (error.response?.data) { error.message = error.response.data.message || error.response.data.msg || error.response.data.error || error.response.data; } @@ -195,6 +198,7 @@ export function createAgent(opts: nodeHttp.AgentOptions = {}) { if (httpProxy) { logger.info('use httpProxy:', httpProxy); httpAgent = new HttpProxyAgent(httpProxy, opts as any); + merge(httpAgent.options, opts); } else { httpAgent = new nodeHttp.Agent(opts); } @@ -202,6 +206,7 @@ export function createAgent(opts: nodeHttp.AgentOptions = {}) { if (httpsProxy) { logger.info('use httpsProxy:', httpsProxy); httpsAgent = new HttpsProxyAgent(httpsProxy, opts as any); + merge(httpsAgent.options, opts); } else { httpsAgent = new https.Agent(opts); } diff --git a/packages/ui/certd-client/package.json b/packages/ui/certd-client/package.json index 815afe0e..8dd8280c 100644 --- a/packages/ui/certd-client/package.json +++ b/packages/ui/certd-client/package.json @@ -11,6 +11,7 @@ "debug:force": "vite --force --mode debug", "build": " vite build ", "dev-build": "echo 1", + "test:unit": "vitest", "serve": "vite preview", "preview": "vite preview", "pretty-quick": "pretty-quick", @@ -114,7 +115,9 @@ "vite-plugin-html": "^3.2.2", "vite-plugin-windicss": "^1.9.3", "vue-eslint-parser": "^9.4.2", - "vue-tsc": "^1.8.8" + "vue-tsc": "^1.8.8", + "@vue/test-utils": "^2.4.6", + "vitest": "^2.1.2" }, "husky": { "hooks": { diff --git a/packages/ui/certd-client/src/api/service.ts b/packages/ui/certd-client/src/api/service.ts index b5285cf2..0a7c91b2 100644 --- a/packages/ui/certd-client/src/api/service.ts +++ b/packages/ui/certd-client/src/api/service.ts @@ -53,7 +53,9 @@ function createService() { // @ts-ignore response.config.onError(new Error(errorMessage)); } - errorCreate(`${errorMessage}: ${response.config.url}`); + //@ts-ignore + const showErrorNotify = response?.config?.showErrorNotify; + errorCreate(`${errorMessage}: ${response.config.url}`, showErrorNotify); return dataAxios; } } @@ -97,7 +99,7 @@ function createService() { default: break; } - errorLog(error); + errorLog(error, error?.response?.config?.showErrorNotify); if (status === 401) { const userStore = useUserStore(); userStore.logout(); diff --git a/packages/ui/certd-client/src/api/tools.ts b/packages/ui/certd-client/src/api/tools.ts index f389e203..08d80890 100644 --- a/packages/ui/certd-client/src/api/tools.ts +++ b/packages/ui/certd-client/src/api/tools.ts @@ -48,7 +48,7 @@ export function responseError(data = {}, msg = "请求失败", code = 500) { * @description 记录和显示错误 * @param {Error} error 错误对象 */ -export function errorLog(error: any) { +export function errorLog(error: any, notify = true) { // 打印到控制台 console.error("errorLog", error); let message = error.message; @@ -58,17 +58,22 @@ export function errorLog(error: any) { if (message.indexOf("ssl3_get_record:wrong version number") >= 0) { message = "http协议错误,服务端要求http协议,请检查是否使用了https请求"; } - // 显示提示 - uiContext.get().notification.error({ message }); + if (notify) { + // 显示提示 + uiContext.get().notification.error({ message }); + } } /** * @description 创建一个错误 * @param {String} msg 错误信息 */ -export function errorCreate(msg: string) { +export function errorCreate(msg: string, notify = true) { const err = new Error(msg); console.error("errorCreate", err); - uiContext.get().notification.error({ message: err.message }); + if (notify) { + uiContext.get().notification.error({ message: err.message }); + } + throw err; } diff --git a/packages/ui/certd-client/src/components/plugins/common/remote-select.vue b/packages/ui/certd-client/src/components/plugins/common/remote-select.vue index 3ea47918..360ec6ea 100644 --- a/packages/ui/certd-client/src/components/plugins/common/remote-select.vue +++ b/packages/ui/certd-client/src/components/plugins/common/remote-select.vue @@ -43,6 +43,7 @@ const attrs = useAttrs(); const optionsRef = ref([]); const message = ref(""); const getOptions = async () => { + message.value = ""; const res = await doRequest( { type: props.type, @@ -53,10 +54,10 @@ const getOptions = async () => { { onError(err: any) { message.value = `获取选项出错:${err.message}`; - } + }, + showErrorNotify: false } ); - message.value = ""; return res; }; From 1291e98e821c5b1810aab7f0aebe3f5f5cd44a20 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 22 Oct 2024 19:13:47 +0800 Subject: [PATCH 11/17] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pipeline/component/task-view/index.vue | 39 +++++++++++++++++-- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-view/index.vue b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-view/index.vue index d4900313..54b13b17 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-view/index.vue +++ b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-view/index.vue @@ -8,7 +8,11 @@ -
+
+ +
@@ -57,7 +61,20 @@ export default { if (currentHistory?.value?.logs != null) { node.logs = computed(() => { if (currentHistory?.value?.logs && currentHistory.value?.logs[node.node.id] != null) { - return currentHistory.value?.logs[node.node.id]; + const logs = currentHistory.value?.logs[node.node.id]; + const list = []; + for (let log of logs) { + const index = log.indexOf("]", 27) + 1; + const time = log.substring(0, index); + const content = log.substring(index); + const color = time.includes("ERROR") ? "red" : time.includes("WARN") ? "yellow" : "green"; + list.push({ + time, + content, + color + }); + } + return list; } return []; }); @@ -92,6 +109,7 @@ export default { .pi-task-view { .tab-title { display: flex; + .tab-title-text { display: inline-block; width: 180px; @@ -104,11 +122,26 @@ export default { .pi-task-view-logs { background-color: #000c17; - color: #fafafa; + color: #e9e9e9; + font-family: monospace; + padding: 5px; min-height: 300px; max-height: 580px; white-space: pre-wrap; word-wrap: break-word; + > div { + padding: 0; + margin: 0; + } + .green { + color: rgba(0, 255, 0, 0.8); + } + .yellow { + color: yellow; + } + .red { + color: red; + } } } From 4ea3edd59e93ca4f5b2e43b20dd4ef33909caddb Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Wed, 23 Oct 2024 09:38:03 +0800 Subject: [PATCH 12/17] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E4=BB=BB=E5=8A=A1=E5=90=8E=E5=87=BA=E7=8E=B0=E7=A9=BA?= =?UTF-8?q?=E9=98=B6=E6=AE=B5=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/certd-client/src/views/certd/pipeline/crud.tsx | 3 ++- .../src/views/certd/pipeline/pipeline/index.vue | 8 +++++++- .../views/certd/pipeline/pipeline/utils/util.status.ts | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx b/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx index 7b006f4c..7b83032d 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx @@ -13,7 +13,8 @@ import { useSettingStore } from "/@/store/modules/settings"; import _ from "lodash-es"; import { useModal } from "/@/use/use-modal"; import CertView from "./cert-view.vue"; -import { eachRunnable, eachStages } from "./utils"; +import { eachStages } from "./utils"; + export default function ({ crudExpose, context: { certdFormRef } }: CreateCrudOptionsProps): CreateCrudOptionsRet { const router = useRouter(); const { t } = useI18n(); diff --git a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue index 70e69d7c..6066f745 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue +++ b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue @@ -264,7 +264,7 @@ import _ from "lodash-es"; import { message, Modal, notification } from "ant-design-vue"; import { nanoid } from "nanoid"; import { PipelineDetail, PipelineOptions, PluginGroups, RunHistory } from "./type"; -import type { Runnable } from "@certd/pipeline"; +import type { Runnable, Stage } from "@certd/pipeline"; import PiHistoryTimelineItem from "/@/views/certd/pipeline/pipeline/component/history-timeline-item.vue"; import { FsIcon } from "@fast-crud/fast-crud"; import { useSettingStore } from "/@/store/modules/settings"; @@ -633,6 +633,12 @@ export default defineComponent({ } pipeline.value.version++; currentPipeline.value = pipeline.value; + + //移除空阶段 + _.remove(pipeline.value.stages, (item: Stage) => { + return item.tasks.length === 0; + }); + await props.options.doSave(pipeline.value); } toggleEditMode(false); diff --git a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/utils/util.status.ts b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/utils/util.status.ts index 54c8c1ed..a655b5fd 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/utils/util.status.ts +++ b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/utils/util.status.ts @@ -4,6 +4,7 @@ export type StatusEnumItem = { color: string; icon: string; spin?: boolean; + iconSpin?: boolean; }; export type StatusEnumType = { [key: string]: StatusEnumItem; @@ -34,13 +35,13 @@ const StatusEnum: StatusEnumType = { label: "运行中", color: "blue", spin: true, + iconSpin: true, icon: "ant-design:sync-outlined" }, canceled: { value: "canceled", label: "已取消", color: "yellow", - spin: true, icon: "ant-design:minus-circle-twotone" }, none: { From 3681d89a61d8c4465ffb59fe2889a5e281926639 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Wed, 23 Oct 2024 10:34:55 +0800 Subject: [PATCH 13/17] chore: --- packages/core/acme-client/src/auto.js | 7 ++++++- .../plugin-cert/src/plugin/cert-plugin/acme.ts | 4 ++-- .../plugins/cert/domains-verify-plan-editor/api.ts | 6 ++++-- .../domains-verify-plan-editor/cname-record-info.vue | 11 +++++++---- .../domains-verify-plan-editor/cname-verify-plan.vue | 1 + 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/packages/core/acme-client/src/auto.js b/packages/core/acme-client/src/auto.js index 07635263..dcb47ac4 100644 --- a/packages/core/acme-client/src/auto.js +++ b/packages/core/acme-client/src/auto.js @@ -264,6 +264,7 @@ module.exports = async (client, userOpts) => { finally { if (client.opts.sslProvider !== 'google') { // letsencrypt 如果同时检出两个TXT记录,会以第一个为准,就会校验失败,所以需要提前删除 + // zerossl 此方式测试无问题 log(`清理challenge痕迹,length:${clearTasks.length}`); try { // eslint-disable-next-line no-await-in-loop @@ -279,7 +280,11 @@ module.exports = async (client, userOpts) => { } finally { if (client.opts.sslProvider === 'google') { - // google 相同的域名txt记录是一样的,不能提前删除,否则校验失败 + // google 相同的域名txt记录是一样的,不能提前删除,否则校验失败,报错如下 + // Error: The TXT record retrieved from _acme-challenge.bbc.handsfree.work. + // at the time the challenge was validated did not contain JshHVu7dt_DT6uYILWhokHefFVad2Q6Mw1L-fNZFcq8 + // (the base64url-encoded SHA-256 digest of RlJZNBR0LWnxNK_xd2zqtYVvCiNJOKJ3J1NmCjU_9BjaUJgL3k-qSpIhQ-uF4FBS.NRyqT8fRiq6THzzrvkgzgR5Xai2LsA2SyGLAq_wT3qc). + // See https://tools.ietf.org/html/rfc8555#section-8.4 for more information. log(`清理challenge痕迹,length:${clearTasks.length}`); try { // eslint-disable-next-line no-await-in-loop diff --git a/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts b/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts index 79784e04..cb00d9d7 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts @@ -90,9 +90,9 @@ export class AcmeService { async getAcmeClient(email: string, isTest = false): Promise { const mappings = {}; - if (this.sslProvider === "google") { + if (this.sslProvider === "letsencrypt") { mappings["acme-v02.api.letsencrypt.org"] = this.options.reverseProxy || "le.px.certd.handfree.work"; - } else if (this.sslProvider === "letsencrypt") { + } else if (this.sslProvider === "google") { mappings["dv.acme-v02.api.pki.goog"] = this.options.reverseProxy || "gg.px.certd.handfree.work"; } const urlMapping: UrlMapping = { diff --git a/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/api.ts b/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/api.ts index 85394285..baeaee01 100644 --- a/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/api.ts +++ b/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/api.ts @@ -3,8 +3,10 @@ import { request } from "/src/api/service"; const apiPrefix = "/cname/record"; export type CnameRecord = { - id: number; - status: string; + id?: number; + status?: string; + hostRecord?: string; + recordValue?: string; }; export async function GetList() { diff --git a/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/cname-record-info.vue b/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/cname-record-info.vue index 50e16f69..5050c142 100644 --- a/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/cname-record-info.vue +++ b/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/cname-record-info.vue @@ -7,6 +7,7 @@ + CNAME @@ -44,10 +45,12 @@ const props = defineProps<{ }>(); const emit = defineEmits<{ - change: { - id: number | null; - status: string | null; - }; + change: [ + { + id: number | null; + status: string | null; + } + ]; }>(); const cnameRecord = ref(null); diff --git a/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/cname-verify-plan.vue b/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/cname-verify-plan.vue index 41259ad4..ce4d571e 100644 --- a/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/cname-verify-plan.vue +++ b/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/cname-verify-plan.vue @@ -3,6 +3,7 @@ 主机记录 + 记录类型 请设置CNAME记录(验证成功以后不要删除) 状态 操作 From b2f8ee3836db9d8831bcc781de5e393a8fb91a17 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Wed, 23 Oct 2024 10:35:28 +0800 Subject: [PATCH 14/17] build: prepare to build --- packages/core/basic/build.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/basic/build.md b/packages/core/basic/build.md index b4497168..c8455156 100644 --- a/packages/core/basic/build.md +++ b/packages/core/basic/build.md @@ -1 +1 @@ -12:31 +10:35 From 3a78cb9929fd63bb72f0e00f4389e775c926c789 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Wed, 23 Oct 2024 10:37:06 +0800 Subject: [PATCH 15/17] v1.26.11 --- CHANGELOG.md | 16 ++++++++++++++ lerna.json | 2 +- packages/core/acme-client/CHANGELOG.md | 11 ++++++++++ packages/core/acme-client/package.json | 2 +- packages/core/basic/CHANGELOG.md | 6 ++++++ packages/core/basic/package.json | 2 +- packages/core/pipeline/CHANGELOG.md | 6 ++++++ packages/core/pipeline/package.json | 6 +++--- packages/libs/lib-huawei/CHANGELOG.md | 4 ++++ packages/libs/lib-huawei/package.json | 2 +- packages/libs/lib-iframe/CHANGELOG.md | 4 ++++ packages/libs/lib-iframe/package.json | 2 +- packages/libs/lib-jdcloud/CHANGELOG.md | 4 ++++ packages/libs/lib-jdcloud/package.json | 2 +- packages/libs/lib-k8s/CHANGELOG.md | 4 ++++ packages/libs/lib-k8s/package.json | 4 ++-- packages/libs/lib-server/CHANGELOG.md | 10 +++++++++ packages/libs/lib-server/package.json | 8 +++---- packages/libs/midway-flyway-js/CHANGELOG.md | 4 ++++ packages/libs/midway-flyway-js/package.json | 2 +- packages/plugins/plugin-cert/CHANGELOG.md | 8 +++++++ packages/plugins/plugin-cert/package.json | 8 +++---- packages/ui/certd-client/CHANGELOG.md | 13 +++++++++++ packages/ui/certd-client/package.json | 13 ++++++----- packages/ui/certd-server/CHANGELOG.md | 10 +++++++++ packages/ui/certd-server/package.json | 24 ++++++++++----------- 26 files changed, 138 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22ee3c61..8f38e7e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.26.11](https://github.com/certd/certd/compare/v1.26.10...v1.26.11) (2024-10-23) + +### Bug Fixes + +* 申请证书没有使用到系统设置的http代理的bug ([3db216f](https://github.com/certd/certd/commit/3db216f515ba404cb4330fdab452971b22a50f08)) +* 修复移动任务后出现空阶段的bug ([4ea3edd](https://github.com/certd/certd/commit/4ea3edd59e93ca4f5b2e43b20dd4ef33909caddb)) +* 修复google证书*.xx.com与xx.com同时申请时报错的bug ([f8b99b8](https://github.com/certd/certd/commit/f8b99b81a23e7e9fd5e05ebd5caf355c41d67a90)) +* 允许七牛云cdn插件输入.号开头的通配符域名 ([18ee87d](https://github.com/certd/certd/commit/18ee87daff6eafc2201b58e28d85aafd3cb7a5b9)) + +### Performance Improvements + +* 申请证书启用新的反代地址 ([a705182](https://github.com/certd/certd/commit/a705182b85e51157883e48f23463263793bf3c12)) +* 优化日志颜色 ([1291e98](https://github.com/certd/certd/commit/1291e98e821c5b1810aab7f0aebe3f5f5cd44a20)) +* 优化证书申请速度和成功率,反代地址优化,google基本可以稳定请求。增加请求重试。 ([41d9c3a](https://github.com/certd/certd/commit/41d9c3ac8398def541e65351cbe920d4a927182d)) +* 优化pfx密码密码输入框,让浏览器不自动填写密码 ([ffeede3](https://github.com/certd/certd/commit/ffeede38afa70c5ff6f2015516bead23d2c4df87)) + ## [1.26.10](https://github.com/certd/certd/compare/v1.26.9...v1.26.10) (2024-10-20) ### Bug Fixes diff --git a/lerna.json b/lerna.json index 3c538bf8..1ea738c5 100644 --- a/lerna.json +++ b/lerna.json @@ -9,5 +9,5 @@ } }, "npmClient": "pnpm", - "version": "1.26.10" + "version": "1.26.11" } diff --git a/packages/core/acme-client/CHANGELOG.md b/packages/core/acme-client/CHANGELOG.md index 1e1f76f7..8bf97d09 100644 --- a/packages/core/acme-client/CHANGELOG.md +++ b/packages/core/acme-client/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.26.11](https://github.com/publishlab/node-acme-client/compare/v1.26.10...v1.26.11) (2024-10-23) + +### Bug Fixes + +* 申请证书没有使用到系统设置的http代理的bug ([3db216f](https://github.com/publishlab/node-acme-client/commit/3db216f515ba404cb4330fdab452971b22a50f08)) +* 修复google证书*.xx.com与xx.com同时申请时报错的bug ([f8b99b8](https://github.com/publishlab/node-acme-client/commit/f8b99b81a23e7e9fd5e05ebd5caf355c41d67a90)) + +### Performance Improvements + +* 优化证书申请速度和成功率,反代地址优化,google基本可以稳定请求。增加请求重试。 ([41d9c3a](https://github.com/publishlab/node-acme-client/commit/41d9c3ac8398def541e65351cbe920d4a927182d)) + ## [1.26.10](https://github.com/publishlab/node-acme-client/compare/v1.26.9...v1.26.10) (2024-10-20) **Note:** Version bump only for package @certd/acme-client diff --git a/packages/core/acme-client/package.json b/packages/core/acme-client/package.json index 5ed6a079..f8319aba 100644 --- a/packages/core/acme-client/package.json +++ b/packages/core/acme-client/package.json @@ -3,7 +3,7 @@ "description": "Simple and unopinionated ACME client", "private": false, "author": "nmorsman", - "version": "1.26.10", + "version": "1.26.11", "main": "src/index.js", "types": "types/index.d.ts", "license": "MIT", diff --git a/packages/core/basic/CHANGELOG.md b/packages/core/basic/CHANGELOG.md index 868f3f36..54a65068 100644 --- a/packages/core/basic/CHANGELOG.md +++ b/packages/core/basic/CHANGELOG.md @@ -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.26.11](https://github.com/certd/certd/compare/v1.26.10...v1.26.11) (2024-10-23) + +### Bug Fixes + +* 申请证书没有使用到系统设置的http代理的bug ([3db216f](https://github.com/certd/certd/commit/3db216f515ba404cb4330fdab452971b22a50f08)) + ## [1.26.10](https://github.com/certd/certd/compare/v1.26.9...v1.26.10) (2024-10-20) **Note:** Version bump only for package @certd/basic diff --git a/packages/core/basic/package.json b/packages/core/basic/package.json index bcf0a262..ad3ec79a 100644 --- a/packages/core/basic/package.json +++ b/packages/core/basic/package.json @@ -1,7 +1,7 @@ { "name": "@certd/basic", "private": false, - "version": "1.26.10", + "version": "1.26.11", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", diff --git a/packages/core/pipeline/CHANGELOG.md b/packages/core/pipeline/CHANGELOG.md index bde43c93..1d8b2a7e 100644 --- a/packages/core/pipeline/CHANGELOG.md +++ b/packages/core/pipeline/CHANGELOG.md @@ -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.26.11](https://github.com/certd/certd/compare/v1.26.10...v1.26.11) (2024-10-23) + +### Performance Improvements + +* 申请证书启用新的反代地址 ([a705182](https://github.com/certd/certd/commit/a705182b85e51157883e48f23463263793bf3c12)) + ## [1.26.10](https://github.com/certd/certd/compare/v1.26.9...v1.26.10) (2024-10-20) ### Bug Fixes diff --git a/packages/core/pipeline/package.json b/packages/core/pipeline/package.json index dc023929..997e79a8 100644 --- a/packages/core/pipeline/package.json +++ b/packages/core/pipeline/package.json @@ -1,7 +1,7 @@ { "name": "@certd/pipeline", "private": false, - "version": "1.26.10", + "version": "1.26.11", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -15,8 +15,8 @@ "test": "mocha --loader=ts-node/esm" }, "dependencies": { - "@certd/basic": "^1.26.10", - "@certd/plus-core": "^1.26.10", + "@certd/basic": "^1.26.11", + "@certd/plus-core": "^1.26.11", "axios": "^1.7.2", "dayjs": "^1.11.7", "fix-path": "^4.0.0", diff --git a/packages/libs/lib-huawei/CHANGELOG.md b/packages/libs/lib-huawei/CHANGELOG.md index ea882211..0c9ae20e 100644 --- a/packages/libs/lib-huawei/CHANGELOG.md +++ b/packages/libs/lib-huawei/CHANGELOG.md @@ -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.26.11](https://github.com/certd/certd/compare/v1.26.10...v1.26.11) (2024-10-23) + +**Note:** Version bump only for package @certd/lib-huawei + ## [1.26.10](https://github.com/certd/certd/compare/v1.26.9...v1.26.10) (2024-10-20) **Note:** Version bump only for package @certd/lib-huawei diff --git a/packages/libs/lib-huawei/package.json b/packages/libs/lib-huawei/package.json index ae946901..0aaa7581 100644 --- a/packages/libs/lib-huawei/package.json +++ b/packages/libs/lib-huawei/package.json @@ -1,7 +1,7 @@ { "name": "@certd/lib-huawei", "private": false, - "version": "1.26.10", + "version": "1.26.11", "main": "./dist/bundle.js", "module": "./dist/bundle.js", "types": "./dist/d/index.d.ts", diff --git a/packages/libs/lib-iframe/CHANGELOG.md b/packages/libs/lib-iframe/CHANGELOG.md index 5b236842..db9b1507 100644 --- a/packages/libs/lib-iframe/CHANGELOG.md +++ b/packages/libs/lib-iframe/CHANGELOG.md @@ -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.26.11](https://github.com/certd/certd/compare/v1.26.10...v1.26.11) (2024-10-23) + +**Note:** Version bump only for package @certd/lib-iframe + ## [1.26.10](https://github.com/certd/certd/compare/v1.26.9...v1.26.10) (2024-10-20) **Note:** Version bump only for package @certd/lib-iframe diff --git a/packages/libs/lib-iframe/package.json b/packages/libs/lib-iframe/package.json index c5d30be4..afacceba 100644 --- a/packages/libs/lib-iframe/package.json +++ b/packages/libs/lib-iframe/package.json @@ -1,7 +1,7 @@ { "name": "@certd/lib-iframe", "private": false, - "version": "1.26.10", + "version": "1.26.11", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/libs/lib-jdcloud/CHANGELOG.md b/packages/libs/lib-jdcloud/CHANGELOG.md index 0ed408fc..969547d0 100644 --- a/packages/libs/lib-jdcloud/CHANGELOG.md +++ b/packages/libs/lib-jdcloud/CHANGELOG.md @@ -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.26.11](https://github.com/certd/certd/compare/v1.26.10...v1.26.11) (2024-10-23) + +**Note:** Version bump only for package @certd/lib-jdcloud + ## [1.26.10](https://github.com/certd/certd/compare/v1.26.9...v1.26.10) (2024-10-20) **Note:** Version bump only for package @certd/lib-jdcloud diff --git a/packages/libs/lib-jdcloud/package.json b/packages/libs/lib-jdcloud/package.json index 90684236..9209a1c8 100644 --- a/packages/libs/lib-jdcloud/package.json +++ b/packages/libs/lib-jdcloud/package.json @@ -1,7 +1,7 @@ { "name": "@certd/lib-jdcloud", "private": false, - "version": "1.26.10", + "version": "1.26.11", "main": "./dist/bundle.mjs", "module": "./dist/bundle.mjs", "types": "./dist/d/index.d.ts", diff --git a/packages/libs/lib-k8s/CHANGELOG.md b/packages/libs/lib-k8s/CHANGELOG.md index e7549dd9..6c3eccfd 100644 --- a/packages/libs/lib-k8s/CHANGELOG.md +++ b/packages/libs/lib-k8s/CHANGELOG.md @@ -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.26.11](https://github.com/certd/certd/compare/v1.26.10...v1.26.11) (2024-10-23) + +**Note:** Version bump only for package @certd/lib-k8s + ## [1.26.10](https://github.com/certd/certd/compare/v1.26.9...v1.26.10) (2024-10-20) **Note:** Version bump only for package @certd/lib-k8s diff --git a/packages/libs/lib-k8s/package.json b/packages/libs/lib-k8s/package.json index 7b79a13f..00a2e656 100644 --- a/packages/libs/lib-k8s/package.json +++ b/packages/libs/lib-k8s/package.json @@ -1,7 +1,7 @@ { "name": "@certd/lib-k8s", "private": false, - "version": "1.26.10", + "version": "1.26.11", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -18,7 +18,7 @@ "@kubernetes/client-node": "0.21.0" }, "devDependencies": { - "@certd/pipeline": "^1.26.10", + "@certd/pipeline": "^1.26.11", "@rollup/plugin-commonjs": "^23.0.4", "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-node-resolve": "^15.0.1", diff --git a/packages/libs/lib-server/CHANGELOG.md b/packages/libs/lib-server/CHANGELOG.md index 4dd8f9b3..c77d1129 100644 --- a/packages/libs/lib-server/CHANGELOG.md +++ b/packages/libs/lib-server/CHANGELOG.md @@ -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.26.11](https://github.com/certd/certd/compare/v1.26.10...v1.26.11) (2024-10-23) + +### Bug Fixes + +* 申请证书没有使用到系统设置的http代理的bug ([3db216f](https://github.com/certd/certd/commit/3db216f515ba404cb4330fdab452971b22a50f08)) + +### Performance Improvements + +* 申请证书启用新的反代地址 ([a705182](https://github.com/certd/certd/commit/a705182b85e51157883e48f23463263793bf3c12)) + ## [1.26.10](https://github.com/certd/certd/compare/v1.26.9...v1.26.10) (2024-10-20) **Note:** Version bump only for package @certd/lib-server diff --git a/packages/libs/lib-server/package.json b/packages/libs/lib-server/package.json index 2cf0adea..41055149 100644 --- a/packages/libs/lib-server/package.json +++ b/packages/libs/lib-server/package.json @@ -1,6 +1,6 @@ { "name": "@certd/lib-server", - "version": "1.26.10", + "version": "1.26.11", "description": "midway with flyway, sql upgrade way ", "private": false, "type": "module", @@ -26,9 +26,9 @@ ], "license": "AGPL", "dependencies": { - "@certd/basic": "^1.26.10", - "@certd/acme-client": "^1.26.10", - "@certd/pipeline": "^1.26.10", + "@certd/acme-client": "^1.26.11", + "@certd/basic": "^1.26.11", + "@certd/pipeline": "^1.26.11", "@midwayjs/cache": "~3.14.0", "@midwayjs/core": "~3.17.1", "@midwayjs/i18n": "~3.17.3", diff --git a/packages/libs/midway-flyway-js/CHANGELOG.md b/packages/libs/midway-flyway-js/CHANGELOG.md index e8c84792..c36258d9 100644 --- a/packages/libs/midway-flyway-js/CHANGELOG.md +++ b/packages/libs/midway-flyway-js/CHANGELOG.md @@ -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.26.11](https://github.com/certd/certd/compare/v1.26.10...v1.26.11) (2024-10-23) + +**Note:** Version bump only for package @certd/midway-flyway-js + ## [1.26.10](https://github.com/certd/certd/compare/v1.26.9...v1.26.10) (2024-10-20) **Note:** Version bump only for package @certd/midway-flyway-js diff --git a/packages/libs/midway-flyway-js/package.json b/packages/libs/midway-flyway-js/package.json index 7d44f0e9..62e64ebc 100644 --- a/packages/libs/midway-flyway-js/package.json +++ b/packages/libs/midway-flyway-js/package.json @@ -1,6 +1,6 @@ { "name": "@certd/midway-flyway-js", - "version": "1.26.10", + "version": "1.26.11", "description": "midway with flyway, sql upgrade way ", "private": false, "type": "module", diff --git a/packages/plugins/plugin-cert/CHANGELOG.md b/packages/plugins/plugin-cert/CHANGELOG.md index ecba6cf2..6f65bf40 100644 --- a/packages/plugins/plugin-cert/CHANGELOG.md +++ b/packages/plugins/plugin-cert/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.26.11](https://github.com/certd/certd/compare/v1.26.10...v1.26.11) (2024-10-23) + +### Performance Improvements + +* 申请证书启用新的反代地址 ([a705182](https://github.com/certd/certd/commit/a705182b85e51157883e48f23463263793bf3c12)) +* 优化证书申请速度和成功率,反代地址优化,google基本可以稳定请求。增加请求重试。 ([41d9c3a](https://github.com/certd/certd/commit/41d9c3ac8398def541e65351cbe920d4a927182d)) +* 优化pfx密码密码输入框,让浏览器不自动填写密码 ([ffeede3](https://github.com/certd/certd/commit/ffeede38afa70c5ff6f2015516bead23d2c4df87)) + ## [1.26.10](https://github.com/certd/certd/compare/v1.26.9...v1.26.10) (2024-10-20) ### Bug Fixes diff --git a/packages/plugins/plugin-cert/package.json b/packages/plugins/plugin-cert/package.json index 9dfd7baa..41f2def9 100644 --- a/packages/plugins/plugin-cert/package.json +++ b/packages/plugins/plugin-cert/package.json @@ -1,7 +1,7 @@ { "name": "@certd/plugin-cert", "private": false, - "version": "1.26.10", + "version": "1.26.11", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -15,9 +15,9 @@ "preview": "vite preview" }, "dependencies": { - "@certd/acme-client": "^1.26.10", - "@certd/basic": "^1.26.10", - "@certd/pipeline": "^1.26.10", + "@certd/acme-client": "^1.26.11", + "@certd/basic": "^1.26.11", + "@certd/pipeline": "^1.26.11", "@google-cloud/publicca": "^1.3.0", "dayjs": "^1.11.7", "jszip": "^3.10.1", diff --git a/packages/ui/certd-client/CHANGELOG.md b/packages/ui/certd-client/CHANGELOG.md index 500e092f..573ebf7d 100644 --- a/packages/ui/certd-client/CHANGELOG.md +++ b/packages/ui/certd-client/CHANGELOG.md @@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.26.11](https://github.com/certd/certd/compare/v1.26.10...v1.26.11) (2024-10-23) + +### Bug Fixes + +* 修复移动任务后出现空阶段的bug ([4ea3edd](https://github.com/certd/certd/commit/4ea3edd59e93ca4f5b2e43b20dd4ef33909caddb)) +* 允许七牛云cdn插件输入.号开头的通配符域名 ([18ee87d](https://github.com/certd/certd/commit/18ee87daff6eafc2201b58e28d85aafd3cb7a5b9)) + +### Performance Improvements + +* 优化日志颜色 ([1291e98](https://github.com/certd/certd/commit/1291e98e821c5b1810aab7f0aebe3f5f5cd44a20)) +* 优化证书申请速度和成功率,反代地址优化,google基本可以稳定请求。增加请求重试。 ([41d9c3a](https://github.com/certd/certd/commit/41d9c3ac8398def541e65351cbe920d4a927182d)) +* 优化pfx密码密码输入框,让浏览器不自动填写密码 ([ffeede3](https://github.com/certd/certd/commit/ffeede38afa70c5ff6f2015516bead23d2c4df87)) + ## [1.26.10](https://github.com/certd/certd/compare/v1.26.9...v1.26.10) (2024-10-20) ### Bug Fixes diff --git a/packages/ui/certd-client/package.json b/packages/ui/certd-client/package.json index 8dd8280c..5eaf7f5f 100644 --- a/packages/ui/certd-client/package.json +++ b/packages/ui/certd-client/package.json @@ -1,6 +1,6 @@ { "name": "@certd/ui-client", - "version": "1.26.10", + "version": "1.26.11", "private": true, "scripts": { "dev": "vite --open", @@ -62,8 +62,8 @@ "vuedraggable": "^4.1.0" }, "devDependencies": { - "@certd/lib-iframe": "^1.26.10", - "@certd/pipeline": "^1.26.10", + "@certd/lib-iframe": "^1.26.11", + "@certd/pipeline": "^1.26.11", "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-node-resolve": "^15.2.3", "@types/chai": "^4.3.12", @@ -78,7 +78,7 @@ "@vitejs/plugin-vue-jsx": "^3.1.0", "@vue/compiler-sfc": "^3.4.21", "@vue/eslint-config-typescript": "^13.0.0", - "@vue/test-utils": "^2.4.5", + "@vue/test-utils": "^2.4.6", "autoprefixer": "^10.4.18", "caller-path": "^4.0.0", "chai": "^5.1.0", @@ -114,10 +114,9 @@ "vite-plugin-compression": "^0.5.1", "vite-plugin-html": "^3.2.2", "vite-plugin-windicss": "^1.9.3", + "vitest": "^2.1.2", "vue-eslint-parser": "^9.4.2", - "vue-tsc": "^1.8.8", - "@vue/test-utils": "^2.4.6", - "vitest": "^2.1.2" + "vue-tsc": "^1.8.8" }, "husky": { "hooks": { diff --git a/packages/ui/certd-server/CHANGELOG.md b/packages/ui/certd-server/CHANGELOG.md index 63e84bb4..5f9e0787 100644 --- a/packages/ui/certd-server/CHANGELOG.md +++ b/packages/ui/certd-server/CHANGELOG.md @@ -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.26.11](https://github.com/certd/certd/compare/v1.26.10...v1.26.11) (2024-10-23) + +### Bug Fixes + +* 允许七牛云cdn插件输入.号开头的通配符域名 ([18ee87d](https://github.com/certd/certd/commit/18ee87daff6eafc2201b58e28d85aafd3cb7a5b9)) + +### Performance Improvements + +* 优化证书申请速度和成功率,反代地址优化,google基本可以稳定请求。增加请求重试。 ([41d9c3a](https://github.com/certd/certd/commit/41d9c3ac8398def541e65351cbe920d4a927182d)) + ## [1.26.10](https://github.com/certd/certd/compare/v1.26.9...v1.26.10) (2024-10-20) ### Bug Fixes diff --git a/packages/ui/certd-server/package.json b/packages/ui/certd-server/package.json index b3da1474..b11b8e3d 100644 --- a/packages/ui/certd-server/package.json +++ b/packages/ui/certd-server/package.json @@ -1,6 +1,6 @@ { "name": "@certd/ui-server", - "version": "1.26.10", + "version": "1.26.11", "description": "fast-server base midway", "private": true, "type": "module", @@ -27,17 +27,17 @@ }, "dependencies": { "@alicloud/pop-core": "^1.7.10", - "@certd/acme-client": "^1.26.10", - "@certd/commercial-core": "^1.26.10", - "@certd/lib-huawei": "^1.26.10", - "@certd/lib-jdcloud": "^1.26.10", - "@certd/lib-k8s": "^1.26.10", - "@certd/lib-server": "^1.26.10", - "@certd/midway-flyway-js": "^1.26.10", - "@certd/pipeline": "^1.26.10", - "@certd/plugin-cert": "^1.26.10", - "@certd/plugin-plus": "^1.26.10", - "@certd/plus-core": "^1.26.10", + "@certd/acme-client": "^1.26.11", + "@certd/commercial-core": "^1.26.11", + "@certd/lib-huawei": "^1.26.11", + "@certd/lib-jdcloud": "^1.26.11", + "@certd/lib-k8s": "^1.26.11", + "@certd/lib-server": "^1.26.11", + "@certd/midway-flyway-js": "^1.26.11", + "@certd/pipeline": "^1.26.11", + "@certd/plugin-cert": "^1.26.11", + "@certd/plugin-plus": "^1.26.11", + "@certd/plus-core": "^1.26.11", "@koa/cors": "^5.0.0", "@midwayjs/bootstrap": "~3.17.1", "@midwayjs/cache": "~3.14.0", From 11255a1ecfba70baf24fd5b79189a760c85ea2e5 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Wed, 23 Oct 2024 10:38:34 +0800 Subject: [PATCH 16/17] build: trigger build image --- build.trigger | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.trigger b/build.trigger index 97224975..d99d4ded 100644 --- a/build.trigger +++ b/build.trigger @@ -1 +1 @@ -12:34 +10:38 From f9e29ef041252748e5247fa9a63ea84604ff0a9a Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Wed, 23 Oct 2024 10:38:50 +0800 Subject: [PATCH 17/17] build: publish --- packages/core/acme-client/package.json | 2 +- packages/core/basic/package.json | 2 +- packages/core/pipeline/package.json | 2 +- packages/libs/lib-huawei/package.json | 2 +- packages/libs/lib-iframe/package.json | 2 +- packages/libs/lib-jdcloud/package.json | 2 +- packages/libs/lib-k8s/package.json | 2 +- packages/libs/lib-server/package.json | 2 +- packages/libs/midway-flyway-js/package.json | 2 +- packages/plugins/plugin-cert/package.json | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/core/acme-client/package.json b/packages/core/acme-client/package.json index f8319aba..d98e01d2 100644 --- a/packages/core/acme-client/package.json +++ b/packages/core/acme-client/package.json @@ -60,5 +60,5 @@ "bugs": { "url": "https://github.com/publishlab/node-acme-client/issues" }, - "gitHead": "617cc13e29e6a325ac6fc0202499398390d25997" + "gitHead": "3a78cb9929fd63bb72f0e00f4389e775c926c789" } diff --git a/packages/core/basic/package.json b/packages/core/basic/package.json index ad3ec79a..0b0a7c35 100644 --- a/packages/core/basic/package.json +++ b/packages/core/basic/package.json @@ -64,5 +64,5 @@ "vite": "^4.3.8", "vue-tsc": "^1.6.5" }, - "gitHead": "617cc13e29e6a325ac6fc0202499398390d25997" + "gitHead": "3a78cb9929fd63bb72f0e00f4389e775c926c789" } diff --git a/packages/core/pipeline/package.json b/packages/core/pipeline/package.json index 997e79a8..5f0313fe 100644 --- a/packages/core/pipeline/package.json +++ b/packages/core/pipeline/package.json @@ -66,5 +66,5 @@ "vite": "^4.3.8", "vue-tsc": "^1.6.5" }, - "gitHead": "617cc13e29e6a325ac6fc0202499398390d25997" + "gitHead": "3a78cb9929fd63bb72f0e00f4389e775c926c789" } diff --git a/packages/libs/lib-huawei/package.json b/packages/libs/lib-huawei/package.json index 0aaa7581..5a4b08f2 100644 --- a/packages/libs/lib-huawei/package.json +++ b/packages/libs/lib-huawei/package.json @@ -17,5 +17,5 @@ "rimraf": "^5.0.5", "rollup": "^3.7.4" }, - "gitHead": "617cc13e29e6a325ac6fc0202499398390d25997" + "gitHead": "3a78cb9929fd63bb72f0e00f4389e775c926c789" } diff --git a/packages/libs/lib-iframe/package.json b/packages/libs/lib-iframe/package.json index afacceba..bf9c0e3a 100644 --- a/packages/libs/lib-iframe/package.json +++ b/packages/libs/lib-iframe/package.json @@ -39,5 +39,5 @@ "tslib": "^2.5.2", "typescript": "^5.4.2" }, - "gitHead": "617cc13e29e6a325ac6fc0202499398390d25997" + "gitHead": "3a78cb9929fd63bb72f0e00f4389e775c926c789" } diff --git a/packages/libs/lib-jdcloud/package.json b/packages/libs/lib-jdcloud/package.json index 9209a1c8..6785e150 100644 --- a/packages/libs/lib-jdcloud/package.json +++ b/packages/libs/lib-jdcloud/package.json @@ -27,5 +27,5 @@ "rimraf": "^5.0.5", "rollup": "^3.7.4" }, - "gitHead": "617cc13e29e6a325ac6fc0202499398390d25997" + "gitHead": "3a78cb9929fd63bb72f0e00f4389e775c926c789" } diff --git a/packages/libs/lib-k8s/package.json b/packages/libs/lib-k8s/package.json index 00a2e656..819760b1 100644 --- a/packages/libs/lib-k8s/package.json +++ b/packages/libs/lib-k8s/package.json @@ -40,5 +40,5 @@ "tslib": "^2.5.2", "typescript": "^5.4.2" }, - "gitHead": "617cc13e29e6a325ac6fc0202499398390d25997" + "gitHead": "3a78cb9929fd63bb72f0e00f4389e775c926c789" } diff --git a/packages/libs/lib-server/package.json b/packages/libs/lib-server/package.json index 41055149..0bdf9719 100644 --- a/packages/libs/lib-server/package.json +++ b/packages/libs/lib-server/package.json @@ -69,5 +69,5 @@ "typeorm": "^0.3.11", "typescript": "^5.4.2" }, - "gitHead": "617cc13e29e6a325ac6fc0202499398390d25997" + "gitHead": "3a78cb9929fd63bb72f0e00f4389e775c926c789" } diff --git a/packages/libs/midway-flyway-js/package.json b/packages/libs/midway-flyway-js/package.json index 62e64ebc..bb87f713 100644 --- a/packages/libs/midway-flyway-js/package.json +++ b/packages/libs/midway-flyway-js/package.json @@ -56,5 +56,5 @@ "typeorm": "^0.3.11", "typescript": "^5.4.2" }, - "gitHead": "617cc13e29e6a325ac6fc0202499398390d25997" + "gitHead": "3a78cb9929fd63bb72f0e00f4389e775c926c789" } diff --git a/packages/plugins/plugin-cert/package.json b/packages/plugins/plugin-cert/package.json index 41f2def9..5c189d11 100644 --- a/packages/plugins/plugin-cert/package.json +++ b/packages/plugins/plugin-cert/package.json @@ -57,5 +57,5 @@ "vite": "^3.1.0", "vue-tsc": "^0.38.9" }, - "gitHead": "617cc13e29e6a325ac6fc0202499398390d25997" + "gitHead": "3a78cb9929fd63bb72f0e00f4389e775c926c789" }