@wix/evalforge-github-client 0.4.0 → 0.5.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/README.md +37 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# @wix/evalforge-github-client
|
|
2
|
+
|
|
3
|
+
A lightweight client for the GitHub Contents API, used to fetch skill directories from GitHub repositories.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { fetchSkillFolder, fetchGitHubFolder, validateGitHubSource } from '@wix/evalforge-github-client';
|
|
9
|
+
|
|
10
|
+
// Fetch a skill folder from a GitHub repo
|
|
11
|
+
const files = await fetchSkillFolder({
|
|
12
|
+
owner: 'my-org',
|
|
13
|
+
repo: 'my-repo',
|
|
14
|
+
path: 'skills/my-skill',
|
|
15
|
+
ref: 'main',
|
|
16
|
+
token: process.env.GITHUB_TOKEN,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// Validate a GitHub source URL
|
|
20
|
+
const isValid = validateGitHubSource(sourceUrl);
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Exports
|
|
24
|
+
|
|
25
|
+
| Function | Description |
|
|
26
|
+
|----------|-------------|
|
|
27
|
+
| `fetchSkillFolder` | Fetch all files in a skill directory from GitHub |
|
|
28
|
+
| `fetchGitHubFolder` | Generic folder fetch from the GitHub Contents API |
|
|
29
|
+
| `validateGitHubSource` | Validate a GitHub source URL/path |
|
|
30
|
+
|
|
31
|
+
## Scripts
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
yarn build # Build CJS + ESM + type declarations
|
|
35
|
+
yarn lint # Run ESLint
|
|
36
|
+
yarn clean # Remove build artifacts
|
|
37
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/evalforge-github-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "GitHub Contents API client for fetching skill directories",
|
|
5
5
|
"files": [
|
|
6
6
|
"build"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"test": "echo 'No tests specified' && exit 0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@wix/evalforge-types": "0.
|
|
18
|
+
"@wix/evalforge-types": "0.30.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@eslint/js": "^9.39.2",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"artifactId": "evalforge-github-client"
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
"falconPackageHash": "
|
|
49
|
+
"falconPackageHash": "e71915e8ace298ee016b4a0ea3c6ac4c9ca584391651f2f78e653b95"
|
|
50
50
|
}
|