-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add theme profile
command
#5109
Open
macournoyer
wants to merge
24
commits into
main
Choose a base branch
from
theme-profile
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
bab02b0
Setup `theme profile` command
macournoyer 037a0fa
Output profiling JSON data to stdout
macournoyer 45bb9f4
Open theme profile in Speedscope by default
macournoyer 1347120
Add token auth to theme profile command
macournoyer dbbdcf6
Refresh manifests
macournoyer 7559132
pnpm update-docs
macournoyer 0ab1b0f
Update lock file
macournoyer 60fe55c
Add knip entry for speedscope
macournoyer 2495c6b
Add new generated doc files I missed
macournoyer b65e554
Switch to using mime type for Liquid profiling
macournoyer e981668
Add tests for theme profile command
macournoyer 34a2184
Add more doc to theme profile
macournoyer 2141fc6
Add more validation around theme profile command
macournoyer b7cda8c
Add .changeset file
macournoyer 91ff0c4
Fix error handling in theme profile command
macournoyer 487ed2f
Adjust tests expectations
macournoyer a0955f7
Switch `theme profile` to use DevServer rendering
macournoyer a5ceb0b
Update theme profile tests
macournoyer de4b963
Ignore typescipt error for conditional in resolveSpeedscope
macournoyer 71f2677
Lint
macournoyer 2d7ef73
more descriptive changelogs
macournoyer a49cf3e
Swtich to minor version bump
macournoyer 2241a17
Refresh OCLIF manifest
macournoyer 1a56b88
Regen docs
macournoyer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@shopify/theme': minor | ||
--- | ||
|
||
Add `theme profile` command which allows users to get a performance profile for Liquid rendering on a given page |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
theme profile --url /products/classic-leather-jacket |
50 changes: 50 additions & 0 deletions
50
docs-shopify.dev/commands/interfaces/theme-profile.interface.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// This is an autogenerated file. Don't edit this file manually. | ||
export interface themeprofile { | ||
/** | ||
* Return profiling data as JSON. | ||
* @environment SHOPIFY_FLAG_JSON | ||
*/ | ||
'-j, --json'?: '' | ||
|
||
/** | ||
* Disable color output. | ||
* @environment SHOPIFY_FLAG_NO_COLOR | ||
*/ | ||
'--no-color'?: '' | ||
|
||
/** | ||
* Password generated from the Theme Access app. | ||
* @environment SHOPIFY_CLI_THEME_TOKEN | ||
*/ | ||
'--password <value>'?: string | ||
|
||
/** | ||
* Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com). | ||
* @environment SHOPIFY_FLAG_STORE | ||
*/ | ||
'-s, --store <value>'?: string | ||
|
||
/** | ||
* The password for storefronts with password protection. | ||
* @environment SHOPIFY_FLAG_STORE_PASSWORD | ||
*/ | ||
'--store-password <value>'?: string | ||
|
||
/** | ||
* Theme ID or name of the remote theme. | ||
* @environment SHOPIFY_FLAG_THEME_ID | ||
*/ | ||
'-t, --theme <value>'?: string | ||
|
||
/** | ||
* The url to be used as context | ||
* @environment SHOPIFY_FLAG_URL | ||
*/ | ||
'--url <value>'?: string | ||
|
||
/** | ||
* Increase the verbosity of the output. | ||
* @environment SHOPIFY_FLAG_VERBOSE | ||
*/ | ||
'--verbose'?: '' | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// This is an autogenerated file. Don't edit this file manually. | ||
import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs' | ||
|
||
const data: ReferenceEntityTemplateSchema = { | ||
name: 'theme profile', | ||
description: `Profile the Shopify Liquid on a given page. | ||
|
||
This command will open a web page with the Speedscope profiler detailing the time spent executing Liquid on the given page.`, | ||
overviewPreviewDescription: `Profile the Liquid rendering of a theme page.`, | ||
type: 'command', | ||
isVisualComponent: false, | ||
defaultExample: { | ||
codeblock: { | ||
tabs: [ | ||
{ | ||
title: 'theme profile', | ||
code: './examples/theme-profile.example.sh', | ||
language: 'bash', | ||
}, | ||
], | ||
title: 'theme profile', | ||
}, | ||
}, | ||
definitions: [ | ||
{ | ||
title: 'Flags', | ||
description: 'The following flags are available for the `theme profile` command:', | ||
type: 'themeprofile', | ||
}, | ||
], | ||
category: 'theme', | ||
related: [ | ||
], | ||
} | ||
|
||
export default data |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still needed? I tried
p knip
after removing this and it passed, wondering if this is an artifact from the build phase.Don't feel too strongly about this myself, though we would need @Shopify/app-inner-loop approval on this file due to CODEOWNERS