shopify-cli 2.6.4 → 2.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) hide show
  1. checksums.yaml +4 -4
  2. data/.devcontainer.json +5 -0
  3. data/.github/DESIGN.md +1 -1
  4. data/.github/ISSUE_TEMPLATE.md +7 -0
  5. data/.gitignore +1 -0
  6. data/.vscode/extensions.json +5 -0
  7. data/.vscode/settings.json +9 -0
  8. data/CHANGELOG.md +35 -3
  9. data/CONTRIBUTING.md +1 -21
  10. data/{Dockerfile → Codespace.dockerfile} +11 -3
  11. data/Gemfile +1 -0
  12. data/Gemfile.lock +6 -4
  13. data/README.md +20 -99
  14. data/Rakefile +27 -0
  15. data/Tests.dockerfile +35 -0
  16. data/assets/logo.png +0 -0
  17. data/dev.yml +0 -3
  18. data/docs/README.md +13 -0
  19. data/docs/contributors/testing.md +27 -0
  20. data/docs/users/installation.md +46 -0
  21. data/{THEMEKIT_MIGRATION.md → docs/users/migrate-from-themekit.md} +1 -1
  22. data/ext/javy/javy.rb +186 -0
  23. data/ext/javy/version +1 -0
  24. data/lib/project_types/extension/cli.rb +7 -3
  25. data/lib/project_types/extension/commands/build.rb +1 -0
  26. data/lib/project_types/extension/commands/create.rb +6 -6
  27. data/lib/project_types/extension/commands/extension_command.rb +1 -1
  28. data/lib/project_types/extension/features/argo.rb +1 -8
  29. data/lib/project_types/extension/features/argo_serve.rb +9 -23
  30. data/lib/project_types/extension/forms/create.rb +1 -1
  31. data/lib/project_types/extension/forms/questions/ask_template.rb +3 -6
  32. data/lib/project_types/extension/messages/messages.rb +1 -0
  33. data/lib/project_types/extension/models/development_server_requirements.rb +2 -3
  34. data/lib/project_types/extension/models/server_config/app.rb +13 -0
  35. data/lib/project_types/extension/models/server_config/development.rb +5 -4
  36. data/lib/project_types/extension/models/server_config/development_renderer.rb +1 -1
  37. data/lib/project_types/extension/models/server_config/development_resource.rb +13 -0
  38. data/lib/project_types/extension/models/server_config/extension.rb +4 -0
  39. data/lib/project_types/extension/models/server_config/root.rb +4 -1
  40. data/lib/project_types/extension/tasks/convert_server_config.rb +65 -0
  41. data/lib/project_types/extension/tasks/ensure_resource_url.rb +39 -0
  42. data/lib/project_types/extension/tasks/find_package_from_json.rb +37 -0
  43. data/lib/project_types/extension/tasks/merge_server_config.rb +32 -0
  44. data/lib/project_types/extension/tasks/run_extension_command.rb +11 -10
  45. data/lib/project_types/node/cli.rb +0 -16
  46. data/lib/project_types/node/forms/create.rb +5 -5
  47. data/lib/project_types/node/messages/messages.rb +2 -144
  48. data/lib/project_types/php/cli.rb +0 -11
  49. data/lib/project_types/php/forms/create.rb +5 -6
  50. data/lib/project_types/php/messages/messages.rb +2 -161
  51. data/lib/project_types/rails/cli.rb +0 -16
  52. data/lib/project_types/rails/commands/create.rb +46 -17
  53. data/lib/project_types/rails/forms/create.rb +5 -7
  54. data/lib/project_types/rails/messages/messages.rb +6 -151
  55. data/lib/project_types/script/cli.rb +2 -1
  56. data/lib/project_types/script/commands/create.rb +2 -5
  57. data/lib/project_types/script/commands/javy.rb +31 -0
  58. data/lib/project_types/script/commands/push.rb +1 -1
  59. data/lib/project_types/script/config/extension_points.yml +3 -0
  60. data/lib/project_types/script/errors.rb +0 -18
  61. data/lib/project_types/script/layers/application/create_script.rb +2 -2
  62. data/lib/project_types/script/layers/domain/script_json.rb +1 -1
  63. data/lib/project_types/script/layers/infrastructure/api_clients/partners_proxy_api_client.rb +0 -4
  64. data/lib/project_types/script/layers/infrastructure/errors.rb +8 -3
  65. data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_task_runner.rb +22 -3
  66. data/lib/project_types/script/layers/infrastructure/languages/typescript_task_runner.rb +25 -0
  67. data/lib/project_types/script/layers/infrastructure/script_project_repository.rb +3 -4
  68. data/lib/project_types/script/layers/infrastructure/script_service.rb +1 -1
  69. data/lib/project_types/script/messages/messages.rb +16 -22
  70. data/lib/project_types/script/ui/error_handler.rb +1 -27
  71. data/lib/project_types/theme/cli.rb +1 -1
  72. data/lib/project_types/theme/commands/check.rb +1 -1
  73. data/lib/project_types/theme/commands/delete.rb +1 -1
  74. data/lib/project_types/theme/commands/init.rb +1 -1
  75. data/lib/project_types/theme/commands/language_server.rb +1 -1
  76. data/lib/project_types/theme/commands/package.rb +1 -1
  77. data/lib/project_types/theme/commands/publish.rb +1 -1
  78. data/lib/project_types/theme/commands/pull.rb +1 -1
  79. data/lib/project_types/theme/commands/push.rb +1 -1
  80. data/lib/project_types/theme/commands/serve.rb +9 -2
  81. data/lib/project_types/theme/messages/messages.rb +30 -1
  82. data/lib/shopify_cli/admin_api/populate_resource_command.rb +1 -1
  83. data/lib/shopify_cli/api.rb +7 -2
  84. data/lib/shopify_cli/app_type_detector.rb +24 -20
  85. data/lib/shopify_cli/command/app_sub_command.rb +10 -0
  86. data/lib/shopify_cli/command/project_command.rb +18 -0
  87. data/lib/shopify_cli/command/sub_command.rb +19 -0
  88. data/lib/shopify_cli/command.rb +7 -2
  89. data/lib/shopify_cli/commands/app/connect.rb +22 -0
  90. data/lib/shopify_cli/commands/app/create/node.rb +38 -0
  91. data/lib/shopify_cli/commands/app/create/php.rb +36 -0
  92. data/lib/shopify_cli/commands/app/create/rails.rb +40 -0
  93. data/lib/shopify_cli/commands/app/create.rb +28 -0
  94. data/lib/shopify_cli/commands/app/deploy.rb +49 -0
  95. data/lib/shopify_cli/commands/app/open.rb +19 -0
  96. data/lib/shopify_cli/commands/app/serve.rb +49 -0
  97. data/lib/shopify_cli/commands/app/tunnel.rb +43 -0
  98. data/lib/shopify_cli/commands/app.rb +29 -0
  99. data/lib/shopify_cli/commands/config.rb +2 -2
  100. data/lib/shopify_cli/commands.rb +1 -0
  101. data/lib/shopify_cli/constants.rb +4 -0
  102. data/lib/shopify_cli/exception_reporter.rb +8 -6
  103. data/lib/shopify_cli/git.rb +12 -1
  104. data/lib/shopify_cli/github/issue_url_generator.rb +19 -0
  105. data/lib/shopify_cli/github.rb +5 -0
  106. data/lib/shopify_cli/messages/messages.rb +253 -9
  107. data/lib/shopify_cli/migrator.rb +9 -11
  108. data/lib/shopify_cli/project.rb +5 -1
  109. data/lib/shopify_cli/project_commands.rb +1 -1
  110. data/lib/shopify_cli/services/app/connect_service.rb +25 -0
  111. data/lib/shopify_cli/services/app/create/node_service.rb +155 -0
  112. data/lib/shopify_cli/services/app/create/php_service.rb +152 -0
  113. data/lib/shopify_cli/services/app/create/rails_service.rb +215 -0
  114. data/lib/shopify_cli/services/app/deploy/heroku/node_service.rb +101 -0
  115. data/lib/shopify_cli/services/app/deploy/heroku/php_service.rb +135 -0
  116. data/lib/shopify_cli/services/app/deploy/heroku/rails_service.rb +120 -0
  117. data/lib/shopify_cli/services/app/open_service.rb +19 -0
  118. data/lib/shopify_cli/services/app/serve/node_service.rb +42 -0
  119. data/lib/shopify_cli/services/app/serve/php_service.rb +46 -0
  120. data/lib/shopify_cli/services/app/serve/rails_service.rb +48 -0
  121. data/lib/shopify_cli/services/app/tunnel/auth_service.rb +21 -0
  122. data/lib/shopify_cli/services/app/tunnel/start_service.rb +20 -0
  123. data/lib/shopify_cli/services/app/tunnel/stop_service.rb +20 -0
  124. data/lib/shopify_cli/services.rb +31 -0
  125. data/lib/shopify_cli/theme/dev_server/local_assets.rb +1 -1
  126. data/lib/shopify_cli/theme/dev_server.rb +35 -17
  127. data/lib/shopify_cli/tunnel.rb +25 -20
  128. data/lib/shopify_cli/version.rb +1 -1
  129. data/lib/shopify_cli.rb +1 -2
  130. data/shopify-cli.gemspec +2 -6
  131. data/shopify-dev +18 -0
  132. data/utilities/constants.rb +7 -0
  133. data/utilities/docker/container.rb +30 -2
  134. data/utilities/docker.rb +3 -2
  135. data/utilities/utilities.rb +1 -0
  136. data/vendor/deps/cli-kit/lib/cli/kit/system.rb +1 -1
  137. metadata +56 -53
  138. data/docs/_config.yml +0 -2
  139. data/docs/app/node/commands/index.md +0 -4
  140. data/docs/app/node/index.md +0 -4
  141. data/docs/app/rails/commands/index.md +0 -4
  142. data/docs/app/rails/index.md +0 -4
  143. data/docs/core/index.md +0 -4
  144. data/docs/getting-started/index.md +0 -4
  145. data/docs/getting-started/install/index.md +0 -4
  146. data/docs/getting-started/migrate/index.md +0 -4
  147. data/docs/getting-started/uninstall/index.md +0 -4
  148. data/docs/getting-started/upgrade/index.md +0 -4
  149. data/docs/help/start-app/index.md +0 -4
  150. data/docs/index.md +0 -4
  151. data/ext/shopify-cli/extconf.rb +0 -60
  152. data/install.sh +0 -7
  153. data/lib/project_types/extension/tasks/converters/server_config_converter.rb +0 -31
  154. data/lib/project_types/extension/tasks/load_server_config.rb +0 -23
  155. data/lib/project_types/node/commands/connect.rb +0 -21
  156. data/lib/project_types/node/commands/create.rb +0 -125
  157. data/lib/project_types/node/commands/deploy/heroku.rb +0 -96
  158. data/lib/project_types/node/commands/deploy.rb +0 -32
  159. data/lib/project_types/node/commands/generate.rb +0 -22
  160. data/lib/project_types/node/commands/open.rb +0 -18
  161. data/lib/project_types/node/commands/serve.rb +0 -45
  162. data/lib/project_types/node/commands/tunnel.rb +0 -41
  163. data/lib/project_types/php/commands/connect.rb +0 -19
  164. data/lib/project_types/php/commands/create.rb +0 -143
  165. data/lib/project_types/php/commands/deploy/heroku.rb +0 -129
  166. data/lib/project_types/php/commands/deploy.rb +0 -32
  167. data/lib/project_types/php/commands/open.rb +0 -16
  168. data/lib/project_types/php/commands/serve.rb +0 -48
  169. data/lib/project_types/php/commands/tunnel.rb +0 -37
  170. data/lib/project_types/rails/commands/connect.rb +0 -21
  171. data/lib/project_types/rails/commands/deploy/heroku.rb +0 -115
  172. data/lib/project_types/rails/commands/deploy.rb +0 -32
  173. data/lib/project_types/rails/commands/generate/webhook.rb +0 -42
  174. data/lib/project_types/rails/commands/generate.rb +0 -60
  175. data/lib/project_types/rails/commands/open.rb +0 -18
  176. data/lib/project_types/rails/commands/serve.rb +0 -51
  177. data/lib/project_types/rails/commands/tunnel.rb +0 -41
  178. data/lib/project_types/script/graphql/app_script_update_or_create.graphql +0 -0
  179. data/lib/shopify_cli/sub_command.rb +0 -17
  180. data/shopify.fish +0 -12
  181. data/shopify.sh +0 -11
@@ -12,7 +12,7 @@ module ShopifyCLI
12
12
  class Tunnel
13
13
  extend SingleForwardable
14
14
 
15
- def_delegators :new, :start, :stop, :auth, :stats, :urls, :running_on?
15
+ def_delegators :new, :start, :stop, :auth, :authenticated?, :stats, :urls, :running_on?
16
16
 
17
17
  class FetchUrlError < RuntimeError; end
18
18
  class NgrokError < RuntimeError; end
@@ -65,16 +65,12 @@ module ShopifyCLI
65
65
  #
66
66
  def start(ctx, port: PORT)
67
67
  install(ctx)
68
- url, account, seconds_remaining = start_ngrok(ctx, port)
69
- if account
68
+ if authenticated?
69
+ url, account = start_ngrok(ctx, port)
70
70
  ctx.puts(ctx.message("core.tunnel.start_with_account", url, account))
71
71
  else
72
- if seconds_remaining <= 0
73
- ctx.puts(ctx.message("core.tunnel.timed_out"))
74
- url, _account, seconds_remaining = restart_ngrok(ctx, port)
75
- end
72
+ url, _ = restart_ngrok(ctx, port)
76
73
  ctx.puts(ctx.message("core.tunnel.start", url))
77
- ctx.puts(ctx.message("core.tunnel.will_timeout", seconds_to_hm(seconds_remaining)))
78
74
  ctx.puts(ctx.message("core.tunnel.signup_suggestion", ShopifyCLI::TOOL_NAME))
79
75
  end
80
76
  url
@@ -91,7 +87,16 @@ module ShopifyCLI
91
87
  #
92
88
  def auth(ctx, token)
93
89
  install(ctx)
94
- ctx.system(File.join(ShopifyCLI.cache_dir, "ngrok"), "authtoken", token)
90
+ ctx.system(ngrok_path, "authtoken", token)
91
+ end
92
+
93
+ ##
94
+ # returns a boolean: if the user has a ngrok token to authenticate
95
+ #
96
+ def authenticated?
97
+ ngrok_config_path = File.join(Dir.home, ".ngrok2/ngrok.yml")
98
+ return false unless File.exist?(ngrok_config_path)
99
+ File.read(ngrok_config_path).include?("authtoken")
95
100
  end
96
101
 
97
102
  ##
@@ -145,7 +150,7 @@ module ShopifyCLI
145
150
 
146
151
  def install(ctx)
147
152
  ngrok = "ngrok#{ctx.executable_file_extension}"
148
- return if File.exist?(File.join(ShopifyCLI.cache_dir, ngrok))
153
+ return if File.exist?(ngrok_path)
149
154
  check_prereq_command(ctx, "curl")
150
155
  check_prereq_command(ctx, ctx.linux? ? "unzip" : "tar")
151
156
  spinner = CLI::UI::SpinGroup.new
@@ -165,7 +170,7 @@ module ShopifyCLI
165
170
  spinner.wait
166
171
 
167
172
  # final check to see if ngrok is accessible
168
- unless File.exist?(File.join(ShopifyCLI.cache_dir, ngrok))
173
+ unless File.exist?(ngrok_path)
169
174
  ctx.abort(ctx.message("core.tunnel.error.ngrok", ngrok, ShopifyCLI.cache_dir))
170
175
  end
171
176
  end
@@ -177,8 +182,12 @@ module ShopifyCLI
177
182
  raise e.class, e.message
178
183
  end
179
184
 
185
+ def ngrok_path
186
+ File.join(ShopifyCLI.cache_dir, "ngrok")
187
+ end
188
+
180
189
  def ngrok_command(port)
181
- "\"#{File.join(ShopifyCLI.cache_dir, "ngrok")}\" http -inspect=false -log=stdout -log-level=debug #{port}"
190
+ "\"#{ngrok_path}\" http -inspect=false -log=stdout -log-level=debug #{port}"
182
191
  end
183
192
 
184
193
  def seconds_to_hm(seconds)
@@ -188,14 +197,11 @@ module ShopifyCLI
188
197
  def start_ngrok(ctx, port)
189
198
  process = ShopifyCLI::ProcessSupervision.start(:ngrok, ngrok_command(port))
190
199
  log = fetch_url(ctx, process.log_path)
191
- seconds_remaining = (process.time.to_i + log.timeout) - Time.now.to_i
192
- [log.url, log.account, seconds_remaining]
200
+ [log.url, log.account]
193
201
  end
194
202
 
195
203
  def restart_ngrok(ctx, port)
196
- unless ShopifyCLI::ProcessSupervision.stop(:ngrok)
197
- ctx.abort(ctx.message("core.tunnel.error.stop"))
198
- end
204
+ ShopifyCLI::ProcessSupervision.stop(:ngrok)
199
205
  start_ngrok(ctx, port)
200
206
  end
201
207
 
@@ -208,7 +214,7 @@ module ShopifyCLI
208
214
  class LogParser # :nodoc:
209
215
  TIMEOUT = 10
210
216
 
211
- attr_reader :url, :account, :timeout
217
+ attr_reader :url, :account
212
218
 
213
219
  def initialize(log_path)
214
220
  @log_path = log_path
@@ -237,9 +243,8 @@ module ShopifyCLI
237
243
  end
238
244
 
239
245
  def parse_account
240
- account, timeout, _ = @log.match(/AccountName:(.*)\s+SessionDuration:([\d]+) PlanName/)&.captures
246
+ account, _ = @log.match(/AccountName:(.*)\s+SessionDuration/)&.captures
241
247
  @account = account&.empty? ? nil : account
242
- @timeout = timeout&.empty? ? 0 : timeout.to_i
243
248
  end
244
249
 
245
250
  def error
@@ -1,3 +1,3 @@
1
1
  module ShopifyCLI
2
- VERSION = "2.6.4"
2
+ VERSION = "2.7.1"
3
3
  end
data/lib/shopify_cli.rb CHANGED
@@ -111,6 +111,7 @@ module ShopifyCLI
111
111
  autoload :Feature, "shopify_cli/feature"
112
112
  autoload :Form, "shopify_cli/form"
113
113
  autoload :Git, "shopify_cli/git"
114
+ autoload :GitHub, "shopify_cli/github"
114
115
  autoload :Helpers, "shopify_cli/helpers"
115
116
  autoload :Heroku, "shopify_cli/heroku"
116
117
  autoload :IdentityAuth, "shopify_cli/identity_auth"
@@ -123,7 +124,6 @@ module ShopifyCLI
123
124
  autoload :PartnersAPI, "shopify_cli/partners_api"
124
125
  autoload :ProcessSupervision, "shopify_cli/process_supervision"
125
126
  autoload :Project, "shopify_cli/project"
126
- autoload :ProjectCommands, "shopify_cli/project_commands"
127
127
  autoload :ProjectType, "shopify_cli/project_type"
128
128
  autoload :ReportingConfigurationController, "shopify_cli/reporting_configuration_controller"
129
129
  autoload :ResolveConstant, "shopify_cli/resolve_constant"
@@ -131,7 +131,6 @@ module ShopifyCLI
131
131
  autoload :Result, "shopify_cli/result"
132
132
  autoload :Services, "shopify_cli/services"
133
133
  autoload :Shopifolk, "shopify_cli/shopifolk"
134
- autoload :SubCommand, "shopify_cli/sub_command"
135
134
  autoload :Task, "shopify_cli/task"
136
135
  autoload :Tasks, "shopify_cli/tasks"
137
136
  autoload :TransformDataStructure, "shopify_cli/transform_data_structure"
data/shopify-cli.gemspec CHANGED
@@ -33,11 +33,7 @@ Gem::Specification.new do |spec|
33
33
  end
34
34
  spec.bindir = "bin"
35
35
  spec.require_paths = ["lib", "vendor"]
36
- spec.extensions = ["ext/shopify-cli/extconf.rb"]
37
- # Do NOT include `shopify` as a listed executable via `spec.executables`.
38
- # `ext/shopify-cli/extconf.rb` will dynamically create a script and soft-link
39
- # `/usr/local/bin/shopify` to that script, in order to "lock" the Ruby used to
40
- # a single Ruby (useful for debugging in multi-Ruby environments)
36
+ spec.executables << "shopify"
41
37
 
42
38
  spec.add_development_dependency("bundler", "~> 2.2.2")
43
39
  spec.add_development_dependency("rake", "~> 12.3", ">= 12.3.3")
@@ -45,5 +41,5 @@ Gem::Specification.new do |spec|
45
41
 
46
42
  spec.add_dependency("bugsnag", "~> 6.22")
47
43
  spec.add_dependency("listen", "~> 3.7.0")
48
- spec.add_dependency("theme-check", "~> 1.7.2")
44
+ spec.add_dependency("theme-check", "~> 1.8.0")
49
45
  end
data/shopify-dev ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative "./bin/load_shopify"
4
+
5
+ exit(proc do
6
+ begin
7
+ ShopifyCLI::ErrorHandler.call do
8
+ ShopifyCLI::Core::EntryPoint.call(ARGV.dup)
9
+ end
10
+ rescue StandardError => error
11
+ ShopifyCLI::ErrorHandler.exception = error
12
+ if ShopifyCLI::Environment.print_stacktrace?
13
+ raise error
14
+ else
15
+ 1
16
+ end
17
+ end
18
+ end.call)
@@ -0,0 +1,7 @@
1
+ module Utilities
2
+ module Constants
3
+ module Paths
4
+ ROOT = File.expand_path("..", __dir__)
5
+ end
6
+ end
7
+ end
@@ -1,8 +1,10 @@
1
1
  require "open3"
2
+ require "colorize"
2
3
 
3
4
  module Utilities
4
5
  module Docker
5
6
  class Container
7
+ SHOPIFY_PATH = "/usr/src/app"
6
8
  SHOPIFY_BIN_PATH = "/usr/src/app/bin/shopify"
7
9
 
8
10
  Error = Class.new(StandardError)
@@ -55,6 +57,10 @@ module Utilities
55
57
  end
56
58
 
57
59
  def exec(*args, relative_dir: nil)
60
+ if ARGV.include?("--verbose")
61
+ running_prefix = "Running command: #{args.join(" ")}"
62
+ STDOUT.puts(running_prefix.colorize(:yellow).bold)
63
+ end
58
64
  command = ["docker", "exec"]
59
65
  cwd = if relative_dir.nil?
60
66
  @cwd
@@ -68,8 +74,30 @@ module Utilities
68
74
  command << @id
69
75
  command += args
70
76
 
71
- out, stat = Open3.capture2e(*command)
72
- raise Error, out unless stat.success?
77
+ docker_prefix = "Docker (#{args.first}):"
78
+
79
+ if ARGV.include?("--verbose")
80
+ stat = Open3.popen3(*command) do |stdin, stdout, stderr, wait_thread|
81
+ Thread.new do
82
+ stdout.each { |l| STDOUT.puts("#{docker_prefix.colorize(:cyan).bold} #{l}") } unless stdout&.nil?
83
+ end
84
+ Thread.new do
85
+ stderr.each { |l| STDERR.puts("#{docker_prefix.colorize(:red).bold} #{l}") } unless stderr&.nil?
86
+ end
87
+ stdin.close
88
+
89
+ status = wait_thread.value
90
+
91
+ stdout.close
92
+ stderr.close
93
+
94
+ status
95
+ end
96
+ raise StandardError, "The command #{args.first} failed" unless stat.success?
97
+ else
98
+ out, stat = Open3.capture2e(*command)
99
+ raise Error, out unless stat.success?
100
+ end
73
101
  end
74
102
  end
75
103
  end
data/utilities/docker.rb CHANGED
@@ -57,8 +57,9 @@ module Utilities
57
57
 
58
58
  def build_image_if_needed
59
59
  unless image_exists?(image_tag)
60
+ puts "Rebuilding the Docker image..."
60
61
  _, err, stat = Open3.capture3(
61
- "docker", "build", root_dir, "-t", image_tag
62
+ "docker", "build", "-t", image_tag, "-f", File.join(root_dir, "Tests.dockerfile"), root_dir
62
63
  )
63
64
  raise Error, err unless stat.success?
64
65
  end
@@ -66,7 +67,7 @@ module Utilities
66
67
 
67
68
  def image_tag
68
69
  gemfile_lock_path = File.expand_path("./Gemfile.lock", root_dir)
69
- dockerfile_path = File.expand_path("./Dockerfile", root_dir)
70
+ dockerfile_path = File.expand_path("./Tests.dockerfile", root_dir)
70
71
  fingerprintable_strings = [
71
72
  File.read(gemfile_lock_path),
72
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.4
4
+ version: 2.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-18 00:00:00.000000000 Z
11
+ date: 2021-11-17 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.8.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.8.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
@@ -107,11 +107,12 @@ description: |
107
107
  and webhooks.
108
108
  email:
109
109
  - dev-tools-education@shopify.com
110
- executables: []
111
- extensions:
112
- - ext/shopify-cli/extconf.rb
110
+ executables:
111
+ - shopify
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,29 +140,21 @@ 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
158
- - ext/shopify-cli/extconf.rb
149
+ - docs/README.md
150
+ - docs/contributors/testing.md
151
+ - docs/users/installation.md
152
+ - docs/users/migrate-from-themekit.md
153
+ - ext/javy/javy.rb
154
+ - ext/javy/version
159
155
  - ext/shopify-extensions/extconf.rb
160
156
  - ext/shopify-extensions/shopify_extensions.rb
161
157
  - ext/shopify-extensions/version
162
- - install.sh
163
158
  - lib/docgen/class_template.md.erb
164
159
  - lib/docgen/index_template.md.erb
165
160
  - lib/docgen/markdown.rb
@@ -223,10 +218,12 @@ files:
223
218
  - lib/project_types/extension/models/npm_package.rb
224
219
  - lib/project_types/extension/models/product.rb
225
220
  - lib/project_types/extension/models/registration.rb
221
+ - lib/project_types/extension/models/server_config/app.rb
226
222
  - lib/project_types/extension/models/server_config/base.rb
227
223
  - lib/project_types/extension/models/server_config/development.rb
228
224
  - lib/project_types/extension/models/server_config/development_entries.rb
229
225
  - lib/project_types/extension/models/server_config/development_renderer.rb
226
+ - lib/project_types/extension/models/server_config/development_resource.rb
230
227
  - lib/project_types/extension/models/server_config/extension.rb
231
228
  - lib/project_types/extension/models/server_config/root.rb
232
229
  - lib/project_types/extension/models/server_config/user.rb
@@ -241,66 +238,45 @@ files:
241
238
  - lib/project_types/extension/tasks/choose_next_available_port.rb
242
239
  - lib/project_types/extension/tasks/configure_features.rb
243
240
  - lib/project_types/extension/tasks/configure_options.rb
241
+ - lib/project_types/extension/tasks/convert_server_config.rb
244
242
  - lib/project_types/extension/tasks/converters/app_converter.rb
245
243
  - lib/project_types/extension/tasks/converters/product_converter.rb
246
244
  - lib/project_types/extension/tasks/converters/registration_converter.rb
247
- - lib/project_types/extension/tasks/converters/server_config_converter.rb
248
245
  - lib/project_types/extension/tasks/converters/validation_error_converter.rb
249
246
  - lib/project_types/extension/tasks/converters/version_converter.rb
250
247
  - lib/project_types/extension/tasks/create_extension.rb
248
+ - lib/project_types/extension/tasks/ensure_resource_url.rb
251
249
  - lib/project_types/extension/tasks/fetch_specifications.rb
252
250
  - lib/project_types/extension/tasks/find_npm_packages.rb
251
+ - lib/project_types/extension/tasks/find_package_from_json.rb
253
252
  - lib/project_types/extension/tasks/get_app.rb
254
253
  - lib/project_types/extension/tasks/get_apps.rb
255
254
  - lib/project_types/extension/tasks/get_extensions.rb
256
255
  - lib/project_types/extension/tasks/get_product.rb
257
- - lib/project_types/extension/tasks/load_server_config.rb
256
+ - lib/project_types/extension/tasks/merge_server_config.rb
258
257
  - lib/project_types/extension/tasks/run_extension_command.rb
259
258
  - lib/project_types/extension/tasks/update_draft.rb
260
259
  - lib/project_types/extension/tasks/user_errors.rb
261
260
  - 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
261
  - lib/project_types/node/forms/create.rb
271
262
  - lib/project_types/node/messages/messages.rb
272
263
  - 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
264
  - lib/project_types/php/forms/create.rb
281
265
  - lib/project_types/php/messages/messages.rb
282
266
  - lib/project_types/rails/cli.rb
283
- - lib/project_types/rails/commands/connect.rb
284
267
  - 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
268
  - lib/project_types/rails/forms/create.rb
293
269
  - lib/project_types/rails/gem.rb
294
270
  - lib/project_types/rails/messages/messages.rb
295
271
  - lib/project_types/rails/ruby.rb
296
272
  - lib/project_types/script/cli.rb
297
273
  - lib/project_types/script/commands/create.rb
274
+ - lib/project_types/script/commands/javy.rb
298
275
  - lib/project_types/script/commands/push.rb
299
276
  - lib/project_types/script/config/extension_points.yml
300
277
  - lib/project_types/script/errors.rb
301
278
  - lib/project_types/script/forms/create.rb
302
279
  - lib/project_types/script/graphql/app_script_set.graphql
303
- - lib/project_types/script/graphql/app_script_update_or_create.graphql
304
280
  - lib/project_types/script/graphql/get_app_scripts.graphql
305
281
  - lib/project_types/script/graphql/module_upload_url_generate.graphql
306
282
  - lib/project_types/script/graphql/script_service_proxy.graphql
@@ -359,9 +335,21 @@ files:
359
335
  - lib/shopify_cli/app_type_detector.rb
360
336
  - lib/shopify_cli/command.rb
361
337
  - lib/shopify_cli/command/app_sub_command.rb
338
+ - lib/shopify_cli/command/project_command.rb
339
+ - lib/shopify_cli/command/sub_command.rb
362
340
  - lib/shopify_cli/command_options.rb
363
341
  - lib/shopify_cli/command_options/command_serve_options.rb
364
342
  - lib/shopify_cli/commands.rb
343
+ - lib/shopify_cli/commands/app.rb
344
+ - lib/shopify_cli/commands/app/connect.rb
345
+ - lib/shopify_cli/commands/app/create.rb
346
+ - lib/shopify_cli/commands/app/create/node.rb
347
+ - lib/shopify_cli/commands/app/create/php.rb
348
+ - lib/shopify_cli/commands/app/create/rails.rb
349
+ - lib/shopify_cli/commands/app/deploy.rb
350
+ - lib/shopify_cli/commands/app/open.rb
351
+ - lib/shopify_cli/commands/app/serve.rb
352
+ - lib/shopify_cli/commands/app/tunnel.rb
365
353
  - lib/shopify_cli/commands/config.rb
366
354
  - lib/shopify_cli/commands/help.rb
367
355
  - lib/shopify_cli/commands/login.rb
@@ -391,6 +379,8 @@ files:
391
379
  - lib/shopify_cli/feature.rb
392
380
  - lib/shopify_cli/form.rb
393
381
  - lib/shopify_cli/git.rb
382
+ - lib/shopify_cli/github.rb
383
+ - lib/shopify_cli/github/issue_url_generator.rb
394
384
  - lib/shopify_cli/helpers.rb
395
385
  - lib/shopify_cli/helpers/haikunator.rb
396
386
  - lib/shopify_cli/heroku.rb
@@ -421,10 +411,23 @@ files:
421
411
  - lib/shopify_cli/resources/env_file.rb
422
412
  - lib/shopify_cli/result.rb
423
413
  - lib/shopify_cli/services.rb
414
+ - lib/shopify_cli/services/app/connect_service.rb
415
+ - lib/shopify_cli/services/app/create/node_service.rb
416
+ - lib/shopify_cli/services/app/create/php_service.rb
417
+ - lib/shopify_cli/services/app/create/rails_service.rb
418
+ - lib/shopify_cli/services/app/deploy/heroku/node_service.rb
419
+ - lib/shopify_cli/services/app/deploy/heroku/php_service.rb
420
+ - lib/shopify_cli/services/app/deploy/heroku/rails_service.rb
421
+ - lib/shopify_cli/services/app/open_service.rb
422
+ - lib/shopify_cli/services/app/serve/node_service.rb
423
+ - lib/shopify_cli/services/app/serve/php_service.rb
424
+ - lib/shopify_cli/services/app/serve/rails_service.rb
425
+ - lib/shopify_cli/services/app/tunnel/auth_service.rb
426
+ - lib/shopify_cli/services/app/tunnel/start_service.rb
427
+ - lib/shopify_cli/services/app/tunnel/stop_service.rb
424
428
  - lib/shopify_cli/services/base_service.rb
425
429
  - lib/shopify_cli/services/reporting_service.rb
426
430
  - lib/shopify_cli/shopifolk.rb
427
- - lib/shopify_cli/sub_command.rb
428
431
  - lib/shopify_cli/task.rb
429
432
  - lib/shopify_cli/tasks.rb
430
433
  - lib/shopify_cli/tasks/confirm_store.rb
@@ -456,8 +459,8 @@ files:
456
459
  - lib/shopify_cli/tunnel.rb
457
460
  - lib/shopify_cli/version.rb
458
461
  - shopify-cli.gemspec
459
- - shopify.fish
460
- - shopify.sh
462
+ - shopify-dev
463
+ - utilities/constants.rb
461
464
  - utilities/docker.rb
462
465
  - utilities/docker/container.rb
463
466
  - 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
- ---