(packageData: PackageJson)
| 350 | } |
| 351 | |
| 352 | export 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 | |
| 385 | export async function promptLongDescription(description: string) { |
| 386 | const hasLongDescription = await confirm({ |
no test coverage detected
searching dependent graphs…