()
| 400 | } |
| 401 | |
| 402 | export async function promptUrls() { |
| 403 | const homepage = await input({ |
| 404 | message: "Homepage URL (optional):", |
| 405 | validate: (value) => { |
| 406 | if (!value.trim()) return true; |
| 407 | try { |
| 408 | new URL(value); |
| 409 | return true; |
| 410 | } catch { |
| 411 | return "Must be a valid URL (e.g., https://example.com)"; |
| 412 | } |
| 413 | }, |
| 414 | }); |
| 415 | |
| 416 | const documentation = await input({ |
| 417 | message: "Documentation URL (optional):", |
| 418 | validate: (value) => { |
| 419 | if (!value.trim()) return true; |
| 420 | try { |
| 421 | new URL(value); |
| 422 | return true; |
| 423 | } catch { |
| 424 | return "Must be a valid URL"; |
| 425 | } |
| 426 | }, |
| 427 | }); |
| 428 | |
| 429 | const support = await input({ |
| 430 | message: "Support URL (optional):", |
| 431 | validate: (value) => { |
| 432 | if (!value.trim()) return true; |
| 433 | try { |
| 434 | new URL(value); |
| 435 | return true; |
| 436 | } catch { |
| 437 | return "Must be a valid URL"; |
| 438 | } |
| 439 | }, |
| 440 | }); |
| 441 | |
| 442 | return { homepage, documentation, support }; |
| 443 | } |
| 444 | |
| 445 | export async function promptVisualAssets() { |
| 446 | const icon = await input({ |
no outgoing calls
no test coverage detected
searching dependent graphs…