isomorfeus-preact 10.6.24 → 10.6.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isomorfeus/preact_view_helper.rb +4 -5
- data/lib/preact/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5297a6babb3f48a4cebfe2a957fdfcb8b3e3e7de5a928956e0b93f7d3d2741c8
|
4
|
+
data.tar.gz: a2af099fbf9f129b1fb6054249c99b6387b79ad4ea10493f9b481672afdc8ed2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4098d558db9b42dc5c35ae1602c83829a80ae64e986fb9f843af1321cec415b314acee4ac292b3c891628b4fc7b1b8628605561a7858af5d5e18d8a6c0d2ad3
|
7
|
+
data.tar.gz: c726635dc08b8e506551e3e28ada187bd1327bbe30bad51f4095b56e242b412db83d0028c4d33a9608f958986b04d4b8ad090ebff40862d1776db01beb261cc7
|
@@ -4,19 +4,19 @@ module Isomorfeus
|
|
4
4
|
base.include Isomorfeus::AssetManager::ViewHelper
|
5
5
|
end
|
6
6
|
|
7
|
-
def cached_mount_component(component_name, props = {}, asset_key = 'ssr.js')
|
7
|
+
def cached_mount_component(component_name, props = {}, asset_key = 'ssr.js', skip_ssr: false, use_ssr: false, max_passes: 4)
|
8
8
|
key = "#{component_name}#{props}#{asset}"
|
9
9
|
if Isomorfeus.production?
|
10
10
|
render_result, @ssr_response_status, @ssr_styles = component_cache.fetch(key)
|
11
11
|
return render_result if render_result
|
12
12
|
end
|
13
|
-
render_result = mount_component(component_name, props, asset_key)
|
13
|
+
render_result = mount_component(component_name, props, asset_key, skip_ssr: skip_ssr, use_ssr: use_ssr, max_passes: max_passes)
|
14
14
|
status = ssr_response_status
|
15
15
|
component_cache.store(key, render_result, status, ssr_styles) if status >= 200 && status < 300
|
16
16
|
render_result
|
17
17
|
end
|
18
18
|
|
19
|
-
def mount_component(component_name, props = {}, asset_key = 'ssr.js', skip_ssr: false, use_ssr: false)
|
19
|
+
def mount_component(component_name, props = {}, asset_key = 'ssr.js', skip_ssr: false, use_ssr: false, max_passes: 4)
|
20
20
|
@ssr_response_status = nil
|
21
21
|
@ssr_styles = nil
|
22
22
|
thread_id_asset = "#{Thread.current.object_id}#{asset_key}"
|
@@ -137,7 +137,6 @@ module Isomorfeus
|
|
137
137
|
JAVASCRIPT
|
138
138
|
# execute further render passes
|
139
139
|
rendered_tree, application_state, @ssr_styles, @ssr_response_status, transport_busy, exception = Isomorfeus.ssr_contexts[thread_id_asset].exec(javascript)
|
140
|
-
break_while = false
|
141
140
|
start_time = Time.now
|
142
141
|
while transport_busy
|
143
142
|
break if (Time.now - start_time) > 5
|
@@ -149,7 +148,7 @@ module Isomorfeus
|
|
149
148
|
# execute third render pass
|
150
149
|
pass += 1
|
151
150
|
rendered_tree, application_state, @ssr_styles, @ssr_response_status, transport_busy, exception = Isomorfeus.ssr_contexts[thread_id_asset].exec(javascript)
|
152
|
-
break if
|
151
|
+
break if pass > max_passes
|
153
152
|
end
|
154
153
|
javascript = <<~JAVASCRIPT
|
155
154
|
if (typeof global.Opal.Isomorfeus.Transport !== 'undefined') { global.Opal.Isomorfeus.Transport.$disconnect(); }
|
data/lib/preact/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-preact
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.6.
|
4
|
+
version: 10.6.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|