Add production preview store create command#7764
Draft
alfonso-noriega wants to merge 1 commit into
Draft
Conversation
a95b7a4 to
897e9ea
Compare
4 tasks
68526fb to
e6b9771
Compare
e6b9771 to
f0160e7
Compare
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.

WHY are these changes introduced?
This productionizes
shopify store create previewon top of the shipped preview-store backend endpoint so an agent can create a preview store and immediately use the returned Admin API token through existing store command auth plumbing.The command now targets the production endpoint contract from shop/world:
POST /services/preview-storesnameand explicitcountry_codeshopdetails andadmin_api_tokenWHAT is this pull request doing?
shopify store create previewwith flags:--name--countrywith two-letter code validation--json--no-color/--verbosehttps://<app-management-fqdn>/services/preview-storeswithout Basic auth or Identity auth.X-Shopify-CLI-Instancefrom a stable locally persisted install idX-Shopify-CLI-VersionUser-Agentshop.idshop.nameshop.domainplaceholder_account_uuidwhen presentadmin_api_tokenkind: 'preview', so the store is immediately usable byshopify store execute --store <domain>withoutshopify store auth.Notes / open questions
--countryis implemented and sent ascountry_code. If the currently deployed controller still only permitsname, the backend will need to acceptcountry_code; the CLI-side validation and request shape are ready.422 preview_store_create_failedpath and the currently observed backend500 preview_store_create_failedpath defensively.How to test your changes?
Focused tests:
pnpm --filter @shopify/store exec vitest run \ src/cli/services/store/create/preview/client.test.ts \ src/cli/services/store/create/preview/index.test.ts \ src/cli/services/store/create/preview/result.test.ts \ src/cli/commands/store/create/preview.test.ts \ src/cli/services/store/auth/session-store.test.tsStatic checks:
I also attempted the full docs/manifest path:
Both were blocked locally before the CLI/docs generation step by an unrelated
organizations:builddependency resolution failure (@graphql-typed-document-node/core/@shopify/cli-kitmodules not found frompackages/organizations). I regenerated the CLI manifest/README narrowly and added the docs artifacts minimally to keep diffs focused.Post-release steps
None.
Checklist
LocalStorage; command logic is platform-neutral.@shopify/cliand@shopify/store.