@react-ddd/cli
Advanced tools
+14
-1
@@ -7,2 +7,15 @@ "use strict"; | ||
| const yargs_interactive_1 = __importDefault(require("yargs-interactive")); | ||
| const fs_1 = __importDefault(require("fs")); | ||
| const path_1 = __importDefault(require("path")); | ||
| const fp_1 = require("lodash/fp"); | ||
| const scanForPackageJson = (dir) => { | ||
| const files = fs_1.default.readdirSync(dir); | ||
| if ((0, fp_1.find)('package.json', files)) { | ||
| return dir; | ||
| } | ||
| if (dir === path_1.default.dirname(dir)) { | ||
| throw new Error('No project found'); | ||
| } | ||
| return scanForPackageJson(path_1.default.dirname(dir)); | ||
| }; | ||
| (0, yargs_interactive_1.default)() | ||
@@ -12,5 +25,5 @@ .scriptName('rgen') | ||
| .demandCommand() | ||
| .option('project', { default: process.env.PWD }) | ||
| .option('project', { default: scanForPackageJson(process.cwd()) }) | ||
| .hide('interactive') | ||
| .help() | ||
| .argv; |
+1
-1
| { | ||
| "name": "@react-ddd/cli", | ||
| "version": "0.0.8", | ||
| "version": "0.0.9", | ||
| "description": "Code generation", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
59102
0.84%465
2.88%