sass-embedded 1.69.5-arm-linux-gnueabihf → 1.69.6-arm-linux-gnueabihf
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/exe/sass +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/compiler/connection.rb +92 -0
- data/lib/sass/{embedded → compiler}/dispatcher.rb +31 -10
- data/lib/sass/{embedded → compiler}/host/function_registry.rb +3 -3
- data/lib/sass/{embedded → compiler}/host/importer_registry.rb +3 -3
- 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 +1 -1
- data/lib/sass/{embedded → compiler}/host.rb +15 -13
- data/lib/sass/{embedded → compiler}/resilient_dispatcher.rb +5 -4
- data/lib/sass/{embedded → compiler}/varint.rb +1 -1
- data/lib/sass/compiler.rb +188 -0
- 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 +73 -0
- data/lib/sass/value/argument_list.rb +1 -1
- data/lib/sass/value/number.rb +8 -8
- data/lib/sass/value.rb +0 -1
- metadata +25 -23
- data/lib/sass/compile_error.rb +0 -31
- data/lib/sass/embedded/connection.rb +0 -71
- data/lib/sass/script_error.rb +0 -10
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
|
data/lib/sass/script_error.rb
DELETED