[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot]
2025-10-25 07:11:54 +00:00
committed by GitHub
parent 84d311802f
commit 90bd276ad4
7 changed files with 23 additions and 12 deletions
@@ -7,7 +7,7 @@ describe("createDomainLabels", () => {
const baseDomain: Domain = { const baseDomain: Domain = {
host: "example.com", host: "example.com",
port: 8080, port: 8080,
customEntrypoint: null, customEntrypoint: null,
https: false, https: false,
uniqueConfigKey: 1, uniqueConfigKey: 1,
customCertResolver: null, customCertResolver: null,
@@ -272,7 +272,7 @@ describe("createDomainLabels", () => {
"traefik.http.routers.test-app-1-custom.entrypoints=custom", "traefik.http.routers.test-app-1-custom.entrypoints=custom",
"traefik.http.services.test-app-1-custom.loadbalancer.server.port=8080", "traefik.http.services.test-app-1-custom.loadbalancer.server.port=8080",
"traefik.http.routers.test-app-1-custom.service=test-app-1-custom", "traefik.http.routers.test-app-1-custom.service=test-app-1-custom",
"traefik.http.routers.test-app-1-custom.tls.certresolver=letsencrypt", "traefik.http.routers.test-app-1-custom.tls.certresolver=letsencrypt",
]); ]);
}); });
}); });
@@ -123,7 +123,7 @@ const baseDomain: Domain = {
https: false, https: false,
path: null, path: null,
port: null, port: null,
customEntrypoint: null, customEntrypoint: null,
serviceName: "", serviceName: "",
composeId: "", composeId: "",
customCertResolver: null, customCertResolver: null,
@@ -281,7 +281,7 @@ export const ImpersonationBar = () => {
<div className="flex items-center gap-4 flex-1 flex-wrap"> <div className="flex items-center gap-4 flex-1 flex-wrap">
<Avatar className="h-10 w-10"> <Avatar className="h-10 w-10">
<AvatarImage <AvatarImage
className="object-cover" className="object-cover"
src={data?.user?.image || ""} src={data?.user?.image || ""}
alt={data?.user?.name || ""} alt={data?.user?.name || ""}
/> />
+1 -1
View File
@@ -44,7 +44,7 @@ export const UserNav = () => {
> >
<Avatar className="h-8 w-8 rounded-lg"> <Avatar className="h-8 w-8 rounded-lg">
<AvatarImage <AvatarImage
className="object-cover" className="object-cover"
src={data?.user?.image || ""} src={data?.user?.image || ""}
alt={data?.user?.image || ""} alt={data?.user?.image || ""}
/> />
+3 -3
View File
@@ -31,7 +31,7 @@ export const domains = pgTable("domain", {
host: text("host").notNull(), host: text("host").notNull(),
https: boolean("https").notNull().default(false), https: boolean("https").notNull().default(false),
port: integer("port").default(3000), port: integer("port").default(3000),
customEntrypoint: text("customEntrypoint"), customEntrypoint: text("customEntrypoint"),
path: text("path").default("/"), path: text("path").default("/"),
serviceName: text("serviceName"), serviceName: text("serviceName"),
domainType: domainType("domainType").default("application"), domainType: domainType("domainType").default("application"),
@@ -77,7 +77,7 @@ export const apiCreateDomain = createSchema.pick({
host: true, host: true,
path: true, path: true,
port: true, port: true,
customEntrypoint: true, customEntrypoint: true,
https: true, https: true,
applicationId: true, applicationId: true,
certificateType: true, certificateType: true,
@@ -113,7 +113,7 @@ export const apiUpdateDomain = createSchema
host: true, host: true,
path: true, path: true,
port: true, port: true,
customEntrypoint: true, customEntrypoint: true,
https: true, https: true,
certificateType: true, certificateType: true,
customCertResolver: true, customCertResolver: true,
+6 -2
View File
@@ -220,7 +220,11 @@ export const addDomainToCompose = async (
throw new Error(`The service ${serviceName} not found in the compose`); throw new Error(`The service ${serviceName} not found in the compose`);
} }
const httpLabels = createDomainLabels(appName, domain, domain.customEntrypoint || "web"); const httpLabels = createDomainLabels(
appName,
domain,
domain.customEntrypoint || "web",
);
if (domain.customEntrypoint == null && https) { if (domain.customEntrypoint == null && https) {
const httpsLabels = createDomainLabels(appName, domain, "websecure"); const httpsLabels = createDomainLabels(appName, domain, "websecure");
httpLabels.push(...httpsLabels); httpLabels.push(...httpsLabels);
@@ -304,7 +308,7 @@ export const createDomainLabels = (
const { const {
host, host,
port, port,
customEntrypoint, customEntrypoint,
https, https,
uniqueConfigKey, uniqueConfigKey,
certificateType, certificateType,
+9 -2
View File
@@ -112,8 +112,15 @@ export const createRouterConfig = async (
const { appName, redirects, security } = app; const { appName, redirects, security } = app;
const { certificateType } = domain; const { certificateType } = domain;
const { host, path, https, uniqueConfigKey, internalPath, stripPath, customEntrypoint } = const {
domain; host,
path,
https,
uniqueConfigKey,
internalPath,
stripPath,
customEntrypoint,
} = domain;
const routerConfig: HttpRouter = { const routerConfig: HttpRouter = {
rule: `Host(\`${host}\`)${path !== null && path !== "/" ? ` && PathPrefix(\`${path}\`)` : ""}`, rule: `Host(\`${host}\`)${path !== null && path !== "/" ? ` && PathPrefix(\`${path}\`)` : ""}`,
service: `${appName}-service-${uniqueConfigKey}`, service: `${appName}-service-${uniqueConfigKey}`,