mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-09-14 11:06:15 +05:00
[autofix.ci] apply automated fixes
This commit is contained in:
parent
623ed062bb
commit
9b9dd984b8
@ -212,7 +212,10 @@ describe("keepLatestNBackups", () => {
|
||||
expect(consoleErrorSpy).not.toHaveBeenCalled();
|
||||
|
||||
try {
|
||||
return readFileSync(deletedFile, "utf-8").trim().split("\n").filter(Boolean);
|
||||
return readFileSync(deletedFile, "utf-8")
|
||||
.trim()
|
||||
.split("\n")
|
||||
.filter(Boolean);
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
@ -273,9 +276,7 @@ describe("keepLatestNBackups", () => {
|
||||
|
||||
test("deletes the chronologically oldest backups, not the lexicographically last ones", async () => {
|
||||
const deleted = await runKeepLatestNBackups(2, lsfLines);
|
||||
const deletedFilenames = deleted.map(
|
||||
(path) => path.split("/").at(-1),
|
||||
);
|
||||
const deletedFilenames = deleted.map((path) => path.split("/").at(-1));
|
||||
|
||||
// A naive filename-only sort would have kept the two files whose names
|
||||
// sort last ("dokploy-local-...-03-30" and "dokploy-local-...-03-28")
|
||||
|
||||
@ -407,13 +407,8 @@ export const RestoreBackup = ({
|
||||
<FormLabel className="flex items-center justify-between gap-2">
|
||||
<span className="shrink-0">Search Backup Files</span>
|
||||
{field.value && (
|
||||
<Badge
|
||||
variant="outline"
|
||||
className="min-w-0 max-w-[70%]"
|
||||
>
|
||||
<span className="min-w-0 truncate">
|
||||
{field.value}
|
||||
</span>
|
||||
<Badge variant="outline" className="min-w-0 max-w-[70%]">
|
||||
<span className="min-w-0 truncate">{field.value}</span>
|
||||
<Copy
|
||||
className="ml-2 size-4 cursor-pointer"
|
||||
onClick={(e) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user