stevermeister / ngx-cookie-service

Angular (4.2+ ...12) service for cookies. Originally based on the `ng2-cookies` library.
https://www.npmjs.com/package/ngx-cookie-service
MIT License
543 stars 89 forks source link

Export injection token of SSR service to give a chance provide it pro… #294

Closed TheTomasJ closed 9 months ago

TheTomasJ commented 9 months ago

Ssr service does not work because it is unable to inject request properly and thus cant access cookie on server side. This PR exports injection token which can be used in server.ts to be properly provided to app. I also updated readme example with renamed export, because REQUEST token is often taken in apps.

sonarcloud[bot] commented 9 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

pavankjadda commented 9 months ago

We couldn't export the REQUEST due to an issue with PNPM and TS. We may need to switch back to NPM

pavankjadda commented 9 months ago

We couldn't export the REQUEST due to an issue with PNPM and TS. We may need to switch back to NPM

See https://github.com/microsoft/TypeScript/issues/42873

pavankjadda commented 9 months ago

@TheTomasJ Thanks for the PR. #295 will take care of this. Due to this https://github.com/microsoft/TypeScript/issues/42873 we couldn't export it. We are switching back to NPM to fix this

pavankjadda commented 9 months ago

@TheTomasJ Can you try version 17.0.1-rc.1 and see if it fixes the issue?

TheTomasJ commented 9 months ago

@pavankjadda yes now it works, thanks :) btw that readme update from my #294 is necessary too because it should mention that REQUEST must be imported. Providing 'REQUEST' does not work.