🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@prisma-next/config-loader

Package Overview
Dependencies
Maintainers
4
Versions
89
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

Source
npmnpm
Version
0.14.0-dev.55
Version published
Weekly downloads
6.8K
116.44%
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 10 Jul 2026

Did you know?

Socket

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.

Install

Related posts