sass-embedded 1.69.5-aarch64-linux-musl → 1.69.6-aarch64-linux-musl

Sign up to get free protection for your applications and to get access to all the features.
@@ -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,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Sass
4
- # An exception thrown by Sass Script.
5
- class ScriptError < StandardError
6
- def initialize(message, name = nil)
7
- super(name.nil? ? message : "$#{name}: #{message}")
8
- end
9
- end
10
- end