From c5c3ec3d9f3be87bb101e1de92f42530554e3b88 Mon Sep 17 00:00:00 2001 From: Gabriel20xx Date: Mon, 7 Sep 2026 16:00:08 +0200 Subject: [PATCH] Update path references for Central->Core, Forks->Fork rename The workspace's Central/ and Forks/ parent folders were renamed to Core/ and Fork/ (singular) - a pure local filesystem reorganization, git repos don't care about their own absolute path. Updates sync-consumers.ps1's consumer list and workspace-root detection, plus doc-comment/README cross-references that hardcoded the old paths. HordeWorker's entry stays at the old 'Forks/HordeWorker' path for now: a long-running process holds that directory open, so it couldn't be moved to Fork/HordeWorker in this pass. Co-Authored-By: Claude Sonnet 5 --- README.md | 2 +- backend/authproxy/authproxy.go | 8 +++++--- backend/mediaauth/auth.go | 6 +++--- packages/java-backend/README.md | 2 +- scripts/sync-consumers.ps1 | 30 ++++++++++++++++-------------- 5 files changed, 26 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 572b60a..862121d 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ go vet ./... Import the stylesheet once, before project-specific overrides: `@import '@gabriel20xx/web-ui/styles.css';`. It uses an `sc-` class prefix, so it doesn't require Tailwind and doesn't collide with existing project classes. Set `data-theme="light"` or `data-theme="dark"` on the application root; dark is the default. -For authentication, use `AuthPage` and wire its callbacks to the project's auth service — every project in this workspace either talks to AuthGuard directly or proxies through its own backend to AuthGuard. See `Central/AuthGuard/README.md` for the identity service this whole authentication surface is built to work with. +For authentication, use `AuthPage` and wire its callbacks to the project's auth service — every project in this workspace either talks to AuthGuard directly or proxies through its own backend to AuthGuard. See `Core/AuthGuard/README.md` for the identity service this whole authentication surface is built to work with. --- diff --git a/backend/authproxy/authproxy.go b/backend/authproxy/authproxy.go index a1bbdba..2a5a1cc 100644 --- a/backend/authproxy/authproxy.go +++ b/backend/authproxy/authproxy.go @@ -4,10 +4,12 @@ // of embedding its own local user table. // // Three services independently reimplemented the same handful of pieces -// below before this package existed (Forks/Bitmagnet/backend/internal/auth/service.go, +// below before this package existed (Fork/Bitmagnet/backend/internal/auth/service.go, // Original/GameStream/backend/cmd/gamestreamd/auth.go, -// Central/shared/media-backend/internal/auth/auth.go — read any one of -// their top-of-file doc comments for the fuller AuthGuard-migration +// this same module's own mediaauth/auth.go, formerly +// Core/shared/media-backend/internal/auth/auth.go before that generic +// multi-service binary was split up — read any one of their top-of-file +// doc comments for the fuller AuthGuard-migration // rationale: session cookie forwarding, the local one-time setup-claim // flag, "auth disabled" mode, etc.). Those pieces stay project-specific // (they depend on each project's own storage/framework/response shape) — diff --git a/backend/mediaauth/auth.go b/backend/mediaauth/auth.go index 15605d3..aeb095e 100644 --- a/backend/mediaauth/auth.go +++ b/backend/mediaauth/auth.go @@ -13,16 +13,16 @@ // CREATE TABLE statements are kept but no longer used for identity - see // below). // -// It now proxies every auth operation to AuthGuard (Web/Central/AuthGuard), +// It now proxies every auth operation to AuthGuard (Web/Core/AuthGuard), // a centralized identity service other projects in this workspace share, -// via the `authclient` package (Web/Central/shared/backend/authclient, +// via the `authclient` package (Web/Core/shared/backend/authclient, // resolved through this module's own `repos.gfranz.ch/Gabriel20xx/shared/backend` // dependency - same module that already provided `sharedauth`). This // service's own /auth/... and /api/auth/... URL paths and JSON response // shapes are UNCHANGED - the frontend (webui) was not touched - only // what backs them changed. This mirrors the migration // Original/GameStream/backend/cmd/gamestreamd/auth.go and -// Forks/Bitmagnet/backend/internal/auth/service.go already did; read either +// Fork/Bitmagnet/backend/internal/auth/service.go already did; read either // file's top-of-file doc comment for the fuller rationale behind each // design choice below. // diff --git a/packages/java-backend/README.md b/packages/java-backend/README.md index 00de61c..8d83435 100644 --- a/packages/java-backend/README.md +++ b/packages/java-backend/README.md @@ -9,7 +9,7 @@ Shared account-management, TOTP, admin reset-code, and AuthGuard client primitiv ## How this package is actually consumed -Unlike its `node-backend`/`python-backend` siblings, this package is not published and installed as a dependency. Its real, already-identified consumer - [MegaBasterd](../../../../Forks/MegaBasterd) - instead adds this package's `src/main/java` as an extra source directory of its *own* Maven build, via the `build-helper-maven-plugin` "add-shared-java-auth" execution in `MegaBasterd/pom.xml`, and compiles these `.java` files straight into its own jar. That pom pins ``/`` to `1.8`, which is why every class in this package targets Java 8 and none of them (including `AuthClient`) take on a dependency beyond the JDK - both would break that real build. +Unlike its `node-backend`/`python-backend` siblings, this package is not published and installed as a dependency. Its real, already-identified consumer - [MegaBasterd](../../../../Fork/MegaBasterd) - instead adds this package's `src/main/java` as an extra source directory of its *own* Maven build, via the `build-helper-maven-plugin` "add-shared-java-auth" execution in `MegaBasterd/pom.xml`, and compiles these `.java` files straight into its own jar. That pom pins ``/`` to `1.8`, which is why every class in this package targets Java 8 and none of them (including `AuthClient`) take on a dependency beyond the JDK - both would break that real build. This package's own `pom.xml` exists only so it can be built and tested in isolation during development; it plays no part in how MegaBasterd (or any future consumer that adopts the same source-inclusion approach) actually builds. diff --git a/scripts/sync-consumers.ps1 b/scripts/sync-consumers.ps1 index e7d9ea3..352db0e 100644 --- a/scripts/sync-consumers.ps1 +++ b/scripts/sync-consumers.ps1 @@ -40,20 +40,20 @@ $consumerProjects = @( New-ConsumerProject 'Original/SyncServer' New-ConsumerProject 'Original/UnraidMonitor' New-ConsumerProject 'Original/PubliSafe' - New-ConsumerProject 'Forks/Bitmagnet' - New-ConsumerProject 'Forks/Heretic' + New-ConsumerProject 'Fork/Bitmagnet' + New-ConsumerProject 'Fork/Heretic' New-ConsumerProject 'Original/InfiniteVideo' - New-ConsumerProject 'Forks/MegaBasterd' - New-ConsumerProject 'Forks/HordeWorker' + New-ConsumerProject 'Fork/MegaBasterd' + New-ConsumerProject 'Forks/HordeWorker' # TODO: rename to Fork/HordeWorker once its locked directory can be moved (a long-running process holds it open) New-ConsumerProject 'Original/OutdoorGames' New-ConsumerProject 'Original/KioskDisplay' New-ConsumerProject 'Original/CraftStudio' New-ConsumerProject 'Original/MediaViewer' - New-ConsumerProject 'Central/CarrierNode' - New-ConsumerProject 'Central/ContentScanner' - New-ConsumerProject 'Central/ModerationHub' - New-ConsumerProject 'Central/ProjectConfigurator' - New-ConsumerProject 'Central/AuthGuard' + New-ConsumerProject 'Core/CarrierNode' + New-ConsumerProject 'Core/ContentScanner' + New-ConsumerProject 'Core/ModerationHub' + New-ConsumerProject 'Core/ProjectConfigurator' + New-ConsumerProject 'Core/AuthGuard' ) function Invoke-GitText { @@ -221,14 +221,16 @@ $sourceRepositoryRoot = (Invoke-GitText -WorkingDirectory $sourceRoot -Arguments $sourceRoot = Resolve-FullPath $sourceRepositoryRoot # The workspace root is the ancestor directory that contains both 'Original' -# and 'Forks' (every consumer project lives under one of those). Walk up from -# the shared repo instead of assuming a fixed nesting depth, since shared/ has -# moved before (e.g. Web/shared -> Web/Central/shared) and may move again. +# and 'Fork' (every consumer project lives under one of those, or under +# 'Core' for the central infrastructure services). Walk up from the shared +# repo instead of assuming a fixed nesting depth, since shared/ has moved +# before (e.g. Web/shared -> Web/Central/shared -> Web/Core/shared, with +# 'Forks' renamed to singular 'Fork' at the same time) and may move again. $workspaceRoot = Split-Path -Parent $sourceRoot -while ($workspaceRoot -and -not ((Test-Path -LiteralPath (Join-Path $workspaceRoot 'Original') -PathType Container) -and (Test-Path -LiteralPath (Join-Path $workspaceRoot 'Forks') -PathType Container))) { +while ($workspaceRoot -and -not ((Test-Path -LiteralPath (Join-Path $workspaceRoot 'Original') -PathType Container) -and (Test-Path -LiteralPath (Join-Path $workspaceRoot 'Fork') -PathType Container))) { $parent = Split-Path -Parent $workspaceRoot if (-not $parent -or $parent -eq $workspaceRoot) { - throw "Could not locate the workspace root (a directory containing both 'Original' and 'Forks') above $sourceRoot." + throw "Could not locate the workspace root (a directory containing both 'Original' and 'Fork') above $sourceRoot." } $workspaceRoot = $parent }