shopify-cli 2.6.4 → 2.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) hide show
  1. checksums.yaml +4 -4
  2. data/.devcontainer.json +5 -0
  3. data/.github/DESIGN.md +1 -1
  4. data/.github/ISSUE_TEMPLATE.md +7 -0
  5. data/.gitignore +1 -0
  6. data/.vscode/extensions.json +5 -0
  7. data/.vscode/settings.json +9 -0
  8. data/CHANGELOG.md +35 -3
  9. data/CONTRIBUTING.md +1 -21
  10. data/{Dockerfile → Codespace.dockerfile} +11 -3
  11. data/Gemfile +1 -0
  12. data/Gemfile.lock +6 -4
  13. data/README.md +20 -99
  14. data/Rakefile +27 -0
  15. data/Tests.dockerfile +35 -0
  16. data/assets/logo.png +0 -0
  17. data/dev.yml +0 -3
  18. data/docs/README.md +13 -0
  19. data/docs/contributors/testing.md +27 -0
  20. data/docs/users/installation.md +46 -0
  21. data/{THEMEKIT_MIGRATION.md → docs/users/migrate-from-themekit.md} +1 -1
  22. data/ext/javy/javy.rb +186 -0
  23. data/ext/javy/version +1 -0
  24. data/lib/project_types/extension/cli.rb +7 -3
  25. data/lib/project_types/extension/commands/build.rb +1 -0
  26. data/lib/project_types/extension/commands/create.rb +6 -6
  27. data/lib/project_types/extension/commands/extension_command.rb +1 -1
  28. data/lib/project_types/extension/features/argo.rb +1 -8
  29. data/lib/project_types/extension/features/argo_serve.rb +9 -23
  30. data/lib/project_types/extension/forms/create.rb +1 -1
  31. data/lib/project_types/extension/forms/questions/ask_template.rb +3 -6
  32. data/lib/project_types/extension/messages/messages.rb +1 -0
  33. data/lib/project_types/extension/models/development_server_requirements.rb +2 -3
  34. data/lib/project_types/extension/models/server_config/app.rb +13 -0
  35. data/lib/project_types/extension/models/server_config/development.rb +5 -4
  36. data/lib/project_types/extension/models/server_config/development_renderer.rb +1 -1
  37. data/lib/project_types/extension/models/server_config/development_resource.rb +13 -0
  38. data/lib/project_types/extension/models/server_config/extension.rb +4 -0
  39. data/lib/project_types/extension/models/server_config/root.rb +4 -1
  40. data/lib/project_types/extension/tasks/convert_server_config.rb +65 -0
  41. data/lib/project_types/extension/tasks/ensure_resource_url.rb +39 -0
  42. data/lib/project_types/extension/tasks/find_package_from_json.rb +37 -0
  43. data/lib/project_types/extension/tasks/merge_server_config.rb +32 -0
  44. data/lib/project_types/extension/tasks/run_extension_command.rb +11 -10
  45. data/lib/project_types/node/cli.rb +0 -16
  46. data/lib/project_types/node/forms/create.rb +5 -5
  47. data/lib/project_types/node/messages/messages.rb +2 -144
  48. data/lib/project_types/php/cli.rb +0 -11
  49. data/lib/project_types/php/forms/create.rb +5 -6
  50. data/lib/project_types/php/messages/messages.rb +2 -161
  51. data/lib/project_types/rails/cli.rb +0 -16
  52. data/lib/project_types/rails/commands/create.rb +46 -17
  53. data/lib/project_types/rails/forms/create.rb +5 -7
  54. data/lib/project_types/rails/messages/messages.rb +6 -151
  55. data/lib/project_types/script/cli.rb +2 -1
  56. data/lib/project_types/script/commands/create.rb +2 -5
  57. data/lib/project_types/script/commands/javy.rb +31 -0
  58. data/lib/project_types/script/commands/push.rb +1 -1
  59. data/lib/project_types/script/config/extension_points.yml +3 -0
  60. data/lib/project_types/script/errors.rb +0 -18
  61. data/lib/project_types/script/layers/application/create_script.rb +2 -2
  62. data/lib/project_types/script/layers/domain/script_json.rb +1 -1
  63. data/lib/project_types/script/layers/infrastructure/api_clients/partners_proxy_api_client.rb +0 -4
  64. data/lib/project_types/script/layers/infrastructure/errors.rb +8 -3
  65. data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_task_runner.rb +22 -3
  66. data/lib/project_types/script/layers/infrastructure/languages/typescript_task_runner.rb +25 -0
  67. data/lib/project_types/script/layers/infrastructure/script_project_repository.rb +3 -4
  68. data/lib/project_types/script/layers/infrastructure/script_service.rb +1 -1
  69. data/lib/project_types/script/messages/messages.rb +16 -22
  70. data/lib/project_types/script/ui/error_handler.rb +1 -27
  71. data/lib/project_types/theme/cli.rb +1 -1
  72. data/lib/project_types/theme/commands/check.rb +1 -1
  73. data/lib/project_types/theme/commands/delete.rb +1 -1
  74. data/lib/project_types/theme/commands/init.rb +1 -1
  75. data/lib/project_types/theme/commands/language_server.rb +1 -1
  76. data/lib/project_types/theme/commands/package.rb +1 -1
  77. data/lib/project_types/theme/commands/publish.rb +1 -1
  78. data/lib/project_types/theme/commands/pull.rb +1 -1
  79. data/lib/project_types/theme/commands/push.rb +1 -1
  80. data/lib/project_types/theme/commands/serve.rb +9 -2
  81. data/lib/project_types/theme/messages/messages.rb +30 -1
  82. data/lib/shopify_cli/admin_api/populate_resource_command.rb +1 -1
  83. data/lib/shopify_cli/api.rb +7 -2
  84. data/lib/shopify_cli/app_type_detector.rb +24 -20
  85. data/lib/shopify_cli/command/app_sub_command.rb +10 -0
  86. data/lib/shopify_cli/command/project_command.rb +18 -0
  87. data/lib/shopify_cli/command/sub_command.rb +19 -0
  88. data/lib/shopify_cli/command.rb +7 -2
  89. data/lib/shopify_cli/commands/app/connect.rb +22 -0
  90. data/lib/shopify_cli/commands/app/create/node.rb +38 -0
  91. data/lib/shopify_cli/commands/app/create/php.rb +36 -0
  92. data/lib/shopify_cli/commands/app/create/rails.rb +40 -0
  93. data/lib/shopify_cli/commands/app/create.rb +28 -0
  94. data/lib/shopify_cli/commands/app/deploy.rb +49 -0
  95. data/lib/shopify_cli/commands/app/open.rb +19 -0
  96. data/lib/shopify_cli/commands/app/serve.rb +49 -0
  97. data/lib/shopify_cli/commands/app/tunnel.rb +43 -0
  98. data/lib/shopify_cli/commands/app.rb +29 -0
  99. data/lib/shopify_cli/commands/config.rb +2 -2
  100. data/lib/shopify_cli/commands.rb +1 -0
  101. data/lib/shopify_cli/constants.rb +4 -0
  102. data/lib/shopify_cli/exception_reporter.rb +8 -6
  103. data/lib/shopify_cli/git.rb +12 -1
  104. data/lib/shopify_cli/github/issue_url_generator.rb +19 -0
  105. data/lib/shopify_cli/github.rb +5 -0
  106. data/lib/shopify_cli/messages/messages.rb +253 -9
  107. data/lib/shopify_cli/migrator.rb +9 -11
  108. data/lib/shopify_cli/project.rb +5 -1
  109. data/lib/shopify_cli/project_commands.rb +1 -1
  110. data/lib/shopify_cli/services/app/connect_service.rb +25 -0
  111. data/lib/shopify_cli/services/app/create/node_service.rb +155 -0
  112. data/lib/shopify_cli/services/app/create/php_service.rb +152 -0
  113. data/lib/shopify_cli/services/app/create/rails_service.rb +215 -0
  114. data/lib/shopify_cli/services/app/deploy/heroku/node_service.rb +101 -0
  115. data/lib/shopify_cli/services/app/deploy/heroku/php_service.rb +135 -0
  116. data/lib/shopify_cli/services/app/deploy/heroku/rails_service.rb +120 -0
  117. data/lib/shopify_cli/services/app/open_service.rb +19 -0
  118. data/lib/shopify_cli/services/app/serve/node_service.rb +42 -0
  119. data/lib/shopify_cli/services/app/serve/php_service.rb +46 -0
  120. data/lib/shopify_cli/services/app/serve/rails_service.rb +48 -0
  121. data/lib/shopify_cli/services/app/tunnel/auth_service.rb +21 -0
  122. data/lib/shopify_cli/services/app/tunnel/start_service.rb +20 -0
  123. data/lib/shopify_cli/services/app/tunnel/stop_service.rb +20 -0
  124. data/lib/shopify_cli/services.rb +31 -0
  125. data/lib/shopify_cli/theme/dev_server/local_assets.rb +1 -1
  126. data/lib/shopify_cli/theme/dev_server.rb +35 -17
  127. data/lib/shopify_cli/tunnel.rb +25 -20
  128. data/lib/shopify_cli/version.rb +1 -1
  129. data/lib/shopify_cli.rb +1 -2
  130. data/shopify-cli.gemspec +2 -6
  131. data/shopify-dev +18 -0
  132. data/utilities/constants.rb +7 -0
  133. data/utilities/docker/container.rb +30 -2
  134. data/utilities/docker.rb +3 -2
  135. data/utilities/utilities.rb +1 -0
  136. data/vendor/deps/cli-kit/lib/cli/kit/system.rb +1 -1
  137. metadata +56 -53
  138. data/docs/_config.yml +0 -2
  139. data/docs/app/node/commands/index.md +0 -4
  140. data/docs/app/node/index.md +0 -4
  141. data/docs/app/rails/commands/index.md +0 -4
  142. data/docs/app/rails/index.md +0 -4
  143. data/docs/core/index.md +0 -4
  144. data/docs/getting-started/index.md +0 -4
  145. data/docs/getting-started/install/index.md +0 -4
  146. data/docs/getting-started/migrate/index.md +0 -4
  147. data/docs/getting-started/uninstall/index.md +0 -4
  148. data/docs/getting-started/upgrade/index.md +0 -4
  149. data/docs/help/start-app/index.md +0 -4
  150. data/docs/index.md +0 -4
  151. data/ext/shopify-cli/extconf.rb +0 -60
  152. data/install.sh +0 -7
  153. data/lib/project_types/extension/tasks/converters/server_config_converter.rb +0 -31
  154. data/lib/project_types/extension/tasks/load_server_config.rb +0 -23
  155. data/lib/project_types/node/commands/connect.rb +0 -21
  156. data/lib/project_types/node/commands/create.rb +0 -125
  157. data/lib/project_types/node/commands/deploy/heroku.rb +0 -96
  158. data/lib/project_types/node/commands/deploy.rb +0 -32
  159. data/lib/project_types/node/commands/generate.rb +0 -22
  160. data/lib/project_types/node/commands/open.rb +0 -18
  161. data/lib/project_types/node/commands/serve.rb +0 -45
  162. data/lib/project_types/node/commands/tunnel.rb +0 -41
  163. data/lib/project_types/php/commands/connect.rb +0 -19
  164. data/lib/project_types/php/commands/create.rb +0 -143
  165. data/lib/project_types/php/commands/deploy/heroku.rb +0 -129
  166. data/lib/project_types/php/commands/deploy.rb +0 -32
  167. data/lib/project_types/php/commands/open.rb +0 -16
  168. data/lib/project_types/php/commands/serve.rb +0 -48
  169. data/lib/project_types/php/commands/tunnel.rb +0 -37
  170. data/lib/project_types/rails/commands/connect.rb +0 -21
  171. data/lib/project_types/rails/commands/deploy/heroku.rb +0 -115
  172. data/lib/project_types/rails/commands/deploy.rb +0 -32
  173. data/lib/project_types/rails/commands/generate/webhook.rb +0 -42
  174. data/lib/project_types/rails/commands/generate.rb +0 -60
  175. data/lib/project_types/rails/commands/open.rb +0 -18
  176. data/lib/project_types/rails/commands/serve.rb +0 -51
  177. data/lib/project_types/rails/commands/tunnel.rb +0 -41
  178. data/lib/project_types/script/graphql/app_script_update_or_create.graphql +0 -0
  179. data/lib/shopify_cli/sub_command.rb +0 -17
  180. data/shopify.fish +0 -12
  181. data/shopify.sh +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51b5808e81e2d168620af088bec6f155869a9870b516960927735f9b7b886e55
4
- data.tar.gz: 47c04e0dbabd30bb2c03e8c99771e724e16fe7c336fd342be01540749088bee5
3
+ metadata.gz: 6009a6f735f27532db922768483b5563cc1a89417742616d0712837f7a4c3f8a
4
+ data.tar.gz: 501ee710f57e5ffc27f7f9abfbb23e155a55da8f67127bfe32031c46fa2df08e
5
5
  SHA512:
6
- metadata.gz: d75f831a6214930264f60c6c5699beddba9ae73c834878723b2b6c764a5e98d30e427183fa6946fdf57c45a90859cc0a4bbd5420616a72b2f340c0c91093a430
7
- data.tar.gz: b73c3d43b0a711994930c0490de71bfeeeff0775b5e0ce6efc48c8c40935b630e5d0ed7182d6eb20188357199a469325b7b40f6cbf317dccb34655745e315ef6
6
+ metadata.gz: 783329de6e2b6481c6ebcd747284dcd5e3c81c4303bf82f1d9a22e2e5f9a81aeda51a211c0344636ec03ff17fa1e5aae492fd750540387c85de4204bab8f4327
7
+ data.tar.gz: 6af49d1fff422d17362c2e05f68341fc530cd7849f7d375a39ea8cb5abcb5d825ed8a4f04d8f25cc9265c9b2660c57b028be280db23882d58506e7c184b0d4cc
@@ -0,0 +1,5 @@
1
+ {
2
+ "build": {
3
+ "dockerfile": "Codespace.dockerfile"
4
+ },
5
+ }
data/.github/DESIGN.md CHANGED
@@ -30,7 +30,7 @@ The user understands the following mechanics of a CLI:
30
30
  When creating a new command or subcommand there are a few things to keep in mind.
31
31
 
32
32
  ### What is the quickest way to execute a command?
33
- Commands are best executed autonomously. Most of the time the command should be self contained and should not requre additional input from the user. For example when running `shopify populate products` the command will execute without additional inputs required from the user even though the command could ask for things like `product name`, `price`, etc.
33
+ Commands are best executed autonomously. Most of the time the command should be self contained and should not require additional input from the user. For example when running `shopify populate products` the command will execute without additional inputs required from the user even though the command could ask for things like `product name`, `price`, etc.
34
34
 
35
35
  When creating a new command or subcommand consider how much information is absolutely necessary for the command to execute autonomously. If a command always requires arguments or additional information then adding smart defaults could help make inputting the command faster.
36
36
 
@@ -25,6 +25,13 @@ Tip: include an error message (in a `<details></details>` tag) if your issue is
25
25
  1.
26
26
 
27
27
 
28
+ ## Stacktrace
29
+
30
+ <!--Stacktrace
31
+ Add any stacktrace that might help debug the reported issue.
32
+ Otherwise, delete this section.
33
+ -->
34
+
28
35
 
29
36
  ## Specifications
30
37
 
data/.gitignore CHANGED
@@ -21,4 +21,5 @@ packaging/rpm/build
21
21
  packaging/rpm/shopify-cli.spec
22
22
  .byebug_history
23
23
  ext/shopify-extensions/shopify-extensions
24
+ ext/javy/bin
24
25
  .console_history
@@ -0,0 +1,5 @@
1
+ {
2
+ "recommendations": [
3
+ "dracula-theme.theme-dracula",
4
+ ]
5
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "files.exclude": {
3
+ "**/.git": true,
4
+ "**/node_modules": true,
5
+ "**/.DS_Store": true
6
+ },
7
+ "editor.formatOnSave": false,
8
+ "workbench.colorTheme": "Dracula Soft",
9
+ }
data/CHANGELOG.md CHANGED
@@ -1,6 +1,37 @@
1
1
  From version 2.6.0, the sections in this file adhere to the [keep a changelog](https://keepachangelog.com/en/1.0.0/) specification.
2
2
  ## [Unreleased]
3
3
 
4
+ ## Version 2.7.1
5
+ ### Fixed
6
+ * [#1722](https://github.com/Shopify/shopify-cli/pull/1722): Fix `theme serve` failing when the port is already being used
7
+ * [#1751](https://github.com/Shopify/shopify-cli/pull/1751): A bug in the app creation flow that caused the CLI to abort when the form validation failed.
8
+ * [#1750](https://github.com/Shopify/shopify-cli/pull/1750): Runtime errors in Windows' environments when the `PATHEXT` environment variable is not defined.
9
+ * [#1758](https://github.com/Shopify/shopify-cli/pull/1758): Fix tunnel creation for expired anonymous tunnels
10
+
11
+ ## Version 2.7.0
12
+ ### Changed
13
+ * [#1650](https://github.com/Shopify/shopify-cli/pull/1650): **Breaking** Move app commands under `shopify app`.
14
+
15
+ ### Fixed
16
+ * [#1714](https://github.com/Shopify/shopify-cli/pull/1714): Fix theme serve not serving assets locally when two URLs are on the same line
17
+ * [#1729](https://github.com/Shopify/shopify-cli/pull/1729): Update theme-check to 1.8.0
18
+
19
+ ## Version 2.6.6
20
+ ### Added
21
+ * [#1609](https://github.com/Shopify/shopify-cli/pull/1609): Add `--http-bind=HOST` option to `shopify theme serve`.
22
+
23
+ ### Fixed
24
+ * [#1678](https://github.com/Shopify/shopify-cli/pull/1678): Fix migrator's incompatibility with Ruby 2.5.
25
+ * [#1690](https://github.com/Shopify/shopify-cli/pull/1690): Fix `extension push` command for `PRODUCT_SUBSCRIPTION` extensions
26
+
27
+ ### Changed
28
+ * [#1678](https://github.com/Shopify/shopify-cli/pull/1678): Change the `@shopify/scripts-checkout-apis-temp` package name to `@shopify/scripts-discount-apis`.
29
+
30
+ ### Removed
31
+ * [#1664](https://github.com/Shopify/shopify-cli/pull/1664): Remove ruby-locking extension
32
+ ## Version 2.6.5
33
+ ### Fixed
34
+ * [#1661](https://github.com/Shopify/shopify-cli/pull/1661): Handle npm list non-zero exit status when pushing scripts
4
35
  ## Version 2.6.4
5
36
  ### Fixed
6
37
  * [#1633](https://github.com/Shopify/shopify-cli/pull/1633): Runtime error when the shop passed on login is invalid
@@ -14,6 +45,7 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
14
45
 
15
46
  ### Changed
16
47
  * [#1635](https://github.com/Shopify/shopify-cli/pull/1635): Automatic usage and error reporting configuration has been unified under `analytics.enabled`.
48
+
17
49
  ### Security
18
50
 
19
51
  ## Version 2.6.3
@@ -21,7 +53,7 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
21
53
 
22
54
  ## Version 2.6.2
23
55
  * Fix broken installation due to a missing variable in `extconf.rb`
24
-
56
+
25
57
  ## Version 2.6.1
26
58
  * [#1608](https://github.com/Shopify/shopify-cli/pull/1608): Fix errors not being reported.
27
59
  ## Version 2.6.0
@@ -37,11 +69,11 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
37
69
  * [#1553](https://github.com/Shopify/shopify-cli/pull/1553): Add support for PHP app projects
38
70
 
39
71
  ## Version 2.4.0
40
- * [#1488](https://github.com/Shopify/shopify-cli/pull/1488): Update Theme-Check to 1.4
72
+ * [#1488](https://github.com/Shopify/shopify-cli/pull/1488): Update theme-check to 1.4
41
73
  * [#1507](https://github.com/Shopify/shopify-cli/pull/1507): Limit the generated name for themes to 50 characters
42
74
 
43
75
  ## Version 2.3.0
44
- * [#1386](https://github.com/Shopify/shopify-cli/pull/1386): Update Theme-Check to 1.2
76
+ * [#1386](https://github.com/Shopify/shopify-cli/pull/1386): Update theme-check to 1.2
45
77
  * [#1457](https://github.com/Shopify/shopify-cli/pull/1457): Fix uploading of binary theme files under Windows
46
78
  * [#1480](https://github.com/Shopify/shopify-cli/pull/1480): Fix customers pages not working with `theme serve`
47
79
  * [#1479](https://github.com/Shopify/shopify-cli/pull/1479): Add theme push & pull option to ignore files per command
data/CONTRIBUTING.md CHANGED
@@ -1,23 +1,3 @@
1
1
  # Contributing
2
2
 
3
- This documents includes guidelines for contributors.
4
-
5
- ## Testing
6
-
7
- The project employs a diverse suite tests that help ensure it works as intended and prevents regressions as it continues to grow and evolve.
8
-
9
- ### Unit Tests
10
- Most of the internal components the project uses have unit tests to thoroughly test them. Here dependencies of components are mocked or stubbed appropriately to ensure tests are reliable, test only one component and are fast!
11
-
12
- ### Acceptance Tests
13
-
14
- Acceptance tests run the built `shopify` command line against a wide range of fixtures and verify its output and results. They are the slowest to run however provide the most coverage. The idea is to test a few complete scenarios for each major feature.
15
-
16
- Those are written in [Cucumber](https://cucumber.io/) and Ruby and can be found in the [`features/`](/features) directory. They can be executed by running
17
-
18
- ```bash
19
- bundle exec cucumber
20
- bundle exec cucumber features/theme.feature:3 # A specific test
21
- ```
22
-
23
- > **Note** that we currently don't have an approach for stubbing the interactions with the GraphQL APIs and that therefore we can't write acceptance tests for commands that interact with APIs.
3
+ Check out the [contributors' documentation](/docs)
@@ -6,8 +6,7 @@ FROM cimg/ruby:2.7.1
6
6
  RUN git config --global user.email "development-lifecycle@shopify.com"
7
7
  RUN git config --global user.name "Development Lifecycle"
8
8
 
9
- # throw errors if Gemfile has been modified since Gemfile.lock
10
- RUN bundle config --global frozen 1
9
+ RUN gem update bundler
11
10
 
12
11
  WORKDIR /usr/src/app
13
12
 
@@ -24,4 +23,13 @@ RUN sudo apt-get install git -y
24
23
  # Install the latest version of NodeJS
25
24
  RUN sudo apt-get install ca-certificates -y
26
25
  RUN curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
27
- RUN sudo apt-get install -y nodejs
26
+ RUN sudo apt-get install -y nodejs
27
+
28
+ # Install the latest version of Yarn
29
+ RUN sudo npm install --global yarn
30
+
31
+ # Python is necessary to compile NPM packages with native extensions through node-gyp
32
+ RUN sudo apt install python-minimal -y
33
+
34
+ # Install sqlite3
35
+ RUN sudo apt-get install libsqlite3-dev -y
data/Gemfile CHANGED
@@ -14,6 +14,7 @@ group :development, :test do
14
14
  gem "rubocop-minitest", require: false
15
15
  gem "rubocop-rake", require: false
16
16
  gem "iniparse", "~> 1.5"
17
+ gem "colorize", "~> 0.8.1"
17
18
  end
18
19
 
19
20
  group :test do
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shopify-cli (2.6.4)
4
+ shopify-cli (2.7.1)
5
5
  bugsnag (~> 6.22)
6
6
  listen (~> 3.7.0)
7
- theme-check (~> 1.7.2)
7
+ theme-check (~> 1.8.0)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
@@ -18,6 +18,7 @@ GEM
18
18
  builder (3.2.4)
19
19
  byebug (11.1.3)
20
20
  coderay (1.1.3)
21
+ colorize (0.8.1)
21
22
  concurrent-ruby (1.1.9)
22
23
  crack (0.4.5)
23
24
  rexml
@@ -89,7 +90,7 @@ GEM
89
90
  byebug (~> 11.0)
90
91
  pry (~> 0.13.0)
91
92
  public_suffix (4.0.6)
92
- racc (1.5.2)
93
+ racc (1.6.0)
93
94
  rack (2.2.3)
94
95
  rainbow (3.0.0)
95
96
  rake (13.0.6)
@@ -118,7 +119,7 @@ GEM
118
119
  ruby-progressbar (1.11.0)
119
120
  sys-uname (1.2.2)
120
121
  ffi (~> 1.1)
121
- theme-check (1.7.2)
122
+ theme-check (1.8.0)
122
123
  liquid (>= 5.1.0)
123
124
  nokogiri (>= 1.12)
124
125
  parser (~> 3)
@@ -135,6 +136,7 @@ PLATFORMS
135
136
  DEPENDENCIES
136
137
  bundler (~> 2.2.2)
137
138
  byebug
139
+ colorize (~> 0.8.1)
138
140
  cucumber (~> 7.0)
139
141
  fakefs (>= 1.0)
140
142
  iniparse (~> 1.5)
data/README.md CHANGED
@@ -1,113 +1,34 @@
1
- # Shopify CLI
2
-
3
- [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE.md)
4
- [![Build Status](https://github.com/Shopify/shopify-cli/workflows/CI/badge.svg)](https://github.com/Shopify/shopify-cli/actions)
1
+ <div align="center">
2
+ <img src="assets/logo.png" width="150"/>
3
+ <h1>Shopify CLI</h1>
4
+ <a href=""><img src="https://github.com/shopify/shopify-cli/workflows/CI/badge.svg" alt="Shopify"></a>
5
+ <img src="https://img.shields.io/github/v/release/shopify/shopify-cli?include_prereleases&style=flat-square" alt="Latest Version">
6
+ <img src="https://img.shields.io/github/forks/shopify/shopify-cli?style=flat-square" alt="GitHub forks">
7
+ <img src="https://img.shields.io/github/stars/shopify/shopify-cli?style=flat-square" alt="GitHub stars">
8
+ <img src="https://img.shields.io/github/commit-activity/w/shopify/shopify-cli?style=flat-square" alt="Commit Activity">
9
+ <img src="https://img.shields.io/github/contributors/shopify/shopify-cli?style=flat-square" alt="Contributors">
10
+ <img src="https://img.shields.io/github/commits-since/shopify/shopify-cli/latest?style=flat-square" alt="Latest Commits">
11
+ <a href="http://twitter.com/ShopifyDevs"><img src="https://img.shields.io/twitter/follow/ShopifyDevs?style=flat-square" alt="Twitter Followers"></a>
12
+ <img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License">
13
+ <img src="https://img.shields.io/badge/Powered%20by-Ruby-red" alt="Powered by Ruby">
14
+ </div>
5
15
 
6
16
 
7
17
  Shopify CLI helps you build Shopify themes and apps. Use Shopify CLI to automate and enhance your local development workflow.
8
18
 
9
19
  Shopify CLI is available as a gem and can be run and installed on Mac, Linux and Windows systems.
10
20
 
11
- ## Installation for Mac OS Users
12
-
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
-
19
- ### To upgrade Shopify CLI
20
-
21
- #### Homebrew (Mac OS)
22
-
23
- ```shell
24
- $ brew update
25
- $ brew upgrade shopify-cli
26
- ```
27
-
28
- #### apt (Debian, Ubuntu)
29
-
30
- 1.- Download the latest `.deb` binary for Shopify CLI from the releases page.
31
-
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:
33
-
34
- ```shell
35
- $ sudo apt install /path/to/downloaded/shopify-cli-x.y.z.deb
36
- ```
37
-
38
- #### yum (CentOS 8+, Fedora, Red Hat, SUSE)
39
-
40
- 1.- Download the latest .rpm file for Shopify App CLI from the releases page.
41
-
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:
43
-
44
- ```shell
45
- $ sudo yum install /path/to/downloaded/shopify-cli-x.y.x.rpm
46
- ```
47
-
48
- #### RubyGems (macOS, Linux, Windows 10)
49
-
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 init`
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`
21
+ ## Installation
101
22
 
102
- To start the server. The server includes hot reload for CSS & Sections.
23
+ Check out our [installation steps](docs/users/installation.md).
103
24
 
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.
25
+ ## Contributing 👩‍💻
105
26
 
106
- ### Contributing
27
+ Shopify CLI is an [open source tool](/LICENSE) and everyone is welcome to help the community by [contributing](/docs/README.md) to the project.
107
28
 
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.
29
+ ## Help 🖐
109
30
 
110
- ### Where to get help
31
+ If you encounter issues using the CLI or have feedback you'd like to share with us, below are some options:
111
32
 
112
33
  - [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
34
 
data/Rakefile CHANGED
@@ -146,6 +146,33 @@ namespace :extensions do
146
146
  end
147
147
  end
148
148
 
149
+ namespace :scripts do
150
+ namespace :javy do
151
+ task :symlink do
152
+ source = Paths.root("..", "javy", "target", "release", "javy")
153
+ error("Unable to find javy executable: #{executable}") unless File.executable?(source)
154
+ target = Paths.javy("javy")
155
+ File.delete(target) if File.exist?(target)
156
+ File.symlink(source, target)
157
+ end
158
+
159
+ task :install do
160
+ require_relative Paths.javy("javy.rb")
161
+ Javy.install
162
+ end
163
+
164
+ module Paths
165
+ def self.javy(*args)
166
+ root("ext", "javy", *args)
167
+ end
168
+
169
+ def self.root(*args)
170
+ Pathname(File.dirname(__FILE__)).join(*args).to_s
171
+ end
172
+ end
173
+ end
174
+ end
175
+
149
176
  def error(message, output: STDERR, code: 1)
150
177
  output.puts(message)
151
178
  exit(code)
data/Tests.dockerfile ADDED
@@ -0,0 +1,35 @@
1
+ # This is a Docker image to test the CLI in UNIX environments other than macOS
2
+ # Build the image: docker build . -t shopify-cli
3
+ # Run tests: docker run -t --rm --volume "$(pwd):/usr/src/app" shopify-cli bundle exec rake test
4
+ FROM cimg/ruby:2.7.1
5
+
6
+ RUN git config --global user.email "development-lifecycle@shopify.com"
7
+ RUN git config --global user.name "Development Lifecycle"
8
+
9
+ RUN gem update bundler
10
+
11
+ WORKDIR /usr/src/app
12
+
13
+ COPY Gemfile Gemfile.lock ./
14
+ COPY shopify-cli.gemspec shopify-cli.gemspec
15
+ COPY lib/shopify_cli/version.rb lib/shopify_cli/version.rb
16
+ RUN bundle install
17
+
18
+ # Update git
19
+ RUN sudo add-apt-repository -y ppa:git-core/ppa
20
+ RUN sudo apt-get update
21
+ RUN sudo apt-get install git -y
22
+
23
+ # Install the latest version of NodeJS
24
+ RUN sudo apt-get install ca-certificates -y
25
+ RUN curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
26
+ RUN sudo apt-get install -y nodejs
27
+
28
+ # Install the latest version of Yarn
29
+ RUN sudo npm install --global yarn
30
+
31
+ # Python is necessary to compile NPM packages with native extensions through node-gyp
32
+ RUN sudo apt install python-minimal -y
33
+
34
+ # Install sqlite3
35
+ RUN sudo apt-get install libsqlite3-dev -y
data/assets/logo.png ADDED
Binary file
data/dev.yml CHANGED
@@ -13,9 +13,6 @@ up:
13
13
  - rpm:
14
14
  version: 4.16.1.3
15
15
  - bundler
16
- - node:
17
- version: 14.9.0
18
- yarn: true
19
16
  - docker
20
17
 
21
18
  test:
data/docs/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # Documentation
2
+
3
+ This directory contains documentation for **contributors** of the Shopify CLI.
4
+ It also contains documentation that is relevant to **users** like migration guidelines.
5
+
6
+ ## Contributors
7
+
8
+ - [**Testing**](contributors/testing.md): Read about testing strategies and how they are used across the codebase.
9
+
10
+ ## Users
11
+
12
+ - [**Installation**](users/installation.md): Learn how to install the Shopify CLI in different OSs.
13
+ - [**Migrate from theme-kit**](users/migrate-from-themekit.md): If you were previously using theme-kit, check out this documentation to learn how to migrate to the Shopify CLI theme commands.
@@ -0,0 +1,27 @@
1
+ ## Testing
2
+
3
+ The project employs a diverse suite tests that help ensure it works as intended and prevents regressions as it continues to grow and evolve.
4
+
5
+ ### Unit Tests
6
+ Most of the internal components the project uses have unit tests to thoroughly test them. Here dependencies of components are mocked or stubbed appropriately to ensure tests are reliable, test only one component and are fast!
7
+
8
+ ### Acceptance Tests
9
+
10
+ Acceptance tests run the built `shopify` command line against a wide range of fixtures and verify its output and results. They are the slowest to run however provide the most coverage. The idea is to test a few complete scenarios for each major feature.
11
+
12
+ Those are written in [Cucumber](https://cucumber.io/) and Ruby and can be found in the [`features/`](/features) directory. They can be executed by running:
13
+
14
+ ```bash
15
+ bundle exec cucumber
16
+ bundle exec cucumber features/theme.feature:3 # A specific test
17
+ ```
18
+
19
+ > **Note** that we currently don't have an approach for stubbing the interactions with the GraphQL APIs and that therefore we can't write acceptance tests for commands that interact with APIs.
20
+
21
+ #### Debugging acceptance tests
22
+ When developing acceptance tests, it can be helpful to see the outputs of running commands.
23
+ To see outputs, append `--verbose` when running an acceptance test. Example:
24
+
25
+ ```sh
26
+ bundle exec cucumber features/theme.feature --verbose
27
+ ```
@@ -0,0 +1,46 @@
1
+ # Installation
2
+
3
+ ## Installation through RubyGems
4
+
5
+ The easiest method to install the Shopify CLI is through RubyGems:
6
+
7
+ ```shell
8
+ $ gem install shopify-cli
9
+ ```
10
+
11
+ ## Installation for macOS Users
12
+
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
+
19
+ ### To upgrade Shopify CLI
20
+
21
+ #### Homebrew (Mac OS)
22
+
23
+ ```shell
24
+ $ brew update
25
+ $ brew upgrade shopify-cli
26
+ ```
27
+
28
+ ## Installation for Debian and Ubuntu users through `apt`
29
+
30
+ 1.- Download the latest `.deb` binary for Shopify CLI from the releases page.
31
+
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:
33
+
34
+ ```shell
35
+ $ sudo apt install /path/to/downloaded/shopify-cli-x.y.z.deb
36
+ ```
37
+
38
+ ## Installation for CentOS 8+, Fedora, Red Hat, and SUSE users through `yum`
39
+
40
+ 1.- Download the latest .rpm file for Shopify App CLI from the releases page.
41
+
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:
43
+
44
+ ```shell
45
+ $ sudo yum install /path/to/downloaded/shopify-cli-x.y.x.rpm
46
+ ```
@@ -1,4 +1,4 @@
1
- # Theme Kit Migration
1
+ # Migrate from Theme Kit
2
2
 
3
3
  Shopify CLI is the recommended and officially supported tool for developing Themes and creating CI/CD workflows.
4
4