style: run biome lint
This commit is contained in:
parent
aa9872a45b
commit
f3c9d8b54c
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
||||
import type { Dispatch, ReactNode, SetStateAction } from 'react';
|
||||
import {
|
||||
Button as AriaButton,
|
||||
Dialog as AriaDialog,
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
||||
import type { Dispatch, ReactNode, SetStateAction } from 'react';
|
||||
import {
|
||||
Button as AriaButton,
|
||||
Menu as AriaMenu,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import clsx from 'clsx';
|
||||
import { HTMLProps } from 'react';
|
||||
import type { HTMLProps } from 'react';
|
||||
|
||||
type Props = HTMLProps<SVGElement> & {
|
||||
readonly isOnline: boolean;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import clsx from 'clsx';
|
||||
import { HTMLProps } from 'react';
|
||||
import type { HTMLProps } from 'react';
|
||||
|
||||
function TableList(props: HTMLProps<HTMLDivElement>) {
|
||||
return (
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { ReactNode } from 'react';
|
||||
import type { ReactNode } from 'react';
|
||||
import {
|
||||
Button as AriaButton,
|
||||
Tooltip as AriaTooltip,
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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() {
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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[];
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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<HeadplaneContext['oidc']>;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user