Skip to content

Commit 0371641

Browse files
committed
terrible commit: but lots of work
0 parents  commit 0371641

File tree

180 files changed

+51883
-0
lines changed

Some content is hidden

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

180 files changed

+51883
-0
lines changed

.env.local.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Supabase
2+
NEXT_PUBLIC_SUPABASE_URL=your-project-url
3+
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
4+
SUPABASE_SERVICE_ROLE_KEY=your-service-key
5+
6+
# Admin
7+
8+
ADMIN_PASSWORD=your-secure-password

.github/workflows/test.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: Test Suite
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x]
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
cache: 'npm'
26+
27+
- name: Run tests in Docker
28+
run: make test
29+
env:
30+
CI: true
31+
32+
- name: Upload test results
33+
if: always()
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: test-results-${{ matrix.node-version }}
37+
path: |
38+
test-results/
39+
coverage/
40+
41+
- name: Upload coverage to Codecov
42+
if: matrix.node-version == '20.x'
43+
uses: codecov/codecov-action@v3
44+
with:
45+
file: ./coverage/lcov.info
46+
flags: unittests
47+
name: codecov-umbrella
48+
fail_ci_if_error: false
49+
50+
- name: Comment PR with results
51+
if: github.event_name == 'pull_request' && matrix.node-version == '20.x'
52+
uses: actions/github-script@v7
53+
with:
54+
script: |
55+
const fs = require('fs');
56+
57+
// Read test results
58+
let testSummary = '## Test Results\n\n';
59+
60+
try {
61+
const results = JSON.parse(fs.readFileSync('test-results/results.json', 'utf8'));
62+
testSummary += `✅ **${results.numPassedTests}** passed\n`;
63+
if (results.numFailedTests > 0) {
64+
testSummary += `❌ **${results.numFailedTests}** failed\n`;
65+
}
66+
testSummary += `⏱️ Duration: ${(results.testResults[0].duration / 1000).toFixed(2)}s\n`;
67+
} catch (e) {
68+
testSummary += '❌ Failed to parse test results\n';
69+
}
70+
71+
// Read coverage summary
72+
testSummary += '\n## Coverage\n\n';
73+
try {
74+
const coverage = JSON.parse(fs.readFileSync('coverage/coverage-summary.json', 'utf8'));
75+
const total = coverage.total;
76+
testSummary += `| Type | Coverage |\n`;
77+
testSummary += `|------|----------|\n`;
78+
testSummary += `| Lines | ${total.lines.pct}% |\n`;
79+
testSummary += `| Statements | ${total.statements.pct}% |\n`;
80+
testSummary += `| Functions | ${total.functions.pct}% |\n`;
81+
testSummary += `| Branches | ${total.branches.pct}% |\n`;
82+
} catch (e) {
83+
testSummary += '❌ Failed to parse coverage results\n';
84+
}
85+
86+
github.rest.issues.createComment({
87+
issue_number: context.issue.number,
88+
owner: context.repo.owner,
89+
repo: context.repo.repo,
90+
body: testSummary
91+
});
92+
93+
- name: Check coverage thresholds
94+
if: matrix.node-version == '20.x'
95+
run: |
96+
node -e "
97+
const coverage = require('./coverage/coverage-summary.json');
98+
const total = coverage.total;
99+
const threshold = 80;
100+
101+
const failed = [];
102+
if (total.lines.pct < threshold) failed.push('lines');
103+
if (total.statements.pct < threshold) failed.push('statements');
104+
if (total.functions.pct < threshold) failed.push('functions');
105+
if (total.branches.pct < threshold) failed.push('branches');
106+
107+
if (failed.length > 0) {
108+
console.error('Coverage thresholds not met for:', failed.join(', '));
109+
process.exit(1);
110+
} else {
111+
console.log('All coverage thresholds met!');
112+
}
113+
"

.gitignore

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# Dependencies
2+
node_modules/
3+
bower_components/
4+
5+
# Build output
6+
dist/
7+
build/
8+
out/
9+
*.min.js
10+
*.min.css
11+
12+
# IDE and editor files
13+
.vscode/
14+
.idea/
15+
*.swp
16+
*.swo
17+
*~
18+
.DS_Store
19+
Thumbs.db
20+
21+
# Logs
22+
logs/
23+
*.log
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# Environment variables
29+
.env
30+
.env.local
31+
.env.development.local
32+
.env.test.local
33+
.env.production.local
34+
35+
# Cache and temporary files
36+
.cache/
37+
.tmp/
38+
.temp/
39+
*.tmp
40+
*.temp
41+
42+
# Package manager files
43+
package-lock.json
44+
yarn.lock
45+
pnpm-lock.yaml
46+
47+
# Next.js
48+
.next/
49+
out/
50+
next-env.d.ts
51+
52+
# OS files
53+
.DS_Store
54+
.DS_Store?
55+
._*
56+
.Spotlight-V100
57+
.Trashes
58+
ehthumbs.db
59+
Desktop.ini
60+
61+
# Three.js specific
62+
*.gltf
63+
*.glb
64+
*.fbx
65+
*.obj
66+
*.mtl
67+
*.dae
68+
*.babylon
69+
*.stl
70+
*.ply
71+
*.pcd
72+
*.xyz
73+
74+
# Keep source models
75+
!src/models/**/*
76+
77+
# Physics engine files
78+
*.wasm
79+
*.wasm.map
80+
81+
# Testing
82+
coverage/
83+
*.lcov
84+
.nyc_output/
85+
test-results/
86+
.vitest/
87+
88+
# Documentation
89+
docs/_build/
90+
*.pdf
91+
92+
# Backup files
93+
*.bak
94+
*.backup
95+
*_backup
96+
*.old
97+
98+
# SSL certificates
99+
*.pem
100+
*.key
101+
*.crt
102+
*.csr
103+
104+
# Database
105+
*.sqlite
106+
*.sqlite3
107+
*.db
108+
109+
# Archives
110+
*.zip
111+
*.tar.gz
112+
*.rar
113+
*.7z
114+
115+
# Media files (optional - remove if you need to commit these)
116+
# *.mp4
117+
# *.webm
118+
# *.mp3
119+
# *.wav
120+
# *.ogg
121+
122+
# Keep specific files
123+
!.gitkeep
124+
!.gitignore

.husky/pre-push

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
make test

.obsidian/app.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"readableLineLength": false
3+
}

.obsidian/appearance.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"cssTheme": "PLN",
3+
"theme": "obsidian",
4+
"interfaceFontFamily": "IBM Plex Sans",
5+
"textFontFamily": "IBM Plex Serif",
6+
"monospaceFontFamily": "IBM Plex Mono",
7+
"baseFontSize": 20
8+
}

.obsidian/community-plugins.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[
2+
"obsidian-minimal-settings",
3+
"editor-width-slider"
4+
]

.obsidian/core-plugins.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"file-explorer": true,
3+
"global-search": true,
4+
"switcher": true,
5+
"graph": true,
6+
"backlink": true,
7+
"canvas": true,
8+
"outgoing-link": true,
9+
"tag-pane": true,
10+
"properties": false,
11+
"page-preview": true,
12+
"daily-notes": true,
13+
"templates": true,
14+
"note-composer": true,
15+
"command-palette": true,
16+
"slash-command": false,
17+
"editor-status": true,
18+
"bookmarks": true,
19+
"markdown-importer": false,
20+
"zk-prefixer": false,
21+
"random-note": false,
22+
"outline": true,
23+
"word-count": true,
24+
"slides": false,
25+
"audio-recorder": false,
26+
"workspaces": false,
27+
"file-recovery": true,
28+
"publish": false,
29+
"sync": true,
30+
"webviewer": false
31+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"sliderPercentage": "100",
3+
"sliderPercentageDefault": "20",
4+
"sliderWidth": "150"
5+
}

0 commit comments

Comments
 (0)