sass-embedded 1.80.4 → 1.80.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/sass/Rakefile +81 -30
- data/ext/sass/package.json +1 -1
- data/lib/sass/compiler/host.rb +1 -1
- 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: 48f9a046796c1128fee72e53aae8da123f2d37d35cf0d27e33e9258f2f58ece6
|
4
|
+
data.tar.gz: 839809b0866cf6aed49542e7a4fca8fd64bf01d1a4d15b79be8ca1de630132aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da49936d0d5279f7effac246d314d0138aafee881e167ad619c2f92fb47a3372170fde648c2fe12ed1cd4f33ff26063c5b461a14957e056aff94a7ac7a54dfc2
|
7
|
+
data.tar.gz: 371313ed88a584d86c0b841d35347c309a314b935b5acb8fef509660f3ed44ec748f9eeeb905d2dcba26575239b457cd42805d7c4d50e3cd659621a9bdafa753
|
data/ext/sass/Rakefile
CHANGED
@@ -8,17 +8,32 @@ 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
|
-
CLEAN.include %w[
|
12
|
-
|
13
|
-
|
11
|
+
CLEAN.include %w[
|
12
|
+
protoc.exe
|
13
|
+
ruby
|
14
|
+
*.proto
|
15
|
+
*.tar.gz
|
16
|
+
*.zip
|
17
|
+
]
|
18
|
+
|
19
|
+
CLOBBER.include %w[
|
20
|
+
dart-sass
|
21
|
+
cli.rb
|
22
|
+
embedded_sass_pb.rb
|
23
|
+
node_modules
|
24
|
+
bun.lockb
|
25
|
+
package-lock.json
|
26
|
+
pnpm-lock.yaml
|
27
|
+
yarn.lock
|
28
|
+
]
|
14
29
|
|
15
30
|
file 'protoc.exe' do |t|
|
16
31
|
fetch(ENV.fetch('PROTOC_BIN') { SassConfig.default_protoc }, t.name)
|
17
32
|
chmod 'a+x', t.name
|
18
33
|
end
|
19
34
|
|
20
|
-
file 'dart-sass' do |t|
|
21
|
-
raise if ENV.key?('DART_SASS')
|
35
|
+
file 'dart-sass/sass' do |t|
|
36
|
+
raise RuntimeError if ENV.key?('DART_SASS')
|
22
37
|
|
23
38
|
gem_install 'sass-embedded', SassConfig.gem_version, SassConfig.gem_platform do |dir|
|
24
39
|
mv File.absolute_path("ext/sass/#{t.name}", dir), t.name
|
@@ -29,34 +44,68 @@ rescue StandardError
|
|
29
44
|
rm archive
|
30
45
|
end
|
31
46
|
|
47
|
+
file 'node_modules/sass' do
|
48
|
+
sh 'npm', 'install'
|
49
|
+
rescue StandardError
|
50
|
+
begin
|
51
|
+
sh 'yarn', 'install'
|
52
|
+
rescue StandardError
|
53
|
+
begin
|
54
|
+
sh 'pnpm', 'install'
|
55
|
+
rescue StandardError
|
56
|
+
sh 'bun', 'install'
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
task 'dart-sass' do
|
62
|
+
Rake::Task['dart-sass/sass'].invoke
|
63
|
+
rescue NotImplementedError
|
64
|
+
Rake::Task['node_modules/sass'].invoke
|
65
|
+
end
|
66
|
+
|
32
67
|
file 'cli.rb' => %w[dart-sass] do |t|
|
33
68
|
require_relative '../../lib/sass/elf'
|
34
69
|
|
35
|
-
|
36
|
-
|
70
|
+
begin
|
71
|
+
exe = 'dart-sass/sass'
|
72
|
+
exe = "#{exe}#{['', '.bat', '.exe'].find { |ext| File.exist?("#{exe}#{ext}") }}"
|
37
73
|
|
38
|
-
|
74
|
+
raise Errno::ENOENT, exe unless File.exist?(exe)
|
39
75
|
|
40
|
-
|
41
|
-
|
42
|
-
|
76
|
+
runtime = 'dart-sass/src/dart'
|
77
|
+
runtime = "#{runtime}#{['', '.exe'].find { |ext| File.exist?("#{runtime}#{ext}") }}"
|
78
|
+
snapshot = 'dart-sass/src/sass.snapshot'
|
43
79
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
80
|
+
command = if File.exist?(runtime) && File.exist?(snapshot)
|
81
|
+
[runtime, snapshot]
|
82
|
+
else
|
83
|
+
[exe]
|
84
|
+
end
|
49
85
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
86
|
+
interpreter = File.open(command[0], 'rb') do |file|
|
87
|
+
Sass.const_get(:ELF).new(file).interpreter
|
88
|
+
rescue ArgumentError
|
89
|
+
nil
|
90
|
+
end
|
55
91
|
|
56
|
-
|
57
|
-
|
58
|
-
|
92
|
+
command_source = command.map do |argument|
|
93
|
+
"File.absolute_path('#{argument}', __dir__).freeze"
|
94
|
+
end.join(',
|
59
95
|
')
|
96
|
+
rescue Errno::ENOENT
|
97
|
+
package = 'node_modules/sass'
|
98
|
+
|
99
|
+
script = File.join(package, SassConfig.package_json(package)['bin']['sass'])
|
100
|
+
|
101
|
+
interpreter = nil
|
102
|
+
|
103
|
+
command_source = [
|
104
|
+
"'node'",
|
105
|
+
"File.absolute_path('#{script}', __dir__).freeze"
|
106
|
+
].join(',
|
107
|
+
')
|
108
|
+
end
|
60
109
|
|
61
110
|
if interpreter.nil?
|
62
111
|
File.write(t.name, <<~CLI_RB)
|
@@ -135,7 +184,7 @@ module FileUtils
|
|
135
184
|
entry = entries.nextElement
|
136
185
|
name = entry.getName
|
137
186
|
path = dest_path.resolve(name).normalize
|
138
|
-
raise unless path.startsWith(dest_path)
|
187
|
+
raise SecurityError unless path.startsWith(dest_path)
|
139
188
|
|
140
189
|
Rake.rake_output_message " inflating: #{name}" if Rake::FileUtilsExt.verbose_flag
|
141
190
|
|
@@ -231,7 +280,7 @@ module FileUtils
|
|
231
280
|
s.platform == platform
|
232
281
|
end
|
233
282
|
|
234
|
-
raise if resolver_spec.nil?
|
283
|
+
raise Gem::UnsatisfiableDependencyError, dependency_request if resolver_spec.nil?
|
235
284
|
|
236
285
|
options = { force: true, install_dir: }
|
237
286
|
if Rake::FileUtilsExt.nowrite_flag
|
@@ -290,12 +339,14 @@ module SassConfig
|
|
290
339
|
|
291
340
|
module_function
|
292
341
|
|
293
|
-
def
|
342
|
+
def package_json(path = '.')
|
294
343
|
require 'json'
|
295
344
|
|
296
|
-
|
345
|
+
JSON.parse(File.read(File.absolute_path('package.json', path)))
|
346
|
+
end
|
297
347
|
|
298
|
-
|
348
|
+
def dart_sass_version
|
349
|
+
package_json['dependencies']['sass']
|
299
350
|
end
|
300
351
|
|
301
352
|
def default_dart_sass
|
@@ -359,7 +410,7 @@ module SassConfig
|
|
359
410
|
os = case Platform::OS
|
360
411
|
when 'darwin'
|
361
412
|
'osx'
|
362
|
-
when 'linux'
|
413
|
+
when 'linux', 'linux-android', 'linux-musl', 'linux-uclibc'
|
363
414
|
'linux'
|
364
415
|
when 'windows'
|
365
416
|
'windows'
|
data/ext/sass/package.json
CHANGED
data/lib/sass/compiler/host.rb
CHANGED
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.80.
|
4
|
+
version: 1.80.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- なつき
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -125,8 +125,8 @@ licenses:
|
|
125
125
|
- MIT
|
126
126
|
metadata:
|
127
127
|
bug_tracker_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/issues
|
128
|
-
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.80.
|
129
|
-
source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.80.
|
128
|
+
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.80.5
|
129
|
+
source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.80.5
|
130
130
|
funding_uri: https://github.com/sponsors/ntkme
|
131
131
|
rubygems_mfa_required: 'true'
|
132
132
|
post_install_message:
|