♻️ Refactor: Extract sync code into separate microservice (NestJs)#301
Closed
tyler-dane wants to merge 17 commits intomainfrom
Closed
♻️ Refactor: Extract sync code into separate microservice (NestJs)#301tyler-dane wants to merge 17 commits intomainfrom
tyler-dane wants to merge 17 commits intomainfrom
Conversation
This is a simple implementation of logging to help with development of the sync feature. It will be updated/replaced with a bona fide logging service in the future. See #300
Accessing files using paths constructed from user-controlled data can allow an attacker to access unexpected resources. This can result in sensitive information being revealed or deleted, or an attacker being able to influence behavior by modifying unexpected files. Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This makes the sync code more readable by assigning functions to their respective features: - import: getting events from Gcal -> Compass - init: setting up the sync - log: logging what happened during a sync - watch: watching for events in gcal
- Updated GCalService to simplify address construction for notifications. - Modified SyncDebugController to pass the GCal client when starting to watch events. - Refactored SyncService to streamline event handling and removed unnecessary parameters. - Introduced a new importEventsByCalendar function to improve event import logic and error handling. - Cleaned up unused code and improved logging for sync operations.
- Upgraded @types/node to version 22.13.10 for improved type definitions. - Added jest-environment-node as a dependency for better testing support. - Updated various packages in yarn.lock to their latest versions, including @adobe/css-tools, @atlaskit packages, and Babel dependencies, ensuring compatibility and security improvements.
create a new NestJS service using `nest new sync`, which uses the nestjs cli
- Added @nestjs/websockets version 11.0.11 to package.json for WebSocket support. - Updated socket.io to version 4.8.1 for improved functionality. - Updated yarn.lock to reflect new dependencies and their versions.
680db89 to
5786780
Compare
Contributor
Author
|
Abandoning in factor of #306 . I got too carried away by using NestJS in this PR, which resulted in a lot of unexpected config issues related to jest and the lerna/npm monorepo. We will need to hold off on big changes to our stack and start transitioning more gracefully rather than sneaking them into feature PRs on a whim like this. Lesson learned. |
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.
Closes #299
Known issues
Duplicate types between
@coreand thissyncpackage