feat(application): add cleanCache feature to application management

- Introduced a new boolean column `cleanCache` in the application schema to manage cache cleaning behavior.
- Updated the application form to include a toggle for `cleanCache`, allowing users to enable or disable cache cleaning.
- Enhanced application deployment logic to utilize the `cleanCache` setting, affecting build commands across various builders (Docker, Heroku, Nixpacks, Paketo, Railpack).
- Implemented success and error notifications for cache updates in the UI.
This commit is contained in:
Mauricio Siu
2025-03-16 03:20:47 -06:00
parent 9ac68985e0
commit 40718293a1
13 changed files with 5286 additions and 61 deletions

View File

@@ -141,6 +141,7 @@ export const applications = pgTable("application", {
command: text("command"),
refreshToken: text("refreshToken").$defaultFn(() => nanoid()),
sourceType: sourceType("sourceType").notNull().default("github"),
cleanCache: boolean("cleanCache").default(false),
// Github
repository: text("repository"),
owner: text("owner"),
@@ -408,6 +409,7 @@ const createSchema = createInsertSchema(applications, {
previewPath: z.string().optional(),
previewCertificateType: z.enum(["letsencrypt", "none", "custom"]).optional(),
watchPaths: z.array(z.string()).optional(),
cleanCache: z.boolean().optional(),
});
export const apiCreateApplication = createSchema.pick({

View File

@@ -159,6 +159,7 @@ table application {
command text
refreshToken text
sourceType sourceType [not null, default: 'github']
cleanCache boolean [default: false]
repository text
owner text
branch text