New:Socket for Asana Is Now Available.Learn more
Get Started

@prisma-next/config-loader

Package Overview
Dependencies
Maintainers
4
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prisma-next/config-loader

Prisma Next config loader: discovers, validates, and finalizes prisma-next.config.ts

latest
Source
npmnpm
Version
0.16.0
Version published
Weekly downloads
14K
26.5%
Maintainers
4
Weekly downloads
 
Created
Source

@prisma-next/config-loader

Internal package. This package is an implementation detail of prisma-next and is published only to support its runtime. Its API is unstable and may change without notice. Do not depend on this package directly; install prisma-next instead.

Discovers, validates, and finalizes prisma-next.config.ts.

Overview

This package owns config loading — the file I/O (c12), validation, and finalization that turns a prisma-next.config.ts on disk into a resolved PrismaNextConfig. It also performs the emitter-derived artifact-collision check (getEmittedArtifactPaths).

It exposes a single loadConfig(configPath?) that maps failures to the CLI's structured @prisma-next/errors/control errors (CliStructuredError). Consumers that need to react to specific failures (e.g. the language server degrading on a missing/invalid config) branch on the structured error's stable code (4001 = config file not found, 4009 = config validation).

Usage

import { loadConfig } from '@prisma-next/config-loader';
import { CliStructuredError } from '@prisma-next/errors/control';

try {
  const config = await loadConfig('prisma-next.config.ts');
} catch (error) {
  if (error instanceof CliStructuredError && error.code === '4001') {
    // degrade gracefully on a missing config
  }
}

FAQs

Package last updated on 21 Jul 2026

Related posts