-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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: Reduce bundle size via better imports + install gcal + gvideo by default for google signups #17810
Merged
Merged
feat: Reduce bundle size via better imports + install gcal + gvideo by default for google signups #17810
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
135a514
wip
hbjORbj 55078de
Merge remote-tracking branch 'origin/main' into feat/gcal-gmeets-default
hbjORbj cc56860
use light imports
hbjORbj beb612b
fix
hbjORbj 399a758
Merge remote-tracking branch 'origin/main'
hbjORbj 5699be3
perf: Reduce bundle size via better imports with `googleapis` (#17811)
hbjORbj f265b82
Merge branch 'main' into feat/gcal-gmeets-default
hbjORbj 3455782
fix test
hbjORbj ba8c198
refactor
hbjORbj 3934314
Merge remote-tracking branch 'origin/main' into feat/gcal-gmeets-default
hbjORbj ea61da4
update vite.config.js
hbjORbj 44eb60d
fix
hbjORbj 1858c86
fix unit test failing
hbjORbj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,9 @@ | |
"@dub/analytics": "^0.0.15", | ||
"@formkit/auto-animate": "1.0.0-beta.5", | ||
"@glidejs/glide": "^3.5.2", | ||
"@googleapis/admin": "^23.0.0", | ||
"@googleapis/calendar": "^9.7.9", | ||
"@googleapis/oauth2": "^1.0.7", | ||
"@hookform/error-message": "^2.0.0", | ||
"@hookform/resolvers": "^2.9.7", | ||
"@next-auth/prisma-adapter": "^1.0.4", | ||
|
@@ -85,7 +88,6 @@ | |
"dotenv-cli": "^6.0.0", | ||
"entities": "^4.4.0", | ||
"eslint-config-next": "^13.2.1", | ||
"googleapis": "^84.0.0", | ||
"gray-matter": "^4.0.3", | ||
"handlebars": "^4.7.7", | ||
"ical.js": "^1.4.0", | ||
|
@@ -180,6 +182,7 @@ | |
"deasync": "^0.1.30", | ||
"detect-port": "^1.3.0", | ||
"env-cmd": "^10.1.0", | ||
"google-auth-library": "^9.15.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding this as a dev dependency because we need to import type |
||
"module-alias": "^2.2.2", | ||
"msw": "^0.42.3", | ||
"node-html-parser": "^6.1.10", | ||
|
This file contains 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
This file contains 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
17 changes: 17 additions & 0 deletions
17
packages/app-store/_utils/oauth/updateProfilePhotoGoogle.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { oauth2_v2 } from "@googleapis/oauth2"; | ||
import type { OAuth2Client } from "googleapis-common"; | ||
|
||
import logger from "@calcom/lib/logger"; | ||
import { UserRepository } from "@calcom/lib/server/repository/user"; | ||
|
||
export async function updateProfilePhotoGoogle(oAuth2Client: OAuth2Client, userId: number) { | ||
try { | ||
const oauth2 = new oauth2_v2.Oauth2({ auth: oAuth2Client }); | ||
const userDetails = await oauth2.userinfo.get(); | ||
if (userDetails.data?.picture) { | ||
await UserRepository.updateAvatar({ id: userId, avatarUrl: userDetails.data.picture }); | ||
} | ||
} catch (error) { | ||
logger.error("Error updating avatarUrl from google calendar connect", error); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
These imports weren't being used