wexts 3.0.2 → 4.1.0
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/README.md +49 -346
- package/bin/wexts.cjs +2 -0
- package/dist/chunk-2KAQYLVN.js +0 -0
- package/dist/chunk-2KAQYLVN.js.map +1 -1
- package/dist/{chunk-O42L6HOX.js → chunk-2LJVUMXW.js} +79 -93
- package/dist/chunk-2LJVUMXW.js.map +1 -0
- package/dist/chunk-342VRT25.mjs +504 -0
- package/dist/chunk-342VRT25.mjs.map +1 -0
- package/dist/chunk-7HNQWJWV.js +504 -0
- package/dist/chunk-7HNQWJWV.js.map +1 -0
- package/dist/chunk-7QKLIVRF.js +94 -0
- package/dist/chunk-7QKLIVRF.js.map +1 -0
- package/dist/chunk-7SSCNCTW.mjs +137 -0
- package/dist/chunk-7SSCNCTW.mjs.map +1 -0
- package/dist/chunk-7TLSPR65.mjs +95 -0
- package/dist/chunk-7TLSPR65.mjs.map +1 -0
- package/dist/{chunk-FCEZDH42.mjs → chunk-7WULUGLH.mjs} +5 -3
- package/dist/chunk-7WULUGLH.mjs.map +1 -0
- package/dist/chunk-AVMQJWYD.js +95 -0
- package/dist/chunk-AVMQJWYD.js.map +1 -0
- package/dist/{chunk-WF65EDRZ.js → chunk-BG56B4DE.js} +20 -2
- package/dist/chunk-BG56B4DE.js.map +1 -0
- package/dist/chunk-CLM5PNSG.mjs +496 -0
- package/dist/chunk-CLM5PNSG.mjs.map +1 -0
- package/dist/chunk-DNLGCKTT.js +31 -0
- package/dist/chunk-DNLGCKTT.js.map +1 -0
- package/dist/{chunk-VNNVLQLJ.mjs → chunk-JHOVXH3X.mjs} +2 -2
- package/dist/chunk-JHOVXH3X.mjs.map +1 -0
- package/dist/chunk-MXINIFPC.js +105 -0
- package/dist/chunk-MXINIFPC.js.map +1 -0
- package/dist/chunk-O4II6N34.js +137 -0
- package/dist/chunk-O4II6N34.js.map +1 -0
- package/dist/chunk-SE32ZPOZ.js +496 -0
- package/dist/chunk-SE32ZPOZ.js.map +1 -0
- package/dist/{chunk-STTOPUZ2.mjs → chunk-UAL54DVV.mjs} +21 -3
- package/dist/chunk-UAL54DVV.mjs.map +1 -0
- package/dist/{chunk-3OM7CHCA.js → chunk-WCKSKU3C.js} +1 -1
- package/dist/chunk-WCKSKU3C.js.map +1 -0
- package/dist/chunk-WU6FW77M.mjs +105 -0
- package/dist/chunk-WU6FW77M.mjs.map +1 -0
- package/dist/chunk-XE4OXN2W.js +0 -0
- package/dist/chunk-XE4OXN2W.js.map +1 -1
- package/dist/chunk-YBM3IJEA.mjs +94 -0
- package/dist/chunk-YBM3IJEA.mjs.map +1 -0
- package/dist/{chunk-KXYLEUSW.mjs → chunk-YN6WIWNQ.mjs} +69 -83
- package/dist/chunk-YN6WIWNQ.mjs.map +1 -0
- package/dist/chunk-YSLEF5C5.mjs +0 -0
- package/dist/chunk-YSLEF5C5.mjs.map +0 -0
- package/dist/chunk-ZX7QIN24.mjs +31 -0
- package/dist/chunk-ZX7QIN24.mjs.map +1 -0
- package/dist/cli/index.d.mts +22 -0
- package/dist/cli/index.d.ts +22 -0
- package/dist/cli/index.js +676 -292
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +678 -293
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/index.d.mts +10 -1
- package/dist/client/index.d.ts +10 -1
- package/dist/client/index.js +5 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +7 -4
- package/dist/client/index.mjs.map +0 -0
- package/dist/codegen/index.d.mts +2 -1
- package/dist/codegen/index.d.ts +2 -1
- package/dist/codegen/index.js +6 -3
- package/dist/codegen/index.js.map +1 -1
- package/dist/codegen/index.mjs +8 -5
- package/dist/codegen/index.mjs.map +0 -0
- package/dist/decorators-BT1FFqN0.d.mts +29 -0
- package/dist/decorators-DvS58PqC.d.ts +29 -0
- package/dist/dev-server/index.d.mts +1 -1
- package/dist/dev-server/index.d.ts +1 -1
- package/dist/dev-server/index.js +3 -3
- package/dist/dev-server/index.js.map +1 -1
- package/dist/dev-server/index.mjs +3 -3
- package/dist/dev-server/index.mjs.map +0 -0
- package/dist/{index-SjUaHgFr.d.ts → index-7QeQEf37.d.ts} +27 -10
- package/dist/{index-tFGPFVfQ.d.mts → index-7RvU-jGE.d.mts} +0 -1
- package/dist/{index-tFGPFVfQ.d.ts → index-7RvU-jGE.d.ts} +0 -1
- package/dist/{index-SjUaHgFr.d.mts → index-8nzxy0NN.d.mts} +27 -10
- package/dist/index-Co5ZsLqq.d.ts +58 -0
- package/dist/index-D94W1__r.d.mts +58 -0
- package/dist/index-DQmyVp6F.d.mts +27 -0
- package/dist/index-KL_1BrQb.d.ts +27 -0
- package/dist/index.d.mts +54 -7
- package/dist/index.d.ts +54 -7
- package/dist/index.js +70 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +62 -21
- package/dist/index.mjs.map +1 -1
- package/dist/nest/index.d.mts +3 -1
- package/dist/nest/index.d.ts +3 -1
- package/dist/nest/index.js +20 -2
- package/dist/nest/index.js.map +1 -1
- package/dist/nest/index.mjs +21 -3
- package/dist/nest/index.mjs.map +0 -0
- package/dist/next/index.d.mts +7 -2
- package/dist/next/index.d.ts +7 -2
- package/dist/next/index.js +135 -5
- package/dist/next/index.js.map +1 -1
- package/dist/next/index.mjs +133 -4
- package/dist/next/index.mjs.map +1 -1
- package/dist/rpc/index.d.mts +2 -0
- package/dist/rpc/index.d.ts +2 -0
- package/dist/rpc/index.js +23 -0
- package/dist/rpc/index.js.map +1 -0
- package/dist/rpc/index.mjs +23 -0
- package/dist/{chunk-7NSRDJ5C.mjs.map → rpc/index.mjs.map} +0 -0
- package/dist/runtime/index.d.mts +55 -0
- package/dist/runtime/index.d.ts +55 -0
- package/dist/runtime/index.js +221 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/index.mjs +221 -0
- package/dist/runtime/index.mjs.map +1 -0
- package/dist/types/index.d.mts +0 -0
- package/dist/types/index.d.ts +0 -0
- package/dist/types/index.js +0 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/index.mjs.map +0 -0
- package/dist/types-7d_fC-C3.d.mts +32 -0
- package/dist/types-7d_fC-C3.d.ts +32 -0
- package/dist/vercel-builder/index.d.mts +58 -0
- package/dist/vercel-builder/index.d.ts +58 -0
- package/dist/vercel-builder/index.js +330 -0
- package/dist/vercel-builder/index.js.map +1 -0
- package/dist/vercel-builder/index.mjs +330 -0
- package/dist/vercel-builder/index.mjs.map +1 -0
- package/package.json +37 -16
- package/templates/.dockerignore +43 -43
- package/templates/.env.example +0 -0
- package/templates/Dockerfile +60 -60
- package/templates/Procfile +1 -1
- package/templates/README.md +67 -58
- package/templates/api-sdk.ts +115 -115
- package/templates/docker-compose.yml +34 -34
- package/templates/nestjs-api/.env.example +0 -0
- package/templates/nestjs-api/README.md +87 -79
- package/templates/nestjs-api/nest-cli.json +6 -6
- package/templates/nestjs-api/package.json +40 -40
- package/templates/nestjs-api/prisma/dev.db +0 -0
- package/templates/nestjs-api/prisma/migrations/20251123205437_init/migration.sql +0 -0
- package/templates/nestjs-api/prisma/migrations/migration_lock.toml +0 -0
- package/templates/nestjs-api/prisma/schema.prisma +29 -29
- package/templates/nestjs-api/src/app.module.ts +17 -17
- package/templates/nestjs-api/src/auth/auth.controller.ts +27 -27
- package/templates/nestjs-api/src/auth/auth.module.ts +37 -29
- package/templates/nestjs-api/src/auth/auth.service.ts +86 -86
- package/templates/nestjs-api/src/auth/dto/auth.dto.ts +22 -22
- package/templates/nestjs-api/src/auth/guards/jwt-auth.guard.ts +5 -5
- package/templates/nestjs-api/src/auth/strategies/jwt.strategy.ts +27 -19
- package/templates/nestjs-api/src/main.ts +32 -32
- package/templates/nestjs-api/src/prisma/prisma.module.ts +9 -9
- package/templates/nestjs-api/src/prisma/prisma.service.ts +14 -14
- package/templates/nestjs-api/src/todos/dto/todo.dto.ts +24 -24
- package/templates/nestjs-api/src/todos/todos.controller.ts +39 -39
- package/templates/nestjs-api/src/todos/todos.module.ts +11 -11
- package/templates/nestjs-api/src/todos/todos.service.ts +53 -53
- package/templates/nestjs-api/src/users/users.controller.ts +14 -14
- package/templates/nestjs-api/src/users/users.module.ts +12 -12
- package/templates/nestjs-api/src/users/users.service.ts +19 -19
- package/templates/nestjs-api/tsconfig.json +39 -39
- package/templates/nextjs-web/README.md +76 -68
- package/templates/nextjs-web/app/actions/auth.ts +108 -108
- package/templates/nextjs-web/app/dashboard/error.tsx +39 -39
- package/templates/nextjs-web/app/dashboard/loading.tsx +14 -14
- package/templates/nextjs-web/app/dashboard/page.tsx +5 -5
- package/templates/nextjs-web/app/globals.css +93 -93
- package/templates/nextjs-web/app/layout.tsx +29 -29
- package/templates/nextjs-web/app/login/page.tsx +5 -5
- package/templates/nextjs-web/app/page.tsx +28 -28
- package/templates/nextjs-web/app/register/page.tsx +5 -5
- package/templates/nextjs-web/components/ui/button.tsx +56 -56
- package/templates/nextjs-web/components/ui/card.tsx +79 -79
- package/templates/nextjs-web/components/ui/input.tsx +25 -25
- package/templates/nextjs-web/components/ui/label.tsx +24 -24
- package/templates/nextjs-web/features/auth/LoginForm.tsx +140 -140
- package/templates/nextjs-web/features/auth/RegisterForm.tsx +159 -159
- package/templates/nextjs-web/features/auth/api.ts +35 -35
- package/templates/nextjs-web/features/auth/index.ts +3 -3
- package/templates/nextjs-web/features/dashboard/DashboardView.tsx +204 -204
- package/templates/nextjs-web/features/dashboard/api.ts +9 -9
- package/templates/nextjs-web/features/dashboard/components.tsx +74 -74
- package/templates/nextjs-web/features/dashboard/index.ts +3 -3
- package/templates/nextjs-web/hooks/index.ts +4 -4
- package/templates/nextjs-web/lib/api-client.ts +89 -89
- package/templates/nextjs-web/lib/api.ts +115 -115
- package/templates/nextjs-web/lib/axios-global-config.ts +17 -17
- package/templates/nextjs-web/lib/utils.ts +6 -6
- package/templates/nextjs-web/lib/wexts-client.ts +4 -4
- package/templates/nextjs-web/next-env.d.ts +6 -6
- package/templates/nextjs-web/next.config.ts +20 -20
- package/templates/nextjs-web/package.json +37 -37
- package/templates/nextjs-web/postcss.config.js +6 -6
- package/templates/nextjs-web/tailwind.config.ts +69 -69
- package/templates/nextjs-web/tsconfig.json +1 -1
- package/templates/nixpacks.toml +11 -11
- package/templates/root-package.json +31 -31
- package/templates/server.ts +66 -66
- package/templates/tsconfig.json +30 -30
- package/dist/chunk-2MCBBWEA.js +0 -1
- package/dist/chunk-2MCBBWEA.js.map +0 -1
- package/dist/chunk-3OM7CHCA.js.map +0 -1
- package/dist/chunk-63MTCWU2.mjs +0 -361
- package/dist/chunk-63MTCWU2.mjs.map +0 -1
- package/dist/chunk-667BQCEM.js +0 -375
- package/dist/chunk-667BQCEM.js.map +0 -1
- package/dist/chunk-67IJ6H4J.mjs +0 -44
- package/dist/chunk-67IJ6H4J.mjs.map +0 -1
- package/dist/chunk-6SVQEGEX.mjs +0 -44
- package/dist/chunk-6SVQEGEX.mjs.map +0 -1
- package/dist/chunk-7NSRDJ5C.mjs +0 -1
- package/dist/chunk-ASDXAK6G.js +0 -44
- package/dist/chunk-ASDXAK6G.js.map +0 -1
- package/dist/chunk-CKZ4VSCB.mjs +0 -18
- package/dist/chunk-CKZ4VSCB.mjs.map +0 -1
- package/dist/chunk-DW6GOKMF.js +0 -57
- package/dist/chunk-DW6GOKMF.js.map +0 -1
- package/dist/chunk-EFZPSZWO.mjs +0 -1
- package/dist/chunk-EFZPSZWO.mjs.map +0 -1
- package/dist/chunk-FCEZDH42.mjs.map +0 -1
- package/dist/chunk-FYGXL4V7.js +0 -361
- package/dist/chunk-FYGXL4V7.js.map +0 -1
- package/dist/chunk-GKVPGKAH.js +0 -66
- package/dist/chunk-GKVPGKAH.js.map +0 -1
- package/dist/chunk-GWP6PNSP.js +0 -225
- package/dist/chunk-GWP6PNSP.js.map +0 -1
- package/dist/chunk-HQKTXE7E.mjs +0 -225
- package/dist/chunk-HQKTXE7E.mjs.map +0 -1
- package/dist/chunk-HSFLZUJN.mjs +0 -57
- package/dist/chunk-HSFLZUJN.mjs.map +0 -1
- package/dist/chunk-HU63F22V.js +0 -361
- package/dist/chunk-HU63F22V.js.map +0 -1
- package/dist/chunk-J5LGTIGS.mjs +0 -10
- package/dist/chunk-J5LGTIGS.mjs.map +0 -1
- package/dist/chunk-JMBD6DOP.js +0 -225
- package/dist/chunk-JMBD6DOP.js.map +0 -1
- package/dist/chunk-K7EIJSYQ.js +0 -1
- package/dist/chunk-K7EIJSYQ.js.map +0 -1
- package/dist/chunk-KXYLEUSW.mjs.map +0 -1
- package/dist/chunk-MTHKZO55.js +0 -44
- package/dist/chunk-MTHKZO55.js.map +0 -1
- package/dist/chunk-NNQFLD7O.mjs +0 -361
- package/dist/chunk-NNQFLD7O.mjs.map +0 -1
- package/dist/chunk-NU2UB242.js +0 -82
- package/dist/chunk-NU2UB242.js.map +0 -1
- package/dist/chunk-NULGSZFE.mjs +0 -57
- package/dist/chunk-NULGSZFE.mjs.map +0 -1
- package/dist/chunk-O42L6HOX.js.map +0 -1
- package/dist/chunk-ONXNE2A6.mjs +0 -375
- package/dist/chunk-ONXNE2A6.mjs.map +0 -1
- package/dist/chunk-OTBYRUBE.mjs +0 -225
- package/dist/chunk-OTBYRUBE.mjs.map +0 -1
- package/dist/chunk-OTSAVKLY.mjs +0 -66
- package/dist/chunk-OTSAVKLY.mjs.map +0 -1
- package/dist/chunk-PZ5AY32C.js +0 -10
- package/dist/chunk-PZ5AY32C.js.map +0 -1
- package/dist/chunk-QP2TMRLG.js +0 -57
- package/dist/chunk-QP2TMRLG.js.map +0 -1
- package/dist/chunk-RS23R3ZQ.mjs +0 -82
- package/dist/chunk-RS23R3ZQ.mjs.map +0 -1
- package/dist/chunk-STTOPUZ2.mjs.map +0 -1
- package/dist/chunk-VMT3LALB.mjs +0 -51
- package/dist/chunk-VMT3LALB.mjs.map +0 -1
- package/dist/chunk-VNNVLQLJ.mjs.map +0 -1
- package/dist/chunk-W3YRVEFQ.js +0 -66
- package/dist/chunk-W3YRVEFQ.js.map +0 -1
- package/dist/chunk-WF65EDRZ.js.map +0 -1
- package/dist/chunk-WMHVXEYQ.mjs +0 -66
- package/dist/chunk-WMHVXEYQ.mjs.map +0 -1
- package/dist/chunk-XVKTIYHY.js +0 -51
- package/dist/chunk-XVKTIYHY.js.map +0 -1
- package/dist/codegen-MRZDLCYI.js +0 -13
- package/dist/codegen-MRZDLCYI.js.map +0 -1
- package/dist/codegen-UI5HTMXE.mjs +0 -13
- package/dist/codegen-UI5HTMXE.mjs.map +0 -1
- package/dist/dev-server-JKRVBWPY.mjs +0 -13
- package/dist/dev-server-JKRVBWPY.mjs.map +0 -1
- package/dist/dev-server-TLL7UQMR.js +0 -13
- package/dist/dev-server-TLL7UQMR.js.map +0 -1
- package/dist/index-BsNaOUtH.d.mts +0 -44
- package/dist/index-BsNaOUtH.d.ts +0 -44
- package/dist/index-CrbXnXsO.d.ts +0 -62
- package/dist/index-kEbGExWM.d.mts +0 -62
- package/templates/nestjs-api/.env +0 -4
- package/templates/nestjs-api/package-lock.json +0 -5623
- package/templates/nextjs-web/.env +0 -1
- package/templates/nextjs-web/package-lock.json +0 -3254
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import { connection } from 'next/server';
|
|
2
|
-
import { Suspense } from 'react';
|
|
3
|
-
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
|
4
|
-
import { getTodos, getUser } from './api';
|
|
5
|
-
|
|
6
|
-
export async function UserProfile() {
|
|
7
|
-
await connection();
|
|
8
|
-
try {
|
|
9
|
-
const user = await getUser();
|
|
10
|
-
if (!user) return null;
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<div className="space-y-2">
|
|
14
|
-
<div className="h-20 w-20 rounded-full bg-gradient-to-br from-primary to-indigo-600 flex items-center justify-center text-3xl text-white font-bold mx-auto mb-4 shadow-lg shadow-primary/25">
|
|
15
|
-
{user.email?.[0]?.toUpperCase() || 'U'}
|
|
16
|
-
</div>
|
|
17
|
-
<div className="text-center">
|
|
18
|
-
<h3 className="text-xl font-semibold">User ID: {user.id}</h3>
|
|
19
|
-
<p className="text-sm text-muted-foreground">{user.email}</p>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
);
|
|
23
|
-
} catch (e) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export async function TodoList() {
|
|
29
|
-
await connection();
|
|
30
|
-
try {
|
|
31
|
-
const todos = await getTodos();
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<div className="space-y-4">
|
|
35
|
-
{todos.length === 0 ? (
|
|
36
|
-
<p className="text-center text-muted-foreground py-4">No todos found.</p>
|
|
37
|
-
) : (
|
|
38
|
-
todos.map((todo: any) => (
|
|
39
|
-
<div key={todo.id} className="flex items-center gap-4 p-3 rounded-lg bg-secondary/50 hover:bg-secondary transition-colors">
|
|
40
|
-
<div className={`h-10 w-10 rounded-full flex items-center justify-center ${todo.completed ? 'bg-green-100 text-green-600' : 'bg-primary/10 text-primary'}`}>
|
|
41
|
-
{todo.completed ? '✓' : '⚡'}
|
|
42
|
-
</div>
|
|
43
|
-
<div>
|
|
44
|
-
<p className={`font-medium ${todo.completed ? 'line-through text-muted-foreground' : ''}`}>{todo.title}</p>
|
|
45
|
-
<p className="text-xs text-muted-foreground">{new Date(todo.createdAt).toLocaleDateString()}</p>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
))
|
|
49
|
-
)}
|
|
50
|
-
</div>
|
|
51
|
-
);
|
|
52
|
-
} catch (e) {
|
|
53
|
-
return <p className="text-center text-destructive py-4">Failed to load todos.</p>;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export function UserProfileSkeleton() {
|
|
58
|
-
return (
|
|
59
|
-
<div className="animate-pulse space-y-4">
|
|
60
|
-
<div className="h-20 w-20 rounded-full bg-secondary mx-auto" />
|
|
61
|
-
<div className="h-4 w-32 bg-secondary mx-auto rounded" />
|
|
62
|
-
</div>
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export function TodoListSkeleton() {
|
|
67
|
-
return (
|
|
68
|
-
<div className="space-y-4">
|
|
69
|
-
{[1, 2, 3].map(i => (
|
|
70
|
-
<div key={i} className="h-16 w-full bg-secondary rounded-lg animate-pulse" />
|
|
71
|
-
))}
|
|
72
|
-
</div>
|
|
73
|
-
);
|
|
74
|
-
}
|
|
1
|
+
import { connection } from 'next/server';
|
|
2
|
+
import { Suspense } from 'react';
|
|
3
|
+
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
|
4
|
+
import { getTodos, getUser } from './api';
|
|
5
|
+
|
|
6
|
+
export async function UserProfile() {
|
|
7
|
+
await connection();
|
|
8
|
+
try {
|
|
9
|
+
const user = await getUser();
|
|
10
|
+
if (!user) return null;
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div className="space-y-2">
|
|
14
|
+
<div className="h-20 w-20 rounded-full bg-gradient-to-br from-primary to-indigo-600 flex items-center justify-center text-3xl text-white font-bold mx-auto mb-4 shadow-lg shadow-primary/25">
|
|
15
|
+
{user.email?.[0]?.toUpperCase() || 'U'}
|
|
16
|
+
</div>
|
|
17
|
+
<div className="text-center">
|
|
18
|
+
<h3 className="text-xl font-semibold">User ID: {user.id}</h3>
|
|
19
|
+
<p className="text-sm text-muted-foreground">{user.email}</p>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
23
|
+
} catch (e) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export async function TodoList() {
|
|
29
|
+
await connection();
|
|
30
|
+
try {
|
|
31
|
+
const todos = await getTodos();
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<div className="space-y-4">
|
|
35
|
+
{todos.length === 0 ? (
|
|
36
|
+
<p className="text-center text-muted-foreground py-4">No todos found.</p>
|
|
37
|
+
) : (
|
|
38
|
+
todos.map((todo: any) => (
|
|
39
|
+
<div key={todo.id} className="flex items-center gap-4 p-3 rounded-lg bg-secondary/50 hover:bg-secondary transition-colors">
|
|
40
|
+
<div className={`h-10 w-10 rounded-full flex items-center justify-center ${todo.completed ? 'bg-green-100 text-green-600' : 'bg-primary/10 text-primary'}`}>
|
|
41
|
+
{todo.completed ? '✓' : '⚡'}
|
|
42
|
+
</div>
|
|
43
|
+
<div>
|
|
44
|
+
<p className={`font-medium ${todo.completed ? 'line-through text-muted-foreground' : ''}`}>{todo.title}</p>
|
|
45
|
+
<p className="text-xs text-muted-foreground">{new Date(todo.createdAt).toLocaleDateString()}</p>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
))
|
|
49
|
+
)}
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
} catch (e) {
|
|
53
|
+
return <p className="text-center text-destructive py-4">Failed to load todos.</p>;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function UserProfileSkeleton() {
|
|
58
|
+
return (
|
|
59
|
+
<div className="animate-pulse space-y-4">
|
|
60
|
+
<div className="h-20 w-20 rounded-full bg-secondary mx-auto" />
|
|
61
|
+
<div className="h-4 w-32 bg-secondary mx-auto rounded" />
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function TodoListSkeleton() {
|
|
67
|
+
return (
|
|
68
|
+
<div className="space-y-4">
|
|
69
|
+
{[1, 2, 3].map(i => (
|
|
70
|
+
<div key={i} className="h-16 w-full bg-secondary rounded-lg animate-pulse" />
|
|
71
|
+
))}
|
|
72
|
+
</div>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './api';
|
|
2
|
-
export * from './components';
|
|
3
|
-
export * from './DashboardView';
|
|
1
|
+
export * from './api';
|
|
2
|
+
export * from './components';
|
|
3
|
+
export * from './DashboardView';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Global hooks folder
|
|
2
|
-
// Add your custom hooks here
|
|
3
|
-
|
|
4
|
-
export { };
|
|
1
|
+
// Global hooks folder
|
|
2
|
+
// Add your custom hooks here
|
|
3
|
+
|
|
4
|
+
export { };
|
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
import { axiosInstance } from './axios-global-config';
|
|
2
|
-
import { deleteCookie, getCookie, setCookie } from 'cookies-next';
|
|
3
|
-
|
|
4
|
-
// <======================== axios main configurations ======================>
|
|
5
|
-
export const axios_config = (
|
|
6
|
-
useToken = true,
|
|
7
|
-
isFormData = false,
|
|
8
|
-
method = "GET"
|
|
9
|
-
) => {
|
|
10
|
-
const headers: Record<string, string> = {
|
|
11
|
-
Accept: "application/json",
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
if (!isFormData) {
|
|
15
|
-
headers["Content-Type"] = "application/json";
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Add specific headers for PATCH requests to handle CORS
|
|
19
|
-
if (method === "PATCH") {
|
|
20
|
-
headers["Access-Control-Request-Method"] = "PATCH";
|
|
21
|
-
headers["Access-Control-Request-Headers"] = "Content-Type, Authorization";
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (useToken) {
|
|
25
|
-
const token = getCookie("wexts_token");
|
|
26
|
-
if (token) headers.Authorization = `Bearer ${token}`;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return { headers };
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
// <========================= get data in client side ======================>
|
|
33
|
-
export const getData = async (endpoint: string) => {
|
|
34
|
-
const response = await axiosInstance.get(endpoint, axios_config());
|
|
35
|
-
return response.data;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
// <========================= post data in client side ======================>
|
|
39
|
-
export const postData = async (
|
|
40
|
-
endpoint: string,
|
|
41
|
-
data: any,
|
|
42
|
-
useToken = true
|
|
43
|
-
) => {
|
|
44
|
-
const isFormData = data instanceof FormData;
|
|
45
|
-
const response = await axiosInstance.post(endpoint, data, axios_config(useToken, isFormData, "POST"));
|
|
46
|
-
return response.data;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
// <========================= put data in client side ======================>
|
|
50
|
-
export const putData = async (endpoint: string, data: any) => {
|
|
51
|
-
const response = await axiosInstance.put(endpoint, data, axios_config(true, false, "PUT"));
|
|
52
|
-
return response.data;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
// <========================= patch data in client side ======================>
|
|
56
|
-
export const patchData = async (
|
|
57
|
-
endpoint: string,
|
|
58
|
-
data: any,
|
|
59
|
-
useToken = true
|
|
60
|
-
) => {
|
|
61
|
-
const isFormData = data instanceof FormData;
|
|
62
|
-
const response = await axiosInstance.patch(endpoint, data, axios_config(useToken, isFormData, "PATCH"));
|
|
63
|
-
return response.data;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
// <========================= delete data in client side ======================>
|
|
67
|
-
export const deleteData = async (endpoint: string, data?: any) => {
|
|
68
|
-
const config = axios_config(true, false, "DELETE");
|
|
69
|
-
const response = await axiosInstance.delete(endpoint, {
|
|
70
|
-
...config,
|
|
71
|
-
data: data
|
|
72
|
-
});
|
|
73
|
-
return response.data;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
// ======= Auth helpers to integrate with login/logout =======
|
|
77
|
-
export function applyLogin(accessToken: string) {
|
|
78
|
-
setCookie('wexts_token', accessToken, {
|
|
79
|
-
maxAge: 60 * 60 * 24 * 7, // 1 week
|
|
80
|
-
path: '/',
|
|
81
|
-
secure: process.env.NODE_ENV === 'production',
|
|
82
|
-
sameSite: 'lax'
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export async function applyLogout() {
|
|
87
|
-
deleteCookie('wexts_token');
|
|
88
|
-
if (typeof window !== 'undefined') window.location.replace('/login');
|
|
89
|
-
}
|
|
1
|
+
import { axiosInstance } from './axios-global-config';
|
|
2
|
+
import { deleteCookie, getCookie, setCookie } from 'cookies-next';
|
|
3
|
+
|
|
4
|
+
// <======================== axios main configurations ======================>
|
|
5
|
+
export const axios_config = (
|
|
6
|
+
useToken = true,
|
|
7
|
+
isFormData = false,
|
|
8
|
+
method = "GET"
|
|
9
|
+
) => {
|
|
10
|
+
const headers: Record<string, string> = {
|
|
11
|
+
Accept: "application/json",
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
if (!isFormData) {
|
|
15
|
+
headers["Content-Type"] = "application/json";
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Add specific headers for PATCH requests to handle CORS
|
|
19
|
+
if (method === "PATCH") {
|
|
20
|
+
headers["Access-Control-Request-Method"] = "PATCH";
|
|
21
|
+
headers["Access-Control-Request-Headers"] = "Content-Type, Authorization";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (useToken) {
|
|
25
|
+
const token = getCookie("wexts_token");
|
|
26
|
+
if (token) headers.Authorization = `Bearer ${token}`;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return { headers };
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// <========================= get data in client side ======================>
|
|
33
|
+
export const getData = async (endpoint: string) => {
|
|
34
|
+
const response = await axiosInstance.get(endpoint, axios_config());
|
|
35
|
+
return response.data;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// <========================= post data in client side ======================>
|
|
39
|
+
export const postData = async (
|
|
40
|
+
endpoint: string,
|
|
41
|
+
data: any,
|
|
42
|
+
useToken = true
|
|
43
|
+
) => {
|
|
44
|
+
const isFormData = data instanceof FormData;
|
|
45
|
+
const response = await axiosInstance.post(endpoint, data, axios_config(useToken, isFormData, "POST"));
|
|
46
|
+
return response.data;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// <========================= put data in client side ======================>
|
|
50
|
+
export const putData = async (endpoint: string, data: any) => {
|
|
51
|
+
const response = await axiosInstance.put(endpoint, data, axios_config(true, false, "PUT"));
|
|
52
|
+
return response.data;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
// <========================= patch data in client side ======================>
|
|
56
|
+
export const patchData = async (
|
|
57
|
+
endpoint: string,
|
|
58
|
+
data: any,
|
|
59
|
+
useToken = true
|
|
60
|
+
) => {
|
|
61
|
+
const isFormData = data instanceof FormData;
|
|
62
|
+
const response = await axiosInstance.patch(endpoint, data, axios_config(useToken, isFormData, "PATCH"));
|
|
63
|
+
return response.data;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
// <========================= delete data in client side ======================>
|
|
67
|
+
export const deleteData = async (endpoint: string, data?: any) => {
|
|
68
|
+
const config = axios_config(true, false, "DELETE");
|
|
69
|
+
const response = await axiosInstance.delete(endpoint, {
|
|
70
|
+
...config,
|
|
71
|
+
data: data
|
|
72
|
+
});
|
|
73
|
+
return response.data;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// ======= Auth helpers to integrate with login/logout =======
|
|
77
|
+
export function applyLogin(accessToken: string) {
|
|
78
|
+
setCookie('wexts_token', accessToken, {
|
|
79
|
+
maxAge: 60 * 60 * 24 * 7, // 1 week
|
|
80
|
+
path: '/',
|
|
81
|
+
secure: process.env.NODE_ENV === 'production',
|
|
82
|
+
sameSite: 'lax'
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export async function applyLogout() {
|
|
87
|
+
deleteCookie('wexts_token');
|
|
88
|
+
if (typeof window !== 'undefined') window.location.replace('/login');
|
|
89
|
+
}
|
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WEXTS Internal SDK
|
|
3
|
-
* Type-safe API client - ZERO URLs needed!
|
|
4
|
-
* Works in both Client and Server Components
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// HTTP client - uses relative paths only
|
|
8
|
-
async function request<T>(method: string, path: string, data?: any): Promise<T> {
|
|
9
|
-
const url = `/api${path}`;
|
|
10
|
-
|
|
11
|
-
const options: RequestInit = {
|
|
12
|
-
method,
|
|
13
|
-
headers: {
|
|
14
|
-
'Content-Type': 'application/json',
|
|
15
|
-
},
|
|
16
|
-
credentials: 'include',
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
if (data) {
|
|
20
|
-
options.body = JSON.stringify(data);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const response = await fetch(url, options);
|
|
24
|
-
|
|
25
|
-
if (!response.ok) {
|
|
26
|
-
const error = await response.json().catch(() => ({ message: response.statusText }));
|
|
27
|
-
throw new Error(error.message || 'Request failed');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return response.json();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// ==========================================
|
|
34
|
-
// TYPE-SAFE API - NO URLs ANYWHERE!
|
|
35
|
-
// ==========================================
|
|
36
|
-
|
|
37
|
-
export const api = {
|
|
38
|
-
/**
|
|
39
|
-
* Authentication API
|
|
40
|
-
*/
|
|
41
|
-
auth: {
|
|
42
|
-
/**
|
|
43
|
-
* Register new user
|
|
44
|
-
* @example await api.auth.register({ email, password, name })
|
|
45
|
-
*/
|
|
46
|
-
register: (data: { email: string; password: string; name?: string }) =>
|
|
47
|
-
request<{ user: any; access_token: string }>('POST', '/auth/register', data),
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Login user
|
|
51
|
-
* @example await api.auth.login({ email, password })
|
|
52
|
-
*/
|
|
53
|
-
login: (data: { email: string; password: string }) =>
|
|
54
|
-
request<{ user: any; access_token: string }>('POST', '/auth/login', data),
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Get current user
|
|
58
|
-
* @example const user = await api.auth.me()
|
|
59
|
-
*/
|
|
60
|
-
me: () => request<any>('GET', '/auth/me'),
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Users API
|
|
65
|
-
*/
|
|
66
|
-
users: {
|
|
67
|
-
/**
|
|
68
|
-
* Get current user profile
|
|
69
|
-
* @example const profile = await api.users.me()
|
|
70
|
-
*/
|
|
71
|
-
me: () => request<any>('GET', '/users/me'),
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Todos API
|
|
76
|
-
*/
|
|
77
|
-
todos: {
|
|
78
|
-
/**
|
|
79
|
-
* Get all todos
|
|
80
|
-
* @example const todos = await api.todos.findAll()
|
|
81
|
-
*/
|
|
82
|
-
findAll: () => request<any[]>('GET', '/todos'),
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Get single todo
|
|
86
|
-
* @example const todo = await api.todos.findOne('123')
|
|
87
|
-
*/
|
|
88
|
-
findOne: (id: string) => request<any>('GET', `/todos/${id}`),
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Create new todo
|
|
92
|
-
* @example await api.todos.create({ title: 'Task', description: 'Do it' })
|
|
93
|
-
*/
|
|
94
|
-
create: (data: { title: string; description?: string }) =>
|
|
95
|
-
request<any>('POST', '/todos', data),
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Update todo
|
|
99
|
-
* @example await api.todos.update('123', { completed: true })
|
|
100
|
-
*/
|
|
101
|
-
update: (id: string, data: { title?: string; description?: string; completed?: boolean }) =>
|
|
102
|
-
request<any>('PUT', `/todos/${id}`, data),
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Delete todo
|
|
106
|
-
* @example await api.todos.delete('123')
|
|
107
|
-
*/
|
|
108
|
-
delete: (id: string) => request<void>('DELETE', `/todos/${id}`),
|
|
109
|
-
},
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Export type-safe API
|
|
114
|
-
*/
|
|
115
|
-
export type API = typeof api;
|
|
1
|
+
/**
|
|
2
|
+
* WEXTS Internal SDK
|
|
3
|
+
* Type-safe API client - ZERO URLs needed!
|
|
4
|
+
* Works in both Client and Server Components
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// HTTP client - uses relative paths only
|
|
8
|
+
async function request<T>(method: string, path: string, data?: any): Promise<T> {
|
|
9
|
+
const url = `/api${path}`;
|
|
10
|
+
|
|
11
|
+
const options: RequestInit = {
|
|
12
|
+
method,
|
|
13
|
+
headers: {
|
|
14
|
+
'Content-Type': 'application/json',
|
|
15
|
+
},
|
|
16
|
+
credentials: 'include',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
if (data) {
|
|
20
|
+
options.body = JSON.stringify(data);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const response = await fetch(url, options);
|
|
24
|
+
|
|
25
|
+
if (!response.ok) {
|
|
26
|
+
const error = await response.json().catch(() => ({ message: response.statusText }));
|
|
27
|
+
throw new Error(error.message || 'Request failed');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return response.json();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// ==========================================
|
|
34
|
+
// TYPE-SAFE API - NO URLs ANYWHERE!
|
|
35
|
+
// ==========================================
|
|
36
|
+
|
|
37
|
+
export const api = {
|
|
38
|
+
/**
|
|
39
|
+
* Authentication API
|
|
40
|
+
*/
|
|
41
|
+
auth: {
|
|
42
|
+
/**
|
|
43
|
+
* Register new user
|
|
44
|
+
* @example await api.auth.register({ email, password, name })
|
|
45
|
+
*/
|
|
46
|
+
register: (data: { email: string; password: string; name?: string }) =>
|
|
47
|
+
request<{ user: any; access_token: string }>('POST', '/auth/register', data),
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Login user
|
|
51
|
+
* @example await api.auth.login({ email, password })
|
|
52
|
+
*/
|
|
53
|
+
login: (data: { email: string; password: string }) =>
|
|
54
|
+
request<{ user: any; access_token: string }>('POST', '/auth/login', data),
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Get current user
|
|
58
|
+
* @example const user = await api.auth.me()
|
|
59
|
+
*/
|
|
60
|
+
me: () => request<any>('GET', '/auth/me'),
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Users API
|
|
65
|
+
*/
|
|
66
|
+
users: {
|
|
67
|
+
/**
|
|
68
|
+
* Get current user profile
|
|
69
|
+
* @example const profile = await api.users.me()
|
|
70
|
+
*/
|
|
71
|
+
me: () => request<any>('GET', '/users/me'),
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Todos API
|
|
76
|
+
*/
|
|
77
|
+
todos: {
|
|
78
|
+
/**
|
|
79
|
+
* Get all todos
|
|
80
|
+
* @example const todos = await api.todos.findAll()
|
|
81
|
+
*/
|
|
82
|
+
findAll: () => request<any[]>('GET', '/todos'),
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Get single todo
|
|
86
|
+
* @example const todo = await api.todos.findOne('123')
|
|
87
|
+
*/
|
|
88
|
+
findOne: (id: string) => request<any>('GET', `/todos/${id}`),
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Create new todo
|
|
92
|
+
* @example await api.todos.create({ title: 'Task', description: 'Do it' })
|
|
93
|
+
*/
|
|
94
|
+
create: (data: { title: string; description?: string }) =>
|
|
95
|
+
request<any>('POST', '/todos', data),
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Update todo
|
|
99
|
+
* @example await api.todos.update('123', { completed: true })
|
|
100
|
+
*/
|
|
101
|
+
update: (id: string, data: { title?: string; description?: string; completed?: boolean }) =>
|
|
102
|
+
request<any>('PUT', `/todos/${id}`, data),
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Delete todo
|
|
106
|
+
* @example await api.todos.delete('123')
|
|
107
|
+
*/
|
|
108
|
+
delete: (id: string) => request<void>('DELETE', `/todos/${id}`),
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Export type-safe API
|
|
114
|
+
*/
|
|
115
|
+
export type API = typeof api;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
|
-
|
|
3
|
-
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:5050';
|
|
4
|
-
|
|
5
|
-
export const axiosInstance = axios.create({
|
|
6
|
-
baseURL: API_URL,
|
|
7
|
-
timeout: 10000,
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
// Add response interceptor for error handling
|
|
11
|
-
axiosInstance.interceptors.response.use(
|
|
12
|
-
(response) => response,
|
|
13
|
-
(error) => {
|
|
14
|
-
// Handle global errors here if needed
|
|
15
|
-
return Promise.reject(error);
|
|
16
|
-
}
|
|
17
|
-
);
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
|
|
3
|
+
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:5050';
|
|
4
|
+
|
|
5
|
+
export const axiosInstance = axios.create({
|
|
6
|
+
baseURL: API_URL,
|
|
7
|
+
timeout: 10000,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// Add response interceptor for error handling
|
|
11
|
+
axiosInstance.interceptors.response.use(
|
|
12
|
+
(response) => response,
|
|
13
|
+
(error) => {
|
|
14
|
+
// Handle global errors here if needed
|
|
15
|
+
return Promise.reject(error);
|
|
16
|
+
}
|
|
17
|
+
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ClassValue, clsx } from "clsx"
|
|
2
|
-
import { twMerge } from "tailwind-merge"
|
|
3
|
-
|
|
4
|
-
export function cn(...inputs: ClassValue[]) {
|
|
5
|
-
return twMerge(clsx(inputs))
|
|
6
|
-
}
|
|
1
|
+
import { type ClassValue, clsx } from "clsx"
|
|
2
|
+
import { twMerge } from "tailwind-merge"
|
|
3
|
+
|
|
4
|
+
export function cn(...inputs: ClassValue[]) {
|
|
5
|
+
return twMerge(clsx(inputs))
|
|
6
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
export { FusionProvider as WextsProvider, useFusion as useWexts } from 'wexts/next';
|
|
4
|
-
export { useAuth } from 'wexts/next';
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
export { FusionProvider as WextsProvider, useFusion as useWexts } from 'wexts/next';
|
|
4
|
+
export { useAuth } from 'wexts/next';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="next" />
|
|
2
|
-
/// <reference types="next/image-types/global" />
|
|
3
|
-
import "./.next/dev/types/routes.js";
|
|
4
|
-
|
|
5
|
-
// NOTE: This file should not be edited
|
|
6
|
-
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
|
1
|
+
/// <reference types="next" />
|
|
2
|
+
/// <reference types="next/image-types/global" />
|
|
3
|
+
import "./.next/dev/types/routes.js";
|
|
4
|
+
|
|
5
|
+
// NOTE: This file should not be edited
|
|
6
|
+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|