Add typed JSON output to theme metafields pull - #8682
Open
gonzaloriestra wants to merge 1 commit into
Open
gonzaloriestra wants to merge 1 commit into
gonzaloriestra wants to merge 1 commit into
Conversation
This was referenced Sep 28, 2026
gonzaloriestra
added this pull request to stack #8673
September 28, 2026 09:53
This was referenced Sep 28, 2026
gonzaloriestra
marked this pull request as ready for review
September 28, 2026 10:22
gonzaloriestra
force-pushed
the
gonzalo/json-theme-metafields-pull
branch
from
September 28, 2026 10:25
e49d75e to
b3c2a68
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-theme-metafields-pull
branch
from
September 28, 2026 11:39
b3c2a68 to
3907b2d
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-theme-metafields-pull
branch
from
September 28, 2026 11:52
3907b2d to
6063572
Compare
isaacroldan
reviewed
Sep 29, 2026
| product: zod.array(MetafieldDefinitionSchema), | ||
| variant: zod.array(MetafieldDefinitionSchema), | ||
| shop: zod.array(MetafieldDefinitionSchema), | ||
| }) |
Contributor
There was a problem hiding this comment.
Do we know if this is a stable list of fields or if it can easily change? if it changes often this can get stale soon
Contributor
Author
There was a problem hiding this comment.
The list was actually copied from metafields-pull.ts. I removed the duplicated lists: all share the handleToOwnerType mapping defined here now.
gonzaloriestra
force-pushed
the
gonzalo/json-theme-metafields-pull
branch
from
September 29, 2026 10:28
6063572 to
cedfc3d
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-theme-metafields-pull
branch
from
September 29, 2026 11:11
cedfc3d to
97dad3d
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-theme-metafields-pull
branch
from
September 29, 2026 11:38
97dad3d to
872479d
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-theme-metafields-pull
branch
from
September 29, 2026 13:44
872479d to
ad8a3a9
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-theme-metafields-pull
branch
2 times, most recently
from
September 29, 2026 14:40
6817d73 to
dc572f7
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-theme-metafields-pull
branch
from
October 1, 2026 08:52
dc572f7 to
07395a8
Compare
Contributor
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/public/node/base-command.d.ts@@ -35,6 +35,7 @@ declare abstract class BaseCommand extends Command {
argv: string[];
}>;
protected environmentsFilename(): string | undefined;
+ protected validateNonTTYFlags(flags: FlagOutput): void;
protected failMissingNonTTYFlags(flags: FlagOutput, requiredFlags: string[]): void;
private failMissingNonTTYFlagRequirements;
private applicableNonTTYFlagRequirements;
|
This branch has not been deployed
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?
theme metafields pullwrites definitions to a file but has no typed, discoverable JSON result.Closes shop/issues-develop#23694 together with the preceding package and init PRs.
WHAT is this pull request doing?
Use one supported-owner mapping for download requests, required definition keys, and the failed-owner enum. Adding a supported owner updates the output schema together with the downloader.
Return downloaded definitions and the output path as typed data, with explicit failed and skipped outcomes. Preserve the file contents, text messages, partial downloads, nonfatal total-fetch failures, and silent downloads used by
theme dev. JSON results go to stdout; diagnostics stay on stderr.Normal output:
Matching JSON example:
{ "status": "downloaded", "path": "/themes/example/.shopify/metafields.json", "definitions": { "article": [], "blog": [], "collection": [], "company": [], "company_location": [], "location": [], "market": [], "order": [], "page": [], "product": [ { "key": "subtitle", "namespace": "custom", "name": "Subtitle", "description": null, "type": { "name": "single_line_text_field", "category": "TEXT" } } ], "variant": [], "shop": [] }, "failedOwnerTypes": [] }How to manually test your changes?
Checklist