website
git clone https://git.pyrossh.dev/website
木 Personal website of pyrossh. Built with astrojs, shiki, vite.
c192b28
— pyrossh
2026-07-07T11:28:17+05:30
feat: add shared types package
packages/shared/types/package.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pyrossh/types",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
7
|
+
"types": "src/index.ts"
|
|
8
|
+
}
|
packages/shared/types/src/env.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export interface Env {
|
|
2
|
+
REPOS: R2Bucket;
|
|
3
|
+
}
|
packages/shared/types/src/index.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export type { Env } from "./env.d.ts";
|
|
2
|
+
|
|
3
|
+
export interface Commit {
|
|
4
|
+
hash: string;
|
|
5
|
+
author: string;
|
|
6
|
+
date: string;
|
|
7
|
+
message: string;
|
|
8
|
+
body?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface FileEntry {
|
|
12
|
+
name: string;
|
|
13
|
+
size: number;
|
|
14
|
+
ext: string;
|
|
15
|
+
absolutePath: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface FileNode {
|
|
19
|
+
name: string;
|
|
20
|
+
path: string;
|
|
21
|
+
size: number;
|
|
22
|
+
ext: string;
|
|
23
|
+
absolutePath: string;
|
|
24
|
+
isDirectory: boolean;
|
|
25
|
+
children?: FileNode[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface RuntimeRepo {
|
|
29
|
+
id: string;
|
|
30
|
+
data: {
|
|
31
|
+
title: string;
|
|
32
|
+
description: string;
|
|
33
|
+
tags: string[];
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface RuntimePost {
|
|
38
|
+
id: string;
|
|
39
|
+
data: {
|
|
40
|
+
title: string;
|
|
41
|
+
description: string;
|
|
42
|
+
pubDate: Date;
|
|
43
|
+
updatedDate?: Date;
|
|
44
|
+
heroImage?: string;
|
|
45
|
+
};
|
|
46
|
+
body: string;
|
|
47
|
+
html: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type GitBugIssueState = "open" | "closed";
|
|
51
|
+
|
|
52
|
+
export interface GitBugIssue {
|
|
53
|
+
id: string;
|
|
54
|
+
title: string;
|
|
55
|
+
state: GitBugIssueState;
|
|
56
|
+
author?: string;
|
|
57
|
+
createdAt: string;
|
|
58
|
+
updatedAt: string;
|
|
59
|
+
labels: string[];
|
|
60
|
+
body?: string;
|
|
61
|
+
comments: GitBugComment[];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface GitBugComment {
|
|
65
|
+
id: string;
|
|
66
|
+
author?: string;
|
|
67
|
+
createdAt: string;
|
|
68
|
+
body: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface GitBugIssuesResult {
|
|
72
|
+
issues: GitBugIssue[];
|
|
73
|
+
isAvailable: boolean;
|
|
74
|
+
}
|
packages/shared/types/tsconfig.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../tsconfig.base.json",
|
|
3
|
+
"include": ["src"]
|
|
4
|
+
}
|