Skip to content

Add plan, feature-preview, and with-demo-data flags to store create dev#7811

Draft
amcaplan wants to merge 1 commit into
mainfrom
store-create-dev-flags
Draft

Add plan, feature-preview, and with-demo-data flags to store create dev#7811
amcaplan wants to merge 1 commit into
mainfrom
store-create-dev-flags

Conversation

@amcaplan

@amcaplan amcaplan commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

The hidden shopify store create dev command should accept the additional flags described in the Store management with AI Kit project brief. This PR implements the three that the Business Platform createAppDevelopmentStore mutation already supports.

WHAT is this pull request doing?

Wires three new flags through to the createAppDevelopmentStore mutation:

Flag Backend variable Notes
--plan (required) priceLookupKey Maps user-facing handles → backend price lookup keys (see below).
--feature-preview developerPreviewHandle Pass-through string (added to the mutation document); no canonical list since previews change over time.
--with-demo-data prepopulateTestData Previously hardcoded to false.

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) priceLookupKey
basic BASIC_APP_DEVELOPMENT
grow PROFESSIONAL_APP_DEVELOPMENT
advanced UNLIMITED_APP_DEVELOPMENT
plus SHOPIFY_PLUS_APP_DEVELOPMENT

store info already mapped raw Shop.planName values (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 in constants.ts as 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 why services/store/info/plan.ts appears in the diff; no behavior change to store 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)

--country and --subdomain are intentionally not included — they require new backend support and are tracked in shop/issues-develop#22968:

  • --country: Core already accepts country, 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-check
  • pnpm nx run store:lint
  • Store package tests: cd packages/store && vitest run — 201 passing, including new coverage for the plan→priceLookupKey mapping, feature preview, demo data, and --plan validation (required + rejects invalid values).

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings June 15, 2026 14:52
@amcaplan amcaplan requested review from a team as code owners June 15, 2026 14:53
@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Jun 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --plan flag with a canonical handle→priceLookupKey mapping.
  • Adds optional --feature-preview (passed as developerPreviewHandle) and --with-demo-data (passed as prepopulateTestData) 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.

@amcaplan amcaplan marked this pull request as draft June 15, 2026 15:04
@amcaplan amcaplan force-pushed the store-create-dev-flags branch from 1725352 to 08bfd5f Compare June 15, 2026 15:51
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>
@amcaplan amcaplan force-pushed the store-create-dev-flags branch from 08bfd5f to 60cd136 Compare June 15, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants