@solidpixels/less
Advanced tools
Comparing version 3.13.1-fork.3 to 3.13.1-fork.4
@@ -374,3 +374,2 @@ "use strict"; | ||
"clean", | ||
// "eslint", | ||
"shell:testbuild", | ||
@@ -380,4 +379,2 @@ "shell:test", | ||
"shell:plugin", | ||
"connect", | ||
"shell:runbrowser" | ||
]; | ||
@@ -384,0 +381,0 @@ |
@@ -33,2 +33,12 @@ "use strict"; | ||
}; | ||
FileManager.prototype.checkPrefix = function (filepath, prefixes) { | ||
if (prefixes.length === 0) | ||
return true; | ||
for (var i = 0; i < prefixes.length; i++) { | ||
if (filepath.indexOf(prefixes[i]) === 0) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
}; | ||
FileManager.prototype.loadFile = function (filename, currentDirectory, options, environment, callback) { | ||
@@ -81,2 +91,3 @@ var fullFilename; | ||
(function tryPrefix(j) { | ||
var _a; | ||
if (j < prefixes.length) { | ||
@@ -117,2 +128,5 @@ isNodeModule = false; | ||
} | ||
if (!self.checkPrefix(fullFilename, (_a = options.restrictedPaths) !== null && _a !== void 0 ? _a : [])) { | ||
throw new Error(); | ||
} | ||
var extension = path_1.default.extname(fullFilename); | ||
@@ -119,0 +133,0 @@ var readFileArgs = [fullFilename]; |
@@ -68,2 +68,3 @@ // lessc_helper.js | ||
console.log(' or --clean-css="advanced"'); | ||
console.log(' --import-path Add import path restriction'); | ||
console.log(' --disable-plugin-rule Disallow @plugin statements'); | ||
@@ -70,0 +71,0 @@ console.log(' --disable-network Disallow network requests made using default UrlFileManager'); |
@@ -56,2 +56,3 @@ "use strict"; | ||
'disablePluginRule', | ||
'restrictedPaths', | ||
'disableImportOptions', | ||
@@ -58,0 +59,0 @@ 'disableNetwork', |
@@ -55,4 +55,6 @@ "use strict"; | ||
/* This option allows you to specify a argument to go on to every URL. */ | ||
urlArgs: '' | ||
urlArgs: '', | ||
/** Restricted paths for imports */ | ||
restrictedPaths: [], | ||
}); }); | ||
//# sourceMappingURL=default-options.js.map |
{ | ||
"name": "@solidpixels/less", | ||
"version": "3.13.1-fork.3", | ||
"version": "3.13.1-fork.4", | ||
"description": "Leaner CSS", | ||
@@ -5,0 +5,0 @@ "homepage": "http://lesscss.org", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2764286
26949