Add --country flag to store create dev#7947
Draft
amcaplan wants to merge 1 commit into
Draft
Conversation
Extracts and shares the country-code validation already used by store create preview: countryFlag, isCountryCode, and a shared invalidCountryCodeMessage in flags.ts, plus devStoreFlags.country. The flag is validated, plumbed into createDevStore options, and shown in JSON/success output, but is NOT yet sent to the BP createAppDevelopmentStore mutation -- the published schema does not expose a country argument until shop/world#671185 (part of shop/world#22968) merges. GraphQL wiring is a trivial follow-up. Command is hidden; no changeset (not functional end-to-end yet). Assisted-By: devx/bf777827-dc69-4993-9b11-c401dc19c4be
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.
What
Adds a
--countryflag toshopify store create dev, implementing the country piece of shop/world#22968.This extracts and shares the country-code validation that already exists for
store create preview:flags.tsnow exports the sharedcountryFlag(env)factory (normalizes input to trimmed uppercase), theisCountryCode()validator, and a new sharedinvalidCountryCodeMessageconstant so both commands report identical guidance.devStoreFlags.countryadded (envSHOPIFY_FLAG_STORE_COUNTRY) alongside the existingpreviewStoreFlags.country.store create previewnow uses the sharedinvalidCountryCodeMessage(removed the duplicated string).store create devvalidates--countryand threads it intocreateDevStore, surfacing it in JSON and success output.Draft — why
This is intentionally flag scaffolding only.
countryis not yet sent to the BPcreateAppDevelopmentStoremutation because the published schema does not expose the argument until the backend lands:main.graphql-codegenfetches the schema fromshop/worldmain, and CI enforces a freshness check. Wiringcountryonto the operation now would fail that check.The flag is validated end-to-end locally (tophatted against a local BP that accepts
country), so the wiring is a trivial follow-up.Follow-up (once shop/world#671185 merges)
pnpm graphql-codegen:get-graphql-schemas && pnpm graphql-codegen$country: Stringtocreate_app_development_store.graphqland thecountry: $countryargument.services/store/create/dev.tswithcountry: options.country.Notes
hidden; no changeset (not functional end-to-end yet).