
Product
Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.
@prisma-next/sql-contract-emitter
Advanced tools
SQL emitter hook for Prisma Next.
This package provides the SQL-specific emitter hook implementation for the Prisma Next emitter. It validates SQL contracts and generates TypeScript type definitions for SQL contracts. It's part of the SQL tooling layer (migration plane) and implements the TargetFamilyHook interface.
Contract Validation: Validates SQL contract structure and types
validateTypes(): Validates type IDs against referenced extensions (receives ValidationContext with extensionIds)validateStructure(): Validates SQL-specific logical consistency (foreign key references, model-to-table mappings, constraint consistency). Note: Structural properties (required fields, types) are validated by Arktype schema validation - this function focuses on logical validation that schema validators can't perform.Type Generation: Generates TypeScript type definitions for SQL contracts
generateContractTypes(): Generates contract.d.ts file content (receives a codecTypeImports array)@prisma-next/contract (contract IR, TargetFamilyHook SPI, ValidationContext, TypesImportSpec - types moved to shared plane)@prisma-next/emitter (emitter core, EmitOptions, EmitResult)@prisma-next/sql-contract (SQL contract type definitions)@prisma-next/cli (uses for contract emission)@prisma-next/integration-tests (uses for contract emission tests)flowchart TD
subgraph "Framework Tooling Layer"
EMITTER[@prisma-next/emitter]
CLI[@prisma-next/cli]
end
subgraph "SQL Tooling Layer"
SQL_EMITTER[@prisma-next/sql-contract-emitter]
end
subgraph "SQL Core Layer (Shared Plane)"
CT[@prisma-next/sql-contract]
end
EMITTER --> SQL_EMITTER
CT --> SQL_EMITTER
SQL_EMITTER --> CLI
import { emit } from '@prisma-next/emitter';
import { sqlEmission } from '@prisma-next/sql-contract-emitter';
const result = await emit(contractIR, options, sqlEmission);
// result.contractDts contains generated TypeScript types
// result.contractJson contains validated contract JSON
FAQs
SQL emitter hook for Prisma Next
The npm package @prisma-next/sql-contract-emitter receives a total of 14,449 weekly downloads. As such, @prisma-next/sql-contract-emitter popularity was classified as popular.
We found that @prisma-next/sql-contract-emitter demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.

Research
/Security News
A new npm package tests AI malware scanners with prompt injection, safety-triggering comments, context flooding, and obfuscated JavaScript.