sass-embedded 0.19.0 → 0.19.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/sass/extconf.rb +5 -3
- data/lib/sass/embedded/dispatcher.rb +5 -3
- data/lib/sass/embedded/host.rb +3 -3
- data/lib/sass/embedded/protofier.rb +15 -11
- data/lib/sass/embedded/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98e2d595f559611d4bf150ab826be0386123267999a77b52b37b29b780dacadc
|
4
|
+
data.tar.gz: 409876982853e88acef3ea3a0d9dde84c6d4ad12e63fccfa24236fb6de0d1911
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4275d81a3be35d78b111c8d34b04046e4390c5def447dd1d91cf9ea042ae9d31c87a7c05842666f83609565f69146fb8c5a6f617501d5e604251e70fbbf0121f
|
7
|
+
data.tar.gz: 0bcd2e6d4d45fe029ff751fcc0f884c7b31fb829cd9ed17a0e2b6ae5d7916f7013e6f4a5e61c4e5e2d06972a58e4514cb70b7eb5fa6ce129a398dd1ce125611c
|
data/ext/sass/extconf.rb
CHANGED
@@ -215,9 +215,11 @@ module Sass
|
|
215
215
|
def default_sass_embedded_protocol
|
216
216
|
repo = 'sass/embedded-protocol'
|
217
217
|
|
218
|
-
|
219
|
-
|
220
|
-
|
218
|
+
stdout, stderr, status = Open3.capture3(Compiler::PATH, '--version')
|
219
|
+
|
220
|
+
raise stderr unless status.success?
|
221
|
+
|
222
|
+
tag_name = JSON.parse(stdout)['protocolVersion']
|
221
223
|
|
222
224
|
"https://raw.githubusercontent.com/#{repo}/#{tag_name}/embedded_sass.proto"
|
223
225
|
end
|
@@ -33,7 +33,7 @@ module Sass
|
|
33
33
|
|
34
34
|
id = @id
|
35
35
|
@id = id.next
|
36
|
-
@observers
|
36
|
+
@observers[id] = observer
|
37
37
|
id
|
38
38
|
end
|
39
39
|
end
|
@@ -76,9 +76,11 @@ module Sass
|
|
76
76
|
half_close
|
77
77
|
@observers[message.id]&.send(outbound_message.message, message)
|
78
78
|
when :compile_response, :version_response
|
79
|
-
@observers[message.id]
|
79
|
+
@observers[message.id].send(outbound_message.message, message)
|
80
80
|
when :log_event, :canonicalize_request, :import_request, :file_import_request, :function_call_request
|
81
|
-
@observers[message.compilation_id]
|
81
|
+
Thread.new(@observers[message.compilation_id]) do |observer|
|
82
|
+
observer.send(outbound_message.message, message)
|
83
|
+
end
|
82
84
|
else
|
83
85
|
raise ArgumentError, "Unknown OutboundMessage.message #{message}"
|
84
86
|
end
|
data/lib/sass/embedded/host.rb
CHANGED
@@ -35,7 +35,7 @@ module Sass
|
|
35
35
|
logger:,
|
36
36
|
quiet_deps:,
|
37
37
|
verbose:)
|
38
|
-
|
38
|
+
await do
|
39
39
|
@function_registry = FunctionRegistry.new(functions, alert_color: alert_color)
|
40
40
|
@importer_registry = ImporterRegistry.new(importers, load_paths, alert_color: alert_color)
|
41
41
|
@logger_registry = LoggerRegistry.new(logger)
|
@@ -67,7 +67,7 @@ module Sass
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def version_request
|
70
|
-
|
70
|
+
await do
|
71
71
|
send_message EmbeddedProtocol::InboundMessage.new(
|
72
72
|
version_request: EmbeddedProtocol::InboundMessage::VersionRequest.new(
|
73
73
|
id: id
|
@@ -118,7 +118,7 @@ module Sass
|
|
118
118
|
|
119
119
|
private
|
120
120
|
|
121
|
-
def
|
121
|
+
def await
|
122
122
|
@mutex.synchronize do
|
123
123
|
@connection = @channel.connect(self)
|
124
124
|
@async = Async.new
|
@@ -9,20 +9,24 @@ module Sass
|
|
9
9
|
module_function
|
10
10
|
|
11
11
|
def from_proto_compile_response(compile_response)
|
12
|
-
|
12
|
+
result = compile_response.send(compile_response.result)
|
13
|
+
case compile_response.result
|
14
|
+
when :failure
|
13
15
|
raise CompileError.new(
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
from_proto_source_span(
|
16
|
+
result.message,
|
17
|
+
result.formatted,
|
18
|
+
result.stack_trace,
|
19
|
+
from_proto_source_span(result.span)
|
18
20
|
)
|
21
|
+
when :success
|
22
|
+
CompileResult.new(
|
23
|
+
result.css,
|
24
|
+
result.source_map,
|
25
|
+
result.loaded_urls
|
26
|
+
)
|
27
|
+
else
|
28
|
+
raise ArgumentError, "Unknown CompileResponse.result #{result}"
|
19
29
|
end
|
20
|
-
|
21
|
-
CompileResult.new(
|
22
|
-
compile_response.success.css,
|
23
|
-
compile_response.success.source_map,
|
24
|
-
compile_response.success.loaded_urls
|
25
|
-
)
|
26
30
|
end
|
27
31
|
|
28
32
|
def from_proto_source_span(source_span)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sass-embedded
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.19.
|
4
|
+
version: 0.19.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- なつき
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -163,8 +163,8 @@ homepage: https://github.com/ntkme/sass-embedded-host-ruby
|
|
163
163
|
licenses:
|
164
164
|
- MIT
|
165
165
|
metadata:
|
166
|
-
documentation_uri: https://www.rubydoc.info/gems/sass-embedded/0.19.
|
167
|
-
source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v0.19.
|
166
|
+
documentation_uri: https://www.rubydoc.info/gems/sass-embedded/0.19.1
|
167
|
+
source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v0.19.1
|
168
168
|
funding_uri: https://github.com/sponsors/ntkme
|
169
169
|
post_install_message:
|
170
170
|
rdoc_options: []
|