shopify-cli 2.12.0 → 2.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/shopify.yml +2 -1
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +10 -0
- data/Gemfile.lock +14 -14
- data/bin/shopify +4 -4
- data/dev.yml +1 -1
- data/ext/javy/hashes/javy-arm-macos-v0.2.0.gz.sha256 +1 -0
- data/ext/javy/hashes/javy-x86_64-linux-v0.2.0.gz.sha256 +1 -0
- data/ext/javy/hashes/javy-x86_64-macos-v0.2.0.gz.sha256 +1 -0
- data/ext/javy/hashes/javy-x86_64-windows-v0.2.0.gz.sha256 +1 -0
- data/ext/javy/version +1 -1
- data/lib/project_types/extension/features/argo_setup_steps.rb +4 -6
- data/lib/project_types/extension/tasks/configure_features.rb +15 -2
- data/lib/project_types/extension/tasks/convert_server_config.rb +2 -1
- data/lib/project_types/script/commands/create.rb +4 -4
- data/lib/project_types/script/errors.rb +1 -1
- data/lib/project_types/script/forms/create.rb +7 -7
- data/lib/project_types/script/layers/application/build_script.rb +22 -24
- data/lib/project_types/script/layers/application/create_script.rb +9 -10
- data/lib/project_types/script/layers/application/project_dependencies.rb +12 -14
- data/lib/project_types/script/layers/application/push_script.rb +2 -0
- data/lib/project_types/script/layers/domain/errors.rb +3 -3
- data/lib/project_types/script/layers/domain/push_package.rb +6 -0
- data/lib/project_types/script/layers/domain/script_config.rb +2 -4
- data/lib/project_types/script/layers/domain/script_project.rb +3 -2
- data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_project_creator.rb +19 -4
- data/lib/project_types/script/layers/infrastructure/languages/project_creator.rb +0 -15
- data/lib/project_types/script/layers/infrastructure/languages/typescript_project_creator.rb +19 -4
- data/lib/project_types/script/layers/infrastructure/languages/wasm_project_creator.rb +0 -3
- data/lib/project_types/script/layers/infrastructure/push_package_repository.rb +4 -0
- data/lib/project_types/script/layers/infrastructure/script_project_repository.rb +13 -25
- data/lib/project_types/script/layers/infrastructure/script_service.rb +4 -2
- data/lib/project_types/script/messages/messages.rb +7 -7
- data/lib/project_types/script/ui/error_handler.rb +4 -4
- data/lib/project_types/script/ui/strict_spinner.rb +4 -6
- data/lib/project_types/theme/cli.rb +2 -0
- data/lib/project_types/theme/commands/common/root_helper.rb +11 -5
- data/lib/project_types/theme/commands/list.rb +34 -0
- data/lib/project_types/theme/commands/open.rb +65 -0
- data/lib/project_types/theme/commands/pull.rb +2 -2
- data/lib/project_types/theme/commands/push.rb +2 -2
- data/lib/project_types/theme/forms/select.rb +11 -39
- data/lib/project_types/theme/messages/messages.rb +31 -2
- data/lib/project_types/theme/presenters/theme_presenter.rb +48 -0
- data/lib/project_types/theme/presenters/themes_presenter.rb +32 -0
- data/lib/shopify_cli/api.rb +1 -1
- data/lib/shopify_cli/constants.rb +2 -2
- data/lib/shopify_cli/context.rb +11 -13
- data/lib/shopify_cli/services/app/create/rails_service.rb +1 -1
- data/lib/shopify_cli/theme/syncer.rb +7 -7
- data/lib/shopify_cli/version.rb +1 -1
- data/shopify-dev +9 -11
- metadata +10 -2
data/lib/shopify_cli/context.rb
CHANGED
@@ -570,21 +570,19 @@ module ShopifyCLI
|
|
570
570
|
trap("INFO", "DEFAULT")
|
571
571
|
|
572
572
|
fork do
|
573
|
-
|
574
|
-
|
573
|
+
r, w = IO.pipe
|
574
|
+
@signal = false
|
575
|
+
trap("SIGINFO") do
|
576
|
+
@signal = true
|
577
|
+
w.write(0)
|
578
|
+
end
|
579
|
+
while r.read(1)
|
580
|
+
next unless @signal
|
575
581
|
@signal = false
|
576
|
-
|
577
|
-
@signal = true
|
578
|
-
w.write(0)
|
579
|
-
end
|
580
|
-
while r.read(1)
|
581
|
-
next unless @signal
|
582
|
-
@signal = false
|
583
|
-
yield
|
584
|
-
end
|
585
|
-
rescue Interrupt
|
586
|
-
exit(0)
|
582
|
+
yield
|
587
583
|
end
|
584
|
+
rescue Interrupt
|
585
|
+
exit(0)
|
588
586
|
end
|
589
587
|
end
|
590
588
|
|
@@ -109,7 +109,7 @@ module ShopifyCLI
|
|
109
109
|
|
110
110
|
def check_ruby
|
111
111
|
ruby_version = Rails::Ruby.version(context)
|
112
|
-
return if ruby_version.satisfies?("~>2.5") || ruby_version.satisfies?("~>3.
|
112
|
+
return if ruby_version.satisfies?("~>2.5") || ruby_version.satisfies?("~>3.1.0")
|
113
113
|
context.abort(context.message("core.app.create.rails.error.invalid_ruby_version"))
|
114
114
|
end
|
115
115
|
|
@@ -47,11 +47,11 @@ module ShopifyCLI
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def lock_io!
|
50
|
-
@reporters.each
|
50
|
+
@reporters.each(&:disable!)
|
51
51
|
end
|
52
52
|
|
53
53
|
def unlock_io!
|
54
|
-
@reporters.each
|
54
|
+
@reporters.each(&:enable!)
|
55
55
|
end
|
56
56
|
|
57
57
|
def enqueue_updates(files)
|
@@ -118,7 +118,7 @@ module ShopifyCLI
|
|
118
118
|
operation = @queue.pop
|
119
119
|
break if operation.nil? # shutdown was called
|
120
120
|
perform(operation)
|
121
|
-
rescue Exception => e
|
121
|
+
rescue Exception => e # rubocop:disable Lint/RescueException
|
122
122
|
error_suffix = ": #{e}"
|
123
123
|
error_suffix += + "\n\t#{e.backtrace.join("\n\t")}" if @ctx.debug?
|
124
124
|
report_error(operation, error_suffix)
|
@@ -288,7 +288,7 @@ module ShopifyCLI
|
|
288
288
|
update_checksums(body)
|
289
289
|
|
290
290
|
attachment = body.dig("asset", "attachment")
|
291
|
-
|
291
|
+
if attachment
|
292
292
|
file.write(Base64.decode64(attachment))
|
293
293
|
else
|
294
294
|
file.write(body.dig("asset", "value"))
|
@@ -305,7 +305,7 @@ module ShopifyCLI
|
|
305
305
|
method: "DELETE",
|
306
306
|
api_version: API_VERSION,
|
307
307
|
body: JSON.generate(asset: {
|
308
|
-
key: file.relative_path.to_s
|
308
|
+
key: file.relative_path.to_s,
|
309
309
|
})
|
310
310
|
)
|
311
311
|
|
@@ -332,7 +332,7 @@ module ShopifyCLI
|
|
332
332
|
parsed_body = JSON.parse(exception&.response&.body)
|
333
333
|
message = parsed_body.dig("errors", "asset") || parsed_body["message"] || exception.message
|
334
334
|
# Truncate to first lines
|
335
|
-
[message].flatten.map { |
|
335
|
+
[message].flatten.map { |mess| mess.split("\n", 2).first }
|
336
336
|
rescue JSON::ParserError
|
337
337
|
[exception.message]
|
338
338
|
end
|
@@ -340,7 +340,7 @@ module ShopifyCLI
|
|
340
340
|
def backoff_if_near_limit!(used, limit)
|
341
341
|
if used > limit - @threads.size
|
342
342
|
@ctx.debug("Near API call limit, waiting 2 sec…")
|
343
|
-
@backoff_mutex.synchronize { sleep
|
343
|
+
@backoff_mutex.synchronize { sleep(2) }
|
344
344
|
end
|
345
345
|
end
|
346
346
|
|
data/lib/shopify_cli/version.rb
CHANGED
data/shopify-dev
CHANGED
@@ -3,16 +3,14 @@
|
|
3
3
|
require_relative "./bin/load_shopify"
|
4
4
|
|
5
5
|
exit(proc do
|
6
|
-
|
7
|
-
ShopifyCLI::
|
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
|
6
|
+
ShopifyCLI::ErrorHandler.call do
|
7
|
+
ShopifyCLI::Core::EntryPoint.call(ARGV.dup)
|
17
8
|
end
|
9
|
+
rescue StandardError => error
|
10
|
+
ShopifyCLI::ErrorHandler.exception = error
|
11
|
+
if ShopifyCLI::Environment.print_stacktrace?
|
12
|
+
raise error
|
13
|
+
else
|
14
|
+
1
|
15
|
+
end
|
18
16
|
end.call)
|
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.
|
4
|
+
version: 2.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02
|
11
|
+
date: 2022-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -154,9 +154,13 @@ files:
|
|
154
154
|
- docs/users/installation.md
|
155
155
|
- docs/users/migrate-from-themekit.md
|
156
156
|
- ext/javy/hashes/javy-arm-macos-v0.1.0.gz.sha256
|
157
|
+
- ext/javy/hashes/javy-arm-macos-v0.2.0.gz.sha256
|
157
158
|
- ext/javy/hashes/javy-x86_64-linux-v0.1.0.gz.sha256
|
159
|
+
- ext/javy/hashes/javy-x86_64-linux-v0.2.0.gz.sha256
|
158
160
|
- ext/javy/hashes/javy-x86_64-macos-v0.1.0.gz.sha256
|
161
|
+
- ext/javy/hashes/javy-x86_64-macos-v0.2.0.gz.sha256
|
159
162
|
- ext/javy/hashes/javy-x86_64-windows-v0.1.0.gz.sha256
|
163
|
+
- ext/javy/hashes/javy-x86_64-windows-v0.2.0.gz.sha256
|
160
164
|
- ext/javy/javy.rb
|
161
165
|
- ext/javy/version
|
162
166
|
- ext/shopify-extensions/extconf.rb
|
@@ -340,6 +344,8 @@ files:
|
|
340
344
|
- lib/project_types/theme/commands/delete.rb
|
341
345
|
- lib/project_types/theme/commands/init.rb
|
342
346
|
- lib/project_types/theme/commands/language_server.rb
|
347
|
+
- lib/project_types/theme/commands/list.rb
|
348
|
+
- lib/project_types/theme/commands/open.rb
|
343
349
|
- lib/project_types/theme/commands/package.rb
|
344
350
|
- lib/project_types/theme/commands/publish.rb
|
345
351
|
- lib/project_types/theme/commands/pull.rb
|
@@ -351,6 +357,8 @@ files:
|
|
351
357
|
- lib/project_types/theme/forms/confirm_store.rb
|
352
358
|
- lib/project_types/theme/forms/select.rb
|
353
359
|
- lib/project_types/theme/messages/messages.rb
|
360
|
+
- lib/project_types/theme/presenters/theme_presenter.rb
|
361
|
+
- lib/project_types/theme/presenters/themes_presenter.rb
|
354
362
|
- lib/project_types/theme/ui/sync_progress_bar.rb
|
355
363
|
- lib/rubygems_plugin.rb
|
356
364
|
- lib/shopify_cli.rb
|