sass-embedded 1.62.0 → 1.63.1
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 +7 -1
- data/exe/sass +21 -0
- data/ext/sass/Rakefile +34 -38
- data/ext/sass/embedded_sass_pb.rb +24 -291
- data/ext/sass/package.json +1 -1
- data/lib/sass/compile_error.rb +12 -10
- data/lib/sass/compile_result.rb +1 -1
- data/lib/sass/elf.rb +276 -0
- data/lib/sass/embedded/channel.rb +3 -3
- data/lib/sass/embedded/compiler.rb +18 -6
- data/lib/sass/embedded/dispatcher.rb +26 -30
- data/lib/sass/embedded/host/logger_registry.rb +27 -24
- data/lib/sass/embedded/host.rb +50 -20
- data/lib/sass/embedded/protofier.rb +8 -7
- data/lib/sass/embedded/varint.rb +6 -0
- data/lib/sass/embedded/version.rb +1 -1
- data/lib/sass/embedded.rb +3 -4
- data/lib/sass/logger/source_span.rb +2 -2
- metadata +12 -80
- data/lib/sass/embedded/async.rb +0 -58
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9d032c70d15ccdee68d59c6c96bea5447c7fe9909ba0d626de15ae1f5063945
|
4
|
+
data.tar.gz: 0c935046d3735b39d978ce9678354c4bdc057234c10b40ef26511e560674f7cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21f2a1ce8e24ae0bf50d17c412ebcba3efc45bca99faba61743e0d4694a4d4c01ff1698d2761a8ea4d870923def03d17ad3b0828bd1746e76e36e075dbc5f84e
|
7
|
+
data.tar.gz: 509663362c14b15f4a1b69244828283e88a477277d2eceb2a9718b288e966dfa6a5aad92d63b8b4637619eef7b22a78b167e8f412de2255c67b2446d55fed92f
|
data/README.md
CHANGED
@@ -24,6 +24,9 @@ require 'sass-embedded'
|
|
24
24
|
|
25
25
|
result = Sass.compile('style.scss')
|
26
26
|
puts result.css
|
27
|
+
|
28
|
+
compressed = Sass.compile('style.scss', style: :compressed)
|
29
|
+
puts compressed.css
|
27
30
|
```
|
28
31
|
|
29
32
|
- `Sass.compile_string` takes a string that represents the contents of a Sass file and return the result of compiling that file to CSS.
|
@@ -33,9 +36,12 @@ require 'sass-embedded'
|
|
33
36
|
|
34
37
|
result = Sass.compile_string('h1 { font-size: 40px; }')
|
35
38
|
puts result.css
|
39
|
+
|
40
|
+
compressed = Sass.compile_string('h1 { font-size: 40px; }', style: :compressed)
|
41
|
+
puts compressed.css
|
36
42
|
```
|
37
43
|
|
38
|
-
See [rubydoc.info/gems/sass-embedded](https://rubydoc.info/gems/sass-embedded) for full API documentation.
|
44
|
+
See [rubydoc.info/gems/sass-embedded/Sass](https://rubydoc.info/gems/sass-embedded/Sass) for full API documentation.
|
39
45
|
|
40
46
|
---
|
41
47
|
|
data/exe/sass
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require_relative '../ext/sass/cli'
|
5
|
+
|
6
|
+
module Sass
|
7
|
+
# The `sass` command line interface
|
8
|
+
class CLI
|
9
|
+
begin
|
10
|
+
exec(*COMMAND, *ARGV)
|
11
|
+
rescue Errno::ENOENT
|
12
|
+
require_relative '../lib/sass/elf'
|
13
|
+
|
14
|
+
raise if ELF::INTERPRETER.nil?
|
15
|
+
|
16
|
+
exec(ELF::INTERPRETER, *COMMAND, *ARGV)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
private_constant :CLI
|
21
|
+
end
|
data/ext/sass/Rakefile
CHANGED
@@ -4,67 +4,61 @@ require 'rake/clean'
|
|
4
4
|
|
5
5
|
task default: %i[install clean]
|
6
6
|
|
7
|
-
task install: %w[
|
7
|
+
task install: %w[cli.rb] do
|
8
8
|
Rake::Task['embedded_sass_pb.rb'].invoke unless File.exist?('embedded_sass_pb.rb')
|
9
9
|
end
|
10
10
|
|
11
11
|
CLEAN.include %w[protoc.exe *.proto *.tar.gz *.zip]
|
12
12
|
|
13
|
-
CLOBBER.include %w[
|
13
|
+
CLOBBER.include %w[dart-sass cli.rb embedded_sass_pb.rb]
|
14
14
|
|
15
15
|
file 'protoc.exe' do |t|
|
16
16
|
fetch(ENV.fetch('PROTOC_BIN') { Configuration.default_protoc }, t.name)
|
17
17
|
chmod 'a+x', t.name
|
18
18
|
end
|
19
19
|
|
20
|
-
file '
|
21
|
-
archive = fetch(ENV.fetch(t.name.upcase) { Configuration.
|
20
|
+
file 'dart-sass' do |t|
|
21
|
+
archive = fetch(ENV.fetch(t.name.tr('-', '_').upcase) { Configuration.default_dart_sass })
|
22
22
|
unarchive archive
|
23
23
|
rm archive
|
24
|
-
|
25
|
-
if ENV.key?('NIX_BINTOOLS')
|
26
|
-
sh 'patchelf',
|
27
|
-
'--set-interpreter', File.read("#{ENV.fetch('NIX_BINTOOLS')}/nix-support/dynamic-linker").chomp,
|
28
|
-
(['sass_embedded/src/dart', 'sass_embedded/dart-sass-embedded'].find { |exe| File.exist?(exe) })
|
29
|
-
end
|
30
24
|
end
|
31
25
|
|
32
|
-
file '
|
33
|
-
exe = '
|
26
|
+
file 'cli.rb' => %w[dart-sass] do |t|
|
27
|
+
exe = 'dart-sass/sass'
|
34
28
|
exe = "#{exe}#{['', '.bat', '.exe'].find { |ext| File.exist?("#{exe}#{ext}") }}"
|
35
29
|
|
36
30
|
raise "#{exe} not found" unless File.exist?(exe)
|
37
31
|
|
38
|
-
runtime = '
|
32
|
+
runtime = 'dart-sass/src/dart'
|
39
33
|
runtime = "#{runtime}#{['', '.exe'].find { |ext| File.exist?("#{runtime}#{ext}") }}"
|
40
|
-
snapshot = '
|
34
|
+
snapshot = 'dart-sass/src/sass.snapshot'
|
41
35
|
|
42
36
|
command = if File.exist?(runtime) && File.exist?(snapshot)
|
43
37
|
"
|
44
|
-
|
45
|
-
|
46
|
-
|
38
|
+
File.absolute_path('#{runtime}', __dir__),
|
39
|
+
File.absolute_path('#{snapshot}', __dir__)
|
40
|
+
"
|
47
41
|
else
|
48
42
|
"
|
49
|
-
|
50
|
-
|
43
|
+
File.absolute_path('#{exe}', __dir__)
|
44
|
+
"
|
51
45
|
end
|
52
46
|
|
53
|
-
File.write(t.name, <<~
|
47
|
+
File.write(t.name, <<~CLI_RB)
|
54
48
|
# frozen_string_literal: true
|
55
49
|
|
56
50
|
module Sass
|
57
|
-
class
|
58
|
-
|
59
|
-
COMMAND = [#{command}].freeze
|
60
|
-
end
|
51
|
+
class CLI
|
52
|
+
COMMAND = [#{command}].freeze
|
61
53
|
end
|
54
|
+
|
55
|
+
private_constant :CLI
|
62
56
|
end
|
63
|
-
|
57
|
+
CLI_RB
|
64
58
|
end
|
65
59
|
|
66
|
-
file 'embedded_sass.proto' => %w[
|
67
|
-
fetch(ENV.fetch('
|
60
|
+
file 'embedded_sass.proto' => %w[cli.rb] do |t|
|
61
|
+
fetch(ENV.fetch('EMBEDDED_SASS_PROTOCOL') { Configuration.default_embedded_sass_protocol }, t.name)
|
68
62
|
end
|
69
63
|
|
70
64
|
rule '_pb.rb' => %w[.proto protoc.exe] do |t|
|
@@ -227,16 +221,16 @@ module Configuration
|
|
227
221
|
|
228
222
|
module_function
|
229
223
|
|
230
|
-
def
|
224
|
+
def default_dart_sass
|
231
225
|
require 'json'
|
232
226
|
|
233
|
-
repo = 'https://github.com/sass/dart-sass
|
227
|
+
repo = 'https://github.com/sass/dart-sass'
|
234
228
|
|
235
229
|
spec = JSON.parse(File.read(File.absolute_path('package.json', __dir__)))
|
236
230
|
|
237
|
-
tag_name = spec['dependencies']['sass
|
231
|
+
tag_name = spec['dependencies']['sass']
|
238
232
|
|
239
|
-
message = "
|
233
|
+
message = "dart-sass for #{Platform::ARCH} not available at #{repo}/releases/tag/#{tag_name}"
|
240
234
|
|
241
235
|
os = case Platform::OS
|
242
236
|
when 'darwin'
|
@@ -244,10 +238,10 @@ module Configuration
|
|
244
238
|
when 'linux'
|
245
239
|
'linux'
|
246
240
|
when 'linux-android'
|
247
|
-
repo = 'https://github.com/dart-android/dart-sass
|
241
|
+
repo = 'https://github.com/dart-android/dart-sass'
|
248
242
|
'android'
|
249
243
|
when 'linux-musl'
|
250
|
-
repo = 'https://github.com/dart-musl/dart-sass
|
244
|
+
repo = 'https://github.com/dart-musl/dart-sass'
|
251
245
|
'linux'
|
252
246
|
when 'windows'
|
253
247
|
'windows'
|
@@ -270,7 +264,7 @@ module Configuration
|
|
270
264
|
|
271
265
|
ext = Platform::OS == 'windows' ? 'zip' : 'tar.gz'
|
272
266
|
|
273
|
-
"#{repo}/releases/download/#{tag_name}/
|
267
|
+
"#{repo}/releases/download/#{tag_name}/dart-sass-#{tag_name}-#{os}-#{cpu}.#{ext}"
|
274
268
|
end
|
275
269
|
|
276
270
|
def default_protoc
|
@@ -309,17 +303,19 @@ module Configuration
|
|
309
303
|
"#{repo}/#{version}/protoc-#{version}-#{os}-#{cpu}.exe"
|
310
304
|
end
|
311
305
|
|
312
|
-
def
|
306
|
+
def default_embedded_sass_protocol
|
313
307
|
require 'json'
|
314
308
|
require 'open3'
|
315
|
-
require_relative 'embedded'
|
316
309
|
|
317
|
-
stdout, stderr, status = Open3.capture3(
|
310
|
+
stdout, stderr, status = Open3.capture3(RbConfig.ruby,
|
311
|
+
File.absolute_path('../../exe/sass', __dir__),
|
312
|
+
'--embedded',
|
313
|
+
'--version')
|
318
314
|
|
319
315
|
raise stderr unless status.success?
|
320
316
|
|
321
317
|
tag_name = JSON.parse(stdout)['protocolVersion']
|
322
318
|
|
323
|
-
"https://github.com/sass/embedded-protocol
|
319
|
+
"https://github.com/sass/sass/raw/embedded-protocol-#{tag_name}/spec/embedded_sass.proto"
|
324
320
|
end
|
325
321
|
end
|
@@ -1,301 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: embedded_sass.proto
|
3
4
|
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
6
|
-
|
7
|
-
add_file("embedded_sass.proto", :syntax => :proto3) do
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
optional :alert_color, :bool, 8
|
28
|
-
optional :alert_ascii, :bool, 9
|
29
|
-
optional :verbose, :bool, 10
|
30
|
-
optional :quiet_deps, :bool, 11
|
31
|
-
optional :source_map_include_sources, :bool, 12
|
32
|
-
optional :charset, :bool, 13
|
33
|
-
oneof :input do
|
34
|
-
optional :string, :message, 2, "sass.embedded_protocol.InboundMessage.CompileRequest.StringInput"
|
35
|
-
optional :path, :string, 3
|
36
|
-
end
|
37
|
-
end
|
38
|
-
add_message "sass.embedded_protocol.InboundMessage.CompileRequest.StringInput" do
|
39
|
-
optional :source, :string, 1
|
40
|
-
optional :url, :string, 2
|
41
|
-
optional :syntax, :enum, 3, "sass.embedded_protocol.Syntax"
|
42
|
-
optional :importer, :message, 4, "sass.embedded_protocol.InboundMessage.CompileRequest.Importer"
|
43
|
-
end
|
44
|
-
add_message "sass.embedded_protocol.InboundMessage.CompileRequest.Importer" do
|
45
|
-
oneof :importer do
|
46
|
-
optional :path, :string, 1
|
47
|
-
optional :importer_id, :uint32, 2
|
48
|
-
optional :file_importer_id, :uint32, 3
|
49
|
-
end
|
50
|
-
end
|
51
|
-
add_message "sass.embedded_protocol.InboundMessage.CanonicalizeResponse" do
|
52
|
-
optional :id, :uint32, 1
|
53
|
-
oneof :result do
|
54
|
-
optional :url, :string, 2
|
55
|
-
optional :error, :string, 3
|
56
|
-
end
|
57
|
-
end
|
58
|
-
add_message "sass.embedded_protocol.InboundMessage.ImportResponse" do
|
59
|
-
optional :id, :uint32, 1
|
60
|
-
oneof :result do
|
61
|
-
optional :success, :message, 2, "sass.embedded_protocol.InboundMessage.ImportResponse.ImportSuccess"
|
62
|
-
optional :error, :string, 3
|
63
|
-
end
|
64
|
-
end
|
65
|
-
add_message "sass.embedded_protocol.InboundMessage.ImportResponse.ImportSuccess" do
|
66
|
-
optional :contents, :string, 1
|
67
|
-
optional :syntax, :enum, 2, "sass.embedded_protocol.Syntax"
|
68
|
-
optional :source_map_url, :string, 3
|
69
|
-
end
|
70
|
-
add_message "sass.embedded_protocol.InboundMessage.FileImportResponse" do
|
71
|
-
optional :id, :uint32, 1
|
72
|
-
oneof :result do
|
73
|
-
optional :file_url, :string, 2
|
74
|
-
optional :error, :string, 3
|
75
|
-
end
|
76
|
-
end
|
77
|
-
add_message "sass.embedded_protocol.InboundMessage.FunctionCallResponse" do
|
78
|
-
optional :id, :uint32, 1
|
79
|
-
repeated :accessed_argument_lists, :uint32, 4
|
80
|
-
oneof :result do
|
81
|
-
optional :success, :message, 2, "sass.embedded_protocol.Value"
|
82
|
-
optional :error, :string, 3
|
83
|
-
end
|
84
|
-
end
|
85
|
-
add_message "sass.embedded_protocol.OutboundMessage" do
|
86
|
-
oneof :message do
|
87
|
-
optional :error, :message, 1, "sass.embedded_protocol.ProtocolError"
|
88
|
-
optional :compile_response, :message, 2, "sass.embedded_protocol.OutboundMessage.CompileResponse"
|
89
|
-
optional :log_event, :message, 3, "sass.embedded_protocol.OutboundMessage.LogEvent"
|
90
|
-
optional :canonicalize_request, :message, 4, "sass.embedded_protocol.OutboundMessage.CanonicalizeRequest"
|
91
|
-
optional :import_request, :message, 5, "sass.embedded_protocol.OutboundMessage.ImportRequest"
|
92
|
-
optional :file_import_request, :message, 6, "sass.embedded_protocol.OutboundMessage.FileImportRequest"
|
93
|
-
optional :function_call_request, :message, 7, "sass.embedded_protocol.OutboundMessage.FunctionCallRequest"
|
94
|
-
optional :version_response, :message, 8, "sass.embedded_protocol.OutboundMessage.VersionResponse"
|
95
|
-
end
|
96
|
-
end
|
97
|
-
add_message "sass.embedded_protocol.OutboundMessage.VersionResponse" do
|
98
|
-
optional :id, :uint32, 5
|
99
|
-
optional :protocol_version, :string, 1
|
100
|
-
optional :compiler_version, :string, 2
|
101
|
-
optional :implementation_version, :string, 3
|
102
|
-
optional :implementation_name, :string, 4
|
103
|
-
end
|
104
|
-
add_message "sass.embedded_protocol.OutboundMessage.CompileResponse" do
|
105
|
-
optional :id, :uint32, 1
|
106
|
-
oneof :result do
|
107
|
-
optional :success, :message, 2, "sass.embedded_protocol.OutboundMessage.CompileResponse.CompileSuccess"
|
108
|
-
optional :failure, :message, 3, "sass.embedded_protocol.OutboundMessage.CompileResponse.CompileFailure"
|
109
|
-
end
|
110
|
-
end
|
111
|
-
add_message "sass.embedded_protocol.OutboundMessage.CompileResponse.CompileSuccess" do
|
112
|
-
optional :css, :string, 1
|
113
|
-
optional :source_map, :string, 2
|
114
|
-
repeated :loaded_urls, :string, 3
|
115
|
-
end
|
116
|
-
add_message "sass.embedded_protocol.OutboundMessage.CompileResponse.CompileFailure" do
|
117
|
-
optional :message, :string, 1
|
118
|
-
optional :span, :message, 2, "sass.embedded_protocol.SourceSpan"
|
119
|
-
optional :stack_trace, :string, 3
|
120
|
-
optional :formatted, :string, 4
|
121
|
-
end
|
122
|
-
add_message "sass.embedded_protocol.OutboundMessage.LogEvent" do
|
123
|
-
optional :compilation_id, :uint32, 1
|
124
|
-
optional :type, :enum, 2, "sass.embedded_protocol.LogEventType"
|
125
|
-
optional :message, :string, 3
|
126
|
-
optional :span, :message, 4, "sass.embedded_protocol.SourceSpan"
|
127
|
-
optional :stack_trace, :string, 5
|
128
|
-
optional :formatted, :string, 6
|
129
|
-
end
|
130
|
-
add_message "sass.embedded_protocol.OutboundMessage.CanonicalizeRequest" do
|
131
|
-
optional :id, :uint32, 1
|
132
|
-
optional :compilation_id, :uint32, 2
|
133
|
-
optional :importer_id, :uint32, 3
|
134
|
-
optional :url, :string, 4
|
135
|
-
optional :from_import, :bool, 5
|
136
|
-
end
|
137
|
-
add_message "sass.embedded_protocol.OutboundMessage.ImportRequest" do
|
138
|
-
optional :id, :uint32, 1
|
139
|
-
optional :compilation_id, :uint32, 2
|
140
|
-
optional :importer_id, :uint32, 3
|
141
|
-
optional :url, :string, 4
|
142
|
-
end
|
143
|
-
add_message "sass.embedded_protocol.OutboundMessage.FileImportRequest" do
|
144
|
-
optional :id, :uint32, 1
|
145
|
-
optional :compilation_id, :uint32, 2
|
146
|
-
optional :importer_id, :uint32, 3
|
147
|
-
optional :url, :string, 4
|
148
|
-
optional :from_import, :bool, 5
|
149
|
-
end
|
150
|
-
add_message "sass.embedded_protocol.OutboundMessage.FunctionCallRequest" do
|
151
|
-
optional :id, :uint32, 1
|
152
|
-
optional :compilation_id, :uint32, 2
|
153
|
-
repeated :arguments, :message, 5, "sass.embedded_protocol.Value"
|
154
|
-
oneof :identifier do
|
155
|
-
optional :name, :string, 3
|
156
|
-
optional :function_id, :uint32, 4
|
157
|
-
end
|
158
|
-
end
|
159
|
-
add_message "sass.embedded_protocol.ProtocolError" do
|
160
|
-
optional :type, :enum, 1, "sass.embedded_protocol.ProtocolErrorType"
|
161
|
-
optional :id, :uint32, 2
|
162
|
-
optional :message, :string, 3
|
163
|
-
end
|
164
|
-
add_message "sass.embedded_protocol.SourceSpan" do
|
165
|
-
optional :text, :string, 1
|
166
|
-
optional :start, :message, 2, "sass.embedded_protocol.SourceSpan.SourceLocation"
|
167
|
-
optional :end, :message, 3, "sass.embedded_protocol.SourceSpan.SourceLocation"
|
168
|
-
optional :url, :string, 4
|
169
|
-
optional :context, :string, 5
|
170
|
-
end
|
171
|
-
add_message "sass.embedded_protocol.SourceSpan.SourceLocation" do
|
172
|
-
optional :offset, :uint32, 1
|
173
|
-
optional :line, :uint32, 2
|
174
|
-
optional :column, :uint32, 3
|
175
|
-
end
|
176
|
-
add_message "sass.embedded_protocol.Value" do
|
177
|
-
oneof :value do
|
178
|
-
optional :string, :message, 1, "sass.embedded_protocol.Value.String"
|
179
|
-
optional :number, :message, 2, "sass.embedded_protocol.Value.Number"
|
180
|
-
optional :rgb_color, :message, 3, "sass.embedded_protocol.Value.RgbColor"
|
181
|
-
optional :hsl_color, :message, 4, "sass.embedded_protocol.Value.HslColor"
|
182
|
-
optional :list, :message, 5, "sass.embedded_protocol.Value.List"
|
183
|
-
optional :map, :message, 6, "sass.embedded_protocol.Value.Map"
|
184
|
-
optional :singleton, :enum, 7, "sass.embedded_protocol.SingletonValue"
|
185
|
-
optional :compiler_function, :message, 8, "sass.embedded_protocol.Value.CompilerFunction"
|
186
|
-
optional :host_function, :message, 9, "sass.embedded_protocol.Value.HostFunction"
|
187
|
-
optional :argument_list, :message, 10, "sass.embedded_protocol.Value.ArgumentList"
|
188
|
-
optional :hwb_color, :message, 11, "sass.embedded_protocol.Value.HwbColor"
|
189
|
-
optional :calculation, :message, 12, "sass.embedded_protocol.Value.Calculation"
|
190
|
-
end
|
191
|
-
end
|
192
|
-
add_message "sass.embedded_protocol.Value.String" do
|
193
|
-
optional :text, :string, 1
|
194
|
-
optional :quoted, :bool, 2
|
195
|
-
end
|
196
|
-
add_message "sass.embedded_protocol.Value.Number" do
|
197
|
-
optional :value, :double, 1
|
198
|
-
repeated :numerators, :string, 2
|
199
|
-
repeated :denominators, :string, 3
|
200
|
-
end
|
201
|
-
add_message "sass.embedded_protocol.Value.RgbColor" do
|
202
|
-
optional :red, :uint32, 1
|
203
|
-
optional :green, :uint32, 2
|
204
|
-
optional :blue, :uint32, 3
|
205
|
-
optional :alpha, :double, 4
|
206
|
-
end
|
207
|
-
add_message "sass.embedded_protocol.Value.HslColor" do
|
208
|
-
optional :hue, :double, 1
|
209
|
-
optional :saturation, :double, 2
|
210
|
-
optional :lightness, :double, 3
|
211
|
-
optional :alpha, :double, 4
|
212
|
-
end
|
213
|
-
add_message "sass.embedded_protocol.Value.HwbColor" do
|
214
|
-
optional :hue, :double, 1
|
215
|
-
optional :whiteness, :double, 2
|
216
|
-
optional :blackness, :double, 3
|
217
|
-
optional :alpha, :double, 4
|
218
|
-
end
|
219
|
-
add_message "sass.embedded_protocol.Value.List" do
|
220
|
-
optional :separator, :enum, 1, "sass.embedded_protocol.ListSeparator"
|
221
|
-
optional :has_brackets, :bool, 2
|
222
|
-
repeated :contents, :message, 3, "sass.embedded_protocol.Value"
|
223
|
-
end
|
224
|
-
add_message "sass.embedded_protocol.Value.Map" do
|
225
|
-
repeated :entries, :message, 1, "sass.embedded_protocol.Value.Map.Entry"
|
226
|
-
end
|
227
|
-
add_message "sass.embedded_protocol.Value.Map.Entry" do
|
228
|
-
optional :key, :message, 1, "sass.embedded_protocol.Value"
|
229
|
-
optional :value, :message, 2, "sass.embedded_protocol.Value"
|
230
|
-
end
|
231
|
-
add_message "sass.embedded_protocol.Value.CompilerFunction" do
|
232
|
-
optional :id, :uint32, 1
|
233
|
-
end
|
234
|
-
add_message "sass.embedded_protocol.Value.HostFunction" do
|
235
|
-
optional :id, :uint32, 1
|
236
|
-
optional :signature, :string, 2
|
237
|
-
end
|
238
|
-
add_message "sass.embedded_protocol.Value.ArgumentList" do
|
239
|
-
optional :id, :uint32, 1
|
240
|
-
optional :separator, :enum, 2, "sass.embedded_protocol.ListSeparator"
|
241
|
-
repeated :contents, :message, 3, "sass.embedded_protocol.Value"
|
242
|
-
map :keywords, :string, :message, 4, "sass.embedded_protocol.Value"
|
243
|
-
end
|
244
|
-
add_message "sass.embedded_protocol.Value.Calculation" do
|
245
|
-
optional :name, :string, 1
|
246
|
-
repeated :arguments, :message, 2, "sass.embedded_protocol.Value.Calculation.CalculationValue"
|
247
|
-
end
|
248
|
-
add_message "sass.embedded_protocol.Value.Calculation.CalculationValue" do
|
249
|
-
oneof :value do
|
250
|
-
optional :number, :message, 1, "sass.embedded_protocol.Value.Number"
|
251
|
-
optional :string, :string, 2
|
252
|
-
optional :interpolation, :string, 3
|
253
|
-
optional :operation, :message, 4, "sass.embedded_protocol.Value.Calculation.CalculationOperation"
|
254
|
-
optional :calculation, :message, 5, "sass.embedded_protocol.Value.Calculation"
|
255
|
-
end
|
256
|
-
end
|
257
|
-
add_message "sass.embedded_protocol.Value.Calculation.CalculationOperation" do
|
258
|
-
optional :operator, :enum, 1, "sass.embedded_protocol.CalculationOperator"
|
259
|
-
optional :left, :message, 2, "sass.embedded_protocol.Value.Calculation.CalculationValue"
|
260
|
-
optional :right, :message, 3, "sass.embedded_protocol.Value.Calculation.CalculationValue"
|
261
|
-
end
|
262
|
-
add_enum "sass.embedded_protocol.OutputStyle" do
|
263
|
-
value :EXPANDED, 0
|
264
|
-
value :COMPRESSED, 1
|
265
|
-
end
|
266
|
-
add_enum "sass.embedded_protocol.Syntax" do
|
267
|
-
value :SCSS, 0
|
268
|
-
value :INDENTED, 1
|
269
|
-
value :CSS, 2
|
270
|
-
end
|
271
|
-
add_enum "sass.embedded_protocol.LogEventType" do
|
272
|
-
value :WARNING, 0
|
273
|
-
value :DEPRECATION_WARNING, 1
|
274
|
-
value :DEBUG, 2
|
275
|
-
end
|
276
|
-
add_enum "sass.embedded_protocol.ProtocolErrorType" do
|
277
|
-
value :PARSE, 0
|
278
|
-
value :PARAMS, 1
|
279
|
-
value :INTERNAL, 2
|
280
|
-
end
|
281
|
-
add_enum "sass.embedded_protocol.ListSeparator" do
|
282
|
-
value :COMMA, 0
|
283
|
-
value :SPACE, 1
|
284
|
-
value :SLASH, 2
|
285
|
-
value :UNDECIDED, 3
|
286
|
-
end
|
287
|
-
add_enum "sass.embedded_protocol.SingletonValue" do
|
288
|
-
value :TRUE, 0
|
289
|
-
value :FALSE, 1
|
290
|
-
value :NULL, 2
|
291
|
-
end
|
292
|
-
add_enum "sass.embedded_protocol.CalculationOperator" do
|
293
|
-
value :PLUS, 0
|
294
|
-
value :MINUS, 1
|
295
|
-
value :TIMES, 2
|
296
|
-
value :DIVIDE, 3
|
7
|
+
|
8
|
+
descriptor_data = "\n\x13\x65mbedded_sass.proto\x12\x16sass.embedded_protocol\"\xd9\x0e\n\x0eInboundMessage\x12P\n\x0f\x63ompile_request\x18\x02 \x01(\x0b\x32\x35.sass.embedded_protocol.InboundMessage.CompileRequestH\x00\x12\\\n\x15\x63\x61nonicalize_response\x18\x03 \x01(\x0b\x32;.sass.embedded_protocol.InboundMessage.CanonicalizeResponseH\x00\x12P\n\x0fimport_response\x18\x04 \x01(\x0b\x32\x35.sass.embedded_protocol.InboundMessage.ImportResponseH\x00\x12Y\n\x14\x66ile_import_response\x18\x05 \x01(\x0b\x32\x39.sass.embedded_protocol.InboundMessage.FileImportResponseH\x00\x12]\n\x16\x66unction_call_response\x18\x06 \x01(\x0b\x32;.sass.embedded_protocol.InboundMessage.FunctionCallResponseH\x00\x12P\n\x0fversion_request\x18\x07 \x01(\x0b\x32\x35.sass.embedded_protocol.InboundMessage.VersionRequestH\x00\x1a\x1c\n\x0eVersionRequest\x12\n\n\x02id\x18\x01 \x01(\r\x1a\xc7\x05\n\x0e\x43ompileRequest\x12S\n\x06string\x18\x02 \x01(\x0b\x32\x41.sass.embedded_protocol.InboundMessage.CompileRequest.StringInputH\x00\x12\x0e\n\x04path\x18\x03 \x01(\tH\x00\x12\x32\n\x05style\x18\x04 \x01(\x0e\x32#.sass.embedded_protocol.OutputStyle\x12\x12\n\nsource_map\x18\x05 \x01(\x08\x12Q\n\timporters\x18\x06 \x03(\x0b\x32>.sass.embedded_protocol.InboundMessage.CompileRequest.Importer\x12\x18\n\x10global_functions\x18\x07 \x03(\t\x12\x13\n\x0b\x61lert_color\x18\x08 \x01(\x08\x12\x13\n\x0b\x61lert_ascii\x18\t \x01(\x08\x12\x0f\n\x07verbose\x18\n \x01(\x08\x12\x12\n\nquiet_deps\x18\x0b \x01(\x08\x12\"\n\x1asource_map_include_sources\x18\x0c \x01(\x08\x12\x0f\n\x07\x63harset\x18\r \x01(\x08\x1a\xac\x01\n\x0bStringInput\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12.\n\x06syntax\x18\x03 \x01(\x0e\x32\x1e.sass.embedded_protocol.Syntax\x12P\n\x08importer\x18\x04 \x01(\x0b\x32>.sass.embedded_protocol.InboundMessage.CompileRequest.Importer\x1aY\n\x08Importer\x12\x0e\n\x04path\x18\x01 \x01(\tH\x00\x12\x15\n\x0bimporter_id\x18\x02 \x01(\rH\x00\x12\x1a\n\x10\x66ile_importer_id\x18\x03 \x01(\rH\x00\x42\n\n\x08importerB\x07\n\x05inputJ\x04\x08\x01\x10\x02\x1aL\n\x14\x43\x61nonicalizeResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12\r\n\x03url\x18\x02 \x01(\tH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x42\x08\n\x06result\x1a\x93\x02\n\x0eImportResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12V\n\x07success\x18\x02 \x01(\x0b\x32\x43.sass.embedded_protocol.InboundMessage.ImportResponse.ImportSuccessH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x1a\x81\x01\n\rImportSuccess\x12\x10\n\x08\x63ontents\x18\x01 \x01(\t\x12.\n\x06syntax\x18\x02 \x01(\x0e\x32\x1e.sass.embedded_protocol.Syntax\x12\x1b\n\x0esource_map_url\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_source_map_urlB\x08\n\x06result\x1aO\n\x12\x46ileImportResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12\x12\n\x08\x66ile_url\x18\x02 \x01(\tH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x42\x08\n\x06result\x1a\x90\x01\n\x14\x46unctionCallResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12\x30\n\x07success\x18\x02 \x01(\x0b\x32\x1d.sass.embedded_protocol.ValueH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x12\x1f\n\x17\x61\x63\x63\x65ssed_argument_lists\x18\x04 \x03(\rB\x08\n\x06resultB\t\n\x07message\"\xb5\x0e\n\x0fOutboundMessage\x12\x36\n\x05\x65rror\x18\x01 \x01(\x0b\x32%.sass.embedded_protocol.ProtocolErrorH\x00\x12S\n\x10\x63ompile_response\x18\x02 \x01(\x0b\x32\x37.sass.embedded_protocol.OutboundMessage.CompileResponseH\x00\x12\x45\n\tlog_event\x18\x03 \x01(\x0b\x32\x30.sass.embedded_protocol.OutboundMessage.LogEventH\x00\x12[\n\x14\x63\x61nonicalize_request\x18\x04 \x01(\x0b\x32;.sass.embedded_protocol.OutboundMessage.CanonicalizeRequestH\x00\x12O\n\x0eimport_request\x18\x05 \x01(\x0b\x32\x35.sass.embedded_protocol.OutboundMessage.ImportRequestH\x00\x12X\n\x13\x66ile_import_request\x18\x06 \x01(\x0b\x32\x39.sass.embedded_protocol.OutboundMessage.FileImportRequestH\x00\x12\\\n\x15\x66unction_call_request\x18\x07 \x01(\x0b\x32;.sass.embedded_protocol.OutboundMessage.FunctionCallRequestH\x00\x12S\n\x10version_response\x18\x08 \x01(\x0b\x32\x37.sass.embedded_protocol.OutboundMessage.VersionResponseH\x00\x1a\x8e\x01\n\x0fVersionResponse\x12\n\n\x02id\x18\x05 \x01(\r\x12\x18\n\x10protocol_version\x18\x01 \x01(\t\x12\x18\n\x10\x63ompiler_version\x18\x02 \x01(\t\x12\x1e\n\x16implementation_version\x18\x03 \x01(\t\x12\x1b\n\x13implementation_name\x18\x04 \x01(\t\x1a\xa2\x03\n\x0f\x43ompileResponse\x12Y\n\x07success\x18\x02 \x01(\x0b\x32\x46.sass.embedded_protocol.OutboundMessage.CompileResponse.CompileSuccessH\x00\x12Y\n\x07\x66\x61ilure\x18\x03 \x01(\x0b\x32\x46.sass.embedded_protocol.OutboundMessage.CompileResponse.CompileFailureH\x00\x12\x13\n\x0bloaded_urls\x18\x04 \x03(\t\x1a\x37\n\x0e\x43ompileSuccess\x12\x0b\n\x03\x63ss\x18\x01 \x01(\t\x12\x12\n\nsource_map\x18\x02 \x01(\tJ\x04\x08\x03\x10\x04\x1a{\n\x0e\x43ompileFailure\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x30\n\x04span\x18\x02 \x01(\x0b\x32\".sass.embedded_protocol.SourceSpan\x12\x13\n\x0bstack_trace\x18\x03 \x01(\t\x12\x11\n\tformatted\x18\x04 \x01(\tB\x08\n\x06resultJ\x04\x08\x01\x10\x02\x1a\xbd\x01\n\x08LogEvent\x12\x32\n\x04type\x18\x02 \x01(\x0e\x32$.sass.embedded_protocol.LogEventType\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\x35\n\x04span\x18\x04 \x01(\x0b\x32\".sass.embedded_protocol.SourceSpanH\x00\x88\x01\x01\x12\x13\n\x0bstack_trace\x18\x05 \x01(\t\x12\x11\n\tformatted\x18\x06 \x01(\tB\x07\n\x05_spanJ\x04\x08\x01\x10\x02\x1a^\n\x13\x43\x61nonicalizeRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x13\n\x0bimporter_id\x18\x03 \x01(\r\x12\x0b\n\x03url\x18\x04 \x01(\t\x12\x13\n\x0b\x66rom_import\x18\x05 \x01(\x08J\x04\x08\x02\x10\x03\x1a\x43\n\rImportRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x13\n\x0bimporter_id\x18\x03 \x01(\r\x12\x0b\n\x03url\x18\x04 \x01(\tJ\x04\x08\x02\x10\x03\x1a\\\n\x11\x46ileImportRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x13\n\x0bimporter_id\x18\x03 \x01(\r\x12\x0b\n\x03url\x18\x04 \x01(\t\x12\x13\n\x0b\x66rom_import\x18\x05 \x01(\x08J\x04\x08\x02\x10\x03\x1a\x8e\x01\n\x13\x46unctionCallRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0e\n\x04name\x18\x03 \x01(\tH\x00\x12\x15\n\x0b\x66unction_id\x18\x04 \x01(\rH\x00\x12\x30\n\targuments\x18\x05 \x03(\x0b\x32\x1d.sass.embedded_protocol.ValueB\x0c\n\nidentifierJ\x04\x08\x02\x10\x03\x42\t\n\x07message\"e\n\rProtocolError\x12\x37\n\x04type\x18\x01 \x01(\x0e\x32).sass.embedded_protocol.ProtocolErrorType\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0f\n\x07message\x18\x03 \x01(\t\"\x87\x02\n\nSourceSpan\x12\x0c\n\x04text\x18\x01 \x01(\t\x12@\n\x05start\x18\x02 \x01(\x0b\x32\x31.sass.embedded_protocol.SourceSpan.SourceLocation\x12\x43\n\x03\x65nd\x18\x03 \x01(\x0b\x32\x31.sass.embedded_protocol.SourceSpan.SourceLocationH\x00\x88\x01\x01\x12\x0b\n\x03url\x18\x04 \x01(\t\x12\x0f\n\x07\x63ontext\x18\x05 \x01(\t\x1a>\n\x0eSourceLocation\x12\x0e\n\x06offset\x18\x01 \x01(\r\x12\x0c\n\x04line\x18\x02 \x01(\r\x12\x0e\n\x06\x63olumn\x18\x03 \x01(\rB\x06\n\x04_end\"\xd4\x12\n\x05Value\x12\x36\n\x06string\x18\x01 \x01(\x0b\x32$.sass.embedded_protocol.Value.StringH\x00\x12\x36\n\x06number\x18\x02 \x01(\x0b\x32$.sass.embedded_protocol.Value.NumberH\x00\x12;\n\trgb_color\x18\x03 \x01(\x0b\x32&.sass.embedded_protocol.Value.RgbColorH\x00\x12;\n\thsl_color\x18\x04 \x01(\x0b\x32&.sass.embedded_protocol.Value.HslColorH\x00\x12\x32\n\x04list\x18\x05 \x01(\x0b\x32\".sass.embedded_protocol.Value.ListH\x00\x12\x30\n\x03map\x18\x06 \x01(\x0b\x32!.sass.embedded_protocol.Value.MapH\x00\x12;\n\tsingleton\x18\x07 \x01(\x0e\x32&.sass.embedded_protocol.SingletonValueH\x00\x12K\n\x11\x63ompiler_function\x18\x08 \x01(\x0b\x32..sass.embedded_protocol.Value.CompilerFunctionH\x00\x12\x43\n\rhost_function\x18\t \x01(\x0b\x32*.sass.embedded_protocol.Value.HostFunctionH\x00\x12\x43\n\rargument_list\x18\n \x01(\x0b\x32*.sass.embedded_protocol.Value.ArgumentListH\x00\x12;\n\thwb_color\x18\x0b \x01(\x0b\x32&.sass.embedded_protocol.Value.HwbColorH\x00\x12@\n\x0b\x63\x61lculation\x18\x0c \x01(\x0b\x32).sass.embedded_protocol.Value.CalculationH\x00\x1a&\n\x06String\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x0e\n\x06quoted\x18\x02 \x01(\x08\x1a\x41\n\x06Number\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x12\n\nnumerators\x18\x02 \x03(\t\x12\x14\n\x0c\x64\x65nominators\x18\x03 \x03(\t\x1a\x43\n\x08RgbColor\x12\x0b\n\x03red\x18\x01 \x01(\r\x12\r\n\x05green\x18\x02 \x01(\r\x12\x0c\n\x04\x62lue\x18\x03 \x01(\r\x12\r\n\x05\x61lpha\x18\x04 \x01(\x01\x1aM\n\x08HslColor\x12\x0b\n\x03hue\x18\x01 \x01(\x01\x12\x12\n\nsaturation\x18\x02 \x01(\x01\x12\x11\n\tlightness\x18\x03 \x01(\x01\x12\r\n\x05\x61lpha\x18\x04 \x01(\x01\x1aL\n\x08HwbColor\x12\x0b\n\x03hue\x18\x01 \x01(\x01\x12\x11\n\twhiteness\x18\x02 \x01(\x01\x12\x11\n\tblackness\x18\x03 \x01(\x01\x12\r\n\x05\x61lpha\x18\x04 \x01(\x01\x1a\x87\x01\n\x04List\x12\x38\n\tseparator\x18\x01 \x01(\x0e\x32%.sass.embedded_protocol.ListSeparator\x12\x14\n\x0chas_brackets\x18\x02 \x01(\x08\x12/\n\x08\x63ontents\x18\x03 \x03(\x0b\x32\x1d.sass.embedded_protocol.Value\x1a\xa2\x01\n\x03Map\x12\x38\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\'.sass.embedded_protocol.Value.Map.Entry\x1a\x61\n\x05\x45ntry\x12*\n\x03key\x18\x01 \x01(\x0b\x32\x1d.sass.embedded_protocol.Value\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x1d.sass.embedded_protocol.Value\x1a\x1e\n\x10\x43ompilerFunction\x12\n\n\x02id\x18\x01 \x01(\r\x1a-\n\x0cHostFunction\x12\n\n\x02id\x18\x01 \x01(\r\x12\x11\n\tsignature\x18\x02 \x01(\t\x1a\xa1\x02\n\x0c\x41rgumentList\x12\n\n\x02id\x18\x01 \x01(\r\x12\x38\n\tseparator\x18\x02 \x01(\x0e\x32%.sass.embedded_protocol.ListSeparator\x12/\n\x08\x63ontents\x18\x03 \x03(\x0b\x32\x1d.sass.embedded_protocol.Value\x12J\n\x08keywords\x18\x04 \x03(\x0b\x32\x38.sass.embedded_protocol.Value.ArgumentList.KeywordsEntry\x1aN\n\rKeywordsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x1d.sass.embedded_protocol.Value:\x02\x38\x01\x1a\xef\x04\n\x0b\x43\x61lculation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\targuments\x18\x02 \x03(\x0b\x32:.sass.embedded_protocol.Value.Calculation.CalculationValue\x1a\x95\x02\n\x10\x43\x61lculationValue\x12\x36\n\x06number\x18\x01 \x01(\x0b\x32$.sass.embedded_protocol.Value.NumberH\x00\x12\x10\n\x06string\x18\x02 \x01(\tH\x00\x12\x17\n\rinterpolation\x18\x03 \x01(\tH\x00\x12S\n\toperation\x18\x04 \x01(\x0b\x32>.sass.embedded_protocol.Value.Calculation.CalculationOperationH\x00\x12@\n\x0b\x63\x61lculation\x18\x05 \x01(\x0b\x32).sass.embedded_protocol.Value.CalculationH\x00\x42\x07\n\x05value\x1a\xea\x01\n\x14\x43\x61lculationOperation\x12=\n\x08operator\x18\x01 \x01(\x0e\x32+.sass.embedded_protocol.CalculationOperator\x12H\n\x04left\x18\x02 \x01(\x0b\x32:.sass.embedded_protocol.Value.Calculation.CalculationValue\x12I\n\x05right\x18\x03 \x01(\x0b\x32:.sass.embedded_protocol.Value.Calculation.CalculationValueB\x07\n\x05value*+\n\x0bOutputStyle\x12\x0c\n\x08\x45XPANDED\x10\x00\x12\x0e\n\nCOMPRESSED\x10\x01*)\n\x06Syntax\x12\x08\n\x04SCSS\x10\x00\x12\x0c\n\x08INDENTED\x10\x01\x12\x07\n\x03\x43SS\x10\x02*?\n\x0cLogEventType\x12\x0b\n\x07WARNING\x10\x00\x12\x17\n\x13\x44\x45PRECATION_WARNING\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02*8\n\x11ProtocolErrorType\x12\t\n\x05PARSE\x10\x00\x12\n\n\x06PARAMS\x10\x01\x12\x0c\n\x08INTERNAL\x10\x02*?\n\rListSeparator\x12\t\n\x05\x43OMMA\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\t\n\x05SLASH\x10\x02\x12\r\n\tUNDECIDED\x10\x03*/\n\x0eSingletonValue\x12\x08\n\x04TRUE\x10\x00\x12\t\n\x05\x46\x41LSE\x10\x01\x12\x08\n\x04NULL\x10\x02*A\n\x13\x43\x61lculationOperator\x12\x08\n\x04PLUS\x10\x00\x12\t\n\x05MINUS\x10\x01\x12\t\n\x05TIMES\x10\x02\x12\n\n\x06\x44IVIDE\x10\x03\x62\x06proto3"
|
9
|
+
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
|
+
|
12
|
+
begin
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
14
|
+
rescue TypeError => e
|
15
|
+
# Compatibility code: will be removed in the next major version.
|
16
|
+
require 'google/protobuf/descriptor_pb'
|
17
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
18
|
+
parsed.clear_dependency
|
19
|
+
serialized = parsed.class.encode(parsed)
|
20
|
+
file = pool.add_serialized_file(serialized)
|
21
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
22
|
+
imports = [
|
23
|
+
]
|
24
|
+
imports.each do |type_name, expected_filename|
|
25
|
+
import_file = pool.lookup(type_name).file_descriptor
|
26
|
+
if import_file.name != expected_filename
|
27
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
297
28
|
end
|
298
29
|
end
|
30
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
31
|
+
warn "This will become an error in the next major version."
|
299
32
|
end
|
300
33
|
|
301
34
|
module Sass
|
data/ext/sass/package.json
CHANGED
data/lib/sass/compile_error.rb
CHANGED
@@ -4,25 +4,27 @@ module Sass
|
|
4
4
|
# An exception thrown because a Sass compilation failed.
|
5
5
|
class CompileError < StandardError
|
6
6
|
# @return [String, nil]
|
7
|
-
|
7
|
+
attr_reader :sass_stack
|
8
8
|
|
9
9
|
# @return [Logger::SourceSpan, nil]
|
10
|
-
|
10
|
+
attr_reader :span
|
11
11
|
|
12
|
-
|
12
|
+
# @return [Array<String>]
|
13
|
+
attr_reader :loaded_urls
|
14
|
+
|
15
|
+
def initialize(message, full_message, sass_stack, span, loaded_urls)
|
13
16
|
super(message)
|
14
|
-
@full_message = full_message
|
15
|
-
@sass_stack = sass_stack
|
17
|
+
@full_message = full_message
|
18
|
+
@sass_stack = sass_stack
|
16
19
|
@span = span
|
20
|
+
@loaded_urls = loaded_urls
|
17
21
|
end
|
18
22
|
|
19
23
|
# @return [String]
|
20
24
|
def full_message(...)
|
21
|
-
if @full_message.nil?
|
22
|
-
|
23
|
-
|
24
|
-
@full_message
|
25
|
-
end
|
25
|
+
return super(...) if @full_message.nil?
|
26
|
+
|
27
|
+
@full_message = +@full_message
|
26
28
|
end
|
27
29
|
end
|
28
30
|
end
|