terraform 1.25.2 → 1.26.0
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.
|
@@ -53,7 +53,7 @@ exports.compile = function(rootPath, filePath, options, callback){
|
|
|
53
53
|
paths: dirs, // Specify search paths for @import directives
|
|
54
54
|
filename: filePath, // Specify a filename, for better error messages
|
|
55
55
|
compress: false, // Minify CSS output
|
|
56
|
-
sourceMap: true
|
|
56
|
+
sourceMap: { disableSourcemapAnnotation: true } // return map separately, don't embed the /*# sourceMappingURL */ comment
|
|
57
57
|
}, function(e, css){
|
|
58
58
|
if (e) return callback(formatError(e))
|
|
59
59
|
var map = css.map || ""
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
var sass = require("sass")
|
|
2
|
+
var url = require("url")
|
|
2
3
|
var TerraformError = require("../../error").TerraformError
|
|
3
4
|
var path = require("path")
|
|
4
5
|
var fs = require("fs")
|
|
@@ -6,7 +7,7 @@ var fs = require("fs")
|
|
|
6
7
|
exports.compile = function(rootPath, filePath, options, callback){
|
|
7
8
|
|
|
8
9
|
var srcFullPath = path.resolve(rootPath, filePath)
|
|
9
|
-
|
|
10
|
+
|
|
10
11
|
try{
|
|
11
12
|
var fileContents = fs.readFileSync(srcFullPath)
|
|
12
13
|
}catch(e){
|
|
@@ -18,28 +19,25 @@ exports.compile = function(rootPath, filePath, options, callback){
|
|
|
18
19
|
path.dirname(path.resolve(rootPath))
|
|
19
20
|
]
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
callback(null, css.css.toString(), css.map.toString())
|
|
44
|
-
});
|
|
22
|
+
try{
|
|
23
|
+
var result = sass.compile(srcFullPath, {
|
|
24
|
+
loadPaths: dirs,
|
|
25
|
+
style: 'compressed',
|
|
26
|
+
sourceMap: true,
|
|
27
|
+
sourceMapIncludeSources: true
|
|
28
|
+
})
|
|
29
|
+
}catch(e){
|
|
30
|
+
var error = new TerraformError({
|
|
31
|
+
source: "Sass",
|
|
32
|
+
dest: "CSS",
|
|
33
|
+
lineno: (e.span && e.span.start ? e.span.start.line + 1 : null) || 99,
|
|
34
|
+
name: "Sass Error",
|
|
35
|
+
message: e.sassMessage || e.message,
|
|
36
|
+
filename: (e.span && e.span.url ? url.fileURLToPath(e.span.url) : null) || filePath,
|
|
37
|
+
stack: fileContents.toString()
|
|
38
|
+
})
|
|
39
|
+
return callback(error)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
callback(null, result.css.toString(), JSON.stringify(result.sourceMap))
|
|
45
43
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
var
|
|
1
|
+
var sass = require("sass")
|
|
2
|
+
var url = require("url")
|
|
2
3
|
var TerraformError = require("../../error").TerraformError
|
|
3
4
|
var path = require("path")
|
|
4
5
|
var fs = require("fs")
|
|
@@ -6,7 +7,7 @@ var fs = require("fs")
|
|
|
6
7
|
exports.compile = function(rootPath, filePath, options, callback){
|
|
7
8
|
|
|
8
9
|
var srcFullPath = path.resolve(rootPath, filePath)
|
|
9
|
-
|
|
10
|
+
|
|
10
11
|
try{
|
|
11
12
|
var fileContents = fs.readFileSync(srcFullPath)
|
|
12
13
|
}catch(e){
|
|
@@ -18,28 +19,25 @@ exports.compile = function(rootPath, filePath, options, callback){
|
|
|
18
19
|
path.dirname(path.resolve(rootPath))
|
|
19
20
|
]
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
callback(null, css.css.toString(), css.map.toString())
|
|
44
|
-
});
|
|
22
|
+
try{
|
|
23
|
+
var result = sass.compile(srcFullPath, {
|
|
24
|
+
loadPaths: dirs,
|
|
25
|
+
style: 'compressed',
|
|
26
|
+
sourceMap: true,
|
|
27
|
+
sourceMapIncludeSources: true
|
|
28
|
+
})
|
|
29
|
+
}catch(e){
|
|
30
|
+
var error = new TerraformError({
|
|
31
|
+
source: "Sass",
|
|
32
|
+
dest: "CSS",
|
|
33
|
+
lineno: (e.span && e.span.start ? e.span.start.line + 1 : null) || 99,
|
|
34
|
+
name: "Sass Error",
|
|
35
|
+
message: e.sassMessage || e.message,
|
|
36
|
+
filename: (e.span && e.span.url ? url.fileURLToPath(e.span.url) : null) || filePath,
|
|
37
|
+
stack: fileContents.toString()
|
|
38
|
+
})
|
|
39
|
+
return callback(error)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
callback(null, result.css.toString(), JSON.stringify(result.sourceMap))
|
|
45
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "terraform",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"description": "pre-processor engine that powers the harp web server",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
"esbuild": "0.28.1",
|
|
50
50
|
"lru-cache": "10.0.0",
|
|
51
51
|
"marked": "5.1.2",
|
|
52
|
-
"sass": "1.
|
|
52
|
+
"sass": "1.101.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"coffeescript": "2.7.0",
|
|
56
|
-
"less": "4.
|
|
57
|
-
"mocha": "
|
|
58
|
-
"should": "
|
|
59
|
-
"stylus": "0.
|
|
56
|
+
"less": "4.6.7",
|
|
57
|
+
"mocha": "11.7.6",
|
|
58
|
+
"should": "13.2.3",
|
|
59
|
+
"stylus": "0.64.0"
|
|
60
60
|
}
|
|
61
61
|
}
|