Repository navigation
Add typed JSON output to app import custom-data-definitions - #8815
isaacroldan wants to merge 8 commits into
Conversation
|
/snapit |
|
🫰✨ Thanks @isaacroldan! Your snapshot has been published to npm. Built from Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261007114628Caution After installing, validate the version by running |
fb3360a to
3f1529d
Compare
|
/snapit |
|
🫰✨ Thanks @isaacroldan! Your snapshot has been published to npm. Built from Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261007133852Caution After installing, validate the version by running |
|
/snapit |
|
🫰✨ Thanks @isaacroldan! Your snapshot has been published to npm. Built from Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261007140359Caution After installing, validate the version by running |
6fed5ab to
4d86055
Compare
|
/snapit |
|
🫰✨ Thanks @isaacroldan! Your snapshot has been published to npm. Built from Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261009084758Caution After installing, validate the version by running |
|
/snapit |
|
🫰✨ Thanks @isaacroldan! Your snapshot has been published to npm. Built from Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261009114709Caution After installing, validate the version by running |
| status: zod.literal('success'), | ||
| storeDomain: zod | ||
| .string() | ||
| .regex(/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/) |
There was a problem hiding this comment.
Similar comment to a previous PR here, maybe we just accept strings 🤷🏼
WHY are these changes introduced?
Let scripts read suggested custom-data definitions. Related to #23958.
WHAT is this pull request doing?
Add
--jsonto the command and its deprecated alias. Return converted counts, native TOML, and sections skipped for missing scopes. Use a canonicalstoreDomain, ornullwhen unavailable. Keep the existing text output and leave the app TOML unchanged.Text:
Converted 1 metafields and 0 metaobjects from test-shop.myshopify.com into TOML, ready for you to copy.JSON:
{"status":"success","storeDomain":"test-shop.myshopify.com","metafieldCount":1,"metaobjectCount":0,"toml":"# namespace: $app key: color owner_type: PRODUCT\n[product.metafields.app.color]\ntype = \"single_line_text_field\"\n","skippedSections":[]}.How to manually test your changes?
Use a linked app and its development store.
shopify app import custom-data-definitions --store <store>.myshopify.com --json --no-input > definitions.json. Check one result with counts and suggested TOML. Check that the app TOML is unchanged.--jsonto compare the summary and TOML. Use--include-existingto include already-declared definitions.shopify app import custom-data-definitions --json-schemato inspect the contract. The deprecatedapp import-custom-data-definitionscommand exposes the same result.Checklist