Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,192
  • Linux
  • Apple
addPreamble.ts1.08 kB
import { FileMap } from '../generateClient' const generatedCodePreamble = ` /* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file ` const tsNoCheckPreamble = `// @ts-nocheck \n` const extensions = ['.ts', '.cts', '.mts', '.js', '.cjs', '.mjs'] /** * To ensure it is clear that this is generated code and shall not be lint and type checked. * We still want to typecheck the generated code during our client tests => includeTSNoCheckPreamble = false. */ export function addPreambleToSourceFiles(fileMap: FileMap, includeTSNoCheckPreamble: Boolean) { for (const [key, value] of Object.entries(fileMap)) { if ((typeof value === 'string' || Buffer.isBuffer(value)) && extensions.some((ext) => key.endsWith(ext))) { fileMap[key] = generatedCodePreamble + (includeTSNoCheckPreamble ? tsNoCheckPreamble : '') + value.toString() } else if (typeof value === 'object' && value !== null && !Buffer.isBuffer(value)) { addPreambleToSourceFiles(value, includeTSNoCheckPreamble) } } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/prisma/prisma'

If you have feedback or need assistance with the MCP directory API, please join our Discord server