pi-producthunt 0.1.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/CHANGELOG.md +21 -0
- package/LICENSE +21 -0
- package/README.md +171 -0
- package/docs/examples.md +49 -0
- package/docs/github-template.md +61 -0
- package/docs/release.md +45 -0
- package/docs/repository-settings.md +41 -0
- package/docs/template-checklist.md +98 -0
- package/docs/typescript.md +75 -0
- package/extensions/index.ts +295 -0
- package/lib/api.ts +110 -0
- package/lib/auth-store.ts +68 -0
- package/lib/client.ts +265 -0
- package/lib/config.ts +61 -0
- package/lib/format.ts +154 -0
- package/lib/identity.ts +56 -0
- package/lib/queries.ts +89 -0
- package/lib/schema.ts +8 -0
- package/lib/types.ts +79 -0
- package/package.json +61 -0
package/lib/types.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export interface RateLimitInfo {
|
|
2
|
+
limit?: string;
|
|
3
|
+
remaining?: string;
|
|
4
|
+
reset?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface PageInfo {
|
|
8
|
+
hasNextPage: boolean;
|
|
9
|
+
endCursor?: string | null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface TopicSummary {
|
|
13
|
+
id?: string;
|
|
14
|
+
name: string;
|
|
15
|
+
slug?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface MakerSummary {
|
|
19
|
+
id?: string;
|
|
20
|
+
name: string;
|
|
21
|
+
username?: string | null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface PostListItem {
|
|
25
|
+
id: string;
|
|
26
|
+
slug: string;
|
|
27
|
+
name: string;
|
|
28
|
+
tagline?: string | null;
|
|
29
|
+
url?: string | null;
|
|
30
|
+
votesCount?: number | null;
|
|
31
|
+
commentsCount?: number | null;
|
|
32
|
+
featuredAt?: string | null;
|
|
33
|
+
createdAt?: string | null;
|
|
34
|
+
topics: TopicSummary[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface PostDetails extends PostListItem {
|
|
38
|
+
description?: string | null;
|
|
39
|
+
website?: string | null;
|
|
40
|
+
thumbnailUrl?: string | null;
|
|
41
|
+
makers: MakerSummary[];
|
|
42
|
+
user?: MakerSummary | null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface CommentSummary {
|
|
46
|
+
id: string;
|
|
47
|
+
body: string;
|
|
48
|
+
votesCount?: number | null;
|
|
49
|
+
createdAt?: string | null;
|
|
50
|
+
user?: MakerSummary | null;
|
|
51
|
+
repliesCount?: number | null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface PostConnectionResult {
|
|
55
|
+
posts: PostListItem[];
|
|
56
|
+
pageInfo?: PageInfo;
|
|
57
|
+
totalCount?: number;
|
|
58
|
+
rateLimit?: RateLimitInfo;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface PostCommentsResult {
|
|
62
|
+
post: Pick<PostListItem, "id" | "name" | "slug">;
|
|
63
|
+
comments: CommentSummary[];
|
|
64
|
+
pageInfo?: PageInfo;
|
|
65
|
+
totalCount?: number;
|
|
66
|
+
rateLimit?: RateLimitInfo;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface ResearchTopicResult {
|
|
70
|
+
query: string;
|
|
71
|
+
posts: Array<PostListItem & { comments?: CommentSummary[] }>;
|
|
72
|
+
rateLimit?: RateLimitInfo;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface ViewerResult {
|
|
76
|
+
username?: string;
|
|
77
|
+
rateLimit?: RateLimitInfo;
|
|
78
|
+
}
|
|
79
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pi-producthunt",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Pi extension package for Product Hunt research and digest workflows.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "eiei114",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"pi-package",
|
|
10
|
+
"pi",
|
|
11
|
+
"producthunt",
|
|
12
|
+
"research",
|
|
13
|
+
"digest",
|
|
14
|
+
"agent-skill",
|
|
15
|
+
"typescript"
|
|
16
|
+
],
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/eiei114/pi-producthunt.git"
|
|
20
|
+
},
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/eiei114/pi-producthunt/issues"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://github.com/eiei114/pi-producthunt#readme",
|
|
25
|
+
"files": [
|
|
26
|
+
"extensions/",
|
|
27
|
+
"lib/",
|
|
28
|
+
"docs/",
|
|
29
|
+
"README.md",
|
|
30
|
+
"LICENSE",
|
|
31
|
+
"CHANGELOG.md"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"typecheck": "tsc --noEmit",
|
|
35
|
+
"test": "node --test tests/*.test.mjs",
|
|
36
|
+
"ci": "npm run typecheck && npm test && npm run pack:check",
|
|
37
|
+
"pack:check": "npm pack --dry-run"
|
|
38
|
+
},
|
|
39
|
+
"pi": {
|
|
40
|
+
"extensions": [
|
|
41
|
+
"./extensions"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"@earendil-works/pi-ai": "*",
|
|
49
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
50
|
+
"@earendil-works/pi-tui": "*",
|
|
51
|
+
"typebox": "*"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@earendil-works/pi-ai": "latest",
|
|
55
|
+
"@earendil-works/pi-coding-agent": "latest",
|
|
56
|
+
"@earendil-works/pi-tui": "latest",
|
|
57
|
+
"typebox": "latest",
|
|
58
|
+
"@types/node": "^22.0.0",
|
|
59
|
+
"typescript": "^6.0.3"
|
|
60
|
+
}
|
|
61
|
+
}
|