chore: fix linting issues
This commit is contained in:
parent
b70c7f39e6
commit
25b5d98a3e
36 changed files with 2802 additions and 2890 deletions
|
|
@ -141,19 +141,17 @@ export const CreateVolumeForm = ({ onSubmit, mode = "create", initialValues, for
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="path"
|
name="path"
|
||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
const [showBrowser, setShowBrowser] = useState(!field.value || field.value === "/");
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Directory Path</FormLabel>
|
<FormLabel>Directory Path</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
{!showBrowser && field.value ? (
|
{field.value ? (
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<div className="flex-1 border rounded-md p-3 bg-muted/50">
|
<div className="flex-1 border rounded-md p-3 bg-muted/50">
|
||||||
<div className="text-xs font-medium text-muted-foreground mb-1">Selected path:</div>
|
<div className="text-xs font-medium text-muted-foreground mb-1">Selected path:</div>
|
||||||
<div className="text-sm font-mono break-all">{field.value}</div>
|
<div className="text-sm font-mono break-all">{field.value}</div>
|
||||||
</div>
|
</div>
|
||||||
<Button type="button" variant="outline" size="sm" onClick={() => setShowBrowser(true)}>
|
<Button type="button" variant="outline" size="sm" onClick={() => field.onChange("")}>
|
||||||
Change
|
Change
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -38,10 +38,7 @@ export const StatusDot = ({ status }: { status: VolumeStatus }) => {
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<span
|
<span className={cn("relative inline-flex size-3 rounded-full", `${statusMapping.color}`)} />
|
||||||
aria-label={status}
|
|
||||||
className={cn("relative inline-flex size-3 rounded-full", `${statusMapping.color}`)}
|
|
||||||
/>
|
|
||||||
</span>
|
</span>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import * as React from "react";
|
import type * as React from "react";
|
||||||
import { Slot } from "@radix-ui/react-slot";
|
import { Slot } from "@radix-ui/react-slot";
|
||||||
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import * as React from "react";
|
import type * as React from "react";
|
||||||
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
||||||
import { CheckIcon } from "lucide-react";
|
import { CheckIcon } from "lucide-react";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import * as React from "react";
|
import type * as React from "react";
|
||||||
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
||||||
import { XIcon } from "lucide-react";
|
import { XIcon } from "lucide-react";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import * as LabelPrimitive from "@radix-ui/react-label";
|
import type * as LabelPrimitive from "@radix-ui/react-label";
|
||||||
import { Slot } from "@radix-ui/react-slot";
|
import { Slot } from "@radix-ui/react-slot";
|
||||||
import {
|
import {
|
||||||
Controller,
|
Controller,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import * as React from "react";
|
import type * as React from "react";
|
||||||
import * as LabelPrimitive from "@radix-ui/react-label";
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
||||||
|
|
||||||
import { cn } from "~/client/lib/utils";
|
import { cn } from "~/client/lib/utils";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import * as React from "react";
|
import type * as React from "react";
|
||||||
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
||||||
|
|
||||||
import { cn } from "~/client/lib/utils";
|
import { cn } from "~/client/lib/utils";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import * as React from "react";
|
import type * as React from "react";
|
||||||
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
||||||
|
|
||||||
import { cn } from "~/client/lib/utils";
|
import { cn } from "~/client/lib/utils";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import * as React from "react";
|
import type * as React from "react";
|
||||||
import * as SelectPrimitive from "@radix-ui/react-select";
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
||||||
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import * as React from "react";
|
import type * as React from "react";
|
||||||
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
||||||
|
|
||||||
import { cn } from "~/client/lib/utils";
|
import { cn } from "~/client/lib/utils";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import * as React from "react";
|
import type * as React from "react";
|
||||||
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
||||||
import { XIcon } from "lucide-react";
|
import { XIcon } from "lucide-react";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import * as React from "react";
|
import type * as React from "react";
|
||||||
|
|
||||||
import { cn } from "~/client/lib/utils";
|
import { cn } from "~/client/lib/utils";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import * as React from "react";
|
import type * as React from "react";
|
||||||
|
|
||||||
import { cn } from "~/client/lib/utils";
|
import { cn } from "~/client/lib/utils";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import * as React from "react";
|
import type * as React from "react";
|
||||||
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
||||||
|
|
||||||
import { cn } from "~/client/lib/utils";
|
import { cn } from "~/client/lib/utils";
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
import * as React from "react"
|
import * as React from "react";
|
||||||
|
|
||||||
const MOBILE_BREAKPOINT = 768
|
const MOBILE_BREAKPOINT = 768;
|
||||||
|
|
||||||
export function useIsMobile() {
|
export function useIsMobile() {
|
||||||
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)
|
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined);
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
||||||
const onChange = () => {
|
const onChange = () => {
|
||||||
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
||||||
}
|
};
|
||||||
mql.addEventListener("change", onChange)
|
mql.addEventListener("change", onChange);
|
||||||
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
||||||
return () => mql.removeEventListener("change", onChange)
|
return () => mql.removeEventListener("change", onChange);
|
||||||
}, [])
|
}, []);
|
||||||
|
|
||||||
return !!isMobile
|
return !!isMobile;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,9 +32,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"volumes_table_name_unique": {
|
"volumes_table_name_unique": {
|
||||||
"name": "volumes_table_name_unique",
|
"name": "volumes_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -62,9 +62,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"volumes_table_name_unique": {
|
"volumes_table_name_unique": {
|
||||||
"name": "volumes_table_name_unique",
|
"name": "volumes_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -85,9 +85,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"volumes_table_name_unique": {
|
"volumes_table_name_unique": {
|
||||||
"name": "volumes_table_name_unique",
|
"name": "volumes_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -93,9 +93,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"volumes_table_name_unique": {
|
"volumes_table_name_unique": {
|
||||||
"name": "volumes_table_name_unique",
|
"name": "volumes_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -93,9 +93,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"volumes_table_name_unique": {
|
"volumes_table_name_unique": {
|
||||||
"name": "volumes_table_name_unique",
|
"name": "volumes_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -43,12 +43,8 @@
|
||||||
"name": "sessions_table_user_id_users_table_id_fk",
|
"name": "sessions_table_user_id_users_table_id_fk",
|
||||||
"tableFrom": "sessions_table",
|
"tableFrom": "sessions_table",
|
||||||
"tableTo": "users_table",
|
"tableTo": "users_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["user_id"],
|
||||||
"user_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
|
|
@ -101,9 +97,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"users_table_username_unique": {
|
"users_table_username_unique": {
|
||||||
"name": "users_table_username_unique",
|
"name": "users_table_username_unique",
|
||||||
"columns": [
|
"columns": ["username"],
|
||||||
"username"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -201,9 +195,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"volumes_table_name_unique": {
|
"volumes_table_name_unique": {
|
||||||
"name": "volumes_table_name_unique",
|
"name": "volumes_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -85,9 +85,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"repositories_table_name_unique": {
|
"repositories_table_name_unique": {
|
||||||
"name": "repositories_table_name_unique",
|
"name": "repositories_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -135,12 +133,8 @@
|
||||||
"name": "sessions_table_user_id_users_table_id_fk",
|
"name": "sessions_table_user_id_users_table_id_fk",
|
||||||
"tableFrom": "sessions_table",
|
"tableFrom": "sessions_table",
|
||||||
"tableTo": "users_table",
|
"tableTo": "users_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["user_id"],
|
||||||
"user_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
|
|
@ -193,9 +187,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"users_table_username_unique": {
|
"users_table_username_unique": {
|
||||||
"name": "users_table_username_unique",
|
"name": "users_table_username_unique",
|
||||||
"columns": [
|
"columns": ["username"],
|
||||||
"username"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -286,9 +278,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"volumes_table_name_unique": {
|
"volumes_table_name_unique": {
|
||||||
"name": "volumes_table_name_unique",
|
"name": "volumes_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -85,9 +85,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"repositories_table_name_unique": {
|
"repositories_table_name_unique": {
|
||||||
"name": "repositories_table_name_unique",
|
"name": "repositories_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -135,12 +133,8 @@
|
||||||
"name": "sessions_table_user_id_users_table_id_fk",
|
"name": "sessions_table_user_id_users_table_id_fk",
|
||||||
"tableFrom": "sessions_table",
|
"tableFrom": "sessions_table",
|
||||||
"tableTo": "users_table",
|
"tableTo": "users_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["user_id"],
|
||||||
"user_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
|
|
@ -193,9 +187,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"users_table_username_unique": {
|
"users_table_username_unique": {
|
||||||
"name": "users_table_username_unique",
|
"name": "users_table_username_unique",
|
||||||
"columns": [
|
"columns": ["username"],
|
||||||
"username"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -286,9 +278,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"volumes_table_name_unique": {
|
"volumes_table_name_unique": {
|
||||||
"name": "volumes_table_name_unique",
|
"name": "volumes_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -114,9 +114,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"backup_schedules_table_volume_id_unique": {
|
"backup_schedules_table_volume_id_unique": {
|
||||||
"name": "backup_schedules_table_volume_id_unique",
|
"name": "backup_schedules_table_volume_id_unique",
|
||||||
"columns": [
|
"columns": ["volume_id"],
|
||||||
"volume_id"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -125,12 +123,8 @@
|
||||||
"name": "backup_schedules_table_volume_id_volumes_table_id_fk",
|
"name": "backup_schedules_table_volume_id_volumes_table_id_fk",
|
||||||
"tableFrom": "backup_schedules_table",
|
"tableFrom": "backup_schedules_table",
|
||||||
"tableTo": "volumes_table",
|
"tableTo": "volumes_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["volume_id"],
|
||||||
"volume_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
},
|
},
|
||||||
|
|
@ -138,12 +132,8 @@
|
||||||
"name": "backup_schedules_table_repository_id_repositories_table_id_fk",
|
"name": "backup_schedules_table_repository_id_repositories_table_id_fk",
|
||||||
"tableFrom": "backup_schedules_table",
|
"tableFrom": "backup_schedules_table",
|
||||||
"tableTo": "repositories_table",
|
"tableTo": "repositories_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["repository_id"],
|
||||||
"repository_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
|
|
@ -233,9 +223,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"repositories_table_name_unique": {
|
"repositories_table_name_unique": {
|
||||||
"name": "repositories_table_name_unique",
|
"name": "repositories_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -283,12 +271,8 @@
|
||||||
"name": "sessions_table_user_id_users_table_id_fk",
|
"name": "sessions_table_user_id_users_table_id_fk",
|
||||||
"tableFrom": "sessions_table",
|
"tableFrom": "sessions_table",
|
||||||
"tableTo": "users_table",
|
"tableTo": "users_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["user_id"],
|
||||||
"user_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
|
|
@ -341,9 +325,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"users_table_username_unique": {
|
"users_table_username_unique": {
|
||||||
"name": "users_table_username_unique",
|
"name": "users_table_username_unique",
|
||||||
"columns": [
|
"columns": ["username"],
|
||||||
"username"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -434,9 +416,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"volumes_table_name_unique": {
|
"volumes_table_name_unique": {
|
||||||
"name": "volumes_table_name_unique",
|
"name": "volumes_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -117,12 +117,8 @@
|
||||||
"name": "backup_schedules_table_volume_id_volumes_table_id_fk",
|
"name": "backup_schedules_table_volume_id_volumes_table_id_fk",
|
||||||
"tableFrom": "backup_schedules_table",
|
"tableFrom": "backup_schedules_table",
|
||||||
"tableTo": "volumes_table",
|
"tableTo": "volumes_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["volume_id"],
|
||||||
"volume_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
},
|
},
|
||||||
|
|
@ -130,12 +126,8 @@
|
||||||
"name": "backup_schedules_table_repository_id_repositories_table_id_fk",
|
"name": "backup_schedules_table_repository_id_repositories_table_id_fk",
|
||||||
"tableFrom": "backup_schedules_table",
|
"tableFrom": "backup_schedules_table",
|
||||||
"tableTo": "repositories_table",
|
"tableTo": "repositories_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["repository_id"],
|
||||||
"repository_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
|
|
@ -225,9 +217,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"repositories_table_name_unique": {
|
"repositories_table_name_unique": {
|
||||||
"name": "repositories_table_name_unique",
|
"name": "repositories_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -275,12 +265,8 @@
|
||||||
"name": "sessions_table_user_id_users_table_id_fk",
|
"name": "sessions_table_user_id_users_table_id_fk",
|
||||||
"tableFrom": "sessions_table",
|
"tableFrom": "sessions_table",
|
||||||
"tableTo": "users_table",
|
"tableTo": "users_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["user_id"],
|
||||||
"user_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
|
|
@ -333,9 +319,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"users_table_username_unique": {
|
"users_table_username_unique": {
|
||||||
"name": "users_table_username_unique",
|
"name": "users_table_username_unique",
|
||||||
"columns": [
|
"columns": ["username"],
|
||||||
"username"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -426,9 +410,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"volumes_table_name_unique": {
|
"volumes_table_name_unique": {
|
||||||
"name": "volumes_table_name_unique",
|
"name": "volumes_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -117,12 +117,8 @@
|
||||||
"name": "backup_schedules_table_volume_id_volumes_table_id_fk",
|
"name": "backup_schedules_table_volume_id_volumes_table_id_fk",
|
||||||
"tableFrom": "backup_schedules_table",
|
"tableFrom": "backup_schedules_table",
|
||||||
"tableTo": "volumes_table",
|
"tableTo": "volumes_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["volume_id"],
|
||||||
"volume_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
},
|
},
|
||||||
|
|
@ -130,12 +126,8 @@
|
||||||
"name": "backup_schedules_table_repository_id_repositories_table_id_fk",
|
"name": "backup_schedules_table_repository_id_repositories_table_id_fk",
|
||||||
"tableFrom": "backup_schedules_table",
|
"tableFrom": "backup_schedules_table",
|
||||||
"tableTo": "repositories_table",
|
"tableTo": "repositories_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["repository_id"],
|
||||||
"repository_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
|
|
@ -225,9 +217,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"repositories_table_name_unique": {
|
"repositories_table_name_unique": {
|
||||||
"name": "repositories_table_name_unique",
|
"name": "repositories_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -275,12 +265,8 @@
|
||||||
"name": "sessions_table_user_id_users_table_id_fk",
|
"name": "sessions_table_user_id_users_table_id_fk",
|
||||||
"tableFrom": "sessions_table",
|
"tableFrom": "sessions_table",
|
||||||
"tableTo": "users_table",
|
"tableTo": "users_table",
|
||||||
"columnsFrom": [
|
"columnsFrom": ["user_id"],
|
||||||
"user_id"
|
"columnsTo": ["id"],
|
||||||
],
|
|
||||||
"columnsTo": [
|
|
||||||
"id"
|
|
||||||
],
|
|
||||||
"onDelete": "cascade",
|
"onDelete": "cascade",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
}
|
}
|
||||||
|
|
@ -341,9 +327,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"users_table_username_unique": {
|
"users_table_username_unique": {
|
||||||
"name": "users_table_username_unique",
|
"name": "users_table_username_unique",
|
||||||
"columns": [
|
"columns": ["username"],
|
||||||
"username"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -434,9 +418,7 @@
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"volumes_table_name_unique": {
|
"volumes_table_name_unique": {
|
||||||
"name": "volumes_table_name_unique",
|
"name": "volumes_table_name_unique",
|
||||||
"columns": [
|
"columns": ["name"],
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"isUnique": true
|
"isUnique": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -67,10 +67,7 @@ async function detectRclone(): Promise<boolean> {
|
||||||
logger.info("rclone capability: enabled");
|
logger.info("rclone capability: enabled");
|
||||||
return true;
|
return true;
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
logger.warn(
|
logger.warn("rclone capability: disabled. " + "To enable: mount /root/.config/rclone in docker-compose.yml");
|
||||||
"rclone capability: disabled. " +
|
|
||||||
"To enable: mount /root/.config/rclone in docker-compose.yml",
|
|
||||||
);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ import { createHonoServer } from "react-router-hono-server/bun";
|
||||||
import * as fs from "node:fs/promises";
|
import * as fs from "node:fs/promises";
|
||||||
import { Scalar } from "@scalar/hono-api-reference";
|
import { Scalar } from "@scalar/hono-api-reference";
|
||||||
import { Hono } from "hono";
|
import { Hono } from "hono";
|
||||||
import { serveStatic } from "hono/bun";
|
|
||||||
import { logger as honoLogger } from "hono/logger";
|
import { logger as honoLogger } from "hono/logger";
|
||||||
import { openAPIRouteHandler } from "hono-openapi";
|
import { openAPIRouteHandler } from "hono-openapi";
|
||||||
import { getCapabilities } from "./core/capabilities";
|
import { getCapabilities } from "./core/capabilities";
|
||||||
|
|
@ -49,9 +48,6 @@ const app = new Hono()
|
||||||
.route("/api/v1/backups", backupScheduleController.use(requireAuth))
|
.route("/api/v1/backups", backupScheduleController.use(requireAuth))
|
||||||
.route("/api/v1/system", systemController.use(requireAuth))
|
.route("/api/v1/system", systemController.use(requireAuth))
|
||||||
.route("/api/v1/events", eventsController.use(requireAuth));
|
.route("/api/v1/events", eventsController.use(requireAuth));
|
||||||
// .get("/assets/*", serveStatic({ root: "./assets/frontend" }))
|
|
||||||
// .get("/images/*", serveStatic({ root: "./assets/frontend" }))
|
|
||||||
// .get("*", serveStatic({ path: "./assets/frontend/index.html" }));
|
|
||||||
|
|
||||||
app.get("/api/v1/openapi.json", generalDescriptor(app));
|
app.get("/api/v1/openapi.json", generalDescriptor(app));
|
||||||
app.get("/api/v1/docs", scalarDescriptor);
|
app.get("/api/v1/docs", scalarDescriptor);
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://biomejs.dev/schemas/2.3.0/schema.json",
|
"$schema": "https://biomejs.dev/schemas/2.3.5/schema.json",
|
||||||
"vcs": {
|
"vcs": {
|
||||||
"enabled": false,
|
"enabled": true,
|
||||||
"clientKind": "git",
|
"clientKind": "git",
|
||||||
"useIgnoreFile": false
|
"useIgnoreFile": true
|
||||||
},
|
},
|
||||||
"files": {
|
"files": {
|
||||||
|
"includes": ["**/*.{ts,tsx,json}", "!**/api-client", "!**/components/ui"],
|
||||||
"ignoreUnknown": false
|
"ignoreUnknown": false
|
||||||
},
|
},
|
||||||
"formatter": {
|
"formatter": {
|
||||||
|
|
|
||||||
19
bun.lock
19
bun.lock
|
|
@ -56,6 +56,7 @@
|
||||||
"yaml": "^2.8.1",
|
"yaml": "^2.8.1",
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@biomejs/biome": "^2.3.5",
|
||||||
"@hey-api/openapi-ts": "^0.87.4",
|
"@hey-api/openapi-ts": "^0.87.4",
|
||||||
"@react-router/dev": "^7.9.3",
|
"@react-router/dev": "^7.9.3",
|
||||||
"@tailwindcss/vite": "^4.1.14",
|
"@tailwindcss/vite": "^4.1.14",
|
||||||
|
|
@ -139,6 +140,24 @@
|
||||||
|
|
||||||
"@balena/dockerignore": ["@balena/dockerignore@1.0.2", "", {}, "sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q=="],
|
"@balena/dockerignore": ["@balena/dockerignore@1.0.2", "", {}, "sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q=="],
|
||||||
|
|
||||||
|
"@biomejs/biome": ["@biomejs/biome@2.3.5", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.3.5", "@biomejs/cli-darwin-x64": "2.3.5", "@biomejs/cli-linux-arm64": "2.3.5", "@biomejs/cli-linux-arm64-musl": "2.3.5", "@biomejs/cli-linux-x64": "2.3.5", "@biomejs/cli-linux-x64-musl": "2.3.5", "@biomejs/cli-win32-arm64": "2.3.5", "@biomejs/cli-win32-x64": "2.3.5" }, "bin": { "biome": "bin/biome" } }, "sha512-HvLhNlIlBIbAV77VysRIBEwp55oM/QAjQEin74QQX9Xb259/XP/D5AGGnZMOyF1el4zcvlNYYR3AyTMUV3ILhg=="],
|
||||||
|
|
||||||
|
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.3.5", "", { "os": "darwin", "cpu": "arm64" }, "sha512-fLdTur8cJU33HxHUUsii3GLx/TR0BsfQx8FkeqIiW33cGMtUD56fAtrh+2Fx1uhiCsVZlFh6iLKUU3pniZREQw=="],
|
||||||
|
|
||||||
|
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.3.5", "", { "os": "darwin", "cpu": "x64" }, "sha512-qpT8XDqeUlzrOW8zb4k3tjhT7rmvVRumhi2657I2aGcY4B+Ft5fNwDdZGACzn8zj7/K1fdWjgwYE3i2mSZ+vOA=="],
|
||||||
|
|
||||||
|
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.3.5", "", { "os": "linux", "cpu": "arm64" }, "sha512-u/pybjTBPGBHB66ku4pK1gj+Dxgx7/+Z0jAriZISPX1ocTO8aHh8x8e7Kb1rB4Ms0nA/SzjtNOVJ4exVavQBCw=="],
|
||||||
|
|
||||||
|
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.3.5", "", { "os": "linux", "cpu": "arm64" }, "sha512-eGUG7+hcLgGnMNl1KHVZUYxahYAhC462jF/wQolqu4qso2MSk32Q+QrpN7eN4jAHAg7FUMIo897muIhK4hXhqg=="],
|
||||||
|
|
||||||
|
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.3.5", "", { "os": "linux", "cpu": "x64" }, "sha512-XrIVi9YAW6ye0CGQ+yax0gLfx+BFOtKaNX74n+xHWla6Cl6huUmcKNO7HPx7BiKnJUzrxXY1qYlm7xMvi08X4g=="],
|
||||||
|
|
||||||
|
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.3.5", "", { "os": "linux", "cpu": "x64" }, "sha512-awVuycTPpVTH/+WDVnEEYSf6nbCBHf/4wB3lquwT7puhNg8R4XvonWNZzUsfHZrCkjkLhFH/vCZK5jHatD9FEg=="],
|
||||||
|
|
||||||
|
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.3.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-DlBiMlBZZ9eIq4H7RimDSGsYcOtfOIfZOaI5CqsWiSlbTfqbPVfWtCf92wNzx8GNMbu1s7/g3ZZESr6+GwM/SA=="],
|
||||||
|
|
||||||
|
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.3.5", "", { "os": "win32", "cpu": "x64" }, "sha512-nUmR8gb6yvrKhtRgzwo/gDimPwnO5a4sCydf8ZS2kHIJhEmSmk+STsusr1LHTuM//wXppBawvSQi2xFXJCdgKQ=="],
|
||||||
|
|
||||||
"@colors/colors": ["@colors/colors@1.6.0", "", {}, "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA=="],
|
"@colors/colors": ["@colors/colors@1.6.0", "", {}, "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA=="],
|
||||||
|
|
||||||
"@dabh/diagnostics": ["@dabh/diagnostics@2.0.8", "", { "dependencies": { "@so-ric/colorspace": "^1.1.6", "enabled": "2.0.x", "kuler": "^2.0.0" } }, "sha512-R4MSXTVnuMzGD7bzHdW2ZhhdPC/igELENcq5IjEverBvq5hn1SXCWcsi6eSsdWP0/Ur+SItRRjAktmdoX/8R/Q=="],
|
"@dabh/diagnostics": ["@dabh/diagnostics@2.0.8", "", { "dependencies": { "@so-ric/colorspace": "^1.1.6", "enabled": "2.0.x", "kuler": "^2.0.0" } }, "sha512-R4MSXTVnuMzGD7bzHdW2ZhhdPC/igELENcq5IjEverBvq5hn1SXCWcsi6eSsdWP0/Ur+SItRRjAktmdoX/8R/Q=="],
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@
|
||||||
"dev": "bunx --bun vite",
|
"dev": "bunx --bun vite",
|
||||||
"start": "bun ./dist/server/index.js",
|
"start": "bun ./dist/server/index.js",
|
||||||
"tsc": "react-router typegen && tsc",
|
"tsc": "react-router typegen && tsc",
|
||||||
|
"lint": "biome check .",
|
||||||
|
"lint:ci": "biome check . --ci",
|
||||||
"start:dev": "docker compose down && docker compose up --build ironmount-dev",
|
"start:dev": "docker compose down && docker compose up --build ironmount-dev",
|
||||||
"start:prod": "docker compose down && docker compose up --build ironmount-prod",
|
"start:prod": "docker compose down && docker compose up --build ironmount-prod",
|
||||||
"gen:api-client": "openapi-ts",
|
"gen:api-client": "openapi-ts",
|
||||||
|
|
@ -67,6 +69,7 @@
|
||||||
"yaml": "^2.8.1"
|
"yaml": "^2.8.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@biomejs/biome": "^2.3.5",
|
||||||
"@hey-api/openapi-ts": "^0.87.4",
|
"@hey-api/openapi-ts": "^0.87.4",
|
||||||
"@react-router/dev": "^7.9.3",
|
"@react-router/dev": "^7.9.3",
|
||||||
"@tailwindcss/vite": "^4.1.14",
|
"@tailwindcss/vite": "^4.1.14",
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,5 @@
|
||||||
{
|
{
|
||||||
"include": [
|
"include": ["**/*", "**/.server/**/*", "**/.client/**/*", ".react-router/types/**/*"],
|
||||||
"**/*",
|
|
||||||
"**/.server/**/*",
|
|
||||||
"**/.client/**/*",
|
|
||||||
".react-router/types/**/*"
|
|
||||||
],
|
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"lib": ["DOM", "DOM.Iterable", "ES2022"],
|
"lib": ["DOM", "DOM.Iterable", "ES2022"],
|
||||||
"types": ["node", "vite/client"],
|
"types": ["node", "vite/client"],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue