Comparing version 0.5.1 to 0.5.2
@@ -30,5 +30,5 @@ var helper = require("../lib/util"); | ||
else { | ||
cb(true); | ||
cb({code: "Not Found"}); | ||
} | ||
} | ||
}; | ||
}; |
@@ -41,2 +41,3 @@ var helper = require("../lib/util"); | ||
if (tpl !== null) { | ||
tpl = tpl.replace(/<!--\s{0,}#def([\s\S]*?)-->/gi, ''); | ||
var compiled = juicer(tpl)._render.toString().replace(/^function anonymous[^{]*?{([\s\S]*?)}$/img, function ($, fn_body) { | ||
@@ -68,5 +69,5 @@ return "function(_, _method) {" + method_body + fn_body + "};\n"; | ||
else { | ||
cb(true); | ||
cb({code: "Not Found"}); | ||
} | ||
} | ||
}; | ||
}; |
@@ -5,9 +5,9 @@ var fs = require("fs"); | ||
var dir = fs.readdirSync(__dirname + "/engines"); | ||
dir.forEach(function(i) { | ||
dir.forEach(function (i) { | ||
var name = path.basename(i, ".js"); | ||
exports[name] = require("./engines/"+name); | ||
exports[name] = require("./engines/" + name); | ||
}); | ||
exports.iconv = require("iconv-lite"); | ||
exports.iconv = require("iconv-lite"); | ||
exports.isUtf8 = require("is-utf8"); | ||
exports.juicer = require("juicer"); |
@@ -29,2 +29,2 @@ var fsLib = require("fs"); | ||
return _url; | ||
} | ||
}; |
{ | ||
"name": "dac", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "Dynamic Assets Compiler", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
5627
159