Skip to content

Conversation

mrosnerr
Copy link

@mrosnerr mrosnerr commented Dec 8, 2024

Summary

Fixes #50

The changes here:

  1. Update FileScanner.getCallerFilePath() to return an array which now contains a broader list of potentially important files by pulling more from the call stack.
  2. Add a new utility function findClassInPath which can be used to search the path array for the class highest up in the call stack.
  3. Update Router and Middleware generators to use findClassInPath with the new path array to find the class to use.

Copy link

vercel bot commented Dec 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nestjs-trpc-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 9, 2024 5:37am

Copy link

vercel bot commented Dec 8, 2024

Someone is attempting to deploy a commit to the Kevin's Projects Team on Vercel.

A member of the Team first needs to authorize it.

if (options.autoSchemaFile != null) {
const fileScanner = new FileScanner();
const callerFilePath = fileScanner.getCallerFilePath();
const rootModuleFilePath = callerFilePath[0];
Copy link
Author

Choose a reason for hiding this comment

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

[note] It seemed to make sense to just leave this usage as the root file

@mrosnerr mrosnerr force-pushed the support-nesting-router-via-applyDecorators branch from b0cdffa to e884039 Compare December 9, 2024 05:36
@mrosnerr mrosnerr marked this pull request as draft January 27, 2025 16:15
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.

Feature: Support nesting Router within applyDecorators
1 participant