@vitnode/blog 1.2.0-canary.77 → 2.0.0-canary.1
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/src/admin/content.d.ts +5 -0
- package/dist/src/admin/content.d.ts.map +1 -0
- package/dist/src/admin/content.js +1 -0
- package/dist/src/admin/nav.d.ts +41 -0
- package/dist/src/admin/nav.d.ts.map +1 -0
- package/dist/src/admin/nav.js +1 -0
- package/dist/src/api/lib/events.d.ts +11 -3
- package/dist/src/api/lib/events.d.ts.map +1 -1
- package/dist/src/api/lib/events.js +1 -1
- package/dist/src/api/modules/admin/admin.module.d.ts +1 -218
- package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -1
- package/dist/src/api/modules/admin/admin.module.js +1 -1
- package/dist/src/config.api.d.ts.map +1 -1
- package/dist/src/config.api.js +1 -1
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +1 -1
- package/dist/src/content/category.d.ts +5 -0
- package/dist/src/content/category.d.ts.map +1 -0
- package/dist/src/content/category.js +1 -0
- package/dist/src/content/post.d.ts +10 -0
- package/dist/src/content/post.d.ts.map +1 -0
- package/dist/src/content/post.js +1 -0
- package/dist/src/database/categories.d.ts +10 -77
- package/dist/src/database/categories.d.ts.map +1 -1
- package/dist/src/database/categories.js +1 -1
- package/dist/src/database/posts.d.ts +22 -92
- package/dist/src/database/posts.d.ts.map +1 -1
- package/dist/src/database/posts.js +1 -1
- package/dist/src/locales/en.json +50 -73
- package/dist/src/locales/index.d.ts.map +1 -1
- package/dist/src/locales/index.js +1 -1
- package/dist/src/locales/pl.json +69 -0
- package/dist/src/views/admin/article/editor-field.d.ts +4 -0
- package/dist/src/views/admin/article/editor-field.d.ts.map +1 -0
- package/dist/src/views/admin/article/editor-field.js +1 -0
- package/dist/src/views/admin/article/form-layout.d.ts +3 -0
- package/dist/src/views/admin/article/form-layout.d.ts.map +1 -0
- package/dist/src/views/admin/article/form-layout.js +1 -0
- package/dist/src/views/admin/category/color-cell.d.ts +4 -0
- package/dist/src/views/admin/category/color-cell.d.ts.map +1 -0
- package/dist/src/views/admin/category/color-cell.js +1 -0
- package/dist/src/views/admin/category/color-field.d.ts +3 -0
- package/dist/src/views/admin/category/color-field.d.ts.map +1 -0
- package/dist/src/views/admin/category/color-field.js +1 -0
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/package.json +16 -10
- package/src/locales/en.json +50 -73
- package/src/locales/index.ts +1 -0
- package/src/locales/pl.json +69 -0
- package/tsconfig.build.json +6 -1
- package/dist/src/api/lib/categories-language.d.ts +0 -10
- package/dist/src/api/lib/categories-language.d.ts.map +0 -1
- package/dist/src/api/lib/categories-language.js +0 -1
- package/dist/src/api/lib/posts-language.d.ts +0 -17
- package/dist/src/api/lib/posts-language.d.ts.map +0 -1
- package/dist/src/api/lib/posts-language.js +0 -1
- package/dist/src/api/lib/search.d.ts +0 -13
- package/dist/src/api/lib/search.d.ts.map +0 -1
- package/dist/src/api/lib/search.js +0 -1
- package/dist/src/api/modules/admin/categories/categories.admin.module.d.ts +0 -100
- package/dist/src/api/modules/admin/categories/categories.admin.module.d.ts.map +0 -1
- package/dist/src/api/modules/admin/categories/categories.admin.module.js +0 -1
- package/dist/src/api/modules/admin/categories/routes/create.route.d.ts +0 -47
- package/dist/src/api/modules/admin/categories/routes/create.route.d.ts.map +0 -1
- package/dist/src/api/modules/admin/categories/routes/create.route.js +0 -1
- package/dist/src/api/modules/admin/categories/routes/delete.route.d.ts +0 -21
- package/dist/src/api/modules/admin/categories/routes/delete.route.d.ts.map +0 -1
- package/dist/src/api/modules/admin/categories/routes/delete.route.js +0 -1
- package/dist/src/api/modules/admin/categories/routes/edit.route.d.ts +0 -46
- package/dist/src/api/modules/admin/categories/routes/edit.route.d.ts.map +0 -1
- package/dist/src/api/modules/admin/categories/routes/edit.route.js +0 -1
- package/dist/src/api/modules/admin/posts/posts.admin.module.d.ts +0 -121
- package/dist/src/api/modules/admin/posts/posts.admin.module.d.ts.map +0 -1
- package/dist/src/api/modules/admin/posts/posts.admin.module.js +0 -1
- package/dist/src/api/modules/admin/posts/routes/create.route.d.ts +0 -67
- package/dist/src/api/modules/admin/posts/routes/create.route.d.ts.map +0 -1
- package/dist/src/api/modules/admin/posts/routes/create.route.js +0 -1
- package/dist/src/api/modules/admin/posts/routes/delete.route.d.ts +0 -21
- package/dist/src/api/modules/admin/posts/routes/delete.route.d.ts.map +0 -1
- package/dist/src/api/modules/admin/posts/routes/delete.route.js +0 -1
- package/dist/src/api/modules/admin/posts/routes/edit.route.d.ts +0 -55
- package/dist/src/api/modules/admin/posts/routes/edit.route.d.ts.map +0 -1
- package/dist/src/api/modules/admin/posts/routes/edit.route.js +0 -1
- package/dist/src/api/modules/categories/categories.module.d.ts +0 -75
- package/dist/src/api/modules/categories/categories.module.d.ts.map +0 -1
- package/dist/src/api/modules/categories/categories.module.js +0 -1
- package/dist/src/api/modules/categories/routes/get.route.d.ts +0 -62
- package/dist/src/api/modules/categories/routes/get.route.d.ts.map +0 -1
- package/dist/src/api/modules/categories/routes/get.route.js +0 -1
- package/dist/src/api/modules/categories/test.route.d.ts +0 -27
- package/dist/src/api/modules/categories/test.route.d.ts.map +0 -1
- package/dist/src/api/modules/categories/test.route.js +0 -1
- package/dist/src/api/modules/posts/posts.module.d.ts +0 -73
- package/dist/src/api/modules/posts/posts.module.d.ts.map +0 -1
- package/dist/src/api/modules/posts/posts.module.js +0 -1
- package/dist/src/api/modules/posts/routes/get.route.d.ts +0 -105
- package/dist/src/api/modules/posts/routes/get.route.d.ts.map +0 -1
- package/dist/src/api/modules/posts/routes/get.route.js +0 -1
- package/dist/src/database/index.d.ts +0 -4
- package/dist/src/database/index.d.ts.map +0 -1
- package/dist/src/database/index.js +0 -1
- package/dist/src/database/relations.d.ts +0 -7
- package/dist/src/database/relations.d.ts.map +0 -1
- package/dist/src/database/relations.js +0 -1
- package/dist/src/routes/admin/blog/categories/page.d.ts +0 -9
- package/dist/src/routes/admin/blog/categories/page.d.ts.map +0 -1
- package/dist/src/routes/admin/blog/categories/page.js +0 -1
- package/dist/src/routes/admin/blog/posts/page.d.ts +0 -9
- package/dist/src/routes/admin/blog/posts/page.d.ts.map +0 -1
- package/dist/src/routes/admin/blog/posts/page.js +0 -1
- package/dist/src/routes/breadcrumb/admin/blog/categories/page.d.ts +0 -2
- package/dist/src/routes/breadcrumb/admin/blog/categories/page.d.ts.map +0 -1
- package/dist/src/routes/breadcrumb/admin/blog/categories/page.js +0 -1
- package/dist/src/routes/breadcrumb/admin/blog/posts/page.d.ts +0 -2
- package/dist/src/routes/breadcrumb/admin/blog/posts/page.d.ts.map +0 -1
- package/dist/src/routes/breadcrumb/admin/blog/posts/page.js +0 -1
- package/dist/src/views/admin/categories/actions/actions.d.ts +0 -3
- package/dist/src/views/admin/categories/actions/actions.d.ts.map +0 -1
- package/dist/src/views/admin/categories/actions/actions.js +0 -1
- package/dist/src/views/admin/categories/actions/create-edit/create-edit.d.ts +0 -8
- package/dist/src/views/admin/categories/actions/create-edit/create-edit.d.ts.map +0 -1
- package/dist/src/views/admin/categories/actions/create-edit/create-edit.js +0 -1
- package/dist/src/views/admin/categories/actions/create-edit/mutation-api.server.d.ts +0 -11
- package/dist/src/views/admin/categories/actions/create-edit/mutation-api.server.d.ts.map +0 -1
- package/dist/src/views/admin/categories/actions/create-edit/mutation-api.server.js +0 -1
- package/dist/src/views/admin/categories/table/actions/delete/delete-action.d.ts +0 -5
- package/dist/src/views/admin/categories/table/actions/delete/delete-action.d.ts.map +0 -1
- package/dist/src/views/admin/categories/table/actions/delete/delete-action.js +0 -1
- package/dist/src/views/admin/categories/table/actions/delete/mutation-api.server.d.ts +0 -4
- package/dist/src/views/admin/categories/table/actions/delete/mutation-api.server.d.ts.map +0 -1
- package/dist/src/views/admin/categories/table/actions/delete/mutation-api.server.js +0 -1
- package/dist/src/views/admin/categories/table/actions/edit-action.d.ts +0 -9
- package/dist/src/views/admin/categories/table/actions/edit-action.d.ts.map +0 -1
- package/dist/src/views/admin/categories/table/actions/edit-action.js +0 -1
- package/dist/src/views/admin/categories/table/categories-admin-view.d.ts +0 -4
- package/dist/src/views/admin/categories/table/categories-admin-view.d.ts.map +0 -1
- package/dist/src/views/admin/categories/table/categories-admin-view.js +0 -1
- package/dist/src/views/admin/posts/actions/actions.d.ts +0 -3
- package/dist/src/views/admin/posts/actions/actions.d.ts.map +0 -1
- package/dist/src/views/admin/posts/actions/actions.js +0 -1
- package/dist/src/views/admin/posts/actions/create-edit/create-edit.d.ts +0 -9
- package/dist/src/views/admin/posts/actions/create-edit/create-edit.d.ts.map +0 -1
- package/dist/src/views/admin/posts/actions/create-edit/create-edit.js +0 -1
- package/dist/src/views/admin/posts/actions/create-edit/multi-lang-fields.d.ts +0 -10
- package/dist/src/views/admin/posts/actions/create-edit/multi-lang-fields.d.ts.map +0 -1
- package/dist/src/views/admin/posts/actions/create-edit/multi-lang-fields.js +0 -1
- package/dist/src/views/admin/posts/actions/create-edit/mutation-api.server.d.ts +0 -11
- package/dist/src/views/admin/posts/actions/create-edit/mutation-api.server.d.ts.map +0 -1
- package/dist/src/views/admin/posts/actions/create-edit/mutation-api.server.js +0 -1
- package/dist/src/views/admin/posts/table/actions/delete/delete-action.d.ts +0 -5
- package/dist/src/views/admin/posts/table/actions/delete/delete-action.d.ts.map +0 -1
- package/dist/src/views/admin/posts/table/actions/delete/delete-action.js +0 -1
- package/dist/src/views/admin/posts/table/actions/delete/mutation-api.server.d.ts +0 -4
- package/dist/src/views/admin/posts/table/actions/delete/mutation-api.server.d.ts.map +0 -1
- package/dist/src/views/admin/posts/table/actions/delete/mutation-api.server.js +0 -1
- package/dist/src/views/admin/posts/table/actions/edit-action.d.ts +0 -9
- package/dist/src/views/admin/posts/table/actions/edit-action.d.ts.map +0 -1
- package/dist/src/views/admin/posts/table/actions/edit-action.js +0 -1
- package/dist/src/views/admin/posts/table/posts-admin-view.d.ts +0 -4
- package/dist/src/views/admin/posts/table/posts-admin-view.d.ts.map +0 -1
- package/dist/src/views/admin/posts/table/posts-admin-view.js +0 -1
- package/src/routes/admin/blog/categories/page.tsx +0 -64
- package/src/routes/admin/blog/posts/page.tsx +0 -64
- package/src/routes/breadcrumb/admin/blog/categories/page.tsx +0 -5
- package/src/routes/breadcrumb/admin/blog/posts/page.tsx +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/admin/content.tsx"],"names":[],"mappings":"AA8CA,eAAO,MAAM,YAAY;;;CAyBc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{contentTypeAdmin}from"@vitnode/core/lib/plugin";import{CONFIG_PLUGIN}from"../const.js";import{BlogArticleEditorField}from"../views/admin/article/editor-field.js";import{BlogArticleFormLayout}from"../views/admin/article/form-layout.js";import{BlogCategoryColorCell}from"../views/admin/category/color-cell.js";import{BlogCategoryColorField}from"../views/admin/category/color-field.js";import{blogCategoryNav,blogPostNav}from"./nav.js";export const adminContent={pluginId:CONFIG_PLUGIN.pluginId,contentTypes:[contentTypeAdmin({...blogPostNav,fields:{content:{component:BlogArticleEditorField}},forms:{layout:BlogArticleFormLayout}}),contentTypeAdmin({...blogCategoryNav,fields:{color:{component:BlogCategoryColorField}},columns:{color:{cell:BlogCategoryColorCell}}})]};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const blogPostNav: {
|
|
2
|
+
definition: import("@vitnode/core/content").ContentTypeDefinition<"blog.post", {
|
|
3
|
+
categoryId: import("@vitnode/core/content").ContentRelationField<false, false, true, false, false>;
|
|
4
|
+
authorId: import("@vitnode/core/content").ContentUserField<false, false, true, true>;
|
|
5
|
+
title: import("@vitnode/core/content").ContentTextField<true, false, undefined, true>;
|
|
6
|
+
friendlyUrl: import("@vitnode/core/content").ContentSlugField<"title", true>;
|
|
7
|
+
content: import("@vitnode/core/content").ContentTextareaField<true, false, undefined, true>;
|
|
8
|
+
coverImage: import("@vitnode/core/content/types").ContentFileField<false, true, false, false>;
|
|
9
|
+
coverImageAlt: import("@vitnode/core/content").ContentTextField<false, true, undefined, true>;
|
|
10
|
+
}, true, "id" | "publishedAt" | "categoryId" | "title" | "friendlyUrl" | "content" | "coverImage" | "coverImageAlt", true, true, true, true, true, true, true>;
|
|
11
|
+
icon: import("react").JSX.Element;
|
|
12
|
+
};
|
|
13
|
+
export declare const blogCategoryNav: {
|
|
14
|
+
definition: import("@vitnode/core/content").ContentTypeDefinition<"blog.category", {
|
|
15
|
+
name: import("@vitnode/core/content").ContentTextField<true, false, undefined, true>;
|
|
16
|
+
color: import("@vitnode/core/content").ContentTextField<false, true, undefined, false>;
|
|
17
|
+
}, false, never, false, false, false, false, false, true, false>;
|
|
18
|
+
icon: import("react").JSX.Element;
|
|
19
|
+
};
|
|
20
|
+
export declare const adminNav: {
|
|
21
|
+
pluginId: "@vitnode/blog";
|
|
22
|
+
contentTypes: ({
|
|
23
|
+
definition: import("@vitnode/core/content").ContentTypeDefinition<"blog.post", {
|
|
24
|
+
categoryId: import("@vitnode/core/content").ContentRelationField<false, false, true, false, false>;
|
|
25
|
+
authorId: import("@vitnode/core/content").ContentUserField<false, false, true, true>;
|
|
26
|
+
title: import("@vitnode/core/content").ContentTextField<true, false, undefined, true>;
|
|
27
|
+
friendlyUrl: import("@vitnode/core/content").ContentSlugField<"title", true>;
|
|
28
|
+
content: import("@vitnode/core/content").ContentTextareaField<true, false, undefined, true>;
|
|
29
|
+
coverImage: import("@vitnode/core/content/types").ContentFileField<false, true, false, false>;
|
|
30
|
+
coverImageAlt: import("@vitnode/core/content").ContentTextField<false, true, undefined, true>;
|
|
31
|
+
}, true, "id" | "publishedAt" | "categoryId" | "title" | "friendlyUrl" | "content" | "coverImage" | "coverImageAlt", true, true, true, true, true, true, true>;
|
|
32
|
+
icon: import("react").JSX.Element;
|
|
33
|
+
} | {
|
|
34
|
+
definition: import("@vitnode/core/content").ContentTypeDefinition<"blog.category", {
|
|
35
|
+
name: import("@vitnode/core/content").ContentTextField<true, false, undefined, true>;
|
|
36
|
+
color: import("@vitnode/core/content").ContentTextField<false, true, undefined, false>;
|
|
37
|
+
}, false, never, false, false, false, false, false, true, false>;
|
|
38
|
+
icon: import("react").JSX.Element;
|
|
39
|
+
})[];
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=nav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav.d.ts","sourceRoot":"","sources":["../../../src/admin/nav.tsx"],"names":[],"mappings":"AAsCA,eAAO,MAAM,WAAW;;;;;;;;;;;CAGvB,CAAC;AAGF,eAAO,MAAM,eAAe;;;;;;CAG3B,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;CAGW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as _jsx}from"react/jsx-runtime";import{ListIcon,NotebookPenIcon}from"lucide-react";import{CONFIG_PLUGIN}from"../const.js";import{blogCategoryContentType}from"../content/category.js";import{blogPostContentType}from"../content/post.js";export const blogPostNav={definition:blogPostContentType,icon:_jsx(NotebookPenIcon,{})};export const blogCategoryNav={definition:blogCategoryContentType,icon:_jsx(ListIcon,{})};export const adminNav={pluginId:CONFIG_PLUGIN.pluginId,contentTypes:[blogPostNav,blogCategoryNav]};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import type { ContentEventsFor } from "@vitnode/core/content";
|
|
2
|
+
import type { blogCategoryContentType } from "../../content/category";
|
|
3
|
+
import { blogPostContentType } from "../../content/post";
|
|
1
4
|
declare module "@vitnode/core/api/models/events" {
|
|
2
|
-
interface VitNodeEvents {
|
|
5
|
+
interface VitNodeEvents extends ContentEventsFor<typeof blogCategoryContentType>, ContentEventsFor<typeof blogPostContentType> {
|
|
3
6
|
"blog.category.created": {
|
|
4
7
|
categoryId: number;
|
|
5
8
|
};
|
|
@@ -15,7 +18,6 @@ declare module "@vitnode/core/api/models/events" {
|
|
|
15
18
|
postId: number;
|
|
16
19
|
};
|
|
17
20
|
"blog.post.deleted": {
|
|
18
|
-
categoryId: number;
|
|
19
21
|
postId: number;
|
|
20
22
|
};
|
|
21
23
|
"blog.post.updated": {
|
|
@@ -24,5 +26,11 @@ declare module "@vitnode/core/api/models/events" {
|
|
|
24
26
|
};
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
|
-
export declare const
|
|
29
|
+
export declare const legacyPostCreatedListener: import("@vitnode/core/api/lib/events").BuildEventListenerReturn<keyof import("@vitnode/core/api/models/events").VitNodeEvents>;
|
|
30
|
+
export declare const legacyPostUpdatedListener: import("@vitnode/core/api/lib/events").BuildEventListenerReturn<keyof import("@vitnode/core/api/models/events").VitNodeEvents>;
|
|
31
|
+
export declare const legacyPostDeletedListener: import("@vitnode/core/api/lib/events").BuildEventListenerReturn<keyof import("@vitnode/core/api/models/events").VitNodeEvents>;
|
|
32
|
+
export declare const legacyCategoryCreatedListener: import("@vitnode/core/api/lib/events").BuildEventListenerReturn<keyof import("@vitnode/core/api/models/events").VitNodeEvents>;
|
|
33
|
+
export declare const legacyCategoryUpdatedListener: import("@vitnode/core/api/lib/events").BuildEventListenerReturn<keyof import("@vitnode/core/api/models/events").VitNodeEvents>;
|
|
34
|
+
export declare const legacyCategoryDeletedListener: import("@vitnode/core/api/lib/events").BuildEventListenerReturn<keyof import("@vitnode/core/api/models/events").VitNodeEvents>;
|
|
35
|
+
export declare const blogLegacyEventListeners: import("@vitnode/core/api/lib/events").BuildEventListenerReturn<keyof import("@vitnode/core/api/models/events").VitNodeEvents>[];
|
|
28
36
|
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/api/lib/events.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/api/lib/events.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAM9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAElE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAgBrD,OAAO,QAAQ,iCAAiC,CAAC;IAC/C,UAAU,aACR,SACE,gBAAgB,CAAC,OAAO,uBAAuB,CAAC,EAChD,gBAAgB,CAAC,OAAO,mBAAmB,CAAC;QAC9C,uBAAuB,EAAE;YACvB,UAAU,EAAE,MAAM,CAAC;SACpB,CAAC;QACF,uBAAuB,EAAE;YACvB,UAAU,EAAE,MAAM,CAAC;YASnB,OAAO,EAAE,MAAM,EAAE,CAAC;SACnB,CAAC;QACF,uBAAuB,EAAE;YACvB,UAAU,EAAE,MAAM,CAAC;SACpB,CAAC;QACF,mBAAmB,EAAE;YAUnB,UAAU,EAAE,MAAM,CAAC;YACnB,MAAM,EAAE,MAAM,CAAC;SAChB,CAAC;QASF,mBAAmB,EAAE;YACnB,MAAM,EAAE,MAAM,CAAC;SAChB,CAAC;QACF,mBAAmB,EAAE;YACnB,UAAU,EAAE,MAAM,CAAC;YACnB,MAAM,EAAE,MAAM,CAAC;SAChB,CAAC;KACH;CACF;AAqBD,eAAO,MAAM,yBAAyB,gIAapC,CAAC;AAEH,eAAO,MAAM,yBAAyB,gIAapC,CAAC;AAEH,eAAO,MAAM,yBAAyB,gIASpC,CAAC;AAEH,eAAO,MAAM,6BAA6B,gIASxC,CAAC;AAEH,eAAO,MAAM,6BAA6B,gIASxC,CAAC;AAEH,eAAO,MAAM,6BAA6B,gIAYxC,CAAC;AAEH,eAAO,MAAM,wBAAwB,kIAOpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buildEventListener}from"@vitnode/core/api/lib/events";export const
|
|
1
|
+
import{buildEventListener}from"@vitnode/core/api/lib/events";import{contentEventName}from"@vitnode/core/content";import{blogPostContentType}from"../../content/post.js";import{postContent}from"../../database/posts.js";const POST=blogPostContentType.id;const CATEGORY="blog.category";const categoryOf=async(c,postId)=>{const[first]=await postContent.service(c).relations.categoryId.get(postId);return first??null};export const legacyPostCreatedListener=buildEventListener({event:contentEventName(POST,"created"),name:"legacy-blog-post-created",description:"Re-emits the blog's own blog.post.created event",handler:async(c,payload)=>{const categoryId=await categoryOf(c,payload.contentId);if(categoryId===null)return;await c.get("events").emit("blog.post.created",{categoryId,postId:payload.contentId})}});export const legacyPostUpdatedListener=buildEventListener({event:contentEventName(POST,"updated"),name:"legacy-blog-post-updated",description:"Re-emits the blog's own blog.post.updated event",handler:async(c,payload)=>{const categoryId=await categoryOf(c,payload.contentId);if(categoryId===null)return;await c.get("events").emit("blog.post.updated",{categoryId,postId:payload.contentId})}});export const legacyPostDeletedListener=buildEventListener({event:contentEventName(POST,"deleted"),name:"legacy-blog-post-deleted",description:"Re-emits the blog's own blog.post.deleted event",handler:async(c,payload)=>{await c.get("events").emit("blog.post.deleted",{postId:payload.contentId})}});export const legacyCategoryCreatedListener=buildEventListener({event:contentEventName(CATEGORY,"created"),name:"legacy-blog-category-created",description:"Re-emits the blog's own blog.category.created event",handler:async(c,payload)=>{await c.get("events").emit("blog.category.created",{categoryId:payload.contentId})}});export const legacyCategoryUpdatedListener=buildEventListener({event:contentEventName(CATEGORY,"updated"),name:"legacy-blog-category-updated",description:"Re-emits the blog's own blog.category.updated event",handler:async(c,payload)=>{await c.get("events").emit("blog.category.updated",{categoryId:payload.contentId})}});export const legacyCategoryDeletedListener=buildEventListener({event:contentEventName(CATEGORY,"deleted"),name:"legacy-blog-category-deleted",description:"Re-emits the blog's own blog.category.deleted event",handler:async(c,payload)=>{await c.get("events").emit("blog.category.deleted",{categoryId:payload.contentId,postIds:[]})}});export const blogLegacyEventListeners=[legacyCategoryCreatedListener,legacyCategoryDeletedListener,legacyCategoryUpdatedListener,legacyPostCreatedListener,legacyPostDeletedListener,legacyPostUpdatedListener];
|
|
@@ -1,219 +1,2 @@
|
|
|
1
|
-
export declare const adminModule: import("@vitnode/core/api/lib/module").BuildModuleReturn<"@vitnode/blog", "admin", [],
|
|
2
|
-
method: "post";
|
|
3
|
-
path: "/";
|
|
4
|
-
request: {
|
|
5
|
-
body: {
|
|
6
|
-
content: {
|
|
7
|
-
"application/json": {
|
|
8
|
-
schema: import("zod").ZodObject<{
|
|
9
|
-
title: import("zod").ZodArray<import("zod").ZodObject<{
|
|
10
|
-
languageCode: import("zod").ZodString;
|
|
11
|
-
value: import("zod").ZodString;
|
|
12
|
-
}, import("zod/v4/core").$strip>>;
|
|
13
|
-
color: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
14
|
-
}, import("zod/v4/core").$strip>;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
responses: {
|
|
20
|
-
201: {
|
|
21
|
-
content: {
|
|
22
|
-
"application/json": {
|
|
23
|
-
schema: import("zod").ZodObject<{
|
|
24
|
-
id: import("zod").ZodNumber;
|
|
25
|
-
createdAt: import("zod").ZodDate;
|
|
26
|
-
updatedAt: import("zod").ZodDate;
|
|
27
|
-
}, import("zod/v4/core").$strip>;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
description: string;
|
|
31
|
-
};
|
|
32
|
-
400: {
|
|
33
|
-
description: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
} & {
|
|
37
|
-
path: string;
|
|
38
|
-
}>, import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", {
|
|
39
|
-
method: "put";
|
|
40
|
-
path: "/{id}";
|
|
41
|
-
request: {
|
|
42
|
-
params: import("zod").ZodObject<{
|
|
43
|
-
id: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<number, string>>;
|
|
44
|
-
}, import("zod/v4/core").$strip>;
|
|
45
|
-
body: {
|
|
46
|
-
content: {
|
|
47
|
-
"application/json": {
|
|
48
|
-
schema: import("zod").ZodObject<{
|
|
49
|
-
title: import("zod").ZodArray<import("zod").ZodObject<{
|
|
50
|
-
languageCode: import("zod").ZodString;
|
|
51
|
-
value: import("zod").ZodString;
|
|
52
|
-
}, import("zod/v4/core").$strip>>;
|
|
53
|
-
color: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
54
|
-
}, import("zod/v4/core").$strip>;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
responses: {
|
|
60
|
-
200: {
|
|
61
|
-
content: {
|
|
62
|
-
"application/json": {
|
|
63
|
-
schema: import("zod").ZodObject<{
|
|
64
|
-
id: import("zod").ZodNumber;
|
|
65
|
-
createdAt: import("zod").ZodDate;
|
|
66
|
-
updatedAt: import("zod").ZodDate;
|
|
67
|
-
}, import("zod/v4/core").$strip>;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
description: string;
|
|
71
|
-
};
|
|
72
|
-
400: {
|
|
73
|
-
description: string;
|
|
74
|
-
};
|
|
75
|
-
404: {
|
|
76
|
-
description: string;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
} & {
|
|
80
|
-
path: string;
|
|
81
|
-
}>, import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", {
|
|
82
|
-
method: "delete";
|
|
83
|
-
path: "/{id}";
|
|
84
|
-
request: {
|
|
85
|
-
params: import("zod").ZodObject<{
|
|
86
|
-
id: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<number, string>>;
|
|
87
|
-
}, import("zod/v4/core").$strip>;
|
|
88
|
-
};
|
|
89
|
-
responses: {
|
|
90
|
-
204: {
|
|
91
|
-
description: string;
|
|
92
|
-
};
|
|
93
|
-
404: {
|
|
94
|
-
description: string;
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
} & {
|
|
98
|
-
path: string;
|
|
99
|
-
}>], import("@vitnode/core/api/lib/module").BaseBuildModuleReturn<"@vitnode/blog", string, import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", import("@hono/zod-openapi").RouteConfig>[]>[]> | import("@vitnode/core/api/lib/module").BuildModuleReturn<"@vitnode/blog", "posts", [import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", {
|
|
100
|
-
method: "put";
|
|
101
|
-
path: "/{id}";
|
|
102
|
-
request: {
|
|
103
|
-
params: import("zod").ZodObject<{
|
|
104
|
-
id: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<number, string>>;
|
|
105
|
-
}, import("zod/v4/core").$strip>;
|
|
106
|
-
body: {
|
|
107
|
-
content: {
|
|
108
|
-
"application/json": {
|
|
109
|
-
schema: import("zod").ZodObject<{
|
|
110
|
-
title: import("zod").ZodArray<import("zod").ZodObject<{
|
|
111
|
-
languageCode: import("zod").ZodString;
|
|
112
|
-
value: import("zod").ZodString;
|
|
113
|
-
}, import("zod/v4/core").$strip>>;
|
|
114
|
-
content: import("zod").ZodArray<import("zod").ZodObject<{
|
|
115
|
-
languageCode: import("zod").ZodString;
|
|
116
|
-
value: import("zod").ZodString;
|
|
117
|
-
}, import("zod/v4/core").$strip>>;
|
|
118
|
-
friendlyUrl: import("zod").ZodArray<import("zod").ZodObject<{
|
|
119
|
-
languageCode: import("zod").ZodString;
|
|
120
|
-
value: import("zod").ZodString;
|
|
121
|
-
}, import("zod/v4/core").$strip>>;
|
|
122
|
-
categoryId: import("zod").ZodNumber;
|
|
123
|
-
}, import("zod/v4/core").$strip>;
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
responses: {
|
|
129
|
-
200: {
|
|
130
|
-
content: {
|
|
131
|
-
"application/json": {
|
|
132
|
-
schema: import("zod").ZodObject<{
|
|
133
|
-
id: import("zod").ZodNumber;
|
|
134
|
-
categoryId: import("zod").ZodNumber;
|
|
135
|
-
createdAt: import("zod").ZodDate;
|
|
136
|
-
updatedAt: import("zod").ZodDate;
|
|
137
|
-
}, import("zod/v4/core").$strip>;
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
description: string;
|
|
141
|
-
};
|
|
142
|
-
400: {
|
|
143
|
-
description: string;
|
|
144
|
-
};
|
|
145
|
-
404: {
|
|
146
|
-
description: string;
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
|
-
} & {
|
|
150
|
-
path: string;
|
|
151
|
-
}>, import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", {
|
|
152
|
-
method: "post";
|
|
153
|
-
path: "/";
|
|
154
|
-
request: {
|
|
155
|
-
body: {
|
|
156
|
-
content: {
|
|
157
|
-
"application/json": {
|
|
158
|
-
schema: import("zod").ZodObject<{
|
|
159
|
-
title: import("zod").ZodArray<import("zod").ZodObject<{
|
|
160
|
-
languageCode: import("zod").ZodString;
|
|
161
|
-
value: import("zod").ZodString;
|
|
162
|
-
}, import("zod/v4/core").$strip>>;
|
|
163
|
-
content: import("zod").ZodArray<import("zod").ZodObject<{
|
|
164
|
-
languageCode: import("zod").ZodString;
|
|
165
|
-
value: import("zod").ZodString;
|
|
166
|
-
}, import("zod/v4/core").$strip>>;
|
|
167
|
-
friendlyUrl: import("zod").ZodArray<import("zod").ZodObject<{
|
|
168
|
-
languageCode: import("zod").ZodString;
|
|
169
|
-
value: import("zod").ZodString;
|
|
170
|
-
}, import("zod/v4/core").$strip>>;
|
|
171
|
-
categoryId: import("zod").ZodNumber;
|
|
172
|
-
}, import("zod/v4/core").$strip>;
|
|
173
|
-
};
|
|
174
|
-
};
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
responses: {
|
|
178
|
-
201: {
|
|
179
|
-
content: {
|
|
180
|
-
"application/json": {
|
|
181
|
-
schema: import("zod").ZodObject<{
|
|
182
|
-
id: import("zod").ZodNumber;
|
|
183
|
-
categoryId: import("zod").ZodNumber;
|
|
184
|
-
createdAt: import("zod").ZodDate;
|
|
185
|
-
updatedAt: import("zod").ZodDate;
|
|
186
|
-
}, import("zod/v4/core").$strip>;
|
|
187
|
-
};
|
|
188
|
-
};
|
|
189
|
-
description: string;
|
|
190
|
-
};
|
|
191
|
-
400: {
|
|
192
|
-
description: string;
|
|
193
|
-
};
|
|
194
|
-
404: {
|
|
195
|
-
description: string;
|
|
196
|
-
};
|
|
197
|
-
};
|
|
198
|
-
} & {
|
|
199
|
-
path: string;
|
|
200
|
-
}>, import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", {
|
|
201
|
-
method: "delete";
|
|
202
|
-
path: "/{id}";
|
|
203
|
-
request: {
|
|
204
|
-
params: import("zod").ZodObject<{
|
|
205
|
-
id: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<number, string>>;
|
|
206
|
-
}, import("zod/v4/core").$strip>;
|
|
207
|
-
};
|
|
208
|
-
responses: {
|
|
209
|
-
204: {
|
|
210
|
-
description: string;
|
|
211
|
-
};
|
|
212
|
-
404: {
|
|
213
|
-
description: string;
|
|
214
|
-
};
|
|
215
|
-
};
|
|
216
|
-
} & {
|
|
217
|
-
path: string;
|
|
218
|
-
}>], import("@vitnode/core/api/lib/module").BaseBuildModuleReturn<"@vitnode/blog", string, import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", import("@hono/zod-openapi").RouteConfig>[]>[]>)[]>;
|
|
1
|
+
export declare const adminModule: import("@vitnode/core/api/lib/module").BuildModuleReturn<"@vitnode/blog", "admin", [], import("@vitnode/core/api/lib/module").BuildModuleReturn<"@vitnode/blog", "content", import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", import("@hono/zod-openapi").RouteConfig>[], import("@vitnode/core/api/lib/module").BaseBuildModuleReturn<"@vitnode/blog", string, import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", import("@hono/zod-openapi").RouteConfig>[]>[]>[]>;
|
|
219
2
|
//# sourceMappingURL=admin.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/admin/admin.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/admin/admin.module.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,WAAW,2dAatB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buildModule}from"@vitnode/core/api/lib/module";import{
|
|
1
|
+
import{buildModule}from"@vitnode/core/api/lib/module";import{buildContentAdminModule}from"@vitnode/core/content/server";import{blogLegacyEventListeners}from"../../lib/events.js";import{CONFIG_PLUGIN}from"../../../const.js";import{categoryContent}from"../../../database/categories.js";import{postContent}from"../../../database/posts.js";export const adminModule=buildModule({pluginId:CONFIG_PLUGIN.pluginId,name:"admin",routes:[],modules:[buildContentAdminModule({pluginId:CONFIG_PLUGIN.pluginId,contentTypes:[categoryContent,postContent]})],events:blogLegacyEventListeners});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.api.d.ts","sourceRoot":"","sources":["../../src/config.api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.api.d.ts","sourceRoot":"","sources":["../../src/config.api.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,aAAa,mEAYtB,CAAC"}
|
package/dist/src/config.api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buildApiPlugin}from"@vitnode/core/api/lib/plugin";import{
|
|
1
|
+
import{buildApiPlugin}from"@vitnode/core/api/lib/plugin";import{buildContentPublicModule}from"@vitnode/core/content/server";import{adminModule}from"./api/modules/admin/admin.module.js";import{CONFIG_PLUGIN}from"./const.js";import{categoryContent}from"./database/categories.js";import{postContent}from"./database/posts.js";export const blogApiPlugin=()=>buildApiPlugin({pluginId:CONFIG_PLUGIN.pluginId,modules:[adminModule,buildContentPublicModule({pluginId:CONFIG_PLUGIN.pluginId,contentTypes:[categoryContent,postContent]})]});
|
package/dist/src/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.tsx"],"names":[],"mappings":"AA0BA,eAAO,MAAM,UAAU,6EAInB,CAAC"}
|
package/dist/src/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{buildPlugin}from"@vitnode/core/lib/plugin";import{adminContent}from"./admin/content.js";import messages from"./locales/index.js";export const blogPlugin=()=>buildPlugin({...adminContent,messages});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const blogCategoryContentType: import("@vitnode/core/content").ContentTypeDefinition<"blog.category", {
|
|
2
|
+
name: import("@vitnode/core/content").ContentTextField<true, false, undefined, true>;
|
|
3
|
+
color: import("@vitnode/core/content").ContentTextField<false, true, undefined, false>;
|
|
4
|
+
}, false, never, false, false, false, false, false, true, false>;
|
|
5
|
+
//# sourceMappingURL=category.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../../src/content/category.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,uBAAuB;;;gEAwClC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineContentType,field}from"@vitnode/core/content";export const blogCategoryContentType=defineContentType({id:"blog.category",tableName:"blog_categories",localization:{enabled:true,defaultLocale:"en",fallback:"default"},fields:{name:field.text({localized:true,required:true,minLength:1,maxLength:100}),color:field.text({maxLength:50,nullable:true})},admin:{permissionModule:"categories",path:"blog/categories",colorField:"color",titleField:"name",create:{mode:"dialog"},edit:{mode:"dialog"},list:{columns:["name","color","updatedAt"]}}});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const blogPostContentType: import("@vitnode/core/content").ContentTypeDefinition<"blog.post", {
|
|
2
|
+
categoryId: import("@vitnode/core/content").ContentRelationField<false, false, true, false, false>;
|
|
3
|
+
authorId: import("@vitnode/core/content").ContentUserField<false, false, true, true>;
|
|
4
|
+
title: import("@vitnode/core/content").ContentTextField<true, false, undefined, true>;
|
|
5
|
+
friendlyUrl: import("@vitnode/core/content").ContentSlugField<"title", true>;
|
|
6
|
+
content: import("@vitnode/core/content").ContentTextareaField<true, false, undefined, true>;
|
|
7
|
+
coverImage: import("@vitnode/core/content/types").ContentFileField<false, true, false, false>;
|
|
8
|
+
coverImageAlt: import("@vitnode/core/content").ContentTextField<false, true, undefined, true>;
|
|
9
|
+
}, true, "id" | "publishedAt" | "categoryId" | "title" | "friendlyUrl" | "content" | "coverImage" | "coverImageAlt", true, true, true, true, true, true, true>;
|
|
10
|
+
//# sourceMappingURL=post.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post.d.ts","sourceRoot":"","sources":["../../../src/content/post.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,mBAAmB;;;;;;;;8JAoP9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineContentType,field}from"@vitnode/core/content";import{blogCategoryContentType}from"./category.js";export const blogPostContentType=defineContentType({id:"blog.post",tableName:"blog_posts",localization:{enabled:true,defaultLocale:"en",fallback:"default"},publication:{enabled:true},editorial:{enabled:true,revisions:{retention:20},preview:{enabled:true,expiresInMinutes:30},scheduling:{enabled:true}},fields:{categoryId:field.relation({min:1,multiple:true,onDelete:"restrict",target:()=>blogCategoryContentType}),authorId:field.user({min:1,multiple:true,ordered:true}),title:field.text({localized:true,required:true,minLength:3,maxLength:255}),friendlyUrl:field.slug({localized:true,maxLength:255,source:"title"}),content:field.textarea({localized:true,required:true}),coverImage:field.file({maxBytes:5*1024*1024,allowedExtensions:[".jpg",".jpeg",".png",".webp",".avif"],allowedMimeTypes:["image/jpeg","image/png","image/webp","image/avif"]}),coverImageAlt:field.text({localized:true,nullable:true,maxLength:255})},publicApi:{enabled:true,path:"blog",fields:["id","title","friendlyUrl","content","categoryId","coverImage","coverImageAlt","publishedAt"],searchableFields:["title","content"],orderableFields:["publishedAt"],filterableFields:["categoryId","friendlyUrl"],defaultOrderBy:"publishedAt",defaultOrder:"desc"},search:{enabled:true,titleField:"title",contentFields:["title","content"],pathTemplate:"/{locale}/blog/{slug}"},delivery:{enabled:true,redirects:{enabled:true},seo:{titleField:"title",descriptionField:"content"},sitemap:{enabled:true,changeFrequency:"weekly",priority:.7},hreflang:{xDefault:"defaultLocale"}},indexes:[{on:["status","createdAt"]}],admin:{permissionModule:"posts",path:"blog/articles",titleField:"title",create:{mode:"page"},edit:{mode:"page"},list:{columns:["title","coverImage","status","publishedAt","updatedAt"]}}});
|
|
@@ -1,78 +1,11 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
name: "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
driverParam: number;
|
|
12
|
-
notNull: true;
|
|
13
|
-
hasDefault: true;
|
|
14
|
-
isPrimaryKey: true;
|
|
15
|
-
isAutoincrement: false;
|
|
16
|
-
hasRuntimeDefault: false;
|
|
17
|
-
enumValues: undefined;
|
|
18
|
-
baseColumn: never;
|
|
19
|
-
identity: undefined;
|
|
20
|
-
generated: undefined;
|
|
21
|
-
}, {}, {}>;
|
|
22
|
-
color: import("drizzle-orm/pg-core").PgColumn<{
|
|
23
|
-
name: "color";
|
|
24
|
-
tableName: "blog_categories";
|
|
25
|
-
dataType: "string";
|
|
26
|
-
columnType: "PgVarchar";
|
|
27
|
-
data: string;
|
|
28
|
-
driverParam: string;
|
|
29
|
-
notNull: false;
|
|
30
|
-
hasDefault: false;
|
|
31
|
-
isPrimaryKey: false;
|
|
32
|
-
isAutoincrement: false;
|
|
33
|
-
hasRuntimeDefault: false;
|
|
34
|
-
enumValues: [string, ...string[]];
|
|
35
|
-
baseColumn: never;
|
|
36
|
-
identity: undefined;
|
|
37
|
-
generated: undefined;
|
|
38
|
-
}, {}, {
|
|
39
|
-
length: 50;
|
|
40
|
-
}>;
|
|
41
|
-
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
42
|
-
name: "createdAt";
|
|
43
|
-
tableName: "blog_categories";
|
|
44
|
-
dataType: "date";
|
|
45
|
-
columnType: "PgTimestamp";
|
|
46
|
-
data: Date;
|
|
47
|
-
driverParam: string;
|
|
48
|
-
notNull: true;
|
|
49
|
-
hasDefault: true;
|
|
50
|
-
isPrimaryKey: false;
|
|
51
|
-
isAutoincrement: false;
|
|
52
|
-
hasRuntimeDefault: false;
|
|
53
|
-
enumValues: undefined;
|
|
54
|
-
baseColumn: never;
|
|
55
|
-
identity: undefined;
|
|
56
|
-
generated: undefined;
|
|
57
|
-
}, {}, {}>;
|
|
58
|
-
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
59
|
-
name: "updatedAt";
|
|
60
|
-
tableName: "blog_categories";
|
|
61
|
-
dataType: "date";
|
|
62
|
-
columnType: "PgTimestamp";
|
|
63
|
-
data: Date;
|
|
64
|
-
driverParam: string;
|
|
65
|
-
notNull: true;
|
|
66
|
-
hasDefault: true;
|
|
67
|
-
isPrimaryKey: false;
|
|
68
|
-
isAutoincrement: false;
|
|
69
|
-
hasRuntimeDefault: false;
|
|
70
|
-
enumValues: undefined;
|
|
71
|
-
baseColumn: never;
|
|
72
|
-
identity: undefined;
|
|
73
|
-
generated: undefined;
|
|
74
|
-
}, {}, {}>;
|
|
75
|
-
};
|
|
76
|
-
dialect: "pg";
|
|
77
|
-
}>, "enableRLS">;
|
|
1
|
+
export declare const categoryContent: import("@vitnode/core/content/server").ContentModel<import("@vitnode/core/content").ContentTypeDefinition<"blog.category", {
|
|
2
|
+
name: import("@vitnode/core/content").ContentTextField<true, false, undefined, true>;
|
|
3
|
+
color: import("@vitnode/core/content").ContentTextField<false, true, undefined, false>;
|
|
4
|
+
}, false, never, false, false, false, false, false, true, false>>;
|
|
5
|
+
export declare const blog_categories: import("@vitnode/core/content/server").ContentTable<string, import("@vitnode/core/content/server/types").ContentStorageFields<{
|
|
6
|
+
color: import("@vitnode/core/content").ContentTextField<false, true, undefined, false>;
|
|
7
|
+
}>, false, false>;
|
|
8
|
+
export declare const blog_categories_translations: import("@vitnode/core/content/server").ContentTranslationTable<string, {} & {
|
|
9
|
+
name: import("@vitnode/core/content").ContentTextField<true, false, undefined, true>;
|
|
10
|
+
}, false> | null;
|
|
78
11
|
//# sourceMappingURL=categories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../../../src/database/categories.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../../../src/database/categories.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe;;;iEAA8C,CAAC;AAK3E,eAAO,MAAM,eAAe;;iBAAwB,CAAC;AACrD,eAAO,MAAM,4BAA4B;;gBAAmC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createContentModel}from"@vitnode/core/content/server";import{blogCategoryContentType}from"../content/category.js";export const categoryContent=createContentModel(blogCategoryContentType);export const blog_categories=categoryContent.table;export const blog_categories_translations=categoryContent.translationTable;
|