diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 0000000..e5b6d8d --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 0000000..9fffc6a --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "restricted", + "baseBranch": "canary", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.changeset/fair-ladybugs-hope.md b/.changeset/fair-ladybugs-hope.md new file mode 100644 index 0000000..7707d31 --- /dev/null +++ b/.changeset/fair-ladybugs-hope.md @@ -0,0 +1,5 @@ +--- +"wireadmin": patch +--- + +fix: improve `healthcheck` and silence warning form `sveltekit-superforms` diff --git a/.changeset/giant-guests-listen.md b/.changeset/giant-guests-listen.md new file mode 100644 index 0000000..bd3c689 --- /dev/null +++ b/.changeset/giant-guests-listen.md @@ -0,0 +1,5 @@ +--- +"wireadmin": minor +--- + +fix: storage path was not pointing to `/data` diff --git a/.changeset/grumpy-news-fetch.md b/.changeset/grumpy-news-fetch.md new file mode 100644 index 0000000..24b2a2e --- /dev/null +++ b/.changeset/grumpy-news-fetch.md @@ -0,0 +1,5 @@ +--- +'wireadmin': patch +--- + +fix: Improve password hashing method and env loader diff --git a/.changeset/loud-comics-jog.md b/.changeset/loud-comics-jog.md new file mode 100644 index 0000000..d9dad62 --- /dev/null +++ b/.changeset/loud-comics-jog.md @@ -0,0 +1,5 @@ +--- +"wireadmin": patch +--- + +chore: slightly improve server page layout diff --git a/.changeset/many-panthers-fly.md b/.changeset/many-panthers-fly.md new file mode 100644 index 0000000..0316053 --- /dev/null +++ b/.changeset/many-panthers-fly.md @@ -0,0 +1,5 @@ +--- +"wireadmin": major +--- + +fix: using `storage-box` instead of `redis` for storing configs diff --git a/.changeset/short-squids-listen.md b/.changeset/short-squids-listen.md new file mode 100644 index 0000000..36f9806 --- /dev/null +++ b/.changeset/short-squids-listen.md @@ -0,0 +1,5 @@ +--- +'wireadmin': patch +--- + +fix: tor config generation when container restarts diff --git a/.changeset/tender-cougars-divide.md b/.changeset/tender-cougars-divide.md new file mode 100644 index 0000000..4745e34 --- /dev/null +++ b/.changeset/tender-cougars-divide.md @@ -0,0 +1,5 @@ +--- +"wireadmin": minor +--- + +feat: show total net usage and connection mode in server page diff --git a/.changeset/tidy-lamps-fold.md b/.changeset/tidy-lamps-fold.md new file mode 100644 index 0000000..9aeafd4 --- /dev/null +++ b/.changeset/tidy-lamps-fold.md @@ -0,0 +1,5 @@ +--- +"wireadmin": patch +--- + +fix: using `execa` package for shell access diff --git a/.changeset/warm-bikes-film.md b/.changeset/warm-bikes-film.md new file mode 100644 index 0000000..d2495b5 --- /dev/null +++ b/.changeset/warm-bikes-film.md @@ -0,0 +1,5 @@ +--- +"wireadmin": minor +--- + +feat: add section for showing the state of background services diff --git a/.github/workflows/release-image.yaml b/.github/workflows/release.yaml similarity index 63% rename from .github/workflows/release-image.yaml rename to .github/workflows/release.yaml index 7acf9af..7a4acb4 100644 --- a/.github/workflows/release-image.yaml +++ b/.github/workflows/release.yaml @@ -1,23 +1,44 @@ -name: Build Docker Image +name: Release Package on: - release: - types: [created] + workflow_dispatch: + inputs: + tag: + description: 'Tag to build' + required: true env: BUILD_PLATFORMS: linux/amd64,linux/arm64 + IMAGE_TAG: ${{ github.event.inputs.tag }} permissions: contents: read packages: write jobs: - ghcr-build: + release: + needs: [github-registry, docker-hub] runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Create Release Pull Request or Publish + id: changesets + uses: changesets/action@v1 + with: + commit: 'chore(release): version package' + title: 'chore(release): version package' + publish: changeset publish + env: + GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }} + github-registry: + name: Push to GitHub Container Registry + runs-on: ubuntu-latest env: IMAGE_NAME: shahradelahi/wireadmin - steps: - uses: actions/checkout@v3 - uses: docker/setup-buildx-action@v3 @@ -29,10 +50,6 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.PRIVATE_TOKEN }} - - run: | - echo "Labeling image with TAG: ${GITHUB_REF#refs/tags/v}" - echo "IMAGE_TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV - - name: Push to GitHub Container Registry uses: docker/build-push-action@v5 with: @@ -40,17 +57,14 @@ jobs: file: ./Dockerfile push: true platforms: ${{ env.BUILD_PLATFORMS }} + args: VERSION=${{ env.IMAGE_TAG }} tags: ghcr.io/${{ env.IMAGE_NAME }}:latest,ghcr.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} - docker-build: + docker-hub: + name: Push to DockerHub runs-on: ubuntu-latest - permissions: - contents: read - packages: write - env: IMAGE_NAME: litehex/wireadmin - steps: - uses: actions/checkout@v3 - uses: docker/setup-buildx-action@v3 @@ -62,10 +76,6 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - run: | - echo "Labeling image with TAG: ${GITHUB_REF#refs/tags/v}" - echo "IMAGE_TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV - - name: Push to DockerHub uses: docker/build-push-action@v5 with: @@ -73,4 +83,5 @@ jobs: file: ./Dockerfile push: true platforms: ${{ env.BUILD_PLATFORMS }} + args: VERSION=${{ env.IMAGE_TAG }} tags: docker.io/${{ env.IMAGE_NAME }}:latest,docker.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} diff --git a/.prettierignore b/.prettierignore index bce12ff..ad7500b 100644 --- a/.prettierignore +++ b/.prettierignore @@ -7,6 +7,7 @@ web .env.* !.env.example static +.changeset # Ignore files for PNPM, NPM and YARN pnpm-lock.yaml diff --git a/Dockerfile b/Dockerfile index 5956536..df85f27 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ ARG ALPINE_VERSION=3.19 ARG NODE_VERSION=20 +ARG VERSION=0.0.0-canary FROM --platform=$BUILDPLATFORM chriswayg/tor-alpine:latest as tor @@ -87,7 +88,6 @@ HEALTHCHECK --interval=60s --timeout=3s --start-period=20s --retries=3 \ VOLUME ["/etc/torrc.d", "/data", "/var/vlogs"] # Overwrite package version -ARG VERSION=0.0.0-canary RUN node -e "const fs = require('fs'); const pkg = JSON.parse(fs.readFileSync('/app/package.json')); pkg.version = process.env.VERSION; fs.writeFileSync('/app/package.json', JSON.stringify(pkg, null, 2));" # Run the app diff --git a/Dockerfile-Dev b/Dockerfile-Dev index db09df6..ea5961c 100644 --- a/Dockerfile-Dev +++ b/Dockerfile-Dev @@ -1,5 +1,6 @@ ARG ALPINE_VERSION=3.19 ARG NODE_VERSION=20 +ARG VERSION=0.0.0-dev FROM --platform=$BUILDPLATFORM chriswayg/tor-alpine:latest as tor @@ -44,7 +45,6 @@ ENV HOST_HEADER=x-forwarded-host FROM base AS runner -ENV VERSION=0.0.0-dev ENV NODE_ENV=development ENV LOG_LEVEL=debug diff --git a/package.json b/package.json index 75ebee0..ce8a7c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wireadmin", - "version": "0.0.0-dev", + "version": "1.1.2", "author": "Shahrad Elahi ", "private": true, "packageManager": "pnpm@8.15.0",