
Security News
New Study Identifies 53 Slopsquatting Targets Across 5 Frontier LLMs
Five frontier LLMs generated the same nonexistent package names, leaving 53 available for potential slopsquatting across PyPI and npm.
@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, scalarTypeDescriptors, composedExtensionContracts, seedDiagnostics?, authoringContributions?, controlMutationDefaults?, composedExtensionPacks? }) — build symbolTable/sourceFile via parse(schema) + buildSymbolTable(...) from @prisma-next/psl-parser.@prisma-next/sql-contract-psl/provider
prismaContract(schemaPath, { output?, target, defaultControlPolicy?, scalarTypeDescriptors, composedExtensionContracts?, authoringContributions?, controlMutationDefaults?, composedExtensionPacks? })@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
The npm package @prisma-next/sql-contract-psl receives a total of 17,189 weekly downloads. As such, @prisma-next/sql-contract-psl popularity was classified as popular.
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.
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
Five frontier LLMs generated the same nonexistent package names, leaving 53 available for potential slopsquatting across PyPI and npm.

Security News
The White House’s Gold Eagle Initiative aims to coordinate AI-discovered vulnerabilities, validate findings, and accelerate patching across critical software.

Security News
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.