shopify-cli 2.11.1 → 2.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/bin/shopify +9 -0
- data/lib/project_types/extension/commands/build.rb +0 -3
- data/lib/project_types/extension/commands/check.rb +0 -1
- data/lib/project_types/extension/commands/create.rb +0 -1
- data/lib/project_types/extension/commands/push.rb +0 -1
- data/lib/project_types/extension/commands/serve.rb +0 -1
- data/lib/project_types/extension/models/specification_handlers/theme_app_extension.rb +7 -1
- data/lib/project_types/theme/commands/pull.rb +3 -1
- data/lib/project_types/theme/commands/push.rb +1 -3
- data/lib/shopify_cli/command.rb +3 -1
- data/lib/shopify_cli/constants.rb +1 -1
- data/lib/shopify_cli/messages/messages.rb +2 -2
- data/lib/shopify_cli/theme/dev_server.rb +1 -3
- data/lib/shopify_cli/theme/development_theme.rb +11 -0
- data/lib/shopify_cli/theme/theme.rb +0 -4
- 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: 4a98682c26b1f02a7a24648c23bb987ceab5a70939e031957e80785c1068d849
|
4
|
+
data.tar.gz: bfddf7b2f92004d654a66fa8746619d724789c65da7b236e413857fd8705c65f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33830ff754743290463c4744cd6e76c37fcf72f6119bcc8d43c9d5a752c3acaab7e9f0e9365f0b0083bae8be2b930d1c1a35affc508210e72998abc11b483d3b
|
7
|
+
data.tar.gz: e89c4a64ac97093c8973ccd482ca76b11f3852e29eb124904301c72f930cdce1774fabd1c1d1a3bdb775e065a7e27364a6bb7bbbdcf631c0587ee5e473f793b1
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@ 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.11.2
|
6
|
+
### Fixed
|
7
|
+
* [#2047](https://github.com/Shopify/shopify-cli/pull/2047): Fix the Homebrew installation
|
8
|
+
* [#2019](https://github.com/Shopify/shopify-cli/pull/2019): Provide helpful link when nokogiri fails to load
|
9
|
+
* [#2055](https://github.com/Shopify/shopify-cli/pull/2055): Remove unneeded Node requirements
|
10
|
+
|
5
11
|
## Version 2.11.1
|
6
12
|
### Fixed
|
7
13
|
* [#1973](https://github.com/Shopify/shopify-cli/pull/1973): Fix `theme serve` to preview generated files (`*.css.liquid`)
|
@@ -12,6 +18,7 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
|
|
12
18
|
## Version 2.11.0
|
13
19
|
### Fixed
|
14
20
|
* [#2005](https://github.com/Shopify/shopify-cli/pull/2005): Fix PHP app serve on Windows environments
|
21
|
+
* [#2020](https://github.com/Shopify/shopify-cli/pull/2020): Fix `theme pull` so that correct dev theme is used with `-d` option
|
15
22
|
|
16
23
|
### Added
|
17
24
|
* [#1998](https://github.com/Shopify/shopify-cli/pull/1998): Add support for Rails 7
|
data/Gemfile.lock
CHANGED
data/bin/shopify
CHANGED
@@ -14,6 +14,15 @@ module Kernel
|
|
14
14
|
raise if name == "#{RUBY_VERSION[/\d+\.\d+/]}/psych.so"
|
15
15
|
# Special case for ffi, which rescues this itself
|
16
16
|
raise if name == "#{RUBY_VERSION.split(".")[0, 2].join(".")}/ffi_c"
|
17
|
+
# Special case for nokogiri, which might install the wrong architecture
|
18
|
+
if name == "nokogiri/nokogiri"
|
19
|
+
STDERR.puts "[Note] Nokogiri is failing to load, which most likely means " \
|
20
|
+
"it is installed with the wrong architecture for your system. This link " \
|
21
|
+
"has instructions for how to install the correct version for your system: " \
|
22
|
+
"https://nokogiri.org/tutorials/installing_nokogiri.html"
|
23
|
+
STDERR.puts e.full_message
|
24
|
+
exit(1)
|
25
|
+
end
|
17
26
|
STDERR.puts "[Note] You cannot use gems with Shopify CLI."
|
18
27
|
STDERR.puts "[LoadError] #{e.message}"
|
19
28
|
if ENV["DEBUG"]
|
@@ -6,10 +6,11 @@ module Extension
|
|
6
6
|
module Models
|
7
7
|
module SpecificationHandlers
|
8
8
|
class ThemeAppExtension < Default
|
9
|
-
SUPPORTED_BUCKETS = %w(assets blocks snippets)
|
9
|
+
SUPPORTED_BUCKETS = %w(assets blocks snippets locales)
|
10
10
|
BUNDLE_SIZE_LIMIT = 10 * 1024 * 1024 # 10MB
|
11
11
|
LIQUID_SIZE_LIMIT = 100 * 1024 # 100kb
|
12
12
|
SUPPORTED_ASSET_EXTS = %w(.jpg .js .css .png .svg)
|
13
|
+
SUPPORTED_LOCALE_EXTS = %w(.json)
|
13
14
|
|
14
15
|
def create(directory_name, context, getting_started: false)
|
15
16
|
context.root = File.join(context.root, directory_name)
|
@@ -89,6 +90,11 @@ module Extension
|
|
89
90
|
raise Extension::Errors::InvalidFilenameError,
|
90
91
|
"Invalid filename: #{filename}; #{ext} is not supported"
|
91
92
|
end
|
93
|
+
elsif dirname == "locales"
|
94
|
+
unless SUPPORTED_LOCALE_EXTS.include?(ext)
|
95
|
+
raise Extension::Errors::InvalidFilenameError,
|
96
|
+
"Invalid filename: #{filename}; Only #{SUPPORTED_LOCALE_EXTS.join(", ")} allowed in #{dirname}"
|
97
|
+
end
|
92
98
|
elsif ext != ".liquid"
|
93
99
|
raise Extension::Errors::InvalidFilenameError,
|
94
100
|
"Invalid filename: #{filename}; Only .liquid allowed in #{dirname}"
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
require "shopify_cli/theme/theme"
|
3
|
+
require "shopify_cli/theme/development_theme"
|
3
4
|
require "shopify_cli/theme/ignore_filter"
|
4
5
|
require "shopify_cli/theme/include_filter"
|
5
6
|
require "shopify_cli/theme/syncer"
|
@@ -73,7 +74,8 @@ module Theme
|
|
73
74
|
end
|
74
75
|
|
75
76
|
if development
|
76
|
-
|
77
|
+
dev_theme = ShopifyCLI::Theme::DevelopmentTheme.find(@ctx, root: root)
|
78
|
+
return dev_theme || @ctx.abort(@ctx.message("theme.pull.theme_not_found", dev_theme.name))
|
77
79
|
end
|
78
80
|
|
79
81
|
select_theme(root)
|
@@ -91,9 +91,7 @@ module Theme
|
|
91
91
|
end
|
92
92
|
|
93
93
|
if development
|
94
|
-
|
95
|
-
new_theme.ensure_exists!
|
96
|
-
return new_theme
|
94
|
+
return ShopifyCLI::Theme::DevelopmentTheme.find_or_create!(@ctx, root: root)
|
97
95
|
end
|
98
96
|
|
99
97
|
if unpublished
|
data/lib/shopify_cli/command.rb
CHANGED
@@ -100,8 +100,10 @@ module ShopifyCLI
|
|
100
100
|
end
|
101
101
|
|
102
102
|
def check_node_version
|
103
|
+
return unless @compatible_node_range
|
104
|
+
|
103
105
|
context = Context.new
|
104
|
-
if
|
106
|
+
if context.which("node").nil?
|
105
107
|
raise ShopifyCLI::Abort, context.message("core.errors.missing_node")
|
106
108
|
end
|
107
109
|
|
@@ -15,7 +15,7 @@ module ShopifyCLI
|
|
15
15
|
},
|
16
16
|
core: {
|
17
17
|
errors: {
|
18
|
-
missing_node: "Node is
|
18
|
+
missing_node: "Node is required to continue. Install node here: https://nodejs.org/en/download.",
|
19
19
|
option_parser: {
|
20
20
|
invalid_option: "The option {{command:%s}} is not supported.",
|
21
21
|
missing_argument: "The required argument {{command:%s}} is missing.",
|
@@ -42,7 +42,7 @@ module ShopifyCLI
|
|
42
42
|
invalid_type: "The type %s is not supported. The only supported types are"\
|
43
43
|
" {{command:[ rails | node | php ]}}",
|
44
44
|
help: <<~HELP,
|
45
|
-
{{command:%s app create}}: Creates a
|
45
|
+
{{command:%s app create}}: Creates a new project in a subdirectory.
|
46
46
|
Usage: {{command:%s app create [ rails | node | php ]}}
|
47
47
|
HELP
|
48
48
|
rails: {
|
@@ -28,7 +28,7 @@ module ShopifyCLI
|
|
28
28
|
|
29
29
|
def start(ctx, root, host: "127.0.0.1", port: 9292, poll: false, mode: ReloadMode.default)
|
30
30
|
@ctx = ctx
|
31
|
-
theme = DevelopmentTheme.
|
31
|
+
theme = DevelopmentTheme.find_or_create!(ctx, root: root)
|
32
32
|
ignore_filter = IgnoreFilter.from_path(root)
|
33
33
|
@syncer = Syncer.new(ctx, theme: theme, ignore_filter: ignore_filter)
|
34
34
|
watcher = Watcher.new(ctx, theme: theme, syncer: @syncer, ignore_filter: ignore_filter, poll: poll)
|
@@ -41,8 +41,6 @@ module ShopifyCLI
|
|
41
41
|
stopped = false
|
42
42
|
address = "http://#{host}:#{port}"
|
43
43
|
|
44
|
-
theme.ensure_exists!
|
45
|
-
|
46
44
|
trap("INT") do
|
47
45
|
stopped = true
|
48
46
|
stop
|
@@ -38,6 +38,8 @@ module ShopifyCLI
|
|
38
38
|
@ctx.debug("Created temporary development theme: #{@id}")
|
39
39
|
ShopifyCLI::DB.set(development_theme_id: @id)
|
40
40
|
end
|
41
|
+
|
42
|
+
self
|
41
43
|
end
|
42
44
|
|
43
45
|
def exists?
|
@@ -63,6 +65,15 @@ module ShopifyCLI
|
|
63
65
|
new(ctx).delete
|
64
66
|
end
|
65
67
|
|
68
|
+
def self.find(ctx, root: nil)
|
69
|
+
dev_theme = new(ctx, root: root)
|
70
|
+
dev_theme.exists? ? dev_theme : nil
|
71
|
+
end
|
72
|
+
|
73
|
+
def self.find_or_create!(ctx, root: nil)
|
74
|
+
new(ctx, root: root).ensure_exists!
|
75
|
+
end
|
76
|
+
|
66
77
|
private
|
67
78
|
|
68
79
|
def generate_theme_name
|
@@ -176,10 +176,6 @@ module ShopifyCLI
|
|
176
176
|
find(ctx, root) { |attrs| attrs["role"] == "main" }
|
177
177
|
end
|
178
178
|
|
179
|
-
def development(ctx, root: nil)
|
180
|
-
find(ctx, root) { |attrs| attrs["role"] == "development" }
|
181
|
-
end
|
182
|
-
|
183
179
|
# Finds a Theme by its identifier
|
184
180
|
#
|
185
181
|
# #### Parameters
|
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.11.
|
4
|
+
version: 2.11.2
|
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-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|