shopify-cli 2.2.2 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +1 -0
  3. data/.github/ISSUE_TEMPLATE.md +0 -4
  4. data/.github/workflows/shopify.yml +104 -0
  5. data/.gitignore +3 -0
  6. data/.rubocop.yml +14 -14
  7. data/.rubocop_todo.yml +3 -3
  8. data/CHANGELOG.md +30 -0
  9. data/CONTRIBUTING.md +23 -0
  10. data/Dockerfile +17 -0
  11. data/Gemfile +1 -0
  12. data/Gemfile.lock +67 -24
  13. data/RELEASING.md +1 -1
  14. data/Rakefile +75 -18
  15. data/bin/console +11 -0
  16. data/bin/shopify +16 -4
  17. data/dev.yml +14 -1
  18. data/ext/shopify-cli/extconf.rb +2 -0
  19. data/ext/shopify-extensions/extconf.rb +21 -0
  20. data/ext/shopify-extensions/shopify_extensions.rb +152 -0
  21. data/ext/shopify-extensions/version +1 -0
  22. data/lib/project_types/extension/cli.rb +19 -3
  23. data/lib/project_types/extension/commands/build.rb +32 -3
  24. data/lib/project_types/extension/commands/check.rb +2 -2
  25. data/lib/project_types/extension/commands/connect.rb +1 -1
  26. data/lib/project_types/extension/commands/create.rb +59 -16
  27. data/lib/project_types/extension/commands/extension_command.rb +1 -1
  28. data/lib/project_types/extension/commands/info.rb +1 -1
  29. data/lib/project_types/extension/commands/push.rb +1 -1
  30. data/lib/project_types/extension/commands/register.rb +2 -2
  31. data/lib/project_types/extension/commands/serve.rb +5 -5
  32. data/lib/project_types/extension/commands/tunnel.rb +6 -6
  33. data/lib/project_types/extension/extension_project.rb +4 -4
  34. data/lib/project_types/extension/features/argo.rb +3 -3
  35. data/lib/project_types/extension/features/argo_config.rb +5 -5
  36. data/lib/project_types/extension/features/argo_serve.rb +21 -6
  37. data/lib/project_types/extension/features/argo_setup.rb +1 -1
  38. data/lib/project_types/extension/features/argo_setup_step.rb +1 -1
  39. data/lib/project_types/extension/features/argo_setup_steps.rb +2 -2
  40. data/lib/project_types/extension/forms/connect.rb +2 -2
  41. data/lib/project_types/extension/forms/create.rb +6 -3
  42. data/lib/project_types/extension/forms/questions/ask_app.rb +2 -2
  43. data/lib/project_types/extension/forms/questions/ask_name.rb +1 -1
  44. data/lib/project_types/extension/forms/questions/ask_registration.rb +2 -2
  45. data/lib/project_types/extension/forms/questions/ask_template.rb +44 -0
  46. data/lib/project_types/extension/forms/questions/ask_type.rb +2 -2
  47. data/lib/project_types/extension/messages/message_loading.rb +2 -2
  48. data/lib/project_types/extension/messages/messages.rb +3 -0
  49. data/lib/project_types/extension/models/development_server.rb +78 -0
  50. data/lib/project_types/extension/models/development_server_requirements.rb +35 -0
  51. data/lib/project_types/extension/models/lazy_specification_handler.rb +1 -1
  52. data/lib/project_types/extension/models/server_config/base.rb +31 -0
  53. data/lib/project_types/extension/models/server_config/development.rb +23 -0
  54. data/lib/project_types/extension/models/server_config/development_entries.rb +38 -0
  55. data/lib/project_types/extension/models/server_config/development_renderer.rb +30 -0
  56. data/lib/project_types/extension/models/server_config/extension.rb +35 -0
  57. data/lib/project_types/extension/models/server_config/root.rb +18 -0
  58. data/lib/project_types/extension/models/server_config/user.rb +10 -0
  59. data/lib/project_types/extension/models/specification.rb +1 -1
  60. data/lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb +1 -1
  61. data/lib/project_types/extension/models/specification_handlers/default.rb +14 -2
  62. data/lib/project_types/extension/models/specification_handlers/theme_app_extension.rb +1 -1
  63. data/lib/project_types/extension/models/specifications.rb +4 -4
  64. data/lib/project_types/extension/tasks/choose_next_available_port.rb +2 -2
  65. data/lib/project_types/extension/tasks/configure_features.rb +1 -1
  66. data/lib/project_types/extension/tasks/configure_options.rb +1 -1
  67. data/lib/project_types/extension/tasks/converters/product_converter.rb +1 -1
  68. data/lib/project_types/extension/tasks/converters/server_config_converter.rb +31 -0
  69. data/lib/project_types/extension/tasks/create_extension.rb +2 -2
  70. data/lib/project_types/extension/tasks/fetch_specifications.rb +2 -2
  71. data/lib/project_types/extension/tasks/find_npm_packages.rb +5 -5
  72. data/lib/project_types/extension/tasks/get_app.rb +2 -2
  73. data/lib/project_types/extension/tasks/get_apps.rb +2 -2
  74. data/lib/project_types/extension/tasks/get_extensions.rb +2 -2
  75. data/lib/project_types/extension/tasks/get_product.rb +2 -2
  76. data/lib/project_types/extension/tasks/load_server_config.rb +23 -0
  77. data/lib/project_types/extension/tasks/run_extension_command.rb +81 -0
  78. data/lib/project_types/extension/tasks/update_draft.rb +2 -2
  79. data/lib/project_types/node/cli.rb +3 -3
  80. data/lib/project_types/node/commands/connect.rb +4 -4
  81. data/lib/project_types/node/commands/create.rb +10 -14
  82. data/lib/project_types/node/commands/deploy/heroku.rb +4 -4
  83. data/lib/project_types/node/commands/deploy.rb +3 -3
  84. data/lib/project_types/node/commands/generate.rb +2 -2
  85. data/lib/project_types/node/commands/open.rb +3 -3
  86. data/lib/project_types/node/commands/serve.rb +15 -7
  87. data/lib/project_types/node/commands/tunnel.rb +6 -6
  88. data/lib/project_types/node/forms/create.rb +3 -3
  89. data/lib/project_types/node/messages/messages.rb +3 -0
  90. data/lib/project_types/php/cli.rb +27 -0
  91. data/lib/project_types/php/commands/connect.rb +19 -0
  92. data/lib/project_types/php/commands/create.rb +143 -0
  93. data/lib/project_types/php/commands/deploy/heroku.rb +129 -0
  94. data/lib/project_types/php/commands/deploy.rb +32 -0
  95. data/lib/project_types/php/commands/open.rb +16 -0
  96. data/lib/project_types/php/commands/serve.rb +51 -0
  97. data/lib/project_types/php/commands/tunnel.rb +37 -0
  98. data/lib/project_types/php/forms/create.rb +45 -0
  99. data/lib/project_types/php/messages/messages.rb +191 -0
  100. data/lib/project_types/rails/cli.rb +3 -3
  101. data/lib/project_types/rails/commands/connect.rb +4 -4
  102. data/lib/project_types/rails/commands/create.rb +12 -16
  103. data/lib/project_types/rails/commands/deploy/heroku.rb +4 -4
  104. data/lib/project_types/rails/commands/deploy.rb +3 -3
  105. data/lib/project_types/rails/commands/generate/webhook.rb +3 -3
  106. data/lib/project_types/rails/commands/generate.rb +3 -3
  107. data/lib/project_types/rails/commands/open.rb +3 -3
  108. data/lib/project_types/rails/commands/serve.rb +8 -8
  109. data/lib/project_types/rails/commands/tunnel.rb +6 -6
  110. data/lib/project_types/rails/forms/create.rb +3 -3
  111. data/lib/project_types/rails/gem.rb +1 -1
  112. data/lib/project_types/rails/ruby.rb +1 -1
  113. data/lib/project_types/script/cli.rb +16 -6
  114. data/lib/project_types/script/commands/create.rb +4 -2
  115. data/lib/project_types/script/commands/push.rb +2 -2
  116. data/lib/project_types/script/config/extension_points.yml +30 -29
  117. data/lib/project_types/script/forms/create.rb +1 -1
  118. data/lib/project_types/script/layers/application/create_script.rb +32 -12
  119. data/lib/project_types/script/layers/application/extension_points.rb +4 -4
  120. data/lib/project_types/script/layers/application/push_script.rb +13 -1
  121. data/lib/project_types/script/layers/domain/extension_point.rb +13 -45
  122. data/lib/project_types/script/layers/domain/push_package.rb +0 -12
  123. data/lib/project_types/script/layers/domain/script_project.rb +2 -2
  124. data/lib/project_types/script/layers/infrastructure/api_clients/partners_proxy_api_client.rb +57 -0
  125. data/lib/project_types/script/layers/infrastructure/api_clients/script_service_api_client.rb +35 -0
  126. data/lib/project_types/script/layers/infrastructure/command_runner.rb +1 -1
  127. data/lib/project_types/script/layers/infrastructure/errors.rb +5 -0
  128. data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_project_creator.rb +10 -90
  129. data/lib/project_types/script/layers/infrastructure/languages/project_creator.rb +76 -11
  130. data/lib/project_types/script/layers/infrastructure/languages/task_runner.rb +1 -1
  131. data/lib/project_types/script/layers/infrastructure/languages/typescript_project_creator.rb +33 -0
  132. data/lib/project_types/script/layers/infrastructure/languages/typescript_task_runner.rb +105 -0
  133. data/lib/project_types/script/layers/infrastructure/push_package_repository.rb +1 -1
  134. data/lib/project_types/script/layers/infrastructure/script_project_repository.rb +6 -6
  135. data/lib/project_types/script/layers/infrastructure/script_service.rb +25 -144
  136. data/lib/project_types/script/layers/infrastructure/script_uploader.rb +27 -0
  137. data/lib/project_types/script/layers/infrastructure/service_locator.rb +20 -0
  138. data/lib/project_types/script/messages/messages.rb +4 -0
  139. data/lib/project_types/script/tasks/ensure_env.rb +7 -7
  140. data/lib/project_types/script/ui/error_handler.rb +84 -76
  141. data/lib/project_types/script/ui/printing_spinner.rb +1 -1
  142. data/lib/project_types/theme/cli.rb +3 -3
  143. data/lib/project_types/theme/commands/check.rb +3 -3
  144. data/lib/project_types/theme/commands/delete.rb +7 -7
  145. data/lib/project_types/theme/commands/init.rb +3 -3
  146. data/lib/project_types/theme/commands/language_server.rb +2 -2
  147. data/lib/project_types/theme/commands/package.rb +2 -2
  148. data/lib/project_types/theme/commands/publish.rb +5 -5
  149. data/lib/project_types/theme/commands/pull.rb +15 -9
  150. data/lib/project_types/theme/commands/push.rb +18 -12
  151. data/lib/project_types/theme/commands/serve.rb +4 -4
  152. data/lib/project_types/theme/forms/confirm_store.rb +1 -1
  153. data/lib/project_types/theme/forms/select.rb +2 -2
  154. data/lib/{shopify-cli → shopify_cli}/admin_api/populate_resource_command.rb +3 -3
  155. data/lib/{shopify-cli → shopify_cli}/admin_api/schema.rb +4 -4
  156. data/lib/{shopify-cli → shopify_cli}/admin_api.rb +27 -27
  157. data/lib/{shopify-cli → shopify_cli}/api.rb +8 -8
  158. data/lib/shopify_cli/command/app_sub_command.rb +16 -0
  159. data/lib/{shopify-cli → shopify_cli}/command.rb +3 -3
  160. data/lib/{shopify-cli → shopify_cli}/commands/config.rb +14 -14
  161. data/lib/{shopify-cli → shopify_cli}/commands/help.rb +4 -4
  162. data/lib/{shopify-cli → shopify_cli}/commands/login.rb +7 -7
  163. data/lib/shopify_cli/commands/logout.rb +39 -0
  164. data/lib/{shopify-cli → shopify_cli}/commands/populate/customer.rb +4 -4
  165. data/lib/{shopify-cli → shopify_cli}/commands/populate/draft_order.rb +4 -4
  166. data/lib/{shopify-cli → shopify_cli}/commands/populate/product.rb +4 -4
  167. data/lib/shopify_cli/commands/populate.rb +23 -0
  168. data/lib/shopify_cli/commands/store.rb +15 -0
  169. data/lib/{shopify-cli → shopify_cli}/commands/switch.rb +5 -5
  170. data/lib/{shopify-cli → shopify_cli}/commands/system.rb +10 -10
  171. data/lib/shopify_cli/commands/version.rb +15 -0
  172. data/lib/{shopify-cli → shopify_cli}/commands/whoami.rb +7 -7
  173. data/lib/shopify_cli/commands.rb +34 -0
  174. data/lib/{shopify-cli → shopify_cli}/connect.rb +3 -3
  175. data/lib/shopify_cli/constants.rb +54 -0
  176. data/lib/{shopify-cli → shopify_cli}/context.rb +6 -6
  177. data/lib/{shopify-cli → shopify_cli}/core/entry_point.rb +7 -7
  178. data/lib/{shopify-cli → shopify_cli}/core/executor.rb +8 -4
  179. data/lib/{shopify-cli → shopify_cli}/core/finalize.rb +1 -1
  180. data/lib/{shopify-cli → shopify_cli}/core/help_resolver.rb +2 -2
  181. data/lib/{shopify-cli → shopify_cli}/core/monorail.rb +8 -8
  182. data/lib/shopify_cli/core.rb +8 -0
  183. data/lib/{shopify-cli → shopify_cli}/db.rb +8 -8
  184. data/lib/shopify_cli/environment.rb +91 -0
  185. data/lib/shopify_cli/exception_reporter/permission_controller.rb +54 -0
  186. data/lib/shopify_cli/exception_reporter.rb +55 -0
  187. data/lib/{shopify-cli → shopify_cli}/feature.rb +8 -8
  188. data/lib/{shopify-cli → shopify_cli}/form.rb +2 -2
  189. data/lib/{shopify-cli → shopify_cli}/git.rb +38 -8
  190. data/lib/{shopify-cli → shopify_cli}/helpers/haikunator.rb +1 -1
  191. data/lib/shopify_cli/helpers.rb +5 -0
  192. data/lib/{shopify-cli → shopify_cli}/heroku.rb +38 -13
  193. data/lib/{shopify-cli → shopify_cli}/http_request.rb +1 -1
  194. data/lib/{shopify-cli → shopify_cli}/identity_auth/servlet.rb +1 -1
  195. data/lib/{shopify-cli → shopify_cli}/identity_auth.rb +24 -31
  196. data/lib/{shopify-cli → shopify_cli}/js_deps.rb +7 -7
  197. data/lib/{shopify-cli → shopify_cli}/js_system.rb +10 -10
  198. data/lib/{shopify-cli → shopify_cli}/lazy_delegator.rb +2 -2
  199. data/lib/{shopify-cli → shopify_cli}/messages/messages.rb +44 -2
  200. data/lib/{shopify-cli → shopify_cli}/method_object.rb +15 -8
  201. data/lib/shopify_cli/migrator/migration.rb +27 -0
  202. data/lib/shopify_cli/migrator/migrations/1631709766_noop.rb +13 -0
  203. data/lib/shopify_cli/migrator.rb +48 -0
  204. data/lib/{shopify-cli → shopify_cli}/options.rb +1 -1
  205. data/lib/{shopify-cli → shopify_cli}/packager.rb +8 -8
  206. data/lib/{shopify-cli → shopify_cli}/partners_api/organizations.rb +1 -1
  207. data/lib/{shopify-cli → shopify_cli}/partners_api.rb +16 -40
  208. data/lib/shopify_cli/php_deps.rb +102 -0
  209. data/lib/{shopify-cli → shopify_cli}/process_supervision.rb +23 -21
  210. data/lib/{shopify-cli → shopify_cli}/project.rb +15 -15
  211. data/lib/{shopify-cli → shopify_cli}/project_commands.rb +3 -3
  212. data/lib/{shopify-cli → shopify_cli}/project_type.rb +5 -5
  213. data/lib/{shopify-cli → shopify_cli}/resolve_constant.rb +5 -5
  214. data/lib/{shopify-cli → shopify_cli}/resources/env_file.rb +1 -1
  215. data/lib/shopify_cli/resources.rb +5 -0
  216. data/lib/{shopify-cli → shopify_cli}/result.rb +11 -11
  217. data/lib/{shopify-cli → shopify_cli}/shopifolk.rb +6 -6
  218. data/lib/{shopify-cli → shopify_cli}/sub_command.rb +1 -1
  219. data/lib/{shopify-cli → shopify_cli}/task.rb +1 -1
  220. data/lib/{shopify-cli → shopify_cli}/tasks/confirm_store.rb +3 -3
  221. data/lib/{shopify-cli → shopify_cli}/tasks/create_api_client.rb +4 -4
  222. data/lib/shopify_cli/tasks/ensure_authenticated.rb +13 -0
  223. data/lib/{shopify-cli → shopify_cli}/tasks/ensure_dev_store.rb +5 -5
  224. data/lib/{shopify-cli → shopify_cli}/tasks/ensure_env.rb +3 -3
  225. data/lib/{shopify-cli → shopify_cli}/tasks/ensure_loopback_url.rb +4 -4
  226. data/lib/{shopify-cli → shopify_cli}/tasks/ensure_project_type.rb +3 -3
  227. data/lib/{shopify-cli → shopify_cli}/tasks/select_org_and_shop.rb +8 -8
  228. data/lib/{shopify-cli → shopify_cli}/tasks/update_dashboard_urls.rb +6 -6
  229. data/lib/{shopify-cli → shopify_cli}/tasks.rb +10 -10
  230. data/lib/{shopify-cli → shopify_cli}/theme/dev_server/certificate_manager.rb +5 -5
  231. data/lib/{shopify-cli → shopify_cli}/theme/dev_server/header_hash.rb +5 -1
  232. data/lib/{shopify-cli → shopify_cli}/theme/dev_server/hot-reload.js +0 -0
  233. data/lib/{shopify-cli → shopify_cli}/theme/dev_server/hot_reload.rb +5 -6
  234. data/lib/{shopify-cli → shopify_cli}/theme/dev_server/local_assets.rb +1 -1
  235. data/lib/{shopify-cli → shopify_cli}/theme/dev_server/proxy.rb +15 -3
  236. data/lib/{shopify-cli → shopify_cli}/theme/dev_server/sse.rb +1 -1
  237. data/lib/{shopify-cli → shopify_cli}/theme/dev_server/watcher.rb +1 -1
  238. data/lib/{shopify-cli → shopify_cli}/theme/dev_server/web_server.rb +1 -1
  239. data/lib/{shopify-cli → shopify_cli}/theme/dev_server.rb +3 -3
  240. data/lib/shopify_cli/theme/development_theme.rb +83 -0
  241. data/lib/{shopify-cli → shopify_cli}/theme/file.rb +12 -4
  242. data/lib/{shopify-cli → shopify_cli}/theme/ignore_filter.rb +8 -1
  243. data/lib/{shopify-cli → shopify_cli}/theme/mime_type.rb +1 -1
  244. data/lib/{shopify-cli → shopify_cli}/theme/syncer.rb +7 -7
  245. data/lib/{shopify-cli → shopify_cli}/theme/theme.rb +4 -4
  246. data/lib/{shopify-cli → shopify_cli}/transform_data_structure.rb +4 -4
  247. data/lib/{shopify-cli → shopify_cli}/tunnel.rb +14 -14
  248. data/lib/shopify_cli/version.rb +3 -0
  249. data/lib/shopify_cli.rb +61 -50
  250. data/shopify-cli.gemspec +13 -5
  251. data/utilities/docker.rb +47 -0
  252. data/utilities/utilities.rb +5 -0
  253. metadata +155 -97
  254. data/.github/workflows/build.yml +0 -28
  255. data/lib/project_types/script/layers/infrastructure/languages/rust_project_creator.rb +0 -73
  256. data/lib/project_types/script/layers/infrastructure/languages/rust_task_runner.rb +0 -60
  257. data/lib/shopify-cli/commands/logout.rb +0 -39
  258. data/lib/shopify-cli/commands/populate.rb +0 -23
  259. data/lib/shopify-cli/commands/store.rb +0 -15
  260. data/lib/shopify-cli/commands/version.rb +0 -15
  261. data/lib/shopify-cli/commands.rb +0 -34
  262. data/lib/shopify-cli/core.rb +0 -8
  263. data/lib/shopify-cli/helpers.rb +0 -5
  264. data/lib/shopify-cli/resources.rb +0 -5
  265. data/lib/shopify-cli/tasks/ensure_authenticated.rb +0 -13
  266. data/lib/shopify-cli/theme/development_theme.rb +0 -69
  267. data/lib/shopify-cli/version.rb +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6192e829e79c4cfe8a1e6fe1214d17f57da63bcf3802de71a7171a0037a2c1a
4
- data.tar.gz: 11f3a7167a24c5b011f930de1a9554176c6371c1a63350ea3a94d9965f521336
3
+ metadata.gz: c9bf62139d7f6ea0c4e88417521bd981c28c0823950768c3350410f2c8666e35
4
+ data.tar.gz: a15af494f4dbbcb6e2b8c276e34fb1347e3142f59d5646e80370199ddc6d0bce
5
5
  SHA512:
6
- metadata.gz: e35ac5b91dea19c5c443616063d1993eefe787b702a9813c4598361f264967baf09d6f4f34a54456b67c6c226cc96b032d3a2bb742ea5425c49fcd3ab843b1fe
7
- data.tar.gz: c27174aeaf83c67b292a0374b591833f87be66df912e85389148d008e7df0d3c83252b81034d14e1388be2e9a34112f6e9bf925e26359fb11fbfe84cdd8bb875
6
+ metadata.gz: f4dbceb0f0d41f605bb3be605e54eae58868d83e86fe7cd0476dc0193c7e2cf7369fa86a8d5d2a2070711f54dd03b02b2200bc844f02b42be9297178095f2106
7
+ data.tar.gz: 2c75055724e3fce904caca22f974f9cbc87bf10bfb9388f5227a227799f8b6c7e33aece62d7301cfde366d69fcc27832256e1da791e2dc4ca7f85d02f7c41191
data/.github/CODEOWNERS CHANGED
@@ -1,4 +1,5 @@
1
1
  * @shopify/core-build-learn
2
+ * @shopify/development-lifecycle
2
3
 
3
4
  /lib/project_types/script/ @shopify/scripts-experience
4
5
  /test/project_types/script/ @shopify/scripts-experience
@@ -24,10 +24,6 @@ Tip: include an error message (in a `<details></details>` tag) if your issue is
24
24
  1.
25
25
  1.
26
26
 
27
- ## Reduced test case
28
-
29
- The best way to get your bug fixed is to provide a [reduced test case](https://developer.mozilla.org/en-US/docs/Mozilla/QA/Reducing_testcases).
30
-
31
27
 
32
28
 
33
29
  ## Specifications
@@ -0,0 +1,104 @@
1
+ name: Shopify
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ concurrency:
10
+ group: shopify-${{ github.head_ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ test:
15
+ name: Tests with Ruby ${{ matrix.version }} on ${{ matrix.os }}
16
+ runs-on: ${{ matrix.os }}
17
+ strategy:
18
+ matrix:
19
+ version:
20
+ - 3.0.2
21
+ - 2.6.6
22
+ - 2.7.1
23
+ os:
24
+ - macos-10.15
25
+ - macos-11
26
+ - ubuntu-20.04
27
+ - ubuntu-18.04
28
+ steps:
29
+ - uses: actions/checkout@v2
30
+ - name: Set Git configuration
31
+ run: |
32
+ git config --global user.email "development-lifecycle@shopify.com"
33
+ git config --global user.name "Development Lifecycle"
34
+
35
+ - name: Set up Ruby ${{ matrix.version }}
36
+ uses: ruby/setup-ruby@v1
37
+ with:
38
+ ruby-version: ${{ matrix.version }}
39
+ bundler-cache: true
40
+
41
+ - name: Install Dependencies
42
+ run: bundle install
43
+
44
+ - name: Run Tests
45
+ run: bundle exec rake test
46
+ acceptance_tests:
47
+ name: Acceptance Tests with Ruby ${{ matrix.version }} on ${{ matrix.os }}
48
+ runs-on: ${{ matrix.os }}
49
+ strategy:
50
+ matrix:
51
+ version:
52
+ - 3.0.2
53
+ - 2.6.6
54
+ - 2.7.1
55
+ os:
56
+ - macos-10.15
57
+ - macos-11
58
+ - ubuntu-20.04
59
+ - ubuntu-18.04
60
+ steps:
61
+ - uses: actions/checkout@v2
62
+ - name: Set Git configuration
63
+ run: |
64
+ git config --global user.email "development-lifecycle@shopify.com"
65
+ git config --global user.name "Development Lifecycle"
66
+
67
+ - name: Set up Ruby ${{ matrix.version }}
68
+ uses: ruby/setup-ruby@v1
69
+ with:
70
+ ruby-version: ${{ matrix.version }}
71
+ bundler-cache: true
72
+
73
+ - uses: actions/setup-node@v2
74
+ with:
75
+ node-version: "14.9.0"
76
+
77
+ - name: Install Dependencies
78
+ run: bundle install
79
+
80
+ - name: Run Tests
81
+ run: bundle exec cucumber
82
+ rubocop:
83
+ name: Rubocop
84
+ runs-on: ${{ matrix.os }}
85
+ strategy:
86
+ matrix:
87
+ version:
88
+ - 3.0.2
89
+ os:
90
+ - macos-latest
91
+ steps:
92
+ - uses: actions/checkout@v2
93
+
94
+ - name: Set up Ruby ${{ matrix.version }}
95
+ uses: ruby/setup-ruby@v1
96
+ with:
97
+ ruby-version: ${{ matrix.version }}
98
+ bundler-cache: true
99
+
100
+ - name: Install Dependencies
101
+ run: bundle install
102
+
103
+ - name: Rubocop
104
+ run: bundle exec rake rubocop
data/.gitignore CHANGED
@@ -19,3 +19,6 @@ packaging/debian/shopify-cli
19
19
  packaging/debian/shopify-cli.deb
20
20
  packaging/rpm/build
21
21
  packaging/rpm/shopify-cli.spec
22
+ .byebug_history
23
+ ext/shopify-extensions/shopify-extensions
24
+ .console_history
data/.rubocop.yml CHANGED
@@ -11,8 +11,8 @@ inherit_gem:
11
11
  Minitest:
12
12
  Enabled: true
13
13
  Include:
14
- - '**/test/**/*'
15
- - '**/*_test.rb'
14
+ - "**/test/**/*"
15
+ - "**/*_test.rb"
16
16
 
17
17
  Minitest/AssertInDelta: # (new in 0.10)
18
18
  Enabled: true
@@ -43,15 +43,15 @@ Minitest/UnspecifiedException: # (new in 0.10)
43
43
 
44
44
  AllCops:
45
45
  Exclude:
46
- - 'vendor/**/*'
47
- - 'docs/**/*'
48
- - 'packaging/**/*'
46
+ - "vendor/**/*"
47
+ - "docs/**/*"
48
+ - "packaging/**/*"
49
49
  TargetRubyVersion: 2.4
50
50
 
51
51
  Layout/EmptyLines:
52
52
  Exclude:
53
53
  # Need extra line so comment at top isnt registered to the Dev namespace
54
- - 'lib/dev/helpers/chruby_reset.rb'
54
+ - "lib/dev/helpers/chruby_reset.rb"
55
55
 
56
56
  Layout/EmptyLineBetweenDefs:
57
57
  AllowAdjacentOneLineDefs: true
@@ -59,10 +59,10 @@ Layout/EmptyLineBetweenDefs:
59
59
  # Changing this could effect the way the content is rendered.
60
60
  Layout/HeredocIndentation:
61
61
  Exclude:
62
- - 'lib/project_types/node/messages/messages.rb'
63
- - 'lib/project_types/rails/messages/messages.rb'
64
- - 'lib/project_types/script/messages/messages.rb'
65
- - 'lib/shopify-cli/messages/messages.rb'
62
+ - "lib/project_types/node/messages/messages.rb"
63
+ - "lib/project_types/rails/messages/messages.rb"
64
+ - "lib/project_types/script/messages/messages.rb"
65
+ - "lib/shopify_cli/messages/messages.rb"
66
66
 
67
67
  # allow String.new to create mutable strings
68
68
  Style/EmptyLiteral:
@@ -71,7 +71,7 @@ Style/EmptyLiteral:
71
71
  # allow String.new to create mutable strings
72
72
  Style/HashSyntax:
73
73
  Exclude:
74
- - 'Rakefile'
74
+ - "Rakefile"
75
75
 
76
76
  # allow using %r{} for regexes
77
77
  Style/RegexpLiteral:
@@ -97,6 +97,6 @@ Style/MethodCallWithArgsParentheses:
97
97
 
98
98
  Layout/TrailingWhitespace:
99
99
  Exclude:
100
- - 'ext/shopify-cli/extconf.rb' # unsure if safe to remove
101
- - 'lib/project_types/extension/messages/messages.rb' # unsure if safe to remove
102
- - 'test/project_types/extension/extension_test_helpers/stubs/argo_script.rb' # unsure if save to remove
100
+ - "ext/shopify-cli/extconf.rb" # unsure if safe to remove
101
+ - "lib/project_types/extension/messages/messages.rb" # unsure if safe to remove
102
+ - "test/project_types/extension/extension_test_helpers/stubs/argo_script.rb" # unsure if save to remove
data/.rubocop_todo.yml CHANGED
@@ -14,11 +14,11 @@ Minitest/MultipleAssertions:
14
14
  # Cop supports --auto-correct.
15
15
  Style/PerlBackrefs:
16
16
  Exclude:
17
- - 'lib/docgen/markdown.rb'
17
+ - "lib/docgen/markdown.rb"
18
18
 
19
19
  # Offense count: 2
20
20
  # Cop supports --auto-correct.
21
21
  Style/RedundantBegin:
22
22
  Exclude:
23
- - 'lib/shopify-cli/shopifolk.rb'
24
- - 'test/shopify-cli/tunnel_test.rb'
23
+ - "lib/shopify_cli/shopifolk.rb"
24
+ - "test/shopify_cli/tunnel_test.rb"
data/CHANGELOG.md CHANGED
@@ -1,6 +1,36 @@
1
1
  Unreleased
2
2
  ------
3
3
 
4
+ Version 2.6.0
5
+ ------
6
+
7
+ * [#1574](https://github.com/Shopify/shopify-cli/pull/1574): Hide LoadError for ${RUBY_MAJOR}/ffi_c.
8
+ * [#1567](https://github.com/Shopify/shopify-cli/pull/1567): Add ability to set custom port for ngrok tunnel in node serve.
9
+ * [#1584](https://github.com/Shopify/shopify-cli/issues/1584): Fixed extended help message not showing.
10
+ * [#1566](https://github.com/Shopify/shopify-cli/pull/1566): Fix bug when running `npm | yarn list` for extension package resolution.
11
+ * [#1524](https://github.com/Shopify/shopify-cli/pull/1524): Add automatic error-reporting.
12
+ * [#1528](https://github.com/Shopify/shopify-cli/pull/1528): Bump theme-check version to 1.7
13
+ * [#1566](https://github.com/Shopify/shopify-cli/pull/1566): Fix bug when running `npm | yarn list` for extension package resolution
14
+
15
+ Version 2.5.0
16
+ ------
17
+
18
+ * [#1553](https://github.com/Shopify/shopify-cli/pull/1553): Add support for PHP app projects
19
+
20
+ Version 2.4.0
21
+ ------
22
+
23
+ * [#1488](https://github.com/Shopify/shopify-cli/pull/1488): Update Theme-Check to 1.4
24
+ * [#1507](https://github.com/Shopify/shopify-cli/pull/1507): Limit the generated name for themes to 50 characters
25
+
26
+ Version 2.3.0
27
+ ------
28
+
29
+ * [#1386](https://github.com/Shopify/shopify-cli/pull/1386): Update Theme-Check to 1.2
30
+ * [#1457](https://github.com/Shopify/shopify-cli/pull/1457): Fix uploading of binary theme files under Windows
31
+ * [#1480](https://github.com/Shopify/shopify-cli/pull/1480): Fix customers pages not working with `theme serve`
32
+ * [#1479](https://github.com/Shopify/shopify-cli/pull/1479): Add theme push & pull option to ignore files per command
33
+
4
34
  Version 2.2.2
5
35
  ------
6
36
  * [1382](https://github.com/Shopify/shopify-cli/pull/1382): Client side module upload for Scripts
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,23 @@
1
+ # Contributing
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.
data/Dockerfile ADDED
@@ -0,0 +1,17 @@
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-node
5
+
6
+ RUN git config --global user.email "development-lifecycle@shopify.com"
7
+ RUN git config --global user.name "Development Lifecycle"
8
+
9
+ # throw errors if Gemfile has been modified since Gemfile.lock
10
+ RUN bundle config --global frozen 1
11
+
12
+ WORKDIR /usr/src/app
13
+
14
+ COPY Gemfile Gemfile.lock ./
15
+ COPY shopify-cli.gemspec shopify-cli.gemspec
16
+ COPY lib/shopify_cli/version.rb lib/shopify_cli/version.rb
17
+ RUN bundle install
data/Gemfile CHANGED
@@ -24,4 +24,5 @@ group :test do
24
24
  gem "webmock", require: false
25
25
  gem "timecop", require: false
26
26
  gem "rack", require: false
27
+ gem "cucumber", "~> 7.0", require: false
27
28
  end
data/Gemfile.lock CHANGED
@@ -1,46 +1,85 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shopify-cli (2.2.2)
5
- listen (~> 3.5)
6
- theme-check (~> 1.1)
4
+ shopify-cli (2.6.0)
5
+ bugsnag (~> 6.22)
6
+ listen (~> 3.7.0)
7
+ theme-check (~> 1.7)
7
8
 
8
9
  GEM
9
10
  remote: https://rubygems.org/
10
11
  specs:
11
- addressable (2.7.0)
12
+ addressable (2.8.0)
12
13
  public_suffix (>= 2.0.2, < 5.0)
13
14
  ansi (1.5.0)
14
15
  ast (2.4.2)
16
+ bugsnag (6.23.0)
17
+ concurrent-ruby (~> 1.0)
15
18
  builder (3.2.4)
16
19
  byebug (11.1.3)
17
20
  coderay (1.1.3)
18
- crack (0.4.4)
19
- fakefs (1.2.2)
20
- ffi (1.15.3)
21
+ concurrent-ruby (1.1.9)
22
+ crack (0.4.5)
23
+ rexml
24
+ cucumber (7.0.0)
25
+ builder (~> 3.2, >= 3.2.4)
26
+ cucumber-core (~> 10.0, >= 10.0.1)
27
+ cucumber-create-meta (~> 6.0, >= 6.0.1)
28
+ cucumber-cucumber-expressions (~> 12.1, >= 12.1.1)
29
+ cucumber-gherkin (~> 20.0, >= 20.0.1)
30
+ cucumber-html-formatter (~> 16.0, >= 16.0.1)
31
+ cucumber-messages (~> 17.0, >= 17.0.1)
32
+ cucumber-wire (~> 6.0, >= 6.0.1)
33
+ diff-lcs (~> 1.4, >= 1.4.4)
34
+ mime-types (~> 3.3, >= 3.3.1)
35
+ multi_test (~> 0.1, >= 0.1.2)
36
+ sys-uname (~> 1.2, >= 1.2.2)
37
+ cucumber-core (10.0.1)
38
+ cucumber-gherkin (~> 20.0, >= 20.0.1)
39
+ cucumber-messages (~> 17.0, >= 17.0.1)
40
+ cucumber-tag-expressions (~> 3.0, >= 3.0.1)
41
+ cucumber-create-meta (6.0.1)
42
+ cucumber-messages (~> 17.0, >= 17.0.1)
43
+ sys-uname (~> 1.2, >= 1.2.2)
44
+ cucumber-cucumber-expressions (12.1.3)
45
+ cucumber-gherkin (20.0.1)
46
+ cucumber-messages (~> 17.0, >= 17.0.1)
47
+ cucumber-html-formatter (16.0.1)
48
+ cucumber-messages (~> 17.0, >= 17.0.1)
49
+ cucumber-messages (17.1.1)
50
+ cucumber-tag-expressions (3.0.1)
51
+ cucumber-wire (6.1.1)
52
+ cucumber-core (~> 10.0, >= 10.0.1)
53
+ cucumber-cucumber-expressions (~> 12.1, >= 12.1.2)
54
+ cucumber-messages (~> 17.0, >= 17.0.1)
55
+ diff-lcs (1.4.4)
56
+ fakefs (1.3.2)
57
+ ffi (1.15.4)
21
58
  hashdiff (1.0.1)
22
- liquid (5.0.1)
23
- listen (3.5.1)
59
+ liquid (5.1.0)
60
+ listen (3.7.0)
24
61
  rb-fsevent (~> 0.10, >= 0.10.3)
25
62
  rb-inotify (~> 0.9, >= 0.9.10)
26
63
  method_source (1.0.0)
27
- mini_portile2 (2.5.3)
28
- minitest (5.14.2)
64
+ mime-types (3.3.1)
65
+ mime-types-data (~> 3.2015)
66
+ mime-types-data (3.2021.0901)
67
+ mini_portile2 (2.6.1)
68
+ minitest (5.14.4)
29
69
  minitest-fail-fast (0.1.0)
30
70
  minitest (~> 5)
31
- minitest-reporters (1.4.2)
71
+ minitest-reporters (1.4.3)
32
72
  ansi
33
73
  builder
34
74
  minitest (>= 5.0)
35
75
  ruby-progressbar
36
- mocha (1.11.2)
37
- nokogiri (1.11.7)
38
- mini_portile2 (~> 2.5.0)
76
+ mocha (1.13.0)
77
+ multi_test (0.1.2)
78
+ nokogiri (1.12.5)
79
+ mini_portile2 (~> 2.6.1)
39
80
  racc (~> 1.4)
40
- nokogumbo (2.0.5)
41
- nokogiri (~> 1.8, >= 1.8.4)
42
- parallel (1.20.1)
43
- parser (3.0.1.0)
81
+ parallel (1.21.0)
82
+ parser (3.0.2.0)
44
83
  ast (~> 2.4.1)
45
84
  pry (0.13.1)
46
85
  coderay (~> 1.1)
@@ -52,7 +91,7 @@ GEM
52
91
  racc (1.5.2)
53
92
  rack (2.2.3)
54
93
  rainbow (3.0.0)
55
- rake (13.0.1)
94
+ rake (13.0.6)
56
95
  rb-fsevent (0.11.0)
57
96
  rb-inotify (0.10.1)
58
97
  ffi (~> 1.0)
@@ -76,9 +115,12 @@ GEM
76
115
  rubocop-shopify (2.0.1)
77
116
  rubocop (~> 1.11)
78
117
  ruby-progressbar (1.11.0)
79
- theme-check (1.1.0)
80
- liquid (>= 5.0.1)
81
- nokogumbo
118
+ sys-uname (1.2.2)
119
+ ffi (~> 1.1)
120
+ theme-check (1.7.2)
121
+ liquid (>= 5.1.0)
122
+ nokogiri (>= 1.12)
123
+ parser (~> 3)
82
124
  timecop (0.9.2)
83
125
  unicode-display_width (2.0.0)
84
126
  webmock (3.9.3)
@@ -90,8 +132,9 @@ PLATFORMS
90
132
  ruby
91
133
 
92
134
  DEPENDENCIES
93
- bundler (~> 2.1.4)
135
+ bundler (~> 2.2.2)
94
136
  byebug
137
+ cucumber (~> 7.0)
95
138
  fakefs (>= 1.0)
96
139
  minitest (>= 5.0.0)
97
140
  minitest-fail-fast
data/RELEASING.md CHANGED
@@ -13,7 +13,7 @@
13
13
  $ git checkout -b release_X_Y_Z
14
14
  ```
15
15
 
16
- 1. Update the version of Shopify CLI in `lib/shopify-cli/version.rb`
16
+ 1. Update the version of Shopify CLI in `lib/shopify_cli/version.rb`
17
17
 
18
18
  1. Update the version of Shopify CLI at the top of `Gemfile.lock` (failing to do so causes the CI build to fail)
19
19
 
data/Rakefile CHANGED
@@ -1,7 +1,13 @@
1
+ ENV["SHOPIFY_CLI_TEST"] = "1"
2
+
1
3
  require_relative "bin/load_shopify"
4
+ require_relative "utilities/utilities"
2
5
  require "rake/testtask"
3
6
  require "rubocop/rake_task"
4
7
  require "bundler/gem_tasks"
8
+ require "shellwords"
9
+ require "digest"
10
+ require "open3"
5
11
 
6
12
  Rake::TestTask.new do |t|
7
13
  t.libs += %w(test)
@@ -10,6 +16,19 @@ Rake::TestTask.new do |t|
10
16
  t.warning = false
11
17
  end
12
18
 
19
+ desc "A set of tasks that run in Linux environments"
20
+ namespace :linux do
21
+ desc "Runs the test suite in a Linux Docker environment"
22
+ task :test do
23
+ Utilities::Docker.run_and_rm_container("bundle", "exec", "rake", "test")
24
+ end
25
+
26
+ desc "Runs the acceptance tests suite in a Linux Docker environment"
27
+ task :features do
28
+ Utilities::Docker.run_and_rm_container("bundle", "exec", "cucumber")
29
+ end
30
+ end
31
+
13
32
  RuboCop::RakeTask.new
14
33
 
15
34
  task(default: [:test, :rubocop])
@@ -23,20 +42,20 @@ namespace :rdoc do
23
42
  repo = "https://github.com/Shopify/shopify-cli.wiki.git"
24
43
  intermediate = "markdown_intermediate"
25
44
  file_to_doc = [
26
- "lib/shopify-cli/admin_api.rb",
27
- "lib/shopify-cli/context.rb",
28
- "lib/shopify-cli/db.rb",
29
- "lib/shopify-cli/git.rb",
30
- "lib/shopify-cli/heroku.rb",
31
- "lib/shopify-cli/js_deps.rb",
32
- "lib/shopify-cli/lazy_delegator.rb",
33
- "lib/shopify-cli/method_object.rb",
34
- "lib/shopify-cli/partners_api.rb",
35
- "lib/shopify-cli/process_supervision.rb",
36
- "lib/shopify-cli/project.rb",
37
- "lib/shopify-cli/result.rb",
38
- "lib/shopify-cli/transform_data_structure.rb",
39
- "lib/shopify-cli/tunnel.rb",
45
+ "lib/shopify_cli/admin_api.rb",
46
+ "lib/shopify_cli/context.rb",
47
+ "lib/shopify_cli/db.rb",
48
+ "lib/shopify_cli/git.rb",
49
+ "lib/shopify_cli/heroku.rb",
50
+ "lib/shopify_cli/js_deps.rb",
51
+ "lib/shopify_cli/lazy_delegator.rb",
52
+ "lib/shopify_cli/method_object.rb",
53
+ "lib/shopify_cli/partners_api.rb",
54
+ "lib/shopify_cli/process_supervision.rb",
55
+ "lib/shopify_cli/project.rb",
56
+ "lib/shopify_cli/result.rb",
57
+ "lib/shopify_cli/transform_data_structure.rb",
58
+ "lib/shopify_cli/tunnel.rb",
40
59
  ]
41
60
 
42
61
  task all: [:markdown, :wiki, :cleanup]
@@ -76,25 +95,63 @@ desc("Generate markdown documentation and update the wiki")
76
95
  task(rdoc: "rdoc:all")
77
96
 
78
97
  namespace :package do
79
- require "shopify-cli/packager"
98
+ require "shopify_cli/packager"
80
99
 
81
100
  task all: [:debian, :rpm, :homebrew]
82
101
 
83
102
  desc("Builds a Debian package of the CLI")
84
103
  task :debian do
85
- ShopifyCli::Packager.new.build_debian
104
+ ShopifyCLI::Packager.new.build_debian
86
105
  end
87
106
 
88
107
  desc("Builds an RPM package of the CLI")
89
108
  task :rpm do
90
- ShopifyCli::Packager.new.build_rpm
109
+ ShopifyCLI::Packager.new.build_rpm
91
110
  end
92
111
 
93
112
  desc("Builds a Homebrew package of the CLI")
94
113
  task :homebrew do
95
- ShopifyCli::Packager.new.build_homebrew
114
+ ShopifyCLI::Packager.new.build_homebrew
96
115
  end
97
116
  end
98
117
 
99
118
  desc("Builds all distribution packages of the CLI")
100
119
  task(package: "package:all")
120
+
121
+ namespace :extensions do
122
+ task :update do
123
+ version = ENV.fetch("VERSION").strip
124
+ error("Invalid version") unless /^v\d+\.\d+\.\d+/.match(version)
125
+ File.write(Paths.extension("version"), version)
126
+ end
127
+
128
+ task :symlink do
129
+ source = Paths.root("..", "shopify-cli-extensions", "shopify-extensions")
130
+ error("Unable to find shopify-extensions executable: #{executable}") unless File.executable?(source)
131
+ target = Paths.extension("shopify-extensions")
132
+ File.delete(target) if File.exist?(target)
133
+ File.symlink(source, target)
134
+ end
135
+
136
+ task :install do
137
+ target = Paths.extension("shopify-extensions")
138
+ require_relative Paths.extension("shopify_extensions.rb")
139
+ File.delete(target) if File.exist?(target)
140
+ ShopifyExtensions.install(target: target)
141
+ end
142
+
143
+ module Paths
144
+ def self.extension(*args)
145
+ root("ext", "shopify-extensions", *args)
146
+ end
147
+
148
+ def self.root(*args)
149
+ Pathname(File.dirname(__FILE__)).join(*args).to_s
150
+ end
151
+ end
152
+ end
153
+
154
+ def error(message, output: STDERR, code: 1)
155
+ output.puts(message)
156
+ exit(code)
157
+ end
data/bin/console ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require_relative "load_shopify"
5
+ require "irb"
6
+ require "irb/completion"
7
+ require "irb/ext/save-history"
8
+
9
+ IRB.conf[:SAVE_HISTORY] = 100
10
+ IRB.conf[:HISTORY_FILE] = File.expand_path("../../.console_history", __FILE__)
11
+ IRB.start
data/bin/shopify CHANGED
@@ -9,9 +9,11 @@ module Kernel
9
9
  original_require(name)
10
10
  rescue LoadError => e
11
11
  # Special case for readline.so, which fails harmlessly on Windows
12
- raise if (name == "readline.so") && ShopifyCli::Context.new.windows?
12
+ raise if (name == "readline.so") && ShopifyCLI::Context.new.windows?
13
13
  # Special case for psych (yaml), which rescues this itself
14
14
  raise if name == "#{RUBY_VERSION[/\d+\.\d+/]}/psych.so"
15
+ # Special case for ffi, which rescues this itself
16
+ raise if name == "#{RUBY_VERSION.split(".")[0, 2].join(".")}/ffi_c"
15
17
  STDERR.puts "[Note] You cannot use gems with Shopify CLI."
16
18
  STDERR.puts "[LoadError] #{e.message}"
17
19
  if ENV["DEBUG"]
@@ -29,6 +31,16 @@ end
29
31
 
30
32
  require_relative "./load_shopify"
31
33
 
32
- exit(ShopifyCli::ErrorHandler.call do
33
- ShopifyCli::Core::EntryPoint.call(ARGV.dup)
34
- end)
34
+ exit(proc do
35
+ begin
36
+ ShopifyCLI::ErrorHandler.call do
37
+ ShopifyCLI::Core::EntryPoint.call(ARGV.dup)
38
+ end
39
+ rescue StandardError => error
40
+ if ShopifyCLI::Environment.print_stacktrace?
41
+ raise error
42
+ else
43
+ 1
44
+ end
45
+ end
46
+ end.call)
data/dev.yml CHANGED
@@ -2,15 +2,24 @@ name: dev
2
2
  type:
3
3
  - ruby
4
4
 
5
+ env:
6
+ SHOPIFY_CLI_DEVELOPMENT: "1"
7
+
5
8
  up:
6
9
  - ruby: 2.7.1
10
+ - homebrew:
11
+ - dpkg:
12
+ version: 1.20.9
13
+ - rpm:
14
+ version: 4.16.1.3
7
15
  - bundler
8
16
  - node:
9
17
  version: 14.9.0
10
18
  yarn: true
19
+ - docker
11
20
 
12
21
  test:
13
- desc: 'Run tests.'
22
+ desc: "Run tests."
14
23
  run: |
15
24
  if [ "$#" -eq 1 ] && [[ -f $1 ]];
16
25
  then
@@ -18,3 +27,7 @@ test:
18
27
  else
19
28
  bundle exec rake test $@
20
29
  fi
30
+
31
+ commands:
32
+ style:
33
+ run: bundle exec rubocop .