@yimingliao/cms 0.0.11 → 0.0.12

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.
@@ -1,7 +1,7 @@
1
1
  import jwt from 'jsonwebtoken';
2
2
  import { BinaryLike } from 'node:crypto';
3
3
  import { cookies } from 'next/headers';
4
- import { e as AdminRole, v as SingleItem, B as BaseTranslation, a as Admin, c as AdminFull, f as AdminSafe, D as DeviceInfo, d as AdminRefreshToken, k as File, m as FileFull, o as FileType, p as Folder, F as FolderFull, u as PostType, M as MultiItems, E as ExternalLink, j as Faq, T as TocItem, q as Post, s as PostListCard, t as PostTranslation, r as PostFull, S as SeoMetadata, n as FileTranslation, h as Alternate } from '../base-DbGnfZr6.js';
4
+ import { e as AdminRole, v as SingleItem, B as BaseTranslation, a as Admin, c as AdminFull, f as AdminSafe, D as DeviceInfo, d as AdminRefreshToken, k as File, m as FileFull, o as FileType, p as Folder, F as FolderFull, u as PostType, M as MultiItems, E as ExternalLink, j as Faq, T as TocItem, q as Post, s as PostListCard, t as PostTranslation, r as PostFull, S as SeoMetadata, g as AdminTranslation, n as FileTranslation, h as Alternate } from '../base-DbGnfZr6.js';
5
5
 
6
6
  interface JwtServiceConfig {
7
7
  defaultSecret: string;
@@ -497,7 +497,9 @@ declare function createPostQueryRepository(prisma: any): {
497
497
  findWithSeoMetadata: (params: FindParams) => Promise<(Post & {
498
498
  translations: PostTranslation[];
499
499
  seoMetadatas: SeoMetadata[];
500
- author: Admin;
500
+ author: AdminSafe & {
501
+ translations: AdminTranslation[];
502
+ };
501
503
  coverImage: File & {
502
504
  translations: FileTranslation[];
503
505
  };
@@ -1199,7 +1199,10 @@ function createPostQueryRepository(prisma) {
1199
1199
  include: {
1200
1200
  translations: true,
1201
1201
  seoMetadatas: true,
1202
- author: true,
1202
+ author: {
1203
+ include: { translations: true },
1204
+ omit: { passwordHash: true }
1205
+ },
1203
1206
  coverImage: { include: { translations: true } }
1204
1207
  }
1205
1208
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yimingliao/cms",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "author": "Yiming Liao",
5
5
  "license": "MIT",
6
6
  "type": "module",