Skip to content

Commit bf6b4e4

Browse files
committed
Initial commit
0 parents  commit bf6b4e4

62 files changed

Lines changed: 24840 additions & 0 deletions

Some content is hidden

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

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.github/workflows/ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# .github/workflows/ci.yml
2+
name: Node.js CI & Build
3+
4+
on:
5+
push:
6+
branches: [ "main", "develop" ] # Or your primary branches
7+
pull_request:
8+
branches: [ "main", "develop" ]
9+
10+
jobs:
11+
build-and-test:
12+
runs-on: ubuntu-latest # Using Ubuntu as a common CI runner
13+
14+
strategy:
15+
matrix:
16+
node-version: [18.x] # Specify Node.js versions to test against
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
cache: "npm" # Enable caching for npm dependencies
27+
28+
- name: Install dependencies
29+
- name: Run tests
30+
run: npm test
31+
run: npm ci # Use npm ci for cleaner installs in CI
32+
33+
- name: TypeScript Compile Check (Lint placeholder)
34+
run: npm run build:electron:main && npm run build:electron:preload && npx tsc --project src/renderer/tsconfig.json --noEmit
35+
# This checks if main, preload, and renderer TypeScript code compiles without errors.
36+
# Replace with actual linting command when a linter is added.
37+
38+
# Replace with `npm test` when Jest/React Testing Library tests are added.
39+
40+
- name: Build application (compiles main, preload, renderer)
41+
run: npm run build
42+
# This script typically runs:
43+
# - vite build (for renderer)
44+
# - tsc (for main and preload)
45+
46+
- name: Package application (Linux AppImage example)
47+
run: |
48+
# Need to install dependencies for electron-builder to run on Linux
49+
# sudo apt-get update
50+
# sudo apt-get install -y --no-install-recommends libopenjp2-7 libgconf-2-4 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libgbm1 libnss3 libasound2
51+
# The above dependencies might be needed for a full AppImage build with GUI tests.
52+
# For a headless build check or if runner has them, might not be needed.
53+
# For now, we focus on the command itself.
54+
npm run package -- --linux AppImage --dir # Build unpacked dir first to check
55+
# npm run package -- --linux AppImage # Build the actual AppImage
56+
# Note: Full GUI app packaging might be complex in headless CI environments
57+
# without specific display servers (e.g., Xvfb). For now, this is a structural step.
58+
59+
# Optional: Upload build artifacts (e.g., the AppImage)
60+
# - name: Upload Linux Build Artifact
61+
# uses: actions/upload-artifact@v3
62+
# with:
63+
# name: switchbot-client-linux-appimage
64+
# path: release/*.AppImage # Adjust path as needed
65+
# if-no-files-found: error # Optional: fail if no file is found

.github/workflows/claude.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Claude Code
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
jobs:
14+
claude:
15+
if: |
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
pull-requests: read
24+
issues: read
25+
id-token: write
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 1
31+
32+
- name: Run Claude Code
33+
id: claude
34+
uses: anthropics/claude-code-action@beta
35+
with:
36+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
37+

.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
node_modules
2+
dist_electron
3+
dist_renderer
4+
build
5+
coverage
6+
tsconfig.tsbuildinfo
7+
.DS_Store
8+
*.local
9+
.env
10+
.env.*
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
# IDE / Editor specific
15+
.idea
16+
.vscode
17+
*.suo
18+
*.ntvs*
19+
*.njsproj
20+
*.sln
21+
*.sw?
22+
23+
# Electron Builder output
24+
release/
25+
*.dmg
26+
*.exe
27+
*.AppImage
28+
*.nsis.zip
29+
dist/

0 commit comments

Comments
 (0)