mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-05-15 16:50:18 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d8a5f94eb6 |
@@ -1,6 +1,6 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "npm"
|
||||
- package-ecosystem: "bun"
|
||||
directory: "/frontend"
|
||||
groups:
|
||||
minor-patch:
|
||||
|
||||
+15
-12
@@ -15,10 +15,8 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
||||
with:
|
||||
package_json_file: ./frontend/package.json
|
||||
- name: Setup bun
|
||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
|
||||
|
||||
- name: Setup go
|
||||
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
||||
@@ -29,22 +27,27 @@ jobs:
|
||||
run: go mod download
|
||||
|
||||
- name: Install frontend dependencies
|
||||
working-directory: ./frontend
|
||||
run: pnpm ci
|
||||
run: |
|
||||
cd frontend
|
||||
bun install --frozen-lockfile
|
||||
|
||||
- name: Set version
|
||||
run: echo testing > internal/assets/version
|
||||
run: |
|
||||
echo testing > internal/assets/version
|
||||
|
||||
- name: Lint frontend
|
||||
working-directory: ./frontend
|
||||
run: pnpm run lint
|
||||
run: |
|
||||
cd frontend
|
||||
bun run lint
|
||||
|
||||
- name: Build frontend
|
||||
working-directory: ./frontend
|
||||
run: pnpm run build
|
||||
run: |
|
||||
cd frontend
|
||||
bun run build
|
||||
|
||||
- name: Copy frontend
|
||||
run: cp -r frontend/dist internal/assets/dist
|
||||
run: |
|
||||
cp -r frontend/dist internal/assets/dist
|
||||
|
||||
- name: Run tests
|
||||
run: go test -coverprofile=coverage.txt -v ./...
|
||||
|
||||
@@ -59,10 +59,8 @@ jobs:
|
||||
with:
|
||||
ref: nightly
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
||||
with:
|
||||
package_json_file: ./frontend/package.json
|
||||
- name: Install bun
|
||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
|
||||
|
||||
- name: Install go
|
||||
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
||||
@@ -70,15 +68,18 @@ jobs:
|
||||
go-version: "^1.26.0"
|
||||
|
||||
- name: Install frontend dependencies
|
||||
working-directory: ./frontend
|
||||
run: pnpm ci
|
||||
run: |
|
||||
cd frontend
|
||||
bun install --frozen-lockfile
|
||||
|
||||
- name: Install backend dependencies
|
||||
run: go mod download
|
||||
run: |
|
||||
go mod download
|
||||
|
||||
- name: Build frontend
|
||||
working-directory: ./frontend
|
||||
run: pnpm run build
|
||||
run: |
|
||||
cd frontend
|
||||
bun run build
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@@ -104,10 +105,8 @@ jobs:
|
||||
with:
|
||||
ref: nightly
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
||||
with:
|
||||
package_json_file: ./frontend/package.json
|
||||
- name: Install bun
|
||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
|
||||
|
||||
- name: Install go
|
||||
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
||||
@@ -115,15 +114,18 @@ jobs:
|
||||
go-version: "^1.26.0"
|
||||
|
||||
- name: Install frontend dependencies
|
||||
working-directory: ./frontend
|
||||
run: pnpm ci
|
||||
run: |
|
||||
cd frontend
|
||||
bun install --frozen-lockfile
|
||||
|
||||
- name: Install backend dependencies
|
||||
run: go mod download
|
||||
run: |
|
||||
go mod download
|
||||
|
||||
- name: Build frontend
|
||||
working-directory: ./frontend
|
||||
run: pnpm run build
|
||||
run: |
|
||||
cd frontend
|
||||
bun run build
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
|
||||
@@ -35,10 +35,8 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
||||
with:
|
||||
package_json_file: ./frontend/package.json
|
||||
- name: Install bun
|
||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
|
||||
|
||||
- name: Install go
|
||||
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
||||
@@ -46,15 +44,18 @@ jobs:
|
||||
go-version: "^1.26.0"
|
||||
|
||||
- name: Install frontend dependencies
|
||||
working-directory: ./frontend
|
||||
run: pnpm ci
|
||||
run: |
|
||||
cd frontend
|
||||
bun install --frozen-lockfile
|
||||
|
||||
- name: Install backend dependencies
|
||||
run: go mod download
|
||||
run: |
|
||||
go mod download
|
||||
|
||||
- name: Build frontend
|
||||
working-directory: ./frontend
|
||||
run: pnpm run build
|
||||
run: |
|
||||
cd frontend
|
||||
bun run build
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@@ -77,10 +78,8 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
||||
with:
|
||||
package_json_file: ./frontend/package.json
|
||||
- name: Install bun
|
||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
|
||||
|
||||
- name: Install go
|
||||
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
||||
@@ -88,15 +87,18 @@ jobs:
|
||||
go-version: "^1.26.0"
|
||||
|
||||
- name: Install frontend dependencies
|
||||
working-directory: ./frontend
|
||||
run: pnpm ci
|
||||
run: |
|
||||
cd frontend
|
||||
bun install --frozen-lockfile
|
||||
|
||||
- name: Install backend dependencies
|
||||
run: go mod download
|
||||
run: |
|
||||
go mod download
|
||||
|
||||
- name: Build frontend
|
||||
working-directory: ./frontend
|
||||
run: pnpm run build
|
||||
run: |
|
||||
cd frontend
|
||||
bun run build
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ Contributing to Tinyauth is straightforward. Follow the steps below to set up a
|
||||
|
||||
## Requirements
|
||||
|
||||
- pnpm
|
||||
- Bun
|
||||
- Golang v1.24.0 or later
|
||||
- Git
|
||||
- Docker
|
||||
@@ -34,7 +34,7 @@ Frontend dependencies can be installed as follows:
|
||||
|
||||
```sh
|
||||
cd frontend/
|
||||
pnpm ci
|
||||
bun install
|
||||
```
|
||||
|
||||
## Create the `.env` file
|
||||
|
||||
+4
-6
@@ -1,14 +1,12 @@
|
||||
# Site builder
|
||||
FROM node:26.1-alpine3.23 AS frontend-builder
|
||||
FROM oven/bun:1.3.13-alpine AS frontend-builder
|
||||
|
||||
WORKDIR /frontend
|
||||
|
||||
RUN npm install -g pnpm@11.1.2
|
||||
|
||||
COPY ./frontend/package.json ./
|
||||
COPY ./frontend/pnpm-lock.yaml ./
|
||||
COPY ./frontend/bun.lock ./
|
||||
|
||||
RUN pnpm ci
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
COPY ./frontend/public ./public
|
||||
COPY ./frontend/src ./src
|
||||
@@ -19,7 +17,7 @@ COPY ./frontend/tsconfig.app.json ./
|
||||
COPY ./frontend/tsconfig.node.json ./
|
||||
COPY ./frontend/vite.config.ts ./
|
||||
|
||||
RUN pnpm run build
|
||||
RUN bun run build
|
||||
|
||||
# Builder
|
||||
FROM golang:1.26-alpine3.23 AS builder
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ COPY go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
RUN go install github.com/air-verse/air@v1.61.7
|
||||
RUN go install github.com/go-delve/delve/cmd/dlv@v1.26.3
|
||||
RUN go install github.com/go-delve/delve/cmd/dlv@latest
|
||||
|
||||
COPY ./cmd ./cmd
|
||||
COPY ./internal ./internal
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
# Site builder
|
||||
FROM node:26.1-alpine3.23 AS frontend-builder
|
||||
FROM oven/bun:1.3.13-alpine AS frontend-builder
|
||||
|
||||
WORKDIR /frontend
|
||||
|
||||
RUN npm install -g pnpm@11.1.2
|
||||
|
||||
COPY ./frontend/package.json ./
|
||||
COPY ./frontend/pnpm-lock.yaml ./
|
||||
COPY ./frontend/bun.lock ./
|
||||
|
||||
RUN pnpm ci
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
COPY ./frontend/public ./public
|
||||
COPY ./frontend/src ./src
|
||||
@@ -19,7 +17,7 @@ COPY ./frontend/tsconfig.app.json ./
|
||||
COPY ./frontend/tsconfig.node.json ./
|
||||
COPY ./frontend/vite.config.ts ./
|
||||
|
||||
RUN pnpm run build
|
||||
RUN bun run build
|
||||
|
||||
# Builder
|
||||
FROM golang:1.26-alpine3.23 AS builder
|
||||
|
||||
@@ -17,7 +17,7 @@ PROD_COMPOSE := $(shell test -f "docker-compose.test.prod.yml" && echo "docker-c
|
||||
|
||||
# Deps
|
||||
deps:
|
||||
cd frontend && pnpm ci
|
||||
bun install --frozen-lockfile --cwd frontend
|
||||
go mod download
|
||||
|
||||
# Clean data
|
||||
@@ -31,7 +31,7 @@ clean-webui:
|
||||
|
||||
# Build the web UI
|
||||
webui: clean-webui
|
||||
cd frontend && pnpm run build
|
||||
bun run --cwd frontend build
|
||||
cp -r frontend/dist internal/assets
|
||||
|
||||
# Build the binary
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# Ignore artifacts:
|
||||
dist
|
||||
node_modules
|
||||
bun.lock
|
||||
package.json
|
||||
src/lib/i18n/locales
|
||||
@@ -0,0 +1 @@
|
||||
{}
|
||||
@@ -1,13 +1,11 @@
|
||||
FROM node:26.1-alpine3.23
|
||||
|
||||
RUN npm install -g pnpm@11.1.2
|
||||
FROM oven/bun:1.2.16-alpine
|
||||
|
||||
WORKDIR /frontend
|
||||
|
||||
COPY ./frontend/package.json ./
|
||||
COPY ./frontend/pnpm-lock.yaml ./
|
||||
COPY ./frontend/bun.lock ./
|
||||
|
||||
RUN pnpm ci
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
COPY ./frontend/public ./public
|
||||
COPY ./frontend/src ./src
|
||||
@@ -21,4 +19,4 @@ COPY ./frontend/vite.config.ts ./
|
||||
|
||||
EXPOSE 5173
|
||||
|
||||
ENTRYPOINT ["pnpm", "run", "dev"]
|
||||
ENTRYPOINT ["bun", "run", "dev"]
|
||||
|
||||
+1155
File diff suppressed because it is too large
Load Diff
+23
-24
@@ -10,7 +10,6 @@
|
||||
"preview": "vite preview",
|
||||
"tsc": "tsc -b"
|
||||
},
|
||||
"packageManager": "pnpm@11.1.2",
|
||||
"dependencies": {
|
||||
"@hookform/resolvers": "^5.2.2",
|
||||
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
||||
@@ -18,44 +17,44 @@
|
||||
"@radix-ui/react-select": "^2.2.6",
|
||||
"@radix-ui/react-separator": "^1.1.8",
|
||||
"@radix-ui/react-slot": "^1.2.4",
|
||||
"@tailwindcss/vite": "^4.2.2",
|
||||
"@tanstack/react-query": "^5.99.0",
|
||||
"axios": "^1.15.0",
|
||||
"@tailwindcss/vite": "^4.3.0",
|
||||
"@tanstack/react-query": "^5.100.10",
|
||||
"axios": "^1.16.1",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"i18next": "^26.0.4",
|
||||
"i18next": "^26.2.0",
|
||||
"i18next-browser-languagedetector": "^8.2.1",
|
||||
"i18next-resources-to-backend": "^1.2.1",
|
||||
"lucide-react": "^1.8.0",
|
||||
"lucide-react": "^1.16.0",
|
||||
"next-themes": "^0.4.6",
|
||||
"radix-ui": "^1.4.3",
|
||||
"react": "^19.2.5",
|
||||
"react-dom": "^19.2.5",
|
||||
"react-hook-form": "^7.72.1",
|
||||
"react-i18next": "^17.0.2",
|
||||
"react": "^19.2.6",
|
||||
"react-dom": "^19.2.6",
|
||||
"react-hook-form": "^7.75.0",
|
||||
"react-i18next": "^17.0.8",
|
||||
"react-markdown": "^10.1.0",
|
||||
"react-router": "^7.14.0",
|
||||
"react-router": "^7.15.1",
|
||||
"sonner": "^2.0.7",
|
||||
"tailwind-merge": "^3.5.0",
|
||||
"tailwindcss": "^4.2.2",
|
||||
"zod": "^4.3.6"
|
||||
"tailwind-merge": "^3.6.0",
|
||||
"tailwindcss": "^4.3.0",
|
||||
"zod": "^4.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@tanstack/eslint-plugin-query": "^5.99.0",
|
||||
"@types/node": "^25.6.0",
|
||||
"@tanstack/eslint-plugin-query": "^5.100.10",
|
||||
"@types/node": "^25.8.0",
|
||||
"@types/react": "^19.2.14",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@vitejs/plugin-react": "^6.0.1",
|
||||
"eslint": "^10.2.0",
|
||||
"eslint-plugin-react-hooks": "^7.0.1",
|
||||
"@vitejs/plugin-react": "^6.0.2",
|
||||
"eslint": "^10.3.0",
|
||||
"eslint-plugin-react-hooks": "^7.1.1",
|
||||
"eslint-plugin-react-refresh": "^0.5.2",
|
||||
"globals": "^17.5.0",
|
||||
"prettier": "3.8.2",
|
||||
"globals": "^17.6.0",
|
||||
"prettier": "3.8.3",
|
||||
"rollup-plugin-visualizer": "^7.0.1",
|
||||
"tw-animate-css": "^1.4.0",
|
||||
"typescript": "~6.0.2",
|
||||
"typescript-eslint": "^8.58.1",
|
||||
"vite": "^8.0.8"
|
||||
"typescript": "~6.0.3",
|
||||
"typescript-eslint": "^8.59.3",
|
||||
"vite": "^8.0.13"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
-5072
File diff suppressed because it is too large
Load Diff
@@ -1,4 +0,0 @@
|
||||
dangerouslyAllowAllBuilds: false
|
||||
blockExoticSubdeps: true
|
||||
minimumReleaseAge: 1440 # 1 day
|
||||
trustPolicy: no-downgrade
|
||||
@@ -144,9 +144,9 @@ func (controller *ProxyController) proxyHandler(c *gin.Context) {
|
||||
|
||||
if !controller.useBrowserResponse(proxyCtx) {
|
||||
c.Header("x-tinyauth-location", redirectURL)
|
||||
c.JSON(403, gin.H{
|
||||
"status": 403,
|
||||
"message": "Forbidden",
|
||||
c.JSON(401, gin.H{
|
||||
"status": 401,
|
||||
"message": "Unauthorized",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ func (controller *ResourcesController) resourcesHandler(c *gin.Context) {
|
||||
if controller.config.Resources.Path == "" {
|
||||
c.JSON(404, gin.H{
|
||||
"status": 404,
|
||||
"message": "Resource not found",
|
||||
"message": "Resources not found",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user