perf: 支持plesk网站证书部署

pull/330/head
xiaojunnuo 2024-12-18 00:38:27 +08:00
parent 53c38cf714
commit eda45c1528
4 changed files with 10 additions and 3 deletions

View File

@ -37,6 +37,8 @@ function buildGroupOptions(options: any[], inDomains: string[]) {
} }
export const optionsUtils = { export const optionsUtils = {
//获取分组
groupByDomain, groupByDomain,
//构建分组后的选项列表,常用
buildGroupOptions, buildGroupOptions,
}; };

View File

@ -156,13 +156,13 @@ export function createAxiosService({ logger }: { logger: Logger }) {
error.message = '请求错误'; error.message = '请求错误';
break; break;
case 401: case 401:
error.message = '未授权,请登录'; error.message = '认证/登录失败';
break; break;
case 403: case 403:
error.message = '拒绝访问'; error.message = '拒绝访问';
break; break;
case 404: case 404:
error.message = `请求地址出错: ${error.response.config.url}`; error.message = `请求地址出错`;
break; break;
case 408: case 408:
error.message = '请求超时'; error.message = '请求超时';
@ -216,6 +216,7 @@ export type HttpRequestConfig<D = any> = {
logParams?: boolean; logParams?: boolean;
logRes?: boolean; logRes?: boolean;
httpProxy?: string; httpProxy?: string;
returnResponse?: boolean;
} & AxiosRequestConfig<D>; } & AxiosRequestConfig<D>;
export type HttpClient = { export type HttpClient = {
request<D = any, R = any>(config: HttpRequestConfig<D>): Promise<HttpClientResponse<R>>; request<D = any, R = any>(config: HttpRequestConfig<D>): Promise<HttpClientResponse<R>>;

View File

@ -385,7 +385,7 @@ export class Executor {
content = `流水线ID:${this.pipeline.id}运行ID:${this.runtime.id}`; content = `流水线ID:${this.pipeline.id}运行ID:${this.runtime.id}`;
} else if (when === "error") { } else if (when === "error") {
subject = `执行失败,${this.pipeline.title}${this.pipeline.id}`; subject = `执行失败,${this.pipeline.title}${this.pipeline.id}`;
content = `流水线ID:${this.pipeline.id}运行ID:${this.runtime.id}\n错误详情:${error.message}`; content = `流水线ID:${this.pipeline.id}运行ID:${this.runtime.id}\n\n${this.currentStatusMap?.currentStep?.title} 执行失败\n\n错误详情:${error.message}`;
} else { } else {
return; return;
} }

View File

@ -134,6 +134,7 @@ export class RunHistory {
export class RunnableCollection { export class RunnableCollection {
private collection: RunnableMap = {}; private collection: RunnableMap = {};
private pipeline!: Pipeline; private pipeline!: Pipeline;
currentStep!: Step;
constructor(pipeline?: Pipeline) { constructor(pipeline?: Pipeline) {
if (!pipeline) { if (!pipeline) {
return; return;
@ -193,5 +194,8 @@ export class RunnableCollection {
add(runnable: Runnable) { add(runnable: Runnable) {
this.collection[runnable.id] = runnable; this.collection[runnable.id] = runnable;
if (runnable.runnableType === "step") {
this.currentStep = runnable as Step;
}
} }
} }