Repository navigation
Add finite JSON execution to theme console - #8975
Draft
gonzaloriestra wants to merge 1 commit into
Draft
gonzaloriestra wants to merge 1 commit into
gonzaloriestra wants to merge 1 commit into
Conversation
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?
Agents need to evaluate Liquid commands without driving an interactive terminal.
Fixes https://github.com/shop/issues-develop/issues/24317
WHAT is this pull request doing?
Adds repeatable
--inputand mutually exclusive--input-fileflags to run commands sequentially in one Liquid session and exit.--jsonrequires supplied commands and returns a typed document with ordered results, preserving native values and assignments. Evaluation stops at the first error, retains completed results, and marks remaining inputs skipped.Finite execution avoids readline and the development-session refresh timer. Without input flags, the command keeps its interactive text interface. Includes schema discovery, generated help/docs, and a minor changeset.
Validated with 87 focused tests, the CLI build, theme type checking, lint, and live development-store checks for repeated inputs, assignments, native values, file input, and failed/skipped results.
How to manually test your changes?
Use a development store with an existing CLI sign-in. From this checkout:
Verify that it returns one JSON document, preserves the assignment, and exits. Put one command per line in
commands.txt, including a blank line, and run with--input-file ./commands.txtinstead of the--inputflags.Run with
--input 'shop.name' --input '{{ shop.name }}' --input 'shop.currency' --json --no-input. Verify that the second input fails, the third is skipped, and the exit status is nonzero. Run without input flags or--jsonto check the interactive console.Checklist