@shopify/cli-kit 3.63.1 → 3.63.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.
|
@@ -76,7 +76,8 @@ module ShopifyCLI
|
|
|
76
76
|
|
|
77
77
|
def checksum
|
|
78
78
|
content = read
|
|
79
|
-
|
|
79
|
+
|
|
80
|
+
if mime_type.json? && !settings_schema?
|
|
80
81
|
# Normalize JSON to match backend
|
|
81
82
|
begin
|
|
82
83
|
content = normalize_json(content)
|
|
@@ -84,6 +85,7 @@ module ShopifyCLI
|
|
|
84
85
|
# Fallback to using the raw content
|
|
85
86
|
end
|
|
86
87
|
end
|
|
88
|
+
|
|
87
89
|
Digest::MD5.hexdigest(content)
|
|
88
90
|
end
|
|
89
91
|
|
|
@@ -111,41 +113,17 @@ module ShopifyCLI
|
|
|
111
113
|
|
|
112
114
|
private
|
|
113
115
|
|
|
114
|
-
def
|
|
115
|
-
|
|
116
|
+
def settings_schema?
|
|
117
|
+
relative_path.end_with?("config/settings_schema.json")
|
|
118
|
+
end
|
|
116
119
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
end
|
|
120
|
+
def normalize_json(content)
|
|
121
|
+
normalized = JSON.generate(JSON.parse(content))
|
|
120
122
|
|
|
121
|
-
normalized = JSON.generate(parsed)
|
|
122
123
|
# Backend escapes forward slashes
|
|
123
124
|
normalized.gsub!(/\//, "\\/")
|
|
124
125
|
normalized
|
|
125
126
|
end
|
|
126
|
-
|
|
127
|
-
class JsonTemplateNormalizer
|
|
128
|
-
def visit_document(value)
|
|
129
|
-
visit_hash(value["sections"])
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
def visit_hash(hash)
|
|
133
|
-
return unless hash.is_a?(Hash)
|
|
134
|
-
hash.each do |_, value|
|
|
135
|
-
visit_value(value)
|
|
136
|
-
end
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
def visit_value(value)
|
|
140
|
-
return unless value.is_a?(Hash)
|
|
141
|
-
|
|
142
|
-
# Reinsert settings to force the same ordering as in the backend
|
|
143
|
-
settings = value.delete("settings") || {}
|
|
144
|
-
value["settings"] = settings
|
|
145
|
-
|
|
146
|
-
visit_hash(value["blocks"])
|
|
147
|
-
end
|
|
148
|
-
end
|
|
149
127
|
end
|
|
150
128
|
end
|
|
151
129
|
end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CLI_KIT_VERSION = "3.63.
|
|
1
|
+
export declare const CLI_KIT_VERSION = "3.63.2";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const CLI_KIT_VERSION = '3.63.
|
|
1
|
+
export const CLI_KIT_VERSION = '3.63.2';
|
|
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.63.
|
|
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.63.2'\n"]}
|