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

Function parseEntrypoint

packages/python/src/subscribers.ts:170–186  ·  view source on GitHub ↗
(
  name: string,
  value: string
)

Source from the content-addressed store, hash-verified

168}
169
170function parseEntrypoint(
171 name: string,
172 value: string
173): { moduleName: string; variableName: string; filePath: string } {
174 const match = MODULE_ATTR_RE.exec(value);
175 if (!match) {
176 throw subscriberError(
177 `subscriber "${name}" has invalid entrypoint "${value}". Use "module:object"`
178 );
179 }
180
181 return {
182 moduleName: match[1],
183 variableName: match[2],
184 filePath: `${match[1].replace(/\./g, '/')}.py`,
185 };
186}
187
188async function resolveExistingEntrypoint(
189 workPath: string,

Callers 1

parseSubscriberFunction · 0.85

Calls 2

subscriberErrorFunction · 0.85
replaceMethod · 0.80

Tested by

no test coverage detected