Comparing version 0.1.0 to 0.1.1
@@ -11,2 +11,7 @@ function _ColaRuntime$$error(_error) { | ||
function getJson() { | ||
var filename = arguments[0] !== undefined ? arguments[0] : _ColaRuntime$$error("Argument `filename` is required!"); | ||
return JSON.parse(FS.readFileSync(filename, "utf8")); | ||
} | ||
function tryToFindSource() { | ||
@@ -21,3 +26,3 @@ var filename = arguments[0] !== undefined ? arguments[0] : _ColaRuntime$$error("Argument `filename` is required!"), strict = arguments[1] !== undefined ? arguments[1] : false; | ||
} | ||
return false; | ||
return ""; | ||
} | ||
@@ -27,3 +32,3 @@ | ||
var file = arguments[0] !== undefined ? arguments[0] : _ColaRuntime$$error("Argument `file` is required!"), modules = arguments[1] !== undefined ? arguments[1] : _ColaRuntime$$error("Argument `modules` is required!"); | ||
var pkg = require("./" + file), path = Path.dirname(file), index; | ||
var pkg = getJson("./" + file), path = Path.dirname(file), index; | ||
if (index = tryToFindSource("" + path + "/index.js", true)) { | ||
@@ -30,0 +35,0 @@ return modules[pkg.name] = index; |
@@ -6,2 +6,4 @@ #!/usr/bin/env node | ||
const cs = require("colors"); | ||
const fs = require("fs"); | ||
@@ -8,0 +10,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://github.com/TrigenSoftware/Dr-Package", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"engines": { | ||
@@ -18,2 +18,3 @@ "node": ">=0.4.0" | ||
"dependencies": { | ||
"colors": "~0.6.2", | ||
"argue-cli": "~0.0.1" | ||
@@ -20,0 +21,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
79715
2095
2
2
+ Addedcolors@~0.6.2
+ Addedcolors@0.6.2(transitive)