@vitnode/core 1.2.0-canary.48 → 1.2.0-canary.49

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.
Files changed (125) hide show
  1. package/dist/scripts/plugin.d.ts.map +1 -1
  2. package/dist/scripts/prepare-database.d.ts.map +1 -1
  3. package/dist/scripts/prepare-plugins-files.d.ts +1 -1
  4. package/dist/scripts/prepare-plugins-files.d.ts.map +1 -1
  5. package/dist/scripts/scripts.js +4 -4
  6. package/dist/src/api/config.d.ts.map +1 -1
  7. package/dist/src/api/config.js +3 -1
  8. package/dist/src/api/lib/check-plugin-id.d.ts.map +1 -1
  9. package/dist/src/api/lib/check-plugin-id.js +2 -0
  10. package/dist/src/api/lib/with-pagination.d.ts +2 -24
  11. package/dist/src/api/lib/with-pagination.d.ts.map +1 -1
  12. package/dist/src/api/middlewares/global.middleware.d.ts +7 -1
  13. package/dist/src/api/middlewares/global.middleware.d.ts.map +1 -1
  14. package/dist/src/api/middlewares/global.middleware.js +6 -2
  15. package/dist/src/api/models/email.d.ts +3 -1
  16. package/dist/src/api/models/email.d.ts.map +1 -1
  17. package/dist/src/api/models/email.js +25 -2
  18. package/dist/src/api/modules/admin/admin.module.d.ts +41 -288
  19. package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -1
  20. package/dist/src/api/modules/admin/debug/debug.admin.module.d.ts +23 -131
  21. package/dist/src/api/modules/admin/debug/debug.admin.module.d.ts.map +1 -1
  22. package/dist/src/api/modules/admin/debug/routes/logs.route.d.ts +23 -131
  23. package/dist/src/api/modules/admin/debug/routes/logs.route.d.ts.map +1 -1
  24. package/dist/src/api/modules/admin/routes/session.route.d.ts +2 -52
  25. package/dist/src/api/modules/admin/routes/session.route.d.ts.map +1 -1
  26. package/dist/src/api/modules/admin/users/routes/list.route.d.ts +16 -105
  27. package/dist/src/api/modules/admin/users/routes/list.route.d.ts.map +1 -1
  28. package/dist/src/api/modules/admin/users/routes/users.route.d.ts +18 -105
  29. package/dist/src/api/modules/admin/users/routes/users.route.d.ts.map +1 -1
  30. package/dist/src/api/modules/admin/users/users.admin.module.d.ts +16 -105
  31. package/dist/src/api/modules/admin/users/users.admin.module.d.ts.map +1 -1
  32. package/dist/src/api/modules/middleware/middleware.module.d.ts +7 -36
  33. package/dist/src/api/modules/middleware/middleware.module.d.ts.map +1 -1
  34. package/dist/src/api/modules/middleware/route.d.ts +14 -72
  35. package/dist/src/api/modules/middleware/route.d.ts.map +1 -1
  36. package/dist/src/api/modules/users/routes/session.route.d.ts +2 -54
  37. package/dist/src/api/modules/users/routes/session.route.d.ts.map +1 -1
  38. package/dist/src/api/modules/users/routes/sign-in.route.d.ts +5 -27
  39. package/dist/src/api/modules/users/routes/sign-in.route.d.ts.map +1 -1
  40. package/dist/src/api/modules/users/routes/sign-in.route.js +1 -1
  41. package/dist/src/api/modules/users/routes/sign-out.route.d.ts +1 -5
  42. package/dist/src/api/modules/users/routes/sign-out.route.d.ts.map +1 -1
  43. package/dist/src/api/modules/users/routes/sign-up.route.d.ts +8 -36
  44. package/dist/src/api/modules/users/routes/sign-up.route.d.ts.map +1 -1
  45. package/dist/src/api/modules/users/routes/sign-up.route.js +2 -2
  46. package/dist/src/api/modules/users/routes/test.route.js +1 -1
  47. package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +3 -19
  48. package/dist/src/api/modules/users/sso/routes/callback.route.d.ts.map +1 -1
  49. package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts +2 -10
  50. package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts.map +1 -1
  51. package/dist/src/api/modules/users/sso/sso.module.d.ts +5 -29
  52. package/dist/src/api/modules/users/sso/sso.module.d.ts.map +1 -1
  53. package/dist/src/api/modules/users/users.module.d.ts +16 -128
  54. package/dist/src/api/modules/users/users.module.d.ts.map +1 -1
  55. package/dist/src/components/form/auto-form.d.ts +28 -6
  56. package/dist/src/components/form/auto-form.d.ts.map +1 -1
  57. package/dist/src/components/form/auto-form.js +46 -12
  58. package/dist/src/components/form/fields/checkbox.d.ts +3 -7
  59. package/dist/src/components/form/fields/checkbox.d.ts.map +1 -1
  60. package/dist/src/components/form/fields/checkbox.js +5 -4
  61. package/dist/src/components/form/fields/combobox-async.d.ts +3 -6
  62. package/dist/src/components/form/fields/combobox-async.d.ts.map +1 -1
  63. package/dist/src/components/form/fields/combobox-async.js +4 -4
  64. package/dist/src/components/form/fields/combobox.d.ts +3 -6
  65. package/dist/src/components/form/fields/combobox.d.ts.map +1 -1
  66. package/dist/src/components/form/fields/combobox.js +4 -5
  67. package/dist/src/components/form/fields/input.d.ts +3 -8
  68. package/dist/src/components/form/fields/input.d.ts.map +1 -1
  69. package/dist/src/components/form/fields/input.js +8 -4
  70. package/dist/src/components/form/fields/radio-group.d.ts +3 -6
  71. package/dist/src/components/form/fields/radio-group.d.ts.map +1 -1
  72. package/dist/src/components/form/fields/radio-group.js +4 -5
  73. package/dist/src/components/form/fields/select.d.ts +3 -6
  74. package/dist/src/components/form/fields/select.d.ts.map +1 -1
  75. package/dist/src/components/form/fields/select.js +4 -5
  76. package/dist/src/components/form/fields/switch.d.ts +2 -6
  77. package/dist/src/components/form/fields/switch.d.ts.map +1 -1
  78. package/dist/src/components/form/fields/switch.js +9 -9
  79. package/dist/src/components/form/fields/textarea.d.ts +3 -4
  80. package/dist/src/components/form/fields/textarea.d.ts.map +1 -1
  81. package/dist/src/components/form/fields/textarea.js +5 -3
  82. package/dist/src/components/ui/button-client.d.ts +3 -0
  83. package/dist/src/components/ui/button-client.d.ts.map +1 -0
  84. package/dist/src/components/ui/button-client.js +57 -0
  85. package/dist/src/components/ui/button.d.ts +2 -3
  86. package/dist/src/components/ui/button.d.ts.map +1 -1
  87. package/dist/src/components/ui/button.js +5 -39
  88. package/dist/src/components/ui/form.d.ts +2 -2
  89. package/dist/src/components/ui/form.d.ts.map +1 -1
  90. package/dist/src/components/ui/form.js +2 -2
  91. package/dist/src/components/ui/loader.js +1 -1
  92. package/dist/src/emails/default-template.d.ts +5 -1
  93. package/dist/src/emails/default-template.d.ts.map +1 -1
  94. package/dist/src/emails/default-template.js +10 -11
  95. package/dist/src/lib/api/get-middleware-api.d.ts +1 -1
  96. package/dist/src/lib/api/get-session-admin-api.d.ts +2 -2
  97. package/dist/src/lib/api/get-session-api.d.ts +2 -2
  98. package/dist/src/lib/helpers/auto-form.d.ts +18 -8
  99. package/dist/src/lib/helpers/auto-form.d.ts.map +1 -1
  100. package/dist/src/lib/helpers/auto-form.js +90 -86
  101. package/dist/src/lib/helpers/auto-form.test.js +299 -138
  102. package/dist/src/lib/navigation.d.ts +5 -5
  103. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts +9 -9
  104. package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.d.ts +10 -10
  105. package/dist/src/views/admin/views/core/test.d.ts.map +1 -1
  106. package/dist/src/views/admin/views/core/test.js +6 -6
  107. package/dist/src/views/auth/components/password-input.d.ts +2 -1
  108. package/dist/src/views/auth/components/password-input.d.ts.map +1 -1
  109. package/dist/src/views/auth/components/password-input.js +15 -8
  110. package/dist/src/views/auth/sign-in/form/use-form.d.ts +4 -16
  111. package/dist/src/views/auth/sign-in/form/use-form.d.ts.map +1 -1
  112. package/dist/src/views/auth/sign-in/form/use-form.js +1 -1
  113. package/dist/src/views/auth/sign-up/form/form.d.ts.map +1 -1
  114. package/dist/src/views/auth/sign-up/form/form.js +22 -9
  115. package/dist/src/views/auth/sign-up/form/mutation-api.d.ts +1 -1
  116. package/dist/src/views/auth/sign-up/form/use-form.d.ts +18 -36
  117. package/dist/src/views/auth/sign-up/form/use-form.d.ts.map +1 -1
  118. package/dist/src/views/auth/sign-up/form/use-form.js +10 -7
  119. package/dist/src/vitnode.config.d.ts +3 -0
  120. package/dist/src/vitnode.config.d.ts.map +1 -1
  121. package/dist/tsconfig.tsbuildinfo +1 -1
  122. package/package.json +21 -18
  123. package/dist/src/components/form/fields/item.d.ts +0 -14
  124. package/dist/src/components/form/fields/item.d.ts.map +0 -1
  125. package/dist/src/components/form/fields/item.js +0 -22
@@ -6,10 +6,11 @@ import { AutoFormLabel } from "../../../components/form/common/label.js";
6
6
  import { FormControl, FormItem, FormMessage } from "../../../components/ui/form.js";
7
7
  import { Input } from "../../../components/ui/input.js";
8
8
  import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../../components/ui/tooltip.js";
9
- export const PasswordInput = ({ value: valueFromProps, ...props })=>{
9
+ export const PasswordInput = ({ label, // eslint-disable-next-line @typescript-eslint/no-unused-vars
10
+ description: _, field, otherProps: { maxLength, minLength, pattern }, ...props })=>{
10
11
  const t = useTranslations('core.auth.sign_up');
11
12
  const [openTooltip, setOpenTooltip] = React.useState(false);
12
- const value = valueFromProps?.toString() ?? '';
13
+ const value = field.value ?? '';
13
14
  const regexArray = [
14
15
  {
15
16
  regex: /^.{8,}$/.test(value),
@@ -31,7 +32,7 @@ export const PasswordInput = ({ value: valueFromProps, ...props })=>{
31
32
  return /*#__PURE__*/ _jsxs(FormItem, {
32
33
  children: [
33
34
  /*#__PURE__*/ _jsx(AutoFormLabel, {
34
- children: t('password.label')
35
+ children: label
35
36
  }),
36
37
  /*#__PURE__*/ _jsx(TooltipProvider, {
37
38
  delayDuration: 0,
@@ -43,16 +44,22 @@ export const PasswordInput = ({ value: valueFromProps, ...props })=>{
43
44
  children: /*#__PURE__*/ _jsx(FormControl, {
44
45
  children: /*#__PURE__*/ _jsx(Input, {
45
46
  type: "password",
46
- value: value,
47
- ...props,
47
+ ...field,
48
+ maxLength: maxLength ?? props.maxLength,
49
+ minLength: minLength ?? props.minLength,
48
50
  onBlur: (e)=>{
49
51
  setOpenTooltip(false);
52
+ field.onBlur();
50
53
  props.onBlur?.(e);
51
54
  },
52
- onFocus: (e)=>{
55
+ onChange: (e)=>{
53
56
  setOpenTooltip(true);
54
- props.onFocus?.(e);
55
- }
57
+ field.onChange(e);
58
+ props.onChange?.(e);
59
+ },
60
+ pattern: pattern ?? props.pattern,
61
+ value: field.value ?? '',
62
+ ...props
56
63
  })
57
64
  })
58
65
  }),
@@ -4,25 +4,13 @@ export declare const useFormSignIn: ({ isAdmin }: {
4
4
  isAdmin?: boolean;
5
5
  }) => {
6
6
  onSubmit: AutoFormOnSubmit<z.ZodObject<{
7
- email: z.ZodDefault<z.ZodString>;
7
+ email: z.ZodDefault<z.ZodEmail>;
8
8
  password: z.ZodDefault<z.ZodString>;
9
- }, "strip", z.ZodTypeAny, {
10
- email: string;
11
- password: string;
12
- }, {
13
- email?: string | undefined;
14
- password?: string | undefined;
15
- }>>;
9
+ }, z.core.$strip>>;
16
10
  error: "" | "access_denied";
17
11
  formSchema: z.ZodObject<{
18
- email: z.ZodDefault<z.ZodString>;
12
+ email: z.ZodDefault<z.ZodEmail>;
19
13
  password: z.ZodDefault<z.ZodString>;
20
- }, "strip", z.ZodTypeAny, {
21
- email: string;
22
- password: string;
23
- }, {
24
- email?: string | undefined;
25
- password?: string | undefined;
26
- }>;
14
+ }, z.core.$strip>;
27
15
  };
28
16
  //# sourceMappingURL=use-form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["../../../../../../src/views/auth/sign-in/form/use-form.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAI9E,eAAO,MAAM,aAAa,GAAI,aAAa;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;CAgC/D,CAAC"}
1
+ {"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["../../../../../../src/views/auth/sign-in/form/use-form.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAIpE,eAAO,MAAM,aAAa,GAAI,aAAa;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE;;;;;;;;;;CA6B/D,CAAC"}
@@ -8,7 +8,7 @@ export const useFormSignIn = ({ isAdmin })=>{
8
8
  const t = useTranslations('core.auth.sign_in');
9
9
  const tErrors = useTranslations('core.global.errors');
10
10
  const formSchema = z.object({
11
- email: z.string().email({
11
+ email: z.email({
12
12
  message: t('email.invalid')
13
13
  }).default(''),
14
14
  password: z.string().min(1, {
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../../../src/views/auth/sign-up/form/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAI7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAY5E,eAAO,MAAM,UAAU,GAAI,uBAGxB;IACD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1D,OAAO,EAAE,OAAO,CAAC;CAClB,4CAuFA,CAAC"}
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../../../src/views/auth/sign-up/form/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAI7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAc5E,eAAO,MAAM,UAAU,GAAI,uBAGxB;IACD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1D,OAAO,EAAE,OAAO,CAAC;CAClB,4CAgGA,CAAC"}
@@ -16,7 +16,7 @@ export const FormSignUp = ({ isEmail, captcha })=>{
16
16
  fields: [
17
17
  {
18
18
  id: 'name',
19
- component: ({ field, shape })=>{
19
+ component: ({ field, ...props })=>{
20
20
  const value = field.value ?? '';
21
21
  return /*#__PURE__*/ _jsxs("div", {
22
22
  className: "space-y-2",
@@ -24,7 +24,7 @@ export const FormSignUp = ({ isEmail, captcha })=>{
24
24
  /*#__PURE__*/ _jsx(AutoFormInput, {
25
25
  field: field,
26
26
  label: t('username.label'),
27
- shape: shape
27
+ ...props
28
28
  }),
29
29
  value.length >= 3 && /*#__PURE__*/ _jsx("div", {
30
30
  className: "text-muted-foreground text-sm",
@@ -49,13 +49,15 @@ export const FormSignUp = ({ isEmail, captcha })=>{
49
49
  },
50
50
  {
51
51
  id: 'password',
52
- component: ({ field })=>/*#__PURE__*/ _jsx(PasswordInput, {
53
- ...field
52
+ component: (props)=>/*#__PURE__*/ _jsx(PasswordInput, {
53
+ label: t('password.label'),
54
+ ...props
54
55
  })
55
56
  },
56
57
  {
57
58
  id: 'terms',
58
59
  component: (props)=>/*#__PURE__*/ _jsx(AutoFormCheckbox, {
60
+ ...props,
59
61
  description: t.rich('terms.desc', {
60
62
  link: (text)=>/*#__PURE__*/ _jsx(Link, {
61
63
  className: "text-primary",
@@ -63,20 +65,31 @@ export const FormSignUp = ({ isEmail, captcha })=>{
63
65
  children: text
64
66
  })
65
67
  }),
66
- label: t('terms.label'),
67
- ...props
68
+ label: t('terms.label')
68
69
  })
69
70
  },
70
71
  ...isEmail ? [
71
72
  {
72
73
  id: 'newsletter',
73
74
  component: (props)=>/*#__PURE__*/ _jsx(AutoFormCheckbox, {
75
+ ...props,
74
76
  description: t('newsletter.desc'),
75
- label: t('newsletter.label'),
76
- ...props
77
+ label: t('newsletter.label')
77
78
  })
78
79
  }
79
- ] : []
80
+ ] : [],
81
+ {
82
+ id: 'test',
83
+ label: 'elo',
84
+ description: 'Test with default'
85
+ },
86
+ {
87
+ id: 'test.test123',
88
+ component: (props)=>/*#__PURE__*/ _jsx(AutoFormInput, {
89
+ label: "fsaf",
90
+ ...props
91
+ })
92
+ }
80
93
  ],
81
94
  formSchema: formSchema,
82
95
  mode: "all",
@@ -7,9 +7,9 @@ export declare const mutationApi: ({ captchaToken, ...input }: z.infer<typeof zo
7
7
  data?: undefined;
8
8
  } | {
9
9
  data: {
10
- email: string;
11
10
  id: number;
12
11
  emailVerified: boolean;
12
+ email: string;
13
13
  };
14
14
  error?: undefined;
15
15
  }>;
@@ -2,42 +2,24 @@ import { z } from 'zod';
2
2
  import type { AutoFormOnSubmit } from '../../../../components/form/auto-form';
3
3
  export declare const useFormSignUp: () => {
4
4
  onSubmit: AutoFormOnSubmit<z.ZodObject<{
5
- name: z.ZodString;
6
- email: z.ZodString;
7
- password: z.ZodString;
8
- terms: z.ZodEffects<z.ZodBoolean, boolean, boolean>;
9
- newsletter: z.ZodOptional<z.ZodBoolean>;
10
- }, "strip", z.ZodTypeAny, {
11
- email: string;
12
- name: string;
13
- password: string;
14
- terms: boolean;
15
- newsletter?: boolean | undefined;
16
- }, {
17
- email: string;
18
- name: string;
19
- password: string;
20
- terms: boolean;
21
- newsletter?: boolean | undefined;
22
- }>>;
5
+ name: z.ZodDefault<z.ZodString>;
6
+ email: z.ZodDefault<z.ZodEmail>;
7
+ password: z.ZodDefault<z.ZodString>;
8
+ terms: z.ZodDefault<z.ZodBoolean>;
9
+ newsletter: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
10
+ test: z.ZodObject<{
11
+ test123: z.ZodDefault<z.ZodString>;
12
+ }, z.core.$strip>;
13
+ }, z.core.$strip>>;
23
14
  formSchema: z.ZodObject<{
24
- name: z.ZodString;
25
- email: z.ZodString;
26
- password: z.ZodString;
27
- terms: z.ZodEffects<z.ZodBoolean, boolean, boolean>;
28
- newsletter: z.ZodOptional<z.ZodBoolean>;
29
- }, "strip", z.ZodTypeAny, {
30
- email: string;
31
- name: string;
32
- password: string;
33
- terms: boolean;
34
- newsletter?: boolean | undefined;
35
- }, {
36
- email: string;
37
- name: string;
38
- password: string;
39
- terms: boolean;
40
- newsletter?: boolean | undefined;
41
- }>;
15
+ name: z.ZodDefault<z.ZodString>;
16
+ email: z.ZodDefault<z.ZodEmail>;
17
+ password: z.ZodDefault<z.ZodString>;
18
+ terms: z.ZodDefault<z.ZodBoolean>;
19
+ newsletter: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
20
+ test: z.ZodObject<{
21
+ test123: z.ZodDefault<z.ZodString>;
22
+ }, z.core.$strip>;
23
+ }, z.core.$strip>;
42
24
  };
43
25
  //# sourceMappingURL=use-form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["../../../../../../src/views/auth/sign-up/form/use-form.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAKpE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+EzB,CAAC"}
1
+ {"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["../../../../../../src/views/auth/sign-up/form/use-form.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAKpE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;CAyFzB,CAAC"}
@@ -10,16 +10,19 @@ export const useFormSignUp = ()=>{
10
10
  const formSchema = z.object({
11
11
  name: z.string({
12
12
  message: tError('field_required')
13
- }).min(3, t('username.min_length')).max(32, t('username.max_length')),
13
+ }).min(3, t('username.min_length')).max(32, t('username.max_length')).default('').describe('Username'),
14
14
  // .refine(value => nameRegex.test(value), t('name.invalid'))
15
- email: z.string({
16
- message: tError('field_required')
17
- }).email(t('email.invalid')),
15
+ email: z.email({
16
+ message: t('email.invalid')
17
+ }).default('test@test.com'),
18
18
  password: z.string({
19
19
  message: tError('field_required')
20
- }).regex(/^.{8,}$/, invalidPassword).regex(/[A-Z]/, invalidPassword).regex(/\d/, invalidPassword).regex(/\W|_/, invalidPassword),
21
- terms: z.boolean().refine((value)=>value, t('terms.required')),
22
- newsletter: z.boolean().optional()
20
+ }).regex(/^.{8,}$/, invalidPassword).regex(/[A-Z]/, invalidPassword).regex(/\d/, invalidPassword).regex(/\W|_/, invalidPassword).default(''),
21
+ terms: z.boolean().refine((value)=>value, t('terms.required')).default(false),
22
+ newsletter: z.boolean().default(false).optional(),
23
+ test: z.object({
24
+ test123: z.string().default('test with default')
25
+ })
23
26
  });
24
27
  const { setShowSendingEmail } = useWrapperSignUp();
25
28
  const onSubmit = async (values, form, { captchaToken })=>{
@@ -45,6 +45,9 @@ export interface VitNodeApiConfig {
45
45
  shortTitle?: string;
46
46
  title: string;
47
47
  };
48
+ pathToMessages: (path: string) => Promise<{
49
+ default: object;
50
+ }>;
48
51
  plugins: BuildPluginApiReturn[];
49
52
  rateLimiter?: Omit<IRateLimiterOptions, 'keyPrefix'>;
50
53
  }
@@ -1 +1 @@
1
- {"version":3,"file":"vitnode.config.d.ts","sourceRoot":"","sources":["../../src/vitnode.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa,CAC5B,UAAU,SAAS,YAAY,EAAE,GAAG,YAAY,EAAE;IAElD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,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