Skip to content

Commit d335ecc

Browse files
Load required preview values from theme environments
1 parent 9c74c3c commit d335ecc

5 files changed

Lines changed: 39 additions & 16 deletions

File tree

‎docs-shopify.dev/generated/generated_docs_data_v2.json‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9672,6 +9672,7 @@
96729672
"name": "--overrides <value>",
96739673
"value": "string",
96749674
"description": "Path to a JSON overrides file.",
9675+
"isOptional": true,
96759676
"environmentValue": "SHOPIFY_FLAG_OVERRIDES"
96769677
},
96779678
{
@@ -9743,10 +9744,11 @@
97439744
"name": "-t, --theme <value>",
97449745
"value": "string",
97459746
"description": "Theme ID or name of the remote theme.",
9747+
"isOptional": true,
97469748
"environmentValue": "SHOPIFY_FLAG_THEME_ID"
97479749
}
97489750
],
9749-
"value": "export interface themepreview {\n /**\n * Alias of the Shopify account to use for authentication.\n * @environment SHOPIFY_FLAG_AUTH_ALIAS\n */\n '--auth-alias <value>'?: string\n\n /**\n * The environment to apply to the current command.\n * @environment SHOPIFY_FLAG_ENVIRONMENT\n */\n '-e, --environment <value>'?: string\n\n /**\n * Output the preview URL and identifier as JSON.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Print the command's JSON schemas.\n * @environment SHOPIFY_FLAG_JSON_SCHEMA\n */\n '--json-schema'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Disable interactive prompts and browser authentication.\n * @environment SHOPIFY_FLAG_NO_INPUT\n */\n '--no-input'?: ''\n\n /**\n * Automatically launch the theme preview in your default web browser.\n * @environment SHOPIFY_FLAG_OPEN\n */\n '--open'?: ''\n\n /**\n * Path to a JSON overrides file.\n * @environment SHOPIFY_FLAG_OVERRIDES\n */\n '--overrides <value>': string\n\n /**\n * Password generated from the Theme Access app or an Admin API token.\n * @environment SHOPIFY_CLI_THEME_TOKEN\n */\n '--password <value>'?: string\n\n /**\n * The path where you want to run the command. Defaults to the current working directory.\n * @environment SHOPIFY_FLAG_PATH\n */\n '--path <value>'?: string\n\n /**\n * An existing preview identifier to update instead of creating a new preview.\n * @environment SHOPIFY_FLAG_PREVIEW_ID\n */\n '--preview-id <value>'?: string\n\n /**\n * Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store <value>'?: string\n\n /**\n * Theme ID or name of the remote theme.\n * @environment SHOPIFY_FLAG_THEME_ID\n */\n '-t, --theme <value>': string\n\n /**\n * Increase the verbosity of the output. May include sensitive data.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}"
9751+
"value": "export interface themepreview {\n /**\n * Alias of the Shopify account to use for authentication.\n * @environment SHOPIFY_FLAG_AUTH_ALIAS\n */\n '--auth-alias <value>'?: string\n\n /**\n * The environment to apply to the current command.\n * @environment SHOPIFY_FLAG_ENVIRONMENT\n */\n '-e, --environment <value>'?: string\n\n /**\n * Output the preview URL and identifier as JSON.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Print the command's JSON schemas.\n * @environment SHOPIFY_FLAG_JSON_SCHEMA\n */\n '--json-schema'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Disable interactive prompts and browser authentication.\n * @environment SHOPIFY_FLAG_NO_INPUT\n */\n '--no-input'?: ''\n\n /**\n * Automatically launch the theme preview in your default web browser.\n * @environment SHOPIFY_FLAG_OPEN\n */\n '--open'?: ''\n\n /**\n * Path to a JSON overrides file.\n * @environment SHOPIFY_FLAG_OVERRIDES\n */\n '--overrides <value>'?: string\n\n /**\n * Password generated from the Theme Access app or an Admin API token.\n * @environment SHOPIFY_CLI_THEME_TOKEN\n */\n '--password <value>'?: string\n\n /**\n * The path where you want to run the command. Defaults to the current working directory.\n * @environment SHOPIFY_FLAG_PATH\n */\n '--path <value>'?: string\n\n /**\n * An existing preview identifier to update instead of creating a new preview.\n * @environment SHOPIFY_FLAG_PREVIEW_ID\n */\n '--preview-id <value>'?: string\n\n /**\n * Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store <value>'?: string\n\n /**\n * Theme ID or name of the remote theme.\n * @environment SHOPIFY_FLAG_THEME_ID\n */\n '-t, --theme <value>'?: string\n\n /**\n * Increase the verbosity of the output. May include sensitive data.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}"
97509752
}
97519753
},
97529754
"themeprofile": {
@@ -10719,4 +10721,4 @@
1071910721
"value": "export interface version {\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Print the command's JSON schemas.\n * @environment SHOPIFY_FLAG_JSON_SCHEMA\n */\n '--json-schema'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Disable interactive prompts and browser authentication.\n * @environment SHOPIFY_FLAG_NO_INPUT\n */\n '--no-input'?: ''\n\n /**\n * Increase the verbosity of the output. May include sensitive data.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}"
1072010722
}
1072110723
}
10722-
}
10724+
}

‎packages/cli/README.md‎

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12785,8 +12785,8 @@ Applies JSON overrides to a theme and returns a preview URL.
1278512785
1278612786
```
1278712787
USAGE
12788-
$ shopify theme preview --overrides <value> -t <value> [--auth-alias <value>] [-e <value>...] [-j]
12789-
[--json-schema] [--no-color] [--no-input] [--open] [--password <value>] [--path <value>] [--preview-id <value>] [-s
12788+
$ shopify theme preview [--auth-alias <value>] [-e <value>...] [-j] [--json-schema] [--no-color] [--no-input]
12789+
[--open] [--overrides <value>] [--password <value>] [--path <value>] [--preview-id <value>] [-s <value>] [-t
1279012790
<value>] [--verbose]
1279112791

1279212792
FLAGS
@@ -12804,7 +12804,7 @@ FLAGS
1280412804
[env: SHOPIFY_FLAG_STORE]
1280512805

1280612806
-t, --theme=<value>
12807-
(required) Theme ID or name of the remote theme.
12807+
Theme ID or name of the remote theme.
1280812808
[env: SHOPIFY_FLAG_THEME_ID]
1280912809

1281012810
--auth-alias=<value>
@@ -12828,7 +12828,7 @@ FLAGS
1282812828
[env: SHOPIFY_FLAG_OPEN]
1282912829

1283012830
--overrides=<value>
12831-
(required) Path to a JSON overrides file.
12831+
Path to a JSON overrides file.
1283212832
[env: SHOPIFY_FLAG_OVERRIDES]
1283312833

1283412834
--password=<value>
@@ -12969,6 +12969,11 @@ DESCRIPTION
1296912969
"message": {
1297012970
"type": "string"
1297112971
},
12972+
"code": {
12973+
"type": "string",
12974+
"minLength": 1,
12975+
"description": "A stable error code, included only when known."
12976+
},
1297212977
"tryMessage": {
1297312978
"type": "string"
1297412979
},
@@ -13009,7 +13014,9 @@ DESCRIPTION
1300913014
"additionalProperties": false
1301013015
}
1301113016
},
13012-
"details": {}
13017+
"details": {
13018+
"description": "Selected domain details, preserving native API payloads such as GraphQL errors, extensions, and data."
13019+
}
1301313020
},
1301413021
"required": [
1301513022
"type",
@@ -13027,6 +13034,9 @@ DESCRIPTION
1302713034
"message": {
1302813035
"$ref": "#/definitions/ThemeEnvironment/anyOf/1/properties/error/anyOf/0/properties/message"
1302913036
},
13037+
"code": {
13038+
"$ref": "#/definitions/ThemeEnvironment/anyOf/1/properties/error/anyOf/0/properties/code"
13039+
},
1303013040
"tryMessage": {
1303113041
"$ref": "#/definitions/ThemeEnvironment/anyOf/1/properties/error/anyOf/0/properties/tryMessage"
1303213042
},
@@ -13059,6 +13069,9 @@ DESCRIPTION
1305913069
"message": {
1306013070
"$ref": "#/definitions/ThemeEnvironment/anyOf/1/properties/error/anyOf/0/properties/message"
1306113071
},
13072+
"code": {
13073+
"$ref": "#/definitions/ThemeEnvironment/anyOf/1/properties/error/anyOf/0/properties/code"
13074+
},
1306213075
"tryMessage": {
1306313076
"$ref": "#/definitions/ThemeEnvironment/anyOf/1/properties/error/anyOf/0/properties/tryMessage"
1306413077
},

0 commit comments

Comments
 (0)