
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Stop manually syncing types between your backend and frontend. Auto-generate TypeScript types from your ORM schemas.
Stop manually syncing types between your backend and frontend.
Auto-generate TypeScript interfaces from your ORM schemas in real-time.
Full-stack TypeScript developers face a daily problem:
// Backend: Update User model
const userSchema = new Schema({
name: String,
email: String,
phoneNumber: String, // ← NEW FIELD
});
// Frontend: Types are now OUT OF SYNC ❌
interface User {
name: string;
email: string;
// Missing phoneNumber!
}
// Result: Runtime bugs that TypeScript should have caught
The consequences:
# One-time setup
npx typeweaver init
# Generate types once
npx typeweaver generate
# Or watch mode (auto-sync on every change)
npx typeweaver watch
That's it. Your frontend types stay in sync automatically.
If you're on Windows and using PowerShell, here are copy/paste-friendly commands:
# install deps
npm install
# interactive setup
npx typeweaver init
# generate types once
npx typeweaver generate
# watch mode
npx typeweaver watch
# run tests
npm test
# run dev CLI
npm run dev
npm install -D typeweaver
npx typeweaver init
This creates typeweaver.config.json:
{
"orm": "prisma",
"schemaPath": "./prisma/schema.prisma",
"outputPath": "./types",
"outputMode": "single"
}
# One-time generation
npx typeweaver generate
# Watch mode (auto-regenerate on changes)
npx typeweaver watch
| ORM | Status | Description |
|---|---|---|
| Prisma | ✅ Ready | Parse schema.prisma files |
| Mongoose | ✅ Ready | Parse Schema definitions |
| TypeORM | 🚧 Coming Soon | Parse decorators |
| Sequelize | 🚧 Coming Soon | Parse models |
// schema.prisma
model User {
id String @id @default(cuid())
email String @unique
name String
age Int?
posts Post[]
}
model Post {
id String @id
title String
content String?
author User @relation(fields: [authorId], references: [id])
authorId String
}
Generated TypeScript:
// types/index.ts
export interface User {
id: string;
email: string;
name: string;
age?: number | null;
posts: string[];
}
export interface Post {
id: string;
title: string;
content?: string | null;
author: string;
authorId: string;
}
// models/User.js
const userSchema = new Schema({
name: { type: String, required: true },
email: { type: String, required: true },
age: Number,
role: { type: String, enum: ["user", "admin"] },
posts: [{ type: Schema.Types.ObjectId, ref: "Post" }],
});
Generated TypeScript:
// types/index.ts
export interface User {
name: string;
email: string;
age?: number | null;
role: "user" | "admin";
posts: string[];
}
typeweaver.config.json){
"orm": "auto",
"modelsPath": "./models",
"schemaPath": "./prisma/schema.prisma",
"outputPath": "./types",
"outputMode": "single",
"watch": false,
"includeComments": true,
"exclude": ["**/node_modules/**", "**/*.test.{js,ts}"]
}
| Option | Type | Default | Description |
|---|---|---|---|
orm | string | "auto" | ORM to use: auto, prisma, mongoose |
modelsPath | string | "./models" | Path to Mongoose models |
schemaPath | string | "./prisma/schema.prisma" | Path to Prisma schema |
outputPath | string | "./types" | Where to generate types |
outputMode | string | "single" | single file or separate files |
watch | boolean | false | Enable watch mode |
includeComments | boolean | true | Include JSDoc comments |
readonly | boolean | false | Generate readonly properties |
exclude | string[] | [] | Files to exclude |
initInitialize configuration with interactive prompts.
npx typeweaver init
Options:
--force - Overwrite existing configgenerateGenerate types once from your schemas.
npx typeweaver generate
Options:
--config <path> - Custom config file path--output <path> - Override output path--dry-run - Preview without writing--verbose - Show detailed outputwatchWatch schemas and auto-generate types on changes.
npx typeweaver watch
Options:
--config <path> - Custom config file path--output <path> - Override output pathverifyVerify types are in sync with schemas (great for CI/CD).
npx typeweaver verify
infoShow current configuration.
npx typeweaver info
cleanRemove all generated type files.
npx typeweaver clean
Options:
--dry-run - Preview files to be deletedbackend/
models/
User.js
Post.js
typeweaver.config.json
frontend/
types/ ← Auto-generated
index.ts
{
"orm": "prisma",
"schemaPath": "./backend/schema.prisma",
"outputPath": [
"../web-app/src/types",
"../mobile-app/src/types",
"../admin-dashboard/src/types"
]
}
Generate types for your TypeScript SDK:
api/
schema.prisma
typeweaver.config.json → outputs to sdk/types/
sdk/
types/
index.ts ← Auto-generated
{
"customTypeMap": {
"ObjectId": "string",
"Mixed": "Record<string, any>"
}
}
{
"outputPath": ["./frontend/types", "./mobile/types"]
}
{
"exclude": ["**/node_modules/**", "**/*.test.js", "**/deprecated/**"]
}
| Solution | Zero Migration | Real-Time | No Stack Lock-in | Setup Time |
|---|---|---|---|---|
| typeweaver | ✅ | ✅ (<500ms) | ✅ | <1 min |
| GraphQL Codegen | ❌ (Requires GraphQL) | ⚠️ (Slow) | ❌ | Weeks |
| tRPC | ❌ (Full rewrite) | ✅ | ❌ | Days |
| Manual npm packages | ✅ | ❌ (10+ min) | ✅ | Hours |
| Monorepo sharing | ⚠️ (Complex) | ⚠️ (Requires rebuild) | ✅ | Days |
Contributions are welcome! See CONTRIBUTING.md.
# Clone repo
git clone https://github.com/yourusername/type-bridge.git
cd type-bridge
# Install dependencies
npm install
# Run tests
npm test
# Test CLI locally
node bin/typeweaver.js generate --help
MIT © TypeWeaver Contributors
Made with ❤️ for full-stack TypeScript developers
Stop wasting time on type synchronization. Start using typeweaver today! 🚀
FAQs
Stop manually syncing types between your backend and frontend. Auto-generate TypeScript types from your ORM schemas.
The npm package typeweaver receives a total of 31 weekly downloads. As such, typeweaver popularity was classified as not popular.
We found that typeweaver 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.