From 81234e3f2ef444bd4e4830a831a8dcc18e9f9f8b Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Mon, 26 May 2025 02:30:53 +0530 Subject: [PATCH 01/10] fix: layout structure in admin --- .../(instance)/(dashboard)}/ai/form.tsx | 0 .../(instance)/(dashboard)}/ai/layout.tsx | 0 .../(instance)/(dashboard)}/ai/page.tsx | 0 .../authentication/github/form.tsx | 0 .../authentication/github/page.tsx | 0 .../authentication/gitlab/form.tsx | 0 .../authentication/gitlab/page.tsx | 0 .../authentication/google/form.tsx | 0 .../authentication/google/page.tsx | 0 .../(dashboard)}/authentication/layout.tsx | 0 .../(dashboard)}/authentication/page.tsx | 0 .../(dashboard)}/email/email-config-form.tsx | 0 .../(instance)/(dashboard)}/email/layout.tsx | 0 .../(instance)/(dashboard)}/email/page.tsx | 0 .../(dashboard)}/email/test-email-modal.tsx | 0 .../(instance)/(dashboard)}/general/form.tsx | 0 .../(dashboard)}/general/intercom.tsx | 0 .../(dashboard)}/general/layout.tsx | 0 .../(instance)/(dashboard)}/general/page.tsx | 0 .../(instance)/(dashboard)}/image/form.tsx | 0 .../(instance)/(dashboard)}/image/layout.tsx | 0 .../(instance)/(dashboard)}/image/page.tsx | 0 .../(dashboard)}/workspace/create/form.tsx | 0 .../(dashboard)}/workspace/create/page.tsx | 0 .../(dashboard)}/workspace/layout.tsx | 0 .../(dashboard)}/workspace/page.tsx | 0 admin/app/(all)/(instance)/auth-banner.tsx | 29 +++ .../(all)/(instance)}/auth-helpers.tsx | 0 .../(all)/(instance)/instance.provider.tsx | 52 +++++ admin/app/(all)/(instance)/layout.tsx | 44 ++++ admin/app/(all)/(instance)/page.tsx | 22 ++ admin/app/(all)/(instance)/sign-in-form.tsx | 179 +++++++++++++++ .../(all)/(instance)/user.provider.tsx} | 1 + admin/app/(all)/layout.tsx | 27 +++ .../(all)/store.provider.tsx} | 0 admin/app/(all)/toast.tsx | 10 + admin/app/layout.tsx | 44 ++-- admin/app/page.tsx | 30 --- .../components/authentication/auth-banner.tsx | 29 --- ...{instance-failure-view.tsx => failure.tsx} | 0 admin/core/components/instance/index.ts | 3 - admin/core/components/instance/loading.tsx | 21 ++ admin/core/components/login/index.ts | 1 - admin/core/components/login/sign-in-form.tsx | 194 ----------------- admin/core/hooks/store/use-instance.tsx | 2 +- admin/core/hooks/store/use-theme.tsx | 2 +- admin/core/hooks/store/use-user.tsx | 2 +- admin/core/hooks/store/use-workspace.tsx | 2 +- admin/core/lib/instance-provider.tsx | 55 ----- admin/tsconfig.json | 1 + packages/eslint-config/next.js | 7 +- yarn.lock | 203 ++++-------------- 52 files changed, 450 insertions(+), 510 deletions(-) rename admin/app/{ => (all)/(instance)/(dashboard)}/ai/form.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/ai/layout.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/ai/page.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/authentication/github/form.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/authentication/github/page.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/authentication/gitlab/form.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/authentication/gitlab/page.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/authentication/google/form.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/authentication/google/page.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/authentication/layout.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/authentication/page.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/email/email-config-form.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/email/layout.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/email/page.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/email/test-email-modal.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/general/form.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/general/intercom.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/general/layout.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/general/page.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/image/form.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/image/layout.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/image/page.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/workspace/create/form.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/workspace/create/page.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/workspace/layout.tsx (100%) rename admin/app/{ => (all)/(instance)/(dashboard)}/workspace/page.tsx (100%) create mode 100644 admin/app/(all)/(instance)/auth-banner.tsx rename admin/{core/lib => app/(all)/(instance)}/auth-helpers.tsx (100%) create mode 100644 admin/app/(all)/(instance)/instance.provider.tsx create mode 100644 admin/app/(all)/(instance)/layout.tsx create mode 100644 admin/app/(all)/(instance)/page.tsx create mode 100644 admin/app/(all)/(instance)/sign-in-form.tsx rename admin/{core/lib/user-provider.tsx => app/(all)/(instance)/user.provider.tsx} (99%) create mode 100644 admin/app/(all)/layout.tsx rename admin/{core/lib/store-provider.tsx => app/(all)/store.provider.tsx} (100%) create mode 100644 admin/app/(all)/toast.tsx delete mode 100644 admin/app/page.tsx rename admin/core/components/instance/{instance-failure-view.tsx => failure.tsx} (100%) delete mode 100644 admin/core/components/instance/index.ts create mode 100644 admin/core/components/instance/loading.tsx delete mode 100644 admin/core/components/login/index.ts delete mode 100644 admin/core/components/login/sign-in-form.tsx delete mode 100644 admin/core/lib/instance-provider.tsx diff --git a/admin/app/ai/form.tsx b/admin/app/(all)/(instance)/(dashboard)/ai/form.tsx similarity index 100% rename from admin/app/ai/form.tsx rename to admin/app/(all)/(instance)/(dashboard)/ai/form.tsx diff --git a/admin/app/ai/layout.tsx b/admin/app/(all)/(instance)/(dashboard)/ai/layout.tsx similarity index 100% rename from admin/app/ai/layout.tsx rename to admin/app/(all)/(instance)/(dashboard)/ai/layout.tsx diff --git a/admin/app/ai/page.tsx b/admin/app/(all)/(instance)/(dashboard)/ai/page.tsx similarity index 100% rename from admin/app/ai/page.tsx rename to admin/app/(all)/(instance)/(dashboard)/ai/page.tsx diff --git a/admin/app/authentication/github/form.tsx b/admin/app/(all)/(instance)/(dashboard)/authentication/github/form.tsx similarity index 100% rename from admin/app/authentication/github/form.tsx rename to admin/app/(all)/(instance)/(dashboard)/authentication/github/form.tsx diff --git a/admin/app/authentication/github/page.tsx b/admin/app/(all)/(instance)/(dashboard)/authentication/github/page.tsx similarity index 100% rename from admin/app/authentication/github/page.tsx rename to admin/app/(all)/(instance)/(dashboard)/authentication/github/page.tsx diff --git a/admin/app/authentication/gitlab/form.tsx b/admin/app/(all)/(instance)/(dashboard)/authentication/gitlab/form.tsx similarity index 100% rename from admin/app/authentication/gitlab/form.tsx rename to admin/app/(all)/(instance)/(dashboard)/authentication/gitlab/form.tsx diff --git a/admin/app/authentication/gitlab/page.tsx b/admin/app/(all)/(instance)/(dashboard)/authentication/gitlab/page.tsx similarity index 100% rename from admin/app/authentication/gitlab/page.tsx rename to admin/app/(all)/(instance)/(dashboard)/authentication/gitlab/page.tsx diff --git a/admin/app/authentication/google/form.tsx b/admin/app/(all)/(instance)/(dashboard)/authentication/google/form.tsx similarity index 100% rename from admin/app/authentication/google/form.tsx rename to admin/app/(all)/(instance)/(dashboard)/authentication/google/form.tsx diff --git a/admin/app/authentication/google/page.tsx b/admin/app/(all)/(instance)/(dashboard)/authentication/google/page.tsx similarity index 100% rename from admin/app/authentication/google/page.tsx rename to admin/app/(all)/(instance)/(dashboard)/authentication/google/page.tsx diff --git a/admin/app/authentication/layout.tsx b/admin/app/(all)/(instance)/(dashboard)/authentication/layout.tsx similarity index 100% rename from admin/app/authentication/layout.tsx rename to admin/app/(all)/(instance)/(dashboard)/authentication/layout.tsx diff --git a/admin/app/authentication/page.tsx b/admin/app/(all)/(instance)/(dashboard)/authentication/page.tsx similarity index 100% rename from admin/app/authentication/page.tsx rename to admin/app/(all)/(instance)/(dashboard)/authentication/page.tsx diff --git a/admin/app/email/email-config-form.tsx b/admin/app/(all)/(instance)/(dashboard)/email/email-config-form.tsx similarity index 100% rename from admin/app/email/email-config-form.tsx rename to admin/app/(all)/(instance)/(dashboard)/email/email-config-form.tsx diff --git a/admin/app/email/layout.tsx b/admin/app/(all)/(instance)/(dashboard)/email/layout.tsx similarity index 100% rename from admin/app/email/layout.tsx rename to admin/app/(all)/(instance)/(dashboard)/email/layout.tsx diff --git a/admin/app/email/page.tsx b/admin/app/(all)/(instance)/(dashboard)/email/page.tsx similarity index 100% rename from admin/app/email/page.tsx rename to admin/app/(all)/(instance)/(dashboard)/email/page.tsx diff --git a/admin/app/email/test-email-modal.tsx b/admin/app/(all)/(instance)/(dashboard)/email/test-email-modal.tsx similarity index 100% rename from admin/app/email/test-email-modal.tsx rename to admin/app/(all)/(instance)/(dashboard)/email/test-email-modal.tsx diff --git a/admin/app/general/form.tsx b/admin/app/(all)/(instance)/(dashboard)/general/form.tsx similarity index 100% rename from admin/app/general/form.tsx rename to admin/app/(all)/(instance)/(dashboard)/general/form.tsx diff --git a/admin/app/general/intercom.tsx b/admin/app/(all)/(instance)/(dashboard)/general/intercom.tsx similarity index 100% rename from admin/app/general/intercom.tsx rename to admin/app/(all)/(instance)/(dashboard)/general/intercom.tsx diff --git a/admin/app/general/layout.tsx b/admin/app/(all)/(instance)/(dashboard)/general/layout.tsx similarity index 100% rename from admin/app/general/layout.tsx rename to admin/app/(all)/(instance)/(dashboard)/general/layout.tsx diff --git a/admin/app/general/page.tsx b/admin/app/(all)/(instance)/(dashboard)/general/page.tsx similarity index 100% rename from admin/app/general/page.tsx rename to admin/app/(all)/(instance)/(dashboard)/general/page.tsx diff --git a/admin/app/image/form.tsx b/admin/app/(all)/(instance)/(dashboard)/image/form.tsx similarity index 100% rename from admin/app/image/form.tsx rename to admin/app/(all)/(instance)/(dashboard)/image/form.tsx diff --git a/admin/app/image/layout.tsx b/admin/app/(all)/(instance)/(dashboard)/image/layout.tsx similarity index 100% rename from admin/app/image/layout.tsx rename to admin/app/(all)/(instance)/(dashboard)/image/layout.tsx diff --git a/admin/app/image/page.tsx b/admin/app/(all)/(instance)/(dashboard)/image/page.tsx similarity index 100% rename from admin/app/image/page.tsx rename to admin/app/(all)/(instance)/(dashboard)/image/page.tsx diff --git a/admin/app/workspace/create/form.tsx b/admin/app/(all)/(instance)/(dashboard)/workspace/create/form.tsx similarity index 100% rename from admin/app/workspace/create/form.tsx rename to admin/app/(all)/(instance)/(dashboard)/workspace/create/form.tsx diff --git a/admin/app/workspace/create/page.tsx b/admin/app/(all)/(instance)/(dashboard)/workspace/create/page.tsx similarity index 100% rename from admin/app/workspace/create/page.tsx rename to admin/app/(all)/(instance)/(dashboard)/workspace/create/page.tsx diff --git a/admin/app/workspace/layout.tsx b/admin/app/(all)/(instance)/(dashboard)/workspace/layout.tsx similarity index 100% rename from admin/app/workspace/layout.tsx rename to admin/app/(all)/(instance)/(dashboard)/workspace/layout.tsx diff --git a/admin/app/workspace/page.tsx b/admin/app/(all)/(instance)/(dashboard)/workspace/page.tsx similarity index 100% rename from admin/app/workspace/page.tsx rename to admin/app/(all)/(instance)/(dashboard)/workspace/page.tsx diff --git a/admin/app/(all)/(instance)/auth-banner.tsx b/admin/app/(all)/(instance)/auth-banner.tsx new file mode 100644 index 00000000000..7c1e5ea292b --- /dev/null +++ b/admin/app/(all)/(instance)/auth-banner.tsx @@ -0,0 +1,29 @@ +import { FC } from "react"; +import { Info, X } from "lucide-react"; +// plane constants +import { TAuthErrorInfo } from "@plane/constants"; + +type TAuthBanner = { + bannerData: TAuthErrorInfo | undefined; + handleBannerData?: (bannerData: TAuthErrorInfo | undefined) => void; +}; + +export const AuthBanner: FC = (props) => { + const { bannerData, handleBannerData } = props; + + if (!bannerData) return <>; + return ( +
+
+ +
+
{bannerData?.message}
+
handleBannerData && handleBannerData(undefined)} + > + +
+
+ ); +}; diff --git a/admin/core/lib/auth-helpers.tsx b/admin/app/(all)/(instance)/auth-helpers.tsx similarity index 100% rename from admin/core/lib/auth-helpers.tsx rename to admin/app/(all)/(instance)/auth-helpers.tsx diff --git a/admin/app/(all)/(instance)/instance.provider.tsx b/admin/app/(all)/(instance)/instance.provider.tsx new file mode 100644 index 00000000000..3a2ca838c2f --- /dev/null +++ b/admin/app/(all)/(instance)/instance.provider.tsx @@ -0,0 +1,52 @@ +import { FC, ReactNode } from "react"; +import { observer } from "mobx-react"; +import useSWR from "swr"; +// components +import { InstanceFailureView } from "@/components/instance/failure"; +import { InstanceLoading } from "@/components/instance/loading"; +import { InstanceSetupForm } from "@/components/instance/setup-form"; +// hooks +import { useInstance } from "@/hooks/store"; + +type InstanceProviderProps = { + children: ReactNode; +}; + +export const InstanceProvider: FC = observer((props) => { + const { children } = props; + + // store hooks + const { instance, error, fetchInstanceInfo } = useInstance(); + // fetching instance details + useSWR("INSTANCE_DETAILS", () => fetchInstanceInfo(), { + revalidateOnFocus: false, + revalidateIfStale: false, + errorRetryCount: 0, + }); + + if (!instance && !error) { + return ( +
+ +
+ ); + } + + if (error) { + return ( +
+ +
+ ); + } + + if (instance && !instance?.is_setup_done) { + return ( +
+ +
+ ); + } + + return <>{children}; +}); diff --git a/admin/app/(all)/(instance)/layout.tsx b/admin/app/(all)/(instance)/layout.tsx new file mode 100644 index 00000000000..daf4d19a17a --- /dev/null +++ b/admin/app/(all)/(instance)/layout.tsx @@ -0,0 +1,44 @@ +"use client"; + +import Image from "next/image"; +import Link from "next/link"; +import { useTheme } from "next-themes"; +// logo assets +import PlaneBackgroundPatternDark from "public/auth/background-pattern-dark.svg"; +import PlaneBackgroundPattern from "public/auth/background-pattern.svg"; +import BlackHorizontalLogo from "public/plane-logos/black-horizontal-with-blue-logo.png"; +import WhiteHorizontalLogo from "public/plane-logos/white-horizontal-with-blue-logo.png"; +// providers +import { InstanceProvider } from "./instance.provider"; +import { UserProvider } from "./user.provider"; + +export default function RootLayout({ children }: { children: React.ReactNode }) { + const { resolvedTheme } = useTheme(); + + console.log("resolvedTheme", resolvedTheme); + + const patternBackground = resolvedTheme === "light" ? PlaneBackgroundPattern : PlaneBackgroundPatternDark; + const logo = resolvedTheme === "light" ? BlackHorizontalLogo : WhiteHorizontalLogo; + + return ( +
+
+
+
+ + Plane logo + +
+
+
+ Plane background pattern +
+
+ + {children} + +
+
+
+ ); +} diff --git a/admin/app/(all)/(instance)/page.tsx b/admin/app/(all)/(instance)/page.tsx new file mode 100644 index 00000000000..b55b42c3a5b --- /dev/null +++ b/admin/app/(all)/(instance)/page.tsx @@ -0,0 +1,22 @@ +"use client"; + +// components +import { InstanceSignInForm } from "./sign-in-form"; + +export default function HomePage() { + return ( +
+
+
+

+ Manage your Plane instance +

+

+ Configure instance-wide settings to secure your instance +

+
+ +
+
+ ); +} diff --git a/admin/app/(all)/(instance)/sign-in-form.tsx b/admin/app/(all)/(instance)/sign-in-form.tsx new file mode 100644 index 00000000000..689cb7e309a --- /dev/null +++ b/admin/app/(all)/(instance)/sign-in-form.tsx @@ -0,0 +1,179 @@ +"use client"; + +import { FC, useEffect, useMemo, useState } from "react"; +import { useSearchParams } from "next/navigation"; +import { Eye, EyeOff } from "lucide-react"; +// plane internal packages +import { API_BASE_URL, EAdminAuthErrorCodes, TAuthErrorInfo } from "@plane/constants"; +import { AuthService } from "@plane/services"; +import { Button, Input, Spinner } from "@plane/ui"; +// components +import { Banner } from "@/components/common"; +// local components +import { AuthBanner } from "./auth-banner"; +import { authErrorHandler } from "./auth-helpers"; + +// service initialization +const authService = new AuthService(); + +// error codes +enum EErrorCodes { + INSTANCE_NOT_CONFIGURED = "INSTANCE_NOT_CONFIGURED", + REQUIRED_EMAIL_PASSWORD = "REQUIRED_EMAIL_PASSWORD", + INVALID_EMAIL = "INVALID_EMAIL", + USER_DOES_NOT_EXIST = "USER_DOES_NOT_EXIST", + AUTHENTICATION_FAILED = "AUTHENTICATION_FAILED", +} + +type TError = { + type: EErrorCodes | undefined; + message: string | undefined; +}; + +// form data +type TFormData = { + email: string; + password: string; +}; + +const defaultFromData: TFormData = { + email: "", + password: "", +}; + +export const InstanceSignInForm: FC = (props) => { + const {} = props; + // search params + const searchParams = useSearchParams(); + const emailParam = searchParams.get("email") || undefined; + const errorCode = searchParams.get("error_code") || undefined; + const errorMessage = searchParams.get("error_message") || undefined; + // state + const [showPassword, setShowPassword] = useState(false); + const [csrfToken, setCsrfToken] = useState(undefined); + const [formData, setFormData] = useState(defaultFromData); + const [isSubmitting, setIsSubmitting] = useState(false); + const [errorInfo, setErrorInfo] = useState(undefined); + + const handleFormChange = (key: keyof TFormData, value: string | boolean) => + setFormData((prev) => ({ ...prev, [key]: value })); + + useEffect(() => { + if (csrfToken === undefined) + authService.requestCSRFToken().then((data) => data?.csrf_token && setCsrfToken(data.csrf_token)); + }, [csrfToken]); + + useEffect(() => { + if (emailParam) setFormData((prev) => ({ ...prev, email: emailParam })); + }, [emailParam]); + + // derived values + const errorData: TError = useMemo(() => { + if (errorCode && errorMessage) { + switch (errorCode) { + case EErrorCodes.INSTANCE_NOT_CONFIGURED: + return { type: EErrorCodes.INVALID_EMAIL, message: errorMessage }; + case EErrorCodes.REQUIRED_EMAIL_PASSWORD: + return { type: EErrorCodes.REQUIRED_EMAIL_PASSWORD, message: errorMessage }; + case EErrorCodes.INVALID_EMAIL: + return { type: EErrorCodes.INVALID_EMAIL, message: errorMessage }; + case EErrorCodes.USER_DOES_NOT_EXIST: + return { type: EErrorCodes.USER_DOES_NOT_EXIST, message: errorMessage }; + case EErrorCodes.AUTHENTICATION_FAILED: + return { type: EErrorCodes.AUTHENTICATION_FAILED, message: errorMessage }; + default: + return { type: undefined, message: undefined }; + } + } else return { type: undefined, message: undefined }; + }, [errorCode, errorMessage]); + + const isButtonDisabled = useMemo( + () => (!isSubmitting && formData.email && formData.password ? false : true), + [formData.email, formData.password, isSubmitting] + ); + + useEffect(() => { + if (errorCode) { + const errorDetail = authErrorHandler(errorCode?.toString() as EAdminAuthErrorCodes); + if (errorDetail) { + setErrorInfo(errorDetail); + } + } + }, [errorCode]); + + return ( +
setIsSubmitting(true)} + onError={() => setIsSubmitting(false)} + > + {errorData.type && errorData?.message ? ( + + ) : ( + <>{errorInfo && setErrorInfo(value)} />} + )} + + +
+ + handleFormChange("email", e.target.value)} + autoComplete="on" + autoFocus + /> +
+ +
+ +
+ handleFormChange("password", e.target.value)} + autoComplete="on" + /> + {showPassword ? ( + + ) : ( + + )} +
+
+
+ +
+ + ); +}; diff --git a/admin/core/lib/user-provider.tsx b/admin/app/(all)/(instance)/user.provider.tsx similarity index 99% rename from admin/core/lib/user-provider.tsx rename to admin/app/(all)/(instance)/user.provider.tsx index 17d70262797..3a50823dcb7 100644 --- a/admin/core/lib/user-provider.tsx +++ b/admin/app/(all)/(instance)/user.provider.tsx @@ -19,6 +19,7 @@ export const UserProvider: FC = observer(({ children }) => { useSWR("CURRENT_USER", () => fetchCurrentUser(), { shouldRetryOnError: false, }); + useSWR("INSTANCE_ADMINS", () => fetchInstanceAdmins()); useEffect(() => { diff --git a/admin/app/(all)/layout.tsx b/admin/app/(all)/layout.tsx new file mode 100644 index 00000000000..321496e13b3 --- /dev/null +++ b/admin/app/(all)/layout.tsx @@ -0,0 +1,27 @@ +"use client"; + +import { ThemeProvider } from "next-themes"; +import { SWRConfig } from "swr"; +// providers +import { StoreProvider } from "./store.provider"; +import { ToastWithTheme } from "./toast"; + +const DEFAULT_SWR_CONFIG = { + refreshWhenHidden: false, + revalidateIfStale: false, + revalidateOnFocus: false, + revalidateOnMount: true, + refreshInterval: 600000, + errorRetryCount: 3, +}; + +export default function InstanceLayout({ children }: { children: React.ReactNode }) { + return ( + + + + {children} + + + ); +} diff --git a/admin/core/lib/store-provider.tsx b/admin/app/(all)/store.provider.tsx similarity index 100% rename from admin/core/lib/store-provider.tsx rename to admin/app/(all)/store.provider.tsx diff --git a/admin/app/(all)/toast.tsx b/admin/app/(all)/toast.tsx new file mode 100644 index 00000000000..7d7938a9b16 --- /dev/null +++ b/admin/app/(all)/toast.tsx @@ -0,0 +1,10 @@ +"use client"; + +import { useTheme } from "next-themes"; +import { Toast } from "@plane/ui"; +import { resolveGeneralTheme } from "@plane/utils"; + +export const ToastWithTheme = () => { + const { resolvedTheme } = useTheme(); + return ; +}; diff --git a/admin/app/layout.tsx b/admin/app/layout.tsx index b10e9186c3c..e735723695e 100644 --- a/admin/app/layout.tsx +++ b/admin/app/layout.tsx @@ -1,22 +1,25 @@ -"use client"; - import { ReactNode } from "react"; -import { ThemeProvider, useTheme } from "next-themes"; -import { SWRConfig } from "swr"; +import { Metadata } from "next"; // plane imports -import { ADMIN_BASE_PATH, DEFAULT_SWR_CONFIG } from "@plane/constants"; -import { Toast } from "@plane/ui"; -import { resolveGeneralTheme } from "@plane/utils"; -// lib -import { InstanceProvider } from "@/lib/instance-provider"; -import { StoreProvider } from "@/lib/store-provider"; -import { UserProvider } from "@/lib/user-provider"; +import { ADMIN_BASE_PATH } from "@plane/constants"; // styles import "@/styles/globals.css"; -const ToastWithTheme = () => { - const { resolvedTheme } = useTheme(); - return ; +export const metadata: Metadata = { + title: "Plane | Simple, extensible, open-source project management tool.", + description: + "Open-source project management tool to manage work items, sprints, and product roadmaps with peace of mind.", + openGraph: { + title: "Plane | Simple, extensible, open-source project management tool.", + description: + "Open-source project management tool to manage work items, sprints, and product roadmaps with peace of mind.", + url: "https://plane.so/", + }, + keywords: + "software development, customer feedback, software, accelerate, code management, release management, project management, work items tracking, agile, scrum, kanban, collaboration", + twitter: { + site: "@planepowers", + }, }; export default function RootLayout({ children }: { children: ReactNode }) { @@ -30,18 +33,7 @@ export default function RootLayout({ children }: { children: ReactNode }) { - - - - - - - {children} - - - - - + {children} ); } diff --git a/admin/app/page.tsx b/admin/app/page.tsx deleted file mode 100644 index 1a274025a0a..00000000000 --- a/admin/app/page.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { Metadata } from "next"; -// components -import { InstanceSignInForm } from "@/components/login"; -// layouts -import { DefaultLayout } from "@/layouts/default-layout"; - -export const metadata: Metadata = { - title: "Plane | Simple, extensible, open-source project management tool.", - description: - "Open-source project management tool to manage work items, sprints, and product roadmaps with peace of mind.", - openGraph: { - title: "Plane | Simple, extensible, open-source project management tool.", - description: - "Open-source project management tool to manage work items, sprints, and product roadmaps with peace of mind.", - url: "https://plane.so/", - }, - keywords: - "software development, customer feedback, software, accelerate, code management, release management, project management, work items tracking, agile, scrum, kanban, collaboration", - twitter: { - site: "@planepowers", - }, -}; - -export default async function LoginPage() { - return ( - - - - ); -} diff --git a/admin/core/components/authentication/auth-banner.tsx b/admin/core/components/authentication/auth-banner.tsx index 7c1e5ea292b..e69de29bb2d 100644 --- a/admin/core/components/authentication/auth-banner.tsx +++ b/admin/core/components/authentication/auth-banner.tsx @@ -1,29 +0,0 @@ -import { FC } from "react"; -import { Info, X } from "lucide-react"; -// plane constants -import { TAuthErrorInfo } from "@plane/constants"; - -type TAuthBanner = { - bannerData: TAuthErrorInfo | undefined; - handleBannerData?: (bannerData: TAuthErrorInfo | undefined) => void; -}; - -export const AuthBanner: FC = (props) => { - const { bannerData, handleBannerData } = props; - - if (!bannerData) return <>; - return ( -
-
- -
-
{bannerData?.message}
-
handleBannerData && handleBannerData(undefined)} - > - -
-
- ); -}; diff --git a/admin/core/components/instance/instance-failure-view.tsx b/admin/core/components/instance/failure.tsx similarity index 100% rename from admin/core/components/instance/instance-failure-view.tsx rename to admin/core/components/instance/failure.tsx diff --git a/admin/core/components/instance/index.ts b/admin/core/components/instance/index.ts deleted file mode 100644 index 56d1933f419..00000000000 --- a/admin/core/components/instance/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./instance-not-ready"; -export * from "./instance-failure-view"; -export * from "./setup-form"; diff --git a/admin/core/components/instance/loading.tsx b/admin/core/components/instance/loading.tsx new file mode 100644 index 00000000000..a21319d9ee2 --- /dev/null +++ b/admin/core/components/instance/loading.tsx @@ -0,0 +1,21 @@ +import Image from "next/image"; +import { useTheme } from "next-themes"; +// assets +import LogoSpinnerDark from "@/public/images/logo-spinner-dark.gif"; +import LogoSpinnerLight from "@/public/images/logo-spinner-light.gif"; + +export const InstanceLoading = () => { + const { resolvedTheme } = useTheme(); + const logoSrc = resolvedTheme === "dark" ? LogoSpinnerDark : LogoSpinnerLight; + + return ( +
+
+
+ logo +

Fetching instance details...

+
+
+
+ ); +}; diff --git a/admin/core/components/login/index.ts b/admin/core/components/login/index.ts deleted file mode 100644 index bdeb387f3fb..00000000000 --- a/admin/core/components/login/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./sign-in-form"; diff --git a/admin/core/components/login/sign-in-form.tsx b/admin/core/components/login/sign-in-form.tsx deleted file mode 100644 index 986e5cebea5..00000000000 --- a/admin/core/components/login/sign-in-form.tsx +++ /dev/null @@ -1,194 +0,0 @@ -"use client"; - -import { FC, useEffect, useMemo, useState } from "react"; -import { useSearchParams } from "next/navigation"; -import { Eye, EyeOff } from "lucide-react"; -// plane internal packages -import { API_BASE_URL, EAdminAuthErrorCodes, TAuthErrorInfo } from "@plane/constants"; -import { AuthService } from "@plane/services"; -import { Button, Input, Spinner } from "@plane/ui"; -// components -import { Banner } from "@/components/common"; -// helpers -import { authErrorHandler } from "@/lib/auth-helpers"; -// local components -import { AuthBanner } from "../authentication"; - -// service initialization -const authService = new AuthService(); - -// error codes -enum EErrorCodes { - INSTANCE_NOT_CONFIGURED = "INSTANCE_NOT_CONFIGURED", - REQUIRED_EMAIL_PASSWORD = "REQUIRED_EMAIL_PASSWORD", - INVALID_EMAIL = "INVALID_EMAIL", - USER_DOES_NOT_EXIST = "USER_DOES_NOT_EXIST", - AUTHENTICATION_FAILED = "AUTHENTICATION_FAILED", -} - -type TError = { - type: EErrorCodes | undefined; - message: string | undefined; -}; - -// form data -type TFormData = { - email: string; - password: string; -}; - -const defaultFromData: TFormData = { - email: "", - password: "", -}; - -export const InstanceSignInForm: FC = (props) => { - const {} = props; - // search params - const searchParams = useSearchParams(); - const emailParam = searchParams.get("email") || undefined; - const errorCode = searchParams.get("error_code") || undefined; - const errorMessage = searchParams.get("error_message") || undefined; - // state - const [showPassword, setShowPassword] = useState(false); - const [csrfToken, setCsrfToken] = useState(undefined); - const [formData, setFormData] = useState(defaultFromData); - const [isSubmitting, setIsSubmitting] = useState(false); - const [errorInfo, setErrorInfo] = useState(undefined); - - const handleFormChange = (key: keyof TFormData, value: string | boolean) => - setFormData((prev) => ({ ...prev, [key]: value })); - - useEffect(() => { - if (csrfToken === undefined) - authService.requestCSRFToken().then((data) => data?.csrf_token && setCsrfToken(data.csrf_token)); - }, [csrfToken]); - - useEffect(() => { - if (emailParam) setFormData((prev) => ({ ...prev, email: emailParam })); - }, [emailParam]); - - // derived values - const errorData: TError = useMemo(() => { - if (errorCode && errorMessage) { - switch (errorCode) { - case EErrorCodes.INSTANCE_NOT_CONFIGURED: - return { type: EErrorCodes.INVALID_EMAIL, message: errorMessage }; - case EErrorCodes.REQUIRED_EMAIL_PASSWORD: - return { type: EErrorCodes.REQUIRED_EMAIL_PASSWORD, message: errorMessage }; - case EErrorCodes.INVALID_EMAIL: - return { type: EErrorCodes.INVALID_EMAIL, message: errorMessage }; - case EErrorCodes.USER_DOES_NOT_EXIST: - return { type: EErrorCodes.USER_DOES_NOT_EXIST, message: errorMessage }; - case EErrorCodes.AUTHENTICATION_FAILED: - return { type: EErrorCodes.AUTHENTICATION_FAILED, message: errorMessage }; - default: - return { type: undefined, message: undefined }; - } - } else return { type: undefined, message: undefined }; - }, [errorCode, errorMessage]); - - const isButtonDisabled = useMemo( - () => (!isSubmitting && formData.email && formData.password ? false : true), - [formData.email, formData.password, isSubmitting] - ); - - useEffect(() => { - if (errorCode) { - const errorDetail = authErrorHandler(errorCode?.toString() as EAdminAuthErrorCodes); - if (errorDetail) { - setErrorInfo(errorDetail); - } - } - }, [errorCode]); - - return ( -
-
-
-

- Manage your Plane instance -

-

- Configure instance-wide settings to secure your instance -

-
- - {errorData.type && errorData?.message ? ( - - ) : ( - <>{errorInfo && setErrorInfo(value)} />} - )} - -
setIsSubmitting(true)} - onError={() => setIsSubmitting(false)} - > - - -
- - handleFormChange("email", e.target.value)} - autoComplete="on" - autoFocus - /> -
- -
- -
- handleFormChange("password", e.target.value)} - autoComplete="on" - /> - {showPassword ? ( - - ) : ( - - )} -
-
-
- -
-
-
-
- ); -}; diff --git a/admin/core/hooks/store/use-instance.tsx b/admin/core/hooks/store/use-instance.tsx index cf2edc39fa4..67ac3bca889 100644 --- a/admin/core/hooks/store/use-instance.tsx +++ b/admin/core/hooks/store/use-instance.tsx @@ -1,6 +1,6 @@ import { useContext } from "react"; // store -import { StoreContext } from "@/lib/store-provider"; +import { StoreContext } from "@/app/(all)/store.provider"; import { IInstanceStore } from "@/store/instance.store"; export const useInstance = (): IInstanceStore => { diff --git a/admin/core/hooks/store/use-theme.tsx b/admin/core/hooks/store/use-theme.tsx index bad89cfeeb5..0f07149b1db 100644 --- a/admin/core/hooks/store/use-theme.tsx +++ b/admin/core/hooks/store/use-theme.tsx @@ -1,6 +1,6 @@ import { useContext } from "react"; // store -import { StoreContext } from "@/lib/store-provider"; +import { StoreContext } from "@/app/(all)/store.provider"; import { IThemeStore } from "@/store/theme.store"; export const useTheme = (): IThemeStore => { diff --git a/admin/core/hooks/store/use-user.tsx b/admin/core/hooks/store/use-user.tsx index 8230031447a..eaf02862e26 100644 --- a/admin/core/hooks/store/use-user.tsx +++ b/admin/core/hooks/store/use-user.tsx @@ -1,6 +1,6 @@ import { useContext } from "react"; // store -import { StoreContext } from "@/lib/store-provider"; +import { StoreContext } from "@/app/(all)/store.provider"; import { IUserStore } from "@/store/user.store"; export const useUser = (): IUserStore => { diff --git a/admin/core/hooks/store/use-workspace.tsx b/admin/core/hooks/store/use-workspace.tsx index e3bde92d530..2203ec948ca 100644 --- a/admin/core/hooks/store/use-workspace.tsx +++ b/admin/core/hooks/store/use-workspace.tsx @@ -1,6 +1,6 @@ import { useContext } from "react"; // store -import { StoreContext } from "@/lib/store-provider"; +import { StoreContext } from "@/app/(all)/store.provider"; import { IWorkspaceStore } from "@/store/workspace.store"; export const useWorkspace = (): IWorkspaceStore => { diff --git a/admin/core/lib/instance-provider.tsx b/admin/core/lib/instance-provider.tsx deleted file mode 100644 index d021e3b83a2..00000000000 --- a/admin/core/lib/instance-provider.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import { FC, ReactNode } from "react"; -import { observer } from "mobx-react"; -import useSWR from "swr"; -// components -import { LogoSpinner } from "@/components/common"; -import { InstanceSetupForm, InstanceFailureView } from "@/components/instance"; -// hooks -import { useInstance } from "@/hooks/store"; -// layout -import { DefaultLayout } from "@/layouts/default-layout"; - -type InstanceProviderProps = { - children: ReactNode; -}; - -export const InstanceProvider: FC = observer((props) => { - const { children } = props; - // store hooks - const { instance, error, fetchInstanceInfo } = useInstance(); - // fetching instance details - useSWR("INSTANCE_DETAILS", () => fetchInstanceInfo(), { - revalidateOnFocus: false, - revalidateIfStale: false, - errorRetryCount: 0, - }); - - if (!instance && !error) - return ( -
- -
- ); - - if (error) { - return ( - -
- -
-
- ); - } - - if (!instance?.is_setup_done) { - return ( - -
- -
-
- ); - } - - return <>{children}; -}); diff --git a/admin/tsconfig.json b/admin/tsconfig.json index df72d07b406..d85abf2cc9a 100644 --- a/admin/tsconfig.json +++ b/admin/tsconfig.json @@ -8,6 +8,7 @@ ], "baseUrl": ".", "paths": { + "@/app/*": ["app/*"], "@/*": ["core/*"], "@/public/*": ["public/*"], "@/plane-admin/*": ["ce/*"], diff --git a/packages/eslint-config/next.js b/packages/eslint-config/next.js index 543cd131a42..a2da6601059 100644 --- a/packages/eslint-config/next.js +++ b/packages/eslint-config/next.js @@ -52,7 +52,7 @@ module.exports = { }, ], "import/order": [ - "error", + "warn", { groups: ["builtin", "external", "internal", "parent", "sibling"], pathGroups: [ @@ -80,6 +80,11 @@ module.exports = { pattern: "@/**", group: "internal", }, + { + pattern: "public/**", + group: "internal", + position: "after", + }, ], pathGroupsExcludedImportTypes: ["builtin", "internal", "react"], alphabetize: { diff --git a/yarn.lock b/yarn.lock index ef27eff52e1..f36ce0afd08 100644 --- a/yarn.lock +++ b/yarn.lock @@ -257,9 +257,9 @@ "@babel/traverse" "^7.25.9" "@babel/types" "^7.25.9" -"@babel/helpers@^7.26.7": +"@babel/helpers@7.26.10", "@babel/helpers@^7.26.7": version "7.26.10" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz#6baea3cd62ec2d0c1068778d63cb1314f6637384" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.26.10.tgz#6baea3cd62ec2d0c1068778d63cb1314f6637384" integrity sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g== dependencies: "@babel/template" "^7.26.9" @@ -852,9 +852,9 @@ "@babel/plugin-transform-modules-commonjs" "^7.25.9" "@babel/plugin-transform-typescript" "^7.25.9" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.20.13", "@babel/runtime@^7.23.9", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7": +"@babel/runtime@7.26.10", "@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.20.13", "@babel/runtime@^7.23.9", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7": version "7.26.10" - resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.10.tgz#a07b4d8fa27af131a633d7b3524db803eb4764c2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.10.tgz#a07b4d8fa27af131a633d7b3524db803eb4764c2" integrity sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw== dependencies: regenerator-runtime "^0.14.0" @@ -1124,251 +1124,126 @@ resolved "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz#5e13fac887f08c44f76b0ccaf3370eb00fec9bb6" integrity sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg== -"@esbuild/aix-ppc64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz#38848d3e25afe842a7943643cbcd387cc6e13461" - integrity sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA== - "@esbuild/aix-ppc64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz#499600c5e1757a524990d5d92601f0ac3ce87f64" integrity sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ== -"@esbuild/android-arm64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz#f592957ae8b5643129fa889c79e69cd8669bb894" - integrity sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg== - "@esbuild/android-arm64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz#b9b8231561a1dfb94eb31f4ee056b92a985c324f" integrity sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g== -"@esbuild/android-arm@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.24.2.tgz#72d8a2063aa630308af486a7e5cbcd1e134335b3" - integrity sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q== - "@esbuild/android-arm@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.25.0.tgz#ca6e7888942505f13e88ac9f5f7d2a72f9facd2b" integrity sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g== -"@esbuild/android-x64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.24.2.tgz#9a7713504d5f04792f33be9c197a882b2d88febb" - integrity sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw== - "@esbuild/android-x64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.25.0.tgz#e765ea753bac442dfc9cb53652ce8bd39d33e163" integrity sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg== -"@esbuild/darwin-arm64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz#02ae04ad8ebffd6e2ea096181b3366816b2b5936" - integrity sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA== - "@esbuild/darwin-arm64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz#fa394164b0d89d4fdc3a8a21989af70ef579fa2c" integrity sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw== -"@esbuild/darwin-x64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz#9ec312bc29c60e1b6cecadc82bd504d8adaa19e9" - integrity sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA== - "@esbuild/darwin-x64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz#91979d98d30ba6e7d69b22c617cc82bdad60e47a" integrity sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg== -"@esbuild/freebsd-arm64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz#5e82f44cb4906d6aebf24497d6a068cfc152fa00" - integrity sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg== - "@esbuild/freebsd-arm64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz#b97e97073310736b430a07b099d837084b85e9ce" integrity sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w== -"@esbuild/freebsd-x64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz#3fb1ce92f276168b75074b4e51aa0d8141ecce7f" - integrity sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q== - "@esbuild/freebsd-x64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz#f3b694d0da61d9910ec7deff794d444cfbf3b6e7" integrity sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A== -"@esbuild/linux-arm64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz#856b632d79eb80aec0864381efd29de8fd0b1f43" - integrity sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg== - "@esbuild/linux-arm64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz#f921f699f162f332036d5657cad9036f7a993f73" integrity sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg== -"@esbuild/linux-arm@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz#c846b4694dc5a75d1444f52257ccc5659021b736" - integrity sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA== - "@esbuild/linux-arm@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz#cc49305b3c6da317c900688995a4050e6cc91ca3" integrity sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg== -"@esbuild/linux-ia32@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz#f8a16615a78826ccbb6566fab9a9606cfd4a37d5" - integrity sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw== - "@esbuild/linux-ia32@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz#3e0736fcfab16cff042dec806247e2c76e109e19" integrity sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg== -"@esbuild/linux-loong64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz#1c451538c765bf14913512c76ed8a351e18b09fc" - integrity sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ== - "@esbuild/linux-loong64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz#ea2bf730883cddb9dfb85124232b5a875b8020c7" integrity sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw== -"@esbuild/linux-mips64el@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz#0846edeefbc3d8d50645c51869cc64401d9239cb" - integrity sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw== - "@esbuild/linux-mips64el@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz#4cababb14eede09248980a2d2d8b966464294ff1" integrity sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ== -"@esbuild/linux-ppc64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz#8e3fc54505671d193337a36dfd4c1a23b8a41412" - integrity sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw== - "@esbuild/linux-ppc64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz#8860a4609914c065373a77242e985179658e1951" integrity sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw== -"@esbuild/linux-riscv64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz#6a1e92096d5e68f7bb10a0d64bb5b6d1daf9a694" - integrity sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q== - "@esbuild/linux-riscv64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz#baf26e20bb2d38cfb86ee282dff840c04f4ed987" integrity sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA== -"@esbuild/linux-s390x@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz#ab18e56e66f7a3c49cb97d337cd0a6fea28a8577" - integrity sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw== - "@esbuild/linux-s390x@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz#8323afc0d6cb1b6dc6e9fd21efd9e1542c3640a4" integrity sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA== -"@esbuild/linux-x64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz#8140c9b40da634d380b0b29c837a0b4267aff38f" - integrity sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q== - "@esbuild/linux-x64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz#08fcf60cb400ed2382e9f8e0f5590bac8810469a" integrity sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw== -"@esbuild/netbsd-arm64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz#65f19161432bafb3981f5f20a7ff45abb2e708e6" - integrity sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw== - "@esbuild/netbsd-arm64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz#935c6c74e20f7224918fbe2e6c6fe865b6c6ea5b" integrity sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw== -"@esbuild/netbsd-x64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz#7a3a97d77abfd11765a72f1c6f9b18f5396bcc40" - integrity sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw== - "@esbuild/netbsd-x64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz#414677cef66d16c5a4d210751eb2881bb9c1b62b" integrity sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA== -"@esbuild/openbsd-arm64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz#58b00238dd8f123bfff68d3acc53a6ee369af89f" - integrity sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A== - "@esbuild/openbsd-arm64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz#8fd55a4d08d25cdc572844f13c88d678c84d13f7" integrity sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw== -"@esbuild/openbsd-x64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz#0ac843fda0feb85a93e288842936c21a00a8a205" - integrity sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA== - "@esbuild/openbsd-x64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz#0c48ddb1494bbc2d6bcbaa1429a7f465fa1dedde" integrity sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg== -"@esbuild/sunos-x64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz#8b7aa895e07828d36c422a4404cc2ecf27fb15c6" - integrity sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig== - "@esbuild/sunos-x64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz#86ff9075d77962b60dd26203d7352f92684c8c92" integrity sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg== -"@esbuild/win32-arm64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz#c023afb647cabf0c3ed13f0eddfc4f1d61c66a85" - integrity sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ== - "@esbuild/win32-arm64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz#849c62327c3229467f5b5cd681bf50588442e96c" integrity sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw== -"@esbuild/win32-ia32@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz#96c356132d2dda990098c8b8b951209c3cd743c2" - integrity sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA== - "@esbuild/win32-ia32@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz#f62eb480cd7cca088cb65bb46a6db25b725dc079" integrity sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA== -"@esbuild/win32-x64@0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz#34aa0b52d0fbb1a654b596acfa595f0c7b77a77b" - integrity sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg== - "@esbuild/win32-x64@0.25.0": version "0.25.0" resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz#c8e119a30a7c8d60b9d2e22d2073722dde3b710b" @@ -6055,40 +5930,9 @@ esbuild-register@^3.5.0: dependencies: debug "^4.3.4" -"esbuild@^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0": - version "0.24.2" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.24.2.tgz#b5b55bee7de017bff5fb8a4e3e44f2ebe2c3567d" - integrity sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA== - optionalDependencies: - "@esbuild/aix-ppc64" "0.24.2" - "@esbuild/android-arm" "0.24.2" - "@esbuild/android-arm64" "0.24.2" - "@esbuild/android-x64" "0.24.2" - "@esbuild/darwin-arm64" "0.24.2" - "@esbuild/darwin-x64" "0.24.2" - "@esbuild/freebsd-arm64" "0.24.2" - "@esbuild/freebsd-x64" "0.24.2" - "@esbuild/linux-arm" "0.24.2" - "@esbuild/linux-arm64" "0.24.2" - "@esbuild/linux-ia32" "0.24.2" - "@esbuild/linux-loong64" "0.24.2" - "@esbuild/linux-mips64el" "0.24.2" - "@esbuild/linux-ppc64" "0.24.2" - "@esbuild/linux-riscv64" "0.24.2" - "@esbuild/linux-s390x" "0.24.2" - "@esbuild/linux-x64" "0.24.2" - "@esbuild/netbsd-arm64" "0.24.2" - "@esbuild/netbsd-x64" "0.24.2" - "@esbuild/openbsd-arm64" "0.24.2" - "@esbuild/openbsd-x64" "0.24.2" - "@esbuild/sunos-x64" "0.24.2" - "@esbuild/win32-arm64" "0.24.2" - "@esbuild/win32-ia32" "0.24.2" - "@esbuild/win32-x64" "0.24.2" - -esbuild@^0.25.0: +esbuild@0.25.0, "esbuild@^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0", esbuild@^0.25.0: version "0.25.0" - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz#0de1787a77206c5a79eeb634a623d39b5006ce92" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.25.0.tgz#0de1787a77206c5a79eeb634a623d39b5006ce92" integrity sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw== optionalDependencies: "@esbuild/aix-ppc64" "0.25.0" @@ -8557,9 +8401,9 @@ mz@^2.7.0: object-assign "^4.0.1" thenify-all "^1.0.0" -nanoid@^3.3.6, nanoid@^3.3.8: +nanoid@3.3.8, nanoid@^3.3.6, nanoid@^3.3.8: version "3.3.8" - resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w== napi-build-utils@^2.0.0: @@ -10717,7 +10561,16 @@ streamx@^2.15.0, streamx@^2.21.0: optionalDependencies: bare-events "^2.2.0" -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -10810,7 +10663,14 @@ string_decoder@^1.1.1, string_decoder@^1.3.0: dependencies: safe-buffer "~5.2.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -12028,7 +11888,16 @@ word-wrap@^1.2.5: resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== From 3303e50ec59b75c49c50a9ed49d976030f7544ca Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Mon, 26 May 2025 03:02:01 +0530 Subject: [PATCH 02/10] fix: layout structure in admin --- .../{(instance) => }/(dashboard)/ai/form.tsx | 0 .../(dashboard)/ai/layout.tsx | 5 +- .../{(instance) => }/(dashboard)/ai/page.tsx | 0 .../authentication/github/form.tsx | 0 .../authentication/github/page.tsx | 0 .../authentication/gitlab/form.tsx | 0 .../authentication/gitlab/page.tsx | 0 .../authentication/google/form.tsx | 0 .../authentication/google/page.tsx | 0 .../(dashboard)/authentication/layout.tsx | 3 +- .../(dashboard)/authentication/page.tsx | 0 .../(dashboard)/email/email-config-form.tsx | 0 .../(dashboard)/email/layout.tsx | 5 +- .../(dashboard)/email/page.tsx | 0 .../(dashboard)/email/test-email-modal.tsx | 0 .../(dashboard)/general/form.tsx | 0 .../(dashboard)/general/intercom.tsx | 0 .../(dashboard)/general/layout.tsx | 5 +- .../(dashboard)/general/page.tsx | 0 .../(dashboard)/image/form.tsx | 0 .../(dashboard)/image/layout.tsx | 5 +- .../(dashboard)/image/page.tsx | 0 admin/app/(all)/(dashboard)/layout.tsx | 51 +++++++++++++++ .../(dashboard)/workspace/create/form.tsx | 0 .../(dashboard)/workspace/create/page.tsx | 0 .../(dashboard)/workspace/layout.tsx | 6 +- .../(dashboard)/workspace/page.tsx | 0 .../{(instance) => (home)}/auth-banner.tsx | 0 .../{(instance) => (home)}/auth-helpers.tsx | 0 .../(all)/{(instance) => (home)}/layout.tsx | 9 +-- admin/app/(all)/(home)/page.tsx | 62 ++++++++++++++++++ .../{(instance) => (home)}/sign-in-form.tsx | 0 .../(all)/(instance)/instance.provider.tsx | 52 --------------- admin/app/(all)/(instance)/page.tsx | 22 ------- admin/app/(all)/instance.provider.tsx | 23 +++++++ admin/app/(all)/layout.tsx | 8 ++- .../(all)/{(instance) => }/user.provider.tsx | 0 .../authentication/authentication-modes.tsx | 63 +++++++++++++++++-- 38 files changed, 213 insertions(+), 106 deletions(-) rename admin/app/(all)/{(instance) => }/(dashboard)/ai/form.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/ai/layout.tsx (53%) rename admin/app/(all)/{(instance) => }/(dashboard)/ai/page.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/authentication/github/form.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/authentication/github/page.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/authentication/gitlab/form.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/authentication/gitlab/page.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/authentication/google/form.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/authentication/google/page.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/authentication/layout.tsx (70%) rename admin/app/(all)/{(instance) => }/(dashboard)/authentication/page.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/email/email-config-form.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/email/layout.tsx (62%) rename admin/app/(all)/{(instance) => }/(dashboard)/email/page.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/email/test-email-modal.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/general/form.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/general/intercom.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/general/layout.tsx (57%) rename admin/app/(all)/{(instance) => }/(dashboard)/general/page.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/image/form.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/image/layout.tsx (62%) rename admin/app/(all)/{(instance) => }/(dashboard)/image/page.tsx (100%) create mode 100644 admin/app/(all)/(dashboard)/layout.tsx rename admin/app/(all)/{(instance) => }/(dashboard)/workspace/create/form.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/workspace/create/page.tsx (100%) rename admin/app/(all)/{(instance) => }/(dashboard)/workspace/layout.tsx (56%) rename admin/app/(all)/{(instance) => }/(dashboard)/workspace/page.tsx (100%) rename admin/app/(all)/{(instance) => (home)}/auth-banner.tsx (100%) rename admin/app/(all)/{(instance) => (home)}/auth-helpers.tsx (100%) rename admin/app/(all)/{(instance) => (home)}/layout.tsx (83%) create mode 100644 admin/app/(all)/(home)/page.tsx rename admin/app/(all)/{(instance) => (home)}/sign-in-form.tsx (100%) delete mode 100644 admin/app/(all)/(instance)/instance.provider.tsx delete mode 100644 admin/app/(all)/(instance)/page.tsx create mode 100644 admin/app/(all)/instance.provider.tsx rename admin/app/(all)/{(instance) => }/user.provider.tsx (100%) diff --git a/admin/app/(all)/(instance)/(dashboard)/ai/form.tsx b/admin/app/(all)/(dashboard)/ai/form.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/ai/form.tsx rename to admin/app/(all)/(dashboard)/ai/form.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/ai/layout.tsx b/admin/app/(all)/(dashboard)/ai/layout.tsx similarity index 53% rename from admin/app/(all)/(instance)/(dashboard)/ai/layout.tsx rename to admin/app/(all)/(dashboard)/ai/layout.tsx index d461a626aa2..42f3796496f 100644 --- a/admin/app/(all)/(instance)/(dashboard)/ai/layout.tsx +++ b/admin/app/(all)/(dashboard)/ai/layout.tsx @@ -1,11 +1,10 @@ import { ReactNode } from "react"; import { Metadata } from "next"; -import { AdminLayout } from "@/layouts/admin-layout"; export const metadata: Metadata = { - title: "Artificial Intelligence Settings - Plane Web", + title: "Artificial Intelligence Settings - God Mode", }; export default function AILayout({ children }: { children: ReactNode }) { - return {children}; + return <>{children}; } diff --git a/admin/app/(all)/(instance)/(dashboard)/ai/page.tsx b/admin/app/(all)/(dashboard)/ai/page.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/ai/page.tsx rename to admin/app/(all)/(dashboard)/ai/page.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/authentication/github/form.tsx b/admin/app/(all)/(dashboard)/authentication/github/form.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/authentication/github/form.tsx rename to admin/app/(all)/(dashboard)/authentication/github/form.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/authentication/github/page.tsx b/admin/app/(all)/(dashboard)/authentication/github/page.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/authentication/github/page.tsx rename to admin/app/(all)/(dashboard)/authentication/github/page.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/authentication/gitlab/form.tsx b/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/authentication/gitlab/form.tsx rename to admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/authentication/gitlab/page.tsx b/admin/app/(all)/(dashboard)/authentication/gitlab/page.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/authentication/gitlab/page.tsx rename to admin/app/(all)/(dashboard)/authentication/gitlab/page.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/authentication/google/form.tsx b/admin/app/(all)/(dashboard)/authentication/google/form.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/authentication/google/form.tsx rename to admin/app/(all)/(dashboard)/authentication/google/form.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/authentication/google/page.tsx b/admin/app/(all)/(dashboard)/authentication/google/page.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/authentication/google/page.tsx rename to admin/app/(all)/(dashboard)/authentication/google/page.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/authentication/layout.tsx b/admin/app/(all)/(dashboard)/authentication/layout.tsx similarity index 70% rename from admin/app/(all)/(instance)/(dashboard)/authentication/layout.tsx rename to admin/app/(all)/(dashboard)/authentication/layout.tsx index c5b70030d76..69753d9608a 100644 --- a/admin/app/(all)/(instance)/(dashboard)/authentication/layout.tsx +++ b/admin/app/(all)/(dashboard)/authentication/layout.tsx @@ -1,11 +1,10 @@ import { ReactNode } from "react"; import { Metadata } from "next"; -import { AdminLayout } from "@/layouts/admin-layout"; export const metadata: Metadata = { title: "Authentication Settings - Plane Web", }; export default function AuthenticationLayout({ children }: { children: ReactNode }) { - return {children}; + return <>{children}; } diff --git a/admin/app/(all)/(instance)/(dashboard)/authentication/page.tsx b/admin/app/(all)/(dashboard)/authentication/page.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/authentication/page.tsx rename to admin/app/(all)/(dashboard)/authentication/page.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/email/email-config-form.tsx b/admin/app/(all)/(dashboard)/email/email-config-form.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/email/email-config-form.tsx rename to admin/app/(all)/(dashboard)/email/email-config-form.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/email/layout.tsx b/admin/app/(all)/(dashboard)/email/layout.tsx similarity index 62% rename from admin/app/(all)/(instance)/(dashboard)/email/layout.tsx rename to admin/app/(all)/(dashboard)/email/layout.tsx index 2084af1ea41..cb321295107 100644 --- a/admin/app/(all)/(instance)/(dashboard)/email/layout.tsx +++ b/admin/app/(all)/(dashboard)/email/layout.tsx @@ -1,15 +1,14 @@ import { ReactNode } from "react"; import { Metadata } from "next"; -import { AdminLayout } from "@/layouts/admin-layout"; interface EmailLayoutProps { children: ReactNode; } export const metadata: Metadata = { - title: "Email Settings - Plane Web", + title: "Email Settings - God Mode", }; export default function EmailLayout({ children }: EmailLayoutProps) { - return {children}; + return <>{children}; } diff --git a/admin/app/(all)/(instance)/(dashboard)/email/page.tsx b/admin/app/(all)/(dashboard)/email/page.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/email/page.tsx rename to admin/app/(all)/(dashboard)/email/page.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/email/test-email-modal.tsx b/admin/app/(all)/(dashboard)/email/test-email-modal.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/email/test-email-modal.tsx rename to admin/app/(all)/(dashboard)/email/test-email-modal.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/general/form.tsx b/admin/app/(all)/(dashboard)/general/form.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/general/form.tsx rename to admin/app/(all)/(dashboard)/general/form.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/general/intercom.tsx b/admin/app/(all)/(dashboard)/general/intercom.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/general/intercom.tsx rename to admin/app/(all)/(dashboard)/general/intercom.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/general/layout.tsx b/admin/app/(all)/(dashboard)/general/layout.tsx similarity index 57% rename from admin/app/(all)/(instance)/(dashboard)/general/layout.tsx rename to admin/app/(all)/(dashboard)/general/layout.tsx index 374257daade..af300051052 100644 --- a/admin/app/(all)/(instance)/(dashboard)/general/layout.tsx +++ b/admin/app/(all)/(dashboard)/general/layout.tsx @@ -1,11 +1,10 @@ import { ReactNode } from "react"; import { Metadata } from "next"; -import { AdminLayout } from "@/layouts/admin-layout"; export const metadata: Metadata = { - title: "General Settings - Plane Web", + title: "General Settings - God Mode", }; export default function GeneralLayout({ children }: { children: ReactNode }) { - return {children}; + return <>{children}; } diff --git a/admin/app/(all)/(instance)/(dashboard)/general/page.tsx b/admin/app/(all)/(dashboard)/general/page.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/general/page.tsx rename to admin/app/(all)/(dashboard)/general/page.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/image/form.tsx b/admin/app/(all)/(dashboard)/image/form.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/image/form.tsx rename to admin/app/(all)/(dashboard)/image/form.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/image/layout.tsx b/admin/app/(all)/(dashboard)/image/layout.tsx similarity index 62% rename from admin/app/(all)/(instance)/(dashboard)/image/layout.tsx rename to admin/app/(all)/(dashboard)/image/layout.tsx index 32233e07837..7ec0ff54b7c 100644 --- a/admin/app/(all)/(instance)/(dashboard)/image/layout.tsx +++ b/admin/app/(all)/(dashboard)/image/layout.tsx @@ -1,15 +1,14 @@ import { ReactNode } from "react"; import { Metadata } from "next"; -import { AdminLayout } from "@/layouts/admin-layout"; interface ImageLayoutProps { children: ReactNode; } export const metadata: Metadata = { - title: "Images Settings - Plane Web", + title: "Images Settings - God Mode", }; export default function ImageLayout({ children }: ImageLayoutProps) { - return {children}; + return <>{children}; } diff --git a/admin/app/(all)/(instance)/(dashboard)/image/page.tsx b/admin/app/(all)/(dashboard)/image/page.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/image/page.tsx rename to admin/app/(all)/(dashboard)/image/page.tsx diff --git a/admin/app/(all)/(dashboard)/layout.tsx b/admin/app/(all)/(dashboard)/layout.tsx new file mode 100644 index 00000000000..203a4b25cca --- /dev/null +++ b/admin/app/(all)/(dashboard)/layout.tsx @@ -0,0 +1,51 @@ +"use client"; + +import { FC, ReactNode, useEffect } from "react"; +import { observer } from "mobx-react"; +import { useRouter } from "next/navigation"; +// components +import { InstanceSidebar } from "@/components/admin-sidebar"; +import { InstanceHeader } from "@/components/auth-header"; +import { LogoSpinner } from "@/components/common"; +import { NewUserPopup } from "@/components/new-user-popup"; +// hooks +import { useUser } from "@/hooks/store"; + +type TAdminLayout = { + children: ReactNode; +}; + +const AdminLayout: FC = (props) => { + const { children } = props; + // router + const router = useRouter(); + // store hooks + const { isUserLoggedIn } = useUser(); + + useEffect(() => { + if (isUserLoggedIn === false) { + router.push("/"); + } + }, [router, isUserLoggedIn]); + + if (isUserLoggedIn === undefined) { + return ( +
+ +
+ ); + } + + return ( +
+ +
+ +
{children}
+
+ +
+ ); +}; + +export default observer(AdminLayout); diff --git a/admin/app/(all)/(instance)/(dashboard)/workspace/create/form.tsx b/admin/app/(all)/(dashboard)/workspace/create/form.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/workspace/create/form.tsx rename to admin/app/(all)/(dashboard)/workspace/create/form.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/workspace/create/page.tsx b/admin/app/(all)/(dashboard)/workspace/create/page.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/workspace/create/page.tsx rename to admin/app/(all)/(dashboard)/workspace/create/page.tsx diff --git a/admin/app/(all)/(instance)/(dashboard)/workspace/layout.tsx b/admin/app/(all)/(dashboard)/workspace/layout.tsx similarity index 56% rename from admin/app/(all)/(instance)/(dashboard)/workspace/layout.tsx rename to admin/app/(all)/(dashboard)/workspace/layout.tsx index 9f2a63c67d5..78b0f3c4036 100644 --- a/admin/app/(all)/(instance)/(dashboard)/workspace/layout.tsx +++ b/admin/app/(all)/(dashboard)/workspace/layout.tsx @@ -1,12 +1,10 @@ import { ReactNode } from "react"; import { Metadata } from "next"; -// layouts -import { AdminLayout } from "@/layouts/admin-layout"; export const metadata: Metadata = { - title: "Workspace Management - Plane Web", + title: "Workspace Management - God Mode", }; export default function WorkspaceManagementLayout({ children }: { children: ReactNode }) { - return {children}; + return <>{children}; } diff --git a/admin/app/(all)/(instance)/(dashboard)/workspace/page.tsx b/admin/app/(all)/(dashboard)/workspace/page.tsx similarity index 100% rename from admin/app/(all)/(instance)/(dashboard)/workspace/page.tsx rename to admin/app/(all)/(dashboard)/workspace/page.tsx diff --git a/admin/app/(all)/(instance)/auth-banner.tsx b/admin/app/(all)/(home)/auth-banner.tsx similarity index 100% rename from admin/app/(all)/(instance)/auth-banner.tsx rename to admin/app/(all)/(home)/auth-banner.tsx diff --git a/admin/app/(all)/(instance)/auth-helpers.tsx b/admin/app/(all)/(home)/auth-helpers.tsx similarity index 100% rename from admin/app/(all)/(instance)/auth-helpers.tsx rename to admin/app/(all)/(home)/auth-helpers.tsx diff --git a/admin/app/(all)/(instance)/layout.tsx b/admin/app/(all)/(home)/layout.tsx similarity index 83% rename from admin/app/(all)/(instance)/layout.tsx rename to admin/app/(all)/(home)/layout.tsx index daf4d19a17a..39127d51250 100644 --- a/admin/app/(all)/(instance)/layout.tsx +++ b/admin/app/(all)/(home)/layout.tsx @@ -8,9 +8,6 @@ import PlaneBackgroundPatternDark from "public/auth/background-pattern-dark.svg" import PlaneBackgroundPattern from "public/auth/background-pattern.svg"; import BlackHorizontalLogo from "public/plane-logos/black-horizontal-with-blue-logo.png"; import WhiteHorizontalLogo from "public/plane-logos/white-horizontal-with-blue-logo.png"; -// providers -import { InstanceProvider } from "./instance.provider"; -import { UserProvider } from "./user.provider"; export default function RootLayout({ children }: { children: React.ReactNode }) { const { resolvedTheme } = useTheme(); @@ -33,11 +30,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
Plane background pattern
-
- - {children} - -
+
{children}
); diff --git a/admin/app/(all)/(home)/page.tsx b/admin/app/(all)/(home)/page.tsx new file mode 100644 index 00000000000..80ea40ee61e --- /dev/null +++ b/admin/app/(all)/(home)/page.tsx @@ -0,0 +1,62 @@ +"use client"; + +import { observer } from "mobx-react"; +// components +import { InstanceFailureView } from "@/components/instance/failure"; +import { InstanceLoading } from "@/components/instance/loading"; +import { InstanceSetupForm } from "@/components/instance/setup-form"; +// hooks +import { useInstance } from "@/hooks/store"; +// components +import { InstanceSignInForm } from "./sign-in-form"; + +const HomePage = () => { + // store hooks + const { instance, error } = useInstance(); + + // if instance is not fetched, show loading + if (!instance && !error) { + return ( +
+ +
+ ); + } + + // if instance fetch fails, show failure view + if (error) { + return ( +
+ +
+ ); + } + + // if instance is fetched and setup is not done, show setup form + if (instance && !instance?.is_setup_done) { + return ( +
+ +
+ ); + } + + // if instance is fetched and setup is done, show sign in form + return ( +
+
+
+

+ Manage your Plane instance +

+

+ Configure instance-wide settings to secure your instance +

+
+ +
+
+ ); +}; + +export default observer(HomePage); diff --git a/admin/app/(all)/(instance)/sign-in-form.tsx b/admin/app/(all)/(home)/sign-in-form.tsx similarity index 100% rename from admin/app/(all)/(instance)/sign-in-form.tsx rename to admin/app/(all)/(home)/sign-in-form.tsx diff --git a/admin/app/(all)/(instance)/instance.provider.tsx b/admin/app/(all)/(instance)/instance.provider.tsx deleted file mode 100644 index 3a2ca838c2f..00000000000 --- a/admin/app/(all)/(instance)/instance.provider.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import { FC, ReactNode } from "react"; -import { observer } from "mobx-react"; -import useSWR from "swr"; -// components -import { InstanceFailureView } from "@/components/instance/failure"; -import { InstanceLoading } from "@/components/instance/loading"; -import { InstanceSetupForm } from "@/components/instance/setup-form"; -// hooks -import { useInstance } from "@/hooks/store"; - -type InstanceProviderProps = { - children: ReactNode; -}; - -export const InstanceProvider: FC = observer((props) => { - const { children } = props; - - // store hooks - const { instance, error, fetchInstanceInfo } = useInstance(); - // fetching instance details - useSWR("INSTANCE_DETAILS", () => fetchInstanceInfo(), { - revalidateOnFocus: false, - revalidateIfStale: false, - errorRetryCount: 0, - }); - - if (!instance && !error) { - return ( -
- -
- ); - } - - if (error) { - return ( -
- -
- ); - } - - if (instance && !instance?.is_setup_done) { - return ( -
- -
- ); - } - - return <>{children}; -}); diff --git a/admin/app/(all)/(instance)/page.tsx b/admin/app/(all)/(instance)/page.tsx deleted file mode 100644 index b55b42c3a5b..00000000000 --- a/admin/app/(all)/(instance)/page.tsx +++ /dev/null @@ -1,22 +0,0 @@ -"use client"; - -// components -import { InstanceSignInForm } from "./sign-in-form"; - -export default function HomePage() { - return ( -
-
-
-

- Manage your Plane instance -

-

- Configure instance-wide settings to secure your instance -

-
- -
-
- ); -} diff --git a/admin/app/(all)/instance.provider.tsx b/admin/app/(all)/instance.provider.tsx new file mode 100644 index 00000000000..ac8fa74e82c --- /dev/null +++ b/admin/app/(all)/instance.provider.tsx @@ -0,0 +1,23 @@ +import { FC, ReactNode } from "react"; +import { observer } from "mobx-react"; +import useSWR from "swr"; +// hooks +import { useInstance } from "@/hooks/store"; + +type InstanceProviderProps = { + children: ReactNode; +}; + +export const InstanceProvider: FC = observer((props) => { + const { children } = props; + // store hooks + const { fetchInstanceInfo } = useInstance(); + // fetching instance details + useSWR("INSTANCE_DETAILS", () => fetchInstanceInfo(), { + revalidateOnFocus: false, + revalidateIfStale: false, + errorRetryCount: 0, + }); + + return <>{children}; +}); diff --git a/admin/app/(all)/layout.tsx b/admin/app/(all)/layout.tsx index 321496e13b3..ddfba732a91 100644 --- a/admin/app/(all)/layout.tsx +++ b/admin/app/(all)/layout.tsx @@ -3,8 +3,10 @@ import { ThemeProvider } from "next-themes"; import { SWRConfig } from "swr"; // providers +import { InstanceProvider } from "./instance.provider"; import { StoreProvider } from "./store.provider"; import { ToastWithTheme } from "./toast"; +import { UserProvider } from "./user.provider"; const DEFAULT_SWR_CONFIG = { refreshWhenHidden: false, @@ -20,7 +22,11 @@ export default function InstanceLayout({ children }: { children: React.ReactNode - {children} + + + {children} + + ); diff --git a/admin/app/(all)/(instance)/user.provider.tsx b/admin/app/(all)/user.provider.tsx similarity index 100% rename from admin/app/(all)/(instance)/user.provider.tsx rename to admin/app/(all)/user.provider.tsx diff --git a/admin/ce/components/authentication/authentication-modes.tsx b/admin/ce/components/authentication/authentication-modes.tsx index 3c7ec111a33..1dbc5cc51e6 100644 --- a/admin/ce/components/authentication/authentication-modes.tsx +++ b/admin/ce/components/authentication/authentication-modes.tsx @@ -1,19 +1,30 @@ import { observer } from "mobx-react"; import Image from "next/image"; import { useTheme } from "next-themes"; +import { KeyRound, Mails } from "lucide-react"; // types import { TGetBaseAuthenticationModeProps, TInstanceAuthenticationMethodKeys, TInstanceAuthenticationModes, } from "@plane/types"; +import { resolveGeneralTheme } from "@plane/utils"; // components -import { AuthenticationMethodCard } from "@/components/authentication"; -// helpers -import { getBaseAuthenticationModes } from "@/lib/auth-helpers"; +import { + AuthenticationMethodCard, + EmailCodesConfiguration, + GithubConfiguration, + GitlabConfiguration, + GoogleConfiguration, + PasswordLoginConfiguration, +} from "@/components/authentication"; // plane admin components import { UpgradeButton } from "@/plane-admin/components/common"; -// images +// assets +import githubLightModeImage from "@/public/logos/github-black.png"; +import githubDarkModeImage from "@/public/logos/github-white.png"; +import GitlabLogo from "@/public/logos/gitlab-logo.svg"; +import GoogleLogo from "@/public/logos/google-logo.svg"; import OIDCLogo from "@/public/logos/oidc-logo.svg"; import SAMLLogo from "@/public/logos/saml-logo.svg"; @@ -28,7 +39,49 @@ export const getAuthenticationModes: (props: TGetBaseAuthenticationModeProps) => updateConfig, resolvedTheme, }) => [ - ...getBaseAuthenticationModes({ disabled, updateConfig, resolvedTheme }), + { + key: "unique-codes", + name: "Unique codes", + description: + "Log in or sign up for Plane using codes sent via email. You need to have set up SMTP to use this method.", + icon: , + config: , + }, + { + key: "passwords-login", + name: "Passwords", + description: "Allow members to create accounts with passwords and use it with their email addresses to sign in.", + icon: , + config: , + }, + { + key: "google", + name: "Google", + description: "Allow members to log in or sign up for Plane with their Google accounts.", + icon: Google Logo, + config: , + }, + { + key: "github", + name: "GitHub", + description: "Allow members to log in or sign up for Plane with their GitHub accounts.", + icon: ( + GitHub Logo + ), + config: , + }, + { + key: "gitlab", + name: "GitLab", + description: "Allow members to log in or sign up to plane with their GitLab accounts.", + icon: GitLab Logo, + config: , + }, { key: "oidc", name: "OIDC", From 37601ebbd2b6cf4ab45c969809e562d53d2affd2 Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Mon, 26 May 2025 03:03:58 +0530 Subject: [PATCH 03/10] fix: delete layout files --- admin/core/layouts/admin-layout.tsx | 48 --------------------------- admin/core/layouts/default-layout.tsx | 45 ------------------------- 2 files changed, 93 deletions(-) delete mode 100644 admin/core/layouts/admin-layout.tsx delete mode 100644 admin/core/layouts/default-layout.tsx diff --git a/admin/core/layouts/admin-layout.tsx b/admin/core/layouts/admin-layout.tsx deleted file mode 100644 index 88f71aa3c4a..00000000000 --- a/admin/core/layouts/admin-layout.tsx +++ /dev/null @@ -1,48 +0,0 @@ -"use client"; -import { FC, ReactNode, useEffect } from "react"; -import { observer } from "mobx-react"; -import { useRouter } from "next/navigation"; -// components -import { InstanceSidebar } from "@/components/admin-sidebar"; -import { InstanceHeader } from "@/components/auth-header"; -import { LogoSpinner } from "@/components/common"; -import { NewUserPopup } from "@/components/new-user-popup"; -// hooks -import { useUser } from "@/hooks/store"; - -type TAdminLayout = { - children: ReactNode; -}; - -export const AdminLayout: FC = observer((props) => { - const { children } = props; - // router - const router = useRouter(); - // store hooks - const { isUserLoggedIn } = useUser(); - - useEffect(() => { - if (isUserLoggedIn === false) { - router.push("/"); - } - }, [router, isUserLoggedIn]); - - if (isUserLoggedIn === undefined) { - return ( -
- -
- ); - } - - return ( -
- -
- -
{children}
-
- -
- ); -}); diff --git a/admin/core/layouts/default-layout.tsx b/admin/core/layouts/default-layout.tsx deleted file mode 100644 index 1be40ea1296..00000000000 --- a/admin/core/layouts/default-layout.tsx +++ /dev/null @@ -1,45 +0,0 @@ -"use client"; - -import { FC, ReactNode } from "react"; -import Image from "next/image"; -import Link from "next/link"; -import { useTheme } from "next-themes"; -// logo/ images -import PlaneBackgroundPatternDark from "public/auth/background-pattern-dark.svg"; -import PlaneBackgroundPattern from "public/auth/background-pattern.svg"; -import BlackHorizontalLogo from "public/plane-logos/black-horizontal-with-blue-logo.png"; -import WhiteHorizontalLogo from "public/plane-logos/white-horizontal-with-blue-logo.png"; - -type TDefaultLayout = { - children: ReactNode; - withoutBackground?: boolean; -}; - -export const DefaultLayout: FC = (props) => { - const { children, withoutBackground = false } = props; - // hooks - const { resolvedTheme } = useTheme(); - const patternBackground = resolvedTheme === "dark" ? PlaneBackgroundPatternDark : PlaneBackgroundPattern; - - const logo = resolvedTheme === "light" ? BlackHorizontalLogo : WhiteHorizontalLogo; - - return ( -
-
-
-
- - Plane logo - -
-
- {!withoutBackground && ( -
- Plane background pattern -
- )} -
{children}
-
-
- ); -}; From a7e97d8af25830032d899e07ed05b393d64dbe65 Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Wed, 28 May 2025 21:51:20 +0530 Subject: [PATCH 04/10] chore: updated form related info --- .../(all)/(dashboard)/authentication/gitlab/form.tsx | 12 ++++-------- admin/core/components/admin-sidebar/index.ts | 5 ----- admin/core/components/admin-sidebar/root.tsx | 6 ++++-- admin/core/components/authentication/index.ts | 7 ------- admin/core/components/common/index.ts | 10 ---------- admin/core/components/workspace/index.ts | 1 - 6 files changed, 8 insertions(+), 33 deletions(-) delete mode 100644 admin/core/components/admin-sidebar/index.ts delete mode 100644 admin/core/components/authentication/index.ts delete mode 100644 admin/core/components/common/index.ts delete mode 100644 admin/core/components/workspace/index.ts diff --git a/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx b/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx index f64158744a4..888b2533c2c 100644 --- a/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx +++ b/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx @@ -8,14 +8,10 @@ import { IFormattedInstanceConfiguration, TInstanceGitlabAuthenticationConfigura import { Button, TOAST_TYPE, getButtonStyling, setToast } from "@plane/ui"; import { cn } from "@plane/utils"; // components -import { - CodeBlock, - ConfirmDiscardModal, - ControllerInput, - CopyField, - TControllerInputFormField, - TCopyField, -} from "@/components/common"; +import { CodeBlock } from "@/components/common/code-block"; +import { ConfirmDiscardModal } from "@/components/common/confirm-discard-modal"; +import { ControllerInput, TControllerInputFormField } from "@/components/common/controller-input"; +import { CopyField, TCopyField } from "@/components/common/copy-field"; // hooks import { useInstance } from "@/hooks/store"; diff --git a/admin/core/components/admin-sidebar/index.ts b/admin/core/components/admin-sidebar/index.ts deleted file mode 100644 index e800fe3c5c0..00000000000 --- a/admin/core/components/admin-sidebar/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./root"; -export * from "./help-section"; -export * from "./sidebar-menu"; -export * from "./sidebar-dropdown"; -export * from "./sidebar-menu-hamburger-toogle"; diff --git a/admin/core/components/admin-sidebar/root.tsx b/admin/core/components/admin-sidebar/root.tsx index 05dde0d8ab1..95efef723ca 100644 --- a/admin/core/components/admin-sidebar/root.tsx +++ b/admin/core/components/admin-sidebar/root.tsx @@ -4,10 +4,12 @@ import { FC, useEffect, useRef } from "react"; import { observer } from "mobx-react"; // plane helpers import { useOutsideClickDetector } from "@plane/hooks"; -// components -import { HelpSection, SidebarMenu, SidebarDropdown } from "@/components/admin-sidebar"; // hooks import { useTheme } from "@/hooks/store"; +// components +import { HelpSection } from "./help-section"; +import { SidebarDropdown } from "./sidebar-dropdown"; +import { SidebarMenu } from "./sidebar-menu"; export const InstanceSidebar: FC = observer(() => { // store diff --git a/admin/core/components/authentication/index.ts b/admin/core/components/authentication/index.ts deleted file mode 100644 index d189a727ba6..00000000000 --- a/admin/core/components/authentication/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from "./auth-banner"; -export * from "./email-config-switch"; -export * from "./password-config-switch"; -export * from "./authentication-method-card"; -export * from "./gitlab-config"; -export * from "./github-config"; -export * from "./google-config"; diff --git a/admin/core/components/common/index.ts b/admin/core/components/common/index.ts deleted file mode 100644 index 4d664b0a4aa..00000000000 --- a/admin/core/components/common/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "./breadcrumb-link"; -export * from "./confirm-discard-modal"; -export * from "./controller-input"; -export * from "./copy-field"; -export * from "./password-strength-meter"; -export * from "./banner"; -export * from "./empty-state"; -export * from "./logo-spinner"; -export * from "./page-header"; -export * from "./code-block"; diff --git a/admin/core/components/workspace/index.ts b/admin/core/components/workspace/index.ts deleted file mode 100644 index 24950c4f20f..00000000000 --- a/admin/core/components/workspace/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./list-item"; From 90c49ccc5277f9d9945774660c7e7af7dc8ab87f Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Wed, 11 Jun 2025 03:04:36 +0530 Subject: [PATCH 05/10] fix: admin import statements --- admin/app/(all)/(dashboard)/ai/form.tsx | 2 +- .../authentication/github/form.tsx | 12 +++------ .../authentication/github/layout.tsx | 10 ++++++++ .../authentication/github/page.tsx | 13 +++++----- .../authentication/gitlab/layout.tsx | 10 ++++++++ .../authentication/gitlab/page.tsx | 4 +-- .../authentication/google/form.tsx | 12 +++------ .../authentication/google/layout.tsx | 10 ++++++++ .../authentication/google/page.tsx | 4 +-- .../(dashboard)/email/email-config-form.tsx | 2 +- admin/app/(all)/(dashboard)/general/form.tsx | 2 +- .../(all)/(dashboard)/header.tsx} | 25 +++++++++++++------ admin/app/(all)/(dashboard)/image/form.tsx | 2 +- admin/app/(all)/(dashboard)/layout.tsx | 11 ++++---- .../(all)/(dashboard)}/sidebar-dropdown.tsx | 2 +- .../(dashboard)/sidebar-help-section.tsx} | 2 +- .../(all)/(dashboard)}/sidebar-menu.tsx | 2 +- .../(all)/(dashboard)/sidebar.tsx} | 14 +++++------ .../app/(all)/(dashboard)/workspace/page.tsx | 2 +- admin/app/(all)/(home)/auth-helpers.tsx | 12 ++++----- admin/app/(all)/(home)/sign-in-form.tsx | 2 +- .../authentication/authentication-modes.tsx | 14 +++++------ .../sidebar-menu-hamburger-toogle.tsx | 20 --------------- admin/core/components/instance/setup-form.tsx | 3 ++- 24 files changed, 99 insertions(+), 93 deletions(-) create mode 100644 admin/app/(all)/(dashboard)/authentication/github/layout.tsx create mode 100644 admin/app/(all)/(dashboard)/authentication/gitlab/layout.tsx create mode 100644 admin/app/(all)/(dashboard)/authentication/google/layout.tsx rename admin/{core/components/auth-header.tsx => app/(all)/(dashboard)/header.tsx} (78%) rename admin/{core/components/admin-sidebar => app/(all)/(dashboard)}/sidebar-dropdown.tsx (99%) rename admin/{core/components/admin-sidebar/help-section.tsx => app/(all)/(dashboard)/sidebar-help-section.tsx} (98%) rename admin/{core/components/admin-sidebar => app/(all)/(dashboard)}/sidebar-menu.tsx (98%) rename admin/{core/components/admin-sidebar/root.tsx => app/(all)/(dashboard)/sidebar.tsx} (81%) delete mode 100644 admin/core/components/admin-sidebar/sidebar-menu-hamburger-toogle.tsx diff --git a/admin/app/(all)/(dashboard)/ai/form.tsx b/admin/app/(all)/(dashboard)/ai/form.tsx index 47ab9480eaf..8b7d036ad2f 100644 --- a/admin/app/(all)/(dashboard)/ai/form.tsx +++ b/admin/app/(all)/(dashboard)/ai/form.tsx @@ -5,7 +5,7 @@ import { Lightbulb } from "lucide-react"; import { IFormattedInstanceConfiguration, TInstanceAIConfigurationKeys } from "@plane/types"; import { Button, TOAST_TYPE, setToast } from "@plane/ui"; // components -import { ControllerInput, TControllerInputFormField } from "@/components/common"; +import { ControllerInput, TControllerInputFormField } from "@/components/common/controller-input"; // hooks import { useInstance } from "@/hooks/store"; diff --git a/admin/app/(all)/(dashboard)/authentication/github/form.tsx b/admin/app/(all)/(dashboard)/authentication/github/form.tsx index 0c6d81ae6af..6e5f2a90387 100644 --- a/admin/app/(all)/(dashboard)/authentication/github/form.tsx +++ b/admin/app/(all)/(dashboard)/authentication/github/form.tsx @@ -10,14 +10,10 @@ import { IFormattedInstanceConfiguration, TInstanceGithubAuthenticationConfigura import { Button, TOAST_TYPE, getButtonStyling, setToast } from "@plane/ui"; import { cn } from "@plane/utils"; // components -import { - CodeBlock, - ConfirmDiscardModal, - ControllerInput, - CopyField, - TControllerInputFormField, - TCopyField, -} from "@/components/common"; +import { CodeBlock } from "@/components/common/code-block"; +import { ConfirmDiscardModal } from "@/components/common/confirm-discard-modal"; +import { ControllerInput, TControllerInputFormField } from "@/components/common/controller-input"; +import { CopyField, TCopyField } from "@/components/common/copy-field"; // hooks import { useInstance } from "@/hooks/store"; diff --git a/admin/app/(all)/(dashboard)/authentication/github/layout.tsx b/admin/app/(all)/(dashboard)/authentication/github/layout.tsx new file mode 100644 index 00000000000..373f9340aff --- /dev/null +++ b/admin/app/(all)/(dashboard)/authentication/github/layout.tsx @@ -0,0 +1,10 @@ +import { ReactNode } from "react"; +import { Metadata } from "next"; + +export const metadata: Metadata = { + title: "GitHub Authentication - God Mode", +}; + +export default function GitHubAuthenticationLayout({ children }: { children: ReactNode }) { + return <>{children}; +} diff --git a/admin/app/(all)/(dashboard)/authentication/github/page.tsx b/admin/app/(all)/(dashboard)/authentication/github/page.tsx index 986a5ebd24e..75cb84e4afd 100644 --- a/admin/app/(all)/(dashboard)/authentication/github/page.tsx +++ b/admin/app/(all)/(dashboard)/authentication/github/page.tsx @@ -9,8 +9,7 @@ import useSWR from "swr"; import { Loader, ToggleSwitch, setPromiseToast } from "@plane/ui"; import { resolveGeneralTheme } from "@plane/utils"; // components -import { AuthenticationMethodCard } from "@/components/authentication"; -import { PageHeader } from "@/components/common"; +import { AuthenticationMethodCard } from "@/components/authentication/authentication-method-card"; // hooks import { useInstance } from "@/hooks/store"; // icons @@ -61,9 +60,11 @@ const InstanceGithubAuthenticationPage = observer(() => { setIsSubmitting(false); }); }; + + const isGithubEnabled = enableGithubConfig === "1"; + return ( <> -
{ } config={ { - Boolean(parseInt(enableGithubConfig)) === true - ? updateConfig("IS_GITHUB_ENABLED", "0") - : updateConfig("IS_GITHUB_ENABLED", "1"); + updateConfig("IS_GITHUB_ENABLED", isGithubEnabled ? "0" : "1"); }} size="sm" disabled={isSubmitting || !formattedConfig} diff --git a/admin/app/(all)/(dashboard)/authentication/gitlab/layout.tsx b/admin/app/(all)/(dashboard)/authentication/gitlab/layout.tsx new file mode 100644 index 00000000000..fc89e9752fb --- /dev/null +++ b/admin/app/(all)/(dashboard)/authentication/gitlab/layout.tsx @@ -0,0 +1,10 @@ +import { ReactNode } from "react"; +import { Metadata } from "next"; + +export const metadata: Metadata = { + title: "GitLab Authentication - God Mode", +}; + +export default function GitlabAuthenticationLayout({ children }: { children: ReactNode }) { + return <>{children}; +} diff --git a/admin/app/(all)/(dashboard)/authentication/gitlab/page.tsx b/admin/app/(all)/(dashboard)/authentication/gitlab/page.tsx index 7a4d8248ef2..cdcfcd61bbc 100644 --- a/admin/app/(all)/(dashboard)/authentication/gitlab/page.tsx +++ b/admin/app/(all)/(dashboard)/authentication/gitlab/page.tsx @@ -6,8 +6,7 @@ import Image from "next/image"; import useSWR from "swr"; import { Loader, ToggleSwitch, setPromiseToast } from "@plane/ui"; // components -import { AuthenticationMethodCard } from "@/components/authentication"; -import { PageHeader } from "@/components/common"; +import { AuthenticationMethodCard } from "@/components/authentication/authentication-method-card"; // hooks import { useInstance } from "@/hooks/store"; // icons @@ -57,7 +56,6 @@ const InstanceGitlabAuthenticationPage = observer(() => { }; return ( <> -
{children}; +} diff --git a/admin/app/(all)/(dashboard)/authentication/google/page.tsx b/admin/app/(all)/(dashboard)/authentication/google/page.tsx index 992c7a8a7a1..6ac4ea09b9b 100644 --- a/admin/app/(all)/(dashboard)/authentication/google/page.tsx +++ b/admin/app/(all)/(dashboard)/authentication/google/page.tsx @@ -6,8 +6,7 @@ import Image from "next/image"; import useSWR from "swr"; import { Loader, ToggleSwitch, setPromiseToast } from "@plane/ui"; // components -import { AuthenticationMethodCard } from "@/components/authentication"; -import { PageHeader } from "@/components/common"; +import { AuthenticationMethodCard } from "@/components/authentication/authentication-method-card"; // hooks import { useInstance } from "@/hooks/store"; // icons @@ -57,7 +56,6 @@ const InstanceGoogleAuthenticationPage = observer(() => { }; return ( <> -
{ +export const HamburgerToggle: FC = observer(() => { + const { isSidebarCollapsed, toggleSidebar } = useTheme(); + return ( +
toggleSidebar(!isSidebarCollapsed)} + > + +
+ ); +}); + +export const AdminHeader: FC = observer(() => { const pathName = usePathname(); const getHeaderTitle = (pathName: string) => { @@ -63,7 +74,7 @@ export const InstanceHeader: FC = observer(() => { return (
- + {breadcrumbItems.length >= 0 && (
diff --git a/admin/app/(all)/(dashboard)/image/form.tsx b/admin/app/(all)/(dashboard)/image/form.tsx index 61d2875edaa..be77983ec91 100644 --- a/admin/app/(all)/(dashboard)/image/form.tsx +++ b/admin/app/(all)/(dashboard)/image/form.tsx @@ -4,7 +4,7 @@ import { useForm } from "react-hook-form"; import { IFormattedInstanceConfiguration, TInstanceImageConfigurationKeys } from "@plane/types"; import { Button, TOAST_TYPE, setToast } from "@plane/ui"; // components -import { ControllerInput } from "@/components/common"; +import { ControllerInput } from "@/components/common/controller-input"; // hooks import { useInstance } from "@/hooks/store"; diff --git a/admin/app/(all)/(dashboard)/layout.tsx b/admin/app/(all)/(dashboard)/layout.tsx index 203a4b25cca..ce60ff4cc09 100644 --- a/admin/app/(all)/(dashboard)/layout.tsx +++ b/admin/app/(all)/(dashboard)/layout.tsx @@ -4,12 +4,13 @@ import { FC, ReactNode, useEffect } from "react"; import { observer } from "mobx-react"; import { useRouter } from "next/navigation"; // components -import { InstanceSidebar } from "@/components/admin-sidebar"; -import { InstanceHeader } from "@/components/auth-header"; -import { LogoSpinner } from "@/components/common"; +import { LogoSpinner } from "@/components/common/logo-spinner"; import { NewUserPopup } from "@/components/new-user-popup"; // hooks import { useUser } from "@/hooks/store"; +// local components +import { AdminHeader } from "./header"; +import { AdminSidebar } from "./sidebar"; type TAdminLayout = { children: ReactNode; @@ -38,9 +39,9 @@ const AdminLayout: FC = (props) => { return (
- +
- +
{children}
diff --git a/admin/core/components/admin-sidebar/sidebar-dropdown.tsx b/admin/app/(all)/(dashboard)/sidebar-dropdown.tsx similarity index 99% rename from admin/core/components/admin-sidebar/sidebar-dropdown.tsx rename to admin/app/(all)/(dashboard)/sidebar-dropdown.tsx index 0cde7f5519d..cdce94f0117 100644 --- a/admin/core/components/admin-sidebar/sidebar-dropdown.tsx +++ b/admin/app/(all)/(dashboard)/sidebar-dropdown.tsx @@ -16,7 +16,7 @@ import { useTheme, useUser } from "@/hooks/store"; // service initialization const authService = new AuthService(); -export const SidebarDropdown = observer(() => { +export const AdminSidebarDropdown = observer(() => { // store hooks const { isSidebarCollapsed } = useTheme(); const { currentUser, signOut } = useUser(); diff --git a/admin/core/components/admin-sidebar/help-section.tsx b/admin/app/(all)/(dashboard)/sidebar-help-section.tsx similarity index 98% rename from admin/core/components/admin-sidebar/help-section.tsx rename to admin/app/(all)/(dashboard)/sidebar-help-section.tsx index d776477497b..cedc735a91e 100644 --- a/admin/core/components/admin-sidebar/help-section.tsx +++ b/admin/app/(all)/(dashboard)/sidebar-help-section.tsx @@ -33,7 +33,7 @@ const helpOptions = [ }, ]; -export const HelpSection: FC = observer(() => { +export const AdminSidebarHelpSection: FC = observer(() => { // states const [isNeedHelpOpen, setIsNeedHelpOpen] = useState(false); // store diff --git a/admin/core/components/admin-sidebar/sidebar-menu.tsx b/admin/app/(all)/(dashboard)/sidebar-menu.tsx similarity index 98% rename from admin/core/components/admin-sidebar/sidebar-menu.tsx rename to admin/app/(all)/(dashboard)/sidebar-menu.tsx index 618551ae65c..e536a51454f 100644 --- a/admin/core/components/admin-sidebar/sidebar-menu.tsx +++ b/admin/app/(all)/(dashboard)/sidebar-menu.tsx @@ -49,7 +49,7 @@ const INSTANCE_ADMIN_LINKS = [ }, ]; -export const SidebarMenu = observer(() => { +export const AdminSidebarMenu = observer(() => { // store hooks const { isSidebarCollapsed, toggleSidebar } = useTheme(); // router diff --git a/admin/core/components/admin-sidebar/root.tsx b/admin/app/(all)/(dashboard)/sidebar.tsx similarity index 81% rename from admin/core/components/admin-sidebar/root.tsx rename to admin/app/(all)/(dashboard)/sidebar.tsx index 95efef723ca..09dab86eef2 100644 --- a/admin/core/components/admin-sidebar/root.tsx +++ b/admin/app/(all)/(dashboard)/sidebar.tsx @@ -7,11 +7,11 @@ import { useOutsideClickDetector } from "@plane/hooks"; // hooks import { useTheme } from "@/hooks/store"; // components -import { HelpSection } from "./help-section"; -import { SidebarDropdown } from "./sidebar-dropdown"; -import { SidebarMenu } from "./sidebar-menu"; +import { AdminSidebarDropdown } from "./sidebar-dropdown"; +import { AdminSidebarHelpSection } from "./sidebar-help-section"; +import { AdminSidebarMenu } from "./sidebar-menu"; -export const InstanceSidebar: FC = observer(() => { +export const AdminSidebar: FC = observer(() => { // store const { isSidebarCollapsed, toggleSidebar } = useTheme(); @@ -49,9 +49,9 @@ export const InstanceSidebar: FC = observer(() => { `} >
- - - + + +
); diff --git a/admin/app/(all)/(dashboard)/workspace/page.tsx b/admin/app/(all)/(dashboard)/workspace/page.tsx index 3ca34b69e39..b8f79db04a6 100644 --- a/admin/app/(all)/(dashboard)/workspace/page.tsx +++ b/admin/app/(all)/(dashboard)/workspace/page.tsx @@ -10,7 +10,7 @@ import { TInstanceConfigurationKeys } from "@plane/types"; import { Button, getButtonStyling, Loader, setPromiseToast, ToggleSwitch } from "@plane/ui"; import { cn } from "@plane/utils"; // components -import { WorkspaceListItem } from "@/components/workspace"; +import { WorkspaceListItem } from "@/components/workspace/list-item"; // hooks import { useInstance, useWorkspace } from "@/hooks/store"; diff --git a/admin/app/(all)/(home)/auth-helpers.tsx b/admin/app/(all)/(home)/auth-helpers.tsx index 582b56e298c..64baaf75bde 100644 --- a/admin/app/(all)/(home)/auth-helpers.tsx +++ b/admin/app/(all)/(home)/auth-helpers.tsx @@ -7,13 +7,11 @@ import { SUPPORT_EMAIL, EAdminAuthErrorCodes, TAuthErrorInfo } from "@plane/cons import { TGetBaseAuthenticationModeProps, TInstanceAuthenticationModes } from "@plane/types"; import { resolveGeneralTheme } from "@plane/utils"; // components -import { - EmailCodesConfiguration, - GithubConfiguration, - GitlabConfiguration, - GoogleConfiguration, - PasswordLoginConfiguration, -} from "@/components/authentication"; +import { EmailCodesConfiguration } from "@/components/authentication/email-config-switch"; +import { GithubConfiguration } from "@/components/authentication/github-config"; +import { GitlabConfiguration } from "@/components/authentication/gitlab-config"; +import { GoogleConfiguration } from "@/components/authentication/google-config"; +import { PasswordLoginConfiguration } from "@/components/authentication/password-config-switch"; // images import githubLightModeImage from "@/public/logos/github-black.png"; import githubDarkModeImage from "@/public/logos/github-white.png"; diff --git a/admin/app/(all)/(home)/sign-in-form.tsx b/admin/app/(all)/(home)/sign-in-form.tsx index 689cb7e309a..d0f957e5894 100644 --- a/admin/app/(all)/(home)/sign-in-form.tsx +++ b/admin/app/(all)/(home)/sign-in-form.tsx @@ -8,7 +8,7 @@ import { API_BASE_URL, EAdminAuthErrorCodes, TAuthErrorInfo } from "@plane/const import { AuthService } from "@plane/services"; import { Button, Input, Spinner } from "@plane/ui"; // components -import { Banner } from "@/components/common"; +import { Banner } from "@/components/common/banner"; // local components import { AuthBanner } from "./auth-banner"; import { authErrorHandler } from "./auth-helpers"; diff --git a/admin/ce/components/authentication/authentication-modes.tsx b/admin/ce/components/authentication/authentication-modes.tsx index 1dbc5cc51e6..c9001670292 100644 --- a/admin/ce/components/authentication/authentication-modes.tsx +++ b/admin/ce/components/authentication/authentication-modes.tsx @@ -10,14 +10,12 @@ import { } from "@plane/types"; import { resolveGeneralTheme } from "@plane/utils"; // components -import { - AuthenticationMethodCard, - EmailCodesConfiguration, - GithubConfiguration, - GitlabConfiguration, - GoogleConfiguration, - PasswordLoginConfiguration, -} from "@/components/authentication"; +import { AuthenticationMethodCard } from "@/components/authentication/authentication-method-card"; +import { EmailCodesConfiguration } from "@/components/authentication/email-config-switch"; +import { GithubConfiguration } from "@/components/authentication/github-config"; +import { GitlabConfiguration } from "@/components/authentication/gitlab-config"; +import { GoogleConfiguration } from "@/components/authentication/google-config"; +import { PasswordLoginConfiguration } from "@/components/authentication/password-config-switch"; // plane admin components import { UpgradeButton } from "@/plane-admin/components/common"; // assets diff --git a/admin/core/components/admin-sidebar/sidebar-menu-hamburger-toogle.tsx b/admin/core/components/admin-sidebar/sidebar-menu-hamburger-toogle.tsx deleted file mode 100644 index 337d9baaf34..00000000000 --- a/admin/core/components/admin-sidebar/sidebar-menu-hamburger-toogle.tsx +++ /dev/null @@ -1,20 +0,0 @@ -"use client"; - -import { FC } from "react"; -import { observer } from "mobx-react"; -// hooks -import { Menu } from "lucide-react"; -import { useTheme } from "@/hooks/store"; -// icons - -export const SidebarHamburgerToggle: FC = observer(() => { - const { isSidebarCollapsed, toggleSidebar } = useTheme(); - return ( -
toggleSidebar(!isSidebarCollapsed)} - > - -
- ); -}); diff --git a/admin/core/components/instance/setup-form.tsx b/admin/core/components/instance/setup-form.tsx index fcc5c6c83df..4e771e91be8 100644 --- a/admin/core/components/instance/setup-form.tsx +++ b/admin/core/components/instance/setup-form.tsx @@ -10,7 +10,8 @@ import { AuthService } from "@plane/services"; import { Button, Checkbox, Input, Spinner } from "@plane/ui"; import { getPasswordStrength } from "@plane/utils"; // components -import { Banner, PasswordStrengthMeter } from "@/components/common"; +import { Banner } from "@/components/common/banner"; +import { PasswordStrengthMeter } from "@/components/common/password-strength-meter"; // service initialization const authService = new AuthService(); From 22ae37f60ef04df18b5c4952d512584eb2b0994c Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Wed, 11 Jun 2025 03:44:20 +0530 Subject: [PATCH 06/10] fix: general page unauthorized flickering issue --- admin/app/(all)/(dashboard)/layout.tsx | 24 ++++++++------- admin/app/(all)/(home)/layout.tsx | 2 -- admin/core/store/instance.store.ts | 2 +- admin/core/store/user.store.ts | 1 + packages/services/src/api.service.ts | 34 ---------------------- packages/services/src/user/user.service.ts | 8 ++--- 6 files changed, 19 insertions(+), 52 deletions(-) diff --git a/admin/app/(all)/(dashboard)/layout.tsx b/admin/app/(all)/(dashboard)/layout.tsx index ce60ff4cc09..17962378375 100644 --- a/admin/app/(all)/(dashboard)/layout.tsx +++ b/admin/app/(all)/(dashboard)/layout.tsx @@ -37,16 +37,20 @@ const AdminLayout: FC = (props) => { ); } - return ( -
- -
- -
{children}
-
- -
- ); + if (isUserLoggedIn) { + return ( +
+ +
+ +
{children}
+
+ +
+ ); + } + + return <>; }; export default observer(AdminLayout); diff --git a/admin/app/(all)/(home)/layout.tsx b/admin/app/(all)/(home)/layout.tsx index 39127d51250..19cab04cb01 100644 --- a/admin/app/(all)/(home)/layout.tsx +++ b/admin/app/(all)/(home)/layout.tsx @@ -12,8 +12,6 @@ import WhiteHorizontalLogo from "public/plane-logos/white-horizontal-with-blue-l export default function RootLayout({ children }: { children: React.ReactNode }) { const { resolvedTheme } = useTheme(); - console.log("resolvedTheme", resolvedTheme); - const patternBackground = resolvedTheme === "light" ? PlaneBackgroundPattern : PlaneBackgroundPatternDark; const logo = resolvedTheme === "light" ? BlackHorizontalLogo : WhiteHorizontalLogo; diff --git a/admin/core/store/instance.store.ts b/admin/core/store/instance.store.ts index 33954fe73a9..1f690f7080b 100644 --- a/admin/core/store/instance.store.ts +++ b/admin/core/store/instance.store.ts @@ -100,7 +100,7 @@ export class InstanceStore implements IInstanceStore { if (this.instance === undefined && !instanceInfo?.instance?.workspaces_exist) this.store.theme.toggleNewUserPopup(); runInAction(() => { - console.log("instanceInfo: ", instanceInfo); + // console.log("instanceInfo: ", instanceInfo); this.isLoading = false; this.instance = instanceInfo.instance; this.config = instanceInfo.config; diff --git a/admin/core/store/user.store.ts b/admin/core/store/user.store.ts index 85c56495b2d..af31cb32a02 100644 --- a/admin/core/store/user.store.ts +++ b/admin/core/store/user.store.ts @@ -57,6 +57,7 @@ export class UserStore implements IUserStore { try { if (this.currentUser === undefined) this.isLoading = true; const currentUser = await this.userService.adminDetails(); + console.log("currentUser: ", currentUser); if (currentUser) { await this.store.instance.fetchInstanceAdmins(); runInAction(() => { diff --git a/packages/services/src/api.service.ts b/packages/services/src/api.service.ts index 619a0d4ec1f..e2b74993e27 100644 --- a/packages/services/src/api.service.ts +++ b/packages/services/src/api.service.ts @@ -1,6 +1,4 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import axios, { AxiosInstance, AxiosRequestConfig } from "axios"; -import { IndexedDBService } from "./indexedDB.service"; /** * Abstract base class for making HTTP requests using axios @@ -20,38 +18,6 @@ export abstract class APIService { baseURL, withCredentials: true, }); - - this.setupInterceptors(); - } - - /** - * Sets up axios interceptors for handling responses - * Currently handles 401 unauthorized responses by redirecting to login - * @private - */ - private setupInterceptors() { - this.axiosInstance.interceptors.response.use( - (response) => response, - (error) => { - if (error.response && error.response.status === 401) { - const currentPath = window.location.pathname; - let prefix = "/"; - let updatedPath = currentPath; - - // Check for special path prefixes - if (currentPath.startsWith("/god-mode")) { - prefix = "/god-mode"; - updatedPath = currentPath.replace("/god-mode", ""); - } else if (currentPath.startsWith("/spaces")) { - prefix = "/spaces"; - updatedPath = currentPath.replace("/spaces", ""); - } - - window.location.replace(`${prefix}${updatedPath ? `?next_path=${updatedPath}` : ""}`); - } - return Promise.reject(error); - } - ); } /** diff --git a/packages/services/src/user/user.service.ts b/packages/services/src/user/user.service.ts index c302b1d4f13..33929766251 100644 --- a/packages/services/src/user/user.service.ts +++ b/packages/services/src/user/user.service.ts @@ -20,11 +20,10 @@ export class UserService extends APIService { /** * Retrieves the current user details - * @returns {Promise} Promise resolving to the current user details\ - * @remarks This method uses the validateStatus: null option to bypass interceptors for unauthorized errors. + * @returns {Promise} Promise resolving to the current user details */ async me(): Promise { - return this.get("/api/users/me/", { validateStatus: null }) + return this.get("/api/users/me/") .then((response) => response?.data) .catch((error) => { throw error?.response; @@ -76,10 +75,9 @@ export class UserService extends APIService { * Retrieves the current instance admin details * @returns {Promise} Promise resolving to the current instance admin details * @throws {Error} If the API request fails - * @remarks This method uses the validateStatus: null option to bypass interceptors for unauthorized errors. */ async adminDetails(): Promise { - return this.get("/api/instances/admins/me/", { validateStatus: null }) + return this.get("/api/instances/admins/me/") .then((response) => response?.data) .catch((error) => { throw error?.response?.data; From e3142ac6597531439b05a7787627bb34bc66e230 Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Wed, 18 Jun 2025 02:23:53 +0530 Subject: [PATCH 07/10] chore: logs related --- admin/app/(all)/(home)/auth-banner.tsx | 6 ++-- .../components/authentication/auth-banner.tsx | 29 ------------------- admin/core/store/user.store.ts | 1 - 3 files changed, 3 insertions(+), 33 deletions(-) delete mode 100644 admin/core/components/authentication/auth-banner.tsx diff --git a/admin/app/(all)/(home)/auth-banner.tsx b/admin/app/(all)/(home)/auth-banner.tsx index 7c1e5ea292b..5d63808f138 100644 --- a/admin/app/(all)/(home)/auth-banner.tsx +++ b/admin/app/(all)/(home)/auth-banner.tsx @@ -1,11 +1,11 @@ import { FC } from "react"; import { Info, X } from "lucide-react"; // plane constants -import { TAuthErrorInfo } from "@plane/constants"; +import { TAdminAuthErrorInfo } from "@plane/constants"; type TAuthBanner = { - bannerData: TAuthErrorInfo | undefined; - handleBannerData?: (bannerData: TAuthErrorInfo | undefined) => void; + bannerData: TAdminAuthErrorInfo | undefined; + handleBannerData?: (bannerData: TAdminAuthErrorInfo | undefined) => void; }; export const AuthBanner: FC = (props) => { diff --git a/admin/core/components/authentication/auth-banner.tsx b/admin/core/components/authentication/auth-banner.tsx deleted file mode 100644 index 5d63808f138..00000000000 --- a/admin/core/components/authentication/auth-banner.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { FC } from "react"; -import { Info, X } from "lucide-react"; -// plane constants -import { TAdminAuthErrorInfo } from "@plane/constants"; - -type TAuthBanner = { - bannerData: TAdminAuthErrorInfo | undefined; - handleBannerData?: (bannerData: TAdminAuthErrorInfo | undefined) => void; -}; - -export const AuthBanner: FC = (props) => { - const { bannerData, handleBannerData } = props; - - if (!bannerData) return <>; - return ( -
-
- -
-
{bannerData?.message}
-
handleBannerData && handleBannerData(undefined)} - > - -
-
- ); -}; diff --git a/admin/core/store/user.store.ts b/admin/core/store/user.store.ts index af31cb32a02..85c56495b2d 100644 --- a/admin/core/store/user.store.ts +++ b/admin/core/store/user.store.ts @@ -57,7 +57,6 @@ export class UserStore implements IUserStore { try { if (this.currentUser === undefined) this.isLoading = true; const currentUser = await this.userService.adminDetails(); - console.log("currentUser: ", currentUser); if (currentUser) { await this.store.instance.fetchInstanceAdmins(); runInAction(() => { From 41e5a498027bcd7b3d364e725851f219266f89b3 Mon Sep 17 00:00:00 2001 From: sriramveeraghanta Date: Tue, 1 Jul 2025 19:56:29 +0530 Subject: [PATCH 08/10] chore: lock file updates --- yarn.lock | 580 ------------------------------------------------------ 1 file changed, 580 deletions(-) diff --git a/yarn.lock b/yarn.lock index a9acc043f30..70ac5e62455 100644 --- a/yarn.lock +++ b/yarn.lock @@ -161,586 +161,6 @@ "@babel/types" "^7.27.3" "@babel/runtime@7.26.10", "@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.20.13", "@babel/runtime@^7.23.9", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7": - version "7.26.10" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz#e9bdb82f14b97df6569b0b038edd436839c57749" - integrity sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA== - dependencies: - "@babel/types" "^7.26.10" - -"@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.9.tgz#cc2e53ebf0a0340777fff5ed521943e253b4d8fe" - integrity sha512-ZkRyVkThtxQ/J6nv3JFYv1RYY+JT5BvU0y3k5bWrmuG4woXypRa4PXmm9RhOwodRkYFWqC0C0cqcJ4OqR7kW+g== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - "@babel/traverse" "^7.25.9" - -"@babel/plugin-bugfix-safari-class-field-initializer-scope@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.9.tgz#af9e4fb63ccb8abcb92375b2fcfe36b60c774d30" - integrity sha512-MrGRLZxLD/Zjj0gdU15dfs+HH/OXvnw/U4jJD8vpcP2CJQapPEv1IWwjc/qMg7ItBlPwSv1hRBbb7LeuANdcnw== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.9.tgz#e8dc26fcd616e6c5bf2bd0d5a2c151d4f92a9137" - integrity sha512-2qUwwfAFpJLZqxd02YW9btUCZHl+RFvdDkNfZwaIJrvB8Tesjsk8pEQkTvGwZXLqXUx/2oyY3ySRhm6HOXuCug== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.25.9.tgz#807a667f9158acac6f6164b4beb85ad9ebc9e1d1" - integrity sha512-6xWgLZTJXwilVjlnV7ospI3xi+sl8lN8rXXbBD6vYn3UYDlGsag8wrZkKcSI8G6KgqKP7vNFaDgeDnfAABq61g== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - "@babel/helper-skip-transparent-expression-wrappers" "^7.25.9" - "@babel/plugin-transform-optional-chaining" "^7.25.9" - -"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.9.tgz#de7093f1e7deaf68eadd7cc6b07f2ab82543269e" - integrity sha512-aLnMXYPnzwwqhYSCyXfKkIkYgJ8zv9RK+roo9DkTXz38ynIhd9XCbN08s3MGvqL2MYGVUGdRQLL/JqBIeJhJBg== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - "@babel/traverse" "^7.25.9" - -"@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2": - version "7.21.0-placeholder-for-preset-env.2" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz#7844f9289546efa9febac2de4cfe358a050bd703" - integrity sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w== - -"@babel/plugin-syntax-import-assertions@^7.26.0": - version "7.26.0" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.26.0.tgz#620412405058efa56e4a564903b79355020f445f" - integrity sha512-QCWT5Hh830hK5EQa7XzuqIkQU9tT/whqbDz7kuaZMHFl1inRRg7JnuAEOQ0Ur0QUl0NufCk1msK2BeY79Aj/eg== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-syntax-import-attributes@^7.26.0": - version "7.26.0" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz#3b1412847699eea739b4f2602c74ce36f6b0b0f7" - integrity sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-syntax-jsx@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz#a34313a178ea56f1951599b929c1ceacee719290" - integrity sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-syntax-typescript@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz#67dda2b74da43727cf21d46cf9afef23f4365399" - integrity sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-syntax-unicode-sets-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz#d49a3b3e6b52e5be6740022317580234a6a47357" - integrity sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-arrow-functions@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.25.9.tgz#7821d4410bee5daaadbb4cdd9a6649704e176845" - integrity sha512-6jmooXYIwn9ca5/RylZADJ+EnSxVUS5sjeJ9UPk6RWRzXCmOJCy6dqItPJFpw2cuCangPK4OYr5uhGKcmrm5Qg== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-async-generator-functions@^7.26.8": - version "7.26.8" - resolved "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.26.8.tgz#5e3991135e3b9c6eaaf5eff56d1ae5a11df45ff8" - integrity sha512-He9Ej2X7tNf2zdKMAGOsmg2MrFc+hfoAhd3po4cWfo/NWjzEAKa0oQruj1ROVUdl0e6fb6/kE/G3SSxE0lRJOg== - dependencies: - "@babel/helper-plugin-utils" "^7.26.5" - "@babel/helper-remap-async-to-generator" "^7.25.9" - "@babel/traverse" "^7.26.8" - -"@babel/plugin-transform-async-to-generator@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.25.9.tgz#c80008dacae51482793e5a9c08b39a5be7e12d71" - integrity sha512-NT7Ejn7Z/LjUH0Gv5KsBCxh7BH3fbLTV0ptHvpeMvrt3cPThHfJfst9Wrb7S8EvJ7vRTFI7z+VAvFVEQn/m5zQ== - dependencies: - "@babel/helper-module-imports" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - "@babel/helper-remap-async-to-generator" "^7.25.9" - -"@babel/plugin-transform-block-scoped-functions@^7.26.5": - version "7.26.5" - resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.26.5.tgz#3dc4405d31ad1cbe45293aa57205a6e3b009d53e" - integrity sha512-chuTSY+hq09+/f5lMj8ZSYgCFpppV2CbYrhNFJ1BFoXpiWPnnAb7R0MqrafCpN8E1+YRrtM1MXZHJdIx8B6rMQ== - dependencies: - "@babel/helper-plugin-utils" "^7.26.5" - -"@babel/plugin-transform-block-scoping@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.9.tgz#c33665e46b06759c93687ca0f84395b80c0473a1" - integrity sha512-1F05O7AYjymAtqbsFETboN1NvBdcnzMerO+zlMyJBEz6WkMdejvGWw9p05iTSjC85RLlBseHHQpYaM4gzJkBGg== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-class-properties@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.9.tgz#a8ce84fedb9ad512549984101fa84080a9f5f51f" - integrity sha512-bbMAII8GRSkcd0h0b4X+36GksxuheLFjP65ul9w6C3KgAamI3JqErNgSrosX6ZPj+Mpim5VvEbawXxJCyEUV3Q== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-class-static-block@^7.26.0": - version "7.26.0" - resolved "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.26.0.tgz#6c8da219f4eb15cae9834ec4348ff8e9e09664a0" - integrity sha512-6J2APTs7BDDm+UMqP1useWqhcRAXo0WIoVj26N7kPFB6S73Lgvyka4KTZYIxtgYXiN5HTyRObA72N2iu628iTQ== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-classes@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.9.tgz#7152457f7880b593a63ade8a861e6e26a4469f52" - integrity sha512-mD8APIXmseE7oZvZgGABDyM34GUmK45Um2TXiBUt7PnuAxrgoSVf123qUzPxEr/+/BHrRn5NMZCdE2m/1F8DGg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.25.9" - "@babel/helper-compilation-targets" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - "@babel/helper-replace-supers" "^7.25.9" - "@babel/traverse" "^7.25.9" - globals "^11.1.0" - -"@babel/plugin-transform-computed-properties@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.25.9.tgz#db36492c78460e534b8852b1d5befe3c923ef10b" - integrity sha512-HnBegGqXZR12xbcTHlJ9HGxw1OniltT26J5YpfruGqtUHlz/xKf/G2ak9e+t0rVqrjXa9WOhvYPz1ERfMj23AA== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - "@babel/template" "^7.25.9" - -"@babel/plugin-transform-destructuring@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.25.9.tgz#966ea2595c498224340883602d3cfd7a0c79cea1" - integrity sha512-WkCGb/3ZxXepmMiX101nnGiU+1CAdut8oHyEOHxkKuS1qKpU2SMXE2uSvfz8PBuLd49V6LEsbtyPhWC7fnkgvQ== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-dotall-regex@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.25.9.tgz#bad7945dd07734ca52fe3ad4e872b40ed09bb09a" - integrity sha512-t7ZQ7g5trIgSRYhI9pIJtRl64KHotutUJsh4Eze5l7olJv+mRSg4/MmbZ0tv1eeqRbdvo/+trvJD/Oc5DmW2cA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-duplicate-keys@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.25.9.tgz#8850ddf57dce2aebb4394bb434a7598031059e6d" - integrity sha512-LZxhJ6dvBb/f3x8xwWIuyiAHy56nrRG3PeYTpBkkzkYRRQ6tJLu68lEF5VIqMUZiAV7a8+Tb78nEoMCMcqjXBw== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-duplicate-named-capturing-groups-regex@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.9.tgz#6f7259b4de127721a08f1e5165b852fcaa696d31" - integrity sha512-0UfuJS0EsXbRvKnwcLjFtJy/Sxc5J5jhLHnFhy7u4zih97Hz6tJkLU+O+FMMrNZrosUPxDi6sYxJ/EA8jDiAog== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-dynamic-import@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.9.tgz#23e917de63ed23c6600c5dd06d94669dce79f7b8" - integrity sha512-GCggjexbmSLaFhqsojeugBpeaRIgWNTcgKVq/0qIteFEqY2A+b9QidYadrWlnbWQUrW5fn+mCvf3tr7OeBFTyg== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-exponentiation-operator@^7.26.3": - version "7.26.3" - resolved "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.26.3.tgz#e29f01b6de302c7c2c794277a48f04a9ca7f03bc" - integrity sha512-7CAHcQ58z2chuXPWblnn1K6rLDnDWieghSOEmqQsrBenH0P9InCUtOJYD89pvngljmZlJcz3fcmgYsXFNGa1ZQ== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-export-namespace-from@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.9.tgz#90745fe55053394f554e40584cda81f2c8a402a2" - integrity sha512-2NsEz+CxzJIVOPx2o9UsW1rXLqtChtLoVnwYHHiB04wS5sgn7mrV45fWMBX0Kk+ub9uXytVYfNP2HjbVbCB3Ww== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-for-of@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.25.9.tgz#4bdc7d42a213397905d89f02350c5267866d5755" - integrity sha512-LqHxduHoaGELJl2uhImHwRQudhCM50pT46rIBNvtT/Oql3nqiS3wOwP+5ten7NpYSXrrVLgtZU3DZmPtWZo16A== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - "@babel/helper-skip-transparent-expression-wrappers" "^7.25.9" - -"@babel/plugin-transform-function-name@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.9.tgz#939d956e68a606661005bfd550c4fc2ef95f7b97" - integrity sha512-8lP+Yxjv14Vc5MuWBpJsoUCd3hD6V9DgBon2FVYL4jJgbnVQ9fTgYmonchzZJOVNgzEgbxp4OwAf6xz6M/14XA== - dependencies: - "@babel/helper-compilation-targets" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - "@babel/traverse" "^7.25.9" - -"@babel/plugin-transform-json-strings@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.9.tgz#c86db407cb827cded902a90c707d2781aaa89660" - integrity sha512-xoTMk0WXceiiIvsaquQQUaLLXSW1KJ159KP87VilruQm0LNNGxWzahxSS6T6i4Zg3ezp4vA4zuwiNUR53qmQAw== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-literals@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.9.tgz#1a1c6b4d4aa59bc4cad5b6b3a223a0abd685c9de" - integrity sha512-9N7+2lFziW8W9pBl2TzaNht3+pgMIRP74zizeCSrtnSKVdUl8mAjjOP2OOVQAfZ881P2cNjDj1uAMEdeD50nuQ== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-logical-assignment-operators@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.9.tgz#b19441a8c39a2fda0902900b306ea05ae1055db7" - integrity sha512-wI4wRAzGko551Y8eVf6iOY9EouIDTtPb0ByZx+ktDGHwv6bHFimrgJM/2T021txPZ2s4c7bqvHbd+vXG6K948Q== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-member-expression-literals@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.25.9.tgz#63dff19763ea64a31f5e6c20957e6a25e41ed5de" - integrity sha512-PYazBVfofCQkkMzh2P6IdIUaCEWni3iYEerAsRWuVd8+jlM1S9S9cz1dF9hIzyoZ8IA3+OwVYIp9v9e+GbgZhA== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-modules-amd@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.25.9.tgz#49ba478f2295101544abd794486cd3088dddb6c5" - integrity sha512-g5T11tnI36jVClQlMlt4qKDLlWnG5pP9CSM4GhdRciTNMRgkfpo5cR6b4rGIOYPgRRuFAvwjPQ/Yk+ql4dyhbw== - dependencies: - "@babel/helper-module-transforms" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-modules-commonjs@^7.25.9", "@babel/plugin-transform-modules-commonjs@^7.26.3": - version "7.26.3" - resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.26.3.tgz#8f011d44b20d02c3de44d8850d971d8497f981fb" - integrity sha512-MgR55l4q9KddUDITEzEFYn5ZsGDXMSsU9E+kh7fjRXTIC3RHqfCo8RPRbyReYJh44HQ/yomFkqbOFohXvDCiIQ== - dependencies: - "@babel/helper-module-transforms" "^7.26.0" - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-modules-systemjs@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.9.tgz#8bd1b43836269e3d33307151a114bcf3ba6793f8" - integrity sha512-hyss7iIlH/zLHaehT+xwiymtPOpsiwIIRlCAOwBB04ta5Tt+lNItADdlXw3jAWZ96VJ2jlhl/c+PNIQPKNfvcA== - dependencies: - "@babel/helper-module-transforms" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - "@babel/helper-validator-identifier" "^7.25.9" - "@babel/traverse" "^7.25.9" - -"@babel/plugin-transform-modules-umd@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.25.9.tgz#6710079cdd7c694db36529a1e8411e49fcbf14c9" - integrity sha512-bS9MVObUgE7ww36HEfwe6g9WakQ0KF07mQF74uuXdkoziUPfKyu/nIm663kz//e5O1nPInPFx36z7WJmJ4yNEw== - dependencies: - "@babel/helper-module-transforms" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-named-capturing-groups-regex@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.25.9.tgz#454990ae6cc22fd2a0fa60b3a2c6f63a38064e6a" - integrity sha512-oqB6WHdKTGl3q/ItQhpLSnWWOpjUJLsOCLVyeFgeTktkBSCiurvPOsyt93gibI9CmuKvTUEtWmG5VhZD+5T/KA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-new-target@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.25.9.tgz#42e61711294b105c248336dcb04b77054ea8becd" - integrity sha512-U/3p8X1yCSoKyUj2eOBIx3FOn6pElFOKvAAGf8HTtItuPyB+ZeOqfn+mvTtg9ZlOAjsPdK3ayQEjqHjU/yLeVQ== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-nullish-coalescing-operator@^7.26.6": - version "7.26.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.26.6.tgz#fbf6b3c92cb509e7b319ee46e3da89c5bedd31fe" - integrity sha512-CKW8Vu+uUZneQCPtXmSBUC6NCAUdya26hWCElAWh5mVSlSRsmiCPUUDKb3Z0szng1hiAJa098Hkhg9o4SE35Qw== - dependencies: - "@babel/helper-plugin-utils" "^7.26.5" - -"@babel/plugin-transform-numeric-separator@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.9.tgz#bfed75866261a8b643468b0ccfd275f2033214a1" - integrity sha512-TlprrJ1GBZ3r6s96Yq8gEQv82s8/5HnCVHtEJScUj90thHQbwe+E5MLhi2bbNHBEJuzrvltXSru+BUxHDoog7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-object-rest-spread@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.9.tgz#0203725025074164808bcf1a2cfa90c652c99f18" - integrity sha512-fSaXafEE9CVHPweLYw4J0emp1t8zYTXyzN3UuG+lylqkvYd7RMrsOQ8TYx5RF231be0vqtFC6jnx3UmpJmKBYg== - dependencies: - "@babel/helper-compilation-targets" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - "@babel/plugin-transform-parameters" "^7.25.9" - -"@babel/plugin-transform-object-super@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.25.9.tgz#385d5de135162933beb4a3d227a2b7e52bb4cf03" - integrity sha512-Kj/Gh+Rw2RNLbCK1VAWj2U48yxxqL2x0k10nPtSdRa0O2xnHXalD0s+o1A6a0W43gJ00ANo38jxkQreckOzv5A== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - "@babel/helper-replace-supers" "^7.25.9" - -"@babel/plugin-transform-optional-catch-binding@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.9.tgz#10e70d96d52bb1f10c5caaac59ac545ea2ba7ff3" - integrity sha512-qM/6m6hQZzDcZF3onzIhZeDHDO43bkNNlOX0i8n3lR6zLbu0GN2d8qfM/IERJZYauhAHSLHy39NF0Ctdvcid7g== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-optional-chaining@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.25.9.tgz#e142eb899d26ef715435f201ab6e139541eee7dd" - integrity sha512-6AvV0FsLULbpnXeBjrY4dmWF8F7gf8QnvTEoO/wX/5xm/xE1Xo8oPuD3MPS+KS9f9XBEAWN7X1aWr4z9HdOr7A== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - "@babel/helper-skip-transparent-expression-wrappers" "^7.25.9" - -"@babel/plugin-transform-parameters@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.25.9.tgz#b856842205b3e77e18b7a7a1b94958069c7ba257" - integrity sha512-wzz6MKwpnshBAiRmn4jR8LYz/g8Ksg0o80XmwZDlordjwEk9SxBzTWC7F5ef1jhbrbOW2DJ5J6ayRukrJmnr0g== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-private-methods@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.9.tgz#847f4139263577526455d7d3223cd8bda51e3b57" - integrity sha512-D/JUozNpQLAPUVusvqMxyvjzllRaF8/nSrP1s2YGQT/W4LHK4xxsMcHjhOGTS01mp9Hda8nswb+FblLdJornQw== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-private-property-in-object@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.9.tgz#9c8b73e64e6cc3cbb2743633885a7dd2c385fe33" - integrity sha512-Evf3kcMqzXA3xfYJmZ9Pg1OvKdtqsDMSWBDzZOPLvHiTt36E75jLDQo5w1gtRU95Q4E5PDttrTf25Fw8d/uWLw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.25.9" - "@babel/helper-create-class-features-plugin" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-property-literals@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.25.9.tgz#d72d588bd88b0dec8b62e36f6fda91cedfe28e3f" - integrity sha512-IvIUeV5KrS/VPavfSM/Iu+RE6llrHrYIKY1yfCzyO/lMXHQ+p7uGhonmGVisv6tSBSVgWzMBohTcvkC9vQcQFA== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-regenerator@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.25.9.tgz#03a8a4670d6cebae95305ac6defac81ece77740b" - integrity sha512-vwDcDNsgMPDGP0nMqzahDWE5/MLcX8sv96+wfX7as7LoF/kr97Bo/7fI00lXY4wUXYfVmwIIyG80fGZ1uvt2qg== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - regenerator-transform "^0.15.2" - -"@babel/plugin-transform-regexp-modifiers@^7.26.0": - version "7.26.0" - resolved "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.26.0.tgz#2f5837a5b5cd3842a919d8147e9903cc7455b850" - integrity sha512-vN6saax7lrA2yA/Pak3sCxuD6F5InBjn9IcrIKQPjpsLvuHYLVroTxjdlVRHjjBWxKOqIwpTXDkOssYT4BFdRw== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-reserved-words@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.25.9.tgz#0398aed2f1f10ba3f78a93db219b27ef417fb9ce" - integrity sha512-7DL7DKYjn5Su++4RXu8puKZm2XBPHyjWLUidaPEkCUBbE7IPcsrkRHggAOOKydH1dASWdcUBxrkOGNxUv5P3Jg== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-shorthand-properties@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.25.9.tgz#bb785e6091f99f826a95f9894fc16fde61c163f2" - integrity sha512-MUv6t0FhO5qHnS/W8XCbHmiRWOphNufpE1IVxhK5kuN3Td9FT1x4rx4K42s3RYdMXCXpfWkGSbCSd0Z64xA7Ng== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-spread@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.25.9.tgz#24a35153931b4ba3d13cec4a7748c21ab5514ef9" - integrity sha512-oNknIB0TbURU5pqJFVbOOFspVlrpVwo2H1+HUIsVDvp5VauGGDP1ZEvO8Nn5xyMEs3dakajOxlmkNW7kNgSm6A== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - "@babel/helper-skip-transparent-expression-wrappers" "^7.25.9" - -"@babel/plugin-transform-sticky-regex@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.25.9.tgz#c7f02b944e986a417817b20ba2c504dfc1453d32" - integrity sha512-WqBUSgeVwucYDP9U/xNRQam7xV8W5Zf+6Eo7T2SRVUFlhRiMNFdFz58u0KZmCVVqs2i7SHgpRnAhzRNmKfi2uA== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-template-literals@^7.26.8": - version "7.26.8" - resolved "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.26.8.tgz#966b15d153a991172a540a69ad5e1845ced990b5" - integrity sha512-OmGDL5/J0CJPJZTHZbi2XpO0tyT2Ia7fzpW5GURwdtp2X3fMmN8au/ej6peC/T33/+CRiIpA8Krse8hFGVmT5Q== - dependencies: - "@babel/helper-plugin-utils" "^7.26.5" - -"@babel/plugin-transform-typeof-symbol@^7.26.7": - version "7.26.7" - resolved "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.26.7.tgz#d0e33acd9223744c1e857dbd6fa17bd0a3786937" - integrity sha512-jfoTXXZTgGg36BmhqT3cAYK5qkmqvJpvNrPhaK/52Vgjhw4Rq29s9UqpWWV0D6yuRmgiFH/BUVlkl96zJWqnaw== - dependencies: - "@babel/helper-plugin-utils" "^7.26.5" - -"@babel/plugin-transform-typescript@^7.25.9": - version "7.26.8" - resolved "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.26.8.tgz#2e9caa870aa102f50d7125240d9dbf91334b0950" - integrity sha512-bME5J9AC8ChwA7aEPJ6zym3w7aObZULHhbNLU0bKUhKsAkylkzUdq+0kdymh9rzi8nlNFl2bmldFBCKNJBUpuw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.25.9" - "@babel/helper-create-class-features-plugin" "^7.25.9" - "@babel/helper-plugin-utils" "^7.26.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.25.9" - "@babel/plugin-syntax-typescript" "^7.25.9" - -"@babel/plugin-transform-unicode-escapes@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.25.9.tgz#a75ef3947ce15363fccaa38e2dd9bc70b2788b82" - integrity sha512-s5EDrE6bW97LtxOcGj1Khcx5AaXwiMmi4toFWRDP9/y0Woo6pXC+iyPu/KuhKtfSrNFd7jJB+/fkOtZy6aIC6Q== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-unicode-property-regex@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.25.9.tgz#a901e96f2c1d071b0d1bb5dc0d3c880ce8f53dd3" - integrity sha512-Jt2d8Ga+QwRluxRQ307Vlxa6dMrYEMZCgGxoPR8V52rxPyldHu3hdlHspxaqYmE7oID5+kB+UKUB/eWS+DkkWg== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-unicode-regex@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.25.9.tgz#5eae747fe39eacf13a8bd006a4fb0b5d1fa5e9b1" - integrity sha512-yoxstj7Rg9dlNn9UQxzk4fcNivwv4nUYz7fYXBaKxvw/lnmPuOm/ikoELygbYq68Bls3D/D+NBPHiLwZdZZ4HA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/plugin-transform-unicode-sets-regex@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.9.tgz#65114c17b4ffc20fa5b163c63c70c0d25621fabe" - integrity sha512-8BYqO3GeVNHtx69fdPshN3fnzUNLrWdHhk/icSwigksJGczKSizZ+Z6SBCxTs723Fr5VSNorTIK7a+R2tISvwQ== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - -"@babel/preset-env@^7.25.4": - version "7.26.8" - resolved "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.26.8.tgz#7af0090829b606d2046db99679004731e1dc364d" - integrity sha512-um7Sy+2THd697S4zJEfv/U5MHGJzkN2xhtsR3T/SWRbVSic62nbISh51VVfU9JiO/L/Z97QczHTaFVkOU8IzNg== - dependencies: - "@babel/compat-data" "^7.26.8" - "@babel/helper-compilation-targets" "^7.26.5" - "@babel/helper-plugin-utils" "^7.26.5" - "@babel/helper-validator-option" "^7.25.9" - "@babel/plugin-bugfix-firefox-class-in-computed-class-key" "^7.25.9" - "@babel/plugin-bugfix-safari-class-field-initializer-scope" "^7.25.9" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.25.9" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.25.9" - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.25.9" - "@babel/plugin-proposal-private-property-in-object" "7.21.0-placeholder-for-preset-env.2" - "@babel/plugin-syntax-import-assertions" "^7.26.0" - "@babel/plugin-syntax-import-attributes" "^7.26.0" - "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" - "@babel/plugin-transform-arrow-functions" "^7.25.9" - "@babel/plugin-transform-async-generator-functions" "^7.26.8" - "@babel/plugin-transform-async-to-generator" "^7.25.9" - "@babel/plugin-transform-block-scoped-functions" "^7.26.5" - "@babel/plugin-transform-block-scoping" "^7.25.9" - "@babel/plugin-transform-class-properties" "^7.25.9" - "@babel/plugin-transform-class-static-block" "^7.26.0" - "@babel/plugin-transform-classes" "^7.25.9" - "@babel/plugin-transform-computed-properties" "^7.25.9" - "@babel/plugin-transform-destructuring" "^7.25.9" - "@babel/plugin-transform-dotall-regex" "^7.25.9" - "@babel/plugin-transform-duplicate-keys" "^7.25.9" - "@babel/plugin-transform-duplicate-named-capturing-groups-regex" "^7.25.9" - "@babel/plugin-transform-dynamic-import" "^7.25.9" - "@babel/plugin-transform-exponentiation-operator" "^7.26.3" - "@babel/plugin-transform-export-namespace-from" "^7.25.9" - "@babel/plugin-transform-for-of" "^7.25.9" - "@babel/plugin-transform-function-name" "^7.25.9" - "@babel/plugin-transform-json-strings" "^7.25.9" - "@babel/plugin-transform-literals" "^7.25.9" - "@babel/plugin-transform-logical-assignment-operators" "^7.25.9" - "@babel/plugin-transform-member-expression-literals" "^7.25.9" - "@babel/plugin-transform-modules-amd" "^7.25.9" - "@babel/plugin-transform-modules-commonjs" "^7.26.3" - "@babel/plugin-transform-modules-systemjs" "^7.25.9" - "@babel/plugin-transform-modules-umd" "^7.25.9" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.25.9" - "@babel/plugin-transform-new-target" "^7.25.9" - "@babel/plugin-transform-nullish-coalescing-operator" "^7.26.6" - "@babel/plugin-transform-numeric-separator" "^7.25.9" - "@babel/plugin-transform-object-rest-spread" "^7.25.9" - "@babel/plugin-transform-object-super" "^7.25.9" - "@babel/plugin-transform-optional-catch-binding" "^7.25.9" - "@babel/plugin-transform-optional-chaining" "^7.25.9" - "@babel/plugin-transform-parameters" "^7.25.9" - "@babel/plugin-transform-private-methods" "^7.25.9" - "@babel/plugin-transform-private-property-in-object" "^7.25.9" - "@babel/plugin-transform-property-literals" "^7.25.9" - "@babel/plugin-transform-regenerator" "^7.25.9" - "@babel/plugin-transform-regexp-modifiers" "^7.26.0" - "@babel/plugin-transform-reserved-words" "^7.25.9" - "@babel/plugin-transform-shorthand-properties" "^7.25.9" - "@babel/plugin-transform-spread" "^7.25.9" - "@babel/plugin-transform-sticky-regex" "^7.25.9" - "@babel/plugin-transform-template-literals" "^7.26.8" - "@babel/plugin-transform-typeof-symbol" "^7.26.7" - "@babel/plugin-transform-unicode-escapes" "^7.25.9" - "@babel/plugin-transform-unicode-property-regex" "^7.25.9" - "@babel/plugin-transform-unicode-regex" "^7.25.9" - "@babel/plugin-transform-unicode-sets-regex" "^7.25.9" - "@babel/preset-modules" "0.1.6-no-external-plugins" - babel-plugin-polyfill-corejs2 "^0.4.10" - babel-plugin-polyfill-corejs3 "^0.11.0" - babel-plugin-polyfill-regenerator "^0.6.1" - core-js-compat "^3.40.0" - semver "^6.3.1" - -"@babel/preset-modules@0.1.6-no-external-plugins": - version "0.1.6-no-external-plugins" - resolved "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz#ccb88a2c49c817236861fee7826080573b8a923a" - integrity sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/types" "^7.4.4" - esutils "^2.0.2" - -"@babel/preset-typescript@^7.24.7": - version "7.26.0" - resolved "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.26.0.tgz#4a570f1b8d104a242d923957ffa1eaff142a106d" - integrity sha512-NMk1IGZ5I/oHhoXEElcm+xUnL/szL6xflkFZmoEU9xj1qSJXpiS7rsspYo92B4DRCDvZn2erT5LdsCeXAKNCkg== - dependencies: - "@babel/helper-plugin-utils" "^7.25.9" - "@babel/helper-validator-option" "^7.25.9" - "@babel/plugin-syntax-jsx" "^7.25.9" - "@babel/plugin-transform-modules-commonjs" "^7.25.9" - "@babel/plugin-transform-typescript" "^7.25.9" - -"@babel/runtime@7.26.10", "@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.20.13", "@babel/runtime@^7.23.9", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7": version "7.26.10" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.10.tgz#a07b4d8fa27af131a633d7b3524db803eb4764c2" integrity sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw== From 0223a6aed8cd6910456adccf9c532a407444410c Mon Sep 17 00:00:00 2001 From: sriramveeraghanta Date: Tue, 1 Jul 2025 19:59:24 +0530 Subject: [PATCH 09/10] fix: build errors --- admin/app/(all)/(home)/sign-in-form.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/app/(all)/(home)/sign-in-form.tsx b/admin/app/(all)/(home)/sign-in-form.tsx index 97552164e36..a9cdcf34212 100644 --- a/admin/app/(all)/(home)/sign-in-form.tsx +++ b/admin/app/(all)/(home)/sign-in-form.tsx @@ -4,7 +4,7 @@ import { FC, useEffect, useMemo, useState } from "react"; import { useSearchParams } from "next/navigation"; import { Eye, EyeOff } from "lucide-react"; // plane internal packages -import { API_BASE_URL, EAdminAuthErrorCodes, TAuthErrorInfo } from "@plane/constants"; +import { API_BASE_URL, EAdminAuthErrorCodes, TAdminAuthErrorInfo } from "@plane/constants"; import { AuthService } from "@plane/services"; import { Button, Input, Spinner } from "@plane/ui"; // components @@ -53,7 +53,7 @@ export const InstanceSignInForm: FC = (props) => { const [csrfToken, setCsrfToken] = useState(undefined); const [formData, setFormData] = useState(defaultFromData); const [isSubmitting, setIsSubmitting] = useState(false); - const [errorInfo, setErrorInfo] = useState(undefined); + const [errorInfo, setErrorInfo] = useState(undefined); const handleFormChange = (key: keyof TFormData, value: string | boolean) => setFormData((prev) => ({ ...prev, [key]: value })); @@ -96,7 +96,7 @@ export const InstanceSignInForm: FC = (props) => { if (errorCode) { const errorDetail = authErrorHandler(errorCode?.toString() as EAdminAuthErrorCodes); if (errorDetail) { - setErrorInfo(errorDetail as unknown as TAuthErrorInfo); + setErrorInfo(errorDetail); } } }, [errorCode]); From 0a6ad7581837eb3a7cdf84961bc2da7877549a66 Mon Sep 17 00:00:00 2001 From: sriramveeraghanta Date: Tue, 1 Jul 2025 20:40:50 +0530 Subject: [PATCH 10/10] fix: coderabbit suggestions --- admin/app/(all)/(home)/sign-in-form.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/admin/app/(all)/(home)/sign-in-form.tsx b/admin/app/(all)/(home)/sign-in-form.tsx index a9cdcf34212..12b250a93b9 100644 --- a/admin/app/(all)/(home)/sign-in-form.tsx +++ b/admin/app/(all)/(home)/sign-in-form.tsx @@ -41,8 +41,7 @@ const defaultFromData: TFormData = { password: "", }; -export const InstanceSignInForm: FC = (props) => { - const {} = props; +export const InstanceSignInForm: FC = () => { // search params const searchParams = useSearchParams(); const emailParam = searchParams.get("email") || undefined; @@ -72,7 +71,7 @@ export const InstanceSignInForm: FC = (props) => { if (errorCode && errorMessage) { switch (errorCode) { case EErrorCodes.INSTANCE_NOT_CONFIGURED: - return { type: EErrorCodes.INVALID_EMAIL, message: errorMessage }; + return { type: EErrorCodes.INSTANCE_NOT_CONFIGURED, message: errorMessage }; case EErrorCodes.REQUIRED_EMAIL_PASSWORD: return { type: EErrorCodes.REQUIRED_EMAIL_PASSWORD, message: errorMessage }; case EErrorCodes.INVALID_EMAIL: