mirror of
https://github.com/certimate-go/certimate.git
synced 2026-09-01 15:39:35 +08:00
feat(provider): new deployment provider: cpanel site
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package deployers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/certimate-go/certimate/internal/domain"
|
||||
"github.com/certimate-go/certimate/pkg/core/deployer"
|
||||
opsite "github.com/certimate-go/certimate/pkg/core/deployer/providers/cpanel-site"
|
||||
xmaps "github.com/certimate-go/certimate/pkg/utils/maps"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Registries.MustRegister(domain.DeploymentProviderTypeCPanelSite, func(options *ProviderFactoryOptions) (deployer.Provider, error) {
|
||||
credentials := domain.AccessConfigForCPanel{}
|
||||
if err := xmaps.Populate(options.ProviderAccessConfig, &credentials); err != nil {
|
||||
return nil, fmt.Errorf("failed to populate provider access config: %w", err)
|
||||
}
|
||||
|
||||
provider, err := opsite.NewDeployer(&opsite.DeployerConfig{
|
||||
ServerUrl: credentials.ServerUrl,
|
||||
Username: credentials.Username,
|
||||
ApiToken: credentials.ApiToken,
|
||||
AllowInsecureConnections: credentials.AllowInsecureConnections,
|
||||
Domain: xmaps.GetString(options.ProviderExtendedConfig, "domain"),
|
||||
})
|
||||
return provider, err
|
||||
})
|
||||
}
|
||||
@@ -285,6 +285,7 @@ const (
|
||||
DeploymentProviderTypeBytePlusCDN = DeploymentProviderType(AccessProviderTypeBytePlus + "-cdn")
|
||||
DeploymentProviderTypeCacheFly = DeploymentProviderType(AccessProviderTypeCacheFly)
|
||||
DeploymentProviderTypeCdnfly = DeploymentProviderType(AccessProviderTypeCdnfly)
|
||||
DeploymentProviderTypeCPanelSite = DeploymentProviderType(AccessProviderTypeCPanel + "-site")
|
||||
DeploymentProviderTypeCTCCCloudAO = DeploymentProviderType(AccessProviderTypeCTCCCloud + "-ao")
|
||||
DeploymentProviderTypeCTCCCloudCDN = DeploymentProviderType(AccessProviderTypeCTCCCloud + "-cdn")
|
||||
DeploymentProviderTypeCTCCCloudCMS = DeploymentProviderType(AccessProviderTypeCTCCCloud + "-cms")
|
||||
|
||||
@@ -32,7 +32,7 @@ type DeployerConfig struct {
|
||||
// 部署资源类型。
|
||||
ResourceType string `json:"resourceType"`
|
||||
// 域名匹配模式。
|
||||
// 零值时默认值 [WEBSITE_MATCH_PATTERN_EXACT]。
|
||||
// 零值时默认值 [WEBSITE_MATCH_PATTERN_SPECIFIED]。
|
||||
WebsiteMatchPattern string `json:"websiteMatchPattern,omitempty"`
|
||||
// 网站 ID。
|
||||
// 部署资源类型为 [RESOURCE_TYPE_WEBSITE]、且匹配模式非 [WEBSITE_MATCH_PATTERN_CERTSAN] 时必填。
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
package cpanelsite
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
|
||||
"github.com/samber/lo"
|
||||
|
||||
"github.com/certimate-go/certimate/pkg/core/deployer"
|
||||
cpanelsdk "github.com/certimate-go/certimate/pkg/sdk3rd/cpanel"
|
||||
xcert "github.com/certimate-go/certimate/pkg/utils/cert"
|
||||
)
|
||||
|
||||
type DeployerConfig struct {
|
||||
// cPanel 服务地址。
|
||||
ServerUrl string `json:"serverUrl"`
|
||||
// cPanel 用户名。
|
||||
Username string `json:"username"`
|
||||
// cPanel 接口密钥。
|
||||
ApiToken string `json:"apiToken"`
|
||||
// 是否允许不安全的连接。
|
||||
AllowInsecureConnections bool `json:"allowInsecureConnections,omitempty"`
|
||||
// 网站域名(不支持泛域名)。
|
||||
Domain string `json:"domain"`
|
||||
}
|
||||
|
||||
type Deployer struct {
|
||||
config *DeployerConfig
|
||||
logger *slog.Logger
|
||||
sdkClient *cpanelsdk.Client
|
||||
}
|
||||
|
||||
var _ deployer.Provider = (*Deployer)(nil)
|
||||
|
||||
func NewDeployer(config *DeployerConfig) (*Deployer, error) {
|
||||
if config == nil {
|
||||
return nil, errors.New("the configuration of the deployer provider is nil")
|
||||
}
|
||||
|
||||
client, err := createSDKClient(config.ServerUrl, config.Username, config.ApiToken, config.AllowInsecureConnections)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not create client: %w", err)
|
||||
}
|
||||
|
||||
return &Deployer{
|
||||
config: config,
|
||||
logger: slog.Default(),
|
||||
sdkClient: client,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (d *Deployer) SetLogger(logger *slog.Logger) {
|
||||
if logger == nil {
|
||||
d.logger = slog.New(slog.DiscardHandler)
|
||||
} else {
|
||||
d.logger = logger
|
||||
}
|
||||
}
|
||||
|
||||
func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*deployer.DeployResult, error) {
|
||||
if d.config.Domain == "" {
|
||||
return nil, errors.New("config `domain` is required")
|
||||
}
|
||||
|
||||
// 提取服务器证书和中间证书
|
||||
serverCertPEM, intermediaCertPEM, err := xcert.ExtractCertificatesFromPEM(certPEM)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to extract certs: %w", err)
|
||||
}
|
||||
|
||||
// 安装 SSL 证书
|
||||
// REF: https://api.docs.cpanel.net/openapi/cpanel/operation/install_ssl/
|
||||
sslInstallSSLReq := &cpanelsdk.SSLInstallSSLRequest{
|
||||
Domain: lo.ToPtr(d.config.Domain),
|
||||
Cert: lo.ToPtr(serverCertPEM),
|
||||
Key: lo.ToPtr(privkeyPEM),
|
||||
CABundle: lo.ToPtr(intermediaCertPEM),
|
||||
}
|
||||
sslInstallSSLResp, err := d.sdkClient.SSLInstallSSL(sslInstallSSLReq)
|
||||
d.logger.Debug("sdk request 'SSL.install_ssl'", slog.Any("request", sslInstallSSLReq), slog.Any("response", sslInstallSSLResp))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to execute sdk request 'SSL.install_ssl': %w", err)
|
||||
}
|
||||
|
||||
return &deployer.DeployResult{}, nil
|
||||
}
|
||||
|
||||
func createSDKClient(serverUrl, username, apiToken string, skipTlsVerify bool) (*cpanelsdk.Client, error) {
|
||||
client, err := cpanelsdk.NewClient(serverUrl, username, apiToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if skipTlsVerify {
|
||||
client.SetTLSConfig(&tls.Config{InsecureSkipVerify: true})
|
||||
}
|
||||
|
||||
return client, nil
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package cpanelsite_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
provider "github.com/certimate-go/certimate/pkg/core/deployer/providers/cpanel-site"
|
||||
)
|
||||
|
||||
var (
|
||||
fInputCertPath string
|
||||
fInputKeyPath string
|
||||
fServerUrl string
|
||||
fUsername string
|
||||
fApiToken string
|
||||
fDomain string
|
||||
)
|
||||
|
||||
func init() {
|
||||
argsPrefix := "CPANELSITE_"
|
||||
|
||||
flag.StringVar(&fInputCertPath, argsPrefix+"INPUTCERTPATH", "", "")
|
||||
flag.StringVar(&fInputKeyPath, argsPrefix+"INPUTKEYPATH", "", "")
|
||||
flag.StringVar(&fServerUrl, argsPrefix+"SERVERURL", "", "")
|
||||
flag.StringVar(&fUsername, argsPrefix+"USERNAME", "", "")
|
||||
flag.StringVar(&fApiToken, argsPrefix+"APITOKEN", "", "")
|
||||
flag.StringVar(&fDomain, argsPrefix+"DOMAIN", "", "")
|
||||
}
|
||||
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v ./cpanel_site_test.go -args \
|
||||
--CPANELSITE_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CPANELSITE_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CPANELSITE_SERVERURL="http://127.0.0.1:2082" \
|
||||
--CPANELSITE_USERNAME="your-username" \
|
||||
--CPANELSITE_APITOKEN="your-api-token" \
|
||||
--CPANELSITE_DOMAIN="example.com"
|
||||
*/
|
||||
func TestDeploy(t *testing.T) {
|
||||
flag.Parse()
|
||||
|
||||
t.Run("Deploy", func(t *testing.T) {
|
||||
t.Log(strings.Join([]string{
|
||||
"args:",
|
||||
fmt.Sprintf("INPUTCERTPATH: %v", fInputCertPath),
|
||||
fmt.Sprintf("INPUTKEYPATH: %v", fInputKeyPath),
|
||||
fmt.Sprintf("SERVERURL: %v", fServerUrl),
|
||||
fmt.Sprintf("USERNAME: %v", fUsername),
|
||||
fmt.Sprintf("APITOKEN: %v", fApiToken),
|
||||
fmt.Sprintf("DOMAIN: %v", fDomain),
|
||||
}, "\n"))
|
||||
|
||||
provider, err := provider.NewDeployer(&provider.DeployerConfig{
|
||||
ServerUrl: fServerUrl,
|
||||
Username: fUsername,
|
||||
ApiToken: fApiToken,
|
||||
AllowInsecureConnections: true,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
|
||||
fInputCertData, _ := os.ReadFile(fInputCertPath)
|
||||
fInputKeyData, _ := os.ReadFile(fInputKeyPath)
|
||||
res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData))
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
|
||||
t.Logf("ok: %v", res)
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package baishan
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
qs "github.com/google/go-querystring/query"
|
||||
)
|
||||
|
||||
type SSLInstallSSLRequest struct {
|
||||
Domain *string `url:"domain,omitempty"`
|
||||
Cert *string `url:"cert,omitempty"`
|
||||
Key *string `url:"key,omitempty"`
|
||||
CABundle *string `url:"cabundle,omitempty"`
|
||||
}
|
||||
|
||||
type SSLInstallSSLResponse struct {
|
||||
apiResponseBase
|
||||
|
||||
Data *struct {
|
||||
User string `json:"user"`
|
||||
Domain string `json:"domain"`
|
||||
ExtraCertificateDomains []string `json:"extra_certificate_domains,omitempty"`
|
||||
WarningDomains []string `json:"warning_domains,omitempty"`
|
||||
WorkingDomains []string `json:"working_domains,omitempty"`
|
||||
CertId string `json:"cert_id"`
|
||||
KeyId string `json:"key_id"`
|
||||
} `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
func (c *Client) SSLInstallSSL(req *SSLInstallSSLRequest) (*SSLInstallSSLResponse, error) {
|
||||
return c.SSLInstallSSLWithContext(context.Background(), req)
|
||||
}
|
||||
|
||||
func (c *Client) SSLInstallSSLWithContext(ctx context.Context, req *SSLInstallSSLRequest) (*SSLInstallSSLResponse, error) {
|
||||
httpreq, err := c.newRequest(http.MethodGet, "/SSL/install_ssl")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
values, err := qs.Values(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpreq.SetQueryParamsFromValues(values)
|
||||
httpreq.SetContext(ctx)
|
||||
}
|
||||
|
||||
result := &SSLInstallSSLResponse{}
|
||||
if _, err := c.doRequestWithResult(httpreq, result); err != nil {
|
||||
return result, err
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package baishan
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-resty/resty/v2"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
client *resty.Client
|
||||
}
|
||||
|
||||
func NewClient(serverUrl string, username, apiToken string) (*Client, error) {
|
||||
if serverUrl == "" {
|
||||
return nil, fmt.Errorf("sdkerr: unset serverUrl")
|
||||
}
|
||||
if _, err := url.Parse(serverUrl); err != nil {
|
||||
return nil, fmt.Errorf("sdkerr: invalid serverUrl: %w", err)
|
||||
}
|
||||
if username == "" {
|
||||
return nil, fmt.Errorf("sdkerr: unset username")
|
||||
}
|
||||
if apiToken == "" {
|
||||
return nil, fmt.Errorf("sdkerr: unset apiToken")
|
||||
}
|
||||
|
||||
client := resty.New().
|
||||
SetBaseURL(strings.TrimRight(serverUrl, "/")+"/execute").
|
||||
SetHeader("Accept", "application/json").
|
||||
SetHeader("Authorization", fmt.Sprintf("cpanel %s:%s", username, apiToken)).
|
||||
SetHeader("User-Agent", "certimate")
|
||||
|
||||
return &Client{client}, nil
|
||||
}
|
||||
|
||||
func (c *Client) SetTimeout(timeout time.Duration) *Client {
|
||||
c.client.SetTimeout(timeout)
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *Client) SetTLSConfig(config *tls.Config) *Client {
|
||||
c.client.SetTLSClientConfig(config)
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *Client) newRequest(method string, path string) (*resty.Request, error) {
|
||||
if method == "" {
|
||||
return nil, fmt.Errorf("sdkerr: unset method")
|
||||
}
|
||||
if path == "" {
|
||||
return nil, fmt.Errorf("sdkerr: unset path")
|
||||
}
|
||||
|
||||
req := c.client.R()
|
||||
req.Method = method
|
||||
req.URL = path
|
||||
return req, nil
|
||||
}
|
||||
|
||||
func (c *Client) doRequest(req *resty.Request) (*resty.Response, error) {
|
||||
if req == nil {
|
||||
return nil, fmt.Errorf("sdkerr: nil request")
|
||||
}
|
||||
|
||||
// WARN:
|
||||
// PLEASE DO NOT USE `req.SetResult` or `req.SetError` HERE! USE `doRequestWithResult` INSTEAD.
|
||||
|
||||
resp, err := req.Send()
|
||||
if err != nil {
|
||||
return resp, fmt.Errorf("sdkerr: failed to send request: %w", err)
|
||||
} else if resp.IsError() {
|
||||
return resp, fmt.Errorf("sdkerr: unexpected status code: %d, resp: %s", resp.StatusCode(), resp.String())
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *Client) doRequestWithResult(req *resty.Request, res apiResponse) (*resty.Response, error) {
|
||||
if req == nil {
|
||||
return nil, fmt.Errorf("sdkerr: nil request")
|
||||
}
|
||||
|
||||
resp, err := c.doRequest(req)
|
||||
if err != nil {
|
||||
if resp != nil {
|
||||
json.Unmarshal(resp.Body(), &res)
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
if len(resp.Body()) != 0 {
|
||||
if err := json.Unmarshal(resp.Body(), &res); err != nil {
|
||||
return resp, fmt.Errorf("sdkerr: failed to unmarshal response: %w", err)
|
||||
} else {
|
||||
if tstatus := res.GetStatus(); tstatus == 0 {
|
||||
return resp, fmt.Errorf("sdkerr: status='%d', messages='%s', warnings='%s', errors='%s'", tstatus, strings.Join(res.GetMessages(), ", "), strings.Join(res.GetWarnings(), ", "), strings.Join(res.GetErrors(), ", "))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package baishan
|
||||
|
||||
type apiResponse interface {
|
||||
GetStatus() int
|
||||
GetMessages() []string
|
||||
GetWarnings() []string
|
||||
GetErrors() []string
|
||||
}
|
||||
|
||||
type apiResponseBase struct {
|
||||
Metadata struct {
|
||||
Transformed int `json:"transformed,omitempty"`
|
||||
} `json:"metadata"`
|
||||
Status int `json:"status,omitempty"`
|
||||
Messages []string `json:"messages,omitempty"`
|
||||
Warnings []string `json:"warnings,omitempty"`
|
||||
Errors []string `json:"errors,omitempty"`
|
||||
}
|
||||
|
||||
func (r *apiResponseBase) GetStatus() int {
|
||||
return r.Status
|
||||
}
|
||||
|
||||
func (r *apiResponseBase) GetMessages() []string {
|
||||
return r.Messages
|
||||
}
|
||||
|
||||
func (r *apiResponseBase) GetWarnings() []string {
|
||||
return r.Warnings
|
||||
}
|
||||
|
||||
func (r *apiResponseBase) GetErrors() []string {
|
||||
return r.Errors
|
||||
}
|
||||
|
||||
var _ apiResponse = (*apiResponseBase)(nil)
|
||||
@@ -37,6 +37,7 @@ import BizDeployNodeConfigFieldsProviderBaotaWAFSite from "./BizDeployNodeConfig
|
||||
import BizDeployNodeConfigFieldsProviderBunnyCDN from "./BizDeployNodeConfigFieldsProviderBunnyCDN";
|
||||
import BizDeployNodeConfigFieldsProviderBytePlusCDN from "./BizDeployNodeConfigFieldsProviderBytePlusCDN";
|
||||
import BizDeployNodeConfigFieldsProviderCdnfly from "./BizDeployNodeConfigFieldsProviderCdnfly";
|
||||
import BizDeployNodeConfigFieldsProviderCPanelSite from "./BizDeployNodeConfigFieldsProviderCPanelSite";
|
||||
import BizDeployNodeConfigFieldsProviderCTCCCloudAO from "./BizDeployNodeConfigFieldsProviderCTCCCloudAO";
|
||||
import BizDeployNodeConfigFieldsProviderCTCCCloudCDN from "./BizDeployNodeConfigFieldsProviderCTCCCloudCDN";
|
||||
import BizDeployNodeConfigFieldsProviderCTCCCloudELB from "./BizDeployNodeConfigFieldsProviderCTCCCloudELB";
|
||||
@@ -140,6 +141,7 @@ const providerComponentMap: Partial<Record<DeploymentProviderType, React.Compone
|
||||
[DEPLOYMENT_PROVIDERS.BUNNY_CDN]: BizDeployNodeConfigFieldsProviderBunnyCDN,
|
||||
[DEPLOYMENT_PROVIDERS.BYTEPLUS_CDN]: BizDeployNodeConfigFieldsProviderBytePlusCDN,
|
||||
[DEPLOYMENT_PROVIDERS.CDNFLY]: BizDeployNodeConfigFieldsProviderCdnfly,
|
||||
[DEPLOYMENT_PROVIDERS.CPANEL_SITE]: BizDeployNodeConfigFieldsProviderCPanelSite,
|
||||
[DEPLOYMENT_PROVIDERS.CTCCCLOUD_AO]: BizDeployNodeConfigFieldsProviderCTCCCloudAO,
|
||||
[DEPLOYMENT_PROVIDERS.CTCCCLOUD_CDN]: BizDeployNodeConfigFieldsProviderCTCCCloudCDN,
|
||||
[DEPLOYMENT_PROVIDERS.CTCCCLOUD_ELB]: BizDeployNodeConfigFieldsProviderCTCCCloudELB,
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
import { getI18n, useTranslation } from "react-i18next";
|
||||
import { Form, Input } from "antd";
|
||||
import { createSchemaFieldRule } from "antd-zod";
|
||||
import { z } from "zod";
|
||||
|
||||
import { useFormNestedFieldsContext } from "./_context";
|
||||
|
||||
const BizDeployNodeConfigFieldsProviderCPanelSite = () => {
|
||||
const { i18n, t } = useTranslation();
|
||||
|
||||
const { parentNamePath } = useFormNestedFieldsContext();
|
||||
const formSchema = z.object({
|
||||
[parentNamePath]: getSchema({ i18n }),
|
||||
});
|
||||
const formRule = createSchemaFieldRule(formSchema);
|
||||
const initialValues = getInitialValues();
|
||||
|
||||
return (
|
||||
<>
|
||||
<Form.Item
|
||||
name={[parentNamePath, "domain"]}
|
||||
initialValue={initialValues.domain}
|
||||
label={t("workflow_node.deploy.form.cpanel_site_domain.label")}
|
||||
rules={[formRule]}
|
||||
>
|
||||
<Input placeholder={t("workflow_node.deploy.form.cpanel_site_domain.placeholder")} />
|
||||
</Form.Item>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
const getInitialValues = (): Nullish<z.infer<ReturnType<typeof getSchema>>> => {
|
||||
return {
|
||||
domain: "",
|
||||
};
|
||||
};
|
||||
|
||||
const getSchema = ({ i18n = getI18n() }: { i18n?: ReturnType<typeof getI18n> }) => {
|
||||
const { t } = i18n;
|
||||
|
||||
return z.object({
|
||||
domain: z.string().nonempty(t("workflow_node.deploy.form.cpanel_site_domain.placeholder")),
|
||||
});
|
||||
};
|
||||
|
||||
const _default = Object.assign(BizDeployNodeConfigFieldsProviderCPanelSite, {
|
||||
getInitialValues,
|
||||
getSchema,
|
||||
});
|
||||
|
||||
export default _default;
|
||||
@@ -564,6 +564,7 @@ export const DEPLOYMENT_PROVIDERS = Object.freeze({
|
||||
BYTEPLUS_CDN: `${ACCESS_PROVIDERS.BYTEPLUS}-cdn`,
|
||||
CACHEFLY: `${ACCESS_PROVIDERS.CACHEFLY}`,
|
||||
CDNFLY: `${ACCESS_PROVIDERS.CDNFLY}`,
|
||||
CPANEL_SITE: `${ACCESS_PROVIDERS.CPANEL}-site`,
|
||||
CTCCCLOUD_AO: `${ACCESS_PROVIDERS.CTCCCLOUD}-ao`,
|
||||
CTCCCLOUD_CDN: `${ACCESS_PROVIDERS.CTCCCLOUD}-cdn`,
|
||||
CTCCCLOUD_CMS: `${ACCESS_PROVIDERS.CTCCCLOUD}-cms`,
|
||||
@@ -763,6 +764,7 @@ export const deploymentProvidersMap: Map<DeploymentProvider["type"] | string, De
|
||||
[DEPLOYMENT_PROVIDERS.SAFELINE_SITE, "provider.safeline_site", DEPLOYMENT_CATEGORIES.FIREWALL],
|
||||
[DEPLOYMENT_PROVIDERS.APISIX, "provider.apisix", DEPLOYMENT_CATEGORIES.APIGATEWAY],
|
||||
[DEPLOYMENT_PROVIDERS.KONG, "provider.kong", DEPLOYMENT_CATEGORIES.APIGATEWAY],
|
||||
[DEPLOYMENT_PROVIDERS.CPANEL_SITE, "provider.cpanel_site", DEPLOYMENT_CATEGORIES.WEBSITE],
|
||||
[DEPLOYMENT_PROVIDERS.PROXMOXVE, "provider.proxmoxve", DEPLOYMENT_CATEGORIES.OTHER],
|
||||
] satisfies Array<[DeploymentProviderType, string, DeploymentCategoryType, "builtin"] | [DeploymentProviderType, string, DeploymentCategoryType]>
|
||||
).map(([type, name, category, builtin]) => [
|
||||
|
||||
@@ -488,12 +488,14 @@
|
||||
"workflow_node.deploy.form.byteplus_cdn_domain.placeholder": "Please enter BytePlus CDN domain name",
|
||||
"workflow_node.deploy.form.cdnfly_resource_type.option.site.label": "Site",
|
||||
"workflow_node.deploy.form.cdnfly_resource_type.option.certificate.label": "Certificate",
|
||||
"workflow_node.deploy.form.cdnfly_site_id.label": "Cdnfly site ID",
|
||||
"workflow_node.deploy.form.cdnfly_site_id.placeholder": "Please enter Cdnfly site ID",
|
||||
"workflow_node.deploy.form.cdnfly_site_id.label": "Cdnfly website ID",
|
||||
"workflow_node.deploy.form.cdnfly_site_id.placeholder": "Please enter Cdnfly website ID",
|
||||
"workflow_node.deploy.form.cdnfly_site_id.tooltip": "You can find it on Cdnfly dashboard.",
|
||||
"workflow_node.deploy.form.cdnfly_certificate_id.label": "Cdnfly certificate ID",
|
||||
"workflow_node.deploy.form.cdnfly_certificate_id.placeholder": "Please enter Cdnfly certificate ID",
|
||||
"workflow_node.deploy.form.cdnfly_certificate_id.tooltip": "You can find it on Cdnfly dashboard.",
|
||||
"workflow_node.deploy.form.cpanel_site_domain.label": "cPanel website domain",
|
||||
"workflow_node.deploy.form.cpanel_site_domain.placeholder": "Please enter cPanel website domain",
|
||||
"workflow_node.deploy.form.ctcccloud_ao_domain.label": "CTCC StateCloud AccessOne domain",
|
||||
"workflow_node.deploy.form.ctcccloud_ao_domain.placeholder": "Please enter CTCC StateCloud AccessOne domain name",
|
||||
"workflow_node.deploy.form.ctcccloud_cdn_domain.label": "CTCC StateCloud CDN domain",
|
||||
@@ -688,8 +690,8 @@
|
||||
"workflow_node.deploy.form.mohua_mvh_domain_id.label": "Mohua Cloud virtual host domain ID",
|
||||
"workflow_node.deploy.form.mohua_mvh_domain_id.placeholder": "Please enter Mohua Cloud virtual host domain ID",
|
||||
"workflow_node.deploy.form.mohua_mvh_domain_id.tooltip": "For more information, see <a href=\"https://cloud.mhjz1.cn/service?groupid=328&language=english\" target=\"_blank\">https://cloud.mhjz1.cn/service?groupid=328&language=english</a>",
|
||||
"workflow_node.deploy.form.netlify_site_id.label": "Netlify site ID",
|
||||
"workflow_node.deploy.form.netlify_site_id.placeholder": "Please enter Netlify site ID",
|
||||
"workflow_node.deploy.form.netlify_site_id.label": "Netlify website ID",
|
||||
"workflow_node.deploy.form.netlify_site_id.placeholder": "Please enter Netlify website ID",
|
||||
"workflow_node.deploy.form.netlify_site_id.tooltip": "For more information, see <a href=\"https://docs.netlify.com/api/get-started/#get-site\" target=\"_blank\">https://docs.netlify.com/api/get-started/#get-site</a>",
|
||||
"workflow_node.deploy.form.proxmoxve_node_name.label": "Proxmox VE cluster node name",
|
||||
"workflow_node.deploy.form.proxmoxve_node_name.placeholder": "Please enter Proxmox VE cluster node name",
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
"provider.namesilo": "NameSilo",
|
||||
"provider.netcup": "netcup",
|
||||
"provider.netlify": "Netlify",
|
||||
"provider.netlify_site": "Netlify - Site",
|
||||
"provider.netlify_site": "Netlify - 网站",
|
||||
"provider.ns1": "NS1 (IBM NS1 Connect)",
|
||||
"provider.ovhcloud": "OVHcloud",
|
||||
"provider.porkbun": "Porkbun",
|
||||
|
||||
@@ -493,6 +493,8 @@
|
||||
"workflow_node.deploy.form.cdnfly_certificate_id.label": "Cdnfly 证书 ID",
|
||||
"workflow_node.deploy.form.cdnfly_certificate_id.placeholder": "请输入 Cdnfly 证书 ID",
|
||||
"workflow_node.deploy.form.cdnfly_certificate_id.tooltip": "请登录 Cdnfly 控制台查看",
|
||||
"workflow_node.deploy.form.cpanel_site_domain.label": "cPanel 网站域名",
|
||||
"workflow_node.deploy.form.cpanel_site_domain.placeholder": "请输入 cPanel 网站域名",
|
||||
"workflow_node.deploy.form.ctcccloud_ao_domain.label": "天翼云 AccessOne 加速域名",
|
||||
"workflow_node.deploy.form.ctcccloud_ao_domain.placeholder": "请输入天翼云 AccessOne 加速域名",
|
||||
"workflow_node.deploy.form.ctcccloud_cdn_domain.label": "天翼云 CDN 加速域名",
|
||||
|
||||
Reference in New Issue
Block a user