Skip to content

Commit 57128af

Browse files
authored
Merge pull request #4 from ericc-ch/master
upstream to fork
2 parents 9359cf3 + 85ad7bb commit 57128af

12 files changed

Lines changed: 855 additions & 326 deletions

File tree

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: oven-sh/setup-bun@v2
16+
with:
17+
bun-version: latest
18+
19+
- name: Install dependencies
20+
run: bun install
21+
22+
- name: Run linter
23+
run: bun run lint
24+
25+
- name: Run type check
26+
run: bun run typecheck
27+
28+
- name: Run tests
29+
run: bun test
30+
31+
- name: Build
32+
run: bun run build

.github/workflows/deploy-pages.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
workflow_dispatch:
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
deploy:
22+
runs-on: ubuntu-latest
23+
environment:
24+
name: github-pages
25+
url: ${{ steps.deployment.outputs.page_url }}
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Setup Pages
31+
uses: actions/configure-pages@v4
32+
33+
- name: Upload artifact
34+
uses: actions/upload-pages-artifact@v3
35+
with:
36+
path: ./pages
37+
38+
- name: Deploy to GitHub Pages
39+
id: deployment
40+
uses: actions/deploy-pages@v4

AGENTS.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
- **Test all:**
1414
`bun test`
1515
- **Test single file:**
16-
`bun test tests/claude-request.test.ts`- **Start (prod):**
16+
`bun test tests/claude-request.test.ts`
17+
- **Start (prod):**
1718
`bun run start`
1819

1920
## Code Style Guidelines
@@ -35,7 +36,8 @@
3536
- **Modules:**
3637
Use ESNext modules, no CommonJS.
3738
- **Testing:**
38-
Use Bun’s built-in test runner. Place tests in `tests/`, name as `*.test.ts`.- **Linting:**
39+
Use Bun's built-in test runner. Place tests in `tests/`, name as `*.test.ts`.
40+
- **Linting:**
3941
Uses `@echristian/eslint-config` (see npm for details). Includes stylistic, unused imports, regex, and package.json rules.
4042
- **Paths:**
4143
Use path aliases (`~/*`) for imports from `src/`.

bun.lock

Lines changed: 169 additions & 303 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

opencode.json

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
{
2-
"$schema": "https://opencode.ai/config.json",
3-
42
"mcp": {
5-
"context7": {
6-
"type": "remote",
7-
"url": "https://mcp.context7.com/mcp",
3+
"playwright": {
4+
"type": "local",
5+
"command": [
6+
"docker",
7+
"container",
8+
"run",
9+
"-i",
10+
"--rm",
11+
"--init",
12+
"--network",
13+
"host",
14+
"mcr.microsoft.com/playwright/mcp"
15+
],
816
"enabled": true
917
}
10-
}
11-
}
18+
},
19+
"$schema": "https://opencode.ai/config.json"
20+
}

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "copilot-api",
3-
"version": "0.5.12",
3+
"version": "0.5.13",
44
"description": "Turn GitHub Copilot into OpenAI/Anthropic API compatible server. Usable with Claude Code!",
55
"keywords": [
66
"proxy",
@@ -22,7 +22,7 @@
2222
"dist"
2323
],
2424
"scripts": {
25-
"build": "tsup",
25+
"build": "tsdown",
2626
"dev": "bun run --watch ./src/main.ts",
2727
"knip": "knip-bun",
2828
"lint": "eslint . --cache",
@@ -44,20 +44,20 @@
4444
"consola": "^3.4.2",
4545
"fetch-event-stream": "^0.1.5",
4646
"gpt-tokenizer": "^3.0.1",
47-
"hono": "^4.9.0",
47+
"hono": "^4.9.4",
4848
"srvx": "^0.8.6",
4949
"tiny-invariant": "^1.3.3"
5050
},
5151
"devDependencies": {
52-
"@echristian/eslint-config": "^0.0.52",
53-
"@types/bun": "^1.2.19",
54-
"bumpp": "^10.2.2",
55-
"eslint": "^9.33.0",
56-
"knip": "^5.62.0",
52+
"@echristian/eslint-config": "^0.0.53",
53+
"@types/bun": "^1.2.21",
54+
"bumpp": "^10.2.3",
55+
"eslint": "^9.34.0",
56+
"knip": "^5.63.0",
5757
"lint-staged": "^16.1.5",
5858
"prettier-plugin-packagejson": "^2.5.19",
5959
"simple-git-hooks": "^2.13.1",
60-
"tsup": "^8.5.0",
60+
"tsdown": "^0.14.2",
6161
"typescript": "^5.9.2"
6262
}
6363
}

0 commit comments

Comments
 (0)