feat: support configuring independent ca in workflows

This commit is contained in:
Fu Diwei
2025-03-30 13:09:18 +08:00
parent deb3b2f412
commit 6ad0d8e42f
23 changed files with 496 additions and 186 deletions

View File

@@ -140,7 +140,47 @@ export const accessProvidersMap: Map<AccessProvider["type"] | string, AccessProv
);
// #endregion
// #region ApplyProvider
// #region ApplyCAProvider
/*
注意:如果追加新的常量值,请保持以 ASCII 排序。
NOTICE: If you add new constant, please keep ASCII order.
*/
export const APPLY_CA_PROVIDERS = Object.freeze({
GOOGLETRUSTSERVICES: `${ACCESS_PROVIDERS.GOOGLETRUSTSERVICES}`,
LETSENCRYPT: `${ACCESS_PROVIDERS.LETSENCRYPT}`,
LETSENCRYPTSTAGING: `${ACCESS_PROVIDERS.LETSENCRYPTSTAGING}`,
ZEROSSL: `${ACCESS_PROVIDERS.ZEROSSL}`,
} as const);
export type ApplyCAProviderType = (typeof APPLY_CA_PROVIDERS)[keyof typeof APPLY_CA_PROVIDERS];
export type ApplyCAProvider = {
type: ApplyCAProviderType;
name: string;
icon: string;
provider: AccessProviderType;
};
export const applyCAProvidersMap: Map<ApplyCAProvider["type"] | string, ApplyCAProvider> = new Map(
/*
注意:此处的顺序决定显示在前端的顺序。
NOTICE: The following order determines the order displayed at the frontend.
*/
[[APPLY_CA_PROVIDERS.LETSENCRYPT], [APPLY_CA_PROVIDERS.LETSENCRYPTSTAGING], [APPLY_CA_PROVIDERS.ZEROSSL], [APPLY_CA_PROVIDERS.GOOGLETRUSTSERVICES]].map(
([type]) => [
type,
{
type: type as ApplyCAProviderType,
name: accessProvidersMap.get(type.split("-")[0])!.name,
icon: accessProvidersMap.get(type.split("-")[0])!.icon,
provider: type.split("-")[0] as AccessProviderType,
},
]
)
);
// #endregion
// #region ApplyDNSProvider
/*
注意:如果追加新的常量值,请保持以 ASCII 排序。
NOTICE: If you add new constant, please keep ASCII order.

View File

@@ -126,6 +126,9 @@ export type WorkflowNodeConfigForApply = {
provider: string;
providerAccessId: string;
providerConfig?: Record<string, unknown>;
caProvider?: string;
caProviderAccessId?: string;
caProviderConfig?: Record<string, unknown>;
keyAlgorithm: string;
nameservers?: string;
dnsPropagationTimeout?: number;