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.
@tsdl/tree
Advanced tools
Readme
TSDL router tree visualizer
@tsdl/bun, @tsdl/client, @tsdl/core, @tsdl/dashboard, @tsdl/express, @tsdl/gui, @tsdl/node, @tsdl/react-query, @tsdl/server, @tsdl/tree
TSDL, short for Type-Safe Data Layer, is a transport layer designed to blur the line between client and server side. TSDL is an end-to-end http communication framework that makes your backend a type-safe library for your frontend.
const router = tsdl.router({
auth: tsdl.router({
login: tsdl // ✓ structured and nestable routes, easily refactored
.use(logger) // ✓ reusable and powerful middleware support
.use(cors)
.input(loginSchema) // ✓ Zod, Ajv, Joi, Yup etc. or custom
.query(async ({ input }) => {
input.username // ✓ type inferred and input schema validated
const user = await db.findOne({
where: { username: input.username }
});
if (!user) {
// ✓ consistent and simple error handling
throw new TSDLError(404, "oops");
}
// ✓ return any JS value to the client
return user;
}),
}),
});
const onSubmit = async () => {
try {
const result = await tsdl.auth.login({
username: form.username, // ✓ write with confidence, inputs are type safe
});
// ✓ correctly inferred JSON serialized type
console.log(result);
} catch(e) {
// (e is unknown by default, this is just for type inference)
if (e instanceof TSDLError) {
// ✓ handle errors with confidence and consistency
console.log(e.message); // "oops"
console.log(e.code); // "Not Found"
console.log(e.numberCode); // 404
}
}
}
Ready to dive in? Getting started guide
@tsdl/express
@tsdl/tree
@tsdl/react-query
TSDL is developed as a monorepo using Nx for cloud runs and caching as well as Lerna for package linking and publishing.
git clone https://github.com/asplunds/tsdl.git tsdl
npm i
cd meta/docs
npm run dev
(assuming dependencies are installed)npm run build
check that it buildsnpm run start
previewnpm run release
If you suspect you have caused a circular dependency (easily done in monorepos), you can run npx madge -c
in the project root.
Merge into branch preview
(for preview) or branch docs
for live. The CI/CD workflows will automatically build the Nextra documentation site and deploy it to Cloudflare.
TSDL was originally created by the developers at Enter Technologies, it's used internally on projects such as GyRank and markanvisning.se but was later open sourced.
This README is auto-generated
FAQs
TSDL router tree visualizer
The npm package @tsdl/tree receives a total of 7 weekly downloads. As such, @tsdl/tree popularity was classified as not popular.
We found that @tsdl/tree demonstrated a healthy version release cadence and project activity because the last version was released less than 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.