Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@absolunet/cli
Advanced tools
Readme
CLI utilities
Built around meow
$ npm install @absolunet/cli
const cli = require('@absolunet/cli');
cli.initTasksList('./tasks');
cli.setUsageTasks({
// Base
'start': ['start', 'Start project'],
'stop': ['stop', 'Stop project'],
'log': [`log ${cli.optionalPlaceholder('<sub>')}`, 'Show log for sub', ['sub1', 'sub2']],
// Options
'--help': ['-h, --help', 'Show help'],
'--version': ['-v, --version', 'Show version']
});
cli.setFullUsage({
'Base': ['start', 'stop', 'log'],
'Options': ['--help', '--version']
});
console.log(cli.fullUsage);
Test project description
Usage: testprj <command>
Base
start Start project
stop Stop project
log [<sub>] Show log for sub [sub1|sub2]
Options
-h, --help Show help
-v, --version Show version
testprj@1.2.3 /usr/local/bin/testprj
init([options])
Build tasks list from js filenames
Type: string
Path to package.json
folder
Type: object
package.json
-like object
initTasksList(tasksPath)
Build tasks list from js filenames
Required
Type: string
Path to tasks folder
tasksRouter(meowCli)
Require task file specified by CLI
Required
Type: object
meow object
tasks
Type: Array
List of tasks
placeholder(name)
Look placeholder
Return string
of looked placeholder
Required
Type: string
Text to theme
optional(name)
Look optional
Return string
of looked optional
Required
Type: string
Text to theme
optionalPlaceholder(name)
Look optional placeholder
Return string
of looked optional placeholder
Required
Type: string
Text to theme
setUsageTasks(commands)
Set tasks usage and autocomplete data
Required
Type: object
Check example for structure
setFullUsage(fullUsage [, options])
Set full usage structure
Required
Type: object
Check example for structure
Type: boolean
Show version and bin location
Default: true
getTaskUsage(task)
Get task usage
Return string
of task usage
Required
Type: string
Check example for structure
showTaskUsage(meowCli)
Display task usage and quit
Required
Type: object
meow object
fullUsage
Type: string
Description and tasks formatted as a user manual
refuseArguments(meowCli)
Show task usage and quit if CLI call has arguments
Required
Type: object
meow object
ow
Type: Object
Instance of local ow
refuseFlags(meowCli)
Show task usage and quit if CLI call has flags
Required
Type: object
meow object
refuseFlagsAndArguments(meowCli)
Show task usage and quit if CLI call has arguments or flags
Required
Type: object
meow object
validateFlags(meowCli, flag)
Show task usage and quit if CLI call has flags that are not whitelisted and do not validate
Return object
of flags values
Required
Type: object
meow object
Required
Type: object
of flag validators
Whitelisted flags and their ow
predicate (use cli.ow
to ensure to use the same version)
isRoot()
Check if CLI is run by root user
Return boolean
binName
Type: string
Binary name
rawArguments
Type: string
Space separated arguments from terminal
MIT © Absolunet
FAQs
CLI utilities
The npm package @absolunet/cli receives a total of 56 weekly downloads. As such, @absolunet/cli popularity was classified as not popular.
We found that @absolunet/cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.