@unveil/vk 0.2.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/dist/index.d.mts +14 -0
- package/dist/index.mjs +1 -0
- package/package.json +49 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GitHubEvent, IdentifyResult } from "@unveil/identity";
|
|
2
|
+
//#region src/index.d.ts
|
|
3
|
+
type AnalyzeOptions = {
|
|
4
|
+
token?: string;
|
|
5
|
+
showEvents?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type AnalyzeReturn = {
|
|
8
|
+
analysis: IdentifyResult;
|
|
9
|
+
events: GitHubEvent[];
|
|
10
|
+
eventsCount: number;
|
|
11
|
+
};
|
|
12
|
+
declare function analyze(username: string, options?: AnalyzeOptions): Promise<AnalyzeReturn>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { AnalyzeOptions, AnalyzeReturn, analyze };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{identify as e}from"@unveil/identity";import{Octokit as t}from"octokit";async function n(n,r){let i=new t({auth:r?.token}),{data:a}=await i.rest.users.getByUsername({username:n}),o=Array.from({length:3},(e,t)=>i.rest.activity.listPublicEventsForUser({username:n,per_page:100,page:t+1})),s=(await Promise.all(o)).flatMap(e=>e.data);return{analysis:e({user:a,events:s}),events:r?.showEvents?s:[],eventsCount:s.length}}export{n as analyze};
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@unveil/vk",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Automation-pattern analysis for GitHub accounts",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"packageManager": "pnpm@11.22.0",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./dist/index.mjs",
|
|
9
|
+
"./package.json": "./package.json"
|
|
10
|
+
},
|
|
11
|
+
"types": "./dist/index.d.mts",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"test": "vitest run",
|
|
20
|
+
"test:watch": "vitest",
|
|
21
|
+
"check": "biome check",
|
|
22
|
+
"check:fix": "biome check --write",
|
|
23
|
+
"dev": "tsdown --watch",
|
|
24
|
+
"build": "tsdown",
|
|
25
|
+
"prepublishOnly": "pnpm test && pnpm check && pnpm build"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"GitHub",
|
|
29
|
+
"ai",
|
|
30
|
+
"ai-agent",
|
|
31
|
+
"ai-detection",
|
|
32
|
+
"automation",
|
|
33
|
+
"behavioral-analysis"
|
|
34
|
+
],
|
|
35
|
+
"author": "Matteo Gabriele <m.gabriele.dev@gmail.com>",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@biomejs/biome": "^2.5.6",
|
|
39
|
+
"@types/node": "^26.1.2",
|
|
40
|
+
"publint": "^0.3.22",
|
|
41
|
+
"tsdown": "^0.22.14",
|
|
42
|
+
"typescript": "^6.0.3",
|
|
43
|
+
"vitest": "^4.1.10"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@unveil/identity": "^2.0.2",
|
|
47
|
+
"octokit": "^5.0.5"
|
|
48
|
+
}
|
|
49
|
+
}
|