Skip to content

Commit 11f681e

Browse files
committed
first commit
0 parents  commit 11f681e

Some content is hidden

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

41 files changed

+9298
-0
lines changed

.dockerignore

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Node.js
2+
node_modules
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
7+
# Build output (在构建过程中会重新生成)
8+
dist
9+
10+
# Coverage
11+
coverage
12+
13+
# Environment variables
14+
.env
15+
.env.local
16+
.env.development.local
17+
.env.test.local
18+
.env.production.local
19+
20+
# IDE
21+
.vscode
22+
.idea
23+
24+
# OS
25+
.DS_Store
26+
Thumbs.db
27+
28+
# Git
29+
.git
30+
.gitignore
31+
32+
# Docker
33+
Dockerfile
34+
docker-compose.yaml
35+
.dockerignore
36+
37+
# Testing
38+
test
39+
*.test.ts
40+
*.test.js
41+
42+
# Documentation
43+
README.md
44+
*.md
45+
46+
# Logs
47+
logs
48+
*.log
49+
50+
# Runtime data
51+
pids
52+
*.pid
53+
*.seed
54+
*.pid.lock
55+
56+
# Optional npm cache directory
57+
.npm
58+
59+
# ESLint cache
60+
.eslintcache
61+
62+
# Prettier
63+
.prettierrc
64+
.prettierignore
65+
66+
# 注释掉这些重要文件,确保它们被包含在构建上下文中
67+
# package.json
68+
# package-lock.json
69+
# tsconfig.json
70+
# Dockerfile
71+
# docker-compose.yaml
72+
# .dockerignore

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Environment Variables
2+
# Copy this file to .env and fill in your actual values
3+
4+
# OpenAI API Key
5+
OPENAI_API_KEY=your_openai_api_key_here

.eslintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.vscode/
2+
3+
node_modules/
4+
5+
# Build products
6+
build/
7+
dist/
8+
tools/

.eslintrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"rules": {
3+
"@typescript-eslint/naming-convention": "off",
4+
"@typescript-eslint/ban-ts-comment": "off",
5+
"@typescript-eslint/no-explicit-any": "off",
6+
"@typescript-eslint/explicit-function-return-types": "off",
7+
"@typescript-eslint/explicit-module-boundary-types": "off"
8+
},
9+
"extends": [
10+
"plugin:@typescript-eslint/recommended" // Uses the recommended rules from the @typescript-eslint/eslint-plugin
11+
],
12+
"parser": "@typescript-eslint/parser",
13+
"parserOptions": {
14+
"ecmaVersion": "latest", // Allows for the parsing of modern ECMAScript features
15+
"sourceType": "module" // Allows for the use of imports
16+
},
17+
18+
"env": {
19+
"node": true
20+
}
21+
}

.github/workflows/build.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
with:
22+
submodules: true
23+
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v3
27+
28+
- name: Log in to GitHub Container Registry
29+
uses: docker/login-action@v3
30+
with:
31+
registry: ghcr.io
32+
username: ${{ github.actor }}
33+
password: ${{ secrets.GITHUB_TOKEN }}
34+
35+
- name: Get short SHA
36+
id: sha
37+
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
38+
39+
- name: Extract metadata
40+
id: meta
41+
uses: docker/metadata-action@v5
42+
with:
43+
images: ghcr.io/${{ github.repository_owner }}/paperdebugger-mcp-server
44+
tags: |
45+
type=ref,event=branch
46+
type=ref,event=pr
47+
type=sha,prefix={{branch}}-
48+
49+
- name: Build and push Docker image
50+
uses: docker/build-push-action@v5
51+
with:
52+
context: .
53+
file: ./docker/Dockerfile
54+
push: true
55+
tags: ${{ steps.meta.outputs.tags }}
56+
labels: ${{ steps.meta.outputs.labels }}
57+
cache-from: type=gha
58+
cache-to: type=gha,mode=max

.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Add any directories, files, or patterns you don't want to be tracked by version control
2+
.idea
3+
4+
# ignore vs code project config files
5+
.vs
6+
7+
# ignore logs
8+
logs
9+
*.log
10+
11+
# ignore 3rd party lib
12+
node_modules
13+
14+
# ignore key
15+
*.pem
16+
17+
# Ignore built files
18+
build
19+
dist
20+
21+
22+
# ignore test converage
23+
coverage
24+
25+
# Environment varibles
26+
*.env
27+
*.env.test
28+
*.env copy
29+
30+
#keys
31+
keys/*
32+
!keys/*.md
33+
!keys/*.example
34+
35+
#temp
36+
temp
37+
.DS_Store
38+
39+
*.save
40+
*.save.*

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
build/
2+
coverage/
3+
keys/
4+
logs/
5+
node_modules/
6+
*.md

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"useTabs": false,
3+
"semi": true,
4+
"trailingComma": "all",
5+
"singleQuote": true,
6+
"printWidth": 200,
7+
"tabWidth": 2
8+
}

.vscode/launch.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Launch Program",
11+
"skipFiles": [
12+
"<node_internals>/**"
13+
],
14+
"program": "${workspaceFolder}/dist/app.js",
15+
"preLaunchTask": "tsc: build - tsconfig.json",
16+
"sourceMaps": true,
17+
"resolveSourceMapLocations": [
18+
"${workspaceFolder}/**",
19+
"!**/node_modules/**"
20+
],
21+
// "runtimeArgs": [
22+
// "-r",
23+
// "dotenv/config"
24+
// ],
25+
"outFiles": [
26+
"${workspaceFolder}/build/*.js",
27+
"${workspaceFolder}/build/**/*.js",
28+
"${workspaceFolder}/build/**/**/*.js",
29+
"${workspaceFolder}/build/**/**/**/*.js"
30+
]
31+
},
32+
]
33+
}

.vscode/settings.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"cSpell.words": [
3+
"Buildx",
4+
"documentclass",
5+
"eslintcache",
6+
"healthcheck",
7+
"icmltitle",
8+
"jizhou",
9+
"Junyi",
10+
"newcommand",
11+
"paperdebugger",
12+
"pids",
13+
"SUBSUBSECTION",
14+
"textbf",
15+
"textit",
16+
"texttt",
17+
"todonotes",
18+
"usepackage",
19+
"zhaomin"
20+
],
21+
"javascript.validate.enable": true,
22+
"typescript.preferences.importModuleSpecifier": "relative",
23+
"editor.defaultFormatter": "esbenp.prettier-vscode",
24+
"editor.insertSpaces": true,
25+
"editor.detectIndentation": false,
26+
"editor.tabSize": 2,
27+
"typescript.validate.enable": true,
28+
"typescript.tsdk": "node_modules/typescript/lib",
29+
"[jsonc]": {
30+
"editor.defaultFormatter": "vscode.json-language-features"
31+
},
32+
"[typescript]": {
33+
"editor.defaultFormatter": "esbenp.prettier-vscode"
34+
}
35+
}

0 commit comments

Comments
 (0)