[Feature] Add "advertise url" arguments to change server URLs output in terminal #5587
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.
WHY are these changes introduced?
We're working on a feature that allows users to run Shopify CLI in our isolated cloud container and let them access processes like the theme extension dev server and GraphiQL via our proxy. However, the GraphiQL and theme extension URLs show a hardcoded
localhost
URL in the terminal.Therefore, we would like to introduce two new arguments:
theme-app-extension-advertise-url
andgraphiql-advertise-url
to the Shopify CLI, so that we can change the URL outputs via environment variables, and users can visit the modified links shown in the remote terminal.WHAT is this pull request doing?
Introduces two new arguments when running the
app dev
command:theme-app-extension-advertise-url
- Change the theme extension dev server URL shown in the terminalgraphiql-advertise-url
- Change the GraphiQL URL shown in the terminalBefore:

After (with the two args):

Note: this Shopify doc (https://shopify.dev/docs/api/shopify-cli/app/app-dev) might also need to include these two new arguments, but I'm not entirely sure how, so no doc-related change is included for now. Please let me know, and I'll fix the doc side.
How to test your changes?
Include the two arguments in the function/component that outputs the URLs, then ensure the URLs shown in the output are not
localhost
.Measuring impact
How do we know this change was effective? Please choose one:
Checklist