Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add "advertise url" arguments to change server URLs output in terminal #5587

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alanko0511
Copy link

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 and graphiql-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 terminal
  • graphiql-advertise-url - Change the GraphiQL URL shown in the terminal

Before:
CleanShot 2025-03-30 at 14 27 50

After (with the two args):
CleanShot 2025-03-30 at 14 29 14

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:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

@alanko0511 alanko0511 requested a review from a team as a code owner March 30, 2025 18:39
@alanko0511
Copy link
Author

I have signed the CLA!

@airhorns
Copy link

ping @gordonhirsch it would be super awesome to get this in -- invaluable for anyone doing Shopify development in the cloud with Gadget or Codespaces or Replit or what have you 💖

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