Move EdgeConfig types to cyrus-core package #330
Merged
+203
−192
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
This PR consolidates configuration types (
EdgeConfig
,EdgeWorkerConfig
,RepositoryConfig
,OAuthCallbackHandler
) from their scattered locations into a centralizedpackages/core/src/config-types.ts
file. This improves code organization, eliminates duplication, and provides a single source of truth for configuration management across the monorepo.Changes
New Files
packages/core/src/config-types.ts
: Created centralized configuration types module containing:RepositoryConfig
: Configuration for individual repository/workspace pairsEdgeWorkerConfig
: Configuration for the EdgeWorker supporting multiple repositoriesEdgeConfig
: Edge configuration containing all repositories and global settingsOAuthCallbackHandler
: OAuth callback handler typeModified Files
packages/core/src/index.ts
: Added exports for all configuration typespackages/edge-worker/src/types.ts
: Removed duplicate type definitions, added re-exports from cyrus-core for backward compatibilitypackages/edge-worker/src/index.ts
: Updated to re-export types from cyrus-corepackages/edge-worker/src/EdgeWorker.ts
: Updated imports to use types from cyrus-corepackages/edge-worker/src/SharedApplicationServer.ts
: Updated to importOAuthCallbackHandler
from cyrus-coreapps/cli/app.ts
: Removed localEdgeConfig
interface, updated imports to use types from cyrus-coreBenefits
Testing
Type Checking
cyrus-core
builds and type checks successfullyLinting
Dependency Verification
cyrus-core
→cyrus-edge-worker
→cyrus-cli
Build Verification
Architecture
The dependency flow is now:
This is a pure refactoring with no functional changes - all existing code continues to work as before.
Resolves CYPACK-179
🤖 Generated with Claude Code