shopify-cli 2.6.0 → 2.6.1
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 +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/bin/shopify +1 -0
- data/lib/shopify_cli/api.rb +4 -0
- data/lib/shopify_cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 519cb54ace25231ba49785408b84edc9aeca12d5aafabb6d3d03c73ffb571d92
|
4
|
+
data.tar.gz: 8614d8f8e102da27e0387cb746d74e036d66267d1b660f7997ca36aba202f73a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b65eea14dd893650bacc43d468072c04d74f54ca0d0443884bed125e9d45bc604823d9e50e36d3142f34dd6d98b61b023d192ea520d18a678c09e7fcab0ac85
|
7
|
+
data.tar.gz: 0d6120c8b28f9eb21fa244fa82238e8c008586e50da5c4587ef2d29bc0724e45e175b651559c3513da2c74246ae8c87566feca71ccc405256dd38303dfb76ee6
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -85,7 +85,7 @@ When prompted, open the provided accounts.shopify.com URL in a browser. In your
|
|
85
85
|
|
86
86
|
Run:
|
87
87
|
|
88
|
-
`shopify theme
|
88
|
+
`shopify theme init`
|
89
89
|
|
90
90
|
To initialize a theme on your current working directory. This will actually clone Shopify's starter theme which you should use as a reference when building themes for Shopify.
|
91
91
|
|
data/bin/shopify
CHANGED
data/lib/shopify_cli/api.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "shopify_cli"
|
2
|
+
require "securerandom"
|
2
3
|
|
3
4
|
module ShopifyCLI
|
4
5
|
class API
|
@@ -54,6 +55,7 @@ module ShopifyCLI
|
|
54
55
|
# we delay this require so as to avoid a performance hit on starting the CLI
|
55
56
|
require "shopify_cli/http_request"
|
56
57
|
headers = default_headers.merge(headers)
|
58
|
+
ctx.debug("#{method} #{uri} with X-Request-Id: #{headers["X-Request-Id"]}")
|
57
59
|
response = if method == "POST"
|
58
60
|
HttpRequest.post(uri, body, headers)
|
59
61
|
elsif method == "PUT"
|
@@ -82,6 +84,7 @@ module ShopifyCLI
|
|
82
84
|
raise APIRequestUnexpectedError.new("#{response.code}\n#{response.body}", response: response)
|
83
85
|
end
|
84
86
|
rescue Errno::ETIMEDOUT, Timeout::Error
|
87
|
+
ctx.debug("timeout in #{method} #{uri} with X-Request-Id: #{headers["X-Request-Id"]}")
|
85
88
|
raise APIRequestTimeoutError.new("Timeout")
|
86
89
|
end.retry_after(APIRequestRetriableError, retries: 3) do |e|
|
87
90
|
sleep(1) if e.is_a?(APIRequestThrottledError)
|
@@ -109,6 +112,7 @@ module ShopifyCLI
|
|
109
112
|
"User-Agent" => "Shopify CLI; v=#{ShopifyCLI::VERSION}",
|
110
113
|
"Sec-CH-UA" => "Shopify CLI; v=#{ShopifyCLI::VERSION} sha=#{ShopifyCLI.sha}",
|
111
114
|
"Sec-CH-UA-PLATFORM" => ctx.os.to_s,
|
115
|
+
"X-Request-Id" => SecureRandom.uuid,
|
112
116
|
}.tap do |headers|
|
113
117
|
headers["X-Shopify-Cli-Employee"] = "1" if Shopifolk.acting_as_shopify_organization?
|
114
118
|
end.merge(auth_headers(token))
|
data/lib/shopify_cli/version.rb
CHANGED