
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Generate Zod schemas directly from your Postgres database. This packages extends Kanel with some Zod specific features.
/** Zod schema for actor */
export const actor = z.object({
actor_id: z.number(),
first_name: z.string(),
last_name: z.string(),
last_update: z.date(),
});
Assuming you already have Kanel installed, add this with
$ npm i -D kanel-zod
This pre-render hook will generate zod schemas for all your types. The default setup will convert the table name into camelCase
which is a semi-standard Typescript convention for items that aren't types.
The
To use it, add it to your .kanelrc.js
file:
const { generateZodSchemas } = require("kanel-zod");
module.exports = {
// ... your config here.
preRenderHooks: [generateZodSchemas],
};
zodCamelCaseHook
This pre-render hook will transform all zod object properties to camelCase
, for example:
/**Before the hook */
export const actor = z.object({
actor_id: z.number(),
first_name: z.string(),
last_name: z.string(),
last_update: z.date(),
});
/**After the hook */
export const actor = z.object({
actorId: z.number(),
firstName: z.string(),
lastName: z.string(),
lastUpdate: z.date(),
});
To use it, add it to your .kanelrc.js
file:
const { zodCamelCaseHook } = require("kanel-zod");
module.exports = {
// ... your config here.
preRenderHooks: [generateZodSchemas, zodCamelCaseHook],
};
FAQs
Zod extension for Kanel
We found that kanel-zod 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.