shopify-cli 2.6.6 → 2.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (206) hide show
  1. checksums.yaml +4 -4
  2. data/.devcontainer.json +5 -0
  3. data/.github/CODEOWNERS +2 -2
  4. data/.github/DESIGN.md +1 -1
  5. data/.github/ISSUE_TEMPLATE.md +7 -0
  6. data/.github/workflows/shopify.yml +1 -1
  7. data/.gitignore +1 -0
  8. data/.ruby-version +1 -1
  9. data/.vscode/extensions.json +5 -0
  10. data/.vscode/settings.json +9 -0
  11. data/CHANGELOG.md +44 -4
  12. data/CONTRIBUTING.md +1 -29
  13. data/{Dockerfile → Codespace.dockerfile} +2 -2
  14. data/Gemfile.lock +5 -5
  15. data/README.md +20 -99
  16. data/Rakefile +27 -0
  17. data/Tests.dockerfile +35 -0
  18. data/assets/logo.png +0 -0
  19. data/dev.yml +1 -4
  20. data/docs/README.md +13 -0
  21. data/docs/contributors/testing.md +27 -0
  22. data/docs/users/installation.md +46 -0
  23. data/{THEMEKIT_MIGRATION.md → docs/users/migrate-from-themekit.md} +1 -1
  24. data/ext/javy/hashes/javy-arm-macos-v0.1.0.gz.sha256 +1 -0
  25. data/ext/javy/hashes/javy-x86_64-linux-v0.1.0.gz.sha256 +1 -0
  26. data/ext/javy/hashes/javy-x86_64-macos-v0.1.0.gz.sha256 +1 -0
  27. data/ext/javy/hashes/javy-x86_64-windows-v0.1.0.gz.sha256 +1 -0
  28. data/ext/javy/javy.rb +205 -0
  29. data/ext/javy/version +1 -0
  30. data/lib/project_types/extension/cli.rb +6 -3
  31. data/lib/project_types/extension/commands/build.rb +4 -8
  32. data/lib/project_types/extension/commands/create.rb +2 -5
  33. data/lib/project_types/extension/commands/extension_command.rb +1 -1
  34. data/lib/project_types/extension/features/argo_serve.rb +9 -23
  35. data/lib/project_types/extension/forms/questions/ask_template.rb +1 -5
  36. data/lib/project_types/extension/messages/messages.rb +0 -2
  37. data/lib/project_types/extension/models/development_server.rb +2 -2
  38. data/lib/project_types/extension/models/development_server_requirements.rb +2 -3
  39. data/lib/project_types/extension/models/server_config/app.rb +13 -0
  40. data/lib/project_types/extension/models/server_config/development.rb +5 -4
  41. data/lib/project_types/extension/models/server_config/development_renderer.rb +1 -1
  42. data/lib/project_types/extension/models/server_config/development_resource.rb +13 -0
  43. data/lib/project_types/extension/models/server_config/extension.rb +3 -1
  44. data/lib/project_types/extension/models/server_config/root.rb +4 -1
  45. data/lib/project_types/extension/tasks/convert_server_config.rb +65 -0
  46. data/lib/project_types/extension/tasks/ensure_resource_url.rb +39 -0
  47. data/lib/project_types/extension/tasks/merge_server_config.rb +32 -0
  48. data/lib/project_types/extension/tasks/run_extension_command.rb +11 -10
  49. data/lib/project_types/node/cli.rb +0 -16
  50. data/lib/project_types/node/forms/create.rb +5 -5
  51. data/lib/project_types/node/messages/messages.rb +2 -144
  52. data/lib/project_types/php/cli.rb +0 -11
  53. data/lib/project_types/php/forms/create.rb +5 -6
  54. data/lib/project_types/php/messages/messages.rb +2 -161
  55. data/lib/project_types/rails/cli.rb +0 -16
  56. data/lib/project_types/rails/commands/create.rb +3 -5
  57. data/lib/project_types/rails/forms/create.rb +5 -6
  58. data/lib/project_types/rails/messages/messages.rb +6 -151
  59. data/lib/project_types/script/cli.rb +8 -2
  60. data/lib/project_types/script/commands/create.rb +2 -4
  61. data/lib/project_types/script/commands/javy.rb +29 -0
  62. data/lib/project_types/script/commands/push.rb +3 -2
  63. data/lib/project_types/script/config/extension_points.yml +12 -30
  64. data/lib/project_types/script/forms/ask_app.rb +32 -0
  65. data/lib/project_types/script/forms/ask_org.rb +30 -0
  66. data/lib/project_types/script/forms/ask_script_uuid.rb +22 -0
  67. data/lib/project_types/script/forms/run_against_shopify_org.rb +14 -0
  68. data/lib/project_types/script/graphql/app_script_set.graphql +2 -2
  69. data/lib/project_types/script/layers/application/build_script.rb +0 -1
  70. data/lib/project_types/script/layers/application/connect_app.rb +73 -0
  71. data/lib/project_types/script/layers/application/create_script.rb +1 -1
  72. data/lib/project_types/script/layers/application/push_script.rb +1 -1
  73. data/lib/project_types/script/layers/domain/errors.rb +1 -4
  74. data/lib/project_types/script/layers/domain/push_package.rb +3 -3
  75. data/lib/project_types/script/layers/domain/{script_json.rb → script_config.rb} +2 -2
  76. data/lib/project_types/script/layers/domain/script_project.rb +5 -1
  77. data/lib/project_types/script/layers/infrastructure/errors.rb +36 -7
  78. data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_task_runner.rb +0 -4
  79. data/lib/project_types/script/layers/infrastructure/languages/typescript_task_runner.rb +0 -4
  80. data/lib/project_types/script/layers/infrastructure/push_package_repository.rb +2 -2
  81. data/lib/project_types/script/layers/infrastructure/script_project_repository.rb +104 -27
  82. data/lib/project_types/script/layers/infrastructure/script_service.rb +11 -11
  83. data/lib/project_types/script/messages/messages.rb +21 -4
  84. data/lib/project_types/script/ui/error_handler.rb +31 -21
  85. data/lib/project_types/theme/cli.rb +1 -1
  86. data/lib/project_types/theme/commands/check.rb +1 -1
  87. data/lib/project_types/theme/commands/delete.rb +1 -1
  88. data/lib/project_types/theme/commands/init.rb +1 -1
  89. data/lib/project_types/theme/commands/language_server.rb +1 -1
  90. data/lib/project_types/theme/commands/package.rb +1 -1
  91. data/lib/project_types/theme/commands/publish.rb +1 -1
  92. data/lib/project_types/theme/commands/pull.rb +4 -1
  93. data/lib/project_types/theme/commands/push.rb +5 -1
  94. data/lib/project_types/theme/commands/serve.rb +9 -3
  95. data/lib/project_types/theme/messages/messages.rb +39 -2
  96. data/lib/project_types/theme/ui/sync_progress_bar.rb +2 -2
  97. data/lib/shopify_cli/admin_api/populate_resource_command.rb +1 -1
  98. data/lib/shopify_cli/api.rb +7 -2
  99. data/lib/shopify_cli/app_type_detector.rb +24 -20
  100. data/lib/shopify_cli/command/app_sub_command.rb +10 -0
  101. data/lib/shopify_cli/command/project_command.rb +31 -0
  102. data/lib/shopify_cli/command/sub_command.rb +19 -0
  103. data/lib/shopify_cli/command.rb +7 -2
  104. data/lib/shopify_cli/commands/app/connect.rb +22 -0
  105. data/lib/shopify_cli/commands/app/create/node.rb +36 -0
  106. data/lib/shopify_cli/commands/app/create/php.rb +36 -0
  107. data/lib/shopify_cli/commands/app/create/rails.rb +38 -0
  108. data/lib/shopify_cli/commands/app/create.rb +28 -0
  109. data/lib/shopify_cli/commands/app/deploy.rb +49 -0
  110. data/lib/shopify_cli/commands/app/open.rb +19 -0
  111. data/lib/shopify_cli/commands/app/serve.rb +49 -0
  112. data/lib/shopify_cli/commands/app/tunnel.rb +43 -0
  113. data/lib/shopify_cli/commands/app.rb +29 -0
  114. data/lib/shopify_cli/commands/config.rb +2 -2
  115. data/lib/shopify_cli/commands.rb +1 -0
  116. data/lib/shopify_cli/constants.rb +7 -0
  117. data/lib/shopify_cli/context.rb +10 -0
  118. data/lib/shopify_cli/environment.rb +4 -0
  119. data/lib/shopify_cli/exception_reporter.rb +3 -4
  120. data/lib/shopify_cli/git.rb +14 -1
  121. data/lib/shopify_cli/github/issue_url_generator.rb +19 -0
  122. data/lib/shopify_cli/github.rb +5 -0
  123. data/lib/shopify_cli/identity_auth.rb +18 -0
  124. data/lib/shopify_cli/messages/messages.rb +254 -9
  125. data/lib/shopify_cli/partners_api.rb +1 -8
  126. data/lib/shopify_cli/project.rb +5 -1
  127. data/lib/shopify_cli/project_commands.rb +1 -1
  128. data/lib/shopify_cli/services/app/connect_service.rb +25 -0
  129. data/lib/shopify_cli/services/app/create/node_service.rb +155 -0
  130. data/lib/shopify_cli/services/app/create/php_service.rb +152 -0
  131. data/lib/shopify_cli/services/app/create/rails_service.rb +215 -0
  132. data/lib/shopify_cli/services/app/deploy/heroku/node_service.rb +101 -0
  133. data/lib/shopify_cli/services/app/deploy/heroku/php_service.rb +135 -0
  134. data/lib/shopify_cli/services/app/deploy/heroku/rails_service.rb +120 -0
  135. data/lib/shopify_cli/services/app/open_service.rb +19 -0
  136. data/lib/shopify_cli/services/app/serve/node_service.rb +42 -0
  137. data/lib/shopify_cli/services/app/serve/php_service.rb +46 -0
  138. data/lib/shopify_cli/services/app/serve/rails_service.rb +48 -0
  139. data/lib/shopify_cli/services/app/tunnel/auth_service.rb +21 -0
  140. data/lib/shopify_cli/services/app/tunnel/start_service.rb +20 -0
  141. data/lib/shopify_cli/services/app/tunnel/stop_service.rb +20 -0
  142. data/lib/shopify_cli/services.rb +31 -0
  143. data/lib/shopify_cli/tasks/ensure_authenticated.rb +9 -3
  144. data/lib/shopify_cli/theme/dev_server/cdn_fonts.rb +73 -0
  145. data/lib/shopify_cli/theme/dev_server/hot-reload.js +25 -9
  146. data/lib/shopify_cli/theme/dev_server/local_assets.rb +1 -1
  147. data/lib/shopify_cli/theme/dev_server.rb +37 -18
  148. data/lib/shopify_cli/theme/syncer/error_reporter.rb +45 -0
  149. data/lib/shopify_cli/theme/syncer/operation.rb +56 -0
  150. data/lib/shopify_cli/theme/syncer/standard_reporter.rb +32 -0
  151. data/lib/shopify_cli/theme/syncer.rb +40 -39
  152. data/lib/shopify_cli/theme/theme.rb +31 -19
  153. data/lib/shopify_cli/tunnel.rb +26 -22
  154. data/lib/shopify_cli/version.rb +1 -1
  155. data/lib/shopify_cli.rb +1 -2
  156. data/shopify-cli.gemspec +1 -1
  157. data/shopify-dev +18 -0
  158. data/utilities/constants.rb +7 -0
  159. data/utilities/docker/container.rb +10 -3
  160. data/utilities/docker.rb +2 -2
  161. data/utilities/utilities.rb +1 -0
  162. data/vendor/deps/cli-kit/lib/cli/kit/system.rb +1 -1
  163. metadata +66 -50
  164. data/docs/_config.yml +0 -2
  165. data/docs/app/node/commands/index.md +0 -4
  166. data/docs/app/node/index.md +0 -4
  167. data/docs/app/rails/commands/index.md +0 -4
  168. data/docs/app/rails/index.md +0 -4
  169. data/docs/core/index.md +0 -4
  170. data/docs/getting-started/index.md +0 -4
  171. data/docs/getting-started/install/index.md +0 -4
  172. data/docs/getting-started/migrate/index.md +0 -4
  173. data/docs/getting-started/uninstall/index.md +0 -4
  174. data/docs/getting-started/upgrade/index.md +0 -4
  175. data/docs/help/start-app/index.md +0 -4
  176. data/docs/index.md +0 -4
  177. data/install.sh +0 -7
  178. data/lib/project_types/extension/tasks/converters/server_config_converter.rb +0 -30
  179. data/lib/project_types/extension/tasks/load_server_config.rb +0 -28
  180. data/lib/project_types/node/commands/connect.rb +0 -21
  181. data/lib/project_types/node/commands/create.rb +0 -125
  182. data/lib/project_types/node/commands/deploy/heroku.rb +0 -96
  183. data/lib/project_types/node/commands/deploy.rb +0 -32
  184. data/lib/project_types/node/commands/generate.rb +0 -22
  185. data/lib/project_types/node/commands/open.rb +0 -18
  186. data/lib/project_types/node/commands/serve.rb +0 -45
  187. data/lib/project_types/node/commands/tunnel.rb +0 -41
  188. data/lib/project_types/php/commands/connect.rb +0 -19
  189. data/lib/project_types/php/commands/create.rb +0 -143
  190. data/lib/project_types/php/commands/deploy/heroku.rb +0 -129
  191. data/lib/project_types/php/commands/deploy.rb +0 -32
  192. data/lib/project_types/php/commands/open.rb +0 -16
  193. data/lib/project_types/php/commands/serve.rb +0 -48
  194. data/lib/project_types/php/commands/tunnel.rb +0 -37
  195. data/lib/project_types/rails/commands/connect.rb +0 -21
  196. data/lib/project_types/rails/commands/deploy/heroku.rb +0 -115
  197. data/lib/project_types/rails/commands/deploy.rb +0 -32
  198. data/lib/project_types/rails/commands/generate/webhook.rb +0 -42
  199. data/lib/project_types/rails/commands/generate.rb +0 -60
  200. data/lib/project_types/rails/commands/open.rb +0 -18
  201. data/lib/project_types/rails/commands/serve.rb +0 -51
  202. data/lib/project_types/rails/commands/tunnel.rb +0 -41
  203. data/lib/project_types/script/tasks/ensure_env.rb +0 -106
  204. data/lib/shopify_cli/sub_command.rb +0 -17
  205. data/shopify.fish +0 -12
  206. data/shopify.sh +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb41d18df964832b9ebc6be79e80006c4750c8d416c9550cbcc625d190bf26b9
4
- data.tar.gz: d5c6b523faf27c0a6b3c53ccaadd1c4f47e932d7e0c2520e7f0bfcb2f7f7b820
3
+ metadata.gz: f839cd234fbc37b84d85cc7ba1efddedf6b1571adba40562b3f4296286ca0130
4
+ data.tar.gz: fb66a6a0728d317bddc220e1af1c4fa0049bd42e34cbef6f4310daa19cfe9e86
5
5
  SHA512:
6
- metadata.gz: 396c3c47f510e78d67775fc6b6a091849ce8c3955d2c91ec516659ef4377df44a00a3faaa70facdd0649763b2a3b69f96ab4f859a003b23becd6baf3202d4b64
7
- data.tar.gz: 1514e2a4c8f1841e8714a30f4e05450c5116863cc2c14cf5655143a43a49e1b5f6f2da1b8ffc2af6acd683359ea970920090ba55c6f82213e91de1cd4aeb7b87
6
+ metadata.gz: 11c1e49165ad7140139fe89b56e55287e6a3facca584c18234a4dbb302428d01a62cf2f4c5c27edf1943c9ec7f6610c8733fc1689b3cb78f9425b01c2f4f3836
7
+ data.tar.gz: 8fc34d5588a785bbd8fa7f47b0dc8f9682dc955a8c23aa733dd33e39e37ebc9fbe898c542314ea16604a7f08a384d54ec693c8eb129af7bde0a156567c345058
@@ -0,0 +1,5 @@
1
+ {
2
+ "build": {
3
+ "dockerfile": "Codespace.dockerfile"
4
+ },
5
+ }
data/.github/CODEOWNERS CHANGED
@@ -1,5 +1,5 @@
1
1
  * @shopify/core-build-learn
2
2
  * @shopify/development-lifecycle
3
3
 
4
- /lib/project_types/script/ @shopify/scripts-experience
5
- /test/project_types/script/ @shopify/scripts-experience
4
+ /lib/project_types/script/ @shopify/scripts-platform
5
+ /test/project_types/script/ @shopify/scripts-platform
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
 
@@ -19,7 +19,7 @@ jobs:
19
19
  version:
20
20
  - 3.0.2
21
21
  - 2.6.6
22
- - 2.7.1
22
+ - 2.7.5
23
23
  os:
24
24
  - macos-10.15
25
25
  - macos-11
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
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.1
1
+ 2.7.5
@@ -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,9 +1,48 @@
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
- ## [Unreleased]
2
+ ## Version 2.7.3
3
+ ### Added
4
+ * [#1826](https://github.com/Shopify/shopify-cli/pull/1826): Support using `script.config.yml` file for script configuration
5
+ * [#1843](https://github.com/Shopify/shopify-cli/pull/1826): Support using javy on Apple ARM processors
6
+
7
+ ### Fixed
8
+ * [#1811](https://github.com/Shopify/shopify-cli/pull/1811): Update theme-check to 1.9.0
9
+ * [#1831](https://github.com/Shopify/shopify-cli/pull/1831): Ensure correct `ngrok` version is downloaded for Apple M1
10
+ * [#1823](https://github.com/Shopify/shopify-cli/pull/1823): Indicate git is unavailable; don't error out
11
+ * [#1807](https://github.com/Shopify/shopify-cli/pull/1807): Fix `--live` parameter, it should not imply `--allow-live` in the `theme push` command
12
+ * [#1812](https://github.com/Shopify/shopify-cli/pull/1812): App creation with Rails 7
13
+ * [#1821](https://github.com/Shopify/shopify-cli/pull/1821): Fix Shopify hosted fonts to load via the local preview URL
14
+ * [#1830](https://github.com/Shopify/shopify-cli/pull/1830): Fix hot reload when users update many files "simultaneously"
15
+ * [#1837](https://github.com/Shopify/shopify-cli/pull/1837): Fix `ShopifyCLI::Theme::DevServer::CdnFonts` class to support any font
16
+
17
+ ## Version 2.7.2
18
+ ### Fixed
19
+ * [#1763](https://github.com/Shopify/shopify-cli/pull/1763): Fix: Tunnel --PORT parameter not working in Node.js app.
20
+ * [#1769](https://github.com/Shopify/shopify-cli/pull/1769): Fix `theme push --development --json` to output the proper exit code
21
+ * [#1766](https://github.com/Shopify/shopify-cli/pull/1766): Fix `theme serve` failing with the `--host` property
22
+ * [#1771](https://github.com/Shopify/shopify-cli/pull/1771): Fix `theme push --development --json` to output errors in the STDERR
23
+ * [#1778](https://github.com/Shopify/shopify-cli/pull/1778): Fix ngrok installation check on Windows
24
+ * [#1798](https://github.com/Shopify/shopify-cli/pull/1798): Add `--live` option to the `theme pull` and the `theme push` commands
25
+ * [#1788](https://github.com/Shopify/shopify-cli/pull/1788): Improve `theme serve` errors and add logs for successful operations
26
+ * [#1794](https://github.com/Shopify/shopify-cli/pull/1794): Fix bug where hidden subcommands appear in the help menu.
27
+
28
+ ## Version 2.7.1
29
+ ### Fixed
30
+ * [#1722](https://github.com/Shopify/shopify-cli/pull/1722): Fix `theme serve` failing when the port is already being used
31
+ * [#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.
32
+ * [#1750](https://github.com/Shopify/shopify-cli/pull/1750): Runtime errors in Windows' environments when the `PATHEXT` environment variable is not defined.
33
+ * [#1758](https://github.com/Shopify/shopify-cli/pull/1758): Fix tunnel creation for expired anonymous tunnels
34
+
35
+ ## Version 2.7.0
36
+ ### Changed
37
+ * [#1650](https://github.com/Shopify/shopify-cli/pull/1650): **Breaking** Move app commands under `shopify app`.
38
+
39
+ ### Fixed
40
+ * [#1714](https://github.com/Shopify/shopify-cli/pull/1714): Fix theme serve not serving assets locally when two URLs are on the same line
41
+ * [#1729](https://github.com/Shopify/shopify-cli/pull/1729): Update theme-check to 1.8.0
3
42
 
4
43
  ## Version 2.6.6
5
44
  ### Added
6
- * [#1609](https://github.com/Shopify/shopify-cli/pull/1609): Add `--bind=HOST` option to `shopify theme serve`.
45
+ * [#1609](https://github.com/Shopify/shopify-cli/pull/1609): Add `--http-bind=HOST` option to `shopify theme serve`.
7
46
 
8
47
  ### Fixed
9
48
  * [#1678](https://github.com/Shopify/shopify-cli/pull/1678): Fix migrator's incompatibility with Ruby 2.5.
@@ -30,6 +69,7 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
30
69
 
31
70
  ### Changed
32
71
  * [#1635](https://github.com/Shopify/shopify-cli/pull/1635): Automatic usage and error reporting configuration has been unified under `analytics.enabled`.
72
+
33
73
  ### Security
34
74
 
35
75
  ## Version 2.6.3
@@ -53,11 +93,11 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
53
93
  * [#1553](https://github.com/Shopify/shopify-cli/pull/1553): Add support for PHP app projects
54
94
 
55
95
  ## Version 2.4.0
56
- * [#1488](https://github.com/Shopify/shopify-cli/pull/1488): Update Theme-Check to 1.4
96
+ * [#1488](https://github.com/Shopify/shopify-cli/pull/1488): Update theme-check to 1.4
57
97
  * [#1507](https://github.com/Shopify/shopify-cli/pull/1507): Limit the generated name for themes to 50 characters
58
98
 
59
99
  ## Version 2.3.0
60
- * [#1386](https://github.com/Shopify/shopify-cli/pull/1386): Update Theme-Check to 1.2
100
+ * [#1386](https://github.com/Shopify/shopify-cli/pull/1386): Update theme-check to 1.2
61
101
  * [#1457](https://github.com/Shopify/shopify-cli/pull/1457): Fix uploading of binary theme files under Windows
62
102
  * [#1480](https://github.com/Shopify/shopify-cli/pull/1480): Fix customers pages not working with `theme serve`
63
103
  * [#1479](https://github.com/Shopify/shopify-cli/pull/1479): Add theme push & pull option to ignore files per command
data/CONTRIBUTING.md CHANGED
@@ -1,31 +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.
24
-
25
- #### Debugging acceptance tests
26
- When developing acceptance tests, it can be helpful to see the outputs of running commands.
27
- To see outputs, append `--verbose` when running an acceptance test. Example:
28
-
29
- ```sh
30
- bundle exec cucumber features/theme.feature --verbose
31
- ```
3
+ Check out the [contributors' documentation](/docs)
@@ -1,7 +1,7 @@
1
1
  # This is a Docker image to test the CLI in UNIX environments other than macOS
2
2
  # Build the image: docker build . -t shopify-cli
3
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
4
+ FROM cimg/ruby:2.7.5
5
5
 
6
6
  RUN git config --global user.email "development-lifecycle@shopify.com"
7
7
  RUN git config --global user.name "Development Lifecycle"
@@ -29,7 +29,7 @@ RUN sudo apt-get install -y nodejs
29
29
  RUN sudo npm install --global yarn
30
30
 
31
31
  # Python is necessary to compile NPM packages with native extensions through node-gyp
32
- RUN sudo apt install python-minimal -y
32
+ RUN sudo apt install python2-minimal -y
33
33
 
34
34
  # Install sqlite3
35
35
  RUN sudo apt-get install libsqlite3-dev -y
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shopify-cli (2.6.6)
4
+ shopify-cli (2.7.3)
5
5
  bugsnag (~> 6.22)
6
6
  listen (~> 3.7.0)
7
- theme-check (~> 1.7.2)
7
+ theme-check (~> 1.9.0)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
@@ -81,7 +81,7 @@ GEM
81
81
  mini_portile2 (~> 2.6.1)
82
82
  racc (~> 1.4)
83
83
  parallel (1.21.0)
84
- parser (3.0.2.0)
84
+ parser (3.0.3.1)
85
85
  ast (~> 2.4.1)
86
86
  pry (0.13.1)
87
87
  coderay (~> 1.1)
@@ -90,7 +90,7 @@ GEM
90
90
  byebug (~> 11.0)
91
91
  pry (~> 0.13.0)
92
92
  public_suffix (4.0.6)
93
- racc (1.5.2)
93
+ racc (1.6.0)
94
94
  rack (2.2.3)
95
95
  rainbow (3.0.0)
96
96
  rake (13.0.6)
@@ -119,7 +119,7 @@ GEM
119
119
  ruby-progressbar (1.11.0)
120
120
  sys-uname (1.2.2)
121
121
  ffi (~> 1.1)
122
- theme-check (1.7.2)
122
+ theme-check (1.9.0)
123
123
  liquid (>= 5.1.0)
124
124
  nokogiri (>= 1.12)
125
125
  parser (~> 3)
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.5
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 python2-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
@@ -6,16 +6,13 @@ env:
6
6
  SHOPIFY_CLI_DEVELOPMENT: "1"
7
7
 
8
8
  up:
9
- - ruby: 2.7.1
9
+ - ruby: 2.7.5
10
10
  - homebrew:
11
11
  - dpkg:
12
12
  version: 1.20.9
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
 
@@ -0,0 +1 @@
1
+ 16e1a74c06eff6e5be79253a8ee96a08a404e95be3479a6e384c8926bb736e43
@@ -0,0 +1 @@
1
+ 53cb9d0e8a345d68f91512a28a7d2eab93463dc8650c7a044f03cbee1f7cac05
@@ -0,0 +1 @@
1
+ 5e1ca88385206a653980139ab969efd80de11fd9b298dafe450d3ac27d6d0173
@@ -0,0 +1 @@
1
+ 37f9b3f75b4ffca68b06656d6f90abfbac57597ee45fffb59b3a559b6b5de44e