Skip to content
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

Feat/record-sync #1152

Merged
merged 6 commits into from
Feb 4, 2025
Merged

Feat/record-sync #1152

merged 6 commits into from
Feb 4, 2025

Conversation

paustint
Copy link
Contributor

@paustint paustint commented Jan 29, 2025

Enable Record Sync

  • Allow syncing history records on the Jetstream Server to all devices
  • Enable record sync in the Chrome Extension

TODO

  • Need to add option to disable sync

Copy link

socket-security bot commented Jan 29, 2025

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/[email protected]

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

Enable record sync for query history and load history in the core app and in the web extension

Add socket server to allow sync events to reach all devices and be shared in real-time with the chrome extension

Add chrome extension information to the home page
@paustint paustint changed the base branch from chore/remove-feature-flags to main February 3, 2025 02:29
@paustint paustint marked this pull request as ready for review February 3, 2025 02:29
@paustint paustint requested a review from Copilot February 3, 2025 02:31
@paustint paustint self-assigned this Feb 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 88 out of 103 changed files in this pull request and generated no comments.

Files not reviewed (15)
  • Dockerfile.e2e: Language not supported
  • apps/cron-tasks/project.json: Language not supported
  • apps/api/src/app/controllers/data-sync.controller.ts: Evaluated as low risk
  • apps/api/src/app/controllers/socket.controller.ts: Evaluated as low risk
  • apps/api/src/app/controllers/web-extension.controller.ts: Evaluated as low risk
  • apps/api/src/app/db/data-sync.db.ts: Evaluated as low risk
  • apps/api/src/app/db/salesforce-org.db.ts: Evaluated as low risk
  • apps/api/src/app/routes/api.routes.ts: Evaluated as low risk
  • apps/jetstream-web-extension/src/components/PopupButtonOptions.tsx: Evaluated as low risk
  • apps/cron-tasks/src/utils/clean-up-user-sync-history.utils.ts: Evaluated as low risk
  • apps/cron-tasks/src/config/env-config.ts: Evaluated as low risk
  • apps/cron-tasks/src/clean-up-user-sync-history.ts: Evaluated as low risk
  • apps/api/src/app/utils/socket-utils.ts: Evaluated as low risk
  • apps/api/src/app/services/auth-web-extension.service.ts: Evaluated as low risk
  • apps/api/src/app/routes/index.ts: Evaluated as low risk
Comments suppressed due to low confidence (3)

apps/api/src/app/services/data-sync-broadcast.service.ts:16

  • [nitpick] The function name 'emitEventsToOtherClients' is too generic. Consider renaming it to 'emitRecordSyncEventsToOtherClients' for better clarity.
export const emitEventsToOtherClients = async (sessionOrDeviceId: string, event: unknown) => {

apps/api/src/app/services/data-sync-broadcast.service.ts:18

  • Add explicit validation for the 'event' parameter to ensure it conforms to the 'SyncEventSchema' before proceeding with the rest of the function.
const { data, userId } = SyncEventSchema.parse(event);

apps/api/src/app/routes/route.middleware.ts:208

  • [nitpick] The error message 'You do not have access to this feature' is too generic. Consider updating it to something more specific, such as 'You do not have the required entitlement to access this feature'.
next(new UserFacingError('You do not have access to this feature'));
@paustint
Copy link
Contributor Author

paustint commented Feb 3, 2025

@SocketSecurity ignore npm/[email protected]

Copy link

Report too large to display inline

View full report↗︎

@paustint paustint merged commit b15a089 into main Feb 4, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant