isomorfeus-preact 10.6.43 → 10.6.44

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f1d8efb23afe0ce1b5f8b40c8d65a7bacd835b1cc43e3cd7edb98895c1afa53
4
- data.tar.gz: fb60ce2b755c96fdebb0bb3c8c044fac84a265e1a1d1cfda2ae13da2aa1a8a7e
3
+ metadata.gz: f82e19631cd8c955b035dec4b355db1f787bb2e16f11e34fd23b4aedc0e68229
4
+ data.tar.gz: 58db551e7d0d0c8254e506762833ac6fdf303335a7db5aeef55a091e92876c4e
5
5
  SHA512:
6
- metadata.gz: 829aefa51447b9b574a3b0aec0ca0a3d228221b8ba778e042e0c254580b7026513426a09d5e47b6e52bafb1894ed6d0cdc2a575e3ec362063612a05d3ff3ae23
7
- data.tar.gz: 434e1e4abd520a32a24e71b0df7822fbdc53b57417266494b4417056aa49fd3a4c799acd9c2aee349fe7ffb553a35ad808906149c20b89d4108ff1369b282459
6
+ metadata.gz: 7adb8071b41c381fcbc3ee4aa9f89e90ed1749c8fc518f7b35868c3de6291009465a7c09f745cb18affe7303a23fb3873b4c7e9551fcb3b1a8401c812ab6f7e9
7
+ data.tar.gz: ff1f52873da1efdbbbd9d6387d05f3683d3d99aea8ad00246e6bc803ea96862023c9ef2ebd879c165d5d326ad3efe707362b62dcc0b651a5581897df6ef4b643
@@ -27,7 +27,12 @@ module Isomorfeus
27
27
  begin
28
28
  init_speednode_context(asset_key, thread_id_asset)
29
29
  rescue Exception => e
30
- Isomorfeus.raise_error(message: "Server Side Rendering: Failed creating context for #{asset_key}. Error: #{e.message}", stack: e.backtrace)
30
+ if e.message.include?('@hash[:js][:js][:raw]') # asset bundling did not yet finish
31
+ sleep 2
32
+ return mount_component(component_name, props, asset_key, skip_ssr: skip_ssr, use_ssr: use_ssr, max_passes: max_passes)
33
+ else
34
+ Isomorfeus.raise_error(message: "Server Side Rendering: Failed creating context for #{asset_key}. Error: #{e.message}", stack: e.backtrace)
35
+ end
31
36
  end
32
37
  else
33
38
  unless Isomorfeus.ssr_contexts.key?(thread_id_asset)
@@ -37,8 +42,7 @@ module Isomorfeus
37
42
 
38
43
  ctx = Isomorfeus.ssr_contexts[thread_id_asset]
39
44
  pass = 0
40
- # if location_host and scheme are given and if Transport is loaded, connect and then render,
41
- # otherwise do not render because only one pass is required
45
+ # if location_host and scheme are given and if Transport is loaded, connect and then render
42
46
  ws_scheme = props[:location_scheme] == 'https:' ? 'wss:' : 'ws:'
43
47
  location_host = props[:location_host] ? props[:location_host] : 'localhost'
44
48
  api_ws_path = Isomorfeus.respond_to?(:api_websocket_path) ? Isomorfeus.api_websocket_path : ''
@@ -110,11 +114,11 @@ module Isomorfeus
110
114
  Isomorfeus.raise_error(message: "Server Side Rendering: #{exception['message']}", stack: exception['stack']) if exception
111
115
  if need_further_pass && script_key
112
116
  break if (Time.now - start_time) > 5
113
- need_further_pass = ctx.eval_script(key: script_key)
114
- while need_further_pass
115
- break if (Time.now - start_time) > 4
116
- sleep 0.01
117
- need_further_pass = ctx.eval_script(key: script_key)
117
+ still_busy = ctx.eval_script(key: script_key)
118
+ while still_busy
119
+ break if (Time.now - start_time) > 5
120
+ sleep 0.005
121
+ still_busy = ctx.eval_script(key: script_key)
118
122
  end
119
123
  break if pass >= max_passes
120
124
  else
@@ -72,8 +72,8 @@ module Isomorfeus
72
72
  }
73
73
 
74
74
  self.still_busy = function(){
75
- let nfp = global.Opal.Isomorfeus.Transport["$busy?"]() || global.Opal.Isomorfeus.store["$recently_dispatched?"]();
76
- return (nfp == global.Opal.nil) ? false : nfp;
75
+ if (global.Opal.Isomorfeus.Transport["$busy?"]()) { return true; }
76
+ return self.store_busy();
77
77
  }
78
78
 
79
79
  self.store_busy = function() {
@@ -1,3 +1,3 @@
1
1
  module Preact
2
- VERSION = '10.6.43'
2
+ VERSION = '10.6.44'
3
3
  end
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.43
4
+ version: 10.6.44
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-20 00:00:00.000000000 Z
11
+ date: 2022-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby