MCPcopy Index your code
hub / github.com/vercel/next-forge / getPackageManager

Function getPackageManager

scripts/initialize.ts:201–223  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

199};
200
201const getPackageManager = async (): Promise<PackageManagerName> => {
202 const detected = await detectPackageManager(process.cwd());
203
204 if (detected) {
205 return detected.name;
206 }
207
208 const value = await select({
209 message: "Which package manager would you like to use?",
210 options: supportedPackageManagers.map((choice) => ({
211 value: choice,
212 label: choice,
213 })),
214 initialValue: "bun" as PackageManagerName,
215 });
216
217 if (isCancel(value)) {
218 cancel("Operation cancelled.");
219 process.exit(0);
220 }
221
222 return value as PackageManagerName;
223};
224
225export const initialize = async (options: {
226 name?: string;

Callers 1

initializeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected