diff --git a/CHANGELOG.md b/CHANGELOG.md index 32f605e80..2e52165f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.29.1](https://github.com/certd/certd/compare/v1.29.0...v1.29.1) (2024-12-25) + +### Bug Fixes + +* 免费套餐支持购买 ([f5ec987](https://github.com/certd/certd/commit/f5ec9870fd6af1f0c9099852bbdb4d07813ccce8)) +* 修复某处金额转换丢失精度的bug ([d2d6f12](https://github.com/certd/certd/commit/d2d6f12218cbe7bd55f4ae082b93084be85f0a7b)) +* 修复新版本小红点显示错误问题 ([fe4786e](https://github.com/certd/certd/commit/fe4786e168afe03a5243dd67971476c348339809)) + +### Performance Improvements + +* 用户创建证书流水线没有购买套餐或者超限时提前报错 ([472f06c](https://github.com/certd/certd/commit/472f06c2d190d0ae48e8b53c18bc278437656a1c)) +* 优化插件名称显示 ([26adf7d](https://github.com/certd/certd/commit/26adf7d437e674385f26a8f92fded6521a620671)) + # [1.29.0](https://github.com/certd/certd/compare/v1.28.4...v1.29.0) (2024-12-24) ### Bug Fixes diff --git a/build.trigger b/build.trigger index 0be59df10..89b948234 100644 --- a/build.trigger +++ b/build.trigger @@ -1 +1 @@ -01:06 +01:43 diff --git a/docker/run/docker-compose.yaml b/docker/run/docker-compose.yaml index 0f1c0dec6..8abe4556f 100644 --- a/docker/run/docker-compose.yaml +++ b/docker/run/docker-compose.yaml @@ -34,6 +34,8 @@ services: # #↓↓↓↓ ----------------------------- 如果忘记管理员密码,可以设置为true,重启之后,管理员密码将改成123456,然后请及时修改回false - certd_system_resetAdminPasswd=false # 默认使用sqlite文件数据库,如果需要使用其他数据库,请设置以下环境变量 +# 注意: 选定使用一种数据库之后,不支持更换数据库。 +# 数据库迁移方法:1、使用新数据库重新部署一套,然后将旧数据同步过去,注意flyway_history表的数据不要同步 # #↓↓↓↓ ----------------------------- 使用postgresql数据库,需要提前创建数据库 # - certd_flyway_scriptDir=./db/migration-pg # 升级脚本目录 # - certd_typeorm_dataSource_default_type=postgres # 数据库类型 diff --git a/docs/guide/changelogs/CHANGELOG.md b/docs/guide/changelogs/CHANGELOG.md index 32f605e80..2e52165f7 100644 --- a/docs/guide/changelogs/CHANGELOG.md +++ b/docs/guide/changelogs/CHANGELOG.md @@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.29.1](https://github.com/certd/certd/compare/v1.29.0...v1.29.1) (2024-12-25) + +### Bug Fixes + +* 免费套餐支持购买 ([f5ec987](https://github.com/certd/certd/commit/f5ec9870fd6af1f0c9099852bbdb4d07813ccce8)) +* 修复某处金额转换丢失精度的bug ([d2d6f12](https://github.com/certd/certd/commit/d2d6f12218cbe7bd55f4ae082b93084be85f0a7b)) +* 修复新版本小红点显示错误问题 ([fe4786e](https://github.com/certd/certd/commit/fe4786e168afe03a5243dd67971476c348339809)) + +### Performance Improvements + +* 用户创建证书流水线没有购买套餐或者超限时提前报错 ([472f06c](https://github.com/certd/certd/commit/472f06c2d190d0ae48e8b53c18bc278437656a1c)) +* 优化插件名称显示 ([26adf7d](https://github.com/certd/certd/commit/26adf7d437e674385f26a8f92fded6521a620671)) + # [1.29.0](https://github.com/certd/certd/compare/v1.28.4...v1.29.0) (2024-12-24) ### Bug Fixes diff --git a/lerna.json b/lerna.json index c3bb8e296..9f1792c5c 100644 --- a/lerna.json +++ b/lerna.json @@ -9,5 +9,5 @@ } }, "npmClient": "pnpm", - "version": "1.29.0" + "version": "1.29.1" } diff --git a/packages/core/acme-client/CHANGELOG.md b/packages/core/acme-client/CHANGELOG.md index 3b5b1eacd..4a5ce0065 100644 --- a/packages/core/acme-client/CHANGELOG.md +++ b/packages/core/acme-client/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.29.1](https://github.com/publishlab/node-acme-client/compare/v1.29.0...v1.29.1) (2024-12-25) + +**Note:** Version bump only for package @certd/acme-client + # [1.29.0](https://github.com/publishlab/node-acme-client/compare/v1.28.4...v1.29.0) (2024-12-24) **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 6d5c26a71..79bede5c1 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.29.0", + "version": "1.29.1", "type": "module", "module": "scr/index.js", "main": "src/index.js", @@ -18,7 +18,7 @@ "types" ], "dependencies": { - "@certd/basic": "^1.29.0", + "@certd/basic": "^1.29.1", "@peculiar/x509": "^1.11.0", "asn1js": "^3.0.5", "axios": "^1.7.2", @@ -65,5 +65,5 @@ "bugs": { "url": "https://github.com/publishlab/node-acme-client/issues" }, - "gitHead": "36993cb6f8244f4a183d64fcdf5194282140d888" + "gitHead": "f9128d4d452e344b6990c117a5d647add226437b" } diff --git a/packages/core/basic/CHANGELOG.md b/packages/core/basic/CHANGELOG.md index 60e3c103c..7fa1351b8 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.29.1](https://github.com/certd/certd/compare/v1.29.0...v1.29.1) (2024-12-25) + +### Bug Fixes + +* 修复某处金额转换丢失精度的bug ([d2d6f12](https://github.com/certd/certd/commit/d2d6f12218cbe7bd55f4ae082b93084be85f0a7b)) + # [1.29.0](https://github.com/certd/certd/compare/v1.28.4...v1.29.0) (2024-12-24) ### Features diff --git a/packages/core/basic/build.md b/packages/core/basic/build.md index 95ce39254..57f88ddd2 100644 --- a/packages/core/basic/build.md +++ b/packages/core/basic/build.md @@ -1 +1 @@ -01:02 +01:39 diff --git a/packages/core/basic/package.json b/packages/core/basic/package.json index 9b2a543a7..dddb2cb87 100644 --- a/packages/core/basic/package.json +++ b/packages/core/basic/package.json @@ -1,7 +1,7 @@ { "name": "@certd/basic", "private": false, - "version": "1.29.0", + "version": "1.29.1", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -44,5 +44,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "36993cb6f8244f4a183d64fcdf5194282140d888" + "gitHead": "f9128d4d452e344b6990c117a5d647add226437b" } diff --git a/packages/core/basic/src/utils/index.ts b/packages/core/basic/src/utils/index.ts index 0a7dac223..8d69f03bb 100644 --- a/packages/core/basic/src/utils/index.ts +++ b/packages/core/basic/src/utils/index.ts @@ -9,6 +9,10 @@ export * from './util.merge.js'; export * from './util.cache.js'; export * from './util.string.js'; export * from './util.lock.js'; +export * from './util.mitter.js'; +export * from './util.id.js'; +export * from './util.domain.js'; +export * from './util.amount.js'; import { stringUtils } from './util.string.js'; import sleep from './util.sleep.js'; import { http, download } from './util.request.js'; @@ -23,6 +27,7 @@ import { cache } from './util.cache.js'; import dayjs from 'dayjs'; import { domainUtils } from './util.domain.js'; import { optionsUtils } from './util.options.js'; +import { amountUtils } from './util.amount.js'; import { nanoid } from 'nanoid'; import * as id from './util.id.js'; import { locker } from './util.lock.js'; @@ -46,4 +51,5 @@ export const utils = { string: stringUtils, locker, mitter, + amount: amountUtils, }; diff --git a/packages/core/basic/src/utils/util.amount.ts b/packages/core/basic/src/utils/util.amount.ts new file mode 100644 index 000000000..f457ba42c --- /dev/null +++ b/packages/core/basic/src/utils/util.amount.ts @@ -0,0 +1,9 @@ +export const amountUtils = { + toCent(amount: number): number { + return parseInt((amount * 100).toFixed(0)); + }, + + toYuan(amount: number): number { + return parseFloat((amount / 100).toFixed(2)); + }, +}; diff --git a/packages/core/pipeline/CHANGELOG.md b/packages/core/pipeline/CHANGELOG.md index aab57e23e..3bf7e2348 100644 --- a/packages/core/pipeline/CHANGELOG.md +++ b/packages/core/pipeline/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.29.1](https://github.com/certd/certd/compare/v1.29.0...v1.29.1) (2024-12-25) + +### Performance Improvements + +* 用户创建证书流水线没有购买套餐或者超限时提前报错 ([472f06c](https://github.com/certd/certd/commit/472f06c2d190d0ae48e8b53c18bc278437656a1c)) + # [1.29.0](https://github.com/certd/certd/compare/v1.28.4...v1.29.0) (2024-12-24) ### Features diff --git a/packages/core/pipeline/package.json b/packages/core/pipeline/package.json index edd55f9e2..cc25981df 100644 --- a/packages/core/pipeline/package.json +++ b/packages/core/pipeline/package.json @@ -1,7 +1,7 @@ { "name": "@certd/pipeline", "private": false, - "version": "1.29.0", + "version": "1.29.1", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -16,8 +16,8 @@ "test": "mocha --loader=ts-node/esm" }, "dependencies": { - "@certd/basic": "^1.29.0", - "@certd/plus-core": "^1.29.0", + "@certd/basic": "^1.29.1", + "@certd/plus-core": "^1.29.1", "dayjs": "^1.11.7", "lodash-es": "^4.17.21", "reflect-metadata": "^0.1.13" @@ -43,5 +43,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "36993cb6f8244f4a183d64fcdf5194282140d888" + "gitHead": "f9128d4d452e344b6990c117a5d647add226437b" } diff --git a/packages/core/pipeline/src/core/run-history.ts b/packages/core/pipeline/src/core/run-history.ts index aa48ac3b2..9c472ee68 100644 --- a/packages/core/pipeline/src/core/run-history.ts +++ b/packages/core/pipeline/src/core/run-history.ts @@ -146,6 +146,10 @@ export class RunnableCollection { static initPipelineRunnableType(pipeline: Pipeline) { pipeline.runnableType = "pipeline"; + if (pipeline.stages === undefined) { + pipeline.stages = []; + return; + } pipeline.stages.forEach((stage) => { stage.runnableType = "stage"; stage.tasks.forEach((task) => { diff --git a/packages/libs/lib-huawei/CHANGELOG.md b/packages/libs/lib-huawei/CHANGELOG.md index a57bb02b5..fb8227da2 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.29.1](https://github.com/certd/certd/compare/v1.29.0...v1.29.1) (2024-12-25) + +**Note:** Version bump only for package @certd/lib-huawei + # [1.29.0](https://github.com/certd/certd/compare/v1.28.4...v1.29.0) (2024-12-24) **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 9f6b9a2c0..207653cb9 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.29.0", + "version": "1.29.1", "main": "./dist/bundle.js", "module": "./dist/bundle.js", "types": "./dist/d/index.d.ts", @@ -21,5 +21,5 @@ "prettier": "^2.8.8", "tslib": "^2.8.1" }, - "gitHead": "36993cb6f8244f4a183d64fcdf5194282140d888" + "gitHead": "f9128d4d452e344b6990c117a5d647add226437b" } diff --git a/packages/libs/lib-iframe/CHANGELOG.md b/packages/libs/lib-iframe/CHANGELOG.md index 0c367b11b..395c8484d 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.29.1](https://github.com/certd/certd/compare/v1.29.0...v1.29.1) (2024-12-25) + +**Note:** Version bump only for package @certd/lib-iframe + # [1.29.0](https://github.com/certd/certd/compare/v1.28.4...v1.29.0) (2024-12-24) **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 fe981c027..42ec4bb84 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.29.0", + "version": "1.29.1", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -30,5 +30,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "36993cb6f8244f4a183d64fcdf5194282140d888" + "gitHead": "f9128d4d452e344b6990c117a5d647add226437b" } diff --git a/packages/libs/lib-k8s/CHANGELOG.md b/packages/libs/lib-k8s/CHANGELOG.md index 789b7a377..697b69565 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.29.1](https://github.com/certd/certd/compare/v1.29.0...v1.29.1) (2024-12-25) + +**Note:** Version bump only for package @certd/lib-k8s + # [1.29.0](https://github.com/certd/certd/compare/v1.28.4...v1.29.0) (2024-12-24) **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 e88067c46..96f180478 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.29.0", + "version": "1.29.1", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -16,7 +16,7 @@ "preview": "vite preview" }, "dependencies": { - "@certd/basic": "^1.29.0", + "@certd/basic": "^1.29.1", "@kubernetes/client-node": "0.21.0" }, "devDependencies": { @@ -31,5 +31,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "36993cb6f8244f4a183d64fcdf5194282140d888" + "gitHead": "f9128d4d452e344b6990c117a5d647add226437b" } diff --git a/packages/libs/lib-server/CHANGELOG.md b/packages/libs/lib-server/CHANGELOG.md index ef1e6aecd..88710aeee 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.29.1](https://github.com/certd/certd/compare/v1.29.0...v1.29.1) (2024-12-25) + +**Note:** Version bump only for package @certd/lib-server + # [1.29.0](https://github.com/certd/certd/compare/v1.28.4...v1.29.0) (2024-12-24) ### Features diff --git a/packages/libs/lib-server/package.json b/packages/libs/lib-server/package.json index 2d4c5bf67..9d2424f4a 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.29.0", + "version": "1.29.1", "description": "midway with flyway, sql upgrade way ", "private": false, "type": "module", @@ -27,10 +27,10 @@ ], "license": "AGPL", "dependencies": { - "@certd/acme-client": "^1.29.0", - "@certd/basic": "^1.29.0", - "@certd/pipeline": "^1.29.0", - "@certd/plus-core": "^1.29.0", + "@certd/acme-client": "^1.29.1", + "@certd/basic": "^1.29.1", + "@certd/pipeline": "^1.29.1", + "@certd/plus-core": "^1.29.1", "@midwayjs/cache": "~3.14.0", "@midwayjs/core": "~3.17.1", "@midwayjs/i18n": "~3.17.3", @@ -61,5 +61,5 @@ "typeorm": "^0.3.11", "typescript": "^5.4.2" }, - "gitHead": "36993cb6f8244f4a183d64fcdf5194282140d888" + "gitHead": "f9128d4d452e344b6990c117a5d647add226437b" } diff --git a/packages/libs/midway-flyway-js/CHANGELOG.md b/packages/libs/midway-flyway-js/CHANGELOG.md index 116aa0312..c94c06d0e 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.29.1](https://github.com/certd/certd/compare/v1.29.0...v1.29.1) (2024-12-25) + +**Note:** Version bump only for package @certd/midway-flyway-js + # [1.29.0](https://github.com/certd/certd/compare/v1.28.4...v1.29.0) (2024-12-24) **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 008735a0f..e15341372 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.29.0", + "version": "1.29.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": "36993cb6f8244f4a183d64fcdf5194282140d888" + "gitHead": "f9128d4d452e344b6990c117a5d647add226437b" } diff --git a/packages/plugins/plugin-cert/CHANGELOG.md b/packages/plugins/plugin-cert/CHANGELOG.md index 7ece0bee6..fb24400ab 100644 --- a/packages/plugins/plugin-cert/CHANGELOG.md +++ b/packages/plugins/plugin-cert/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.29.1](https://github.com/certd/certd/compare/v1.29.0...v1.29.1) (2024-12-25) + +**Note:** Version bump only for package @certd/plugin-cert + # [1.29.0](https://github.com/certd/certd/compare/v1.28.4...v1.29.0) (2024-12-24) ### Bug Fixes diff --git a/packages/plugins/plugin-cert/package.json b/packages/plugins/plugin-cert/package.json index 57e262470..d1ebc8163 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.29.0", + "version": "1.29.1", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -15,9 +15,9 @@ "preview": "vite preview" }, "dependencies": { - "@certd/acme-client": "^1.29.0", - "@certd/basic": "^1.29.0", - "@certd/pipeline": "^1.29.0", + "@certd/acme-client": "^1.29.1", + "@certd/basic": "^1.29.1", + "@certd/pipeline": "^1.29.1", "@google-cloud/publicca": "^1.3.0", "dayjs": "^1.11.7", "jszip": "^3.10.1", @@ -40,5 +40,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "36993cb6f8244f4a183d64fcdf5194282140d888" + "gitHead": "f9128d4d452e344b6990c117a5d647add226437b" } diff --git a/packages/plugins/plugin-lib/CHANGELOG.md b/packages/plugins/plugin-lib/CHANGELOG.md index ee15192d1..5c5619238 100644 --- a/packages/plugins/plugin-lib/CHANGELOG.md +++ b/packages/plugins/plugin-lib/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.29.1](https://github.com/certd/certd/compare/v1.29.0...v1.29.1) (2024-12-25) + +**Note:** Version bump only for package @certd/plugin-lib + # [1.29.0](https://github.com/certd/certd/compare/v1.28.4...v1.29.0) (2024-12-24) **Note:** Version bump only for package @certd/plugin-lib diff --git a/packages/plugins/plugin-lib/package.json b/packages/plugins/plugin-lib/package.json index aba54eb49..22aa03e6b 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.29.0", + "version": "1.29.1", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -16,9 +16,9 @@ }, "dependencies": { "@alicloud/pop-core": "^1.7.10", - "@certd/basic": "^1.29.0", - "@certd/pipeline": "^1.29.0", - "@certd/plugin-cert": "^1.29.0", + "@certd/basic": "^1.29.1", + "@certd/pipeline": "^1.29.1", + "@certd/plugin-cert": "^1.29.1", "@kubernetes/client-node": "0.21.0", "dayjs": "^1.11.7", "iconv-lite": "^0.6.3", @@ -44,5 +44,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "36993cb6f8244f4a183d64fcdf5194282140d888" + "gitHead": "f9128d4d452e344b6990c117a5d647add226437b" } diff --git a/packages/ui/certd-client/CHANGELOG.md b/packages/ui/certd-client/CHANGELOG.md index 709fea3c9..44db084d9 100644 --- a/packages/ui/certd-client/CHANGELOG.md +++ b/packages/ui/certd-client/CHANGELOG.md @@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.29.1](https://github.com/certd/certd/compare/v1.29.0...v1.29.1) (2024-12-25) + +### Bug Fixes + +* 免费套餐支持购买 ([f5ec987](https://github.com/certd/certd/commit/f5ec9870fd6af1f0c9099852bbdb4d07813ccce8)) +* 修复某处金额转换丢失精度的bug ([d2d6f12](https://github.com/certd/certd/commit/d2d6f12218cbe7bd55f4ae082b93084be85f0a7b)) +* 修复新版本小红点显示错误问题 ([fe4786e](https://github.com/certd/certd/commit/fe4786e168afe03a5243dd67971476c348339809)) + +### Performance Improvements + +* 用户创建证书流水线没有购买套餐或者超限时提前报错 ([472f06c](https://github.com/certd/certd/commit/472f06c2d190d0ae48e8b53c18bc278437656a1c)) +* 优化插件名称显示 ([26adf7d](https://github.com/certd/certd/commit/26adf7d437e674385f26a8f92fded6521a620671)) + # [1.29.0](https://github.com/certd/certd/compare/v1.28.4...v1.29.0) (2024-12-24) ### Bug Fixes diff --git a/packages/ui/certd-client/package.json b/packages/ui/certd-client/package.json index 138978f59..d7317a474 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.29.0", + "version": "1.29.1", "private": true, "scripts": { "dev": "vite --open", @@ -66,8 +66,8 @@ "vuedraggable": "^4.1.0" }, "devDependencies": { - "@certd/lib-iframe": "^1.29.0", - "@certd/pipeline": "^1.29.0", + "@certd/lib-iframe": "^1.29.1", + "@certd/pipeline": "^1.29.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/store/modules/settings.ts b/packages/ui/certd-client/src/store/modules/settings.ts index 522633fdb..b2aff9673 100644 --- a/packages/ui/certd-client/src/store/modules/settings.ts +++ b/packages/ui/certd-client/src/store/modules/settings.ts @@ -122,12 +122,11 @@ export const useSettingStore = defineStore({ }; return vipLabelMap[this.plusInfo?.vipType || "free"]; }, - // @ts-ignore - getHeaderMenus() { + getHeaderMenus(): { menus: any[] } { // @ts-ignore return this.headerMenus?.menus || { menus: [] }; }, - isSuiteEnabled() { + isSuiteEnabled(): boolean { // @ts-ignore return this.suiteSetting?.enabled === true; } diff --git a/packages/ui/certd-client/src/utils/index.ts b/packages/ui/certd-client/src/utils/index.ts index d8ccefc11..47a9457c9 100644 --- a/packages/ui/certd-client/src/utils/index.ts +++ b/packages/ui/certd-client/src/utils/index.ts @@ -6,6 +6,7 @@ import * as mitt from "./util.mitt"; import { routerUtils } from "./util.router"; import { treeUtils } from "./util.tree"; import { hashUtils } from "./util.hash"; +import { amountUtils } from "./util.amount"; export const util = { ...envs, ...sites, @@ -14,5 +15,7 @@ export const util = { ...mitt, router: routerUtils, tree: treeUtils, - hash: hashUtils + hash: hashUtils, + amount: amountUtils }; +export const utils = util; diff --git a/packages/ui/certd-client/src/utils/util.amount.ts b/packages/ui/certd-client/src/utils/util.amount.ts new file mode 100644 index 000000000..3d6703e86 --- /dev/null +++ b/packages/ui/certd-client/src/utils/util.amount.ts @@ -0,0 +1,9 @@ +export const amountUtils = { + toCent(amount: number): number { + return parseInt((amount * 100).toFixed(0)); + }, + + toYuan(amount: number): number { + return parseFloat((amount / 100).toFixed(2)); + } +}; diff --git a/packages/ui/certd-client/src/views/certd/monitor/site/crud.tsx b/packages/ui/certd-client/src/views/certd/monitor/site/crud.tsx index c29aec9d0..93aa68b85 100644 --- a/packages/ui/certd-client/src/views/certd/monitor/site/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/monitor/site/crud.tsx @@ -4,10 +4,14 @@ import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, Edi import { siteInfoApi } from "./api"; import dayjs from "dayjs"; import { notification } from "ant-design-vue"; +import { useSettingStore } from "/@/store/modules/settings"; +import { mySuiteApi } from "/@/views/certd/suite/mine/api"; +import { mitter } from "/@/utils/util.mitt"; export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet { const { t } = useI18n(); const api = siteInfoApi; + const { crudBinding } = crudExpose; const pageRequest = async (query: UserPageQuery): Promise => { return await api.GetList(query); }; @@ -28,6 +32,8 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat return res; }; + const settingsStore = useSettingStore(); + return { crudOptions: { request: { @@ -51,6 +57,38 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat width: 600 } }, + actionbar: { + buttons: { + add: { + async click() { + if (!settingsStore.isPlus) { + //非plus + if (crudBinding.value.data.length >= 1) { + notification.error({ + message: "基础版只能添加一个监控站点,请赞助升级专业版" + }); + mitter.emit("openVipModal"); + return; + } + } + + //检查是否监控站点数量超出限制 + if (settingsStore.isComm && settingsStore.suiteSetting.enabled) { + //检查数量是否超限 + const suiteDetail = await mySuiteApi.SuiteDetailGet(); + const max = suiteDetail.monitorCount.max; + if (max != -1 && max <= suiteDetail.monitorCount.used) { + notification.error({ + message: `对不起,您最多只能创建条${max}监控记录,请购买或升级套餐` + }); + return; + } + } + await crudExpose.openAdd({}); + } + } + } + }, rowHandle: { fixed: "right", width: 240, @@ -111,6 +149,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat form: { rules: [ { required: true, message: "请输入域名" }, + //@ts-ignore { type: "domains", message: "请输入正确的域名" } ] }, diff --git a/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx b/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx index 27beb5067..953a81500 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx @@ -15,6 +15,7 @@ import { useModal } from "/@/use/use-modal"; import CertView from "./cert-view.vue"; import { eachStages } from "./utils"; import { createNotificationApi as createNotificationApi } from "../notification/api"; +import { mySuiteApi } from "/@/views/certd/suite/mine/api"; export default function ({ crudExpose, context: { certdFormRef, groupDictRef, selectedRowKeys } }: CreateCrudOptionsProps): CreateCrudOptionsRet { const router = useRouter(); const { t } = useI18n(); @@ -94,7 +95,23 @@ export default function ({ crudExpose, context: { certdFormRef, groupDictRef, se lastResRef.value = res; return res; }; - function addCertdPipeline() { + + const settingsStore = useSettingStore(); + async function addCertdPipeline() { + //检查是否流水线数量超出限制 + if (settingsStore.isComm && settingsStore.suiteSetting.enabled) { + //检查数量是否超限 + + const suiteDetail = await mySuiteApi.SuiteDetailGet(); + const max = suiteDetail.pipelineCount.max; + if (max != -1 && max <= suiteDetail.pipelineCount.used) { + notification.error({ + message: `对不起,您最多只能创建${max}条流水线,请购买或升级套餐` + }); + return; + } + } + certdFormRef.value.open(async ({ form }: any) => { // 添加certd pipeline const triggers = []; diff --git a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/step-form/index.vue b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/step-form/index.vue index 3c07b1099..98540c602 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/step-form/index.vue +++ b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/step-form/index.vue @@ -1,5 +1,5 @@