svelte-on-rails 20.0.1 → 20.0.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.
- checksums.yaml +4 -4
- data/lib/svelte_on_rails/lib/utils.rb +15 -0
- data/lib/svelte_on_rails/railtie.rb +2 -0
- data/lib/svelte_on_rails/ssr_server.rb +1 -16
- 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: b423387b7a148b3efeba62236b66c3250234b3e040e7fafe235dfc69aa59962c
|
|
4
|
+
data.tar.gz: 55902b952ffd2ca4face947ab265a0c898f68153486665b9acf43e7369615856
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eed6dd1e49f462219ae3367af041f3aecf8ff0e588583d6e1179d7c429691e4638b6e0e2971be8cae0872fa8ba56de869e0501e6ab0d0479b0269f90542fe263
|
|
7
|
+
data.tar.gz: e6520c0801315c9bd4bc8453ea37a5b2417f583791a9eb7e0b6aaa609fe3aed5d30d45b2b9ec68d7e6438f5dfd680734ada81e7e3e88d7f0f660bcdcdac18a24
|
|
@@ -152,6 +152,21 @@ module SvelteOnRails
|
|
|
152
152
|
|
|
153
153
|
trace[0..last_match_index]
|
|
154
154
|
end
|
|
155
|
+
|
|
156
|
+
def self.secure_debug_log(line)
|
|
157
|
+
base = Rails.root.join('tmp')
|
|
158
|
+
|
|
159
|
+
FileUtils.mkdir_p(base) unless File.directory?(base)
|
|
160
|
+
path = File.join(base.to_s, 'sor.log')
|
|
161
|
+
|
|
162
|
+
File.open(path, 'a') do |f|
|
|
163
|
+
f.sync = true
|
|
164
|
+
f.puts("[#{Time.now.utc.iso8601(3)}] [pid=#{Process.pid}] #{line}")
|
|
165
|
+
end
|
|
166
|
+
rescue => e
|
|
167
|
+
# Last resort: write the failure itself to stderr; never raise.
|
|
168
|
+
warn "[SOR] sor_debug_log failed: #{e.class}: #{e.message}"
|
|
169
|
+
end
|
|
155
170
|
end
|
|
156
171
|
end
|
|
157
172
|
end
|
|
@@ -12,7 +12,9 @@ module SvelteOnRails
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
initializer "svelte-on-rails.initialize_ssr_client" do
|
|
15
|
+
SvelteOnRails::Lib::Utils.secure_debug_log("calling Initializing SSR client")
|
|
15
16
|
SvelteOnRails::SsrServer.instance
|
|
17
|
+
SvelteOnRails::Lib::Utils.secure_debug_log("Initializing SSR client finished")
|
|
16
18
|
end
|
|
17
19
|
|
|
18
20
|
initializer 'svelte_on_rails.active_record_extensions' do
|
|
@@ -312,22 +312,7 @@ module SvelteOnRails
|
|
|
312
312
|
puts line
|
|
313
313
|
$stdout.flush
|
|
314
314
|
|
|
315
|
-
|
|
316
|
-
end
|
|
317
|
-
|
|
318
|
-
def sor_debug_log(line)
|
|
319
|
-
base = Rails.root.join('tmp')
|
|
320
|
-
|
|
321
|
-
FileUtils.mkdir_p(base) unless File.directory?(base)
|
|
322
|
-
path = File.join(base.to_s, 'sor.log')
|
|
323
|
-
|
|
324
|
-
File.open(path, 'a') do |f|
|
|
325
|
-
f.sync = true
|
|
326
|
-
f.puts("[#{Time.now.utc.iso8601(3)}] [pid=#{Process.pid}] #{line}")
|
|
327
|
-
end
|
|
328
|
-
rescue => e
|
|
329
|
-
# Last resort: write the failure itself to stderr; never raise.
|
|
330
|
-
warn "[SOR] sor_debug_log failed: #{e.class}: #{e.message}"
|
|
315
|
+
SvelteOnRails::Lib::Utils.secure_debug_log(line)
|
|
331
316
|
end
|
|
332
317
|
|
|
333
318
|
def stop_server_timeout!(start_time, timeout: 2000)
|