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

@@ -267,6 +267,28 @@ export const ShowGeneralApplication = ({ applicationId }: Props) => {
className="flex flex-row gap-2 items-center"
/>
</div>
<div className="flex flex-row items-center gap-2 rounded-md px-4 py-2 border">
<span className="text-sm font-medium">Clean Cache</span>
<Switch
aria-label="Toggle italic"
checked={data?.cleanCache || false}
onCheckedChange={async (enabled) => {
await update({
applicationId,
cleanCache: enabled,
})
.then(async () => {
toast.success("Clean Cache Updated");
await refetch();
})
.catch(() => {
toast.error("Error updating Clean Cache");
});
}}
className="flex flex-row gap-2 items-center"
/>
</div>
</CardContent>
</Card>
<ShowProviderForm applicationId={applicationId} />

View File

@@ -0,0 +1 @@
ALTER TABLE "application" ADD COLUMN "cleanCache" boolean DEFAULT false;

File diff suppressed because it is too large Load Diff

View File

@@ -547,6 +547,13 @@
"when": 1741510086231,
"tag": "0077_chemical_dreadnoughts",
"breakpoints": true
},
{
"idx": 78,
"version": "7",
"when": 1742112194375,
"tag": "0078_uneven_omega_sentinel",
"breakpoints": true
}
]
}