Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ jobs:
# ── Publish portable binaries ────────────────────────────────────────────

- name: Publish API (linux-x64)
run: dotnet publish ${{ env.API_PROJECT }} -c Release -r linux-x64 --self-contained true /p:PublishSingleFile=true -o ${{ env.API_OUTPUT }}/linux-x64
run: dotnet publish ${{ env.API_PROJECT }} -c Release -r linux-x64 --no-restore --self-contained true /p:PublishSingleFile=true -o ${{ env.API_OUTPUT }}/linux-x64

- name: Publish API (win-x64)
run: dotnet publish ${{ env.API_PROJECT }} -c Release -r win-x64 --self-contained true /p:PublishSingleFile=true -o ${{ env.API_OUTPUT }}/win-x64
run: dotnet publish ${{ env.API_PROJECT }} -c Release -r win-x64 --no-restore --self-contained true /p:PublishSingleFile=true -o ${{ env.API_OUTPUT }}/win-x64

- name: Publish API (osx-x64)
if: inputs.include_osx
run: dotnet publish ${{ env.API_PROJECT }} -c Release -r osx-x64 --self-contained true /p:PublishSingleFile=true -o ${{ env.API_OUTPUT }}/osx-x64
run: dotnet publish ${{ env.API_PROJECT }} -c Release -r osx-x64 --no-restore --self-contained true /p:PublishSingleFile=true -o ${{ env.API_OUTPUT }}/osx-x64

# ── Zip and upload artifacts ─────────────────────────────────────────────

Expand Down Expand Up @@ -261,8 +261,8 @@ jobs:
run: |
set -euo pipefail
rm -rf "${{ env.DOCKER_OUTPUT }}"
dotnet publish ${{ env.API_PROJECT }} -c Release -r linux-x64 --self-contained false /p:UseAppHost=false -o "${{ env.DOCKER_OUTPUT }}/amd64"
dotnet publish ${{ env.API_PROJECT }} -c Release -r linux-arm64 --self-contained false /p:UseAppHost=false -o "${{ env.DOCKER_OUTPUT }}/arm64"
dotnet publish ${{ env.API_PROJECT }} -c Release -r linux-x64 --no-restore --self-contained false /p:UseAppHost=false -o "${{ env.DOCKER_OUTPUT }}/amd64"
dotnet publish ${{ env.API_PROJECT }} -c Release -r linux-arm64 --no-restore --self-contained false /p:UseAppHost=false -o "${{ env.DOCKER_OUTPUT }}/arm64"

- name: Show publish contents (sanity check)
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ jobs:
fi

- name: Publish API (linux-x64)
run: dotnet publish ${{ env.API_PROJECT }} -c Release -r linux-x64 --self-contained true /p:PublishSingleFile=true -o listenarr.api/publish/linux-x64
run: dotnet publish ${{ env.API_PROJECT }} -c Release -r linux-x64 --no-restore --self-contained true /p:PublishSingleFile=true -o listenarr.api/publish/linux-x64
2 changes: 2 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<RestoreLockedMode Condition="'$(CI)' == 'true'">true</RestoreLockedMode>
<EFVersion>10.0.8</EFVersion>
</PropertyGroup>

Expand Down
102 changes: 51 additions & 51 deletions fe/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions fe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"type": "module",
"engines": {
"node": ">=24.0.0"
"node": "^24.15.0"
},
"scripts": {
"version:sync": "node ../scripts/sync-fe-version-from-csproj.mjs",
Expand Down Expand Up @@ -62,21 +62,21 @@
"@vue/test-utils": "^2.4.11",
"@vue/tsconfig": "^0.9.1",
"concurrently": "^10.0.3",
"cypress": "^15.16.0",
"cypress": "^15.17.0",
"eslint": "^10.4.1",
"eslint-plugin-cypress": "^6.4.1",
"eslint-plugin-vue": "^10.9.2",
"jiti": "^2.7.0",
"jsdom": "^29.1.1",
"npm-run-all2": "^8.0.4",
"npm-run-all2": "^9.0.1",
"patch-package": "^8.0.1",
"prettier": "^3.8.3",
"prettier": "^3.8.4",
"rollup-plugin-visualizer": "^7.0.1",
"start-server-and-test": "^3.0.8",
"start-server-and-test": "^3.0.9",
"typescript": "^6.0.3",
"vite": "^8.0.16",
"vitest": "^4.1.8",
"vue-tsc": "^3.3.3"
"vue-tsc": "^3.3.4"
},
"overrides": {
"ajv": "^8.18.0",
Expand Down
20 changes: 2 additions & 18 deletions fe/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { createRouter, createWebHistory } from 'vue-router'
import { useAuthStore } from '@/stores/auth'
import { getStartupConfigCached } from '@/services/startupConfigCache'
import { logger } from '@/utils/logger'
import { setRouter } from '@/services/routerInstance'
import type { StartupConfig } from '@/types'

// Module-level cache/promise for startup config to avoid repeated requests during rapid navigation
Expand Down Expand Up @@ -150,12 +151,6 @@ export function preloadRoute(nameOrPath: string) {
return Promise.resolve()
}

/**
* Module-level reference set by createAppRouter().
* Used by code that lazily imports the router (e.g. auth store).
*/
let _routerInstance: ReturnType<typeof createRouter> | null = null

// Factory function to create and configure the router.
// Deferred to avoid calling createWebHistory/createRouter at module top-level,
// which triggers a Rolldown (Vite 8) circular-dependency crash where vue-router
Expand Down Expand Up @@ -333,17 +328,6 @@ export function createAppRouter() {
return true
})

_routerInstance = router
setRouter(router)
return router
}

/**
* Returns the router instance previously created by createAppRouter().
* Throws if called before createAppRouter().
*/
export function getRouter() {
if (!_routerInstance) {
throw new Error('Router not initialized – call createAppRouter() first')
}
return _routerInstance
}
15 changes: 15 additions & 0 deletions fe/src/services/routerInstance.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Router } from 'vue-router'

let routerInstance: Router | null = null

export function setRouter(router: Router) {
routerInstance = router
}

export function getRouter() {
if (!routerInstance) {
throw new Error('Router not initialized - call createAppRouter() first')
}

return routerInstance
}
4 changes: 2 additions & 2 deletions fe/src/stores/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { sessionTokenManager } from '@/utils/sessionToken'
import { clearAllAuthData } from '@/utils/sessionDebug'
import { errorTracking } from '@/services/errorTracking'
import { getStartupConfigCached } from '@/services/startupConfigCache'
import { getRouter } from '@/services/routerInstance'

export const useAuthStore = defineStore('auth', () => {
const user = ref<{ authenticated: boolean; name?: string }>({ authenticated: false })
Expand Down Expand Up @@ -66,8 +67,7 @@ export const useAuthStore = defineStore('auth', () => {
}

try {
const routerModule = await import('@/router')
const router = routerModule.getRouter()
const router = getRouter()
const route = router.currentRoute.value
const redirect = route.fullPath || current

Expand Down
Loading
Loading