Skip to content

feat: add app.listRoutes with sub-application support - #7531

Open
bjohansebas wants to merge 1 commit into
masterfrom
feat/list-routes-subapps
Open

bjohansebas wants to merge 1 commit into
masterfrom
feat/list-routes-subapps

Conversation

@bjohansebas

@bjohansebas bjohansebas commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Add app.listRoutes() and expose mounted sub-application routers for nested route inspection, preserving lazy initialization and request handling.

Depends on pillarjs/router#174 plus wrapper support; router is temporarily pinned to that Git commit.

@bjohansebas

Copy link
Copy Markdown
Member Author

cc: @logaretm @UlisesGascon

Comment thread package.json
"qs": "^6.16.0",
"range-parser": "^1.2.1",
"router": "^2.2.0",
"router": "git+https://github.com/bjohansebas/router.git#e59071e415da5983ab901f5d81597b424fda4bdf",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Q: This commit isn't in your PR yet, I assume it will?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It was, but I rebased, so the commit hashes changed. To test it locally, you’ll need to use the latest commit hash from that PR.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don't see the wrapper change in listRoutes, there's no handle.router check. I think it had this?

if (!route) {
  const handle = layer.handle
  const candidate = Array.isArray(handle.stack) ? handle : handle.router  // L469

  if (candidate && Array.isArray(candidate.stack)) {
    router = candidate
  }
}

Can you double check if it is there?

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.

2 participants