diff --git a/.changeset/pretty-olives-promise.md b/.changeset/pretty-olives-promise.md new file mode 100644 index 00000000000..a6ebacd954d --- /dev/null +++ b/.changeset/pretty-olives-promise.md @@ -0,0 +1,7 @@ +--- +'@shopify/theme': minor +'@shopify/app': minor +'@shopify/cli': minor +--- + +Default to Typescript implementation for theme commands. Legacy implementation is stil available via the `--legacy` flag. diff --git a/docs-shopify.dev/commands/interfaces/theme-console.interface.ts b/docs-shopify.dev/commands/interfaces/theme-console.interface.ts index ccab48c2250..c69d9a078e8 100644 --- a/docs-shopify.dev/commands/interfaces/theme-console.interface.ts +++ b/docs-shopify.dev/commands/interfaces/theme-console.interface.ts @@ -18,12 +18,6 @@ export interface themeconsole { */ '--password '?: string - /** - * Local port to serve authentication service. - * @environment SHOPIFY_FLAG_PORT - */ - '--port '?: 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 diff --git a/docs-shopify.dev/commands/interfaces/theme-dev.interface.ts b/docs-shopify.dev/commands/interfaces/theme-dev.interface.ts index a3b2bf38893..e8f131c9941 100644 --- a/docs-shopify.dev/commands/interfaces/theme-dev.interface.ts +++ b/docs-shopify.dev/commands/interfaces/theme-dev.interface.ts @@ -69,12 +69,6 @@ export interface themedev { */ '--path '?: string - /** - * Force polling to detect file changes. - * @environment SHOPIFY_FLAG_POLL - */ - '--poll'?: '' - /** * Local port to serve theme preview from. * @environment SHOPIFY_FLAG_PORT diff --git a/docs-shopify.dev/generated/generated_docs_data.json b/docs-shopify.dev/generated/generated_docs_data.json index f66c95f71a7..e7ea89f5f4e 100644 --- a/docs-shopify.dev/generated/generated_docs_data.json +++ b/docs-shopify.dev/generated/generated_docs_data.json @@ -4582,15 +4582,6 @@ "isOptional": true, "environmentValue": "SHOPIFY_CLI_THEME_TOKEN" }, - { - "filePath": "docs-shopify.dev/commands/interfaces/theme-console.interface.ts", - "syntaxKind": "PropertySignature", - "name": "--port ", - "value": "string", - "description": "Local port to serve authentication service.", - "isOptional": true, - "environmentValue": "SHOPIFY_FLAG_PORT" - }, { "filePath": "docs-shopify.dev/commands/interfaces/theme-console.interface.ts", "syntaxKind": "PropertySignature", @@ -4637,7 +4628,7 @@ "environmentValue": "SHOPIFY_FLAG_STORE" } ], - "value": "export interface themeconsole {\n /**\n * The environment to apply to the current command.\n * @environment SHOPIFY_FLAG_ENVIRONMENT\n */\n '-e, --environment '?: string\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Password generated from the Theme Access app.\n * @environment SHOPIFY_CLI_THEME_TOKEN\n */\n '--password '?: string\n\n /**\n * Local port to serve authentication service.\n * @environment SHOPIFY_FLAG_PORT\n */\n '--port '?: 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 '?: string\n\n /**\n * The password for storefronts with password protection.\n * @environment SHOPIFY_FLAG_STORE_PASSWORD\n */\n '--store-password '?: string\n\n /**\n * The url to be used as context\n * @environment SHOPIFY_FLAG_URL\n */\n '--url '?: string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" + "value": "export interface themeconsole {\n /**\n * The environment to apply to the current command.\n * @environment SHOPIFY_FLAG_ENVIRONMENT\n */\n '-e, --environment '?: string\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Password generated from the Theme Access app.\n * @environment SHOPIFY_CLI_THEME_TOKEN\n */\n '--password '?: 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 '?: string\n\n /**\n * The password for storefronts with password protection.\n * @environment SHOPIFY_FLAG_STORE_PASSWORD\n */\n '--store-password '?: string\n\n /**\n * The url to be used as context\n * @environment SHOPIFY_FLAG_URL\n */\n '--url '?: string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" } } } @@ -4856,15 +4847,6 @@ "isOptional": true, "environmentValue": "SHOPIFY_FLAG_PATH" }, - { - "filePath": "docs-shopify.dev/commands/interfaces/theme-dev.interface.ts", - "syntaxKind": "PropertySignature", - "name": "--poll", - "value": "\"\"", - "description": "Force polling to detect file changes.", - "isOptional": true, - "environmentValue": "SHOPIFY_FLAG_POLL" - }, { "filePath": "docs-shopify.dev/commands/interfaces/theme-dev.interface.ts", "syntaxKind": "PropertySignature", @@ -4956,7 +4938,7 @@ "environmentValue": "SHOPIFY_FLAG_IGNORE" } ], - "value": "export interface themedev {\n /**\n * The environment to apply to the current command.\n * @environment SHOPIFY_FLAG_ENVIRONMENT\n */\n '-e, --environment '?: string\n\n /**\n * Set which network interface the web server listens on. The default value is 127.0.0.1.\n * @environment SHOPIFY_FLAG_HOST\n */\n '--host '?: string\n\n /**\n * Skip hot reloading any files that match the specified pattern.\n * @environment SHOPIFY_FLAG_IGNORE\n */\n '-x, --ignore '?: string\n\n /**\n * The live reload mode switches the server behavior when a file is modified:\n- hot-reload Hot reloads local changes to CSS and sections (default)\n- full-page Always refreshes the entire page\n- off Deactivate live reload\n * @environment SHOPIFY_FLAG_LIVE_RELOAD\n */\n '--live-reload '?: string\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Prevents files from being deleted in the remote theme when a file has been deleted locally. This applies to files that are deleted while the command is running, and files that have been deleted locally before the command is run.\n * @environment SHOPIFY_FLAG_NODELETE\n */\n '-n, --nodelete'?: ''\n\n /**\n * The file path or URL. The file path is to a file that you want updated on idle. The URL path is where you want a webhook posted to report on file changes.\n * @environment SHOPIFY_FLAG_NOTIFY\n */\n '--notify '?: string\n\n /**\n * Hot reload only files that match the specified pattern.\n * @environment SHOPIFY_FLAG_ONLY\n */\n '-o, --only '?: string\n\n /**\n * Automatically launch the theme preview in your default web browser.\n * @environment SHOPIFY_FLAG_OPEN\n */\n '--open'?: ''\n\n /**\n * Password generated from the Theme Access app.\n * @environment SHOPIFY_CLI_THEME_TOKEN\n */\n '--password '?: string\n\n /**\n * The path to your theme directory.\n * @environment SHOPIFY_FLAG_PATH\n */\n '--path '?: string\n\n /**\n * Force polling to detect file changes.\n * @environment SHOPIFY_FLAG_POLL\n */\n '--poll'?: ''\n\n /**\n * Local port to serve theme preview from.\n * @environment SHOPIFY_FLAG_PORT\n */\n '--port '?: 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 '?: string\n\n /**\n * The password for storefronts with password protection.\n * @environment SHOPIFY_FLAG_STORE_PASSWORD\n */\n '--store-password '?: string\n\n /**\n * Theme ID or name of the remote theme.\n * @environment SHOPIFY_FLAG_THEME_ID\n */\n '-t, --theme '?: string\n\n /**\n * Synchronize Theme Editor updates in the local theme files.\n * @environment SHOPIFY_FLAG_THEME_EDITOR_SYNC\n */\n '--theme-editor-sync'?: ''\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" + "value": "export interface themedev {\n /**\n * The environment to apply to the current command.\n * @environment SHOPIFY_FLAG_ENVIRONMENT\n */\n '-e, --environment '?: string\n\n /**\n * Set which network interface the web server listens on. The default value is 127.0.0.1.\n * @environment SHOPIFY_FLAG_HOST\n */\n '--host '?: string\n\n /**\n * Skip hot reloading any files that match the specified pattern.\n * @environment SHOPIFY_FLAG_IGNORE\n */\n '-x, --ignore '?: string\n\n /**\n * The live reload mode switches the server behavior when a file is modified:\n- hot-reload Hot reloads local changes to CSS and sections (default)\n- full-page Always refreshes the entire page\n- off Deactivate live reload\n * @environment SHOPIFY_FLAG_LIVE_RELOAD\n */\n '--live-reload '?: string\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Prevents files from being deleted in the remote theme when a file has been deleted locally. This applies to files that are deleted while the command is running, and files that have been deleted locally before the command is run.\n * @environment SHOPIFY_FLAG_NODELETE\n */\n '-n, --nodelete'?: ''\n\n /**\n * The file path or URL. The file path is to a file that you want updated on idle. The URL path is where you want a webhook posted to report on file changes.\n * @environment SHOPIFY_FLAG_NOTIFY\n */\n '--notify '?: string\n\n /**\n * Hot reload only files that match the specified pattern.\n * @environment SHOPIFY_FLAG_ONLY\n */\n '-o, --only '?: string\n\n /**\n * Automatically launch the theme preview in your default web browser.\n * @environment SHOPIFY_FLAG_OPEN\n */\n '--open'?: ''\n\n /**\n * Password generated from the Theme Access app.\n * @environment SHOPIFY_CLI_THEME_TOKEN\n */\n '--password '?: string\n\n /**\n * The path to your theme directory.\n * @environment SHOPIFY_FLAG_PATH\n */\n '--path '?: string\n\n /**\n * Local port to serve theme preview from.\n * @environment SHOPIFY_FLAG_PORT\n */\n '--port '?: 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 '?: string\n\n /**\n * The password for storefronts with password protection.\n * @environment SHOPIFY_FLAG_STORE_PASSWORD\n */\n '--store-password '?: string\n\n /**\n * Theme ID or name of the remote theme.\n * @environment SHOPIFY_FLAG_THEME_ID\n */\n '-t, --theme '?: string\n\n /**\n * Synchronize Theme Editor updates in the local theme files.\n * @environment SHOPIFY_FLAG_THEME_EDITOR_SYNC\n */\n '--theme-editor-sync'?: ''\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" } } } diff --git a/docs-shopify.dev/generated/generated_static_pages.json b/docs-shopify.dev/generated/generated_static_pages.json index 588fd8b189c..0e13d201638 100644 --- a/docs-shopify.dev/generated/generated_static_pages.json +++ b/docs-shopify.dev/generated/generated_static_pages.json @@ -43,37 +43,6 @@ ] } }, - { - "type": "Generic", - "anchorLink": "requirements-themes", - "title": "Requirements for themes", - "sectionContent": "\nTo work with themes, your system must meet the following additional requirements:\n- [Ruby](https://www.ruby-lang.org/en/) version 2.7.5 or higher\n\n> Note: Theme requirements are automatically installed on macOS when you use Homebrew to install Shopify CLI.\n", - "codeblock": { - "title": "Installation requirements for themes", - "tabs": [ - { - "title": "macOS: brew", - "code": "brew install ruby\n", - "language": "bash" - }, - { - "title": "Windows", - "code": "Install Ruby+Devkit 3.0 using https://rubyinstaller.org/downloads/\n\nSelect the MSYS2 component and the MSYS2 base installation option\n", - "language": "bash" - }, - { - "title": "Linux: apt", - "code": "\nsudo apt update && sudo apt upgrade\n\nsudo apt install curl gcc g++ make\n\nsudo apt install ruby-full\n\nsudo apt install ruby-dev\n# Ruby development environment\n\nsudo apt install git\n", - "language": "bash" - }, - { - "title": "Linux: yum", - "code": "sudo yum install curl\n\nsudo yum group install \"Development Tools\"\n# Includes GCC, g++, and Make\n\nsudo yum install ruby\nsudo yum install ruby-devel\n# Ruby development environment\n\nsudo yum install git\n", - "language": "bash" - } - ] - } - }, { "type": "Generic", "anchorLink": "commands", diff --git a/docs-shopify.dev/static/cli.doc.ts b/docs-shopify.dev/static/cli.doc.ts index b78f1c6b656..bc4d0ea014f 100644 --- a/docs-shopify.dev/static/cli.doc.ts +++ b/docs-shopify.dev/static/cli.doc.ts @@ -50,42 +50,6 @@ const data: LandingTemplateSchema = { ], }, }, - { - type: 'Generic', - anchorLink: 'requirements-themes', - title: 'Requirements for themes', - sectionContent: ` -To work with themes, your system must meet the following additional requirements: -- [Ruby](https://www.ruby-lang.org/en/) version 2.7.5 or higher - -> Note: Theme requirements are automatically installed on macOS when you use Homebrew to install Shopify CLI. -`, - codeblock: { - title: 'Installation requirements for themes', - tabs: [ - { - title: 'macOS: brew', - code: 'examples/requirements.brew.example.sh', - language: 'bash', - }, - { - title: 'Windows', - code: 'examples/requirements.win.example.sh', - language: 'bash', - }, - { - title: 'Linux: apt', - code: 'examples/requirements.apt.example.sh', - language: 'bash', - }, - { - title: 'Linux: yum', - code: 'examples/requirements.yum.example.sh', - language: 'bash', - }, - ], - }, - }, { type: 'Generic', anchorLink: 'commands', diff --git a/packages/app/src/cli/commands/app/dev.ts b/packages/app/src/cli/commands/app/dev.ts index 9618418b199..ce69f28f1ad 100644 --- a/packages/app/src/cli/commands/app/dev.ts +++ b/packages/app/src/cli/commands/app/dev.ts @@ -131,11 +131,10 @@ If you're using the PHP or Ruby app template, then you need to complete the foll 'Key used to authenticate GraphiQL requests. Should be specified if exposing GraphiQL on a publicly accessible URL. By default, no key is required.', env: 'SHOPIFY_FLAG_GRAPHIQL_KEY', }), - 'dev-preview': Flags.boolean({ + legacy: Flags.boolean({ hidden: true, - description: - 'Enables the developer preview for the upcoming `app dev` implementation for building theme app extensions.', - env: 'SHOPIFY_FLAG_BETA', + description: 'Use the legacy Ruby implementation for managing theme app extensions.', + env: 'SHOPIFY_FLAG_LEGACY', }), } @@ -184,7 +183,7 @@ If you're using the PHP or Ruby app template, then you need to complete the foll notify: flags.notify, graphiqlPort: flags['graphiql-port'], graphiqlKey: flags['graphiql-key'], - devPreview: flags['dev-preview'], + devPreview: !flags.legacy, } await dev(devOptions) diff --git a/packages/app/src/cli/commands/app/logs.ts b/packages/app/src/cli/commands/app/logs.ts index d2c956ea2ea..89d46351484 100644 --- a/packages/app/src/cli/commands/app/logs.ts +++ b/packages/app/src/cli/commands/app/logs.ts @@ -37,7 +37,7 @@ export default class Logs extends Command { 'no-tunnel': Dev.flags['no-tunnel'], 'graphiql-port': Dev.flags['graphiql-port'], 'graphiql-key': Dev.flags['graphiql-key'], - 'dev-preview': Dev.flags['dev-preview'], + stable: Dev.flags.legacy, source: Flags.string({ description: 'Filters output to the specified log source.', env: 'SHOPIFY_FLAG_SOURCE', diff --git a/packages/cli/README.md b/packages/cli/README.md index 7346f0b25ef..e73ca3a450e 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -1710,7 +1710,6 @@ FLAGS (example.myshopify.com, https://example.myshopify.com). --no-color Disable color output. --password= Password generated from the Theme Access app. - --port= Local port to serve authentication service. --store-password= The password for storefronts with password protection. --url= [default: /] The url to be used as context --verbose Increase the verbosity of the output. @@ -1764,8 +1763,8 @@ Uploads the current theme as a development theme to the connected store, then pr ``` USAGE $ shopify theme dev [-e ] [--host ] [-x ] [--live-reload hot-reload|full-page|off] - [--no-color] [-n] [--notify ] [-o ] [--open] [--password ] [--path ] [--poll] [--port - ] [-s ] [--store-password ] [-t ] [--theme-editor-sync] [--verbose] + [--no-color] [-n] [--notify ] [-o ] [--open] [--password ] [--path ] [--port ] + [-s ] [--store-password ] [-t ] [--theme-editor-sync] [--verbose] FLAGS -e, --environment= @@ -1814,9 +1813,6 @@ FLAGS --path= The path to your theme directory. - --poll - Force polling to detect file changes. - --port= Local port to serve theme preview from. diff --git a/packages/cli/oclif.manifest.json b/packages/cli/oclif.manifest.json index 33879e42134..563a8f62837 100644 --- a/packages/cli/oclif.manifest.json +++ b/packages/cli/oclif.manifest.json @@ -394,14 +394,6 @@ "name": "config", "type": "option" }, - "dev-preview": { - "allowNo": false, - "description": "Enables the developer preview for the upcoming `app dev` implementation for building theme app extensions.", - "env": "SHOPIFY_FLAG_BETA", - "hidden": true, - "name": "dev-preview", - "type": "boolean" - }, "graphiql-key": { "description": "Key used to authenticate GraphiQL requests. Should be specified if exposing GraphiQL on a publicly accessible URL. By default, no key is required.", "env": "SHOPIFY_FLAG_GRAPHIQL_KEY", @@ -420,6 +412,14 @@ "name": "graphiql-port", "type": "option" }, + "legacy": { + "allowNo": false, + "description": "Use the legacy Ruby implementation for managing theme app extensions.", + "env": "SHOPIFY_FLAG_LEGACY", + "hidden": true, + "name": "legacy", + "type": "boolean" + }, "no-color": { "allowNo": false, "description": "Disable color output.", @@ -1584,14 +1584,6 @@ "name": "config", "type": "option" }, - "dev-preview": { - "allowNo": false, - "description": "Enables the developer preview for the upcoming `app dev` implementation for building theme app extensions.", - "env": "SHOPIFY_FLAG_BETA", - "hidden": true, - "name": "dev-preview", - "type": "boolean" - }, "graphiql-key": { "description": "Key used to authenticate GraphiQL requests. Should be specified if exposing GraphiQL on a publicly accessible URL. By default, no key is required.", "env": "SHOPIFY_FLAG_GRAPHIQL_KEY", @@ -1666,6 +1658,14 @@ "name": "source", "type": "option" }, + "stable": { + "allowNo": false, + "description": "Use the legacy Ruby implementation for managing theme app extensions.", + "env": "SHOPIFY_FLAG_LEGACY", + "hidden": true, + "name": "stable", + "type": "boolean" + }, "status": { "description": "Filters output to the specified status (success or failure).", "env": "SHOPIFY_FLAG_STATUS", @@ -4774,14 +4774,6 @@ "description": "Starts the Shopify Liquid REPL (read-eval-print loop) tool. This tool provides an interactive terminal interface for evaluating Liquid code and exploring Liquid objects, filters, and tags using real store data.\n\n You can also provide context to the console using a URL, as some Liquid objects are context-specific", "descriptionWithMarkdown": "Starts the Shopify Liquid REPL (read-eval-print loop) tool. This tool provides an interactive terminal interface for evaluating Liquid code and exploring Liquid objects, filters, and tags using real store data.\n\n You can also provide context to the console using a URL, as some Liquid objects are context-specific", "flags": { - "dev-preview": { - "allowNo": false, - "description": "Enables the developer preview for the upcoming `theme console` implementation.", - "env": "SHOPIFY_FLAG_BETA", - "hidden": true, - "name": "dev-preview", - "type": "boolean" - }, "environment": { "char": "e", "description": "The environment to apply to the current command.", @@ -4791,6 +4783,14 @@ "name": "environment", "type": "option" }, + "legacy": { + "allowNo": false, + "description": "Use the legacy Ruby implementation for the `shopify theme console` command.", + "env": "SHOPIFY_FLAG_LEGACY", + "hidden": true, + "name": "legacy", + "type": "boolean" + }, "no-color": { "allowNo": false, "description": "Disable color output.", @@ -4811,6 +4811,7 @@ "description": "Local port to serve authentication service.", "env": "SHOPIFY_FLAG_PORT", "hasDynamicHelp": false, + "hidden": true, "multiple": false, "name": "port", "type": "option" @@ -4975,7 +4976,6 @@ "nodelete", "only", "ignore", - "stable", "force", "notify" ], @@ -4983,14 +4983,6 @@ "description": "\n Uploads the current theme as the specified theme, or a \"development theme\" (https://shopify.dev/docs/themes/tools/cli#development-themes), to a store so you can preview it.\n\nThis command returns the following information:\n\n- A link to your development theme at http://127.0.0.1:9292. This URL can hot reload local changes to CSS and sections, or refresh the entire page when a file changes, enabling you to preview changes in real time using the store's data.\n\n You can specify a different network interface and port using `--host` and `--port`.\n\n- A link to the \"editor\" (https://shopify.dev/docs/themes/tools/online-editor) for the theme in the Shopify admin.\n\n- A \"preview link\" (https://help.shopify.com/manual/online-store/themes/adding-themes#share-a-theme-preview-with-others) that you can share with other developers.\n\nIf you already have a development theme for your current environment, then this command replaces the development theme with your local theme. You can override this using the `--theme-editor-sync` flag.\n\n> Note: You can't preview checkout customizations using http://127.0.0.1:9292.\n\nDevelopment themes are deleted when you run `shopify auth logout`. If you need a preview link that can be used after you log out, then you should \"share\" (https://shopify.dev/docs/api/shopify-cli/theme/theme-share) your theme or \"push\" (https://shopify.dev/docs/api/shopify-cli/theme/theme-push) to an unpublished theme on your store.\n\nYou can run this command only in a directory that matches the \"default Shopify theme folder structure\" (https://shopify.dev/docs/themes/tools/cli#directory-structure).", "descriptionWithMarkdown": "\n Uploads the current theme as the specified theme, or a [development theme](https://shopify.dev/docs/themes/tools/cli#development-themes), to a store so you can preview it.\n\nThis command returns the following information:\n\n- A link to your development theme at http://127.0.0.1:9292. This URL can hot reload local changes to CSS and sections, or refresh the entire page when a file changes, enabling you to preview changes in real time using the store's data.\n\n You can specify a different network interface and port using `--host` and `--port`.\n\n- A link to the [editor](https://shopify.dev/docs/themes/tools/online-editor) for the theme in the Shopify admin.\n\n- A [preview link](https://help.shopify.com/manual/online-store/themes/adding-themes#share-a-theme-preview-with-others) that you can share with other developers.\n\nIf you already have a development theme for your current environment, then this command replaces the development theme with your local theme. You can override this using the `--theme-editor-sync` flag.\n\n> Note: You can't preview checkout customizations using http://127.0.0.1:9292.\n\nDevelopment themes are deleted when you run `shopify auth logout`. If you need a preview link that can be used after you log out, then you should [share](https://shopify.dev/docs/api/shopify-cli/theme/theme-share) your theme or [push](https://shopify.dev/docs/api/shopify-cli/theme/theme-push) to an unpublished theme on your store.\n\nYou can run this command only in a directory that matches the [default Shopify theme folder structure](https://shopify.dev/docs/themes/tools/cli#directory-structure).", "flags": { - "dev-preview": { - "allowNo": false, - "description": "Enables the developer preview for the upcoming `theme dev` implementation.", - "env": "SHOPIFY_FLAG_BETA", - "hidden": true, - "name": "dev-preview", - "type": "boolean" - }, "environment": { "char": "e", "description": "The environment to apply to the current command.", @@ -5026,6 +5018,14 @@ "name": "ignore", "type": "option" }, + "legacy": { + "allowNo": false, + "description": "Use the legacy Ruby implementation for the `shopify theme dev` command.", + "env": "SHOPIFY_FLAG_LEGACY", + "hidden": true, + "name": "legacy", + "type": "boolean" + }, "live-reload": { "default": "hot-reload", "description": "The live reload mode switches the server behavior when a file is modified:\n- hot-reload Hot reloads local changes to CSS and sections (default)\n- full-page Always refreshes the entire page\n- off Deactivate live reload", @@ -5101,6 +5101,7 @@ "allowNo": false, "description": "Force polling to detect file changes.", "env": "SHOPIFY_FLAG_POLL", + "hidden": true, "name": "poll", "type": "boolean" }, @@ -5112,14 +5113,6 @@ "name": "port", "type": "option" }, - "stable": { - "allowNo": false, - "description": "Performs the upload by relying in the legacy upload approach (slower, but it might be more stable in some scenarios)", - "env": "SHOPIFY_FLAG_STABLE", - "hidden": true, - "name": "stable", - "type": "boolean" - }, "store": { "char": "s", "description": "Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).", @@ -5695,14 +5688,6 @@ "description": "Retrieves theme files from Shopify.\n\nIf no theme is specified, then you're prompted to select the theme to pull from the list of the themes in your store.", "descriptionWithMarkdown": "Retrieves theme files from Shopify.\n\nIf no theme is specified, then you're prompted to select the theme to pull from the list of the themes in your store.", "flags": { - "dev-preview": { - "allowNo": false, - "description": "Enables the developer preview for the upcoming `theme pull` implementation.", - "env": "SHOPIFY_FLAG_BETA", - "hidden": true, - "name": "dev-preview", - "type": "boolean" - }, "development": { "allowNo": false, "char": "d", @@ -5738,6 +5723,14 @@ "name": "ignore", "type": "option" }, + "legacy": { + "allowNo": false, + "description": "Use the legacy Ruby implementation for the `shopify theme pull` command.", + "env": "SHOPIFY_FLAG_LEGACY", + "hidden": true, + "name": "legacy", + "type": "boolean" + }, "live": { "allowNo": false, "char": "l", @@ -5788,14 +5781,6 @@ "noCacheDefault": true, "type": "option" }, - "stable": { - "allowNo": false, - "description": "Performs the pull command by relying on the legacy download implementation.", - "env": "SHOPIFY_FLAG_STABLE", - "hidden": true, - "name": "stable", - "type": "boolean" - }, "store": { "char": "s", "description": "Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).", @@ -5849,7 +5834,6 @@ "json", "allow-live", "publish", - "stable", "force", "development-theme-id" ], @@ -5865,14 +5849,6 @@ "name": "allow-live", "type": "boolean" }, - "dev-preview": { - "allowNo": false, - "description": "Enables the developer preview for the upcoming `theme push` implementation.", - "env": "SHOPIFY_FLAG_BETA", - "hidden": true, - "name": "dev-preview", - "type": "boolean" - }, "development": { "allowNo": false, "char": "d", @@ -5916,6 +5892,14 @@ "name": "json", "type": "boolean" }, + "legacy": { + "allowNo": false, + "description": "Use the legacy Ruby implementation for the `shopify theme push` command.", + "env": "SHOPIFY_FLAG_LEGACY", + "hidden": true, + "name": "legacy", + "type": "boolean" + }, "live": { "allowNo": false, "char": "l", @@ -5974,14 +5958,6 @@ "name": "publish", "type": "boolean" }, - "stable": { - "allowNo": false, - "description": "Performs the upload by relying in the legacy upload approach (slower, but it might be more stable in some scenarios)", - "env": "SHOPIFY_FLAG_STABLE", - "hidden": true, - "name": "stable", - "type": "boolean" - }, "store": { "char": "s", "description": "Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).", @@ -6144,7 +6120,6 @@ "nodelete", "only", "ignore", - "stable", "force", "notify" ], @@ -6152,14 +6127,6 @@ "description": "\n Uploads the current theme as the specified theme, or a \"development theme\" (https://shopify.dev/docs/themes/tools/cli#development-themes), to a store so you can preview it.\n\nThis command returns the following information:\n\n- A link to your development theme at http://127.0.0.1:9292. This URL can hot reload local changes to CSS and sections, or refresh the entire page when a file changes, enabling you to preview changes in real time using the store's data.\n\n You can specify a different network interface and port using `--host` and `--port`.\n\n- A link to the \"editor\" (https://shopify.dev/docs/themes/tools/online-editor) for the theme in the Shopify admin.\n\n- A \"preview link\" (https://help.shopify.com/manual/online-store/themes/adding-themes#share-a-theme-preview-with-others) that you can share with other developers.\n\nIf you already have a development theme for your current environment, then this command replaces the development theme with your local theme. You can override this using the `--theme-editor-sync` flag.\n\n> Note: You can't preview checkout customizations using http://127.0.0.1:9292.\n\nDevelopment themes are deleted when you run `shopify auth logout`. If you need a preview link that can be used after you log out, then you should \"share\" (https://shopify.dev/docs/api/shopify-cli/theme/theme-share) your theme or \"push\" (https://shopify.dev/docs/api/shopify-cli/theme/theme-push) to an unpublished theme on your store.\n\nYou can run this command only in a directory that matches the \"default Shopify theme folder structure\" (https://shopify.dev/docs/themes/tools/cli#directory-structure).", "descriptionWithMarkdown": "\n Uploads the current theme as the specified theme, or a [development theme](https://shopify.dev/docs/themes/tools/cli#development-themes), to a store so you can preview it.\n\nThis command returns the following information:\n\n- A link to your development theme at http://127.0.0.1:9292. This URL can hot reload local changes to CSS and sections, or refresh the entire page when a file changes, enabling you to preview changes in real time using the store's data.\n\n You can specify a different network interface and port using `--host` and `--port`.\n\n- A link to the [editor](https://shopify.dev/docs/themes/tools/online-editor) for the theme in the Shopify admin.\n\n- A [preview link](https://help.shopify.com/manual/online-store/themes/adding-themes#share-a-theme-preview-with-others) that you can share with other developers.\n\nIf you already have a development theme for your current environment, then this command replaces the development theme with your local theme. You can override this using the `--theme-editor-sync` flag.\n\n> Note: You can't preview checkout customizations using http://127.0.0.1:9292.\n\nDevelopment themes are deleted when you run `shopify auth logout`. If you need a preview link that can be used after you log out, then you should [share](https://shopify.dev/docs/api/shopify-cli/theme/theme-share) your theme or [push](https://shopify.dev/docs/api/shopify-cli/theme/theme-push) to an unpublished theme on your store.\n\nYou can run this command only in a directory that matches the [default Shopify theme folder structure](https://shopify.dev/docs/themes/tools/cli#directory-structure).", "flags": { - "dev-preview": { - "allowNo": false, - "description": "Enables the developer preview for the upcoming `theme dev` implementation.", - "env": "SHOPIFY_FLAG_BETA", - "hidden": true, - "name": "dev-preview", - "type": "boolean" - }, "environment": { "char": "e", "description": "The environment to apply to the current command.", @@ -6195,6 +6162,14 @@ "name": "ignore", "type": "option" }, + "legacy": { + "allowNo": false, + "description": "Use the legacy Ruby implementation for the `shopify theme dev` command.", + "env": "SHOPIFY_FLAG_LEGACY", + "hidden": true, + "name": "legacy", + "type": "boolean" + }, "live-reload": { "default": "hot-reload", "description": "The live reload mode switches the server behavior when a file is modified:\n- hot-reload Hot reloads local changes to CSS and sections (default)\n- full-page Always refreshes the entire page\n- off Deactivate live reload", @@ -6270,6 +6245,7 @@ "allowNo": false, "description": "Force polling to detect file changes.", "env": "SHOPIFY_FLAG_POLL", + "hidden": true, "name": "poll", "type": "boolean" }, @@ -6281,14 +6257,6 @@ "name": "port", "type": "option" }, - "stable": { - "allowNo": false, - "description": "Performs the upload by relying in the legacy upload approach (slower, but it might be more stable in some scenarios)", - "env": "SHOPIFY_FLAG_STABLE", - "hidden": true, - "name": "stable", - "type": "boolean" - }, "store": { "char": "s", "description": "Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).", diff --git a/packages/theme/src/cli/commands/theme/console.ts b/packages/theme/src/cli/commands/theme/console.ts index 3919f659f18..fcd54ba1c21 100644 --- a/packages/theme/src/cli/commands/theme/console.ts +++ b/packages/theme/src/cli/commands/theme/console.ts @@ -31,6 +31,7 @@ export default class Console extends ThemeCommand { default: '/', }), port: Flags.string({ + hidden: true, description: 'Local port to serve authentication service.', env: 'SHOPIFY_FLAG_PORT', }), @@ -38,10 +39,10 @@ export default class Console extends ThemeCommand { description: 'The password for storefronts with password protection.', env: 'SHOPIFY_FLAG_STORE_PASSWORD', }), - 'dev-preview': Flags.boolean({ + legacy: Flags.boolean({ hidden: true, - description: 'Enables the developer preview for the upcoming `theme console` implementation.', - env: 'SHOPIFY_FLAG_BETA', + description: 'Use the legacy Ruby implementation for the `shopify theme console` command.', + env: 'SHOPIFY_FLAG_LEGACY', }), } @@ -55,7 +56,7 @@ export default class Console extends ThemeCommand { const adminSession = await ensureAuthenticatedThemes(store, themeAccessPassword, [], true) const authUrl = `http://localhost:${port ?? '9293'}/password` - if (flags['dev-preview']) { + if (!flags.legacy) { if (flags.port) { renderPortDeprecationWarning() } diff --git a/packages/theme/src/cli/commands/theme/dev.ts b/packages/theme/src/cli/commands/theme/dev.ts index 0e1f795611b..bd3aa4c9413 100644 --- a/packages/theme/src/cli/commands/theme/dev.ts +++ b/packages/theme/src/cli/commands/theme/dev.ts @@ -54,6 +54,7 @@ You can run this command only in a directory that matches the [default Shopify t env: 'SHOPIFY_FLAG_LIVE_RELOAD', }), poll: Flags.boolean({ + hidden: true, description: 'Force polling to detect file changes.', env: 'SHOPIFY_FLAG_POLL', }), @@ -89,11 +90,10 @@ You can run this command only in a directory that matches the [default Shopify t description: 'Skip hot reloading any files that match the specified pattern.', env: 'SHOPIFY_FLAG_IGNORE', }), - stable: Flags.boolean({ + legacy: Flags.boolean({ hidden: true, - description: - 'Performs the upload by relying in the legacy upload approach (slower, but it might be more stable in some scenarios)', - env: 'SHOPIFY_FLAG_STABLE', + description: 'Use the legacy Ruby implementation for the `shopify theme dev` command.', + env: 'SHOPIFY_FLAG_LEGACY', }), force: Flags.boolean({ hidden: true, @@ -117,11 +117,6 @@ You can run this command only in a directory that matches the [default Shopify t description: 'The password for storefronts with password protection.', env: 'SHOPIFY_FLAG_STORE_PASSWORD', }), - 'dev-preview': Flags.boolean({ - hidden: true, - description: 'Enables the developer preview for the upcoming `theme dev` implementation.', - env: 'SHOPIFY_FLAG_BETA', - }), } static cli2Flags = [ @@ -135,7 +130,6 @@ You can run this command only in a directory that matches the [default Shopify t 'nodelete', 'only', 'ignore', - 'stable', 'force', 'notify', ] @@ -149,7 +143,7 @@ You can run this command only in a directory that matches the [default Shopify t const store = ensureThemeStore(flags) const {ignore = [], only = []} = flags - const {adminSession, storefrontToken} = await refreshTokens(store, flags.password, !flags['dev-preview']) + const {adminSession, storefrontToken} = await refreshTokens(store, flags.password, flags.legacy) let theme: Theme @@ -181,7 +175,7 @@ You can run this command only in a directory that matches the [default Shopify t force: flags.force, open: flags.open, flagsToPass, - 'dev-preview': flags['dev-preview'], + legacy: flags.legacy, 'theme-editor-sync': flags['theme-editor-sync'], noDelete: flags.nodelete, ignore, diff --git a/packages/theme/src/cli/commands/theme/pull.test.ts b/packages/theme/src/cli/commands/theme/pull.test.ts index e2bb222237d..99625b39f5e 100644 --- a/packages/theme/src/cli/commands/theme/pull.test.ts +++ b/packages/theme/src/cli/commands/theme/pull.test.ts @@ -30,7 +30,7 @@ describe('Pull', () => { describe('run with CLI 3 implementation', () => { test('should pass call the CLI 3 command', async () => { const theme = buildTheme({id: 1, name: 'Theme', role: 'development'})! - const flags = ['--ignore=config', '--only=assets', '--nodelete', '--dev-preview'] + const flags = ['--ignore=config', '--only=assets', '--nodelete'] vi.mocked(useEmbeddedThemeCLI).mockReturnValue(true) vi.mocked(findOrSelectTheme).mockResolvedValue(theme) @@ -48,7 +48,7 @@ describe('Pull', () => { describe('run with CLI 2 implementation', () => { async function run(argv: string[], theme?: Theme) { - await runPullCommand(['--stable', ...argv], path, adminSession, theme) + await runPullCommand(['--legacy', ...argv], path, adminSession, theme) } function expectCLI2ToHaveBeenCalledWith(command: string) { diff --git a/packages/theme/src/cli/commands/theme/pull.ts b/packages/theme/src/cli/commands/theme/pull.ts index f135e77d552..c407d1f73d1 100644 --- a/packages/theme/src/cli/commands/theme/pull.ts +++ b/packages/theme/src/cli/commands/theme/pull.ts @@ -61,15 +61,10 @@ If no theme is specified, then you're prompted to select the theme to pull from description: 'Proceed without confirmation, if current directory does not seem to be theme directory.', env: 'SHOPIFY_FLAG_FORCE', }), - stable: Flags.boolean({ + legacy: Flags.boolean({ hidden: true, - description: 'Performs the pull command by relying on the legacy download implementation.', - env: 'SHOPIFY_FLAG_STABLE', - }), - 'dev-preview': Flags.boolean({ - hidden: true, - description: 'Enables the developer preview for the upcoming `theme pull` implementation.', - env: 'SHOPIFY_FLAG_BETA', + description: 'Use the legacy Ruby implementation for the `shopify theme pull` command.', + env: 'SHOPIFY_FLAG_LEGACY', }), } @@ -87,7 +82,7 @@ If no theme is specified, then you're prompted to select the theme to pull from ? developmentThemeManager.find() : developmentThemeManager.fetch()) - if (flags['dev-preview']) { + if (!flags.legacy) { const {path, nodelete, live, development, only, ignore, force} = flags const theme = await findOrSelectTheme(adminSession, { diff --git a/packages/theme/src/cli/commands/theme/push.test.ts b/packages/theme/src/cli/commands/theme/push.test.ts index 2474dfe9b56..3380235eaae 100644 --- a/packages/theme/src/cli/commands/theme/push.test.ts +++ b/packages/theme/src/cli/commands/theme/push.test.ts @@ -34,8 +34,8 @@ describe('Push', () => { vi.mocked(removeDevelopmentTheme).mockImplementation(() => undefined) }) - describe('run with CLI 3 implementation', () => { - test('should run the CLI 2 implementation if the password flag is provided', async () => { + describe('run with TS implementation', () => { + test('should run the Ruby implementation if the password flag is provided', async () => { // Given const theme = buildTheme({id: 1, name: 'Theme', role: 'development'})! vi.spyOn(DevelopmentThemeManager.prototype, 'fetch').mockResolvedValue(theme) @@ -185,8 +185,8 @@ describe('Push', () => { }) }) - describe('run with CLI 2 implementation', () => { - test('should pass development theme from local storage to CLI 2', async () => { + describe('run with Ruby implementation', () => { + test('should pass development theme from local storage to Ruby implementation', async () => { // Given const theme = buildTheme({id: 1, name: 'Theme', role: 'development'})! vi.spyOn(DevelopmentThemeManager.prototype, 'findOrCreate').mockResolvedValue(theme) @@ -196,10 +196,10 @@ describe('Push', () => { // Then expect(DevelopmentThemeManager.prototype.findOrCreate).not.toHaveBeenCalled() expect(DevelopmentThemeManager.prototype.fetch).toHaveBeenCalledOnce() - expectCLI2ToHaveBeenCalledWith(`theme push ${path} --stable --development-theme-id ${theme.id}`) + expectCLI2ToHaveBeenCalledWith(`theme push ${path} --development-theme-id ${theme.id}`) }) - test('should pass theme and development theme from local storage to CLI 2', async () => { + test('should pass theme and development theme from local storage to Ruby implementation', async () => { // Given const themeId = 2 const theme = buildTheme({id: 3, name: 'Theme', role: 'development'})! @@ -208,22 +208,20 @@ describe('Push', () => { await run([`--theme=${themeId}`]) // Then - expectCLI2ToHaveBeenCalledWith( - `theme push ${path} --theme ${themeId} --stable --development-theme-id ${theme.id}`, - ) + expectCLI2ToHaveBeenCalledWith(`theme push ${path} --theme ${themeId} --development-theme-id ${theme.id}`) }) - test('should not pass development theme to CLI 2 if local storage is empty', async () => { + test('should not pass development theme to Ruby implementation if local storage is empty', async () => { // When await run([]) // Then expect(DevelopmentThemeManager.prototype.findOrCreate).not.toHaveBeenCalled() expect(DevelopmentThemeManager.prototype.fetch).toHaveBeenCalledOnce() - expectCLI2ToHaveBeenCalledWith(`theme push ${path} --stable`) + expectCLI2ToHaveBeenCalledWith(`theme push ${path}`) }) - test('should pass theme and development theme to CLI 2', async () => { + test('should pass theme and development theme to Ruby implementation', async () => { // Given const theme = buildTheme({id: 4, name: 'Theme', role: 'development'})! vi.spyOn(DevelopmentThemeManager.prototype, 'findOrCreate').mockResolvedValue(theme) @@ -233,14 +231,12 @@ describe('Push', () => { // Then expect(DevelopmentThemeManager.prototype.findOrCreate).toHaveBeenCalledOnce() expect(DevelopmentThemeManager.prototype.fetch).not.toHaveBeenCalled() - expectCLI2ToHaveBeenCalledWith( - `theme push ${path} --stable --theme ${theme.id} --development-theme-id ${theme.id}`, - ) + expectCLI2ToHaveBeenCalledWith(`theme push ${path} --theme ${theme.id} --development-theme-id ${theme.id}`) }) }) async function run(argv: string[]) { - await runPushCommand(['--stable', ...argv], path, adminSession) + await runPushCommand(['--legacy', ...argv], path, adminSession) } function expectCLI2ToHaveBeenCalledWith(command: string) { diff --git a/packages/theme/src/cli/commands/theme/push.ts b/packages/theme/src/cli/commands/theme/push.ts index 141ef7cba88..7bd34ce9cd2 100644 --- a/packages/theme/src/cli/commands/theme/push.ts +++ b/packages/theme/src/cli/commands/theme/push.ts @@ -109,11 +109,10 @@ export default class Push extends ThemeCommand { description: 'Publish as the live theme after uploading.', env: 'SHOPIFY_FLAG_PUBLISH', }), - stable: Flags.boolean({ + legacy: Flags.boolean({ hidden: true, - description: - 'Performs the upload by relying in the legacy upload approach (slower, but it might be more stable in some scenarios)', - env: 'SHOPIFY_FLAG_STABLE', + description: 'Use the legacy Ruby implementation for the `shopify theme push` command.', + env: 'SHOPIFY_FLAG_LEGACY', }), force: Flags.boolean({ hidden: true, @@ -121,11 +120,6 @@ export default class Push extends ThemeCommand { description: 'Proceed without confirmation, if current directory does not seem to be theme directory.', env: 'SHOPIFY_FLAG_FORCE', }), - 'dev-preview': Flags.boolean({ - hidden: true, - description: 'Enables the developer preview for the upcoming `theme push` implementation.', - env: 'SHOPIFY_FLAG_BETA', - }), } static cli2Flags = [ @@ -139,7 +133,6 @@ export default class Push extends ThemeCommand { 'json', 'allow-live', 'publish', - 'stable', 'force', 'development-theme-id', ] @@ -155,7 +148,7 @@ export default class Push extends ThemeCommand { return } - if (flags['dev-preview'] || (!flags.stable && !flags.password)) { + if (!flags.legacy && !flags.password) { const {path, nodelete, publish, json, force, ignore, only} = flags const selectedTheme: Theme | undefined = await createOrSelectTheme(adminSession, flags) diff --git a/packages/theme/src/cli/services/dev.test.ts b/packages/theme/src/cli/services/dev.test.ts index 6230ce70645..9d6af96b010 100644 --- a/packages/theme/src/cli/services/dev.test.ts +++ b/packages/theme/src/cli/services/dev.test.ts @@ -36,7 +36,7 @@ describe('dev', () => { flagsToPass: [], password: 'my-token', 'theme-editor-sync': false, - 'dev-preview': false, + legacy: true, 'live-reload': 'hot-reload', noDelete: false, ignore: [], @@ -56,8 +56,8 @@ describe('dev', () => { const localThemeExtensionFileSystem = emptyThemeExtFileSystem() const localThemeFileSystem = fakeThemeFileSystem('tmp', new Map()) - describe('Dev-Preview Implementation', async () => { - test('calls startDevServer with the correct arguments when the `dev-preview` option is provided', async () => { + describe('TS implementation', async () => { + test('calls startDevServer with the correct arguments when the `legacy` option is false', async () => { // Given vi.mocked(initializeDevServerSession).mockResolvedValue(session) vi.mocked(isStorefrontPasswordProtected).mockResolvedValue(true) @@ -72,7 +72,7 @@ describe('dev', () => { serverStart: async () => ({close: async () => {}}), }) - const devOptions = {...options, storePassword: 'wrong-password', 'dev-preview': true, 'theme-editor-sync': true} + const devOptions = {...options, storePassword: 'wrong-password', legacy: false, 'theme-editor-sync': true} // When await dev(devOptions) @@ -97,7 +97,7 @@ describe('dev', () => { }) }) - describe('execCLI2', async () => { + describe('Ruby implementation', async () => { test('runs theme serve on CLI2 without passing a token when no password is used', async () => { // Given const devOptions = {...options, password: undefined} diff --git a/packages/theme/src/cli/services/dev.ts b/packages/theme/src/cli/services/dev.ts index b6d9545f90d..13cf4b6703c 100644 --- a/packages/theme/src/cli/services/dev.ts +++ b/packages/theme/src/cli/services/dev.ts @@ -6,7 +6,7 @@ import {isStorefrontPasswordProtected} from '../utilities/theme-environment/stor import {ensureValidPassword} from '../utilities/theme-environment/storefront-password-prompt.js' import {emptyThemeExtFileSystem} from '../utilities/theme-fs-empty.js' import {initializeDevServerSession} from '../utilities/theme-environment/dev-server-session.js' -import {renderSuccess, renderWarning} from '@shopify/cli-kit/node/ui' +import {renderInfo, renderSuccess, renderWarning} from '@shopify/cli-kit/node/ui' import {AdminSession, ensureAuthenticatedStorefront, ensureAuthenticatedThemes} from '@shopify/cli-kit/node/session' import {execCLI2} from '@shopify/cli-kit/node/ruby' import {outputDebug} from '@shopify/cli-kit/node/output' @@ -35,7 +35,7 @@ export interface DevOptions { port?: string force: boolean flagsToPass: string[] - 'dev-preview': boolean + legacy: boolean 'theme-editor-sync': boolean 'live-reload': LiveReload noDelete: boolean @@ -45,11 +45,13 @@ export interface DevOptions { } export async function dev(options: DevOptions) { - if (!options['dev-preview']) { + if (options.legacy) { await legacyDev(options) return } + showNewVersionInfo() + if (!(await hasRequiredThemeDirectories(options.directory)) && !(await currentDirectoryConfirmed(options.force))) { return } @@ -226,3 +228,10 @@ export async function refreshTokens(store: string, password: string | undefined, return {adminSession, storefrontToken} } + +function showNewVersionInfo() { + renderInfo({ + headline: [`You're using the new version of`, {command: 'shopify theme dev'}, {char: '.'}], + body: ['Run', {command: 'shopify theme dev --legacy'}, 'to switch back to the previous version.'], + }) +}