shopify-cli 2.15.3 → 2.15.6
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 +17 -0
- data/Gemfile.lock +1 -1
- data/ext/shopify-extensions/version +1 -1
- data/lib/project_types/extension/cli.rb +4 -0
- data/lib/project_types/extension/forms/questions/ask_template.rb +1 -2
- data/lib/project_types/extension/models/specification_handlers/theme_app_extension.rb +4 -1
- data/lib/shopify_cli/messages/messages.rb +2 -6
- data/lib/shopify_cli/services/app/serve/serve_service.rb +1 -1
- data/lib/shopify_cli/tasks/update_dashboard_urls.rb +20 -6
- data/lib/shopify_cli/theme/dev_server/local_assets.rb +1 -1
- data/lib/shopify_cli/tunnel.rb +3 -13
- 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: 756d40b258dafcaa9e3fd02305cbc3eb4bc1416b5711f22543c9b6221c4bd888
|
4
|
+
data.tar.gz: 476eea5325f671f2e3a1337700356f895792c1e4b2568dc56e38c58b4d1e93d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11bee20d53a3809978a2cf37a7f4ed3e759f0edd7d53ac8ec9e08dad76c1bd3ed8fcbf66262dc686d7bf929fec256685189facaf1255c2f51c2f566757b7ae29
|
7
|
+
data.tar.gz: 8cb0d2cb3d2edf801f752b74ed8534816180e257d3a1afef8fb0b13ffa5a3a85388bd6bb71df04d0c42bf450cedd1008e473f36cf48722435eea912645dcb1e9
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,23 @@ 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.15.6 - 2022-04-12
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
* [#2246](https://github.com/Shopify/shopify-cli/pull/2246): Fix callback urls for app serve
|
9
|
+
|
10
|
+
## Version 2.15.5 - 2022-04-08
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
* [#2237](https://github.com/Shopify/shopify-cli/pull/2237): Fix Homebrew Wrapper
|
14
|
+
|
15
|
+
## Version 2.15.4 - 2022-04-08
|
16
|
+
|
17
|
+
### Fixed
|
18
|
+
* [#2230](https://github.com/Shopify/shopify-cli/pull/2230): Show an error without ngrok account
|
19
|
+
* [#2235](https://github.com/Shopify/shopify-cli/pull/2235): Update shopify-extensions to v0.3.0 and fix issues with template choosing and missing dependencies
|
20
|
+
* [#2226](https://github.com/Shopify/shopify-cli/pull/2226): Fix liquid file size validation to disclude locales directory
|
21
|
+
|
5
22
|
## Version 2.15.3 - 2022-04-07
|
6
23
|
|
7
24
|
### Changed
|
data/Gemfile.lock
CHANGED
@@ -1 +1 @@
|
|
1
|
-
v0.
|
1
|
+
v0.3.0
|
@@ -21,8 +21,7 @@ module Extension
|
|
21
21
|
|
22
22
|
def template_required?(project_details)
|
23
23
|
type = project_details&.type&.identifier
|
24
|
-
|
25
|
-
Models::DevelopmentServerRequirements.type_supported?(type.downcase))
|
24
|
+
Models::DevelopmentServerRequirements.supported?(type)
|
26
25
|
end
|
27
26
|
|
28
27
|
def choose_interactively
|
@@ -38,7 +38,10 @@ module Extension
|
|
38
38
|
# Other assets should be treated as UTF-8 encoded text
|
39
39
|
mode = "rt"
|
40
40
|
encoding = "UTF-8"
|
41
|
-
|
41
|
+
|
42
|
+
if dirname == "snippets" || dirname == "blocks"
|
43
|
+
current_liquid_size += File.size(filename)
|
44
|
+
end
|
42
45
|
end
|
43
46
|
current_size += File.size(filename)
|
44
47
|
if current_size > BUNDLE_SIZE_LIMIT
|
@@ -760,16 +760,12 @@ module ShopifyCLI
|
|
760
760
|
" package manager for your system.",
|
761
761
|
ngrok: "Something went wrong with ngrok installation,"\
|
762
762
|
"please make sure %s exists within %s before trying again",
|
763
|
+
signup_required: "A free ngrok account is required: {{underline:https://ngrok.com/signup}}. After you "\
|
764
|
+
"signup, install your personal authorization token using {{command:%s app tunnel auth <token>}}.",
|
763
765
|
},
|
764
766
|
installing: "Installing ngrok…",
|
765
767
|
not_running: "{{green:x}} ngrok tunnel not running",
|
766
768
|
prereq_command_location: "%s @ %s",
|
767
|
-
signup_suggestion: <<~MESSAGE,
|
768
|
-
{{*}} To avoid tunnels that timeout, it is recommended to signup for a free ngrok
|
769
|
-
account at {{underline:https://ngrok.com/signup}}. After you signup, install your
|
770
|
-
personalized authorization token using {{command:%s app tunnel auth <token>}}.
|
771
|
-
MESSAGE
|
772
|
-
start: "{{v}} ngrok tunnel running at {{underline:%s}}",
|
773
769
|
start_with_account: "{{v}} ngrok tunnel running at {{underline:%s}}, with account %s",
|
774
770
|
stopped: "{{green:x}} ngrok tunnel stopped",
|
775
771
|
timed_out: "{{x}} ngrok tunnel has timed out, restarting…",
|
@@ -1,18 +1,21 @@
|
|
1
|
+
require "set"
|
2
|
+
|
1
3
|
module ShopifyCLI
|
2
4
|
module Tasks
|
3
5
|
class UpdateDashboardURLS < ShopifyCLI::Task
|
4
6
|
NGROK_REGEX = /https:\/\/([a-z0-9\-]+\.ngrok\.io)(.*)/
|
5
7
|
|
6
|
-
def call(ctx, url:,
|
8
|
+
def call(ctx, url:, callback_urls:)
|
7
9
|
@ctx = ctx
|
8
10
|
project = ShopifyCLI::Project.current
|
9
11
|
api_key = project.env.api_key
|
10
12
|
result = ShopifyCLI::PartnersAPI.query(ctx, "get_app_urls", apiKey: api_key)
|
11
13
|
app = result["data"]["app"]
|
12
14
|
|
13
|
-
|
15
|
+
constructed_urls = construct_redirect_urls(app["redirectUrlWhitelist"], url, callback_urls)
|
16
|
+
|
17
|
+
return if already_updated(app, constructed_urls, url)
|
14
18
|
|
15
|
-
constructed_urls = construct_redirect_urls(app["redirectUrlWhitelist"], url, callback_url)
|
16
19
|
ShopifyCLI::PartnersAPI.query(@ctx, "update_dashboard_urls", input: {
|
17
20
|
applicationUrl: url,
|
18
21
|
redirectUrlWhitelist: constructed_urls,
|
@@ -25,7 +28,7 @@ module ShopifyCLI
|
|
25
28
|
raise
|
26
29
|
end
|
27
30
|
|
28
|
-
def construct_redirect_urls(urls, new_url,
|
31
|
+
def construct_redirect_urls(urls, new_url, callback_urls)
|
29
32
|
new_urls = urls.map do |url|
|
30
33
|
if (match = url.match(NGROK_REGEX))
|
31
34
|
"#{new_url}#{match[2]}"
|
@@ -33,11 +36,22 @@ module ShopifyCLI
|
|
33
36
|
url
|
34
37
|
end
|
35
38
|
end
|
36
|
-
|
37
|
-
new_urls.
|
39
|
+
callback_urls.each do |callback_url|
|
40
|
+
if new_urls.grep(/#{new_url}#{callback_url}/).empty?
|
41
|
+
new_urls.push("#{new_url}#{callback_url}")
|
42
|
+
end
|
38
43
|
end
|
39
44
|
new_urls.uniq
|
40
45
|
end
|
46
|
+
|
47
|
+
private
|
48
|
+
|
49
|
+
def already_updated(app, new_redirect_urls, new_url)
|
50
|
+
current_url = app["applicationUrl"]
|
51
|
+
current_redirect_urls = app["redirectUrlWhitelist"]
|
52
|
+
current_url.match(new_url) &&
|
53
|
+
Set.new(current_redirect_urls) == Set.new(new_redirect_urls)
|
54
|
+
end
|
41
55
|
end
|
42
56
|
end
|
43
57
|
end
|
data/lib/shopify_cli/tunnel.rb
CHANGED
@@ -66,14 +66,9 @@ module ShopifyCLI
|
|
66
66
|
#
|
67
67
|
def start(ctx, port: PORT)
|
68
68
|
install(ctx)
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
else
|
73
|
-
url, _ = restart_ngrok(ctx, port)
|
74
|
-
ctx.puts(ctx.message("core.tunnel.start", url))
|
75
|
-
ctx.puts(ctx.message("core.tunnel.signup_suggestion", ShopifyCLI::TOOL_NAME))
|
76
|
-
end
|
69
|
+
ctx.abort(ctx.message("core.tunnel.error.signup_required", ShopifyCLI::TOOL_NAME)) unless authenticated?
|
70
|
+
url, account = start_ngrok(ctx, port)
|
71
|
+
ctx.puts(ctx.message("core.tunnel.start_with_account", url, account))
|
77
72
|
url
|
78
73
|
end
|
79
74
|
|
@@ -208,11 +203,6 @@ module ShopifyCLI
|
|
208
203
|
[log.url, log.account]
|
209
204
|
end
|
210
205
|
|
211
|
-
def restart_ngrok(ctx, port)
|
212
|
-
ShopifyCLI::ProcessSupervision.stop(:ngrok)
|
213
|
-
start_ngrok(ctx, port)
|
214
|
-
end
|
215
|
-
|
216
206
|
def check_prereq_command(ctx, command)
|
217
207
|
cmd_path = ctx.which(command)
|
218
208
|
ctx.abort(ctx.message("core.tunnel.error.prereq_command_required", command)) if cmd_path.nil?
|
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.15.
|
4
|
+
version: 2.15.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|