Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
@keg-hub/cli-utils
Advanced tools
Common utility methods shared across Keg-Hub and Tap repos
With yarn
yarn add @keg-hub/cli-utils
With npm
npm install @keg-hub/cli-utils
runTask
- Find and execute a custom task
keg-cli
package.json
under the scripts
property
yarn
or npm
like this =>
// taps package.json file
"scripts": {
// ...other scripts
"task": "node ./node_modules/@keg-hub/cli-utils/src/runTask.js",
}
yarn task <task-name> <task-options>
start
task definition exists, running yarn task start
will call that task // package.json file
"scripts": {
// ...other scripts
"task": "node ./tasks/runTask.js",
}
// tasks/runTask.js file
const { runTask } = require('@keg-hub/cli-utils')
// Run some other logic prior to running a task
runTask()
~/.kegConfig/cli.config.json
if it existsoptions
property
params
key of the args
objectkeg-cli
keg-cli
setAppRoot
- Register a taps root directory
keg-cli
, the setAppRoot
method is NOT neededkeg-cli
will automatically find the root of a linked tap
keg tap link <tap-name>
from the taps rootkeg-cli
tasks will already know the taps root directorykeg-cli
, calling this method is highly recommended
mono-repo
or sym-linked
situations, the tap root can be properly resolvedtasks/index.js
file like this =>
const { setAppRoot } = require('@keg-hub/cli-utils')
setAppRoot(appRoot)
module.exports = { customTask: { ...taskDefinition } }
tasks/index.js
file for an exampleregisterTasks
- Register Custom Tasks
keg-cli
will automatically load custom tasks for a linked tap
tasks
folder in the root directorytasks
folder must have an index.js
registerTasks
is NOT needed
tasks
folder is NOT possiblekeg-cli
command for the tasks to be found
Object
argument that should contain key/value pairs task name/definitions
For example => registerTasks({ taskName: { ...taskDefinition } })
TODO: Add docs for exported utility methods
FAQs
Utility methods for writing Custom Tasks consumed by the Keg-CLI
The npm package @keg-hub/cli-utils receives a total of 684 weekly downloads. As such, @keg-hub/cli-utils popularity was classified as not popular.
We found that @keg-hub/cli-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.