Conversation
shopify app channel-spec generate for partner channel spec exportshopify app import channel-config for partner channel spec import
suzkiee
commented
Sep 16, 2026
Comment on lines
+52
to
+55
| const response = await shopifyFetch(url, { | ||
| method: 'GET', | ||
| headers: appManagementHeaders(token), | ||
| }) |
Author
There was a problem hiding this comment.
Should this mirror other App Management only operations and have the HTTP call be moved in a DeveloperPlatformClient method?
suzkiee
marked this pull request as ready for review
September 16, 2026 14:51
Generates a deployable channel_config spec TOML from the Shopify-authored
default channel specification. The TOML is produced and validated server-side
by the Channels-owned exporter; the CLI handles app context, transport, and
local file UX only.
- shopify app channel-spec generate writes extensions/channel-config/specifications/<handle>.toml
- --stdout prints only the TOML (warnings go to stderr)
- --overwrite required to replace an existing file
- Backend warnings ({code, message}) are rendered out-of-band, never into the TOML
- Failure reason codes map to partner-facing guidance
…el spec fetch
- A 404 is not part of the export contract (failures are 422 with a
reason code), so stop mapping it to no_exportable_frozen_record and
abort with an endpoint-unavailable message instead.
- Validate that backend warnings are {code, message} objects before
rendering them, dropping malformed entries.
Per CLI team feedback, the command previously named `shopify app channel-spec generate` is now `shopify app import channel-config`: - Move commands/app/channel-spec/generate.ts to commands/app/import/channel-config.ts and rename the class to ImportChannelConfig (path mirrors the new oclif ID app:import:channel-config for lazy loading). - Rename services/channel-spec/ to services/import-channel-config/ and generateChannelSpec to importChannelConfig. - Register the new command ID in packages/app/src/cli/index.ts and add the "app:import" oclif topic in packages/cli/package.json. - Regenerate oclif.manifest.json, README.md, and dev docs JSON. Assisted-By: devx/3abb0030-fdc9-44fb-8c5f-e2f47d8caf39
…ing, path containment, extension scaffold
suzkiee
force-pushed
the
suzkiee/channel-spec-generate-command
branch
from
September 17, 2026 19:34
791e783 to
6082b1e
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?
Legacy channel apps need a migration path onto partner-owned
channel_configextension specs. Shopify already has app-level FrozenRecord fallback specs for some legacy channels. Partners need a safe way to receive a deployable, partner-owned copy of the public parts of that spec.The CLI team reviewed the proposal (thread) and approved this as a new
importnamespace underapp:This PR adds
app import channel-configand introduces theapp importtopic. A follow-up PR from the CLI team will migrate the existingimport-extensions/import-custom-data-definitionscommands into the same namespace.WHAT is this pull request doing?
Adds a new command:
Flow:
linkedAppContext(standard--path/--client-id/--config/--resetflags).services/import-channel-config/fetch.ts) that delegates to the canonical Channels-owned exporter (Channels::PartnerChannelSpecExport). The CLI never transforms or validates spec fields — the backend response is the deployable artifact.extensions/channel-config/specifications/<handle>.toml(creates directories as needed).Behavior details:
--overwriteis passed.--stdoutprints only the TOML to stdout (pipeable); warnings go to stderr.{code, message}, e.g.automatic_product_feed_management) render out-of-band — never written into the TOML.no_exportable_frozen_record,multiple_exportable_records,not_allowlisted,contains_no_public_fields,invalid_public_schema.shopify app deployas the next step.Files:
packages/app/src/cli/commands/app/import/channel-config.tsapp:import:channel-config)packages/app/src/cli/services/import-channel-config/import.tspackages/app/src/cli/services/import-channel-config/fetch.tspackages/app/src/cli/services/import-channel-config/import.test.tspackages/app/src/cli/services/import-channel-config/fetch.test.tspackages/app/src/cli/index.tspackages/cli/package.jsonapp:importtopic descriptionTransport / backend contract
The command calls
GET app_management/unstable/organizations/:orgId/apps/:id/channel_spec_export.json:{handle, filename, toml, warnings}422 {error: "not_exportable_yet", reason}404is reserved for "endpoint unavailable / app not found" and surfaces as an abort.The corresponding App Management endpoint is being added in shop/world (rework of shop/world#2051080).
Design constraints
channel_configvalidation contract; the exporter fails closed otherwise.--specification-handle <handle>flag is reserved for future multi-spec support and intentionally not included here.