
Product
Microsoft Teams Notifications Are Now Available in Socket
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.
@prisma-next/sql-contract-psl
Advanced tools
PSL-first SQL contract interpretation for Prisma Next.
@prisma-next/sql-contract-psl provides two entrypoints:
@prisma-next/sql-contract-psl): parsed PSL document -> SQL Contract@prisma-next/sql-contract-psl/provider): read file -> parse -> interpret -> ContractConfigThis keeps core/CLI source-agnostic while giving PSL-first SQL users a one-line config helper.
SymbolTable into SQL Contract@id, @unique, @default, @relation, @map, @@map, @@control)DateTime @default(now()) (or the equivalent temporal.createdAt() field-preset call) as a storage default, and temporal.updatedAt() as an execution mutation defaulttypes {} blocks and inline field positions (for example ShortName = sql.String(length: 35) and embedding pgvector.Vector(length: 1536)?)@db.Char, @db.VarChar, @db.Numeric, @db.Uuid, @db.SmallInt, @db.Real, @db.Timestamp, @db.Timestamptz, @db.Date, @db.Time, @db.Timetz, @db.Json)models.<Model>.relationscodecId support on composed generator descriptorsread -> parse -> interpret) without local registry assemblynotOk with structured diagnostics for unsupported constructsDeterminism note:
contract.json snapshots and hashes are stable across environments.contract.json, contract.d.ts) and hashingThe pure interpreter entrypoint specifically excludes:
schema.prisma reading)parse + buildSymbolTable)contract.json, contract.d.ts) and hashingCurrent scope is SQL target-specific: callers pass scalar descriptors and target context assembled for the active SQL target.
Unsupported PSL constructs in v1 (strict errors):
String[]User.posts Post[] + Post.user User @relation(fields: [userId], references: [id])@relation("Name") or @relation(name: "Name") when multiple candidates exist@relation (name-only form); other field attributes are strict errorsSupported @default(...) surface in v1 when composed contributors provide handlers:
autoincrement(), now(), literals, dbgenerated("...")uuid(), uuid(4), uuid(7), cuid(2), ulid(), nanoid(), nanoid(<2-255>)cuid() (diagnostic suggests cuid(2))dbgenerated("...") preserves the parsed PSL string-literal contents as-is (escaped sequences are not normalized in v1).Supported timestamp authoring surface:
createdAt DateTime @default(now()) and createdAt temporal.createdAt() both lower to the target storage default and do not create an execution mutation default.updatedAt temporal.updatedAt() lowers to timestampNow on create and on non-empty update mutations. This is application-side because update-time semantics are mutation-aware, not a database trigger.@updatedAt attribute is not supported; references produce PSL_UNSUPPORTED_FIELD_ATTRIBUTE with a migration hint pointing at temporal.updatedAt(). The hint is suppressed when the field already declares any temporal.* preset.@createdAt is not supported as a PSL alias.Model-level control policy:
@@control(<policy>) lowers to the storage table's control field. The argument is one positional lowercase literal: managed, tolerated, external, or observed. Omit @@control to leave per-table control unset (the framework default applies at runtime).Contract-level default (specifier options bag):
defaultControlPolicy on prismaContract(...) sets Contract.defaultControlPolicy at load time when the interpreted contract does not already define one (source wins when both are present).@prisma-next/sql-contract-psl
interpretPslDocumentToSqlContract({ symbolTable, sourceFile, sourceId, target, scalarColumnDescriptors, composedExtensionContracts, seedDiagnostics?, authoringContributions?, controlMutationDefaults?, composedExtensions? }) — build symbolTable/sourceFile via parse(schema) + buildSymbolTable(...) from @prisma-next/psl-parser.@prisma-next/sql-contract-psl/provider
prismaContract(schemaPath, { output?, target, createNamespace, composedExtensionPackRefs?, defaultControlPolicy?, enumInferenceCodecs? }) — scalar column descriptors are derived from the composed stack's authoring type namespace at load time.@prisma-next/family-sql/control helpers).@prisma-next/psl-parser for parser + parser result types@prisma-next/sql-contract-ts for SQL authoring builder compositionpathe for provider path resolution@prisma-next/contract and @prisma-next/utilscontract.source@prisma-next/family-sql/control that assemble provider inputsflowchart LR
config[prisma-next.config.ts] --> providerHelper[@prisma-next/sql-contract-psl/provider]
providerHelper --> fsRead[read schema.prisma]
fsRead --> parse[parse]
parse --> parsed[DocumentAst + SourceFile + parser diagnostics]
parsed --> symbols[buildSymbolTable]
providerHelper --> descriptors[pslBlockDescriptors]
descriptors --> symbols
symbols --> symbolTable[SymbolTable + symbol-table diagnostics]
symbolTable --> interpreter[@prisma-next/sql-contract-psl]
interpreter --> irResult[Result_Contract_Diagnostics]
irResult --> emit[Framework emit pipeline]
docs/Architecture Overview.mddocs/architecture docs/subsystems/1. Data Contract.mddocs/architecture docs/subsystems/2. Contract Emitter & Types.mddocs/architecture docs/adrs/ADR 006 - Dual Authoring Modes.mddocs/architecture docs/adrs/ADR 163 - Provider-invoked source interpretation packages.mdFAQs
PSL-to-SQL ContractIR interpreter for Prisma Next
We found that @prisma-next/sql-contract-psl demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.

Security News
Socket CTO Ahmad Nassri joins AppSec leaders at Black Hat to discuss active malware, package manager risks, and software supply chain defense.