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

Function copyEntrypoint

packages/go/src/index.ts:716–723  ·  view source on GitHub ↗
(entrypoint: string, dest: string)

Source from the content-addressed store, hash-verified

714}
715
716async function copyEntrypoint(entrypoint: string, dest: string): Promise<void> {
717 const data = await readFile(entrypoint, 'utf8');
718
719 // Modify package to `package main`
720 const patched = data.replace(/\bpackage\W+\S+\b/, 'package main');
721
722 await writeFile(join(dest, 'entrypoint.go'), patched);
723}
724
725async function copyDevServer(
726 functionName: string,

Callers 1

startDevServerFunction · 0.85

Calls 2

replaceMethod · 0.80
readFileFunction · 0.50

Tested by

no test coverage detected