diff --git a/CHANGELOG.md b/CHANGELOG.md index 84d310a0..ced56212 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.34.1](https://github.com/certd/certd/compare/v1.34.0...v1.34.1) (2025-05-05) + +### Bug Fixes + +* 根据SOA记录判断子域名托管有缺陷,改回手动配置子域名托管记录的方式 ([1b280a2](https://github.com/certd/certd/commit/1b280a2940f9e2d919b0bf23b89cc185be1fa498)) +* 修复宝塔授权测试按钮显示错误的bug ([048696e](https://github.com/certd/certd/commit/048696ee9386491bb68592fb3a47d1c900bb68bf)) + +### Performance Improvements + +* 支持部署证书到火山dcdn ([5f85219](https://github.com/certd/certd/commit/5f852194953dc1b4e6336770f417507b8f5a33ad)) +* 支持部署证书到unicloud ([a63d687](https://github.com/certd/certd/commit/a63d687f1c573159f0857693f37602b0e1e44072)) + # [1.34.0](https://github.com/certd/certd/compare/v1.33.8...v1.34.0) (2025-04-28) ### Bug Fixes diff --git a/build.trigger b/build.trigger index c28ffb7c..bcb87263 100644 --- a/build.trigger +++ b/build.trigger @@ -1 +1 @@ -17:28 +00:32 diff --git a/docs/guide/changelogs/CHANGELOG.md b/docs/guide/changelogs/CHANGELOG.md index 84d310a0..ced56212 100644 --- a/docs/guide/changelogs/CHANGELOG.md +++ b/docs/guide/changelogs/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.34.1](https://github.com/certd/certd/compare/v1.34.0...v1.34.1) (2025-05-05) + +### Bug Fixes + +* 根据SOA记录判断子域名托管有缺陷,改回手动配置子域名托管记录的方式 ([1b280a2](https://github.com/certd/certd/commit/1b280a2940f9e2d919b0bf23b89cc185be1fa498)) +* 修复宝塔授权测试按钮显示错误的bug ([048696e](https://github.com/certd/certd/commit/048696ee9386491bb68592fb3a47d1c900bb68bf)) + +### Performance Improvements + +* 支持部署证书到火山dcdn ([5f85219](https://github.com/certd/certd/commit/5f852194953dc1b4e6336770f417507b8f5a33ad)) +* 支持部署证书到unicloud ([a63d687](https://github.com/certd/certd/commit/a63d687f1c573159f0857693f37602b0e1e44072)) + # [1.34.0](https://github.com/certd/certd/compare/v1.33.8...v1.34.0) (2025-04-28) ### Bug Fixes diff --git a/lerna.json b/lerna.json index 4712a77a..96b1fe8a 100644 --- a/lerna.json +++ b/lerna.json @@ -9,5 +9,5 @@ } }, "npmClient": "pnpm", - "version": "1.34.0" + "version": "1.34.1" } diff --git a/package.json b/package.json index ec007cde..9c81778a 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "init": "lerna run build", "docs:dev": "vitepress dev docs", "docs:build": "vitepress build docs", - "docs:preview": "vitepress preview docs" + "docs:preview": "vitepress preview docs", + "pub": "echo 1" }, "license": "AGPL-3.0", "dependencies": { diff --git a/packages/core/acme-client/CHANGELOG.md b/packages/core/acme-client/CHANGELOG.md index 673d88ce..a07d8992 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.34.1](https://github.com/publishlab/node-acme-client/compare/v1.34.0...v1.34.1) (2025-05-05) + +### Bug Fixes + +* 根据SOA记录判断子域名托管有缺陷,改回手动配置子域名托管记录的方式 ([1b280a2](https://github.com/publishlab/node-acme-client/commit/1b280a2940f9e2d919b0bf23b89cc185be1fa498)) + # [1.34.0](https://github.com/publishlab/node-acme-client/compare/v1.33.8...v1.34.0) (2025-04-28) **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 549fc098..a9be92bf 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.34.0", + "version": "1.34.1", "type": "module", "module": "scr/index.js", "main": "src/index.js", @@ -18,7 +18,7 @@ "types" ], "dependencies": { - "@certd/basic": "^1.34.0", + "@certd/basic": "^1.34.1", "@peculiar/x509": "^1.11.0", "asn1js": "^3.0.5", "axios": "^1.7.2", @@ -51,7 +51,8 @@ "lint": "eslint .", "lint-types": "tsd", "prepublishOnly": "npm run build-docs", - "test": "mocha -t 60000 \"test/setup.js\" \"test/**/*.spec.js\"" + "test": "mocha -t 60000 \"test/setup.js\" \"test/**/*.spec.js\"", + "pub": "npm publish" }, "repository": { "type": "git", @@ -68,5 +69,5 @@ "bugs": { "url": "https://github.com/publishlab/node-acme-client/issues" }, - "gitHead": "9749fc817d3cfd435e8cb3f2f86edc81d69e2310" + "gitHead": "6c74148c277432f91014bf1eebd824e7423c6f4b" } diff --git a/packages/core/acme-client/test/soa.spec.mjs b/packages/core/acme-client/test/soa.spec.mjs new file mode 100644 index 00000000..a16a9215 --- /dev/null +++ b/packages/core/acme-client/test/soa.spec.mjs @@ -0,0 +1,11 @@ +import {assert} from 'chai' +import {resolveDomainBySoaRecord} from "../src/util.js" +describe('dns', () => { + it('resolveDomainBySoaRecord', async () => { + const resp = await resolveDomainBySoaRecord("a.corp.smartdeer.com") + + assert.equal(resp, "smartdeer.com") + + }); + +}) \ No newline at end of file diff --git a/packages/core/basic/CHANGELOG.md b/packages/core/basic/CHANGELOG.md index 0d51d9e7..c2b42658 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.34.1](https://github.com/certd/certd/compare/v1.34.0...v1.34.1) (2025-05-05) + +### Performance Improvements + +* 支持部署证书到火山dcdn ([5f85219](https://github.com/certd/certd/commit/5f852194953dc1b4e6336770f417507b8f5a33ad)) + # [1.34.0](https://github.com/certd/certd/compare/v1.33.8...v1.34.0) (2025-04-28) **Note:** Version bump only for package @certd/basic diff --git a/packages/core/basic/build.md b/packages/core/basic/build.md index 954a7f2e..335badc4 100644 --- a/packages/core/basic/build.md +++ b/packages/core/basic/build.md @@ -1 +1 @@ -17:24 +00:16 diff --git a/packages/core/basic/package.json b/packages/core/basic/package.json index 9699cd41..540756f2 100644 --- a/packages/core/basic/package.json +++ b/packages/core/basic/package.json @@ -1,7 +1,7 @@ { "name": "@certd/basic", "private": false, - "version": "1.34.0", + "version": "1.34.1", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -12,7 +12,8 @@ "build": "npm run before-build && tsc --skipLibCheck", "dev-build": "npm run build", "preview": "vite preview", - "test": "mocha --loader=ts-node/esm" + "test": "mocha --loader=ts-node/esm", + "pub": "npm publish" }, "dependencies": { "axios": "^1.7.2", @@ -44,5 +45,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "9749fc817d3cfd435e8cb3f2f86edc81d69e2310" + "gitHead": "6c74148c277432f91014bf1eebd824e7423c6f4b" } diff --git a/packages/core/basic/src/utils/util.options.ts b/packages/core/basic/src/utils/util.options.ts index 4689c9df..8367e40e 100644 --- a/packages/core/basic/src/utils/util.options.ts +++ b/packages/core/basic/src/utils/util.options.ts @@ -1,4 +1,4 @@ -import { domainUtils } from './util.domain.js'; +import { domainUtils } from "./util.domain.js"; function groupByDomain(options: any[], inDomains: string[]) { const matched = []; @@ -19,16 +19,16 @@ function groupByDomain(options: any[], inDomains: string[]) { function buildGroupOptions(options: any[], inDomains: string[]) { const grouped = groupByDomain(options, inDomains); const groupOptions = []; - groupOptions.push({ value: 'matched', disabled: true, label: '----已匹配----' }); + groupOptions.push({ value: "matched", disabled: true, label: "----已匹配----" }); if (grouped.matched.length === 0) { - options.push({ value: '', disabled: true, label: '没有可以匹配的域名' }); + options.push({ value: "", disabled: true, label: "没有可以匹配的域名" }); } else { for (const matched of grouped.matched) { groupOptions.push(matched); } } if (grouped.notMatched.length > 0) { - groupOptions.push({ value: 'unmatched', disabled: true, label: '----未匹配----' }); + groupOptions.push({ value: "unmatched", disabled: true, label: "----未匹配----" }); for (const notMatched of grouped.notMatched) { groupOptions.push(notMatched); } diff --git a/packages/core/pipeline/CHANGELOG.md b/packages/core/pipeline/CHANGELOG.md index 62d3ed9c..8747e021 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.34.1](https://github.com/certd/certd/compare/v1.34.0...v1.34.1) (2025-05-05) + +**Note:** Version bump only for package @certd/pipeline + # [1.34.0](https://github.com/certd/certd/compare/v1.33.8...v1.34.0) (2025-04-28) **Note:** Version bump only for package @certd/pipeline diff --git a/packages/core/pipeline/package.json b/packages/core/pipeline/package.json index 78fd428e..6ef57cd1 100644 --- a/packages/core/pipeline/package.json +++ b/packages/core/pipeline/package.json @@ -1,7 +1,7 @@ { "name": "@certd/pipeline", "private": false, - "version": "1.34.0", + "version": "1.34.1", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -13,11 +13,12 @@ "dev-build": "npm run build", "build3": "rollup -c", "preview": "vite preview", - "test": "mocha --loader=ts-node/esm" + "test": "mocha --loader=ts-node/esm", + "pub": "npm publish" }, "dependencies": { - "@certd/basic": "^1.34.0", - "@certd/plus-core": "^1.34.0", + "@certd/basic": "^1.34.1", + "@certd/plus-core": "^1.34.1", "dayjs": "^1.11.7", "lodash-es": "^4.17.21", "reflect-metadata": "^0.1.13" @@ -43,5 +44,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "9749fc817d3cfd435e8cb3f2f86edc81d69e2310" + "gitHead": "6c74148c277432f91014bf1eebd824e7423c6f4b" } diff --git a/packages/core/pipeline/src/decorator/common.ts b/packages/core/pipeline/src/decorator/common.ts deleted file mode 100644 index 0e5942ff..00000000 --- a/packages/core/pipeline/src/decorator/common.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Decorator } from "./index.js"; - -export type AutowireProp = { - name?: string; - type?: any; -}; -export const AUTOWIRE_KEY = "pipeline:autowire"; - -export function Autowire(props?: AutowireProp): PropertyDecorator { - return (target, propertyKey) => { - const _type = Reflect.getMetadata("design:type", target, propertyKey); - target = Decorator.target(target, propertyKey); - props = props || {}; - props.type = _type; - Reflect.defineMetadata(AUTOWIRE_KEY, props || {}, target, propertyKey); - }; -} diff --git a/packages/core/pipeline/src/decorator/index.ts b/packages/core/pipeline/src/decorator/index.ts index f24f345b..05c69e3c 100644 --- a/packages/core/pipeline/src/decorator/index.ts +++ b/packages/core/pipeline/src/decorator/index.ts @@ -1,2 +1 @@ export * from "./utils.js"; -export * from "./common.js"; diff --git a/packages/core/pipeline/src/plugin/api.ts b/packages/core/pipeline/src/plugin/api.ts index e908cab9..ba3dfc89 100644 --- a/packages/core/pipeline/src/plugin/api.ts +++ b/packages/core/pipeline/src/plugin/api.ts @@ -51,10 +51,6 @@ export type PluginDefine = Registrable & { [key: string]: TaskOutputDefine; }; - autowire?: { - [key: string]: any; - }; - shortcut?: { [key: string]: { title: string; diff --git a/packages/core/pipeline/src/plugin/decorator.ts b/packages/core/pipeline/src/plugin/decorator.ts index f9a0c8da..ad77ade8 100644 --- a/packages/core/pipeline/src/plugin/decorator.ts +++ b/packages/core/pipeline/src/plugin/decorator.ts @@ -1,7 +1,6 @@ import { pluginRegistry } from "./registry.js"; import { PluginDefine, TaskInputDefine, TaskOutputDefine } from "./api.js"; import { Decorator } from "../decorator/index.js"; -import { AUTOWIRE_KEY } from "../decorator/index.js"; import "reflect-metadata"; import { merge, sortBy } from "lodash-es"; // 提供一个唯一 key @@ -12,7 +11,6 @@ export function IsTaskPlugin(define: PluginDefine): ClassDecorator { target = Decorator.target(target); const inputs: any = {}; - const autowires: any = {}; const outputs: any = {}; const properties = Decorator.getClassProperties(target); for (const property in properties) { @@ -21,11 +19,6 @@ export function IsTaskPlugin(define: PluginDefine): ClassDecorator { inputs[property] = input; } - const autowire = Reflect.getMetadata(AUTOWIRE_KEY, target, property); - if (autowire) { - autowires[property] = autowire; - } - const output = Reflect.getMetadata(PLUGIN_OUTPUT_KEY, target, property); if (output) { outputs[property] = output; @@ -57,7 +50,7 @@ export function IsTaskPlugin(define: PluginDefine): ClassDecorator { }, }; - define = merge(defaultConfig, define, { input: inputMap, autowire: autowires, output: outputs }); + define = merge(defaultConfig, define, { input: inputMap, output: outputs }); Reflect.defineMetadata(PLUGIN_CLASS_KEY, define, target); diff --git a/packages/core/pipeline/src/registry/registry.ts b/packages/core/pipeline/src/registry/registry.ts index 4e7c76b6..9abc85d3 100644 --- a/packages/core/pipeline/src/registry/registry.ts +++ b/packages/core/pipeline/src/registry/registry.ts @@ -65,7 +65,7 @@ export class Registry { } getDefineList() { - const list = []; + let list = []; for (const key in this.storage) { const define = this.getDefine(key); if (define) { @@ -78,6 +78,10 @@ export class Registry { list.push({ ...define, key }); } } + + list = list.sort((a, b) => { + return (a.order ?? 10) - (b?.order ?? 10); + }); return list; } diff --git a/packages/libs/lib-huawei/CHANGELOG.md b/packages/libs/lib-huawei/CHANGELOG.md index ac923664..7250aa71 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.34.1](https://github.com/certd/certd/compare/v1.34.0...v1.34.1) (2025-05-05) + +**Note:** Version bump only for package @certd/lib-huawei + # [1.34.0](https://github.com/certd/certd/compare/v1.33.8...v1.34.0) (2025-04-28) **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 5d627325..1988cd2b 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.34.0", + "version": "1.34.1", "main": "./dist/bundle.js", "module": "./dist/bundle.js", "types": "./dist/d/index.d.ts", @@ -10,7 +10,8 @@ "before-build": "rimraf dist && rimraf tsconfig.tsbuildinfo && rimraf .rollup.cache", "build": "npm run before-build && rollup -c ", "dev-build": "npm run build", - "preview": "vite preview" + "preview": "vite preview", + "pub": "npm publish" }, "dependencies": { "axios": "^1.7.2", @@ -23,5 +24,5 @@ "prettier": "^2.8.8", "tslib": "^2.8.1" }, - "gitHead": "9749fc817d3cfd435e8cb3f2f86edc81d69e2310" + "gitHead": "6c74148c277432f91014bf1eebd824e7423c6f4b" } diff --git a/packages/libs/lib-iframe/CHANGELOG.md b/packages/libs/lib-iframe/CHANGELOG.md index 659ff23a..10f9d2bb 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.34.1](https://github.com/certd/certd/compare/v1.34.0...v1.34.1) (2025-05-05) + +**Note:** Version bump only for package @certd/lib-iframe + # [1.34.0](https://github.com/certd/certd/compare/v1.33.8...v1.34.0) (2025-04-28) **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 b0f04b06..2a136993 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.34.0", + "version": "1.34.1", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -13,7 +13,8 @@ "dev-build": "npm run build", "build3": "rollup -c", "build2": "vue-tsc --noEmit && vite build", - "preview": "vite preview" + "preview": "vite preview", + "pub": "npm publish" }, "dependencies": { "nanoid": "^4.0.0" @@ -30,5 +31,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "9749fc817d3cfd435e8cb3f2f86edc81d69e2310" + "gitHead": "6c74148c277432f91014bf1eebd824e7423c6f4b" } diff --git a/packages/libs/lib-jdcloud/CHANGELOG.md b/packages/libs/lib-jdcloud/CHANGELOG.md index e359c57d..8631da46 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.34.1](https://github.com/certd/certd/compare/v1.34.0...v1.34.1) (2025-05-05) + +**Note:** Version bump only for package @certd/jdcloud + # [1.34.0](https://github.com/certd/certd/compare/v1.33.8...v1.34.0) (2025-04-28) **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 0a3703a3..8766b729 100644 --- a/packages/libs/lib-jdcloud/package.json +++ b/packages/libs/lib-jdcloud/package.json @@ -1,6 +1,6 @@ { "name": "@certd/jdcloud", - "version": "1.34.0", + "version": "1.34.1", "description": "jdcloud openApi sdk", "main": "./dist/bundle.js", "module": "./dist/bundle.js", @@ -9,7 +9,8 @@ "test": "cross-env NODE_CONFIG_DIR=./test/config mocha --recursive --require babel-register", "dev": "babel src --out-dir babel -w", "build": "rollup -c ", - "dev-build": "npm run build" + "dev-build": "npm run build", + "pub": "npm publish" }, "author": "", "license": "Apache", @@ -60,5 +61,5 @@ "fetch" ] }, - "gitHead": "9749fc817d3cfd435e8cb3f2f86edc81d69e2310" + "gitHead": "6c74148c277432f91014bf1eebd824e7423c6f4b" } diff --git a/packages/libs/lib-k8s/CHANGELOG.md b/packages/libs/lib-k8s/CHANGELOG.md index ff737079..3187d41c 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.34.1](https://github.com/certd/certd/compare/v1.34.0...v1.34.1) (2025-05-05) + +**Note:** Version bump only for package @certd/lib-k8s + # [1.34.0](https://github.com/certd/certd/compare/v1.33.8...v1.34.0) (2025-04-28) **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 2519806f..eed91b08 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.34.0", + "version": "1.34.1", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -13,10 +13,11 @@ "dev-build": "npm run build", "build3": "rollup -c", "build2": "vue-tsc --noEmit && vite build", - "preview": "vite preview" + "preview": "vite preview", + "pub": "npm publish" }, "dependencies": { - "@certd/basic": "^1.34.0", + "@certd/basic": "^1.34.1", "@kubernetes/client-node": "0.21.0" }, "devDependencies": { @@ -31,5 +32,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "9749fc817d3cfd435e8cb3f2f86edc81d69e2310" + "gitHead": "6c74148c277432f91014bf1eebd824e7423c6f4b" } diff --git a/packages/libs/lib-server/CHANGELOG.md b/packages/libs/lib-server/CHANGELOG.md index d63a23b5..bfd86f0e 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.34.1](https://github.com/certd/certd/compare/v1.34.0...v1.34.1) (2025-05-05) + +**Note:** Version bump only for package @certd/lib-server + # [1.34.0](https://github.com/certd/certd/compare/v1.33.8...v1.34.0) (2025-04-28) **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 edc7819b..b621f6a2 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.34.0", + "version": "1.34.1", "description": "midway with flyway, sql upgrade way ", "private": false, "type": "module", @@ -27,10 +27,10 @@ ], "license": "AGPL", "dependencies": { - "@certd/acme-client": "^1.34.0", - "@certd/basic": "^1.34.0", - "@certd/pipeline": "^1.34.0", - "@certd/plus-core": "^1.34.0", + "@certd/acme-client": "^1.34.1", + "@certd/basic": "^1.34.1", + "@certd/pipeline": "^1.34.1", + "@certd/plus-core": "^1.34.1", "@midwayjs/cache": "~3.14.0", "@midwayjs/core": "~3.20.3", "@midwayjs/i18n": "~3.20.3", @@ -61,5 +61,5 @@ "typeorm": "^0.3.11", "typescript": "^5.4.2" }, - "gitHead": "9749fc817d3cfd435e8cb3f2f86edc81d69e2310" + "gitHead": "6c74148c277432f91014bf1eebd824e7423c6f4b" } diff --git a/packages/libs/midway-flyway-js/CHANGELOG.md b/packages/libs/midway-flyway-js/CHANGELOG.md index d8fc3ef8..3d179a83 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.34.1](https://github.com/certd/certd/compare/v1.34.0...v1.34.1) (2025-05-05) + +**Note:** Version bump only for package @certd/midway-flyway-js + # [1.34.0](https://github.com/certd/certd/compare/v1.33.8...v1.34.0) (2025-04-28) **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 f116eb7c..a8d205f4 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.34.0", + "version": "1.34.1", "description": "midway with flyway, sql upgrade way ", "private": false, "type": "module", @@ -46,5 +46,5 @@ "typeorm": "^0.3.11", "typescript": "^5.4.2" }, - "gitHead": "9749fc817d3cfd435e8cb3f2f86edc81d69e2310" + "gitHead": "6c74148c277432f91014bf1eebd824e7423c6f4b" } diff --git a/packages/plugins/plugin-cert/CHANGELOG.md b/packages/plugins/plugin-cert/CHANGELOG.md index 07077679..227cc3bf 100644 --- a/packages/plugins/plugin-cert/CHANGELOG.md +++ b/packages/plugins/plugin-cert/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.34.1](https://github.com/certd/certd/compare/v1.34.0...v1.34.1) (2025-05-05) + +### Bug Fixes + +* 根据SOA记录判断子域名托管有缺陷,改回手动配置子域名托管记录的方式 ([1b280a2](https://github.com/certd/certd/commit/1b280a2940f9e2d919b0bf23b89cc185be1fa498)) + # [1.34.0](https://github.com/certd/certd/compare/v1.33.8...v1.34.0) (2025-04-28) **Note:** Version bump only for package @certd/plugin-cert diff --git a/packages/plugins/plugin-cert/package.json b/packages/plugins/plugin-cert/package.json index 7797124f..b9e00dc0 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.34.0", + "version": "1.34.1", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -12,13 +12,14 @@ "dev-build": "npm run build", "build3": "rollup -c", "build2": "vue-tsc --noEmit && vite build", - "preview": "vite preview" + "preview": "vite preview", + "pub": "npm publish" }, "dependencies": { - "@certd/acme-client": "^1.34.0", - "@certd/basic": "^1.34.0", - "@certd/pipeline": "^1.34.0", - "@certd/plugin-lib": "^1.34.0", + "@certd/acme-client": "^1.34.1", + "@certd/basic": "^1.34.1", + "@certd/pipeline": "^1.34.1", + "@certd/plugin-lib": "^1.34.1", "@google-cloud/publicca": "^1.3.0", "dayjs": "^1.11.7", "jszip": "^3.10.1", @@ -42,5 +43,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "9749fc817d3cfd435e8cb3f2f86edc81d69e2310" + "gitHead": "6c74148c277432f91014bf1eebd824e7423c6f4b" } diff --git a/packages/plugins/plugin-cert/src/dns-provider/api.ts b/packages/plugins/plugin-cert/src/dns-provider/api.ts index 70d38767..f8fdc476 100644 --- a/packages/plugins/plugin-cert/src/dns-provider/api.ts +++ b/packages/plugins/plugin-cert/src/dns-provider/api.ts @@ -4,9 +4,6 @@ import { IAccess, Registrable } from "@certd/pipeline"; export type DnsProviderDefine = Registrable & { accessType: string; icon?: string; - autowire?: { - [key: string]: any; - }; }; export type CreateRecordOptions = { diff --git a/packages/plugins/plugin-cert/src/dns-provider/base.ts b/packages/plugins/plugin-cert/src/dns-provider/base.ts index bdcf42b3..ae9a61ce 100644 --- a/packages/plugins/plugin-cert/src/dns-provider/base.ts +++ b/packages/plugins/plugin-cert/src/dns-provider/base.ts @@ -1,6 +1,5 @@ import { CreateRecordOptions, DnsProviderContext, DnsProviderDefine, IDnsProvider, RemoveRecordOptions } from "./api.js"; import { dnsProviderRegistry } from "./registry.js"; -import { Decorator } from "@certd/pipeline"; import { HttpClient, ILogger } from "@certd/basic"; export abstract class AbstractDnsProvider implements IDnsProvider { @@ -39,8 +38,6 @@ export async function createDnsProvider(opts: { dnsProviderType: string; context } // @ts-ignore const dnsProvider: IDnsProvider = new DnsProviderClass(); - - Decorator.inject(dnsProviderDefine.autowire, dnsProvider, context); dnsProvider.setCtx(context); await dnsProvider.onInstance(); return dnsProvider; diff --git a/packages/plugins/plugin-cert/src/dns-provider/decorator.ts b/packages/plugins/plugin-cert/src/dns-provider/decorator.ts index 34e17048..418a1d4e 100644 --- a/packages/plugins/plugin-cert/src/dns-provider/decorator.ts +++ b/packages/plugins/plugin-cert/src/dns-provider/decorator.ts @@ -1,6 +1,6 @@ import { dnsProviderRegistry } from "./registry.js"; import { DnsProviderDefine } from "./api.js"; -import { Decorator, AUTOWIRE_KEY } from "@certd/pipeline"; +import { Decorator } from "@certd/pipeline"; import * as _ from "lodash-es"; // 提供一个唯一 key @@ -9,15 +9,6 @@ export const DNS_PROVIDER_CLASS_KEY = "pipeline:dns-provider"; export function IsDnsProvider(define: DnsProviderDefine): ClassDecorator { return (target: any) => { target = Decorator.target(target); - const autowires: any = {}; - const properties = Decorator.getClassProperties(target); - for (const property in properties) { - const autowire = Reflect.getMetadata(AUTOWIRE_KEY, target, property); - if (autowire) { - autowires[property] = autowire; - } - } - _.merge(define, { autowire: autowires }); Reflect.defineMetadata(DNS_PROVIDER_CLASS_KEY, define, target); diff --git a/packages/plugins/plugin-cert/src/dns-provider/domain-parser.ts b/packages/plugins/plugin-cert/src/dns-provider/domain-parser.ts index 08f48785..40ae592e 100644 --- a/packages/plugins/plugin-cert/src/dns-provider/domain-parser.ts +++ b/packages/plugins/plugin-cert/src/dns-provider/domain-parser.ts @@ -1,16 +1,18 @@ import { IDomainParser, ISubDomainsGetter } from "./api"; //@ts-ignore import psl from "psl"; +import { ILogger, utils, logger as globalLogger } from "@certd/basic"; import { resolveDomainBySoaRecord } from "@certd/acme-client"; -import { logger, utils } from "@certd/basic"; export class DomainParser implements IDomainParser { subDomainsGetter: ISubDomainsGetter; - constructor(subDomainsGetter: ISubDomainsGetter) { + logger: ILogger; + constructor(subDomainsGetter: ISubDomainsGetter, logger?: ILogger) { this.subDomainsGetter = subDomainsGetter; + this.logger = logger || globalLogger; } - parseDomain(fullDomain: string) { + parseDomainByPsl(fullDomain: string) { const parsed = psl.parse(fullDomain) as psl.ParsedDomain; if (parsed.error) { throw new Error(`解析${fullDomain}域名失败:` + JSON.stringify(parsed.error)); @@ -19,38 +21,46 @@ export class DomainParser implements IDomainParser { } async parse(fullDomain: string) { - logger.info(`查找主域名:${fullDomain}`); + this.logger.info(`查找主域名:${fullDomain}`); const cacheKey = `domain_parse:${fullDomain}`; const value = utils.cache.get(cacheKey); if (value) { - logger.info(`从缓存获取到主域名:${fullDomain}->${value}`); + this.logger.info(`从缓存获取到主域名:${fullDomain}->${value}`); return value; } + + const subDomains = await this.subDomainsGetter.getSubDomains(); + if (subDomains && subDomains.length > 0) { + const fullDomainDot = "." + fullDomain; + for (const subDomain of subDomains) { + if (fullDomainDot.endsWith("." + subDomain)) { + //找到子域名托管 + utils.cache.set(cacheKey, subDomain, { + ttl: 60 * 1000, + }); + this.logger.info(`获取到子域名托管域名:${fullDomain}->${subDomain}`); + return subDomain; + } + } + } + + const res = this.parseDomainByPsl(fullDomain); + this.logger.info(`从psl获取主域名:${fullDomain}->${res}`); + + let soaManDomain = null; try { const mainDomain = await resolveDomainBySoaRecord(fullDomain); if (mainDomain) { - utils.cache.set(cacheKey, mainDomain, { - ttl: 2 * 60 * 1000, - }); - logger.info(`获取到主域名:${fullDomain}->${mainDomain}`); - return mainDomain; + this.logger.info(`从SOA获取到主域名:${fullDomain}->${mainDomain}`); + soaManDomain = mainDomain; } } catch (e) { - logger.error("从SOA获取主域名失败", e.message); + this.logger.error("从SOA获取主域名失败", e.message); + } + if (soaManDomain && soaManDomain !== res) { + this.logger.warn(`SOA获取的主域名(${soaManDomain})和psl获取的主域名(${res})不一致,请确认是否有设置子域名托管`); } - // const subDomains = await this.subDomainsGetter.getSubDomains(); - // if (subDomains && subDomains.length > 0) { - // for (const subDomain of subDomains) { - // if (fullDomain.endsWith(subDomain)) { - // //找到子域名托管 - // return subDomain; - // } - // } - // } - - const res = this.parseDomain(fullDomain); - logger.info(`从psl获取主域名:${fullDomain}->${res}`); return res; } } 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 f479be75..d01d8d11 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts @@ -248,7 +248,10 @@ export class AcmeService { fullRecord = cname.fullRecord; } } else { - this.logger.error("未找到域名Cname校验计划,使用默认的dnsProvider"); + this.logger.error(`未找到域名${fullDomain}的CNAME校验计划,请修改证书申请配置`); + } + if (dnsProvider == null) { + throw new Error(`未找到域名${fullDomain}CNAME校验计划的DnsProvider,请修改证书申请配置`); } } else if (domainVerifyPlan.type === "http") { const httpVerifyPlan = domainVerifyPlan.httpVerifyPlan; diff --git a/packages/plugins/plugin-cert/src/plugin/cert-plugin/base-convert.ts b/packages/plugins/plugin-cert/src/plugin/cert-plugin/base-convert.ts index 9301e144..a8c4e484 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/base-convert.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/base-convert.ts @@ -27,7 +27,8 @@ export abstract class CertApplyBaseConvertPlugin extends AbstractTaskPlugin { "1、支持多个域名打到一个证书上,例如: foo.com,*.foo.com,*.bar.com\n" + "2、子域名被通配符包含的不要填写,例如:www.foo.com已经被*.foo.com包含,不要填写www.foo.com\n" + "3、泛域名只能通配*号那一级(*.foo.com的证书不能用于xxx.yyy.foo.com、不能用于foo.com)\n" + - "4、输入一个,空格之后,再输入下一个", + "4、输入一个,空格之后,再输入下一个 \n" + + "5、如果您配置了子域托管解析,请先[设置托管子域名](#/certd/pipeline/subDomain)", }) domains!: string[]; 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 3931af9d..ec0a3098 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts @@ -327,7 +327,7 @@ HTTP文件验证:不支持泛域名,需要配置网站文件上传`, } this.eab = eab; const subDomainsGetter = await this.ctx.serviceGetter.get("subDomainsGetter"); - const domainParser = new DomainParser(subDomainsGetter); + const domainParser = new DomainParser(subDomainsGetter, this.logger); this.acme = new AcmeService({ userId: this.ctx.user.id, userContext: this.userContext, diff --git a/packages/plugins/plugin-lib/CHANGELOG.md b/packages/plugins/plugin-lib/CHANGELOG.md index 7c456576..73d70411 100644 --- a/packages/plugins/plugin-lib/CHANGELOG.md +++ b/packages/plugins/plugin-lib/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.34.1](https://github.com/certd/certd/compare/v1.34.0...v1.34.1) (2025-05-05) + +### Performance Improvements + +* 支持部署证书到火山dcdn ([5f85219](https://github.com/certd/certd/commit/5f852194953dc1b4e6336770f417507b8f5a33ad)) + # [1.34.0](https://github.com/certd/certd/compare/v1.33.8...v1.34.0) (2025-04-28) ### Performance Improvements diff --git a/packages/plugins/plugin-lib/package.json b/packages/plugins/plugin-lib/package.json index 3392cb48..bca59572 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.34.0", + "version": "1.34.1", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -12,13 +12,14 @@ "dev-build": "npm run build", "build3": "rollup -c", "build2": "vue-tsc --noEmit && vite build", - "preview": "vite preview" + "preview": "vite preview", + "pub": "npm publish" }, "dependencies": { "@alicloud/pop-core": "^1.7.10", "@aws-sdk/client-s3": "^3.787.0", - "@certd/basic": "^1.34.0", - "@certd/pipeline": "^1.34.0", + "@certd/basic": "^1.34.1", + "@certd/pipeline": "^1.34.1", "@kubernetes/client-node": "0.21.0", "ali-oss": "^6.22.0", "basic-ftp": "^5.0.5", @@ -49,5 +50,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "9749fc817d3cfd435e8cb3f2f86edc81d69e2310" + "gitHead": "6c74148c277432f91014bf1eebd824e7423c6f4b" } diff --git a/packages/plugins/plugin-lib/src/common/index.ts b/packages/plugins/plugin-lib/src/common/index.ts index c790299c..ea766648 100644 --- a/packages/plugins/plugin-lib/src/common/index.ts +++ b/packages/plugins/plugin-lib/src/common/index.ts @@ -37,6 +37,7 @@ export function createRemoteSelectInputDefine(opts?: { multi?: boolean; required?: boolean; rules?: any; + mergeScript?: string; }) { const title = opts?.title || "请选择"; const certDomainsInputKey = opts?.certDomainsInputKey || "certDomains"; @@ -66,7 +67,9 @@ export function createRemoteSelectInputDefine(opts?: { }, rules: opts?.rules, required: opts.required ?? true, - mergeScript: ` + mergeScript: + opts.mergeScript ?? + ` return { component:{ form: ctx.compute(({form})=>{ @@ -80,3 +83,5 @@ export function createRemoteSelectInputDefine(opts?: { return merge(item, opts?.formItem); } + + diff --git a/packages/plugins/plugin-lib/src/qiniu/lib/sdk.ts b/packages/plugins/plugin-lib/src/qiniu/lib/sdk.ts index 39a22946..f6cd04b3 100644 --- a/packages/plugins/plugin-lib/src/qiniu/lib/sdk.ts +++ b/packages/plugins/plugin-lib/src/qiniu/lib/sdk.ts @@ -1,4 +1,4 @@ -import { HttpClient, ILogger, utils } from "@certd/basic"; +import { HttpClient, ILogger, safePromise, utils } from "@certd/basic"; import { QiniuAccess } from "../access.js"; import fs from "fs"; @@ -77,7 +77,7 @@ export class QiniuClient { const http = new HttpClient({ timeout: 10000, middlewares: [auth] }); console.log("http", http); - return new Promise((resolve, reject) => { + return safePromise((resolve, reject) => { try { http.get({ url: opts.url, diff --git a/packages/plugins/plugin-lib/src/ssh/ssh.ts b/packages/plugins/plugin-lib/src/ssh/ssh.ts index cce23731..c026022e 100644 --- a/packages/plugins/plugin-lib/src/ssh/ssh.ts +++ b/packages/plugins/plugin-lib/src/ssh/ssh.ts @@ -1,7 +1,7 @@ // @ts-ignore import path from "path"; import { isArray } from "lodash-es"; -import { ILogger } from "@certd/basic"; +import { ILogger, safePromise } from "@certd/basic"; import { SshAccess } from "./ssh-access.js"; import fs from "fs"; @@ -70,7 +70,7 @@ export class AsyncSsh2Client { const ssh2 = await import("ssh2"); const ssh2Constants = await import("ssh2/lib/protocol/constants.js"); const { SUPPORTED_KEX, SUPPORTED_SERVER_HOST_KEY, SUPPORTED_CIPHER, SUPPORTED_MAC } = ssh2Constants.default; - return new Promise((resolve, reject) => { + return safePromise((resolve, reject) => { try { const conn = new ssh2.default.Client(); conn @@ -108,7 +108,7 @@ export class AsyncSsh2Client { }); } async getSftp() { - return new Promise((resolve, reject) => { + return safePromise((resolve, reject) => { this.logger.info("获取sftp"); this.conn.sftp((err: any, sftp: any) => { if (err) { @@ -122,7 +122,7 @@ export class AsyncSsh2Client { async fastPut(options: { sftp: any; localPath: string; remotePath: string; opts?: { mode?: string } }) { const { sftp, localPath, remotePath, opts } = options; - return new Promise((resolve, reject) => { + return safePromise((resolve, reject) => { this.logger.info(`开始上传:${localPath} => ${remotePath}`); sftp.fastPut(localPath, remotePath, { ...(opts ?? {}) }, (err: Error) => { if (err) { @@ -138,7 +138,7 @@ export class AsyncSsh2Client { async listDir(options: { sftp: any; remotePath: string }) { const { sftp, remotePath } = options; - return new Promise((resolve, reject) => { + return safePromise((resolve, reject) => { this.logger.info(`listDir:${remotePath}`); sftp.readdir(remotePath, (err: Error, list: any) => { if (err) { @@ -152,7 +152,7 @@ export class AsyncSsh2Client { async unlink(options: { sftp: any; remotePath: string }) { const { sftp, remotePath } = options; - return new Promise((resolve, reject) => { + return safePromise((resolve, reject) => { this.logger.info(`开始删除远程文件:${remotePath}`); sftp.unlink(remotePath, (err: Error) => { if (err) { @@ -182,7 +182,7 @@ export class AsyncSsh2Client { // script += "\r\nexit\r\n"; // //保证windows下正常退出 // } - return new Promise((resolve, reject) => { + return safePromise((resolve, reject) => { this.logger.info(`执行命令:[${this.connConf.host}][exec]: \n` + script); // pty 伪终端,window下的输出会带上conhost.exe之类的多余的字符串,影响返回结果判断 // linux下 当使用keyboard-interactive 登录时,需要pty @@ -232,7 +232,7 @@ export class AsyncSsh2Client { async shell(script: string | string[]): Promise { const stripAnsiModule = await import("strip-ansi"); const stripAnsi = stripAnsiModule.default; - return new Promise((resolve, reject) => { + return safePromise((resolve, reject) => { this.logger.info(`执行shell脚本:[${this.connConf.host}][shell]: ` + script); this.conn.shell((err: Error, stream: any) => { if (err) { @@ -299,7 +299,7 @@ export class AsyncSsh2Client { } async download(param: { remotePath: string; savePath: string; sftp: any }) { - return new Promise((resolve, reject) => { + return safePromise((resolve, reject) => { const { remotePath, savePath, sftp } = param; sftp.fastGet( remotePath, @@ -385,44 +385,40 @@ export class SshClient { async scpUpload(options: { conn: any; localPath: string; remotePath: string; opts?: { mode?: string } }) { const { conn, localPath, remotePath } = options; - return new Promise((resolve, reject) => { + return safePromise((resolve, reject) => { // 关键步骤:构造 SCP 命令 - try { - this.logger.info(`开始上传:${localPath} => ${remotePath}`); - conn.conn.exec( - `scp -t ${remotePath}`, // -t 表示目标模式 - (err, stream) => { - if (err) { - return reject(err); - } - try { - // 准备 SCP 协议头 - const fileStats = fs.statSync(localPath); - const fileName = path.basename(localPath); - - // SCP 协议格式:C[权限] [文件大小] [文件名]\n - stream.write(`C0644 ${fileStats.size} ${fileName}\n`); - - // 通过管道传输文件 - fs.createReadStream(localPath) - .on("error", e => { - this.logger.info("read stream error", e); - reject(e); - }) - .pipe(stream) - .on("finish", async () => { - this.logger.info(`上传完成:${localPath} => ${remotePath}`); - resolve(true); - }) - .on("error", reject); - } catch (e) { - reject(e); - } + this.logger.info(`开始上传:${localPath} => ${remotePath}`); + conn.conn.exec( + `scp -t ${remotePath}`, // -t 表示目标模式 + (err, stream) => { + if (err) { + return reject(err); } - ); - } catch (e) { - reject(e); - } + try { + // 准备 SCP 协议头 + const fileStats = fs.statSync(localPath); + const fileName = path.basename(localPath); + + // SCP 协议格式:C[权限] [文件大小] [文件名]\n + stream.write(`C0644 ${fileStats.size} ${fileName}\n`); + + // 通过管道传输文件 + fs.createReadStream(localPath) + .on("error", e => { + this.logger.info("read stream error", e); + reject(e); + }) + .pipe(stream) + .on("finish", async () => { + this.logger.info(`上传完成:${localPath} => ${remotePath}`); + resolve(true); + }) + .on("error", reject); + } catch (e) { + reject(e); + } + } + ); }); } diff --git a/packages/plugins/plugin-lib/src/tencent/lib/cos-client.ts b/packages/plugins/plugin-lib/src/tencent/lib/cos-client.ts index cfa72acb..b733f0e6 100644 --- a/packages/plugins/plugin-lib/src/tencent/lib/cos-client.ts +++ b/packages/plugins/plugin-lib/src/tencent/lib/cos-client.ts @@ -1,5 +1,5 @@ import { TencentAccess } from "../access.js"; -import { ILogger } from "@certd/basic"; +import { ILogger, safePromise } from "@certd/basic"; import fs from "fs"; export class TencentCosClient { @@ -26,7 +26,7 @@ export class TencentCosClient { async uploadFile(key: string, file: Buffer | string) { const cos = await this.getCosClient(); - return new Promise((resolve, reject) => { + return safePromise((resolve, reject) => { let readableStream = file as any; if (typeof file === "string") { readableStream = fs.createReadStream(file); @@ -54,7 +54,7 @@ export class TencentCosClient { async removeFile(key: string) { const cos = await this.getCosClient(); - return new Promise((resolve, reject) => { + return safePromise((resolve, reject) => { cos.deleteObject( { Bucket: this.bucket, @@ -75,7 +75,7 @@ export class TencentCosClient { async downloadFile(key: string, savePath: string) { const cos = await this.getCosClient(); const writeStream = fs.createWriteStream(savePath); - return new Promise((resolve, reject) => { + return safePromise((resolve, reject) => { cos.getObject( { Bucket: this.bucket, @@ -96,7 +96,7 @@ export class TencentCosClient { async listDir(dirKey: string) { const cos = await this.getCosClient(); - return new Promise((resolve, reject) => { + return safePromise((resolve, reject) => { cos.getBucket( { Bucket: this.bucket, diff --git a/packages/ui/certd-client/CHANGELOG.md b/packages/ui/certd-client/CHANGELOG.md index d8447d5c..92abc035 100644 --- a/packages/ui/certd-client/CHANGELOG.md +++ b/packages/ui/certd-client/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.34.1](https://github.com/certd/certd/compare/v1.34.0...v1.34.1) (2025-05-05) + +### Bug Fixes + +* 根据SOA记录判断子域名托管有缺陷,改回手动配置子域名托管记录的方式 ([1b280a2](https://github.com/certd/certd/commit/1b280a2940f9e2d919b0bf23b89cc185be1fa498)) +* 修复宝塔授权测试按钮显示错误的bug ([048696e](https://github.com/certd/certd/commit/048696ee9386491bb68592fb3a47d1c900bb68bf)) + +### Performance Improvements + +* 支持部署证书到火山dcdn ([5f85219](https://github.com/certd/certd/commit/5f852194953dc1b4e6336770f417507b8f5a33ad)) + # [1.34.0](https://github.com/certd/certd/compare/v1.33.8...v1.34.0) (2025-04-28) ### Bug Fixes diff --git a/packages/ui/certd-client/package.json b/packages/ui/certd-client/package.json index 7b0c9770..759c044f 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.34.0", + "version": "1.34.1", "private": true, "scripts": { "dev": "vite --open", @@ -19,7 +19,8 @@ "upgrade": "yarn upgrade-interactive --latest", "tsc": "vue-tsc --noEmit --skipLibCheck", "circle:check": "pnpm dependency-cruise --validate --output-type err-html -f dependency-report.html src", - "afterPubPush": "git add . && git commit -m \"build: publish success\" && git push" + "afterPubPush": "git add . && git commit -m \"build: publish success\" && git push", + "pub": "echo 1" }, "author": "greper", "license": "AGPL-3.0", @@ -101,8 +102,8 @@ "zod-defaults": "^0.1.3" }, "devDependencies": { - "@certd/lib-iframe": "^1.34.0", - "@certd/pipeline": "^1.34.0", + "@certd/lib-iframe": "^1.34.1", + "@certd/pipeline": "^1.34.1", "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-node-resolve": "^15.2.3", "@types/chai": "^4.3.12", diff --git a/packages/ui/certd-client/src/api/service.ts b/packages/ui/certd-client/src/api/service.ts index da8eb16b..116db11d 100644 --- a/packages/ui/certd-client/src/api/service.ts +++ b/packages/ui/certd-client/src/api/service.ts @@ -69,12 +69,10 @@ function createService() { const err = new CodeError(errorMessage, dataAxios.code, dataAxios.data); // @ts-ignore response.config.onError(err); - return; } //@ts-ignore const showErrorNotify = response?.config?.showErrorNotify; errorCreate(`${errorMessage}: ${response.config.url}`, showErrorNotify, dataAxios); - return dataAxios; } }, error => { diff --git a/packages/ui/certd-client/src/api/tools.ts b/packages/ui/certd-client/src/api/tools.ts index a7d949f7..47976e2e 100644 --- a/packages/ui/certd-client/src/api/tools.ts +++ b/packages/ui/certd-client/src/api/tools.ts @@ -67,7 +67,6 @@ export function errorLog(error: any, notify = true) { /** * @description 创建一个错误 - * @param {String} msg 错误信息 */ export function errorCreate(msg: string, notify = true, data?: any) { const err = new CodeError(msg, data.code, data.data); diff --git a/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/cname-record-info.vue b/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/cname-record-info.vue index 610cbf2d..3f814dff 100644 --- a/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/cname-record-info.vue +++ b/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/cname-record-info.vue @@ -8,7 +8,7 @@ CNAME - + @@ -38,12 +38,12 @@ const statusDict = dict({ { label: "验证中", value: "validating", color: "blue" }, { label: "验证成功", value: "valid", color: "green" }, { label: "验证失败", value: "failed", color: "red" }, - { label: "验证超时", value: "timeout", color: "red" } - ] + { label: "验证超时", value: "timeout", color: "red" }, + ], }); defineOptions({ - name: "CnameRecordInfo" + name: "CnameRecordInfo", }); const props = defineProps<{ @@ -55,7 +55,7 @@ const emit = defineEmits<{ { id: number | null; status: string | null; - } + }, ]; }>(); @@ -64,7 +64,7 @@ const cnameRecord = ref(null); function onRecordChange() { emit("change", { id: cnameRecord.value?.id, - status: cnameRecord.value?.status + status: cnameRecord.value?.status, }); } @@ -90,11 +90,11 @@ async function doRefresh() { watch( () => props.domain, - async (value) => { + async value => { await doRefresh(); }, { - immediate: true + immediate: true, } ); diff --git a/packages/ui/certd-client/src/components/plugins/common/api-test.vue b/packages/ui/certd-client/src/components/plugins/common/api-test.vue index c041a8ea..f7d44cb6 100644 --- a/packages/ui/certd-client/src/components/plugins/common/api-test.vue +++ b/packages/ui/certd-client/src/components/plugins/common/api-test.vue @@ -15,7 +15,7 @@ import { ref, inject } from "vue"; import { Form } from "ant-design-vue"; defineOptions({ - name: "ApiTest" + name: "ApiTest", }); const getScope: any = inject("get:scope"); @@ -49,14 +49,14 @@ const doTest = async () => { type: pluginType, typeName: form.type, action: props.action, - input: pluginType === "plugin" ? form.input : form + input: pluginType === "plugin" ? form.input : form, }, { onError(err: any) { hasError.value = true; message.value = `错误:${err.message}`; }, - showErrorNotify: false + showErrorNotify: false, } ); message.value = "测试请求成功"; diff --git a/packages/ui/certd-client/src/components/plugins/common/remote-select.vue b/packages/ui/certd-client/src/components/plugins/common/remote-select.vue index aa80b4c8..e6c0c7e1 100644 --- a/packages/ui/certd-client/src/components/plugins/common/remote-select.vue +++ b/packages/ui/certd-client/src/components/plugins/common/remote-select.vue @@ -53,11 +53,15 @@ const getOptions = async () => { if (!define) { return; } + const pluginType = getPluginType(); + const { form } = getScope(); + const input = pluginType === "plugin" ? form.input : form; + for (let key in define.input) { const inWatches = props.watches.includes(key); const inputDefine = define.input[key]; if (inWatches && inputDefine.required) { - const value = props.form[key]; + const value = input[key]; if (value == null || value === "") { console.log("remote-select required", key); return; @@ -69,8 +73,6 @@ const getOptions = async () => { hasError.value = false; loading.value = true; optionsRef.value = []; - const { form } = getScope(); - const pluginType = getPluginType(); try { const res = await doRequest( @@ -78,7 +80,7 @@ const getOptions = async () => { type: pluginType, typeName: form.type, action: props.action, - input: pluginType === "plugin" ? form.input : form, + input, }, { onError(err: any) { @@ -115,11 +117,16 @@ async function refreshOptions() { watch( () => { const values = []; + + const pluginType = getPluginType(); + const { form } = getScope(); + const input = pluginType === "plugin" ? form.input : form; + for (const item of props.watches) { - values.push(props.form[item]); + values.push(input[item]); } return { - form: props.form, + form: input, watched: values, }; }, diff --git a/packages/ui/certd-client/src/router/source/modules/about.tsx b/packages/ui/certd-client/src/router/source/modules/about.tsx index ff401a80..a2ca004e 100644 --- a/packages/ui/certd-client/src/router/source/modules/about.tsx +++ b/packages/ui/certd-client/src/router/source/modules/about.tsx @@ -16,9 +16,9 @@ export const aboutResource = [ show: () => { const settingStore = useSettingStore(); return !settingStore.isComm; - } - } - } + }, + }, + }, ]; export default aboutResource; diff --git a/packages/ui/certd-client/src/router/source/modules/certd.ts b/packages/ui/certd-client/src/router/source/modules/certd.ts index 2d6bd6e8..a9c992be 100644 --- a/packages/ui/certd-client/src/router/source/modules/certd.ts +++ b/packages/ui/certd-client/src/router/source/modules/certd.ts @@ -98,17 +98,17 @@ export const certdResources = [ keepAlive: true, }, }, - // { - // title: "子域名托管设置", - // name: "SubDomain", - // path: "/certd/pipeline/subDomain", - // component: "/certd/pipeline/sub-domain/index.vue", - // meta: { - // icon: "material-symbols:approval-delegation-outline", - // auth: true, - // keepAlive: true, - // }, - // }, + { + title: "子域名托管设置", + name: "SubDomain", + path: "/certd/pipeline/subDomain", + component: "/certd/pipeline/sub-domain/index.vue", + meta: { + icon: "material-symbols:approval-delegation-outline", + auth: true, + keepAlive: true, + }, + }, { title: "流水线分组管理", name: "PipelineGroupManager", diff --git a/packages/ui/certd-server/.env.dev-pluslocal.yaml b/packages/ui/certd-server/.env.dev-localplus.yaml similarity index 100% rename from packages/ui/certd-server/.env.dev-pluslocal.yaml rename to packages/ui/certd-server/.env.dev-localplus.yaml diff --git a/packages/ui/certd-server/CHANGELOG.md b/packages/ui/certd-server/CHANGELOG.md index 6167ecf6..35da9d85 100644 --- a/packages/ui/certd-server/CHANGELOG.md +++ b/packages/ui/certd-server/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.34.1](https://github.com/certd/certd/compare/v1.34.0...v1.34.1) (2025-05-05) + +### Bug Fixes + +* 根据SOA记录判断子域名托管有缺陷,改回手动配置子域名托管记录的方式 ([1b280a2](https://github.com/certd/certd/commit/1b280a2940f9e2d919b0bf23b89cc185be1fa498)) + +### Performance Improvements + +* 支持部署证书到火山dcdn ([5f85219](https://github.com/certd/certd/commit/5f852194953dc1b4e6336770f417507b8f5a33ad)) +* 支持部署证书到unicloud ([a63d687](https://github.com/certd/certd/commit/a63d687f1c573159f0857693f37602b0e1e44072)) + # [1.34.0](https://github.com/certd/certd/compare/v1.33.8...v1.34.0) (2025-04-28) ### Bug Fixes diff --git a/packages/ui/certd-server/export-plugin-yaml.js b/packages/ui/certd-server/export-plugin-yaml.js index 05ad60fe..4bda07a1 100644 --- a/packages/ui/certd-server/export-plugin-yaml.js +++ b/packages/ui/certd-server/export-plugin-yaml.js @@ -1,11 +1,11 @@ // 扫描目录,列出文件,然后加载为模块 -import { join } from 'path'; -import fs from 'fs' +import path, { join } from "path"; +import fs from "fs"; import { pathToFileURL } from "node:url"; -import path from 'path' import * as yaml from "js-yaml"; -import {AbstractTaskPlugin, BaseAccess, BaseNotification} from "@certd/pipeline"; +import { AbstractTaskPlugin, BaseAccess, BaseNotification } from "@certd/pipeline"; + function scanDir(dir) { const files = fs.readdirSync(dir); const result = []; @@ -84,7 +84,6 @@ for (const key in modules) { }else{ console.log(`[warning] 未知的插件类型:${pluginDefine.name}`) } - delete pluginDefine.autowire const filePath = path.join(`./metadata/${pluginDefine.pluginType}_${pluginDefine.name}.yaml`) pluginDefine.scriptFilePath = location @@ -93,4 +92,7 @@ for (const key in modules) { } } } -process.exit(); +// import why from 'why-is-node-running' +// setTimeout(() => why(), 100); // 延迟打印原因 + +process.exit() diff --git a/packages/ui/certd-server/metadata/dnsProvider_51dns.yaml b/packages/ui/certd-server/metadata/dnsProvider_51dns.yaml index 0a9ab1fc..09a237a7 100644 --- a/packages/ui/certd-server/metadata/dnsProvider_51dns.yaml +++ b/packages/ui/certd-server/metadata/dnsProvider_51dns.yaml @@ -3,6 +3,7 @@ title: 51dns desc: 51DNS icon: arcticons:dns-changer-3 accessType: 51dns +order: 999 type: builtIn pluginType: dnsProvider scriptFilePath: ../../../plugins/plugin-51dns/index.js diff --git a/packages/ui/certd-server/metadata/dnsProvider_aliyun.yaml b/packages/ui/certd-server/metadata/dnsProvider_aliyun.yaml index 92dbd060..f7a745ab 100644 --- a/packages/ui/certd-server/metadata/dnsProvider_aliyun.yaml +++ b/packages/ui/certd-server/metadata/dnsProvider_aliyun.yaml @@ -3,6 +3,7 @@ title: 阿里云 desc: 阿里云DNS解析提供商 accessType: aliyun icon: svg:icon-aliyun +order: 0 type: builtIn pluginType: dnsProvider scriptFilePath: ../../../plugins/plugin-aliyun/dns-provider/aliyun-dns-provider.js diff --git a/packages/ui/certd-server/package.json b/packages/ui/certd-server/package.json index 8c82f292..8ed1c701 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.34.0", + "version": "1.34.1", "description": "fast-server base midway", "private": true, "type": "module", @@ -28,7 +28,8 @@ "heap": "cross-env NODE_ENV=local clinic heapprofiler -- node ./bootstrap.js", "flame": "clinic flame -- node ./bootstrap.js", "tsc": "tsc --skipLibCheck", - "slimming": "node ./slimming.js" + "slimming": "node ./slimming.js", + "pub": "echo 1" }, "dependencies": { "@alicloud/fc20230330": "^4.1.7", @@ -39,19 +40,19 @@ "@aws-sdk/client-acm": "^3.699.0", "@aws-sdk/client-cloudfront": "^3.699.0", "@aws-sdk/client-s3": "^3.705.0", - "@certd/acme-client": "^1.34.0", - "@certd/basic": "^1.34.0", - "@certd/commercial-core": "^1.34.0", - "@certd/jdcloud": "^1.34.0", - "@certd/lib-huawei": "^1.34.0", - "@certd/lib-k8s": "^1.34.0", - "@certd/lib-server": "^1.34.0", - "@certd/midway-flyway-js": "^1.34.0", - "@certd/pipeline": "^1.34.0", - "@certd/plugin-cert": "^1.34.0", - "@certd/plugin-lib": "^1.34.0", - "@certd/plugin-plus": "^1.34.0", - "@certd/plus-core": "^1.34.0", + "@certd/acme-client": "^1.34.1", + "@certd/basic": "^1.34.1", + "@certd/commercial-core": "^1.34.1", + "@certd/jdcloud": "^1.34.1", + "@certd/lib-huawei": "^1.34.1", + "@certd/lib-k8s": "^1.34.1", + "@certd/lib-server": "^1.34.1", + "@certd/midway-flyway-js": "^1.34.1", + "@certd/pipeline": "^1.34.1", + "@certd/plugin-cert": "^1.34.1", + "@certd/plugin-lib": "^1.34.1", + "@certd/plugin-plus": "^1.34.1", + "@certd/plus-core": "^1.34.1", "@corsinvest/cv4pve-api-javascript": "^8.3.0", "@huaweicloud/huaweicloud-sdk-cdn": "^3.1.120", "@huaweicloud/huaweicloud-sdk-core": "^3.1.120", @@ -132,7 +133,8 @@ "prettier": "^2.8.8", "rimraf": "^5.0.5", "tslib": "^2.8.1", - "typescript": "^5.4.2" + "typescript": "^5.4.2", + "why-is-node-running": "^3.2.2" }, "engines": { "node": ">=18.0.0" diff --git a/packages/ui/certd-server/src/controller/user/pipeline/access-controller.ts b/packages/ui/certd-server/src/controller/user/pipeline/access-controller.ts index 8f965fe2..cfde0533 100644 --- a/packages/ui/certd-server/src/controller/user/pipeline/access-controller.ts +++ b/packages/ui/certd-server/src/controller/user/pipeline/access-controller.ts @@ -80,7 +80,10 @@ export class AccessController extends CrudController { @Post('/accessTypeDict', { summary: Constants.per.authOnly }) async getAccessTypeDict() { - const list: AccessDefine[] = this.service.getDefineList(); + let list: AccessDefine[] = this.service.getDefineList(); + list = list.sort((a,b) => { + return (a.order??10) - (b.order??10); + }); const dict = []; for (const item of list) { dict.push({ diff --git a/packages/ui/certd-server/src/modules/auto/https/server.ts b/packages/ui/certd-server/src/modules/auto/https/server.ts index 93910472..8804dd06 100644 --- a/packages/ui/certd-server/src/modules/auto/https/server.ts +++ b/packages/ui/certd-server/src/modules/auto/https/server.ts @@ -2,7 +2,7 @@ import https from 'node:https'; import fs from 'fs'; import { Application } from '@midwayjs/koa'; import { createSelfCertificate } from './self-certificate.js'; -import { logger } from '@certd/basic'; +import {logger, safePromise} from '@certd/basic'; export type HttpsServerOptions = { enabled: boolean; @@ -23,7 +23,7 @@ export class HttpsServer { } async close() { - return new Promise((resolve, reject) => { + return safePromise((resolve, reject) => { this.server.close(() => { resolve(true); }); diff --git a/packages/ui/certd-server/src/modules/cname/service/cname-provider-service.ts b/packages/ui/certd-server/src/modules/cname/service/cname-provider-service.ts index 0bdd9d82..d0a1b26b 100644 --- a/packages/ui/certd-server/src/modules/cname/service/cname-provider-service.ts +++ b/packages/ui/certd-server/src/modules/cname/service/cname-provider-service.ts @@ -114,4 +114,5 @@ export class CnameProviderService extends BaseService { } return await super.info(id, infoIgnoreProperty); } + } diff --git a/packages/ui/certd-server/src/modules/cname/service/cname-record-service.ts b/packages/ui/certd-server/src/modules/cname/service/cname-record-service.ts index e9adb77c..329a810f 100644 --- a/packages/ui/certd-server/src/modules/cname/service/cname-record-service.ts +++ b/packages/ui/certd-server/src/modules/cname/service/cname-record-service.ts @@ -20,6 +20,7 @@ type CnameCheckCacheValue = { recordRes?: any; startTime: number; intervalId?: NodeJS.Timeout; + dnsProvider?: IDnsProvider; }; /** * 授权 @@ -235,6 +236,23 @@ export class CnameRecordService extends BaseService { return dnsProvider; }; + const clearVerifyRecord = async () => { + cache.delete(cacheKey); + try { + let dnsProvider =value.dnsProvider + if (!dnsProvider) { + dnsProvider = await buildDnsProvider(); + } + await dnsProvider.removeRecord({ + recordReq: value.recordReq, + recordRes: value.recordRes, + }); + logger.info('删除CNAME的校验DNS记录成功'); + } catch (e) { + logger.error(`删除CNAME的校验DNS记录失败, ${e.message},req:${JSON.stringify(value.recordReq)},recordRes:${JSON.stringify(value.recordRes)}`, e); + } + }; + const checkRecordValue = async () => { if (value.pass) { return true; @@ -243,7 +261,7 @@ export class CnameRecordService extends BaseService { logger.warn(`cname验证超时,停止检查,${bean.domain} ${testRecordValue}`); clearInterval(value.intervalId); await this.updateStatus(bean.id, 'timeout'); - cache.delete(cacheKey); + await clearVerifyRecord() return false; } @@ -270,17 +288,7 @@ export class CnameRecordService extends BaseService { logger.info(`检测到CNAME配置,修改状态 ${fullDomain} ${testRecordValue}`); await this.updateStatus(bean.id, 'valid'); value.pass = true; - cache.delete(cacheKey); - try { - const dnsProvider = await buildDnsProvider(); - await dnsProvider.removeRecord({ - recordReq: value.recordReq, - recordRes: value.recordRes, - }); - logger.info('删除CNAME的校验DNS记录成功'); - } catch (e) { - logger.error(`删除CNAME的校验DNS记录失败, ${e.message},req:${JSON.stringify(value.recordReq)},recordRes:${JSON.stringify(value.recordRes)}`, e); - } + await clearVerifyRecord() return success; } }; @@ -306,6 +314,7 @@ export class CnameRecordService extends BaseService { }; const dnsProvider = await buildDnsProvider(); const recordRes = await dnsProvider.createRecord(req); + value.dnsProvider = dnsProvider; value.validating = true; value.recordReq = req; value.recordRes = recordRes; diff --git a/packages/ui/certd-server/src/modules/cname/service/common-provider.ts b/packages/ui/certd-server/src/modules/cname/service/common-provider.ts index 5125d269..e9fe32b7 100644 --- a/packages/ui/certd-server/src/modules/cname/service/common-provider.ts +++ b/packages/ui/certd-server/src/modules/cname/service/common-provider.ts @@ -61,7 +61,7 @@ export class CommonDnsProvider implements IDnsProvider { domain: options.recordReq.domain, hostRecord: options.recordReq.hostRecord, recordValue: options.recordReq.value, - recordId: options.recordRes.recordId, + recordId: options.recordRes?.recordId, providerId: this.config.id, }, }); diff --git a/packages/ui/certd-server/src/modules/monitor/service/site-tester.ts b/packages/ui/certd-server/src/modules/monitor/service/site-tester.ts index ec677bb8..903fbdc5 100644 --- a/packages/ui/certd-server/src/modules/monitor/service/site-tester.ts +++ b/packages/ui/certd-server/src/modules/monitor/service/site-tester.ts @@ -1,4 +1,4 @@ -import { logger, utils } from '@certd/basic'; +import {logger, safePromise, utils} from '@certd/basic'; import { merge } from 'lodash-es'; import https from 'https'; import { PeerCertificate } from 'tls'; @@ -49,7 +49,7 @@ export class SiteTester { ); options.agent = agent; // 创建 HTTPS 请求 - const requestPromise = new Promise((resolve, reject) => { + const requestPromise = safePromise((resolve, reject) => { const req = https.request(options, res => { // 获取证书 // @ts-ignore diff --git a/packages/ui/certd-server/src/modules/plugin/service/plugin-service.ts b/packages/ui/certd-server/src/modules/plugin/service/plugin-service.ts index f56f11bc..fb618d41 100644 --- a/packages/ui/certd-server/src/modules/plugin/service/plugin-service.ts +++ b/packages/ui/certd-server/src/modules/plugin/service/plugin-service.ts @@ -285,12 +285,22 @@ export class PluginService extends BaseService { async registerFromLocal(localDir: string) { //scan path const files = fs.readdirSync(localDir); + let list = [] for (const file of files) { if (!file.endsWith(".yaml")) { continue; } const item = yaml.load(fs.readFileSync(path.join(localDir, file), "utf8")); + list.push(item); + + } + //排序 + list = list.sort((a, b) => { + return (a.order??10) - (b.order ??10); + }); + + for (const item of list) { await this.registerPlugin(item); } } diff --git a/packages/ui/certd-server/src/plugins/plugin-51dns/dns-provider.ts b/packages/ui/certd-server/src/plugins/plugin-51dns/dns-provider.ts index 32d57231..c4fd8f47 100644 --- a/packages/ui/certd-server/src/plugins/plugin-51dns/dns-provider.ts +++ b/packages/ui/certd-server/src/plugins/plugin-51dns/dns-provider.ts @@ -16,15 +16,15 @@ export type Dns51Record = { icon: 'arcticons:dns-changer-3', // 这里是对应的 cloudflare的access类型名称 accessType: '51dns', + order:999, }) export class Dns51DnsProvider extends AbstractDnsProvider { - // 通过Autowire传递context access!: Dns51Access; client!:Dns51Client; async onInstance() { //一些初始化的操作 - // 也可以通过ctx成员变量传递context, 与Autowire效果一样 + // 也可以通过ctx成员变量传递context this.access = this.ctx.access as Dns51Access; this.client = new Dns51Client({ logger: this.logger, diff --git a/packages/ui/certd-server/src/plugins/plugin-aliyun/dns-provider/aliyun-dns-provider.ts b/packages/ui/certd-server/src/plugins/plugin-aliyun/dns-provider/aliyun-dns-provider.ts index a3131b57..e9845f90 100644 --- a/packages/ui/certd-server/src/plugins/plugin-aliyun/dns-provider/aliyun-dns-provider.ts +++ b/packages/ui/certd-server/src/plugins/plugin-aliyun/dns-provider/aliyun-dns-provider.ts @@ -1,5 +1,4 @@ import { AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions } from '@certd/plugin-cert'; -import { Autowire } from '@certd/pipeline'; import { AliyunAccess, AliyunClient } from '@certd/plugin-lib'; @@ -9,13 +8,12 @@ import { AliyunAccess, AliyunClient } from '@certd/plugin-lib'; desc: '阿里云DNS解析提供商', accessType: 'aliyun', icon: 'svg:icon-aliyun', + order:0, }) export class AliyunDnsProvider extends AbstractDnsProvider { client: any; - @Autowire() - access!: AliyunAccess; async onInstance() { - const access: any = this.access; + const access: AliyunAccess = this.ctx.access as AliyunAccess this.client = new AliyunClient({ logger: this.logger }); await this.client.init({ diff --git a/packages/ui/certd-server/src/plugins/plugin-cloudflare/dns-provider.ts b/packages/ui/certd-server/src/plugins/plugin-cloudflare/dns-provider.ts index 98c9b109..186694fb 100644 --- a/packages/ui/certd-server/src/plugins/plugin-cloudflare/dns-provider.ts +++ b/packages/ui/certd-server/src/plugins/plugin-cloudflare/dns-provider.ts @@ -25,11 +25,10 @@ export type CloudflareRecord = { accessType: 'cloudflare', }) export class CloudflareDnsProvider extends AbstractDnsProvider { - // 通过Autowire传递context access!: CloudflareAccess; async onInstance() { //一些初始化的操作 - // 也可以通过ctx成员变量传递context, 与Autowire效果一样 + // 也可以通过ctx成员变量传递context this.access = this.ctx.access as CloudflareAccess; } diff --git a/packages/ui/certd-server/src/plugins/plugin-demo/dns-provider.ts b/packages/ui/certd-server/src/plugins/plugin-demo/dns-provider.ts index 120a94b5..fb1ccd96 100644 --- a/packages/ui/certd-server/src/plugins/plugin-demo/dns-provider.ts +++ b/packages/ui/certd-server/src/plugins/plugin-demo/dns-provider.ts @@ -1,5 +1,4 @@ import { AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions } from '@certd/plugin-cert'; -import { Autowire } from '@certd/pipeline'; import { DemoAccess } from './access.js'; import { isDev } from '../../utils/env.js'; @@ -19,12 +18,11 @@ type DemoRecord = { accessType: 'demo', }) export class DemoDnsProvider extends AbstractDnsProvider { - // 通过Autowire注入工具对象 - @Autowire() access!: DemoAccess; async onInstance() { - // 也可以通过ctx成员变量传递context, 与Autowire效果一样 + this.access = this.ctx.access as DemoAccess + // 也可以通过ctx成员变量传递context this.logger.debug('access', this.access); //初始化的操作 //... diff --git a/packages/ui/certd-server/src/plugins/plugin-dnsla/dns-provider.ts b/packages/ui/certd-server/src/plugins/plugin-dnsla/dns-provider.ts index 86363f0b..536af40c 100644 --- a/packages/ui/certd-server/src/plugins/plugin-dnsla/dns-provider.ts +++ b/packages/ui/certd-server/src/plugins/plugin-dnsla/dns-provider.ts @@ -16,11 +16,10 @@ export type DnslaRecord = { accessType: 'dnsla', }) export class DnslaDnsProvider extends AbstractDnsProvider { - // 通过Autowire传递context access!: DnslaAccess; async onInstance() { //一些初始化的操作 - // 也可以通过ctx成员变量传递context, 与Autowire效果一样 + // 通过ctx成员变量传递context this.access = this.ctx.access as DnslaAccess; } diff --git a/packages/ui/certd-server/src/plugins/plugin-host/plugin/copy-to-local/index.ts b/packages/ui/certd-server/src/plugins/plugin-host/plugin/copy-to-local/index.ts index 996da54a..5c46308e 100644 --- a/packages/ui/certd-server/src/plugins/plugin-host/plugin/copy-to-local/index.ts +++ b/packages/ui/certd-server/src/plugins/plugin-host/plugin/copy-to-local/index.ts @@ -1,9 +1,9 @@ import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput, TaskOutput } from '@certd/pipeline'; import { CertInfo, CertReader } from '@certd/plugin-cert'; import * as fs from 'fs'; -import { Constants } from '@certd/lib-server'; import path from 'path'; import { CertApplyPluginNames} from '@certd/plugin-cert'; +const dataDir = "./data" @IsTaskPlugin({ name: 'CopyToLocal', title: '主机-复制到本机', @@ -209,37 +209,37 @@ export class CopyCertToLocalPlugin extends AbstractTaskPlugin { this.logger.info('复制到目标路径'); if (crtPath) { crtPath = crtPath.trim(); - crtPath = crtPath.startsWith('/') ? crtPath : path.join(Constants.dataDir, crtPath); + crtPath = crtPath.startsWith('/') ? crtPath : path.join(dataDir, crtPath); this.copyFile(tmpCrtPath, crtPath); this.hostCrtPath = crtPath; } if (keyPath) { keyPath = keyPath.trim(); - keyPath = keyPath.startsWith('/') ? keyPath : path.join(Constants.dataDir, keyPath); + keyPath = keyPath.startsWith('/') ? keyPath : path.join(dataDir, keyPath); this.copyFile(tmpKeyPath, keyPath); this.hostKeyPath = keyPath; } if (icPath) { icPath = icPath.trim(); - icPath = icPath.startsWith('/') ? icPath : path.join(Constants.dataDir, icPath); + icPath = icPath.startsWith('/') ? icPath : path.join(dataDir, icPath); this.copyFile(tmpIcPath, icPath); this.hostIcPath = icPath; } if (pfxPath) { pfxPath = pfxPath.trim(); - pfxPath = pfxPath.startsWith('/') ? pfxPath : path.join(Constants.dataDir, pfxPath); + pfxPath = pfxPath.startsWith('/') ? pfxPath : path.join(dataDir, pfxPath); this.copyFile(tmpPfxPath, pfxPath); this.hostPfxPath = pfxPath; } if (derPath) { derPath = derPath.trim(); - derPath = derPath.startsWith('/') ? derPath : path.join(Constants.dataDir, derPath); + derPath = derPath.startsWith('/') ? derPath : path.join(dataDir, derPath); this.copyFile(tmpDerPath, derPath); this.hostDerPath = derPath; } if (jksPath) { jksPath = jksPath.trim(); - jksPath = jksPath.startsWith('/') ? jksPath : path.join(Constants.dataDir, jksPath); + jksPath = jksPath.startsWith('/') ? jksPath : path.join(dataDir, jksPath); this.copyFile(tmpJksPath, jksPath); this.hostJksPath = jksPath; } diff --git a/packages/ui/certd-server/src/plugins/plugin-huawei/dns-provider/huawei-dns-provider.ts b/packages/ui/certd-server/src/plugins/plugin-huawei/dns-provider/huawei-dns-provider.ts index e5d6404a..29468c9e 100644 --- a/packages/ui/certd-server/src/plugins/plugin-huawei/dns-provider/huawei-dns-provider.ts +++ b/packages/ui/certd-server/src/plugins/plugin-huawei/dns-provider/huawei-dns-provider.ts @@ -1,6 +1,5 @@ import * as _ from "lodash-es"; import { AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions } from "@certd/plugin-cert"; -import { Autowire } from "@certd/pipeline"; import { HuaweiAccess } from "../access/index.js"; import { ApiRequestOptions, HuaweiYunClient } from "@certd/lib-huawei"; @@ -18,12 +17,12 @@ export type SearchRecordOptions = { }) export class HuaweiDnsProvider extends AbstractDnsProvider { client!: HuaweiYunClient; - @Autowire() access!: HuaweiAccess; domainEndpoint = "https://domains-external.myhuaweicloud.com"; dnsEndpoint = "https://dns.cn-south-1.myhuaweicloud.com"; async onInstance() { + this.access = this.ctx.access as HuaweiAccess const access: any = this.access; this.client = new HuaweiYunClient(access, this.logger); } diff --git a/packages/ui/certd-server/src/plugins/plugin-jdcloud/dns-provider.ts b/packages/ui/certd-server/src/plugins/plugin-jdcloud/dns-provider.ts index 96a492b2..f4fd7d3d 100644 --- a/packages/ui/certd-server/src/plugins/plugin-jdcloud/dns-provider.ts +++ b/packages/ui/certd-server/src/plugins/plugin-jdcloud/dns-provider.ts @@ -1,5 +1,4 @@ import { AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions } from "@certd/plugin-cert"; -import { Autowire } from "@certd/pipeline"; import { JDCloudAccess } from "./access.js"; @IsDnsProvider({ @@ -10,11 +9,11 @@ import { JDCloudAccess } from "./access.js"; icon: "svg:icon-jdcloud" }) export class JDCloudDnsProvider extends AbstractDnsProvider { - @Autowire() access!: JDCloudAccess; async onInstance() { + this.access = this.ctx.access as JDCloudAccess } diff --git a/packages/ui/certd-server/src/plugins/plugin-namesilo/dns-provider.ts b/packages/ui/certd-server/src/plugins/plugin-namesilo/dns-provider.ts index de7b7dc5..62473da2 100644 --- a/packages/ui/certd-server/src/plugins/plugin-namesilo/dns-provider.ts +++ b/packages/ui/certd-server/src/plugins/plugin-namesilo/dns-provider.ts @@ -17,11 +17,10 @@ export type NamesiloRecord = { accessType: 'namesilo', }) export class NamesiloDnsProvider extends AbstractDnsProvider { - // 通过Autowire传递context access!: NamesiloAccess; async onInstance() { //一些初始化的操作 - // 也可以通过ctx成员变量传递context, 与Autowire效果一样 + // 也可以通过ctx成员变量传递context this.access = this.ctx.access as NamesiloAccess; } diff --git a/packages/ui/certd-server/src/plugins/plugin-tencent/dns-provider/dnspod-dns-provider.ts b/packages/ui/certd-server/src/plugins/plugin-tencent/dns-provider/dnspod-dns-provider.ts index b81c620b..e83c75da 100644 --- a/packages/ui/certd-server/src/plugins/plugin-tencent/dns-provider/dnspod-dns-provider.ts +++ b/packages/ui/certd-server/src/plugins/plugin-tencent/dns-provider/dnspod-dns-provider.ts @@ -1,5 +1,3 @@ -import { Autowire } from '@certd/pipeline'; - import { AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions } from '@certd/plugin-cert'; import * as _ from 'lodash-es'; import { DnspodAccess } from '../access/index.js'; @@ -13,13 +11,13 @@ import { DnspodAccess } from '../access/index.js'; icon: 'svg:icon-tencentcloud', }) export class DnspodDnsProvider extends AbstractDnsProvider { - @Autowire() access!: DnspodAccess; loginToken: any; endpoint = ''; async onInstance() { + this.access = this.ctx.access as DnspodAccess const access: DnspodAccess = this.access as DnspodAccess; this.loginToken = access.id + ',' + access.token; this.endpoint = access.endpoint || 'https://dnsapi.cn'; diff --git a/packages/ui/certd-server/src/plugins/plugin-tencent/dns-provider/tencent-dns-provider.ts b/packages/ui/certd-server/src/plugins/plugin-tencent/dns-provider/tencent-dns-provider.ts index 95a25785..9be95d22 100644 --- a/packages/ui/certd-server/src/plugins/plugin-tencent/dns-provider/tencent-dns-provider.ts +++ b/packages/ui/certd-server/src/plugins/plugin-tencent/dns-provider/tencent-dns-provider.ts @@ -1,5 +1,3 @@ -import { Autowire } from '@certd/pipeline'; - import { AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions } from '@certd/plugin-cert'; import { TencentAccess } from '@certd/plugin-lib'; @@ -11,7 +9,6 @@ import { TencentAccess } from '@certd/plugin-lib'; icon: 'svg:icon-tencentcloud', }) export class TencentDnsProvider extends AbstractDnsProvider { - @Autowire() access!: TencentAccess; client!: any; @@ -19,6 +16,7 @@ export class TencentDnsProvider extends AbstractDnsProvider { endpoint = 'dnspod.tencentcloudapi.com'; async onInstance() { + this.access = this.ctx.access as TencentAccess const clientConfig = { credential: this.access, region: '', diff --git a/packages/ui/certd-server/src/plugins/plugin-volcengine/plugins/plugin-deploy-to-dcdn.ts b/packages/ui/certd-server/src/plugins/plugin-volcengine/plugins/plugin-deploy-to-dcdn.ts new file mode 100644 index 00000000..c6f492cb --- /dev/null +++ b/packages/ui/certd-server/src/plugins/plugin-volcengine/plugins/plugin-deploy-to-dcdn.ts @@ -0,0 +1,204 @@ +import {AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput} from "@certd/pipeline"; +import {createCertDomainGetterInputDefine, createRemoteSelectInputDefine} from "@certd/plugin-lib"; +import {CertApplyPluginNames, CertInfo, CertReader} from "@certd/plugin-cert"; +import {VolcengineAccess} from "../access.js"; +import {VolcengineClient} from "../ve-client.js"; + +@IsTaskPlugin({ + name: "VolcengineDeployToDCDN", + title: "火山引擎-部署证书至DCDN", + icon: "svg:icon-volcengine", + group: pluginGroups.volcengine.key, + desc: "部署至火山引擎全站加速", + // showRunStrategy: true, + default: { + strategy: { + runStrategy: RunStrategy.SkipWhenSucceed + } + } +}) +export class VolcengineDeployToDCDN extends AbstractTaskPlugin { + @TaskInput({ + title: "域名证书", + helper: "请选择前置任务输出的域名证书", + component: { + name: "output-selector", + from: [...CertApplyPluginNames] + }, + required: true + }) + cert!: CertInfo; + + @TaskInput(createCertDomainGetterInputDefine({props: {required: false}})) + certDomains!: string[]; + + @TaskInput({ + title: "自动匹配", + helper: "是否根据证书自动匹配合适的DCDN域名进行部署", + value: false, + component: { + name: "a-switch", + type: "checked" + }, + required: true + }) + autoMatch!: boolean; + + @TaskInput({ + title: "Access授权", + helper: "火山引擎AccessKeyId、AccessKeySecret", + component: { + name: "access-selector", + type: "volcengine" + }, + required: true + }) + accessId!: string; + + + @TaskInput( + createRemoteSelectInputDefine({ + title: "DCDN域名", + helper: "选择要部署证书的DCDN域名", + action: VolcengineDeployToDCDN.prototype.onGetDomainList.name, + watches: ["certDomains", "accessId"], + required: true, + mergeScript: ` + return { + show: ctx.compute(({form})=>{ + return !form.autoMatch + }) + } + ` + }) + ) + domainList!: string | string[]; + + + async onInstance() { + } + + async uploadCert(client: VolcengineClient) { + const certService = await client.getCertCenterService(); + let certId = this.cert; + if (typeof certId !== "string") { + const certInfo = this.cert as CertInfo; + this.logger.info(`开始上传证书`); + certId = await certService.ImportCertificate({ + certName: this.appendTimeSuffix("certd"), + cert: certInfo + }); + this.logger.info(`上传证书成功:${certId}`); + } else { + this.logger.info(`使用已有证书ID:${certId}`); + } + return certId + } + + + async execute(): Promise { + this.logger.info("开始部署证书到火山引擎DCDN"); + + const client = await this.getClient(); + let certId = await this.uploadCert(client); + + const service = await client.getDCDNService(); + + this.certDomains = new CertReader(this.cert).getAllDomains() + + + let domainList = this.domainList + if (!this.autoMatch) { + //手动根据域名部署 + if (!this.domainList || this.domainList.length === 0) { + throw new Error("域名列表不能为空"); + } + } else { + //自动匹配 + const options = await this.getDomainOptions(service); + const grouped = this.ctx.utils.options.groupByDomain(options, this.certDomains); + + const matched = grouped.matched + + domainList = matched.map(item => item.domain) + + if (domainList.length === 0) { + this.logger.warn("没有匹配到域名,跳过部署") + this.logger.info("当前证书域名:", this.certDomains) + this.logger.info("当前DCDN域名:", grouped.notMatched.map(item => item.domain)) + return + } + } + + + //域名十个十个的分割 + for (let i = 0; i < domainList.length; i += 10) { + const batch = domainList.slice(i, i + 10); + this.logger.info(`开始部署证书到域名:${batch}`); + const res = await service.request({ + action: "CreateCertBind", + method: "POST", + body: { + "DomainNames": batch, + "CertSource": "volc", + "CertId": certId + }, + version: "2021-04-01" + }); + this.logger.info(`部署证书到域名成功:`,JSON.stringify(res)); + } + + this.logger.info("部署完成"); + + } + + + async getClient() { + const access = await this.getAccess(this.accessId); + + return new VolcengineClient({ + logger: this.logger, + access, + http: this.http + }) + } + + async onGetDomainList(data: any) { + if (!this.accessId) { + throw new Error("请选择Access授权"); + } + + const client = await this.getClient(); + const service = await client.getDCDNService(); + const options = await this.getDomainOptions(service); + return this.ctx.utils.options.buildGroupOptions(options, this.certDomains); + } + + private async getDomainOptions(service: any) { + const res = await service.request({ + method: "POST", + action: "DescribeUserDomains", + body: { + "PageSize": 1000 + } + }) + + + const list = res.Result?.Domains; + if (!list || list.length === 0) { + throw new Error("找不到DCDN域名,您也可以手动输入域名"); + } + const options = list.map((item: any) => { + return { + value: item.Domain, + label: `${item.Domain}<${item.Scope}>`, + domain: item.Domain + }; + }); + return options; + } + + +} + +new VolcengineDeployToDCDN(); diff --git a/packages/ui/certd-server/src/plugins/plugin-volcengine/ve-client.ts b/packages/ui/certd-server/src/plugins/plugin-volcengine/ve-client.ts index adcf707a..b9d1634e 100644 --- a/packages/ui/certd-server/src/plugins/plugin-volcengine/ve-client.ts +++ b/packages/ui/certd-server/src/plugins/plugin-volcengine/ve-client.ts @@ -100,6 +100,19 @@ export class VolcengineClient { return service; } + async getDCDNService( opts?: { }) { + const CommonService = await this.getServiceCls(); + + const service = new CommonService({ + serviceName: "dcdn", + defaultVersion: "2023-01-01" + }); + service.setAccessKeyId(this.opts.access.accessKeyId); + service.setSecretKey(this.opts.access.secretAccessKey); + service.setRegion("cn-north-1"); + return service; + } + async getServiceCls() { if (this.CommonService) { return this.CommonService; @@ -114,11 +127,11 @@ export class VolcengineClient { defaultVersion: string; }) { super(Object.assign({ host: "open.volcengineapi.com" }, options)); - this.Generic = async (req: { action: string, body?: any, method?: string, query?: any }) => { - const { action, method, body, query } = req; + this.Generic = async (req: { action: string, body?: any, method?: string, query?: any ,version?:string}) => { + const { action, method, body, query,version } = req; return await this.fetchOpenAPI({ Action: action, - Version: options.defaultVersion, + Version: version||options.defaultVersion, method: method as any, headers: { "content-type": "application/json" @@ -129,8 +142,11 @@ export class VolcengineClient { }; } - async request(req: { action: string, body?: any, method?: string, query?: any }) { + async request(req: { action: string, body?: any, method?: string, query?: any,version?:string }) { const res = await this.Generic(req); + if (res ==="Not Found"){ + throw new Error(`${res} (检查method)`); + } if (res.errorcode) { throw new Error(`${res.errorcode}:${res.message}`); } @@ -146,4 +162,5 @@ export class VolcengineClient { } + } diff --git a/packages/ui/certd-server/src/plugins/plugin-volcengine/volcengine-dns-provider.ts b/packages/ui/certd-server/src/plugins/plugin-volcengine/volcengine-dns-provider.ts index b7ce4533..eb10ec6f 100644 --- a/packages/ui/certd-server/src/plugins/plugin-volcengine/volcengine-dns-provider.ts +++ b/packages/ui/certd-server/src/plugins/plugin-volcengine/volcengine-dns-provider.ts @@ -1,5 +1,4 @@ import { AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions } from "@certd/plugin-cert"; -import { Autowire } from "@certd/pipeline"; import { VolcengineDnsClient } from "./dns-client.js"; import { VolcengineAccess } from "./access.js"; @@ -13,11 +12,11 @@ import { VolcengineAccess } from "./access.js"; }) export class VolcengineDnsProvider extends AbstractDnsProvider { client: VolcengineDnsClient; - @Autowire() access!: VolcengineAccess; async onInstance() { + this.access = this.ctx.access as VolcengineAccess this.client = new VolcengineDnsClient({ access: this.access, logger: this.logger, diff --git a/packages/ui/certd-server/src/plugins/plugin-west/dns-provider.ts b/packages/ui/certd-server/src/plugins/plugin-west/dns-provider.ts index 8ec3be1c..2df31192 100644 --- a/packages/ui/certd-server/src/plugins/plugin-west/dns-provider.ts +++ b/packages/ui/certd-server/src/plugins/plugin-west/dns-provider.ts @@ -1,5 +1,4 @@ import { AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions } from '@certd/plugin-cert'; -import { Autowire } from '@certd/pipeline'; import { WestAccess } from './access.js'; @@ -22,12 +21,11 @@ type westRecord = { accessType: 'west', }) export class WestDnsProvider extends AbstractDnsProvider { - // 通过Autowire注入工具对象 - @Autowire() access!: WestAccess; async onInstance() { - // 也可以通过ctx成员变量传递context, 与Autowire效果一样 + this.access = this.ctx.access as WestAccess + // 也可以通过ctx成员变量传递context this.logger.debug('access:', this.access); //初始化的操作 //... diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b07dea60..eff72b29 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -46,7 +46,7 @@ importers: packages/core/acme-client: dependencies: '@certd/basic': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../basic '@peculiar/x509': specifier: ^1.11.0 @@ -207,10 +207,10 @@ importers: packages/core/pipeline: dependencies: '@certd/basic': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../basic '@certd/plus-core': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../pro/plus-core dayjs: specifier: ^1.11.7 @@ -415,7 +415,7 @@ importers: packages/libs/lib-k8s: dependencies: '@certd/basic': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/basic '@kubernetes/client-node': specifier: 0.21.0 @@ -455,16 +455,16 @@ importers: packages/libs/lib-server: dependencies: '@certd/acme-client': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/acme-client '@certd/basic': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/basic '@certd/pipeline': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/pipeline '@certd/plus-core': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../pro/plus-core '@midwayjs/cache': specifier: ~3.14.0 @@ -607,16 +607,16 @@ importers: packages/plugins/plugin-cert: dependencies: '@certd/acme-client': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/acme-client '@certd/basic': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/basic '@certd/pipeline': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/pipeline '@certd/plugin-lib': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../plugin-lib '@google-cloud/publicca': specifier: ^1.3.0 @@ -689,10 +689,10 @@ importers: specifier: ^3.787.0 version: 3.787.0(aws-crt@1.25.3) '@certd/basic': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/basic '@certd/pipeline': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/pipeline '@kubernetes/client-node': specifier: 0.21.0 @@ -780,19 +780,19 @@ importers: packages/pro/commercial-core: dependencies: '@certd/basic': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/basic '@certd/lib-server': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../libs/lib-server '@certd/pipeline': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/pipeline '@certd/plugin-plus': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../plugin-plus '@certd/plus-core': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../plus-core '@midwayjs/core': specifier: ~3.20.3 @@ -877,22 +877,22 @@ importers: specifier: ^1.0.2 version: 1.0.2 '@certd/basic': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/basic '@certd/lib-k8s': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../libs/lib-k8s '@certd/pipeline': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/pipeline '@certd/plugin-cert': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../plugins/plugin-cert '@certd/plugin-lib': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../plugins/plugin-lib '@certd/plus-core': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../plus-core ali-oss: specifier: ^6.21.0 @@ -989,7 +989,7 @@ importers: packages/pro/plus-core: dependencies: '@certd/basic': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/basic dayjs: specifier: ^1.11.7 @@ -1279,10 +1279,10 @@ importers: version: 0.1.3(zod@3.24.2) devDependencies: '@certd/lib-iframe': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../libs/lib-iframe '@certd/pipeline': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/pipeline '@rollup/plugin-commonjs': specifier: ^25.0.7 @@ -1419,9 +1419,6 @@ importers: vite-plugin-compression: specifier: ^0.5.1 version: 0.5.1(vite@5.4.14(@types/node@18.19.80)(less@4.2.2)(terser@5.39.0)) - vite-plugin-dynamic-base: - specifier: ^1.1.0 - version: 1.1.0(vite@5.4.14(@types/node@18.19.80)(less@4.2.2)(terser@5.39.0)) vite-plugin-html: specifier: ^3.2.2 version: 3.2.2(vite@5.4.14(@types/node@18.19.80)(less@4.2.2)(terser@5.39.0)) @@ -1465,43 +1462,43 @@ importers: specifier: ^3.705.0 version: 3.758.0(aws-crt@1.25.3) '@certd/acme-client': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/acme-client '@certd/basic': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/basic '@certd/commercial-core': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../pro/commercial-core '@certd/jdcloud': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../libs/lib-jdcloud '@certd/lib-huawei': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../libs/lib-huawei '@certd/lib-k8s': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../libs/lib-k8s '@certd/lib-server': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../libs/lib-server '@certd/midway-flyway-js': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../libs/midway-flyway-js '@certd/pipeline': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../core/pipeline '@certd/plugin-cert': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../plugins/plugin-cert '@certd/plugin-lib': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../plugins/plugin-lib '@certd/plugin-plus': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../pro/plugin-plus '@certd/plus-core': - specifier: ^1.33.7 + specifier: ^1.34.0 version: link:../../pro/plus-core '@corsinvest/cv4pve-api-javascript': specifier: ^8.3.0 @@ -1738,6 +1735,9 @@ importers: typescript: specifier: ^5.4.2 version: 5.8.2 + why-is-node-running: + specifier: ^3.2.2 + version: 3.2.2 packages: @@ -13015,11 +13015,6 @@ packages: peerDependencies: vite: '>=2.0.0' - vite-plugin-dynamic-base@1.1.0: - resolution: {integrity: sha512-/hIOTuzedlPRiUTCIY1cJx7UDDUF0brxWIifE7xG1czCJy0Aw6k3QPbHVjPCs30YuU+WAgrX4ACOySLIp2NHkw==} - peerDependencies: - vite: '>= 2.9.5' - vite-plugin-html@3.2.2: resolution: {integrity: sha512-vb9C9kcdzcIo/Oc3CLZVS03dL5pDlOFuhGlZYDCJ840BhWl/0nGeZWf3Qy7NlOayscY4Cm/QRgULCQkEZige5Q==} peerDependencies: @@ -13337,6 +13332,11 @@ packages: engines: {node: '>=8'} hasBin: true + why-is-node-running@3.2.2: + resolution: {integrity: sha512-NKUzAelcoCXhXL4dJzKIwXeR8iEVqsA0Lq6Vnd0UXvgaKbzVo4ZTHROF2Jidrv+SgxOQ03fMinnNhzZATxOD3A==} + engines: {node: '>=20.11'} + hasBin: true + wide-align@1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} @@ -18063,8 +18063,10 @@ snapshots: '@swc/core-win32-arm64-msvc': 1.11.22 '@swc/core-win32-ia32-msvc': 1.11.22 '@swc/core-win32-x64-msvc': 1.11.22 + optional: true - '@swc/counter@0.1.3': {} + '@swc/counter@0.1.3': + optional: true '@swc/helpers@0.5.15': dependencies: @@ -18073,6 +18075,7 @@ snapshots: '@swc/types@0.1.21': dependencies: '@swc/counter': 0.1.3 + optional: true '@szmarczak/http-timer@1.1.2': dependencies: @@ -21769,13 +21772,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.1(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@2.8.8): dependencies: @@ -24489,7 +24492,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 @@ -27988,14 +27991,6 @@ snapshots: transitivePeerDependencies: - supports-color - vite-plugin-dynamic-base@1.1.0(vite@5.4.14(@types/node@18.19.80)(less@4.2.2)(terser@5.39.0)): - dependencies: - '@swc/core': 1.11.22 - node-html-parser: 5.4.2 - vite: 5.4.14(@types/node@18.19.80)(less@4.2.2)(terser@5.39.0) - transitivePeerDependencies: - - '@swc/helpers' - vite-plugin-html@3.2.2(vite@5.4.14(@types/node@18.19.80)(less@4.2.2)(terser@5.39.0)): dependencies: '@rollup/pluginutils': 4.2.1 @@ -28348,6 +28343,8 @@ snapshots: siginfo: 2.0.0 stackback: 0.0.2 + why-is-node-running@3.2.2: {} + wide-align@1.1.5: dependencies: string-width: 4.2.3