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
data/utilities/docker.rb CHANGED
@@ -59,7 +59,7 @@ module Utilities
59
59
  unless image_exists?(image_tag)
60
60
  puts "Rebuilding the Docker image..."
61
61
  _, err, stat = Open3.capture3(
62
- "docker", "build", root_dir, "-t", image_tag
62
+ "docker", "build", "-t", image_tag, "-f", File.join(root_dir, "Tests.dockerfile"), root_dir
63
63
  )
64
64
  raise Error, err unless stat.success?
65
65
  end
@@ -67,7 +67,7 @@ module Utilities
67
67
 
68
68
  def image_tag
69
69
  gemfile_lock_path = File.expand_path("./Gemfile.lock", root_dir)
70
- dockerfile_path = File.expand_path("./Dockerfile", root_dir)
70
+ dockerfile_path = File.expand_path("./Tests.dockerfile", root_dir)
71
71
  fingerprintable_strings = [
72
72
  File.read(gemfile_lock_path),
73
73
  File.read(dockerfile_path),
@@ -2,4 +2,5 @@ $LOAD_PATH.unshift(__dir__) unless $LOAD_PATH.include?(__dir__)
2
2
 
3
3
  module Utilities
4
4
  autoload :Docker, "docker"
5
+ autoload :Constants, "constants"
5
6
  end
@@ -222,7 +222,7 @@ module CLI
222
222
  end
223
223
 
224
224
  def which(cmd, env)
225
- exts = os == :windows ? env.fetch('PATHEXT').split(';') : ['']
225
+ exts = os == :windows ? env.fetch('PATHEXT', ['']).split(';') : ['']
226
226
  env.fetch('PATH', '').split(File::PATH_SEPARATOR).each do |path|
227
227
  exts.each do |ext|
228
228
  exe = File.join(path, "#{cmd}#{ext}")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.6
4
+ version: 2.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-01 00:00:00.000000000 Z
11
+ date: 2021-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -92,14 +92,14 @@ dependencies:
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: 1.7.2
95
+ version: 1.9.0
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: 1.7.2
102
+ version: 1.9.0
103
103
  description: |
104
104
  Shopify CLI helps you build Shopify apps faster. It quickly scaffolds Node.js
105
105
  and Ruby on Rails embedded apps. It also automates many common tasks in the
@@ -112,6 +112,7 @@ executables:
112
112
  extensions: []
113
113
  extra_rdoc_files: []
114
114
  files:
115
+ - ".devcontainer.json"
115
116
  - ".github/CODEOWNERS"
116
117
  - ".github/CODE_OF_CONDUCT.md"
117
118
  - ".github/CONTRIBUTING.md"
@@ -127,9 +128,11 @@ files:
127
128
  - ".ruby-version"
128
129
  - ".tmp/.gitkeep"
129
130
  - ".tmp/sv/.gitkeep"
131
+ - ".vscode/extensions.json"
132
+ - ".vscode/settings.json"
130
133
  - CHANGELOG.md
131
134
  - CONTRIBUTING.md
132
- - Dockerfile
135
+ - Codespace.dockerfile
133
136
  - Gemfile
134
137
  - Gemfile.lock
135
138
  - LICENSE
@@ -137,28 +140,25 @@ files:
137
140
  - RELEASING.md
138
141
  - Rakefile
139
142
  - SECURITY.md
140
- - THEMEKIT_MIGRATION.md
143
+ - Tests.dockerfile
144
+ - assets/logo.png
141
145
  - bin/console
142
146
  - bin/load_shopify.rb
143
147
  - bin/shopify
144
148
  - dev.yml
145
- - docs/_config.yml
146
- - docs/app/node/commands/index.md
147
- - docs/app/node/index.md
148
- - docs/app/rails/commands/index.md
149
- - docs/app/rails/index.md
150
- - docs/core/index.md
151
- - docs/getting-started/index.md
152
- - docs/getting-started/install/index.md
153
- - docs/getting-started/migrate/index.md
154
- - docs/getting-started/uninstall/index.md
155
- - docs/getting-started/upgrade/index.md
156
- - docs/help/start-app/index.md
157
- - docs/index.md
149
+ - docs/README.md
150
+ - docs/contributors/testing.md
151
+ - docs/users/installation.md
152
+ - docs/users/migrate-from-themekit.md
153
+ - ext/javy/hashes/javy-arm-macos-v0.1.0.gz.sha256
154
+ - ext/javy/hashes/javy-x86_64-linux-v0.1.0.gz.sha256
155
+ - ext/javy/hashes/javy-x86_64-macos-v0.1.0.gz.sha256
156
+ - ext/javy/hashes/javy-x86_64-windows-v0.1.0.gz.sha256
157
+ - ext/javy/javy.rb
158
+ - ext/javy/version
158
159
  - ext/shopify-extensions/extconf.rb
159
160
  - ext/shopify-extensions/shopify_extensions.rb
160
161
  - ext/shopify-extensions/version
161
- - install.sh
162
162
  - lib/docgen/class_template.md.erb
163
163
  - lib/docgen/index_template.md.erb
164
164
  - lib/docgen/markdown.rb
@@ -222,10 +222,12 @@ files:
222
222
  - lib/project_types/extension/models/npm_package.rb
223
223
  - lib/project_types/extension/models/product.rb
224
224
  - lib/project_types/extension/models/registration.rb
225
+ - lib/project_types/extension/models/server_config/app.rb
225
226
  - lib/project_types/extension/models/server_config/base.rb
226
227
  - lib/project_types/extension/models/server_config/development.rb
227
228
  - lib/project_types/extension/models/server_config/development_entries.rb
228
229
  - lib/project_types/extension/models/server_config/development_renderer.rb
230
+ - lib/project_types/extension/models/server_config/development_resource.rb
229
231
  - lib/project_types/extension/models/server_config/extension.rb
230
232
  - lib/project_types/extension/models/server_config/root.rb
231
233
  - lib/project_types/extension/models/server_config/user.rb
@@ -240,13 +242,14 @@ files:
240
242
  - lib/project_types/extension/tasks/choose_next_available_port.rb
241
243
  - lib/project_types/extension/tasks/configure_features.rb
242
244
  - lib/project_types/extension/tasks/configure_options.rb
245
+ - lib/project_types/extension/tasks/convert_server_config.rb
243
246
  - lib/project_types/extension/tasks/converters/app_converter.rb
244
247
  - lib/project_types/extension/tasks/converters/product_converter.rb
245
248
  - lib/project_types/extension/tasks/converters/registration_converter.rb
246
- - lib/project_types/extension/tasks/converters/server_config_converter.rb
247
249
  - lib/project_types/extension/tasks/converters/validation_error_converter.rb
248
250
  - lib/project_types/extension/tasks/converters/version_converter.rb
249
251
  - lib/project_types/extension/tasks/create_extension.rb
252
+ - lib/project_types/extension/tasks/ensure_resource_url.rb
250
253
  - lib/project_types/extension/tasks/fetch_specifications.rb
251
254
  - lib/project_types/extension/tasks/find_npm_packages.rb
252
255
  - lib/project_types/extension/tasks/find_package_from_json.rb
@@ -254,56 +257,39 @@ files:
254
257
  - lib/project_types/extension/tasks/get_apps.rb
255
258
  - lib/project_types/extension/tasks/get_extensions.rb
256
259
  - lib/project_types/extension/tasks/get_product.rb
257
- - lib/project_types/extension/tasks/load_server_config.rb
260
+ - lib/project_types/extension/tasks/merge_server_config.rb
258
261
  - lib/project_types/extension/tasks/run_extension_command.rb
259
262
  - lib/project_types/extension/tasks/update_draft.rb
260
263
  - lib/project_types/extension/tasks/user_errors.rb
261
264
  - lib/project_types/node/cli.rb
262
- - lib/project_types/node/commands/connect.rb
263
- - lib/project_types/node/commands/create.rb
264
- - lib/project_types/node/commands/deploy.rb
265
- - lib/project_types/node/commands/deploy/heroku.rb
266
- - lib/project_types/node/commands/generate.rb
267
- - lib/project_types/node/commands/open.rb
268
- - lib/project_types/node/commands/serve.rb
269
- - lib/project_types/node/commands/tunnel.rb
270
265
  - lib/project_types/node/forms/create.rb
271
266
  - lib/project_types/node/messages/messages.rb
272
267
  - lib/project_types/php/cli.rb
273
- - lib/project_types/php/commands/connect.rb
274
- - lib/project_types/php/commands/create.rb
275
- - lib/project_types/php/commands/deploy.rb
276
- - lib/project_types/php/commands/deploy/heroku.rb
277
- - lib/project_types/php/commands/open.rb
278
- - lib/project_types/php/commands/serve.rb
279
- - lib/project_types/php/commands/tunnel.rb
280
268
  - lib/project_types/php/forms/create.rb
281
269
  - lib/project_types/php/messages/messages.rb
282
270
  - lib/project_types/rails/cli.rb
283
- - lib/project_types/rails/commands/connect.rb
284
271
  - lib/project_types/rails/commands/create.rb
285
- - lib/project_types/rails/commands/deploy.rb
286
- - lib/project_types/rails/commands/deploy/heroku.rb
287
- - lib/project_types/rails/commands/generate.rb
288
- - lib/project_types/rails/commands/generate/webhook.rb
289
- - lib/project_types/rails/commands/open.rb
290
- - lib/project_types/rails/commands/serve.rb
291
- - lib/project_types/rails/commands/tunnel.rb
292
272
  - lib/project_types/rails/forms/create.rb
293
273
  - lib/project_types/rails/gem.rb
294
274
  - lib/project_types/rails/messages/messages.rb
295
275
  - lib/project_types/rails/ruby.rb
296
276
  - lib/project_types/script/cli.rb
297
277
  - lib/project_types/script/commands/create.rb
278
+ - lib/project_types/script/commands/javy.rb
298
279
  - lib/project_types/script/commands/push.rb
299
280
  - lib/project_types/script/config/extension_points.yml
300
281
  - lib/project_types/script/errors.rb
282
+ - lib/project_types/script/forms/ask_app.rb
283
+ - lib/project_types/script/forms/ask_org.rb
284
+ - lib/project_types/script/forms/ask_script_uuid.rb
301
285
  - lib/project_types/script/forms/create.rb
286
+ - lib/project_types/script/forms/run_against_shopify_org.rb
302
287
  - lib/project_types/script/graphql/app_script_set.graphql
303
288
  - lib/project_types/script/graphql/get_app_scripts.graphql
304
289
  - lib/project_types/script/graphql/module_upload_url_generate.graphql
305
290
  - lib/project_types/script/graphql/script_service_proxy.graphql
306
291
  - lib/project_types/script/layers/application/build_script.rb
292
+ - lib/project_types/script/layers/application/connect_app.rb
307
293
  - lib/project_types/script/layers/application/create_script.rb
308
294
  - lib/project_types/script/layers/application/extension_points.rb
309
295
  - lib/project_types/script/layers/application/project_dependencies.rb
@@ -312,7 +298,7 @@ files:
312
298
  - lib/project_types/script/layers/domain/extension_point.rb
313
299
  - lib/project_types/script/layers/domain/metadata.rb
314
300
  - lib/project_types/script/layers/domain/push_package.rb
315
- - lib/project_types/script/layers/domain/script_json.rb
301
+ - lib/project_types/script/layers/domain/script_config.rb
316
302
  - lib/project_types/script/layers/domain/script_project.rb
317
303
  - lib/project_types/script/layers/infrastructure/api_clients/partners_proxy_api_client.rb
318
304
  - lib/project_types/script/layers/infrastructure/api_clients/script_service_api_client.rb
@@ -331,7 +317,6 @@ files:
331
317
  - lib/project_types/script/layers/infrastructure/script_uploader.rb
332
318
  - lib/project_types/script/layers/infrastructure/service_locator.rb
333
319
  - lib/project_types/script/messages/messages.rb
334
- - lib/project_types/script/tasks/ensure_env.rb
335
320
  - lib/project_types/script/ui/error_handler.rb
336
321
  - lib/project_types/script/ui/printing_spinner.rb
337
322
  - lib/project_types/script/ui/strict_spinner.rb
@@ -358,9 +343,21 @@ files:
358
343
  - lib/shopify_cli/app_type_detector.rb
359
344
  - lib/shopify_cli/command.rb
360
345
  - lib/shopify_cli/command/app_sub_command.rb
346
+ - lib/shopify_cli/command/project_command.rb
347
+ - lib/shopify_cli/command/sub_command.rb
361
348
  - lib/shopify_cli/command_options.rb
362
349
  - lib/shopify_cli/command_options/command_serve_options.rb
363
350
  - lib/shopify_cli/commands.rb
351
+ - lib/shopify_cli/commands/app.rb
352
+ - lib/shopify_cli/commands/app/connect.rb
353
+ - lib/shopify_cli/commands/app/create.rb
354
+ - lib/shopify_cli/commands/app/create/node.rb
355
+ - lib/shopify_cli/commands/app/create/php.rb
356
+ - lib/shopify_cli/commands/app/create/rails.rb
357
+ - lib/shopify_cli/commands/app/deploy.rb
358
+ - lib/shopify_cli/commands/app/open.rb
359
+ - lib/shopify_cli/commands/app/serve.rb
360
+ - lib/shopify_cli/commands/app/tunnel.rb
364
361
  - lib/shopify_cli/commands/config.rb
365
362
  - lib/shopify_cli/commands/help.rb
366
363
  - lib/shopify_cli/commands/login.rb
@@ -390,6 +387,8 @@ files:
390
387
  - lib/shopify_cli/feature.rb
391
388
  - lib/shopify_cli/form.rb
392
389
  - lib/shopify_cli/git.rb
390
+ - lib/shopify_cli/github.rb
391
+ - lib/shopify_cli/github/issue_url_generator.rb
393
392
  - lib/shopify_cli/helpers.rb
394
393
  - lib/shopify_cli/helpers/haikunator.rb
395
394
  - lib/shopify_cli/heroku.rb
@@ -420,10 +419,23 @@ files:
420
419
  - lib/shopify_cli/resources/env_file.rb
421
420
  - lib/shopify_cli/result.rb
422
421
  - lib/shopify_cli/services.rb
422
+ - lib/shopify_cli/services/app/connect_service.rb
423
+ - lib/shopify_cli/services/app/create/node_service.rb
424
+ - lib/shopify_cli/services/app/create/php_service.rb
425
+ - lib/shopify_cli/services/app/create/rails_service.rb
426
+ - lib/shopify_cli/services/app/deploy/heroku/node_service.rb
427
+ - lib/shopify_cli/services/app/deploy/heroku/php_service.rb
428
+ - lib/shopify_cli/services/app/deploy/heroku/rails_service.rb
429
+ - lib/shopify_cli/services/app/open_service.rb
430
+ - lib/shopify_cli/services/app/serve/node_service.rb
431
+ - lib/shopify_cli/services/app/serve/php_service.rb
432
+ - lib/shopify_cli/services/app/serve/rails_service.rb
433
+ - lib/shopify_cli/services/app/tunnel/auth_service.rb
434
+ - lib/shopify_cli/services/app/tunnel/start_service.rb
435
+ - lib/shopify_cli/services/app/tunnel/stop_service.rb
423
436
  - lib/shopify_cli/services/base_service.rb
424
437
  - lib/shopify_cli/services/reporting_service.rb
425
438
  - lib/shopify_cli/shopifolk.rb
426
- - lib/shopify_cli/sub_command.rb
427
439
  - lib/shopify_cli/task.rb
428
440
  - lib/shopify_cli/tasks.rb
429
441
  - lib/shopify_cli/tasks/confirm_store.rb
@@ -436,6 +448,7 @@ files:
436
448
  - lib/shopify_cli/tasks/select_org_and_shop.rb
437
449
  - lib/shopify_cli/tasks/update_dashboard_urls.rb
438
450
  - lib/shopify_cli/theme/dev_server.rb
451
+ - lib/shopify_cli/theme/dev_server/cdn_fonts.rb
439
452
  - lib/shopify_cli/theme/dev_server/certificate_manager.rb
440
453
  - lib/shopify_cli/theme/dev_server/header_hash.rb
441
454
  - lib/shopify_cli/theme/dev_server/hot-reload.js
@@ -450,13 +463,16 @@ files:
450
463
  - lib/shopify_cli/theme/ignore_filter.rb
451
464
  - lib/shopify_cli/theme/mime_type.rb
452
465
  - lib/shopify_cli/theme/syncer.rb
466
+ - lib/shopify_cli/theme/syncer/error_reporter.rb
467
+ - lib/shopify_cli/theme/syncer/operation.rb
468
+ - lib/shopify_cli/theme/syncer/standard_reporter.rb
453
469
  - lib/shopify_cli/theme/theme.rb
454
470
  - lib/shopify_cli/transform_data_structure.rb
455
471
  - lib/shopify_cli/tunnel.rb
456
472
  - lib/shopify_cli/version.rb
457
473
  - shopify-cli.gemspec
458
- - shopify.fish
459
- - shopify.sh
474
+ - shopify-dev
475
+ - utilities/constants.rb
460
476
  - utilities/docker.rb
461
477
  - utilities/docker/container.rb
462
478
  - utilities/utilities.rb
data/docs/_config.yml DELETED
@@ -1,2 +0,0 @@
1
- plugins:
2
- - jekyll-redirect-from
@@ -1,4 +0,0 @@
1
- ---
2
- title: Node.js app commands
3
- redirect_to: https://shopify.dev/tools/cli/reference/node-app
4
- ---
@@ -1,4 +0,0 @@
1
- ---
2
- title: Getting started with Shopify CLI
3
- redirect_to: https://shopify.dev/tools/cli/getting-started
4
- ---
@@ -1,4 +0,0 @@
1
- ---
2
- title: Ruby on Rails app commands
3
- redirect_to: https://shopify.dev/tools/cli/reference/ruby-on-rails-app
4
- ---
@@ -1,4 +0,0 @@
1
- ---
2
- title: Getting started with Shopify CLI
3
- redirect_to: https://shopify.dev/tools/cli/getting-started
4
- ---
data/docs/core/index.md DELETED
@@ -1,4 +0,0 @@
1
- ---
2
- title: Shopify CLI core commands
3
- redirect_to: https://shopify.dev/tools/cli/reference
4
- ---
@@ -1,4 +0,0 @@
1
- ---
2
- title: Getting started with Shopify CLI
3
- redirect_to: https://shopify.dev/tools/cli/getting-started
4
- ---
@@ -1,4 +0,0 @@
1
- ---
2
- title: Install Shopify CLI
3
- redirect_to: https://shopify.dev/tools/cli/installation
4
- ---
@@ -1,4 +0,0 @@
1
- ---
2
- title: Troubleshooting Shopify CLI
3
- redirect_to: https://shopify.dev/tools/cli/troubleshooting
4
- ---
@@ -1,4 +0,0 @@
1
- ---
2
- title: Troubleshooting Shopify CLI
3
- redirect_to: https://shopify.dev/tools/cli/troubleshooting
4
- ---
@@ -1,4 +0,0 @@
1
- ---
2
- title: Troubleshooting Shopify CLI
3
- redirect_to: https://shopify.dev/tools/cli/troubleshooting
4
- ---
@@ -1,4 +0,0 @@
1
- ---
2
- title: Getting started with Shopify CLI
3
- redirect_to: https://shopify.dev/tools/cli/getting-started
4
- ---
data/docs/index.md DELETED
@@ -1,4 +0,0 @@
1
- ---
2
- title: Shopify CLI
3
- redirect_to: https://shopify.dev/tools/cli
4
- ---
data/install.sh DELETED
@@ -1,7 +0,0 @@
1
- # shellcheck shell=sh disable=1012,1001
2
- \cat << 'EOF'
3
- This install method for Shopify CLI is no longer supported.
4
-
5
- Please visit this page for complete instructions:
6
- https://shopify.dev/tools/cli/troubleshooting#migrate-from-a-legacy-version
7
- EOF
@@ -1,30 +0,0 @@
1
- # frozen_string_literal: true
2
- require "shopify_cli"
3
-
4
- module Extension
5
- module Tasks
6
- module Converters
7
- module ServerConfigConverter
8
- def self.from_hash(hash:, type:, registration_uuid:)
9
- context.abort(context.message("tasks.errors.parse_error")) if hash.nil?
10
-
11
- extension = Models::ServerConfig::Extension.new(
12
- uuid: registration_uuid,
13
- type: type.upcase,
14
- user: Models::ServerConfig::User.new,
15
- development: Models::ServerConfig::Development.new(
16
- build_dir: hash.dig("development", "build_dir"),
17
- renderer: Models::ServerConfig::DevelopmentRenderer.find(type),
18
- entries: Models::ServerConfig::DevelopmentEntries.new(
19
- main: hash.dig("development", "entries", "main")
20
- )
21
- ),
22
- extension_points: hash.dig("extension_points")
23
- )
24
-
25
- Models::ServerConfig::Root.new(extensions: [extension])
26
- end
27
- end
28
- end
29
- end
30
- end
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
- require "shopify_cli"
3
- require "yaml"
4
-
5
- module Extension
6
- module Tasks
7
- class LoadServerConfig < ShopifyCLI::Task
8
- include SmartProperties
9
-
10
- class << self
11
- def call(file_name:, type:)
12
- config = YAML.load_file(file_name)
13
- project = ExtensionProject.current
14
- Tasks::Converters::ServerConfigConverter.from_hash(
15
- hash: config,
16
- type: type,
17
- registration_uuid: project.registration_uuid
18
- )
19
- rescue Psych::SyntaxError => e
20
- raise(
21
- ShopifyCLI::Abort,
22
- ShopifyCLI::Context.message("core.yaml.error.invalid", file_name, e.message)
23
- )
24
- end
25
- end
26
- end
27
- end
28
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
- module Node
3
- class Command
4
- class Connect < ShopifyCLI::SubCommand
5
- prerequisite_task ensure_project_type: :node
6
-
7
- def call(*)
8
- if ShopifyCLI::Project.has_current? && ShopifyCLI::Project.current.env
9
- @ctx.puts(@ctx.message("node.connect.production_warning"))
10
- end
11
-
12
- app = ShopifyCLI::Connect.new(@ctx).default_connect("node")
13
- @ctx.done(@ctx.message("node.connect.connected", app))
14
- end
15
-
16
- def self.help
17
- ShopifyCLI::Context.message("node.connect.help", ShopifyCLI::TOOL_NAME, ShopifyCLI::TOOL_NAME)
18
- end
19
- end
20
- end
21
- end
@@ -1,125 +0,0 @@
1
- # frozen_string_literal: true
2
- module Node
3
- class Command
4
- class Create < ShopifyCLI::SubCommand
5
- prerequisite_task :ensure_authenticated
6
-
7
- options do |parser, flags|
8
- # backwards compatibility allow 'title' for now
9
- parser.on("--title=TITLE") { |t| flags[:title] = t }
10
- parser.on("--name=NAME") { |t| flags[:title] = t }
11
- parser.on("--organization_id=ID") { |id| flags[:organization_id] = id }
12
- parser.on("--organization-id=ID") { |id| flags[:organization_id] = id }
13
- parser.on("--store=MYSHOPIFYDOMAIN") { |url| flags[:shop_domain] = url }
14
- # backwards compatibility allow 'shop domain' for now
15
- parser.on("--shop_domain=MYSHOPIFYDOMAIN") { |url| flags[:shop_domain] = url }
16
- parser.on("--shop-domain=MYSHOPIFYDOMAIN") { |url| flags[:shop_domain] = url }
17
- parser.on("--type=APPTYPE") { |type| flags[:type] = type }
18
- parser.on("--verbose") { flags[:verbose] = true }
19
- end
20
-
21
- def call(args, _name)
22
- form = Forms::Create.ask(@ctx, args, options.flags)
23
- return @ctx.puts(self.class.help) if form.nil?
24
-
25
- check_node
26
- check_npm
27
- build(form.name)
28
-
29
- ShopifyCLI::Project.write(
30
- @ctx,
31
- project_type: "node",
32
- organization_id: form.organization_id,
33
- )
34
-
35
- api_client = ShopifyCLI::Tasks::CreateApiClient.call(
36
- @ctx,
37
- org_id: form.organization_id,
38
- title: form.title,
39
- type: form.type,
40
- )
41
-
42
- ShopifyCLI::Resources::EnvFile.new(
43
- api_key: api_client["apiKey"],
44
- secret: api_client["apiSecretKeys"].first["secret"],
45
- shop: form.shop_domain,
46
- scopes: "write_products,write_customers,write_draft_orders",
47
- ).write(@ctx)
48
-
49
- partners_url = ShopifyCLI::PartnersAPI.partners_url_for(form.organization_id, api_client["id"])
50
-
51
- @ctx.puts(@ctx.message("apps.create.info.created", form.title, partners_url))
52
- @ctx.puts(@ctx.message("apps.create.info.serve", form.name, ShopifyCLI::TOOL_NAME, "node"))
53
- unless ShopifyCLI::Shopifolk.acting_as_shopify_organization?
54
- @ctx.puts(@ctx.message("apps.create.info.install", partners_url, form.title))
55
- end
56
- end
57
-
58
- def self.help
59
- ShopifyCLI::Context.message("node.create.help", ShopifyCLI::TOOL_NAME, ShopifyCLI::TOOL_NAME)
60
- end
61
-
62
- private
63
-
64
- def check_node
65
- cmd_path = @ctx.which("node")
66
- @ctx.abort(@ctx.message("node.create.error.node_required")) if cmd_path.nil?
67
-
68
- version, stat = @ctx.capture2e("node", "-v")
69
- @ctx.abort(@ctx.message("node.create.error.node_version_failure")) unless stat.success?
70
-
71
- @ctx.done(@ctx.message("node.create.node_version", version))
72
- end
73
-
74
- def check_npm
75
- cmd_path = @ctx.which("npm")
76
- @ctx.abort(@ctx.message("node.create.error.npm_required")) if cmd_path.nil?
77
-
78
- version, stat = @ctx.capture2e("npm", "-v")
79
- @ctx.abort(@ctx.message("node.create.error.npm_version_failure")) unless stat.success?
80
-
81
- @ctx.done(@ctx.message("node.create.npm_version", version))
82
- end
83
-
84
- def set_npm_config
85
- # check available npmrc (either user or system) for production registry
86
- registry, _ = @ctx.capture2("npm config get @shopify:registry")
87
- return if registry.include?("https://registry.yarnpkg.com")
88
-
89
- # available npmrc doesn't have production registry =>
90
- # set a project-based .npmrc
91
- @ctx.system(
92
- "npm",
93
- "--userconfig",
94
- "./.npmrc",
95
- "config",
96
- "set",
97
- "@shopify:registry",
98
- "https://registry.yarnpkg.com",
99
- chdir: @ctx.root
100
- )
101
- end
102
-
103
- def build(name)
104
- ShopifyCLI::Git.clone("https://github.com/Shopify/shopify-app-node.git", name)
105
-
106
- @ctx.root = File.join(@ctx.root, name)
107
-
108
- set_npm_config
109
- ShopifyCLI::JsDeps.install(@ctx, !options.flags[:verbose].nil?)
110
-
111
- begin
112
- @ctx.rm_r(".git")
113
- @ctx.rm_r(".github")
114
- @ctx.rm(File.join("server", "handlers", "client.js"))
115
- @ctx.rename(
116
- File.join("server", "handlers", "client.cli.js"),
117
- File.join("server", "handlers", "client.js")
118
- )
119
- rescue Errno::ENOENT => e
120
- @ctx.debug(e)
121
- end
122
- end
123
- end
124
- end
125
- end