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

Function resolveExistingEntrypoint

packages/python/src/subscribers.ts:188–202  ·  view source on GitHub ↗
(
  workPath: string,
  filePath: string
)

Source from the content-addressed store, hash-verified

186}
187
188async function resolveExistingEntrypoint(
189 workPath: string,
190 filePath: string
191): Promise<string | null> {
192 const candidates = [filePath, filePath.replace(/\.py$/i, '/__init__.py')];
193 for (const candidate of candidates) {
194 try {
195 const stat = await fs.promises.stat(join(workPath, candidate));
196 if (stat.isFile()) {
197 return candidate;
198 }
199 } catch {}
200 }
201 return null;
202}
203
204function parseTopics(name: string, value: unknown): string[] {
205 if (!Array.isArray(value) || value.length === 0) {

Callers 1

parseSubscriberFunction · 0.85

Calls 3

replaceMethod · 0.80
statMethod · 0.80
isFileMethod · 0.45

Tested by

no test coverage detected