From f3c9d8b54c765d3d5618c9ae41e1f632ecdcb709 Mon Sep 17 00:00:00 2001 From: Aarnav Tale Date: Tue, 31 Dec 2024 10:31:50 +0530 Subject: [PATCH] style: run biome lint --- app/components/Button.tsx | 2 +- app/components/Card.tsx | 2 +- app/components/Code.tsx | 2 +- app/components/Dialog.tsx | 2 +- app/components/Header.tsx | 4 ++-- app/components/Menu.tsx | 2 +- app/components/NumberField.tsx | 2 +- app/components/Select.tsx | 2 +- app/components/StatusCircle.tsx | 2 +- app/components/TableList.tsx | 2 +- app/components/TextField.tsx | 2 +- app/components/Toaster.tsx | 6 +++--- app/components/Tooltip.tsx | 2 +- app/integration/index.ts | 2 +- app/layouts/dashboard.tsx | 2 +- app/routes/acls/editor.tsx | 2 +- app/routes/auth/login.tsx | 4 ++-- app/routes/auth/logout.ts | 2 +- app/routes/auth/oidc-callback.ts | 2 +- app/routes/dns/components/domains.tsx | 2 +- app/routes/dns/overview.tsx | 2 +- app/routes/machines/action.tsx | 2 +- app/routes/machines/components/machine.tsx | 4 ++-- app/routes/machines/components/menu.tsx | 4 ++-- app/routes/machines/dialogs/delete.tsx | 4 ++-- app/routes/machines/dialogs/expire.tsx | 4 ++-- app/routes/machines/dialogs/move.tsx | 2 +- app/routes/machines/dialogs/new.tsx | 2 +- app/routes/machines/dialogs/rename.tsx | 2 +- app/routes/machines/dialogs/routes.tsx | 4 ++-- app/routes/machines/dialogs/tags.tsx | 4 ++-- app/routes/machines/machine.tsx | 4 ++-- app/routes/machines/overview.tsx | 2 +- app/routes/settings/auth-keys.tsx | 4 ++-- app/routes/settings/dialogs/new.tsx | 2 +- app/routes/users/components/oidc.tsx | 2 +- app/routes/users/overview.tsx | 6 +++--- app/utils/config/headplane.ts | 8 ++++---- app/utils/oidc.ts | 4 ++-- 39 files changed, 57 insertions(+), 57 deletions(-) diff --git a/app/components/Button.tsx b/app/components/Button.tsx index dae1df0..94c89d2 100644 --- a/app/components/Button.tsx +++ b/app/components/Button.tsx @@ -1,4 +1,4 @@ -import { Dispatch, SetStateAction } from 'react'; +import type { Dispatch, SetStateAction } from 'react'; import { Button as AriaButton } from 'react-aria-components'; import { cn } from '~/utils/cn'; diff --git a/app/components/Card.tsx b/app/components/Card.tsx index e8f775f..c186d5e 100644 --- a/app/components/Card.tsx +++ b/app/components/Card.tsx @@ -1,4 +1,4 @@ -import { HTMLProps } from 'react'; +import type { HTMLProps } from 'react'; import { Heading as AriaHeading } from 'react-aria-components'; import { cn } from '~/utils/cn'; diff --git a/app/components/Code.tsx b/app/components/Code.tsx index 9bf08de..1606610 100644 --- a/app/components/Code.tsx +++ b/app/components/Code.tsx @@ -1,4 +1,4 @@ -import { useState, HTMLProps } from 'react'; +import { useState, type HTMLProps } from 'react'; import { CopyIcon, CheckIcon } from '@primer/octicons-react'; import { cn } from '~/utils/cn'; import { toast } from '~/components/Toaster'; diff --git a/app/components/Dialog.tsx b/app/components/Dialog.tsx index 6e1d611..152b314 100644 --- a/app/components/Dialog.tsx +++ b/app/components/Dialog.tsx @@ -1,4 +1,4 @@ -import { Dispatch, ReactNode, SetStateAction } from 'react'; +import type { Dispatch, ReactNode, SetStateAction } from 'react'; import { Button as AriaButton, Dialog as AriaDialog, diff --git a/app/components/Header.tsx b/app/components/Header.tsx index 58ea2c7..44525ff 100644 --- a/app/components/Header.tsx +++ b/app/components/Header.tsx @@ -10,8 +10,8 @@ import { import { Form } from 'react-router'; import { cn } from '~/utils/cn'; -import { HeadplaneContext } from '~/utils/config/headplane'; -import { SessionData } from '~/utils/sessions'; +import type { HeadplaneContext } from '~/utils/config/headplane'; +import type { SessionData } from '~/utils/sessions'; import Menu from './Menu'; import TabLink from './TabLink'; diff --git a/app/components/Menu.tsx b/app/components/Menu.tsx index 6eb975d..8fa648e 100644 --- a/app/components/Menu.tsx +++ b/app/components/Menu.tsx @@ -1,4 +1,4 @@ -import { Dispatch, ReactNode, SetStateAction } from 'react'; +import type { Dispatch, ReactNode, SetStateAction } from 'react'; import { Button as AriaButton, Menu as AriaMenu, diff --git a/app/components/NumberField.tsx b/app/components/NumberField.tsx index dd20b50..45c803e 100644 --- a/app/components/NumberField.tsx +++ b/app/components/NumberField.tsx @@ -1,5 +1,5 @@ import { PlusIcon, DashIcon } from '@primer/octicons-react'; -import { Dispatch, SetStateAction } from 'react'; +import type { Dispatch, SetStateAction } from 'react'; import { Button, Group, diff --git a/app/components/Select.tsx b/app/components/Select.tsx index a2e83b7..1ac7a72 100644 --- a/app/components/Select.tsx +++ b/app/components/Select.tsx @@ -1,5 +1,5 @@ import { ChevronDownIcon } from '@primer/octicons-react'; -import { Dispatch, ReactNode, SetStateAction } from 'react'; +import type { Dispatch, ReactNode, SetStateAction } from 'react'; import { Button, ListBox, diff --git a/app/components/StatusCircle.tsx b/app/components/StatusCircle.tsx index e1e41da..074ec54 100644 --- a/app/components/StatusCircle.tsx +++ b/app/components/StatusCircle.tsx @@ -1,5 +1,5 @@ import clsx from 'clsx'; -import { HTMLProps } from 'react'; +import type { HTMLProps } from 'react'; type Props = HTMLProps & { readonly isOnline: boolean; diff --git a/app/components/TableList.tsx b/app/components/TableList.tsx index 64a29b5..5f836d1 100644 --- a/app/components/TableList.tsx +++ b/app/components/TableList.tsx @@ -1,5 +1,5 @@ import clsx from 'clsx'; -import { HTMLProps } from 'react'; +import type { HTMLProps } from 'react'; function TableList(props: HTMLProps) { return ( diff --git a/app/components/TextField.tsx b/app/components/TextField.tsx index a14f4f1..ca5bbeb 100644 --- a/app/components/TextField.tsx +++ b/app/components/TextField.tsx @@ -1,4 +1,4 @@ -import { Dispatch, SetStateAction } from 'react'; +import type { Dispatch, SetStateAction } from 'react'; import { Input, TextField as AriaTextField } from 'react-aria-components'; import { cn } from '~/utils/cn'; diff --git a/app/components/Toaster.tsx b/app/components/Toaster.tsx index 79a6282..60a66bc 100644 --- a/app/components/Toaster.tsx +++ b/app/components/Toaster.tsx @@ -1,7 +1,7 @@ import { XIcon } from '@primer/octicons-react'; -import { AriaToastProps, useToast, useToastRegion } from '@react-aria/toast'; -import { ToastQueue, ToastState, useToastQueue } from '@react-stately/toast'; -import { ReactNode, useRef } from 'react'; +import { type AriaToastProps, useToast, useToastRegion } from '@react-aria/toast'; +import { ToastQueue, type ToastState, useToastQueue } from '@react-stately/toast'; +import { type ReactNode, useRef } from 'react'; import { Button } from 'react-aria-components'; import { createPortal } from 'react-dom'; import { ClientOnly } from 'remix-utils/client-only'; diff --git a/app/components/Tooltip.tsx b/app/components/Tooltip.tsx index eaa4877..ad726b9 100644 --- a/app/components/Tooltip.tsx +++ b/app/components/Tooltip.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import { Button as AriaButton, Tooltip as AriaTooltip, diff --git a/app/integration/index.ts b/app/integration/index.ts index 2748c57..2132020 100644 --- a/app/integration/index.ts +++ b/app/integration/index.ts @@ -1,7 +1,7 @@ import log from '~/utils/log'; import dockerIntegration from './docker'; -import { IntegrationFactory } from './integration'; +import type { IntegrationFactory } from './integration'; import kubernetesIntegration from './kubernetes'; import procIntegration from './proc'; diff --git a/app/layouts/dashboard.tsx b/app/layouts/dashboard.tsx index 7540525..e0c29cf 100644 --- a/app/layouts/dashboard.tsx +++ b/app/layouts/dashboard.tsx @@ -1,4 +1,4 @@ -import { LoaderFunctionArgs, redirect } from 'react-router'; +import { type LoaderFunctionArgs, redirect } from 'react-router'; import { Outlet, useLoaderData, useNavigation } from 'react-router'; import { ProgressBar } from 'react-aria-components'; diff --git a/app/routes/acls/editor.tsx b/app/routes/acls/editor.tsx index 325aa82..fb35763 100644 --- a/app/routes/acls/editor.tsx +++ b/app/routes/acls/editor.tsx @@ -4,7 +4,7 @@ import { IssueDraftIcon, PencilIcon, } from '@primer/octicons-react'; -import { ActionFunctionArgs, LoaderFunctionArgs } from 'react-router'; +import type { ActionFunctionArgs, LoaderFunctionArgs } from 'react-router'; import { useLoaderData, useRevalidator } from 'react-router'; import { useDebounceFetcher } from 'remix-utils/use-debounce-fetcher'; import { useEffect, useState, useMemo } from 'react'; diff --git a/app/routes/auth/login.tsx b/app/routes/auth/login.tsx index 42e0096..5cec9e0 100644 --- a/app/routes/auth/login.tsx +++ b/app/routes/auth/login.tsx @@ -1,4 +1,4 @@ -import { ActionFunctionArgs, LoaderFunctionArgs, redirect } from 'react-router'; +import { type ActionFunctionArgs, type LoaderFunctionArgs, redirect } from 'react-router'; import { Form, useActionData, useLoaderData } from 'react-router'; import { useMemo } from 'react'; @@ -6,7 +6,7 @@ import Button from '~/components/Button'; import Card from '~/components/Card'; import Code from '~/components/Code'; import TextField from '~/components/TextField'; -import { Key } from '~/types'; +import type { Key } from '~/types'; import { loadContext } from '~/utils/config/headplane'; import { pull } from '~/utils/headscale'; import { startOidc } from '~/utils/oidc'; diff --git a/app/routes/auth/logout.ts b/app/routes/auth/logout.ts index ef27523..68403a6 100644 --- a/app/routes/auth/logout.ts +++ b/app/routes/auth/logout.ts @@ -1,4 +1,4 @@ -import { ActionFunctionArgs, redirect } from 'react-router'; +import { type ActionFunctionArgs, redirect } from 'react-router'; import { destroySession, getSession } from '~/utils/sessions'; export async function loader() { diff --git a/app/routes/auth/oidc-callback.ts b/app/routes/auth/oidc-callback.ts index 9da7288..4ff3177 100644 --- a/app/routes/auth/oidc-callback.ts +++ b/app/routes/auth/oidc-callback.ts @@ -1,4 +1,4 @@ -import { LoaderFunctionArgs, data } from 'react-router'; +import { type LoaderFunctionArgs, data } from 'react-router'; import { loadContext } from '~/utils/config/headplane'; import { finishOidc } from '~/utils/oidc'; diff --git a/app/routes/dns/components/domains.tsx b/app/routes/dns/components/domains.tsx index 64ddfdd..50411cb 100644 --- a/app/routes/dns/components/domains.tsx +++ b/app/routes/dns/components/domains.tsx @@ -12,7 +12,7 @@ import { } from '@dnd-kit/sortable'; import { CSS } from '@dnd-kit/utilities'; import { LockIcon, ThreeBarsIcon } from '@primer/octicons-react'; -import { FetcherWithComponents, useFetcher } from 'react-router'; +import { type FetcherWithComponents, useFetcher } from 'react-router'; import { useEffect, useState } from 'react'; import { Button, Input } from 'react-aria-components'; diff --git a/app/routes/dns/overview.tsx b/app/routes/dns/overview.tsx index 2dfcbed..b2df033 100644 --- a/app/routes/dns/overview.tsx +++ b/app/routes/dns/overview.tsx @@ -1,4 +1,4 @@ -import { ActionFunctionArgs } from 'react-router'; +import type { ActionFunctionArgs } from 'react-router'; import { json, useLoaderData } from 'react-router'; import Code from '~/components/Code'; diff --git a/app/routes/machines/action.tsx b/app/routes/machines/action.tsx index c1e4a82..6472eba 100644 --- a/app/routes/machines/action.tsx +++ b/app/routes/machines/action.tsx @@ -1,4 +1,4 @@ -import { ActionFunctionArgs } from 'react-router'; +import type { ActionFunctionArgs } from 'react-router'; import { del, post } from '~/utils/headscale'; import { getSession } from '~/utils/sessions'; import { send } from '~/utils/res'; diff --git a/app/routes/machines/components/machine.tsx b/app/routes/machines/components/machine.tsx index 84f04d5..9a612c2 100644 --- a/app/routes/machines/components/machine.tsx +++ b/app/routes/machines/components/machine.tsx @@ -4,7 +4,7 @@ import { Link } from 'react-router'; import Menu from '~/components/Menu'; import StatusCircle from '~/components/StatusCircle'; import { toast } from '~/components/Toaster'; -import { Machine, Route, User } from '~/types'; +import type { Machine, Route, User } from '~/types'; import { cn } from '~/utils/cn'; import MenuOptions from './menu'; @@ -30,7 +30,7 @@ export default function MachineRow({ machine, routes, magic, users }: Props) { tags.unshift('Expired'); } - let prefix = magic?.startsWith('[user]') + const prefix = magic?.startsWith('[user]') ? magic.replace('[user]', machine.user.name) : magic; diff --git a/app/routes/machines/components/menu.tsx b/app/routes/machines/components/menu.tsx index 1b870a2..2edbb81 100644 --- a/app/routes/machines/components/menu.tsx +++ b/app/routes/machines/components/menu.tsx @@ -1,8 +1,8 @@ import { KebabHorizontalIcon } from '@primer/octicons-react'; -import { ReactNode, useState } from 'react'; +import { type ReactNode, useState } from 'react'; import MenuComponent from '~/components/Menu'; -import { Machine, Route, User } from '~/types'; +import type { Machine, Route, User } from '~/types'; import { cn } from '~/utils/cn'; import Delete from '../dialogs/delete'; diff --git a/app/routes/machines/dialogs/delete.tsx b/app/routes/machines/dialogs/delete.tsx index addb7ce..992c418 100644 --- a/app/routes/machines/dialogs/delete.tsx +++ b/app/routes/machines/dialogs/delete.tsx @@ -1,8 +1,8 @@ import { Form, useSubmit } from 'react-router'; -import { type Dispatch, type SetStateAction } from 'react'; +import type { Dispatch, SetStateAction } from 'react'; import Dialog from '~/components/Dialog'; -import { type Machine } from '~/types'; +import type { Machine } from '~/types'; import { cn } from '~/utils/cn'; interface DeleteProps { diff --git a/app/routes/machines/dialogs/expire.tsx b/app/routes/machines/dialogs/expire.tsx index a1347a3..6730237 100644 --- a/app/routes/machines/dialogs/expire.tsx +++ b/app/routes/machines/dialogs/expire.tsx @@ -1,8 +1,8 @@ import { Form, useSubmit } from 'react-router'; -import { type Dispatch, type SetStateAction } from 'react'; +import type { Dispatch, SetStateAction } from 'react'; import Dialog from '~/components/Dialog'; -import { type Machine } from '~/types'; +import type { Machine } from '~/types'; import { cn } from '~/utils/cn'; interface ExpireProps { diff --git a/app/routes/machines/dialogs/move.tsx b/app/routes/machines/dialogs/move.tsx index 8b76db5..b7ca23d 100644 --- a/app/routes/machines/dialogs/move.tsx +++ b/app/routes/machines/dialogs/move.tsx @@ -4,7 +4,7 @@ import { type Dispatch, type SetStateAction, useState } from 'react'; import Code from '~/components/Code'; import Dialog from '~/components/Dialog'; import Select from '~/components/Select'; -import { type Machine, User } from '~/types'; +import type { Machine, User } from '~/types'; interface MoveProps { readonly machine: Machine; diff --git a/app/routes/machines/dialogs/new.tsx b/app/routes/machines/dialogs/new.tsx index 7a34f62..badd729 100644 --- a/app/routes/machines/dialogs/new.tsx +++ b/app/routes/machines/dialogs/new.tsx @@ -10,7 +10,7 @@ import Select from '~/components/Select'; import Menu from '~/components/Menu'; import Spinner from '~/components/Spinner'; import { toast } from '~/components/Toaster'; -import { Machine, User } from '~/types'; +import { Machine, type User } from '~/types'; export interface NewProps { server: string; diff --git a/app/routes/machines/dialogs/rename.tsx b/app/routes/machines/dialogs/rename.tsx index 7dda524..8f75d4d 100644 --- a/app/routes/machines/dialogs/rename.tsx +++ b/app/routes/machines/dialogs/rename.tsx @@ -4,7 +4,7 @@ import { type Dispatch, type SetStateAction, useState } from 'react'; import Code from '~/components/Code'; import Dialog from '~/components/Dialog'; import TextField from '~/components/TextField'; -import { type Machine } from '~/types'; +import type { Machine } from '~/types'; interface RenameProps { readonly machine: Machine; diff --git a/app/routes/machines/dialogs/routes.tsx b/app/routes/machines/dialogs/routes.tsx index 7c2bce6..8f9c781 100644 --- a/app/routes/machines/dialogs/routes.tsx +++ b/app/routes/machines/dialogs/routes.tsx @@ -1,10 +1,10 @@ import { useFetcher } from 'react-router'; -import { Dispatch, SetStateAction, useMemo } from 'react'; +import { type Dispatch, type SetStateAction, useMemo } from 'react'; import Dialog from '~/components/Dialog'; import Switch from '~/components/Switch'; import Link from '~/components/Link'; -import { Machine, Route } from '~/types'; +import type { Machine, Route } from '~/types'; import { cn } from '~/utils/cn'; interface RoutesProps { diff --git a/app/routes/machines/dialogs/tags.tsx b/app/routes/machines/dialogs/tags.tsx index bb5a76b..4acc4f7 100644 --- a/app/routes/machines/dialogs/tags.tsx +++ b/app/routes/machines/dialogs/tags.tsx @@ -1,11 +1,11 @@ import { PlusIcon, XIcon } from '@primer/octicons-react'; import { Form, useSubmit } from 'react-router'; -import { Dispatch, SetStateAction, useState } from 'react'; +import { type Dispatch, type SetStateAction, useState } from 'react'; import { Button, Input } from 'react-aria-components'; import Dialog from '~/components/Dialog'; import Link from '~/components/Link'; -import { Machine } from '~/types'; +import type { Machine } from '~/types'; import { cn } from '~/utils/cn'; interface TagsProps { diff --git a/app/routes/machines/machine.tsx b/app/routes/machines/machine.tsx index 8567a82..ce0cba1 100644 --- a/app/routes/machines/machine.tsx +++ b/app/routes/machines/machine.tsx @@ -1,4 +1,4 @@ -import { ActionFunctionArgs, LoaderFunctionArgs } from 'react-router'; +import type { ActionFunctionArgs, LoaderFunctionArgs } from 'react-router'; import { Link as RemixLink, useLoaderData } from 'react-router'; import { InfoIcon, @@ -15,7 +15,7 @@ import Card from '~/components/Card'; import Menu from '~/components/Menu'; import Tooltip from '~/components/Tooltip'; import StatusCircle from '~/components/StatusCircle'; -import { Machine, Route, User } from '~/types'; +import type { Machine, Route, User } from '~/types'; import { cn } from '~/utils/cn'; import { loadContext } from '~/utils/config/headplane'; import { loadConfig } from '~/utils/config/headscale'; diff --git a/app/routes/machines/overview.tsx b/app/routes/machines/overview.tsx index ea00cf9..c4d6785 100644 --- a/app/routes/machines/overview.tsx +++ b/app/routes/machines/overview.tsx @@ -1,5 +1,5 @@ import { InfoIcon } from '@primer/octicons-react'; -import { ActionFunctionArgs, LoaderFunctionArgs } from 'react-router'; +import type { ActionFunctionArgs, LoaderFunctionArgs } from 'react-router'; import { useLoaderData } from 'react-router'; import { Button, Tooltip, TooltipTrigger } from 'react-aria-components'; diff --git a/app/routes/settings/auth-keys.tsx b/app/routes/settings/auth-keys.tsx index 170ee6b..5363cd1 100644 --- a/app/routes/settings/auth-keys.tsx +++ b/app/routes/settings/auth-keys.tsx @@ -1,9 +1,9 @@ -import { LoaderFunctionArgs, ActionFunctionArgs } from 'react-router'; +import type { LoaderFunctionArgs, ActionFunctionArgs } from 'react-router'; import { useLoaderData } from 'react-router'; import { useLiveData } from '~/utils/useLiveData'; import { getSession } from '~/utils/sessions'; import { Link as RemixLink } from 'react-router'; -import { PreAuthKey, User } from '~/types'; +import type { PreAuthKey, User } from '~/types'; import { pull, post } from '~/utils/headscale'; import { loadContext } from '~/utils/config/headplane'; import { useState } from 'react'; diff --git a/app/routes/settings/dialogs/new.tsx b/app/routes/settings/dialogs/new.tsx index c47be3f..9b7f68e 100644 --- a/app/routes/settings/dialogs/new.tsx +++ b/app/routes/settings/dialogs/new.tsx @@ -12,7 +12,7 @@ import Link from '~/components/Link'; import Spinner from '~/components/Spinner'; import { cn } from '~/utils/cn'; -import { User } from '~/types'; +import type { User } from '~/types'; interface Props { users: User[]; diff --git a/app/routes/users/components/oidc.tsx b/app/routes/users/components/oidc.tsx index 8f3f200..509cc5a 100644 --- a/app/routes/users/components/oidc.tsx +++ b/app/routes/users/components/oidc.tsx @@ -2,7 +2,7 @@ import { OrganizationIcon, PasskeyFillIcon } from '@primer/octicons-react'; import Card from '~/components/Card'; import Link from '~/components/Link'; -import { HeadplaneContext } from '~/utils/config/headplane'; +import type { HeadplaneContext } from '~/utils/config/headplane'; import Add from '../dialogs/add'; diff --git a/app/routes/users/overview.tsx b/app/routes/users/overview.tsx index 4c37d32..dd2cee4 100644 --- a/app/routes/users/overview.tsx +++ b/app/routes/users/overview.tsx @@ -1,6 +1,6 @@ -import { DataRef, DndContext, useDraggable, useDroppable } from '@dnd-kit/core'; +import { type DataRef, DndContext, useDraggable, useDroppable } from '@dnd-kit/core'; import { PersonIcon } from '@primer/octicons-react'; -import { ActionFunctionArgs, LoaderFunctionArgs } from 'react-router'; +import type { ActionFunctionArgs, LoaderFunctionArgs } from 'react-router'; import { useActionData, useLoaderData, useSubmit } from 'react-router'; import { useEffect, useState } from 'react'; import { ClientOnly } from 'remix-utils/client-only'; @@ -9,7 +9,7 @@ import Attribute from '~/components/Attribute'; import Card from '~/components/Card'; import StatusCircle from '~/components/StatusCircle'; import { toast } from '~/components/Toaster'; -import { Machine, User } from '~/types'; +import type { Machine, User } from '~/types'; import { cn } from '~/utils/cn'; import { loadContext } from '~/utils/config/headplane'; import { loadConfig } from '~/utils/config/headscale'; diff --git a/app/utils/config/headplane.ts b/app/utils/config/headplane.ts index f50938e..3d2a0fc 100644 --- a/app/utils/config/headplane.ts +++ b/app/utils/config/headplane.ts @@ -8,8 +8,8 @@ import { resolve } from 'node:path'; import { parse } from 'yaml'; -import { IntegrationFactory, loadIntegration } from '~/integration'; -import { HeadscaleConfig, loadConfig } from '~/utils/config/headscale'; +import { type IntegrationFactory, loadIntegration } from '~/integration'; +import { type HeadscaleConfig, loadConfig } from '~/utils/config/headscale'; import { testOidc } from '~/utils/oidc'; import log from '~/utils/log'; @@ -160,8 +160,8 @@ async function checkOidc(config?: HeadscaleConfig) { let issuer = process.env.OIDC_ISSUER; let client = process.env.OIDC_CLIENT_ID; let secret = process.env.OIDC_CLIENT_SECRET; - let method = process.env.OIDC_CLIENT_SECRET_METHOD ?? 'client_secret_basic'; - let skip = process.env.OIDC_SKIP_CONFIG_VALIDATION === 'true'; + const method = process.env.OIDC_CLIENT_SECRET_METHOD ?? 'client_secret_basic'; + const skip = process.env.OIDC_SKIP_CONFIG_VALIDATION === 'true'; log.debug('CTXT', 'Checking OIDC environment variables'); log.debug('CTXT', 'Issuer: %s', issuer); diff --git a/app/utils/oidc.ts b/app/utils/oidc.ts index a679f1e..081415b 100644 --- a/app/utils/oidc.ts +++ b/app/utils/oidc.ts @@ -2,7 +2,7 @@ import { redirect } from 'react-router'; import { authorizationCodeGrantRequest, calculatePKCECodeChallenge, - Client, + type Client, discoveryRequest, generateRandomCodeVerifier, generateRandomNonce, @@ -19,7 +19,7 @@ import { post } from '~/utils/headscale'; import { commitSession, getSession } from '~/utils/sessions'; import log from '~/utils/log'; -import { HeadplaneContext } from './config/headplane'; +import type { HeadplaneContext } from './config/headplane'; type OidcConfig = NonNullable;