diff --git a/.gitignore b/.gitignore index bf2258f1..61b05105 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,7 @@ gen /packages/ui/*/.idea /packages/ui/*/node_modules /packages/*/node_modules -/pnpm-lock.yaml +#/pnpm-lock.yaml tsconfig.tsbuildinfo diff --git a/docs/guide/development/index.md b/docs/guide/development/index.md index 12e90479..26c3ee6a 100644 --- a/docs/guide/development/index.md +++ b/docs/guide/development/index.md @@ -28,7 +28,7 @@ packages: ### 安装依赖和初始化: ```shell # 安装pnpm,如果提示npm命令不存在,就需要先安装nodejs -npm install -g pnpm@8.15.7 --registry=https://registry.npmmirror.com +npm install -g pnpm--registry=https://registry.npmmirror.com # 使用国内镜像源,如果有代理,就不需要 pnpm config set registry https://registry.npmmirror.com diff --git a/docs/guide/install/source/index.md b/docs/guide/install/source/index.md index 5fb3b236..728633ae 100644 --- a/docs/guide/install/source/index.md +++ b/docs/guide/install/source/index.md @@ -1,5 +1,5 @@ # 源码部署 -不推荐 +如果没有`git`和`nodejs`基础,则不推荐 ## 一、源码安装 ### 环境要求 @@ -7,7 +7,7 @@ ### 源码启动 ```shell # 克隆代码 -git clone https://github.com/certd/certd +git clone https://github.com/certd/certd --depth=1 # git checkout v1.x.x # 当v2主干分支代码无法正常启动时,可以尝试此命令,1.x.x换成最新版本号 cd certd # 启动服务 diff --git a/packages/core/pipeline/src/core/executor.ts b/packages/core/pipeline/src/core/executor.ts index e21a33b7..a37368ae 100644 --- a/packages/core/pipeline/src/core/executor.ts +++ b/packages/core/pipeline/src/core/executor.ts @@ -152,6 +152,10 @@ export class Executor { this.runtime.disabled(runnable); return resultType; } + if (resultType == ResultType.error) { + this.runtime.error(runnable, new Error("执行失败")); + return resultType; + } this.runtime.success(runnable); return ResultType.success; } catch (e: any) { @@ -174,6 +178,9 @@ export class Executor { const res: ResultType = await this.runWithHistory(stage, "stage", async () => { return await this.runStage(stage); }); + if (res === ResultType.error) { + return ResultType.error; + } resList.push(res); } return this.compositionResultType(resList); @@ -200,10 +207,15 @@ export class Executor { } resList = await Promise.all(pList); } else { - //串行 + //串行且报错继续 for (let i = 0; i < runnerList.length; i++) { const runner = runnerList[i]; - resList[i] = await runner(); + try { + resList[i] = await runner(); + } catch (e:any) { + this.logger.error("任务执行异常,继续执行后续任务:", e.message); + resList[i] = ResultType.error; + } } } return this.compositionResultType(resList); diff --git a/packages/plugins/plugin-cert/src/dns-provider/base.ts b/packages/plugins/plugin-cert/src/dns-provider/base.ts index 01519bae..7e3836eb 100644 --- a/packages/plugins/plugin-cert/src/dns-provider/base.ts +++ b/packages/plugins/plugin-cert/src/dns-provider/base.ts @@ -1,4 +1,5 @@ import { CreateRecordOptions, DnsProviderContext, DnsProviderDefine, IDnsProvider, RemoveRecordOptions } from "./api.js"; +//@ts-ignore import psl from "psl"; import { dnsProviderRegistry } from "./registry.js"; import { Decorator } from "@certd/pipeline"; diff --git a/packages/ui/certd-client/src/plugin/antdv-async/index.ts b/packages/ui/certd-client/src/plugin/antdv-async/index.ts index 00013188..20466786 100644 --- a/packages/ui/certd-client/src/plugin/antdv-async/index.ts +++ b/packages/ui/certd-client/src/plugin/antdv-async/index.ts @@ -218,5 +218,9 @@ export default { return m.DescriptionsItem; }) ); + app.component( + "AResult", + defineAsyncComponent(() => import("ant-design-vue/es/result")) + ); } }; diff --git a/packages/ui/certd-client/src/router/source/framework.ts b/packages/ui/certd-client/src/router/source/framework.ts index cd4c57c6..0251cece 100644 --- a/packages/ui/certd-client/src/router/source/framework.ts +++ b/packages/ui/certd-client/src/router/source/framework.ts @@ -3,7 +3,7 @@ import LayoutBasic from "/@/layout/layout-basic.vue"; import type { RouteRecordRaw } from "vue-router"; import { mergeRouteModules } from "/@/vben/utils"; -const dynamicRouteFiles = import.meta.glob("./modules/**/*.ts", { +const dynamicRouteFiles = import.meta.glob("./modules/**/*.ts*", { eager: true }); diff --git a/packages/ui/certd-client/src/router/source/modules/about.ts b/packages/ui/certd-client/src/router/source/modules/about.tsx similarity index 97% rename from packages/ui/certd-client/src/router/source/modules/about.ts rename to packages/ui/certd-client/src/router/source/modules/about.tsx index 6db2c6fa..bd1ddaba 100644 --- a/packages/ui/certd-client/src/router/source/modules/about.ts +++ b/packages/ui/certd-client/src/router/source/modules/about.tsx @@ -1,5 +1,6 @@ import { IFrameView } from "/@/vben/layouts"; import { useSettingStore } from "/@/store/modules/settings"; +import { computed } from "vue"; export const aboutResource = [ { diff --git a/packages/ui/certd-client/src/vben/menu-ui/menu.vue b/packages/ui/certd-client/src/vben/menu-ui/menu.vue index 234b44b2..97964937 100644 --- a/packages/ui/certd-client/src/vben/menu-ui/menu.vue +++ b/packages/ui/certd-client/src/vben/menu-ui/menu.vue @@ -1,23 +1,23 @@ @@ -41,25 +40,18 @@ const hasChildren = computed(() => { :badge-variants="menu.badgeVariants" :icon="menu.icon" :path="menu.path" + @click="menu.meta?.onClick" > + - +