generator-kodly-react-app 1.0.15 → 1.0.16
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/generators/app/index.js +4 -0
- package/generators/app/templates/I18N_MIGRATION.md +13 -13
- package/generators/app/templates/STRUCTURE.md +26 -26
- package/generators/app/templates/index.html +6 -14
- package/generators/app/templates/openapi-ts.config.ts +12 -12
- package/generators/app/templates/postcss.config.js +0 -1
- package/generators/app/templates/src/app.tsx +20 -20
- package/generators/app/templates/src/components/layout/language-switcher.tsx +20 -16
- package/generators/app/templates/src/components/layout/page-layout.tsx +31 -0
- package/generators/app/templates/src/components/layout/theme-switcher.tsx +15 -14
- package/generators/app/templates/src/components/theme/theme-provider.tsx +20 -13
- package/generators/app/templates/src/components/ui/button.tsx +15 -14
- package/generators/app/templates/src/components/ui/card.tsx +23 -16
- package/generators/app/templates/src/components/ui/field.tsx +35 -35
- package/generators/app/templates/src/components/ui/form.tsx +66 -30
- package/generators/app/templates/src/components/ui/input-group.tsx +24 -24
- package/generators/app/templates/src/components/ui/input.tsx +8 -8
- package/generators/app/templates/src/components/ui/label.tsx +9 -9
- package/generators/app/templates/src/components/ui/select.tsx +0 -1
- package/generators/app/templates/src/components/ui/separator.tsx +10 -10
- package/generators/app/templates/src/components/ui/textarea.tsx +7 -7
- package/generators/app/templates/src/index.css +12 -2
- package/generators/app/templates/src/lib/i18n.ts +16 -14
- package/generators/app/templates/src/lib/routes.ts +2 -3
- package/generators/app/templates/src/lib/utils/error-handler.ts +21 -14
- package/generators/app/templates/src/lib/utils.ts +3 -3
- package/generators/app/templates/src/locales/index.ts +12 -12
- package/generators/app/templates/src/locales/ja/theme.json +0 -1
- package/generators/app/templates/src/main.tsx +10 -12
- package/generators/app/templates/src/modules/app/layouts/app-layout.tsx +14 -25
- package/generators/app/templates/src/modules/app/locales/app-en.json +0 -1
- package/generators/app/templates/src/modules/app/locales/app-ja.json +0 -1
- package/generators/app/templates/src/modules/auth/components/auth-form.tsx +83 -0
- package/generators/app/templates/src/modules/auth/components/forgot-password-form.tsx +27 -52
- package/generators/app/templates/src/modules/auth/components/login-form.tsx +42 -72
- package/generators/app/templates/src/modules/auth/components/login-link.tsx +12 -0
- package/generators/app/templates/src/modules/auth/components/reset-password-form.tsx +46 -92
- package/generators/app/templates/src/modules/auth/components/signup-form.tsx +35 -71
- package/generators/app/templates/src/modules/auth/contexts/auth-context.tsx +10 -6
- package/generators/app/templates/src/modules/auth/hooks/use-auth-hook.ts +51 -36
- package/generators/app/templates/src/modules/auth/layouts/auth-layout.tsx +12 -15
- package/generators/app/templates/src/modules/auth/locales/auth-en.json +0 -1
- package/generators/app/templates/src/modules/auth/locales/auth-ja.json +0 -1
- package/generators/app/templates/src/modules/auth/schemas/form-schemas.ts +14 -10
- package/generators/app/templates/src/modules/landing/components/auth-hero.tsx +20 -18
- package/generators/app/templates/src/modules/landing/components/welcome-hero.tsx +13 -11
- package/generators/app/templates/src/modules/landing/landing-page-layout.tsx +1 -24
- package/generators/app/templates/src/modules/landing/landing-page.tsx +11 -6
- package/generators/app/templates/src/modules/landing/layouts/landing-page-layout.tsx +2 -21
- package/generators/app/templates/src/modules/landing/locales/landing-en.json +0 -1
- package/generators/app/templates/src/openapi-client-config.ts +1 -1
- package/generators/app/templates/src/routeTree.gen.ts +188 -188
- package/generators/app/templates/src/router.tsx +2 -2
- package/generators/app/templates/src/routes/$.tsx +0 -1
- package/generators/app/templates/src/routes/__root.tsx +2 -2
- package/generators/app/templates/src/routes/_landing/index.tsx +3 -3
- package/generators/app/templates/src/routes/_landing/route.tsx +3 -3
- package/generators/app/templates/src/routes/app/index.tsx +6 -6
- package/generators/app/templates/src/routes/app/route.tsx +4 -4
- package/generators/app/templates/src/routes/auth/forgot-password.tsx +1 -1
- package/generators/app/templates/src/routes/auth/login.tsx +3 -3
- package/generators/app/templates/src/routes/auth/reset-password.tsx +3 -3
- package/generators/app/templates/src/routes/auth/route.tsx +12 -7
- package/generators/app/templates/src/routes/auth/signup.tsx +1 -2
- package/generators/app/templates/src/sdk/@tanstack/react-query.gen.ts +157 -76
- package/generators/app/templates/src/sdk/client/client.gen.ts +35 -37
- package/generators/app/templates/src/sdk/client/index.ts +8 -8
- package/generators/app/templates/src/sdk/client/types.gen.ts +22 -19
- package/generators/app/templates/src/sdk/client/utils.gen.ts +53 -45
- package/generators/app/templates/src/sdk/client.gen.ts +18 -5
- package/generators/app/templates/src/sdk/core/auth.gen.ts +6 -6
- package/generators/app/templates/src/sdk/core/bodySerializer.gen.ts +25 -27
- package/generators/app/templates/src/sdk/core/params.gen.ts +12 -12
- package/generators/app/templates/src/sdk/core/pathSerializer.gen.ts +40 -41
- package/generators/app/templates/src/sdk/core/queryKeySerializer.gen.ts +12 -29
- package/generators/app/templates/src/sdk/core/serverSentEvents.gen.ts +26 -24
- package/generators/app/templates/src/sdk/core/types.gen.ts +17 -15
- package/generators/app/templates/src/sdk/core/utils.gen.ts +18 -18
- package/generators/app/templates/src/sdk/index.ts +40 -2
- package/generators/app/templates/src/sdk/schemas.gen.ts +108 -166
- package/generators/app/templates/src/sdk/sdk.gen.ts +145 -63
- package/generators/app/templates/src/sdk/types.gen.ts +90 -84
- package/generators/app/templates/src/sdk/zod.gen.ts +57 -74
- package/generators/app/templates/src/types/i18n.d.ts +0 -1
- package/generators/app/templates/tailwind.config.js +0 -1
- package/generators/app/templates/tsconfig.app.json +0 -1
- package/generators/app/templates/tsconfig.json +0 -1
- package/generators/app/templates/tsr.config.json +4 -0
- package/generators/app/templates/vite.config.js +12 -12
- package/package.json +2 -4
|
@@ -1,158 +1,164 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
3
|
export type ClientOptions = {
|
|
4
|
-
|
|
4
|
+
baseURL: "https://sandbox.beta.kodly.dev/proxy/95-2" | (string & {});
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
export type AuthResponseDtoUserDetailDto = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
token?: string | null;
|
|
9
|
+
data?: UserDetailDto;
|
|
10
|
+
roleName?: string | null;
|
|
11
|
+
modulePermissions?: Array<ModulePermission> | null;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export type ModuleDefinition = unknown;
|
|
15
15
|
|
|
16
16
|
export type ModulePermission = {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
module: ModuleDefinition;
|
|
18
|
+
permissions: Array<PermissionDefinition>;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export type PermissionDefinition = unknown;
|
|
22
22
|
|
|
23
23
|
export type RestResponseAuthResponseDtoUserDetailDto = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
message?: string | null;
|
|
25
|
+
status?: boolean | null;
|
|
26
|
+
data?: AuthResponseDtoUserDetailDto;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
export type UserDetailDto = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
id: string;
|
|
31
|
+
slug: string;
|
|
32
|
+
email: string;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
export type RestResponseString = {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
message?: string | null;
|
|
37
|
+
status?: boolean | null;
|
|
38
|
+
data?: string | null;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
export type UserResetPasswordDto = {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
email: string;
|
|
43
|
+
password: string;
|
|
44
|
+
otp: string;
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
export type UserSignupDto = {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
password: string;
|
|
49
|
+
email: string;
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
export type UserLoginDto = {
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
email: string;
|
|
54
|
+
password: string;
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
export type ValidateTokenUserAuthData = {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
body?: never;
|
|
59
|
+
path?: never;
|
|
60
|
+
query?: never;
|
|
61
|
+
url: "/api/v1/auth/user/validate-token";
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
export type ValidateTokenUserAuthResponses = {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
/**
|
|
66
|
+
* OK
|
|
67
|
+
*/
|
|
68
|
+
200: RestResponseAuthResponseDtoUserDetailDto;
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
export type ValidateTokenUserAuthResponse =
|
|
71
|
+
export type ValidateTokenUserAuthResponse =
|
|
72
|
+
ValidateTokenUserAuthResponses[keyof ValidateTokenUserAuthResponses];
|
|
72
73
|
|
|
73
74
|
export type SendOtpUserAuthData = {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
body?: never;
|
|
76
|
+
path?: never;
|
|
77
|
+
query: {
|
|
78
|
+
authId: string;
|
|
79
|
+
};
|
|
80
|
+
url: "/api/v1/auth/user/send-otp";
|
|
80
81
|
};
|
|
81
82
|
|
|
82
83
|
export type SendOtpUserAuthResponses = {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
/**
|
|
85
|
+
* OK
|
|
86
|
+
*/
|
|
87
|
+
200: RestResponseString;
|
|
87
88
|
};
|
|
88
89
|
|
|
89
|
-
export type SendOtpUserAuthResponse =
|
|
90
|
+
export type SendOtpUserAuthResponse =
|
|
91
|
+
SendOtpUserAuthResponses[keyof SendOtpUserAuthResponses];
|
|
90
92
|
|
|
91
93
|
export type ResetPasswordUserAuthData = {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
body: UserResetPasswordDto;
|
|
95
|
+
path?: never;
|
|
96
|
+
query?: never;
|
|
97
|
+
url: "/api/v1/auth/user/reset";
|
|
96
98
|
};
|
|
97
99
|
|
|
98
100
|
export type ResetPasswordUserAuthResponses = {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
/**
|
|
102
|
+
* OK
|
|
103
|
+
*/
|
|
104
|
+
200: RestResponseString;
|
|
103
105
|
};
|
|
104
106
|
|
|
105
|
-
export type ResetPasswordUserAuthResponse =
|
|
107
|
+
export type ResetPasswordUserAuthResponse =
|
|
108
|
+
ResetPasswordUserAuthResponses[keyof ResetPasswordUserAuthResponses];
|
|
106
109
|
|
|
107
110
|
export type RegisterUserAuthData = {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
body: UserSignupDto;
|
|
112
|
+
path?: never;
|
|
113
|
+
query?: never;
|
|
114
|
+
url: "/api/v1/auth/user/register";
|
|
112
115
|
};
|
|
113
116
|
|
|
114
117
|
export type RegisterUserAuthResponses = {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
/**
|
|
119
|
+
* OK
|
|
120
|
+
*/
|
|
121
|
+
200: RestResponseAuthResponseDtoUserDetailDto;
|
|
119
122
|
};
|
|
120
123
|
|
|
121
|
-
export type RegisterUserAuthResponse =
|
|
124
|
+
export type RegisterUserAuthResponse =
|
|
125
|
+
RegisterUserAuthResponses[keyof RegisterUserAuthResponses];
|
|
122
126
|
|
|
123
127
|
export type LogoutUserAuthData = {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
body?: never;
|
|
129
|
+
headers?: {
|
|
130
|
+
"x-auth-token"?: string;
|
|
131
|
+
};
|
|
132
|
+
path?: never;
|
|
133
|
+
query?: never;
|
|
134
|
+
url: "/api/v1/auth/user/logout";
|
|
131
135
|
};
|
|
132
136
|
|
|
133
137
|
export type LogoutUserAuthResponses = {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
/**
|
|
139
|
+
* OK
|
|
140
|
+
*/
|
|
141
|
+
200: {
|
|
142
|
+
[key: string]: unknown;
|
|
143
|
+
};
|
|
140
144
|
};
|
|
141
145
|
|
|
142
|
-
export type LogoutUserAuthResponse =
|
|
146
|
+
export type LogoutUserAuthResponse =
|
|
147
|
+
LogoutUserAuthResponses[keyof LogoutUserAuthResponses];
|
|
143
148
|
|
|
144
149
|
export type LoginUserAuthData = {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
150
|
+
body: UserLoginDto;
|
|
151
|
+
path?: never;
|
|
152
|
+
query?: never;
|
|
153
|
+
url: "/api/v1/auth/user/login";
|
|
149
154
|
};
|
|
150
155
|
|
|
151
156
|
export type LoginUserAuthResponses = {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
157
|
+
/**
|
|
158
|
+
* OK
|
|
159
|
+
*/
|
|
160
|
+
200: RestResponseAuthResponseDtoUserDetailDto;
|
|
156
161
|
};
|
|
157
162
|
|
|
158
|
-
export type LoginUserAuthResponse =
|
|
163
|
+
export type LoginUserAuthResponse =
|
|
164
|
+
LoginUserAuthResponses[keyof LoginUserAuthResponses];
|
|
@@ -1,98 +1,78 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
|
-
import { z } from
|
|
3
|
+
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
export const zModuleDefinition = z.unknown();
|
|
6
6
|
|
|
7
7
|
export const zPermissionDefinition = z.unknown();
|
|
8
8
|
|
|
9
9
|
export const zModulePermission = z.object({
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
module: zModuleDefinition,
|
|
11
|
+
permissions: z.array(zPermissionDefinition).min(0).max(512),
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
export const zUserDetailDto = z.object({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
id: z.string(),
|
|
16
|
+
slug: z.string(),
|
|
17
|
+
email: z.email().min(1).max(256),
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
export const zAuthResponseDtoUserDetailDto = z.object({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
z.string(),
|
|
28
|
-
z.null()
|
|
29
|
-
])),
|
|
30
|
-
modulePermissions: z.optional(z.union([
|
|
31
|
-
z.array(zModulePermission),
|
|
32
|
-
z.null()
|
|
33
|
-
]))
|
|
21
|
+
token: z.optional(z.union([z.string(), z.null()])),
|
|
22
|
+
data: z.optional(zUserDetailDto),
|
|
23
|
+
roleName: z.optional(z.union([z.string(), z.null()])),
|
|
24
|
+
modulePermissions: z.optional(
|
|
25
|
+
z.union([z.array(zModulePermission), z.null()]),
|
|
26
|
+
),
|
|
34
27
|
});
|
|
35
28
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
z.null()
|
|
40
|
-
])),
|
|
41
|
-
status: z.optional(z.union([
|
|
42
|
-
z.boolean(),
|
|
43
|
-
z.null()
|
|
44
|
-
])),
|
|
45
|
-
data: z.optional(zAuthResponseDtoUserDetailDto)
|
|
29
|
+
const zRestResponse = z.object({
|
|
30
|
+
message: z.string().nullable().optional(),
|
|
31
|
+
status: z.boolean().nullable().optional(),
|
|
46
32
|
});
|
|
47
33
|
|
|
48
|
-
export const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
z.boolean(),
|
|
55
|
-
z.null()
|
|
56
|
-
])),
|
|
57
|
-
data: z.optional(z.union([
|
|
58
|
-
z.string(),
|
|
59
|
-
z.null()
|
|
60
|
-
]))
|
|
34
|
+
export const zRestResponseAuthResponseDtoUserDetailDto = zRestResponse.extend({
|
|
35
|
+
data: zAuthResponseDtoUserDetailDto.optional(),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export const zRestResponseString = zRestResponse.extend({
|
|
39
|
+
data: z.string().nullable().optional(),
|
|
61
40
|
});
|
|
62
41
|
|
|
63
42
|
export const zUserResetPasswordDto = z.object({
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
43
|
+
email: z.email().min(1).max(256),
|
|
44
|
+
password: z.string().min(6).max(32),
|
|
45
|
+
otp: z.string().min(4).max(12),
|
|
67
46
|
});
|
|
68
47
|
|
|
69
48
|
export const zUserSignupDto = z.object({
|
|
70
|
-
|
|
71
|
-
|
|
49
|
+
password: z.string(),
|
|
50
|
+
email: z.email().min(1).max(256),
|
|
72
51
|
});
|
|
73
52
|
|
|
74
53
|
export const zUserLoginDto = z.object({
|
|
75
|
-
|
|
76
|
-
|
|
54
|
+
email: z.email().min(1).max(256),
|
|
55
|
+
password: z.string().min(6).max(32),
|
|
77
56
|
});
|
|
78
57
|
|
|
79
58
|
export const zValidateTokenUserAuthData = z.object({
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
59
|
+
body: z.optional(z.never()),
|
|
60
|
+
path: z.optional(z.never()),
|
|
61
|
+
query: z.optional(z.never()),
|
|
83
62
|
});
|
|
84
63
|
|
|
85
64
|
/**
|
|
86
65
|
* OK
|
|
87
66
|
*/
|
|
88
|
-
export const zValidateTokenUserAuthResponse =
|
|
67
|
+
export const zValidateTokenUserAuthResponse =
|
|
68
|
+
zRestResponseAuthResponseDtoUserDetailDto;
|
|
89
69
|
|
|
90
70
|
export const zSendOtpUserAuthData = z.object({
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
71
|
+
body: z.optional(z.never()),
|
|
72
|
+
path: z.optional(z.never()),
|
|
73
|
+
query: z.object({
|
|
74
|
+
authId: z.string(),
|
|
75
|
+
}),
|
|
96
76
|
});
|
|
97
77
|
|
|
98
78
|
/**
|
|
@@ -101,9 +81,9 @@ export const zSendOtpUserAuthData = z.object({
|
|
|
101
81
|
export const zSendOtpUserAuthResponse = zRestResponseString;
|
|
102
82
|
|
|
103
83
|
export const zResetPasswordUserAuthData = z.object({
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
84
|
+
body: zUserResetPasswordDto,
|
|
85
|
+
path: z.optional(z.never()),
|
|
86
|
+
query: z.optional(z.never()),
|
|
107
87
|
});
|
|
108
88
|
|
|
109
89
|
/**
|
|
@@ -112,23 +92,26 @@ export const zResetPasswordUserAuthData = z.object({
|
|
|
112
92
|
export const zResetPasswordUserAuthResponse = zRestResponseString;
|
|
113
93
|
|
|
114
94
|
export const zRegisterUserAuthData = z.object({
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
95
|
+
body: zUserSignupDto,
|
|
96
|
+
path: z.optional(z.never()),
|
|
97
|
+
query: z.optional(z.never()),
|
|
118
98
|
});
|
|
119
99
|
|
|
120
100
|
/**
|
|
121
101
|
* OK
|
|
122
102
|
*/
|
|
123
|
-
export const zRegisterUserAuthResponse =
|
|
103
|
+
export const zRegisterUserAuthResponse =
|
|
104
|
+
zRestResponseAuthResponseDtoUserDetailDto;
|
|
124
105
|
|
|
125
106
|
export const zLogoutUserAuthData = z.object({
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
107
|
+
body: z.optional(z.never()),
|
|
108
|
+
path: z.optional(z.never()),
|
|
109
|
+
query: z.optional(z.never()),
|
|
110
|
+
headers: z.optional(
|
|
111
|
+
z.object({
|
|
112
|
+
"x-auth-token": z.optional(z.string()).default(""),
|
|
113
|
+
}),
|
|
114
|
+
),
|
|
132
115
|
});
|
|
133
116
|
|
|
134
117
|
/**
|
|
@@ -137,9 +120,9 @@ export const zLogoutUserAuthData = z.object({
|
|
|
137
120
|
export const zLogoutUserAuthResponse = z.record(z.string(), z.unknown());
|
|
138
121
|
|
|
139
122
|
export const zLoginUserAuthData = z.object({
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
123
|
+
body: zUserLoginDto,
|
|
124
|
+
path: z.optional(z.never()),
|
|
125
|
+
query: z.optional(z.never()),
|
|
143
126
|
});
|
|
144
127
|
|
|
145
128
|
/**
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineConfig, loadEnv } from
|
|
2
|
-
import viteReact from
|
|
3
|
-
import { tanstackRouter } from
|
|
4
|
-
import tailwindcss from
|
|
5
|
-
import { resolve } from
|
|
1
|
+
import { defineConfig, loadEnv } from "vite";
|
|
2
|
+
import viteReact from "@vitejs/plugin-react";
|
|
3
|
+
import { tanstackRouter } from "@tanstack/router-plugin/vite";
|
|
4
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
5
|
+
import { resolve } from "node:path";
|
|
6
6
|
|
|
7
7
|
export default defineConfig(({ mode }) => {
|
|
8
8
|
// Load env file based on `mode` in the current working directory.
|
|
9
9
|
// Set the third parameter to '' to load all env regardless of the `VITE_` prefix.
|
|
10
|
-
const env = loadEnv(mode, process.cwd(),
|
|
10
|
+
const env = loadEnv(mode, process.cwd(), "");
|
|
11
11
|
|
|
12
12
|
return {
|
|
13
|
-
base: env.BASE_URL ||
|
|
13
|
+
base: env.BASE_URL || "/",
|
|
14
14
|
plugins: [
|
|
15
15
|
tanstackRouter({
|
|
16
|
-
target:
|
|
16
|
+
target: "react",
|
|
17
17
|
autoCodeSplitting: true,
|
|
18
18
|
spa: {
|
|
19
19
|
enabled: true,
|
|
@@ -21,20 +21,20 @@ export default defineConfig(({ mode }) => {
|
|
|
21
21
|
}),
|
|
22
22
|
viteReact({
|
|
23
23
|
babel: {
|
|
24
|
-
plugins: [[
|
|
24
|
+
plugins: [["babel-plugin-react-compiler"]],
|
|
25
25
|
},
|
|
26
26
|
}),
|
|
27
27
|
tailwindcss(),
|
|
28
28
|
],
|
|
29
29
|
resolve: {
|
|
30
30
|
alias: {
|
|
31
|
-
|
|
31
|
+
"@": resolve(__dirname, "./src"),
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
34
|
server: {
|
|
35
35
|
host: true,
|
|
36
|
-
port: parseInt(env.PORT ||
|
|
37
|
-
allowedHosts: [env.ALLOWED_HOSTS ||
|
|
36
|
+
port: parseInt(env.PORT || "3000", 10),
|
|
37
|
+
allowedHosts: [env.ALLOWED_HOSTS || "localhost"],
|
|
38
38
|
},
|
|
39
39
|
build: {
|
|
40
40
|
// Raise chunk size warning threshold to reduce noise in CI builds.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "generator-kodly-react-app",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"description": "A Yeoman generator for creating React.js applications with Vite, TanStack Router, authentication, and i18n",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -38,9 +38,7 @@
|
|
|
38
38
|
"yeoman-generator": "^7.5.1",
|
|
39
39
|
"lodash": "^4.17.21",
|
|
40
40
|
"mem-fs": "^4.1.2",
|
|
41
|
-
"mem-fs-editor": "^11.1.4"
|
|
42
|
-
},
|
|
43
|
-
"devDependencies": {
|
|
41
|
+
"mem-fs-editor": "^11.1.4",
|
|
44
42
|
"chalk": "^5.4.1"
|
|
45
43
|
}
|
|
46
44
|
}
|