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(vite-plugin-nitro): provide req and res to renderer #806

Merged

Conversation

Jefftopia
Copy link
Contributor

@Jefftopia Jefftopia commented Dec 18, 2023

PR adds full req and res object from h3 to the analog event handler for app rendering

closes #802
closes #586

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • [ x] Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Which package are you modifying?

  • vite-plugin-angular
  • [ x] vite-plugin-nitro
  • astro-angular
  • create-analog
  • router
  • platform
  • content
  • nx-plugin
  • trpc

What is the current behavior?

Current behavior is that the full, raw request and response are not provided to Analog, which limits the ability to use cookies from the incoming request.

Closes #802

What is the new behavior?

Now both the runtime renderer event handler and the nitro dev server have access to the request and response, which can then be provided to the application.

Does this PR introduce a breaking change?

  • Yes
  • [x ] No

Other information

[optional] What gif best describes this PR or how it makes you feel?

PR adds full req and res object from h3 to the analog event handler for  app rendering

closes analogjs#802
Copy link

netlify bot commented Dec 18, 2023

Deploy Preview for analog-docs ready!

Name Link
🔨 Latest commit 189da1a
🔍 Latest deploy log https://app.netlify.com/sites/analog-docs/deploys/6581ab3d667ade0008c46161
😎 Deploy Preview https://deploy-preview-806--analog-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 18, 2023

Deploy Preview for analog-app ready!

Name Link
🔨 Latest commit 189da1a
🔍 Latest deploy log https://app.netlify.com/sites/analog-app/deploys/6581ab3df8ac5c0008bfb3b5
😎 Deploy Preview https://deploy-preview-806--analog-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 18, 2023

Deploy Preview for analog-blog ready!

Name Link
🔨 Latest commit 189da1a
🔍 Latest deploy log https://app.netlify.com/sites/analog-blog/deploys/6581ab3d641e590008bf61ca
😎 Deploy Preview https://deploy-preview-806--analog-blog.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@brandonroberts brandonroberts left a comment

Choose a reason for hiding this comment

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

🍪

apps/analog-app/src/app/app.config.ts Outdated Show resolved Hide resolved
apps/analog-app/src/app/app.config.ts Outdated Show resolved Hide resolved
@brandonroberts
Copy link
Member

Looks great @Jefftopia! One small cleanup item on the interceptor naming

@brandonroberts brandonroberts merged commit 33b0020 into analogjs:main Dec 19, 2023
9 checks passed
@brandonroberts
Copy link
Member

Thanks! @allcontributors add @Jefftopia for code

Copy link
Contributor

@brandonroberts

I've put up a pull request to add @Jefftopia! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants