bun + update

This commit is contained in:
nvrl committed 2026-07-26 17:42:44 +02:00
1 parent 3757b784de
commit d0a027a2a1
11 files changed
+1059 -6767

No files matched your search

+9 -11
View File
@@ -14,35 +14,33 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: '25'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
bun-version: '1.3'
- name: Install Dependencies
run: npm install
run: bun install --frozen-lockfile
working-directory: frontend
- name: Typecheck
run: npm run typecheck
run: bun run typecheck
working-directory: frontend
- name: Lint
run: npm run lint
run: bun run lint
working-directory: frontend
- name: Format Check
run: npm run format:check
run: bun run format:check
working-directory: frontend
- name: Test
run: npm test -- --run
run: bun run test
working-directory: frontend
- name: Build
run: npm run build
run: bun run build
working-directory: frontend
backend-check:
+9 -11
View File
@@ -12,35 +12,33 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: '25'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
bun-version: '1.3'
- name: Install Dependencies
run: npm install
run: bun install --frozen-lockfile
working-directory: frontend
- name: Typecheck
run: npm run typecheck
run: bun run typecheck
working-directory: frontend
- name: Lint
run: npm run lint
run: bun run lint
working-directory: frontend
- name: Format Check
run: npm run format:check
run: bun run format:check
working-directory: frontend
- name: Test
run: npm test -- --run
run: bun run test
working-directory: frontend
- name: Build
run: npm run build
run: bun run build
working-directory: frontend
backend-check:
+2 -2
View File
@@ -50,8 +50,8 @@ cargo run # listens on 0.0.0.0:8001
#### Frontend
```bash
cd frontend
npm install
npm run dev
bun install
bun run dev
```
> The Rust backend uses the existing SQLite database under `data/db.sqlite3`. The `data/` directory is retained as the data store (db, `media/`, `banners/`, `backups/`).
+4 -2
View File
@@ -1,6 +1,6 @@
# --- Build stage ------------------------------------------------------------
# Pin the toolchain image; the crate is edition 2021 with no nightly features.
FROM rust:1-slim-bookworm AS build
FROM rust:1-slim-trixie AS build
WORKDIR /build
@@ -36,7 +36,9 @@ RUN touch src/main.rs && cargo build --release \
&& strip target/release/holy_backend_rs
# --- Runtime stage ----------------------------------------------------------
FROM debian:bookworm-slim
# Must stay on the same Debian release as the build stage — the binary links
# against that release's glibc.
FROM debian:trixie-slim
# curl for the container healthcheck; ca-certificates for outbound HTTPS
# (Shopify sync, SMTP over TLS).
+2
View File
@@ -4,3 +4,5 @@ dist/
.idea/
.vscode/
npm-debug.log
bun-debug.log
package-lock.json
+10 -5
View File
@@ -1,8 +1,11 @@
# --- Build Stage ---
FROM node:lts-alpine AS build-stage
# Bun replaces npm for install + scripts. bun.lock is the lockfile of record
# (package-lock.json is gone); --frozen-lockfile fails the build loudly if it
# has drifted from package.json instead of quietly resolving something else.
FROM oven/bun:1.3-alpine AS build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
COPY . .
# Pass VITE environment variables during build
@@ -20,10 +23,12 @@ ENV VITE_IMPRESSUM_CITY=${VITE_IMPRESSUM_CITY}
ENV VITE_IMPRESSUM_EMAIL=${VITE_IMPRESSUM_EMAIL}
ENV VITE_IMPRESSUM_PHONE=${VITE_IMPRESSUM_PHONE}
RUN npm run build
RUN bun run build
# --- Production Stage ---
FROM nginx:stable-alpine
# nginx 1.30 is the current stable branch (identical to `stable-alpine` today),
# pinned so a rebuild can't silently roll onto the next branch.
FROM nginx:1.30-alpine
# Copy built files
COPY --from=build-stage /app/dist /usr/share/nginx/html
+1020
View File
File diff suppressed because it is too large. Load diff
-6733
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -15,7 +15,7 @@
"preview": "vite preview",
"schema:export": "curl -fsS http://localhost:8001/api/schema/ -o ../schema.yaml",
"openapi:gen": "openapi-typescript ../schema.yaml -o src/api/schema.d.ts",
"openapi:sync": "npm run schema:export && npm run openapi:gen"
"openapi:sync": "bun run schema:export && bun run openapi:gen"
},
"dependencies": {
"@catppuccin/palette": "^1.7.1",
+1 -1
View File
@@ -3,7 +3,7 @@ import type { components } from './schema';
export type Schemas = components['schemas'];
// Re-exported from generated OpenAPI schema.
// Regenerate with `npm run openapi:sync` after backend serializer changes.
// Regenerate with `bun run openapi:sync` after backend serializer changes.
export type Banner = Schemas['Banner'];
export type Category = Schemas['Category'];
export type Flavor = Schemas['Flavor'];
+1 -1
View File
@@ -13,7 +13,7 @@ echo "Step 1: Checking Frontend Formatting..."
cd "$ROOT_DIR/frontend"
if ! bun run format:check; then
echo ""
echo "❌ ERROR: Frontend formatting issues found. Run 'npm run format' in frontend/."
echo "❌ ERROR: Frontend formatting issues found. Run 'bun run format' in frontend/."
exit 1
fi