sass-embedded 1.69.5-arm-linux-musleabihf → 1.69.7-arm-linux-musleabihf
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 +4 -4
- data/README.md +1 -1
- data/exe/sass +2 -2
- data/ext/sass/cli.rb +2 -2
- data/ext/sass/dart-sass/src/LICENSE +32 -0
- data/ext/sass/dart-sass/src/dart +0 -0
- data/ext/sass/dart-sass/src/sass.snapshot +0 -0
- data/ext/sass/embedded_sass_pb.rb +1 -1
- data/lib/sass/calculation_value/calculation_operation.rb +2 -5
- data/lib/sass/calculation_value.rb +10 -4
- data/lib/sass/compiler/connection.rb +92 -0
- data/lib/sass/{embedded → compiler}/dispatcher.rb +32 -11
- data/lib/sass/compiler/dispatcher_manager.rb +44 -0
- data/lib/sass/{embedded → compiler}/host/function_registry.rb +3 -3
- data/lib/sass/{embedded → compiler}/host/importer_registry.rb +4 -4
- data/lib/sass/{embedded → compiler}/host/logger_registry.rb +1 -1
- data/lib/sass/{embedded → compiler}/host/protofier.rb +1 -1
- data/lib/sass/{embedded → compiler}/host/structifier.rb +1 -1
- data/lib/sass/{embedded → compiler}/host/value_protofier.rb +3 -3
- data/lib/sass/{embedded → compiler}/host.rb +23 -14
- data/lib/sass/{embedded → compiler}/varint.rb +1 -1
- data/lib/sass/compiler.rb +191 -0
- data/lib/sass/elf.rb +2 -2
- data/lib/sass/embedded/version.rb +2 -2
- data/lib/sass/embedded.rb +65 -204
- data/lib/sass/exception.rb +65 -0
- data/lib/sass/fork_tracker.rb +51 -0
- data/lib/sass/serializer.rb +41 -0
- data/lib/sass/value/argument_list.rb +2 -2
- data/lib/sass/value/calculation.rb +3 -1
- data/lib/sass/value/function.rb +5 -3
- data/lib/sass/value/number.rb +8 -8
- data/lib/sass/value/string.rb +5 -8
- data/lib/sass/value.rb +1 -9
- metadata +26 -23
- data/lib/sass/compile_error.rb +0 -31
- data/lib/sass/embedded/connection.rb +0 -71
- data/lib/sass/embedded/resilient_dispatcher.rb +0 -40
- data/lib/sass/script_error.rb +0 -10
@@ -8,12 +8,12 @@ module Sass
|
|
8
8
|
# map as well as the positional arguments.
|
9
9
|
#
|
10
10
|
# @see https://sass-lang.com/documentation/js-api/classes/sassargumentlist/
|
11
|
-
class ArgumentList <
|
11
|
+
class ArgumentList < List
|
12
12
|
# @param contents [Array<Value>]
|
13
13
|
# @param keywords [Hash<::String, Value>]
|
14
14
|
# @param separator [::String]
|
15
15
|
def initialize(contents = [], keywords = {}, separator = ',')
|
16
|
-
super(contents, separator:
|
16
|
+
super(contents, separator:)
|
17
17
|
|
18
18
|
@id = 0
|
19
19
|
@keywords_accessed = false
|
data/lib/sass/value/function.rb
CHANGED
@@ -10,9 +10,11 @@ module Sass
|
|
10
10
|
|
11
11
|
# @param signature [::String]
|
12
12
|
# @param callback [Proc]
|
13
|
-
def initialize(signature, callback)
|
14
|
-
|
15
|
-
|
13
|
+
def initialize(signature, &callback)
|
14
|
+
raise Sass::ScriptError, 'no block given' unless signature.nil? || callback
|
15
|
+
|
16
|
+
@signature = signature.freeze
|
17
|
+
@callback = callback.freeze
|
16
18
|
end
|
17
19
|
|
18
20
|
# @return [Integer, nil]
|
data/lib/sass/value/number.rb
CHANGED
@@ -183,7 +183,7 @@ module Sass
|
|
183
183
|
def convert_value(new_numerator_units, new_denominator_units, name = nil)
|
184
184
|
coerce_or_convert_value(new_numerator_units, new_denominator_units,
|
185
185
|
coerce_unitless: false,
|
186
|
-
name:
|
186
|
+
name:)
|
187
187
|
end
|
188
188
|
|
189
189
|
# @param other [Number]
|
@@ -200,9 +200,9 @@ module Sass
|
|
200
200
|
def convert_value_to_match(other, name = nil, other_name = nil)
|
201
201
|
coerce_or_convert_value(other.numerator_units, other.denominator_units,
|
202
202
|
coerce_unitless: false,
|
203
|
-
name
|
204
|
-
other
|
205
|
-
other_name:
|
203
|
+
name:,
|
204
|
+
other:,
|
205
|
+
other_name:)
|
206
206
|
end
|
207
207
|
|
208
208
|
# @param new_numerator_units [Array<::String>]
|
@@ -221,7 +221,7 @@ module Sass
|
|
221
221
|
def coerce_value(new_numerator_units, new_denominator_units, name = nil)
|
222
222
|
coerce_or_convert_value(new_numerator_units, new_denominator_units,
|
223
223
|
coerce_unitless: true,
|
224
|
-
name:
|
224
|
+
name:)
|
225
225
|
end
|
226
226
|
|
227
227
|
# @param unit [::String]
|
@@ -244,9 +244,9 @@ module Sass
|
|
244
244
|
def coerce_value_to_match(other, name = nil, other_name = nil)
|
245
245
|
coerce_or_convert_value(other.numerator_units, other.denominator_units,
|
246
246
|
coerce_unitless: true,
|
247
|
-
name
|
248
|
-
other
|
249
|
-
other_name:
|
247
|
+
name:,
|
248
|
+
other:,
|
249
|
+
other_name:)
|
250
250
|
end
|
251
251
|
|
252
252
|
# @return [Number]
|
data/lib/sass/value/string.rb
CHANGED
@@ -39,14 +39,6 @@ module Sass
|
|
39
39
|
self
|
40
40
|
end
|
41
41
|
|
42
|
-
# @return [CalculationValue]
|
43
|
-
# @raise [ScriptError]
|
44
|
-
def assert_calculation_value(name = nil)
|
45
|
-
raise Sass::ScriptError.new("Expected #{self} to be an unquoted string.", name) if quoted?
|
46
|
-
|
47
|
-
self
|
48
|
-
end
|
49
|
-
|
50
42
|
# @param sass_index [Number]
|
51
43
|
# @return [Integer]
|
52
44
|
def sass_index_to_string_index(sass_index, name = nil)
|
@@ -59,6 +51,11 @@ module Sass
|
|
59
51
|
|
60
52
|
index.negative? ? text.length + index : index - 1
|
61
53
|
end
|
54
|
+
|
55
|
+
# @return [String]
|
56
|
+
def to_s
|
57
|
+
@quoted ? Serializer.serialize_quoted_string(@text) : Serializer.serialize_unquoted_string(@text)
|
58
|
+
end
|
62
59
|
end
|
63
60
|
end
|
64
61
|
end
|
data/lib/sass/value.rb
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative 'calculation_value'
|
4
|
-
require_relative 'script_error'
|
5
|
-
|
6
3
|
module Sass
|
7
4
|
# The abstract base class of Sass's value types.
|
8
5
|
#
|
@@ -67,12 +64,6 @@ module Sass
|
|
67
64
|
raise Sass::ScriptError.new("#{self} is not a calculation", name)
|
68
65
|
end
|
69
66
|
|
70
|
-
# @return [CalculationValue]
|
71
|
-
# @raise [ScriptError]
|
72
|
-
def assert_calculation_value(name = nil)
|
73
|
-
raise Sass::ScriptError.new("#{self} is not a calculation value", name)
|
74
|
-
end
|
75
|
-
|
76
67
|
# @return [Color]
|
77
68
|
# @raise [ScriptError]
|
78
69
|
def assert_color(name = nil)
|
@@ -130,6 +121,7 @@ module Sass
|
|
130
121
|
end
|
131
122
|
end
|
132
123
|
|
124
|
+
require_relative 'calculation_value'
|
133
125
|
require_relative 'value/list'
|
134
126
|
require_relative 'value/argument_list'
|
135
127
|
require_relative 'value/boolean'
|
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: 1.69.
|
4
|
+
version: 1.69.7
|
5
5
|
platform: arm-linux-musleabihf
|
6
6
|
authors:
|
7
7
|
- なつき
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '3.
|
19
|
+
version: '3.25'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '3.
|
26
|
+
version: '3.25'
|
27
27
|
description: A Ruby library that will communicate with Embedded Dart Sass using the
|
28
28
|
Embedded Sass protocol.
|
29
29
|
email:
|
@@ -46,27 +46,29 @@ files:
|
|
46
46
|
- lib/sass/calculation_value.rb
|
47
47
|
- lib/sass/calculation_value/calculation_operation.rb
|
48
48
|
- lib/sass/canonicalize_context.rb
|
49
|
-
- lib/sass/compile_error.rb
|
50
49
|
- lib/sass/compile_result.rb
|
50
|
+
- lib/sass/compiler.rb
|
51
|
+
- lib/sass/compiler/connection.rb
|
52
|
+
- lib/sass/compiler/dispatcher.rb
|
53
|
+
- lib/sass/compiler/dispatcher_manager.rb
|
54
|
+
- lib/sass/compiler/host.rb
|
55
|
+
- lib/sass/compiler/host/function_registry.rb
|
56
|
+
- lib/sass/compiler/host/importer_registry.rb
|
57
|
+
- lib/sass/compiler/host/logger_registry.rb
|
58
|
+
- lib/sass/compiler/host/protofier.rb
|
59
|
+
- lib/sass/compiler/host/structifier.rb
|
60
|
+
- lib/sass/compiler/host/value_protofier.rb
|
61
|
+
- lib/sass/compiler/varint.rb
|
51
62
|
- lib/sass/elf.rb
|
52
63
|
- lib/sass/embedded.rb
|
53
|
-
- lib/sass/embedded/connection.rb
|
54
|
-
- lib/sass/embedded/dispatcher.rb
|
55
|
-
- lib/sass/embedded/host.rb
|
56
|
-
- lib/sass/embedded/host/function_registry.rb
|
57
|
-
- lib/sass/embedded/host/importer_registry.rb
|
58
|
-
- lib/sass/embedded/host/logger_registry.rb
|
59
|
-
- lib/sass/embedded/host/protofier.rb
|
60
|
-
- lib/sass/embedded/host/structifier.rb
|
61
|
-
- lib/sass/embedded/host/value_protofier.rb
|
62
|
-
- lib/sass/embedded/resilient_dispatcher.rb
|
63
|
-
- lib/sass/embedded/varint.rb
|
64
64
|
- lib/sass/embedded/version.rb
|
65
65
|
- lib/sass/embedded_protocol.rb
|
66
|
+
- lib/sass/exception.rb
|
67
|
+
- lib/sass/fork_tracker.rb
|
66
68
|
- lib/sass/logger/silent.rb
|
67
69
|
- lib/sass/logger/source_location.rb
|
68
70
|
- lib/sass/logger/source_span.rb
|
69
|
-
- lib/sass/
|
71
|
+
- lib/sass/serializer.rb
|
70
72
|
- lib/sass/value.rb
|
71
73
|
- lib/sass/value/argument_list.rb
|
72
74
|
- lib/sass/value/boolean.rb
|
@@ -81,13 +83,14 @@ files:
|
|
81
83
|
- lib/sass/value/number.rb
|
82
84
|
- lib/sass/value/number/unit.rb
|
83
85
|
- lib/sass/value/string.rb
|
84
|
-
homepage: https://github.com/
|
86
|
+
homepage: https://github.com/sass-contrib/sass-embedded-host-ruby
|
85
87
|
licenses:
|
86
88
|
- MIT
|
87
89
|
metadata:
|
88
|
-
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.69.
|
89
|
-
source_code_uri: https://github.com/
|
90
|
+
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.69.7
|
91
|
+
source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.69.7
|
90
92
|
funding_uri: https://github.com/sponsors/ntkme
|
93
|
+
rubygems_mfa_required: 'true'
|
91
94
|
post_install_message:
|
92
95
|
rdoc_options: []
|
93
96
|
require_paths:
|
@@ -96,14 +99,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
96
99
|
requirements:
|
97
100
|
- - ">="
|
98
101
|
- !ruby/object:Gem::Version
|
99
|
-
version: 3.
|
102
|
+
version: 3.1.3
|
100
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
104
|
requirements:
|
102
105
|
- - ">="
|
103
106
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
107
|
+
version: '0'
|
105
108
|
requirements: []
|
106
|
-
rubygems_version: 3.
|
109
|
+
rubygems_version: 3.5.3
|
107
110
|
signing_key:
|
108
111
|
specification_version: 4
|
109
112
|
summary: Use dart-sass with Ruby!
|
data/lib/sass/compile_error.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Sass
|
4
|
-
# An exception thrown because a Sass compilation failed.
|
5
|
-
class CompileError < StandardError
|
6
|
-
# @return [String, nil]
|
7
|
-
attr_reader :sass_stack
|
8
|
-
|
9
|
-
# @return [Logger::SourceSpan, nil]
|
10
|
-
attr_reader :span
|
11
|
-
|
12
|
-
# @return [Array<String>]
|
13
|
-
attr_reader :loaded_urls
|
14
|
-
|
15
|
-
# @!visibility private
|
16
|
-
def initialize(message, full_message, sass_stack, span, loaded_urls)
|
17
|
-
super(message)
|
18
|
-
@full_message = full_message
|
19
|
-
@sass_stack = sass_stack
|
20
|
-
@span = span
|
21
|
-
@loaded_urls = loaded_urls
|
22
|
-
end
|
23
|
-
|
24
|
-
# @return [String]
|
25
|
-
def full_message(...)
|
26
|
-
return super(...) if @full_message.nil?
|
27
|
-
|
28
|
-
@full_message = +@full_message
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
@@ -1,71 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'open3'
|
4
|
-
|
5
|
-
require_relative '../../../ext/sass/cli'
|
6
|
-
|
7
|
-
module Sass
|
8
|
-
class Embedded
|
9
|
-
# The stdio based {Connection} between the {Dispatcher} and the compiler.
|
10
|
-
#
|
11
|
-
# It runs the `sass --embedded` command.
|
12
|
-
class Connection
|
13
|
-
def initialize(dispatcher)
|
14
|
-
@mutex = Mutex.new
|
15
|
-
@stdin, stdout, stderr, @wait_thread = begin
|
16
|
-
Open3.popen3(*CLI::COMMAND, '--embedded', chdir: __dir__)
|
17
|
-
rescue Errno::ENOENT
|
18
|
-
require_relative '../elf'
|
19
|
-
|
20
|
-
raise if ELF::INTERPRETER.nil?
|
21
|
-
|
22
|
-
Open3.popen3(ELF::INTERPRETER, *CLI::COMMAND, '--embedded', chdir: __dir__)
|
23
|
-
end
|
24
|
-
@stdin.binmode
|
25
|
-
|
26
|
-
Thread.new do
|
27
|
-
stdout.binmode
|
28
|
-
loop do
|
29
|
-
length = Varint.read(stdout)
|
30
|
-
id = Varint.read(stdout)
|
31
|
-
proto = stdout.read(length - Varint.length(id))
|
32
|
-
dispatcher.receive_proto(id, proto)
|
33
|
-
rescue IOError, Errno::EBADF, Errno::EPROTO => e
|
34
|
-
dispatcher.error(e)
|
35
|
-
break
|
36
|
-
end
|
37
|
-
stdout.close
|
38
|
-
end
|
39
|
-
|
40
|
-
Thread.new do
|
41
|
-
loop do
|
42
|
-
warn(stderr.readline, uplevel: 1)
|
43
|
-
rescue IOError, Errno::EBADF
|
44
|
-
break
|
45
|
-
end
|
46
|
-
stderr.close
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
def close
|
51
|
-
@stdin.close
|
52
|
-
@wait_thread.join
|
53
|
-
end
|
54
|
-
|
55
|
-
def closed?
|
56
|
-
@stdin.closed? && !@wait_thread.alive?
|
57
|
-
end
|
58
|
-
|
59
|
-
def write(id, proto)
|
60
|
-
buffer = []
|
61
|
-
Varint.write(buffer, Varint.length(id) + proto.length)
|
62
|
-
Varint.write(buffer, id)
|
63
|
-
@mutex.synchronize do
|
64
|
-
@stdin.write(buffer.pack('C*'), proto)
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
private_constant :Connection
|
70
|
-
end
|
71
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Sass
|
4
|
-
class Embedded
|
5
|
-
# The {ResilientDispatcher} class.
|
6
|
-
#
|
7
|
-
# It recovers from failures and continues to function.
|
8
|
-
class ResilientDispatcher
|
9
|
-
def initialize
|
10
|
-
@dispatcher = Dispatcher.new
|
11
|
-
@mutex = Mutex.new
|
12
|
-
end
|
13
|
-
|
14
|
-
def close(...)
|
15
|
-
@mutex.synchronize do
|
16
|
-
@dispatcher.close(...)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def closed?(...)
|
21
|
-
@mutex.synchronize do
|
22
|
-
@dispatcher.closed?(...)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def connect(...)
|
27
|
-
@dispatcher.connect(...)
|
28
|
-
rescue Errno::EBUSY
|
29
|
-
@mutex.synchronize do
|
30
|
-
@dispatcher.connect(...)
|
31
|
-
rescue Errno::EBUSY
|
32
|
-
@dispatcher = Dispatcher.new
|
33
|
-
@dispatcher.connect(...)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
private_constant :ResilientDispatcher
|
39
|
-
end
|
40
|
-
end
|
data/lib/sass/script_error.rb
DELETED