shopify-cli 1.13.0 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (199) 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 +57 -24
  10. data/Gemfile +4 -0
  11. data/Gemfile.lock +32 -0
  12. data/LICENSE +4 -1
  13. data/README.md +94 -26
  14. data/RELEASING.md +31 -7
  15. data/Rakefile +2 -2
  16. data/SECURITY.md +1 -1
  17. data/THEMEKIT_MIGRATION.md +18 -0
  18. data/bin/load_shopify.rb +1 -1
  19. data/bin/shopify +3 -3
  20. data/dev.yml +1 -1
  21. data/docs/app/node/index.md +1 -1
  22. data/docs/app/rails/index.md +1 -1
  23. data/docs/core/index.md +1 -1
  24. data/docs/getting-started/index.md +1 -1
  25. data/docs/getting-started/install/index.md +1 -1
  26. data/docs/getting-started/migrate/index.md +1 -1
  27. data/docs/getting-started/uninstall/index.md +1 -1
  28. data/docs/getting-started/upgrade/index.md +1 -1
  29. data/docs/help/start-app/index.md +1 -1
  30. data/docs/index.md +1 -1
  31. data/ext/shopify-cli/extconf.rb +17 -5
  32. data/install.sh +1 -1
  33. data/lib/docgen/index_template.md.erb +2 -2
  34. data/lib/graphql/all_orgs_with_extensions.graphql +37 -0
  35. data/lib/graphql/api_versions.graphql +1 -1
  36. data/lib/graphql/find_organization.graphql +2 -1
  37. data/lib/project_types/extension/cli.rb +18 -15
  38. data/lib/project_types/extension/commands/build.rb +4 -5
  39. data/lib/project_types/extension/commands/connect.rb +35 -0
  40. data/lib/project_types/extension/commands/create.rb +12 -16
  41. data/lib/project_types/extension/commands/extension_command.rb +2 -2
  42. data/lib/project_types/extension/commands/info.rb +86 -0
  43. data/lib/project_types/extension/commands/push.rb +8 -7
  44. data/lib/project_types/extension/commands/register.rb +4 -5
  45. data/lib/project_types/extension/commands/serve.rb +5 -8
  46. data/lib/project_types/extension/commands/tunnel.rb +3 -1
  47. data/lib/project_types/extension/errors.rb +9 -0
  48. data/lib/project_types/extension/extension_project.rb +17 -1
  49. data/lib/project_types/extension/extension_project_keys.rb +1 -0
  50. data/lib/project_types/extension/features/argo.rb +6 -6
  51. data/lib/project_types/extension/features/argo_runtime.rb +22 -56
  52. data/lib/project_types/extension/features/argo_serve.rb +25 -18
  53. data/lib/project_types/extension/forms/connect.rb +42 -0
  54. data/lib/project_types/extension/forms/questions/ask_name.rb +14 -6
  55. data/lib/project_types/extension/forms/questions/ask_registration.rb +51 -0
  56. data/lib/project_types/extension/messages/messages.rb +80 -16
  57. data/lib/project_types/extension/models/specification.rb +1 -0
  58. data/lib/project_types/extension/models/specification_handlers/{checkout_argo_extension.rb → checkout_ui_extension.rb} +3 -1
  59. data/lib/project_types/extension/models/specification_handlers/default.rb +13 -3
  60. data/lib/project_types/extension/models/specification_handlers/theme_app_extension.rb +89 -0
  61. data/lib/project_types/extension/models/specifications.rb +1 -0
  62. data/lib/project_types/extension/tasks/configure_features.rb +6 -7
  63. data/lib/project_types/extension/tasks/configure_options.rb +20 -0
  64. data/lib/project_types/extension/tasks/get_extensions.rb +32 -0
  65. data/lib/project_types/node/cli.rb +9 -21
  66. data/lib/project_types/node/commands/connect.rb +8 -2
  67. data/lib/project_types/node/commands/create.rb +9 -5
  68. data/lib/project_types/node/commands/deploy.rb +15 -5
  69. data/lib/project_types/node/commands/deploy/heroku.rb +29 -29
  70. data/lib/project_types/node/commands/generate.rb +4 -2
  71. data/lib/project_types/node/commands/open.rb +4 -2
  72. data/lib/project_types/node/commands/serve.rb +3 -2
  73. data/lib/project_types/node/commands/tunnel.rb +4 -2
  74. data/lib/project_types/node/messages/messages.rb +47 -90
  75. data/lib/project_types/rails/cli.rb +9 -21
  76. data/lib/project_types/rails/commands/connect.rb +8 -2
  77. data/lib/project_types/rails/commands/create.rb +10 -6
  78. data/lib/project_types/rails/commands/deploy.rb +15 -5
  79. data/lib/project_types/rails/commands/deploy/heroku.rb +84 -82
  80. data/lib/project_types/rails/commands/generate.rb +15 -5
  81. data/lib/project_types/rails/commands/generate/webhook.rb +28 -26
  82. data/lib/project_types/rails/commands/open.rb +4 -2
  83. data/lib/project_types/rails/commands/serve.rb +3 -2
  84. data/lib/project_types/rails/commands/tunnel.rb +4 -2
  85. data/lib/project_types/rails/messages/messages.rb +72 -119
  86. data/lib/project_types/script/cli.rb +6 -8
  87. data/lib/project_types/script/commands/create.rb +3 -1
  88. data/lib/project_types/script/commands/push.rb +12 -5
  89. data/lib/project_types/script/graphql/app_script_update_or_create.graphql +9 -3
  90. data/lib/project_types/script/layers/application/create_script.rb +4 -3
  91. data/lib/project_types/script/layers/domain/errors.rb +6 -11
  92. data/lib/project_types/script/layers/domain/push_package.rb +4 -8
  93. data/lib/project_types/script/layers/domain/script_json.rb +32 -0
  94. data/lib/project_types/script/layers/domain/script_project.rb +1 -1
  95. data/lib/project_types/script/layers/infrastructure/errors.rb +13 -17
  96. data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_project_creator.rb +29 -21
  97. data/lib/project_types/script/layers/infrastructure/push_package_repository.rb +2 -4
  98. data/lib/project_types/script/layers/infrastructure/script_project_repository.rb +45 -34
  99. data/lib/project_types/script/layers/infrastructure/script_service.rb +37 -16
  100. data/lib/project_types/script/messages/messages.rb +66 -55
  101. data/lib/project_types/script/tasks/ensure_env.rb +22 -1
  102. data/lib/project_types/script/ui/error_handler.rb +32 -32
  103. data/lib/project_types/theme/cli.rb +16 -27
  104. data/lib/project_types/theme/commands/check.rb +33 -0
  105. data/lib/project_types/theme/commands/delete.rb +64 -0
  106. data/lib/project_types/theme/commands/init.rb +42 -0
  107. data/lib/project_types/theme/commands/language_server.rb +16 -0
  108. data/lib/project_types/theme/commands/package.rb +55 -0
  109. data/lib/project_types/theme/commands/publish.rb +43 -0
  110. data/lib/project_types/theme/commands/pull.rb +51 -0
  111. data/lib/project_types/theme/commands/push.rb +58 -32
  112. data/lib/project_types/theme/commands/serve.rb +8 -16
  113. data/lib/project_types/theme/forms/confirm_store.rb +15 -0
  114. data/lib/project_types/theme/forms/select.rb +59 -0
  115. data/lib/project_types/theme/messages/messages.rb +118 -103
  116. data/lib/project_types/theme/ui/sync_progress_bar.rb +20 -0
  117. data/lib/shopify-cli/admin_api.rb +57 -38
  118. data/lib/shopify-cli/admin_api/populate_resource_command.rb +6 -14
  119. data/lib/shopify-cli/admin_api/schema.rb +1 -10
  120. data/lib/shopify-cli/api.rb +29 -14
  121. data/lib/shopify-cli/command.rb +15 -3
  122. data/lib/shopify-cli/commands.rb +7 -2
  123. data/lib/shopify-cli/commands/help.rb +2 -29
  124. data/lib/shopify-cli/commands/login.rb +95 -0
  125. data/lib/shopify-cli/commands/logout.rb +24 -8
  126. data/lib/shopify-cli/commands/populate.rb +23 -0
  127. data/lib/{project_types/node → shopify-cli}/commands/populate/customer.rb +2 -8
  128. data/lib/{project_types/node → shopify-cli}/commands/populate/draft_order.rb +2 -2
  129. data/lib/{project_types/node → shopify-cli}/commands/populate/product.rb +2 -8
  130. data/lib/shopify-cli/commands/store.rb +15 -0
  131. data/lib/shopify-cli/commands/switch.rb +39 -0
  132. data/lib/shopify-cli/commands/system.rb +12 -0
  133. data/lib/shopify-cli/commands/whoami.rb +28 -0
  134. data/lib/shopify-cli/connect.rb +32 -0
  135. data/lib/shopify-cli/context.rb +65 -4
  136. data/lib/shopify-cli/core/entry_point.rb +3 -22
  137. data/lib/shopify-cli/core/monorail.rb +6 -2
  138. data/lib/shopify-cli/db.rb +4 -4
  139. data/lib/shopify-cli/http_request.rb +16 -0
  140. data/lib/shopify-cli/identity_auth.rb +282 -0
  141. data/lib/shopify-cli/{oauth → identity_auth}/servlet.rb +11 -12
  142. data/lib/shopify-cli/messages/messages.rb +140 -46
  143. data/lib/shopify-cli/packager.rb +5 -5
  144. data/lib/shopify-cli/partners_api.rb +21 -44
  145. data/lib/shopify-cli/partners_api/organizations.rb +8 -0
  146. data/lib/shopify-cli/project_commands.rb +16 -0
  147. data/lib/shopify-cli/project_type.rb +0 -31
  148. data/lib/shopify-cli/shopifolk.rb +8 -11
  149. data/lib/shopify-cli/sub_command.rb +1 -0
  150. data/lib/shopify-cli/tasks.rb +3 -0
  151. data/lib/shopify-cli/tasks/confirm_store.rb +18 -0
  152. data/lib/shopify-cli/tasks/create_api_client.rb +2 -2
  153. data/lib/shopify-cli/tasks/ensure_authenticated.rb +13 -0
  154. data/lib/shopify-cli/tasks/ensure_loopback_url.rb +1 -1
  155. data/lib/shopify-cli/tasks/ensure_project_type.rb +12 -0
  156. data/lib/shopify-cli/tasks/select_org_and_shop.rb +0 -3
  157. data/lib/shopify-cli/theme/dev_server.rb +98 -0
  158. data/lib/shopify-cli/theme/dev_server/certificate_manager.rb +79 -0
  159. data/lib/shopify-cli/theme/dev_server/header_hash.rb +94 -0
  160. data/lib/shopify-cli/theme/dev_server/hot-reload.js +93 -0
  161. data/lib/shopify-cli/theme/dev_server/hot_reload.rb +76 -0
  162. data/lib/shopify-cli/theme/dev_server/local_assets.rb +87 -0
  163. data/lib/shopify-cli/theme/dev_server/proxy.rb +205 -0
  164. data/lib/shopify-cli/theme/dev_server/sse.rb +75 -0
  165. data/lib/shopify-cli/theme/dev_server/watcher.rb +59 -0
  166. data/lib/shopify-cli/theme/dev_server/web_server.rb +140 -0
  167. data/lib/shopify-cli/theme/development_theme.rb +69 -0
  168. data/lib/shopify-cli/theme/file.rb +112 -0
  169. data/lib/shopify-cli/theme/ignore_filter.rb +109 -0
  170. data/lib/shopify-cli/theme/mime_type.rb +34 -0
  171. data/lib/shopify-cli/theme/syncer.rb +332 -0
  172. data/lib/shopify-cli/theme/theme.rb +204 -0
  173. data/lib/shopify-cli/tunnel.rb +1 -1
  174. data/lib/shopify-cli/version.rb +1 -1
  175. data/lib/shopify_cli.rb +18 -11
  176. data/shopify-cli.gemspec +12 -5
  177. data/shopify.fish +1 -1
  178. data/shopify.sh +1 -1
  179. metadata +91 -35
  180. data/.github/workflows/release.yml +0 -59
  181. data/lib/project_types/extension/features/argo_serve_options.rb +0 -41
  182. data/lib/project_types/node/commands/populate.rb +0 -23
  183. data/lib/project_types/rails/commands/populate.rb +0 -23
  184. data/lib/project_types/rails/commands/populate/customer.rb +0 -31
  185. data/lib/project_types/rails/commands/populate/draft_order.rb +0 -28
  186. data/lib/project_types/rails/commands/populate/product.rb +0 -30
  187. data/lib/project_types/script/layers/domain/config_ui.rb +0 -16
  188. data/lib/project_types/theme/commands/connect.rb +0 -54
  189. data/lib/project_types/theme/commands/create.rb +0 -48
  190. data/lib/project_types/theme/commands/deploy.rb +0 -38
  191. data/lib/project_types/theme/commands/generate.rb +0 -20
  192. data/lib/project_types/theme/commands/generate/env.rb +0 -79
  193. data/lib/project_types/theme/forms/connect.rb +0 -34
  194. data/lib/project_types/theme/forms/create.rb +0 -22
  195. data/lib/project_types/theme/tasks/ensure_themekit_installed.rb +0 -78
  196. data/lib/project_types/theme/themekit.rb +0 -113
  197. data/lib/shopify-cli/commands/connect.rb +0 -64
  198. data/lib/shopify-cli/commands/create.rb +0 -50
  199. data/lib/shopify-cli/oauth.rb +0 -198
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: efb6500804d976bce67276002bd2e95343cc080c7278fc7c510017676abb24a0
4
- data.tar.gz: 3f0ab9095319fb4743fb37d19db43195c4fd4c737122ceada5958c00bad01b84
3
+ metadata.gz: e891dd1947743de4abbd7ef4e2c7e40a60e313eed78e33e5813c1fbb72369b22
4
+ data.tar.gz: 2af5852d53518d1089fabd4420cc6a432bccf99585d935812f8c347d9ad42d45
5
5
  SHA512:
6
- metadata.gz: 27cf1b9e1256bb8732fbc291eb423a26ec1570e79cd960c9cc508e387ca58edeb5559680183f5a94009255b17f970e78ed4e1aee591f2782a29be2b9ab9b79b2
7
- data.tar.gz: d6e489fc945ce4f27f3800238ff62b24b23073debfe29e48a196c972f7c7ebb34cea7f0affe7d7d326e48573e6df61c7ff68d062e261e83844fbd72cb0ce29ab
6
+ metadata.gz: 02fa4e4ed76dc0576474246772e332d7a21d0242807ceb407244a0af8dfe3c21c9e1eced54283a11ed304c0ae74ae81becc040c7f9c0242c9b35e8171f3182a4
7
+ data.tar.gz: 5c587408bffbb49a09c087f2810b5b65b754de6fb2c3c8c158996446198817c7e2c0a21143544d7e7bc8ef74e4407fd4389d805ed298432c64656d202745fe86
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,24 +1,57 @@
1
1
  Unreleased
2
2
  ------
3
3
 
4
+ Version 2.0.2
5
+ -------------
6
+ * [#1305](https://github.com/Shopify/shopify-cli/pull/1305): Fix `Uninitialized constant Net::WriteTimeout` error
7
+ * [#1319](https://github.com/Shopify/shopify-cli/pull/1319): Fix `theme pull` not pulling some files
8
+ * [#1321](https://github.com/Shopify/shopify-cli/pull/1321): Fix error when pulling images with `theme pull`
9
+ * [#1322](https://github.com/Shopify/shopify-cli/pull/1322): Fix error when running `shopify theme language-server --help`
10
+ * [#1324](https://github.com/Shopify/shopify-cli/pull/1324): Fix issue [#1308](https://github.com/Shopify/shopify-cli/issues/1308) where a non-English language on Partner Account breaks how CLI determines latest API version.
11
+ * [#1343](https://github.com/Shopify/shopify-cli/pull/1343): Fix inconsistent use of periods vs ellipsis in messages. This replaces periods with ellipsis.
12
+
13
+ Version 2.0.1
14
+ -------------
15
+ * [#1295](https://github.com/Shopify/shopify-cli/pull/1295): Ignore files at the root of a theme app extension project
16
+ * [#1296](https://github.com/Shopify/shopify-cli/pull/1296): Fix issue [#1294](https://github.com/Shopify/shopify-cli/issues/1294) regarding call to Windows `start` command with URL.
17
+ * [#1298](https://github.com/Shopify/shopify-cli/pull/1298): Fix error in `theme serve` command
18
+ * [#1301](https://github.com/Shopify/shopify-cli/pull/1301): Add `theme init` command
19
+
20
+ Version 2.0.0
21
+ -------------
22
+ * Adds support for theme development
23
+ * Changes to command structure (note that these are breaking changes, see [README](README.md))
24
+ * 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).
25
+
26
+ Version 1.14.0
27
+ --------------
28
+ * [#1275](https://github.com/Shopify/shopify-cli/pull/1275): Use script.json to specify script metadata
29
+ * [#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
30
+ * [#1288](https://github.com/Shopify/shopify-cli/pull/1288): Fix bug where Scripts SDK was included for projects that don't require it
31
+
32
+ Version 1.13.1
33
+ --------------
34
+ * [#1274](https://github.com/Shopify/shopify-cli/pull/1274): Only print api_key during error if it exists
35
+ * [#1272](https://github.com/Shopify/shopify-cli/pull/1272): Fix minor bug with extension serve for UI extensions
36
+
4
37
  Version 1.13.0
5
38
  --------------
6
39
 
7
- * [1266](https://github.com/Shopify/shopify-app-cli/pull/1266): Developer Console release
8
- * [1265](https://github.com/Shopify/shopify-app-cli/pull/1265): Fix bug where commands hang after an unsuccessful authentication
40
+ * [#1266](https://github.com/Shopify/shopify-cli/pull/1266): Developer Console release
41
+ * [#1265](https://github.com/Shopify/shopify-cli/pull/1265): Fix bug where commands hang after an unsuccessful authentication
9
42
 
10
43
  Version 1.12.0
11
44
  --------------
12
- * [1255](https://github.com/Shopify/shopify-app-cli/pull/1255): Fix beta flag checks when running `shopify serve`
45
+ * [#1255](https://github.com/Shopify/shopify-cli/pull/1255): Fix beta flag checks when running `shopify serve`
13
46
 
14
47
  Version 1.11.0
15
48
  --------------
16
- * [#1221](https://github.com/Shopify/shopify-app-cli/pull/1221): Prioritizes returning an HTTPS URL over HTTP from `shopify tunnel status`.
17
- * [#1223](https://github.com/Shopify/shopify-app-cli/pull/1233): Running `shopify serve` in an extension project now automatically runs `shopify tunnel`.
18
- * [#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
19
- * [#1229](https://github.com/Shopify/shopify-app-cli/pull/1229): Allows Checkout Extensions to specify configuration attributes in their extension.config.yml file.
20
- * [#1238](https://github.com/Shopify/shopify-app-cli/pull/1238): Auto Tunnel Support for Checkout Extension
21
- * [#1256](https://github.com/Shopify/shopify-app-cli/pull/1256): Allow using spaces around the equal sign on .env file.
49
+ * [#1221](https://github.com/Shopify/shopify-cli/pull/1221): Prioritizes returning an HTTPS URL over HTTP from `shopify tunnel status`.
50
+ * [#1223](https://github.com/Shopify/shopify-cli/pull/1233): Running `shopify serve` in an extension project now automatically runs `shopify tunnel`.
51
+ * [#1225](https://github.com/Shopify/shopify-cli/pull/1225): Improved handling of "account not found" scenario, plus improvements to related tests and UX messaging
52
+ * [#1229](https://github.com/Shopify/shopify-cli/pull/1229): Allows Checkout Extensions to specify configuration attributes in their extension.config.yml file.
53
+ * [#1238](https://github.com/Shopify/shopify-cli/pull/1238): Auto Tunnel Support for Checkout Extension
54
+ * [#1256](https://github.com/Shopify/shopify-cli/pull/1256): Allow using spaces around the equal sign on .env file.
22
55
 
23
56
  Version 1.10.0
24
57
  --------------
@@ -26,15 +59,15 @@ Version 1.10.0
26
59
 
27
60
  Version 1.9.1
28
61
  -------------
29
- * [1201](https://github.com/Shopify/shopify-app-cli/pull/1201) Determine Argo Renderer Dynamically. This fixes `shopify serve` and `shopify push` for extensions.
62
+ * [#1201](https://github.com/Shopify/shopify-cli/pull/1201) Determine Argo Renderer Dynamically. This fixes `shopify serve` and `shopify push` for extensions.
30
63
 
31
64
  Version 1.9.0
32
65
  -------------
33
- * [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))
66
+ * [#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))
34
67
 
35
68
  Version 1.8.0
36
69
  -------------
37
- * [1119](https://github.com/Shopify/shopify-app-cli/pull/1119): Enable guest serialization for scripts
70
+ * [#1119](https://github.com/Shopify/shopify-cli/pull/1119): Enable guest serialization for scripts
38
71
 
39
72
  Version 1.7.1
40
73
  ------
@@ -42,31 +75,31 @@ Version 1.7.1
42
75
 
43
76
  Version 1.7.0
44
77
  -----
45
- * [#1109](https://github.com/Shopify/shopify-app-cli/pull/1109): Abort app generation if name contains disallowed text.
46
- * [#1075](https://github.com/Shopify/shopify-app-cli/pull/1075): Add support for kebab-case flags
78
+ * [#1109](https://github.com/Shopify/shopify-cli/pull/1109): Abort app generation if name contains disallowed text.
79
+ * [#1075](https://github.com/Shopify/shopify-cli/pull/1075): Add support for kebab-case flags
47
80
 
48
81
  Version 1.6.0
49
82
  -----
50
- * [#1049](https://github.com/Shopify/shopify-app-cli/pull/1049): Add schema versioning support to the script project type
51
- * [#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
52
- * [#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.
53
- * [#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.
54
- * [#1034](https://github.com/Shopify/shopify-app-cli/pull/1034): Abort if a system call fails.
83
+ * [#1049](https://github.com/Shopify/shopify-cli/pull/1049): Add schema versioning support to the script project type
84
+ * [#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
85
+ * [#1046](https://github.com/Shopify/shopify-cli/pull/1046): Include a vendored copy of Webrick, as it's no longer included in Ruby 3.
86
+ * [#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.
87
+ * [#1034](https://github.com/Shopify/shopify-cli/pull/1034): Abort if a system call fails.
55
88
 
56
89
  Version 1.5.0
57
90
  -----
58
- * [#965](https://github.com/Shopify/shopify-app-cli/pull/965): Remove --no-optional when using npm to create new project
59
- * [#958](https://github.com/Shopify/shopify-app-cli/pull/958): Split `connect` command into project-specific functionality
60
- * [#992](https://github.com/Shopify/shopify-app-cli/pull/992): Add Theme Kit functionality to CLI
91
+ * [#965](https://github.com/Shopify/shopify-cli/pull/965): Remove --no-optional when using npm to create new project
92
+ * [#958](https://github.com/Shopify/shopify-cli/pull/958): Split `connect` command into project-specific functionality
93
+ * [#992](https://github.com/Shopify/shopify-cli/pull/992): Add Theme Kit functionality to CLI
61
94
 
62
95
  Version 1.4.1
63
96
  ------
64
- * [#917](https://github.com/Shopify/shopify-app-cli/pull/917): Ensure analytics for create action includes the same fields as other commands
97
+ * [#917](https://github.com/Shopify/shopify-cli/pull/917): Ensure analytics for create action includes the same fields as other commands
65
98
 
66
99
  Version 1.4.0
67
100
  ------
68
101
  * Updates to tests, dependencies and internal tooling
69
- * [#924](https://github.com/Shopify/shopify-app-cli/pull/924): Improve debugging messages on Partner API errors
102
+ * [#924](https://github.com/Shopify/shopify-cli/pull/924): Improve debugging messages on Partner API errors
70
103
 
71
104
  Version 1.3.1
72
105
  ------
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.2)
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,114 @@
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
+ **Note:** Shopify CLI is the recommended and officially supported tool for developing themes and creating CI/CD workflows. Please refer to the [Theme Kit Migration Guide](https://github.com/Shopify/shopify-cli/blob/main/THEMEKIT_MIGRATION.md) for details.
105
+
106
+ ### Contributing
107
+
108
+ Shopify CLI is an [open source tool](https://github.com/Shopify/shopify-cli/blob/main/LICENSE) and everyone is welcome to help the community by [contributing](https://github.com/Shopify/shopify-cli/blob/main/.github/CONTRIBUTING.md) to the project.
109
+
110
+ ### Where to get help
111
+
112
+ - [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.
113
+
114
+ - [Shopify Community Forums](https://community.shopify.com/) - Visit our forums to connect with the community and learn more about Shopify CLI development.