@shopify/cli-kit 3.59.1 → 3.59.3
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.
- package/assets/cli-ruby/lib/shopify_cli/theme/dev_server/proxy.rb +10 -5
- package/assets/cli-ruby/lib/shopify_cli/theme/repl/auth_middleware.rb +4 -1
- package/dist/public/common/version.d.ts +1 -1
- package/dist/public/common/version.js +1 -1
- package/dist/public/common/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -58,7 +58,8 @@ module ShopifyCLI
|
|
|
58
58
|
query = URI.decode_www_form(env["QUERY_STRING"])
|
|
59
59
|
replace_templates = build_replacement_param(env)
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
response = set_preview_theme_id(env, query, headers)
|
|
62
|
+
return serve_response(response, env) if response
|
|
62
63
|
|
|
63
64
|
response = if replace_templates.any?
|
|
64
65
|
# Pass to SFR the recently modified templates in `replace_templates` or
|
|
@@ -87,9 +88,7 @@ module ShopifyCLI
|
|
|
87
88
|
@core_endpoints << env["PATH_INFO"]
|
|
88
89
|
end
|
|
89
90
|
|
|
90
|
-
|
|
91
|
-
body = [body] unless body.respond_to?(:each)
|
|
92
|
-
[response.code, headers, body]
|
|
91
|
+
serve_response(response, env, headers)
|
|
93
92
|
end
|
|
94
93
|
|
|
95
94
|
def secure_session_id
|
|
@@ -105,7 +104,13 @@ module ShopifyCLI
|
|
|
105
104
|
|
|
106
105
|
private
|
|
107
106
|
|
|
108
|
-
def
|
|
107
|
+
def serve_response(response, env, headers = get_response_headers(response, env))
|
|
108
|
+
body = patch_body(env, response.body)
|
|
109
|
+
body = [body] unless body.respond_to?(:each)
|
|
110
|
+
[response.code, headers, body]
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def set_preview_theme_id(env, query, headers)
|
|
109
114
|
if env["PATH_INFO"].start_with?("/password")
|
|
110
115
|
@cache_cleaned = false
|
|
111
116
|
return
|
|
@@ -17,7 +17,7 @@ module ShopifyCLI
|
|
|
17
17
|
@env = env
|
|
18
18
|
@env["PATH_INFO"] = PASSWORD_PAGE_PATH if redirect_to_password?(@env)
|
|
19
19
|
|
|
20
|
-
return @app.call(@env) if password_page?(@env)
|
|
20
|
+
return @app.call(@env) if password_page?(@env) || (storefront_session.nil? || secure_session.nil?)
|
|
21
21
|
|
|
22
22
|
authenticate!
|
|
23
23
|
|
|
@@ -26,6 +26,9 @@ module ShopifyCLI
|
|
|
26
26
|
# from shutting down the server.
|
|
27
27
|
shutdown if index_page?(@env)
|
|
28
28
|
|
|
29
|
+
# Set preview_theme_id into the session.
|
|
30
|
+
@app.call(@env)
|
|
31
|
+
|
|
29
32
|
[
|
|
30
33
|
200,
|
|
31
34
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CLI_KIT_VERSION = "3.59.
|
|
1
|
+
export declare const CLI_KIT_VERSION = "3.59.3";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const CLI_KIT_VERSION = '3.59.
|
|
1
|
+
export const CLI_KIT_VERSION = '3.59.3';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/public/common/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAA","sourcesContent":["export const CLI_KIT_VERSION = '3.59.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/public/common/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAA","sourcesContent":["export const CLI_KIT_VERSION = '3.59.3'\n"]}
|