From c87c9af12ec71133aaf628adbfb3038c419d75f5 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Sun, 12 Oct 2025 23:56:14 +0800 Subject: [PATCH 01/20] chore: 1 --- docker/run/docker-compose.yaml | 2 +- packages/ui/certd-server/src/config/config.default.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/run/docker-compose.yaml b/docker/run/docker-compose.yaml index 6af51df1..805ca5c6 100644 --- a/docker/run/docker-compose.yaml +++ b/docker/run/docker-compose.yaml @@ -48,7 +48,7 @@ services: # #↓↓↓↓ ----------------------------- 如果忘记管理员密码,可以设置为true,docker compose up -d 重建容器之后,管理员密码将改成123456,然后请及时修改回false - certd_system_resetAdminPasswd=false # ↓↓↓ 如果启动时报address family not supported错误,将此配置修改为0.0.0.0 -# - certd_koa_hostname=:: + - certd_koa_hostname=0.0.0.0 # 默认使用sqlite文件数据库,如果需要使用其他数据库,请设置以下环境变量 # 注意: 选定使用一种数据库之后,不支持更换数据库。 diff --git a/packages/ui/certd-server/src/config/config.default.ts b/packages/ui/certd-server/src/config/config.default.ts index 4285eda9..5c2daff8 100644 --- a/packages/ui/certd-server/src/config/config.default.ts +++ b/packages/ui/certd-server/src/config/config.default.ts @@ -27,7 +27,7 @@ const development = { }, keys: 'certd', koa: { - hostname:"::", + hostname:"0.0.0.0", port: 7001, }, https: { From aafafa0e73653f03a18c998bebfce0dc2b49071c Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Sun, 12 Oct 2025 23:57:17 +0800 Subject: [PATCH 02/20] chore: 1 --- docker/run/docker-compose.yaml | 2 +- packages/ui/certd-server/src/config/config.default.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/run/docker-compose.yaml b/docker/run/docker-compose.yaml index 805ca5c6..e909030a 100644 --- a/docker/run/docker-compose.yaml +++ b/docker/run/docker-compose.yaml @@ -47,7 +47,7 @@ services: # 配置规则: certd_ + 配置项, 点号用_代替 # #↓↓↓↓ ----------------------------- 如果忘记管理员密码,可以设置为true,docker compose up -d 重建容器之后,管理员密码将改成123456,然后请及时修改回false - certd_system_resetAdminPasswd=false - # ↓↓↓ 如果启动时报address family not supported错误,将此配置修改为0.0.0.0 + # ↓↓↓ 要使用ipv6,将此配置修改为:: - certd_koa_hostname=0.0.0.0 # 默认使用sqlite文件数据库,如果需要使用其他数据库,请设置以下环境变量 diff --git a/packages/ui/certd-server/src/config/config.default.ts b/packages/ui/certd-server/src/config/config.default.ts index 5c2daff8..7166446e 100644 --- a/packages/ui/certd-server/src/config/config.default.ts +++ b/packages/ui/certd-server/src/config/config.default.ts @@ -27,7 +27,7 @@ const development = { }, keys: 'certd', koa: { - hostname:"0.0.0.0", + hostname: "::", port: 7001, }, https: { From e00733a34644c23ffe926486b15dc96bf2fa4b57 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Mon, 13 Oct 2025 23:16:03 +0800 Subject: [PATCH 03/20] =?UTF-8?q?fix:=20aliyunoss=20=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E8=AF=81=E4=B9=A6=E6=8E=A5=E5=85=A5=E7=82=B9=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=96=B0=E5=8A=A0=E5=9D=A1=E6=97=A0=E6=B3=95=E4=B8=8A=E4=BC=A0?= =?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/src/auto.js | 2 +- packages/core/acme-client/src/client.js | 4 ++-- .../src/plugins/plugin-aliyun/plugin/deploy-to-oss/index.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/acme-client/src/auto.js b/packages/core/acme-client/src/auto.js index d7ecfce6..c18ec266 100644 --- a/packages/core/acme-client/src/auto.js +++ b/packages/core/acme-client/src/auto.js @@ -255,7 +255,7 @@ export default async (client, userOpts) => { await wait(waitDnsDiffuseTime * 1000) } - log("开始向提供商请求挑战验证"); + log("开始向提供商请求检查验证"); await runPromisePa(completeChallengeTasks, 1000); } catch (e) { log(`证书申请失败${e.message}`); diff --git a/packages/core/acme-client/src/client.js b/packages/core/acme-client/src/client.js index b2ff14dc..806723b1 100644 --- a/packages/core/acme-client/src/client.js +++ b/packages/core/acme-client/src/client.js @@ -502,7 +502,7 @@ class AcmeClient { await verify[challenge.type](authz, challenge, keyAuthorization); }; - log('Waiting for ACME challenge verification(等待ACME挑战验证)'); + log('Waiting for ACME challenge verification(等待ACME检查验证)'); return util.retry(verifyFn, this.backoffOpts); } @@ -570,7 +570,7 @@ class AcmeClient { const resp = await this.api.apiRequest(item.url, null, [200]); /* Verify status */ - log(`[${d}] Item has status(挑战状态): ${resp.data.status}`); + log(`[${d}] Item has status(检查状态): ${resp.data.status}`); if (invalidStates.includes(resp.data.status)) { abort(); diff --git a/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-oss/index.ts b/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-oss/index.ts index 8f330fd1..8bd9739f 100644 --- a/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-oss/index.ts +++ b/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-oss/index.ts @@ -121,7 +121,7 @@ export class DeployCertToAliyunOSS extends AbstractTaskPlugin { name: 'a-select', options: [ { value: 'cn-hangzhou', label: '中国大陆' }, - { value: 'southeast-1', label: '新加坡' }, + { value: 'ap-southeast-1', label: '新加坡' }, { value: 'eu-central-1', label: '德国(法兰克福)' }, ], }, From f41519048326d971acd9e0a30462231f77a299a6 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 14 Oct 2025 10:55:10 +0800 Subject: [PATCH 04/20] =?UTF-8?q?perf:=20dns=E6=94=AF=E6=8C=81=E6=96=B0?= =?UTF-8?q?=E7=BD=91=E4=BA=92=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/certd-server/package.json | 3 +- packages/ui/certd-server/src/plugins/index.ts | 1 + .../src/plugins/plugin-xinnet/access-agent.ts | 79 +++ .../src/plugins/plugin-xinnetconnet/access.ts | 147 +++++ .../plugin-xinnetconnet/dns-provider.ts | 68 ++ .../src/plugins/plugin-xinnetconnet/index.ts | 2 + pnpm-lock.yaml | 605 +++++++++--------- 7 files changed, 599 insertions(+), 306 deletions(-) create mode 100644 packages/ui/certd-server/src/plugins/plugin-xinnet/access-agent.ts create mode 100644 packages/ui/certd-server/src/plugins/plugin-xinnetconnet/access.ts create mode 100644 packages/ui/certd-server/src/plugins/plugin-xinnetconnet/dns-provider.ts create mode 100644 packages/ui/certd-server/src/plugins/plugin-xinnetconnet/index.ts diff --git a/packages/ui/certd-server/package.json b/packages/ui/certd-server/package.json index b292b15b..a3fb6a56 100644 --- a/packages/ui/certd-server/package.json +++ b/packages/ui/certd-server/package.json @@ -121,7 +121,8 @@ "svg-captcha": "^1.4.0", "tencentcloud-sdk-nodejs": "^4.1.112", "typeorm": "^0.3.20", - "uuid": "^10.0.0" + "uuid": "^10.0.0", + "xml2js": "^0.6.2" }, "devDependencies": { "@midwayjs/mock": "3.20.11", diff --git a/packages/ui/certd-server/src/plugins/index.ts b/packages/ui/certd-server/src/plugins/index.ts index 94caa824..93ba1e2b 100644 --- a/packages/ui/certd-server/src/plugins/index.ts +++ b/packages/ui/certd-server/src/plugins/index.ts @@ -37,3 +37,4 @@ export * from './plugin-dokploy/index.js' export * from './plugin-godaddy/index.js' export * from './plugin-captcha/index.js' export * from './plugin-xinnet/index.js' +export * from './plugin-xinnetconnet/index.js' diff --git a/packages/ui/certd-server/src/plugins/plugin-xinnet/access-agent.ts b/packages/ui/certd-server/src/plugins/plugin-xinnet/access-agent.ts new file mode 100644 index 00000000..9fa65629 --- /dev/null +++ b/packages/ui/certd-server/src/plugins/plugin-xinnet/access-agent.ts @@ -0,0 +1,79 @@ +// import { IsAccess, AccessInput, BaseAccess } from "@certd/pipeline"; +// import { XinnetClient } from "@certd/plugin-plus"; + +// /** +// * 这个注解将注册一个授权配置 +// * 在certd的后台管理系统中,用户可以选择添加此类型的授权 +// */ +// @IsAccess({ +// name: "xinnetagent", +// title: "新网授权(代理方式)", +// icon: "lsicon:badge-new-filled", +// desc: "" +// }) +// export class XinnetAccess extends BaseAccess { + +// /** +// * 授权属性配置 +// */ +// @AccessInput({ +// title: "代理账号", +// component: { +// placeholder: "代理账号,如:agent0001" +// }, +// required: true, +// encrypt: false +// }) +// username = ""; + +// @AccessInput({ +// title: "API密钥", +// component: { +// name: "a-input-password", +// vModel: "value", +// placeholder: "API密钥" +// }, +// required: true, +// encrypt: true +// }) +// apikey = ""; + +// @AccessInput({ +// title: "测试", +// component: { +// name: "api-test", +// action: "TestRequest" +// }, +// helper: "点击测试接口是否正常" +// }) +// testRequest = true; + +// async onTestRequest() { + +// // const client = new XinnetClient({ +// // access: this, +// // logger: this.ctx.logger, +// // http: this.ctx.http +// // }); + +// await client.getDomainList({ pageNo: 1, pageSize: 1 }); + +// return "ok"; +// } + + +// getCacheKey () { +// let hashStr = "" +// for (const key in this) { +// if (Object.prototype.hasOwnProperty.call(this, key)) { +// const element = this[key]; +// hashStr += element; +// } +// } +// const hashCode = this.ctx.utils.hash.sha256(hashStr); +// return `xinnet-${hashCode}`; +// } + +// } + +// new XinnetAccess(); diff --git a/packages/ui/certd-server/src/plugins/plugin-xinnetconnet/access.ts b/packages/ui/certd-server/src/plugins/plugin-xinnetconnet/access.ts new file mode 100644 index 00000000..33426b0e --- /dev/null +++ b/packages/ui/certd-server/src/plugins/plugin-xinnetconnet/access.ts @@ -0,0 +1,147 @@ +import { IsAccess, AccessInput, BaseAccess } from '@certd/pipeline'; + +/** + * 这个注解将注册一个授权配置 + * 在certd的后台管理系统中,用户可以选择添加此类型的授权 + */ +@IsAccess({ + name: 'xinnetconnect', + title: '新网互联授权', + icon: 'lsicon:badge-new-filled', + desc: '仅支持代理账号,ip需要加入白名单', +}) +export class XinnetConnectAccess extends BaseAccess { + /** + * 授权属性配置 + */ + @AccessInput({ + title: '用户名', + component: { + placeholder: '代理用户名,如:agent001', + help: '新网互联的代理用户名', + }, + required: true, + encrypt: false, + }) + username = ''; + + @AccessInput({ + title: '密码', + component: { + name: "a-input-password", + vModel: "value", + placeholder: '密码', + }, + required: true, + encrypt: true, + }) + password = ''; + + + + async addDnsRecord(req: {domain:string,hostRecord:string, value:string, type:string}): Promise { + const { domain,hostRecord, value, type } = req; + const bodyXml =` + + ${domain} + ${type} + ${hostRecord} + ${value} + 10 + ` + + const res = await this.doRequest({ + url: "/addDnsRecordService", + bodyXml: bodyXml, + service: "addDnsRecord", + }) + return res + } + + async delDnsRecord(req: {domain:string,hostRecord:string, type:string,value:string}): Promise { + const { domain,hostRecord, type,value } = req; + const bodyXml =` + + ${domain} + ${type} + ${hostRecord} + ${value} + 10 + ` + + const res = await this.doRequest({ + url: "/delDnsRecordService", + bodyXml: bodyXml, + service: "delDnsRecord", + }) + return res + } + + + + buildUserXml(){ + return ` + + ${this.username} + ${this.password} + + ` + } + + + async doRequest(req: {bodyXml:string,service:string,url:string}) { + + const xml2js = await import('xml2js'); + + const soapRequest = ` + + + + + ${this.buildUserXml()} + ${req.bodyXml} + + + + `; + + + const response = await this.ctx.http.request({ + url: req.url, + baseURL: "https://api.bizcn.com/rrpservices", + data: soapRequest, + headers: { + 'Content-Type': 'text/xml; charset=utf-8', + 'SOAPAction': '' // 根据WSDL,soapAction为空 + }, + method: "POST", + returnOriginRes: true, + }) + + + // 解析SOAP响应 + const parser = new xml2js.Parser({ explicitArray: false }); + const result = await parser.parseStringPromise(response.data); + + // 提取返回结果 + const soapBody = result['soap:Envelope']['soap:Body']; + const addDnsRecordResponse = soapBody["ns1:addDnsRecordResponse"]; + console.log(addDnsRecordResponse) + const resultData = addDnsRecordResponse.response.result; + + const res = { + code: resultData.$.code, + msg: resultData.msg + } + console.log('操作结果:', res); + + if (res.code != "200") { + throw new Error(res.msg + " code:" + res.code); + } + + return resultData; + } + +} + +new XinnetConnectAccess(); diff --git a/packages/ui/certd-server/src/plugins/plugin-xinnetconnet/dns-provider.ts b/packages/ui/certd-server/src/plugins/plugin-xinnetconnet/dns-provider.ts new file mode 100644 index 00000000..3c8b5722 --- /dev/null +++ b/packages/ui/certd-server/src/plugins/plugin-xinnetconnet/dns-provider.ts @@ -0,0 +1,68 @@ +import { AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions } from "@certd/plugin-cert"; +import { XinnetConnectAccess } from "./access.js"; + + +export type XinnetConnectRecord = { + domain: string; + hostRecord: string; + type: string; + value: string; +}; + +// 这里通过IsDnsProvider注册一个dnsProvider +@IsDnsProvider({ + name: 'xinnetconnect', + title: '新网互联', + desc: '新网互联', + icon: 'lsicon:badge-new-filled', + // 这里是对应的 cloudflare的access类型名称 + accessType: 'xinnetconnect', + order:999, +}) +export class XinnetConnectDnsProvider extends AbstractDnsProvider { + access!: XinnetConnectAccess; + + async onInstance() { + //一些初始化的操作 + // 也可以通过ctx成员变量传递context + this.access = this.ctx.access as XinnetConnectAccess; + + } + + /** + * 创建dns解析记录,用于验证域名所有权 + */ + async createRecord(options: CreateRecordOptions): Promise { + const { fullRecord,hostRecord, value, type, domain } = options; + this.logger.info('添加域名解析:', fullRecord, value, type, domain); + + const recordReq = { + domain: domain, + type: 'TXT', + hostRecord: hostRecord, + value: value, + } + await this.access.addDnsRecord(recordReq) + return recordReq; + } + + + /** + * 删除dns解析记录,清理申请痕迹 + * @param options + */ + async removeRecord(options: RemoveRecordOptions): Promise { + const { fullRecord, value } = options.recordReq; + const record = options.recordRes; + this.logger.info('删除域名解析:', fullRecord, value); + if (!record) { + this.logger.info('record为空,不执行删除'); + return; + } + await this.access.delDnsRecord(record) + this.logger.info(`删除域名解析成功:fullRecord=${fullRecord}`); + } +} + +//实例化这个provider,将其自动注册到系统中 +new XinnetConnectDnsProvider(); diff --git a/packages/ui/certd-server/src/plugins/plugin-xinnetconnet/index.ts b/packages/ui/certd-server/src/plugins/plugin-xinnetconnet/index.ts new file mode 100644 index 00000000..db899c71 --- /dev/null +++ b/packages/ui/certd-server/src/plugins/plugin-xinnetconnet/index.ts @@ -0,0 +1,2 @@ +export * from './dns-provider.js'; +export * from './access.js'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fd8a049e..2ae09cea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -211,7 +211,7 @@ importers: version: link:../basic '@certd/plus-core': specifier: ^1.37.1 - version: 1.37.1 + version: link:../../pro/plus-core dayjs: specifier: ^1.11.7 version: 1.11.13 @@ -468,7 +468,7 @@ importers: version: link:../../plugins/plugin-lib '@certd/plus-core': specifier: ^1.37.1 - version: 1.37.1 + version: link:../../pro/plus-core '@midwayjs/cache': specifier: 3.14.0 version: 3.14.0 @@ -786,6 +786,282 @@ importers: specifier: ^5.4.2 version: 5.8.3 + packages/pro/commercial-core: + dependencies: + '@certd/basic': + specifier: ^1.37.1 + version: link:../../core/basic + '@certd/lib-server': + specifier: ^1.37.1 + version: link:../../libs/lib-server + '@certd/pipeline': + specifier: ^1.37.1 + version: link:../../core/pipeline + '@certd/plugin-plus': + specifier: ^1.37.1 + version: link:../plugin-plus + '@certd/plus-core': + specifier: ^1.37.1 + version: link:../plus-core + '@midwayjs/core': + specifier: 3.20.11 + version: 3.20.11 + '@midwayjs/koa': + specifier: 3.20.13 + version: 3.20.13 + '@midwayjs/logger': + specifier: 3.4.2 + version: 3.4.2 + '@midwayjs/typeorm': + specifier: 3.20.11 + version: 3.20.11 + alipay-sdk: + specifier: ^4.13.0 + version: 4.14.0 + dayjs: + specifier: ^1.11.7 + version: 1.11.13 + typeorm: + specifier: ^0.3.20 + version: 0.3.24(better-sqlite3@11.10.0)(mysql2@3.14.1)(pg@8.16.0)(reflect-metadata@0.2.2)(ts-node@10.9.2(@types/node@18.19.100)(typescript@5.8.3)) + wechatpay-node-v3: + specifier: ^2.2.1 + version: 2.2.1 + devDependencies: + '@rollup/plugin-json': + specifier: ^6.0.0 + version: 6.1.0(rollup@3.29.5) + '@rollup/plugin-terser': + specifier: ^0.4.3 + version: 0.4.4(rollup@3.29.5) + '@rollup/plugin-typescript': + specifier: ^11.0.0 + version: 11.1.6(rollup@3.29.5)(tslib@2.8.1)(typescript@5.8.3) + '@types/chai': + specifier: ^4.3.3 + version: 4.3.20 + '@types/node': + specifier: ^18 + version: 18.19.100 + '@typescript-eslint/eslint-plugin': + specifier: ^8.26.1 + version: 8.45.0(@typescript-eslint/parser@8.45.0(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0)(typescript@5.8.3) + '@typescript-eslint/parser': + specifier: ^8.26.1 + version: 8.45.0(eslint@8.57.0)(typescript@5.8.3) + eslint: + specifier: ^8.24.0 + version: 8.57.0 + eslint-config-prettier: + specifier: ^8.5.0 + version: 8.10.0(eslint@8.57.0) + eslint-plugin-prettier: + specifier: ^4.2.1 + version: 4.2.5(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@2.8.8) + prettier: + specifier: ^2.8.8 + version: 2.8.8 + rimraf: + specifier: ^5.0.5 + version: 5.0.10 + rollup: + specifier: ^3.7.4 + version: 3.29.5 + rollup-plugin-visualizer: + specifier: ^5.8.2 + version: 5.14.0(rollup@3.29.5) + tslib: + specifier: ^2.8.1 + version: 2.8.1 + typescript: + specifier: ^5.4.2 + version: 5.8.3 + + packages/pro/plugin-plus: + dependencies: + '@alicloud/pop-core': + specifier: ^1.7.10 + version: 1.8.0 + '@baiducloud/sdk': + specifier: ^1.0.2 + version: 1.0.3 + '@certd/basic': + specifier: ^1.37.1 + version: link:../../core/basic + '@certd/lib-k8s': + specifier: ^1.37.1 + version: link:../../libs/lib-k8s + '@certd/pipeline': + specifier: ^1.37.1 + version: link:../../core/pipeline + '@certd/plugin-cert': + specifier: ^1.37.1 + version: link:../../plugins/plugin-cert + '@certd/plus-core': + specifier: ^1.37.1 + version: link:../plus-core + ali-oss: + specifier: ^6.21.0 + version: 6.23.0 + baidu-aip-sdk: + specifier: ^4.16.16 + version: 4.16.16 + basic-ftp: + specifier: ^5.0.5 + version: 5.0.5 + cos-nodejs-sdk-v5: + specifier: ^2.14.6 + version: 2.14.7 + crypto-js: + specifier: ^4.2.0 + version: 4.2.0 + dayjs: + specifier: ^1.11.7 + version: 1.11.13 + form-data: + specifier: ^4.0.0 + version: 4.0.2 + https-proxy-agent: + specifier: ^7.0.5 + version: 7.0.6 + js-yaml: + specifier: ^4.1.0 + version: 4.1.0 + jsencrypt: + specifier: ^3.3.2 + version: 3.3.2 + jsrsasign: + specifier: ^11.1.0 + version: 11.1.0 + qiniu: + specifier: ^7.12.0 + version: 7.14.0 + tencentcloud-sdk-nodejs: + specifier: ^4.0.44 + version: 4.1.112(encoding@0.1.13) + devDependencies: + '@rollup/plugin-json': + specifier: ^6.0.0 + version: 6.1.0(rollup@3.29.5) + '@rollup/plugin-terser': + specifier: ^0.4.3 + version: 0.4.4(rollup@3.29.5) + '@rollup/plugin-typescript': + specifier: ^11.0.0 + version: 11.1.6(rollup@3.29.5)(tslib@2.8.1)(typescript@5.8.3) + '@types/ali-oss': + specifier: ^6.16.11 + version: 6.16.11 + '@types/chai': + specifier: ^4.3.10 + version: 4.3.20 + '@types/mocha': + specifier: ^10.0.7 + version: 10.0.10 + '@types/node': + specifier: ^18 + version: 18.19.100 + '@typescript-eslint/eslint-plugin': + specifier: ^8.26.1 + version: 8.45.0(@typescript-eslint/parser@8.45.0(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0)(typescript@5.8.3) + '@typescript-eslint/parser': + specifier: ^8.26.1 + version: 8.45.0(eslint@8.57.0)(typescript@5.8.3) + chai: + specifier: 4.3.10 + version: 4.3.10 + eslint: + specifier: ^8.41.0 + version: 8.57.0 + eslint-config-prettier: + specifier: ^8.8.0 + version: 8.10.0(eslint@8.57.0) + eslint-plugin-prettier: + specifier: ^4.2.1 + version: 4.2.5(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@2.8.8) + mocha: + specifier: ^10.2.0 + version: 10.8.2 + prettier: + specifier: ^2.8.8 + version: 2.8.8 + rimraf: + specifier: ^5.0.5 + version: 5.0.10 + rollup: + specifier: ^3.7.4 + version: 3.29.5 + tslib: + specifier: ^2.8.1 + version: 2.8.1 + typescript: + specifier: ^5.4.2 + version: 5.8.3 + + packages/pro/plus-core: + dependencies: + '@certd/basic': + specifier: ^1.37.1 + version: link:../../core/basic + dayjs: + specifier: ^1.11.7 + version: 1.11.13 + devDependencies: + '@rollup/plugin-json': + specifier: ^6.0.0 + version: 6.1.0(rollup@3.29.5) + '@rollup/plugin-terser': + specifier: ^0.4.3 + version: 0.4.4(rollup@3.29.5) + '@rollup/plugin-typescript': + specifier: ^11.0.0 + version: 11.1.6(rollup@3.29.5)(tslib@2.8.1)(typescript@5.8.3) + '@types/chai': + specifier: ^4.3.10 + version: 4.3.20 + '@types/mocha': + specifier: ^10.0.7 + version: 10.0.10 + '@types/node': + specifier: ^18 + version: 18.19.100 + '@typescript-eslint/eslint-plugin': + specifier: ^8.26.1 + version: 8.45.0(@typescript-eslint/parser@8.45.0(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0)(typescript@5.8.3) + '@typescript-eslint/parser': + specifier: ^8.26.1 + version: 8.45.0(eslint@8.57.0)(typescript@5.8.3) + chai: + specifier: 4.3.10 + version: 4.3.10 + eslint: + specifier: ^8.41.0 + version: 8.57.0 + eslint-config-prettier: + specifier: ^8.8.0 + version: 8.10.0(eslint@8.57.0) + eslint-plugin-prettier: + specifier: ^4.2.1 + version: 4.2.5(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@2.8.8) + mocha: + specifier: ^10.2.0 + version: 10.8.2 + prettier: + specifier: ^2.8.8 + version: 2.8.8 + rimraf: + specifier: ^5.0.5 + version: 5.0.10 + rollup: + specifier: ^3.7.4 + version: 3.29.5 + tslib: + specifier: ^2.8.1 + version: 2.8.1 + typescript: + specifier: ^5.4.2 + version: 5.8.3 + packages/ui/certd-client: dependencies: '@ant-design/colors': @@ -1214,7 +1490,7 @@ importers: version: link:../../core/basic '@certd/commercial-core': specifier: ^1.37.1 - version: 1.37.1(better-sqlite3@11.10.0)(encoding@0.1.13)(mysql2@3.14.1)(pg@8.16.0)(reflect-metadata@0.2.2)(ts-node@10.9.2(@types/node@18.19.100)(typescript@5.8.3)) + version: link:../../pro/commercial-core '@certd/cv4pve-api-javascript': specifier: ^8.4.2 version: 8.4.2 @@ -1244,10 +1520,10 @@ importers: version: link:../../plugins/plugin-lib '@certd/plugin-plus': specifier: ^1.37.1 - version: 1.37.1(encoding@0.1.13) + version: link:../../pro/plugin-plus '@certd/plus-core': specifier: ^1.37.1 - version: 1.37.1 + version: link:../../pro/plus-core '@huaweicloud/huaweicloud-sdk-cdn': specifier: ^3.1.120 version: 3.1.149 @@ -1356,9 +1632,6 @@ importers: koa-send: specifier: ^5.0.1 version: 5.0.1 - kubernetes-client: - specifier: ^9.0.0 - version: 9.0.0 lodash-es: specifier: ^4.17.21 version: 4.17.21 @@ -1440,6 +1713,9 @@ importers: uuid: specifier: ^10.0.0 version: 10.0.0 + xml2js: + specifier: ^0.6.2 + version: 0.6.2 devDependencies: '@midwayjs/mock': specifier: 3.20.11 @@ -2490,18 +2766,9 @@ packages: '@better-scroll/zoom@2.5.1': resolution: {integrity: sha512-aGvFY5ooeZWS4RcxQLD+pGLpQHQxpPy0sMZV3yadcd2QK53PK9gS4Dp+BYfRv8lZ4/P2LoNEhr6Wq1DN6+uPlA==} - '@certd/commercial-core@1.37.1': - resolution: {integrity: sha512-GOho7YJbIovAbQeNG0+WP1u5bkbS4NXLQfsvKP29hAtnWMQ2zDLolEkNqa0LKKzw2qaxKKeksNw6NMqC0nG7IA==} - '@certd/cv4pve-api-javascript@8.4.2': resolution: {integrity: sha512-udGce7ewrVl4DmZvX+17PjsnqsdDIHEDatr8QP0AVrY2p+8JkaSPW4mXCKiLGf82C9K2+GXgT+qNIqgW7tfF9Q==} - '@certd/plugin-plus@1.37.1': - resolution: {integrity: sha512-ykcUwT2kUBhrzep4zd6pq+E1ebsJmVzFHdr4V0AGU+fsk4TC4PRXVp8JDVIauQJGSAeoX08NVHRyWB5P5pHreA==} - - '@certd/plus-core@1.37.1': - resolution: {integrity: sha512-CQ1QivrqbylFM/o8eUBSJZUDEBfZMNOxow99CbAgjjFCJDzeFB/5CMNvt6q2G7eJg+2RNbhWhPK9hOfJvqjndQ==} - '@certd/vue-js-cron-core@6.0.3': resolution: {integrity: sha512-kqzoAMhYz9j6FGNWEODRYtt4NpUEUwjpkU89z5WVg2tCtOcI5VhwyUGOd8AxiBCRfd6PtXvzuqw85PaOps9wrQ==} @@ -3383,9 +3650,6 @@ packages: resolution: {integrity: sha512-sYcHglGKTxGF+hQ6x67xDfkE9o+NhVlRHBqq6gLywaMc6CojK/5vFZByphdonKinYlMLkEkacm+HEse9HzwgTA==} engines: {node: '>= 12'} - '@kubernetes/client-node@0.10.2': - resolution: {integrity: sha512-JvsmxbTwiMqsh9LyuXMzT5HjoENFbB3a/JroJsobuAzkxN162UqAOvg++/AA+ccIMWRR2Qln4FyaOJ0a4eKyXg==} - '@kubernetes/client-node@0.21.0': resolution: {integrity: sha512-yYRbgMeyQbvZDHt/ZqsW3m4lRefzhbbJEuj8sVXM+bufKrgmzriA2oq7lWPH/k/LQIicAME9ixPUadTrxIF6dQ==} @@ -3691,10 +3955,6 @@ packages: '@otplib/preset-v11@12.0.1': resolution: {integrity: sha512-9hSetMI7ECqbFiKICrNa4w70deTUfArtwXykPUvSHWOdzOlfa9ajglu7mNCntlvxycTiOAXkQGwjQCzzDEMRMg==} - '@panva/asn1.js@1.0.0': - resolution: {integrity: sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw==} - engines: {node: '>=10.13.0'} - '@paralleldrive/cuid2@2.2.2': resolution: {integrity: sha512-ZOBkgDwEdoYVlSeRbYYXs0S9MejQofiVYoTbKzy/6GQa39/q5tQU2IX46+shYnUkpEl3wc+J6wRlar7r2EK2xA==} @@ -4491,9 +4751,6 @@ packages: '@types/express@5.0.1': resolution: {integrity: sha512-UZUw8vjpWFXuDnjFTh7/5c2TWDlQqeXHi6hcN7F2XSVT5P+WmUnnbFS3KA6Jnc6IsEqI2qCVu2bK0R0J4A8ZQQ==} - '@types/got@9.6.12': - resolution: {integrity: sha512-X4pj/HGHbXVLqTpKjA2ahI4rV/nNBc9mGO2I/0CgAra+F2dKgMXnENv2SRpemScBzBAI4vMelIVYViQxlSE6xA==} - '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} @@ -4515,9 +4772,6 @@ packages: '@types/jest@29.5.14': resolution: {integrity: sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==} - '@types/js-yaml@3.12.10': - resolution: {integrity: sha512-/Mtaq/wf+HxXpvhzFYzrzCqNRcA958sW++7JOFC8nPrZcvfi/TrzOaaGbvt27ltJB2NQbHVAg5a1wUCsyMH7NA==} - '@types/js-yaml@4.0.9': resolution: {integrity: sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==} @@ -4572,9 +4826,6 @@ packages: '@types/node-forge@1.3.14': resolution: {integrity: sha512-mhVF2BnD4BO+jtOp7z1CdzaK4mbuK0LLQYAvdOLqHTavxFNq4zA1EmYkpnFjP8HOUzedfQkRnp0E2ulSAYSzAw==} - '@types/node@10.17.60': - resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==} - '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} @@ -4645,9 +4896,6 @@ packages: '@types/tough-cookie@4.0.5': resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} - '@types/underscore@1.13.0': - resolution: {integrity: sha512-L6LBgy1f0EFQZ+7uSA57+n2g/s4Qs5r06Vwrwn0/nuK1de+adz00NWaztRQ30aEqw5qOaWbPI8u2cGQ52lj6VA==} - '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} @@ -4657,9 +4905,6 @@ packages: '@types/web-bluetooth@0.0.21': resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==} - '@types/ws@6.0.4': - resolution: {integrity: sha512-PpPrX7SZW9re6+Ha8ojZG4Se8AZXgf0GK6zmfqEuCsY49LFDNXO3SByp44X3dFEqtB73lkCDAdUazhAjVPiNwg==} - '@types/ws@8.18.1': resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==} @@ -5499,9 +5744,6 @@ packages: resolution: {integrity: sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==} engines: {node: '>= 0.4'} - async-limiter@1.0.1: - resolution: {integrity: sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==} - async-validator@4.2.5: resolution: {integrity: sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==} @@ -5752,10 +5994,6 @@ packages: base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - base64url@3.0.1: - resolution: {integrity: sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==} - engines: {node: '>=6.0.0'} - base@0.11.2: resolution: {integrity: sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==} engines: {node: '>=0.10.0'} @@ -8220,10 +8458,6 @@ packages: resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==} engines: {node: '>= 0.4'} - interpret@1.4.0: - resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==} - engines: {node: '>= 0.10'} - interpret@3.1.1: resolution: {integrity: sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==} engines: {node: '>=10.13.0'} @@ -8660,11 +8894,6 @@ packages: joi@17.13.3: resolution: {integrity: sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==} - jose@1.28.2: - resolution: {integrity: sha512-wWy51U2MXxYi3g8zk2lsQ8M6O1lartpkxuq1TYexzPKYLgHLZkCjklaATP36I5BUoWjF2sInB9U1Qf18fBZxNA==} - engines: {node: '>=10.13.0'} - deprecated: this version is no longer supported - jose@4.15.9: resolution: {integrity: sha512-1vUQX+IdDMVPj4k8kOxgUqlcK518yluMuGZwqlr44FS1ppZB/5GWh4rZG89erpOBOJjU/OBsnCVFfapsRz6nEA==} @@ -8782,9 +9011,6 @@ packages: json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - json-stream@1.0.0: - resolution: {integrity: sha512-H/ZGY0nIAg3QcOwE1QN/rK/Fa7gJn7Ii5obwp6zyPO4xiPNwpIMjqy2gwjBEGqzkF/vSWEIBQCBuN19hYiL6Qg==} - json-stringify-nice@1.1.4: resolution: {integrity: sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw==} @@ -8820,10 +9046,6 @@ packages: resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} engines: {'0': node >= 0.2.0} - jsonpath-plus@0.19.0: - resolution: {integrity: sha512-GSVwsrzW9LsA5lzsqe4CkuZ9wp+kxBb2GwNniaWzI2YFn5Ig42rSW8ZxVpWXaAfakXNrx5pgY5AbQq7kzX29kg==} - engines: {node: '>=6.0'} - jsonpath-plus@8.1.0: resolution: {integrity: sha512-qVTiuKztFGw0dGhYi3WNqvddx3/SHtyDT0xJaeyz4uP0d1tkpG+0y5uYQ4OcIo1TLAz3PE/qDOW9F0uDt3+CTw==} engines: {node: '>=14.0.0'} @@ -8946,10 +9168,6 @@ packages: kolorist@1.8.0: resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} - kubernetes-client@9.0.0: - resolution: {integrity: sha512-Qy8o42dZVHB9P+cIiKdWpQbz/65l/qW1fDYvlzzeSLftmL1Ne3HEiM+0TmKAwNuRW0pTJN2tRWhcccToclxJ8g==} - engines: {node: '>=10.13.0'} - latest-version@5.1.0: resolution: {integrity: sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==} engines: {node: '>=8'} @@ -9915,10 +10133,6 @@ packages: resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} engines: {node: '>=12'} - openid-client@3.15.10: - resolution: {integrity: sha512-C9r6/iVzNQ7aGp0krS5mFIY5nY8AH6ajYCH0Njns6AXy2fM3Khw/dY97QlaFJWW2QLhec6xfEk23LZw9EeX66Q==} - engines: {node: ^10.13.0 || >=12.0.0} - openid-client@5.7.1: resolution: {integrity: sha512-jDBPgSVfTnkIh71Hg9pRvtJc6wTwqjRkN88+gCFtYWrlP4Yx2Dsrow8uPi3qLr/aeymPF3o2+dS+wOpglK04ew==} @@ -9958,18 +10172,10 @@ packages: resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==} engines: {node: '>= 0.4'} - p-any@3.0.0: - resolution: {integrity: sha512-5rqbqfsRWNb0sukt0awwgJMlaep+8jV45S15SKKB34z4UuzjcofIfnriCBhWjZP2jbVtjt9yRl7buB6RlKsu9w==} - engines: {node: '>=10'} - p-cancelable@1.1.0: resolution: {integrity: sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==} engines: {node: '>=6'} - p-cancelable@2.1.1: - resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==} - engines: {node: '>=8'} - p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -10022,10 +10228,6 @@ packages: resolution: {integrity: sha512-xsrIUgI0Kn6iyDYm9StOpOeK29XM1aboGji26+QEortiFST1hGZaUQOLhtEbqHErPpGW/aSz6allwK2qcptp0Q==} engines: {node: '>=12'} - p-some@5.0.0: - resolution: {integrity: sha512-Js5XZxo6vHjB9NOYAzWDYAIyyiPvva0DWESAIWIK7uhSpGsyg5FwUPxipU/SOQx5x9EqhOh545d1jo6cVkitig==} - engines: {node: '>=10'} - p-timeout@6.1.4: resolution: {integrity: sha512-MyIV3ZA/PmyBN/ud8vV9XzwTrNtR4jFrObymZYnZqMmW0zA8Z17vnT0rBgFE/TlohB+YCHqXMgZzb3Csp49vqg==} engines: {node: '>=14.16'} @@ -11030,10 +11232,6 @@ packages: resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} engines: {node: '>= 14.18.0'} - rechoir@0.6.2: - resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} - engines: {node: '>= 0.10'} - rechoir@0.8.0: resolution: {integrity: sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==} engines: {node: '>= 10.13.0'} @@ -11426,11 +11624,6 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - shelljs@0.8.5: - resolution: {integrity: sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==} - engines: {node: '>=4'} - hasBin: true - shiki@3.4.1: resolution: {integrity: sha512-PSnoczt+iWIOB4iRQ+XVPFtTuN1FcmuYzPgUBZTSv5pC6CozssIx2M4O5n4S9gJlUu9A3FxMU0ZPaHflky/6LA==} @@ -11929,9 +12122,6 @@ packages: engines: {node: '>=14.0.0'} hasBin: true - swagger-fluent@5.0.3: - resolution: {integrity: sha512-i43ADMtPi7dxAN75Lw50SlncMB31FgaVwXqKioR8SWs+Yon2RbiLU1J1PGMXA4N8cSt9Vz5RHzaoKjz/+iW88g==} - synckit@0.11.5: resolution: {integrity: sha512-frqvfWyDA5VPVdrWfH24uM6SI/O8NLpVbIIJxb8t/a3YGsp4AW9CYgSKC0OaSEfexnp7Y1pVh2Y6IHO8ggGDmA==} engines: {node: ^14.18.0 || >=16.0.0} @@ -12559,9 +12749,6 @@ packages: resolution: {integrity: sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==} deprecated: Please see https://github.com/lydell/urix#deprecated - url-join@4.0.1: - resolution: {integrity: sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==} - url-parse-lax@3.0.0: resolution: {integrity: sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==} engines: {node: '>=4'} @@ -13076,17 +13263,6 @@ packages: resolution: {integrity: sha512-DqUx8GI3r9BFWwU2DPKddL1E7xWfbFED82mLVhGXKlFEPe8IkBftzO7WfNwHtk7oGDHDeuH/o8VMpzzfMwmLUA==} engines: {node: '>=18'} - ws@6.2.3: - resolution: {integrity: sha512-jmTjYU0j60B+vHey6TfR3Z7RD61z/hmxBS3VMSGIrroOWXQEneK1zNuotOUrGyBHQj0yrpsLHPWtigEFd13ndA==} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - ws@7.5.10: resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==} engines: {node: '>=8.3.0'} @@ -15205,83 +15381,12 @@ snapshots: dependencies: '@better-scroll/core': 2.5.1 - '@certd/commercial-core@1.37.1(better-sqlite3@11.10.0)(encoding@0.1.13)(mysql2@3.14.1)(pg@8.16.0)(reflect-metadata@0.2.2)(ts-node@10.9.2(@types/node@18.19.100)(typescript@5.8.3))': - dependencies: - '@certd/basic': link:packages/core/basic - '@certd/lib-server': link:packages/libs/lib-server - '@certd/pipeline': link:packages/core/pipeline - '@certd/plugin-plus': 1.37.1(encoding@0.1.13) - '@certd/plus-core': 1.37.1 - '@midwayjs/core': 3.20.11 - '@midwayjs/koa': 3.20.13 - '@midwayjs/logger': 3.4.2 - '@midwayjs/typeorm': 3.20.11 - alipay-sdk: 4.14.0 - dayjs: 1.11.13 - typeorm: 0.3.24(better-sqlite3@11.10.0)(mysql2@3.14.1)(pg@8.16.0)(reflect-metadata@0.2.2)(ts-node@10.9.2(@types/node@18.19.100)(typescript@5.8.3)) - wechatpay-node-v3: 2.2.1 - transitivePeerDependencies: - - '@google-cloud/spanner' - - '@sap/hana-client' - - babel-plugin-macros - - better-sqlite3 - - encoding - - hdb-pool - - ioredis - - mongodb - - mssql - - mysql2 - - oracledb - - pg - - pg-native - - pg-query-stream - - proxy-agent - - redis - - reflect-metadata - - sql.js - - sqlite3 - - supports-color - - ts-node - - typeorm-aurora-data-api-driver - '@certd/cv4pve-api-javascript@8.4.2': dependencies: debug: 4.4.1(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@certd/plugin-plus@1.37.1(encoding@0.1.13)': - dependencies: - '@alicloud/pop-core': 1.8.0 - '@baiducloud/sdk': 1.0.3 - '@certd/basic': link:packages/core/basic - '@certd/lib-k8s': link:packages/libs/lib-k8s - '@certd/pipeline': link:packages/core/pipeline - '@certd/plugin-cert': link:packages/plugins/plugin-cert - '@certd/plus-core': 1.37.1 - ali-oss: 6.23.0 - baidu-aip-sdk: 4.16.16 - basic-ftp: 5.0.5 - cos-nodejs-sdk-v5: 2.14.7 - crypto-js: 4.2.0 - dayjs: 1.11.13 - form-data: 4.0.2 - https-proxy-agent: 7.0.6 - js-yaml: 4.1.0 - jsencrypt: 3.3.2 - jsrsasign: 11.1.0 - qiniu: 7.14.0 - tencentcloud-sdk-nodejs: 4.1.112(encoding@0.1.13) - transitivePeerDependencies: - - encoding - - proxy-agent - - supports-color - - '@certd/plus-core@1.37.1': - dependencies: - '@certd/basic': link:packages/core/basic - dayjs: 1.11.13 - '@certd/vue-js-cron-core@6.0.3': dependencies: mustache: 4.2.0 @@ -16124,26 +16229,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@kubernetes/client-node@0.10.2': - dependencies: - '@types/js-yaml': 3.12.10 - '@types/node': 10.17.60 - '@types/request': 2.48.12 - '@types/underscore': 1.13.0 - '@types/ws': 6.0.4 - isomorphic-ws: 4.0.1(ws@6.2.3) - js-yaml: 3.14.1 - json-stream: 1.0.0 - jsonpath-plus: 0.19.0 - request: 2.88.2 - shelljs: 0.8.5 - tslib: 1.14.1 - underscore: 1.13.7 - ws: 6.2.3 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - '@kubernetes/client-node@0.21.0': dependencies: '@types/js-yaml': 4.0.9 @@ -16754,8 +16839,6 @@ snapshots: '@otplib/plugin-crypto': 12.0.1 '@otplib/plugin-thirty-two': 12.0.1 - '@panva/asn1.js@1.0.0': {} - '@paralleldrive/cuid2@2.2.2': dependencies: '@noble/hashes': 1.8.0 @@ -17800,12 +17883,6 @@ snapshots: '@types/express-serve-static-core': 5.0.6 '@types/serve-static': 1.15.7 - '@types/got@9.6.12': - dependencies: - '@types/node': 20.17.47 - '@types/tough-cookie': 4.0.5 - form-data: 2.5.3 - '@types/hast@3.0.4': dependencies: '@types/unist': 3.0.3 @@ -17829,8 +17906,6 @@ snapshots: expect: 29.7.0 pretty-format: 29.7.0 - '@types/js-yaml@3.12.10': {} - '@types/js-yaml@4.0.9': {} '@types/json-schema@7.0.15': {} @@ -17889,8 +17964,6 @@ snapshots: dependencies: '@types/node': 20.17.47 - '@types/node@10.17.60': {} - '@types/node@12.20.55': {} '@types/node@14.18.63': {} @@ -17968,18 +18041,12 @@ snapshots: '@types/tough-cookie@4.0.5': {} - '@types/underscore@1.13.0': {} - '@types/unist@3.0.3': {} '@types/web-bluetooth@0.0.20': {} '@types/web-bluetooth@0.0.21': {} - '@types/ws@6.0.4': - dependencies: - '@types/node': 20.17.47 - '@types/ws@8.18.1': dependencies: '@types/node': 20.17.47 @@ -19079,8 +19146,6 @@ snapshots: async-function@1.0.0: {} - async-limiter@1.0.1: {} - async-validator@4.2.5: {} async@3.2.3: {} @@ -19620,8 +19685,6 @@ snapshots: base64-js@1.5.1: {} - base64url@3.0.1: {} - base@0.11.2: dependencies: cache-base: 1.0.1 @@ -21387,13 +21450,13 @@ snapshots: resolve: 1.22.10 semver: 6.3.1 - eslint-plugin-prettier@3.4.1(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@7.32.0)(prettier@2.8.8): + eslint-plugin-prettier@3.4.1(eslint-config-prettier@8.10.0(eslint@7.32.0))(eslint@7.32.0)(prettier@2.8.8): dependencies: eslint: 7.32.0 prettier: 2.8.8 prettier-linter-helpers: 1.0.0 optionalDependencies: - eslint-config-prettier: 8.10.0(eslint@8.57.0) + eslint-config-prettier: 8.10.0(eslint@7.32.0) eslint-plugin-prettier@4.2.5(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@2.8.8): dependencies: @@ -22600,8 +22663,6 @@ snapshots: hasown: 2.0.2 side-channel: 1.1.0 - interpret@1.4.0: {} - interpret@3.1.1: {} invariant@2.2.4: @@ -22921,10 +22982,6 @@ snapshots: isobject@3.0.1: {} - isomorphic-ws@4.0.1(ws@6.2.3): - dependencies: - ws: 6.2.3 - isomorphic-ws@4.0.1(ws@8.18.2): dependencies: ws: 8.18.2 @@ -23035,10 +23092,6 @@ snapshots: '@sideway/formula': 3.0.1 '@sideway/pinpoint': 2.0.0 - jose@1.28.2: - dependencies: - '@panva/asn1.js': 1.0.0 - jose@4.15.9: optional: true @@ -23164,8 +23217,6 @@ snapshots: json-stable-stringify-without-jsonify@1.0.1: {} - json-stream@1.0.0: {} - json-stringify-nice@1.1.4: {} json-stringify-safe@5.0.1: {} @@ -23204,8 +23255,6 @@ snapshots: jsonparse@1.3.1: {} - jsonpath-plus@0.19.0: {} - jsonpath-plus@8.1.0: {} jsonrepair@3.1.0: {} @@ -23378,25 +23427,6 @@ snapshots: kolorist@1.8.0: {} - kubernetes-client@9.0.0: - dependencies: - '@kubernetes/client-node': 0.10.2 - camelcase: 6.3.0 - deepmerge: 4.3.1 - depd: 2.0.0 - js-yaml: 3.14.1 - json-stream: 1.0.0 - openid-client: 3.15.10 - pump: 3.0.2 - qs: 6.14.0 - request: 2.88.2 - swagger-fluent: 5.0.3 - url-join: 4.0.1 - ws: 7.5.10 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - latest-version@5.1.0: dependencies: package-json: 6.5.0 @@ -24101,7 +24131,7 @@ snapshots: eslint: 7.32.0 eslint-config-prettier: 8.10.0(eslint@7.32.0) eslint-plugin-node: 11.1.0(eslint@7.32.0) - eslint-plugin-prettier: 3.4.1(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@7.32.0)(prettier@2.8.8) + eslint-plugin-prettier: 3.4.1(eslint-config-prettier@8.10.0(eslint@7.32.0))(eslint@7.32.0)(prettier@2.8.8) execa: 5.1.1 inquirer: 7.3.3 json5: 2.2.3 @@ -24391,7 +24421,8 @@ snapshots: object-get@2.1.1: {} - object-hash@2.2.0: {} + object-hash@2.2.0: + optional: true object-hash@3.0.0: {} @@ -24453,7 +24484,8 @@ snapshots: ohash@2.0.11: {} - oidc-token-hash@5.1.0: {} + oidc-token-hash@5.1.0: + optional: true on-finished@2.4.1: dependencies: @@ -24487,18 +24519,6 @@ snapshots: is-docker: 2.2.1 is-wsl: 2.2.0 - openid-client@3.15.10: - dependencies: - '@types/got': 9.6.12 - base64url: 3.0.1 - got: 9.6.0 - jose: 1.28.2 - lru-cache: 6.0.0 - make-error: 1.3.6 - object-hash: 2.2.0 - oidc-token-hash: 5.1.0 - p-any: 3.0.0 - openid-client@5.7.1: dependencies: jose: 4.15.9 @@ -24551,15 +24571,8 @@ snapshots: object-keys: 1.1.1 safe-push-apply: 1.0.0 - p-any@3.0.0: - dependencies: - p-cancelable: 2.1.1 - p-some: 5.0.0 - p-cancelable@1.1.0: {} - p-cancelable@2.1.1: {} - p-limit@2.3.0: dependencies: p-try: 2.2.0 @@ -24607,11 +24620,6 @@ snapshots: p-reduce@3.0.0: {} - p-some@5.0.0: - dependencies: - aggregate-error: 3.1.0 - p-cancelable: 2.1.1 - p-timeout@6.1.4: {} p-try@2.2.0: {} @@ -25705,10 +25713,6 @@ snapshots: readdirp@4.1.2: {} - rechoir@0.6.2: - dependencies: - resolve: 1.22.10 - rechoir@0.8.0: dependencies: resolve: 1.22.10 @@ -25953,6 +25957,15 @@ snapshots: hash-base: 3.1.0 inherits: 2.0.4 + rollup-plugin-visualizer@5.14.0(rollup@3.29.5): + dependencies: + open: 8.4.2 + picomatch: 4.0.2 + source-map: 0.7.4 + yargs: 17.7.2 + optionalDependencies: + rollup: 3.29.5 + rollup-plugin-visualizer@5.14.0(rollup@4.50.0): dependencies: open: 8.4.2 @@ -26134,12 +26147,6 @@ snapshots: shebang-regex@3.0.0: {} - shelljs@0.8.5: - dependencies: - glob: 7.2.3 - interpret: 1.4.0 - rechoir: 0.6.2 - shiki@3.4.1: dependencies: '@shikijs/core': 3.4.1 @@ -26763,12 +26770,6 @@ snapshots: csso: 5.0.5 picocolors: 1.1.1 - swagger-fluent@5.0.3: - dependencies: - deepmerge: 4.3.1 - is-plain-object: 3.0.1 - request: 2.88.2 - synckit@0.11.5: dependencies: '@pkgr/core': 0.2.4 @@ -27440,8 +27441,6 @@ snapshots: urix@0.1.0: optional: true - url-join@4.0.1: {} - url-parse-lax@3.0.0: dependencies: prepend-http: 2.0.0 @@ -28036,10 +28035,6 @@ snapshots: type-fest: 4.41.0 write-json-file: 6.0.0 - ws@6.2.3: - dependencies: - async-limiter: 1.0.1 - ws@7.5.10: {} ws@8.18.2: {} From f612509cac87b859e81a7a52fe94b2eaccad22f9 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 14 Oct 2025 12:05:31 +0800 Subject: [PATCH 05/20] =?UTF-8?q?perf:=20=E6=94=AF=E6=8C=81=E6=96=B0?= =?UTF-8?q?=E7=BD=91=E4=BB=A3=E7=90=86=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/plugin/cert-plugin/index.ts | 6 +- .../src/plugins/plugin-xinnet/access-agent.ts | 216 ++++++++++++------ .../plugin-xinnet/dns-provider-agent.ts | 90 ++++++++ .../src/plugins/plugin-xinnet/index.ts | 3 + 4 files changed, 243 insertions(+), 72 deletions(-) create mode 100644 packages/ui/certd-server/src/plugins/plugin-xinnet/dns-provider-agent.ts diff --git a/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts b/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts index 5991f22b..3cac97e5 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts @@ -117,11 +117,11 @@ export class CertApplyPlugin extends CertApplyBasePlugin { ], }, required: true, - helper: `1. DNS直接验证:域名dns解析是在阿里云/腾讯云/华为云/CF/NameSilo/西数/火山/dns.la/京东云/51dns的,选它 -2. CNAME代理验证:支持任何注册商的域名,第一次需要手动添加[CNAME记录](#/certd/cname/record)(建议将DNS服务器修改为阿里云/腾讯云的,然后使用DNS直接验证) + helper: `1. DNS直接验证:当域名dns解析已被本系统支持时(即下方DNS解析服务商选项中可选),推荐选择此方式 +2. CNAME代理验证:支持任何注册商的域名,第一次需要手动添加[CNAME记录](#/certd/cname/record)(如果经常申请失败,建议将DNS服务器修改为阿里云/腾讯云的,然后使用DNS直接验证) 3. HTTP文件验证:不支持泛域名,需要配置网站文件上传 4. 多DNS提供商:每个域名可以选择独立的DNS提供商 -5. 自动匹配:需要在[域名管理](#/certd/cert/domain)中事先配置好校验方式 +5. 自动匹配:此处无需选择校验方式,需要在[域名管理](#/certd/cert/domain)中提前配置好校验方式 `, }) challengeType!: string; diff --git a/packages/ui/certd-server/src/plugins/plugin-xinnet/access-agent.ts b/packages/ui/certd-server/src/plugins/plugin-xinnet/access-agent.ts index 9fa65629..93234566 100644 --- a/packages/ui/certd-server/src/plugins/plugin-xinnet/access-agent.ts +++ b/packages/ui/certd-server/src/plugins/plugin-xinnet/access-agent.ts @@ -1,79 +1,157 @@ -// import { IsAccess, AccessInput, BaseAccess } from "@certd/pipeline"; -// import { XinnetClient } from "@certd/plugin-plus"; +import { IsAccess, AccessInput, BaseAccess, Pager, PageSearch } from "@certd/pipeline"; +import crypto from "crypto"; +/** + * 这个注解将注册一个授权配置 + * 在certd的后台管理系统中,用户可以选择添加此类型的授权 + */ +@IsAccess({ + name: "xinnetagent", + title: "新网授权(代理方式)", + icon: "lsicon:badge-new-filled", + desc: "" +}) +export class XinnetAgentAccess extends BaseAccess { -// /** -// * 这个注解将注册一个授权配置 -// * 在certd的后台管理系统中,用户可以选择添加此类型的授权 -// */ -// @IsAccess({ -// name: "xinnetagent", -// title: "新网授权(代理方式)", -// icon: "lsicon:badge-new-filled", -// desc: "" -// }) -// export class XinnetAccess extends BaseAccess { + /** + * 授权属性配置 + */ + @AccessInput({ + title: "代理账号", + component: { + placeholder: "代理账号,如:agent0001" + }, + required: true, + encrypt: false + }) + agentCode = ""; -// /** -// * 授权属性配置 -// */ -// @AccessInput({ -// title: "代理账号", -// component: { -// placeholder: "代理账号,如:agent0001" -// }, -// required: true, -// encrypt: false -// }) -// username = ""; + @AccessInput({ + title: "API密钥", + component: { + name: "a-input-password", + vModel: "value", + placeholder: "API密钥" + }, + required: true, + encrypt: true + }) + appSecret = ""; -// @AccessInput({ -// title: "API密钥", -// component: { -// name: "a-input-password", -// vModel: "value", -// placeholder: "API密钥" -// }, -// required: true, -// encrypt: true -// }) -// apikey = ""; + @AccessInput({ + title: "测试", + component: { + name: "api-test", + action: "TestRequest" + }, + helper: "点击测试接口是否正常" + }) + testRequest = true; -// @AccessInput({ -// title: "测试", -// component: { -// name: "api-test", -// action: "TestRequest" -// }, -// helper: "点击测试接口是否正常" -// }) -// testRequest = true; + async onTestRequest() { -// async onTestRequest() { + // const client = new XinnetClient({ + // access: this, + // logger: this.ctx.logger, + // http: this.ctx.http + // }); + await this.getDomainList({ pageNo: 1, pageSize: 1 }); -// // const client = new XinnetClient({ -// // access: this, -// // logger: this.ctx.logger, -// // http: this.ctx.http -// // }); - -// await client.getDomainList({ pageNo: 1, pageSize: 1 }); - -// return "ok"; -// } + return "ok"; + } -// getCacheKey () { -// let hashStr = "" -// for (const key in this) { -// if (Object.prototype.hasOwnProperty.call(this, key)) { -// const element = this[key]; -// hashStr += element; -// } -// } -// const hashCode = this.ctx.utils.hash.sha256(hashStr); -// return `xinnet-${hashCode}`; -// } -// } + async getDomainList(req:PageSearch) { + const pager = new Pager(req); + const conf = { + url: "/api/domain/list", + data: { + pageNo: String(pager.pageNo), + pageSize: String(pager.pageSize) + } + } + return await this.doRequest(conf); + } -// new XinnetAccess(); + + /** + * 生成 UTC 0 时区的时间戳 + */ + generateTimestamp() { + const timestamp = new Date().toISOString().replace(/\.\d{3}Z$/, "Z").replaceAll(":", "").replaceAll("-", ""); + return timestamp; + } + + /** + * 字节转16进制字符串 + */ + bytesToHex(bytes:any) { + return bytes.toString('hex'); + } + + /** + * 生成签名 + */ + generateSignature(timestamp, urlPath, requestBody) { + const algorithm = 'HMAC-SHA256'; + const requestMethod = 'POST'; + + // 构建待签名字符串 + const stringToSign = `${algorithm}\n${timestamp}\n${requestMethod}\n${urlPath}\n${requestBody}`; + + // 使用 HMAC-SHA256 计算签名 + const hmac = crypto.createHmac('sha256', this.appSecret); + hmac.update(stringToSign); + const signatureBytes = hmac.digest(); + + // 转换为16进制字符串 + return this.bytesToHex(signatureBytes); + } + + /** + * 生成 authorization header + */ + generateAuthorization(timestamp, urlPath, requestBody) { + const signature = this.generateSignature(timestamp, urlPath, requestBody); + return `HMAC-SHA256 Access=${this.agentCode}, Signature=${signature}`; + } + + /** + * 查询域名分页列表 + */ + async doRequest(req:any) { + + const baseURL = 'https://apiv2.xinnet.com'; + const urlPath = req.url; + const requestURL = baseURL + urlPath; // 实际请求URL去掉最后的斜杠 + + // 请求体 + const requestBody = JSON.stringify(req.data); + + // 生成时间戳和授权头 + const timestamp = this.generateTimestamp(); + const authorization = this.generateAuthorization(timestamp, urlPath+"/", requestBody); + + // 请求配置 + const config = { + method: 'POST', + url: requestURL, + headers: { + 'Content-Type': 'application/json', + 'timestamp': timestamp, + 'authorization': authorization + }, + data: requestBody, + }; + + const res = await this.ctx.http.request(config); + + if (res.code !="0"){ + throw new Error(`API Error: ${res.code} ${res.requestId} - ${JSON.stringify(res.msg)}`); + } + return res.data; + } + +} + +new XinnetAgentAccess(); diff --git a/packages/ui/certd-server/src/plugins/plugin-xinnet/dns-provider-agent.ts b/packages/ui/certd-server/src/plugins/plugin-xinnet/dns-provider-agent.ts new file mode 100644 index 00000000..c32b8da2 --- /dev/null +++ b/packages/ui/certd-server/src/plugins/plugin-xinnet/dns-provider-agent.ts @@ -0,0 +1,90 @@ +import { AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions } from "@certd/plugin-cert"; +import { XinnetAgentAccess } from "./access-agent.js"; + +export type XinnetAgentRecord = { + recordId: number; + domainName: string; +}; + +// 这里通过IsDnsProvider注册一个dnsProvider +@IsDnsProvider({ + name: "xinnetagent", + title: "新网(代理方式)", + desc: "新网域名解析(代理方式)", + icon: "lsicon:badge-new-filled", + // 这里是对应的 cloudflare的access类型名称 + accessType: "xinnetagent", + order: 7 +}) +export class XinnetAgentProvider extends AbstractDnsProvider { + access!: XinnetAgentAccess; + + async onInstance() { + //一些初始化的操作 + // 也可以通过ctx成员变量传递context + this.access = this.ctx.access as XinnetAgentAccess; + } + + /** + * 创建dns解析记录,用于验证域名所有权 + */ + async createRecord(options: CreateRecordOptions): Promise { + /** + * fullRecord: '_acme-challenge.test.example.com', + * value: 一串uuid + * type: 'TXT', + * domain: 'example.com' + */ + const { fullRecord, value, type, domain } = options; + this.logger.info("添加域名解析:", fullRecord, value, type, domain); + + + /** + * /api/dns/create + * domainName 是 string 域名名称 test-xinnet-0516-ceshi.cn +recordName 是 string 记录名 test1.test-xinnet-0516-ceshi.cn,如果是@和空字符只需要传域名即可 +type 是 string 解析记录的类型 可选择类型如下: NS A CNAME MX TXT URL SRV AAAA A +value 是 string 解析内容 192.168.1.50 +line 是 string 线路 只能传"默认" + */ + + const res = await this.access.doRequest({ + url:"/api/dns/create", + data:{ + domainName: domain, + recordName: fullRecord, + type: type, + value: value, + line: "默认" + } + }); + + + return { + recordId:res, + domainName: domain + }; + } + + + /** + * 删除dns解析记录,清理申请痕迹 + * @param options + */ + async removeRecord(options: RemoveRecordOptions): Promise { + + const {domainName,recordId} = options.recordRes; + await this.access.doRequest({ + url:"/api/dns/delete", + data:{ + recordId: recordId, + domainName: domainName + } + }); + + + } +} + +//实例化这个provider,将其自动注册到系统中 +new XinnetAgentProvider(); diff --git a/packages/ui/certd-server/src/plugins/plugin-xinnet/index.ts b/packages/ui/certd-server/src/plugins/plugin-xinnet/index.ts index db899c71..871ad205 100644 --- a/packages/ui/certd-server/src/plugins/plugin-xinnet/index.ts +++ b/packages/ui/certd-server/src/plugins/plugin-xinnet/index.ts @@ -1,2 +1,5 @@ export * from './dns-provider.js'; export * from './access.js'; + +export * from './access-agent.js'; +export * from './dns-provider-agent.js'; From cd35568e042e6ab928685efad51cdbed823d2d4f Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 14 Oct 2025 22:25:04 +0800 Subject: [PATCH 06/20] =?UTF-8?q?perf:=20=E8=AF=81=E4=B9=A6=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE=E8=AF=81=E4=B9=A6?= =?UTF-8?q?=E5=8D=B3=E5=B0=86=E8=BF=87=E6=9C=9F=E5=A4=A9=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin-cert/src/plugin/cert-plugin/index.ts | 6 +++--- .../certd-client/src/locales/langs/en-US/certd.ts | 2 ++ .../certd-client/src/locales/langs/zh-CN/certd.ts | 2 ++ .../src/views/certd/monitor/site/crud.tsx | 14 +++++++++++++- .../src/views/certd/monitor/site/setting/api.ts | 1 + .../src/views/certd/monitor/site/setting/index.vue | 6 ++++++ .../src/modules/mine/service/models.ts | 1 + .../modules/monitor/service/site-info-service.ts | 5 ++--- 8 files changed, 30 insertions(+), 7 deletions(-) diff --git a/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts b/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts index 3cac97e5..8811ccd3 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts @@ -133,9 +133,9 @@ export class CertApplyPlugin extends CertApplyBasePlugin { name: "icon-select", vModel: "value", options: [ - { value: "letsencrypt", label: "Let's Encrypt", icon: "simple-icons:letsencrypt" }, - { value: "google", label: "Google", icon: "flat-color-icons:google" }, - { value: "zerossl", label: "ZeroSSL", icon: "emojione:digit-zero" }, + { value: "letsencrypt", label: "Let's Encrypt(免费,新手推荐)", icon: "simple-icons:letsencrypt" }, + { value: "google", label: "Google(免费)", icon: "flat-color-icons:google" }, + { value: "zerossl", label: "ZeroSSL(免费)", icon: "emojione:digit-zero" }, { value: "sslcom", label: "SSL.com(仅主域名和www免费)", icon: "la:expeditedssl" }, ], }, diff --git a/packages/ui/certd-client/src/locales/langs/en-US/certd.ts b/packages/ui/certd-client/src/locales/langs/en-US/certd.ts index e76e4ded..373727a9 100644 --- a/packages/ui/certd-client/src/locales/langs/en-US/certd.ts +++ b/packages/ui/certd-client/src/locales/langs/en-US/certd.ts @@ -281,6 +281,8 @@ export default { cronTrigger: "Scheduled trigger for monitoring", dnsServer: "DNS Server", dnsServerHelper: "Use a custom domain name resolution server, such as: 1.1.1.1 , support multiple", + certValidDays: "Certificate Valid Days", + certValidDaysHelper: "Number of days before expiration to send a notification", }, }, checkStatus: { diff --git a/packages/ui/certd-client/src/locales/langs/zh-CN/certd.ts b/packages/ui/certd-client/src/locales/langs/zh-CN/certd.ts index 72631023..f5535c99 100644 --- a/packages/ui/certd-client/src/locales/langs/zh-CN/certd.ts +++ b/packages/ui/certd-client/src/locales/langs/zh-CN/certd.ts @@ -286,6 +286,8 @@ export default { cronTrigger: "定时触发监控", dnsServer: "DNS服务器", dnsServerHelper: "使用自定义的域名解析服务器,如:1.1.1.1 , 支持多个", + certValidDays: "证书到期前天数", + certValidDaysHelper: "证书到期前多少天发送通知", }, }, checkStatus: { diff --git a/packages/ui/certd-client/src/views/certd/monitor/site/crud.tsx b/packages/ui/certd-client/src/views/certd/monitor/site/crud.tsx index b600793c..524130bf 100644 --- a/packages/ui/certd-client/src/views/certd/monitor/site/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/monitor/site/crud.tsx @@ -2,6 +2,7 @@ import { useI18n } from "/src/locales"; import { AddReq, ColumnCompositionProps, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud"; import { siteInfoApi } from "./api"; +import * as settingApi from "./setting/api"; import dayjs from "dayjs"; import { Modal, notification } from "ant-design-vue"; import { useSettingStore } from "/@/store/settings"; @@ -9,6 +10,7 @@ import { mySuiteApi } from "/@/views/certd/suite/mine/api"; import { mitter } from "/@/utils/util.mitt"; import { useSiteIpMonitor } from "./ip/use"; import { useSiteImport } from "/@/views/certd/monitor/site/use"; +import { ref } from "vue"; export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet { const { t } = useI18n(); @@ -47,6 +49,14 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat const { openSiteIpMonitorDialog } = useSiteIpMonitor(); const { openSiteImportDialog } = useSiteImport(); + const certValidDaysRef = ref(10); + + async function loadSetting() { + const setting = await settingApi.SiteMonitorSettingsGet(); + certValidDaysRef.value = setting?.certValidDays || 10; + } + loadSetting() + function checkAll() { Modal.confirm({ title: t("certd.monitor.confirmTitle"), // "确认" @@ -385,6 +395,8 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat column: { conditionalRender: false, cellRender({ row }) { + + const certValidDays = certValidDaysRef.value; const { certEffectiveTime: effectiveTime, certExpiresTime: expiresTime } = row || {}; if (!expiresTime) { return "-"; @@ -397,7 +409,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat const effectiveDays = Math.max(90, dayjs(expiresTime).diff(applyDate, "day")); // 距离失效时间剩余天数 const leftDays = dayjs(expiresTime).diff(dayjs(), "day"); - const color = leftDays < 20 ? "red" : "#389e0d"; + const color = leftDays < certValidDays ? "red" : "#389e0d"; const percent = (leftDays / effectiveDays) * 100; // console.log('cellRender', 'effectiveDays', effectiveDays, 'expiresTime', expiresTime, 'applyTime', applyTime, 'percent', percent, row) return `${leftDays}${t("certd.monitor.days")}`} />; diff --git a/packages/ui/certd-client/src/views/certd/monitor/site/setting/api.ts b/packages/ui/certd-client/src/views/certd/monitor/site/setting/api.ts index ffe79de9..88e936b4 100644 --- a/packages/ui/certd-client/src/views/certd/monitor/site/setting/api.ts +++ b/packages/ui/certd-client/src/views/certd/monitor/site/setting/api.ts @@ -6,6 +6,7 @@ export type UserSiteMonitorSetting = { retryTimes?: number; cron?: string; dnsServer?: string[]; + certValidDays?: number; }; export async function SiteMonitorSettingsGet() { diff --git a/packages/ui/certd-client/src/views/certd/monitor/site/setting/index.vue b/packages/ui/certd-client/src/views/certd/monitor/site/setting/index.vue index 60054fd5..c0cfdd95 100644 --- a/packages/ui/certd-client/src/views/certd/monitor/site/setting/index.vue +++ b/packages/ui/certd-client/src/views/certd/monitor/site/setting/index.vue @@ -17,6 +17,12 @@
{{ t("certd.monitor.setting.monitorRetryTimes") }}
+ +
+ +
+
{{ t("certd.monitor.setting.certValidDaysHelper") }}
+
diff --git a/packages/ui/certd-server/src/modules/mine/service/models.ts b/packages/ui/certd-server/src/modules/mine/service/models.ts index f74cebdb..fc8ce6ca 100644 --- a/packages/ui/certd-server/src/modules/mine/service/models.ts +++ b/packages/ui/certd-server/src/modules/mine/service/models.ts @@ -28,6 +28,7 @@ export class UserSiteMonitorSetting extends BaseSettings { cron?:string = undefined; retryTimes?:number = 3; dnsServer?:string[] = undefined; + certValidDays?:number = 10; } export class UserEmailSetting extends BaseSettings { diff --git a/packages/ui/certd-server/src/modules/monitor/service/site-info-service.ts b/packages/ui/certd-server/src/modules/monitor/service/site-info-service.ts index 8c21d9d4..a131eee7 100644 --- a/packages/ui/certd-server/src/modules/monitor/service/site-info-service.ts +++ b/packages/ui/certd-server/src/modules/monitor/service/site-info-service.ts @@ -275,13 +275,12 @@ export class SiteInfoService extends BaseService { } async sendExpiresNotify(site: SiteInfoEntity) { - - const tipDays = 10; + const setting = await this.userSettingsService.getSetting(site.userId, UserSiteMonitorSetting) + const tipDays = setting?.certValidDays || 10; const expires = site.certExpiresTime; const validDays = dayjs(expires).diff(dayjs(), "day"); const url = await this.notificationService.getBindUrl("#/certd/monitor/site"); - const setting = await this.userSettingsService.getSetting(site.userId, UserSiteMonitorSetting) const content = `站点名称: ${site.name} \n站点域名: ${site.domain} \n证书域名: ${site.certDomains} \n颁发机构: ${site.certProvider} \n过期时间: ${dayjs(site.certExpiresTime).format("YYYY-MM-DD")} \n`; if (validDays >= 0 && validDays < tipDays) { // 发通知 From 985128b537b9417519a70e11cc4e1b6c8169141d Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 14 Oct 2025 22:25:42 +0800 Subject: [PATCH 07/20] chore: 1 --- packages/ui/certd-client/src/views/certd/monitor/site/crud.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/ui/certd-client/src/views/certd/monitor/site/crud.tsx b/packages/ui/certd-client/src/views/certd/monitor/site/crud.tsx index 524130bf..37e5827d 100644 --- a/packages/ui/certd-client/src/views/certd/monitor/site/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/monitor/site/crud.tsx @@ -55,7 +55,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat const setting = await settingApi.SiteMonitorSettingsGet(); certValidDaysRef.value = setting?.certValidDays || 10; } - loadSetting() + loadSetting(); function checkAll() { Modal.confirm({ @@ -395,7 +395,6 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat column: { conditionalRender: false, cellRender({ row }) { - const certValidDays = certValidDaysRef.value; const { certEffectiveTime: effectiveTime, certExpiresTime: expiresTime } = row || {}; if (!expiresTime) { From 567cb7d737023e26ec58403c6f28f109e212d379 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 14 Oct 2025 22:35:24 +0800 Subject: [PATCH 08/20] =?UTF-8?q?perf:=20start.sh=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=A0=B9=E6=8D=AE=E5=BD=93=E5=89=8D=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6=E4=BD=BF=E7=94=A8?= =?UTF-8?q?sudo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- start.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/start.sh b/start.sh index 1f3bb7ca..cc06b7df 100755 --- a/start.sh +++ b/start.sh @@ -1,6 +1,14 @@ # set -e + +# 设置SUDO命令 +if [[ "$(uname -s)" == "Linux" ]]; then + SUDO_CMD="sudo" +else + SUDO_CMD="" +fi + echo "即将删除packages下除ui之外的其他目录,按y确认(如果您没有修改过源码,按y即可)" read -p "y/n: " confirm if [ $confirm != "y" ]; then @@ -25,30 +33,30 @@ done echo "安装pnpm, 前提是已经安装了nodejs" -sudo npm install -g pnpm --registry https://registry.npmmirror.com +$SUDO_CMD npm install -g pnpm --registry https://registry.npmmirror.com echo "安装依赖" -sudo pnpm install --registry https://registry.npmmirror.com +$SUDO_CMD pnpm install --registry https://registry.npmmirror.com echo "开始构建" echo "构建certd-client" export NODE_OPTIONS=--max-old-space-size=32768 cd packages/ui/certd-client -sudo -E pnpm run build +$SUDO_CMD -E pnpm run build cp -r dist/* ../certd-server/public echo "构建certd-server" cd ../certd-server -sudo -E pnpm run build +$SUDO_CMD -E pnpm run build echo "构建完成" echo "启动服务" # 前台运行 if [ $confirmNohup != "y" ]; then echo "当前运行模式为前台运行,ctrl+c或者关闭ssh将会停止运行" - sudo pnpm run start + $SUDO_CMD pnpm run start else echo "当前运行模式为后台运行,可以通过tail -f ./certd.log 命令查看日志" - nohup sudo pnpm run start > certd.log & + nohup $SUDO_CMD pnpm run start > certd.log & fi From 7993a7cdb01885535950c63187e3f67d67ba2f75 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 14 Oct 2025 22:41:03 +0800 Subject: [PATCH 09/20] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96start.sh?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=EF=BC=8C=E5=8E=BB=E6=8E=89=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E9=9D=9Eui=E7=9B=AE=E5=BD=95=E7=9A=84=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E5=8F=8A=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- start.sh | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/start.sh b/start.sh index cc06b7df..bf031a0d 100755 --- a/start.sh +++ b/start.sh @@ -5,19 +5,26 @@ set -e # 设置SUDO命令 if [[ "$(uname -s)" == "Linux" ]]; then SUDO_CMD="sudo" + SUDO_CMD_E="sudo -E" else SUDO_CMD="" + SUDO_CMD_E="" fi -echo "即将删除packages下除ui之外的其他目录,按y确认(如果您没有修改过源码,按y即可)" -read -p "y/n: " confirm -if [ $confirm != "y" ]; then - echo "取消操作" - exit 1 -fi +# echo "即将删除packages下除ui之外的其他目录,按y确认(如果您没有修改过源码,按y即可)" +# read -p "y/n: " confirm +# if [ $confirm != "y" ]; then +# echo "取消操作" +# exit 1 +# fi +# find ./packages -mindepth 1 -maxdepth 1 -type d ! -name 'ui' -exec rm -rf {} + +# echo "删除成功" + +cat > pnpm-workspace.yaml << EOF +packages: + - 'packages/ui/**' +EOF -find ./packages -mindepth 1 -maxdepth 1 -type d ! -name 'ui' -exec rm -rf {} + -echo "删除成功" # 检查输入是否正确 循环输入 while true; do @@ -41,12 +48,12 @@ echo "开始构建" echo "构建certd-client" export NODE_OPTIONS=--max-old-space-size=32768 cd packages/ui/certd-client -$SUDO_CMD -E pnpm run build +$SUDO_CMD_E pnpm run build cp -r dist/* ../certd-server/public echo "构建certd-server" cd ../certd-server -$SUDO_CMD -E pnpm run build +$SUDO_CMD_E pnpm run build echo "构建完成" echo "启动服务" From 4658e4c7399b2b9905cb8108188f75ea62820a6d Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 14 Oct 2025 22:41:32 +0800 Subject: [PATCH 10/20] 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 5bcd9595..caecf392 100644 --- a/packages/core/basic/build.md +++ b/packages/core/basic/build.md @@ -1 +1 @@ -20:32 +22:41 From 836e41064fb83b4faeeb6901a25543f9c66caf19 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 14 Oct 2025 22:43:55 +0800 Subject: [PATCH 11/20] 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 caecf392..bedac6ae 100644 --- a/packages/core/basic/build.md +++ b/packages/core/basic/build.md @@ -1 +1 @@ -22:41 +22:43 From cd21f2d1d77e919bc9d141107c4090b144c5c486 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 14 Oct 2025 22:48:36 +0800 Subject: [PATCH 12/20] 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 bedac6ae..0cf887ed 100644 --- a/packages/core/basic/build.md +++ b/packages/core/basic/build.md @@ -1 +1 @@ -22:43 +22:48 From e1daaf07ce2fda6ce44998d65f8a989fc6af88db Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 14 Oct 2025 22:50:33 +0800 Subject: [PATCH 13/20] v1.37.2 --- CHANGELOG.md | 17 +++++++++++++ lerna.json | 2 +- packages/core/acme-client/CHANGELOG.md | 6 +++++ packages/core/acme-client/package.json | 4 +-- packages/core/basic/CHANGELOG.md | 6 +++++ packages/core/basic/package.json | 2 +- packages/core/pipeline/CHANGELOG.md | 4 +++ 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 | 4 +++ packages/libs/lib-server/package.json | 12 ++++----- packages/libs/midway-flyway-js/CHANGELOG.md | 4 +++ packages/libs/midway-flyway-js/package.json | 2 +- packages/plugins/plugin-cert/CHANGELOG.md | 7 ++++++ packages/plugins/plugin-cert/package.json | 10 ++++---- packages/plugins/plugin-lib/CHANGELOG.md | 4 +++ packages/plugins/plugin-lib/package.json | 6 ++--- packages/ui/certd-client/CHANGELOG.md | 7 ++++++ packages/ui/certd-client/package.json | 6 ++--- packages/ui/certd-server/CHANGELOG.md | 15 +++++++++++ packages/ui/certd-server/package.json | 28 ++++++++++----------- 28 files changed, 134 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c728b265..c3a081d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14) + +### Bug Fixes + +* 修复飞牛证书部署后无法生效的bug ([bf156a1](https://github.com/certd/certd/commit/bf156a13bd443cdadb73c9dff79bbef7231b4401)) +* aliyunoss 选择证书接入点选择新加坡无法上传的bug ([e00733a](https://github.com/certd/certd/commit/e00733a34644c23ffe926486b15dc96bf2fa4b57)) + +### Performance Improvements + +* 优化start.sh脚本,去掉删除非ui目录的操作及提示 ([7993a7c](https://github.com/certd/certd/commit/7993a7cdb01885535950c63187e3f67d67ba2f75)) +* 增加飞牛证书id选择的提示 ([5a4d812](https://github.com/certd/certd/commit/5a4d8121462b1afe921d028465687be8c9679814)) +* 证书监控支持设置证书即将过期天数 ([cd35568](https://github.com/certd/certd/commit/cd35568e042e6ab928685efad51cdbed823d2d4f)) +* 支持网络测试 ([2bef608](https://github.com/certd/certd/commit/2bef608e07ceb56d52007f290667e0afef401b22)) +* 支持新网代理方式 ([f612509](https://github.com/certd/certd/commit/f612509cac87b859e81a7a52fe94b2eaccad22f9)) +* dns支持新网互联 ([f415190](https://github.com/certd/certd/commit/f41519048326d971acd9e0a30462231f77a299a6)) +* start.sh脚本支持根据当前系统判断是否使用sudo ([567cb7d](https://github.com/certd/certd/commit/567cb7d737023e26ec58403c6f28f109e212d379)) + ## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29) ### Bug Fixes diff --git a/lerna.json b/lerna.json index ea56846f..fb8dca50 100644 --- a/lerna.json +++ b/lerna.json @@ -9,5 +9,5 @@ } }, "npmClient": "pnpm", - "version": "1.37.1" + "version": "1.37.2" } diff --git a/packages/core/acme-client/CHANGELOG.md b/packages/core/acme-client/CHANGELOG.md index 93093cdd..c3fc31df 100644 --- a/packages/core/acme-client/CHANGELOG.md +++ b/packages/core/acme-client/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.37.2](https://github.com/publishlab/node-acme-client/compare/v1.37.1...v1.37.2) (2025-10-14) + +### Bug Fixes + +* aliyunoss 选择证书接入点选择新加坡无法上传的bug ([e00733a](https://github.com/publishlab/node-acme-client/commit/e00733a34644c23ffe926486b15dc96bf2fa4b57)) + ## [1.37.1](https://github.com/publishlab/node-acme-client/compare/v1.37.0...v1.37.1) (2025-09-29) **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 1b3d5785..57e6cd39 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.37.1", + "version": "1.37.2", "type": "module", "module": "scr/index.js", "main": "src/index.js", @@ -18,7 +18,7 @@ "types" ], "dependencies": { - "@certd/basic": "^1.37.1", + "@certd/basic": "^1.37.2", "@peculiar/x509": "^1.11.0", "asn1js": "^3.0.5", "axios": "^1.7.2", diff --git a/packages/core/basic/CHANGELOG.md b/packages/core/basic/CHANGELOG.md index 4ab50a40..bfcae24d 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.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14) + +### Performance Improvements + +* 支持网络测试 ([2bef608](https://github.com/certd/certd/commit/2bef608e07ceb56d52007f290667e0afef401b22)) + ## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29) **Note:** Version bump only for package @certd/basic diff --git a/packages/core/basic/package.json b/packages/core/basic/package.json index 5ba4c569..0e7a7f4d 100644 --- a/packages/core/basic/package.json +++ b/packages/core/basic/package.json @@ -1,7 +1,7 @@ { "name": "@certd/basic", "private": false, - "version": "1.37.1", + "version": "1.37.2", "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 68dfd6ec..d12c8699 100644 --- a/packages/core/pipeline/CHANGELOG.md +++ b/packages/core/pipeline/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.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14) + +**Note:** Version bump only for package @certd/pipeline + ## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29) **Note:** Version bump only for package @certd/pipeline diff --git a/packages/core/pipeline/package.json b/packages/core/pipeline/package.json index abcc6be4..6b9e35b0 100644 --- a/packages/core/pipeline/package.json +++ b/packages/core/pipeline/package.json @@ -1,7 +1,7 @@ { "name": "@certd/pipeline", "private": false, - "version": "1.37.1", + "version": "1.37.2", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -18,8 +18,8 @@ "compile": "tsc --skipLibCheck --watch" }, "dependencies": { - "@certd/basic": "^1.37.1", - "@certd/plus-core": "^1.37.1", + "@certd/basic": "^1.37.2", + "@certd/plus-core": "^1.37.2", "dayjs": "^1.11.7", "lodash-es": "^4.17.21", "reflect-metadata": "^0.1.13" diff --git a/packages/libs/lib-huawei/CHANGELOG.md b/packages/libs/lib-huawei/CHANGELOG.md index e57631b5..1dfd4607 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.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14) + +**Note:** Version bump only for package @certd/lib-huawei + ## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29) **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 c19dfc4f..d9767798 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.37.1", + "version": "1.37.2", "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 0add4a69..3201a962 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.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14) + +**Note:** Version bump only for package @certd/lib-iframe + ## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29) **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 c2ddd199..a3158d64 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.37.1", + "version": "1.37.2", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", diff --git a/packages/libs/lib-jdcloud/CHANGELOG.md b/packages/libs/lib-jdcloud/CHANGELOG.md index 00dd4580..315ab758 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.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14) + +**Note:** Version bump only for package @certd/jdcloud + ## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29) **Note:** Version bump only for package @certd/jdcloud diff --git a/packages/libs/lib-jdcloud/package.json b/packages/libs/lib-jdcloud/package.json index 4e5cc760..eecfb638 100644 --- a/packages/libs/lib-jdcloud/package.json +++ b/packages/libs/lib-jdcloud/package.json @@ -1,6 +1,6 @@ { "name": "@certd/jdcloud", - "version": "1.37.1", + "version": "1.37.2", "description": "jdcloud openApi sdk", "main": "./dist/bundle.js", "module": "./dist/bundle.js", diff --git a/packages/libs/lib-k8s/CHANGELOG.md b/packages/libs/lib-k8s/CHANGELOG.md index 8eaebe7b..4d76f5f5 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.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14) + +**Note:** Version bump only for package @certd/lib-k8s + ## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29) **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 b4c23d15..3ea61dba 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.37.1", + "version": "1.37.2", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -17,7 +17,7 @@ "pub": "npm publish" }, "dependencies": { - "@certd/basic": "^1.37.1", + "@certd/basic": "^1.37.2", "@kubernetes/client-node": "0.21.0" }, "devDependencies": { diff --git a/packages/libs/lib-server/CHANGELOG.md b/packages/libs/lib-server/CHANGELOG.md index 43339a72..22c9f235 100644 --- a/packages/libs/lib-server/CHANGELOG.md +++ b/packages/libs/lib-server/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.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14) + +**Note:** Version bump only for package @certd/lib-server + ## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29) **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 db00c9a8..3f376a96 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.37.1", + "version": "1.37.2", "description": "midway with flyway, sql upgrade way ", "private": false, "type": "module", @@ -28,11 +28,11 @@ ], "license": "AGPL", "dependencies": { - "@certd/acme-client": "^1.37.1", - "@certd/basic": "^1.37.1", - "@certd/pipeline": "^1.37.1", - "@certd/plugin-lib": "^1.37.1", - "@certd/plus-core": "^1.37.1", + "@certd/acme-client": "^1.37.2", + "@certd/basic": "^1.37.2", + "@certd/pipeline": "^1.37.2", + "@certd/plugin-lib": "^1.37.2", + "@certd/plus-core": "^1.37.2", "@midwayjs/cache": "3.14.0", "@midwayjs/core": "3.20.11", "@midwayjs/i18n": "3.20.13", diff --git a/packages/libs/midway-flyway-js/CHANGELOG.md b/packages/libs/midway-flyway-js/CHANGELOG.md index dee4041e..82975def 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.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14) + +**Note:** Version bump only for package @certd/midway-flyway-js + ## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29) **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 ae5e78ed..65a192a8 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.37.1", + "version": "1.37.2", "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 82b40321..f7dbee2c 100644 --- a/packages/plugins/plugin-cert/CHANGELOG.md +++ b/packages/plugins/plugin-cert/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14) + +### Performance Improvements + +* 证书监控支持设置证书即将过期天数 ([cd35568](https://github.com/certd/certd/commit/cd35568e042e6ab928685efad51cdbed823d2d4f)) +* 支持新网代理方式 ([f612509](https://github.com/certd/certd/commit/f612509cac87b859e81a7a52fe94b2eaccad22f9)) + ## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29) ### Performance Improvements diff --git a/packages/plugins/plugin-cert/package.json b/packages/plugins/plugin-cert/package.json index e749bf30..ba3b546f 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.37.1", + "version": "1.37.2", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -17,10 +17,10 @@ "compile": "tsc --skipLibCheck --watch" }, "dependencies": { - "@certd/acme-client": "^1.37.1", - "@certd/basic": "^1.37.1", - "@certd/pipeline": "^1.37.1", - "@certd/plugin-lib": "^1.37.1", + "@certd/acme-client": "^1.37.2", + "@certd/basic": "^1.37.2", + "@certd/pipeline": "^1.37.2", + "@certd/plugin-lib": "^1.37.2", "@google-cloud/publicca": "^1.3.0", "dayjs": "^1.11.7", "jszip": "^3.10.1", diff --git a/packages/plugins/plugin-lib/CHANGELOG.md b/packages/plugins/plugin-lib/CHANGELOG.md index 9ee0c99d..eb4e40c2 100644 --- a/packages/plugins/plugin-lib/CHANGELOG.md +++ b/packages/plugins/plugin-lib/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.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14) + +**Note:** Version bump only for package @certd/plugin-lib + ## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29) ### Performance Improvements diff --git a/packages/plugins/plugin-lib/package.json b/packages/plugins/plugin-lib/package.json index 7954bdcb..96a7ff6d 100644 --- a/packages/plugins/plugin-lib/package.json +++ b/packages/plugins/plugin-lib/package.json @@ -1,7 +1,7 @@ { "name": "@certd/plugin-lib", "private": false, - "version": "1.37.1", + "version": "1.37.2", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -22,8 +22,8 @@ "@alicloud/pop-core": "^1.7.10", "@alicloud/tea-util": "^1.4.10", "@aws-sdk/client-s3": "^3.787.0", - "@certd/basic": "^1.37.1", - "@certd/pipeline": "^1.37.1", + "@certd/basic": "^1.37.2", + "@certd/pipeline": "^1.37.2", "@kubernetes/client-node": "0.21.0", "ali-oss": "^6.22.0", "basic-ftp": "^5.0.5", diff --git a/packages/ui/certd-client/CHANGELOG.md b/packages/ui/certd-client/CHANGELOG.md index 070cbe95..db424139 100644 --- a/packages/ui/certd-client/CHANGELOG.md +++ b/packages/ui/certd-client/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14) + +### Performance Improvements + +* 证书监控支持设置证书即将过期天数 ([cd35568](https://github.com/certd/certd/commit/cd35568e042e6ab928685efad51cdbed823d2d4f)) +* 支持网络测试 ([2bef608](https://github.com/certd/certd/commit/2bef608e07ceb56d52007f290667e0afef401b22)) + ## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29) ### Bug Fixes diff --git a/packages/ui/certd-client/package.json b/packages/ui/certd-client/package.json index 3b4dc0e9..36b1ed74 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.37.1", + "version": "1.37.2", "private": true, "scripts": { "dev": "vite --open", @@ -106,8 +106,8 @@ "zod-defaults": "^0.1.3" }, "devDependencies": { - "@certd/lib-iframe": "^1.37.1", - "@certd/pipeline": "^1.37.1", + "@certd/lib-iframe": "^1.37.2", + "@certd/pipeline": "^1.37.2", "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-node-resolve": "^15.2.3", "@types/chai": "^4.3.12", diff --git a/packages/ui/certd-server/CHANGELOG.md b/packages/ui/certd-server/CHANGELOG.md index 2c9de3e2..d8fa6a85 100644 --- a/packages/ui/certd-server/CHANGELOG.md +++ b/packages/ui/certd-server/CHANGELOG.md @@ -3,6 +3,21 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14) + +### Bug Fixes + +* 修复飞牛证书部署后无法生效的bug ([bf156a1](https://github.com/certd/certd/commit/bf156a13bd443cdadb73c9dff79bbef7231b4401)) +* aliyunoss 选择证书接入点选择新加坡无法上传的bug ([e00733a](https://github.com/certd/certd/commit/e00733a34644c23ffe926486b15dc96bf2fa4b57)) + +### Performance Improvements + +* 增加飞牛证书id选择的提示 ([5a4d812](https://github.com/certd/certd/commit/5a4d8121462b1afe921d028465687be8c9679814)) +* 证书监控支持设置证书即将过期天数 ([cd35568](https://github.com/certd/certd/commit/cd35568e042e6ab928685efad51cdbed823d2d4f)) +* 支持网络测试 ([2bef608](https://github.com/certd/certd/commit/2bef608e07ceb56d52007f290667e0afef401b22)) +* 支持新网代理方式 ([f612509](https://github.com/certd/certd/commit/f612509cac87b859e81a7a52fe94b2eaccad22f9)) +* dns支持新网互联 ([f415190](https://github.com/certd/certd/commit/f41519048326d971acd9e0a30462231f77a299a6)) + ## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29) ### Bug Fixes diff --git a/packages/ui/certd-server/package.json b/packages/ui/certd-server/package.json index a3fb6a56..58581b2e 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.37.1", + "version": "1.37.2", "description": "fast-server base midway", "private": true, "type": "module", @@ -45,20 +45,20 @@ "@aws-sdk/client-cloudfront": "^3.699.0", "@aws-sdk/client-iam": "^3.699.0", "@aws-sdk/client-s3": "^3.705.0", - "@certd/acme-client": "^1.37.1", - "@certd/basic": "^1.37.1", - "@certd/commercial-core": "^1.37.1", + "@certd/acme-client": "^1.37.2", + "@certd/basic": "^1.37.2", + "@certd/commercial-core": "^1.37.2", "@certd/cv4pve-api-javascript": "^8.4.2", - "@certd/jdcloud": "^1.37.1", - "@certd/lib-huawei": "^1.37.1", - "@certd/lib-k8s": "^1.37.1", - "@certd/lib-server": "^1.37.1", - "@certd/midway-flyway-js": "^1.37.1", - "@certd/pipeline": "^1.37.1", - "@certd/plugin-cert": "^1.37.1", - "@certd/plugin-lib": "^1.37.1", - "@certd/plugin-plus": "^1.37.1", - "@certd/plus-core": "^1.37.1", + "@certd/jdcloud": "^1.37.2", + "@certd/lib-huawei": "^1.37.2", + "@certd/lib-k8s": "^1.37.2", + "@certd/lib-server": "^1.37.2", + "@certd/midway-flyway-js": "^1.37.2", + "@certd/pipeline": "^1.37.2", + "@certd/plugin-cert": "^1.37.2", + "@certd/plugin-lib": "^1.37.2", + "@certd/plugin-plus": "^1.37.2", + "@certd/plus-core": "^1.37.2", "@huaweicloud/huaweicloud-sdk-cdn": "^3.1.120", "@huaweicloud/huaweicloud-sdk-core": "^3.1.120", "@koa/cors": "^5.0.0", From 1c4649409d09e355aaafa267126f796a3f6484b2 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 14 Oct 2025 22:52:03 +0800 Subject: [PATCH 14/20] build: trigger build image --- trigger/build.trigger | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trigger/build.trigger b/trigger/build.trigger index 50b4aa2d..04e0b86a 100644 --- a/trigger/build.trigger +++ b/trigger/build.trigger @@ -1 +1 @@ -20:37 +22:52 From 0b9bef2f383c342bc173c037edca8e69c82a2f4a Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 14 Oct 2025 22:52:22 +0800 Subject: [PATCH 15/20] build: publish --- docs/guide/changelogs/CHANGELOG.md | 17 +++++++++++++++++ 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 +- packages/plugins/plugin-lib/package.json | 2 +- 12 files changed, 28 insertions(+), 11 deletions(-) diff --git a/docs/guide/changelogs/CHANGELOG.md b/docs/guide/changelogs/CHANGELOG.md index c728b265..c3a081d0 100644 --- a/docs/guide/changelogs/CHANGELOG.md +++ b/docs/guide/changelogs/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14) + +### Bug Fixes + +* 修复飞牛证书部署后无法生效的bug ([bf156a1](https://github.com/certd/certd/commit/bf156a13bd443cdadb73c9dff79bbef7231b4401)) +* aliyunoss 选择证书接入点选择新加坡无法上传的bug ([e00733a](https://github.com/certd/certd/commit/e00733a34644c23ffe926486b15dc96bf2fa4b57)) + +### Performance Improvements + +* 优化start.sh脚本,去掉删除非ui目录的操作及提示 ([7993a7c](https://github.com/certd/certd/commit/7993a7cdb01885535950c63187e3f67d67ba2f75)) +* 增加飞牛证书id选择的提示 ([5a4d812](https://github.com/certd/certd/commit/5a4d8121462b1afe921d028465687be8c9679814)) +* 证书监控支持设置证书即将过期天数 ([cd35568](https://github.com/certd/certd/commit/cd35568e042e6ab928685efad51cdbed823d2d4f)) +* 支持网络测试 ([2bef608](https://github.com/certd/certd/commit/2bef608e07ceb56d52007f290667e0afef401b22)) +* 支持新网代理方式 ([f612509](https://github.com/certd/certd/commit/f612509cac87b859e81a7a52fe94b2eaccad22f9)) +* dns支持新网互联 ([f415190](https://github.com/certd/certd/commit/f41519048326d971acd9e0a30462231f77a299a6)) +* start.sh脚本支持根据当前系统判断是否使用sudo ([567cb7d](https://github.com/certd/certd/commit/567cb7d737023e26ec58403c6f28f109e212d379)) + ## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29) ### Bug Fixes diff --git a/packages/core/acme-client/package.json b/packages/core/acme-client/package.json index 57e6cd39..c13dd35d 100644 --- a/packages/core/acme-client/package.json +++ b/packages/core/acme-client/package.json @@ -70,5 +70,5 @@ "bugs": { "url": "https://github.com/publishlab/node-acme-client/issues" }, - "gitHead": "c725cee0445dbe1ebd1b6588373bde31697113da" + "gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db" } diff --git a/packages/core/basic/package.json b/packages/core/basic/package.json index 0e7a7f4d..80e5d0a0 100644 --- a/packages/core/basic/package.json +++ b/packages/core/basic/package.json @@ -46,5 +46,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "c725cee0445dbe1ebd1b6588373bde31697113da" + "gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db" } diff --git a/packages/core/pipeline/package.json b/packages/core/pipeline/package.json index 6b9e35b0..7a4045f9 100644 --- a/packages/core/pipeline/package.json +++ b/packages/core/pipeline/package.json @@ -45,5 +45,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "c725cee0445dbe1ebd1b6588373bde31697113da" + "gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db" } diff --git a/packages/libs/lib-huawei/package.json b/packages/libs/lib-huawei/package.json index d9767798..24e1076d 100644 --- a/packages/libs/lib-huawei/package.json +++ b/packages/libs/lib-huawei/package.json @@ -24,5 +24,5 @@ "prettier": "^2.8.8", "tslib": "^2.8.1" }, - "gitHead": "c725cee0445dbe1ebd1b6588373bde31697113da" + "gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db" } diff --git a/packages/libs/lib-iframe/package.json b/packages/libs/lib-iframe/package.json index a3158d64..cae969bf 100644 --- a/packages/libs/lib-iframe/package.json +++ b/packages/libs/lib-iframe/package.json @@ -31,5 +31,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "c725cee0445dbe1ebd1b6588373bde31697113da" + "gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db" } diff --git a/packages/libs/lib-jdcloud/package.json b/packages/libs/lib-jdcloud/package.json index eecfb638..bc69f866 100644 --- a/packages/libs/lib-jdcloud/package.json +++ b/packages/libs/lib-jdcloud/package.json @@ -61,5 +61,5 @@ "fetch" ] }, - "gitHead": "c725cee0445dbe1ebd1b6588373bde31697113da" + "gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db" } diff --git a/packages/libs/lib-k8s/package.json b/packages/libs/lib-k8s/package.json index 3ea61dba..5a1602b1 100644 --- a/packages/libs/lib-k8s/package.json +++ b/packages/libs/lib-k8s/package.json @@ -32,5 +32,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "c725cee0445dbe1ebd1b6588373bde31697113da" + "gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db" } diff --git a/packages/libs/lib-server/package.json b/packages/libs/lib-server/package.json index 3f376a96..a30976e2 100644 --- a/packages/libs/lib-server/package.json +++ b/packages/libs/lib-server/package.json @@ -64,5 +64,5 @@ "typeorm": "^0.3.11", "typescript": "^5.4.2" }, - "gitHead": "c725cee0445dbe1ebd1b6588373bde31697113da" + "gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db" } diff --git a/packages/libs/midway-flyway-js/package.json b/packages/libs/midway-flyway-js/package.json index 65a192a8..922854d1 100644 --- a/packages/libs/midway-flyway-js/package.json +++ b/packages/libs/midway-flyway-js/package.json @@ -46,5 +46,5 @@ "typeorm": "^0.3.11", "typescript": "^5.4.2" }, - "gitHead": "c725cee0445dbe1ebd1b6588373bde31697113da" + "gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db" } diff --git a/packages/plugins/plugin-cert/package.json b/packages/plugins/plugin-cert/package.json index ba3b546f..511cc910 100644 --- a/packages/plugins/plugin-cert/package.json +++ b/packages/plugins/plugin-cert/package.json @@ -43,5 +43,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "c725cee0445dbe1ebd1b6588373bde31697113da" + "gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db" } diff --git a/packages/plugins/plugin-lib/package.json b/packages/plugins/plugin-lib/package.json index 96a7ff6d..2ca50f23 100644 --- a/packages/plugins/plugin-lib/package.json +++ b/packages/plugins/plugin-lib/package.json @@ -53,5 +53,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "c725cee0445dbe1ebd1b6588373bde31697113da" + "gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db" } From 67a89d1289c555d200cbfcc598b3cb06f070c60c Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 14 Oct 2025 22:53:32 +0800 Subject: [PATCH 16/20] chore: 1 --- start.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/start.sh b/start.sh index bf031a0d..113bb86c 100755 --- a/start.sh +++ b/start.sh @@ -1,14 +1,13 @@ # set -e - # 设置SUDO命令 -if [[ "$(uname -s)" == "Linux" ]]; then - SUDO_CMD="sudo" - SUDO_CMD_E="sudo -E" -else +if [[ "$(uname -s)" =~ ^MINGW || "$(uname -s)" =~ ^CYGWIN || "$(uname -s)" =~ ^MSYS ]]; then SUDO_CMD="" SUDO_CMD_E="" +else + SUDO_CMD="sudo" + SUDO_CMD_E="sudo -E" fi # echo "即将删除packages下除ui之外的其他目录,按y确认(如果您没有修改过源码,按y即可)" From 6c533d225bf40e9d71e37e61010241c44d695580 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 14 Oct 2025 23:00:30 +0800 Subject: [PATCH 17/20] chore: 1 --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 768996d6..b40c4593 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,8 @@ "docs:build": "npm run copylogs && vitepress build docs", "docs:preview": "vitepress preview docs", "pub": "echo 1", - "dev": "pnpm run -r --parallel compile " + "dev": "pnpm run -r --parallel compile ", + "release": "time /t >trigger/release.trigger && git add trigger/release.trigger && git commit -m \"build: release\" && git push" }, "license": "AGPL-3.0", "dependencies": { From 1f42f933f07860b27aa3d016e40916ff2b063eac Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 14 Oct 2025 23:24:47 +0800 Subject: [PATCH 18/20] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=AB=99?= =?UTF-8?q?=E7=82=B9=E8=AF=81=E4=B9=A6=E7=9B=91=E6=8E=A7=EF=BC=8C=E8=AF=81?= =?UTF-8?q?=E4=B9=A6=E5=B7=B2=E7=BB=8F=E6=9B=B4=E6=96=B0=E5=88=B0=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E6=97=A5=E6=9C=9F=E4=BA=86=EF=BC=8C=E4=BB=8D=E7=84=B6?= =?UTF-8?q?=E5=8F=91=E5=87=BA=E8=AD=A6=E5=91=8A=E9=80=9A=E7=9F=A5=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/monitor/service/site-info-service.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/ui/certd-server/src/modules/monitor/service/site-info-service.ts b/packages/ui/certd-server/src/modules/monitor/service/site-info-service.ts index a131eee7..13f415df 100644 --- a/packages/ui/certd-server/src/modules/monitor/service/site-info-service.ts +++ b/packages/ui/certd-server/src/modules/monitor/service/site-info-service.ts @@ -169,8 +169,9 @@ export class SiteInfoService extends BaseService { if (!notify) { return; } + try { - await this.sendExpiresNotify(site); + await this.sendExpiresNotify(site.id); } catch (e) { logger.error("send notify error", e); } @@ -186,7 +187,7 @@ export class SiteInfoService extends BaseService { return; } try { - await this.sendCheckErrorNotify(site); + await this.sendCheckErrorNotify(site.id); } catch (e) { logger.error("send notify error", e); } @@ -231,8 +232,7 @@ export class SiteInfoService extends BaseService { ipErrorCount: errorCount }); try { - site = await this.info(site.id); - await this.sendCheckErrorNotify(site, true); + await this.sendCheckErrorNotify(site.id, true); } catch (e) { logger.error("send notify error", e); } @@ -254,7 +254,8 @@ export class SiteInfoService extends BaseService { return await this.doCheck(site, notify, retryTimes); } - async sendCheckErrorNotify(site: SiteInfoEntity, fromIpCheck = false) { + async sendCheckErrorNotify(siteId: number, fromIpCheck = false) { + const site = await this.info(siteId); const url = await this.notificationService.getBindUrl("#/certd/monitor/site"); const setting = await this.userSettingsService.getSetting(site.userId, UserSiteMonitorSetting) // 发邮件 @@ -274,7 +275,8 @@ export class SiteInfoService extends BaseService { ); } - async sendExpiresNotify(site: SiteInfoEntity) { + async sendExpiresNotify(siteId: number) { + const site = await this.info(siteId); const setting = await this.userSettingsService.getSetting(site.userId, UserSiteMonitorSetting) const tipDays = setting?.certValidDays || 10; From 54c42b1fc268f82facdf233ab6c5d16291b24f3c Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 14 Oct 2025 23:24:59 +0800 Subject: [PATCH 19/20] build: release --- trigger/release.trigger | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trigger/release.trigger b/trigger/release.trigger index 6e68a0f7..cd0bf6f7 100644 --- a/trigger/release.trigger +++ b/trigger/release.trigger @@ -1 +1 @@ -777 +23:24 From bb2714ff241f9db4a71d805b23a1b0f9f2f6413a Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Wed, 15 Oct 2025 23:03:59 +0800 Subject: [PATCH 20/20] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B9=B6?= =?UTF-8?q?=E5=8F=91=E6=83=85=E5=86=B5=E4=B8=8B=E8=AF=81=E4=B9=A6=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E6=97=A5=E5=BF=97=E6=B7=B7=E4=B9=B1=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/acme-client/src/api.js | 1 - packages/core/acme-client/src/auto.js | 4 +++- packages/core/acme-client/src/axios.js | 2 +- packages/core/acme-client/src/client.js | 20 +++++++++++-------- packages/core/acme-client/src/http.js | 15 +++++++------- packages/core/acme-client/types/index.d.ts | 1 + .../src/plugin/cert-plugin/acme.ts | 7 ++++--- 7 files changed, 29 insertions(+), 21 deletions(-) diff --git a/packages/core/acme-client/src/api.js b/packages/core/acme-client/src/api.js index f3035de6..b7e27037 100644 --- a/packages/core/acme-client/src/api.js +++ b/packages/core/acme-client/src/api.js @@ -28,7 +28,6 @@ class AcmeApi { } } } - console.log(locationUrl, mapping); return locationUrl; } diff --git a/packages/core/acme-client/src/auto.js b/packages/core/acme-client/src/auto.js index c18ec266..e87e288a 100644 --- a/packages/core/acme-client/src/auto.js +++ b/packages/core/acme-client/src/auto.js @@ -2,7 +2,6 @@ * ACME auto helper */ import { readCsrDomains } from "./crypto/index.js"; -import { log } from "./logger.js"; import { wait } from "./wait.js"; import { CancelError } from "./error.js"; @@ -45,6 +44,9 @@ export default async (client, userOpts) => { accountPayload.externalAccountBinding = opts.externalAccountBinding; } + const log = (...args)=>{ + return client.logger.info(...args); + } /** * Register account */ diff --git a/packages/core/acme-client/src/axios.js b/packages/core/acme-client/src/axios.js index a562bffc..48ce623c 100644 --- a/packages/core/acme-client/src/axios.js +++ b/packages/core/acme-client/src/axios.js @@ -3,9 +3,9 @@ */ import axios from 'axios'; import { parseRetryAfterHeader } from './util.js'; -import { log } from './logger.js'; const { AxiosError } = axios; import {getGlobalAgents, HttpError} from '@certd/basic' +import { log } from './logger.js'; /** * Defaults */ diff --git a/packages/core/acme-client/src/client.js b/packages/core/acme-client/src/client.js index 806723b1..27026103 100644 --- a/packages/core/acme-client/src/client.js +++ b/packages/core/acme-client/src/client.js @@ -5,7 +5,6 @@ */ import { createHash } from 'crypto'; import { getPemBodyAsB64u } from './crypto/index.js'; -import { log } from './logger.js'; import HttpClient from './http.js'; import AcmeApi from './api.js'; import verify from './verify.js'; @@ -104,8 +103,13 @@ class AcmeClient { max: this.opts.backoffMax, }; - this.http = new HttpClient(this.opts.directoryUrl, this.opts.accountKey, this.opts.externalAccountBinding, this.opts.urlMapping); + this.http = new HttpClient(this.opts.directoryUrl, this.opts.accountKey, this.opts.externalAccountBinding, this.opts.urlMapping, opts.logger); this.api = new AcmeApi(this.http, this.opts.accountUrl); + this.logger = opts.logger; + } + + log(...args) { + this.logger.info(...args); } /** @@ -177,7 +181,7 @@ class AcmeClient { this.getAccountUrl(); /* Account URL exists */ - log('Account URL exists, returning updateAccount()'); + this.log('Account URL exists, returning updateAccount()'); return this.updateAccount(data); } catch (e) { @@ -185,7 +189,7 @@ class AcmeClient { /* HTTP 200: Account exists */ if (resp.status === 200) { - log('Account already exists (HTTP 200), returning updateAccount()'); + this.log('Account already exists (HTTP 200), returning updateAccount()'); return this.updateAccount(data); } @@ -214,7 +218,7 @@ class AcmeClient { this.api.getAccountUrl(); } catch (e) { - log('No account URL found, returning createAccount()'); + this.log('No account URL found, returning createAccount()'); return this.createAccount(data); } @@ -502,7 +506,7 @@ class AcmeClient { await verify[challenge.type](authz, challenge, keyAuthorization); }; - log('Waiting for ACME challenge verification(等待ACME检查验证)'); + this.log('Waiting for ACME challenge verification(等待ACME检查验证)'); return util.retry(verifyFn, this.backoffOpts); } @@ -570,7 +574,7 @@ class AcmeClient { const resp = await this.api.apiRequest(item.url, null, [200]); /* Verify status */ - log(`[${d}] Item has status(检查状态): ${resp.data.status}`); + this.log(`[${d}] Item has status(检查状态): ${resp.data.status}`); if (invalidStates.includes(resp.data.status)) { abort(); @@ -586,7 +590,7 @@ class AcmeClient { throw new Error(`[${d}] Unexpected item status: ${resp.data.status}`); }; - log(`[${d}] Waiting for valid status (等待valid状态): ${item.url}`, this.backoffOpts); + this.log(`[${d}] Waiting for valid status (等待valid状态): ${item.url}`, this.backoffOpts); return util.retry(verifyFn, this.backoffOpts); } diff --git a/packages/core/acme-client/src/http.js b/packages/core/acme-client/src/http.js index 85bd6482..f641634c 100644 --- a/packages/core/acme-client/src/http.js +++ b/packages/core/acme-client/src/http.js @@ -19,7 +19,7 @@ import { getJwk } from './crypto/index.js'; */ class HttpClient { - constructor(directoryUrl, accountKey, externalAccountBinding = {}, urlMapping = {}) { + constructor(directoryUrl, accountKey, externalAccountBinding = {}, urlMapping = {},logger) { this.directoryUrl = directoryUrl; this.accountKey = accountKey; this.externalAccountBinding = externalAccountBinding; @@ -31,6 +31,7 @@ class HttpClient { this.directoryMaxAge = 86400; this.directoryTimestamp = 0; this.urlMapping = urlMapping; + this.log = logger? logger.info.bind(logger) : log; } /** @@ -48,7 +49,7 @@ class HttpClient { for (const key in this.urlMapping.mappings) { if (url.includes(key)) { const newUrl = url.replace(key, this.urlMapping.mappings[key]); - log(`use reverse proxy: ${newUrl}`); + this.log(`use reverse proxy: ${newUrl}`); url = newUrl; } } @@ -65,10 +66,10 @@ class HttpClient { opts.headers['Content-Type'] = 'application/jose+json'; /* Request */ - log(`HTTP request: ${method} ${url}`); + this.log(`HTTP request: ${method} ${url}`); const resp = await axios.request(opts); - log(`RESP ${resp.status} ${method} ${url}`); + this.log(`RESP ${resp.status} ${method} ${url}`); return resp; } @@ -85,7 +86,7 @@ class HttpClient { const age = (now - this.directoryTimestamp); if (!this.directoryCache || (age > this.directoryMaxAge)) { - log(`Refreshing ACME directory, age: ${age}`); + this.log(`Refreshing ACME directory, age: ${age}`); const resp = await this.request(this.directoryUrl, 'get'); if (resp.status >= 400) { @@ -187,7 +188,7 @@ class HttpClient { /* Nonce */ if (nonce) { - log(`Using nonce: ${nonce}`); + this.log(`Using nonce: ${nonce}`); header.nonce = nonce; } @@ -314,7 +315,7 @@ class HttpClient { nonce = resp.headers['replay-nonce'] || null; attempts += 1; - log(`Caught invalid nonce error, retrying (${attempts}/${this.maxBadNonceRetries}) signed request to: ${url}`); + this.log(`Caught invalid nonce error, retrying (${attempts}/${this.maxBadNonceRetries}) signed request to: ${url}`); return this.signedRequest(url, payload, { kid, nonce, includeExternalAccountBinding }, attempts); } diff --git a/packages/core/acme-client/types/index.d.ts b/packages/core/acme-client/types/index.d.ts index dfae2d20..5c81057a 100644 --- a/packages/core/acme-client/types/index.d.ts +++ b/packages/core/acme-client/types/index.d.ts @@ -49,6 +49,7 @@ export interface ClientOptions { backoffMax?: number; urlMapping?: UrlMapping; signal?: AbortSignal; + logger?:any } export interface ClientExternalAccountBindingOptions { 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 5bb20751..74ba8173 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts @@ -82,9 +82,9 @@ export class AcmeService { this.sslProvider = options.sslProvider || "letsencrypt"; this.eab = options.eab; this.skipLocalVerify = options.skipLocalVerify ?? false; - acme.setLogger((message: any, ...args: any[]) => { - this.logger.info(message, ...args); - }); + // acme.setLogger((message: any, ...args: any[]) => { + // this.logger.info(message, ...args); + // }); } async getAccountConfig(email: string, urlMapping: UrlMapping): Promise { @@ -155,6 +155,7 @@ export class AcmeService { backoffMax: 10000, urlMapping, signal: this.options.signal, + logger: this.logger, }); if (conf.accountUrl == null) {