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(nuxt): Add sdk module to nuxt config and create client and server config files #713

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

andreiborza
Copy link
Member

Tested locally on a nuxt app with various configs. The nuxt default config is taken directly from the latest nuxt version when creating a basic project using their wizard.

#skip-changelog

Closes: #707 and #708

Copy link

github-actions bot commented Nov 15, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 2598b72

@andreiborza andreiborza requested review from mydea and removed request for Lms24 November 18, 2024 08:46
Comment on lines +90 to +98
await traceStep('configure-sdk', async () => {
await addSDKModule(nuxtConfig, {
org: selectedProject.organization.slug,
project: selectedProject.slug,
url: selfHosted ? sentryUrl : undefined,
});

await createConfigFiles(selectedProject.keys[0].dsn.public);
});
Copy link
Member Author

Choose a reason for hiding this comment

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

q: I handle error handling within the respective helpers. Would it be better to throw and wrap traceStep in a try catch?

@andreiborza andreiborza requested review from Lms24 and removed request for AbhiPrasad and mydea November 21, 2024 09:18

shouldWriteFile = overwriteExistingConfigs;

if (overwriteExistingConfigs) {
Copy link
Member

Choose a reason for hiding this comment

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

If the user selects "no" when asked to overwrite, we should still show them what they would need to put in those files.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 updated

@andreiborza andreiborza requested a review from lforst November 22, 2024 07:57
@andreiborza andreiborza merged commit e1b29d9 into ab/nuxt-wizard Nov 22, 2024
13 checks passed
@andreiborza andreiborza deleted the ab/nuxt-client-server-setup branch November 22, 2024 13:58
andreiborza added a commit that referenced this pull request Nov 25, 2024
…r config files (#713)

* feat(nuxt): Add sdk module to nuxt config and create client and server config files

* Log snippets when user denies overwriting their configs
andreiborza added a commit that referenced this pull request Nov 27, 2024
* feat(nuxt): Add Nuxt menu option and install SDK (#711)

* feat(nuxt): Add Nuxt menu option and install SDK

* Mark sentry dot env file in cyan color

* feat(nuxt): Add sdk module to nuxt config and create client and server config files (#713)

* feat(nuxt): Add sdk module to nuxt config and create client and server config files

* Log snippets when user denies overwriting their configs

* feat(nuxt): Add example page/component creation and final messaging (#717)

* feat(nuxt): Add nuxt 3 and 4 e2e test apps (#718)

* feat(nuxt): Add nuxt-3 e2e tests

* Add nuxt-3 e2e tests

* Add describe level

* Add nuxt-4 e2e test app

* Add nuxt 4 e2e test app

* Remove leaking test helper

* change client source map to hidden

* add scoped styles

* Add fallback in case magicast can't parse/modify the nuxt config

* change min version to 3.7.0

* Update src/nuxt/sdk-setup.ts

Co-authored-by: Lukas Stracke <[email protected]>

---------

Co-authored-by: s1gr1d <[email protected]>
Co-authored-by: Lukas Stracke <[email protected]>
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.

2 participants