diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index a5100cdc..1706ee3d 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -12,7 +12,7 @@ permissions: contents: read jobs: - sync: + build-certd-image: runs-on: ubuntu-latest steps: - name: Checkout Code @@ -20,28 +20,19 @@ jobs: - name: get_certd_version id: get_certd_version - uses: actions/github-script@v5 + uses: actions/github-script@v6 with: + result-encoding: string script: | const fs = require('fs'); const path = require('path'); - - const pnpmWorkspace = "pnpm-workspace.yaml"; - fs.removeSync(pnpmWorkspace) - + const pnpmWorkspace = "./pnpm-workspace.yaml"; + fs.unlinkSync(pnpmWorkspace) const jsonFilePath = "./packages/ui/certd-server/package.json"; const jsonContent = fs.readFileSync(jsonFilePath, 'utf-8'); - console.log(jsonContent) const pkg = JSON.parse(jsonContent) - // 打印 JSON 文件内容 console.log("certd_version:",pkg.version); - // 输出 JSON 对象,可以在后续步骤中使用 - return {"version":"0.0.5"}; - - - name: Set up the working directory - run: | - mkdir -p ./packages/ui/ - working-directory: ./packages/ui/ + return pkg.version - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -49,17 +40,18 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to GitHub Container Registry + - name: Login to aliyun container Registry uses: docker/login-action@v3 with: registry: registry.cn-shenzhen.aliyuncs.com - username: ${{ secrets.ALIYUN_CS_USERNAME }} - password: ${{ secrets.ALIYUN_CS_PASSWORD }} + username: ${{ secrets.aliyun_cs_username }} + password: ${{ secrets.aliyun_cs_password }} - name: Build and push uses: docker/build-push-action@v6.5.0 with: - platforms: linux/amd64,linux/arm64 +# platforms: linux/amd64,linux/arm64 push: true + context: ./packages/ui/ tags: | - registry.cn-shenzhen.aliyuncs.com/handsfree/certd:${{steps.get_certd_version.outputs.version}} \ No newline at end of file + registry.cn-shenzhen.aliyuncs.com/handsfree/certd:${{steps.get_certd_version.outputs.result}} diff --git a/CHANGELOG.md b/CHANGELOG.md index 56b688ac..b1aef48b 100644 --- a/CHANGELOG.md +++ b/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.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23) + +### Bug Fixes + +* 修复创建流水线时,无法根据dns类型默认正确的dns授权的bug ([a2c43b5](https://github.com/certd/certd/commit/a2c43b50a6069ed48958fd142844a8568c2af452)) + ## [1.22.1](https://github.com/certd/certd/compare/v1.22.0...v1.22.1) (2024-07-20) ### Performance Improvements diff --git a/build.trigger b/build.trigger index 62f94575..b8626c4c 100644 --- a/build.trigger +++ b/build.trigger @@ -1 +1 @@ -6 \ No newline at end of file +4 diff --git a/docker/run/run.sh b/docker/run/run.sh deleted file mode 100644 index a36f095d..00000000 --- a/docker/run/run.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -e -# 判断$CERTD_VERSION 是否存在 -if [ -n "$CERTD_VERSION" ]; then - echo "CERTD_VERSION is set = $CERTD_VERSION" -else - echo "CERTD_VERSION is not set" - echo "请先输入一个版本号(如 1.0.6):" - read CERTD_VERSION -fi - -echo "您输入的版本号是: $CERTD_VERSION" -sudo -E docker compose up -d diff --git a/lerna.json b/lerna.json index 14c53d82..31e5eafa 100644 --- a/lerna.json +++ b/lerna.json @@ -9,5 +9,5 @@ } }, "npmClient": "pnpm", - "version": "1.22.1" + "version": "1.22.2" } diff --git a/package.json b/package.json index 75805538..55aaa4c4 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,10 @@ "scripts": { "start": "lerna bootstrap --hoist", "i-all": "lerna link && lerna exec npm install ", - "publish": "npm run prepublishOnly1 && lerna publish --conventional-commits && npm run afterpublishOnly && npm run deploy1", + "publish": "npm run prepublishOnly1 && lerna publish --conventional-commits --create-release github && npm run afterpublishOnly && npm run deploy1", "afterpublishOnly": "", "prepublishOnly1": "npm run check && npm run before-build && lerna run build ", - "before-build": "cd ./packages/core/acme-client && time /t >build.md && git add build.trigger && git commit -m \\\"build: prepare to build\\\"", + "before-build": "cd ./packages/core/acme-client && time /t >build.md && git add ./build.md && git commit -m \"build: prepare to build\"", "deploy1": "node --experimental-json-modules deploy.js ", "check": "node --experimental-json-modules publish-check.js", "init": "lerna run build" diff --git a/packages/core/acme-client/CHANGELOG.md b/packages/core/acme-client/CHANGELOG.md index 5e104f4d..b83c994a 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.22.2](https://github.com/publishlab/node-acme-client/compare/v1.22.1...v1.22.2) (2024-07-23) + +**Note:** Version bump only for package @certd/acme-client + ## [1.22.1](https://github.com/publishlab/node-acme-client/compare/v1.22.0...v1.22.1) (2024-07-20) **Note:** Version bump only for package @certd/acme-client diff --git a/packages/core/acme-client/build.md b/packages/core/acme-client/build.md index 12524293..45b0270d 100644 --- a/packages/core/acme-client/build.md +++ b/packages/core/acme-client/build.md @@ -1 +1 @@ -03:10 +02:24 diff --git a/packages/core/acme-client/package.json b/packages/core/acme-client/package.json index c7e5a8d3..19ea85b5 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.22.1", + "version": "1.22.2", "main": "src/index.js", "types": "types/index.d.ts", "license": "MIT", @@ -59,5 +59,5 @@ "bugs": { "url": "https://github.com/publishlab/node-acme-client/issues" }, - "gitHead": "47fe3d5826661f678d081ab53e67c847a3239d88" + "gitHead": "e5da46cfc31b2e30a4903bcb2251b1851265ef41" } diff --git a/packages/core/pipeline/CHANGELOG.md b/packages/core/pipeline/CHANGELOG.md index c53c0364..cdfaf96e 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.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23) + +**Note:** Version bump only for package @certd/pipeline + ## [1.22.1](https://github.com/certd/certd/compare/v1.22.0...v1.22.1) (2024-07-20) ### Performance Improvements diff --git a/packages/core/pipeline/package.json b/packages/core/pipeline/package.json index d61efc25..4464cd5e 100644 --- a/packages/core/pipeline/package.json +++ b/packages/core/pipeline/package.json @@ -1,7 +1,7 @@ { "name": "@certd/pipeline", "private": false, - "version": "1.22.1", + "version": "1.22.2", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -55,5 +55,5 @@ "vite": "^4.3.8", "vue-tsc": "^1.6.5" }, - "gitHead": "47fe3d5826661f678d081ab53e67c847a3239d88" + "gitHead": "e5da46cfc31b2e30a4903bcb2251b1851265ef41" } diff --git a/packages/core/pipeline/src/core/executor.ts b/packages/core/pipeline/src/core/executor.ts index f1fc620b..9e20c82a 100644 --- a/packages/core/pipeline/src/core/executor.ts +++ b/packages/core/pipeline/src/core/executor.ts @@ -283,7 +283,7 @@ export class Executor { } if (notification.type === "email") { try { - this.options.emailService?.send({ + await this.options.emailService?.send({ userId: this.pipeline.userId, subject, content, diff --git a/packages/libs/lib-k8s/CHANGELOG.md b/packages/libs/lib-k8s/CHANGELOG.md index 1c95abae..c088ae06 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.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23) + +**Note:** Version bump only for package @certd/lib-k8s + ## [1.22.1](https://github.com/certd/certd/compare/v1.22.0...v1.22.1) (2024-07-20) **Note:** Version bump only for package @certd/lib-k8s diff --git a/packages/libs/lib-k8s/package.json b/packages/libs/lib-k8s/package.json index 7cfc460d..afc2bc0d 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.22.1", + "version": "1.22.2", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -17,7 +17,7 @@ "shelljs": "^0.8.5" }, "devDependencies": { - "@certd/pipeline": "^1.22.1", + "@certd/pipeline": "^1.22.2", "@rollup/plugin-commonjs": "^23.0.4", "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-node-resolve": "^15.0.1", @@ -38,5 +38,5 @@ "tslib": "^2.5.2", "typescript": "^4.8.4" }, - "gitHead": "47fe3d5826661f678d081ab53e67c847a3239d88" + "gitHead": "e5da46cfc31b2e30a4903bcb2251b1851265ef41" } diff --git a/packages/libs/midway-flyway-js/CHANGELOG.md b/packages/libs/midway-flyway-js/CHANGELOG.md index 751b37ca..9469a854 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.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23) + +**Note:** Version bump only for package @certd/midway-flyway-js + ## [1.22.1](https://github.com/certd/certd/compare/v1.22.0...v1.22.1) (2024-07-20) **Note:** Version bump only for package @certd/midway-flyway-js diff --git a/packages/libs/midway-flyway-js/package.json b/packages/libs/midway-flyway-js/package.json index 7f0cf532..7a7ad9c3 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.22.1", + "version": "1.22.2", "description": "midway with flyway, sql upgrade way ", "private": false, "type": "module", @@ -53,5 +53,5 @@ "typeorm": "^0.3.11", "typescript": "~5.1.0" }, - "gitHead": "47fe3d5826661f678d081ab53e67c847a3239d88" + "gitHead": "e5da46cfc31b2e30a4903bcb2251b1851265ef41" } diff --git a/packages/libs/midway-flyway-js/src/flyway.ts b/packages/libs/midway-flyway-js/src/flyway.ts index a412f863..ac70184b 100644 --- a/packages/libs/midway-flyway-js/src/flyway.ts +++ b/packages/libs/midway-flyway-js/src/flyway.ts @@ -227,8 +227,10 @@ export class Flyway { if (history.hash !== hash && this.allowHashNotMatch === false) { throw new Error(file + `hash conflict ,old: ${history.hash} != new: ${hash}`); } + this.logger.info('[ midfly ] script<' + file + '> already executed'); return true; } + this.logger.info('[ midfly ] script<' + file + '> not yet execute'); return false; } diff --git a/packages/plugins/plugin-cert/CHANGELOG.md b/packages/plugins/plugin-cert/CHANGELOG.md index 250c1540..f9b99365 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.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23) + +**Note:** Version bump only for package @certd/plugin-cert + ## [1.22.1](https://github.com/certd/certd/compare/v1.22.0...v1.22.1) (2024-07-20) ### Performance Improvements diff --git a/packages/plugins/plugin-cert/package.json b/packages/plugins/plugin-cert/package.json index cd56e463..8104bf7f 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.22.1", + "version": "1.22.2", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -13,8 +13,8 @@ "preview": "vite preview" }, "dependencies": { - "@certd/acme-client": "^1.22.1", - "@certd/pipeline": "^1.22.1", + "@certd/acme-client": "^1.22.2", + "@certd/pipeline": "^1.22.2", "jszip": "^3.10.1", "node-forge": "^0.10.0", "psl": "^1.9.0" @@ -53,5 +53,5 @@ "vite": "^3.1.0", "vue-tsc": "^0.38.9" }, - "gitHead": "47fe3d5826661f678d081ab53e67c847a3239d88" + "gitHead": "e5da46cfc31b2e30a4903bcb2251b1851265ef41" } 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 eac31023..5c4b4b69 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts @@ -33,6 +33,7 @@ export class CertApplyPlugin extends CertApplyBasePlugin { vModel: "value", options: [ { value: "letsencrypt", label: "Let's Encrypt" }, + // { value: "letsencrypt-proxy", label: "Let's Encrypt代理,letsencrypt.org无法访问时使用" }, // { value: "buypass", label: "Buypass" }, { value: "zerossl", label: "ZeroSSL" }, ], diff --git a/packages/plugins/plugin-cert/src/plugin/cert-plugin/lego/dns.ts b/packages/plugins/plugin-cert/src/plugin/cert-plugin/lego/dns.ts new file mode 100644 index 00000000..740904f2 --- /dev/null +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/lego/dns.ts @@ -0,0 +1 @@ +export const dnsList = []; diff --git a/packages/plugins/plugin-cert/src/plugin/cert-plugin/lego.ts b/packages/plugins/plugin-cert/src/plugin/cert-plugin/lego/index.ts similarity index 81% rename from packages/plugins/plugin-cert/src/plugin/cert-plugin/lego.ts rename to packages/plugins/plugin-cert/src/plugin/cert-plugin/lego/index.ts index d735d630..ac709556 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/lego.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/lego/index.ts @@ -1,9 +1,9 @@ import { IsTaskPlugin, pluginGroups, RunStrategy, sp, Step, TaskInput } from "@certd/pipeline"; -import type { CertInfo } from "./acme.js"; -import { CertReader } from "./cert-reader.js"; -import { CertApplyBasePlugin } from "./base.js"; +import type { CertInfo } from "../acme.js"; +import { CertReader } from "../cert-reader.js"; +import { CertApplyBasePlugin } from "../base.js"; import fs from "fs"; -import { EabAccess } from "../../access"; +import { EabAccess } from "../../../access/index.js"; import path from "path"; export { CertReader }; @@ -25,6 +25,21 @@ export type { CertInfo }; }, }) export class CertApplyLegoPlugin extends CertApplyBasePlugin { + // @TaskInput({ + // title: "ACME服务端点", + // default: "https://acme-v02.api.letsencrypt.org/directory", + // component: { + // name: "a-select", + // vModel: "value", + // options: [ + // { value: "https://acme-v02.api.letsencrypt.org/directory", label: "Let's Encrypt" }, + // { value: "https://letsencrypt.proxy.handsfree.work/directory", label: "Let's Encrypt代理,letsencrypt.org无法访问时使用" }, + // ], + // }, + // required: true, + // }) + acmeServer!: string; + @TaskInput({ title: "DNS类型", component: { @@ -110,8 +125,14 @@ export class CertApplyLegoPlugin extends CertApplyBasePlugin { const savePathArgs = `--path "${saveDir}"`; const os_type = process.platform === "win32" ? "windows" : "linux"; const legoPath = path.resolve("./tools", os_type, "lego"); + let serverArgs = ""; + if (this.acmeServer) { + serverArgs = ` --server ${this.acmeServer}`; + } const cmds = [ - `${legoPath} -a --email "${this.email}" --dns ${this.dnsType} ${keyType} ${domainArgs} ${eabArgs} ${savePathArgs} ${this.customArgs || ""} run`, + `${legoPath} -a --email "${this.email}" --dns ${this.dnsType} ${keyType} ${domainArgs} ${serverArgs} ${eabArgs} ${savePathArgs} ${ + this.customArgs || "" + } run`, ]; await sp.spawn({ diff --git a/packages/plugins/plugin-cert/src/plugin/index.ts b/packages/plugins/plugin-cert/src/plugin/index.ts index 1bb9235c..aaafb350 100644 --- a/packages/plugins/plugin-cert/src/plugin/index.ts +++ b/packages/plugins/plugin-cert/src/plugin/index.ts @@ -1,2 +1,2 @@ export * from "./cert-plugin/index.js"; -export * from "./cert-plugin/lego.js"; +export * from "./cert-plugin/lego/index.js"; diff --git a/packages/ui/Dockerfile b/packages/ui/Dockerfile index 3c7f3453..41182997 100644 --- a/packages/ui/Dockerfile +++ b/packages/ui/Dockerfile @@ -2,8 +2,7 @@ FROM node:18-alpine as builder EXPOSE 7001 WORKDIR /workspace/ COPY . /workspace/ -RUN npm install -g pnpm@8.15.7 --registry=https://registry.npmmirror.com -RUN pnpm config set registry https://registry.npmmirror.com/ +RUN npm install -g pnpm@8.15.7 RUN cd /workspace/certd-client && pnpm install && npm run build RUN cd /workspace/certd-server && pnpm install && npm run build-on-docker @@ -14,9 +13,9 @@ RUN cp /workspace/certd-client/dist/* /workspace/certd-server/public/ -rf FROM node:18-alpine WORKDIR /app/ COPY --from=builder /workspace/certd-server/ /app/ -ENV TZ Asia/Shanghai -ENV NODE_ENV production -ENV MIDWAY_SERVER_ENV production +ENV TZ=Asia/Shanghai +ENV NODE_ENV=production +ENV MIDWAY_SERVER_ENV=production CMD ["npm", "run","start"] diff --git a/packages/ui/certd-client/CHANGELOG.md b/packages/ui/certd-client/CHANGELOG.md index 4d8ec696..7fd1d9fd 100644 --- a/packages/ui/certd-client/CHANGELOG.md +++ b/packages/ui/certd-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.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23) + +### Bug Fixes + +* 修复创建流水线时,无法根据dns类型默认正确的dns授权的bug ([a2c43b5](https://github.com/certd/certd/commit/a2c43b50a6069ed48958fd142844a8568c2af452)) + ## [1.22.1](https://github.com/certd/certd/compare/v1.22.0...v1.22.1) (2024-07-20) ### Performance Improvements diff --git a/packages/ui/certd-client/package.json b/packages/ui/certd-client/package.json index 09b1fb3d..57b629a9 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.22.1", + "version": "1.22.2", "private": true, "scripts": { "dev": "vite --open", @@ -59,7 +59,7 @@ "vuedraggable": "^2.24.3" }, "devDependencies": { - "@certd/pipeline": "^1.22.1", + "@certd/pipeline": "^1.22.2", "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-node-resolve": "^15.2.3", "@types/chai": "^4.3.12", diff --git a/packages/ui/certd-client/src/use/use-refrence.ts b/packages/ui/certd-client/src/use/use-refrence.ts new file mode 100644 index 00000000..a908ea62 --- /dev/null +++ b/packages/ui/certd-client/src/use/use-refrence.ts @@ -0,0 +1,19 @@ +import _ from "lodash-es"; +import { compute } from "@fast-crud/fast-crud"; + +export function useReference(form: any) { + if (!form.reference) { + return; + } + for (const reference of form.reference) { + debugger; + _.set( + form, + reference.dest, + compute((scope) => { + debugger; + return _.get(scope, reference.src); + }) + ); + } +} diff --git a/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx b/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx index 5765df1c..77e7f105 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx @@ -1,5 +1,7 @@ import { compute, CreateCrudOptionsRet, dict } from "@fast-crud/fast-crud"; import { PluginGroup } from "@certd/pipeline"; +import { useReference } from "/@/use/use-refrence"; +import _ from "lodash-es"; export default function (certPluginGroup: PluginGroup, formWrapperRef: any): CreateCrudOptionsRet { const inputs: any = {}; @@ -10,10 +12,11 @@ export default function (certPluginGroup: PluginGroup, formWrapperRef: any): Cre inputs[inputKey].form.show = true; continue; } - const inputDefine = plugin.input[inputKey]; + const inputDefine = _.cloneDeep(plugin.input[inputKey]); if (!inputDefine.required && !inputDefine.maybeNeed) { continue; } + useReference(inputDefine); inputs[inputKey] = { title: inputDefine.title, form: { diff --git a/packages/ui/certd-server/CHANGELOG.md b/packages/ui/certd-server/CHANGELOG.md index a0335b57..b443df7b 100644 --- a/packages/ui/certd-server/CHANGELOG.md +++ b/packages/ui/certd-server/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.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23) + +### Bug Fixes + +* 修复创建流水线时,无法根据dns类型默认正确的dns授权的bug ([a2c43b5](https://github.com/certd/certd/commit/a2c43b50a6069ed48958fd142844a8568c2af452)) + ## [1.22.1](https://github.com/certd/certd/compare/v1.22.0...v1.22.1) (2024-07-20) ### Performance Improvements diff --git a/packages/ui/certd-server/package.json b/packages/ui/certd-server/package.json index 7b2db4eb..0f3d6be8 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.22.1", + "version": "1.22.2", "description": "fast-server base midway", "private": true, "type": "module", @@ -21,12 +21,12 @@ "@alicloud/cs20151215": "^3.0.3", "@alicloud/openapi-client": "^0.4.0", "@alicloud/pop-core": "^1.7.10", - "@certd/acme-client": "^1.22.1", + "@certd/acme-client": "^1.22.2", "@certd/lib-huawei": "^1.22.1", - "@certd/lib-k8s": "^1.22.1", - "@certd/midway-flyway-js": "^1.22.1", - "@certd/pipeline": "^1.22.1", - "@certd/plugin-cert": "^1.22.1", + "@certd/lib-k8s": "^1.22.2", + "@certd/midway-flyway-js": "^1.22.2", + "@certd/pipeline": "^1.22.2", + "@certd/plugin-cert": "^1.22.2", "@koa/cors": "^3.4.3", "@midwayjs/bootstrap": "^3.16.2", "@midwayjs/cache": "^3.14.0", diff --git a/packages/ui/certd-server/src/config/config.default.ts b/packages/ui/certd-server/src/config/config.default.ts index 07cff24f..1a843c67 100644 --- a/packages/ui/certd-server/src/config/config.default.ts +++ b/packages/ui/certd-server/src/config/config.default.ts @@ -59,7 +59,7 @@ const development = { type: 'better-sqlite3', database: './data/db.sqlite', synchronize: false, // 如果第一次使用,不存在表,有同步的需求可以写 true - logging: true, + logging: false, // 配置实体模型 或者 entities: '/entity', entities: ['**/modules/*/entity/*.ts', '**/entity/*.js', '**/entity/*.d.ts', PipelineEntity, FlywayHistory, UserEntity], diff --git a/packages/ui/certd-server/src/config/config.preview.ts b/packages/ui/certd-server/src/config/config.preview.ts index 5b717e81..ebe30965 100644 --- a/packages/ui/certd-server/src/config/config.preview.ts +++ b/packages/ui/certd-server/src/config/config.preview.ts @@ -8,6 +8,13 @@ const preview = { preview: { enabled: true, }, + typeorm: { + dataSource: { + default: { + logging: false, + }, + }, + }, } as MidwayConfig; mergeConfig(preview, 'preview'); diff --git a/packages/ui/certd-server/src/config/config.production.ts b/packages/ui/certd-server/src/config/config.production.ts index 29f89aae..41a3442a 100644 --- a/packages/ui/certd-server/src/config/config.production.ts +++ b/packages/ui/certd-server/src/config/config.production.ts @@ -8,6 +8,13 @@ const production = { preview: { enabled: false, }, + typeorm: { + dataSource: { + default: { + logging: false, + }, + }, + }, } as MidwayConfig; mergeConfig(production, 'production'); diff --git a/publish-check.js b/publish-check.js index 1beb67d5..d2de3910 100644 --- a/publish-check.js +++ b/publish-check.js @@ -1,5 +1,6 @@ import fs from 'fs' +import childProcess from 'child_process'; function check(){ const gitAdd = fs.readFileSync("./node_modules/@lerna-lite/version/dist/lib/git-add.js","utf-8") if(gitAdd.indexOf("('git', ['add', '.']") > -1){ @@ -8,6 +9,14 @@ function check(){ console.error("git-add 没有修改过") throw new Error("git-add 还没修改过") } + + //GH_TOKEN + console.log("检查 GH_TOKEN") + if(!process.env.GH_TOKEN){ + // setx /M GH_TOKEN xxxxx + console.error("GH_TOKEN 未设置") + throw new Error("GH_TOKEN 未设置") + } } -check() \ No newline at end of file +check()