Repository navigation
feat(dev): return listener instance for programmatic usage - #278
Merged
Merged
Conversation
Contributor
Author
|
@pi0 I submitted this PR, it is needed in Nx, to get the baseUrl, and expose it to cypress. It's not urgent or blocking for us, but I thought it would be a nice to have! :) |
This was referenced Nov 3, 2023
Member
|
Thanks for the citty PR that's a good one! For receiving listener URL(s), you might also use a |
pi0
reviewed
Nov 3, 2023
| // Fork nuxt dev process | ||
| const devProxy = await _createDevProxy(nuxtOptions, listenOptions) | ||
| await _startSubprocess(devProxy, ctx.rawArgs) | ||
| return devProxy?.listener?.url |
Member
There was a problem hiding this comment.
Same as citty, we might return { listener } here too (also notice when using a public URL or domain or tunnel, there are multiple listener URLs as well. url is the prefered one we usually show first and used for public/qr when available)
Contributor
Author
There was a problem hiding this comment.
@pi0 I pushed a new commit with the change you requested! Thanks!
mandarini
force-pushed
the
feat/expose-baseUrl
branch
from
November 6, 2023 08:57
afc0d28 to
f7ae771
Compare
pi0
approved these changes
Nov 20, 2023
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When calling
await runCommand("dev");programmatically, I would like to be able to get thebaseUrl, the listening URL.This will also require a change in
citty, to return the result, here: https://github.com/unjs/citty/blob/cb27bed49371682904d85421439e31b8b3b17d24/src/command.ts#L64 specifically, to return the result of therunfunction.