refactor: align auth types with @wxyc/shared#209
Open
jakebromberg wants to merge 3 commits intomainfrom
Open
Conversation
added 3 commits
February 26, 2026 14:05
Add @wxyc/shared as a dependency and re-export WXYCRole, Authorization, and roleToAuthorization from the shared package. This ensures a single source of truth for auth types across the stack. Changes: - Add .npmrc for GitHub Packages registry authentication - Add @wxyc/shared to shared/authentication dependencies - Re-export WXYCRole type from shared (replaces local definition) - Add compile-time assertion that local roles are valid shared roles - Introduce ImplementedRole type for roles with better-auth impls - Add NPM_TOKEN env to all CI install steps - Add @wxyc/shared to jest transform and tsup externals - Add shared type compatibility tests
- Fix lint error: replace non-null assertion with proper guard - Suppress no-unused-vars warning on compile-time assertion - Pass NPM_TOKEN build arg to Docker builds for @wxyc/shared - Copy .npmrc into Docker images, remove from production stage
- Format test file with Prettier - Pass NPM_TOKEN build-arg in workspace docker:build scripts - Add NPM_TOKEN env to Set Up Test Environment CI step
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@wxyc/shareddependency and re-exportWXYCRole,Authorization, androleToAuthorizationfrom the shared packageImplementedRoletype for roles with better-auth access control implementations.npmrcand CINPM_TOKENfor GitHub Packages authenticationCloses #208
Test plan
NPM_TOKENsecret exists in Backend-Service repo settings (required for CI)