Replace in-memory storage with SQLite (WAL mode), add workspace-based multi-tenancy with auto-detection via server.listRoots(), and embed the canvas server into the MCP process for single-process operation. 🔧 Core enhancements: - SQLite persistence with versioning, element history, and search - Multi-tenancy: isolated canvases per workspace (SHA-256 tenant IDs) - Embedded canvas lifecycle (single node process starts MCP + canvas) - Auto-sync with 3s debounce and manual override toggle - Configurable canvas port via CANVAS_PORT env var - 6 new MCP tools (search, history, tenants, projects) - Workspace switcher UI with dropdown search - Sync normalization to prevent bound-text breakage on reload 🐳 Docker & CI improvements: - BuildKit cache mounts for faster npm installs across builds - Skip native compilation in frontend-builder stage (--ignore-scripts) - Build only linux/amd64 on PRs, multi-arch on push to main - Docker Hub registry with proper build tools for better-sqlite3 - CI and Docker status check gates (github/ci-status-check, github/docker-build-check) 📦 Package & publishing: - Renamed to @sanjibdevnath/mcp-excalidraw-local (v3.0.0) - Updated npm-publish workflow for scoped package - Updated bin entry, keywords, and files list 📝 Documentation: - README with UI screenshots, architecture diagram, and full feature docs - Updated agent skill with 32-tool cheatsheet and workflow playbooks - Fork attribution and upstream comparison table Co-authored-by: Cursor <cursoragent@cursor.com>
97 lines
2.9 KiB
YAML
97 lines
2.9 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, develop ]
|
|
pull_request:
|
|
branches: [ main, develop ]
|
|
|
|
jobs:
|
|
build-and-test:
|
|
name: Build and Type Check
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [18.x, 20.x, 22.x]
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Run TypeScript type check
|
|
run: npm run type-check
|
|
|
|
- name: Build project
|
|
run: npm run build
|
|
|
|
- name: Check build artifacts
|
|
run: |
|
|
echo "Checking if build artifacts exist..."
|
|
test -f dist/index.js || (echo "dist/index.js not found" && exit 1)
|
|
test -f dist/server.js || (echo "dist/server.js not found" && exit 1)
|
|
test -d dist/frontend || (echo "dist/frontend not found" && exit 1)
|
|
echo "All build artifacts present!"
|
|
|
|
- name: Upload build artifacts
|
|
if: matrix.node-version == '20.x'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build-artifacts
|
|
path: |
|
|
dist/
|
|
retention-days: 7
|
|
|
|
lint-check:
|
|
name: Lint Check
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20.x'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Check for TypeScript errors
|
|
run: npm run type-check
|
|
|
|
ci-status:
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: false
|
|
name: CI Status Check
|
|
needs: [build-and-test, lint-check]
|
|
if: always()
|
|
permissions:
|
|
statuses: write
|
|
steps:
|
|
- name: Failed
|
|
id: failed
|
|
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
|
|
run: |
|
|
curl -X POST -H "Content-Type: application/json" -H "Authorization: token ${{ github.token }}" \
|
|
-d '{ "state" : "failure" , "context" : "github/ci-status-check" , "description" : "CI checks failed", "target_url" : "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" }' \
|
|
https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }}
|
|
exit 1
|
|
- name: Success
|
|
if: steps.failed.conclusion == 'skipped'
|
|
run: |
|
|
curl -X POST -H "Content-Type: application/json" -H "Authorization: token ${{ github.token }}" \
|
|
-d '{ "state" : "success" , "context" : "github/ci-status-check" , "description" : "CI checks passed", "target_url" : "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" }' \
|
|
https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }}
|