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

Function parseVercelConfig

packages/client/src/utils/index.ts:58–74  ·  view source on GitHub ↗
(
  filePath?: string
)

Source from the content-addressed store, hash-verified

56}
57
58export async function parseVercelConfig(
59 filePath?: string
60): Promise<VercelConfig> {
61 if (!filePath) {
62 return {};
63 }
64
65 try {
66 const jsonString = await readFile(filePath, 'utf8');
67
68 return JSON.parse(jsonString);
69 } catch (e) {
70 console.error(e);
71
72 return {};
73 }
74}
75
76const maybeRead = async function <T>(path: string, default_: T) {
77 try {

Callers

nothing calls this directly

Calls 3

errorMethod · 0.80
readFileFunction · 0.50
parseMethod · 0.45

Tested by

no test coverage detected