shopify-cli 1.14.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +1 -1
  3. data/.github/CONTRIBUTING.md +7 -7
  4. data/.github/DESIGN.md +3 -3
  5. data/.github/workflows/build.yml +1 -1
  6. data/.gitignore +3 -0
  7. data/.rubocop.yml +3 -1
  8. data/.ruby-version +1 -1
  9. data/CHANGELOG.md +35 -29
  10. data/Gemfile +4 -0
  11. data/Gemfile.lock +32 -0
  12. data/LICENSE +4 -1
  13. data/README.md +92 -26
  14. data/RELEASING.md +29 -7
  15. data/Rakefile +2 -2
  16. data/SECURITY.md +1 -1
  17. data/bin/load_shopify.rb +1 -1
  18. data/bin/shopify +3 -3
  19. data/dev.yml +1 -1
  20. data/docs/app/node/index.md +1 -1
  21. data/docs/app/rails/index.md +1 -1
  22. data/docs/core/index.md +1 -1
  23. data/docs/getting-started/index.md +1 -1
  24. data/docs/getting-started/install/index.md +1 -1
  25. data/docs/getting-started/migrate/index.md +1 -1
  26. data/docs/getting-started/uninstall/index.md +1 -1
  27. data/docs/getting-started/upgrade/index.md +1 -1
  28. data/docs/help/start-app/index.md +1 -1
  29. data/docs/index.md +1 -1
  30. data/ext/shopify-cli/extconf.rb +17 -5
  31. data/install.sh +1 -1
  32. data/lib/docgen/index_template.md.erb +2 -2
  33. data/lib/graphql/all_orgs_with_extensions.graphql +37 -0
  34. data/lib/graphql/find_organization.graphql +2 -1
  35. data/lib/project_types/extension/cli.rb +18 -15
  36. data/lib/project_types/extension/commands/build.rb +4 -5
  37. data/lib/project_types/extension/commands/connect.rb +35 -0
  38. data/lib/project_types/extension/commands/create.rb +12 -16
  39. data/lib/project_types/extension/commands/extension_command.rb +2 -2
  40. data/lib/project_types/extension/commands/info.rb +86 -0
  41. data/lib/project_types/extension/commands/push.rb +8 -7
  42. data/lib/project_types/extension/commands/register.rb +4 -5
  43. data/lib/project_types/extension/commands/serve.rb +5 -8
  44. data/lib/project_types/extension/commands/tunnel.rb +3 -1
  45. data/lib/project_types/extension/errors.rb +9 -0
  46. data/lib/project_types/extension/extension_project.rb +5 -0
  47. data/lib/project_types/extension/features/argo.rb +6 -6
  48. data/lib/project_types/extension/features/argo_runtime.rb +22 -66
  49. data/lib/project_types/extension/features/argo_serve.rb +25 -18
  50. data/lib/project_types/extension/forms/connect.rb +42 -0
  51. data/lib/project_types/extension/forms/questions/ask_name.rb +14 -6
  52. data/lib/project_types/extension/forms/questions/ask_registration.rb +51 -0
  53. data/lib/project_types/extension/messages/messages.rb +75 -11
  54. data/lib/project_types/extension/models/specification.rb +1 -0
  55. data/lib/project_types/extension/models/specification_handlers/{checkout_argo_extension.rb → checkout_ui_extension.rb} +3 -1
  56. data/lib/project_types/extension/models/specification_handlers/default.rb +13 -3
  57. data/lib/project_types/extension/models/specification_handlers/theme_app_extension.rb +86 -0
  58. data/lib/project_types/extension/models/specifications.rb +1 -0
  59. data/lib/project_types/extension/tasks/configure_features.rb +6 -7
  60. data/lib/project_types/extension/tasks/configure_options.rb +20 -0
  61. data/lib/project_types/extension/tasks/get_extensions.rb +32 -0
  62. data/lib/project_types/node/cli.rb +9 -21
  63. data/lib/project_types/node/commands/connect.rb +8 -2
  64. data/lib/project_types/node/commands/create.rb +9 -5
  65. data/lib/project_types/node/commands/deploy.rb +15 -5
  66. data/lib/project_types/node/commands/deploy/heroku.rb +29 -29
  67. data/lib/project_types/node/commands/generate.rb +4 -2
  68. data/lib/project_types/node/commands/open.rb +4 -2
  69. data/lib/project_types/node/commands/serve.rb +3 -2
  70. data/lib/project_types/node/commands/tunnel.rb +4 -2
  71. data/lib/project_types/node/messages/messages.rb +46 -89
  72. data/lib/project_types/rails/cli.rb +9 -21
  73. data/lib/project_types/rails/commands/connect.rb +8 -2
  74. data/lib/project_types/rails/commands/create.rb +10 -6
  75. data/lib/project_types/rails/commands/deploy.rb +15 -5
  76. data/lib/project_types/rails/commands/deploy/heroku.rb +84 -82
  77. data/lib/project_types/rails/commands/generate.rb +15 -5
  78. data/lib/project_types/rails/commands/generate/webhook.rb +28 -26
  79. data/lib/project_types/rails/commands/open.rb +4 -2
  80. data/lib/project_types/rails/commands/serve.rb +3 -2
  81. data/lib/project_types/rails/commands/tunnel.rb +4 -2
  82. data/lib/project_types/rails/messages/messages.rb +54 -101
  83. data/lib/project_types/script/cli.rb +5 -7
  84. data/lib/project_types/script/commands/create.rb +3 -1
  85. data/lib/project_types/script/commands/push.rb +4 -2
  86. data/lib/project_types/script/messages/messages.rb +52 -45
  87. data/lib/project_types/script/ui/error_handler.rb +2 -2
  88. data/lib/project_types/theme/cli.rb +15 -27
  89. data/lib/project_types/theme/commands/check.rb +33 -0
  90. data/lib/project_types/theme/commands/delete.rb +64 -0
  91. data/lib/project_types/theme/commands/language_server.rb +16 -0
  92. data/lib/project_types/theme/commands/package.rb +55 -0
  93. data/lib/project_types/theme/commands/publish.rb +43 -0
  94. data/lib/project_types/theme/commands/pull.rb +51 -0
  95. data/lib/project_types/theme/commands/push.rb +58 -32
  96. data/lib/project_types/theme/commands/serve.rb +7 -17
  97. data/lib/project_types/theme/forms/confirm_store.rb +15 -0
  98. data/lib/project_types/theme/forms/select.rb +59 -0
  99. data/lib/project_types/theme/messages/messages.rb +110 -106
  100. data/lib/project_types/theme/ui/sync_progress_bar.rb +20 -0
  101. data/lib/shopify-cli/admin_api.rb +53 -38
  102. data/lib/shopify-cli/admin_api/populate_resource_command.rb +6 -14
  103. data/lib/shopify-cli/admin_api/schema.rb +1 -10
  104. data/lib/shopify-cli/api.rb +29 -14
  105. data/lib/shopify-cli/command.rb +15 -3
  106. data/lib/shopify-cli/commands.rb +7 -2
  107. data/lib/shopify-cli/commands/help.rb +2 -29
  108. data/lib/shopify-cli/commands/login.rb +95 -0
  109. data/lib/shopify-cli/commands/logout.rb +24 -8
  110. data/lib/shopify-cli/commands/populate.rb +23 -0
  111. data/lib/{project_types/node → shopify-cli}/commands/populate/customer.rb +2 -8
  112. data/lib/{project_types/node → shopify-cli}/commands/populate/draft_order.rb +2 -2
  113. data/lib/{project_types/node → shopify-cli}/commands/populate/product.rb +2 -8
  114. data/lib/shopify-cli/commands/store.rb +15 -0
  115. data/lib/shopify-cli/commands/switch.rb +39 -0
  116. data/lib/shopify-cli/commands/system.rb +12 -0
  117. data/lib/shopify-cli/commands/whoami.rb +28 -0
  118. data/lib/shopify-cli/connect.rb +32 -0
  119. data/lib/shopify-cli/context.rb +52 -4
  120. data/lib/shopify-cli/core/entry_point.rb +3 -22
  121. data/lib/shopify-cli/db.rb +4 -4
  122. data/lib/shopify-cli/http_request.rb +10 -0
  123. data/lib/shopify-cli/identity_auth.rb +282 -0
  124. data/lib/shopify-cli/{oauth → identity_auth}/servlet.rb +11 -12
  125. data/lib/shopify-cli/messages/messages.rb +132 -39
  126. data/lib/shopify-cli/partners_api.rb +21 -44
  127. data/lib/shopify-cli/partners_api/organizations.rb +8 -0
  128. data/lib/shopify-cli/project_commands.rb +16 -0
  129. data/lib/shopify-cli/project_type.rb +0 -31
  130. data/lib/shopify-cli/shopifolk.rb +8 -11
  131. data/lib/shopify-cli/sub_command.rb +1 -0
  132. data/lib/shopify-cli/tasks.rb +3 -0
  133. data/lib/shopify-cli/tasks/confirm_store.rb +18 -0
  134. data/lib/shopify-cli/tasks/create_api_client.rb +2 -2
  135. data/lib/shopify-cli/tasks/ensure_authenticated.rb +13 -0
  136. data/lib/shopify-cli/tasks/ensure_loopback_url.rb +1 -1
  137. data/lib/shopify-cli/tasks/ensure_project_type.rb +12 -0
  138. data/lib/shopify-cli/tasks/select_org_and_shop.rb +0 -3
  139. data/lib/shopify-cli/theme/dev_server.rb +98 -0
  140. data/lib/shopify-cli/theme/dev_server/certificate_manager.rb +79 -0
  141. data/lib/shopify-cli/theme/dev_server/header_hash.rb +94 -0
  142. data/lib/shopify-cli/theme/dev_server/hot-reload.js +93 -0
  143. data/lib/shopify-cli/theme/dev_server/hot_reload.rb +76 -0
  144. data/lib/shopify-cli/theme/dev_server/local_assets.rb +87 -0
  145. data/lib/shopify-cli/theme/dev_server/proxy.rb +205 -0
  146. data/lib/shopify-cli/theme/dev_server/sse.rb +75 -0
  147. data/lib/shopify-cli/theme/dev_server/watcher.rb +59 -0
  148. data/lib/shopify-cli/theme/dev_server/web_server.rb +140 -0
  149. data/lib/shopify-cli/theme/development_theme.rb +69 -0
  150. data/lib/shopify-cli/theme/file.rb +112 -0
  151. data/lib/shopify-cli/theme/ignore_filter.rb +109 -0
  152. data/lib/shopify-cli/theme/mime_type.rb +34 -0
  153. data/lib/shopify-cli/theme/syncer.rb +328 -0
  154. data/lib/shopify-cli/theme/theme.rb +204 -0
  155. data/lib/shopify-cli/version.rb +1 -1
  156. data/lib/shopify_cli.rb +18 -11
  157. data/shopify-cli.gemspec +12 -5
  158. data/shopify.fish +1 -1
  159. data/shopify.sh +1 -1
  160. metadata +88 -34
  161. data/.github/workflows/release.yml +0 -59
  162. data/lib/project_types/extension/features/argo_serve_options.rb +0 -42
  163. data/lib/project_types/node/commands/populate.rb +0 -23
  164. data/lib/project_types/rails/commands/populate.rb +0 -23
  165. data/lib/project_types/rails/commands/populate/customer.rb +0 -31
  166. data/lib/project_types/rails/commands/populate/draft_order.rb +0 -28
  167. data/lib/project_types/rails/commands/populate/product.rb +0 -30
  168. data/lib/project_types/theme/commands/connect.rb +0 -54
  169. data/lib/project_types/theme/commands/create.rb +0 -48
  170. data/lib/project_types/theme/commands/deploy.rb +0 -38
  171. data/lib/project_types/theme/commands/generate.rb +0 -20
  172. data/lib/project_types/theme/commands/generate/env.rb +0 -79
  173. data/lib/project_types/theme/forms/connect.rb +0 -34
  174. data/lib/project_types/theme/forms/create.rb +0 -22
  175. data/lib/project_types/theme/tasks/ensure_themekit_installed.rb +0 -78
  176. data/lib/project_types/theme/themekit.rb +0 -113
  177. data/lib/shopify-cli/commands/connect.rb +0 -64
  178. data/lib/shopify-cli/commands/create.rb +0 -50
  179. data/lib/shopify-cli/oauth.rb +0 -198
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8f8161eea7a180b04614de6e548d11126711cdeabb05f7eb85c1d35cc6c1769
4
- data.tar.gz: e07cb22654f647771d78d1aad39514534fcc2817a01a16f24e03b896828ca583
3
+ metadata.gz: 24c62bd5226aa12bbd9bd97097bc876669c5b0e1ce9186ec204c77c195ae123e
4
+ data.tar.gz: 0a35817ec758bfae2cace1cd28c1a4e1aa96357583926b17f14e31b05ae1b02a
5
5
  SHA512:
6
- metadata.gz: 24bb19308430c1fab1336af24b68182e63223bb24e62eb98c551a7bf34a23f8dc615c0ebe4b74381458085101316f47ec467d37192b28d86d528ef3020d6b220
7
- data.tar.gz: f7afb287929f611361137c909846f5f64e8fc58dbfaffa460c37b3b64deae46f33d79d7201bb23f2819de3da2b4b9666ce1fc9d08f6993a91872a0dffaf1ce83
6
+ metadata.gz: 01be89d86afb3e057b85e02a2d68332ae16b04a3b44349995a594ba78fbd5f8f6a02d0a7f0ffc5ee418c930036c0845ef1076d647233a3482893005ada91d86c
7
+ data.tar.gz: d018a62cdca9d060ccb110ee13f51064b718c792a20ae0a9f9b1eece38522572060b3cd338950385a0e17baed94ad10329f6519f6520788e81534d149c21cbf0
data/.github/CODEOWNERS CHANGED
@@ -1,4 +1,4 @@
1
- * @shopify/platform-dev-tools-education
1
+ * @shopify/core-build-learn
2
2
 
3
3
  /lib/project_types/script/ @shopify/scripts-experience
4
4
  /test/project_types/script/ @shopify/scripts-experience
@@ -1,23 +1,23 @@
1
1
  # How to contribute
2
2
 
3
- Shopify App CLI is an open source project. We want to make it as easy and transparent as possible to contribute. If we are missing anything or can make the process easier in any way, please let us know by [opening an issue](https://github.com/Shopify/shopify-app-cli/issues/new).
3
+ Shopify CLI is an open source project. We want to make it as easy and transparent as possible to contribute. If we are missing anything or can make the process easier in any way, please let us know by [opening an issue](https://github.com/Shopify/shopify-cli/issues/new).
4
4
 
5
5
  ## Code of conduct
6
6
 
7
- We expect all participants to read our [code of conduct](https://github.com/Shopify/shopify-app-cli/blob/master/.github/CODE_OF_CONDUCT.md) to understand which actions are and aren’t tolerated.
7
+ We expect all participants to read our [code of conduct](https://github.com/Shopify/shopify-cli/blob/main/.github/CODE_OF_CONDUCT.md) to understand which actions are and aren’t tolerated.
8
8
 
9
9
  ## Open development
10
10
 
11
- All work on Shopify App CLI happens directly on GitHub. Both team members and external contributors send pull requests which go through the same review process.
11
+ All work on Shopify CLI happens directly on GitHub. Both team members and external contributors send pull requests which go through the same review process.
12
12
 
13
13
  ## Design guidelines
14
- When contributing to the Shopify App CLI, there are a set of [design guidelines](https://github.com/Shopify/shopify-app-cli/blob/master/.github/DESIGN.md) that should be followed. The design guidelines are meant to help create a consistent and predictable experience for all users of the tool, and help make descisions quicker when creating new commands or adding to existing ones.
14
+ When contributing to the Shopify CLI, there are a set of [design guidelines](https://github.com/Shopify/shopify-cli/blob/main/.github/DESIGN.md) that should be followed. The design guidelines are meant to help create a consistent and predictable experience for all users of the tool, and help make descisions quicker when creating new commands or adding to existing ones.
15
15
 
16
16
  ## Bugs
17
17
 
18
18
  ### Where to find known issues
19
19
 
20
- We track all of our issues in GitHub and [bugs](https://github.com/Shopify/shopify-app-cli/labels/Bug) are labeled accordingly. If you are planning to work on an issue, avoid ones which already have an assignee, where someone has commented within the last two weeks they are working on it, or the issue is labeled with [fix in progress](https://github.com/Shopify/shopify-app-cli/labels/fix%20in%20progress). We will do our best to communicate when an issue is being worked on internally.
20
+ We track all of our issues in GitHub and [bugs](https://github.com/Shopify/shopify-cli/labels/Bug) are labeled accordingly. If you are planning to work on an issue, avoid ones which already have an assignee, where someone has commented within the last two weeks they are working on it, or the issue is labeled with [fix in progress](https://github.com/Shopify/shopify-cli/labels/fix%20in%20progress). We will do our best to communicate when an issue is being worked on internally.
21
21
 
22
22
  ### Running against a local environment
23
23
 
@@ -29,7 +29,7 @@ To run against a local Partners or Identity instance, you can use:
29
29
 
30
30
  ### Reporting new issues
31
31
 
32
- To reduce duplicates, look through open issues before filing one. When [opening an issue](https://github.com/Shopify/shopify-app-cli/issues/new?template=ISSUE.md), complete as much of the template as possible.
32
+ To reduce duplicates, look through open issues before filing one. When [opening an issue](https://github.com/Shopify/shopify-cli/issues/new?template=ISSUE.md), complete as much of the template as possible.
33
33
 
34
34
 
35
35
  ## Your first pull request
@@ -38,7 +38,7 @@ Working on your first pull request? You can learn how from this free video serie
38
38
 
39
39
  [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)
40
40
 
41
- To help you get familiar with our contribution process, we have a list of [good first issues](https://github.com/Shopify/shopify-app-cli/labels/good%20first%20issue) that contain bugs with limited scope. This is a great place to get started.
41
+ To help you get familiar with our contribution process, we have a list of [good first issues](https://github.com/Shopify/shopify-cli/labels/good%20first%20issue) that contain bugs with limited scope. This is a great place to get started.
42
42
 
43
43
  If you decide to fix an issue, please check the comment thread in case somebody is already working on a fix. If nobody is working on it, leave a comment stating that you intend to work on it.
44
44
 
data/.github/DESIGN.md CHANGED
@@ -1,4 +1,4 @@
1
- # Shopify App CLI design guidelines
1
+ # Shopify CLI design guidelines
2
2
 
3
3
  #### Table of Contents
4
4
 
@@ -11,11 +11,11 @@
11
11
 
12
12
  ## Introduction
13
13
 
14
- The purpose of this doc is to outline all the heuristics, patterns, and templates we are using in the Shopify App CLI tool. All the content is based on the CLI Design and Style Guidelines doc, as well as the guidance on the Shopify cli-ui Github repo.
14
+ The purpose of this doc is to outline all the heuristics, patterns, and templates we are using in the Shopify CLI tool. All the content is based on the CLI Design and Style Guidelines doc, as well as the guidance on the Shopify cli-ui Github repo.
15
15
 
16
16
  The most important principle to follow is **speed**. CLI tools are built to be extremely fast to use and to perform tasks quickly. If there is ever a collision between heuristics, default to whatever results in the fastest perceived or actual performance.
17
17
 
18
- To help visualize all the components and states available in the Shopify App CLI, we have created a [UI Kit](https://www.figma.com/file/ZXIgM4wQpfRNjGaIArjWOgTD/CLI-UI-Kit?node-id=67%3A0) in [Figma](http://figma.com) that you can use to build command flows.
18
+ To help visualize all the components and states available in the Shopify CLI, we have created a [UI Kit](https://www.figma.com/file/ZXIgM4wQpfRNjGaIArjWOgTD/CLI-UI-Kit?node-id=67%3A0) in [Figma](http://figma.com) that you can use to build command flows.
19
19
 
20
20
  *Figma is a free web-based design tool.*
21
21
 
@@ -17,7 +17,7 @@ jobs:
17
17
 
18
18
  - name: Set up Ruby ${{ matrix.version }}
19
19
  uses: ruby/setup-ruby@v1
20
- with:
20
+ with:
21
21
  ruby-version: ${{ matrix.version }}
22
22
  bundler-cache: true
23
23
 
data/.gitignore CHANGED
@@ -11,6 +11,9 @@ markdown_intermediate
11
11
  .idea
12
12
  vendor/bundle
13
13
  *.gem
14
+ node_modules
15
+ package.json
16
+ yarn.lock
14
17
  packaging/builds
15
18
  packaging/debian/shopify-cli
16
19
  packaging/debian/shopify-cli.deb
data/.rubocop.yml CHANGED
@@ -1,6 +1,8 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
- require: rubocop-minitest
3
+ require:
4
+ - rubocop-minitest
5
+ - rubocop-rake
4
6
 
5
7
  inherit_gem:
6
8
  rubocop-shopify:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.5.1
1
+ 2.7.1
data/CHANGELOG.md CHANGED
@@ -1,35 +1,41 @@
1
1
  Unreleased
2
2
  ------
3
3
 
4
+ Version 2.0.0
5
+ -------------
6
+ * Adds support for theme development
7
+ * Changes to command structure (note that these are breaking changes, see [README](README.md))
8
+ * Checkout the [apps](https://shopify.dev/apps/tools/cli) and [themes](https://shopify.dev/themes/tools/cli) sections of the new [shopify.dev](https://shopify.dev) after Unite 2021 (June 29).
9
+
4
10
  Version 1.14.0
5
11
  --------------
6
- * [1275](https://github.com/Shopify/shopify-app-cli/pull/1275): Use script.json to specify script metadata
7
- * [1279](https://github.com/Shopify/shopify-app-cli/pull/1279): Fix bug where a script push still fails after the user answers the force push prompt
8
- * [1288](https://github.com/Shopify/shopify-app-cli/pull/1288): Fix bug where Scripts SDK was included for projects that don't require it
12
+ * [#1275](https://github.com/Shopify/shopify-cli/pull/1275): Use script.json to specify script metadata
13
+ * [#1279](https://github.com/Shopify/shopify-cli/pull/1279): Fix bug where a script push still fails after the user answers the force push prompt
14
+ * [#1288](https://github.com/Shopify/shopify-cli/pull/1288): Fix bug where Scripts SDK was included for projects that don't require it
9
15
 
10
16
  Version 1.13.1
11
17
  --------------
12
- * [1274](https://github.com/Shopify/shopify-app-cli/pull/1274): Only print api_key during error if it exists
13
- * [1272](https://github.com/Shopify/shopify-app-cli/pull/1272): Fix minor bug with extension serve for UI extensions
18
+ * [#1274](https://github.com/Shopify/shopify-cli/pull/1274): Only print api_key during error if it exists
19
+ * [#1272](https://github.com/Shopify/shopify-cli/pull/1272): Fix minor bug with extension serve for UI extensions
14
20
 
15
21
  Version 1.13.0
16
22
  --------------
17
23
 
18
- * [1266](https://github.com/Shopify/shopify-app-cli/pull/1266): Developer Console release
19
- * [1265](https://github.com/Shopify/shopify-app-cli/pull/1265): Fix bug where commands hang after an unsuccessful authentication
24
+ * [#1266](https://github.com/Shopify/shopify-cli/pull/1266): Developer Console release
25
+ * [#1265](https://github.com/Shopify/shopify-cli/pull/1265): Fix bug where commands hang after an unsuccessful authentication
20
26
 
21
27
  Version 1.12.0
22
28
  --------------
23
- * [1255](https://github.com/Shopify/shopify-app-cli/pull/1255): Fix beta flag checks when running `shopify serve`
29
+ * [#1255](https://github.com/Shopify/shopify-cli/pull/1255): Fix beta flag checks when running `shopify serve`
24
30
 
25
31
  Version 1.11.0
26
32
  --------------
27
- * [#1221](https://github.com/Shopify/shopify-app-cli/pull/1221): Prioritizes returning an HTTPS URL over HTTP from `shopify tunnel status`.
28
- * [#1223](https://github.com/Shopify/shopify-app-cli/pull/1233): Running `shopify serve` in an extension project now automatically runs `shopify tunnel`.
29
- * [#1225](https://github.com/Shopify/shopify-app-cli/pull/1225): Improved handling of "account not found" scenario, plus improvements to related tests and UX messaging
30
- * [#1229](https://github.com/Shopify/shopify-app-cli/pull/1229): Allows Checkout Extensions to specify configuration attributes in their extension.config.yml file.
31
- * [#1238](https://github.com/Shopify/shopify-app-cli/pull/1238): Auto Tunnel Support for Checkout Extension
32
- * [#1256](https://github.com/Shopify/shopify-app-cli/pull/1256): Allow using spaces around the equal sign on .env file.
33
+ * [#1221](https://github.com/Shopify/shopify-cli/pull/1221): Prioritizes returning an HTTPS URL over HTTP from `shopify tunnel status`.
34
+ * [#1223](https://github.com/Shopify/shopify-cli/pull/1233): Running `shopify serve` in an extension project now automatically runs `shopify tunnel`.
35
+ * [#1225](https://github.com/Shopify/shopify-cli/pull/1225): Improved handling of "account not found" scenario, plus improvements to related tests and UX messaging
36
+ * [#1229](https://github.com/Shopify/shopify-cli/pull/1229): Allows Checkout Extensions to specify configuration attributes in their extension.config.yml file.
37
+ * [#1238](https://github.com/Shopify/shopify-cli/pull/1238): Auto Tunnel Support for Checkout Extension
38
+ * [#1256](https://github.com/Shopify/shopify-cli/pull/1256): Allow using spaces around the equal sign on .env file.
33
39
 
34
40
  Version 1.10.0
35
41
  --------------
@@ -37,15 +43,15 @@ Version 1.10.0
37
43
 
38
44
  Version 1.9.1
39
45
  -------------
40
- * [1201](https://github.com/Shopify/shopify-app-cli/pull/1201) Determine Argo Renderer Dynamically. This fixes `shopify serve` and `shopify push` for extensions.
46
+ * [#1201](https://github.com/Shopify/shopify-cli/pull/1201) Determine Argo Renderer Dynamically. This fixes `shopify serve` and `shopify push` for extensions.
41
47
 
42
48
  Version 1.9.0
43
49
  -------------
44
- * [1181](https://github.com/Shopify/shopify-app-cli/pull/1181): Remove the subcommand references of the `generate` command for node apps (fixes [1176](https://github.com/Shopify/shopify-app-cli/issues/1176))
50
+ * [#1181](https://github.com/Shopify/shopify-cli/pull/1181): Remove the subcommand references of the `generate` command for node apps (fixes [1176](https://github.com/Shopify/shopify-cli/issues/1176))
45
51
 
46
52
  Version 1.8.0
47
53
  -------------
48
- * [1119](https://github.com/Shopify/shopify-app-cli/pull/1119): Enable guest serialization for scripts
54
+ * [#1119](https://github.com/Shopify/shopify-cli/pull/1119): Enable guest serialization for scripts
49
55
 
50
56
  Version 1.7.1
51
57
  ------
@@ -53,31 +59,31 @@ Version 1.7.1
53
59
 
54
60
  Version 1.7.0
55
61
  -----
56
- * [#1109](https://github.com/Shopify/shopify-app-cli/pull/1109): Abort app generation if name contains disallowed text.
57
- * [#1075](https://github.com/Shopify/shopify-app-cli/pull/1075): Add support for kebab-case flags
62
+ * [#1109](https://github.com/Shopify/shopify-cli/pull/1109): Abort app generation if name contains disallowed text.
63
+ * [#1075](https://github.com/Shopify/shopify-cli/pull/1075): Add support for kebab-case flags
58
64
 
59
65
  Version 1.6.0
60
66
  -----
61
- * [#1049](https://github.com/Shopify/shopify-app-cli/pull/1049): Add schema versioning support to the script project type
62
- * [#1059](https://github.com/Shopify/shopify-app-cli/pull/1059): Remove the functionality of the `generate` command for node apps, since it will no longer be feasible with the new node library
63
- * [#1046](https://github.com/Shopify/shopify-app-cli/pull/1046): Include a vendored copy of Webrick, as it's no longer included in Ruby 3.
64
- * [#1041](https://github.com/Shopify/shopify-app-cli/pull/1041): Remove unnecessary shell call to `spring stop`. We already pass `--skip-spring` when creating the app so running `spring stop` would have no effect.
65
- * [#1034](https://github.com/Shopify/shopify-app-cli/pull/1034): Abort if a system call fails.
67
+ * [#1049](https://github.com/Shopify/shopify-cli/pull/1049): Add schema versioning support to the script project type
68
+ * [#1059](https://github.com/Shopify/shopify-cli/pull/1059): Remove the functionality of the `generate` command for node apps, since it will no longer be feasible with the new node library
69
+ * [#1046](https://github.com/Shopify/shopify-cli/pull/1046): Include a vendored copy of Webrick, as it's no longer included in Ruby 3.
70
+ * [#1041](https://github.com/Shopify/shopify-cli/pull/1041): Remove unnecessary shell call to `spring stop`. We already pass `--skip-spring` when creating the app so running `spring stop` would have no effect.
71
+ * [#1034](https://github.com/Shopify/shopify-cli/pull/1034): Abort if a system call fails.
66
72
 
67
73
  Version 1.5.0
68
74
  -----
69
- * [#965](https://github.com/Shopify/shopify-app-cli/pull/965): Remove --no-optional when using npm to create new project
70
- * [#958](https://github.com/Shopify/shopify-app-cli/pull/958): Split `connect` command into project-specific functionality
71
- * [#992](https://github.com/Shopify/shopify-app-cli/pull/992): Add Theme Kit functionality to CLI
75
+ * [#965](https://github.com/Shopify/shopify-cli/pull/965): Remove --no-optional when using npm to create new project
76
+ * [#958](https://github.com/Shopify/shopify-cli/pull/958): Split `connect` command into project-specific functionality
77
+ * [#992](https://github.com/Shopify/shopify-cli/pull/992): Add Theme Kit functionality to CLI
72
78
 
73
79
  Version 1.4.1
74
80
  ------
75
- * [#917](https://github.com/Shopify/shopify-app-cli/pull/917): Ensure analytics for create action includes the same fields as other commands
81
+ * [#917](https://github.com/Shopify/shopify-cli/pull/917): Ensure analytics for create action includes the same fields as other commands
76
82
 
77
83
  Version 1.4.0
78
84
  ------
79
85
  * Updates to tests, dependencies and internal tooling
80
- * [#924](https://github.com/Shopify/shopify-app-cli/pull/924): Improve debugging messages on Partner API errors
86
+ * [#924](https://github.com/Shopify/shopify-cli/pull/924): Improve debugging messages on Partner API errors
81
87
 
82
88
  Version 1.3.1
83
89
  ------
data/Gemfile CHANGED
@@ -1,6 +1,8 @@
1
1
  # NOTE: These are development-only dependencies
2
2
  source "https://rubygems.org"
3
3
 
4
+ gemspec
5
+
4
6
  # None of these can actually be used in a development copy of dev
5
7
  # They are all for CI and tests
6
8
  # `dev` uses no gems
@@ -10,6 +12,7 @@ group :development, :test do
10
12
  gem "byebug"
11
13
  gem "rubocop-shopify", require: false
12
14
  gem "rubocop-minitest", require: false
15
+ gem "rubocop-rake", require: false
13
16
  end
14
17
 
15
18
  group :test do
@@ -20,4 +23,5 @@ group :test do
20
23
  gem "fakefs", ">= 1.0", require: false
21
24
  gem "webmock", require: false
22
25
  gem "timecop", require: false
26
+ gem "rack", require: false
23
27
  end
data/Gemfile.lock CHANGED
@@ -1,3 +1,10 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ shopify-cli (2.0.0)
5
+ listen (~> 3.5)
6
+ theme-check (~> 1.0)
7
+
1
8
  GEM
2
9
  remote: https://rubygems.org/
3
10
  specs:
@@ -10,8 +17,14 @@ GEM
10
17
  coderay (1.1.3)
11
18
  crack (0.4.4)
12
19
  fakefs (1.2.2)
20
+ ffi (1.15.3)
13
21
  hashdiff (1.0.1)
22
+ liquid (5.0.1)
23
+ listen (3.5.1)
24
+ rb-fsevent (~> 0.10, >= 0.10.3)
25
+ rb-inotify (~> 0.9, >= 0.9.10)
14
26
  method_source (1.0.0)
27
+ mini_portile2 (2.5.3)
15
28
  minitest (5.14.2)
16
29
  minitest-fail-fast (0.1.0)
17
30
  minitest (~> 5)
@@ -21,6 +34,11 @@ GEM
21
34
  minitest (>= 5.0)
22
35
  ruby-progressbar
23
36
  mocha (1.11.2)
37
+ nokogiri (1.11.7)
38
+ mini_portile2 (~> 2.5.0)
39
+ racc (~> 1.4)
40
+ nokogumbo (2.0.5)
41
+ nokogiri (~> 1.8, >= 1.8.4)
24
42
  parallel (1.20.1)
25
43
  parser (3.0.1.0)
26
44
  ast (~> 2.4.1)
@@ -31,8 +49,13 @@ GEM
31
49
  byebug (~> 11.0)
32
50
  pry (~> 0.13.0)
33
51
  public_suffix (4.0.6)
52
+ racc (1.5.2)
53
+ rack (2.2.3)
34
54
  rainbow (3.0.0)
35
55
  rake (13.0.1)
56
+ rb-fsevent (0.11.0)
57
+ rb-inotify (0.10.1)
58
+ ffi (~> 1.0)
36
59
  regexp_parser (2.1.1)
37
60
  rexml (3.2.5)
38
61
  rubocop (1.12.1)
@@ -48,9 +71,14 @@ GEM
48
71
  parser (>= 2.7.1.5)
49
72
  rubocop-minitest (0.10.1)
50
73
  rubocop (>= 0.87)
74
+ rubocop-rake (0.5.1)
75
+ rubocop
51
76
  rubocop-shopify (2.0.1)
52
77
  rubocop (~> 1.11)
53
78
  ruby-progressbar (1.11.0)
79
+ theme-check (1.0.0)
80
+ liquid (>= 5.0.1)
81
+ nokogumbo
54
82
  timecop (0.9.2)
55
83
  unicode-display_width (2.0.0)
56
84
  webmock (3.9.3)
@@ -62,6 +90,7 @@ PLATFORMS
62
90
  ruby
63
91
 
64
92
  DEPENDENCIES
93
+ bundler (~> 2.1.4)
65
94
  byebug
66
95
  fakefs (>= 1.0)
67
96
  minitest (>= 5.0.0)
@@ -69,9 +98,12 @@ DEPENDENCIES
69
98
  minitest-reporters
70
99
  mocha
71
100
  pry-byebug
101
+ rack
72
102
  rake
73
103
  rubocop-minitest
104
+ rubocop-rake
74
105
  rubocop-shopify
106
+ shopify-cli!
75
107
  timecop
76
108
  webmock
77
109
 
data/LICENSE CHANGED
@@ -1,5 +1,8 @@
1
1
  Copyright 2019-present, Shopify Inc.
2
-
2
+
3
+ Contains code from rack, Copyright (C) 2007-2019 Leah Neukirchen <http://leahneukirchen.org/infopage.html>
4
+ Contains code from rack-proxy, Copyright (c) 2013 Jacek Becela jacek.becela@gmail.com
5
+ ​​
3
6
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
7
 
5
8
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
data/README.md CHANGED
@@ -1,46 +1,112 @@
1
- # [Shopify App CLI](https://shopify.dev/tools/cli)
1
+ # Shopify CLI
2
2
 
3
3
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE.md)
4
- [![Build Status](https://github.com/Shopify/shopify-app-cli/workflows/CI/badge.svg)](https://github.com/Shopify/shopify-app-cli/actions)
4
+ [![Build Status](https://github.com/Shopify/shopify-cli/workflows/CI/badge.svg)](https://github.com/Shopify/shopify-cli/actions)
5
5
 
6
- Shopify App CLI helps you build Shopify apps faster. It quickly generates Node.js and Ruby on Rails apps and automates many common development tasks.
7
6
 
8
- ## Features
7
+ Shopify CLI helps you build Shopify themes and apps. Use Shopify CLI to automate and enhance your local development workflow.
9
8
 
10
- Shopify App CLI helps your app development process in the following ways:
9
+ Shopify CLI is available as a gem and can be run and installed on Mac, Linux and Windows systems.
11
10
 
12
- - Creates an app in the [Partner dashboard](https://partners.shopify.com/current/resources)
13
- - Populates test data for your app, including products, customers, and draft orders
14
- - Generates new [webhooks](https://shopify.dev/tutorials/manage-webhooks) for your app
15
- - Deploys your app to an external platform, such as [Heroku](https://www.heroku.com/)
11
+ ## Installation for Mac OS Users
16
12
 
17
- ## Installation
13
+ - Make sure you have [Homebrew](https://brew.sh/) installed
14
+ - Open your terminal app
15
+ - Run `brew tap shopify/shopify`
16
+ - Run `brew install shopify-cli`
17
+ - After the installation is completed, run `shopify version`, if this outputs a version number you've successfully installed the CLI.
18
18
 
19
- Refer to [*Install Shopify App CLI*](https://shopify.dev/tools/cli/installation) to learn how to install Shopify App CLI on Windows, macOS, or Linux.
19
+ ### To upgrade Shopify CLI
20
20
 
21
- ## Getting started
21
+ #### Homebrew (Mac OS)
22
22
 
23
- Refer to [*Getting started with Shopify App CLI*](https://shopify.dev/tools/cli/getting-started) to learn how to create and manage different types of projects with Shopify App CLI.
23
+ ```shell
24
+ $ brew update
25
+ $ brew upgrade shopify-cli
26
+ ```
24
27
 
25
- ## References
28
+ #### apt (Debian, Ubuntu)
26
29
 
27
- - **[Shopify App CLI core commands](https://shopify.dev/tools/cli/reference)** - A complete reference of core commands for Shopify App CLI.
28
- - **[Node.js app commands](https://shopify.dev/tools/cli/reference/node-app)** - A complete Shopify App CLI command reference for Node.js apps.
29
- - **[Ruby on Rails app commands](https://shopify.dev/tools/cli/reference/ruby-on-rails-app)** - A complete Shopify App CLI command reference for Ruby on Rails apps.
30
+ 1.- Download the latest `.deb` binary for Shopify CLI from the releases page.
30
31
 
31
- ## Troubleshooting
32
+ 2.- Install the downloaded file and make sure to replace /path/to/download/shopify-cli-x.y.z.deb with the path to your file's location:
32
33
 
33
- Refer to [*Troubleshooting Shopify App CLI*](https://shopify.dev/tools/cli/troubleshooting) to learn how to upgrade, migrate from a legacy version, and uninstall Shopify App CLI.
34
+ ```shell
35
+ $ sudo apt install /path/to/downloaded/shopify-cli-x.y.z.deb
36
+ ```
34
37
 
35
- ## Contributing to Shopify App CLI
38
+ #### yum (CentOS 8+, Fedora, Red Hat, SUSE)
36
39
 
37
- Shopify App CLI is an [open source](https://github.com/Shopify/shopify-app-cli/blob/master/.github/LICENSE.md) tool and you can [help contribute to the GitHub repository](https://github.com/Shopify/shopify-app-cli/blob/master/.github/CONTRIBUTING.md).
40
+ 1.- Download the latest .rpm file for Shopify App CLI from the releases page.
38
41
 
39
- ## Developing Shopify App CLI
42
+ 2.- Install the downloaded file and make sure to replace /path/to/downloaded/shopify-cli-x.y.x.rpm with the path to your file's location:
40
43
 
41
- Read the [development guide](https://github.com/Shopify/shopify-app-cli/wiki).
44
+ ```shell
45
+ $ sudo yum install /path/to/downloaded/shopify-cli-x.y.x.rpm
46
+ ```
42
47
 
43
- ## Where to get help
48
+ #### RubyGems (macOS, Linux, Windows 10)
44
49
 
45
- - **[Open a GitHub issue](https://github.com/Shopify/shopify-app-cli/issues)** - To report bugs or request new features, open an issue in the Shopify App CLI repository.
46
- - **[Shopify Community Forums](https://community.shopify.com/)** - Visit our forums to connect with the community and learn more about Shopify App CLI development.
50
+ ```shell
51
+ $ gem update shopify-cli
52
+ ```
53
+
54
+
55
+ ## Command specification and semantics
56
+
57
+ Shopify CLI offers a command structure similar to other CLIs:
58
+
59
+ `shopify [ GLOBAL_ACTION | RESOURCE [ ACTION ] ] [ VARIADIC_ARGS ] [ OPTIONS ]`
60
+
61
+ The top level command will always be a **resource** or a **global action**:
62
+
63
+ - Resources represent Shopify concepts that you can work with in the CLI, for example `theme`.
64
+ - Usually, global actions are commands that alter the state of the CLI (e.g `config` or `login`)
65
+
66
+ Actions are commands that you can run to interact with a resource.
67
+
68
+ You can add `--help` or `-h` to the end of your command to get a full explanation of the available options for the command.
69
+
70
+ ## Quick start guide for theme developers
71
+
72
+ This quick start guide shows you how to begin local theme development when working with a new theme from scratch.
73
+
74
+ ### 1.- Authenticate the CLI
75
+
76
+ After you install Shopify CLI, you need to authenticate your CLI instance and connect to the store that you want to work on.
77
+
78
+ Run:
79
+
80
+ `shopify login --store=<your-shop-url>`
81
+
82
+ When prompted, open the provided accounts.shopify.com URL in a browser. In your browser window, log into the account that's attached to the store that you want to use for development.
83
+
84
+ ### 2.- Create a new theme
85
+
86
+ Run:
87
+
88
+ `shopify theme create`
89
+
90
+ To initialize a theme on your current working directory. This will actually clone Shopify's starter theme which you should use as a reference when building themes for Shopify.
91
+
92
+ ### 3.- Start the local theme server
93
+
94
+ Shopify CLI comes with a local theme server which lets you preview your changes live on your local machine.
95
+
96
+ After you create or navigate to your theme, you can run `shopify theme serve` to interact with the theme in a browser. Shopify CLI uploads the theme as a development theme on the store that you're connected to, and gives you an IP address and port to preview changes in real time using the store's data.
97
+
98
+ Run:
99
+
100
+ `shopify theme serve`
101
+
102
+ To start the server. The server includes hot reload for CSS & Sections.
103
+
104
+ ### Contributing
105
+
106
+ Shopify CLI is an [open source tool](https://github.com/Shopify/shopify-cli/blob/main/.github/LICENSE.md) and everyone is welcome to help the community by [contributing](https://github.com/Shopify/shopify-cli/blob/main/.github/CONTRIBUTING.md) to the project.
107
+
108
+ ### Where to get help
109
+
110
+ - [Open a GitHub issue](https://github.com/Shopify/shopify-cli/issues) - To report bugs or request new features, open an issue in the Shopify CLI repository.
111
+
112
+ - [Shopify Community Forums](https://community.shopify.com/) - Visit our forums to connect with the community and learn more about Shopify CLI development.