shopify-cli 2.32.1 → 2.33.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cedba2d3c1257478768278fcf18b239d18d49b56dd11ce9cb4eb60810f9bd46c
4
- data.tar.gz: 252212433092e2df2f821782a58b57f8864bac936d04cac6f51a74a1891b3e59
3
+ metadata.gz: ac3c8680848c4b1caae004aba8327a321aded59a73e9454130534726a16a5a4d
4
+ data.tar.gz: 46bc06119d1fce33ebef93562bcbe904c5938502d9394b8748000b0ff260671a
5
5
  SHA512:
6
- metadata.gz: c8d241e1d4353e2dd8e750fb81b47f936a9c35e7117e785ca50444acbf918956925a04657229b2afd84e8bad930d7bdd9cfe5cd0e67f6cf055f6899f91f27d0a
7
- data.tar.gz: b3eb6d62f7fbc3c566161a8a1c09ed5d7679eda82a81eb0622fe7cc7ef9af391677f8281795fbff40ddec5b63fc529381165de02a91103fc851e96b2baa84d7c
6
+ metadata.gz: 51da54fda07bd8d66d0aa4e8aedd54df04c23fc50fff79e520179f5e956f4eb940c961e933794f59187b92171fb9998393666dd58986219887a003f848341e78
7
+ data.tar.gz: 35a4a6bda609ff6775880f80e9b31171e9edbeef0bbc9745bd5b17b47c6e9d428e4b0a146f075642e229e0cc224e3202b9f5bfed170650b91b1fe7ebb5c30725
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.33.0 - 2022-12-19
6
+
7
+ ### Added
8
+ * [#2681](https://github.com/Shopify/shopify-cli/pull/2681): Enable Theme Access passwords for theme serve
9
+ * [#2701](https://github.com/Shopify/shopify-cli/pull/2701): Update theme-check to 1.12.1 (introduce intelligent code completion)
10
+
5
11
  ## Version 2.32.1 - 2022-12-05
6
12
 
7
13
  ### Fixed
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shopify-cli (2.32.1)
4
+ shopify-cli (2.33.0)
5
5
  bugsnag (~> 6.22)
6
6
  listen (~> 3.7.0)
7
- theme-check (~> 1.11.0)
7
+ theme-check (~> 1.12.1)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
@@ -101,14 +101,14 @@ GEM
101
101
  mocha (1.13.0)
102
102
  multi_test (0.1.2)
103
103
  multipart-post (2.1.1)
104
- nokogiri (1.13.9)
104
+ nokogiri (1.13.10)
105
105
  mini_portile2 (~> 2.8.0)
106
106
  racc (~> 1.4)
107
107
  octokit (4.22.0)
108
108
  faraday (>= 0.9)
109
109
  sawyer (~> 0.8.0, >= 0.5.3)
110
110
  parallel (1.21.0)
111
- parser (3.1.2.1)
111
+ parser (3.1.3.0)
112
112
  ast (~> 2.4.1)
113
113
  pry (0.13.1)
114
114
  coderay (~> 1.1)
@@ -117,7 +117,7 @@ GEM
117
117
  byebug (~> 11.0)
118
118
  pry (~> 0.13.0)
119
119
  public_suffix (4.0.6)
120
- racc (1.6.0)
120
+ racc (1.6.1)
121
121
  rack (2.2.3.1)
122
122
  rainbow (3.1.1)
123
123
  rake (13.0.6)
@@ -150,7 +150,7 @@ GEM
150
150
  faraday (> 0.8, < 2.0)
151
151
  sys-uname (1.2.2)
152
152
  ffi (~> 1.1)
153
- theme-check (1.11.0)
153
+ theme-check (1.12.1)
154
154
  liquid (>= 5.4.0)
155
155
  nokogiri (>= 1.12)
156
156
  parser (~> 3)
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require "stringio"
3
4
  require "time"
4
5
  require "cgi"
@@ -20,6 +21,7 @@ module ShopifyCLI
20
21
  "transfer-encoding",
21
22
  "upgrade",
22
23
  "content-security-policy",
24
+ "content-length",
23
25
  ]
24
26
 
25
27
  class Proxy
@@ -54,14 +56,14 @@ module ShopifyCLI
54
56
  "POST", env["PATH_INFO"],
55
57
  headers: headers,
56
58
  query: query,
57
- form_data: form_data.merge(replace_templates).merge(_method: env["REQUEST_METHOD"]),
59
+ form_data: form_data.merge(replace_templates).merge(_method: env["REQUEST_METHOD"])
58
60
  )
59
61
  else
60
62
  request(
61
63
  env["REQUEST_METHOD"], env["PATH_INFO"],
62
64
  headers: headers,
63
65
  query: query,
64
- body_stream: (env["rack.input"] if has_body?(headers)),
66
+ body_stream: (env["rack.input"] if has_body?(headers))
65
67
  )
66
68
  end
67
69
 
@@ -97,7 +99,7 @@ module ShopifyCLI
97
99
 
98
100
  def bearer_token
99
101
  Environment.storefront_renderer_auth_token ||
100
- ShopifyCLI::DB.get(:storefront_renderer_production_exchange_token) ||
102
+ ShopifyCLI::DB.get(:storefront_renderer_production_exchange_token) ||
101
103
  raise(KeyError, "storefront_renderer_production_exchange_token missing")
102
104
  end
103
105
 
@@ -152,11 +154,13 @@ module ShopifyCLI
152
154
 
153
155
  def secure_session_id_expired?
154
156
  return true unless @secure_session_id && @last_session_cookie_refresh
157
+
155
158
  Time.now - @last_session_cookie_refresh >= SESSION_COOKIE_MAX_AGE
156
159
  end
157
160
 
158
161
  def extract_secure_session_id_from_response_headers(headers)
159
162
  return unless headers["set-cookie"]
163
+
160
164
  headers["set-cookie"][SESSION_COOKIE_REGEXP, 1]
161
165
  end
162
166
 
@@ -173,7 +177,7 @@ module ShopifyCLI
173
177
 
174
178
  def get_response_headers(response, env)
175
179
  response_headers = normalize_headers(
176
- response.respond_to?(:headers) ? response.headers : response.to_hash
180
+ response.respond_to?(:headers) ? response.headers : response.to_hash,
177
181
  )
178
182
  # According to https://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-14#section-7.1.3.1Acc
179
183
  # should remove hop-by-hop header fields
@@ -196,6 +200,16 @@ module ShopifyCLI
196
200
 
197
201
  def request(method, path, headers: nil, query: [], form_data: nil, body_stream: nil)
198
202
  uri = URI.join("https://#{shop}", path)
203
+
204
+ if Environment.theme_access_password?
205
+ headers = headers ? headers.slice("ACCEPT", "CONTENT-TYPE", "CONTENT-LENGTH", "Cookie") : {}
206
+ headers.merge!({
207
+ "X-Shopify-Access-Token" => Environment.admin_auth_token,
208
+ "X-Shopify-Shop" => shop,
209
+ })
210
+ uri = URI.join("https://#{ThemeAccessAPI::BASE_URL}", "cli/sfr#{path}")
211
+ end
212
+
199
213
  uri.query = URI.encode_www_form(query + [[:_fd, 0], [:pb, 0]])
200
214
 
201
215
  @ctx.debug("Proxying #{method} #{uri}")
@@ -1,3 +1,3 @@
1
1
  module ShopifyCLI
2
- VERSION = "2.32.1"
2
+ VERSION = "2.33.0"
3
3
  end
data/shopify-cli.gemspec CHANGED
@@ -48,7 +48,7 @@ Gem::Specification.new do |spec|
48
48
  # Whereas if we were to have "~> 1.9", that version would still be satisfied and thus not upgraded.
49
49
  # Both shopify-cli and theme-check gems are owned and developed by Shopify.
50
50
  # These gems are currently being actively developed and it's easiest to update them together.
51
- spec.add_dependency("theme-check", "~> 1.11.0")
51
+ spec.add_dependency("theme-check", "~> 1.12.1")
52
52
 
53
53
  spec.extensions = ["ext/shopify-extensions/extconf.rb"]
54
54
  end
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.32.1
4
+ version: 2.33.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-12-05 00:00:00.000000000 Z
11
+ date: 2022-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -92,14 +92,14 @@ dependencies:
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: 1.11.0
95
+ version: 1.12.1
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: 1.11.0
102
+ version: 1.12.1
103
103
  description: |
104
104
  Shopify CLI helps you build Shopify apps faster. It quickly scaffolds Node.js
105
105
  and Ruby on Rails embedded apps. It also automates many common tasks in the