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.
typed-cli
Advanced tools
[![Coverage Status](https://coveralls.io/repos/github/int0h/typed-cli/badge.svg?branch=master)](https://coveralls.io/github/int0h/typed-cli?branch=master)
Readme
A library to help you create type-safe CLI's fast and simple.
This project is still alive and maintained. But it is not in active development.
import {cli, option} from 'typed-cli';
import app from './app';
const {options} = cli({
options: {
env: option.oneOf(['dev', 'prod'] as const)
.alias('e')
.required()
.description('app environment'),
port: option.int
.alias('p')
.default(80)
.description('port'),
}
});
// port: number
// env: 'dev' | 'prod'
const {port, env} = options;
const DB_HOSTS = {
dev: 'localhost:1234',
prod: '1.2.3.4:9999',
} as const;
// Type safe!
// no "No index signature with a parameter of type 'string'" kind of errors
// because typeof env is 'dev' | 'prod'
app.run({
db: DB_HOSTS[env],
port
});
This code will behave like this:
You can test it without installing anything on your machine. Just go to the
(⚠️it's about 20Mb of traffic). It has interactive terminal and code editor, you can change the samples and see how it reacts.
The docs can be found here: https://int0h.github.io/typed-cli-docs/
FAQs
[![Coverage Status](https://coveralls.io/repos/github/int0h/typed-cli/badge.svg?branch=master)](https://coveralls.io/github/int0h/typed-cli?branch=master)
The npm package typed-cli receives a total of 99 weekly downloads. As such, typed-cli popularity was classified as not popular.
We found that typed-cli 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
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.