isomorfeus-preact 10.6.52 → 10.6.55

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: 7fd9159ca39fe3e13ef3c35aff396b3eeba0720a4c5793e39637a510d47134eb
4
- data.tar.gz: 3c791aacb8dda59322f8d800023dfbca44d7cf9b3f95120a4faa7c9b3fe7adf7
3
+ metadata.gz: 24e36cc4a4f88aae6af0204b00a679c9aaf8a545e9c61bc62a1b2454846cbfab
4
+ data.tar.gz: cee4d9e10517e8085ae10ae366f4d8ad8731f7e0e6b104897212563aef523a4e
5
5
  SHA512:
6
- metadata.gz: 117ea771f4050e741cd447a98fb9bd64d5ec960fa087c08d23c69e39ba6a45969168f37cf606042ecb5c0b9e48fc16d0dfb3aff6f6a5fedfdee40ac538aa9fa7
7
- data.tar.gz: eb5ee13803c4496346a8015c7e80e6d54ae3f59fe614530b71580f2e9599301478ffe0444507b28edba41af177a32e7746fe2cdf19d648d9ded685469244f00d
6
+ metadata.gz: 5c66762e3598fa332730f28a7c79bb90c3834e475bb4d82ccdc94fb121f0bcac2ab0f80f6555081ca801c92512b12399f1ad43d61c4fb9f36ac58bd518df5b6d
7
+ data.tar.gz: fcab5d3afe8f4b287ccce9d6e4307adcd4a0a74a88fcd7278bf23d9e90549490abca37dc40633839a11e7ba2e816dc77ef98c47229f0d6db764e6bc2da0d2f22
@@ -3,10 +3,22 @@ module Isomorfeus
3
3
  %x{
4
4
  self.first_pass = function(component_name, props) {
5
5
  if (global.HasTransport) {
6
- let $$1;
7
- global.Opal.send(global.Opal.Isomorfeus.Transport.$promise_connect(global.IsomorfeusSessionId), 'then', [], ($$1 = function(){
8
- self.async_render_pass(component_name, props);
9
- }, $$1.$$s = this, $$1.$$arity = 0, $$1))
6
+ #{
7
+ Isomorfeus.set_current_user(nil)
8
+ Isomorfeus::Transport.promise_connect(`global.IsomorfeusSessionId`)
9
+ .then { `self.async_render_pass(component_name, props)` }
10
+ .fail do
11
+ %x{
12
+ global.ConnectRetries--;
13
+ if (global.ConnectRetries > 0) {
14
+ self.first_pass(component_name, props);
15
+ } else {
16
+ global.Exception = new Error('Transport within SSR unable to connect!');
17
+ self.finish_render();
18
+ }
19
+ }
20
+ end
21
+ }
10
22
  } else {
11
23
  self.async_render_pass(component_name, props);
12
24
  };
@@ -73,6 +85,7 @@ module Isomorfeus
73
85
 
74
86
  self.mount_component = function(session_id, env, locale, location, transport_ws_url, component_name, props, max_passes) {
75
87
  const opi = global.Opal.Isomorfeus;
88
+ global.ConnectRetries = 5;
76
89
  global.RenderPass = 0;
77
90
  global.Rendering = true;
78
91
  global.MaxPasses = max_passes;
@@ -27,7 +27,7 @@ module LucidComponent::Api
27
27
  if @_preload_promise && @_preload_promise.resolved?
28
28
  instance_exec(&`base.render_block`)
29
29
  else
30
- instance_exec(&block)
30
+ instance_exec(@_preload_promise, &block)
31
31
  end
32
32
  end
33
33
  `base.while_loading_block = wl_block`
@@ -1,3 +1,3 @@
1
1
  module Preact
2
- VERSION = '10.6.52'
2
+ VERSION = '10.6.55'
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.52
4
+ version: 10.6.55
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-25 00:00:00.000000000 Z
11
+ date: 2022-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby