MCPcopy Create free account
hub / github.com/modelcontextprotocol/mcpb / promptOptionalFields

Function promptOptionalFields

src/cli/init.ts:352–383  ·  view source on GitHub ↗
(packageData: PackageJson)

Source from the content-addressed store, hash-verified

350}
351
352export async function promptOptionalFields(packageData: PackageJson) {
353 const keywords = await input({
354 message: "Keywords (comma-separated, optional):",
355 default: "",
356 });
357
358 const license = await input({
359 message: "License:",
360 default: packageData.license || "MIT",
361 });
362
363 const addRepository = await confirm({
364 message: "Add repository information?",
365 default: !!packageData.repository,
366 });
367
368 let repository: { type: string; url: string } | undefined;
369 if (addRepository) {
370 const repoUrl = await input({
371 message: "Repository URL:",
372 default: getDefaultRepositoryUrl(packageData),
373 });
374 if (repoUrl) {
375 repository = {
376 type: "git",
377 url: repoUrl,
378 };
379 }
380 }
381
382 return { keywords, license, repository };
383}
384
385export async function promptLongDescription(description: string) {
386 const hasLongDescription = await confirm({

Callers 1

initExtensionFunction · 0.85

Calls 1

getDefaultRepositoryUrlFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…