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

Function installInjectedDevPackage

packages/python/src/start-dev-server.ts:322–336  ·  view source on GitHub ↗
(
  pkg: InjectedPackageSpec,
  opts: DevPythonOptions
)

Source from the content-addressed store, hash-verified

320}
321
322async function installInjectedDevPackage(
323 pkg: InjectedPackageSpec,
324 opts: DevPythonOptions
325): Promise<void> {
326 const targetDir = join(opts.workPath, '.vercel', 'python');
327 const key = `${targetDir}:${pkg.name}`;
328
329 let pending = PENDING_INSTALLS.get(key);
330 if (!pending) {
331 pending = doInstallInjectedDevPackage(pkg, { ...opts, targetDir });
332 PENDING_INSTALLS.set(key, pending);
333 pending.finally(() => PENDING_INSTALLS.delete(key));
334 }
335 await pending;
336}
337
338async function doInstallInjectedDevPackage(
339 pkg: InjectedPackageSpec,

Callers 1

startDevServerFunction · 0.85

Calls 4

getMethod · 0.65
setMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected