@vitnode/core 1.2.0-canary.53 → 1.2.0-canary.54

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 (179) hide show
  1. package/dist/scripts/prepare-database.d.ts +0 -1
  2. package/dist/scripts/prepare-database.d.ts.map +1 -1
  3. package/dist/scripts/scripts.js +4 -4
  4. package/dist/src/api/adapters/cron/node-cron.adapter.d.ts +3 -0
  5. package/dist/src/api/adapters/cron/node-cron.adapter.d.ts.map +1 -0
  6. package/dist/src/api/adapters/cron/node-cron.adapter.js +11 -0
  7. package/dist/src/api/config.d.ts.map +1 -1
  8. package/dist/src/api/config.js +21 -9
  9. package/dist/src/api/lib/cron.d.ts +18 -0
  10. package/dist/src/api/lib/cron.d.ts.map +1 -0
  11. package/dist/src/api/lib/cron.js +22 -0
  12. package/dist/src/api/lib/module.d.ts +4 -1
  13. package/dist/src/api/lib/module.d.ts.map +1 -1
  14. package/dist/src/api/lib/module.js +3 -2
  15. package/dist/src/api/lib/plugin.d.ts +2 -0
  16. package/dist/src/api/lib/plugin.d.ts.map +1 -1
  17. package/dist/src/api/lib/plugin.js +9 -1
  18. package/dist/src/api/middlewares/cron-auth.middleware.d.ts +3 -0
  19. package/dist/src/api/middlewares/cron-auth.middleware.d.ts.map +1 -0
  20. package/dist/src/api/middlewares/cron-auth.middleware.js +19 -0
  21. package/dist/src/api/middlewares/global.middleware.d.ts +6 -0
  22. package/dist/src/api/middlewares/global.middleware.d.ts.map +1 -1
  23. package/dist/src/api/middlewares/global.middleware.js +33 -22
  24. package/dist/src/api/models/user/sign-up.d.ts +1 -1
  25. package/dist/src/api/models/user.d.ts +1 -1
  26. package/dist/src/api/modules/admin/admin.module.d.ts +163 -1
  27. package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -1
  28. package/dist/src/api/modules/admin/admin.module.js +6 -3
  29. package/dist/src/api/modules/admin/advanced/advanced.admin.module.d.ts +164 -0
  30. package/dist/src/api/modules/admin/advanced/advanced.admin.module.d.ts.map +1 -0
  31. package/dist/src/api/modules/admin/advanced/advanced.admin.module.js +11 -0
  32. package/dist/src/api/modules/admin/advanced/cron/cron.admin.module.d.ts +164 -0
  33. package/dist/src/api/modules/admin/advanced/cron/cron.admin.module.d.ts.map +1 -0
  34. package/dist/src/api/modules/admin/advanced/cron/cron.admin.module.js +12 -0
  35. package/dist/src/api/modules/admin/advanced/cron/routes/get.route.d.ts +98 -0
  36. package/dist/src/api/modules/admin/advanced/cron/routes/get.route.d.ts.map +1 -0
  37. package/dist/src/api/modules/admin/advanced/cron/routes/get.route.js +66 -0
  38. package/dist/src/api/modules/admin/advanced/cron/routes/run.route.d.ts +70 -0
  39. package/dist/src/api/modules/admin/advanced/cron/routes/run.route.d.ts.map +1 -0
  40. package/dist/src/api/modules/admin/advanced/cron/routes/run.route.js +95 -0
  41. package/dist/src/api/modules/admin/debug/debug.admin.module.js +1 -1
  42. package/dist/src/api/modules/admin/debug/routes/logs.route.js +1 -1
  43. package/dist/src/api/modules/admin/routes/session.route.js +1 -1
  44. package/dist/src/api/modules/admin/users/routes/list.route.js +1 -1
  45. package/dist/src/api/modules/admin/users/routes/users.route.d.ts +3 -3
  46. package/dist/src/api/modules/admin/users/routes/users.route.js +1 -1
  47. package/dist/src/api/modules/admin/users/users.admin.module.js +1 -1
  48. package/dist/src/api/modules/cron/cron/clean.cron.d.ts +2 -0
  49. package/dist/src/api/modules/cron/cron/clean.cron.d.ts.map +1 -0
  50. package/dist/src/api/modules/cron/cron/clean.cron.js +24 -0
  51. package/dist/src/api/modules/cron/cron.module.d.ts +26 -0
  52. package/dist/src/api/modules/cron/cron.module.d.ts.map +1 -0
  53. package/dist/src/api/modules/cron/cron.module.js +14 -0
  54. package/dist/src/api/modules/cron/helpers/process-cron-jobs.d.ts +36 -0
  55. package/dist/src/api/modules/cron/helpers/process-cron-jobs.d.ts.map +1 -0
  56. package/dist/src/api/modules/cron/helpers/process-cron-jobs.js +72 -0
  57. package/dist/src/api/modules/cron/routes/cron.route.d.ts +27 -0
  58. package/dist/src/api/modules/cron/routes/cron.route.d.ts.map +1 -0
  59. package/dist/src/api/modules/cron/routes/cron.route.js +95 -0
  60. package/dist/src/api/modules/middleware/middleware.module.js +1 -1
  61. package/dist/src/api/modules/middleware/route.js +1 -1
  62. package/dist/src/api/modules/users/routes/change-password.route.js +1 -1
  63. package/dist/src/api/modules/users/routes/reset-passowrd.route.js +1 -1
  64. package/dist/src/api/modules/users/routes/session.route.js +1 -1
  65. package/dist/src/api/modules/users/routes/sign-in.route.js +1 -1
  66. package/dist/src/api/modules/users/routes/sign-out.route.js +1 -1
  67. package/dist/src/api/modules/users/routes/sign-up.route.js +1 -1
  68. package/dist/src/api/modules/users/routes/test.route.js +1 -1
  69. package/dist/src/api/modules/users/sso/routes/callback.route.js +1 -1
  70. package/dist/src/api/modules/users/sso/routes/create-url.route.js +1 -1
  71. package/dist/src/api/modules/users/sso/sso.module.js +1 -1
  72. package/dist/src/api/modules/users/users.module.js +1 -1
  73. package/dist/src/api/plugin.d.ts.map +1 -1
  74. package/dist/src/api/plugin.js +4 -2
  75. package/dist/src/app_admin/core/advanced/cron/page.d.ts +11 -0
  76. package/dist/src/app_admin/core/advanced/cron/page.d.ts.map +1 -0
  77. package/dist/src/app_admin/core/advanced/cron/page.js +42 -0
  78. package/dist/src/components/switchers/langs/{language-swietcher.d.ts → language-switcher.d.ts} +1 -1
  79. package/dist/src/components/switchers/langs/language-switcher.d.ts.map +1 -0
  80. package/dist/src/components/tiptap/extension.d.ts +4 -0
  81. package/dist/src/components/tiptap/extension.d.ts.map +1 -0
  82. package/dist/src/components/tiptap/extension.js +26 -0
  83. package/dist/src/components/tiptap/toolbar/actions/bold-action.d.ts +2 -0
  84. package/dist/src/components/tiptap/toolbar/actions/bold-action.d.ts.map +1 -0
  85. package/dist/src/components/tiptap/toolbar/actions/bold-action.js +39 -0
  86. package/dist/src/components/tiptap/toolbar/actions/headings-action.d.ts +2 -0
  87. package/dist/src/components/tiptap/toolbar/actions/headings-action.d.ts.map +1 -0
  88. package/dist/src/components/tiptap/toolbar/actions/headings-action.js +94 -0
  89. package/dist/src/components/tiptap/toolbar/actions/italic-action.d.ts +2 -0
  90. package/dist/src/components/tiptap/toolbar/actions/italic-action.d.ts.map +1 -0
  91. package/dist/src/components/tiptap/toolbar/actions/italic-action.js +38 -0
  92. package/dist/src/components/tiptap/toolbar/actions/list-action.d.ts +2 -0
  93. package/dist/src/components/tiptap/toolbar/actions/list-action.d.ts.map +1 -0
  94. package/dist/src/components/tiptap/toolbar/actions/list-action.js +60 -0
  95. package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.d.ts +2 -0
  96. package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.d.ts.map +1 -0
  97. package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.js +59 -0
  98. package/dist/src/components/tiptap/toolbar/actions/underline-action.d.ts +2 -0
  99. package/dist/src/components/tiptap/toolbar/actions/underline-action.d.ts.map +1 -0
  100. package/dist/src/components/tiptap/toolbar/actions/underline-action.js +38 -0
  101. package/dist/src/components/tiptap/toolbar/actions/undo-redo-actions.d.ts +2 -0
  102. package/dist/src/components/tiptap/toolbar/actions/undo-redo-actions.d.ts.map +1 -0
  103. package/dist/src/components/tiptap/toolbar/actions/undo-redo-actions.js +63 -0
  104. package/dist/src/components/tiptap/toolbar/actions/utils/tooltip-shortcut.d.ts +4 -0
  105. package/dist/src/components/tiptap/toolbar/actions/utils/tooltip-shortcut.d.ts.map +1 -0
  106. package/dist/src/components/tiptap/toolbar/actions/utils/tooltip-shortcut.js +11 -0
  107. package/dist/src/components/tiptap/toolbar/tiptap-toolbar.d.ts +5 -0
  108. package/dist/src/components/tiptap/toolbar/tiptap-toolbar.d.ts.map +1 -0
  109. package/dist/src/components/tiptap/toolbar/tiptap-toolbar.js +35 -0
  110. package/dist/src/components/tiptap/toolbar/use-toolbar-editor.d.ts +9 -0
  111. package/dist/src/components/tiptap/toolbar/use-toolbar-editor.d.ts.map +1 -0
  112. package/dist/src/components/tiptap/toolbar/use-toolbar-editor.js +5 -0
  113. package/dist/src/components/ui/button-client.d.ts.map +1 -1
  114. package/dist/src/components/ui/button-client.js +1 -1
  115. package/dist/src/components/ui/button.js +1 -1
  116. package/dist/src/components/ui/editor-content.d.ts +4 -0
  117. package/dist/src/components/ui/editor-content.d.ts.map +1 -0
  118. package/dist/src/components/ui/editor-content.js +10 -0
  119. package/dist/src/components/ui/editor.d.ts +6 -0
  120. package/dist/src/components/ui/editor.d.ts.map +1 -0
  121. package/dist/src/components/ui/editor.js +35 -0
  122. package/dist/src/components/ui/sidebar.js +14 -14
  123. package/dist/src/components/ui/table.js +1 -1
  124. package/dist/src/components/ui/tooltip.d.ts +4 -1
  125. package/dist/src/components/ui/tooltip.d.ts.map +1 -1
  126. package/dist/src/components/ui/tooltip.js +18 -2
  127. package/dist/src/database/cron.d.ts +171 -0
  128. package/dist/src/database/cron.d.ts.map +1 -0
  129. package/dist/src/database/cron.js +22 -0
  130. package/dist/src/database/users.d.ts +2 -2
  131. package/dist/src/database/users.js +1 -1
  132. package/dist/src/lib/api/get-next-cron-run-date.d.ts +2 -0
  133. package/dist/src/lib/api/get-next-cron-run-date.d.ts.map +1 -0
  134. package/dist/src/lib/api/get-next-cron-run-date.js +14 -0
  135. package/dist/src/lib/api/get-next-cron-run-date.test.d.ts +2 -0
  136. package/dist/src/lib/api/get-next-cron-run-date.test.d.ts.map +1 -0
  137. package/dist/src/lib/api/get-next-cron-run-date.test.js +55 -0
  138. package/dist/src/lib/api/should-cron-job-run.d.ts +2 -0
  139. package/dist/src/lib/api/should-cron-job-run.d.ts.map +1 -0
  140. package/dist/src/lib/api/should-cron-job-run.js +16 -0
  141. package/dist/src/lib/api/should-cron-job-run.test.d.ts +2 -0
  142. package/dist/src/lib/api/should-cron-job-run.test.d.ts.map +1 -0
  143. package/dist/src/lib/api/should-cron-job-run.test.js +213 -0
  144. package/dist/src/lib/config.d.ts +1 -0
  145. package/dist/src/lib/config.d.ts.map +1 -1
  146. package/dist/src/lib/config.js +7 -5
  147. package/dist/src/lib/ctrl-or-command-character.d.ts +2 -0
  148. package/dist/src/lib/ctrl-or-command-character.d.ts.map +1 -0
  149. package/dist/src/lib/ctrl-or-command-character.js +9 -0
  150. package/dist/src/lib/navigation.d.ts +1 -1
  151. package/dist/src/lib/navigation.d.ts.map +1 -1
  152. package/dist/src/views/admin/layouts/admin-layout.js +1 -1
  153. package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts.map +1 -1
  154. package/dist/src/views/admin/layouts/sidebar/nav/item.js +0 -3
  155. package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts.map +1 -1
  156. package/dist/src/views/admin/layouts/sidebar/nav/nav.js +12 -1
  157. package/dist/src/views/admin/views/core/advanced/cron/cron-table-view.d.ts +5 -0
  158. package/dist/src/views/admin/views/core/advanced/cron/cron-table-view.d.ts.map +1 -0
  159. package/dist/src/views/admin/views/core/advanced/cron/cron-table-view.js +97 -0
  160. package/dist/src/views/admin/views/core/advanced/cron/run-action/mutation-api.d.ts +4 -0
  161. package/dist/src/views/admin/views/core/advanced/cron/run-action/mutation-api.d.ts.map +1 -0
  162. package/dist/src/views/admin/views/core/advanced/cron/run-action/mutation-api.js +23 -0
  163. package/dist/src/views/admin/views/core/advanced/cron/run-action/run-action.d.ts +4 -0
  164. package/dist/src/views/admin/views/core/advanced/cron/run-action/run-action.d.ts.map +1 -0
  165. package/dist/src/views/admin/views/core/advanced/cron/run-action/run-action.js +37 -0
  166. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts.map +1 -1
  167. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.js +11 -20
  168. package/dist/src/views/admin/views/core/test.d.ts.map +1 -1
  169. package/dist/src/views/admin/views/core/test.js +116 -106
  170. package/dist/src/views/layouts/theme/header/header.js +1 -1
  171. package/dist/src/vitnode.config.d.ts +2 -0
  172. package/dist/src/vitnode.config.d.ts.map +1 -1
  173. package/dist/tsconfig.tsbuildinfo +1 -1
  174. package/package.json +32 -26
  175. package/src/app_admin/core/advanced/cron/page.tsx +41 -0
  176. package/src/locales/en.json +43 -0
  177. package/src/tiptap.css +20 -0
  178. package/dist/src/components/switchers/langs/language-swietcher.d.ts.map +0 -1
  179. /package/dist/src/components/switchers/langs/{language-swietcher.js → language-switcher.js} +0 -0
@@ -0,0 +1,23 @@
1
+ "use server";
2
+ import { revalidatePath } from "next/cache";
3
+ import { cronAdminModule } from "../../../../../../../api/modules/admin/advanced/cron/cron.admin.module.js";
4
+ import { fetcher } from "../../../../../../../lib/fetcher.js";
5
+ export const mutationApi = async (id)=>{
6
+ const res = await fetcher(cronAdminModule, {
7
+ path: "/{id}",
8
+ method: "post",
9
+ module: "cron",
10
+ prefixPath: "/admin/advanced",
11
+ args: {
12
+ params: {
13
+ id: id.toString()
14
+ }
15
+ }
16
+ });
17
+ if (!res.ok) {
18
+ return {
19
+ error: "Failed to run cron job"
20
+ };
21
+ }
22
+ revalidatePath("[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/advanced/cron");
23
+ };
@@ -0,0 +1,4 @@
1
+ export declare const RunActionCronTable: ({ id }: {
2
+ id: number;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=run-action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-action.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/views/admin/views/core/advanced/cron/run-action/run-action.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,kBAAkB,GAAI,QAAQ;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,4CA+BxD,CAAC"}
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { PlayIcon } from "lucide-react";
4
+ import { useTranslations } from "next-intl";
5
+ import { useActionState } from "react";
6
+ import { toast } from "sonner";
7
+ import { Button } from "../../../../../../../components/ui/button.js";
8
+ import { TooltipWithContent } from "../../../../../../../components/ui/tooltip.js";
9
+ import { mutationApi } from "./mutation-api.js";
10
+ export const RunActionCronTable = ({ id })=>{
11
+ const t = useTranslations("admin.advanced.cron.list.actions.runNow");
12
+ const tError = useTranslations("core.global.errors");
13
+ const [_, formAction, isPending] = useActionState(async ()=>{
14
+ const mutation = await mutationApi(id);
15
+ if (mutation?.error) {
16
+ toast.error(tError("title"), {
17
+ description: tError("internal_server_error")
18
+ });
19
+ return;
20
+ }
21
+ toast.success(t("success"));
22
+ }, null);
23
+ return /*#__PURE__*/ _jsx("form", {
24
+ action: formAction,
25
+ children: /*#__PURE__*/ _jsx(TooltipWithContent, {
26
+ text: t("label"),
27
+ children: /*#__PURE__*/ _jsx(Button, {
28
+ variant: "ghost",
29
+ type: "submit",
30
+ size: "icon",
31
+ "aria-label": t("label"),
32
+ isLoading: isPending,
33
+ children: /*#__PURE__*/ _jsx(PlayIcon, {})
34
+ })
35
+ })
36
+ });
37
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"more.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/views/admin/views/core/debug/system-logs/actions/more/more.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAmB1B,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;EAIhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,2BAA2B,CAAC,4CAsChE,CAAC"}
1
+ {"version":3,"file":"more.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/views/admin/views/core/debug/system-logs/actions/more/more.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;EAIhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,2BAA2B,CAAC,4CAiChE,CAAC"}
@@ -7,7 +7,7 @@ import React from "react";
7
7
  import { Button } from "../../../../../../../../components/ui/button.js";
8
8
  import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "../../../../../../../../components/ui/dialog.js";
9
9
  import { Loader } from "../../../../../../../../components/ui/loader.js";
10
- import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../../../../../../../components/ui/tooltip.js";
10
+ import { TooltipWithContent } from "../../../../../../../../components/ui/tooltip.js";
11
11
  const ContentMoreActionSystemLogs = dynamic(async ()=>import("./content.js").then((module)=>({
12
12
  default: module.ContentMoreActionSystemLogs
13
13
  })));
@@ -15,25 +15,16 @@ export const MoreActionSystemLogs = (props)=>{
15
15
  const t = useTranslations("admin.debug.logs.more");
16
16
  return /*#__PURE__*/ _jsxs(Dialog, {
17
17
  children: [
18
- /*#__PURE__*/ _jsx(TooltipProvider, {
19
- children: /*#__PURE__*/ _jsxs(Tooltip, {
20
- children: [
21
- /*#__PURE__*/ _jsx(TooltipTrigger, {
22
- asChild: true,
23
- children: /*#__PURE__*/ _jsx(DialogTrigger, {
24
- asChild: true,
25
- children: /*#__PURE__*/ _jsx(Button, {
26
- "aria-label": t("title"),
27
- size: "icon",
28
- variant: "ghost",
29
- children: /*#__PURE__*/ _jsx(SearchIcon, {})
30
- })
31
- })
32
- }),
33
- /*#__PURE__*/ _jsx(TooltipContent, {
34
- children: t("title")
35
- })
36
- ]
18
+ /*#__PURE__*/ _jsx(TooltipWithContent, {
19
+ text: t("title"),
20
+ children: /*#__PURE__*/ _jsx(DialogTrigger, {
21
+ asChild: true,
22
+ children: /*#__PURE__*/ _jsx(Button, {
23
+ "aria-label": t("title"),
24
+ size: "icon",
25
+ variant: "ghost",
26
+ children: /*#__PURE__*/ _jsx(SearchIcon, {})
27
+ })
37
28
  })
38
29
  }),
39
30
  /*#__PURE__*/ _jsxs(DialogContent, {
@@ -1 +1 @@
1
- {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../../../../../src/views/admin/views/core/test.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,QAAQ,+CA0JpB,CAAC"}
1
+ {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../../../../../src/views/admin/views/core/test.tsx"],"names":[],"mappings":"AAgBA,eAAO,MAAM,QAAQ,+CA6JpB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { z } from "zod";
4
4
  import { AutoForm } from "../../../../components/form/auto-form.js";
5
5
  import { AutoFormCheckbox } from "../../../../components/form/fields/checkbox.js";
@@ -10,6 +10,8 @@ import { AutoFormSelect } from "../../../../components/form/fields/select.js";
10
10
  import { AutoFormSwitch } from "../../../../components/form/fields/switch.js";
11
11
  import { AutoFormTextarea } from "../../../../components/form/fields/textarea.js";
12
12
  import { Card } from "../../../../components/ui/card.js";
13
+ import { Editor } from "../../../../components/ui/editor.js";
14
+ import { EditorContent } from "../../../../components/ui/editor-content.js";
13
15
  export const TestView = ()=>{
14
16
  const formSchema = z.object({
15
17
  provider: z.string().min(1, {
@@ -39,113 +41,121 @@ export const TestView = ()=>{
39
41
  });
40
42
  return /*#__PURE__*/ _jsx("div", {
41
43
  className: "p-4",
42
- children: /*#__PURE__*/ _jsx(Card, {
44
+ children: /*#__PURE__*/ _jsxs(Card, {
43
45
  className: "p-6",
44
- children: /*#__PURE__*/ _jsx(AutoForm, {
45
- fields: [
46
- {
47
- id: "provider",
48
- component: (props)=>/*#__PURE__*/ _jsx(AutoFormInput, {
49
- description: "This is the provider for your application. It should be a valid provider name.",
50
- label: "Provider",
51
- ...props
52
- })
53
- },
54
- {
55
- id: "client_secret",
56
- component: (props)=>/*#__PURE__*/ _jsx(AutoFormTextarea, {
57
- description: "This is the client secret for your application. It should be kept secret and not shared with anyone.",
58
- label: "Client Secret",
59
- ...props
60
- })
61
- },
62
- {
63
- id: "terms",
64
- component: (props)=>/*#__PURE__*/ _jsx(AutoFormCheckbox, {
65
- description: "By checking this box, you agree to the terms and conditions.",
66
- label: "I agree to the terms and conditions",
67
- ...props
68
- })
69
- },
70
- {
71
- id: "options",
72
- component: (props)=>/*#__PURE__*/ _jsx(AutoFormRadioGroup, {
73
- description: "By checking this box, you agree to the terms and conditions.",
74
- label: "I agree to the terms and conditions",
75
- labels: [
76
- {
77
- value: "option1",
78
- label: "Option 1 with a very long label that should be truncated"
79
- },
80
- {
81
- value: "option2",
82
- label: "Option 2"
83
- },
84
- {
85
- value: "option3",
86
- label: "Option 3"
87
- }
88
- ],
89
- ...props
90
- })
91
- },
92
- {
93
- id: "options_long",
94
- component: (props)=>/*#__PURE__*/ _jsx(AutoFormSelect, {
95
- description: "By checking this box, you agree to the terms and conditions.",
96
- label: "I agree to the terms and conditions",
97
- labels: [
98
- {
99
- value: "option1",
100
- label: "Option 1 with a very long label that should be truncated"
101
- },
102
- {
103
- value: "option2",
104
- label: "Option 2"
105
- },
106
- {
107
- value: "option3",
108
- label: "Option 3"
109
- }
110
- ],
111
- placeholder: "Select an option from the list",
112
- ...props
113
- })
114
- },
115
- {
116
- id: "switch",
117
- component: (props)=>/*#__PURE__*/ _jsx(AutoFormSwitch, {
118
- ...props,
119
- description: "By checking this box, you agree to the terms and conditions.",
120
- label: "I agree to the terms and conditions"
121
- })
122
- },
123
- {
124
- id: "type",
125
- component: (props)=>/*#__PURE__*/ _jsx(AutoFormCombobox, {
126
- description: "By checking this box, you agree to the terms and conditions.",
127
- label: "Type",
128
- labels: [
129
- {
130
- value: "option-one",
131
- label: "Option One"
132
- },
133
- {
134
- value: "option-two",
135
- label: "Option Two"
136
- }
137
- ],
138
- ...props
139
- })
46
+ children: [
47
+ /*#__PURE__*/ _jsx(Editor, {
48
+ value: "<p>Hello World! 🌎️</p>"
49
+ }),
50
+ /*#__PURE__*/ _jsx(EditorContent, {
51
+ content: "<h2>Test header v2</h2><p>Hello World! 🌎️das d alfjnasjf kas djksa fkja sfj AFKJ afj AFJKNAJSKGNSAKFLMSAKLDNASFJNKJnjkdasnfjnas fjknsa fjknsafkjn askjfnkajsgnasjkfnskjanf kjans fjknasjkf naskjf naskjnf kjasn kfjans fjkas kfjnas jknfkasjn fkajsnf jnasfjkangaskjfnajsdnlaskmcdasjfnjskafnsajknfcksajdnasjkfnjkasn cfjksanfjckasnjcnaskjcnaksjcnaksjcnakjcnasjkn</p>"
52
+ }),
53
+ /*#__PURE__*/ _jsx(AutoForm, {
54
+ fields: [
55
+ {
56
+ id: "provider",
57
+ component: (props)=>/*#__PURE__*/ _jsx(AutoFormInput, {
58
+ description: "This is the provider for your application. It should be a valid provider name.",
59
+ label: "Provider",
60
+ ...props
61
+ })
62
+ },
63
+ {
64
+ id: "client_secret",
65
+ component: (props)=>/*#__PURE__*/ _jsx(AutoFormTextarea, {
66
+ description: "This is the client secret for your application. It should be kept secret and not shared with anyone.",
67
+ label: "Client Secret",
68
+ ...props
69
+ })
70
+ },
71
+ {
72
+ id: "terms",
73
+ component: (props)=>/*#__PURE__*/ _jsx(AutoFormCheckbox, {
74
+ description: "By checking this box, you agree to the terms and conditions.",
75
+ label: "I agree to the terms and conditions",
76
+ ...props
77
+ })
78
+ },
79
+ {
80
+ id: "options",
81
+ component: (props)=>/*#__PURE__*/ _jsx(AutoFormRadioGroup, {
82
+ description: "By checking this box, you agree to the terms and conditions.",
83
+ label: "I agree to the terms and conditions",
84
+ labels: [
85
+ {
86
+ value: "option1",
87
+ label: "Option 1 with a very long label that should be truncated"
88
+ },
89
+ {
90
+ value: "option2",
91
+ label: "Option 2"
92
+ },
93
+ {
94
+ value: "option3",
95
+ label: "Option 3"
96
+ }
97
+ ],
98
+ ...props
99
+ })
100
+ },
101
+ {
102
+ id: "options_long",
103
+ component: (props)=>/*#__PURE__*/ _jsx(AutoFormSelect, {
104
+ description: "By checking this box, you agree to the terms and conditions.",
105
+ label: "I agree to the terms and conditions",
106
+ labels: [
107
+ {
108
+ value: "option1",
109
+ label: "Option 1 with a very long label that should be truncated"
110
+ },
111
+ {
112
+ value: "option2",
113
+ label: "Option 2"
114
+ },
115
+ {
116
+ value: "option3",
117
+ label: "Option 3"
118
+ }
119
+ ],
120
+ placeholder: "Select an option from the list",
121
+ ...props
122
+ })
123
+ },
124
+ {
125
+ id: "switch",
126
+ component: (props)=>/*#__PURE__*/ _jsx(AutoFormSwitch, {
127
+ ...props,
128
+ description: "By checking this box, you agree to the terms and conditions.",
129
+ label: "I agree to the terms and conditions"
130
+ })
131
+ },
132
+ {
133
+ id: "type",
134
+ component: (props)=>/*#__PURE__*/ _jsx(AutoFormCombobox, {
135
+ description: "By checking this box, you agree to the terms and conditions.",
136
+ label: "Type",
137
+ labels: [
138
+ {
139
+ value: "option-one",
140
+ label: "Option One"
141
+ },
142
+ {
143
+ value: "option-two",
144
+ label: "Option Two"
145
+ }
146
+ ],
147
+ ...props
148
+ })
149
+ }
150
+ ],
151
+ formSchema: formSchema,
152
+ onSubmit: async (values)=>{
153
+ // biome-ignore lint/suspicious/noConsole: <needed>
154
+ console.log("Form submitted", values);
155
+ await new Promise((resolve)=>setTimeout(resolve, 3000));
140
156
  }
141
- ],
142
- formSchema: formSchema,
143
- onSubmit: async (values)=>{
144
- // biome-ignore lint/suspicious/noConsole: <needed>
145
- console.log("Form submitted", values);
146
- await new Promise((resolve)=>setTimeout(resolve, 3000));
147
- }
148
- })
157
+ })
158
+ ]
149
159
  })
150
160
  });
151
161
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from "react";
3
- import { LanguageSwitcher } from "../../../../components/switchers/langs/language-swietcher.js";
3
+ import { LanguageSwitcher } from "../../../../components/switchers/langs/language-switcher.js";
4
4
  import { ThemeSwitcher } from "../../../../components/switchers/themes/theme-switcher.js";
5
5
  import { Skeleton } from "../../../../components/ui/skeleton.js";
6
6
  import { Link } from "../../../../lib/navigation.js";
@@ -1,6 +1,7 @@
1
1
  import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
2
2
  import type { ThemeProvider } from "next-themes";
3
3
  import type { IRateLimiterOptions } from "rate-limiter-flexible";
4
+ import type { CronAdapter } from "./api/lib/cron";
4
5
  import type { BuildPluginApiReturn } from "./api/lib/plugin";
5
6
  import type { EmailApiPlugin } from "./api/models/email";
6
7
  import type { SSOApiPlugin } from "./api/models/sso";
@@ -39,6 +40,7 @@ export interface VitNodeApiConfig {
39
40
  type: "cloudflare_turnstile" | "recaptcha_v3";
40
41
  };
41
42
  dbProvider: PostgresJsDatabase;
43
+ cronAdapter?: CronAdapter;
42
44
  email?: {
43
45
  adapter?: EmailApiPlugin;
44
46
  logo?: DefaultTemplateEmailProps["templateProps"]["logo"];
@@ -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,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,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,IAAI,EAAE;QACJ,aAAa,EAAE,UAAU,CAAC,MAA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