MCPcopy Create free account
hub / github.com/vercel/vercel / validateConfiguredRuntime

Function validateConfiguredRuntime

packages/node/src/utils.ts:181–196  ·  view source on GitHub ↗
(
  runtime: string | undefined,
  entrypoint: string
)

Source from the content-addressed store, hash-verified

179const ALLOWED_RUNTIMES: string[] = [...Object.values(EdgeRuntimes), 'nodejs'];
180
181export function validateConfiguredRuntime(
182 runtime: string | undefined,
183 entrypoint: string
184) {
185 if (runtime) {
186 if (!ALLOWED_RUNTIMES.includes(runtime)) {
187 throw new Error(
188 `${entrypoint}: unsupported "runtime" value in \`config\`: ${JSON.stringify(
189 runtime
190 )} (must be one of: ${JSON.stringify(
191 ALLOWED_RUNTIMES
192 )}). Learn more: https://vercel.link/creating-edge-functions`
193 );
194 }
195 }
196}
197
198export async function serializeBody(
199 request: IncomingMessage

Callers 1

buildFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected