Skip to content

Commit bcce942

Browse files
committed
Proxy
1 parent 91a314f commit bcce942

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+11947
-24
lines changed

.dev.vars.example

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Authentication - paste your oauth_creds.json content here (as a JSON string)
2+
# You can get this by running the Qwen CLI and copying the oauth_creds.json content
3+
QWEN_CLI_AUTH={ "access_token": "...", "refresh_token": "w-...", "token_type": "Bearer", "resource_url": "portal.qwen.ai", "expiry_date": 1756155744889}
4+
5+
# Default model to use
6+
OPENAI_MODEL='qwen3-coder-plus'
7+
8+
# Optional: API key for user authentication (if set, users must provide it in Authorization header)
9+
# OPENAI_API_KEY='sk-your-secret-key-here'
10+
11+
# Optional: Custom base URL (will use resource_url from OAuth if available)
12+
# OPENAI_BASE_URL='https://api-inference.modelscope.cn/v1'

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = tab
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.yml]
12+
indent_style = space

.github/FUNDING.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# These are supported funding model platforms
2+
3+
github: [GewoonJaap] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12+
polar: # Replace with a single Polar username
13+
buy_me_a_coffee: mrproper # Replace with a single Buy Me a Coffee username
14+
thanks_dev: # Replace with a single thanks.dev username
15+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "npm" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/workflows/deploy.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Deploy Cloudflare Worker
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
name: Deploy
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Deploy
18+
uses: cloudflare/wrangler-action@v3
19+
with:
20+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Create and publish Docker image
2+
3+
on:
4+
workflow_dispatch: # Manual trigger
5+
push:
6+
branches:
7+
- main
8+
tags:
9+
- 'v*'
10+
11+
env:
12+
REGISTRY: ghcr.io
13+
IMAGE_NAME: ${{ github.repository }}
14+
15+
jobs:
16+
build-and-push-image:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
packages: write
21+
id-token: write
22+
attestations: write
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Set up QEMU
28+
uses: docker/setup-qemu-action@v3
29+
with:
30+
platforms: all
31+
32+
- name: Set up Docker Buildx
33+
id: buildx
34+
uses: docker/setup-buildx-action@v3
35+
36+
- name: Log in to the Container registry
37+
if: github.event_name != 'pull_request'
38+
uses: docker/login-action@v3
39+
with:
40+
registry: ${{ env.REGISTRY }}
41+
username: ${{ github.actor }}
42+
password: ${{ secrets.GITHUB_TOKEN }}
43+
44+
- name: Extract metadata (tags, labels) for Docker
45+
id: meta
46+
uses: docker/metadata-action@v5
47+
with:
48+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
49+
tags: |
50+
type=ref,event=branch
51+
type=ref,event=pr
52+
type=semver,pattern={{version}}
53+
type=semver,pattern={{major}}.{{minor}}
54+
type=semver,pattern={{major}}
55+
type=raw,value=latest,enable={{is_default_branch}}
56+
labels: |
57+
org.opencontainers.image.title=Qwen Code CLI Wrapper
58+
org.opencontainers.image.description=OpenAI-compatible API for Qwen code models via OAuth
59+
org.opencontainers.image.url=https://github.com/GewoonJaap/qwen-code-cli-wrapper
60+
org.opencontainers.image.source=https://github.com/GewoonJaap/qwen-code-cli-wrapper
61+
org.opencontainers.image.vendor=GewoonJaap
62+
org.opencontainers.image.licenses=MIT
63+
64+
- name: Build and push Docker image
65+
id: push
66+
uses: docker/build-push-action@v5
67+
with:
68+
context: .
69+
file: ./Dockerfile
70+
push: ${{ github.event_name != 'pull_request' }}
71+
tags: ${{ steps.meta.outputs.tags }}
72+
labels: ${{ steps.meta.outputs.labels }}
73+
platforms: linux/amd64,linux/arm64
74+
cache-from: type=gha
75+
cache-to: type=gha,mode=max
76+
build-args: |
77+
NODE_ENV=production
78+
79+
- name: Generate artifact attestation
80+
if: github.event_name != 'pull_request'
81+
uses: actions/attest-build-provenance@v1
82+
with:
83+
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
84+
subject-digest: ${{ steps.push.outputs.digest }}
85+
push-to-registry: true

.github/workflows/node.js.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Build & Style Check
5+
6+
permissions:
7+
contents: read
8+
9+
on:
10+
push:
11+
branches: [ "main" ]
12+
pull_request:
13+
branches: [ "main" ]
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
node-version: [22.x]
21+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
- name: Use Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v3
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
cache: 'npm'
30+
# setup yarn
31+
- name: Setup Yarn
32+
run: npm install -g yarn
33+
# install dependencies
34+
- name: Install Dependencies
35+
run: yarn install
36+
# build
37+
- name: Build
38+
run: yarn build
39+
# formatting check
40+
- name: Formatting Check
41+
run: yarn format:check
42+
43+
- name: Lint Check
44+
run: yarn lint

.github/workflows/stale.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
2+
#
3+
# You can adjust the behavior by modifying this file.
4+
# For more information, see:
5+
# https://github.com/actions/stale
6+
name: Mark stale issues and pull requests
7+
8+
on:
9+
schedule:
10+
- cron: '37 3 * * *'
11+
12+
jobs:
13+
stale:
14+
15+
runs-on: ubuntu-latest
16+
permissions:
17+
issues: write
18+
pull-requests: write
19+
20+
steps:
21+
- uses: actions/stale@v5
22+
with:
23+
repo-token: ${{ secrets.GITHUB_TOKEN }}
24+
stale-issue-message: 'Stale issue message'
25+
stale-pr-message: 'Stale pull request message'
26+
stale-issue-label: 'no-issue-activity'
27+
stale-pr-label: 'no-pr-activity'

0 commit comments

Comments
 (0)