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

task(auth): Use nest di #17412

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

task(auth): Use nest di #17412

wants to merge 2 commits into from

Conversation

dschom
Copy link
Contributor

@dschom dschom commented Aug 16, 2024

Because

  • We want to be able to leverage our nest services held in libs

This pull request

  • Initializes nest DI in hapi
  • Setups typeDi container with nest services
  • Switch over to using notfier service from libs
  • Switch over to using StatsD service from libs

Issue that this pull request solves

Closes: # (issue number)

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.

@@ -16,8 +16,8 @@ export class NotifierService {
private readonly config: NotifierSnsConfig;

constructor(
configService: ConfigService,
Copy link
Member

Choose a reason for hiding this comment

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

Is @Inject(...) going to be necessary for everything consumed by Auth? We haven't had to do that over on the Subplat side so far as long as something is marked as @Injectable, is that still the case?

Copy link
Contributor Author

@dschom dschom Aug 22, 2024

Choose a reason for hiding this comment

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

Yes, I got an error without it which is a little strange, because as you point out it doesn't seem to have been necessary in other projects. I wonder if there's a better solution. I can try removing it, and see if I can get it working without adding injects.

Copy link
Member

Choose a reason for hiding this comment

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

This is apparently because esbuild does not properly support emitting metadata, so the decorators are only spotted and the information available in some parts:
evanw/esbuild#257

Switching to swc to run this should remedy it. Sigh.

@dschom dschom force-pushed the hapi-nest branch 2 times, most recently from 95d34cf to 9910a0b Compare August 30, 2024 00:56
Because:
- We want to be able to leverage our nest services held in libs

This Commit:
- Initializes nest DI in hapi
- Setups typeDi container with nest services
- Switch over to using notfier service from libs
- Switch over to using StatsD service from libs
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.

3 participants