diff --git a/.github/workflows/Conventional-commits.yml b/.github/workflows/Conventional-commits.yml new file mode 100644 index 000000000..09464c6ce --- /dev/null +++ b/.github/workflows/Conventional-commits.yml @@ -0,0 +1,13 @@ +name: Conventional Commits + +on: + pull_request: + branches: [ main ] + +jobs: + build: + name: Conventional Commits + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: webiny/action-conventional-commits@v1.3.0 \ No newline at end of file diff --git a/.github/workflows/Tauri-testing.yml b/.github/workflows/Tauri-testing.yml new file mode 100644 index 000000000..1ee1e21ca --- /dev/null +++ b/.github/workflows/Tauri-testing.yml @@ -0,0 +1,53 @@ +name: Desktop Simulator Tests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: '16 5 * * 0' + +jobs: + desktop-simulator-tests: + name: Desktop Simulator Tests + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 # Use Node.js 22 + + - name: Install Dependencies + run: npm install + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Install Tauri CLI + run: cargo install tauri-cli + + - name: Debug Environment + run: | + echo "Node.js version: $(node -v)" + echo "npm version: $(npm -v)" + echo "Rust version: $(rustc --version)" + echo "Tauri CLI version: $(tauri --version)" + + - name: Start Mock API + run: | + npm install -g json-server + json-server --watch mock-api.json --port 3000 & + + - name: Build Tauri App using build-desktop.js + run: | + node build-desktop.js + + diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index b1fc4f260..05bd091ad 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -54,4 +54,4 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 with: - category: "/language:${{matrix.language}}" + category: "/language:${{matrix.language}}" \ No newline at end of file diff --git a/.github/workflows/desktoprelease.yml b/.github/workflows/desktoprelease.yml new file mode 100644 index 000000000..370f89a6a --- /dev/null +++ b/.github/workflows/desktoprelease.yml @@ -0,0 +1,217 @@ +# Unified GitHub Actions workflow for creating a release, building multi-platform assets, +# and attaching them to the new release. + +name: Unified Release and Deploy + +# This workflow is triggered manually. +# It is designed to be run after a series of merged Pull Requests have accumulated. +on: + workflow_dispatch: + +# The permissions required for the jobs. +permissions: + contents: write # For creating releases and pushing tags/commits + issues: write # For managing issues and comments + pull-requests: write # For managing pull requests + id-token: write # For OIDC authentication, if needed + +jobs: + # 1. This job handles the release creation and versioning using semantic-release. + # It determines the next version, generates the changelog, and creates the + # new GitHub Release. + release: + name: Create Release + runs-on: ubuntu-latest + outputs: + new_release_published: ${{ steps.semantic.outputs.new_release_published }} + new_release_version: ${{ steps.semantic.outputs.new_release_version }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required for semantic-release to analyze history + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "lts/*" + + - name: Install semantic-release and plugins + run: | + npm init -y + npm install --no-save \ + semantic-release \ + @semantic-release/commit-analyzer \ + @semantic-release/release-notes-generator \ + @semantic-release/changelog \ + @semantic-release/github \ + @semantic-release/git \ + conventional-changelog-conventionalcommits + # semantic-release-pub plugin is specific to Dart/Flutter, we will not use it here + # as the user's goal is a Tauri app. + + - name: Create semantic-release config file + run: | + echo '{ + "branches": ["main"], + "plugins": [ + ["@semantic-release/commit-analyzer", { + "preset": "conventionalcommits" + }], + ["@semantic-release/release-notes-generator", { + "preset": "conventionalcommits" + }], + ["@semantic-release/changelog", { + "changelogFile": "CHANGELOG.md" + }], + ["@semantic-release/git", { + "assets": ["CHANGELOG.md"], + "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" + }], + ["@semantic-release/github", { + "assets": [] + }] + ] + }' > .releaserc.json + + - name: Run Semantic Release + id: semantic + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npx semantic-release + + # 2. This job builds the Tauri application for multiple operating systems in parallel. + # It depends on the 'release' job and only runs if a new release was published. + build_assets: + name: Build Multi-Platform Assets + needs: release + if: needs.release.outputs.new_release_published == 'true' + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: main # Ensure we are building the latest code from the main branch + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Cache Node.js Dependencies + uses: actions/cache@v4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: ${{ runner.os }}-node- + + - name: Install Dependencies + run: npm install + shell: bash + + - name: Install Tauri CLI and API + run: | + npm install -g @tauri-apps/cli + npm install @tauri-apps/cli @tauri-apps/api @tauri-apps/plugin-fs --save-dev + shell: bash + + - name: Setup Rust + if: matrix.os != 'windows-latest' + run: | + rustup update stable + rustup default stable + shell: bash + + - name: Install Linux Dependencies (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt update + sudo apt install -y libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev + shell: bash + + - name: Install macOS Dependencies + if: matrix.os == 'macos-latest' + run: | + brew update + brew install pkg-config + shell: bash + + - name: Cache Rust Dependencies + uses: Swatinem/rust-cache@v2 + with: + workspaces: "./src-tauri" + + - name: Build Tauri App + run: npm run tauri build + shell: bash + + - name: Upload Tauri Build Artifacts + uses: actions/upload-artifact@v4 + with: + name: Tauri Build Artifacts (${{ matrix.os }}) + path: | + src-tauri/target/release/bundle + + # 3. This final job downloads all the built assets and uploads them to the + # GitHub Release that was created in the first job. + upload_release_assets: + name: Upload to Release + runs-on: ubuntu-latest + needs: [release, build_assets] + if: needs.release.outputs.new_release_published == 'true' + + steps: + - name: Download all build artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Prepare Release Assets + run: | + mkdir -p release-assets + + # For Ubuntu (Linux) + if [ -d "artifacts/Tauri Build Artifacts (ubuntu-latest)/deb" ]; then + cp artifacts/Tauri\ Build\ Artifacts\ \(ubuntu-latest\)/deb/*.deb release-assets/ || true + fi + if [ -d "artifacts/Tauri Build Artifacts (ubuntu-latest)/appimage" ]; then + cp artifacts/Tauri\ Build\ Artifacts\ \(ubuntu-latest\)/appimage/*.AppImage release-assets/ || true + fi + + # For Windows + if [ -d "artifacts/Tauri Build Artifacts (windows-latest)/msi" ]; then + cp artifacts/Tauri\ Build\ Artifacts\ \(windows-latest\)/msi/*.msi release-assets/ || true + fi + + # For macOS + if [ -d "artifacts/Tauri Build Artifacts (macos-latest)/dmg" ]; then + cp artifacts/Tauri\ Build\ Artifacts\ \(macos-latest\)/dmg/*.dmg release-assets/ || true + fi + if [ -d "artifacts/Tauri Build Artifacts (macos-latest)/app" ]; then + cd artifacts/Tauri\ Build\ Artifacts\ \(macos-latest\)/app + for app in *.app; do + zip -r "../../../release-assets/${app%.app}.zip" "$app" + done + cd - || exit + fi + + ls -la release-assets/ + shell: bash + + - name: Upload assets to GitHub Release + uses: softprops/action-gh-release@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + files: | + release-assets/* + tag_name: v${{ needs.release.outputs.new_release_version }} + token: ${{ secrets.GITHUB_TOKEN }} + draft: false + prerelease: false diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index d732827dd..332b09491 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -46,4 +46,4 @@ jobs: uses: github/codeql-action/upload-sarif@v2 with: sarif_file: eslint-results.sarif - wait-for-processing: true + wait-for-processing: true \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..bbc5017b0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,185 @@ +# This workflow is triggered on pushes to the main branch and when a new release is created. +name: Vue + Tauri Simulator Desktop Release + +on: + push: + branches: [ "main" ] + release: + types: [created] + +jobs: + build-tauri: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Cache Node.js Dependencies + uses: actions/cache@v4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: ${{ runner.os }}-node- + + - name: Install Dependencies + run: npm install + shell: bash + + - name: Install Tauri CLI and API + run: | + npm install -g @tauri-apps/cli + npm install @tauri-apps/cli @tauri-apps/api @tauri-apps/plugin-fs --save-dev + shell: bash + + - name: Run Cross-Platform Build Script + run: node build-desktop.js + shell: bash + + - name: Setup Rust + if: matrix.os != 'windows-latest' + run: | + rustup update stable + rustup default stable + shell: bash + + - name: Install Linux Dependencies (Ubuntu) + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt update + sudo apt install libwebkit2gtk-4.1-dev \ + build-essential \ + curl \ + wget \ + file \ + libxdo-dev \ + libssl-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev + shell: bash + + - name: Install macOS Dependencies + if: matrix.os == 'macos-latest' + run: | + brew update + brew install pkg-config + shell: bash + + - name: Cache Rust Dependencies + uses: Swatinem/rust-cache@v2 + with: + workspaces: "./src-tauri" + + - name: Build Tauri App + run: npm run tauri build + shell: bash + + - name: Upload Tauri Build Artifacts + uses: actions/upload-artifact@v4 + with: + name: Tauri Build Artifacts (${{ matrix.os }}) + path: | + src-tauri/target/release/bundle + + create-release: + runs-on: ubuntu-latest + needs: build-tauri + steps: + - name: Checkout repository + uses: actions/checkout@v4 + # Fetch all history for conventional-changelog to work correctly + with: + fetch-depth: 0 + + # Corrected action name to TriPSs/conventional-changelog-action + - name: Generate Changelog + id: changelog + uses: TriPSs/conventional-changelog-action@v3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Prepare Release Assets + run: | + mkdir -p release-assets + + # For Ubuntu (Linux) + if [ -d "artifacts/Tauri Build Artifacts (ubuntu-latest)/deb" ]; then + cp artifacts/Tauri\ Build\ Artifacts\ \(ubuntu-latest\)/deb/*.deb release-assets/ || true + fi + if [ -d "artifacts/Tauri Build Artifacts (ubuntu-latest)/appimage" ]; then + cp artifacts/Tauri\ Build\ Artifacts\ \(ubuntu-latest\)/appimage/*.AppImage release-assets/ || true + fi + + # For Windows + if [ -d "artifacts/Tauri Build Artifacts (windows-latest)/msi" ]; then + cp artifacts/Tauri\ Build\ Artifacts\ \(windows-latest\)/msi/*.msi release-assets/ || true + fi + + # For macOS + if [ -d "artifacts/Tauri Build Artifacts (macos-latest)/dmg" ]; then + cp artifacts/Tauri\ Build\ Artifacts\ \(macos-latest\)/dmg/*.dmg release-assets/ || true + fi + if [ -d "artifacts/Tauri Build Artifacts (macos-latest)/app" ]; then + cd artifacts/Tauri\ Build\ Artifacts\ \(macos-latest\)/app + for app in *.app; do + zip -r "../../../release-assets/${app%.app}.zip" "$app" + done + cd - || exit + fi + + ls -la release-assets/ + shell: bash + + - name: Install GitHub CLI + run: | + curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null + sudo apt update + sudo apt install gh -y + shell: bash + + - name: Auto-increment version and create GitHub Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Fetch latest tag + LATEST_TAG=$(git tag --sort=-v:refname | head -n 1) + + # Extract major, minor, patch versions + if [[ "$LATEST_TAG" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then + MAJOR=${BASH_REMATCH[1]} + MINOR=${BASH_REMATCH[2]} + PATCH=${BASH_REMATCH[3]} + else + MAJOR=0 + MINOR=0 + PATCH=0 + fi + + # Increment patch version + NEW_VERSION="v$MAJOR.$MINOR.$((PATCH + 1))" + + # Use the generated changelog as the release notes + # The `changelog` step's output is accessed via `steps.changelog.outputs.changelog` + CHANGELOG_NOTES="${{ steps.changelog.outputs.changelog }}" + + # Create release + gh release create "$NEW_VERSION" \ + --title "CircuitVerse Desktop $NEW_VERSION" \ + --notes "$CHANGELOG_NOTES" \ + release-assets/* + shell: bash diff --git a/.github/workflows/tauri-release.yml b/.github/workflows/tauri-release.yml deleted file mode 100644 index e4ff32586..000000000 --- a/.github/workflows/tauri-release.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Vue Simulator Desktop Release - -on: - push: - branches: [ "main" ] - release: - types: [created] - -jobs: - build-tauri: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - - steps: - - name: Checkout repository - uses: actions/checkout@v3 -# node 22 is been used in circuitverse primary code base. - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - - - name: Install Dependencies (Vue + Tauri CLI) - run: | - npm install - npm install -g @tauri-apps/cli - working-directory: ./src - - - name: Build Frontend (Vue) - run: | - npm run build - working-directory: ./src - - - name: Setup Rust - if: matrix.os != 'windows-latest' - run: | - rustup update stable - rustup default stable - - - name: Cache Rust Dependencies - uses: Swatinem/rust-cache@v2 - - - name: Build Tauri App - uses: tauri-apps/tauri-action@v0 - with: - projectPath: ./src-tauri - tagName: ${{ github.ref_name }} - releaseName: "Tauri Desktop Release ${{ github.ref_name }}" - releaseBody: "See the assets below to download this release." - releaseDraft: false - prerelease: false - - - name: Upload Tauri Build Artifacts - uses: actions/upload-artifact@v4 - with: - name: Tauri Build Artifacts (${{ matrix.os }}) - path: | - src-tauri/target/release/bundle diff --git a/.github/workflows/websimulatortest.yml b/.github/workflows/websimulatortest.yml new file mode 100644 index 000000000..6bf045146 --- /dev/null +++ b/.github/workflows/websimulatortest.yml @@ -0,0 +1,29 @@ +name: Simulator Tests + +on: + push: + branches: + - main + + pull_request: + branches: + - main + + +jobs: + run-simulator-tests: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install Dependencies + run: npm install + + \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..caf5b02ba --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +## [3.3.0](https://github.com/ThatDeparted2061/cv-frontend-vue/compare/v3.2.2...v3.3.0) (2025-08-17) + +### Features + +* Add conventional commit file ([3211558](https://github.com/ThatDeparted2061/cv-frontend-vue/commit/3211558df0b88efc75e51cf1cd376e76b2c3816a)) diff --git a/build-desktop.js b/build-desktop.js new file mode 100644 index 000000000..48c731ce9 --- /dev/null +++ b/build-desktop.js @@ -0,0 +1,37 @@ + +const os = require('os'); +const { execSync } = require('child_process'); + + +function runCommand(command) { + try { + const output = execSync(command, { encoding: 'utf8', stdio: 'pipe' }); + if (output) { + console.log(output); + } + } catch (error) { + console.error(`Error executing command: ${command}`); + if (error.stdout) { + console.error(`Stdout: ${error.stdout}`); + } + if (error.stderr) { + console.error(`Stderr: ${error.stderr}`); + } + process.exit(1); + } +} + + +process.env.DESKTOP_MODE = "true"; + +const platform = os.platform(); +console.log(`Building for ${platform === 'win32' ? 'Windows' : 'Unix-based system'}...`); + + +runCommand('npm run build'); + +if (platform === 'win32') { + runCommand('copy dist\\index-cv.html dist\\index.html'); +} else { + runCommand('cp dist/index-cv.html dist/index.html'); +} diff --git a/package-lock.json b/package-lock.json index 7a56389bf..09d19e1a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -76,113 +76,28 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, "dependencies": { - "@babel/highlight": "^7.24.7", - "picocolors": "^1.0.0" + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "dev": true, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/parser": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", @@ -1715,6 +1630,150 @@ "node": ">= 10" } }, + "node_modules/@tauri-apps/cli-darwin-x64": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.3.1.tgz", + "integrity": "sha512-LDwGg3AuBQ3aCeMAFaFwt0MSGOVFoXuXEe0z4QxQ7jZE5tdAOhKABaq4i569V5lShCgQZ6nLD/tmA5+GipvHnA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm-gnueabihf": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.3.1.tgz", + "integrity": "sha512-hu3HpbbtJBvHXw5i54QHwLxOUoXWqhf7CL2YYSPOrWEEQo10NKddulP61L5gfr5z+bSSaitfLwqgTidgnaNJCA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm64-gnu": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.3.1.tgz", + "integrity": "sha512-mEGgwkiGSKYXWHhGodo7zU9PCd2I/d6KkR+Wp1nzK+DxsCrEK6yJ5XxYLSQSDcKkM4dCxpVEPUiVMbDhmn08jg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm64-musl": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.1.tgz", + "integrity": "sha512-tqQkafikGfnc7ISnGjSYkbpnzJKEyO8XSa0YOXTAL3J8R5Pss5ZIZY7G8kq1mwQSR/dPVR1ZLTVXgZGuysjP8w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-x64-musl": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.1.tgz", + "integrity": "sha512-rbWiCOBuQN7tPySkUyBs914uUikE3mEUOqV/IFospvKESw4UC3G1DL5+ybfXH7Orb8/in3JpJuVzYQjo+OSbBA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-arm64-msvc": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.3.1.tgz", + "integrity": "sha512-PdTmUzSeTHjJuBpCV7L+V29fPhPtToU+NZU46slHKSA1aT38MiFDXBZ/6P5Zudrt9QPMfIubqnJKbK8Ivvv7Ww==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-ia32-msvc": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.3.1.tgz", + "integrity": "sha512-K/Xa97kspWT4UWj3t26lL2D3QsopTAxS7kWi5kObdqtAGn3qD52qBi24FH38TdvHYz4QlnLIb30TukviCgh4gw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-x64-msvc": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.3.1.tgz", + "integrity": "sha512-RgwzXbP8gAno3kQEsybMtgLp6D1Z1Nec2cftryYbPTJmoMJs6e4qgtxuTSbUz5SKnHe8rGgMiFSvEGoHvbG72Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli/node_modules/@tauri-apps/cli-linux-x64-gnu": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.3.1.tgz", + "integrity": "sha512-I3puDJ2wGEauXlXbzIHn2etz78TaWs1cpN6zre02maHr6ZR7nf7euTCOGPhhfoMG0opA5mT/eLuYpVw648/VAA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, "node_modules/@tauri-apps/plugin-fs": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-fs/-/plugin-fs-2.2.0.tgz", @@ -3621,9 +3680,9 @@ "peer": true }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "dependencies": { "path-key": "^3.1.0", @@ -4883,15 +4942,15 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" @@ -6661,9 +6720,9 @@ } }, "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" diff --git a/package.json b/package.json index 6751f7281..889acf6f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cv-frontend-vue", - "version": "0.0.0", + "version": "3.3.0", "private": true, "scripts": { "serve": "vite preview", diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 687a2eb70..b470c1cf6 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -7,7 +7,7 @@ "frontendDist": "../dist", "devUrl": "http://localhost:4000/simulatorvue/", "beforeDevCommand": "npm run dev", - "beforeBuildCommand": "DESKTOP_MODE=true npm run build && cp ./dist/index-cv.html ./dist/index.html" + "beforeBuildCommand": "node build-desktop.js" }, "app": { "windows": [ diff --git a/v0/src/components/DialogBox/OpenOffline.vue b/v0/src/components/DialogBox/OpenOffline.vue index c94add8da..c75cf2575 100644 --- a/v0/src/components/DialogBox/OpenOffline.vue +++ b/v0/src/components/DialogBox/OpenOffline.vue @@ -128,7 +128,7 @@ function openProjectOffline() { // If no version, proceed directly targetVersion.value = "Legacy" SimulatorState.dialogBox.version_mismatch_dialog = true - } else if (simulatorVersion && simulatorVersion != "v0") { + } else if ( simulatorVersion != "v0") { // Set the targetVersion and show the version mismatch dialog targetVersion.value = simulatorVersion SimulatorState.dialogBox.version_mismatch_dialog = true diff --git a/v1/src/components/DialogBox/OpenOffline.vue b/v1/src/components/DialogBox/OpenOffline.vue index c94add8da..d63d48ea9 100644 --- a/v1/src/components/DialogBox/OpenOffline.vue +++ b/v1/src/components/DialogBox/OpenOffline.vue @@ -128,7 +128,7 @@ function openProjectOffline() { // If no version, proceed directly targetVersion.value = "Legacy" SimulatorState.dialogBox.version_mismatch_dialog = true - } else if (simulatorVersion && simulatorVersion != "v0") { + } else if ( simulatorVersion != "v1") { // Set the targetVersion and show the version mismatch dialog targetVersion.value = simulatorVersion SimulatorState.dialogBox.version_mismatch_dialog = true