@visulima/cerebro 3.0.3 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/LICENSE.md +346 -0
- package/dist/commands/completion-command.d.ts +3 -3
- package/dist/commands/completion-command.js +1 -1
- package/dist/commands/help-command.d.ts +1 -1
- package/dist/commands/help-command.js +1 -1
- package/dist/commands/readme-command.d.ts +3 -3
- package/dist/commands/readme-command.js +17 -17
- package/dist/commands/version-command.d.ts +1 -1
- package/dist/index.d.ts +403 -433
- package/dist/index.js +1 -1
- package/dist/logger/create-pail-logger.d.ts +533 -555
- package/dist/logger/create-pail-logger.js +1 -1
- package/dist/packem_chunks/has-new-version.js +1 -1
- package/dist/packem_shared/Cerebro-58LHN3_T.js +4 -0
- package/dist/packem_shared/VisulimaError-k1qGkvab.js +76 -0
- package/dist/packem_shared/cerebro-error-DWpjBY_M.js +1 -0
- package/dist/packem_shared/command.d-B_G9vIYJ.d.ts +633 -0
- package/dist/packem_shared/{index-DvVGK4kr.js → index-Dpm7gUHe.js} +12 -12
- package/dist/packem_shared/index.d-CnnVYgSZ.d.ts +117 -0
- package/dist/packem_shared/renderError-BISXNU8L-B47ZikMV.js +27 -0
- package/dist/packem_shared/runtime-process-BEw54Ar-.js +1 -0
- package/dist/packem_shared/split-by-case-BZ6XOTIf.js +1 -0
- package/dist/plugins/error-handler-plugin.d.ts +18 -7
- package/dist/plugins/error-handler-plugin.js +1 -1
- package/dist/plugins/runtime-version-check-plugin.d.ts +5 -5
- package/dist/plugins/runtime-version-check-plugin.js +1 -1
- package/dist/plugins/update-notifier/update-notifier-plugin.d.ts +11 -10
- package/dist/plugins/update-notifier/update-notifier-plugin.js +1 -1
- package/dist/util/general/compile-cache.d.ts +37 -37
- package/dist/util/general/heap-tuning.d.ts +11 -11
- package/dist/util/general/heap-tuning.js +1 -1
- package/package.json +6 -6
- package/dist/packem_shared/Cerebro-Czc4t-75.js +0 -4
- package/dist/packem_shared/VisulimaError-C90oeIMu.js +0 -76
- package/dist/packem_shared/cerebro-error-BjBcYVRO.js +0 -1
- package/dist/packem_shared/command.d-DbhtfXF4.d.ts +0 -639
- package/dist/packem_shared/index.d-BL4NtVR3.d.ts +0 -127
- package/dist/packem_shared/renderError-B3ePOoBG-BmZlyMcr.js +0 -25
- package/dist/packem_shared/runtime-process-Dmz0vCJy.js +0 -1
- package/dist/packem_shared/split-by-case-Dbpgd7rf.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## @visulima/cerebro [3.0.5](https://github.com/visulima/visulima/compare/%40visulima%2Fcerebro%403.0.4...%40visulima%2Fcerebro%403.0.5) (2026-08-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Dependencies
|
|
5
|
+
|
|
6
|
+
* **@visulima/colorize:** upgraded to 2.1.0
|
|
7
|
+
* **@visulima/tabular:** upgraded to 4.1.0
|
|
8
|
+
* **@visulima/boxen:** upgraded to 3.1.0
|
|
9
|
+
* **@visulima/command-line-args:** upgraded to 2.0.1
|
|
10
|
+
* **@visulima/error:** upgraded to 6.1.0
|
|
11
|
+
* **@visulima/find-cache-dir:** upgraded to 3.0.1
|
|
12
|
+
* **@visulima/pail:** upgraded to 4.1.0
|
|
13
|
+
* **@visulima/path:** upgraded to 3.1.0
|
|
14
|
+
* **@visulima/string:** upgraded to 3.1.0
|
|
15
|
+
|
|
16
|
+
## @visulima/cerebro [3.0.4](https://github.com/visulima/visulima/compare/%40visulima%2Fcerebro%403.0.3...%40visulima%2Fcerebro%403.0.4) (2026-07-27)
|
|
17
|
+
|
|
1
18
|
## @visulima/cerebro [3.0.3](https://github.com/visulima/visulima/compare/%40visulima%2Fcerebro%403.0.2...%40visulima%2Fcerebro%403.0.3) (2026-07-27)
|
|
2
19
|
|
|
3
20
|
|
package/LICENSE.md
CHANGED
|
@@ -2575,6 +2575,352 @@ Repository: git+https://github.com/visulima/visulima.git
|
|
|
2575
2575
|
> MIT, (MIT OR CC0-1.0)
|
|
2576
2576
|
>
|
|
2577
2577
|
> # Bundled types:
|
|
2578
|
+
> ## @visulima/error
|
|
2579
|
+
> License: MIT
|
|
2580
|
+
> By: Daniel Bannert
|
|
2581
|
+
> Repository: git+https://github.com/visulima/visulima.git
|
|
2582
|
+
>
|
|
2583
|
+
> > MIT License
|
|
2584
|
+
> >
|
|
2585
|
+
> > Copyright (c) 2026 visulima
|
|
2586
|
+
> >
|
|
2587
|
+
> > Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2588
|
+
> > of this software and associated documentation files (the "Software"), to deal
|
|
2589
|
+
> > in the Software without restriction, including without limitation the rights
|
|
2590
|
+
> > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2591
|
+
> > copies of the Software, and to permit persons to whom the Software is
|
|
2592
|
+
> > furnished to do so, subject to the following conditions:
|
|
2593
|
+
> >
|
|
2594
|
+
> > The above copyright notice and this permission notice shall be included in all
|
|
2595
|
+
> > copies or substantial portions of the Software.
|
|
2596
|
+
> >
|
|
2597
|
+
> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2598
|
+
> > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2599
|
+
> > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2600
|
+
> > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2601
|
+
> > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2602
|
+
> > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
2603
|
+
> > SOFTWARE.
|
|
2604
|
+
> >
|
|
2605
|
+
> > <!-- DEPENDENCIES -->
|
|
2606
|
+
> >
|
|
2607
|
+
> > # Licenses of bundled dependencies
|
|
2608
|
+
> >
|
|
2609
|
+
> > The published @visulima/error artifact additionally contains code with the following licenses:
|
|
2610
|
+
> > MIT
|
|
2611
|
+
> >
|
|
2612
|
+
> > # Bundled dependencies:
|
|
2613
|
+
> >
|
|
2614
|
+
> > ## is-plain-obj
|
|
2615
|
+
> >
|
|
2616
|
+
> > License: MIT
|
|
2617
|
+
> > By: Sindre Sorhus
|
|
2618
|
+
> > Repository: sindresorhus/is-plain-obj
|
|
2619
|
+
> >
|
|
2620
|
+
> > > MIT License
|
|
2621
|
+
> > >
|
|
2622
|
+
> > > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
2623
|
+
> > >
|
|
2624
|
+
> > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
2625
|
+
> > >
|
|
2626
|
+
> > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
2627
|
+
> > >
|
|
2628
|
+
> > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
2629
|
+
> >
|
|
2630
|
+
> > <!-- /DEPENDENCIES -->
|
|
2631
|
+
> >
|
|
2632
|
+
> >
|
|
2633
|
+
> >
|
|
2634
|
+
> > # Licenses of bundled types
|
|
2635
|
+
> > The published @visulima/error artifact additionally contains code with the following licenses:
|
|
2636
|
+
> > Apache-2.0
|
|
2637
|
+
> >
|
|
2638
|
+
> > # Bundled types:
|
|
2639
|
+
> > ## ai
|
|
2640
|
+
> > License: Apache-2.0
|
|
2641
|
+
> > Repository: https://github.com/vercel/ai
|
|
2642
|
+
> >
|
|
2643
|
+
> > > Copyright 2023 Vercel, Inc.
|
|
2644
|
+
> > >
|
|
2645
|
+
> > > Licensed under the Apache License, Version 2.0 (the "License");
|
|
2646
|
+
> > > you may not use this file except in compliance with the License.
|
|
2647
|
+
> > > You may obtain a copy of the License at
|
|
2648
|
+
> > >
|
|
2649
|
+
> > > http://www.apache.org/licenses/LICENSE-2.0
|
|
2650
|
+
> > >
|
|
2651
|
+
> > > Unless required by applicable law or agreed to in writing, software
|
|
2652
|
+
> > > distributed under the License is distributed on an "AS IS" BASIS,
|
|
2653
|
+
> > > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2654
|
+
> > > See the License for the specific language governing permissions and
|
|
2655
|
+
> > > limitations under the License.
|
|
2656
|
+
>
|
|
2657
|
+
> ---------------------------------------
|
|
2658
|
+
>
|
|
2659
|
+
> ## @visulima/fmt
|
|
2660
|
+
> License: MIT
|
|
2661
|
+
> By: Daniel Bannert
|
|
2662
|
+
> Repository: git+https://github.com/visulima/visulima.git
|
|
2663
|
+
>
|
|
2664
|
+
> > MIT License
|
|
2665
|
+
> >
|
|
2666
|
+
> > Copyright (c) 2026 visulima
|
|
2667
|
+
> >
|
|
2668
|
+
> > Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2669
|
+
> > of this software and associated documentation files (the "Software"), to deal
|
|
2670
|
+
> > in the Software without restriction, including without limitation the rights
|
|
2671
|
+
> > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2672
|
+
> > copies of the Software, and to permit persons to whom the Software is
|
|
2673
|
+
> > furnished to do so, subject to the following conditions:
|
|
2674
|
+
> >
|
|
2675
|
+
> > The above copyright notice and this permission notice shall be included in all
|
|
2676
|
+
> > copies or substantial portions of the Software.
|
|
2677
|
+
> >
|
|
2678
|
+
> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2679
|
+
> > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2680
|
+
> > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2681
|
+
> > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2682
|
+
> > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2683
|
+
> > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
2684
|
+
> > SOFTWARE.
|
|
2685
|
+
> >
|
|
2686
|
+
> > <!-- DEPENDENCIES -->
|
|
2687
|
+
> > <!-- /DEPENDENCIES -->
|
|
2688
|
+
>
|
|
2689
|
+
> ---------------------------------------
|
|
2690
|
+
>
|
|
2691
|
+
> ## @visulima/inspector
|
|
2692
|
+
> License: MIT
|
|
2693
|
+
> By: Daniel Bannert
|
|
2694
|
+
> Repository: git+https://github.com/visulima/visulima.git
|
|
2695
|
+
>
|
|
2696
|
+
> > MIT License
|
|
2697
|
+
> >
|
|
2698
|
+
> > Copyright (c) 2026 visulima
|
|
2699
|
+
> >
|
|
2700
|
+
> > Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2701
|
+
> > of this software and associated documentation files (the "Software"), to deal
|
|
2702
|
+
> > in the Software without restriction, including without limitation the rights
|
|
2703
|
+
> > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2704
|
+
> > copies of the Software, and to permit persons to whom the Software is
|
|
2705
|
+
> > furnished to do so, subject to the following conditions:
|
|
2706
|
+
> >
|
|
2707
|
+
> > The above copyright notice and this permission notice shall be included in all
|
|
2708
|
+
> > copies or substantial portions of the Software.
|
|
2709
|
+
> >
|
|
2710
|
+
> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2711
|
+
> > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2712
|
+
> > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2713
|
+
> > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2714
|
+
> > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2715
|
+
> > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
2716
|
+
> > SOFTWARE.
|
|
2717
|
+
> >
|
|
2718
|
+
> > ---
|
|
2719
|
+
> >
|
|
2720
|
+
> > Modified code from the original [loupe](https://github.com/chaijs/loupe/tree/main) repository.
|
|
2721
|
+
> >
|
|
2722
|
+
> > (The MIT License)
|
|
2723
|
+
> >
|
|
2724
|
+
> > Copyright (c) 2011-2013 Jake Luer <jake@alogicalparadox.com> (http://alogicalparadox.com)
|
|
2725
|
+
> >
|
|
2726
|
+
> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
2727
|
+
> >
|
|
2728
|
+
> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
2729
|
+
> >
|
|
2730
|
+
> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
2731
|
+
> >
|
|
2732
|
+
> > <!-- DEPENDENCIES -->
|
|
2733
|
+
> > <!-- /DEPENDENCIES -->
|
|
2734
|
+
> >
|
|
2735
|
+
> >
|
|
2736
|
+
> >
|
|
2737
|
+
> > # Licenses of bundled types
|
|
2738
|
+
> > The published @visulima/inspector artifact additionally contains code with the following licenses:
|
|
2739
|
+
> > (MIT OR CC0-1.0)
|
|
2740
|
+
> >
|
|
2741
|
+
> > # Bundled types:
|
|
2742
|
+
> > ## type-fest
|
|
2743
|
+
> > License: (MIT OR CC0-1.0)
|
|
2744
|
+
> > By: Sindre Sorhus
|
|
2745
|
+
> > Repository: sindresorhus/type-fest
|
|
2746
|
+
> >
|
|
2747
|
+
> > > Creative Commons Legal Code
|
|
2748
|
+
> > >
|
|
2749
|
+
> > > CC0 1.0 Universal
|
|
2750
|
+
> > >
|
|
2751
|
+
> > > CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
|
2752
|
+
> > > LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
|
2753
|
+
> > > ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
|
2754
|
+
> > > INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
|
2755
|
+
> > > REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
|
2756
|
+
> > > PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
|
2757
|
+
> > > THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
|
2758
|
+
> > > HEREUNDER.
|
|
2759
|
+
> > >
|
|
2760
|
+
> > > Statement of Purpose
|
|
2761
|
+
> > >
|
|
2762
|
+
> > > The laws of most jurisdictions throughout the world automatically confer
|
|
2763
|
+
> > > exclusive Copyright and Related Rights (defined below) upon the creator
|
|
2764
|
+
> > > and subsequent owner(s) (each and all, an "owner") of an original work of
|
|
2765
|
+
> > > authorship and/or a database (each, a "Work").
|
|
2766
|
+
> > >
|
|
2767
|
+
> > > Certain owners wish to permanently relinquish those rights to a Work for
|
|
2768
|
+
> > > the purpose of contributing to a commons of creative, cultural and
|
|
2769
|
+
> > > scientific works ("Commons") that the public can reliably and without fear
|
|
2770
|
+
> > > of later claims of infringement build upon, modify, incorporate in other
|
|
2771
|
+
> > > works, reuse and redistribute as freely as possible in any form whatsoever
|
|
2772
|
+
> > > and for any purposes, including without limitation commercial purposes.
|
|
2773
|
+
> > > These owners may contribute to the Commons to promote the ideal of a free
|
|
2774
|
+
> > > culture and the further production of creative, cultural and scientific
|
|
2775
|
+
> > > works, or to gain reputation or greater distribution for their Work in
|
|
2776
|
+
> > > part through the use and efforts of others.
|
|
2777
|
+
> > >
|
|
2778
|
+
> > > For these and/or other purposes and motivations, and without any
|
|
2779
|
+
> > > expectation of additional consideration or compensation, the person
|
|
2780
|
+
> > > associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
|
2781
|
+
> > > is an owner of Copyright and Related Rights in the Work, voluntarily
|
|
2782
|
+
> > > elects to apply CC0 to the Work and publicly distribute the Work under its
|
|
2783
|
+
> > > terms, with knowledge of his or her Copyright and Related Rights in the
|
|
2784
|
+
> > > Work and the meaning and intended legal effect of CC0 on those rights.
|
|
2785
|
+
> > >
|
|
2786
|
+
> > > 1. Copyright and Related Rights. A Work made available under CC0 may be
|
|
2787
|
+
> > > protected by copyright and related or neighboring rights ("Copyright and
|
|
2788
|
+
> > > Related Rights"). Copyright and Related Rights include, but are not
|
|
2789
|
+
> > > limited to, the following:
|
|
2790
|
+
> > >
|
|
2791
|
+
> > > i. the right to reproduce, adapt, distribute, perform, display,
|
|
2792
|
+
> > > communicate, and translate a Work;
|
|
2793
|
+
> > > ii. moral rights retained by the original author(s) and/or performer(s);
|
|
2794
|
+
> > > iii. publicity and privacy rights pertaining to a person's image or
|
|
2795
|
+
> > > likeness depicted in a Work;
|
|
2796
|
+
> > > iv. rights protecting against unfair competition in regards to a Work,
|
|
2797
|
+
> > > subject to the limitations in paragraph 4(a), below;
|
|
2798
|
+
> > > v. rights protecting the extraction, dissemination, use and reuse of data
|
|
2799
|
+
> > > in a Work;
|
|
2800
|
+
> > > vi. database rights (such as those arising under Directive 96/9/EC of the
|
|
2801
|
+
> > > European Parliament and of the Council of 11 March 1996 on the legal
|
|
2802
|
+
> > > protection of databases, and under any national implementation
|
|
2803
|
+
> > > thereof, including any amended or successor version of such
|
|
2804
|
+
> > > directive); and
|
|
2805
|
+
> > > vii. other similar, equivalent or corresponding rights throughout the
|
|
2806
|
+
> > > world based on applicable law or treaty, and any national
|
|
2807
|
+
> > > implementations thereof.
|
|
2808
|
+
> > >
|
|
2809
|
+
> > > 2. Waiver. To the greatest extent permitted by, but not in contravention
|
|
2810
|
+
> > > of, applicable law, Affirmer hereby overtly, fully, permanently,
|
|
2811
|
+
> > > irrevocably and unconditionally waives, abandons, and surrenders all of
|
|
2812
|
+
> > > Affirmer's Copyright and Related Rights and associated claims and causes
|
|
2813
|
+
> > > of action, whether now known or unknown (including existing as well as
|
|
2814
|
+
> > > future claims and causes of action), in the Work (i) in all territories
|
|
2815
|
+
> > > worldwide, (ii) for the maximum duration provided by applicable law or
|
|
2816
|
+
> > > treaty (including future time extensions), (iii) in any current or future
|
|
2817
|
+
> > > medium and for any number of copies, and (iv) for any purpose whatsoever,
|
|
2818
|
+
> > > including without limitation commercial, advertising or promotional
|
|
2819
|
+
> > > purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
|
2820
|
+
> > > member of the public at large and to the detriment of Affirmer's heirs and
|
|
2821
|
+
> > > successors, fully intending that such Waiver shall not be subject to
|
|
2822
|
+
> > > revocation, rescission, cancellation, termination, or any other legal or
|
|
2823
|
+
> > > equitable action to disrupt the quiet enjoyment of the Work by the public
|
|
2824
|
+
> > > as contemplated by Affirmer's express Statement of Purpose.
|
|
2825
|
+
> > >
|
|
2826
|
+
> > > 3. Public License Fallback. Should any part of the Waiver for any reason
|
|
2827
|
+
> > > be judged legally invalid or ineffective under applicable law, then the
|
|
2828
|
+
> > > Waiver shall be preserved to the maximum extent permitted taking into
|
|
2829
|
+
> > > account Affirmer's express Statement of Purpose. In addition, to the
|
|
2830
|
+
> > > extent the Waiver is so judged Affirmer hereby grants to each affected
|
|
2831
|
+
> > > person a royalty-free, non transferable, non sublicensable, non exclusive,
|
|
2832
|
+
> > > irrevocable and unconditional license to exercise Affirmer's Copyright and
|
|
2833
|
+
> > > Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
|
2834
|
+
> > > maximum duration provided by applicable law or treaty (including future
|
|
2835
|
+
> > > time extensions), (iii) in any current or future medium and for any number
|
|
2836
|
+
> > > of copies, and (iv) for any purpose whatsoever, including without
|
|
2837
|
+
> > > limitation commercial, advertising or promotional purposes (the
|
|
2838
|
+
> > > "License"). The License shall be deemed effective as of the date CC0 was
|
|
2839
|
+
> > > applied by Affirmer to the Work. Should any part of the License for any
|
|
2840
|
+
> > > reason be judged legally invalid or ineffective under applicable law, such
|
|
2841
|
+
> > > partial invalidity or ineffectiveness shall not invalidate the remainder
|
|
2842
|
+
> > > of the License, and in such case Affirmer hereby affirms that he or she
|
|
2843
|
+
> > > will not (i) exercise any of his or her remaining Copyright and Related
|
|
2844
|
+
> > > Rights in the Work or (ii) assert any associated claims and causes of
|
|
2845
|
+
> > > action with respect to the Work, in either case contrary to Affirmer's
|
|
2846
|
+
> > > express Statement of Purpose.
|
|
2847
|
+
> > >
|
|
2848
|
+
> > > 4. Limitations and Disclaimers.
|
|
2849
|
+
> > >
|
|
2850
|
+
> > > a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
|
2851
|
+
> > > surrendered, licensed or otherwise affected by this document.
|
|
2852
|
+
> > > b. Affirmer offers the Work as-is and makes no representations or
|
|
2853
|
+
> > > warranties of any kind concerning the Work, express, implied,
|
|
2854
|
+
> > > statutory or otherwise, including without limitation warranties of
|
|
2855
|
+
> > > title, merchantability, fitness for a particular purpose, non
|
|
2856
|
+
> > > infringement, or the absence of latent or other defects, accuracy, or
|
|
2857
|
+
> > > the present or absence of errors, whether or not discoverable, all to
|
|
2858
|
+
> > > the greatest extent permissible under applicable law.
|
|
2859
|
+
> > > c. Affirmer disclaims responsibility for clearing rights of other persons
|
|
2860
|
+
> > > that may apply to the Work or any use thereof, including without
|
|
2861
|
+
> > > limitation any person's Copyright and Related Rights in the Work.
|
|
2862
|
+
> > > Further, Affirmer disclaims responsibility for obtaining any necessary
|
|
2863
|
+
> > > consents, permissions or other rights required for any use of the
|
|
2864
|
+
> > > Work.
|
|
2865
|
+
> > > d. Affirmer understands and acknowledges that Creative Commons is not a
|
|
2866
|
+
> > > party to this document and has no duty or obligation with respect to
|
|
2867
|
+
> > > this CC0 or use of the Work.
|
|
2868
|
+
>
|
|
2869
|
+
> ---------------------------------------
|
|
2870
|
+
>
|
|
2871
|
+
> ## @visulima/redact
|
|
2872
|
+
> License: MIT
|
|
2873
|
+
> By: Daniel Bannert
|
|
2874
|
+
> Repository: git+https://github.com/visulima/visulima.git
|
|
2875
|
+
>
|
|
2876
|
+
> > MIT License
|
|
2877
|
+
> >
|
|
2878
|
+
> > Copyright (c) 2026 visulima
|
|
2879
|
+
> >
|
|
2880
|
+
> > Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2881
|
+
> > of this software and associated documentation files (the "Software"), to deal
|
|
2882
|
+
> > in the Software without restriction, including without limitation the rights
|
|
2883
|
+
> > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2884
|
+
> > copies of the Software, and to permit persons to whom the Software is
|
|
2885
|
+
> > furnished to do so, subject to the following conditions:
|
|
2886
|
+
> >
|
|
2887
|
+
> > The above copyright notice and this permission notice shall be included in all
|
|
2888
|
+
> > copies or substantial portions of the Software.
|
|
2889
|
+
> >
|
|
2890
|
+
> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2891
|
+
> > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2892
|
+
> > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2893
|
+
> > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2894
|
+
> > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2895
|
+
> > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
2896
|
+
> > SOFTWARE.
|
|
2897
|
+
> >
|
|
2898
|
+
> > <!-- DEPENDENCIES -->
|
|
2899
|
+
> >
|
|
2900
|
+
> > # Licenses of bundled dependencies
|
|
2901
|
+
> > The published @visulima/redact artifact additionally contains code with the following licenses:
|
|
2902
|
+
> > MIT
|
|
2903
|
+
> >
|
|
2904
|
+
> > # Bundled dependencies:
|
|
2905
|
+
> > ## dot-prop
|
|
2906
|
+
> > License: MIT
|
|
2907
|
+
> > By: Sindre Sorhus
|
|
2908
|
+
> > Repository: sindresorhus/dot-prop
|
|
2909
|
+
> >
|
|
2910
|
+
> > > MIT License
|
|
2911
|
+
> > >
|
|
2912
|
+
> > > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
2913
|
+
> > >
|
|
2914
|
+
> > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
2915
|
+
> > >
|
|
2916
|
+
> > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
2917
|
+
> > >
|
|
2918
|
+
> > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
2919
|
+
> >
|
|
2920
|
+
> > <!-- /DEPENDENCIES -->
|
|
2921
|
+
>
|
|
2922
|
+
> ---------------------------------------
|
|
2923
|
+
>
|
|
2578
2924
|
> ## safe-stable-stringify
|
|
2579
2925
|
> License: MIT
|
|
2580
2926
|
> By: Ruben Bridgewater
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as Command } from "../packem_shared/command.d-
|
|
1
|
+
import { C as Command } from "../packem_shared/command.d-B_G9vIYJ.js";
|
|
2
2
|
import '@visulima/tabular';
|
|
3
3
|
/**
|
|
4
|
-
* Generates shell completion scripts for the CLI application.
|
|
5
|
-
*/
|
|
4
|
+
* Generates shell completion scripts for the CLI application.
|
|
5
|
+
*/
|
|
6
6
|
declare const completionCommand: Command;
|
|
7
7
|
export { completionCommand as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as u}from"../packem_shared/cerebro-error-
|
|
1
|
+
import{t as u}from"../packem_shared/cerebro-error-DWpjBY_M.js";class h extends u{troubleshooting;constructor(o,t,i=[]){super(o,t,{troubleshooting:i}),this.name="CompletionError",this.troubleshooting=i,i.length>0&&(this.hint=i.join(`
|
|
2
2
|
`))}}const a=["bash","zsh","fish","powershell"],c=["node","bun","deno"],f=e=>"Deno"in e,b=e=>"Bun"in e,d=()=>f(globalThis)?"deno":b(globalThis)?"bun":"node",p=e=>{const o=e?.starshipShell??e?.shell;if(o){const s=o.toLowerCase();if(s.includes("zsh"))return"zsh";if(s.includes("bash"))return"bash";if(s.includes("fish"))return"fish"}const t=e?.psModulePath,i=e?.prompt;if(t||i?.includes("PS"))return"powershell";if(e?.comSpec?.toLowerCase().includes("cmd.exe"))return"bash"},g=async()=>(await import("@bomb.sh/tab")).default,S=(e,o)=>{for(const t of o)t.hidden||(t.name&&e.option(t.name,t.description??""),t.alias&&e.option(t.alias,t.description??""))},w=(e,o)=>{for(const[t,i]of o){if(i.name!==t||i.hidden)continue;const s=e.command(i.name,i.description??"");i.options&&S(s,i.options)}},$=e=>{if(!a.includes(e))throw new h(`Invalid shell type: ${e}`,"INVALID_SHELL",[`Valid shells are: ${a.join(", ")}`,"Shell will be auto-detected if not specified"])},y=e=>{if(e&&!c.includes(e))throw new h(`Invalid runtime: ${e}`,"INVALID_RUNTIME",[`Valid runtimes are: ${c.join(", ")}`,"Runtime will be auto-detected if not specified"])},L=(e,o)=>{e.error("Could not detect current shell");const t=[`Usage: ${o} completion --shell=<bash|zsh|fish|powershell> [--runtime=<node|bun|deno>]`,"","Examples:"," # Install completions for zsh:",` ${o} completion --shell=zsh > ~/.${o}-completion.zsh`,` echo 'source ~/.${o}-completion.zsh' >> ~/.zshrc`,""," # Install completions for bash with custom runtime:",` ${o} completion --shell=bash --runtime=bun > ~/.${o}-completion.bash`,` echo 'source ~/.${o}-completion.bash' >> ~/.bashrc`,""," # Install completions for fish:",` ${o} completion --shell=fish > ~/.config/fish/completions/${o}.fish`].join(`
|
|
3
3
|
`);e.info(t)},I={description:"Generate shell completion scripts",env:[{description:"Shell path (Unix-like systems). Used for shell detection.",name:"SHELL",type:String},{description:"Starship shell configuration. Takes precedence over SHELL for detection.",name:"STARSHIP_SHELL",type:String},{description:"PowerShell module path (Windows). Used for PowerShell detection.",name:"PSModulePath",type:String},{description:"Command prompt variable (Windows). Used for PowerShell detection.",name:"PROMPT",type:String},{description:"Command processor (Windows). Used for Windows Command Prompt detection.",name:"ComSpec",type:String}],execute:async({env:e,logger:o,options:t,runtime:i})=>{const s=i.getCliName(),l=t.shell??p(e);if(!l){L(o,s);return}try{$(l),y(t.runtime);const n=await g();w(n,i.getCommands());const r=`${t.runtime??d()} ${s}`;n.setup(s,r,l)}catch(n){if(n instanceof h){const r=[`Failed to generate completion script: ${n.message}`,`Error code: ${n.code}`];throw n.troubleshooting.length>0&&r.push("","Troubleshooting:",...n.troubleshooting.map(m=>` • ${m}`)),o.error(r.join(`
|
|
4
4
|
`)),n}else{const r=["Failed to generate completion script",`Error: ${n instanceof Error?n.message:String(n)}`,"","Troubleshooting:"," • Ensure @bomb.sh/tab is installed: pnpm add @bomb.sh/tab",` • Verify shell is supported: ${a.join(", ")}`,` • Verify runtime is supported: ${c.join(", ")}`," • Check that your CLI name is correct"];o.error(r.join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as OptionDefinition, A as ArgumentDefinition, C as Command, T as Toolbox } from "../packem_shared/command.d-
|
|
1
|
+
import { O as OptionDefinition, A as ArgumentDefinition, C as Command, T as Toolbox } from "../packem_shared/command.d-B_G9vIYJ.js";
|
|
2
2
|
import '@visulima/tabular';
|
|
3
3
|
declare class HelpCommand<TLogger extends Console = Console> implements Command<OptionDefinition<string>, TLogger> {
|
|
4
4
|
argument: ArgumentDefinition<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{inverse as p,cyan as u,green as h,yellow as g}from"@visulima/colorize";import{o as y,r as f}from"../packem_shared/index-
|
|
1
|
+
import{inverse as p,cyan as u,green as h,yellow as g}from"@visulima/colorize";import{o as y,r as f}from"../packem_shared/index-Dpm7gUHe.js";const O=[{defaultValue:"32",description:"Controls the verbosity level of output. Valid values: '16' (quiet), '32' (normal), '64' (verbose), '128' (debug)",name:"CEREBRO_OUTPUT_LEVEL",type:String},{description:"Sets the minimum required Node.js version. Overrides the default minimum version check",name:"CEREBRO_MIN_NODE_VERSION",type:Number},{defaultValue:!1,description:"When set, disables the update notifier check",name:"NO_UPDATE_NOTIFIER",type:Boolean},{description:"Standard Node.js environment variable. When set to 'test', disables update notifier",name:"NODE_ENV",type:String},{defaultValue:!1,description:"When set, enables debug output (same as --debug flag)",name:"DEBUG",type:Boolean},{description:"Sets the terminal width for table rendering. Useful for testing and consistent output",name:"CEREBRO_TERMINAL_WIDTH",type:Number}],b="__Other",v=s=>s.charAt(0).toUpperCase()+s.slice(1),w=(s,r,l,o)=>{s.debug("no command given, printing general help...");let m=[...new Set(l.values())].filter(n=>!n.hidden);o&&(m=m.filter(n=>n.group===o));const e=m.reduce((n,i)=>{const d=i.group??b;return n[d]??=[],n[d].push(i),n},{}),a=n=>n.map(i=>{let d="";typeof i.alias=="string"?d=i.alias:Array.isArray(i.alias)&&(d=i.alias.join(", ")),d!==""&&(d=` [${d}]`);let t=i.name;return i.commandPath&&i.commandPath.length>0&&(t=`${i.commandPath.join(" ")} ${i.name}`),[`${h(t)}${d}`,i.description??""]});(s.raw??s.log)(f([{content:`${u(r.getCliName())} ${h("<command>")} [positional arguments] ${g("[options]")}`,header:p.cyan(" Usage ")},...Object.keys(e).map(n=>{const i=o?` ${v(o)}`:"";return{content:a(e[n]),header:n===b||o?p.green(` Available${i} Commands `):` ${p.green(` ${v(n)} `)}`}}),l.has("help")?{header:p.yellow(" Command Options "),optionList:l.get("help").options?.filter(n=>!n.hidden)}:void 0,{header:p.yellow(" Global Options "),optionList:r.getGlobalOptions()},{content:O.filter(n=>!n.hidden).map(n=>[n.name,n.description??""]),header:p.magenta(" Environment Variables ")},{content:`Run "${u(r.getCliName())} ${h("help <command>")}" or "${u(r.getCliName())} ${h("<command>")} ${g("--help")}" for help with a specific command.`,raw:!0}].filter(Boolean)))},$=(s,r)=>{const l=[];for(const o of s.values()){if(o.hidden)continue;const m=o.commandPath??[];if(m.length!==r.length)continue;let e=!0;for(const[a,n]of r.entries())if(m[a]!==n){e=!1;break}e&&l.push(o)}return l},E=(s,r,l,o)=>{const m=l.join(" "),e=[{content:`${u(r.getCliName())} ${h(m)} ${h("<subcommand>")} [positional arguments] ${g("[options]")}`,header:p.cyan(" Usage ")},{content:o.map(a=>{const n=[...a.commandPath??[],a.name].join(" ");return[h(n),a.description??""]}),header:p.green(" Subcommands ")},{header:p.yellow(" Global Options "),optionList:r.getGlobalOptions()},{content:`Run "${u(r.getCliName())} ${h(`${m} <subcommand>`)} ${g("--help")}" for help with a specific subcommand.`,raw:!0}];(s.raw??s.log)(f(e))},N=(s,r,l,o,m)=>{let e=m??l.get(o);if(!e)for(const t of l.values()){const c=t.commandPath?[...t.commandPath,t.name]:[t.name];if(c.at(-1)===o||c.join(" ")===o){e=t;break}}if(!e){const t=o.split(" ").filter(Boolean),c=t.length>0?$(l,t):[];if(c.length>0){E(s,r,t,c);return}s.error(`Command "${o}" not found`);return}const a=[],n=(e.commandPath?[...e.commandPath,e.name]:[e.name]).join(" ");if(a.push({content:`${u(r.getCliName())} ${h(n)}${e.argument?" [positional arguments]":""}${e.options?" [options]":""}`,header:p.cyan(" Usage ")}),e.description&&a.push({content:e.description,header:p.green(" Description ")}),e.argument&&a.push({header:"Command Positional Arguments",isArgument:!0,optionList:[e.argument]}),Array.isArray(e.options)&&e.options.length>0&&a.push({header:p.yellow(" Command Options "),optionList:e.options.filter(t=>!t.hidden)}),a.push({header:p.yellow(" Global Options "),optionList:r.getGlobalOptions()}),Array.isArray(e.env)&&e.env.length>0){const t=e.env.filter(c=>!c.hidden);t.length>0&&a.push({content:t.map(c=>[c.name,c.description??""]),header:p.magenta(" Environment Variables ")})}if(e.alias!==void 0&&e.alias.length>0){let t=e.alias;typeof e.alias=="string"&&(t=[e.alias]),a.splice(1,0,{content:t,header:"Alias(es)"})}Array.isArray(e.examples)&&e.examples.length>0&&a.push({content:e.examples,header:"Examples"});const i=[...e.commandPath??[],e.name],d=$(l,i);d.length>0&&a.push({content:d.map(t=>{const c=[...t.commandPath??[],t.name].join(" ");return[h(c),t.description??""]}),header:p.green(" Subcommands ")}),(s.raw??s.log)(f(a))};class P{argument={description:"Command to show help for (subcommand path supported, e.g. `cli help docker build`)",name:"command",type:String};name="help";options=[{description:"Display only the specified group",name:"group",type:String}];commands;constructor(r){this.commands=r}execute(r){const{argument:l,command:o,commandName:m,logger:e,options:a,runtime:n}=r,{footer:i,header:d}=n.getCommandSection();d&&(e.raw??e.log)(y(d));const t=m==="help"&&Array.isArray(l)&&l.length>0?l.join(" "):void 0;if(m==="help"&&t===void 0)w(e,n,this.commands,typeof a?.group=="string"?a.group:void 0);else{const c=t!==void 0||o===void 0||o.name==="help"?void 0:o;N(e,n,this.commands,t??m,c)}i&&(e.raw??e.log)(y(i))}}export{P as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as Command } from "../packem_shared/command.d-
|
|
1
|
+
import { C as Command } from "../packem_shared/command.d-B_G9vIYJ.js";
|
|
2
2
|
import '@visulima/tabular';
|
|
3
3
|
/**
|
|
4
|
-
* Generates README documentation for cerebro CLI commands.
|
|
5
|
-
*/
|
|
4
|
+
* Generates README documentation for cerebro CLI commands.
|
|
5
|
+
*/
|
|
6
6
|
declare const readmeCommand: Command;
|
|
7
7
|
export { readmeCommand as default };
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import{createRequire as x}from"node:module";import{r as
|
|
2
|
-
`)[0]??"",
|
|
3
|
-
${
|
|
1
|
+
import{createRequire as x}from"node:module";import{r as N}from"../packem_shared/index-Dpm7gUHe.js";import{g as q,a as V,b as G}from"../packem_shared/runtime-process-BEw54Ar-.js";let S;const O=e=>(S??=x(import.meta.url))(e),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,k=e=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[n,t]=h.versions.node.split(".").map(Number);if(n>22||n===22&&t>=3||n===20&&t>=16)return h.getBuiltinModule(e)}return O(e)},{resolve:P,join:B,dirname:L}=k("node:path"),v=async(e,n)=>{try{return await e.access(n),!0}catch{return!1}},T=async()=>{const{default:e}=await import("github-slugger"),n=new e;return t=>n.slug(t)},U=e=>e.filter(Boolean),F=(e,n)=>{const t=new Set,r=[];for(const a of e){const o=n(a);t.has(o)||(t.add(o),r.push(a))}return r},_=(e,n)=>{const t=(e.commandPath?[...e.commandPath,e.name]:[e.name]).join(" ");if(e.argument){const r=e.argument.name.toUpperCase(),a=e.argument.required?r:`[${r}]`;return`${n} ${t} ${a}`}return`${n} ${t}`},I=(e,n)=>{if(!Array.isArray(e.env)||e.env.length===0)return;const t=e.env.filter(r=>!r.hidden);t.length>0&&n.push({content:t.map(r=>[r.name,r.description??""]),header:" Environment Variables "})},W=(e,n)=>{const t=[],r=(e.commandPath?[...e.commandPath,e.name]:[e.name]).join(" "),a=!!e.argument,o=!!e.options;if(t.push({content:`${n} ${r}${a?" [positional arguments]":""}${o?" [options]":""}`,header:" Usage "}),e.description&&t.push({content:e.description,header:" Description "}),e.argument&&t.push({header:"Command Positional Arguments",isArgument:!0,optionList:[e.argument]}),Array.isArray(e.options)&&e.options.length>0&&t.push({header:" Command Options ",optionList:e.options.filter(i=>!i.hidden)}),I(e,t),e.alias!==void 0&&e.alias.length>0){const i=Array.isArray(e.alias)?e.alias:[e.alias];t.splice(1,0,{content:i,header:"Alias(es)"})}return Array.isArray(e.examples)&&e.examples.length>0&&t.push({content:e.examples,header:"Examples"}),N(t)},z=(e,n)=>{const t=e.description?.trim().split(`
|
|
2
|
+
`)[0]??"",r=_(e,n),a=W(e,n);return U([`## \`${r}\``,t,`\`\`\`
|
|
3
|
+
${a.trim()}
|
|
4
4
|
\`\`\``]).join(`
|
|
5
5
|
|
|
6
|
-
`)},
|
|
6
|
+
`)},H=(e,n,t,r)=>{const a=`(${["--version","-V"].join("|")})`,o=V(),i=G();return`\`\`\`sh-session
|
|
7
7
|
$ npm install -g ${n}
|
|
8
8
|
$ ${e} COMMAND
|
|
9
9
|
running command...
|
|
10
|
-
$ ${e} ${
|
|
11
|
-
${n}/${t??"unknown"} ${o}-${i} node-v${
|
|
10
|
+
$ ${e} ${a}
|
|
11
|
+
${n}/${t??"unknown"} ${o}-${i} node-v${r}
|
|
12
12
|
$ ${e} --help [COMMAND]
|
|
13
13
|
USAGE
|
|
14
14
|
$ ${e} COMMAND
|
|
15
15
|
...
|
|
16
16
|
\`\`\`
|
|
17
|
-
`},
|
|
18
|
-
`);return[...
|
|
19
|
-
`).trim()},
|
|
17
|
+
`},M=(e,n,t,r)=>{const a=e.map(i=>{const u=_(i,n);return`* [\`${u}\`](#${r(u)})`}),o=e.map(i=>z(i,n)).map(i=>`${i.trim()}
|
|
18
|
+
`);return[...a,"",...o].join(`
|
|
19
|
+
`).trim()},R=async(e,n,t)=>{const r=L(n);await v(e,r)||await e.mkdir(r,{recursive:!0}),await e.writeFile(n,t,"utf8")},J=async(e,n,t,r,a,o,i)=>{const u=new Map;for(const m of t){const s=m.group??"__Other",d=u.get(s)??[];d.push(m),u.set(s,d)}const p=Array.from(u.entries(),([m,s])=>m==="__Other"?["Other",s]:[m,s]);return await Promise.all(p.map(async([m,s])=>{const d=m.replaceAll(":","/"),y=B(".",r,`${d}.md`),g=`\`${a} ${m}\``,l=`${[g,"=".repeat(g.length),"",`Commands in the ${m} group.`,"",M(s,a,o,i)].join(`
|
|
20
20
|
`).trim()}
|
|
21
|
-
`;o.dryRun||await
|
|
22
|
-
`,...
|
|
21
|
+
`;o.dryRun||await R(e,P(n,y),l)})),`${[`# Command Topics
|
|
22
|
+
`,...p.map(([m])=>{const s=m.replaceAll(":","/");return`* [\`${a} ${m}\`](${r}/${s}.md)`})].join(`
|
|
23
23
|
`).trim()}
|
|
24
24
|
`},A=e=>e.replaceAll(`\r
|
|
25
25
|
`,`
|
|
26
26
|
`).replaceAll("\r",`
|
|
27
|
-
`),
|
|
27
|
+
`),K=(e,n)=>A(e).split(`
|
|
28
28
|
`).filter(t=>t.startsWith("# ")).map(t=>t.trim().slice(2)).map(t=>`* [${t}](#${n(t)})`).join(`
|
|
29
|
-
`),E=e=>e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),w=(e,n,t)=>{const
|
|
29
|
+
`),E=e=>e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),w=(e,n,t)=>{const r=A(e),a=`<!-- ${n} -->`,o=`<!-- ${n}stop -->`;if(r.includes(a)&&r.includes(o)){const i=E(a),u=E(o),p=new RegExp(String.raw`${i}(.|\n)*${u}`,"m");return r.replace(p,`${a}
|
|
30
30
|
${t}
|
|
31
|
-
${o}`)}return
|
|
31
|
+
${o}`)}return r.replace(a,`${a}
|
|
32
32
|
${t}
|
|
33
|
-
${o}`)},
|
|
33
|
+
${o}`)},Z={description:"Generate README documentation for CLI commands",execute:async({fs:e,logger:n,options:t,process:r,runtime:a})=>{const o=a.getCliName(),i=a.getPackageName()??o,u=a.getPackageVersion(),p=q().node??"unknown",m=await T(),s={aliases:t.aliases,dryRun:t.dryRun,multi:t.multi,outputDir:t.outputDir??"docs",readmePath:t.readmePath??"README.md",version:t.version??u??void 0},d=a.getCommands(),y=[...d.values()].filter(c=>!c.hidden).filter(c=>s.aliases?!0:c.name===d.get(c.name)?.name).toSorted((c,f)=>{const b=c.commandPath?[...c.commandPath,c.name].join(" "):c.name,C=f.commandPath?[...f.commandPath,f.name].join(" "):f.name;return b.localeCompare(C)}),g=F(y,c=>c.commandPath?[...c.commandPath,c.name].join(" "):c.name);n.debug(`Processing ${String(g.length)} commands for README generation`);let l;const $=P(r.cwd,s.readmePath??"README.md");if(await v(e,$)){const c=await e.readFile($,"utf8");l=A(c)}else n.warn(`README file not found at ${$}, creating template`),l=`# ${i}
|
|
34
34
|
|
|
35
35
|
<!-- usage -->
|
|
36
36
|
<!-- usagestop -->
|
|
@@ -40,6 +40,6 @@ ${o}`)},Y={description:"Generate README documentation for CLI commands",execute:
|
|
|
40
40
|
|
|
41
41
|
<!-- toc -->
|
|
42
42
|
<!-- tocstop -->
|
|
43
|
-
`;const
|
|
43
|
+
`;const j=s.outputDir??"docs",D=s.version??u??"unknown";l=w(l,"usage",H(o,i,D,p)),l=w(l,"commands",s.multi?await J(e,r.cwd,g,j,o,s,m):M(g,o,s,m)),l=w(l,"toc",K(l,m)),l=`${l.trimEnd()}
|
|
44
44
|
`,s.dryRun?(n.info("Dry run mode - README not written"),n.info(`Generated README content:
|
|
45
|
-
${l}`)):(await
|
|
45
|
+
${l}`)):(await R(e,$,l),n.info(`README generated successfully at ${$}`))},name:"readme",options:[{description:"Include aliases in command list",name:"aliases",type:Boolean},{description:"Show what would be generated without writing files",name:"dry-run",type:Boolean},{description:"Generate multi-file documentation by command groups",name:"multi",type:Boolean},{description:"Maximum depth for nested topics when using multi-file mode",name:"nested-topics-depth",type:Number},{description:"Output directory for multi-file documentation",name:"output-dir",type:String,typeLabel:"{underline directory}"},{description:"Path to README file to generate",name:"readme-path",type:String,typeLabel:"{underline path}"},{description:"Repository prefix for code links",name:"repository-prefix",type:String,typeLabel:"{underline prefix}"},{description:"Version to use in generated documentation",name:"version",type:String,typeLabel:"{underline version}"}]};export{Z as default};
|