shopify-cli 1.6.0 → 1.9.1

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/.rubocop_todo.yml +15 -2
  3. data/CHANGELOG.md +21 -0
  4. data/Gemfile +12 -12
  5. data/Gemfile.lock +14 -14
  6. data/Rakefile +32 -30
  7. data/bin/load_shopify.rb +6 -6
  8. data/bin/shopify +2 -2
  9. data/dev.yml +3 -0
  10. data/ext/shopify-cli/extconf.rb +7 -7
  11. data/lib/docgen/markdown.rb +12 -12
  12. data/lib/graphql/extension_create.graphql +17 -2
  13. data/lib/graphql/fetch_specifications.graphql +14 -0
  14. data/lib/{project_types/extension/graphql → graphql}/get_app_by_api_key.graphql +0 -0
  15. data/lib/project_types/extension/cli.rb +56 -55
  16. data/lib/project_types/extension/commands/build.rb +3 -3
  17. data/lib/project_types/extension/commands/create.rb +17 -10
  18. data/lib/project_types/extension/commands/extension_command.rb +14 -7
  19. data/lib/project_types/extension/commands/push.rb +10 -10
  20. data/lib/project_types/extension/commands/register.rb +22 -32
  21. data/lib/project_types/extension/commands/serve.rb +1 -7
  22. data/lib/project_types/extension/commands/tunnel.rb +12 -12
  23. data/lib/project_types/extension/extension_project.rb +22 -7
  24. data/lib/project_types/extension/extension_project_keys.rb +5 -4
  25. data/lib/project_types/extension/features/argo.rb +26 -42
  26. data/lib/project_types/extension/features/argo_config.rb +5 -5
  27. data/lib/project_types/extension/features/argo_dependencies.rb +5 -5
  28. data/lib/project_types/extension/features/argo_renderer_package.rb +47 -0
  29. data/lib/project_types/extension/features/argo_serve.rb +69 -0
  30. data/lib/project_types/extension/features/argo_setup.rb +3 -3
  31. data/lib/project_types/extension/features/argo_setup_steps.rb +4 -4
  32. data/lib/project_types/extension/forms/create.rb +28 -34
  33. data/lib/project_types/extension/forms/questions/ask_app.rb +53 -0
  34. data/lib/project_types/extension/forms/questions/ask_name.rb +40 -0
  35. data/lib/project_types/extension/forms/questions/ask_type.rb +47 -0
  36. data/lib/project_types/extension/messages/message_loading.rb +3 -1
  37. data/lib/project_types/extension/messages/messages.rb +55 -55
  38. data/lib/project_types/extension/models/lazy_specification_handler.rb +12 -0
  39. data/lib/project_types/extension/models/registration.rb +1 -0
  40. data/lib/project_types/extension/models/specification.rb +6 -2
  41. data/lib/project_types/extension/models/specification_handlers/checkout_post_purchase.rb +1 -1
  42. data/lib/project_types/extension/models/specification_handlers/default.rb +10 -2
  43. data/lib/project_types/extension/models/specifications.rb +14 -3
  44. data/lib/project_types/extension/models/version.rb +1 -1
  45. data/lib/project_types/extension/tasks/configure_features.rb +7 -5
  46. data/lib/project_types/extension/tasks/converters/app_converter.rb +6 -6
  47. data/lib/project_types/extension/tasks/converters/registration_converter.rb +8 -6
  48. data/lib/project_types/extension/tasks/converters/validation_error_converter.rb +4 -4
  49. data/lib/project_types/extension/tasks/converters/version_converter.rb +7 -7
  50. data/lib/project_types/extension/tasks/create_extension.rb +4 -4
  51. data/lib/project_types/extension/tasks/fetch_specifications.rb +8 -28
  52. data/lib/project_types/extension/tasks/get_app.rb +4 -4
  53. data/lib/project_types/extension/tasks/get_apps.rb +3 -3
  54. data/lib/project_types/extension/tasks/update_draft.rb +4 -4
  55. data/lib/project_types/extension/tasks/user_errors.rb +4 -4
  56. data/lib/project_types/node/cli.rb +19 -19
  57. data/lib/project_types/node/commands/connect.rb +3 -3
  58. data/lib/project_types/node/commands/create.rb +40 -38
  59. data/lib/project_types/node/commands/deploy.rb +4 -4
  60. data/lib/project_types/node/commands/deploy/heroku.rb +24 -24
  61. data/lib/project_types/node/commands/generate.rb +2 -24
  62. data/lib/project_types/node/commands/open.rb +2 -2
  63. data/lib/project_types/node/commands/populate.rb +6 -6
  64. data/lib/project_types/node/commands/populate/customer.rb +5 -5
  65. data/lib/project_types/node/commands/populate/draft_order.rb +5 -5
  66. data/lib/project_types/node/commands/populate/product.rb +5 -5
  67. data/lib/project_types/node/commands/serve.rb +9 -9
  68. data/lib/project_types/node/commands/tunnel.rb +7 -7
  69. data/lib/project_types/node/forms/create.rb +17 -8
  70. data/lib/project_types/node/messages/messages.rb +8 -7
  71. data/lib/project_types/rails/cli.rb +21 -21
  72. data/lib/project_types/rails/commands/connect.rb +3 -3
  73. data/lib/project_types/rails/commands/create.rb +51 -48
  74. data/lib/project_types/rails/commands/deploy.rb +4 -4
  75. data/lib/project_types/rails/commands/deploy/heroku.rb +30 -30
  76. data/lib/project_types/rails/commands/generate.rb +7 -7
  77. data/lib/project_types/rails/commands/generate/webhook.rb +6 -6
  78. data/lib/project_types/rails/commands/open.rb +2 -2
  79. data/lib/project_types/rails/commands/populate.rb +6 -6
  80. data/lib/project_types/rails/commands/populate/customer.rb +5 -5
  81. data/lib/project_types/rails/commands/populate/draft_order.rb +5 -5
  82. data/lib/project_types/rails/commands/populate/product.rb +5 -5
  83. data/lib/project_types/rails/commands/serve.rb +11 -11
  84. data/lib/project_types/rails/commands/tunnel.rb +7 -7
  85. data/lib/project_types/rails/forms/create.rb +34 -24
  86. data/lib/project_types/rails/gem.rb +23 -23
  87. data/lib/project_types/rails/messages/messages.rb +9 -8
  88. data/lib/project_types/rails/ruby.rb +2 -2
  89. data/lib/project_types/script/cli.rb +36 -40
  90. data/lib/project_types/script/commands/create.rb +9 -13
  91. data/lib/project_types/script/commands/push.rb +6 -5
  92. data/lib/project_types/script/config/extension_points.yml +25 -10
  93. data/lib/project_types/script/errors.rb +1 -19
  94. data/lib/project_types/script/forms/create.rb +7 -18
  95. data/lib/project_types/script/graphql/app_script_update_or_create.graphql +7 -5
  96. data/lib/project_types/script/graphql/script_service_proxy.graphql +1 -2
  97. data/lib/project_types/script/layers/application/build_script.rb +6 -8
  98. data/lib/project_types/script/layers/application/create_script.rb +34 -24
  99. data/lib/project_types/script/layers/application/extension_points.rb +3 -2
  100. data/lib/project_types/script/layers/application/project_dependencies.rb +4 -4
  101. data/lib/project_types/script/layers/application/push_script.rb +10 -15
  102. data/lib/project_types/script/layers/domain/config_ui.rb +16 -0
  103. data/lib/project_types/script/layers/domain/errors.rb +16 -0
  104. data/lib/project_types/script/layers/domain/extension_point.rb +60 -45
  105. data/lib/project_types/script/layers/domain/metadata.rb +18 -25
  106. data/lib/project_types/script/layers/domain/push_package.rb +9 -5
  107. data/lib/project_types/script/layers/domain/script_project.rb +38 -0
  108. data/lib/project_types/script/layers/infrastructure/assemblyscript_project_creator.rb +39 -10
  109. data/lib/project_types/script/layers/infrastructure/assemblyscript_task_runner.rb +9 -44
  110. data/lib/project_types/script/layers/infrastructure/errors.rb +50 -19
  111. data/lib/project_types/script/layers/infrastructure/extension_point_repository.rb +2 -2
  112. data/lib/project_types/script/layers/infrastructure/push_package_repository.rb +16 -21
  113. data/lib/project_types/script/layers/infrastructure/rust_project_creator.rb +4 -4
  114. data/lib/project_types/script/layers/infrastructure/rust_task_runner.rb +2 -2
  115. data/lib/project_types/script/layers/infrastructure/script_project_repository.rb +179 -0
  116. data/lib/project_types/script/layers/infrastructure/script_service.rb +35 -78
  117. data/lib/project_types/script/messages/messages.rb +33 -57
  118. data/lib/project_types/script/ui/error_handler.rb +116 -88
  119. data/lib/project_types/script/ui/printing_spinner.rb +1 -1
  120. data/lib/project_types/script/ui/strict_spinner.rb +1 -1
  121. data/lib/project_types/theme/cli.rb +19 -19
  122. data/lib/project_types/theme/commands/connect.rb +12 -12
  123. data/lib/project_types/theme/commands/create.rb +11 -11
  124. data/lib/project_types/theme/commands/deploy.rb +8 -8
  125. data/lib/project_types/theme/commands/generate.rb +3 -3
  126. data/lib/project_types/theme/commands/generate/env.rb +15 -15
  127. data/lib/project_types/theme/commands/push.rb +15 -15
  128. data/lib/project_types/theme/commands/serve.rb +5 -5
  129. data/lib/project_types/theme/forms/connect.rb +4 -4
  130. data/lib/project_types/theme/forms/create.rb +5 -5
  131. data/lib/project_types/theme/tasks/ensure_themekit_installed.rb +22 -22
  132. data/lib/project_types/theme/themekit.rb +15 -15
  133. data/lib/rubygems_plugin.rb +3 -3
  134. data/lib/shopify-cli/admin_api.rb +11 -11
  135. data/lib/shopify-cli/admin_api/populate_resource_command.rb +17 -17
  136. data/lib/shopify-cli/admin_api/schema.rb +3 -3
  137. data/lib/shopify-cli/api.rb +10 -10
  138. data/lib/shopify-cli/command.rb +1 -1
  139. data/lib/shopify-cli/commands.rb +9 -9
  140. data/lib/shopify-cli/commands/config.rb +28 -52
  141. data/lib/shopify-cli/commands/connect.rb +10 -10
  142. data/lib/shopify-cli/commands/create.rb +5 -5
  143. data/lib/shopify-cli/commands/help.rb +6 -6
  144. data/lib/shopify-cli/commands/logout.rb +3 -3
  145. data/lib/shopify-cli/commands/system.rb +32 -32
  146. data/lib/shopify-cli/commands/version.rb +2 -2
  147. data/lib/shopify-cli/context.rb +51 -23
  148. data/lib/shopify-cli/core.rb +4 -4
  149. data/lib/shopify-cli/core/entry_point.rb +5 -5
  150. data/lib/shopify-cli/core/executor.rb +1 -1
  151. data/lib/shopify-cli/core/help_resolver.rb +2 -2
  152. data/lib/shopify-cli/core/monorail.rb +16 -16
  153. data/lib/shopify-cli/db.rb +2 -2
  154. data/lib/shopify-cli/feature.rb +1 -1
  155. data/lib/shopify-cli/form.rb +1 -1
  156. data/lib/shopify-cli/git.rb +17 -17
  157. data/lib/shopify-cli/helpers.rb +1 -1
  158. data/lib/shopify-cli/helpers/haikunator.rb +1 -1
  159. data/lib/shopify-cli/heroku.rb +28 -28
  160. data/lib/shopify-cli/http_request.rb +2 -2
  161. data/lib/shopify-cli/js_deps.rb +12 -12
  162. data/lib/shopify-cli/js_system.rb +7 -7
  163. data/lib/shopify-cli/lazy_delegator.rb +55 -0
  164. data/lib/shopify-cli/messages/messages.rb +7 -16
  165. data/lib/shopify-cli/method_object.rb +1 -1
  166. data/lib/shopify-cli/oauth.rb +27 -27
  167. data/lib/shopify-cli/oauth/servlet.rb +9 -9
  168. data/lib/shopify-cli/options.rb +3 -3
  169. data/lib/shopify-cli/packager.rb +25 -25
  170. data/lib/shopify-cli/partners_api.rb +16 -16
  171. data/lib/shopify-cli/partners_api/organizations.rb +10 -10
  172. data/lib/shopify-cli/process_supervision.rb +7 -7
  173. data/lib/shopify-cli/project.rb +16 -16
  174. data/lib/shopify-cli/project_type.rb +3 -3
  175. data/lib/shopify-cli/resolve_constant.rb +1 -1
  176. data/lib/shopify-cli/resources.rb +1 -1
  177. data/lib/shopify-cli/resources/env_file.rb +10 -10
  178. data/lib/shopify-cli/result.rb +11 -11
  179. data/lib/shopify-cli/shopifolk.rb +6 -9
  180. data/lib/shopify-cli/sub_command.rb +1 -1
  181. data/lib/shopify-cli/task.rb +3 -3
  182. data/lib/shopify-cli/tasks.rb +7 -7
  183. data/lib/shopify-cli/tasks/create_api_client.rb +5 -5
  184. data/lib/shopify-cli/tasks/ensure_dev_store.rb +12 -12
  185. data/lib/shopify-cli/tasks/ensure_env.rb +15 -15
  186. data/lib/shopify-cli/tasks/ensure_loopback_url.rb +4 -4
  187. data/lib/shopify-cli/tasks/select_org_and_shop.rb +19 -19
  188. data/lib/shopify-cli/tasks/update_dashboard_urls.rb +10 -10
  189. data/lib/shopify-cli/transform_data_structure.rb +86 -0
  190. data/lib/shopify-cli/tunnel.rb +30 -30
  191. data/lib/shopify-cli/version.rb +1 -1
  192. data/lib/shopify_cli.rb +56 -54
  193. data/shopify-cli.gemspec +6 -6
  194. data/vendor/deps/smart_properties/REVISION +1 -1
  195. data/vendor/deps/smart_properties/lib/smart_properties/property.rb +7 -1
  196. data/vendor/deps/smart_properties/lib/smart_properties/version.rb +1 -1
  197. data/vendor/gen/template/bin/update-deps +9 -9
  198. metadata +15 -11
  199. data/lib/project_types/extension/forms/register.rb +0 -47
  200. data/lib/project_types/script/commands/disable.rb +0 -25
  201. data/lib/project_types/script/commands/enable.rb +0 -78
  202. data/lib/project_types/script/graphql/shop_script_delete.graphql +0 -14
  203. data/lib/project_types/script/graphql/shop_script_update_or_create.graphql +0 -28
  204. data/lib/project_types/script/layers/application/disable_script.rb +0 -21
  205. data/lib/project_types/script/layers/application/enable_script.rb +0 -23
  206. data/lib/project_types/script/script_project.rb +0 -63
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51b21780f8f46054f92124110152a903c94a6215436b73b5dce40c8ad7b072cc
4
- data.tar.gz: 2884ba67316188cd05ae6b8cd3e7927a7dc8d99936fd328eed6a2480452eec4b
3
+ metadata.gz: 180a4674bfed27bb04ad09499b5c128980a93288666d3ab6aa58aa6d404d61c6
4
+ data.tar.gz: 8906cecf6a5a76db71e37ef5c1f756d417a3785c63618d4e70d808e3dcad5773
5
5
  SHA512:
6
- metadata.gz: 8e1f3f1911ab79b7dc725236249219a0f5aff3703ed82f243cf2235621e1e45aef7c77e2fd06c2360a436c7601d344e4e01f0795eff53d519a2a992079825847
7
- data.tar.gz: cc1c2de1b2bc5f624c0e249d4b7b8f0a58bd72ab164e02914b9ace0d6d542bbc6aa8d3a67387ce45060aa5fcc44ef5aed5fc4bed2ce8a67bb53bd7d65c03f608
6
+ metadata.gz: 443523c8b3e6ec1bcf3b7aef21f0e45148f6c5d1c3ebbc90b7206600bfb2ba484e87e63db423bd1e9abf21e03cda550680283d37534a5879dbcfcb93ed3a80e7
7
+ data.tar.gz: 8b0c0c59a792fdc06cb2a990bc745ba1bcc64f44ed2c7caa31ef7a1daa11ccec868eb6539b3c195302b046dd1bd7fe80501a4fac2043462dc68224e0a1506b2d
data/.rubocop_todo.yml CHANGED
@@ -1,11 +1,24 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-12-01 16:33:09 UTC using RuboCop version 1.4.1.
3
+ # on 2021-04-08 18:25:36 UTC using RuboCop version 1.12.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 30
9
+ # Offense count: 35
10
10
  Minitest/MultipleAssertions:
11
11
  Max: 9
12
+
13
+ # Offense count: 1
14
+ # Cop supports --auto-correct.
15
+ Style/PerlBackrefs:
16
+ Exclude:
17
+ - 'lib/docgen/markdown.rb'
18
+
19
+ # Offense count: 2
20
+ # Cop supports --auto-correct.
21
+ Style/RedundantBegin:
22
+ Exclude:
23
+ - 'lib/shopify-cli/shopifolk.rb'
24
+ - 'test/shopify-cli/tunnel_test.rb'
data/CHANGELOG.md CHANGED
@@ -1,6 +1,27 @@
1
1
  Unreleased
2
2
  ------
3
3
 
4
+ Version 1.9.1
5
+ -------------
6
+ * [1201](https://github.com/Shopify/shopify-app-cli/pull/1201) Determine Argo Renderer Dynamically. This fixes `shopify serve` and `shopify push` for extensions.
7
+
8
+ Version 1.9.0
9
+ -------------
10
+ * [1181](https://github.com/Shopify/shopify-app-cli/pull/1181): Remove the subcommand references of the `generate` command for node apps (fixes [1176](https://github.com/Shopify/shopify-app-cli/issues/1176))
11
+
12
+ Version 1.8.0
13
+ -------------
14
+ * [1119](https://github.com/Shopify/shopify-app-cli/pull/1119): Enable guest serialization for scripts
15
+
16
+ Version 1.7.1
17
+ ------
18
+ * Updating internal features in development
19
+
20
+ Version 1.7.0
21
+ -----
22
+ * [#1109](https://github.com/Shopify/shopify-app-cli/pull/1109): Abort app generation if name contains disallowed text.
23
+ * [#1075](https://github.com/Shopify/shopify-app-cli/pull/1075): Add support for kebab-case flags
24
+
4
25
  Version 1.6.0
5
26
  -----
6
27
  * [#1049](https://github.com/Shopify/shopify-app-cli/pull/1049): Add schema versioning support to the script project type
data/Gemfile CHANGED
@@ -5,19 +5,19 @@ source "https://rubygems.org"
5
5
  # They are all for CI and tests
6
6
  # `dev` uses no gems
7
7
  group :development, :test do
8
- gem 'rake'
9
- gem 'pry-byebug'
10
- gem 'byebug'
11
- gem 'rubocop-shopify', require: false
12
- gem 'rubocop-minitest', require: false
8
+ gem "rake"
9
+ gem "pry-byebug"
10
+ gem "byebug"
11
+ gem "rubocop-shopify", require: false
12
+ gem "rubocop-minitest", require: false
13
13
  end
14
14
 
15
15
  group :test do
16
- gem 'mocha', require: false
17
- gem 'minitest', '>= 5.0.0', require: false
18
- gem 'minitest-reporters', require: false
19
- gem 'minitest-fail-fast', require: false
20
- gem 'fakefs', '>= 1.0', require: false
21
- gem 'webmock', require: false
22
- gem 'timecop', require: false
16
+ gem "mocha", require: false
17
+ gem "minitest", ">= 5.0.0", require: false
18
+ gem "minitest-reporters", require: false
19
+ gem "minitest-fail-fast", require: false
20
+ gem "fakefs", ">= 1.0", require: false
21
+ gem "webmock", require: false
22
+ gem "timecop", require: false
23
23
  end
data/Gemfile.lock CHANGED
@@ -4,7 +4,7 @@ GEM
4
4
  addressable (2.7.0)
5
5
  public_suffix (>= 2.0.2, < 5.0)
6
6
  ansi (1.5.0)
7
- ast (2.4.1)
7
+ ast (2.4.2)
8
8
  builder (3.2.4)
9
9
  byebug (11.1.3)
10
10
  coderay (1.1.3)
@@ -22,7 +22,7 @@ GEM
22
22
  ruby-progressbar
23
23
  mocha (1.11.2)
24
24
  parallel (1.20.1)
25
- parser (2.7.2.0)
25
+ parser (3.0.1.0)
26
26
  ast (~> 2.4.1)
27
27
  pry (0.13.1)
28
28
  coderay (~> 1.1)
@@ -33,26 +33,26 @@ GEM
33
33
  public_suffix (4.0.6)
34
34
  rainbow (3.0.0)
35
35
  rake (13.0.1)
36
- regexp_parser (1.8.2)
37
- rexml (3.2.4)
38
- rubocop (1.4.1)
36
+ regexp_parser (2.1.1)
37
+ rexml (3.2.5)
38
+ rubocop (1.12.1)
39
39
  parallel (~> 1.10)
40
- parser (>= 2.7.1.5)
40
+ parser (>= 3.0.0.0)
41
41
  rainbow (>= 2.2.2, < 4.0)
42
- regexp_parser (>= 1.8)
42
+ regexp_parser (>= 1.8, < 3.0)
43
43
  rexml
44
- rubocop-ast (>= 1.1.1)
44
+ rubocop-ast (>= 1.2.0, < 2.0)
45
45
  ruby-progressbar (~> 1.7)
46
- unicode-display_width (>= 1.4.0, < 2.0)
47
- rubocop-ast (1.1.1)
46
+ unicode-display_width (>= 1.4.0, < 3.0)
47
+ rubocop-ast (1.4.1)
48
48
  parser (>= 2.7.1.5)
49
49
  rubocop-minitest (0.10.1)
50
50
  rubocop (>= 0.87)
51
- rubocop-shopify (1.0.7)
52
- rubocop (~> 1.4)
53
- ruby-progressbar (1.10.1)
51
+ rubocop-shopify (2.0.1)
52
+ rubocop (~> 1.11)
53
+ ruby-progressbar (1.11.0)
54
54
  timecop (0.9.2)
55
- unicode-display_width (1.7.0)
55
+ unicode-display_width (2.0.0)
56
56
  webmock (3.9.3)
57
57
  addressable (>= 2.3.6)
58
58
  crack (>= 0.3.2)
data/Rakefile CHANGED
@@ -1,11 +1,11 @@
1
- require_relative 'bin/load_shopify'
2
- require 'rake/testtask'
3
- require 'rubocop/rake_task'
4
- require 'bundler/gem_tasks'
1
+ require_relative "bin/load_shopify"
2
+ require "rake/testtask"
3
+ require "rubocop/rake_task"
4
+ require "bundler/gem_tasks"
5
5
 
6
6
  Rake::TestTask.new do |t|
7
7
  t.libs += %w(test)
8
- t.test_files = FileList['test/**/*_test.rb']
8
+ t.test_files = FileList["test/**/*_test.rb"]
9
9
  t.verbose = false
10
10
  t.warning = false
11
11
  end
@@ -16,35 +16,37 @@ task(default: [:test, :rubocop])
16
16
 
17
17
  desc("Start up irb with cli loaded")
18
18
  task :console do
19
- exec('irb', '-r', './bin/load_shopify.rb', '-r', 'byebug')
19
+ exec("irb", "-r", "./bin/load_shopify.rb", "-r", "byebug")
20
20
  end
21
21
 
22
22
  namespace :rdoc do
23
- repo = 'https://github.com/Shopify/shopify-app-cli.wiki.git'
24
- intermediate = 'markdown_intermediate'
23
+ repo = "https://github.com/Shopify/shopify-app-cli.wiki.git"
24
+ intermediate = "markdown_intermediate"
25
25
  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/method_object.rb',
33
- 'lib/shopify-cli/partners_api.rb',
34
- 'lib/shopify-cli/process_supervision.rb',
35
- 'lib/shopify-cli/project.rb',
36
- 'lib/shopify-cli/result.rb',
37
- 'lib/shopify-cli/tunnel.rb',
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/method_object.rb",
33
+ "lib/shopify-cli/partners_api.rb",
34
+ "lib/shopify-cli/process_supervision.rb",
35
+ "lib/shopify-cli/project.rb",
36
+ "lib/shopify-cli/result.rb",
37
+ "lib/shopify-cli/transform_data_structure.rb",
38
+ "lib/shopify-cli/tunnel.rb",
39
+ "lib/shopify-cli/lazy_delegator.rb",
38
40
  ]
39
41
 
40
42
  task all: [:markdown, :wiki, :cleanup]
41
43
 
42
44
  desc("Generate markdown files from rdoc comments")
43
45
  task :markdown do
44
- require 'rdoc/rdoc'
45
- require 'docgen/markdown'
46
+ require "rdoc/rdoc"
47
+ require "docgen/markdown"
46
48
  options = RDoc::Options.new
47
- options.setup_generator('markdown')
49
+ options.setup_generator("markdown")
48
50
  options.op_dir = intermediate
49
51
  options.files = file_to_doc
50
52
  RDoc::RDoc.new.document(options)
@@ -52,14 +54,14 @@ namespace :rdoc do
52
54
 
53
55
  desc("Copy markdown documentation to the wiki and commit them")
54
56
  task :wiki do
55
- require 'tmpdir'
57
+ require "tmpdir"
56
58
  Dir.mktmpdir do |temp_dir|
57
59
  system("git clone --depth=1 #{repo} #{temp_dir}")
58
- FileUtils.cp(Dir[File.join(intermediate, '*.md')], temp_dir)
60
+ FileUtils.cp(Dir[File.join(intermediate, "*.md")], temp_dir)
59
61
  Dir.chdir(temp_dir) do
60
- system('git add --all')
62
+ system("git add --all")
61
63
  system('git commit -am "auto doc update"')
62
- system('git push')
64
+ system("git push")
63
65
  end
64
66
  end
65
67
  end
@@ -71,10 +73,10 @@ namespace :rdoc do
71
73
  end
72
74
 
73
75
  desc("Generate markdown documentation and update the wiki")
74
- task(rdoc: 'rdoc:all')
76
+ task(rdoc: "rdoc:all")
75
77
 
76
78
  namespace :package do
77
- require 'shopify-cli/packager'
79
+ require "shopify-cli/packager"
78
80
 
79
81
  task all: [:debian, :rpm, :homebrew]
80
82
 
@@ -95,4 +97,4 @@ namespace :package do
95
97
  end
96
98
 
97
99
  desc("Builds all distribution packages of the CLI")
98
- task(package: 'package:all')
100
+ task(package: "package:all")
data/bin/load_shopify.rb CHANGED
@@ -3,20 +3,20 @@
3
3
  lib_path = File.expand_path("../../lib", __FILE__)
4
4
  $LOAD_PATH.unshift(lib_path) unless $LOAD_PATH.include?(lib_path)
5
5
 
6
- ENV['SHELLPID'] ||= Process.ppid.to_s
7
- ENV['USER_PWD'] ||= Dir.pwd
6
+ ENV["SHELLPID"] ||= Process.ppid.to_s
7
+ ENV["USER_PWD"] ||= Dir.pwd
8
8
 
9
9
  # Prune non-absolute paths from PATH to prevent non-deterministic behavior
10
10
  # i.e. If user has "." or "./bin" in their PATH
11
11
  # Note that this logic is duplicated in lib/shopify.rb
12
- ENV['PATH'] = ENV['PATH'].split(File::PATH_SEPARATOR).select do |p|
13
- p.start_with?('/', '~', /[A-Z]:\\/)
12
+ ENV["PATH"] = ENV["PATH"].split(File::PATH_SEPARATOR).select do |p|
13
+ p.start_with?("/", "~", /[A-Z]:\\/)
14
14
  end.join(File::PATH_SEPARATOR)
15
15
 
16
16
  $original_env = ENV.to_hash
17
17
 
18
- require 'shopify_cli'
18
+ require "shopify_cli"
19
19
 
20
- if ENV['PRINT_LOADED_FEATURES']
20
+ if ENV["PRINT_LOADED_FEATURES"]
21
21
  puts $LOADED_FEATURES
22
22
  end
data/bin/shopify CHANGED
@@ -14,7 +14,7 @@ module Kernel
14
14
  raise if name == "#{RUBY_VERSION[/\d+\.\d+/]}/psych.so"
15
15
  STDERR.puts "[Note] You cannot use gems with Shopify App CLI."
16
16
  STDERR.puts "[LoadError] #{e.message}"
17
- if ENV['DEBUG']
17
+ if ENV["DEBUG"]
18
18
  STDERR.puts e.backtrace
19
19
  STDERR.puts "\n"
20
20
  end
@@ -27,7 +27,7 @@ module Kernel
27
27
  end
28
28
  end
29
29
 
30
- require_relative './load_shopify'
30
+ require_relative "./load_shopify"
31
31
 
32
32
  exit(ShopifyCli::ErrorHandler.call do
33
33
  ShopifyCli::Core::EntryPoint.call(ARGV.dup)
data/dev.yml CHANGED
@@ -5,6 +5,9 @@ type:
5
5
  up:
6
6
  - ruby: 2.5.1
7
7
  - bundler
8
+ - node:
9
+ version: 14.9.0
10
+ yarn: true
8
11
 
9
12
  test:
10
13
  desc: 'Run tests.'
@@ -1,8 +1,8 @@
1
- require 'rbconfig'
2
- require 'fileutils'
1
+ require "rbconfig"
2
+ require "fileutils"
3
3
 
4
- gem = File.expand_path('../../../', __FILE__)
5
- exe = File.join(gem, 'bin', 'shopify')
4
+ gem = File.expand_path("../../../", __FILE__)
5
+ exe = File.join(gem, "bin", "shopify")
6
6
 
7
7
  if RUBY_PLATFORM.match(/mingw32/)
8
8
  bat_path = File.dirname(RbConfig.ruby)
@@ -22,8 +22,8 @@ if RUBY_PLATFORM.match(/mingw32/)
22
22
  \t echo "#{script_content}">> "#{bat}"
23
23
  MAKEFILE
24
24
  else
25
- script = exe + '.sh'
26
- symlink = '/usr/local/bin/shopify'
25
+ script = exe + ".sh"
26
+ symlink = "/usr/local/bin/shopify"
27
27
 
28
28
  script_content = <<~SCRIPT
29
29
  #!/usr/bin/env bash
@@ -44,4 +44,4 @@ else
44
44
  MAKEFILE
45
45
  end
46
46
 
47
- File.write('Makefile', makefile_content)
47
+ File.write("Makefile", makefile_content)
@@ -1,5 +1,5 @@
1
- require 'rdoc/rdoc'
2
- require 'erb'
1
+ require "rdoc/rdoc"
2
+ require "erb"
3
3
 
4
4
  module RDoc
5
5
  module Generator
@@ -26,13 +26,13 @@ module RDoc
26
26
  private
27
27
 
28
28
  def render(data)
29
- class_template_path = File.join(File.dirname(__FILE__), 'class_template.md.erb')
30
- class_renderer = ERB.new(File.read(class_template_path), nil, '-')
29
+ class_template_path = File.join(File.dirname(__FILE__), "class_template.md.erb")
30
+ class_renderer = ERB.new(File.read(class_template_path), nil, "-")
31
31
  data.each do |cls|
32
32
  File.write("#{cls.filename}.md", class_renderer.result(cls.instance_eval { binding }))
33
33
  end
34
- index_template_path = File.join(File.dirname(__FILE__), 'index_template.md.erb')
35
- index_renderer = ERB.new(File.read(index_template_path), nil, '-')
34
+ index_template_path = File.join(File.dirname(__FILE__), "index_template.md.erb")
35
+ index_renderer = ERB.new(File.read(index_template_path), nil, "-")
36
36
  File.write("Core-APIs.md", index_renderer.result(OpenStruct.new(classes: data).instance_eval { binding }))
37
37
  end
38
38
 
@@ -46,8 +46,8 @@ module RDoc
46
46
  kind: kind,
47
47
  comment: @converter.convert(klass.comment.parse),
48
48
  constants: build_members(klass.constants),
49
- class_methods: build_members(klass.method_list.select { |m| m.type == 'class' }),
50
- instance_methods: build_members(klass.method_list.select { |m| m.type == 'instance' }),
49
+ class_methods: build_members(klass.method_list.select { |m| m.type == "class" }),
50
+ instance_methods: build_members(klass.method_list.select { |m| m.type == "instance" }),
51
51
  attributes: build_members(klass.attributes),
52
52
  extended: build_members(klass.extends),
53
53
  included: build_members(klass.includes),
@@ -68,7 +68,7 @@ module RDoc
68
68
  ClassMember.new(
69
69
  title: m.name,
70
70
  comment: @converter.convert(m.comment.parse),
71
- signature: m.respond_to?(:arglists) ? m.arglists : '',
71
+ signature: m.respond_to?(:arglists) ? m.arglists : "",
72
72
  source_code: source(m),
73
73
  )
74
74
  end
@@ -77,7 +77,7 @@ module RDoc
77
77
  # Just extracts sourcecode from html formatting/highlighting into a text
78
78
  # blob so that markdown can format it with a codeblock
79
79
  def source(m)
80
- return '' unless m.respond_to?(:token_stream)
80
+ return "" unless m.respond_to?(:token_stream)
81
81
  # each line, get the text
82
82
  src = (m.token_stream || []).map do |t|
83
83
  next unless t
@@ -89,11 +89,11 @@ module RDoc
89
89
  lines.shift if src =~ /\A.*#\ *File/i # remove '# File' comment
90
90
  lines.each do |line|
91
91
  next unless line =~ /^ *(?=\S)/
92
- n = $&.length
92
+ n = Regexp.last_match(0).length
93
93
  indent = n if n < indent
94
94
  break if n == 0
95
95
  end
96
- src.gsub!(/^#{' ' * indent}/, '') if indent > 0
96
+ src.gsub!(/^#{' ' * indent}/, "") if indent > 0
97
97
  src
98
98
  end
99
99
  end
@@ -1,7 +1,22 @@
1
- mutation ExtensionCreate($api_key: String!, $type: ExtensionType!, $title: String!, $config: JSON!, $extension_context: String) {
2
- extensionCreate(input: {apiKey: $api_key, type: $type, title: $title, config: $config, context: $extension_context}) {
1
+ mutation ExtensionCreate(
2
+ $api_key: String!
3
+ $type: ExtensionType!
4
+ $title: String!
5
+ $config: JSON!
6
+ $extension_context: String
7
+ ) {
8
+ extensionCreate(
9
+ input: {
10
+ apiKey: $api_key
11
+ type: $type
12
+ title: $title
13
+ config: $config
14
+ context: $extension_context
15
+ }
16
+ ) {
3
17
  extensionRegistration {
4
18
  id
19
+ uuid
5
20
  type
6
21
  title
7
22
  draftVersion {