@ossintel/github-normalizer 0.0.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/LICENSE +21 -0
- package/README.md +114 -0
- package/dist/index.d.mts +231 -0
- package/dist/index.d.ts +231 -0
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -0
- package/package.json +64 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 turboforge-dev
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# @ossintel/github-normalizer <img src="https://raw.githubusercontent.com/mayank1513/mayank1513/main/popper.png" style="height: 40px"/>
|
|
2
|
+
|
|
3
|
+
<p className="flex gap-2">
|
|
4
|
+
<a href="https://github.com/mayank1513/ossintel/actions/workflows/ci.yml" rel="noopener noreferrer">
|
|
5
|
+
<img alt="CI" src="https://github.com/mayank1513/ossintel/actions/workflows/ci.yml/badge.svg" />
|
|
6
|
+
</a>
|
|
7
|
+
<a href="https://codecov.io/gh/mayank1513/ossintel/tree/main/packages/@ossintel/github-normalizer" rel="noopener noreferrer">
|
|
8
|
+
<img alt="codecov" src="https://codecov.io/gh/mayank1513/ossintel/graph/badge.svg?flag=@ossintel/github-normalizer" />
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://npmjs.com/package/@ossintel/github-normalizer" rel="noopener noreferrer">
|
|
11
|
+
<img alt="npm version" src="https://img.shields.io/npm/v/@ossintel/github-normalizer" />
|
|
12
|
+
</a>
|
|
13
|
+
<a href="https://npmjs.com/package/@ossintel/github-normalizer" rel="noopener noreferrer">
|
|
14
|
+
<img alt="npm downloads" src="https://img.shields.io/npm/d18m/@ossintel/github-normalizer" />
|
|
15
|
+
</a>
|
|
16
|
+
<a href="https://npmjs.com/package/@ossintel/github-normalizer" rel="noopener noreferrer">
|
|
17
|
+
<img alt="npm bundle size" src="https://img.shields.io/bundlephobia/minzip/@ossintel/github-normalizer" />
|
|
18
|
+
</a>
|
|
19
|
+
<img alt="license" src="https://img.shields.io/npm/l/@ossintel/github-normalizer" />
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
> @ossintel/github-normalizer: Typed utilities for fetching and normalizing GitHub REST and GraphQL data into a consistent domain model for analytics and reporting.
|
|
23
|
+
|
|
24
|
+
# @ossintel/github-normalizer
|
|
25
|
+
|
|
26
|
+
Typed utilities for fetching and normalizing GitHub data.
|
|
27
|
+
|
|
28
|
+
## Purpose
|
|
29
|
+
|
|
30
|
+
GitHub's REST and GraphQL APIs expose excellent data but with inconsistent shapes and multiple endpoints.
|
|
31
|
+
|
|
32
|
+
This package provides a stable domain model consumed by the rest of OSSIntel.
|
|
33
|
+
|
|
34
|
+
## Responsibilities
|
|
35
|
+
|
|
36
|
+
- Fetch GitHub data
|
|
37
|
+
- Normalize responses
|
|
38
|
+
- Hide API complexity
|
|
39
|
+
- Handle pagination
|
|
40
|
+
- Handle rate limits
|
|
41
|
+
- Provide strongly typed models
|
|
42
|
+
|
|
43
|
+
## Non-goals
|
|
44
|
+
|
|
45
|
+
- Scoring
|
|
46
|
+
- AI
|
|
47
|
+
- Business logic
|
|
48
|
+
- UI
|
|
49
|
+
|
|
50
|
+
## Planned API
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
fetchDeveloper();
|
|
54
|
+
|
|
55
|
+
fetchRepositories();
|
|
56
|
+
|
|
57
|
+
fetchRepository();
|
|
58
|
+
|
|
59
|
+
fetchOrganizations();
|
|
60
|
+
|
|
61
|
+
fetchContributors();
|
|
62
|
+
|
|
63
|
+
fetchLanguages();
|
|
64
|
+
|
|
65
|
+
fetchReleases();
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Output
|
|
69
|
+
|
|
70
|
+
Always returns normalized domain models.
|
|
71
|
+
|
|
72
|
+
Never expose raw GitHub responses.
|
|
73
|
+
|
|
74
|
+
## Design Principles
|
|
75
|
+
|
|
76
|
+
- Pure TypeScript
|
|
77
|
+
- Strong typing
|
|
78
|
+
- Stable contracts
|
|
79
|
+
- Easily replaceable backend
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## ✨ Why @ossintel/github-normalizer?
|
|
84
|
+
|
|
85
|
+
-
|
|
86
|
+
-
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 📦 Installation
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
$ pnpm add @ossintel/github-normalizer
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**_or_**
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
$ npm install @ossintel/github-normalizer
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**_or_**
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
$ yarn add @ossintel/github-normalizer
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## License
|
|
109
|
+
|
|
110
|
+
This library is licensed under the MIT open-source license.
|
|
111
|
+
|
|
112
|
+
<hr />
|
|
113
|
+
|
|
114
|
+
<p align="center">with 💖 by <a href="https://mayankchaudhari.com" target="_blank">Mayank Kumar Chaudhari</a></p>
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
interface GitHubFetchOptions {
|
|
2
|
+
token?: string;
|
|
3
|
+
baseUrl?: string;
|
|
4
|
+
perPage?: number;
|
|
5
|
+
page?: number;
|
|
6
|
+
allPages?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare class GitHubHttpError extends Error {
|
|
9
|
+
status: number;
|
|
10
|
+
statusText: string;
|
|
11
|
+
constructor(status: number, statusText: string, message: string);
|
|
12
|
+
}
|
|
13
|
+
declare class GitHubRateLimitError extends Error {
|
|
14
|
+
limit: number;
|
|
15
|
+
remaining: number;
|
|
16
|
+
resetTime: Date;
|
|
17
|
+
constructor(limit: number, remaining: number, resetTime: Date, message: string);
|
|
18
|
+
}
|
|
19
|
+
interface RawGitHubUser {
|
|
20
|
+
id: number;
|
|
21
|
+
login: string;
|
|
22
|
+
name: string | null;
|
|
23
|
+
avatar_url: string;
|
|
24
|
+
html_url: string;
|
|
25
|
+
type: string;
|
|
26
|
+
company?: string | null;
|
|
27
|
+
blog?: string | null;
|
|
28
|
+
location?: string | null;
|
|
29
|
+
email?: string | null;
|
|
30
|
+
bio?: string | null;
|
|
31
|
+
twitter_username?: string | null;
|
|
32
|
+
public_repos?: number;
|
|
33
|
+
public_gists?: number;
|
|
34
|
+
followers?: number;
|
|
35
|
+
following?: number;
|
|
36
|
+
created_at: string;
|
|
37
|
+
updated_at: string;
|
|
38
|
+
}
|
|
39
|
+
interface RawGitHubRepository {
|
|
40
|
+
id: number;
|
|
41
|
+
name: string;
|
|
42
|
+
full_name: string;
|
|
43
|
+
owner?: {
|
|
44
|
+
login: string;
|
|
45
|
+
id: number;
|
|
46
|
+
avatar_url: string;
|
|
47
|
+
type: string;
|
|
48
|
+
};
|
|
49
|
+
html_url: string;
|
|
50
|
+
description?: string | null;
|
|
51
|
+
fork?: boolean;
|
|
52
|
+
created_at: string;
|
|
53
|
+
updated_at: string;
|
|
54
|
+
pushed_at: string;
|
|
55
|
+
homepage?: string | null;
|
|
56
|
+
size?: number;
|
|
57
|
+
stargazers_count?: number;
|
|
58
|
+
watchers_count?: number;
|
|
59
|
+
language?: string | null;
|
|
60
|
+
forks_count?: number;
|
|
61
|
+
open_issues_count?: number;
|
|
62
|
+
default_branch?: string;
|
|
63
|
+
topics?: string[];
|
|
64
|
+
archived?: boolean;
|
|
65
|
+
}
|
|
66
|
+
interface RawGitHubOrganization {
|
|
67
|
+
id: number;
|
|
68
|
+
login: string;
|
|
69
|
+
name?: string | null;
|
|
70
|
+
description?: string | null;
|
|
71
|
+
avatar_url: string;
|
|
72
|
+
html_url: string;
|
|
73
|
+
location?: string | null;
|
|
74
|
+
email?: string | null;
|
|
75
|
+
blog?: string | null;
|
|
76
|
+
twitter_username?: string | null;
|
|
77
|
+
public_repos?: number;
|
|
78
|
+
followers?: number;
|
|
79
|
+
created_at: string;
|
|
80
|
+
updated_at: string;
|
|
81
|
+
}
|
|
82
|
+
interface RawGitHubContributor {
|
|
83
|
+
id: number;
|
|
84
|
+
login: string;
|
|
85
|
+
avatar_url: string;
|
|
86
|
+
html_url: string;
|
|
87
|
+
type?: string;
|
|
88
|
+
contributions?: number;
|
|
89
|
+
}
|
|
90
|
+
interface RawGitHubRelease {
|
|
91
|
+
id: number;
|
|
92
|
+
name?: string | null;
|
|
93
|
+
tag_name: string;
|
|
94
|
+
target_commitish: string;
|
|
95
|
+
body?: string | null;
|
|
96
|
+
draft?: boolean;
|
|
97
|
+
prerelease?: boolean;
|
|
98
|
+
created_at: string;
|
|
99
|
+
published_at?: string | null;
|
|
100
|
+
html_url: string;
|
|
101
|
+
author?: {
|
|
102
|
+
login: string;
|
|
103
|
+
id: number;
|
|
104
|
+
avatar_url: string;
|
|
105
|
+
} | null;
|
|
106
|
+
}
|
|
107
|
+
interface NormalizedDeveloper {
|
|
108
|
+
id: number;
|
|
109
|
+
login: string;
|
|
110
|
+
name: string | null;
|
|
111
|
+
avatarUrl: string;
|
|
112
|
+
htmlUrl: string;
|
|
113
|
+
type: string;
|
|
114
|
+
company: string | null;
|
|
115
|
+
blog: string | null;
|
|
116
|
+
location: string | null;
|
|
117
|
+
email: string | null;
|
|
118
|
+
bio: string | null;
|
|
119
|
+
twitterUsername: string | null;
|
|
120
|
+
publicRepos: number;
|
|
121
|
+
publicGists: number;
|
|
122
|
+
followers: number;
|
|
123
|
+
following: number;
|
|
124
|
+
createdAt: string;
|
|
125
|
+
updatedAt: string;
|
|
126
|
+
}
|
|
127
|
+
interface NormalizedRepository {
|
|
128
|
+
id: number;
|
|
129
|
+
name: string;
|
|
130
|
+
fullName: string;
|
|
131
|
+
owner: {
|
|
132
|
+
login: string;
|
|
133
|
+
id: number;
|
|
134
|
+
avatarUrl: string;
|
|
135
|
+
type: string;
|
|
136
|
+
};
|
|
137
|
+
htmlUrl: string;
|
|
138
|
+
description: string | null;
|
|
139
|
+
isFork: boolean;
|
|
140
|
+
createdAt: string;
|
|
141
|
+
updatedAt: string;
|
|
142
|
+
pushedAt: string;
|
|
143
|
+
homepage: string | null;
|
|
144
|
+
size: number;
|
|
145
|
+
stargazersCount: number;
|
|
146
|
+
watchersCount: number;
|
|
147
|
+
language: string | null;
|
|
148
|
+
forksCount: number;
|
|
149
|
+
openIssuesCount: number;
|
|
150
|
+
defaultBranch: string;
|
|
151
|
+
topics: string[];
|
|
152
|
+
isArchived: boolean;
|
|
153
|
+
}
|
|
154
|
+
interface NormalizedOrganization {
|
|
155
|
+
id: number;
|
|
156
|
+
login: string;
|
|
157
|
+
name: string | null;
|
|
158
|
+
description: string | null;
|
|
159
|
+
avatarUrl: string;
|
|
160
|
+
htmlUrl: string;
|
|
161
|
+
location: string | null;
|
|
162
|
+
email: string | null;
|
|
163
|
+
blog: string | null;
|
|
164
|
+
twitterUsername: string | null;
|
|
165
|
+
publicRepos: number;
|
|
166
|
+
followers: number;
|
|
167
|
+
createdAt: string;
|
|
168
|
+
updatedAt: string;
|
|
169
|
+
}
|
|
170
|
+
interface NormalizedContributor {
|
|
171
|
+
id: number;
|
|
172
|
+
login: string;
|
|
173
|
+
avatarUrl: string;
|
|
174
|
+
htmlUrl: string;
|
|
175
|
+
type: string;
|
|
176
|
+
contributions: number;
|
|
177
|
+
}
|
|
178
|
+
interface NormalizedLanguage {
|
|
179
|
+
name: string;
|
|
180
|
+
bytes: number;
|
|
181
|
+
}
|
|
182
|
+
interface NormalizedRelease {
|
|
183
|
+
id: number;
|
|
184
|
+
name: string | null;
|
|
185
|
+
tagName: string;
|
|
186
|
+
targetCommitish: string;
|
|
187
|
+
body: string | null;
|
|
188
|
+
draft: boolean;
|
|
189
|
+
prerelease: boolean;
|
|
190
|
+
createdAt: string;
|
|
191
|
+
publishedAt: string | null;
|
|
192
|
+
htmlUrl: string;
|
|
193
|
+
author: {
|
|
194
|
+
login: string;
|
|
195
|
+
id: number;
|
|
196
|
+
avatarUrl: string;
|
|
197
|
+
} | null;
|
|
198
|
+
}
|
|
199
|
+
interface InputDetectionResult {
|
|
200
|
+
platform: "github" | "npm" | "stackoverflow" | "unknown";
|
|
201
|
+
type: "user" | "org" | "repo" | "package" | "unknown";
|
|
202
|
+
owner?: string;
|
|
203
|
+
repo?: string;
|
|
204
|
+
name?: string;
|
|
205
|
+
profileId?: string;
|
|
206
|
+
rawInput: string;
|
|
207
|
+
}
|
|
208
|
+
interface LinkedIdentitySuggestions {
|
|
209
|
+
stackoverflow?: {
|
|
210
|
+
profileId: string;
|
|
211
|
+
displayName: string;
|
|
212
|
+
url: string;
|
|
213
|
+
};
|
|
214
|
+
npm?: {
|
|
215
|
+
username: string;
|
|
216
|
+
url: string;
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
declare function fetchDeveloper(username?: string, options?: GitHubFetchOptions): Promise<NormalizedDeveloper>;
|
|
221
|
+
declare function fetchRepositories(owner?: string, options?: GitHubFetchOptions): Promise<NormalizedRepository[]>;
|
|
222
|
+
declare function fetchRepository(owner: string, repo: string, options?: GitHubFetchOptions): Promise<NormalizedRepository>;
|
|
223
|
+
declare function fetchOrganizations(username?: string, options?: GitHubFetchOptions): Promise<NormalizedOrganization[]>;
|
|
224
|
+
declare function fetchContributors(owner: string, repo: string, options?: GitHubFetchOptions): Promise<NormalizedContributor[]>;
|
|
225
|
+
declare function fetchLanguages(owner: string, repo: string, options?: GitHubFetchOptions): Promise<NormalizedLanguage[]>;
|
|
226
|
+
declare function fetchReleases(owner: string, repo: string, options?: GitHubFetchOptions): Promise<NormalizedRelease[]>;
|
|
227
|
+
declare function fetchOrganization(login: string, options?: GitHubFetchOptions): Promise<NormalizedOrganization>;
|
|
228
|
+
declare function detectInput(input: string): InputDetectionResult;
|
|
229
|
+
declare function suggestLinkedIdentities(developer: NormalizedDeveloper, _repositories: NormalizedRepository[]): LinkedIdentitySuggestions;
|
|
230
|
+
|
|
231
|
+
export { type GitHubFetchOptions, GitHubHttpError, GitHubRateLimitError, type InputDetectionResult, type LinkedIdentitySuggestions, type NormalizedContributor, type NormalizedDeveloper, type NormalizedLanguage, type NormalizedOrganization, type NormalizedRelease, type NormalizedRepository, type RawGitHubContributor, type RawGitHubOrganization, type RawGitHubRelease, type RawGitHubRepository, type RawGitHubUser, detectInput, fetchContributors, fetchDeveloper, fetchLanguages, fetchOrganization, fetchOrganizations, fetchReleases, fetchRepositories, fetchRepository, suggestLinkedIdentities };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
interface GitHubFetchOptions {
|
|
2
|
+
token?: string;
|
|
3
|
+
baseUrl?: string;
|
|
4
|
+
perPage?: number;
|
|
5
|
+
page?: number;
|
|
6
|
+
allPages?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare class GitHubHttpError extends Error {
|
|
9
|
+
status: number;
|
|
10
|
+
statusText: string;
|
|
11
|
+
constructor(status: number, statusText: string, message: string);
|
|
12
|
+
}
|
|
13
|
+
declare class GitHubRateLimitError extends Error {
|
|
14
|
+
limit: number;
|
|
15
|
+
remaining: number;
|
|
16
|
+
resetTime: Date;
|
|
17
|
+
constructor(limit: number, remaining: number, resetTime: Date, message: string);
|
|
18
|
+
}
|
|
19
|
+
interface RawGitHubUser {
|
|
20
|
+
id: number;
|
|
21
|
+
login: string;
|
|
22
|
+
name: string | null;
|
|
23
|
+
avatar_url: string;
|
|
24
|
+
html_url: string;
|
|
25
|
+
type: string;
|
|
26
|
+
company?: string | null;
|
|
27
|
+
blog?: string | null;
|
|
28
|
+
location?: string | null;
|
|
29
|
+
email?: string | null;
|
|
30
|
+
bio?: string | null;
|
|
31
|
+
twitter_username?: string | null;
|
|
32
|
+
public_repos?: number;
|
|
33
|
+
public_gists?: number;
|
|
34
|
+
followers?: number;
|
|
35
|
+
following?: number;
|
|
36
|
+
created_at: string;
|
|
37
|
+
updated_at: string;
|
|
38
|
+
}
|
|
39
|
+
interface RawGitHubRepository {
|
|
40
|
+
id: number;
|
|
41
|
+
name: string;
|
|
42
|
+
full_name: string;
|
|
43
|
+
owner?: {
|
|
44
|
+
login: string;
|
|
45
|
+
id: number;
|
|
46
|
+
avatar_url: string;
|
|
47
|
+
type: string;
|
|
48
|
+
};
|
|
49
|
+
html_url: string;
|
|
50
|
+
description?: string | null;
|
|
51
|
+
fork?: boolean;
|
|
52
|
+
created_at: string;
|
|
53
|
+
updated_at: string;
|
|
54
|
+
pushed_at: string;
|
|
55
|
+
homepage?: string | null;
|
|
56
|
+
size?: number;
|
|
57
|
+
stargazers_count?: number;
|
|
58
|
+
watchers_count?: number;
|
|
59
|
+
language?: string | null;
|
|
60
|
+
forks_count?: number;
|
|
61
|
+
open_issues_count?: number;
|
|
62
|
+
default_branch?: string;
|
|
63
|
+
topics?: string[];
|
|
64
|
+
archived?: boolean;
|
|
65
|
+
}
|
|
66
|
+
interface RawGitHubOrganization {
|
|
67
|
+
id: number;
|
|
68
|
+
login: string;
|
|
69
|
+
name?: string | null;
|
|
70
|
+
description?: string | null;
|
|
71
|
+
avatar_url: string;
|
|
72
|
+
html_url: string;
|
|
73
|
+
location?: string | null;
|
|
74
|
+
email?: string | null;
|
|
75
|
+
blog?: string | null;
|
|
76
|
+
twitter_username?: string | null;
|
|
77
|
+
public_repos?: number;
|
|
78
|
+
followers?: number;
|
|
79
|
+
created_at: string;
|
|
80
|
+
updated_at: string;
|
|
81
|
+
}
|
|
82
|
+
interface RawGitHubContributor {
|
|
83
|
+
id: number;
|
|
84
|
+
login: string;
|
|
85
|
+
avatar_url: string;
|
|
86
|
+
html_url: string;
|
|
87
|
+
type?: string;
|
|
88
|
+
contributions?: number;
|
|
89
|
+
}
|
|
90
|
+
interface RawGitHubRelease {
|
|
91
|
+
id: number;
|
|
92
|
+
name?: string | null;
|
|
93
|
+
tag_name: string;
|
|
94
|
+
target_commitish: string;
|
|
95
|
+
body?: string | null;
|
|
96
|
+
draft?: boolean;
|
|
97
|
+
prerelease?: boolean;
|
|
98
|
+
created_at: string;
|
|
99
|
+
published_at?: string | null;
|
|
100
|
+
html_url: string;
|
|
101
|
+
author?: {
|
|
102
|
+
login: string;
|
|
103
|
+
id: number;
|
|
104
|
+
avatar_url: string;
|
|
105
|
+
} | null;
|
|
106
|
+
}
|
|
107
|
+
interface NormalizedDeveloper {
|
|
108
|
+
id: number;
|
|
109
|
+
login: string;
|
|
110
|
+
name: string | null;
|
|
111
|
+
avatarUrl: string;
|
|
112
|
+
htmlUrl: string;
|
|
113
|
+
type: string;
|
|
114
|
+
company: string | null;
|
|
115
|
+
blog: string | null;
|
|
116
|
+
location: string | null;
|
|
117
|
+
email: string | null;
|
|
118
|
+
bio: string | null;
|
|
119
|
+
twitterUsername: string | null;
|
|
120
|
+
publicRepos: number;
|
|
121
|
+
publicGists: number;
|
|
122
|
+
followers: number;
|
|
123
|
+
following: number;
|
|
124
|
+
createdAt: string;
|
|
125
|
+
updatedAt: string;
|
|
126
|
+
}
|
|
127
|
+
interface NormalizedRepository {
|
|
128
|
+
id: number;
|
|
129
|
+
name: string;
|
|
130
|
+
fullName: string;
|
|
131
|
+
owner: {
|
|
132
|
+
login: string;
|
|
133
|
+
id: number;
|
|
134
|
+
avatarUrl: string;
|
|
135
|
+
type: string;
|
|
136
|
+
};
|
|
137
|
+
htmlUrl: string;
|
|
138
|
+
description: string | null;
|
|
139
|
+
isFork: boolean;
|
|
140
|
+
createdAt: string;
|
|
141
|
+
updatedAt: string;
|
|
142
|
+
pushedAt: string;
|
|
143
|
+
homepage: string | null;
|
|
144
|
+
size: number;
|
|
145
|
+
stargazersCount: number;
|
|
146
|
+
watchersCount: number;
|
|
147
|
+
language: string | null;
|
|
148
|
+
forksCount: number;
|
|
149
|
+
openIssuesCount: number;
|
|
150
|
+
defaultBranch: string;
|
|
151
|
+
topics: string[];
|
|
152
|
+
isArchived: boolean;
|
|
153
|
+
}
|
|
154
|
+
interface NormalizedOrganization {
|
|
155
|
+
id: number;
|
|
156
|
+
login: string;
|
|
157
|
+
name: string | null;
|
|
158
|
+
description: string | null;
|
|
159
|
+
avatarUrl: string;
|
|
160
|
+
htmlUrl: string;
|
|
161
|
+
location: string | null;
|
|
162
|
+
email: string | null;
|
|
163
|
+
blog: string | null;
|
|
164
|
+
twitterUsername: string | null;
|
|
165
|
+
publicRepos: number;
|
|
166
|
+
followers: number;
|
|
167
|
+
createdAt: string;
|
|
168
|
+
updatedAt: string;
|
|
169
|
+
}
|
|
170
|
+
interface NormalizedContributor {
|
|
171
|
+
id: number;
|
|
172
|
+
login: string;
|
|
173
|
+
avatarUrl: string;
|
|
174
|
+
htmlUrl: string;
|
|
175
|
+
type: string;
|
|
176
|
+
contributions: number;
|
|
177
|
+
}
|
|
178
|
+
interface NormalizedLanguage {
|
|
179
|
+
name: string;
|
|
180
|
+
bytes: number;
|
|
181
|
+
}
|
|
182
|
+
interface NormalizedRelease {
|
|
183
|
+
id: number;
|
|
184
|
+
name: string | null;
|
|
185
|
+
tagName: string;
|
|
186
|
+
targetCommitish: string;
|
|
187
|
+
body: string | null;
|
|
188
|
+
draft: boolean;
|
|
189
|
+
prerelease: boolean;
|
|
190
|
+
createdAt: string;
|
|
191
|
+
publishedAt: string | null;
|
|
192
|
+
htmlUrl: string;
|
|
193
|
+
author: {
|
|
194
|
+
login: string;
|
|
195
|
+
id: number;
|
|
196
|
+
avatarUrl: string;
|
|
197
|
+
} | null;
|
|
198
|
+
}
|
|
199
|
+
interface InputDetectionResult {
|
|
200
|
+
platform: "github" | "npm" | "stackoverflow" | "unknown";
|
|
201
|
+
type: "user" | "org" | "repo" | "package" | "unknown";
|
|
202
|
+
owner?: string;
|
|
203
|
+
repo?: string;
|
|
204
|
+
name?: string;
|
|
205
|
+
profileId?: string;
|
|
206
|
+
rawInput: string;
|
|
207
|
+
}
|
|
208
|
+
interface LinkedIdentitySuggestions {
|
|
209
|
+
stackoverflow?: {
|
|
210
|
+
profileId: string;
|
|
211
|
+
displayName: string;
|
|
212
|
+
url: string;
|
|
213
|
+
};
|
|
214
|
+
npm?: {
|
|
215
|
+
username: string;
|
|
216
|
+
url: string;
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
declare function fetchDeveloper(username?: string, options?: GitHubFetchOptions): Promise<NormalizedDeveloper>;
|
|
221
|
+
declare function fetchRepositories(owner?: string, options?: GitHubFetchOptions): Promise<NormalizedRepository[]>;
|
|
222
|
+
declare function fetchRepository(owner: string, repo: string, options?: GitHubFetchOptions): Promise<NormalizedRepository>;
|
|
223
|
+
declare function fetchOrganizations(username?: string, options?: GitHubFetchOptions): Promise<NormalizedOrganization[]>;
|
|
224
|
+
declare function fetchContributors(owner: string, repo: string, options?: GitHubFetchOptions): Promise<NormalizedContributor[]>;
|
|
225
|
+
declare function fetchLanguages(owner: string, repo: string, options?: GitHubFetchOptions): Promise<NormalizedLanguage[]>;
|
|
226
|
+
declare function fetchReleases(owner: string, repo: string, options?: GitHubFetchOptions): Promise<NormalizedRelease[]>;
|
|
227
|
+
declare function fetchOrganization(login: string, options?: GitHubFetchOptions): Promise<NormalizedOrganization>;
|
|
228
|
+
declare function detectInput(input: string): InputDetectionResult;
|
|
229
|
+
declare function suggestLinkedIdentities(developer: NormalizedDeveloper, _repositories: NormalizedRepository[]): LinkedIdentitySuggestions;
|
|
230
|
+
|
|
231
|
+
export { type GitHubFetchOptions, GitHubHttpError, GitHubRateLimitError, type InputDetectionResult, type LinkedIdentitySuggestions, type NormalizedContributor, type NormalizedDeveloper, type NormalizedLanguage, type NormalizedOrganization, type NormalizedRelease, type NormalizedRepository, type RawGitHubContributor, type RawGitHubOrganization, type RawGitHubRelease, type RawGitHubRepository, type RawGitHubUser, detectInput, fetchContributors, fetchDeveloper, fetchLanguages, fetchOrganization, fetchOrganizations, fetchReleases, fetchRepositories, fetchRepository, suggestLinkedIdentities };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var d=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var U=(t,e)=>{for(var n in e)d(t,n,{get:e[n],enumerable:!0})},O=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of G(e))!x.call(t,r)&&r!==n&&d(t,r,{get:()=>e[r],enumerable:!(i=H(e,r))||i.enumerable});return t};var k=t=>O(d({},"__esModule",{value:!0}),t);var E={};U(E,{GitHubHttpError:()=>p,GitHubRateLimitError:()=>c,detectInput:()=>B,fetchContributors:()=>F,fetchDeveloper:()=>A,fetchLanguages:()=>D,fetchOrganization:()=>W,fetchOrganizations:()=>T,fetchReleases:()=>L,fetchRepositories:()=>P,fetchRepository:()=>C,suggestLinkedIdentities:()=>j});module.exports=k(E);var p=class extends Error{status;statusText;constructor(e,n,i){super(i),this.name="GitHubHttpError",this.status=e,this.statusText=n}},c=class extends Error{limit;remaining;resetTime;constructor(e,n,i,r){super(r),this.name="GitHubRateLimitError",this.limit=e,this.remaining=n,this.resetTime=i}};function _(t){let e=t?.token??process.env.GITHUB_TOKEN??process.env.GITHUB_PAT,n=t?.baseUrl??"https://api.github.com",i={Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"};return e&&(i.Authorization=`Bearer ${e}`),{baseUrl:n,headers:i}}async function R(t,e){let n=await fetch(t,{headers:e}),i=n.headers.get("x-ratelimit-limit"),r=n.headers.get("x-ratelimit-remaining"),s=n.headers.get("x-ratelimit-reset");if((n.status===403||n.status===429)&&r==="0"&&s){let a=i?Number.parseInt(i,10):0,g=Number.parseInt(r,10),o=new Date(Number.parseInt(s,10)*1e3);throw new c(a,g,o,`GitHub API Rate Limit Exceeded. Resets at ${o.toISOString()}`)}if(!n.ok){let a=await n.text().catch(()=>"");throw new p(n.status,n.statusText,`GitHub API request failed with status ${n.status}: ${a||n.statusText}`)}return n}async function u(t,e){let{baseUrl:n,headers:i}=_(e),r=t.startsWith("http://")||t.startsWith("https://")?t:`${n}${t.startsWith("/")?"":"/"}${t}`;return(await R(r,i)).json()}async function m(t,e){let{baseUrl:n,headers:i}=_(e),r=[],s=null,a=e?.perPage??100,g=e?.page,o=t;if(!o.startsWith("http://")&&!o.startsWith("https://")){let b=o.includes("?")?"&":"?",l=[];a!==void 0&&l.push(`per_page=${a}`),g!==void 0&&l.push(`page=${g}`),l.length>0&&(o=`${o}${b}${l.join("&")}`)}do{let b=s??(o.startsWith("http://")||o.startsWith("https://")?o:`${n}${o.startsWith("/")?"":"/"}${o}`),l=await R(b,i),h=await l.json();if(Array.isArray(h))r.push(...h);else break;if(e?.allPages===!1||g!==void 0)break;let f=l.headers.get("link");if(f){let y=f.match(/<([^>]+)>;\s*rel="next"/);s=y?y[1]:null}else s=null}while(s);return r}function N(t){return{id:t.id,login:t.login,name:t.name??null,avatarUrl:t.avatar_url,htmlUrl:t.html_url,type:t.type,company:t.company??null,blog:t.blog??null,location:t.location??null,email:t.email??null,bio:t.bio??null,twitterUsername:t.twitter_username??null,publicRepos:t.public_repos??0,publicGists:t.public_gists??0,followers:t.followers??0,following:t.following??0,createdAt:t.created_at,updatedAt:t.updated_at}}function z(t){return{id:t.id,name:t.name,fullName:t.full_name,owner:{login:t.owner?.login??"",id:t.owner?.id??0,avatarUrl:t.owner?.avatar_url??"",type:t.owner?.type??""},htmlUrl:t.html_url,description:t.description??null,isFork:t.fork??!1,createdAt:t.created_at,updatedAt:t.updated_at,pushedAt:t.pushed_at,homepage:t.homepage??null,size:t.size??0,stargazersCount:t.stargazers_count??0,watchersCount:t.watchers_count??0,language:t.language??null,forksCount:t.forks_count??0,openIssuesCount:t.open_issues_count??0,defaultBranch:t.default_branch??"main",topics:t.topics??[],isArchived:t.archived??!1}}function w(t){return{id:t.id,login:t.login,name:t.name??null,description:t.description??null,avatarUrl:t.avatar_url,htmlUrl:t.html_url,location:t.location??null,email:t.email??null,blog:t.blog??null,twitterUsername:t.twitter_username??null,publicRepos:t.public_repos??0,followers:t.followers??0,createdAt:t.created_at,updatedAt:t.updated_at}}function $(t){return{id:t.id,login:t.login,avatarUrl:t.avatar_url,htmlUrl:t.html_url,type:t.type??"User",contributions:t.contributions??0}}function v(t){return{id:t.id,name:t.name??null,tagName:t.tag_name,targetCommitish:t.target_commitish,body:t.body??null,draft:t.draft??!1,prerelease:t.prerelease??!1,createdAt:t.created_at,publishedAt:t.published_at??null,htmlUrl:t.html_url,author:t.author?{login:t.author.login,id:t.author.id,avatarUrl:t.author.avatar_url}:null}}async function I(t,e){try{return(await u(`/users/${t}`,e)).type==="Organization"?"Organization":"User"}catch{return"User"}}async function A(t,e){let n=t?`/users/${t}`:"/user",i=await u(n,e);if(i.type==="Organization")throw new Error(`Requested entity '${t||"authenticated user"}' is an Organization, not a User.`);return N(i)}async function P(t,e){let n;return t?n=await I(t,e)==="Organization"?`/orgs/${t}/repos`:`/users/${t}/repos`:n="/user/repos",(await m(n,e)).map(z)}async function C(t,e,n){let i=await u(`/repos/${t}/${e}`,n);return z(i)}async function T(t,e){let n=t?`/users/${t}/orgs`:"/user/orgs",i=await m(n,e);return(await Promise.all(i.map(s=>u(`/orgs/${s.login}`,e)))).map(w)}async function F(t,e,n){return(await m(`/repos/${t}/${e}/contributors`,n)).map($)}async function D(t,e,n){let i=await u(`/repos/${t}/${e}/languages`,n);return Object.entries(i).map(([r,s])=>({name:r,bytes:s}))}async function L(t,e,n){return(await m(`/repos/${t}/${e}/releases`,n)).map(v)}async function W(t,e){let n=await u(`/orgs/${t}`,e);return w(n)}function B(t){let e=t.trim();try{let n=new URL(e.startsWith("http")?e:`https://${e}`),i=n.hostname.toLowerCase();if(i.includes("github.com")){let r=n.pathname.split("/").filter(Boolean);if(r.length===1)return{platform:"github",type:"unknown",owner:r[0],rawInput:e};if(r.length>=2)return{platform:"github",type:"repo",owner:r[0],repo:r[1],rawInput:e}}if(i.includes("npmjs.com")){let r=n.pathname.split("/").filter(Boolean);if(r[0]==="package")return{platform:"npm",type:"package",name:r.slice(1).join("/"),rawInput:e};if(r[0].startsWith("~"))return{platform:"npm",type:"user",name:r[0].slice(1),rawInput:e};if(r[0].startsWith("@"))return r.length===1?{platform:"npm",type:"org",name:r[0],rawInput:e}:{platform:"npm",type:"package",name:`${r[0]}/${r[1]}`,rawInput:e}}if(i.includes("stackoverflow.com")){let r=n.pathname.split("/").filter(Boolean);if(r[0]==="users"&&r[1])return{platform:"stackoverflow",type:"user",profileId:r[1],name:r[2]||void 0,rawInput:e}}}catch{}if(e.includes("/")){let n=e.split("/");return{platform:"github",type:"repo",owner:n[0],repo:n[1],rawInput:e}}return{platform:"github",type:"unknown",owner:e,rawInput:e}}function j(t,e){let n={},i=[t.blog,t.bio,t.company].filter(Boolean),r=/stackoverflow\.com\/users\/(\d+)\/([a-zA-Z0-9_-]+)?/;for(let s of i){let a=s.match(r);if(a){n.stackoverflow={profileId:a[1],displayName:a[2]||t.login,url:`https://stackoverflow.com/users/${a[1]}/${a[2]||""}`};break}}return n.npm={username:t.login,url:`https://www.npmjs.com/~${t.login}`},n}0&&(module.exports={GitHubHttpError,GitHubRateLimitError,detectInput,fetchContributors,fetchDeveloper,fetchLanguages,fetchOrganization,fetchOrganizations,fetchReleases,fetchRepositories,fetchRepository,suggestLinkedIdentities});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var c=class extends Error{status;statusText;constructor(n,e,i){super(i),this.name="GitHubHttpError",this.status=n,this.statusText=e}},m=class extends Error{limit;remaining;resetTime;constructor(n,e,i,r){super(r),this.name="GitHubRateLimitError",this.limit=n,this.remaining=e,this.resetTime=i}};function y(t){let n=t?.token??process.env.GITHUB_TOKEN??process.env.GITHUB_PAT,e=t?.baseUrl??"https://api.github.com",i={Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"};return n&&(i.Authorization=`Bearer ${n}`),{baseUrl:e,headers:i}}async function _(t,n){let e=await fetch(t,{headers:n}),i=e.headers.get("x-ratelimit-limit"),r=e.headers.get("x-ratelimit-remaining"),s=e.headers.get("x-ratelimit-reset");if((e.status===403||e.status===429)&&r==="0"&&s){let a=i?Number.parseInt(i,10):0,g=Number.parseInt(r,10),o=new Date(Number.parseInt(s,10)*1e3);throw new m(a,g,o,`GitHub API Rate Limit Exceeded. Resets at ${o.toISOString()}`)}if(!e.ok){let a=await e.text().catch(()=>"");throw new c(e.status,e.statusText,`GitHub API request failed with status ${e.status}: ${a||e.statusText}`)}return e}async function u(t,n){let{baseUrl:e,headers:i}=y(n),r=t.startsWith("http://")||t.startsWith("https://")?t:`${e}${t.startsWith("/")?"":"/"}${t}`;return(await _(r,i)).json()}async function p(t,n){let{baseUrl:e,headers:i}=y(n),r=[],s=null,a=n?.perPage??100,g=n?.page,o=t;if(!o.startsWith("http://")&&!o.startsWith("https://")){let b=o.includes("?")?"&":"?",l=[];a!==void 0&&l.push(`per_page=${a}`),g!==void 0&&l.push(`page=${g}`),l.length>0&&(o=`${o}${b}${l.join("&")}`)}do{let b=s??(o.startsWith("http://")||o.startsWith("https://")?o:`${e}${o.startsWith("/")?"":"/"}${o}`),l=await _(b,i),d=await l.json();if(Array.isArray(d))r.push(...d);else break;if(n?.allPages===!1||g!==void 0)break;let h=l.headers.get("link");if(h){let f=h.match(/<([^>]+)>;\s*rel="next"/);s=f?f[1]:null}else s=null}while(s);return r}function w(t){return{id:t.id,login:t.login,name:t.name??null,avatarUrl:t.avatar_url,htmlUrl:t.html_url,type:t.type,company:t.company??null,blog:t.blog??null,location:t.location??null,email:t.email??null,bio:t.bio??null,twitterUsername:t.twitter_username??null,publicRepos:t.public_repos??0,publicGists:t.public_gists??0,followers:t.followers??0,following:t.following??0,createdAt:t.created_at,updatedAt:t.updated_at}}function R(t){return{id:t.id,name:t.name,fullName:t.full_name,owner:{login:t.owner?.login??"",id:t.owner?.id??0,avatarUrl:t.owner?.avatar_url??"",type:t.owner?.type??""},htmlUrl:t.html_url,description:t.description??null,isFork:t.fork??!1,createdAt:t.created_at,updatedAt:t.updated_at,pushedAt:t.pushed_at,homepage:t.homepage??null,size:t.size??0,stargazersCount:t.stargazers_count??0,watchersCount:t.watchers_count??0,language:t.language??null,forksCount:t.forks_count??0,openIssuesCount:t.open_issues_count??0,defaultBranch:t.default_branch??"main",topics:t.topics??[],isArchived:t.archived??!1}}function z(t){return{id:t.id,login:t.login,name:t.name??null,description:t.description??null,avatarUrl:t.avatar_url,htmlUrl:t.html_url,location:t.location??null,email:t.email??null,blog:t.blog??null,twitterUsername:t.twitter_username??null,publicRepos:t.public_repos??0,followers:t.followers??0,createdAt:t.created_at,updatedAt:t.updated_at}}function H(t){return{id:t.id,login:t.login,avatarUrl:t.avatar_url,htmlUrl:t.html_url,type:t.type??"User",contributions:t.contributions??0}}function G(t){return{id:t.id,name:t.name??null,tagName:t.tag_name,targetCommitish:t.target_commitish,body:t.body??null,draft:t.draft??!1,prerelease:t.prerelease??!1,createdAt:t.created_at,publishedAt:t.published_at??null,htmlUrl:t.html_url,author:t.author?{login:t.author.login,id:t.author.id,avatarUrl:t.author.avatar_url}:null}}async function x(t,n){try{return(await u(`/users/${t}`,n)).type==="Organization"?"Organization":"User"}catch{return"User"}}async function $(t,n){let e=t?`/users/${t}`:"/user",i=await u(e,n);if(i.type==="Organization")throw new Error(`Requested entity '${t||"authenticated user"}' is an Organization, not a User.`);return w(i)}async function v(t,n){let e;return t?e=await x(t,n)==="Organization"?`/orgs/${t}/repos`:`/users/${t}/repos`:e="/user/repos",(await p(e,n)).map(R)}async function I(t,n,e){let i=await u(`/repos/${t}/${n}`,e);return R(i)}async function A(t,n){let e=t?`/users/${t}/orgs`:"/user/orgs",i=await p(e,n);return(await Promise.all(i.map(s=>u(`/orgs/${s.login}`,n)))).map(z)}async function P(t,n,e){return(await p(`/repos/${t}/${n}/contributors`,e)).map(H)}async function C(t,n,e){let i=await u(`/repos/${t}/${n}/languages`,e);return Object.entries(i).map(([r,s])=>({name:r,bytes:s}))}async function T(t,n,e){return(await p(`/repos/${t}/${n}/releases`,e)).map(G)}async function F(t,n){let e=await u(`/orgs/${t}`,n);return z(e)}function D(t){let n=t.trim();try{let e=new URL(n.startsWith("http")?n:`https://${n}`),i=e.hostname.toLowerCase();if(i.includes("github.com")){let r=e.pathname.split("/").filter(Boolean);if(r.length===1)return{platform:"github",type:"unknown",owner:r[0],rawInput:n};if(r.length>=2)return{platform:"github",type:"repo",owner:r[0],repo:r[1],rawInput:n}}if(i.includes("npmjs.com")){let r=e.pathname.split("/").filter(Boolean);if(r[0]==="package")return{platform:"npm",type:"package",name:r.slice(1).join("/"),rawInput:n};if(r[0].startsWith("~"))return{platform:"npm",type:"user",name:r[0].slice(1),rawInput:n};if(r[0].startsWith("@"))return r.length===1?{platform:"npm",type:"org",name:r[0],rawInput:n}:{platform:"npm",type:"package",name:`${r[0]}/${r[1]}`,rawInput:n}}if(i.includes("stackoverflow.com")){let r=e.pathname.split("/").filter(Boolean);if(r[0]==="users"&&r[1])return{platform:"stackoverflow",type:"user",profileId:r[1],name:r[2]||void 0,rawInput:n}}}catch{}if(n.includes("/")){let e=n.split("/");return{platform:"github",type:"repo",owner:e[0],repo:e[1],rawInput:n}}return{platform:"github",type:"unknown",owner:n,rawInput:n}}function L(t,n){let e={},i=[t.blog,t.bio,t.company].filter(Boolean),r=/stackoverflow\.com\/users\/(\d+)\/([a-zA-Z0-9_-]+)?/;for(let s of i){let a=s.match(r);if(a){e.stackoverflow={profileId:a[1],displayName:a[2]||t.login,url:`https://stackoverflow.com/users/${a[1]}/${a[2]||""}`};break}}return e.npm={username:t.login,url:`https://www.npmjs.com/~${t.login}`},e}export{c as GitHubHttpError,m as GitHubRateLimitError,D as detectInput,P as fetchContributors,$ as fetchDeveloper,C as fetchLanguages,F as fetchOrganization,A as fetchOrganizations,T as fetchReleases,v as fetchRepositories,I as fetchRepository,L as suggestLinkedIdentities};
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ossintel/github-normalizer",
|
|
3
|
+
"author": "Mayank Kumar Chaudhari <https://mayankchaudhari.com>",
|
|
4
|
+
"private": false,
|
|
5
|
+
"version": "0.0.0",
|
|
6
|
+
"description": "Typed utilities for fetching and normalizing GitHub REST and GraphQL data into a consistent domain model for analytics and reporting.",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"module": "./dist/index.mjs",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": {
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
15
|
+
"default": "./dist/index.mjs"
|
|
16
|
+
},
|
|
17
|
+
"require": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/mayank1513/ossintel",
|
|
27
|
+
"directory": "packages/github-normalizer"
|
|
28
|
+
},
|
|
29
|
+
"bugs": "https://github.com/mayank1513/ossintel/issues",
|
|
30
|
+
"homepage": "https://github.com/mayank1513/ossintel/blob/main/packages/github-normalizer/README.md",
|
|
31
|
+
"sideEffects": false,
|
|
32
|
+
"files": [
|
|
33
|
+
"dist/**"
|
|
34
|
+
],
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "latest",
|
|
37
|
+
"tsup": "latest",
|
|
38
|
+
"typescript": "latest"
|
|
39
|
+
},
|
|
40
|
+
"forge": {
|
|
41
|
+
"aliases": [],
|
|
42
|
+
"icon": "LibraryBig",
|
|
43
|
+
"description": ""
|
|
44
|
+
},
|
|
45
|
+
"funding": [
|
|
46
|
+
{
|
|
47
|
+
"type": "github",
|
|
48
|
+
"url": "https://github.com/sponsors/mayank1513"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "github",
|
|
52
|
+
"url": "https://github.com/sponsors/mayank1513"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"keywords": [
|
|
56
|
+
"@ossintel/github-normalizer",
|
|
57
|
+
"turboforge"
|
|
58
|
+
],
|
|
59
|
+
"scripts": {
|
|
60
|
+
"build": "tsup && gzip -c dist/index.js | wc -c",
|
|
61
|
+
"clean": "rm -rf dist",
|
|
62
|
+
"dev": "tsup --watch"
|
|
63
|
+
}
|
|
64
|
+
}
|