-
-
Notifications
You must be signed in to change notification settings - Fork 0
General refactor and clean up #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Moved platform-related code from `src/platform` to `src/lib` and service modules from `src/*` to `src/services/*` for improved organization and separation of concerns. Updated all imports and references throughout the codebase and tests to reflect the new structure.
Moved and renamed test files to improve organization, grouping mocks and adapters under `test/mocks` and `test/lib/adapters/node`. Updated import paths in affected test files. Adjusted Vitest configuration to match new test locations and exclude Node.js adapter tests from Cloudflare Workers environment. Added integration test for app and removed obsolete README.
Corrected references to application logic and setup script paths in README files to reflect the updated directory structure under src/services.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
api-worker | ef4fb64 | Commit Preview URL Branch Preview URL |
Dec 23 2025, 11:47 PM |
Removes version comments from actions/checkout and actions/setup-node steps for clarity. Changes test command from 'npm test' to 'npm run test:all' to run all tests in the CI workflow.
ee96bb5 to
ef4fb64
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request reorganizes the codebase by moving service modules to a more descriptive src/services/ directory structure and refactoring the platform abstraction layer to src/lib/. The refactoring improves code organization and maintainability while preserving functionality.
- Relocates service modules (versions, releases, central-alerts) from
src/tosrc/services/ - Moves platform interfaces and adapters from
src/platform/tosrc/lib/ - Renames test fixtures directory to test mocks for better clarity
- Updates all import paths, configuration files, and documentation to reflect the new structure
Reviewed changes
Copilot reviewed 29 out of 48 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| wrangler.jsonc | Updates main entry point to new app location |
| vitest.node.config.ts | Updates test paths for node adapter tests |
| vitest.config.ts | Updates exclusion paths for node tests |
| test/utils/test-types.ts | Updates import paths for service interfaces |
| test/utils/d1-mock.ts | Updates import paths for central alerts interfaces |
| test/services/versions/v1/*.test.ts | Updates import paths to new service and mock locations |
| test/services/releases/v1/index.test.ts | Updates import paths for services and mocks |
| test/services/central-alerts/v1/*.test.ts | Updates import paths and improves type casting |
| test/node/README.md | Removes outdated Node.js testing documentation |
| test/mocks/*.ts | Moves and consolidates mock data files with updated imports |
| test/mocks/README.md | Adds documentation for mock directory |
| test/lib/adapters/node/*.test.ts | Updates import paths for lib adapters |
| test/integration/versions/index.test.ts | Updates import paths for app and mocks |
| test/integration/app.test.ts | Adds comprehensive integration test suite |
| test/app/index.test.ts | Updates import path for main app |
| src/services/*/v1/interfaces.ts | Adds service interface definitions |
| src/services/*/v1/index.ts | Updates import paths to lib layer |
| src/services/*/v1/README.md | Adds comprehensive service documentation |
| src/services/central-alerts/v1/scripts/init-db.ts | Adds database initialization script |
| src/services/central-alerts/v1/db/init.sql | Adds SQL schema for central alerts |
| src/services/central-alerts/v1/database.ts | Updates import paths to lib interfaces |
| src/lib/middleware.ts | Moves platform middleware with interface updates |
| src/lib/interfaces.ts | Consolidates platform interface definitions |
| src/lib/context.ts | Adds platform context abstraction |
| src/lib/adapters/node/*.ts | Implements Node.js platform adapters |
| src/lib/adapters/cloudflare/*.ts | Implements Cloudflare platform adapters |
| src/app/index.ts | Updates main app with new import paths |
| package.json | Updates database initialization script path |
| README.md | Updates documentation with new directory structure |
| .github/workflows/ci.yml | Updates test command and removes version comments |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request reorganizes the codebase to improve clarity and maintainability, primarily by moving feature modules and platform interfaces to more descriptive directories. It also updates related documentation and configuration files to reflect these changes, and makes minor workflow and script command adjustments.