kecare-tools 1.0.0 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.ts +30 -25
  2. package/package.json +5 -1
package/index.ts CHANGED
@@ -1,25 +1,30 @@
1
- // 你可以在文件里编写你的类型定义
2
-
3
- export type Article = {
4
- //
5
- };
6
-
7
- export type ArticleListGenerator = (params: {
8
- projectPath: string;
9
- page: number;
10
- cards: any[];
11
- isIndex: boolean;
12
- pageSize: number;
13
- totalPages: number;
14
- totalArticles: number;
15
- listTitle?: string;
16
-
17
- //
18
- }) => Promise<{
19
- path: string;
20
- template: string;
21
- }>;
22
-
23
- export function defineArticleListGenerator<Generator extends ArticleListGenerator>(yourGenerator: Generator) {
24
- return yourGenerator;
25
- }
1
+
2
+ export type Article = {
3
+ id: string;
4
+ title: string;
5
+ desc: string;
6
+ coverSrc: string;
7
+ contentHtml: string;
8
+ createdAt: string;
9
+ author: string;
10
+ to: string;
11
+ };
12
+
13
+ export type ArticleListGenerator = (params: {
14
+ projectPath: string;
15
+ page: number;
16
+ cards: any[];
17
+ isIndex: boolean;
18
+ pageSize: number;
19
+ totalPages: number;
20
+ totalArticles: number;
21
+ listTitle?: string;
22
+
23
+ }) => Promise<{
24
+ path: string;
25
+ template: string;
26
+ }>;
27
+
28
+ export function defineArticleListGenerator<Generator extends ArticleListGenerator>(yourGenerator: Generator) {
29
+ return yourGenerator;
30
+ }
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "kecare-tools",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/Pamperkyumi/kecare"
9
+ },
6
10
  "devDependencies": {
7
11
  "@types/bun": "latest"
8
12
  },