From f81356f72817c42168c40d0a48159ecd58f87b0f Mon Sep 17 00:00:00 2001 From: Bruno Tot Date: Tue, 26 Nov 2024 16:50:11 +0100 Subject: [PATCH] chore: hotfix --- .../BoundarySuspenseGroup.tsx | 2 +- .../DatatableFilterButton.tsx | 2 +- .../DtSortableCell/DtSortableCell.tsx | 6 +---- .../impl/ClientDatatable/ClientDatatable.tsx | 8 +++---- .../Datatable/impl/ClientDatatable/types.ts | 2 +- .../impl/ServerDatatable/ServerDatatable.tsx | 6 ++--- .../Datatable/impl/ServerDatatable/types.ts | 2 +- .../src/app/components/Flag/Flag.tsx | 4 ++-- .../src/app/components/Footer/Footer.tsx | 2 +- .../components/Header/ComputedBreadcrumbs.tsx | 6 ++--- .../src/app/components/Header/Header.tsx | 16 ++++++------- .../app/components/Header/UserMenuButton.tsx | 4 ++-- .../src/app/components/Protect/Protect.tsx | 6 ++--- .../src/app/components/Sidebar/Sidebar.tsx | 2 +- .../forms/input/InputSelect/InputSelect.tsx | 7 ++---- .../app/forms/input/InputText/InputText.tsx | 2 +- .../forms/input/InputToggle/InputToggle.tsx | 6 +---- .../InputDarkThemeToggle.tsx | 2 +- .../InputLayoutToggle/InputLayoutToggle.tsx | 4 ++-- .../InputLocaleSelect/InputLocaleSelect.tsx | 4 ++-- .../HorizontalLayout/HorizontalLayout.tsx | 8 +++---- apps/app-vite-react/src/app/layout/Layout.tsx | 16 ++++++------- .../layout/SidebarLayout/SidebarLayout.tsx | 10 ++++---- .../src/app/models/ConstraintViolation.ts | 2 +- .../components/ClientResponsiveTable.tsx | 2 +- .../manage-users/components/UserForm.tsx | 6 ++--- .../admin-settings/manage-users/index.tsx | 23 ++++++++----------- .../manage-users/pages/create-user/index.tsx | 4 ++-- .../manage-users/pages/edit-user/index.tsx | 4 ++-- .../app/pages/visual-preferences/index.tsx | 17 ++++++-------- apps/app-vite-react/src/app/providers.tsx | 12 +++++----- apps/app-vite-react/src/app/routes.tsx | 8 +++---- .../src/app/signals/sigDirection.ts | 4 ++-- .../src/app/signals/sigLocale.ts | 2 +- .../app-vite-react/src/app/signals/sigUser.ts | 2 +- .../src/lib/@mui/MuiThemeProvider.tsx | 2 +- .../src/lib/@ts-rest/tsRestApiClient.ts | 2 +- .../src/lib/keycloak-js/KeycloakProvider.tsx | 6 ++--- .../src/lib/keycloak-js/KeycloakRoute.tsx | 4 ++-- .../src/lib/keycloak-js/index.ts | 8 +++---- apps/app-vite-react/src/main.tsx | 14 +++++------ apps/app-vite-react/src/server/ReactApp.tsx | 4 ++-- .../src/server/route-typings.ts | 4 ++-- apps/app-vite-react/src/server/server.ts | 2 +- apps/app-vite-react/test/App.test.tsx | 2 +- apps/app-vite-react/test/root.test.tsx | 2 +- apps/app-vite-react/tsconfig.json | 6 ++--- apps/app-vite-react/vite.config.ts | 14 ++++++----- 48 files changed, 134 insertions(+), 149 deletions(-) diff --git a/apps/app-vite-react/src/app/components/BoundarySuspenseGroup/BoundarySuspenseGroup.tsx b/apps/app-vite-react/src/app/components/BoundarySuspenseGroup/BoundarySuspenseGroup.tsx index 7401c215..b4d3a935 100644 --- a/apps/app-vite-react/src/app/components/BoundarySuspenseGroup/BoundarySuspenseGroup.tsx +++ b/apps/app-vite-react/src/app/components/BoundarySuspenseGroup/BoundarySuspenseGroup.tsx @@ -1,4 +1,4 @@ -import type { NavigationRouteProtectParam } from "@org/app-vite-react/server/route-typings"; +import type { NavigationRouteProtectParam } from "@/server/route-typings"; import { LoaderSuspense } from "../LoaderSuspense"; import { Protect } from "../Protect"; diff --git a/apps/app-vite-react/src/app/components/Datatable/components/DatatableFilterButton/DatatableFilterButton.tsx b/apps/app-vite-react/src/app/components/Datatable/components/DatatableFilterButton/DatatableFilterButton.tsx index 9d8a7d4e..f2d30471 100644 --- a/apps/app-vite-react/src/app/components/Datatable/components/DatatableFilterButton/DatatableFilterButton.tsx +++ b/apps/app-vite-react/src/app/components/Datatable/components/DatatableFilterButton/DatatableFilterButton.tsx @@ -2,7 +2,7 @@ import type { DatatableFilterProps } from "../DatatableFilter/DatatableFilter"; import * as icons from "@mui/icons-material"; import * as mui from "@mui/material"; -import { FixedBadge } from "@org/app-vite-react/app/pages/admin-settings/manage-users/components"; +import { FixedBadge } from "@/app/pages/admin-settings/manage-users/components"; import React from "react"; import { DatatableFilters } from "../DatatableFilters"; diff --git a/apps/app-vite-react/src/app/components/Datatable/components/DtSortableCell/DtSortableCell.tsx b/apps/app-vite-react/src/app/components/Datatable/components/DtSortableCell/DtSortableCell.tsx index 09d600c4..81f77c54 100644 --- a/apps/app-vite-react/src/app/components/Datatable/components/DtSortableCell/DtSortableCell.tsx +++ b/apps/app-vite-react/src/app/components/Datatable/components/DtSortableCell/DtSortableCell.tsx @@ -1,13 +1,9 @@ -import type { - DtBaseColumnAlign, - DtBaseColumnRenderHeader, -} from "@org/app-vite-react/app/components/Datatable"; +import type { DtBaseColumnAlign, DtBaseColumnRenderHeader } from "@/app/components/Datatable"; import type { MouseEvent } from "react"; import { TableCell, Box, TableSortLabel } from "@mui/material"; import { useCallback, useState } from "react"; - export type DtSortableCellProps = { id: string; align?: DtBaseColumnAlign; diff --git a/apps/app-vite-react/src/app/components/Datatable/impl/ClientDatatable/ClientDatatable.tsx b/apps/app-vite-react/src/app/components/Datatable/impl/ClientDatatable/ClientDatatable.tsx index 5c8a0255..a5c2a50b 100644 --- a/apps/app-vite-react/src/app/components/Datatable/impl/ClientDatatable/ClientDatatable.tsx +++ b/apps/app-vite-react/src/app/components/Datatable/impl/ClientDatatable/ClientDatatable.tsx @@ -1,5 +1,5 @@ -import type { ClientDatatableProps } from "@org/app-vite-react/app/components/Datatable/impl/ClientDatatable/types"; -import type { DtBaseOrder } from "@org/app-vite-react/app/components/Datatable/types"; +import type { ClientDatatableProps } from "@/app/components/Datatable/impl/ClientDatatable/types"; +import type { DtBaseOrder } from "@/app/components/Datatable/types"; import type { MouseEvent } from "react"; import * as mui from "@mui/material"; @@ -12,8 +12,8 @@ import { TableBody, TablePagination, } from "@mui/material"; -import { DtSortableCell } from "@org/app-vite-react/app/components/Datatable/components/DtSortableCell/DtSortableCell"; -import { ClientResponsiveTable } from "@org/app-vite-react/app/pages/admin-settings/manage-users/components"; +import { DtSortableCell } from "@/app/components/Datatable/components/DtSortableCell/DtSortableCell"; +import { ClientResponsiveTable } from "@/app/pages/admin-settings/manage-users/components"; import { Fragment, useMemo, useState } from "react"; export function ClientDatatable(props: ClientDatatableProps) { diff --git a/apps/app-vite-react/src/app/components/Datatable/impl/ClientDatatable/types.ts b/apps/app-vite-react/src/app/components/Datatable/impl/ClientDatatable/types.ts index 9883c461..f18e174e 100644 --- a/apps/app-vite-react/src/app/components/Datatable/impl/ClientDatatable/types.ts +++ b/apps/app-vite-react/src/app/components/Datatable/impl/ClientDatatable/types.ts @@ -1,4 +1,4 @@ -import type { DtBaseProps } from "@org/app-vite-react/app/components/Datatable/types"; +import type { DtBaseProps } from "@/app/components/Datatable/types"; export type ClientDatatableProps = DtBaseProps number> & { sync: true; diff --git a/apps/app-vite-react/src/app/components/Datatable/impl/ServerDatatable/ServerDatatable.tsx b/apps/app-vite-react/src/app/components/Datatable/impl/ServerDatatable/ServerDatatable.tsx index 8867afcd..5947a3d7 100644 --- a/apps/app-vite-react/src/app/components/Datatable/impl/ServerDatatable/ServerDatatable.tsx +++ b/apps/app-vite-react/src/app/components/Datatable/impl/ServerDatatable/ServerDatatable.tsx @@ -1,5 +1,5 @@ -import type { ServerDatatableProps } from "@org/app-vite-react/app/components/Datatable/impl/ServerDatatable/types"; -import type { DtBaseSortItem } from "@org/app-vite-react/app/components/Datatable/types"; +import type { ServerDatatableProps } from "@/app/components/Datatable/impl/ServerDatatable/types"; +import type { DtBaseSortItem } from "@/app/components/Datatable/types"; import type { MouseEvent } from "react"; import { @@ -11,7 +11,7 @@ import { TableBody, TablePagination, } from "@mui/material"; -import { DtSortableCell } from "@org/app-vite-react/app/components/Datatable/components/DtSortableCell"; +import { DtSortableCell } from "@/app/components/Datatable/components/DtSortableCell"; import { type TODO } from "@org/lib-commons"; import { Fragment, useCallback } from "react"; diff --git a/apps/app-vite-react/src/app/components/Datatable/impl/ServerDatatable/types.ts b/apps/app-vite-react/src/app/components/Datatable/impl/ServerDatatable/types.ts index 2067e125..2ae60998 100644 --- a/apps/app-vite-react/src/app/components/Datatable/impl/ServerDatatable/types.ts +++ b/apps/app-vite-react/src/app/components/Datatable/impl/ServerDatatable/types.ts @@ -1,4 +1,4 @@ -import type { DtBaseProps } from "@org/app-vite-react/app/components/Datatable/types"; +import type { DtBaseProps } from "@/app/components/Datatable/types"; export type ServerDatatableProps = DtBaseProps & { sync?: false; diff --git a/apps/app-vite-react/src/app/components/Flag/Flag.tsx b/apps/app-vite-react/src/app/components/Flag/Flag.tsx index e7285a16..41df1efb 100644 --- a/apps/app-vite-react/src/app/components/Flag/Flag.tsx +++ b/apps/app-vite-react/src/app/components/Flag/Flag.tsx @@ -1,6 +1,6 @@ -import type { I18nLocale } from "@org/app-vite-react/lib/i18next"; +import type { I18nLocale } from "@/lib/i18next"; -import { getLocaleFlag } from "@org/app-vite-react/lib/i18next"; +import { getLocaleFlag } from "@/lib/i18next"; import React from "react"; export type FlagProps = { diff --git a/apps/app-vite-react/src/app/components/Footer/Footer.tsx b/apps/app-vite-react/src/app/components/Footer/Footer.tsx index efd43c05..82f0b6f1 100644 --- a/apps/app-vite-react/src/app/components/Footer/Footer.tsx +++ b/apps/app-vite-react/src/app/components/Footer/Footer.tsx @@ -1,5 +1,5 @@ import type { Breakpoint } from "@mui/material"; -import type { MuiSxProps } from "@org/app-vite-react/app/components/Header"; +import type { MuiSxProps } from "@/app/components/Header"; import { Box, Container, Link, Typography } from "@mui/material"; diff --git a/apps/app-vite-react/src/app/components/Header/ComputedBreadcrumbs.tsx b/apps/app-vite-react/src/app/components/Header/ComputedBreadcrumbs.tsx index e9b317ed..f1db6862 100644 --- a/apps/app-vite-react/src/app/components/Header/ComputedBreadcrumbs.tsx +++ b/apps/app-vite-react/src/app/components/Header/ComputedBreadcrumbs.tsx @@ -1,10 +1,10 @@ -import type { NavigationRouteHandle } from "@org/app-vite-react/server/route-typings"; +import type { NavigationRouteHandle } from "@/server/route-typings"; import type { TODO } from "@org/lib-commons"; import * as icons from "@mui/icons-material"; import * as mui from "@mui/material"; -import { sigDirection } from "@org/app-vite-react/app/signals/sigDirection"; -import { useTranslation } from "@org/app-vite-react/lib/i18next"; +import { sigDirection } from "@/app/signals/sigDirection"; +import { useTranslation } from "@/lib/i18next"; import { useMemo, useState } from "react"; import { Link as RouterLink } from "react-router-dom"; import { type UIMatch, useMatches } from "react-router-dom"; diff --git a/apps/app-vite-react/src/app/components/Header/Header.tsx b/apps/app-vite-react/src/app/components/Header/Header.tsx index ed93f8ef..86d6e129 100644 --- a/apps/app-vite-react/src/app/components/Header/Header.tsx +++ b/apps/app-vite-react/src/app/components/Header/Header.tsx @@ -2,14 +2,14 @@ import type { Breakpoint, SxProps, Theme } from "@mui/material"; import * as icons from "@mui/icons-material"; import * as mui from "@mui/material"; -import { InputDarkThemeToggle } from "@org/app-vite-react/app/inputs/InputDarkThemeToggle"; -import { InputLayoutToggle } from "@org/app-vite-react/app/inputs/InputLayoutToggle"; -import { InputLocaleSelect } from "@org/app-vite-react/app/inputs/InputLocaleSelect"; -import { sigLayoutVariant } from "@org/app-vite-react/app/signals/sigLayoutVariant"; -import { sigLayoutWidth } from "@org/app-vite-react/app/signals/sigLayoutWidth"; -import { getFontFamily, sigLocale } from "@org/app-vite-react/app/signals/sigLocale"; -import { sigSidebarOpen } from "@org/app-vite-react/app/signals/sigSidebarOpen"; -import { sigThemeOpts } from "@org/app-vite-react/app/signals/sigTheme"; +import { InputDarkThemeToggle } from "@/app/inputs/InputDarkThemeToggle"; +import { InputLayoutToggle } from "@/app/inputs/InputLayoutToggle"; +import { InputLocaleSelect } from "@/app/inputs/InputLocaleSelect"; +import { sigLayoutVariant } from "@/app/signals/sigLayoutVariant"; +import { sigLayoutWidth } from "@/app/signals/sigLayoutWidth"; +import { getFontFamily, sigLocale } from "@/app/signals/sigLocale"; +import { sigSidebarOpen } from "@/app/signals/sigSidebarOpen"; +import { sigThemeOpts } from "@/app/signals/sigTheme"; import { UserMenuButton } from "./UserMenuButton"; import { Logo } from "../Logo"; diff --git a/apps/app-vite-react/src/app/components/Header/UserMenuButton.tsx b/apps/app-vite-react/src/app/components/Header/UserMenuButton.tsx index 98bdd4a9..e067c664 100644 --- a/apps/app-vite-react/src/app/components/Header/UserMenuButton.tsx +++ b/apps/app-vite-react/src/app/components/Header/UserMenuButton.tsx @@ -4,8 +4,8 @@ import Avatar from "@mui/material/Avatar"; import Box from "@mui/material/Box"; import IconButton from "@mui/material/IconButton"; import Menu from "@mui/material/Menu"; -import { sigUser } from "@org/app-vite-react/app/signals/sigUser"; -import { keycloakLogout } from "@org/app-vite-react/lib/keycloak-js"; +import { sigUser } from "@/app/signals/sigUser"; +import { keycloakLogout } from "@/lib/keycloak-js"; import React from "react"; import LogoutButton from "./LogoutButton"; diff --git a/apps/app-vite-react/src/app/components/Protect/Protect.tsx b/apps/app-vite-react/src/app/components/Protect/Protect.tsx index 3fdcdc42..4a7891f0 100644 --- a/apps/app-vite-react/src/app/components/Protect/Protect.tsx +++ b/apps/app-vite-react/src/app/components/Protect/Protect.tsx @@ -1,9 +1,9 @@ -import type { KeycloakUser } from "@org/app-vite-react/lib/keycloak-js"; -import type { NavigationRouteProtectParam } from "@org/app-vite-react/server/route-typings"; +import type { KeycloakUser } from "@/lib/keycloak-js"; +import type { NavigationRouteProtectParam } from "@/server/route-typings"; import type { ReactNode } from "react"; import * as mui from "@mui/material"; -import { sigUser } from "@org/app-vite-react/app/signals/sigUser"; +import { sigUser } from "@/app/signals/sigUser"; export type ProtectProps = { children: ReactNode; diff --git a/apps/app-vite-react/src/app/components/Sidebar/Sidebar.tsx b/apps/app-vite-react/src/app/components/Sidebar/Sidebar.tsx index 8e075de0..0e3dad2b 100644 --- a/apps/app-vite-react/src/app/components/Sidebar/Sidebar.tsx +++ b/apps/app-vite-react/src/app/components/Sidebar/Sidebar.tsx @@ -1,7 +1,7 @@ import type { ReactNode } from "react"; import { SwipeableDrawer, useMediaQuery } from "@mui/material"; -import { sigLayoutVariant } from "@org/app-vite-react/app/signals/sigLayoutVariant"; +import { sigLayoutVariant } from "@/app/signals/sigLayoutVariant"; export type SidebarProps = { width?: number; diff --git a/apps/app-vite-react/src/app/forms/input/InputSelect/InputSelect.tsx b/apps/app-vite-react/src/app/forms/input/InputSelect/InputSelect.tsx index 6db4ce62..5d879617 100644 --- a/apps/app-vite-react/src/app/forms/input/InputSelect/InputSelect.tsx +++ b/apps/app-vite-react/src/app/forms/input/InputSelect/InputSelect.tsx @@ -1,11 +1,8 @@ -import type { - CombinedInputProps, - ValueType, -} from "@org/app-vite-react/app/forms/input/Input/Input"; +import type { CombinedInputProps, ValueType } from "@/app/forms/input/Input/Input"; import type * as rhf from "react-hook-form"; import * as mui from "@mui/material"; -import { Input } from "@org/app-vite-react/app/forms/input/Input/Input"; +import { Input } from "@/app/forms/input/Input/Input"; export type InputSelectProps< TInput, diff --git a/apps/app-vite-react/src/app/forms/input/InputText/InputText.tsx b/apps/app-vite-react/src/app/forms/input/InputText/InputText.tsx index 82686d4a..d1f89cd1 100644 --- a/apps/app-vite-react/src/app/forms/input/InputText/InputText.tsx +++ b/apps/app-vite-react/src/app/forms/input/InputText/InputText.tsx @@ -1,7 +1,7 @@ import type * as rhf from "react-hook-form"; import * as mui from "@mui/material"; -import { Input, type CombinedInputProps } from "@org/app-vite-react/app/forms/input/Input/Input"; +import { Input, type CombinedInputProps } from "@/app/forms/input/Input/Input"; export type InputTextProps< TInput, diff --git a/apps/app-vite-react/src/app/forms/input/InputToggle/InputToggle.tsx b/apps/app-vite-react/src/app/forms/input/InputToggle/InputToggle.tsx index 342a3b29..e8c7b6d3 100644 --- a/apps/app-vite-react/src/app/forms/input/InputToggle/InputToggle.tsx +++ b/apps/app-vite-react/src/app/forms/input/InputToggle/InputToggle.tsx @@ -2,11 +2,7 @@ import type { TODO } from "@org/lib-commons"; import type * as rhf from "react-hook-form"; import * as mui from "@mui/material"; -import { - Input, - type ValueType, - type CombinedInputProps, -} from "@org/app-vite-react/app/forms/input/Input/Input"; +import { Input, type ValueType, type CombinedInputProps } from "@/app/forms/input/Input/Input"; export type InputToggleProps< TInput, diff --git a/apps/app-vite-react/src/app/inputs/InputDarkThemeToggle/InputDarkThemeToggle.tsx b/apps/app-vite-react/src/app/inputs/InputDarkThemeToggle/InputDarkThemeToggle.tsx index 2f43602d..1a319589 100644 --- a/apps/app-vite-react/src/app/inputs/InputDarkThemeToggle/InputDarkThemeToggle.tsx +++ b/apps/app-vite-react/src/app/inputs/InputDarkThemeToggle/InputDarkThemeToggle.tsx @@ -1,6 +1,6 @@ import { DarkMode, LightMode } from "@mui/icons-material"; import { Box, IconButton, Tooltip } from "@mui/material"; -import { useTranslation } from "@org/app-vite-react/lib/i18next"; +import { useTranslation } from "@/lib/i18next"; export type InputDarkThemeToggleProps = { value: boolean; diff --git a/apps/app-vite-react/src/app/inputs/InputLayoutToggle/InputLayoutToggle.tsx b/apps/app-vite-react/src/app/inputs/InputLayoutToggle/InputLayoutToggle.tsx index d40a636c..968dc16c 100644 --- a/apps/app-vite-react/src/app/inputs/InputLayoutToggle/InputLayoutToggle.tsx +++ b/apps/app-vite-react/src/app/inputs/InputLayoutToggle/InputLayoutToggle.tsx @@ -1,8 +1,8 @@ -import type { LayoutVariant } from "@org/app-vite-react/app/models"; +import type { LayoutVariant } from "@/app/models"; import { TableChart, ViewSidebar } from "@mui/icons-material"; import { IconButton, Tooltip } from "@mui/material"; -import { useTranslation } from "@org/app-vite-react/lib/i18next"; +import { useTranslation } from "@/lib/i18next"; export type InputLayoutToggleProps = { value: LayoutVariant; diff --git a/apps/app-vite-react/src/app/inputs/InputLocaleSelect/InputLocaleSelect.tsx b/apps/app-vite-react/src/app/inputs/InputLocaleSelect/InputLocaleSelect.tsx index 6f903ab4..e1e470e2 100644 --- a/apps/app-vite-react/src/app/inputs/InputLocaleSelect/InputLocaleSelect.tsx +++ b/apps/app-vite-react/src/app/inputs/InputLocaleSelect/InputLocaleSelect.tsx @@ -1,8 +1,8 @@ -import type { I18nLocale } from "@org/app-vite-react/lib/i18next"; +import type { I18nLocale } from "@/lib/i18next"; import { Translate } from "@mui/icons-material"; import { Box, IconButton, Menu, MenuItem, Tooltip } from "@mui/material"; -import { I18N_LANGUAGE_LIST, useTranslation } from "@org/app-vite-react/lib/i18next"; +import { I18N_LANGUAGE_LIST, useTranslation } from "@/lib/i18next"; import { useMemo, useState } from "react"; import { Flag } from "../../components/Flag/Flag"; diff --git a/apps/app-vite-react/src/app/layout/HorizontalLayout/HorizontalLayout.tsx b/apps/app-vite-react/src/app/layout/HorizontalLayout/HorizontalLayout.tsx index 1597a0f9..98a38fc9 100644 --- a/apps/app-vite-react/src/app/layout/HorizontalLayout/HorizontalLayout.tsx +++ b/apps/app-vite-react/src/app/layout/HorizontalLayout/HorizontalLayout.tsx @@ -1,11 +1,11 @@ import type { Breakpoint } from "@mui/material"; -import type * as RouteTypes from "@org/app-vite-react/server/route-typings"; +import type * as RouteTypes from "@/server/route-typings"; import { ChevronRight, ExpandMore } from "@mui/icons-material"; import * as mui from "@mui/material"; -import { sigUser } from "@org/app-vite-react/app/signals/sigUser"; -import { useTranslation } from "@org/app-vite-react/lib/i18next"; -import { reactServer } from "@org/app-vite-react/server/server"; +import { sigUser } from "@/app/signals/sigUser"; +import { useTranslation } from "@/lib/i18next"; +import { reactServer } from "@/server/server"; import { Fragment } from "react"; import { useNavigate } from "react-router-dom"; diff --git a/apps/app-vite-react/src/app/layout/Layout.tsx b/apps/app-vite-react/src/app/layout/Layout.tsx index a6d42d7d..b6b31599 100644 --- a/apps/app-vite-react/src/app/layout/Layout.tsx +++ b/apps/app-vite-react/src/app/layout/Layout.tsx @@ -1,14 +1,14 @@ import type { PropsWithChildren } from "react"; import { Box, type Breakpoint, Container, useMediaQuery } from "@mui/material"; -import { Footer } from "@org/app-vite-react/app/components/Footer"; -import { Header } from "@org/app-vite-react/app/components/Header"; -import { Logo } from "@org/app-vite-react/app/components/Logo"; -import { Sidebar } from "@org/app-vite-react/app/components/Sidebar"; -import { sigLayoutVariant } from "@org/app-vite-react/app/signals/sigLayoutVariant"; -import { sigLayoutWidth } from "@org/app-vite-react/app/signals/sigLayoutWidth"; -import { sigSidebarOpen } from "@org/app-vite-react/app/signals/sigSidebarOpen"; -import { type NavigationRoute } from "@org/app-vite-react/server/route-typings"; +import { Footer } from "@/app/components/Footer"; +import { Header } from "@/app/components/Header"; +import { Logo } from "@/app/components/Logo"; +import { Sidebar } from "@/app/components/Sidebar"; +import { sigLayoutVariant } from "@/app/signals/sigLayoutVariant"; +import { sigLayoutWidth } from "@/app/signals/sigLayoutWidth"; +import { sigSidebarOpen } from "@/app/signals/sigSidebarOpen"; +import { type NavigationRoute } from "@/server/route-typings"; import { HorizontalLayout } from "./HorizontalLayout"; import { SidebarLayout } from "./SidebarLayout"; diff --git a/apps/app-vite-react/src/app/layout/SidebarLayout/SidebarLayout.tsx b/apps/app-vite-react/src/app/layout/SidebarLayout/SidebarLayout.tsx index 45ba9f6b..feb2c93f 100644 --- a/apps/app-vite-react/src/app/layout/SidebarLayout/SidebarLayout.tsx +++ b/apps/app-vite-react/src/app/layout/SidebarLayout/SidebarLayout.tsx @@ -1,14 +1,14 @@ -import type * as RouteTypes from "@org/app-vite-react/server/route-typings"; +import type * as RouteTypes from "@/server/route-typings"; import { ExpandLess, ExpandMore } from "@mui/icons-material"; import { Collapse, Divider, List, ListItemButton, ListItemIcon, ListItemText } from "@mui/material"; -import { isAnyRouteActive } from "@org/app-vite-react/app/layout/Layout"; -import { sigUser } from "@org/app-vite-react/app/signals/sigUser"; -import { useTranslation } from "@org/app-vite-react/lib/i18next"; -import { reactServer } from "@org/app-vite-react/server/server"; import { useState } from "react"; import { Fragment } from "react/jsx-runtime"; import { useLocation, useNavigate } from "react-router-dom"; +import { isAnyRouteActive } from "@/app/layout/Layout"; +import { sigUser } from "@/app/signals/sigUser"; +import { useTranslation } from "@/lib/i18next"; +import { reactServer } from "@/server/server"; export type SidebarNavItemProps = { item: RouteTypes.NavigationRoute & { accumulatedPath: string }; diff --git a/apps/app-vite-react/src/app/models/ConstraintViolation.ts b/apps/app-vite-react/src/app/models/ConstraintViolation.ts index 10330977..e3188c89 100644 --- a/apps/app-vite-react/src/app/models/ConstraintViolation.ts +++ b/apps/app-vite-react/src/app/models/ConstraintViolation.ts @@ -1,6 +1,6 @@ import type { ConstraintViolationExecOptions } from "@org/lib-api-client"; -import { tsrClient } from "@org/app-vite-react/lib/@ts-rest"; +import { tsrClient } from "@/lib/@ts-rest"; export async function executeConstraintValidation({ body, diff --git a/apps/app-vite-react/src/app/pages/admin-settings/manage-users/components/ClientResponsiveTable.tsx b/apps/app-vite-react/src/app/pages/admin-settings/manage-users/components/ClientResponsiveTable.tsx index d772a52b..b0528646 100644 --- a/apps/app-vite-react/src/app/pages/admin-settings/manage-users/components/ClientResponsiveTable.tsx +++ b/apps/app-vite-react/src/app/pages/admin-settings/manage-users/components/ClientResponsiveTable.tsx @@ -1,4 +1,4 @@ -import type { ClientDatatableProps } from "@org/app-vite-react/app/components/Datatable"; +import type { ClientDatatableProps } from "@/app/components/Datatable"; import * as icons from "@mui/icons-material"; import * as mui from "@mui/material"; diff --git a/apps/app-vite-react/src/app/pages/admin-settings/manage-users/components/UserForm.tsx b/apps/app-vite-react/src/app/pages/admin-settings/manage-users/components/UserForm.tsx index 709822c7..94add924 100644 --- a/apps/app-vite-react/src/app/pages/admin-settings/manage-users/components/UserForm.tsx +++ b/apps/app-vite-react/src/app/pages/admin-settings/manage-users/components/UserForm.tsx @@ -1,7 +1,7 @@ import * as mui from "@mui/material"; -import * as inputs from "@org/app-vite-react/app/forms/input"; -import { executeConstraintValidation } from "@org/app-vite-react/app/models/ConstraintViolation"; -import { useZodForm, type FormProps } from "@org/app-vite-react/lib/react-hook-form"; +import * as inputs from "@/app/forms/input"; +import { executeConstraintValidation } from "@/app/models/ConstraintViolation"; +import { useZodForm, type FormProps } from "@/lib/react-hook-form"; import { ROLE_LIST, UserForm as UserFormModel } from "@org/lib-api-client"; import { z, debounce } from "@org/lib-commons"; diff --git a/apps/app-vite-react/src/app/pages/admin-settings/manage-users/index.tsx b/apps/app-vite-react/src/app/pages/admin-settings/manage-users/index.tsx index 9a659cfd..223a0228 100644 --- a/apps/app-vite-react/src/app/pages/admin-settings/manage-users/index.tsx +++ b/apps/app-vite-react/src/app/pages/admin-settings/manage-users/index.tsx @@ -2,19 +2,16 @@ import type { PaginationOptions, zod } from "@org/lib-commons"; import * as icons from "@mui/icons-material"; import * as mui from "@mui/material"; -import { - DatatableContainer, - DEFAULT_PAGINATION_OPTIONS, -} from "@org/app-vite-react/app/components/Datatable"; -import { DatatableFilterButton } from "@org/app-vite-react/app/components/Datatable/components/DatatableFilterButton"; -import { Datatable } from "@org/app-vite-react/app/components/Datatable/Datatable"; -import { InputText } from "@org/app-vite-react/app/forms"; -import { useConfirm } from "@org/app-vite-react/app/provider/ConfirmProvider"; -import { useSnackbar } from "@org/app-vite-react/app/provider/SnackbarProvider"; -import { sigDirection } from "@org/app-vite-react/app/signals/sigDirection"; -import { sigUser } from "@org/app-vite-react/app/signals/sigUser"; -import { tsrClient, tsrQuery } from "@org/app-vite-react/lib/@ts-rest"; -import { useZodForm } from "@org/app-vite-react/lib/react-hook-form"; +import { DatatableContainer, DEFAULT_PAGINATION_OPTIONS } from "@/app/components/Datatable"; +import { DatatableFilterButton } from "@/app/components/Datatable/components/DatatableFilterButton"; +import { Datatable } from "@/app/components/Datatable/Datatable"; +import { InputText } from "@/app/forms"; +import { useConfirm } from "@/app/provider/ConfirmProvider"; +import { useSnackbar } from "@/app/provider/SnackbarProvider"; +import { sigDirection } from "@/app/signals/sigDirection"; +import { sigUser } from "@/app/signals/sigUser"; +import { tsrClient, tsrQuery } from "@/lib/@ts-rest"; +import { useZodForm } from "@/lib/react-hook-form"; import { type UserDto } from "@org/lib-api-client"; import { z } from "@org/lib-commons"; import React from "react"; diff --git a/apps/app-vite-react/src/app/pages/admin-settings/manage-users/pages/create-user/index.tsx b/apps/app-vite-react/src/app/pages/admin-settings/manage-users/pages/create-user/index.tsx index 9faaf930..d1d45d8d 100644 --- a/apps/app-vite-react/src/app/pages/admin-settings/manage-users/pages/create-user/index.tsx +++ b/apps/app-vite-react/src/app/pages/admin-settings/manage-users/pages/create-user/index.tsx @@ -1,9 +1,9 @@ -import { useSnackbar } from "@org/app-vite-react/app/provider/SnackbarProvider"; -import { tsrClient } from "@org/app-vite-react/lib/@ts-rest"; import { DEFAULT_USER_FORM_STATE, type UserForm as UserFormModel } from "@org/lib-api-client"; import { useNavigate } from "react-router-dom"; import { UserForm } from "../../components"; +import { useSnackbar } from "@/app/provider/SnackbarProvider"; +import { tsrClient } from "@/lib/@ts-rest"; export default function CreateUserPage() { const navigate = useNavigate(); diff --git a/apps/app-vite-react/src/app/pages/admin-settings/manage-users/pages/edit-user/index.tsx b/apps/app-vite-react/src/app/pages/admin-settings/manage-users/pages/edit-user/index.tsx index 814f8a0f..b78ba039 100644 --- a/apps/app-vite-react/src/app/pages/admin-settings/manage-users/pages/edit-user/index.tsx +++ b/apps/app-vite-react/src/app/pages/admin-settings/manage-users/pages/edit-user/index.tsx @@ -1,8 +1,8 @@ import type { UserForm as UserFormModel } from "@org/lib-api-client"; import { Card } from "@mui/material"; -import { useSnackbar } from "@org/app-vite-react/app/provider/SnackbarProvider"; -import { tsrClient } from "@org/app-vite-react/lib/@ts-rest"; +import { useSnackbar } from "@/app/provider/SnackbarProvider"; +import { tsrClient } from "@/lib/@ts-rest"; import React from "react"; import { useNavigate, useParams } from "react-router-dom"; diff --git a/apps/app-vite-react/src/app/pages/visual-preferences/index.tsx b/apps/app-vite-react/src/app/pages/visual-preferences/index.tsx index 9fe1f66f..7128458e 100644 --- a/apps/app-vite-react/src/app/pages/visual-preferences/index.tsx +++ b/apps/app-vite-react/src/app/pages/visual-preferences/index.tsx @@ -1,15 +1,12 @@ -import type { LayoutWidth, Locale } from "@org/app-vite-react/app/models"; +import type { LayoutWidth, Locale } from "@/app/models"; import * as mui from "@mui/material"; -import * as inputs from "@org/app-vite-react/app/forms/input"; -import { sigLayoutVariant } from "@org/app-vite-react/app/signals/sigLayoutVariant"; -import { - LAYOUT_WIDTH_OPTIONS, - sigLayoutWidth, -} from "@org/app-vite-react/app/signals/sigLayoutWidth"; -import { sigLocale } from "@org/app-vite-react/app/signals/sigLocale"; -import { sigThemeOpts } from "@org/app-vite-react/app/signals/sigTheme"; -import { I18N_LANGUAGE_LIST } from "@org/app-vite-react/lib/i18next"; +import * as inputs from "@/app/forms/input"; +import { sigLayoutVariant } from "@/app/signals/sigLayoutVariant"; +import { LAYOUT_WIDTH_OPTIONS, sigLayoutWidth } from "@/app/signals/sigLayoutWidth"; +import { sigLocale } from "@/app/signals/sigLocale"; +import { sigThemeOpts } from "@/app/signals/sigTheme"; +import { I18N_LANGUAGE_LIST } from "@/lib/i18next"; import { LabelInputGroup } from "./LabelInputGroup"; import { Flag } from "../../components/Flag/Flag"; diff --git a/apps/app-vite-react/src/app/providers.tsx b/apps/app-vite-react/src/app/providers.tsx index 8a07c3a9..3e6cd765 100644 --- a/apps/app-vite-react/src/app/providers.tsx +++ b/apps/app-vite-react/src/app/providers.tsx @@ -1,9 +1,9 @@ -import { ConfirmProvider } from "@org/app-vite-react/app/provider/ConfirmProvider"; -import { SnackbarProvider } from "@org/app-vite-react/app/provider/SnackbarProvider"; -import { MuiStylesProvider, MuiThemeProvider } from "@org/app-vite-react/lib/@mui"; -import { QueryClientProvider } from "@org/app-vite-react/lib/@tanstack"; -import { KeycloakProvider } from "@org/app-vite-react/lib/keycloak-js"; -import { type Provider } from "@org/app-vite-react/server/ReactApp"; +import { ConfirmProvider } from "@/app/provider/ConfirmProvider"; +import { SnackbarProvider } from "@/app/provider/SnackbarProvider"; +import { MuiStylesProvider, MuiThemeProvider } from "@/lib/@mui"; +import { QueryClientProvider } from "@/lib/@tanstack"; +import { KeycloakProvider } from "@/lib/keycloak-js"; +import { type Provider } from "@/server/ReactApp"; export const providers = [ MuiStylesProvider, diff --git a/apps/app-vite-react/src/app/routes.tsx b/apps/app-vite-react/src/app/routes.tsx index 4862aec2..da906d37 100644 --- a/apps/app-vite-react/src/app/routes.tsx +++ b/apps/app-vite-react/src/app/routes.tsx @@ -1,8 +1,8 @@ -import type { NavigationRoute } from "@org/app-vite-react/server/route-typings"; +import type { NavigationRoute } from "@/server/route-typings"; -import ManageUsersPage from "@org/app-vite-react/app/pages/admin-settings/manage-users"; -import HomePage from "@org/app-vite-react/app/pages/home"; -import VisualPreferencesPage from "@org/app-vite-react/app/pages/visual-preferences"; +import ManageUsersPage from "@/app/pages/admin-settings/manage-users"; +import HomePage from "@/app/pages/home"; +import VisualPreferencesPage from "@/app/pages/visual-preferences"; import CreateUserPage from "./pages/admin-settings/manage-users/pages/create-user"; import EditUserPage from "./pages/admin-settings/manage-users/pages/edit-user"; diff --git a/apps/app-vite-react/src/app/signals/sigDirection.ts b/apps/app-vite-react/src/app/signals/sigDirection.ts index 2c8c5e37..3070ac89 100644 --- a/apps/app-vite-react/src/app/signals/sigDirection.ts +++ b/apps/app-vite-react/src/app/signals/sigDirection.ts @@ -1,5 +1,5 @@ -import { sigLocale } from "@org/app-vite-react/app/signals/sigLocale"; -import * as i18n from "@org/app-vite-react/lib/i18next"; +import { sigLocale } from "@/app/signals/sigLocale"; +import * as i18n from "@/lib/i18next"; import { computed } from "@preact/signals-react"; export const sigDirection = computed(() => { diff --git a/apps/app-vite-react/src/app/signals/sigLocale.ts b/apps/app-vite-react/src/app/signals/sigLocale.ts index ec67122c..3dcbb8c1 100644 --- a/apps/app-vite-react/src/app/signals/sigLocale.ts +++ b/apps/app-vite-react/src/app/signals/sigLocale.ts @@ -1,6 +1,6 @@ import type { Locale } from "../models"; -import * as i18n from "@org/app-vite-react/lib/i18next"; +import * as i18n from "@/lib/i18next"; import { effect, signal } from "@preact/signals-react"; import { LocalStorage } from "../../server/LocalStorage"; diff --git a/apps/app-vite-react/src/app/signals/sigUser.ts b/apps/app-vite-react/src/app/signals/sigUser.ts index cce432ca..c0a34e87 100644 --- a/apps/app-vite-react/src/app/signals/sigUser.ts +++ b/apps/app-vite-react/src/app/signals/sigUser.ts @@ -1,4 +1,4 @@ -import { type KeycloakUser } from "@org/app-vite-react/lib/keycloak-js"; +import { type KeycloakUser } from "@/lib/keycloak-js"; import { signal } from "@preact/signals-react"; type LocalUser = (KeycloakUser & { name: string }) | null; diff --git a/apps/app-vite-react/src/lib/@mui/MuiThemeProvider.tsx b/apps/app-vite-react/src/lib/@mui/MuiThemeProvider.tsx index 5556957c..3c0beea9 100644 --- a/apps/app-vite-react/src/lib/@mui/MuiThemeProvider.tsx +++ b/apps/app-vite-react/src/lib/@mui/MuiThemeProvider.tsx @@ -1,7 +1,7 @@ import type { PropsWithChildren } from "react"; import { ThemeProvider } from "@mui/material"; -import { sigTheme } from "@org/app-vite-react/app/signals/sigTheme"; +import { sigTheme } from "@/app/signals/sigTheme"; export function MuiThemeProvider({ children }: PropsWithChildren) { return {children}; diff --git a/apps/app-vite-react/src/lib/@ts-rest/tsRestApiClient.ts b/apps/app-vite-react/src/lib/@ts-rest/tsRestApiClient.ts index d2710cc1..5666faf7 100644 --- a/apps/app-vite-react/src/lib/@ts-rest/tsRestApiClient.ts +++ b/apps/app-vite-react/src/lib/@ts-rest/tsRestApiClient.ts @@ -1,6 +1,6 @@ import type { ClientArgs } from "@ts-rest/core"; -import { sigUser } from "@org/app-vite-react/app/signals/sigUser"; +import { sigUser } from "@/app/signals/sigUser"; import { contracts, initClient } from "@org/lib-api-client"; import { initTsrReactQuery } from "@ts-rest/react-query/v5"; diff --git a/apps/app-vite-react/src/lib/keycloak-js/KeycloakProvider.tsx b/apps/app-vite-react/src/lib/keycloak-js/KeycloakProvider.tsx index 3e966095..e756f8cd 100644 --- a/apps/app-vite-react/src/lib/keycloak-js/KeycloakProvider.tsx +++ b/apps/app-vite-react/src/lib/keycloak-js/KeycloakProvider.tsx @@ -1,8 +1,8 @@ -import type * as KC from "@org/app-vite-react/lib/keycloak-js"; +import type * as KC from "@/lib/keycloak-js"; import type { Role } from "@org/lib-api-client"; -import { sigUser } from "@org/app-vite-react/app/signals/sigUser"; -import { keycloakClient } from "@org/app-vite-react/lib/keycloak-js/KeycloakClient"; +import { sigUser } from "@/app/signals/sigUser"; +import { keycloakClient } from "@/lib/keycloak-js/KeycloakClient"; import { ReactKeycloakProvider, useKeycloak } from "@react-keycloak/web"; import { jwtDecode } from "jwt-decode"; import { type KeycloakTokenParsed } from "keycloak-js"; diff --git a/apps/app-vite-react/src/lib/keycloak-js/KeycloakRoute.tsx b/apps/app-vite-react/src/lib/keycloak-js/KeycloakRoute.tsx index 2f581dab..b4f202f9 100644 --- a/apps/app-vite-react/src/lib/keycloak-js/KeycloakRoute.tsx +++ b/apps/app-vite-react/src/lib/keycloak-js/KeycloakRoute.tsx @@ -1,6 +1,6 @@ -import type { NavigationRouteProtect } from "@org/app-vite-react/server/route-typings"; +import type { NavigationRouteProtect } from "@/server/route-typings"; -import { type KeycloakUser } from "@org/app-vite-react/lib/keycloak-js/KeycloakUser"; +import { type KeycloakUser } from "@/lib/keycloak-js/KeycloakUser"; import { Navigate, useLocation, type RouteObject } from "react-router-dom"; export function KeycloakRoute({ diff --git a/apps/app-vite-react/src/lib/keycloak-js/index.ts b/apps/app-vite-react/src/lib/keycloak-js/index.ts index f0fb6565..83725a27 100644 --- a/apps/app-vite-react/src/lib/keycloak-js/index.ts +++ b/apps/app-vite-react/src/lib/keycloak-js/index.ts @@ -1,4 +1,4 @@ -export * from "@org/app-vite-react/lib/keycloak-js/KeycloakClient"; -export * from "@org/app-vite-react/lib/keycloak-js/KeycloakProvider"; -export * from "@org/app-vite-react/lib/keycloak-js/KeycloakUser"; -export * from "@org/app-vite-react/lib/keycloak-js/KeycloakRoute"; +export * from "@/lib/keycloak-js/KeycloakClient"; +export * from "@/lib/keycloak-js/KeycloakProvider"; +export * from "@/lib/keycloak-js/KeycloakUser"; +export * from "@/lib/keycloak-js/KeycloakRoute"; diff --git a/apps/app-vite-react/src/main.tsx b/apps/app-vite-react/src/main.tsx index b16b6258..7bff6b7d 100644 --- a/apps/app-vite-react/src/main.tsx +++ b/apps/app-vite-react/src/main.tsx @@ -1,13 +1,13 @@ -import "@org/app-vite-react/lib/i18next/i18n"; +import "@/lib/i18next/i18n"; -import { Layout as layoutElement } from "@org/app-vite-react/app/layout"; -import { providers } from "@org/app-vite-react/app/providers"; -import { routes } from "@org/app-vite-react/app/routes"; -import { MuiCssBaseline as cssBaseline } from "@org/app-vite-react/lib/@mui"; -import { reactServer } from "@org/app-vite-react/server/server"; import { useRouteError } from "react-router-dom"; +import { Layout as layoutElement } from "@/app/layout"; +import { providers } from "@/app/providers"; +import { routes } from "@/app/routes"; +import { MuiCssBaseline as cssBaseline } from "@/lib/@mui"; +import { reactServer } from "@/server/server"; -import "@org/app-vite-react/main.css"; +import "@/main.css"; // eslint-disable-next-line react-refresh/only-export-components function RootErrorPage() { diff --git a/apps/app-vite-react/src/server/ReactApp.tsx b/apps/app-vite-react/src/server/ReactApp.tsx index 6b8a3c3e..9bdadf4b 100644 --- a/apps/app-vite-react/src/server/ReactApp.tsx +++ b/apps/app-vite-react/src/server/ReactApp.tsx @@ -2,9 +2,9 @@ import type { NavigationRouteProtect, NavigationRoute, NavigationRouteItem, -} from "@org/app-vite-react/server/route-typings"; +} from "@/server/route-typings"; -import { sigDirection } from "@org/app-vite-react/app/signals/sigDirection"; +import { sigDirection } from "@/app/signals/sigDirection"; import React from "react"; import ReactDOM from "react-dom/client"; import * as RouterDOM from "react-router-dom"; diff --git a/apps/app-vite-react/src/server/route-typings.ts b/apps/app-vite-react/src/server/route-typings.ts index 704d47b8..34f25af7 100644 --- a/apps/app-vite-react/src/server/route-typings.ts +++ b/apps/app-vite-react/src/server/route-typings.ts @@ -1,5 +1,5 @@ -import { type I18nTranslateFn } from "@org/app-vite-react/lib/i18next"; -import { type KeycloakUser } from "@org/app-vite-react/lib/keycloak-js"; +import { type I18nTranslateFn } from "@/lib/i18next"; +import { type KeycloakUser } from "@/lib/keycloak-js"; import { type ReactNode } from "react"; import { type RouteObject as RouteObjectDom } from "react-router-dom"; diff --git a/apps/app-vite-react/src/server/server.ts b/apps/app-vite-react/src/server/server.ts index a9ec2593..8fb75aee 100644 --- a/apps/app-vite-react/src/server/server.ts +++ b/apps/app-vite-react/src/server/server.ts @@ -1,3 +1,3 @@ -import { ReactApp } from "@org/app-vite-react/server/ReactApp"; +import { ReactApp } from "@/server/ReactApp"; export const reactServer = new ReactApp(); diff --git a/apps/app-vite-react/test/App.test.tsx b/apps/app-vite-react/test/App.test.tsx index 48c1f566..187d3f77 100644 --- a/apps/app-vite-react/test/App.test.tsx +++ b/apps/app-vite-react/test/App.test.tsx @@ -1,6 +1,6 @@ /// -import HomePage from "@org/app-vite-react/app/pages/home"; +import HomePage from "@/app/pages/home"; import { render, screen } from "@testing-library/react"; describe("App", () => { diff --git a/apps/app-vite-react/test/root.test.tsx b/apps/app-vite-react/test/root.test.tsx index 5dd6a9b9..3f08ad32 100644 --- a/apps/app-vite-react/test/root.test.tsx +++ b/apps/app-vite-react/test/root.test.tsx @@ -1,6 +1,6 @@ /// -//import { HomePage } from "@org/app-vite-react/app/pages/Home"; +//import { HomePage } from "@/app/pages/Home"; //import { render, screen } from "@testing-library/react"; //import { MemoryRouter } from "react-router-dom"; diff --git a/apps/app-vite-react/tsconfig.json b/apps/app-vite-react/tsconfig.json index 38484586..0ad1a649 100644 --- a/apps/app-vite-react/tsconfig.json +++ b/apps/app-vite-react/tsconfig.json @@ -32,9 +32,9 @@ "noFallthroughCasesInSwitch": true, "baseUrl": "./src", "paths": { - "@org/app-vite-react/*": ["*"], - "@org/lib-api-client": ["../../lib-api-client/src"], - "@org/lib-commons": ["../../lib-commons/src"] + "@/*": ["*"], + "@org/lib-api-client": ["../../../packages/lib-api-client/dist/src/index"], + "@org/lib-commons": ["../../../packages/lib-commons/dist/src/index"] } } } diff --git a/apps/app-vite-react/vite.config.ts b/apps/app-vite-react/vite.config.ts index e194e763..635aca2a 100644 --- a/apps/app-vite-react/vite.config.ts +++ b/apps/app-vite-react/vite.config.ts @@ -4,6 +4,7 @@ import path from "path"; import react from "@vitejs/plugin-react"; import { defineConfig } from "vite"; +import tsconfigPaths from "vite-tsconfig-paths"; function pwd(...args: string[]): string { return path.resolve(__dirname, ...args); @@ -29,12 +30,13 @@ export default defineConfig({ reporter: ["text"], }, alias: { - "@org/app-vite-react": pwd("src"), - "@org/lib-commons": pwd("../", "lib-commons", "src"), - "@org/lib-api-client": pwd("../", "lib-api-client", "src"), + "@/*": pwd("src/*"), + "@org/lib-commons": pwd("../../packages", "lib-commons", "src"), + "@org/lib-api-client": pwd("../../packages", "lib-api-client", "src"), }, }, plugins: [ + tsconfigPaths(), react({ babel: { plugins: [["module:@preact/signals-react-transform"]], @@ -43,9 +45,9 @@ export default defineConfig({ ], resolve: { alias: { - "@org/app-vite-react": pwd("src"), - "@org/lib-commons": pwd("../", "lib-commons", "src"), - "@org/lib-api-client": pwd("../", "lib-api-client", "src"), + "@/*": path.resolve(__dirname, "./src/*"), + "@org/lib-commons": pwd("../../packages", "lib-commons", "src"), + "@org/lib-api-client": pwd("../../packages", "lib-api-client", "src"), }, }, });