@vitnode/core 1.2.0-canary.16 → 1.2.0-canary.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/scripts/scripts.js +5 -7
- package/dist/scripts/shared/file-utils.d.ts.map +1 -1
- package/dist/src/api/config.js +3 -3
- package/dist/src/api/lib/check-plugin-id.js +1 -1
- package/dist/src/api/lib/plugin.js +1 -1
- package/dist/src/api/lib/route.js +1 -1
- package/dist/src/api/middlewares/global/global.js +3 -3
- package/dist/src/api/models/device.js +3 -3
- package/dist/src/api/models/session-admin.js +3 -3
- package/dist/src/api/models/session.js +3 -3
- package/dist/src/api/models/sso.js +4 -4
- package/dist/src/api/models/user/get-user-by-id.js +1 -1
- package/dist/src/api/models/user/sign-in-with-passwords.js +2 -2
- package/dist/src/api/models/user/sign-up.js +5 -5
- package/dist/src/api/models/user.js +3 -3
- package/dist/src/api/modules/admin/admin.module.js +4 -4
- package/dist/src/api/modules/admin/routes/session.route.js +2 -2
- package/dist/src/api/modules/admin/users/routes/list.route.js +4 -4
- package/dist/src/api/modules/admin/users/routes/users.route.js +4 -4
- package/dist/src/api/modules/admin/users/users.admin.module.js +3 -3
- package/dist/src/api/modules/middleware/middleware.module.js +3 -3
- package/dist/src/api/modules/middleware/route.js +3 -3
- package/dist/src/api/modules/users/avatar-color.js +1 -1
- package/dist/src/api/modules/users/routes/session.route.js +3 -3
- package/dist/src/api/modules/users/routes/sign-in.route.js +5 -5
- package/dist/src/api/modules/users/routes/sign-out.route.js +4 -4
- package/dist/src/api/modules/users/routes/sign-up.route.js +4 -4
- package/dist/src/api/modules/users/routes/test.route.js +2 -2
- package/dist/src/api/modules/users/sso/routes/callback.route.js +4 -4
- package/dist/src/api/modules/users/sso/routes/create-url.route.js +3 -3
- package/dist/src/api/modules/users/sso/sso.module.js +4 -4
- package/dist/src/api/modules/users/users.module.js +8 -8
- package/dist/src/api/plugin.js +5 -5
- package/dist/src/api/plugins/sso/discord.js +1 -1
- package/dist/src/api/plugins/sso/facebook.js +1 -1
- package/dist/src/api/plugins/sso/google.js +1 -1
- package/dist/src/app/login/page.js +1 -1
- package/dist/src/app/login/sso/[providerId]/page.js +1 -1
- package/dist/src/app/register/page.js +1 -1
- package/dist/src/app_admin/core/page.js +1 -1
- package/dist/src/app_admin/core/test/page.js +1 -1
- package/dist/src/app_admin/core/users/page.js +3 -3
- package/dist/src/components/avatar.js +1 -1
- package/dist/src/components/date-format.js +1 -1
- package/dist/src/components/form/auto-form.js +5 -5
- package/dist/src/components/form/common/desc.js +1 -1
- package/dist/src/components/form/common/label.js +1 -1
- package/dist/src/components/form/fields/checkbox.js +4 -4
- package/dist/src/components/form/fields/combobox.js +8 -8
- package/dist/src/components/form/fields/input.js +4 -4
- package/dist/src/components/form/fields/item.js +2 -2
- package/dist/src/components/form/fields/radio-group.js +5 -5
- package/dist/src/components/form/fields/select.js +5 -5
- package/dist/src/components/form/fields/switch.js +4 -4
- package/dist/src/components/form/fields/textarea.js +4 -4
- package/dist/src/components/logo-vitnode.js +1 -1
- package/dist/src/components/switchers/theme-switcher.js +1 -1
- package/dist/src/components/table/content.js +4 -4
- package/dist/src/components/table/data-table.js +4 -4
- package/dist/src/components/table/order-table-head.js +3 -3
- package/dist/src/components/table/pagination.js +4 -4
- package/dist/src/components/ui/accordion.js +1 -1
- package/dist/src/components/ui/alert-dialog.js +2 -2
- package/dist/src/components/ui/alert.js +1 -1
- package/dist/src/components/ui/badge.js +1 -1
- package/dist/src/components/ui/button.js +2 -2
- package/dist/src/components/ui/card.js +1 -1
- package/dist/src/components/ui/checkbox.js +1 -1
- package/dist/src/components/ui/command.js +2 -2
- package/dist/src/components/ui/context-menu.js +1 -1
- package/dist/src/components/ui/dialog.js +2 -2
- package/dist/src/components/ui/drawer.js +1 -1
- package/dist/src/components/ui/dropdown-menu.js +1 -1
- package/dist/src/components/ui/form.js +5 -5
- package/dist/src/components/ui/header-content.js +1 -1
- package/dist/src/components/ui/hover-card.js +1 -1
- package/dist/src/components/ui/input-otp.js +1 -1
- package/dist/src/components/ui/input.js +1 -1
- package/dist/src/components/ui/label.js +1 -1
- package/dist/src/components/ui/loader.js +1 -1
- package/dist/src/components/ui/menubar.js +1 -1
- package/dist/src/components/ui/navigation-menu.js +1 -1
- package/dist/src/components/ui/popover.js +1 -1
- package/dist/src/components/ui/progress.js +1 -1
- package/dist/src/components/ui/radio-group.js +1 -1
- package/dist/src/components/ui/select.js +1 -1
- package/dist/src/components/ui/separator.js +1 -1
- package/dist/src/components/ui/sheet.js +1 -1
- package/dist/src/components/ui/sidebar.js +8 -8
- package/dist/src/components/ui/skeleton.js +1 -1
- package/dist/src/components/ui/slider.js +1 -1
- package/dist/src/components/ui/sonner.js +1 -1
- package/dist/src/components/ui/switch.js +1 -1
- package/dist/src/components/ui/table.js +1 -1
- package/dist/src/components/ui/tabs.js +1 -1
- package/dist/src/components/ui/textarea.js +1 -1
- package/dist/src/components/ui/toggle-group.js +2 -2
- package/dist/src/components/ui/toggle.js +1 -1
- package/dist/src/components/ui/tooltip.js +1 -1
- package/dist/src/database/admins.js +3 -3
- package/dist/src/database/moderators.js +2 -2
- package/dist/src/database/sessions.js +1 -1
- package/dist/src/database/users.js +2 -2
- package/dist/src/drizzle.config.d.ts.map +1 -1
- package/dist/src/drizzle.config.js +4 -6
- package/dist/src/lib/api/get-middleware-api.js +2 -2
- package/dist/src/lib/api/get-session-admin-api.js +3 -3
- package/dist/src/lib/api/get-session-api.js +2 -2
- package/dist/src/lib/colors.test.js +1 -1
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.js +1 -1
- package/dist/src/lib/fetcher/helpers.js +1 -1
- package/dist/src/lib/fetcher/helpers.test.js +1 -1
- package/dist/src/lib/fetcher.js +2 -2
- package/dist/src/lib/helpers/auto-form.test.js +1 -1
- package/dist/src/lib/special-characters.test.js +1 -1
- package/dist/src/views/admin/layouts/admin-layout.js +7 -7
- package/dist/src/views/admin/layouts/sidebar/nav/item.js +5 -5
- package/dist/src/views/admin/layouts/sidebar/nav/nav.js +2 -2
- package/dist/src/views/admin/layouts/sidebar/sidebar.js +5 -5
- package/dist/src/views/admin/layouts/sidebar/sign-out.js +2 -2
- package/dist/src/views/admin/layouts/user-bar/client.js +3 -3
- package/dist/src/views/admin/layouts/user-bar/user-bar.js +4 -4
- package/dist/src/views/admin/sign-in/sign-in-admin-view.js +4 -4
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.js +4 -4
- package/dist/src/views/admin/views/core/test.js +8 -8
- package/dist/src/views/admin/views/core/users/users-admin-view.js +6 -6
- package/dist/src/views/auth/components/password-input.js +4 -4
- package/dist/src/views/auth/sign-in/form/form.js +4 -4
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.js +3 -3
- package/dist/src/views/auth/sign-in/form/hooks/use-form.js +1 -1
- package/dist/src/views/auth/sign-in/sign-in-view.js +5 -5
- package/dist/src/views/auth/sign-up/form/form.js +7 -7
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.js +2 -2
- package/dist/src/views/auth/sign-up/form/hooks/use-form.js +1 -1
- package/dist/src/views/auth/sign-up/sign-up-view.js +6 -6
- package/dist/src/views/auth/sso/buttons/client.js +2 -2
- package/dist/src/views/auth/sso/buttons/mutation-api.js +3 -3
- package/dist/src/views/auth/sso/buttons/sso-buttons.js +3 -3
- package/dist/src/views/auth/sso/callback/callback-sso-view.js +2 -2
- package/dist/src/views/auth/sso/callback/client/client.js +4 -4
- package/dist/src/views/auth/sso/callback/client/mutation-api.js +2 -2
- package/dist/src/views/error/back-button.js +2 -2
- package/dist/src/views/error/error-view.js +4 -4
- package/dist/src/views/error/global-error-view.js +2 -2
- package/dist/src/views/layouts/provider.js +2 -2
- package/dist/src/views/layouts/root-layout.js +2 -2
- package/dist/src/views/layouts/theme/header/header.js +5 -5
- package/dist/src/views/layouts/theme/header/user/auth/auth.js +5 -5
- package/dist/src/views/layouts/theme/header/user/auth/client.js +3 -3
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.js +3 -3
- package/dist/src/views/layouts/theme/header/user/user.js +5 -5
- package/dist/src/views/layouts/theme/layout.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/drizzle.config.ts +4 -8
- package/src/database/admins.ts +0 -87
- package/src/database/languages.ts +0 -54
- package/src/database/moderators.ts +0 -42
- package/src/database/roles.ts +0 -15
- package/src/database/sessions.ts +0 -59
- package/src/database/users.ts +0 -142
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense } from "react";
|
|
3
|
-
import { ThemeSwitcher } from "../../../../components/switchers/theme-switcher";
|
|
4
|
-
import { Skeleton } from "../../../../components/ui/skeleton";
|
|
5
|
-
import { Link } from "../../../../lib/navigation";
|
|
6
|
-
import { cn } from "../../../../lib/utils";
|
|
7
|
-
import { UserHeader } from "./user/user";
|
|
3
|
+
import { ThemeSwitcher } from "../../../../components/switchers/theme-switcher.js";
|
|
4
|
+
import { Skeleton } from "../../../../components/ui/skeleton.js";
|
|
5
|
+
import { Link } from "../../../../lib/navigation.js";
|
|
6
|
+
import { cn } from "../../../../lib/utils.js";
|
|
7
|
+
import { UserHeader } from "./user/user.js";
|
|
8
8
|
export const HeaderLayout = ({ logo, className, ...props })=>{
|
|
9
9
|
return /*#__PURE__*/ _jsxs("header", {
|
|
10
10
|
className: cn('bg-background/75 container sticky top-0 z-20 mx-auto flex w-full items-center border-b px-4 py-2 backdrop-blur sm:top-2 sm:rounded-xl sm:border', className),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Avatar } from "../../../../../../components/avatar";
|
|
3
|
-
import { Button } from "../../../../../../components/ui/button";
|
|
4
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from "../../../../../../components/ui/dropdown-menu";
|
|
5
|
-
import { getSessionApi } from "../../../../../../lib/api/get-session-api";
|
|
6
|
-
import { ClientAuthUserHeader } from "./client";
|
|
2
|
+
import { Avatar } from "../../../../../../components/avatar.js";
|
|
3
|
+
import { Button } from "../../../../../../components/ui/button.js";
|
|
4
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from "../../../../../../components/ui/dropdown-menu.js";
|
|
5
|
+
import { getSessionApi } from "../../../../../../lib/api/get-session-api.js";
|
|
6
|
+
import { ClientAuthUserHeader } from "./client.js";
|
|
7
7
|
export const AuthUserHeader = async ()=>{
|
|
8
8
|
const { user } = await getSessionApi();
|
|
9
9
|
if (!user) return null;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { KeyRoundIcon, LogOutIcon } from "lucide-react";
|
|
4
4
|
import { useTranslations } from "next-intl";
|
|
5
|
-
import { DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator } from "../../../../../../components/ui/dropdown-menu";
|
|
6
|
-
import { Link } from "../../../../../../lib/navigation";
|
|
7
|
-
import { logOutMutationApi } from "./log-out-mutation-api";
|
|
5
|
+
import { DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator } from "../../../../../../components/ui/dropdown-menu.js";
|
|
6
|
+
import { Link } from "../../../../../../lib/navigation.js";
|
|
7
|
+
import { logOutMutationApi } from "./log-out-mutation-api.js";
|
|
8
8
|
export const ClientAuthUserHeader = ({ user })=>{
|
|
9
9
|
const t = useTranslations('core.global.user_bar');
|
|
10
10
|
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use server';
|
|
2
2
|
import { revalidatePath } from "next/cache";
|
|
3
|
-
import { usersModule } from "../../../../../../api/modules/users/users.module";
|
|
4
|
-
import { fetcher } from "../../../../../../lib/fetcher";
|
|
5
|
-
import { redirect } from "../../../../../../lib/navigation";
|
|
3
|
+
import { usersModule } from "../../../../../../api/modules/users/users.module.js";
|
|
4
|
+
import { fetcher } from "../../../../../../lib/fetcher.js";
|
|
5
|
+
import { redirect } from "../../../../../../lib/navigation.js";
|
|
6
6
|
export const logOutMutationApi = async ({ isAdmin = false })=>{
|
|
7
7
|
const res = await fetcher(usersModule, {
|
|
8
8
|
path: '/sign_out',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { getTranslations } from "next-intl/server";
|
|
3
|
-
import { buttonVariants } from "../../../../../components/ui/button";
|
|
4
|
-
import { getSessionApi } from "../../../../../lib/api/get-session-api";
|
|
5
|
-
import { Link } from "../../../../../lib/navigation";
|
|
6
|
-
import { cn } from "../../../../../lib/utils";
|
|
7
|
-
import { AuthUserHeader } from "./auth/auth";
|
|
3
|
+
import { buttonVariants } from "../../../../../components/ui/button.js";
|
|
4
|
+
import { getSessionApi } from "../../../../../lib/api/get-session-api.js";
|
|
5
|
+
import { Link } from "../../../../../lib/navigation.js";
|
|
6
|
+
import { cn } from "../../../../../lib/utils.js";
|
|
7
|
+
import { AuthUserHeader } from "./auth/auth.js";
|
|
8
8
|
export const UserHeader = async ()=>{
|
|
9
9
|
const [t, session] = await Promise.all([
|
|
10
10
|
getTranslations('core.global'),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { HeaderLayout } from "./header/header";
|
|
2
|
+
import { HeaderLayout } from "./header/header.js";
|
|
3
3
|
export const ThemeLayout = ({ children, logo })=>{
|
|
4
4
|
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
5
5
|
children: [
|