From 6693d1acfb01558b6645880274f36f2a4b0c2fc9 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Wed, 24 Jul 2024 00:42:50 +0800 Subject: [PATCH] chore: --- docker/run/run.sh | 13 ------------- packages/core/pipeline/src/core/executor.ts | 2 +- packages/libs/midway-flyway-js/src/flyway.ts | 2 ++ .../plugin-cert/src/plugin/cert-plugin/lego/dns.ts | 3 +++ .../plugin/cert-plugin/{lego.ts => lego/index.ts} | 8 ++++---- packages/plugins/plugin-cert/src/plugin/index.ts | 2 +- 6 files changed, 11 insertions(+), 19 deletions(-) delete mode 100644 docker/run/run.sh create mode 100644 packages/plugins/plugin-cert/src/plugin/cert-plugin/lego/dns.ts rename packages/plugins/plugin-cert/src/plugin/cert-plugin/{lego.ts => lego/index.ts} (95%) 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/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/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/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..cb670276 --- /dev/null +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/lego/dns.ts @@ -0,0 +1,3 @@ +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 95% 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..8458224f 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"; +import { CertReader } from "../cert-reader"; +import { CertApplyBasePlugin } from "../base"; import fs from "fs"; -import { EabAccess } from "../../access"; +import { EabAccess } from "../../../access"; import path from "path"; export { CertReader }; 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";