Add plan, feature-preview, and with-demo-data flags to store create dev#7811
Draft
amcaplan wants to merge 1 commit into
Draft
Add plan, feature-preview, and with-demo-data flags to store create dev#7811amcaplan wants to merge 1 commit into
store create dev#7811amcaplan wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the hidden shopify store create dev command to accept additional inputs supported by the Business Platform createAppDevelopmentStore mutation, and wires those inputs through to the store-creation service and outputs.
Changes:
- Adds a required
--planflag with a canonical handle→priceLookupKeymapping. - Adds optional
--feature-preview(passed asdeveloperPreviewHandle) and--with-demo-data(passed asprepopulateTestData) flags. - Surfaces the selected plan/preview/demo-data status in both human output and JSON output, with accompanying unit tests.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/store/src/cli/services/store/create/plans.ts | Introduces canonical dev-store plan handle → price lookup key mapping and exported plan types/handles. |
| packages/store/src/cli/services/store/create/dev.ts | Wires plan, featurePreview, and withDemoData into the BP mutation variables and success/JSON output. |
| packages/store/src/cli/services/store/create/dev.test.ts | Adds coverage for plan mapping, feature preview passthrough, demo data passthrough, and JSON output fields. |
| packages/store/src/cli/commands/store/create/dev.ts | Adds new CLI flags (--plan, --feature-preview, --with-demo-data) and passes them through to the service. |
| packages/store/src/cli/commands/store/create/dev.test.ts | Verifies new flags are defined, passed through, and that invalid/missing --plan is rejected. |
| packages/store/src/cli/api/graphql/business-platform-organizations/mutations/create_app_development_store.graphql | Extends the mutation to accept and forward developerPreviewHandle. |
| packages/store/src/cli/api/graphql/business-platform-organizations/generated/create_app_development_store.ts | Regenerated GraphQL types/document to include the new optional variable and argument. |
| packages/cli/oclif.manifest.json | Updates the generated CLI manifest to include the new flags. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1725352 to
08bfd5f
Compare
Wires three new flags on the hidden `store create dev` command through to the Business Platform `createAppDevelopmentStore` mutation: - `--plan` (required): maps the user-facing handles basic/grow/advanced/plus to the backend price lookup keys (BASIC/PROFESSIONAL/UNLIMITED/ SHOPIFY_PLUS _APP_DEVELOPMENT). The backend argument is a plain string with no reusable enum, so the canonical plan taxonomy is defined in a new shared constants.ts module. - `--feature-preview`: passed through as `developerPreviewHandle` (added to the mutation document; no canonical list since previews change over time). - `--with-demo-data`: passed through as `prepopulateTestData` (previously hardcoded to false). The plan, feature preview, and demo-data status are also surfaced in the success output and JSON result. `store info` already mapped raw `Shop.planName` values to public handles with its own copy of the plan taxonomy. That mapping now lives alongside the create mapping in the shared constants.ts, as two explicit per-direction maps kept deliberately literal for readability. All the plan data lives in one file while each command keeps its own lookup; `store info` behavior is unchanged. `--country` and `--subdomain` from the project brief are intentionally left out: they require backend changes in shop/world (tracked in shop/issues-develop#22968). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
08bfd5f to
60cd136
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?
The hidden
shopify store create devcommand should accept the additional flags described in the Store management with AI Kit project brief. This PR implements the three that the Business PlatformcreateAppDevelopmentStoremutation already supports.WHAT is this pull request doing?
Wires three new flags through to the
createAppDevelopmentStoremutation:--plan(required)priceLookupKey--feature-previewdeveloperPreviewHandle--with-demo-dataprepopulateTestDatafalse.Plan mapping (canonical, lives in the new shared
services/store/constants.ts— the backend argument is a plain string with no reusable enum; handles mirror the Dev Dashboard store-creation form):--plan(handle)priceLookupKeybasicBASIC_APP_DEVELOPMENTgrowPROFESSIONAL_APP_DEVELOPMENTadvancedUNLIMITED_APP_DEVELOPMENTplusSHOPIFY_PLUS_APP_DEVELOPMENTstore infoalready mapped rawShop.planNamevalues (professional,unlimited,shopify_plus, …) to these public handles using its own copy of the taxonomy. Rather than leave that scattered, both mappings now sit side by side inconstants.tsas two explicit per-direction maps — kept deliberately literal (not derived from one another) for readability. All plan data lives in one file while each command keeps its own lookup. This is whyservices/store/info/plan.tsappears in the diff; no behavior change tostore info.The plan, feature preview, and demo-data status are also surfaced in the success output and JSON result.
Deferred (need backend work in
shop/world)--countryand--subdomainare intentionally not included — they require new backend support and are tracked in shop/issues-develop#22968:--country: Core already acceptscountry, but the BP mutation derives it from the org address rather than exposing an argument.--subdomain: no subdomain input exists at any layer.The command remains
hidden, so these flags aren't user-visible yet (no changeset).How to test your changes?
pnpm nx run store:type-checkpnpm nx run store:lintcd packages/store && vitest run— 201 passing, including new coverage for the plan→priceLookupKey mapping, feature preview, demo data, and--planvalidation (required + rejects invalid values).🤖 Generated with Claude Code