sitero 0.5.0 → 0.6.0
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/core/infrastructure/prisma/post/include.js +8 -5
- package/dist/src/core/infrastructure/prisma/post/mappers.js +10 -5
- package/dist/src/web/server/resources/post/actions.js +4 -24
- package/dist/types/src/cms/client/interfaces/components/resources/post/content/types.d.ts +1 -1
- package/dist/types/src/cms/client/interfaces/components/resources/post/content/types.d.ts.map +1 -1
- package/dist/types/src/core/infrastructure/prisma/post/include.d.ts +50 -7
- package/dist/types/src/core/infrastructure/prisma/post/include.d.ts.map +1 -1
- package/dist/types/src/core/infrastructure/prisma/post/mappers.d.ts +3 -2
- package/dist/types/src/core/infrastructure/prisma/post/mappers.d.ts.map +1 -1
- package/dist/types/src/core/infrastructure/prisma/post/types.d.ts +4 -1
- package/dist/types/src/core/infrastructure/prisma/post/types.d.ts.map +1 -1
- package/dist/types/src/web/contracts/resources/post/actions.d.ts +1 -2
- package/dist/types/src/web/contracts/resources/post/actions.d.ts.map +1 -1
- package/dist/types/src/web/server/resources/post/actions.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
const POST_REFERENCE_INCLUDE = {
|
|
2
2
|
translations: true
|
|
3
3
|
};
|
|
4
|
+
const POST_REFERENCE_WITH_COVER_INCLUDE = {
|
|
5
|
+
...POST_REFERENCE_INCLUDE,
|
|
6
|
+
coverImage: { include: { translations: true } }
|
|
7
|
+
};
|
|
4
8
|
const POST_LIST_CARD_INCLUDE = {
|
|
5
|
-
|
|
9
|
+
...POST_REFERENCE_WITH_COVER_INCLUDE,
|
|
6
10
|
topic: { include: POST_REFERENCE_INCLUDE },
|
|
7
|
-
|
|
11
|
+
parents: { include: POST_REFERENCE_WITH_COVER_INCLUDE }
|
|
8
12
|
};
|
|
9
13
|
const POST_DETAIL_INCLUDE = {
|
|
10
14
|
...POST_LIST_CARD_INCLUDE,
|
|
@@ -15,11 +19,10 @@ const POST_DETAIL_INCLUDE = {
|
|
|
15
19
|
}
|
|
16
20
|
},
|
|
17
21
|
postsInTopic: { include: POST_REFERENCE_INCLUDE },
|
|
18
|
-
parents: { include: POST_REFERENCE_INCLUDE },
|
|
19
22
|
children: { include: POST_REFERENCE_INCLUDE },
|
|
20
23
|
tags: { include: POST_REFERENCE_INCLUDE },
|
|
21
24
|
taggedPosts: { include: POST_REFERENCE_INCLUDE },
|
|
22
|
-
relatedPosts: { include:
|
|
25
|
+
relatedPosts: { include: POST_LIST_CARD_INCLUDE },
|
|
23
26
|
referencingPosts: { include: POST_REFERENCE_INCLUDE },
|
|
24
27
|
contentImages: { include: { translations: true } },
|
|
25
28
|
files1: { include: { translations: true } },
|
|
@@ -39,4 +42,4 @@ const POST_RELATIONS_INCLUDE = {
|
|
|
39
42
|
}
|
|
40
43
|
};
|
|
41
44
|
|
|
42
|
-
export { POST_DETAIL_INCLUDE, POST_LIST_CARD_INCLUDE, POST_REFERENCE_INCLUDE, POST_RELATIONS_INCLUDE };
|
|
45
|
+
export { POST_DETAIL_INCLUDE, POST_LIST_CARD_INCLUDE, POST_REFERENCE_INCLUDE, POST_REFERENCE_WITH_COVER_INCLUDE, POST_RELATIONS_INCLUDE };
|
|
@@ -18,24 +18,29 @@ function postReferenceToDomain(post) {
|
|
|
18
18
|
translations: post.translations.map(translationToDomain)
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function postReferenceWithCoverToDomain(post) {
|
|
22
22
|
return {
|
|
23
23
|
...postReferenceToDomain(post),
|
|
24
|
-
topic: post.topic ? postReferenceToDomain(post.topic) : null,
|
|
25
24
|
coverImage: post.coverImage ? fileToCard(post.coverImage) : null
|
|
26
25
|
};
|
|
27
26
|
}
|
|
27
|
+
function postListCardToDomain(post) {
|
|
28
|
+
return {
|
|
29
|
+
...postReferenceWithCoverToDomain(post),
|
|
30
|
+
topic: post.topic ? postReferenceToDomain(post.topic) : null,
|
|
31
|
+
parents: post.parents.map(postReferenceWithCoverToDomain)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
28
34
|
function postDetailToDomain(post) {
|
|
29
35
|
const author = post.author ? adminListCardToDomain(post.author) : null;
|
|
30
36
|
return {
|
|
31
37
|
...postListCardToDomain(post),
|
|
32
38
|
author,
|
|
33
39
|
postsInTopic: post.postsInTopic.map(postReferenceToDomain),
|
|
34
|
-
parents: post.parents.map(postReferenceToDomain),
|
|
35
40
|
children: post.children.map(postReferenceToDomain),
|
|
36
41
|
tags: post.tags.map(postReferenceToDomain),
|
|
37
42
|
taggedPosts: post.taggedPosts.map(postReferenceToDomain),
|
|
38
|
-
relatedPosts: post.relatedPosts.map(
|
|
43
|
+
relatedPosts: post.relatedPosts.map(postListCardToDomain),
|
|
39
44
|
referencingPosts: post.referencingPosts.map(postReferenceToDomain),
|
|
40
45
|
contentImages: post.contentImages.map(fileToCard),
|
|
41
46
|
files1: post.files1.map(fileToCard),
|
|
@@ -66,4 +71,4 @@ function postRelationsToDomain(post) {
|
|
|
66
71
|
};
|
|
67
72
|
}
|
|
68
73
|
|
|
69
|
-
export { postDetailToDomain, postListCardToDomain, postReferenceToDomain, postRelationsToDomain };
|
|
74
|
+
export { postDetailToDomain, postListCardToDomain, postReferenceToDomain, postReferenceWithCoverToDomain, postRelationsToDomain };
|
|
@@ -4,8 +4,7 @@ import { operationResult } from 'sitero-server';
|
|
|
4
4
|
function toWebPostListCard(post) {
|
|
5
5
|
return {
|
|
6
6
|
...post,
|
|
7
|
-
children: []
|
|
8
|
-
parents: []
|
|
7
|
+
children: []
|
|
9
8
|
};
|
|
10
9
|
}
|
|
11
10
|
function toNullableWebPostListCard(post) {
|
|
@@ -31,12 +30,8 @@ function createWebPostActions({
|
|
|
31
30
|
if (!result.success) return result;
|
|
32
31
|
return operationResult.success({
|
|
33
32
|
post: result.data.post,
|
|
34
|
-
prev:
|
|
35
|
-
|
|
36
|
-
),
|
|
37
|
-
next: await hydrateListCardParents(
|
|
38
|
-
toNullableWebPostListCard(result.data.next)
|
|
39
|
-
)
|
|
33
|
+
prev: toNullableWebPostListCard(result.data.previous),
|
|
34
|
+
next: toNullableWebPostListCard(result.data.next)
|
|
40
35
|
});
|
|
41
36
|
};
|
|
42
37
|
const postFindListCardsAction = async (input) => {
|
|
@@ -51,19 +46,6 @@ function createWebPostActions({
|
|
|
51
46
|
items: result.data.items.map(toWebPostListCard)
|
|
52
47
|
});
|
|
53
48
|
};
|
|
54
|
-
async function hydrateListCardParents(post) {
|
|
55
|
-
if (!post) return post;
|
|
56
|
-
const response = await siteroServer.executor.execute(
|
|
57
|
-
siteroServer.resources.post.findDetail,
|
|
58
|
-
{ id: post.id, isActive: true },
|
|
59
|
-
{}
|
|
60
|
-
);
|
|
61
|
-
if (!response.success) return post;
|
|
62
|
-
return {
|
|
63
|
-
...post,
|
|
64
|
-
parents: response.data.post.parents
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
49
|
const loadPage = async ({ pageSlug }) => {
|
|
68
50
|
const response = await postFindDetailAction({
|
|
69
51
|
type: POST_TYPES.PAGE,
|
|
@@ -212,9 +194,7 @@ function createWebPostActions({
|
|
|
212
194
|
if (!response.success) {
|
|
213
195
|
return { posts: [], total: 0, totalPages: 1 };
|
|
214
196
|
}
|
|
215
|
-
const posts =
|
|
216
|
-
(response.data?.items ?? []).map((post) => hydrateListCardParents(post))
|
|
217
|
-
);
|
|
197
|
+
const posts = response.data?.items ?? [];
|
|
218
198
|
const total = response.data?.total ?? 0;
|
|
219
199
|
const totalPages = pageSize ? Math.max(1, Math.ceil(total / pageSize)) : 1;
|
|
220
200
|
return {
|
|
@@ -20,7 +20,7 @@ export type PostFieldRules<ExtraField extends string = never> = {
|
|
|
20
20
|
default: (PostField | ExtraField)[];
|
|
21
21
|
[fieldRuleKey: string]: (PostField | ExtraField)[];
|
|
22
22
|
};
|
|
23
|
-
export type TopicPostFieldRules<TopicKey extends string = string, ExtraField extends string = never> = Record<"global", Partial<Record<PostType, PostFieldRules<ExtraField>>>> & Record<TopicKey, Partial<Record<PostType, PostFieldRules<ExtraField
|
|
23
|
+
export type TopicPostFieldRules<TopicKey extends string = string, ExtraField extends string = never> = Record<"global", Partial<Record<PostType, PostFieldRules<ExtraField>>>> & Partial<Record<TopicKey, Partial<Record<PostType, PostFieldRules<ExtraField>>>>>;
|
|
24
24
|
/**
|
|
25
25
|
* Create a post field guard from topic-scoped field rules.
|
|
26
26
|
*/
|
package/dist/types/src/cms/client/interfaces/components/resources/post/content/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/cms/client/interfaces/components/resources/post/content/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EACnB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,mFAAmF;AACnF,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,oBAAoB,CAAC;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EACD,MAAM,GACN,CAAC,MAAM,CAAC,OAAO,kBAAkB,EAAE,MAAM,CAAC,GACxC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,oBAAoB,CAAC,UAAU,SAAS,MAAM,GAAG,KAAK;IACrE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,KAAK,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAC3C,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC;AAED,MAAM,MAAM,cAAc,CAAC,UAAU,SAAS,MAAM,GAAG,KAAK,IAAI,CAC9D,MAAM,EAAE,oBAAoB,CAAC,UAAU,CAAC,KACrC,OAAO,CAAC;AAEb,MAAM,MAAM,cAAc,CAAC,UAAU,SAAS,MAAM,GAAG,KAAK,IAAI;IAC9D,OAAO,EAAE,CAAC,SAAS,GAAG,UAAU,CAAC,EAAE,CAAC;IACpC,CAAC,YAAY,EAAE,MAAM,GAAG,CAAC,SAAS,GAAG,UAAU,CAAC,EAAE,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,mBAAmB,CAC7B,QAAQ,SAAS,MAAM,GAAG,MAAM,EAChC,UAAU,SAAS,MAAM,GAAG,KAAK,IAC/B,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GACzE,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/cms/client/interfaces/components/resources/post/content/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EACnB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,mFAAmF;AACnF,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,oBAAoB,CAAC;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EACD,MAAM,GACN,CAAC,MAAM,CAAC,OAAO,kBAAkB,EAAE,MAAM,CAAC,GACxC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,oBAAoB,CAAC,UAAU,SAAS,MAAM,GAAG,KAAK;IACrE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,KAAK,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAC3C,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC;AAED,MAAM,MAAM,cAAc,CAAC,UAAU,SAAS,MAAM,GAAG,KAAK,IAAI,CAC9D,MAAM,EAAE,oBAAoB,CAAC,UAAU,CAAC,KACrC,OAAO,CAAC;AAEb,MAAM,MAAM,cAAc,CAAC,UAAU,SAAS,MAAM,GAAG,KAAK,IAAI;IAC9D,OAAO,EAAE,CAAC,SAAS,GAAG,UAAU,CAAC,EAAE,CAAC;IACpC,CAAC,YAAY,EAAE,MAAM,GAAG,CAAC,SAAS,GAAG,UAAU,CAAC,EAAE,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,mBAAmB,CAC7B,QAAQ,SAAS,MAAM,GAAG,MAAM,EAChC,UAAU,SAAS,MAAM,GAAG,KAAK,IAC/B,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GACzE,OAAO,CACL,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACxE,CAAC;AAEJ;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,SAAS,MAAM,EACvB,UAAU,SAAS,MAAM,GAAG,KAAK,EAEjC,KAAK,EAAE,mBAAmB,CAAC,QAAQ,EAAE,UAAU,CAAC,GAC/C,cAAc,CAAC,UAAU,CAAC,CAgB5B"}
|
|
@@ -1,18 +1,36 @@
|
|
|
1
1
|
export declare const POST_REFERENCE_INCLUDE: {
|
|
2
2
|
readonly translations: true;
|
|
3
3
|
};
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const POST_REFERENCE_WITH_COVER_INCLUDE: {
|
|
5
|
+
readonly coverImage: {
|
|
6
|
+
readonly include: {
|
|
7
|
+
readonly translations: true;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
5
10
|
readonly translations: true;
|
|
11
|
+
};
|
|
12
|
+
export declare const POST_LIST_CARD_INCLUDE: {
|
|
6
13
|
readonly topic: {
|
|
7
14
|
readonly include: {
|
|
8
15
|
readonly translations: true;
|
|
9
16
|
};
|
|
10
17
|
};
|
|
18
|
+
readonly parents: {
|
|
19
|
+
readonly include: {
|
|
20
|
+
readonly coverImage: {
|
|
21
|
+
readonly include: {
|
|
22
|
+
readonly translations: true;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
readonly translations: true;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
11
28
|
readonly coverImage: {
|
|
12
29
|
readonly include: {
|
|
13
30
|
readonly translations: true;
|
|
14
31
|
};
|
|
15
32
|
};
|
|
33
|
+
readonly translations: true;
|
|
16
34
|
};
|
|
17
35
|
export declare const POST_DETAIL_INCLUDE: {
|
|
18
36
|
readonly author: {
|
|
@@ -30,11 +48,6 @@ export declare const POST_DETAIL_INCLUDE: {
|
|
|
30
48
|
readonly translations: true;
|
|
31
49
|
};
|
|
32
50
|
};
|
|
33
|
-
readonly parents: {
|
|
34
|
-
readonly include: {
|
|
35
|
-
readonly translations: true;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
51
|
readonly children: {
|
|
39
52
|
readonly include: {
|
|
40
53
|
readonly translations: true;
|
|
@@ -52,6 +65,26 @@ export declare const POST_DETAIL_INCLUDE: {
|
|
|
52
65
|
};
|
|
53
66
|
readonly relatedPosts: {
|
|
54
67
|
readonly include: {
|
|
68
|
+
readonly topic: {
|
|
69
|
+
readonly include: {
|
|
70
|
+
readonly translations: true;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
readonly parents: {
|
|
74
|
+
readonly include: {
|
|
75
|
+
readonly coverImage: {
|
|
76
|
+
readonly include: {
|
|
77
|
+
readonly translations: true;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
readonly translations: true;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
readonly coverImage: {
|
|
84
|
+
readonly include: {
|
|
85
|
+
readonly translations: true;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
55
88
|
readonly translations: true;
|
|
56
89
|
};
|
|
57
90
|
};
|
|
@@ -96,17 +129,27 @@ export declare const POST_DETAIL_INCLUDE: {
|
|
|
96
129
|
};
|
|
97
130
|
};
|
|
98
131
|
readonly seoMetadatas: true;
|
|
99
|
-
readonly translations: true;
|
|
100
132
|
readonly topic: {
|
|
101
133
|
readonly include: {
|
|
102
134
|
readonly translations: true;
|
|
103
135
|
};
|
|
104
136
|
};
|
|
137
|
+
readonly parents: {
|
|
138
|
+
readonly include: {
|
|
139
|
+
readonly coverImage: {
|
|
140
|
+
readonly include: {
|
|
141
|
+
readonly translations: true;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
readonly translations: true;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
105
147
|
readonly coverImage: {
|
|
106
148
|
readonly include: {
|
|
107
149
|
readonly translations: true;
|
|
108
150
|
};
|
|
109
151
|
};
|
|
152
|
+
readonly translations: true;
|
|
110
153
|
};
|
|
111
154
|
/** Minimal reverse-reference selection for Post relation pages. */
|
|
112
155
|
export declare const POST_RELATIONS_INCLUDE: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"include.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/prisma/post/include.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB;;CAEI,CAAC;AAExC,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"include.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/prisma/post/include.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB;;CAEI,CAAC;AAExC,eAAO,MAAM,iCAAiC;;;;;;;CAGP,CAAC;AAExC,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;CAII,CAAC;AAExC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBO,CAAC;AAExC,mEAAmE;AACnE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOI,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { PrismaPostDetail, PrismaPostListCard, PrismaPostReference, PrismaPostRelations } from "./types";
|
|
2
|
-
import type { PostDetail, PostListCard, PostReference, PostRelations } from "sitero-server";
|
|
1
|
+
import type { PrismaPostDetail, PrismaPostListCard, PrismaPostReference, PrismaPostReferenceWithCover, PrismaPostRelations } from "./types";
|
|
2
|
+
import type { PostDetail, PostListCard, PostReference, PostReferenceWithCover, PostRelations } from "sitero-server";
|
|
3
3
|
export declare function postReferenceToDomain(post: PrismaPostReference): PostReference;
|
|
4
|
+
export declare function postReferenceWithCoverToDomain(post: PrismaPostReferenceWithCover): PostReferenceWithCover;
|
|
4
5
|
export declare function postListCardToDomain(post: PrismaPostListCard): PostListCard;
|
|
5
6
|
export declare function postDetailToDomain(post: PrismaPostDetail): PostDetail;
|
|
6
7
|
/** Groups only supported direct reverse Post references by target type. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/prisma/post/mappers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAGjB,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,aAAa,EACd,MAAM,eAAe,CAAC;AAmBvB,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,mBAAmB,GACxB,aAAa,CAKf;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,GAAG,YAAY,CAM3E;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/prisma/post/mappers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,4BAA4B,EAC5B,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAGjB,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,sBAAsB,EACtB,aAAa,EACd,MAAM,eAAe,CAAC;AAmBvB,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,mBAAmB,GACxB,aAAa,CAKf;AAED,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,4BAA4B,GACjC,sBAAsB,CAKxB;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,GAAG,YAAY,CAM3E;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,UAAU,CAqBrE;AAED,2EAA2E;AAC3E,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,mBAAmB,GACxB,aAAa,CAwBf"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { POST_DETAIL_INCLUDE, POST_LIST_CARD_INCLUDE, POST_RELATIONS_INCLUDE, POST_REFERENCE_INCLUDE } from "./include";
|
|
1
|
+
import type { POST_DETAIL_INCLUDE, POST_LIST_CARD_INCLUDE, POST_RELATIONS_INCLUDE, POST_REFERENCE_INCLUDE, POST_REFERENCE_WITH_COVER_INCLUDE } from "./include";
|
|
2
2
|
import type { Prisma, PrismaClient } from "../../../../../prisma/generated/client";
|
|
3
3
|
export type PrismaPostReference = Prisma.PostGetPayload<{
|
|
4
4
|
include: typeof POST_REFERENCE_INCLUDE;
|
|
@@ -13,4 +13,7 @@ export type PrismaPostRelations = Prisma.PostGetPayload<{
|
|
|
13
13
|
include: typeof POST_RELATIONS_INCLUDE;
|
|
14
14
|
}>;
|
|
15
15
|
export type PrismaPostClient = Pick<PrismaClient, "post" | "$transaction">;
|
|
16
|
+
export type PrismaPostReferenceWithCover = Prisma.PostGetPayload<{
|
|
17
|
+
include: typeof POST_REFERENCE_WITH_COVER_INCLUDE;
|
|
18
|
+
}>;
|
|
16
19
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/prisma/post/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/prisma/post/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,iCAAiC,EAClC,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EACV,MAAM,EACN,YAAY,EACb,MAAM,wCAAwC,CAAC;AAEhD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,cAAc,CAAC;IACtD,OAAO,EAAE,OAAO,sBAAsB,CAAC;CACxC,CAAC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,cAAc,CAAC;IACrD,OAAO,EAAE,OAAO,sBAAsB,CAAC;CACxC,CAAC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,cAAc,CAAC;IACnD,OAAO,EAAE,OAAO,mBAAmB,CAAC;CACrC,CAAC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,cAAc,CAAC;IACtD,OAAO,EAAE,OAAO,sBAAsB,CAAC;CACxC,CAAC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC;AAE3E,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC,cAAc,CAAC;IAC/D,OAAO,EAAE,OAAO,iCAAiC,CAAC;CACnD,CAAC,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { OperationResult } from "sitero-server";
|
|
2
|
-
import type { PostFindDetailInput, PostFindListCardsInput, PostDetail, PostListCard
|
|
2
|
+
import type { PostFindDetailInput, PostFindListCardsInput, PostDetail, PostListCard } from "sitero-server";
|
|
3
3
|
export type WebPostListCard = PostListCard & {
|
|
4
|
-
parents: PostReference[];
|
|
5
4
|
children: WebPostListCard[];
|
|
6
5
|
};
|
|
7
6
|
type WithoutActiveFilter<Input> = Input extends unknown ? Omit<Input, "isActive"> : never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../../../src/web/contracts/resources/post/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACtB,UAAU,EACV,YAAY,
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../../../src/web/contracts/resources/post/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACtB,UAAU,EACV,YAAY,EACb,MAAM,eAAe,CAAC;AAEvB,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG;IAC3C,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B,CAAC;AAEF,KAAK,mBAAmB,CAAC,KAAK,IAAI,KAAK,SAAS,OAAO,GACnD,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,GACvB,KAAK,CAAC;AAEV,4EAA4E;AAC5E,MAAM,MAAM,sBAAsB,GAAG,mBAAmB,CAAC,mBAAmB,CAAC,CAAC;AAE9E,4EAA4E;AAC5E,MAAM,MAAM,yBAAyB,GACnC,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;AAE9C,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,sBAAsB,KAAK,OAAO,CAC3E,eAAe,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAC7B,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;CAC9B,CAAC,CACH,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,CACpC,KAAK,EAAE,yBAAyB,KAC7B,OAAO,CAAC,eAAe,CAAC;IAAE,KAAK,EAAE,eAAe,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../../../src/web/server/resources/post/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAGV,eAAe,EAChB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../../../src/web/server/resources/post/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAGV,eAAe,EAChB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAgClD,wBAAgB,oBAAoB,CAAC,EACnC,YAAY,EACZ,YAAY,GACb,EAAE;IACD,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,EAAE,YAAY,CAAC;CAC5B;;;;;;;;;;;;;;yBAWK,CAAA;;;;;;;;;;;;;wBASY,CAAA;yBAEd,CAAJ;;;;;;;;;;;;;wBAUuC,CAAC;uBACtC,CAAF;oBAAwB,CAAC;sBAA0B,CAAC;yBAC7C,CAAC;sBAA2B,CAAC;mBACxB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0NX"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sitero",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"author": "Yiming Liao",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -111,8 +111,8 @@
|
|
|
111
111
|
"ua-parser-js": "2.0.9",
|
|
112
112
|
"ulid": "3.0.2",
|
|
113
113
|
"zod": "4.3.6",
|
|
114
|
-
"sitero-domain": "0.
|
|
115
|
-
"sitero-server": "0.
|
|
114
|
+
"sitero-domain": "0.6.0",
|
|
115
|
+
"sitero-server": "0.6.0"
|
|
116
116
|
},
|
|
117
117
|
"peerDependencies": {
|
|
118
118
|
"@aws-sdk/client-s3": "3.913.0",
|