Comparing version 1.0.2 to 1.0.3
16
index.js
#! /usr/bin/env node | ||
const path = require('path'); | ||
const params = process.argv.slice(4); | ||
const userModule = require('../../' + process.argv[2]); | ||
if (!process.argv[2]) { | ||
console.error('File name not provided i.e. run-func ./index.js'); | ||
process.exit(); | ||
} | ||
if (!process.argv[3]) { | ||
console.error('Function name not provided i.e. run-func ./index.js default'); | ||
process.exit(); | ||
} | ||
const userModule = require(path.join(process.cwd(), process.argv[2])); | ||
if (!userModule) { | ||
@@ -13,2 +24,1 @@ throw new Error(`Module ${userModule} does not exists`); | ||
userModule[process.argv[3]](...params); | ||
16
mem.js
#! /usr/bin/env node --max-old-space-size=4096 | ||
const path = require('path'); | ||
const params = process.argv.slice(4); | ||
const userModule = require('../../' + process.argv[2]); | ||
if (!process.argv[2]) { | ||
console.error('File name not provided i.e. run-func ./index.js'); | ||
process.exit(); | ||
} | ||
if (!process.argv[3]) { | ||
console.error('Function name not provided i.e. run-func ./index.js default'); | ||
process.exit(); | ||
} | ||
const userModule = require(path.join(process.cwd(), process.argv[2])); | ||
if (!userModule) { | ||
@@ -13,2 +24,1 @@ throw new Error(`Module ${userModule} does not exists`); | ||
userModule[process.argv[3]](...params); | ||
@@ -25,3 +25,3 @@ { | ||
}, | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"repository": { | ||
@@ -28,0 +28,0 @@ "type": "git", |
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
2465
38