diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml index 6382bd8f..b3fc8e8c 100644 --- a/.github/workflows/dev.yaml +++ b/.github/workflows/dev.yaml @@ -9,37 +9,40 @@ jobs: test-backend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: 1.22.0 - - run: cd backend && go test -race -v ./... + go-version: 'stable' + - working-directory: backend + run: go test -race -v ./... lint-backend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: 1.22.0 - - run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2 - - run: cd backend && golangci-lint run + go-version: 'stable' + - uses: golangci/golangci-lint-action@v6 + with: + version: v1.59 + working-directory: backend format-backend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: 1.22.0 - - run: cd backend && go fmt ./... + go-version: 'stable' + - working-directory: backend + run: go fmt ./... lint-frontend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '20' - - run: cd frontend && npm i eslint - - run: cd frontend && npm run lint + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - working-directory: frontend + run: npm i eslint && npm run lint + push_dev_to_registry: name: Push dev image runs-on: ubuntu-latest @@ -63,7 +66,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + uses: docker/metadata-action@v5 with: images: gtstef/filebrowser - name: Build and push @@ -73,4 +76,4 @@ jobs: file: ./Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 400e623a..e0eaae03 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -9,37 +9,39 @@ jobs: test-backend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: 1.22.0 - - run: cd backend && go test -race -v ./... + go-version: 'stable' + - working-directory: backend + run: go test -race -v ./... lint-backend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: 1.22.0 - - run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2 - - run: cd backend && golangci-lint run + go-version: 'stable' + - uses: golangci/golangci-lint-action@v6 + with: + version: v1.59 + working-directory: backend format-backend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: 1.22.0 - - run: cd backend && go fmt ./... + go-version: 'stable' + - working-directory: backend + run: go fmt ./... lint-frontend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '20' - - run: cd frontend && npm i eslint - - run: cd frontend && npm run lint + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - working-directory: frontend + run: npm i eslint && npm run lint push_latest_to_registry: needs: [lint-frontend, lint-backend, test-backend, format-backend] @@ -65,7 +67,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + uses: docker/metadata-action@v5 with: images: gtstef/filebrowser - name: Build and push diff --git a/.github/workflows/pr-merge.yaml b/.github/workflows/pr-merge.yaml index de95011a..2c5a31b2 100644 --- a/.github/workflows/pr-merge.yaml +++ b/.github/workflows/pr-merge.yaml @@ -11,37 +11,39 @@ jobs: test-backend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: 1.22.0 - - run: cd backend && go test -race -v ./... + go-version: 'stable' + - working-directory: backend + run: go test -race -v ./... lint-backend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: 1.22.0 - - run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2 - - run: cd backend && golangci-lint run + go-version: 'stable' + - uses: golangci/golangci-lint-action@v6 + with: + version: v1.59 + working-directory: backend format-backend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: 1.22.0 - - run: cd backend && go fmt ./... + go-version: 'stable' + - working-directory: backend + run: go fmt ./... lint-frontend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '20' - - run: cd frontend && npm i eslint - - run: cd frontend && npm run lint + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - working-directory: frontend + run: npm i eslint && npm run lint push_pr_to_registry: name: Push PR @@ -66,7 +68,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + uses: docker/metadata-action@v5 with: images: gtstef/filebrowser - name: Build and push @@ -76,4 +78,4 @@ jobs: file: ./Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 45be19ba..8bfbeb15 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -35,37 +35,40 @@ jobs: test-backend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: 1.22.0 - - run: cd backend && go test -race -v ./... + go-version: 'stable' + - working-directory: backend + run: go test -race -v ./... lint-backend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: 1.22.0 - - run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2 - - run: cd backend && golangci-lint run + go-version: 'stable' + - uses: golangci/golangci-lint-action@v6 + with: + version: v1.59 + working-directory: backend format-backend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: 1.22.0 - - run: cd backend && go fmt ./... + go-version: 'stable' + - working-directory: backend + run: go fmt ./... lint-frontend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '20' - - run: cd frontend && npm i eslint - - run: cd frontend && npm run lint + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - working-directory: frontend + run: npm i eslint && npm run lint + push_release_to_registry: needs: [lint-frontend, lint-backend, test-backend, format-backend] name: Push release @@ -91,7 +94,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + uses: docker/metadata-action@v5 with: images: gtstef/filebrowser - name: Strip v from version number diff --git a/.gitignore b/.gitignore index 2e9d0b38..9fdd14b7 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,8 @@ rice-box.go /filebrowser /filebrowser.exe /frontend/dist +/frontend/pkg +/frontend/package-lock.json /backend/vendor /backend/*.cov diff --git a/CHANGELOG.md b/CHANGELOG.md index f5b4e31f..78966d50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,16 +2,34 @@ All notable changes to this project will be documented in this file. For commit guidelines, please refer to [Standard Version](https://github.com/conventional-changelog/standard-version). +## v0.2.6 + +This change focuses on minimizing and simplifying build process. + +- **Change**: Migrated to Vite / Vue 3 +- **Change**: removed npm modules + - replaced vuex with custom state management via src/store + - replaced noty with simple card popup notifications + - replaced moment with simple date formatter where needed + - replaced vue-simple-progress with vue component +- **Feature**: improved error logging + - backend errors show the root function that called them during the error + - frontend errors print errors to console that fail try/catch + - all frontend errors via popup notification & print to console as well +- **Fix**: Allow editing blank text based files in editor +- tweaked listing styles +- Feature: Allow disabling the index via configuration yaml + ## v0.2.5 - Fix: delete user prompt works using native hovers. ## v0.2.4 -- Faature: [create-folder-feature](https://github.com/gtsteffaniak/filebrowser/pull/105) +- Feature: [create-folder-feature](https://github.com/gtsteffaniak/filebrowser/pull/105) - Feature: [playable shared video](https://github.com/filebrowser/filebrowser/issues/2537) - Feature: photos, videos, and audio get embedded preview on share instead of icon -- FIX: sharable link bug, now uses special publicUser +- Fix: sharable link bug, now uses special publicUser - Bump go version to 1.22 - In prep for vue3 migration, npm modules removed: - js-base64 diff --git a/Dockerfile b/Dockerfile index 0d5a1760..29198aa7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,18 @@ FROM node:slim as nbuild WORKDIR /app -COPY ./frontend/package*.json ./ -RUN npm ci --maxsockets 1 +COPY ./frontend/package*.json ./ +RUN npm i --maxsockets 1 COPY ./frontend/ ./ RUN npm run build FROM golang:1.22-alpine as base WORKDIR /app -COPY ./backend ./ -RUN go get -u golang.org/x/net +COPY ./backend ./ RUN go build -ldflags="-w -s" -o filebrowser . FROM alpine:latest ARG app="/app/filebrowser" -RUN apk --no-cache add \ - ca-certificates \ - mailcap -WORKDIR / +RUN apk --no-cache add ca-certificates mailcap COPY --from=base /app/filebrowser* ./ COPY --from=nbuild /app/dist/ ./frontend/dist/ ENTRYPOINT [ "./filebrowser" ] diff --git a/README.md b/README.md index a6896efc..47836c91 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@
-
-
autorenew
+{{ noneMessage }}
autorenew
+{{ noneMessage }}
Search occurs on each character you type (3 character minimum for search @@ -122,7 +134,8 @@ search times.
Smaller Than:
@@ -159,8 +173,9 @@MB