Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
@keg-hub/cli-utils
Advanced tools
Utility methods for writing Custom Tasks consumed by the Keg-CLI
With yarn
yarn add @keg-hub/cli-utils
With npm
npm install @keg-hub/cli-utils
runTask
- Find and execute a task
package.json - scripts
section
yarn
or npm
like this =>
// In your package.json file
"scripts": {
// ...other scripts
"task": "node ./tasks/runTask.js",
}
// In tasks/runTask.js
const { runTask } = require('@keg-hub/cli-utils')
const taskDefinitions = require('./taskDefinitions')
runTask(
// Object containing all tasks definitions for the project
taskDefinitions,
// Default params passed to all tasks
{ env: process.env.NODE_ENV || 'local' }
)
yarn task <task-name> <task-options>
start
task definition exists, running yarn task start
will call the start task~/.kegConfig/cli.config.json
if it existsoptions
property
params
key of the args
objectsetAppRoot
- Register a taps root directory
keg-cli
, calling this method is recommended
mono-repo
or sym-linked
situations, the project root can be properly resolved const { setAppRoot } = require('@keg-hub/cli-utils')
setAppRoot(appRoot)
module.exports = { customTask: { ...taskDefinition } }
tasks/index.js
file for an exampleregisterTasks
- Register Custom Tasks
registerTasks
is NOT needed
runTask
is not possible
runTask
method to ensure the tasks are loaded
Object
argument that should contain key/value pairs task name/definitions
For example => registerTasks({ taskName: { ...taskDefinition } })
FAQs
Utility methods for writing Custom Tasks consumed by the Keg-CLI
The npm package @keg-hub/cli-utils receives a total of 1,009 weekly downloads. As such, @keg-hub/cli-utils popularity was classified as 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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.