From f24d8833c231ea4212c0e93c3a701e96e0919b34 Mon Sep 17 00:00:00 2001 From: Jeffrey Guenther Date: Tue, 2 Apr 2024 14:30:20 -0700 Subject: [PATCH] chore: format and fix emoticons --- README.md | 13 +- docs/the_complete_guide.md | 44 +-- oclif.manifest.json | 576 ++++++++++++++++++------------------- 3 files changed, 317 insertions(+), 316 deletions(-) diff --git a/README.md b/README.md index 61abaa4..fd21269 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,9 @@ Or if your theme has a `package.json`: npm add --save-dev @thebeyondgroup/shopkeeper ``` > :rotating_light: It is not currently possible to use Shopkeeper as a plugin -> to the homebrew installation of the Shopify CLI. To use it, you need to -> install it as a global npm package and use the `shopkeeper` executable. +> to the homebrew installation of the Shopify CLI. To use it alongside this +> version of the CLI, you need to install it as a global npm package and use +> the `shopkeeper` executable. ### tl;dr @@ -48,8 +49,8 @@ To deploy _directly_ to the live theme after pulling down the live theme's setti shopkeeper theme deploy --strategy basic ``` -For a more complete introduction and walkthrough of how to use Shopkeeper, see -[guide](/docs/the_complete_guide.md). +Read [The Complete Guide](/docs/the_complete_guide.md) for an introduction and +walkthrough of how to use Shopkeeper. ## Commands @@ -83,7 +84,7 @@ It uses a `.shopkeeper` folder at the root of your project to store buckets of s > > Therefore, we call our groups of settings buckets. :bucket: -In multi-store, multi-region setups, you might have a directory for +In multi-store, multi-region setups, you might have a bucket for each region. Say `canada`, `united-states`, or `united-kingdom`. Or you might use a bucket to contains the settings for an A/B test. @@ -124,7 +125,7 @@ installation of [Dawn](https://github.com/shopify/dawn): └── .current-bucket ``` -Each folder contains theme settings stored in their corresponding `config`, +Each bucket contains theme settings stored in their corresponding `config`, `sections`, and `templates` folders. It also contains a `.env` file that's copied to the project root as `.env ` when the bucket is switched. diff --git a/docs/the_complete_guide.md b/docs/the_complete_guide.md index a068ade..7ec4e9d 100644 --- a/docs/the_complete_guide.md +++ b/docs/the_complete_guide.md @@ -10,20 +10,20 @@ expects a single usage of a theme to be represented by a single repo. It will automatically open PRs as customizations are made and there is no way to separate a theme's data from its files. -We want to use a single theme and repo for all three expansion stores to -reduce development effort. We only want a store's settings to differ. We also -want a development workflow that parallels something you might use when doing -custom full-stack web development. We want to open PRs for changes, have -preview environments created and updated automatically with each commit pushed, -and for preview environments to be cleaned up once PRs are merged. +We want to use a single theme and repo for all three expansion stores to reduce +development effort. We only want a store's settings to differ. We also want a +development workflow that parallels something you might use when doing custom +full-stack web development. We want to open PRs for changes, have preview +environments created and updated automatically with each commit pushed, and for +preview environments to be cleaned up once PRs are merged. The [Shopify CLI](https://shopify.dev/docs/themes/tools/cli/) provides a wonderful set of primitive commands to interact with a single store and a single theme. With this foundation, we can build a workflow and more sophisticated commands to solve the problem we have just described. -We decided to use GitHub Actions for CI/CD and to build Shopkeeper to encapsulate -the common operations the workflow above would require. +We decided to use GitHub Actions for CI/CD and to build Shopkeeper to +encapsulate the common operations the workflow above would require. The first step to build this workflow is to establish a way to manage theme settings. Theme settings are important because they are the data that defines @@ -191,10 +191,10 @@ Shopkeeper supports multiple deployment strategies: By default, Shopkeeper assumes you want to use a [blue/green deployment strategy](https://en.wikipedia.org/wiki/Blue–green_deployment). A blue/green -deployment strategy in the context of Shopify theme development -means alternating between a blue and a green theme. One theme is live and the -other we refer to as on-deck. For example, using this approach, if the blue -:large_blue_circle: theme is live, the green :green_circle: theme is on-deck. +deployment strategy in the context of Shopify theme development means +alternating between a blue and a green theme. One theme is live and the other +we refer to as on-deck. For example, using this approach, if the blue :large_blue_circle: +theme is live, the green :green_circle: theme is on-deck. When updates are to be made to a storefront, the on-deck receives the changes and when it is ready, it is published. @@ -474,16 +474,16 @@ jobs: **Preview:** [Storefront](https://${{ vars.SHOPIFY_FLAG_STORE }}?preview_theme_id=${{ env.THEME_ID }}) | [Admin](https://${{ vars.SHOPIFY_FLAG_STORE }}/admin/themes/${{ env.THEME_ID }}/editor) delete_prev_regex_msg: "Preview:" # OPTIONAL ``` -To generate a preview theme, we listen to pushes on any branch other than `main` -and ones starting with `github-action/`. Branches starting with `github-action/` -are used for settings commits. We restore the theme settings from our -`production` bucket, build the theme, and push it to Shopify. - -> :warning: We use a special `theme create` command that's provided by Shopkeeper that ensures theme -> creation is idempotent. You can't guarantee the order your workflows will run, -> so we need to make sure that an update is created no matter if it already -> exists.`theme push --unpublished` is not idempotent and will add many themes of -> the same name, so it cannot be used. +To generate a preview theme, we listen to pushes on any branch other than +`main` and ones starting with `github-action/`. Branches starting with +`github-action/` are used for settings commits. We restore the theme settings +from our `production` bucket, build the theme, and push it to Shopify. + +> :warning: We use a special `theme create` command that's provided by +> Shopkeeper that ensures theme creation is idempotent. You can't guarantee the +> order your workflows will run, so we need to make sure that an update is +> created no matter if it already exists.`theme push --unpublished` is not +> idempotent and will add many themes of the same name, so it cannot be used. When a PR is opened, we generate a comment on the PR with a link to the preview theme on Shopify. diff --git a/oclif.manifest.json b/oclif.manifest.json index c12ed0f..fca0124 100644 --- a/oclif.manifest.json +++ b/oclif.manifest.json @@ -1,9 +1,9 @@ { "commands": { - "bucket:create": { + "theme:create": { "aliases": [], "args": {}, - "description": "Create a bucket in .shopkeeper", + "description": "Create a theme with theme name or ID.\nIn most cases, you should use theme push.\n\nThis command exists for the case when you want create a theme by name that may\nor may not exist. It will ensure that if one with the same name already exists,\nit is updated.\n\ntheme push --unpublished --theme yellow will create a new theme named yellow each\ntime the command is run.\n\nAs a result this command exists.\n", "flags": { "no-color": { "description": "Disable color output.", @@ -21,35 +21,94 @@ "allowNo": false, "type": "boolean" }, - "bucket": { - "char": "b", - "env": "SKR_FLAG_BUCKET", - "name": "bucket", + "path": { + "description": "The path to your theme directory.", + "env": "SHOPIFY_FLAG_PATH", + "name": "path", + "noCacheDefault": true, + "hasDynamicHelp": false, + "multiple": false, + "type": "option" + }, + "password": { + "description": "Password generated from the Theme Access app.", + "env": "SHOPIFY_CLI_THEME_TOKEN", + "name": "password", + "hasDynamicHelp": false, + "multiple": false, + "type": "option" + }, + "store": { + "char": "s", + "description": "Store URL. It can be the store prefix (johns-apparel) or the full myshopify.com URL (johns-apparel.myshopify.com, https://johns-apparel.myshopify.com).", + "env": "SHOPIFY_FLAG_STORE", + "name": "store", + "hasDynamicHelp": false, + "multiple": false, + "type": "option" + }, + "environment": { + "char": "e", + "description": "The environment to apply to the current command.", + "env": "SHOPIFY_FLAG_ENVIRONMENT", + "name": "environment", + "hasDynamicHelp": false, + "multiple": false, + "type": "option" + }, + "theme": { + "char": "t", + "description": "Theme ID or name of the remote theme.", + "env": "SHOPIFY_FLAG_THEME_ID", + "name": "theme", "required": true, "hasDynamicHelp": false, - "multiple": true, + "multiple": false, "type": "option" + }, + "nodelete": { + "char": "n", + "description": "Runs the push command without deleting local files.", + "env": "SHOPIFY_FLAG_NODELETE", + "name": "nodelete", + "allowNo": false, + "type": "boolean" + }, + "json": { + "char": "j", + "description": "Output JSON instead of a UI.", + "env": "SHOPIFY_FLAG_JSON", + "name": "json", + "allowNo": false, + "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], - "id": "bucket:create", + "id": "theme:create", "pluginAlias": "@thebeyondgroup/shopkeeper", "pluginName": "@thebeyondgroup/shopkeeper", "pluginType": "core", "strict": true, + "summary": "Create a theme with a name or ID. Update theme if one with name already exists", + "cli2Flags": [ + "theme", + "nodelete", + "json", + "unpublished" + ], "isESM": true, "relativePath": [ "dist", "commands", - "bucket", + "theme", "create.js" ] }, - "bucket:current": { + "theme:deploy": { "aliases": [], "args": {}, - "description": "Output the current bucket", + "description": "Deploy theme source to store", "flags": { "no-color": { "description": "Disable color output.", @@ -66,27 +125,122 @@ "name": "verbose", "allowNo": false, "type": "boolean" + }, + "path": { + "description": "The path to your theme directory.", + "env": "SHOPIFY_FLAG_PATH", + "name": "path", + "noCacheDefault": true, + "hasDynamicHelp": false, + "multiple": false, + "type": "option" + }, + "password": { + "description": "Password generated from the Theme Access app.", + "env": "SHOPIFY_CLI_THEME_TOKEN", + "name": "password", + "hasDynamicHelp": false, + "multiple": false, + "type": "option" + }, + "store": { + "char": "s", + "description": "Store URL. It can be the store prefix (johns-apparel) or the full myshopify.com URL (johns-apparel.myshopify.com, https://johns-apparel.myshopify.com).", + "env": "SHOPIFY_FLAG_STORE", + "name": "store", + "hasDynamicHelp": false, + "multiple": false, + "type": "option" + }, + "environment": { + "char": "e", + "description": "The environment to apply to the current command.", + "env": "SHOPIFY_FLAG_ENVIRONMENT", + "name": "environment", + "hasDynamicHelp": false, + "multiple": false, + "type": "option" + }, + "nodelete": { + "char": "n", + "description": "Runs the push command without deleting local files.", + "env": "SHOPIFY_FLAG_NODELETE", + "name": "nodelete", + "allowNo": false, + "type": "boolean" + }, + "publish": { + "description": "Publishes the on-deck theme after deploying", + "env": "SKR_FLAG_PUBLISH", + "name": "publish", + "allowNo": false, + "type": "boolean" + }, + "green": { + "description": "Green theme ID", + "env": "SKR_FLAG_GREEN_THEME_ID", + "name": "green", + "hasDynamicHelp": false, + "multiple": false, + "type": "option" + }, + "blue": { + "description": "Blue theme ID", + "env": "SKR_FLAG_BLUE_THEME_ID", + "name": "blue", + "hasDynamicHelp": false, + "multiple": false, + "type": "option" + }, + "strategy": { + "description": "Strategy to use for deployment", + "env": "SKR_FLAG_STRATEGY", + "name": "strategy", + "relationships": [ + { + "type": "all", + "flags": [ + { + "name": "blue" + }, + { + "name": "green" + } + ] + } + ], + "default": "blue-green", + "hasDynamicHelp": false, + "multiple": false, + "options": [ + "blue-green", + "basic" + ], + "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], - "id": "bucket:current", + "id": "theme:deploy", "pluginAlias": "@thebeyondgroup/shopkeeper", "pluginName": "@thebeyondgroup/shopkeeper", "pluginType": "core", "strict": true, + "cli2Flags": [ + "nodelete" + ], "isESM": true, "relativePath": [ "dist", "commands", - "bucket", - "current.js" + "theme", + "deploy.js" ] }, - "bucket:delete": { + "theme:get": { "aliases": [], "args": {}, - "description": "Delete a bucket", + "description": "Get details of theme", "flags": { "no-color": { "description": "Disable color output.", @@ -104,27 +258,45 @@ "allowNo": false, "type": "boolean" }, - "bucket": { - "char": "b", - "env": "SKR_FLAG_BUCKET", - "name": "bucket", + "store": { + "char": "s", + "description": "Store URL. It can be the store prefix (johns-apparel) or the full myshopify.com URL (johns-apparel.myshopify.com, https://johns-apparel.myshopify.com).", + "env": "SHOPIFY_FLAG_STORE", + "name": "store", + "hasDynamicHelp": false, + "multiple": false, + "type": "option" + }, + "password": { + "description": "Password generated from the Theme Access app.", + "env": "SHOPIFY_CLI_THEME_TOKEN", + "name": "password", + "hasDynamicHelp": false, + "multiple": false, + "type": "option" + }, + "theme": { + "char": "t", + "description": "Theme ID or name of the remote theme.", + "env": "SHOPIFY_FLAG_THEME_ID", + "name": "theme", "required": true, "hasDynamicHelp": false, - "multiple": true, + "multiple": false, "type": "option" }, - "force": { - "char": "f", - "description": "Skip confirmation.", - "env": "SHOPIFY_FLAG_FORCE", - "name": "force", + "json": { + "char": "j", + "description": "Output JSON instead of a UI.", + "env": "SHOPIFY_FLAG_JSON", + "name": "json", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], - "id": "bucket:delete", + "id": "theme:get", "pluginAlias": "@thebeyondgroup/shopkeeper", "pluginName": "@thebeyondgroup/shopkeeper", "pluginType": "core", @@ -133,14 +305,14 @@ "relativePath": [ "dist", "commands", - "bucket", - "delete.js" + "theme", + "get.js" ] }, - "bucket:init": { + "bucket:create": { "aliases": [], "args": {}, - "description": "Initialize .shopkeeper directory in the current directory", + "description": "Create a bucket in .shopkeeper", "flags": { "no-color": { "description": "Disable color output.", @@ -162,6 +334,7 @@ "char": "b", "env": "SKR_FLAG_BUCKET", "name": "bucket", + "required": true, "hasDynamicHelp": false, "multiple": true, "type": "option" @@ -169,7 +342,7 @@ }, "hasDynamicHelp": false, "hiddenAliases": [], - "id": "bucket:init", + "id": "bucket:create", "pluginAlias": "@thebeyondgroup/shopkeeper", "pluginName": "@thebeyondgroup/shopkeeper", "pluginType": "core", @@ -179,13 +352,13 @@ "dist", "commands", "bucket", - "init.js" + "create.js" ] }, - "bucket:list": { + "bucket:current": { "aliases": [], "args": {}, - "description": "List buckets", + "description": "Output the current bucket", "flags": { "no-color": { "description": "Disable color output.", @@ -206,7 +379,7 @@ }, "hasDynamicHelp": false, "hiddenAliases": [], - "id": "bucket:list", + "id": "bucket:current", "pluginAlias": "@thebeyondgroup/shopkeeper", "pluginName": "@thebeyondgroup/shopkeeper", "pluginType": "core", @@ -216,13 +389,13 @@ "dist", "commands", "bucket", - "list.js" + "current.js" ] }, - "bucket:restore": { + "bucket:delete": { "aliases": [], "args": {}, - "description": "Restores the theme settings from the specified bucket", + "description": "Delete a bucket", "flags": { "no-color": { "description": "Disable color output.", @@ -240,43 +413,27 @@ "allowNo": false, "type": "boolean" }, - "path": { - "description": "The path to your theme directory.", - "env": "SHOPIFY_FLAG_PATH", - "name": "path", - "noCacheDefault": true, - "hasDynamicHelp": false, - "multiple": false, - "type": "option" - }, - "environment": { - "char": "e", - "description": "The environment to apply to the current command.", - "env": "SHOPIFY_FLAG_ENVIRONMENT", - "name": "environment", - "hasDynamicHelp": false, - "multiple": false, - "type": "option" - }, "bucket": { - "description": "The bucket you want to restore your settings from.", + "char": "b", + "env": "SKR_FLAG_BUCKET", "name": "bucket", + "required": true, "hasDynamicHelp": false, - "multiple": false, + "multiple": true, "type": "option" }, - "nodelete": { - "char": "n", - "description": "Runs the restore command without removing the theme's JSON settings.", - "env": "SHOPIFY_FLAG_NODELETE", - "name": "nodelete", + "force": { + "char": "f", + "description": "Skip confirmation.", + "env": "SHOPIFY_FLAG_FORCE", + "name": "force", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], - "id": "bucket:restore", + "id": "bucket:delete", "pluginAlias": "@thebeyondgroup/shopkeeper", "pluginName": "@thebeyondgroup/shopkeeper", "pluginType": "core", @@ -286,13 +443,13 @@ "dist", "commands", "bucket", - "restore.js" + "delete.js" ] }, - "bucket:save": { + "bucket:init": { "aliases": [], "args": {}, - "description": "Saves the current theme settings to the specified bucket", + "description": "Initialize .shopkeeper directory in the current directory", "flags": { "no-color": { "description": "Disable color output.", @@ -300,53 +457,28 @@ "hidden": false, "name": "no-color", "allowNo": false, - "type": "boolean" - }, - "verbose": { - "description": "Increase the verbosity of the logs.", - "env": "SHOPIFY_FLAG_VERBOSE", - "hidden": false, - "name": "verbose", - "allowNo": false, - "type": "boolean" - }, - "path": { - "description": "The path to your theme directory.", - "env": "SHOPIFY_FLAG_PATH", - "name": "path", - "noCacheDefault": true, - "hasDynamicHelp": false, - "multiple": false, - "type": "option" - }, - "environment": { - "char": "e", - "description": "The environment to apply to the current command.", - "env": "SHOPIFY_FLAG_ENVIRONMENT", - "name": "environment", - "hasDynamicHelp": false, - "multiple": false, - "type": "option" + "type": "boolean" + }, + "verbose": { + "description": "Increase the verbosity of the logs.", + "env": "SHOPIFY_FLAG_VERBOSE", + "hidden": false, + "name": "verbose", + "allowNo": false, + "type": "boolean" }, "bucket": { - "description": "The bucket where you want to save your settings.", + "char": "b", + "env": "SKR_FLAG_BUCKET", "name": "bucket", "hasDynamicHelp": false, - "multiple": false, + "multiple": true, "type": "option" - }, - "nodelete": { - "char": "n", - "description": "Runs the save command without deleting the bucket's contents.", - "env": "SHOPIFY_FLAG_NODELETE", - "name": "nodelete", - "allowNo": false, - "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], - "id": "bucket:save", + "id": "bucket:init", "pluginAlias": "@thebeyondgroup/shopkeeper", "pluginName": "@thebeyondgroup/shopkeeper", "pluginType": "core", @@ -356,13 +488,13 @@ "dist", "commands", "bucket", - "save.js" + "init.js" ] }, - "bucket:switch": { + "bucket:list": { "aliases": [], "args": {}, - "description": "Switches the current bucket by copying settings and .env", + "description": "List buckets", "flags": { "no-color": { "description": "Disable color output.", @@ -379,44 +511,11 @@ "name": "verbose", "allowNo": false, "type": "boolean" - }, - "path": { - "description": "The path to your theme directory.", - "env": "SHOPIFY_FLAG_PATH", - "name": "path", - "noCacheDefault": true, - "hasDynamicHelp": false, - "multiple": false, - "type": "option" - }, - "environment": { - "char": "e", - "description": "The environment to apply to the current command.", - "env": "SHOPIFY_FLAG_ENVIRONMENT", - "name": "environment", - "hasDynamicHelp": false, - "multiple": false, - "type": "option" - }, - "bucket": { - "description": "The bucket to switch to", - "name": "bucket", - "hasDynamicHelp": false, - "multiple": false, - "type": "option" - }, - "nodelete": { - "char": "n", - "description": "Runs the restore command without removing the theme's JSON settings.", - "env": "SHOPIFY_FLAG_NODELETE", - "name": "nodelete", - "allowNo": false, - "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], - "id": "bucket:switch", + "id": "bucket:list", "pluginAlias": "@thebeyondgroup/shopkeeper", "pluginName": "@thebeyondgroup/shopkeeper", "pluginType": "core", @@ -426,13 +525,13 @@ "dist", "commands", "bucket", - "switch.js" + "list.js" ] }, - "theme:create": { + "bucket:restore": { "aliases": [], "args": {}, - "description": "Create a theme with theme name or ID.\nIn most cases, you should use theme push.\n\nThis command exists for the case when you want create a theme by name that may\nor may not exist. It will ensure that if one with the same name already exists,\nit is updated.\n\ntheme push --unpublished --theme yellow will create a new theme named yellow each\ntime the command is run.\n\nAs a result this command exists.\n", + "description": "Restores the theme settings from the specified bucket", "flags": { "no-color": { "description": "Disable color output.", @@ -459,23 +558,6 @@ "multiple": false, "type": "option" }, - "password": { - "description": "Password generated from the Theme Access app.", - "env": "SHOPIFY_CLI_THEME_TOKEN", - "name": "password", - "hasDynamicHelp": false, - "multiple": false, - "type": "option" - }, - "store": { - "char": "s", - "description": "Store URL. It can be the store prefix (johns-apparel) or the full myshopify.com URL (johns-apparel.myshopify.com, https://johns-apparel.myshopify.com).", - "env": "SHOPIFY_FLAG_STORE", - "name": "store", - "hasDynamicHelp": false, - "multiple": false, - "type": "option" - }, "environment": { "char": "e", "description": "The environment to apply to the current command.", @@ -485,59 +567,41 @@ "multiple": false, "type": "option" }, - "theme": { - "char": "t", - "description": "Theme ID or name of the remote theme.", - "env": "SHOPIFY_FLAG_THEME_ID", - "name": "theme", - "required": true, + "bucket": { + "description": "The bucket you want to restore your settings from.", + "name": "bucket", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "nodelete": { "char": "n", - "description": "Runs the push command without deleting local files.", + "description": "Runs the restore command without removing the theme's JSON settings.", "env": "SHOPIFY_FLAG_NODELETE", "name": "nodelete", "allowNo": false, "type": "boolean" - }, - "json": { - "char": "j", - "description": "Output JSON instead of a UI.", - "env": "SHOPIFY_FLAG_JSON", - "name": "json", - "allowNo": false, - "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], - "id": "theme:create", + "id": "bucket:restore", "pluginAlias": "@thebeyondgroup/shopkeeper", "pluginName": "@thebeyondgroup/shopkeeper", "pluginType": "core", "strict": true, - "summary": "Create a theme with a name or ID. Update theme if one with name already exists", - "cli2Flags": [ - "theme", - "nodelete", - "json", - "unpublished" - ], "isESM": true, "relativePath": [ "dist", "commands", - "theme", - "create.js" + "bucket", + "restore.js" ] }, - "theme:deploy": { + "bucket:save": { "aliases": [], "args": {}, - "description": "Deploy theme source to store", + "description": "Saves the current theme settings to the specified bucket", "flags": { "no-color": { "description": "Disable color output.", @@ -564,23 +628,6 @@ "multiple": false, "type": "option" }, - "password": { - "description": "Password generated from the Theme Access app.", - "env": "SHOPIFY_CLI_THEME_TOKEN", - "name": "password", - "hasDynamicHelp": false, - "multiple": false, - "type": "option" - }, - "store": { - "char": "s", - "description": "Store URL. It can be the store prefix (johns-apparel) or the full myshopify.com URL (johns-apparel.myshopify.com, https://johns-apparel.myshopify.com).", - "env": "SHOPIFY_FLAG_STORE", - "name": "store", - "hasDynamicHelp": false, - "multiple": false, - "type": "option" - }, "environment": { "char": "e", "description": "The environment to apply to the current command.", @@ -590,86 +637,41 @@ "multiple": false, "type": "option" }, + "bucket": { + "description": "The bucket where you want to save your settings.", + "name": "bucket", + "hasDynamicHelp": false, + "multiple": false, + "type": "option" + }, "nodelete": { "char": "n", - "description": "Runs the push command without deleting local files.", + "description": "Runs the save command without deleting the bucket's contents.", "env": "SHOPIFY_FLAG_NODELETE", "name": "nodelete", "allowNo": false, "type": "boolean" - }, - "publish": { - "description": "Publishes the on-deck theme after deploying", - "env": "SKR_FLAG_PUBLISH", - "name": "publish", - "allowNo": false, - "type": "boolean" - }, - "green": { - "description": "Green theme ID", - "env": "SKR_FLAG_GREEN_THEME_ID", - "name": "green", - "hasDynamicHelp": false, - "multiple": false, - "type": "option" - }, - "blue": { - "description": "Blue theme ID", - "env": "SKR_FLAG_BLUE_THEME_ID", - "name": "blue", - "hasDynamicHelp": false, - "multiple": false, - "type": "option" - }, - "strategy": { - "description": "Strategy to use for deployment", - "env": "SKR_FLAG_STRATEGY", - "name": "strategy", - "relationships": [ - { - "type": "all", - "flags": [ - { - "name": "blue" - }, - { - "name": "green" - } - ] - } - ], - "default": "blue-green", - "hasDynamicHelp": false, - "multiple": false, - "options": [ - "blue-green", - "basic" - ], - "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], - "id": "theme:deploy", + "id": "bucket:save", "pluginAlias": "@thebeyondgroup/shopkeeper", "pluginName": "@thebeyondgroup/shopkeeper", "pluginType": "core", "strict": true, - "cli2Flags": [ - "nodelete" - ], "isESM": true, "relativePath": [ "dist", "commands", - "theme", - "deploy.js" + "bucket", + "save.js" ] }, - "theme:get": { + "bucket:switch": { "aliases": [], "args": {}, - "description": "Get details of theme", + "description": "Switches the current bucket by copying settings and .env", "flags": { "no-color": { "description": "Disable color output.", @@ -687,45 +689,43 @@ "allowNo": false, "type": "boolean" }, - "store": { - "char": "s", - "description": "Store URL. It can be the store prefix (johns-apparel) or the full myshopify.com URL (johns-apparel.myshopify.com, https://johns-apparel.myshopify.com).", - "env": "SHOPIFY_FLAG_STORE", - "name": "store", + "path": { + "description": "The path to your theme directory.", + "env": "SHOPIFY_FLAG_PATH", + "name": "path", + "noCacheDefault": true, "hasDynamicHelp": false, "multiple": false, "type": "option" }, - "password": { - "description": "Password generated from the Theme Access app.", - "env": "SHOPIFY_CLI_THEME_TOKEN", - "name": "password", + "environment": { + "char": "e", + "description": "The environment to apply to the current command.", + "env": "SHOPIFY_FLAG_ENVIRONMENT", + "name": "environment", "hasDynamicHelp": false, "multiple": false, "type": "option" }, - "theme": { - "char": "t", - "description": "Theme ID or name of the remote theme.", - "env": "SHOPIFY_FLAG_THEME_ID", - "name": "theme", - "required": true, + "bucket": { + "description": "The bucket to switch to", + "name": "bucket", "hasDynamicHelp": false, "multiple": false, "type": "option" }, - "json": { - "char": "j", - "description": "Output JSON instead of a UI.", - "env": "SHOPIFY_FLAG_JSON", - "name": "json", + "nodelete": { + "char": "n", + "description": "Runs the restore command without removing the theme's JSON settings.", + "env": "SHOPIFY_FLAG_NODELETE", + "name": "nodelete", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], - "id": "theme:get", + "id": "bucket:switch", "pluginAlias": "@thebeyondgroup/shopkeeper", "pluginName": "@thebeyondgroup/shopkeeper", "pluginType": "core", @@ -734,8 +734,8 @@ "relativePath": [ "dist", "commands", - "theme", - "get.js" + "bucket", + "switch.js" ] }, "theme:settings:download": {