svelte-on-rails 17.2.2 → 17.2.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.
- checksums.yaml +4 -4
- data/lib/generators/svelte_on_rails/install/install_generator.rb +33 -28
- 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: c3646c78da723067d4830cb5dd02799f60f10f318c4dc3653bde1b80a3583ba5
|
|
4
|
+
data.tar.gz: c73628ac8e9a70a4cfa71f75595dd93b0edd7605073b5536bdfc94c2f0764adc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fcaa45d6f41ec1d6947b96b0194e8b5a8ec08e6633b74d65ea0a15e58531c179a579b1b1962dba29977ba4600fe90a52be561688330c50f3ef6529429d216841
|
|
7
|
+
data.tar.gz: 82bf85e61916bd4cb37d2cf03487783a26f9b880b50d9beaaad1993cfe420bfa3292c5adb620a762a9b10c4107d748f99f2685af07e428ce36c21aeb9b05d166
|
|
@@ -143,34 +143,44 @@ module SvelteOnRails
|
|
|
143
143
|
|
|
144
144
|
# test install
|
|
145
145
|
|
|
146
|
+
dependencies_checked = false
|
|
146
147
|
failed_packages = []
|
|
147
|
-
puts "[Sandbox test] Running dependency checks in a isolated Sandbox within App-root/tmp"
|
|
148
148
|
set_keys = candidate_sets.map { |s| s[:key] }
|
|
149
149
|
if @package_set && !set_keys.include?(@package_set)
|
|
150
150
|
raise Thor::Error, "Invalid value for --package-set option: #{@package_set}, valid options are: #{set_keys.join(', ')}"
|
|
151
151
|
end
|
|
152
152
|
index = 0
|
|
153
|
+
unless @package_set && @installation_type == :force
|
|
154
|
+
puts "[Sandbox test] Running dependency checks in a isolated Sandbox within App-root/tmp"
|
|
155
|
+
end
|
|
153
156
|
passing_set = candidate_sets.find do |set_to_try|
|
|
154
157
|
title_suffix = (index == 0) ? ' (default)' : " (FALLBACK)"
|
|
155
158
|
index += 1
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
project_root: Rails.root.to_s,
|
|
160
|
-
sandboxes_root: @sandboxes_dir,
|
|
161
|
-
title: set_to_try[:title] + title_suffix
|
|
162
|
-
)
|
|
163
|
-
@tmpdirs.push(r[:tmpdir])
|
|
164
|
-
if r[:success] || @package_set && set_to_try[:key] == @package_set
|
|
159
|
+
if @package_set && set_to_try[:key] != @package_set
|
|
160
|
+
next
|
|
161
|
+
elsif @package_set && set_to_try[:key] == @package_set && @installation_type == :force
|
|
165
162
|
true
|
|
166
163
|
else
|
|
167
|
-
|
|
168
|
-
|
|
164
|
+
|
|
165
|
+
r = SvelteOnRails::Installer::NpmSandbox.dry_run(
|
|
166
|
+
set_to_try[:set],
|
|
167
|
+
project_root: Rails.root.to_s,
|
|
168
|
+
sandboxes_root: @sandboxes_dir,
|
|
169
|
+
title: set_to_try[:title] + title_suffix
|
|
170
|
+
)
|
|
171
|
+
@tmpdirs.push(r[:tmpdir])
|
|
172
|
+
if r[:success] || @package_set && set_to_try[:key] == @package_set
|
|
173
|
+
dependencies_checked = true
|
|
174
|
+
true
|
|
175
|
+
else
|
|
176
|
+
failed_packages.push(set_to_try)
|
|
177
|
+
false
|
|
178
|
+
end
|
|
169
179
|
end
|
|
170
180
|
end
|
|
171
181
|
|
|
172
182
|
if passing_set.present?
|
|
173
|
-
say "✓ Dependency check passed", :green
|
|
183
|
+
say "✓ Dependency check passed", :green if dependencies_checked
|
|
174
184
|
else
|
|
175
185
|
say '-' * 80
|
|
176
186
|
say "ERROR: Unable to fix dependency issues", :red
|
|
@@ -186,22 +196,17 @@ module SvelteOnRails
|
|
|
186
196
|
|
|
187
197
|
# prompt developer
|
|
188
198
|
|
|
189
|
-
if passing_set.
|
|
190
|
-
|
|
191
|
-
say "
|
|
199
|
+
say "Using Package-set: #{passing_set[:title]}", :yellow if passing_set.present?
|
|
200
|
+
if passing_set.any? && @installation_type != :force
|
|
201
|
+
say "Ready to install:", :yellow
|
|
192
202
|
loop do
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
exit(0)
|
|
201
|
-
elsif answer == "y" || answer == "yes"
|
|
202
|
-
break
|
|
203
|
-
end
|
|
204
|
-
else
|
|
203
|
+
say "Continue? (Y/n)", :yellow
|
|
204
|
+
input = STDIN.gets
|
|
205
|
+
answer = input.strip.downcase
|
|
206
|
+
if answer == "n" || answer == "no"
|
|
207
|
+
say "Installation aborted.", :red
|
|
208
|
+
exit(0)
|
|
209
|
+
elsif answer == "y" || answer == "yes"
|
|
205
210
|
break
|
|
206
211
|
end
|
|
207
212
|
end
|