@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.
- package/dist/scripts/prepare-database.d.ts +0 -1
- package/dist/scripts/prepare-database.d.ts.map +1 -1
- package/dist/scripts/scripts.js +4 -4
- package/dist/src/api/adapters/cron/node-cron.adapter.d.ts +3 -0
- package/dist/src/api/adapters/cron/node-cron.adapter.d.ts.map +1 -0
- package/dist/src/api/adapters/cron/node-cron.adapter.js +11 -0
- package/dist/src/api/config.d.ts.map +1 -1
- package/dist/src/api/config.js +21 -9
- package/dist/src/api/lib/cron.d.ts +18 -0
- package/dist/src/api/lib/cron.d.ts.map +1 -0
- package/dist/src/api/lib/cron.js +22 -0
- package/dist/src/api/lib/module.d.ts +4 -1
- package/dist/src/api/lib/module.d.ts.map +1 -1
- package/dist/src/api/lib/module.js +3 -2
- package/dist/src/api/lib/plugin.d.ts +2 -0
- package/dist/src/api/lib/plugin.d.ts.map +1 -1
- package/dist/src/api/lib/plugin.js +9 -1
- package/dist/src/api/middlewares/cron-auth.middleware.d.ts +3 -0
- package/dist/src/api/middlewares/cron-auth.middleware.d.ts.map +1 -0
- package/dist/src/api/middlewares/cron-auth.middleware.js +19 -0
- package/dist/src/api/middlewares/global.middleware.d.ts +6 -0
- package/dist/src/api/middlewares/global.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/global.middleware.js +33 -22
- package/dist/src/api/models/user/sign-up.d.ts +1 -1
- package/dist/src/api/models/user.d.ts +1 -1
- package/dist/src/api/modules/admin/admin.module.d.ts +163 -1
- package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -1
- package/dist/src/api/modules/admin/admin.module.js +6 -3
- package/dist/src/api/modules/admin/advanced/advanced.admin.module.d.ts +164 -0
- package/dist/src/api/modules/admin/advanced/advanced.admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/advanced/advanced.admin.module.js +11 -0
- package/dist/src/api/modules/admin/advanced/cron/cron.admin.module.d.ts +164 -0
- package/dist/src/api/modules/admin/advanced/cron/cron.admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/advanced/cron/cron.admin.module.js +12 -0
- package/dist/src/api/modules/admin/advanced/cron/routes/get.route.d.ts +98 -0
- package/dist/src/api/modules/admin/advanced/cron/routes/get.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/advanced/cron/routes/get.route.js +66 -0
- package/dist/src/api/modules/admin/advanced/cron/routes/run.route.d.ts +70 -0
- package/dist/src/api/modules/admin/advanced/cron/routes/run.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/advanced/cron/routes/run.route.js +95 -0
- package/dist/src/api/modules/admin/debug/debug.admin.module.js +1 -1
- package/dist/src/api/modules/admin/debug/routes/logs.route.js +1 -1
- package/dist/src/api/modules/admin/routes/session.route.js +1 -1
- package/dist/src/api/modules/admin/users/routes/list.route.js +1 -1
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts +3 -3
- package/dist/src/api/modules/admin/users/routes/users.route.js +1 -1
- package/dist/src/api/modules/admin/users/users.admin.module.js +1 -1
- package/dist/src/api/modules/cron/cron/clean.cron.d.ts +2 -0
- package/dist/src/api/modules/cron/cron/clean.cron.d.ts.map +1 -0
- package/dist/src/api/modules/cron/cron/clean.cron.js +24 -0
- package/dist/src/api/modules/cron/cron.module.d.ts +26 -0
- package/dist/src/api/modules/cron/cron.module.d.ts.map +1 -0
- package/dist/src/api/modules/cron/cron.module.js +14 -0
- package/dist/src/api/modules/cron/helpers/process-cron-jobs.d.ts +36 -0
- package/dist/src/api/modules/cron/helpers/process-cron-jobs.d.ts.map +1 -0
- package/dist/src/api/modules/cron/helpers/process-cron-jobs.js +72 -0
- package/dist/src/api/modules/cron/routes/cron.route.d.ts +27 -0
- package/dist/src/api/modules/cron/routes/cron.route.d.ts.map +1 -0
- package/dist/src/api/modules/cron/routes/cron.route.js +95 -0
- package/dist/src/api/modules/middleware/middleware.module.js +1 -1
- package/dist/src/api/modules/middleware/route.js +1 -1
- package/dist/src/api/modules/users/routes/change-password.route.js +1 -1
- package/dist/src/api/modules/users/routes/reset-passowrd.route.js +1 -1
- package/dist/src/api/modules/users/routes/session.route.js +1 -1
- package/dist/src/api/modules/users/routes/sign-in.route.js +1 -1
- package/dist/src/api/modules/users/routes/sign-out.route.js +1 -1
- package/dist/src/api/modules/users/routes/sign-up.route.js +1 -1
- package/dist/src/api/modules/users/routes/test.route.js +1 -1
- package/dist/src/api/modules/users/sso/routes/callback.route.js +1 -1
- package/dist/src/api/modules/users/sso/routes/create-url.route.js +1 -1
- package/dist/src/api/modules/users/sso/sso.module.js +1 -1
- package/dist/src/api/modules/users/users.module.js +1 -1
- package/dist/src/api/plugin.d.ts.map +1 -1
- package/dist/src/api/plugin.js +4 -2
- package/dist/src/app_admin/core/advanced/cron/page.d.ts +11 -0
- package/dist/src/app_admin/core/advanced/cron/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/advanced/cron/page.js +42 -0
- package/dist/src/components/switchers/langs/{language-swietcher.d.ts → language-switcher.d.ts} +1 -1
- package/dist/src/components/switchers/langs/language-switcher.d.ts.map +1 -0
- package/dist/src/components/tiptap/extension.d.ts +4 -0
- package/dist/src/components/tiptap/extension.d.ts.map +1 -0
- package/dist/src/components/tiptap/extension.js +26 -0
- package/dist/src/components/tiptap/toolbar/actions/bold-action.d.ts +2 -0
- package/dist/src/components/tiptap/toolbar/actions/bold-action.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/bold-action.js +39 -0
- package/dist/src/components/tiptap/toolbar/actions/headings-action.d.ts +2 -0
- package/dist/src/components/tiptap/toolbar/actions/headings-action.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/headings-action.js +94 -0
- package/dist/src/components/tiptap/toolbar/actions/italic-action.d.ts +2 -0
- package/dist/src/components/tiptap/toolbar/actions/italic-action.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/italic-action.js +38 -0
- package/dist/src/components/tiptap/toolbar/actions/list-action.d.ts +2 -0
- package/dist/src/components/tiptap/toolbar/actions/list-action.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/list-action.js +60 -0
- package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.d.ts +2 -0
- package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.js +59 -0
- package/dist/src/components/tiptap/toolbar/actions/underline-action.d.ts +2 -0
- package/dist/src/components/tiptap/toolbar/actions/underline-action.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/underline-action.js +38 -0
- package/dist/src/components/tiptap/toolbar/actions/undo-redo-actions.d.ts +2 -0
- package/dist/src/components/tiptap/toolbar/actions/undo-redo-actions.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/undo-redo-actions.js +63 -0
- package/dist/src/components/tiptap/toolbar/actions/utils/tooltip-shortcut.d.ts +4 -0
- package/dist/src/components/tiptap/toolbar/actions/utils/tooltip-shortcut.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/utils/tooltip-shortcut.js +11 -0
- package/dist/src/components/tiptap/toolbar/tiptap-toolbar.d.ts +5 -0
- package/dist/src/components/tiptap/toolbar/tiptap-toolbar.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/tiptap-toolbar.js +35 -0
- package/dist/src/components/tiptap/toolbar/use-toolbar-editor.d.ts +9 -0
- package/dist/src/components/tiptap/toolbar/use-toolbar-editor.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/use-toolbar-editor.js +5 -0
- package/dist/src/components/ui/button-client.d.ts.map +1 -1
- package/dist/src/components/ui/button-client.js +1 -1
- package/dist/src/components/ui/button.js +1 -1
- package/dist/src/components/ui/editor-content.d.ts +4 -0
- package/dist/src/components/ui/editor-content.d.ts.map +1 -0
- package/dist/src/components/ui/editor-content.js +10 -0
- package/dist/src/components/ui/editor.d.ts +6 -0
- package/dist/src/components/ui/editor.d.ts.map +1 -0
- package/dist/src/components/ui/editor.js +35 -0
- package/dist/src/components/ui/sidebar.js +14 -14
- package/dist/src/components/ui/table.js +1 -1
- package/dist/src/components/ui/tooltip.d.ts +4 -1
- package/dist/src/components/ui/tooltip.d.ts.map +1 -1
- package/dist/src/components/ui/tooltip.js +18 -2
- package/dist/src/database/cron.d.ts +171 -0
- package/dist/src/database/cron.d.ts.map +1 -0
- package/dist/src/database/cron.js +22 -0
- package/dist/src/database/users.d.ts +2 -2
- package/dist/src/database/users.js +1 -1
- package/dist/src/lib/api/get-next-cron-run-date.d.ts +2 -0
- package/dist/src/lib/api/get-next-cron-run-date.d.ts.map +1 -0
- package/dist/src/lib/api/get-next-cron-run-date.js +14 -0
- package/dist/src/lib/api/get-next-cron-run-date.test.d.ts +2 -0
- package/dist/src/lib/api/get-next-cron-run-date.test.d.ts.map +1 -0
- package/dist/src/lib/api/get-next-cron-run-date.test.js +55 -0
- package/dist/src/lib/api/should-cron-job-run.d.ts +2 -0
- package/dist/src/lib/api/should-cron-job-run.d.ts.map +1 -0
- package/dist/src/lib/api/should-cron-job-run.js +16 -0
- package/dist/src/lib/api/should-cron-job-run.test.d.ts +2 -0
- package/dist/src/lib/api/should-cron-job-run.test.d.ts.map +1 -0
- package/dist/src/lib/api/should-cron-job-run.test.js +213 -0
- package/dist/src/lib/config.d.ts +1 -0
- package/dist/src/lib/config.d.ts.map +1 -1
- package/dist/src/lib/config.js +7 -5
- package/dist/src/lib/ctrl-or-command-character.d.ts +2 -0
- package/dist/src/lib/ctrl-or-command-character.d.ts.map +1 -0
- package/dist/src/lib/ctrl-or-command-character.js +9 -0
- package/dist/src/lib/navigation.d.ts +1 -1
- package/dist/src/lib/navigation.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/admin-layout.js +1 -1
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/sidebar/nav/item.js +0 -3
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/sidebar/nav/nav.js +12 -1
- package/dist/src/views/admin/views/core/advanced/cron/cron-table-view.d.ts +5 -0
- package/dist/src/views/admin/views/core/advanced/cron/cron-table-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/advanced/cron/cron-table-view.js +97 -0
- package/dist/src/views/admin/views/core/advanced/cron/run-action/mutation-api.d.ts +4 -0
- package/dist/src/views/admin/views/core/advanced/cron/run-action/mutation-api.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/advanced/cron/run-action/mutation-api.js +23 -0
- package/dist/src/views/admin/views/core/advanced/cron/run-action/run-action.d.ts +4 -0
- package/dist/src/views/admin/views/core/advanced/cron/run-action/run-action.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/advanced/cron/run-action/run-action.js +37 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.js +11 -20
- package/dist/src/views/admin/views/core/test.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/test.js +116 -106
- package/dist/src/views/layouts/theme/header/header.js +1 -1
- package/dist/src/vitnode.config.d.ts +2 -0
- package/dist/src/vitnode.config.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +32 -26
- package/src/app_admin/core/advanced/cron/page.tsx +41 -0
- package/src/locales/en.json +43 -0
- package/src/tiptap.css +20 -0
- package/dist/src/components/switchers/langs/language-swietcher.d.ts.map +0 -1
- /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 @@
|
|
|
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;
|
|
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 {
|
|
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(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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":"
|
|
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__*/
|
|
44
|
+
children: /*#__PURE__*/ _jsxs(Card, {
|
|
43
45
|
className: "p-6",
|
|
44
|
-
children:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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
|
-
|
|
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-
|
|
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;
|
|
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;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,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,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QAC1C,YAAY,CAAC,EAAE,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;QAChD,OAAO,EAAE,UAAU,CAAC;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACvC,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,KAAK,CAAC,EAAE,IAAI,CACV,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,EAC1C,WAAW,GAAG,2BAA2B,GAAG,cAAc,CAC3D,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,EAAE;QACd,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,WAAW,CAAC,EAAE,YAAY,EAAE,CAAC;KAC9B,CAAC;IACF,OAAO,CAAC,EAAE;QACR,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;QAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;QAC5B,IAAI,EAAE,sBAAsB,GAAG,cAAc,CAAC;KAC/C,CAAC;IACF,UAAU,EAAE,kBAAkB,CAAC;IAC/B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,cAAc,CAAC;QACzB,IAAI,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;QAC1D,cAAc,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,CAAC,gBAAgB,CAAC,CAAC;KAC/E,CAAC;IACF,QAAQ,EAAE;QACR,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/D,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAChC,WAAW,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAC;CACtD;AAED,wBAAgB,WAAW,CAAC,UAAU,SAAS,YAAY,EAAE,EAC3D,IAAI,EAAE,aAAa,CAAC,UAAU,CAAC,GAC9B,aAAa,CAAC,UAAU,CAAC,CAQ3B;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAEvE;AAED,eAAO,MAAM,mBAAmB,GAAU,mDAIvC;IACD,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/D,aAAa,EAAE,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC3C,aAAa,EAAE,aAAa,CAAC;CAC9B;;;;;EAmCA,CAAC"}
|