[READ-ONLY] Mirror of https://github.com/bombshell-dev/docs. bomb.sh/docs
0

Configure Feed

Select the types of activity you want to include in your feed.

update: clack docs to match v1.2.0 (#30)

authored by

paul valladares and committed by
GitHub
(Apr 4, 2026, 9:38 PM -0500) efae54bc c36a50e2

+352 -39
+2 -2
package.json
··· 14 14 "dependencies": { 15 15 "@astrojs/starlight": "^0.37.1", 16 16 "@bomb.sh/args": "^0.3.1", 17 - "@clack/core": "^1.0.0", 18 - "@clack/prompts": "1.0.0", 17 + "@clack/core": "^1.2.0", 18 + "@clack/prompts": "^1.2.0", 19 19 "@types/node": "^22.19.3", 20 20 "@webcontainer/api": "^1.6.1", 21 21 "@webcontainer/snapshot": "^0.1.0",
+74 -13
pnpm-lock.yaml
··· 15 15 specifier: ^0.3.1 16 16 version: 0.3.1 17 17 '@clack/core': 18 - specifier: ^1.0.0 19 - version: 1.0.0 18 + specifier: ^1.2.0 19 + version: 1.2.0 20 20 '@clack/prompts': 21 - specifier: 1.0.0 22 - version: 1.0.0 21 + specifier: ^1.2.0 22 + version: 1.2.0 23 23 '@types/node': 24 24 specifier: ^22.19.3 25 25 version: 22.19.3 ··· 128 128 resolution: {integrity: sha512-8XqW8xGn++Eqqbz3e9wKuK7mxryeRjs4LOHLxbh2lwKeSbuNR4NFifDZT4KzvjU6HMOPbiNTsWpniK5EJfTWkg==} 129 129 engines: {node: '>=18'} 130 130 131 - '@clack/core@1.0.0': 132 - resolution: {integrity: sha512-Orf9Ltr5NeiEuVJS8Rk2XTw3IxNC2Bic3ash7GgYeA8LJ/zmSNpSQ/m5UAhe03lA6KFgklzZ5KTHs4OAMA/SAQ==} 131 + '@clack/core@1.2.0': 132 + resolution: {integrity: sha512-qfxof/3T3t9DPU/Rj3OmcFyZInceqj/NVtO9rwIuJqCUgh32gwPjpFQQp/ben07qKlhpwq7GzfWpST4qdJ5Drg==} 133 133 134 - '@clack/prompts@1.0.0': 135 - resolution: {integrity: sha512-rWPXg9UaCFqErJVQ+MecOaWsozjaxol4yjnmYcGNipAWzdaWa2x+VJmKfGq7L0APwBohQOYdHC+9RO4qRXej+A==} 134 + '@clack/prompts@1.2.0': 135 + resolution: {integrity: sha512-4jmztR9fMqPMjz6H/UZXj0zEmE43ha1euENwkckKKel4XpSfokExPo5AiVStdHSAlHekz4d0CA/r45Ok1E4D3w==} 136 136 137 137 '@cloudflare/kv-asset-handler@0.4.2': 138 138 resolution: {integrity: sha512-SIOD2DxrRRwQ+jgzlXCqoEFiKOFqaPjhnNTGKXSRLvp1HiOvapLaFG2kEr9dYQTYe8rKrd9uvDUzmAITeNyaHQ==} ··· 567 567 resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==} 568 568 cpu: [arm64] 569 569 os: [linux] 570 + libc: [glibc] 570 571 571 572 '@img/sharp-libvips-linux-arm64@1.2.4': 572 573 resolution: {integrity: sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==} 573 574 cpu: [arm64] 574 575 os: [linux] 576 + libc: [glibc] 575 577 576 578 '@img/sharp-libvips-linux-arm@1.0.5': 577 579 resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==} 578 580 cpu: [arm] 579 581 os: [linux] 582 + libc: [glibc] 580 583 581 584 '@img/sharp-libvips-linux-arm@1.2.4': 582 585 resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==} 583 586 cpu: [arm] 584 587 os: [linux] 588 + libc: [glibc] 585 589 586 590 '@img/sharp-libvips-linux-ppc64@1.2.4': 587 591 resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==} 588 592 cpu: [ppc64] 589 593 os: [linux] 594 + libc: [glibc] 590 595 591 596 '@img/sharp-libvips-linux-riscv64@1.2.4': 592 597 resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==} 593 598 cpu: [riscv64] 594 599 os: [linux] 600 + libc: [glibc] 595 601 596 602 '@img/sharp-libvips-linux-s390x@1.0.4': 597 603 resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==} 598 604 cpu: [s390x] 599 605 os: [linux] 606 + libc: [glibc] 600 607 601 608 '@img/sharp-libvips-linux-s390x@1.2.4': 602 609 resolution: {integrity: sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==} 603 610 cpu: [s390x] 604 611 os: [linux] 612 + libc: [glibc] 605 613 606 614 '@img/sharp-libvips-linux-x64@1.0.4': 607 615 resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==} 608 616 cpu: [x64] 609 617 os: [linux] 618 + libc: [glibc] 610 619 611 620 '@img/sharp-libvips-linux-x64@1.2.4': 612 621 resolution: {integrity: sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==} 613 622 cpu: [x64] 614 623 os: [linux] 624 + libc: [glibc] 615 625 616 626 '@img/sharp-libvips-linuxmusl-arm64@1.0.4': 617 627 resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==} 618 628 cpu: [arm64] 619 629 os: [linux] 630 + libc: [musl] 620 631 621 632 '@img/sharp-libvips-linuxmusl-arm64@1.2.4': 622 633 resolution: {integrity: sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==} 623 634 cpu: [arm64] 624 635 os: [linux] 636 + libc: [musl] 625 637 626 638 '@img/sharp-libvips-linuxmusl-x64@1.0.4': 627 639 resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==} 628 640 cpu: [x64] 629 641 os: [linux] 642 + libc: [musl] 630 643 631 644 '@img/sharp-libvips-linuxmusl-x64@1.2.4': 632 645 resolution: {integrity: sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==} 633 646 cpu: [x64] 634 647 os: [linux] 648 + libc: [musl] 635 649 636 650 '@img/sharp-linux-arm64@0.33.5': 637 651 resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==} 638 652 engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 639 653 cpu: [arm64] 640 654 os: [linux] 655 + libc: [glibc] 641 656 642 657 '@img/sharp-linux-arm64@0.34.5': 643 658 resolution: {integrity: sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==} 644 659 engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 645 660 cpu: [arm64] 646 661 os: [linux] 662 + libc: [glibc] 647 663 648 664 '@img/sharp-linux-arm@0.33.5': 649 665 resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==} 650 666 engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 651 667 cpu: [arm] 652 668 os: [linux] 669 + libc: [glibc] 653 670 654 671 '@img/sharp-linux-arm@0.34.5': 655 672 resolution: {integrity: sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==} 656 673 engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 657 674 cpu: [arm] 658 675 os: [linux] 676 + libc: [glibc] 659 677 660 678 '@img/sharp-linux-ppc64@0.34.5': 661 679 resolution: {integrity: sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==} 662 680 engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 663 681 cpu: [ppc64] 664 682 os: [linux] 683 + libc: [glibc] 665 684 666 685 '@img/sharp-linux-riscv64@0.34.5': 667 686 resolution: {integrity: sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==} 668 687 engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 669 688 cpu: [riscv64] 670 689 os: [linux] 690 + libc: [glibc] 671 691 672 692 '@img/sharp-linux-s390x@0.33.5': 673 693 resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==} 674 694 engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 675 695 cpu: [s390x] 676 696 os: [linux] 697 + libc: [glibc] 677 698 678 699 '@img/sharp-linux-s390x@0.34.5': 679 700 resolution: {integrity: sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==} 680 701 engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 681 702 cpu: [s390x] 682 703 os: [linux] 704 + libc: [glibc] 683 705 684 706 '@img/sharp-linux-x64@0.33.5': 685 707 resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==} 686 708 engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 687 709 cpu: [x64] 688 710 os: [linux] 711 + libc: [glibc] 689 712 690 713 '@img/sharp-linux-x64@0.34.5': 691 714 resolution: {integrity: sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==} 692 715 engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 693 716 cpu: [x64] 694 717 os: [linux] 718 + libc: [glibc] 695 719 696 720 '@img/sharp-linuxmusl-arm64@0.33.5': 697 721 resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==} 698 722 engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 699 723 cpu: [arm64] 700 724 os: [linux] 725 + libc: [musl] 701 726 702 727 '@img/sharp-linuxmusl-arm64@0.34.5': 703 728 resolution: {integrity: sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==} 704 729 engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 705 730 cpu: [arm64] 706 731 os: [linux] 732 + libc: [musl] 707 733 708 734 '@img/sharp-linuxmusl-x64@0.33.5': 709 735 resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==} 710 736 engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 711 737 cpu: [x64] 712 738 os: [linux] 739 + libc: [musl] 713 740 714 741 '@img/sharp-linuxmusl-x64@0.34.5': 715 742 resolution: {integrity: sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==} 716 743 engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} 717 744 cpu: [x64] 718 745 os: [linux] 746 + libc: [musl] 719 747 720 748 '@img/sharp-wasm32@0.33.5': 721 749 resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==} ··· 862 890 resolution: {integrity: sha512-Rn3n+FUk2J5VWx+ywrG/HGPTD9jXNbicRtTM11e/uorplArnXZYsVifnPPqNNP5BsO3roI4n8332ukpY/zN7rQ==} 863 891 cpu: [arm] 864 892 os: [linux] 893 + libc: [glibc] 865 894 866 895 '@rollup/rollup-linux-arm-musleabihf@4.55.1': 867 896 resolution: {integrity: sha512-grPNWydeKtc1aEdrJDWk4opD7nFtQbMmV7769hiAaYyUKCT1faPRm2av8CX1YJsZ4TLAZcg9gTR1KvEzoLjXkg==} 868 897 cpu: [arm] 869 898 os: [linux] 899 + libc: [musl] 870 900 871 901 '@rollup/rollup-linux-arm64-gnu@4.55.1': 872 902 resolution: {integrity: sha512-a59mwd1k6x8tXKcUxSyISiquLwB5pX+fJW9TkWU46lCqD/GRDe9uDN31jrMmVP3feI3mhAdvcCClhV8V5MhJFQ==} 873 903 cpu: [arm64] 874 904 os: [linux] 905 + libc: [glibc] 875 906 876 907 '@rollup/rollup-linux-arm64-musl@4.55.1': 877 908 resolution: {integrity: sha512-puS1MEgWX5GsHSoiAsF0TYrpomdvkaXm0CofIMG5uVkP6IBV+ZO9xhC5YEN49nsgYo1DuuMquF9+7EDBVYu4uA==} 878 909 cpu: [arm64] 879 910 os: [linux] 911 + libc: [musl] 880 912 881 913 '@rollup/rollup-linux-loong64-gnu@4.55.1': 882 914 resolution: {integrity: sha512-r3Wv40in+lTsULSb6nnoudVbARdOwb2u5fpeoOAZjFLznp6tDU8kd+GTHmJoqZ9lt6/Sys33KdIHUaQihFcu7g==} 883 915 cpu: [loong64] 884 916 os: [linux] 917 + libc: [glibc] 885 918 886 919 '@rollup/rollup-linux-loong64-musl@4.55.1': 887 920 resolution: {integrity: sha512-MR8c0+UxAlB22Fq4R+aQSPBayvYa3+9DrwG/i1TKQXFYEaoW3B5b/rkSRIypcZDdWjWnpcvxbNaAJDcSbJU3Lw==} 888 921 cpu: [loong64] 889 922 os: [linux] 923 + libc: [musl] 890 924 891 925 '@rollup/rollup-linux-ppc64-gnu@4.55.1': 892 926 resolution: {integrity: sha512-3KhoECe1BRlSYpMTeVrD4sh2Pw2xgt4jzNSZIIPLFEsnQn9gAnZagW9+VqDqAHgm1Xc77LzJOo2LdigS5qZ+gw==} 893 927 cpu: [ppc64] 894 928 os: [linux] 929 + libc: [glibc] 895 930 896 931 '@rollup/rollup-linux-ppc64-musl@4.55.1': 897 932 resolution: {integrity: sha512-ziR1OuZx0vdYZZ30vueNZTg73alF59DicYrPViG0NEgDVN8/Jl87zkAPu4u6VjZST2llgEUjaiNl9JM6HH1Vdw==} 898 933 cpu: [ppc64] 899 934 os: [linux] 935 + libc: [musl] 900 936 901 937 '@rollup/rollup-linux-riscv64-gnu@4.55.1': 902 938 resolution: {integrity: sha512-uW0Y12ih2XJRERZ4jAfKamTyIHVMPQnTZcQjme2HMVDAHY4amf5u414OqNYC+x+LzRdRcnIG1YodLrrtA8xsxw==} 903 939 cpu: [riscv64] 904 940 os: [linux] 941 + libc: [glibc] 905 942 906 943 '@rollup/rollup-linux-riscv64-musl@4.55.1': 907 944 resolution: {integrity: sha512-u9yZ0jUkOED1BFrqu3BwMQoixvGHGZ+JhJNkNKY/hyoEgOwlqKb62qu+7UjbPSHYjiVy8kKJHvXKv5coH4wDeg==} 908 945 cpu: [riscv64] 909 946 os: [linux] 947 + libc: [musl] 910 948 911 949 '@rollup/rollup-linux-s390x-gnu@4.55.1': 912 950 resolution: {integrity: sha512-/0PenBCmqM4ZUd0190j7J0UsQ/1nsi735iPRakO8iPciE7BQ495Y6msPzaOmvx0/pn+eJVVlZrNrSh4WSYLxNg==} 913 951 cpu: [s390x] 914 952 os: [linux] 953 + libc: [glibc] 915 954 916 955 '@rollup/rollup-linux-x64-gnu@4.55.1': 917 956 resolution: {integrity: sha512-a8G4wiQxQG2BAvo+gU6XrReRRqj+pLS2NGXKm8io19goR+K8lw269eTrPkSdDTALwMmJp4th2Uh0D8J9bEV1vg==} 918 957 cpu: [x64] 919 958 os: [linux] 959 + libc: [glibc] 920 960 921 961 '@rollup/rollup-linux-x64-musl@4.55.1': 922 962 resolution: {integrity: sha512-bD+zjpFrMpP/hqkfEcnjXWHMw5BIghGisOKPj+2NaNDuVT+8Ds4mPf3XcPHuat1tz89WRL+1wbcxKY3WSbiT7w==} 923 963 cpu: [x64] 924 964 os: [linux] 965 + libc: [musl] 925 966 926 967 '@rollup/rollup-openbsd-x64@4.55.1': 927 968 resolution: {integrity: sha512-eLXw0dOiqE4QmvikfQ6yjgkg/xDM+MdU9YJuP4ySTibXU0oAvnEWXt7UDJmD4UkYialMfOGFPJnIHSe/kdzPxg==} ··· 1397 1438 1398 1439 fast-deep-equal@3.1.3: 1399 1440 resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} 1441 + 1442 + fast-string-truncated-width@1.2.1: 1443 + resolution: {integrity: sha512-Q9acT/+Uu3GwGj+5w/zsGuQjh9O1TyywhIwAxHudtWrgF09nHOPrvTLhQevPbttcxjr/SNN7mJmfOw/B1bXgow==} 1444 + 1445 + fast-string-width@1.1.0: 1446 + resolution: {integrity: sha512-O3fwIVIH5gKB38QNbdg+3760ZmGz0SZMgvwJbA1b2TGXceKE6A2cOlfogh1iw8lr049zPyd7YADHy+B7U4W9bQ==} 1447 + 1448 + fast-wrap-ansi@0.1.6: 1449 + resolution: {integrity: sha512-HlUwET7a5gqjURj70D5jl7aC3Zmy4weA1SHUfM0JFI0Ptq987NH2TwbBFLoERhfwk+E+eaq4EK3jXoT+R3yp3w==} 1400 1450 1401 1451 fdir@6.5.0: 1402 1452 resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} ··· 2504 2554 dependencies: 2505 2555 fontkit: 2.0.4 2506 2556 2507 - '@clack/core@1.0.0': 2557 + '@clack/core@1.2.0': 2508 2558 dependencies: 2509 - picocolors: 1.1.1 2559 + fast-wrap-ansi: 0.1.6 2510 2560 sisteransi: 1.0.5 2511 2561 2512 - '@clack/prompts@1.0.0': 2562 + '@clack/prompts@1.2.0': 2513 2563 dependencies: 2514 - '@clack/core': 1.0.0 2515 - picocolors: 1.1.1 2564 + '@clack/core': 1.2.0 2565 + fast-string-width: 1.1.0 2566 + fast-wrap-ansi: 0.1.6 2516 2567 sisteransi: 1.0.5 2517 2568 2518 2569 '@cloudflare/kv-asset-handler@0.4.2': {} ··· 3627 3678 extend@3.0.2: {} 3628 3679 3629 3680 fast-deep-equal@3.1.3: {} 3681 + 3682 + fast-string-truncated-width@1.2.1: {} 3683 + 3684 + fast-string-width@1.1.0: 3685 + dependencies: 3686 + fast-string-truncated-width: 1.2.1 3687 + 3688 + fast-wrap-ansi@0.1.6: 3689 + dependencies: 3690 + fast-string-width: 1.1.0 3630 3691 3631 3692 fdir@6.5.0(picomatch@4.0.3): 3632 3693 optionalDependencies:
+28 -13
scripts/snapshot.ts
··· 1 + /** 2 + * Builds `public/snapshot`: a serialized node_modules tree for StackBlitz WebContainer. 3 + * The docs site mounts this in the browser so live examples can `import` Clack without 4 + * running `npm install` inside the VM. Versions come from the repo root package.json 5 + * so playground code matches Twoslash / the docs. 6 + */ 1 7 import fs from 'node:fs/promises'; 2 8 import { fileURLToPath } from 'node:url'; 3 9 import { snapshot } from '@webcontainer/snapshot'; 4 - import {x} from 'tinyexec'; 5 - import { createHash } from "node:crypto"; 10 + import { x } from 'tinyexec'; 11 + import { createHash } from 'node:crypto'; 12 + 13 + const rootDir = new URL('../', import.meta.url); 6 14 7 - const PACKAGE_JSON = { 8 - name: 'example', 9 - type: 'module', 10 - version: '0.0.0', 11 - dependencies: { 12 - "@bomb.sh/args": "latest", 13 - "@clack/core": "1.0.0-alpha.0", 14 - "@clack/prompts": "1.0.0-alpha.0" 15 - } 15 + async function packageJsonForSnapshot() { 16 + const raw = await fs.readFile(new URL('package.json', rootDir), 'utf8'); 17 + const root = JSON.parse(raw) as { 18 + dependencies: Record<string, string>; 19 + }; 20 + const { dependencies: d } = root; 21 + return { 22 + name: 'example', 23 + type: 'module', 24 + version: '0.0.0', 25 + dependencies: { 26 + '@bomb.sh/args': d['@bomb.sh/args'], 27 + '@clack/core': d['@clack/core'], 28 + '@clack/prompts': d['@clack/prompts'], 29 + }, 30 + }; 16 31 } 17 32 const IGNORE_FILES = ['*.md', '*.d.*', '*.map', 'LICENSE', 'license']; 18 - const rootDir = new URL('../', import.meta.url); 19 33 const snapshotDir = new URL(`./snapshot-${hash()}/`, rootDir); 20 34 const outFile = new URL('./public/snapshot', rootDir); 21 35 22 36 async function run() { 37 + const pkg = await packageJsonForSnapshot(); 23 38 await fs.mkdir(snapshotDir, { recursive: true }); 24 - await fs.writeFile(new URL('package.json', snapshotDir), JSON.stringify(PACKAGE_JSON)); 39 + await fs.writeFile(new URL('package.json', snapshotDir), JSON.stringify(pkg)); 25 40 await x('npm', ['install'], { 26 41 nodeOptions: { 27 42 cwd: fileURLToPath(snapshotDir),
+3
src/content/docs/clack/basics/getting-started.mdx
··· 90 90 - `text()` - For text input with validation 91 91 - `password()` - For secure password input with masking 92 92 - `select()` - For selection menus 93 + - `selectKey()` - For choosing an option by pressing its key 93 94 - `confirm()` - For yes/no confirmations 94 95 - `multiselect()` - For multiple selections 95 96 - `groupMultiselect()` - For grouped multiple selections 96 97 - `autocomplete()` - For searchable selection menus 97 98 - `path()` - For file/directory path selection with autocomplete 99 + - `date()` - For structured date entry (YMD / MDY / DMY) 98 100 - `note()` - For displaying information 99 101 - `box()` - For boxed text display 100 102 - `spinner()` - For loading states 101 103 - `progress()` - For progress bar display 102 104 - `tasks()` - For sequential task execution 103 105 - `taskLog()` - For log output that clears on success 106 + - `stream` - For multi-line streamed output (async iterators, readable streams) 104 107 105 108 ### Low-Level Primitives 106 109
+75
src/content/docs/clack/guides/examples.mdx
··· 745 745 746 746 ## New Features Examples 747 747 748 + ### Date picker 749 + 750 + Use `date` with `format` (`YMD`, `MDY`, or `DMY`) and optional bounds: 751 + 752 + ```ts twoslash 753 + import { date, isCancel, cancel, outro } from '@clack/prompts'; 754 + 755 + async function pickReleaseDate() { 756 + const result = await date({ 757 + message: 'Pick a release date', 758 + format: 'YMD', 759 + minDate: new Date('2026-01-01'), 760 + maxDate: new Date('2026-12-31'), 761 + }); 762 + 763 + if (isCancel(result)) { 764 + cancel('Operation cancelled.'); 765 + process.exit(0); 766 + } 767 + 768 + outro(`Selected: ${result.toISOString().slice(0, 10)}`); 769 + } 770 + ``` 771 + 772 + ### Select by key 773 + 774 + Compact menus where each choice is bound to a key: 775 + 776 + ```ts twoslash 777 + import { selectKey, isCancel } from '@clack/prompts'; 778 + 779 + async function confirmDestructive() { 780 + const choice = await selectKey({ 781 + message: 'Delete all cache?', 782 + options: [ 783 + { value: 'y', label: 'Yes, delete' }, 784 + { value: 'n', label: 'No, keep' }, 785 + ], 786 + }); 787 + 788 + if (isCancel(choice) || choice === 'n') { 789 + return false; 790 + } 791 + return choice === 'y'; 792 + } 793 + ``` 794 + 748 795 ### Path Selection 749 796 750 797 The `path` prompt provides file system navigation with autocomplete: ··· 756 803 const configPath = await path({ 757 804 message: 'Select a configuration file:', 758 805 root: process.cwd(), 806 + directory: false, 759 807 validate: (value) => { 760 808 if (!value?.endsWith('.json') && !value?.endsWith('.yaml')) { 761 809 return 'Please select a .json or .yaml file'; ··· 770 818 } 771 819 772 820 console.log(`Selected config: ${configPath}`); 821 + } 822 + ``` 823 + 824 + With `directory: true`, only folders appear in suggestions; with an existing directory as `initialValue`, **Enter** submits that folder directly (v1.2.0). 825 + 826 + ### Autocomplete Tab and placeholder 827 + 828 + When the search box is empty and `placeholder` is set, **Tab** inserts the placeholder string—useful for default tokens: 829 + 830 + ```ts twoslash 831 + import { autocomplete, isCancel } from '@clack/prompts'; 832 + 833 + async function pickWithDefaultQuery() { 834 + const tag = await autocomplete({ 835 + message: 'Filter by tag:', 836 + placeholder: 'latest', 837 + options: [ 838 + { value: 'latest', label: 'latest' }, 839 + { value: 'stable', label: 'stable' }, 840 + { value: 'canary', label: 'canary' }, 841 + ], 842 + }); 843 + 844 + if (isCancel(tag)) { 845 + return null; 846 + } 847 + return tag; 773 848 } 774 849 ``` 775 850
+32 -5
src/content/docs/clack/packages/core.mdx
··· 43 43 Then import the components you need: 44 44 45 45 ```ts twoslash 46 - import { 46 + import { 47 47 // Prompt classes 48 - TextPrompt, 49 - SelectPrompt, 48 + TextPrompt, 49 + SelectPrompt, 50 50 ConfirmPrompt, 51 51 PasswordPrompt, 52 52 MultiSelectPrompt, 53 53 GroupMultiSelectPrompt, 54 54 SelectKeyPrompt, 55 55 AutocompletePrompt, 56 + DatePrompt, 57 + 58 + // Layout helpers 59 + block, 60 + getColumns, 61 + getRows, 62 + wrapTextWithPrefix, 56 63 57 64 // Utilities 58 65 isCancel, ··· 68 75 type GroupMultiSelectOptions, 69 76 type SelectKeyOptions, 70 77 type AutocompleteOptions, 78 + type DateFormat, 79 + type DateOptions, 80 + type DateParts, 71 81 } from '@clack/core'; 72 82 ``` 73 83 ··· 144 154 - Supports validation 145 155 - Placeholder text 146 156 - Initial value 147 - - Separate `userInput` and `value` tracking 157 + - Separate `userInput` and `value` tracking; use **`userInputWithCursor`** when rendering so the raw buffer and cursor position match what the user sees 148 158 149 159 2. **SelectPrompt**: For selection from options 150 160 - Custom rendering ··· 158 168 159 169 4. **AutocompletePrompt**: For searchable selection 160 170 - Type-ahead filtering 161 - - Custom filtering logic 171 + - Custom filtering logic via the `filter` option 162 172 - Multiple selection support (`multiple: true`) 163 173 - Dynamic options (function or array) 174 + - As of v1.2.0, the built-in default filter runs only when `filter` is set explicitly **or** when `options` is not a getter—so lazy `options` getters are not pre-filtered unexpectedly 164 175 165 176 5. **PasswordPrompt**: For secure input 166 177 - Character masking ··· 183 194 8. **SelectKeyPrompt**: For key-based selection 184 195 - Custom key bindings 185 196 - Multiple selection support 197 + 198 + 9. **DatePrompt**: For structured date entry 199 + - Segment-based editing (year, month, day) with `DateFormat` (`YMD`, `MDY`, or `DMY`) 200 + - Optional `locale` for segment order and separator via `Intl` 201 + - Optional `separator` override for display 202 + - `minDate` / `maxDate` bounds and `DateParts` segment values 203 + 204 + 10. **Multi-line input**: v1.2.0 does not include a dedicated multi-line prompt in `@clack/core` or `@clack/prompts`. Use `text()` for a single line, an external editor or stdin for paragraphs, or extend `Prompt` for custom multi-line TTY behavior. 205 + 206 + ## Layout utilities 207 + 208 + These helpers are useful when building custom prompts or lists that respect terminal width: 209 + 210 + - **`getColumns(output?)` / `getRows(output?)`**: Terminal size for the given writable (defaults to `stdout`). 211 + - **`wrapTextWithPrefix(output, text, prefix, ...)`**: Wrap lines to the terminal width while repeating a prefix on each line (used heavily by prompts for guide-aligned output). 212 + - **`block`**: Lower-level TTY helper (raw mode, keypress handling, optional cursor hide) used when building custom full-screen or overlay flows; most apps use the prompt classes instead. 186 213 187 214 ## Global Settings 188 215
+138 -6
src/content/docs/clack/packages/prompts.mdx
··· 48 48 49 49 ### Guide Lines 50 50 51 - The `withGuide` option controls whether the default Clack border/guide lines are displayed. You can disable them globally or per-prompt: 51 + The `withGuide` option (boolean **option**, not a separate API) turns Clack’s border/guide lines on or off. Every prompt accepts it alongside `message` and friends. You can set it globally with `updateSettings` or override it per call. 52 52 53 53 ```ts twoslash 54 54 import { text, updateSettings } from '@clack/prompts'; ··· 62 62 withGuide: false, // Disable guide lines for this prompt 63 63 }); 64 64 ``` 65 + 66 + Session helpers use the same option on their **second argument**: `intro(title, { withGuide: false })`, `outro(message, { withGuide: false })`, and `cancel(message, { withGuide: false })`. 67 + 68 + `autocomplete` and `multiselect` respect `withGuide: false` per prompt (as of v1.2.0), matching other prompts. 65 69 66 70 ### AbortController Support 67 71 ··· 245 249 <font color="#06989A">│</font> ◻ SvelteKit (Compile-time framework) 246 250 <font color="#06989A">└</font></pre> 247 251 252 + ### Select by key 253 + 254 + `selectKey` shows each option with a visible key (the option `value`, typically one character). The user presses that key instead of moving a cursor with arrows—useful for compact yes/no/maybe menus or vim-style shortcuts. 255 + 256 + ```ts twoslash 257 + import { selectKey, isCancel } from '@clack/prompts'; 258 + 259 + const action = await selectKey({ 260 + message: 'What next?', 261 + options: [ 262 + { value: 'y', label: 'Continue' }, 263 + { value: 'n', label: 'Stop' }, 264 + { value: 's', label: 'Skip', hint: 'optional' }, 265 + ], 266 + caseSensitive: false, 267 + }); 268 + 269 + if (isCancel(action)) { 270 + process.exit(0); 271 + } 272 + ``` 273 + 248 274 ### Autocomplete 249 275 250 276 The `autocomplete` prompt combines text input with a searchable list of options. It's perfect for when you have a large list of options and want to help users find what they're looking for quickly. ··· 274 300 <font color="#06989A">│</font> ○ Nuxt (Vue framework) 275 301 <font color="#06989A">└</font></pre> 276 302 303 + If you set `placeholder` and the search field is **empty**, pressing **Tab** copies the placeholder string into the input (v1.2.0)—handy for default search tokens or quick acceptance of a suggested value. 304 + 305 + #### Dynamic options (getter) 306 + 307 + Instead of a static array, `options` can be a **function** whose `this` is the underlying [`AutocompletePrompt`](https://github.com/bombshell-dev/clack/blob/main/packages/core/src/prompts/autocomplete.ts) from `@clack/core`. The function runs again whenever the search text changes, so you can read **`this.userInput`** and return a **new array in display order**—for example closest / highest-score matches first (similar to [fzf](https://github.com/junegunn/fzf)-style UIs). This pattern is what [issue #467](https://github.com/bombshell-dev/clack/issues/467) discusses for custom ranking and libraries like [Fuse.js](https://fusejs.io/). 308 + 309 + The high-level `autocomplete` wrapper still applies its **default `filter`** (substring match on label, hint, and value) to whatever your getter returns. If you already narrow or rank items in the getter, disable that second pass with **`filter: (_search, _option) => true`**, or pass a custom `(search, option) => boolean` aligned with your getter. 310 + 311 + `options` as a getter must be **synchronous**; there is no async API here—preload or sync work inside the function. 312 + 313 + The same `options` shape is supported on **`autocompleteMultiselect`**. 314 + 315 + ```ts twoslash 316 + import { autocomplete } from '@clack/prompts'; 317 + import type { AutocompletePrompt } from '@clack/core'; 318 + import type { Option } from '@clack/prompts'; 319 + 320 + const pool: Option<string>[] = [ 321 + { value: 'next', label: 'Next.js', hint: 'React' }, 322 + { value: 'nuxt', label: 'Nuxt', hint: 'Vue' }, 323 + { value: 'nest', label: 'NestJS', hint: 'Node' }, 324 + ]; 325 + 326 + function rankByQuery(query: string, items: Option<string>[]): Option<string>[] { 327 + const q = query.trim().toLowerCase(); 328 + if (!q) return [...items]; 329 + return [...items] 330 + .filter((o) => { 331 + const t = `${o.label ?? ''} ${o.hint ?? ''} ${o.value}`.toLowerCase(); 332 + return t.includes(q); 333 + }) 334 + .sort((a, b) => { 335 + const la = (a.label ?? '').toLowerCase(); 336 + const lb = (b.label ?? '').toLowerCase(); 337 + const sa = la.startsWith(q) ? 0 : 1; 338 + const sb = lb.startsWith(q) ? 0 : 1; 339 + return sa - sb || la.localeCompare(lb); 340 + }); 341 + } 342 + 343 + const picked = await autocomplete({ 344 + message: 'Pick a framework', 345 + options(this: AutocompletePrompt<Option<string>>) { 346 + return rankByQuery(this.userInput, pool); 347 + }, 348 + filter: (_search, _option) => true, 349 + }); 350 + ``` 351 + 277 352 ### Autocomplete Multiselect 278 353 279 354 The `autocompleteMultiselect` combines the search functionality of autocomplete with the ability to select multiple options. ··· 329 404 Options: 330 405 - `message`: The prompt message to display 331 406 - `root`: The starting directory for path suggestions (defaults to current working directory) 332 - - `directory`: When `true`, only directories are shown (defaults to `false`) 333 - - `initialValue`: Pre-fill the path input with an initial value 407 + - `directory`: When `true`, only **directories** appear in suggestions while you navigate; you still move through the tree normally (v1.2.0 fixes for directory-only mode). 408 + - `initialValue`: Pre-fill the path input. In **directory** mode, if `initialValue` already points at an existing directory, pressing **Enter** submits **that** directory immediately instead of jumping to the first child (v1.2.0). 334 409 - `validate`: Custom validation function for the selected path 335 410 411 + ### Date input 412 + 413 + `date` returns a `Date` on success or a cancel symbol. Use `format` to pick segment order: `YMD`, `MDY`, or `DMY`. Pass `locale` (BCP 47 string) to derive order and separators from `Intl`, or rely on the format alone. 414 + 415 + ```ts twoslash 416 + import { date, isCancel } from '@clack/prompts'; 417 + 418 + const picked = await date({ 419 + message: 'Pick a date', 420 + format: 'YMD', 421 + minDate: new Date('2026-01-01'), 422 + maxDate: new Date('2026-12-31'), 423 + }); 424 + 425 + if (isCancel(picked)) { 426 + process.exit(0); 427 + } 428 + 429 + // picked is a Date 430 + ``` 431 + 432 + Options include `defaultValue`, `initialValue`, `minDate`, `maxDate`, `validate`, and the usual `signal`, `input`, `output`, and `withGuide` settings. 433 + 336 434 ### Confirmation 337 435 338 436 ```ts twoslash ··· 347 445 <font color="#06989A">◆</font> Do you want to continue? 348 446 <font color="#06989A">│</font> <font color="#4E9A06">●</font> Yes / ○ No 349 447 <font color="#06989A">└</font></pre> 448 + 449 + Options: 450 + - `vertical: true`: Stack Yes / No vertically instead of inline (v1.0.1+). 451 + - Multi-line `message` strings wrap correctly; guide lines apply to wrapped confirmation text (v1.2.0). 350 452 351 453 ## Grouping 352 454 ··· 866 968 The prompts package supports internationalization through the `updateSettings` function. You can customize the messages used by various prompts to match your preferred language. 867 969 868 970 ```ts twoslash 869 - // @errors: 2353 870 971 import { updateSettings, select, cancel } from '@clack/prompts'; 871 972 872 973 // Update global messages 873 974 updateSettings({ 874 975 messages: { 875 976 cancel: "Operación cancelada", 876 - error: "Se ha producido un error" 877 - } 977 + error: "Se ha producido un error", 978 + }, 979 + date: { 980 + monthNames: [ 981 + "enero", "febrero", "marzo", "abril", "mayo", "junio", 982 + "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre", 983 + ], 984 + messages: { 985 + required: "Introduce una fecha válida", 986 + invalidMonth: "Solo hay 12 meses", 987 + invalidDay: (days, month) => `Solo hay ${days} días en ${month}`, 988 + afterMin: (min) => `La fecha debe ser el ${min.toISOString().slice(0, 10)} o posterior`, 989 + beforeMax: (max) => `La fecha debe ser el ${max.toISOString().slice(0, 10)} o anterior`, 990 + }, 991 + }, 878 992 }); 879 993 880 994 // Use the select prompt with translated content ··· 961 1075 <font color="#4E9A06">◇</font> Job1{`...`} <font color="#4E9A06">done</font> 962 1076 <font color="#555753">│</font> Job2{`...`} <font color="#4E9A06">done</font> 963 1077 <font color="#555753">│</font> Job3{`...`} <font color="#4E9A06">done</font></pre> 1078 + 1079 + ### limitOptions 1080 + 1081 + `limitOptions` trims a long option list to what fits the terminal, returning the lines to render and keeping the active index visible—intended for **custom** prompts that mirror Clack’s sliding window (see `@clack/prompts` source). Pass `options`, `cursor`, a `style` callback, optional `maxItems`, `columnPadding`, `rowPadding`, and `output` if not using `stdout`. 1082 + 1083 + ```ts twoslash 1084 + import { limitOptions } from '@clack/prompts'; 1085 + import { styleText } from 'node:util'; 1086 + 1087 + const options = ['apple', 'banana', 'cherry', 'date']; 1088 + const lines = limitOptions({ 1089 + options, 1090 + cursor: 2, 1091 + style: (opt, active) => 1092 + active ? styleText('cyan', opt) : styleText('dim', opt), 1093 + maxItems: 8, 1094 + }); 1095 + ```