shopify-cli 2.27.0 → 2.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/lib/project_types/extension/messages/message_loading.rb +1 -6
- data/lib/project_types/theme/cli.rb +2 -1
- data/lib/project_types/theme/messages/messages.rb +27 -1
- data/lib/project_types/theme/presenters/themes_presenter.rb +3 -6
- data/lib/shopify_cli/command.rb +1 -1
- data/lib/shopify_cli/messages/messages.rb +1 -1
- data/lib/shopify_cli/utilities.rb +5 -0
- data/lib/shopify_cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9563000eff4fb285eefdc448c66f51c45cb40b7119870a17994d87e0c037160
|
4
|
+
data.tar.gz: 6cb8dbe46c0b825679e8a301206869d6cd523c4881235e220d966a753f477d5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f67ca0fc39a81731a425e5e7a8bd848d50f7ed698b31f6529b18af0365ab7ca2a8072cada700b0e98028c0d42b3b3cbfcae7108bc30a038d265f85d18b06ed8
|
7
|
+
data.tar.gz: afc2b9be9d9b59eca388fe71946ed696ed1e7faf28833468217f0933af1f4fac9ea9f08613cf08ec2b379886b06702641703790762323b8f58e5a40fccff1cb1
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
|
|
2
2
|
|
3
3
|
## [Unreleased]
|
4
4
|
|
5
|
+
## Version 2.28.0 - 2022-10-17
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
* [#2646](https://github.com/Shopify/shopify-cli/pull/2646): Demo themes shouldn't appear in the `shopify theme pull/push/list/open` commands
|
9
|
+
|
10
|
+
### Changed
|
11
|
+
* [#2648](https://github.com/Shopify/shopify-cli/pull/2648): Do not warn users when the CLI 2.x is running as a subprocess
|
12
|
+
|
5
13
|
## Version 2.27.0 - 2022-10-10
|
6
14
|
|
7
15
|
### Fixed
|
data/Gemfile.lock
CHANGED
@@ -8,7 +8,7 @@ module Extension
|
|
8
8
|
return Messages::MESSAGES if type_specific_messages.nil?
|
9
9
|
|
10
10
|
if type_specific_messages.key?(:overrides)
|
11
|
-
deep_merge(Messages::MESSAGES, type_specific_messages[:overrides])
|
11
|
+
ShopifyCLI::Utilities.deep_merge(Messages::MESSAGES, type_specific_messages[:overrides])
|
12
12
|
else
|
13
13
|
Messages::MESSAGES
|
14
14
|
end
|
@@ -29,11 +29,6 @@ module Extension
|
|
29
29
|
|
30
30
|
TYPES[type_identifier_symbol]
|
31
31
|
end
|
32
|
-
|
33
|
-
def self.deep_merge(first, second)
|
34
|
-
merger = proc { |_key, v1, v2| Hash === v1 && Hash === v2 ? v1.merge(v2, &merger) : v2 }
|
35
|
-
first.merge(second, &merger)
|
36
|
-
end
|
37
32
|
end
|
38
33
|
end
|
39
34
|
end
|
@@ -1,8 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module Theme
|
3
4
|
class Project < ShopifyCLI::ProjectType
|
4
5
|
require Project.project_filepath("messages/messages")
|
5
|
-
register_messages(Theme::Messages
|
6
|
+
register_messages(Theme::Messages.all)
|
6
7
|
end
|
7
8
|
|
8
9
|
class Command < ShopifyCLI::Command::ProjectCommand
|
@@ -145,7 +145,7 @@ module Theme
|
|
145
145
|
It looks like you are using credentials that do not work with {{command:%s theme serve}}.
|
146
146
|
ERROR_MESSAGE
|
147
147
|
help_message: <<~HELP_MESSAGE,
|
148
|
-
Run {{command:%s logout}} and {{command:%s login --password "" --store STORE}} to
|
148
|
+
Run {{command:%s logout}} and {{command:%s login --password "" --store STORE}} to authenticate again.
|
149
149
|
HELP_MESSAGE
|
150
150
|
},
|
151
151
|
operation: {
|
@@ -390,5 +390,31 @@ module Theme
|
|
390
390
|
},
|
391
391
|
},
|
392
392
|
}.freeze
|
393
|
+
|
394
|
+
def self.all
|
395
|
+
# In order to support theme development inside CLI3, we spawn CLI2 as a
|
396
|
+
# subprocess. Whenever an error happens, we want to show the updated
|
397
|
+
# version of the commands for the user to try.
|
398
|
+
if ShopifyCLI::Environment.run_as_subprocess?
|
399
|
+
ShopifyCLI::Utilities.deep_merge(MESSAGES, {
|
400
|
+
theme: {
|
401
|
+
serve: {
|
402
|
+
auth: {
|
403
|
+
error_message: <<~ERROR_MESSAGE,
|
404
|
+
It looks like you are using credentials that do not work with {{command:%s theme dev}}.
|
405
|
+
ERROR_MESSAGE
|
406
|
+
help_message: <<~HELP_MESSAGE,
|
407
|
+
Run {{command:%s auth logout}} and {{command:%s theme dev --store STORE}} to authenticate again.
|
408
|
+
HELP_MESSAGE
|
409
|
+
},
|
410
|
+
binding_error: "Couldn't bind to localhost." \
|
411
|
+
" To serve your theme, set a different address with {{command:%s theme dev --host=<address>}}",
|
412
|
+
},
|
413
|
+
},
|
414
|
+
})
|
415
|
+
else
|
416
|
+
MESSAGES
|
417
|
+
end
|
418
|
+
end
|
393
419
|
end
|
394
420
|
end
|
@@ -5,7 +5,7 @@ require_relative "theme_presenter"
|
|
5
5
|
module Theme
|
6
6
|
module Presenters
|
7
7
|
class ThemesPresenter
|
8
|
-
|
8
|
+
SUPPORTED_ROLES = %w(live unpublished development)
|
9
9
|
|
10
10
|
def initialize(ctx, root)
|
11
11
|
@ctx = ctx
|
@@ -14,16 +14,13 @@ module Theme
|
|
14
14
|
|
15
15
|
def all
|
16
16
|
all_themes
|
17
|
-
.
|
17
|
+
.select { |theme| SUPPORTED_ROLES.include?(theme.role) }
|
18
|
+
.sort_by { |theme| SUPPORTED_ROLES.index(theme.role) }
|
18
19
|
.map { |theme| ThemePresenter.new(theme) }
|
19
20
|
end
|
20
21
|
|
21
22
|
private
|
22
23
|
|
23
|
-
def order_by_role(theme)
|
24
|
-
ORDER_BY_ROLE.index(theme.role) || ORDER_BY_ROLE.size
|
25
|
-
end
|
26
|
-
|
27
24
|
def all_themes
|
28
25
|
ShopifyCLI::Theme::Theme.all(@ctx, root: @root)
|
29
26
|
end
|
data/lib/shopify_cli/command.rb
CHANGED
@@ -117,7 +117,7 @@ module ShopifyCLI
|
|
117
117
|
end
|
118
118
|
|
119
119
|
def check_version(version, range:, runtime:, context: Context.new)
|
120
|
-
return if Environment.test?
|
120
|
+
return if Environment.test? || Environment.run_as_subprocess?
|
121
121
|
return if range.nil?
|
122
122
|
|
123
123
|
version_without_pre_nor_build = Utilities.version_dropping_pre_and_build(version)
|
@@ -498,7 +498,7 @@ module ShopifyCLI
|
|
498
498
|
"{{i}} Authentication required. Login to the URL below with your %s credentials to continue.",
|
499
499
|
|
500
500
|
servlet: {
|
501
|
-
success_response: "You've
|
501
|
+
success_response: "You've successfully logged into the Shopify CLI!",
|
502
502
|
invalid_request_response: "Invalid request: %s",
|
503
503
|
invalid_state_response: "The anti-forgery state token does not match the initial request.",
|
504
504
|
},
|
data/lib/shopify_cli/version.rb
CHANGED
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.28.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-10-
|
11
|
+
date: 2022-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|