diff --git a/.eslintrc.json b/.eslintrc.json index 2d23e388..5a7385df 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,7 +9,8 @@ "plugin:@typescript-eslint/recommended", "plugin:solid/typescript", "plugin:import/typescript", - "plugin:import/recommended" + "plugin:import/recommended", + "plugin:storybook/recommended" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -19,14 +20,30 @@ "jsx": true } }, - "plugins": ["@typescript-eslint", "solid", "import"], + "plugins": [ + "@typescript-eslint", + "solid", + "import" + ], "rules": { "solid/reactivity": "warn", "solid/no-destructure": "warn", "solid/jsx-no-undef": "error", - "indent": ["error", 4 , { "SwitchCase": 1 }], - "quotes": ["error", "single"], - "semi": ["error", "never"], + "indent": [ + "error", + 4, + { + "SwitchCase": 1 + } + ], + "quotes": [ + "error", + "single" + ], + "semi": [ + "error", + "never" + ], "arrow-body-style": "off", "import/no-unresolved": "error", "import/extensions": [ @@ -70,4 +87,4 @@ "node": "true" } } -} +} \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index cd443a19..00000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,13 +0,0 @@ -# These are supported funding model platforms - -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/scripts/prepareCMD.sh b/.github/scripts/prepareCMD.sh deleted file mode 100644 index f6e29c15..00000000 --- a/.github/scripts/prepareCMD.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash - -# create a vairable to hold a passed in argument -# this argument is the next release version -# this is passed in from the .releaserc file - -sudo apt-get install -y jq - -nextReleaseVersion=$1 -TARGET_KEY="version" - -# parse all letters a-z and A-Z and replace with nothing -# this will remove all letters from the version string -# this is to ensure that the version string is a valid semver - -# check if there is a letter in the version string -# if there is a letter, then remove it -# if there is no letter, then do nothing -if [[ $nextReleaseVersion =~ [a-zA-Z] ]]; then - nextReleaseVersion=$(echo $nextReleaseVersion | sed 's/[a-zA-Z]//g') - - # check if there is a dash in the version string - # if there is a dash, then replace it with a dot - # if there is no dash, then do nothing - if [[ $nextReleaseVersion =~ "-" ]]; then - # parse all dashes and replace with dots - # this is to ensure that the version string is a valid semver - nextReleaseVersion=$(echo $nextReleaseVersion | sed 's/-/./g') - - # remove everything after the third dot and the dot itself - # this is to ensure that the version string is a valid semver - nextReleaseVersion=$(echo $nextReleaseVersion | sed 's/\.[0-9]*$//g') - # remove the last dot - nextReleaseVersion=$(echo $nextReleaseVersion | sed 's/\.$//g') - fi -fi - -# print the next release version - -printf "[prepareCMD.sh]: Next version: ${nextReleaseVersion}\n" - -# This script is used to execute the prepareCMD.sh script on the remote host -printf "[prepareCMD.sh]: Executing prepareCMD.sh on remote host \n" - -printf "[prepareCMD.sh]: Updating the version in the package.json file \n" - -# make a temp file -tmp=$(mktemp) - -jq --arg a "$nextReleaseVersion" '.version = $a' ./package.json > "$tmp" && mv "$tmp" ./package.json -f - -printf "[prepareCMD.sh]: Done \n" - -printf "[prepareCMD.sh]: Updating the version in the tauri.conf.json file \n" - -jq --arg a "$nextReleaseVersion" '.package.version = $a' ./src-tauri/tauri.conf.json > "$tmp" && mv "$tmp" ./src-tauri/tauri.conf.json -f -printf "[prepareCMD.sh]: Done \n" - -#printf "Update the version in the Cargo.toml file \n" -# -#sed -i "s/version = \"[0-9\\.]*\"/version = \"${nextReleaseVersion}\"/g" ./src-tauri/Cargo.toml - -# Install the dependencies for toml file -printf "[prepareCMD.sh]: Installing the dependencies for the toml file \n" - -pip3 install yq - -export PATH="~/.local/bin:$PATH" -source ~/.bashrc - -tmp=$(mktemp) -tomlq -t --arg version "$nextReleaseVersion" '.package.version |= $version' ./src-tauri/Cargo.toml > "$tmp" && mv "$tmp" ./src-tauri/Cargo.toml -f - -# validate the Cargo.toml file -#printf "[prepareCMD.sh]: Validating the Cargo.toml file \n" -#cat ./src-tauri/Cargo.toml - -printf "[prepareCMD.sh]: Done, continuing with release. \n" diff --git a/.github/scripts/setup-linux.sh b/.github/scripts/setup-linux.sh deleted file mode 100644 index 6f5fd5fa..00000000 --- a/.github/scripts/setup-linux.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/bash - -printf "This Script will setup the tauri dev environment\n" - -# check if the user is running as root -if [ "$EUID" -ne 0 ]; then - printf "Please run as root\n" - exit 1 -fi - -# get user input and store in variable - -printf "Do you want to install the Linux Development Dependencies? (y/n)\n" -read -r input - -# check if the user input is y or n - -if [ "$input" == "y" ]; then - printf "Installing Linux Development Dependencies\n" -else - printf "Not installing Linux Development Dependencies\n" -fi - -# Get their distro - -printf "Which distro are you running? (ubuntu/arch/fedora/gentoo/opensuse/void)\n" - -read -r distro - -# convert distro to lowercase - -distro=${distro,,} - -# check if the distro is Ubuntu or arch or fedora or gentoo or openSUSE or NixOS or GNU GUIX or void - -if [ "$distro" == "ubuntu" ] || [ "$distro" == "arch" ] || [ "$distro" == "fedora" ] || [ "$distro" == "gentoo" ] || [ "$distro" == "opensuse" ] || [ "$distro" == "void" ]; then - printf "Distro is $distro\n" -else - printf "Distro is not supported\n" - printf "NixOS and GNU GUIX are not supported by this script, but are supported by tauri - please see the tauri docs for more information.\n" - exit 1 -fi - -# Install Linux Development Dependencies -# run specific commands based on the distro -case $distro in -"ubuntu") - printf "Installing Ubuntu Development Dependencies\n" - sudo apt update - sudo apt install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev - ;; -"arch") - printf "Installing Arch Development Dependencies\n" - sudo pacman -Syu - sudo pacman -S --needed webkit2gtk base-devel curl wget openssl appmenu-gtk-module gtk3 libappindicator-gtk3 librsvg libvips - ;; -"fedora") - printf "Installing Fedora Development Dependencies\n" - sudo dnf check-update - sudo dnf install webkit2gtk4.0-devel openssl-devel curl wget libappindicator-gtk3 librsvg2-devel - sudo dnf group install "C Development Tools and Libraries" - ;; -"gentoo") - printf "Installing Gentoo Development Dependencies\n" - sudo emerge --ask net-libs/webkit-gtk:4 dev-libs/libappindicator net-misc/curl net-misc/wget - ;; -"opensuse") - printf "Installing openSUSE Development Dependencies\n" - sudo zypper up - sudo zypper in webkit2gtk3-soup2-devel libopenssl-devel curl wget libappindicator3-1 librsvg-devel - sudo zypper in -t pattern devel_basis - ;; -"void") - printf "Installing Void Development Dependencies\n" - sudo xbps-install -Syu - sudo xbps-install -S webkit2gtk curl wget openssl gtk+3 libappindicator librsvg gcc pkg-config - ;; -esac -# Install Rust -curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh -# All done! -printf "All done!\n" - -sudo apt update - -sudo apt install wget unzip - -printf "Checking the Rust toolchain \n" - -rustup update -rustc --version - -# Path: setup\setup_linux_debian.sh diff --git a/.github/scripts/setup-mac.sh b/.github/scripts/setup-mac.sh deleted file mode 100644 index 0d8ca636..00000000 --- a/.github/scripts/setup-mac.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -brew install wget -brew install unzip - -printf "Installing Xcode Tools \n" -xcode-select --install - -printf "Installing Rust toolchain \n" -curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh - - - -printf "Please restart the terminal and then run the post_installation.sh script to finish the setup \n" diff --git a/.github/scripts/setup-windows.ps1 b/.github/scripts/setup-windows.ps1 deleted file mode 100644 index b33f2af8..00000000 --- a/.github/scripts/setup-windows.ps1 +++ /dev/null @@ -1,36 +0,0 @@ -function SetupProject { - Write-Host "Checking if Rustup is already installed" -ForegroundColor Green - $rustup = Get-Command rustup -ErrorAction SilentlyContinue - if ($rustup) { - Write-Host "Rustup is already installed" -ForegroundColor Green - }else{ - Write-Host "Installing Rustup" -ForegroundColor Blue - winget install --id Rustlang.Rustup - } - Write-Host "Setting Rust Toolchain version" -ForegroundColor Green - rustup default stable-msvc - - Write-Host "Checking if NodeJS is already installed" -ForegroundColor Green - $nodejs = Get-Command node -ErrorAction SilentlyContinue - - if ($nodejs){ - Write-Host "NodeJS is already installed, continuing" -ForegroundColor Green - }else{ - Write-Host "Installing NodeJS and NPM" -ForegroundColor Blue - Invoke-WebRequest 'https://nodejs.org/dist/v18.16.1/node-v18.16.1-win-x64.zip' OutFile 'C:/nodejs.zip' - Expand-Archive C:\nodejs.zip -DestinationPath C:\ - Rename-Item "C:\\node-v18.16.1-win-x64" C:\nodejs - $Env:Path += ";C:\nodejs" - Write-Host "Done" -ForegroundColor Green - } - - Write-Host "Installing PNPM" -ForegroundColor Blue - npm install -g pnpm - - Write-Host "Setup complete" -ForegroundColor Green - - Write-Host "Please follow the Tauri documentation for further information" -ForegroundColor Blue - Start-Process "https://next--tauri.netlify.app/next/guides/getting-started/prerequisites/windows" -} - -& SetupProject \ No newline at end of file diff --git a/.github/workflows/README.md b/.github/workflows/README.md deleted file mode 100644 index e66b5336..00000000 --- a/.github/workflows/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Instructions - -Please rename the `.github/workflows/.txt` file of the workflow you wish to enable to `.github/workflows/.yml`. - -This file should be formatted as YAML, feel free to change the variables in the file. Please follow the [workflow documentation](https://docs.github.com/en/actions) for more information. [Learn more about workflows](https://docs.github.com/en/actions/using-workflows). - -Please note that the workflows will be enabled automatically after you push your changes to the repository, and can always be enabled manually from the `Workflows` section of the repository settings. - -Please ***do not delete*** the `.github/workflows/.txt` files, and do not delete the `.github/workflows/build-jekyll.yml` file. diff --git a/.github/workflows/build-prod.yml b/.github/workflows/build-prod.yml new file mode 100644 index 00000000..fbb6c27f --- /dev/null +++ b/.github/workflows/build-prod.yml @@ -0,0 +1,148 @@ +name: App Builder +on: + push: + tags: + - 'v*' + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RUST_TOOLCHAIN_VERSION: 1.93.0 + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +permissions: + contents: write + +jobs: + create-release: + permissions: + contents: write + runs-on: ubuntu-latest + outputs: + release_id: ${{ steps.create-release.outputs.result }} + steps: + - uses: actions/checkout@v4 + + - name: create release + id: create-release + uses: actions/github-script@v8 + env: + TAG_NAME: ${{ github.ref_name }} + with: + script: | + const { data } = await github.rest.repos.createRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + tag_name: process.env.TAG_NAME, + name: `ETVR Firmware Flashing tool ${process.env.TAG_NAME}`, + draft: true, + generate_release_notes: true, + prerelease: false + }) + return data.id + + build-tauri: + needs: create-release + permissions: + contents: write + strategy: + fail-fast: false + matrix: + include: + # - platform: 'macos-latest' + # args: '--target aarch64-apple-darwin' + # - platform: 'macos-latest' + # args: '--target x86_64-apple-darwin' + - platform: 'ubuntu-22.04' + args: '' + - platform: 'windows-latest' + args: '' + runs-on: ${{ matrix.platform }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + token: ${{ env.GITHUB_TOKEN }} + + - name: Node.js setup (25.x) + uses: actions/setup-node@v4 + with: + node-version: 25.x + + - name: install Rust stable + uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }} + targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} + + - name: Install dependencies (ubuntu only) + if: matrix.platform == 'ubuntu-22.04' + run: | + sudo apt-get update + sudo apt-get install -y pkg-config libudev-dev javascriptcoregtk-4.1 libsoup-3.0 libwebkit2gtk-4.1-dev libssl-dev libgtk-3-dev librsvg2-dev webkit2gtk-4.0 patchelf libsoup2.4-dev libappindicator3-dev + npm install -g pnpm + npm install -g typescript + + - name: install dependencies (windows only) + if: matrix.platform == 'windows-latest' + run: | + npm install -g typescript + npm install -g pnpm + + - name: install dependencies (macos only) + if: matrix.platform == 'macos-latest' + run: | + brew install pnpm + + - name: Install frontend dependencies (PNPM) + run: pnpm install --no-frozen-lockfile + + - uses: tauri-apps/tauri-action@v0.6.1 + id: tauri_build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} + TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} + with: + releaseId: ${{ needs.create-release.outputs.release_id }} + includeUpdaterJson: true + args: ${{ matrix.args }} + + - name: Cleanup release after failure + if: ${{ failure() }} + env: + release_id: ${{ needs.create-release.outputs.release_id }} + uses: actions/github-script@v8 + with: + script: | + await github.rest.repos.deleteRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id: process.env.release_id, + }) + + publish-release: + permissions: + contents: write + runs-on: ubuntu-latest + needs: [ create-release, build-tauri ] + + steps: + - name: publish release + id: publish-release + uses: actions/github-script@v8 + env: + release_id: ${{ needs.create-release.outputs.release_id }} + TAG_NAME: ${{ github.ref_name }} + with: + script: | + const isPrerelease = process.env.TAG_NAME.includes('beta'); + + github.rest.repos.updateRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id: process.env.release_id, + draft: false, + prerelease: isPrerelease, + }) \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 2b3cc0ee..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,145 +0,0 @@ -name: App Builder -on: - workflow_dispatch: - push: - tags: - - 'v*' - branches: - - master - - main - - release - - develop - - beta - -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - RUST_TOOLCHAIN_VERSION: 1.79.0 - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true -permissions: - contents: write - -jobs: - build: - strategy: - fail-fast: false - matrix: - os: [ubuntu-22.04, windows-latest] - node-version: [18.x] - include: - - platform: ubuntu-22.04 - rust_target: x86_64-unknown-linux-gnu - - platform: windows-latest - rust_target: x86_64-pc-windows-msvc - # - platform: macos-latest - # rust_target: x86_64-apple-darwin - # - platform: macos-latest - # rust_target: aarch64-apple-darwin - runs-on: ${{ matrix.os }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - token: ${{ env.GITHUB_TOKEN }} - - - name: Node.js setup ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - # node-version-file: '.nvmrc' - - - name: 'Setup Rust' - uses: actions-rs/toolchain@v1 - with: - default: true - override: true - profile: minimal - toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }} - target: ${{ matrix.rust_target }} - - - uses: Swatinem/rust-cache@v2 - - - name: Install dependencies (ubuntu only) - if: matrix.os == 'ubuntu-22.04' - run: | - sudo apt-get update - sudo apt-get install -y pkg-config libudev-dev javascriptcoregtk-4.1 libsoup-3.0 libwebkit2gtk-4.0-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev webkit2gtk-4.0 patchelf libsoup2.4-dev - npm install -g pnpm - npm install -g typescript - - - name: install dependencies (windows only) - if: matrix.os == 'windows-latest' - run: | - npm install -g typescript - npm install -g pnpm - - - name: install dependencies (macos only) - if: matrix.os == 'macos-latest' - run: | - brew install pnpm - - - name: Install dependencies (PNPM) - run: pnpm install --no-frozen-lockfile - - - name: Generate Local Plugins (PNPM) - run: pnpm run specta:gen - - - uses: JonasKruckenberg/tauri-build@v1.2.3 - id: tauri_build - with: - target: ${{ matrix.platform.rust_target }} - - - uses: actions/upload-artifact@v4 - with: - name: production-files-${{ matrix.os }} - path: "${{ join(fromJSON(steps.tauri_build.outputs.artifacts), '\n') }}" - - deploy: - runs-on: ubuntu-latest - name: Deploy - needs: [build] - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Create Directory - run: mkdir -p dist - - name: Download artifact - uses: actions/download-artifact@v4 - with: - pattern: production-files-* - path: ./dist - - name: Setup node - uses: actions/setup-node@v4 - with: - node-version: 20 - # remember to update the conventionalcommits version when updating semantic relese - - run: npm install -g conventional-changelog-conventionalcommits@8 - - run: npm install -g semantic-release@v24.1.2 - - run: npm install -g @semantic-release/exec - - run: npm install -g @semantic-release/git - - run: npm install -g @semantic-release/release-notes-generator - - run: npm install -g @semantic-release/changelog - - run: npm install -g @semantic-release/github - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - sudo apt-get install -y jq - chmod +x ./.github/scripts/prepareCMD.sh - semantic-release - - cleanup: - name: Cleanup actions - needs: - - deploy - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: '♻️ remove build artifacts' - uses: geekyeggo/delete-artifact@v5 - with: - name: production-files diff --git a/.github/workflows/test-build-only.yml b/.github/workflows/test-build-only.yml new file mode 100644 index 00000000..104d7f1d --- /dev/null +++ b/.github/workflows/test-build-only.yml @@ -0,0 +1,79 @@ +name: 'test-on-pr' + +on: + workflow_dispatch: + pull_request: + types: [ opened, reopened, synchronize ] + + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RUST_TOOLCHAIN_VERSION: 1.93.0 + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +permissions: + contents: write + +jobs: + test-tauri: + strategy: + fail-fast: false + matrix: + include: + # - platform: 'macos-latest' # for Arm based macs (M1 and above). + # args: '--target aarch64-apple-darwin' + # - platform: 'macos-latest' # for Intel based macs. + # args: '--target x86_64-apple-darwin' + - platform: 'ubuntu-22.04' + args: '' + - platform: 'windows-latest' + args: '' + + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v4 + + - name: Node.js setup (25.x) + uses: actions/setup-node@v4 + with: + token: ${{ env.GITHUB_TOKEN }} + node-version: 25.x + + - name: install Rust stable + uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }} + targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} + + - name: Install dependencies (ubuntu only) + if: matrix.platform == 'ubuntu-22.04' + run: | + sudo apt-get update + sudo apt-get install -y pkg-config libudev-dev javascriptcoregtk-4.1 libsoup-3.0 libwebkit2gtk-4.1-dev libssl-dev libgtk-3-dev librsvg2-dev webkit2gtk-4.0 patchelf libsoup2.4-dev libappindicator3-dev + npm install -g pnpm + npm install -g typescript + + - name: install dependencies (windows only) + if: matrix.platform == 'windows-latest' + run: | + npm install -g typescript + npm install -g pnpm + + - name: install dependencies (macos only) + if: matrix.platform == 'macos-latest' + run: | + brew install pnpm + + - name: Install frontend dependencies (PNPM) + run: pnpm install --no-frozen-lockfile + + - uses: tauri-apps/tauri-action@v0.6.1 + id: tauri_build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} + TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} + with: + args: ${{ matrix.args }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 76add878..2edbda52 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ node_modules -dist \ No newline at end of file +dist +*storybook.log +storybook-static diff --git a/.python-version b/.python-version new file mode 100644 index 00000000..6324d401 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.14 diff --git a/.releaserc b/.releaserc deleted file mode 100644 index 96297beb..00000000 --- a/.releaserc +++ /dev/null @@ -1,194 +0,0 @@ -{ - "branches": [ - "main", - "master", - "dev", - { - "name": "beta", - "prerelease": true - }, - { - "name": "alpha", - "prerelease": true - } - ], - "plugins": [ - [ - "@semantic-release/commit-analyzer", - { - "preset": "conventionalcommits", - "parserOpts": { - "noteKeywords": [ - "BREAKING CHANGE", - "BREAKING CHANGES", - "BREAKING" - ] - }, - "releaseRules": [ - { - "breaking": true, - "release": "major" - }, - { - "type": "feat", - "release": "minor" - }, - { - "type": "fix", - "release": "patch" - }, - { - "type": "perf", - "release": "patch" - }, - { - "type": "revert", - "release": "patch" - }, - { - "type": "docs", - "scope": "docs-*", - "release": "minor" - }, - { - "type": "docs", - "release": false - }, - { - "type": "style", - "release": "patch" - }, - { - "type": "refactor", - "release": "patch" - }, - { - "type": "test", - "release": "patch" - }, - { - "type": "build", - "release": "patch" - }, - { - "type": "ci", - "scope": "ci-*", - "release": "patch" - }, - { - "type": "chore", - "release": false - }, - { - "type": "no-release", - "release": false - } - ] - } - ], - [ - "@semantic-release/release-notes-generator", - { - "preset": "conventionalcommits", - "parserOpts": { - "noteKeywords": [ - "BREAKING CHANGE", - "BREAKING CHANGES", - "BREAKING" - ] - }, - "writerOpts": { - "commitsSort": [ - "subject", - "scope" - ] - }, - "presetConfig": { - "types": [ - { - "type": "feat", - "section": "🍕 Features" - }, - { - "type": "feature", - "section": "🍕 Features" - }, - { - "type": "fix", - "section": "🐛 Bug Fixes" - }, - { - "type": "perf", - "section": "🔥 Performance Improvements" - }, - { - "type": "revert", - "section": "⏩ Reverts" - }, - { - "type": "docs", - "section": "📝 Documentation" - }, - { - "type": "style", - "section": "🎨 Styles" - }, - { - "type": "refactor", - "section": "🧑‍💻 Code Refactoring" - }, - { - "type": "test", - "section": "✅ Tests" - }, - { - "type": "build", - "section": "🤖 Build System" - }, - { - "type": "ci", - "section": "🔁 Continuous Integration" - } - ] - } - } - ], - [ - "@semantic-release/changelog", - { - "changelogTitle": "# 📦 Changelog \n[![conventional commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n[![semantic versioning](https://img.shields.io/badge/semantic%20versioning-2.0.0-green.svg)](https://semver.org)\n> All notable changes to this project will be documented in this file" - } - ], - [ - "@semantic-release/exec", - { - "prepareCmd": "./.github/scripts/prepareCMD.sh ${nextRelease.version}", - "publishCmd": "echo Publishing ${nextRelease.version}" - } - ], - [ - "@semantic-release/github", - { - "addReleases": "bottom", - "assets": [ - { "path": "./dist/**/*.msi" }, - { "path": "./dist/**/*.AppImage" }, - { "path": "./dist/**/*.deb" } - ] - } - ], - [ - "@semantic-release/git", - { - "assets": [ - "package.json", - "src-tauri/tauri.conf.json", - "src-tauri/Cargo.toml", - "LICENSE*", - "CHANGELOG.md" - ], - "message": "chore(${nextRelease.type}): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" - } - ] - ] -} diff --git a/.storybook/main.ts b/.storybook/main.ts new file mode 100644 index 00000000..b5a75987 --- /dev/null +++ b/.storybook/main.ts @@ -0,0 +1,11 @@ +import type { StorybookConfig } from 'storybook-solidjs-vite' + +const config: StorybookConfig = { + stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], + addons: ['@storybook/addon-docs'], + framework: { + name: 'storybook-solidjs-vite', + options: {}, + }, +} +export default config diff --git a/.storybook/preview.ts b/.storybook/preview.ts new file mode 100644 index 00000000..bb4a8bfc --- /dev/null +++ b/.storybook/preview.ts @@ -0,0 +1,15 @@ +import type { Preview } from 'storybook-solidjs-vite' +import '../src/styles/imports.css' + +const preview: Preview = { + parameters: { + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/i, + }, + }, + }, +} + +export default preview diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 93d3e8a5..24d7cc6d 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,7 +1,3 @@ { - "recommendations": [ - "tauri-apps.tauri-vscode", - "rust-lang.rust-analyzer", - "esbenp.prettier-vscode" - ] + "recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 51d825e4..42388b04 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,5 +15,5 @@ "WROOMS", "XAIO", "XIAOSENSES" - ] + ], } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 87a3f13c..15497244 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,34 @@ [![semantic versioning](https://img.shields.io/badge/semantic%20versioning-2.0.0-green.svg)](https://semver.org) > All notable changes to this project will be documented in this file +## [1.7.0-beta.4](https://github.com/EyeTrackVR/FirmwareFlashingTool/compare/v1.7.0-beta.3...v1.7.0-beta.4) (2026-02-15) + +### 🍕 Features + +* test disable updater ([a770144](https://github.com/EyeTrackVR/FirmwareFlashingTool/commit/a7701441de8dcd2df24ebe41c9126e26caa7d556)) + +## [1.7.0-beta.3](https://github.com/EyeTrackVR/FirmwareFlashingTool/compare/v1.7.0-beta.2...v1.7.0-beta.3) (2026-02-15) + +### 🍕 Features + +* Switch to official tauri-action ([14b1990](https://github.com/EyeTrackVR/FirmwareFlashingTool/commit/14b19905a30f24045d8dfdc811c53b96e05b23f6)) + +## [1.7.0-beta.2](https://github.com/EyeTrackVR/FirmwareFlashingTool/compare/v1.7.0-beta.1...v1.7.0-beta.2) (2026-02-14) + +### 🍕 Features + +* Update build.yml to include tauri secrets in env ([e02963a](https://github.com/EyeTrackVR/FirmwareFlashingTool/commit/e02963a2e0f13476c079ec38340598c79e41b71c)) + +## [1.7.0-beta.1](https://github.com/EyeTrackVR/FirmwareFlashingTool/compare/v1.6.0...v1.7.0-beta.1) (2025-03-21) + +### 🍕 Features + +* Update dependencies, add proper Project Babble support ([da5e79c](https://github.com/EyeTrackVR/FirmwareFlashingTool/commit/da5e79cb757838cd3f51c331efc586b457d71f86)) + +### 📝 Documentation + +* Update FUNDING.yml ([70a1594](https://github.com/EyeTrackVR/FirmwareFlashingTool/commit/70a159434119a1aef9bdba96f91804cc6e3f28a0)) + ## [1.6.0](https://github.com/EyeTrackVR/FirmwareFlashingTool/compare/v1.5.0...v1.6.0) (2025-01-30) ### 🍕 Features diff --git a/README.md b/README.md index 0259060b..c71a1c0c 100644 --- a/README.md +++ b/README.md @@ -17,21 +17,42 @@ This repo includes: ## Usage > [!WARNING]\ -This project uses `pnpm` by default, and utilizes `pnpm workspaces`. If you do not have `pnpm` installed, you can install it with `npm install -g pnpm`. +> This project uses `pnpm` by default, and utilizes `pnpm workspaces`. If you do not have `pnpm` installed, you can install it with `npm install -g pnpm`. You _can_ use `yarn` or `npm`, however, _you_ will need to modify the project to remove the `pnpm` specific commands and workspace. ## Setup -This project uses custom `Tauri Plugins` to communicate with the hardware. These plugins are located in the [`src-tauri/src/lib`](/src-tauri/src/lib) folder. - -> [!WARNING]\ -> You **must** run the following command to install the project deps and build the plugins before running the app: +### Step 1 - setup node environment ```bash pnpm run setup ``` +### Step 2 - setting up the backend binary + +To actually compile the project, you'll also need a binary of the ETVR backend from [here](). + +Clone the project, follow its readme to set it up and build the binary. +Once done, copy the result into [backend_bin](/src-tauri/backend_bin) and rename it to `ETVR-` + +The target triple can be obtained by running + +```bash +rustc -Vv +``` + +The info you're looking for will be stored under `host:`, for example `host: x86_64-pc-windows-msvc` +So the copied binary should be named like `ETVR-x86_64-pc-windows-msvc` + +### Step 3 + +Run the project + +```bash +pnpm tauri dev +``` + ## Available Scripts See the [`package.json`](/package.json) for all available scripts. @@ -56,6 +77,11 @@ Runs `eslint` on all of the included files. Uses `Prettier` and the above `pnpm lint` command to lint and then format all included file types. +## Development + +This project follows the architecture Tauri laid down - `Tauri Plugins` and commands, to communicate with the hardware. +These plugins are located in the [`src-tauri/src/lib`](/src-tauri/src/lib) folder. + ## Deployment To build the app, run the following: @@ -68,3 +94,59 @@ Builds the app for production to the `src-tauri/target` folder.
This will correctly bundle Solid in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.
+ +## Updating version for CI + +### Requirements + +Install UV: +- https://docs.astral.sh/uv/ + +Then, in the project root run: +```shell +uv sync +``` + +### Beta version + +First, make sure your changes are merged into the `beta` branch and that you're currently checked out on it. +Once done, run: + +```shell +uv run bumpver update --tag-num --tag beta --dry +``` + +Check if your changes look good, and if so: + +```shell +uv run bumpver update --tag-num --tag beta +``` + +This will push the new bump commit with a special tag that will trigger a fresh beta build + +## Release version + +Follow the same steps as for `Beta` version but instead of tag beta use one of the following + +- `--patch` - for patch updates +- `--minor` - for minor changes +- `--major` - for breaking changes + +## Pushing the new version to Github + +Unfortunately, since bumpver doesn't support setting v in git tags, we have to do one more step + +```shell +git tag v +``` + +for example +```shell +git tag v1.7.1-beta.2 1.7.1-beta.2 +``` + +Once done: + +```shell +git push --follow-tags +``` \ No newline at end of file diff --git a/index.html b/index.html index 8f84a995..ba44ac3e 100644 --- a/index.html +++ b/index.html @@ -43,28 +43,8 @@ -
-
-
- - - -
-
- - - -
-
- - - -
-
-
- +
+