Giter VIP home page Giter VIP logo

Comments (16)

SkyLeite avatar SkyLeite commented on April 28, 2024 17

This is a very useful feature in Rails for me. Commenting here to show support.

from nest-cli.

thomrick avatar thomrick commented on April 28, 2024 8

Hey @MonsieurMan !
I love your idea !

  • Maybe something like nest tree to list routes with module hierarchy should be awesome !
  • For Guards maybe use colors on route tree ;-)
  • For JSDoc swagger integration should be enough don't you think ?
  • Async / Not like previous point as return type

from nest-cli.

thomrick avatar thomrick commented on April 28, 2024 2

OK cool ! I'll add tree command to the development plan !

from nest-cli.

Kessir avatar Kessir commented on April 28, 2024 2

I'm willing to implement this if you can point me in the right direction @thomrick @kamilmysliwiec

Right now it's not clear what was agreed on

from nest-cli.

Pacheco95 avatar Pacheco95 commented on April 28, 2024 2

Something like adonis node ace list:routes will be awesome.

from nest-cli.

jmcdo29 avatar jmcdo29 commented on April 28, 2024 2

I could see it being made as a standalone command (nest-routes or something). With the current setup of the Nest CLI it wouldn't be possible to add this in as a plugin for the CLI so you could do nest route.

from nest-cli.

micalevisk avatar micalevisk commented on April 28, 2024 2

@Neosoulink I believe you can do that if you manage to replicate nestjs core router.

from nest-cli.

say8425 avatar say8425 commented on April 28, 2024 1

Any some news?

from nest-cli.

Sikora00 avatar Sikora00 commented on April 28, 2024 1

crawling the .controler.ts files
If you implement it this way then you will display routes from not used modules.
If you use monorepo and have multiple apps, you won't have a clue which app is using which routes.

from nest-cli.

adrien2p avatar adrien2p commented on April 28, 2024

@MonsieurMan ! Great Idea :)

from nest-cli.

MonsieurMan avatar MonsieurMan commented on April 28, 2024

@thomrick Hey, just checked out swagger, it pretty much make this idea useless as for routes, but the nest tree idea is really nice.
We could build up a tree as JSON then displaying it to the CLI or anywhere else.

from nest-cli.

sadhakbj avatar sadhakbj commented on April 28, 2024

Any updates on this?

from nest-cli.

Sikora00 avatar Sikora00 commented on April 28, 2024

@kamilmysliwiec Don't you want to include it in the CLI? I still though that it should be possible to achieve it by static analysis similar to what we are doing here https://github.com/valueadd-poland/ng-packages/tree/master/packages/linking-tool

from nest-cli.

Sikora00 avatar Sikora00 commented on April 28, 2024

Is there any option to provide it as a plugin?

from nest-cli.

micalevisk avatar micalevisk commented on April 28, 2024

it should be possible to achieve it by static analysis

I don't think we can implement such feature without running the app, which ins't good because I don't want to start the app just to list all the routes 😞 Not easily, at least

That is because when we use the versioning feature, it's defined at runtime below

https://github.com/nestjs/nest/blob/31001bbb873a3468b9e5a61ab9ce35d2f1da7aee/packages/core/router/routes-resolver.ts#L92

from nest-cli.

Neosoulink avatar Neosoulink commented on April 28, 2024

Any update for this one?

I mean, can we just at least read the controllers and display the routes, without having to run the app... or something like that?

from nest-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.