shopify-cli 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +3 -2
  3. data/CHANGELOG.md +20 -0
  4. data/Gemfile +1 -1
  5. data/Gemfile.lock +13 -13
  6. data/bin/load_shopify.rb +3 -1
  7. data/bin/shopify +2 -0
  8. data/docs/Gemfile.lock +23 -13
  9. data/docs/getting-started/install/index.md +37 -1
  10. data/docs/getting-started/migrate/index.md +34 -1
  11. data/ext/shopify-cli/extconf.rb +40 -20
  12. data/lib/project_types/extension/cli.rb +1 -1
  13. data/lib/project_types/extension/commands/build.rb +1 -1
  14. data/lib/project_types/extension/models/type.rb +1 -0
  15. data/lib/project_types/extension/tasks/create_extension.rb +1 -1
  16. data/lib/project_types/extension/tasks/get_app.rb +1 -1
  17. data/lib/project_types/extension/tasks/update_draft.rb +1 -1
  18. data/lib/project_types/node/commands/create.rb +4 -4
  19. data/lib/project_types/node/commands/deploy/heroku.rb +6 -1
  20. data/lib/project_types/node/commands/generate/billing.rb +6 -5
  21. data/lib/project_types/node/commands/generate/page.rb +8 -5
  22. data/lib/project_types/node/commands/generate/webhook.rb +4 -1
  23. data/lib/project_types/node/messages/messages.rb +3 -2
  24. data/lib/project_types/rails/cli.rb +0 -1
  25. data/lib/project_types/rails/commands/create.rb +52 -4
  26. data/lib/project_types/rails/commands/generate.rb +1 -0
  27. data/lib/project_types/rails/commands/generate/webhook.rb +3 -2
  28. data/lib/project_types/rails/commands/serve.rb +6 -2
  29. data/lib/project_types/rails/gem.rb +61 -6
  30. data/lib/project_types/rails/messages/messages.rb +29 -13
  31. data/lib/project_types/script/cli.rb +2 -3
  32. data/lib/project_types/script/commands/create.rb +5 -9
  33. data/lib/project_types/script/commands/disable.rb +4 -15
  34. data/lib/project_types/script/commands/enable.rb +37 -13
  35. data/lib/project_types/script/commands/push.rb +8 -13
  36. data/lib/project_types/script/config/extension_points.yml +9 -3
  37. data/lib/project_types/script/errors.rb +8 -0
  38. data/lib/project_types/script/forms/create.rb +1 -1
  39. data/lib/project_types/script/layers/application/create_script.rb +7 -6
  40. data/lib/project_types/script/layers/application/disable_script.rb +9 -7
  41. data/lib/project_types/script/layers/application/enable_script.rb +11 -9
  42. data/lib/project_types/script/layers/application/push_script.rb +6 -4
  43. data/lib/project_types/script/layers/domain/errors.rb +2 -0
  44. data/lib/project_types/script/layers/infrastructure/assemblyscript_project_creator.rb +2 -2
  45. data/lib/project_types/script/layers/infrastructure/assemblyscript_task_runner.rb +2 -2
  46. data/lib/project_types/script/layers/infrastructure/errors.rb +2 -0
  47. data/lib/project_types/script/layers/infrastructure/push_package_repository.rb +1 -1
  48. data/lib/project_types/script/layers/infrastructure/script_repository.rb +1 -1
  49. data/lib/project_types/script/layers/infrastructure/script_service.rb +2 -0
  50. data/lib/project_types/script/messages/messages.rb +25 -31
  51. data/lib/project_types/script/script_project.rb +8 -4
  52. data/lib/project_types/script/templates/ts/as-pect.config.js +6 -0
  53. data/lib/project_types/script/ui/error_handler.rb +8 -0
  54. data/lib/project_types/script/ui/printing_spinner.rb +75 -0
  55. data/lib/rubygems_plugin.rb +18 -10
  56. data/lib/shopify-cli/admin_api/populate_resource_command.rb +1 -1
  57. data/lib/shopify-cli/admin_api/schema.rb +20 -8
  58. data/lib/shopify-cli/command.rb +14 -11
  59. data/lib/shopify-cli/commands.rb +1 -0
  60. data/lib/shopify-cli/commands/config.rb +44 -0
  61. data/lib/shopify-cli/commands/connect.rb +8 -69
  62. data/lib/shopify-cli/commands/create.rb +2 -2
  63. data/lib/shopify-cli/commands/help.rb +1 -1
  64. data/lib/shopify-cli/commands/system.rb +22 -13
  65. data/lib/shopify-cli/context.rb +38 -1
  66. data/lib/shopify-cli/core.rb +0 -1
  67. data/lib/shopify-cli/core/entry_point.rb +1 -1
  68. data/lib/shopify-cli/core/executor.rb +3 -5
  69. data/lib/shopify-cli/core/monorail.rb +1 -1
  70. data/lib/shopify-cli/db.rb +1 -1
  71. data/lib/shopify-cli/feature.rb +97 -0
  72. data/lib/shopify-cli/heroku.rb +21 -5
  73. data/lib/shopify-cli/js_deps.rb +2 -2
  74. data/lib/shopify-cli/js_system.rb +2 -2
  75. data/lib/shopify-cli/messages/messages.rb +37 -12
  76. data/lib/shopify-cli/partners_api/organizations.rb +7 -7
  77. data/lib/shopify-cli/process_supervision.rb +60 -21
  78. data/lib/shopify-cli/project.rb +14 -6
  79. data/lib/shopify-cli/project_type.rb +5 -7
  80. data/lib/shopify-cli/sub_command.rb +1 -0
  81. data/lib/shopify-cli/task.rb +2 -2
  82. data/lib/shopify-cli/tasks.rb +11 -4
  83. data/lib/shopify-cli/tasks/ensure_env.rb +72 -16
  84. data/lib/shopify-cli/tasks/update_dashboard_urls.rb +4 -3
  85. data/lib/shopify-cli/tunnel.rb +44 -14
  86. data/lib/shopify-cli/version.rb +1 -1
  87. data/lib/shopify_cli.rb +36 -9
  88. data/shopify-cli.gemspec +4 -1
  89. data/vendor/deps/cli-kit/REVISION +1 -1
  90. data/vendor/deps/cli-kit/lib/cli/kit.rb +1 -1
  91. data/vendor/deps/cli-kit/lib/cli/kit/autocall.rb +2 -2
  92. data/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb +12 -6
  93. data/vendor/deps/cli-kit/lib/cli/kit/executor.rb +9 -11
  94. data/vendor/deps/cli-kit/lib/cli/kit/logger.rb +8 -2
  95. data/vendor/deps/cli-kit/lib/cli/kit/support/test_helper.rb +7 -7
  96. data/vendor/deps/cli-kit/lib/cli/kit/system.rb +48 -17
  97. data/vendor/deps/cli-ui/REVISION +1 -1
  98. data/vendor/deps/cli-ui/lib/cli/ui.rb +5 -4
  99. data/vendor/deps/cli-ui/lib/cli/ui/ansi.rb +9 -3
  100. data/vendor/deps/cli-ui/lib/cli/ui/color.rb +1 -0
  101. data/vendor/deps/cli-ui/lib/cli/ui/frame.rb +3 -2
  102. data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style.rb +1 -0
  103. data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/box.rb +13 -5
  104. data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/bracket.rb +29 -2
  105. data/vendor/deps/cli-ui/lib/cli/ui/glyph.rb +21 -10
  106. data/vendor/deps/cli-ui/lib/cli/ui/os.rb +63 -0
  107. data/vendor/deps/cli-ui/lib/cli/ui/prompt.rb +11 -2
  108. data/vendor/deps/cli-ui/lib/cli/ui/prompt/interactive_options.rb +1 -0
  109. data/vendor/deps/cli-ui/lib/cli/ui/spinner.rb +3 -3
  110. data/vendor/deps/cli-ui/lib/cli/ui/spinner/spin_group.rb +6 -8
  111. data/vendor/deps/cli-ui/lib/cli/ui/widgets.rb +2 -0
  112. data/vendor/gen/lib/gen.rb +39 -0
  113. data/vendor/gen/lib/gen/commands.rb +18 -0
  114. data/vendor/gen/lib/gen/commands/help.rb +20 -0
  115. data/vendor/gen/lib/gen/commands/new.rb +21 -0
  116. data/vendor/gen/lib/gen/entry_point.rb +10 -0
  117. data/vendor/gen/lib/gen/generator.rb +165 -0
  118. data/vendor/gen/template/.gitignore +2 -0
  119. data/vendor/gen/template/Gemfile +10 -0
  120. data/vendor/gen/template/README.md +1 -0
  121. data/vendor/gen/template/bin/testunit +23 -0
  122. data/vendor/gen/template/bin/update-deps +97 -0
  123. data/vendor/gen/template/dev-gems.yml +3 -0
  124. data/vendor/gen/template/dev-vendor.yml +4 -0
  125. data/vendor/gen/template/exe/__app__-gems +17 -0
  126. data/vendor/gen/template/exe/__app__-vendor +18 -0
  127. data/vendor/gen/template/lib/__app__.rb +33 -0
  128. data/vendor/gen/template/lib/__app__/commands.rb +18 -0
  129. data/vendor/gen/template/lib/__app__/commands/example.rb +19 -0
  130. data/vendor/gen/template/lib/__app__/commands/help.rb +21 -0
  131. data/vendor/gen/template/lib/__app__/entry_point.rb +10 -0
  132. data/vendor/gen/template/test/example_test.rb +17 -0
  133. data/vendor/gen/template/test/test_helper.rb +22 -0
  134. metadata +28 -6
  135. data/Vagrantfile +0 -17
  136. data/lib/project_types/script/forms/enable.rb +0 -24
  137. data/lib/project_types/script/forms/push.rb +0 -19
  138. data/lib/project_types/script/forms/script_form.rb +0 -66
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa8d08ea4c9f452ea672ebe158f4e900eda442cc17aa46905d25aa53a7f3a673
4
- data.tar.gz: 516ee988dee9309aa0e3319d576fe5fcd13065fa08b0b9a4d648fced6642d26e
3
+ metadata.gz: 9f47a49090da5b25b266e4186c08b377e91e6fe240620076f24bb0174accc854
4
+ data.tar.gz: 68be2a02c00aa4e0c67295024d0997c453eb40b9d92f4cec9ae06dc5c0b3d0fa
5
5
  SHA512:
6
- metadata.gz: dc4c9b95106709203f6153310bdee08183b3bad45f1ff7f3512b408fabfa478391ca4e5adbfe6cc6b2aaaea655363067de9bacb39a8ff02016e5df03aa7366de
7
- data.tar.gz: 503b6c26f1c57e65f5a22b5171faa8d9e5117c404ca02bec6a92af571cadf17f74918fd8bcf2b993100b0e09b3f20576dbeca401cbbb93c7f2355ac389bdf6ed
6
+ metadata.gz: f0cd5e1c1e79ec89fcba9834eb1c1ea98d53a98ad46f2fcc45e5fefebfabcd9b1655cb73c1431c503b9c1a26f2d684d6a1c330813423733601670839c7e82efc
7
+ data.tar.gz: a3f83e966247aee450f3a73615dce3d324f82ab944304be131dec81973d1984c405d060844601047ceb259163faaa79524d859bbe9a874479ea4a26c21530152
@@ -1,7 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.4.7
4
- - 2.5.1
3
+ - 2.5.8
4
+ - 2.6.6
5
+ - 2.7.1
5
6
  before_install:
6
7
  - gem install bundler -v '1.17.3'
7
8
  cache:
@@ -1,3 +1,23 @@
1
+ Version 1.1.0
2
+ ------
3
+ * Add native Windows 10 support, including variety of stability fixes.
4
+
5
+ Version 1.0.5
6
+ ------
7
+ * Fix a bug in out opt-in metrics
8
+
9
+ Version 1.0.4
10
+ ------
11
+ * Fix a bug when running the `connect` command with an account with multiple organizations
12
+
13
+ Version 1.0.3
14
+ ------
15
+ * Fix a bug which causes an error in the `populate` and `generate` commands when prompting for the shop name
16
+
17
+ Version 1.0.2
18
+ ------
19
+ * Fix missing shop parameter to AdminAPI.query() call (impacting populate and generate commands)
20
+
1
21
  Version 1.0.1
2
22
  ------
3
23
  * Fixed an issue with RVM taking over the shell shim fd when it was not in use
data/Gemfile CHANGED
@@ -16,7 +16,7 @@ group :test do
16
16
  gem 'mocha', require: false
17
17
  gem 'minitest', '>= 5.0.0', require: false
18
18
  gem 'minitest-reporters', require: false
19
- gem 'fakefs', require: false
19
+ gem 'fakefs', '>= 1.0', require: false
20
20
  gem 'webmock', require: false
21
21
  gem 'timecop', require: false
22
22
  end
@@ -4,13 +4,13 @@ GEM
4
4
  addressable (2.5.2)
5
5
  public_suffix (>= 2.0.2, < 4.0)
6
6
  ansi (1.5.0)
7
- ast (2.4.0)
7
+ ast (2.4.1)
8
8
  builder (3.2.3)
9
- byebug (8.2.2)
9
+ byebug (8.2.5)
10
10
  coderay (1.1.2)
11
11
  crack (0.4.3)
12
12
  safe_yaml (~> 1.0.0)
13
- fakefs (0.20.0)
13
+ fakefs (1.2.2)
14
14
  hashdiff (0.3.2)
15
15
  metaclass (0.0.4)
16
16
  method_source (0.9.2)
@@ -22,9 +22,9 @@ GEM
22
22
  ruby-progressbar
23
23
  mocha (1.7.0)
24
24
  metaclass (~> 0.0.1)
25
- parallel (1.19.1)
26
- parser (2.7.1.3)
27
- ast (~> 2.4.0)
25
+ parallel (1.19.2)
26
+ parser (2.7.1.4)
27
+ ast (~> 2.4.1)
28
28
  pry (0.12.2)
29
29
  coderay (~> 1.1.0)
30
30
  method_source (~> 0.9.0)
@@ -34,19 +34,19 @@ GEM
34
34
  public_suffix (3.0.3)
35
35
  rainbow (3.0.0)
36
36
  rake (13.0.1)
37
- regexp_parser (1.7.0)
37
+ regexp_parser (1.7.1)
38
38
  rexml (3.2.4)
39
- rubocop (0.85.0)
39
+ rubocop (0.89.1)
40
40
  parallel (~> 1.10)
41
- parser (>= 2.7.0.1)
41
+ parser (>= 2.7.1.1)
42
42
  rainbow (>= 2.2.2, < 4.0)
43
43
  regexp_parser (>= 1.7)
44
44
  rexml
45
- rubocop-ast (>= 0.0.3)
45
+ rubocop-ast (>= 0.3.0, < 1.0)
46
46
  ruby-progressbar (~> 1.7)
47
47
  unicode-display_width (>= 1.4.0, < 2.0)
48
- rubocop-ast (0.0.3)
49
- parser (>= 2.7.0.1)
48
+ rubocop-ast (0.3.0)
49
+ parser (>= 2.7.1.4)
50
50
  ruby-progressbar (1.10.1)
51
51
  safe_yaml (1.0.4)
52
52
  session (3.2.0)
@@ -62,7 +62,7 @@ PLATFORMS
62
62
 
63
63
  DEPENDENCIES
64
64
  byebug
65
- fakefs
65
+ fakefs (>= 1.0)
66
66
  minitest (>= 5.0.0)
67
67
  minitest-reporters
68
68
  mocha
@@ -9,7 +9,9 @@ ENV['USER_PWD'] ||= Dir.pwd
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(':').select { |p| p.start_with?('/', '~') }.join(':')
12
+ ENV['PATH'] = ENV['PATH'].split(File::PATH_SEPARATOR).select do |p|
13
+ p.start_with?('/', '~', /[A-Z]:\\/)
14
+ end.join(File::PATH_SEPARATOR)
13
15
 
14
16
  $original_env = ENV.to_hash
15
17
 
@@ -8,6 +8,8 @@ module Kernel
8
8
  def require(name)
9
9
  original_require(name)
10
10
  rescue LoadError => e
11
+ # Special case for readline.so, which fails harmlessly on Windows
12
+ raise if (name == "readline.so") && ShopifyCli::Context.new.windows?
11
13
  # Special case for psych (yaml), which rescues this itself
12
14
  raise if name == "#{RUBY_VERSION[/\d+\.\d+/]}/psych.so"
13
15
  STDERR.puts "[Note] You cannot use gems with Shopify App CLI."
@@ -1,7 +1,7 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- activesupport (6.0.3.1)
4
+ activesupport (6.0.3.2)
5
5
  concurrent-ruby (~> 1.0, >= 1.0.2)
6
6
  i18n (>= 0.7, < 2)
7
7
  minitest (~> 5.1)
@@ -16,9 +16,9 @@ GEM
16
16
  colorator (1.1.0)
17
17
  commonmarker (0.17.13)
18
18
  ruby-enum (~> 0.5)
19
- concurrent-ruby (1.1.6)
20
- dnsruby (1.61.3)
21
- addressable (~> 2.5)
19
+ concurrent-ruby (1.1.7)
20
+ dnsruby (1.61.4)
21
+ simpleidn (~> 0.1)
22
22
  em-websocket (0.5.1)
23
23
  eventmachine (>= 0.12.9)
24
24
  http_parser.rb (~> 0.6.0)
@@ -28,12 +28,12 @@ GEM
28
28
  execjs (2.7.0)
29
29
  faraday (1.0.1)
30
30
  multipart-post (>= 1.2, < 3)
31
- ffi (1.13.0)
31
+ ffi (1.13.1)
32
32
  forwardable-extended (2.6.0)
33
33
  gemoji (3.0.1)
34
- github-pages (206)
34
+ github-pages (207)
35
35
  github-pages-health-check (= 1.16.1)
36
- jekyll (= 3.8.7)
36
+ jekyll (= 3.9.0)
37
37
  jekyll-avatar (= 0.7.0)
38
38
  jekyll-coffeescript (= 1.1.1)
39
39
  jekyll-commonmark-ghpages (= 0.1.6)
@@ -67,7 +67,8 @@ GEM
67
67
  jekyll-theme-time-machine (= 0.1.1)
68
68
  jekyll-titles-from-headings (= 0.5.3)
69
69
  jemoji (= 0.11.1)
70
- kramdown (= 1.17.0)
70
+ kramdown (= 2.3.0)
71
+ kramdown-parser-gfm (= 1.1.0)
71
72
  liquid (= 4.0.3)
72
73
  mercenary (~> 0.3)
73
74
  minima (= 2.5.1)
@@ -86,14 +87,14 @@ GEM
86
87
  http_parser.rb (0.6.0)
87
88
  i18n (0.9.5)
88
89
  concurrent-ruby (~> 1.0)
89
- jekyll (3.8.7)
90
+ jekyll (3.9.0)
90
91
  addressable (~> 2.4)
91
92
  colorator (~> 1.0)
92
93
  em-websocket (~> 0.5)
93
94
  i18n (~> 0.7)
94
95
  jekyll-sass-converter (~> 1.0)
95
96
  jekyll-watch (~> 2.0)
96
- kramdown (~> 1.14)
97
+ kramdown (>= 1.17, < 3)
97
98
  liquid (~> 4.0)
98
99
  mercenary (~> 0.3.3)
99
100
  pathutil (~> 0.9)
@@ -191,7 +192,10 @@ GEM
191
192
  gemoji (~> 3.0)
192
193
  html-pipeline (~> 2.2)
193
194
  jekyll (>= 3.0, < 5.0)
194
- kramdown (1.17.0)
195
+ kramdown (2.3.0)
196
+ rexml
197
+ kramdown-parser-gfm (1.1.0)
198
+ kramdown (~> 2.0)
195
199
  liquid (4.0.3)
196
200
  listen (3.2.1)
197
201
  rb-fsevent (~> 0.10, >= 0.10.3)
@@ -204,7 +208,7 @@ GEM
204
208
  jekyll-seo-tag (~> 2.1)
205
209
  minitest (5.14.1)
206
210
  multipart-post (2.1.1)
207
- nokogiri (1.10.9)
211
+ nokogiri (1.10.10)
208
212
  mini_portile2 (~> 2.4.0)
209
213
  octokit (4.18.0)
210
214
  faraday (>= 0.9)
@@ -215,6 +219,7 @@ GEM
215
219
  rb-fsevent (0.10.4)
216
220
  rb-inotify (0.10.1)
217
221
  ffi (~> 1.0)
222
+ rexml (3.2.4)
218
223
  rouge (3.19.0)
219
224
  ruby-enum (0.8.0)
220
225
  i18n
@@ -228,6 +233,8 @@ GEM
228
233
  sawyer (0.8.2)
229
234
  addressable (>= 2.3.5)
230
235
  faraday (> 0.8, < 2.0)
236
+ simpleidn (0.1.1)
237
+ unf (~> 0.1.4)
231
238
  terminal-table (1.8.0)
232
239
  unicode-display_width (~> 1.1, >= 1.1.1)
233
240
  thread_safe (0.3.6)
@@ -235,8 +242,11 @@ GEM
235
242
  ethon (>= 0.9.0)
236
243
  tzinfo (1.2.7)
237
244
  thread_safe (~> 0.1)
245
+ unf (0.1.4)
246
+ unf_ext
247
+ unf_ext (0.0.7.7)
238
248
  unicode-display_width (1.7.0)
239
- zeitwerk (2.3.0)
249
+ zeitwerk (2.4.0)
240
250
 
241
251
  PLATFORMS
242
252
  ruby
@@ -36,4 +36,40 @@ $ sudo yum install shopify-cli-x.y.x.rpm
36
36
 
37
37
  ```console
38
38
  $ gem install shopify-cli
39
- ```
39
+ ```
40
+
41
+ ### To check that Shopify App CLI is installed correctly:
42
+
43
+ ```console
44
+ $ shopify version
45
+ 1.0.0
46
+ $
47
+ ```
48
+
49
+ > Note 1: the version displayed may be newer.
50
+
51
+ > Note 2: If you have the `shopify_api` gem installed, you may see the following response:
52
+ > ```console
53
+ > shopify command is no longer bundled with shopify_api.
54
+ > if you need these tools, install the shopify_cli gem
55
+ > ```
56
+ >
57
+ > If so, then you will also need to upgrade the `shopify_api` gem to v9.2.0+ to remove a deprecated `shopify` command that is contained in that gem.
58
+ >
59
+ > If you also have the `shopify_app` gem (which depends on `shopify_api` gem), you'll need to install or update `shopify_api` first, then uninstall the older version.
60
+ >
61
+ > To get a list of the version(s) of `shopify_api` currently installed:
62
+ > ```console
63
+ > $ gem list shopify_api
64
+ > ```
65
+ >
66
+ > To install the latest version:
67
+ > ```console
68
+ > $ gem install shopify_api
69
+ > ```
70
+ >
71
+ > To uninstall the older version:
72
+ > ```console
73
+ > $ gem uninstall shopify_api -v x.y.z
74
+ > ```
75
+ > Replace x.y.z with a version number listed from the `gem list` command. Repeat as needed.
@@ -22,6 +22,7 @@ There are two steps to completely uninstall the legacy version of Shopify App CL
22
22
 
23
23
  1. Delete the legacy CLI files
24
24
  1. Remove the legacy `shopify` command from your shell profile
25
+ 1. Reload your terminal
25
26
 
26
27
  ### 1. Delete the CLI files
27
28
 
@@ -51,7 +52,39 @@ if [[ -f /HOME_DIR/.shopify-cli/shopify.sh ]]; then source /HOME_DIR/.shopify-cl
51
52
  [ -f "/HOME_DIR/.shopify-app-cli/shopify.sh" ] && source "/HOME_DIR/.shopify-app-cli/shopify.sh"
52
53
  ```
53
54
 
54
- Deleting or commenting out the relevant line in your shell profile will remove `shopify` as a command. You may need to reload your shell.
55
+ Deleting or commenting out the relevant line in your shell profile will remove `shopify` as a command.
56
+
57
+ ### 3. Reload your terminal
58
+
59
+ For the changes above to take effect, exit your terminal, and start a new one.
60
+
61
+ If you try running `shopify` now, you should get a `command not found` error.
62
+
63
+ > If you have the `shopify_api` gem installed, you may see the following response:
64
+ > ```console
65
+ > shopify command is no longer bundled with shopify_api.
66
+ > if you need these tools, install the shopify_cli gem
67
+ > ```
68
+ >
69
+ > If so, then you will also need to upgrade the `shopify_api` gem to v9.2.0+ to remove a deprecated `shopify` command that is contained in that gem.
70
+ >
71
+ > If you also have the `shopify_app` gem (which depends on `shopify_api` gem), you'll need to install or update `shopify_api` first, then uninstall the older version.
72
+ >
73
+ > To get a list of the version(s) of `shopify_api` currently installed:
74
+ > ```console
75
+ > $ gem list shopify_api
76
+ > ```
77
+ >
78
+ > To install the latest version:
79
+ > ```console
80
+ > $ gem install shopify_api
81
+ > ```
82
+ >
83
+ > To uninstall the older version:
84
+ > ```console
85
+ > $ gem uninstall shopify_api -v x.y.z
86
+ > ```
87
+ > Replace x.y.z with a version number listed from the `gem list` command. Repeat as needed.
55
88
 
56
89
  ## 2. Install the new version
57
90
 
@@ -3,25 +3,45 @@ require 'fileutils'
3
3
 
4
4
  gem = File.expand_path('../../../', __FILE__)
5
5
  exe = File.join(gem, 'bin', 'shopify')
6
- script = exe + '.sh'
7
- symlink = '/usr/local/bin/shopify'
8
-
9
- script_content = <<~SCRIPT
10
- #!/usr/bin/env bash
11
- #{RbConfig.ruby} --disable=gems -I #{gem} #{exe} $@
12
- SCRIPT
13
-
14
- File.write(script, script_content)
15
- FileUtils.chmod("+x", script)
16
-
17
- makefile_content = <<~MAKEFILE
18
- .PHONY: clean install
19
-
20
- clean:
21
- \t@sudo rm -f #{symlink}
22
-
23
- install: clean
24
- \t@sudo ln -s #{script} #{symlink}
25
- MAKEFILE
6
+
7
+ if RUBY_PLATFORM.match(/mingw32/)
8
+ bat_path = File.dirname(RbConfig.ruby)
9
+ bat = "#{bat_path}\\shopify.bat"
10
+
11
+ script_content = "#{RbConfig.ruby} --disable=gems -I '#{gem}' '#{exe}' %*"
12
+
13
+ FileUtils.mkdir_p(bat_path)
14
+ makefile_content = <<~MAKEFILE
15
+ .PHONY: clean install
16
+
17
+ clean:
18
+ \t rm -f "#{bat}"
19
+
20
+ install: clean
21
+ \t echo "@ECHO OFF"> "#{bat}"
22
+ \t echo "#{script_content}">> "#{bat}"
23
+ MAKEFILE
24
+ else
25
+ script = exe + '.sh'
26
+ symlink = '/usr/local/bin/shopify'
27
+
28
+ script_content = <<~SCRIPT
29
+ #!/usr/bin/env bash
30
+ #{RbConfig.ruby} --disable=gems -I #{gem} #{exe} $@
31
+ SCRIPT
32
+
33
+ File.write(script, script_content)
34
+ FileUtils.chmod("+x", script)
35
+
36
+ makefile_content = <<~MAKEFILE
37
+ .PHONY: clean install
38
+
39
+ clean:
40
+ \t@sudo rm -f #{symlink}
41
+
42
+ install: clean
43
+ \t@sudo ln -s #{script} #{symlink}
44
+ MAKEFILE
45
+ end
26
46
 
27
47
  File.write('Makefile', makefile_content)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Extension
4
4
  class Project < ShopifyCli::ProjectType
5
- hidden_project_type
5
+ hidden_feature
6
6
  creator 'App Extension', 'Extension::Commands::Create'
7
7
 
8
8
  register_command('Extension::Commands::Build', "build")
@@ -4,7 +4,7 @@ require 'shopify_cli'
4
4
  module Extension
5
5
  module Commands
6
6
  class Build < ExtensionCommand
7
- hidden_command
7
+ hidden_feature
8
8
 
9
9
  YARN_BUILD_COMMAND = %w(build)
10
10
  NPM_BUILD_COMMAND = %w(run-script build)
@@ -12,6 +12,7 @@ module Extension
12
12
  end
13
13
 
14
14
  def inherited(klass)
15
+ super
15
16
  @all_extension_types ||= []
16
17
  @all_extension_types << klass
17
18
  end
@@ -20,7 +20,7 @@ module Extension
20
20
  extension_context: extension_context,
21
21
  }
22
22
 
23
- response = ShopifyCli::PartnersAPI.query(context, GRAPHQL_FILE, input).dig(*RESPONSE_FIELD)
23
+ response = ShopifyCli::PartnersAPI.query(context, GRAPHQL_FILE, **input).dig(*RESPONSE_FIELD)
24
24
  context.abort(context.message('tasks.errors.parse_error')) if response.nil?
25
25
 
26
26
  abort_if_user_errors(context, response)