MCPcopy
hub / github.com/FredKSchott/snowpack / logFetching

Function logFetching

snowpack/src/sources/remote.ts:18–31  ·  view source on GitHub ↗
(origin: string, packageName: string, packageSemver: string | undefined)

Source from the content-addressed store, hash-verified

16
17const fetchedPackages = new Set<string>();
18function logFetching(origin: string, packageName: string, packageSemver: string | undefined) {
19 if (fetchedPackages.has(packageName)) {
20 return;
21 }
22 fetchedPackages.add(packageName);
23 logger.info(
24 `import ${colors.bold(packageName + (packageSemver ? `@${packageSemver}` : ''))} ${colors.dim(
25 `→ ${origin}/${packageName}`,
26 )}`,
27 );
28 if (!packageSemver || packageSemver === 'latest') {
29 logger.info(colors.yellow(`pin dependency to this version: \`snowpack add ${packageName}\``));
30 }
31}
32
33/**
34 * Remote Package Source: A generic interface through which

Callers 1

loadMethod · 0.85

Calls 2

addMethod · 0.80
infoMethod · 0.80

Tested by

no test coverage detected