From d1c4ac20e3ccdf561c1ce38df5c395f1794c05bb Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Thu, 5 Mar 2026 10:48:47 -0600 Subject: [PATCH] feat: add enableSubmodules and update watchPaths in application schema --- packages/server/src/db/schema/application.ts | 25 ++++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/packages/server/src/db/schema/application.ts b/packages/server/src/db/schema/application.ts index a639d1742..c469ac788 100644 --- a/packages/server/src/db/schema/application.ts +++ b/packages/server/src/db/schema/application.ts @@ -365,12 +365,13 @@ const createSchema = createInsertSchema(applications, { previewPath: z.string().optional(), previewCertificateType: z.enum(["letsencrypt", "none", "custom"]).optional(), previewRequireCollaboratorPermissions: z.boolean().optional(), - watchPaths: z.array(z.string()).optional(), + watchPaths: z.array(z.string()).optional().optional(), previewLabels: z.array(z.string()).optional(), cleanCache: z.boolean().optional(), stopGracePeriodSwarm: z.bigint().nullable(), endpointSpecSwarm: EndpointSpecSwarmSchema.nullable(), ulimitsSwarm: UlimitsSwarmSchema.nullable(), + enableSubmodules: z.boolean().optional(), }); export const apiCreateApplication = createSchema.pick({ @@ -433,13 +434,13 @@ export const apiSaveGithubProvider = createSchema owner: true, buildPath: true, githubId: true, - watchPaths: true, - enableSubmodules: true, }) .required() .extend({ triggerType: z.enum(["push", "tag"]).default("push"), - }); + }) + .required() + .merge(createSchema.pick({ enableSubmodules: true, watchPaths: true })); export const apiSaveGitlabProvider = createSchema .pick({ @@ -451,10 +452,9 @@ export const apiSaveGitlabProvider = createSchema gitlabId: true, gitlabProjectId: true, gitlabPathNamespace: true, - watchPaths: true, - enableSubmodules: true, }) - .required(); + .required() + .merge(createSchema.pick({ enableSubmodules: true, watchPaths: true })); export const apiSaveBitbucketProvider = createSchema .pick({ @@ -465,10 +465,9 @@ export const apiSaveBitbucketProvider = createSchema bitbucketRepositorySlug: true, bitbucketId: true, applicationId: true, - watchPaths: true, - enableSubmodules: true, }) - .required(); + .required() + .merge(createSchema.pick({ enableSubmodules: true, watchPaths: true })); export const apiSaveGiteaProvider = createSchema .pick({ @@ -478,10 +477,9 @@ export const apiSaveGiteaProvider = createSchema giteaOwner: true, giteaRepository: true, giteaId: true, - watchPaths: true, - enableSubmodules: true, }) - .required(); + .required() + .merge(createSchema.pick({ enableSubmodules: true, watchPaths: true })); export const apiSaveDockerProvider = createSchema .pick({ @@ -506,6 +504,7 @@ export const apiSaveGitProvider = createSchema .merge( createSchema.pick({ customGitSSHKeyId: true, + enableSubmodules: true, }), );