isomorfeus-preact 10.6.60 → 10.6.61
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 74033de35eac3dabf609fe1c60e578dcdd3a83d780ad205d86b92cf6a9da9490
|
|
4
|
+
data.tar.gz: 6fed82d20b889ce677c08b9bf08fd5865183bbbddc281e0af491c10a503cf32d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 255663e27a5492836301cbec31e3ac7d368085c12eee35348023020437fc5c8558a0d63af300d426adbc9b0d95fab0c4c5fb0b8a534024689185381edded4475
|
|
7
|
+
data.tar.gz: 5f738ab80216519cd8396fae232ae22cac6331de8dd741abd4a20a0aaafaab84cc656fa3c6d6500a2116bcac224692daa04ae46af88a2f50359014cde4cad8b2
|
|
@@ -7,13 +7,14 @@ module Isomorfeus
|
|
|
7
7
|
Isomorfeus.set_current_user(nil)
|
|
8
8
|
Isomorfeus::Transport.promise_connect(`global.IsomorfeusSessionId`)
|
|
9
9
|
.then { `self.async_render_pass(component_name, props)` }
|
|
10
|
-
.fail do
|
|
10
|
+
.fail do |error|
|
|
11
|
+
message = "Transport within SSR unable to connect: #{error}\n#{error&.backtrace&.join("\n")}!"
|
|
11
12
|
%x{
|
|
12
13
|
global.ConnectRetries--;
|
|
13
14
|
if (global.ConnectRetries > 0) {
|
|
14
15
|
self.first_pass(component_name, props);
|
|
15
16
|
} else {
|
|
16
|
-
global.Exception = new Error(
|
|
17
|
+
global.Exception = new Error(#{message});
|
|
17
18
|
self.finish_render();
|
|
18
19
|
}
|
|
19
20
|
}
|
|
@@ -83,7 +84,7 @@ module Isomorfeus
|
|
|
83
84
|
return [global.RenderedTree, application_state, ssr_styles, opi['$ssr_response_status'](), global.RenderPass, self.get_exception()];
|
|
84
85
|
}
|
|
85
86
|
|
|
86
|
-
self.mount_component = function(session_id, env, locale,
|
|
87
|
+
self.mount_component = function(session_id, env, locale, transport_ws_url, component_name, props, max_passes) {
|
|
87
88
|
const opi = global.Opal.Isomorfeus;
|
|
88
89
|
global.ConnectRetries = 5;
|
|
89
90
|
global.RenderPass = 0;
|
|
@@ -98,14 +99,14 @@ module Isomorfeus
|
|
|
98
99
|
if (typeof opi["$current_locale="] === 'function') { opi["$current_locale="](locale); }
|
|
99
100
|
opi['$force_init!']();
|
|
100
101
|
opi['$ssr_response_status='](200);
|
|
101
|
-
opi.TopLevel['$ssr_route_path='](location);
|
|
102
102
|
|
|
103
103
|
self.first_pass(component_name, props);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
def self.disconnect_transport
|
|
108
|
-
Isomorfeus::Transport::RequestAgent.agents.
|
|
108
|
+
while Isomorfeus::Transport::RequestAgent.agents.size > 0
|
|
109
|
+
agent_id, agent = Isomorfeus::Transport::RequestAgent.agents.first
|
|
109
110
|
agent.promise.reject() unless agent.promise.realized?
|
|
110
111
|
Isomorfeus::Transport::RequestAgent.del!(agent_id)
|
|
111
112
|
end
|
|
@@ -22,13 +22,9 @@ module Isomorfeus
|
|
|
22
22
|
@ssr_styles = nil
|
|
23
23
|
render_result = "<div data-iso-env=\"#{Isomorfeus.env}\" data-iso-root=\"#{component_name}\" data-iso-props='#{Oj.dump(props, mode: :strict)}'"
|
|
24
24
|
if !skip_ssr && (Isomorfeus.server_side_rendering || use_ssr)
|
|
25
|
-
thread_id_asset = "#{Thread.current.object_id}
|
|
25
|
+
thread_id_asset = "#{Thread.current.object_id}|#{asset_key}"
|
|
26
26
|
begin
|
|
27
|
-
if Isomorfeus.development?
|
|
28
|
-
init_speednode_context(asset_key, thread_id_asset)
|
|
29
|
-
elsif !Isomorfeus.ssr_contexts.key?(thread_id_asset)
|
|
30
|
-
init_speednode_context(asset_key, thread_id_asset)
|
|
31
|
-
end
|
|
27
|
+
init_speednode_context(asset_key, thread_id_asset) if Isomorfeus.development? || !Isomorfeus.ssr_contexts.key?(thread_id_asset)
|
|
32
28
|
rescue Exception => e
|
|
33
29
|
Isomorfeus.raise_error(message: "Server Side Rendering: Failed creating context for #{asset_key}. Error: #{e.message}", stack: e.backtrace)
|
|
34
30
|
end
|
|
@@ -44,7 +40,7 @@ module Isomorfeus
|
|
|
44
40
|
# build javascript for rendering first pass
|
|
45
41
|
# it will initialize buffers to guard against leaks, maybe caused by previous exceptions
|
|
46
42
|
javascript = <<~JAVASCRIPT
|
|
47
|
-
return Opal.Isomorfeus.SSR.mount_component('#{Thread.current[:isomorfeus_session_id]}', '#{Isomorfeus.env}', '#{props[:locale]}', '#{
|
|
43
|
+
return Opal.Isomorfeus.SSR.mount_component('#{Thread.current[:isomorfeus_session_id]}', '#{Isomorfeus.env}', '#{props[:locale]}', '#{transport_ws_url}', '#{component_name}', #{Oj.dump(props, mode: :strict)}, #{max_passes})
|
|
48
44
|
JAVASCRIPT
|
|
49
45
|
|
|
50
46
|
begin
|
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.61
|
|
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-03-
|
|
11
|
+
date: 2022-03-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: concurrent-ruby
|
|
@@ -114,14 +114,14 @@ dependencies:
|
|
|
114
114
|
requirements:
|
|
115
115
|
- - "~>"
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: 0.5.
|
|
117
|
+
version: 0.5.3
|
|
118
118
|
type: :runtime
|
|
119
119
|
prerelease: false
|
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
121
|
requirements:
|
|
122
122
|
- - "~>"
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: 0.5.
|
|
124
|
+
version: 0.5.3
|
|
125
125
|
- !ruby/object:Gem::Dependency
|
|
126
126
|
name: dalli
|
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -170,14 +170,14 @@ dependencies:
|
|
|
170
170
|
requirements:
|
|
171
171
|
- - "~>"
|
|
172
172
|
- !ruby/object:Gem::Version
|
|
173
|
-
version: 0.6.
|
|
173
|
+
version: 0.6.6
|
|
174
174
|
type: :development
|
|
175
175
|
prerelease: false
|
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
|
177
177
|
requirements:
|
|
178
178
|
- - "~>"
|
|
179
179
|
- !ruby/object:Gem::Version
|
|
180
|
-
version: 0.6.
|
|
180
|
+
version: 0.6.6
|
|
181
181
|
- !ruby/object:Gem::Dependency
|
|
182
182
|
name: rake
|
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|