Repository navigation
Add typed JSON output to theme metafields pull - #8682
gonzaloriestra wants to merge 7 commits into
Conversation
e49d75e to
b3c2a68
Compare
b3c2a68 to
3907b2d
Compare
3907b2d to
6063572
Compare
6063572 to
cedfc3d
Compare
|
/snapit |
|
🫰✨ Thanks @gonzaloriestra! 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-20261008090341Caution After installing, validate the version by running |
1383c23 to
2b53200
Compare
2b53200 to
7a8a0bf
Compare
7a8a0bf to
00090dd
Compare
00090dd to
43cf8d0
Compare
e601ab5 to
f477150
Compare
f477150 to
07e0fab
Compare
07e0fab to
4a636ee
Compare
|
| Changeset | Package |
|---|---|
theme-check-json-contract.md |
'@shopify/cli': major |
theme-duplicate-json-contract.md |
'@shopify/cli': major |
theme-info-json-contract.md |
'@shopify/cli': major |
theme-list-json-contract.md |
'@shopify/cli': major |
theme-open-json-contract.md |
'@shopify/cli': major |
theme-preview-json-contract.md |
'@shopify/cli': major |
theme-profile-environments.md |
'@shopify/cli': major |
theme-push-json-contract.md |
"@shopify/cli": major |
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;
packages/cli-kit/dist/public/node/themes/theme-manager.d.ts@@ -11,5 +11,12 @@ export declare abstract class ThemeManager {
findOrCreate(name?: string, role?: Role): Promise<Theme>;
fetch(name?: string, role?: Role): Promise<Theme | undefined>;
generateThemeName(context: string): string;
- create(themeRole?: Role, themeName?: string): Promise<Theme>;
+ create(themeRole?: Role, themeName?: string): Promise<{
+ createdAtRuntime: boolean;
+ id: number;
+ name: string;
+ processing: boolean;
+ role: string;
+ src?: string;
+ }>;
}
\ No newline at end of file
|
WHY are these changes introduced?
Metafield downloads need structured outcomes and discoverable JSON support.
WHAT is this pull request doing?
Return strict flattened definitions, absolute artifact paths and explicit success/partial/skipped/cancelled outcomes. Preserve the native owner-keyed metafields.json file, successful downloads and owner-type failures; include a minor changeset for newly added theme JSON flags.
The public output follows
docs/cli/json-output.md; explicitly named environments use one{environments: [...]}object.How to manually test your changes?
Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add