@moderate-cli/core
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -74,3 +74,2 @@ "use strict"; | ||
args[args.length - 1] = temp; | ||
let a = require(`${rootFile}`) | ||
const code = `require('${rootFile}').default.call(null, ${JSON.stringify(args)})`; | ||
@@ -77,0 +76,0 @@ const child = (0, utils_1.exec)("node", ["-e", code], { |
@@ -64,3 +64,2 @@ "use strict"; | ||
function checkUsrHome() { | ||
console.log(user_home_1.default); | ||
if (!user_home_1.default || !pathExistsSync(user_home_1.default)) { | ||
@@ -118,3 +117,2 @@ throw new Error(colors_1.default.red("当前登陆用户主目录不存在!")); | ||
function registerCommand() { | ||
console.log("registerCommand"); | ||
program | ||
@@ -125,3 +123,3 @@ .name(Object.keys(pkg.bin)[0]) | ||
.option("-d,--debug", "是否开启调试模式", false) | ||
.option("-tp,--targetPath <targetPath>", "是否指定本地调试文件路径", ""); | ||
.option("-tp,--targetPath <targetPath>", "设置packages中core的node_modules文件位置,直接拷贝文件夹绝对路径即可。"); | ||
// 初始化 | ||
@@ -151,3 +149,2 @@ program | ||
program.parse(process.argv); | ||
console.log("registerCommand"); | ||
if (program.args && program.args.length < 1) { | ||
@@ -158,4 +155,2 @@ program.outputHelp(); | ||
} | ||
core(); | ||
exports.default = core; | ||
module.exports = core; |
{ | ||
"name": "@moderate-cli/core", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "> TODO: description", | ||
@@ -51,3 +51,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "ff5f5e24e4e9bfdbf176ca65750653afd0954fc4" | ||
"gitHead": "222f51b2fd1db0c4c2ed7dcdf98648dbb52de652" | ||
} |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
13
11664
261