@visulima/cerebro 3.1.1 → 3.1.2

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 CHANGED
@@ -1,3 +1,13 @@
1
+ ## @visulima/cerebro [3.1.2](https://github.com/visulima/visulima/compare/@visulima/cerebro@3.1.1...@visulima/cerebro@3.1.2) (2026-09-21)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **vis:** surface release in help and fix doctor cause ([#868](https://github.com/visulima/visulima/issues/868)) ([e826ef9](https://github.com/visulima/visulima/commit/e826ef96162a6d59443f1174f4ca75240cf6e917)), closes [#863](https://github.com/visulima/visulima/issues/863)
6
+
7
+ ### Miscellaneous Chores
8
+
9
+ * point every Discord link at the anolilab server ([#858](https://github.com/visulima/visulima/issues/858)) ([4002bfc](https://github.com/visulima/visulima/commit/4002bfcd8d3c748d7008efe208e6aaae7bd18753))
10
+
1
11
  ## @visulima/cerebro [3.1.1](https://github.com/visulima/visulima/compare/@visulima/cerebro@3.1.0...@visulima/cerebro@3.1.1) (2026-09-03)
2
12
 
3
13
  ### Bug Fixes
package/LICENSE.md CHANGED
@@ -559,6 +559,36 @@ Repository: git+https://github.com/visulima/visulima.git
559
559
  > MIT
560
560
  >
561
561
  > # Bundled dependencies:
562
+ > ## codsen-format-diagnostic-value
563
+ > License: MIT
564
+ > By: Roy Revelt
565
+ > Repository: git+https://github.com/codsen/codsen.git
566
+ >
567
+ > > MIT License
568
+ > >
569
+ > > Copyright © 2010-2026 Roy Revelt and other contributors
570
+ > >
571
+ > > Permission is hereby granted, free of charge, to any person obtaining
572
+ > > a copy of this software and associated documentation files (the
573
+ > > "Software"), to deal in the Software without restriction, including
574
+ > > without limitation the rights to use, copy, modify, merge, publish,
575
+ > > distribute, sublicense, and/or sell copies of the Software, and to
576
+ > > permit persons to whom the Software is furnished to do so, subject to
577
+ > > the following conditions:
578
+ > >
579
+ > > The above copyright notice and this permission notice shall be
580
+ > > included in all copies or substantial portions of the Software.
581
+ > >
582
+ > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
583
+ > > EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
584
+ > > MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
585
+ > > NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
586
+ > > LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
587
+ > > OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
588
+ > > WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
589
+ >
590
+ > ---------------------------------------
591
+ >
562
592
  > ## codsen-utils
563
593
  > License: MIT
564
594
  > By: Roy Revelt
@@ -566,7 +596,7 @@ Repository: git+https://github.com/visulima/visulima.git
566
596
  >
567
597
  > > MIT License
568
598
  > >
569
- > > Copyright © 2010-2025 Roy Revelt and other contributors
599
+ > > Copyright © 2010-2026 Roy Revelt and other contributors
570
600
  > >
571
601
  > > Permission is hereby granted, free of charge, to any person obtaining
572
602
  > > a copy of this software and associated documentation files (the
@@ -664,68 +694,14 @@ Repository: git+https://github.com/visulima/visulima.git
664
694
  >
665
695
  > ---------------------------------------
666
696
  >
667
- > ## html-entities
668
- > License: MIT
669
- > By: Marat Dulin
670
- > Repository: https://github.com/mdevils/html-entities.git
671
- >
672
- > > Copyright (c) 2021 Dulin Marat
673
- > >
674
- > > Permission is hereby granted, free of charge, to any person obtaining a copy
675
- > > of this software and associated documentation files (the "Software"), to deal
676
- > > in the Software without restriction, including without limitation the rights
677
- > > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
678
- > > copies of the Software, and to permit persons to whom the Software is
679
- > > furnished to do so, subject to the following conditions:
680
- > >
681
- > > The above copyright notice and this permission notice shall be included in
682
- > > all copies or substantial portions of the Software.
683
- > >
684
- > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
685
- > > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
686
- > > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
687
- > > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
688
- > > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
689
- > > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
690
- > > THE SOFTWARE.
691
- >
692
- > ---------------------------------------
693
- >
694
- > ## indent-string
697
+ > ## html-entity-codec
695
698
  > License: MIT
696
- > By: Sindre Sorhus
697
- > Repository: sindresorhus/indent-string
699
+ > By: Roy Revelt
700
+ > Repository: git+https://github.com/codsen/codsen.git
698
701
  >
699
702
  > > MIT License
700
703
  > >
701
- > > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
702
- > >
703
- > > 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:
704
- > >
705
- > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
706
- > >
707
- > > 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.
708
- >
709
- > ---------------------------------------
710
- >
711
- > ## lodash-es
712
- > License: MIT
713
- > By: John-David Dalton, Mathias Bynens
714
- > Repository: lodash/lodash
715
- >
716
- > > Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
717
- > >
718
- > > Based on Underscore.js, copyright Jeremy Ashkenas,
719
- > > DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
720
- > >
721
- > > This software consists of voluntary contributions made by many
722
- > > individuals. For exact contribution history, see the revision history
723
- > > available at https://github.com/lodash/lodash
724
- > >
725
- > > The following license applies to all parts of this software except as
726
- > > documented below:
727
- > >
728
- > > ====
704
+ > > Copyright © 2010-2026 Roy Revelt and other contributors
729
705
  > >
730
706
  > > Permission is hereby granted, free of charge, to any person obtaining
731
707
  > > a copy of this software and associated documentation files (the
@@ -745,21 +721,23 @@ Repository: git+https://github.com/visulima/visulima.git
745
721
  > > LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
746
722
  > > OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
747
723
  > > WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
724
+ >
725
+ > ---------------------------------------
726
+ >
727
+ > ## indent-string
728
+ > License: MIT
729
+ > By: Sindre Sorhus
730
+ > Repository: sindresorhus/indent-string
731
+ >
732
+ > > MIT License
748
733
  > >
749
- > > ====
750
- > >
751
- > > Copyright and related rights for sample code are waived via CC0. Sample
752
- > > code is defined as all source code displayed within the prose of the
753
- > > documentation.
734
+ > > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
754
735
  > >
755
- > > CC0: http://creativecommons.org/publicdomain/zero/1.0/
736
+ > > 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:
756
737
  > >
757
- > > ====
738
+ > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
758
739
  > >
759
- > > Files located in the node_modules and vendor directories are externally
760
- > > maintained libraries used by this software which have their own
761
- > > licenses; we recommend you read them, as their terms may differ from the
762
- > > terms above.
740
+ > > 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.
763
741
  >
764
742
  > ---------------------------------------
765
743
  >
@@ -770,7 +748,7 @@ Repository: git+https://github.com/visulima/visulima.git
770
748
  >
771
749
  > > MIT License
772
750
  > >
773
- > > Copyright © 2010-2025 Roy Revelt and other contributors
751
+ > > Copyright © 2010-2026 Roy Revelt and other contributors
774
752
  > >
775
753
  > > Permission is hereby granted, free of charge, to any person obtaining
776
754
  > > a copy of this software and associated documentation files (the
@@ -800,7 +778,7 @@ Repository: git+https://github.com/visulima/visulima.git
800
778
  >
801
779
  > > MIT License
802
780
  > >
803
- > > Copyright © 2010-2025 Roy Revelt and other contributors
781
+ > > Copyright © 2010-2026 Roy Revelt and other contributors
804
782
  > >
805
783
  > > Permission is hereby granted, free of charge, to any person obtaining
806
784
  > > a copy of this software and associated documentation files (the
@@ -830,7 +808,7 @@ Repository: git+https://github.com/visulima/visulima.git
830
808
  >
831
809
  > > MIT License
832
810
  > >
833
- > > Copyright © 2010-2025 Roy Revelt and other contributors
811
+ > > Copyright © 2010-2026 Roy Revelt and other contributors
834
812
  > >
835
813
  > > Permission is hereby granted, free of charge, to any person obtaining
836
814
  > > a copy of this software and associated documentation files (the
@@ -860,7 +838,7 @@ Repository: git+https://github.com/visulima/visulima.git
860
838
  >
861
839
  > > MIT License
862
840
  > >
863
- > > Copyright © 2010-2025 Roy Revelt and other contributors
841
+ > > Copyright © 2010-2026 Roy Revelt and other contributors
864
842
  > >
865
843
  > > Permission is hereby granted, free of charge, to any person obtaining
866
844
  > > a copy of this software and associated documentation files (the
@@ -900,29 +878,6 @@ Repository: git+https://github.com/visulima/visulima.git
900
878
  >
901
879
  > ---------------------------------------
902
880
  >
903
- > ## rfdc
904
- > License: MIT
905
- > By: David Mark Clements
906
- > Repository: git+https://github.com/davidmarkclements/rfdc.git
907
- >
908
- > > Copyright 2019 "David Mark Clements <david.mark.clements@gmail.com>"
909
- > >
910
- > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
911
- > > documentation files (the "Software"), to deal in the Software without restriction, including without limitation
912
- > > the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
913
- > > to permit persons to whom the Software is furnished to do so, subject to the following conditions:
914
- > >
915
- > > The above copyright notice and this permission notice shall be included in all copies or substantial portions
916
- > > of the Software.
917
- > >
918
- > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
919
- > > TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
920
- > > THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
921
- > > CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
922
- > > IN THE SOFTWARE.
923
- >
924
- > ---------------------------------------
925
- >
926
881
  > ## string-collapse-leading-whitespace
927
882
  > License: MIT
928
883
  > By: Roy Revelt
@@ -930,7 +885,7 @@ Repository: git+https://github.com/visulima/visulima.git
930
885
  >
931
886
  > > MIT License
932
887
  > >
933
- > > Copyright © 2010-2025 Roy Revelt and other contributors
888
+ > > Copyright © 2010-2026 Roy Revelt and other contributors
934
889
  > >
935
890
  > > Permission is hereby granted, free of charge, to any person obtaining
936
891
  > > a copy of this software and associated documentation files (the
@@ -960,7 +915,7 @@ Repository: git+https://github.com/visulima/visulima.git
960
915
  >
961
916
  > > MIT License
962
917
  > >
963
- > > Copyright © 2010-2025 Roy Revelt and other contributors
918
+ > > Copyright © 2010-2026 Roy Revelt and other contributors
964
919
  > >
965
920
  > > Permission is hereby granted, free of charge, to any person obtaining
966
921
  > > a copy of this software and associated documentation files (the
@@ -990,7 +945,7 @@ Repository: git+https://github.com/visulima/visulima.git
990
945
  >
991
946
  > > MIT License
992
947
  > >
993
- > > Copyright © 2010-2025 Roy Revelt and other contributors
948
+ > > Copyright © 2010-2026 Roy Revelt and other contributors
994
949
  > >
995
950
  > > Permission is hereby granted, free of charge, to any person obtaining
996
951
  > > a copy of this software and associated documentation files (the
@@ -1028,35 +983,6 @@ Repository: git+https://github.com/visulima/visulima.git
1028
983
  > >
1029
984
  > > 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.
1030
985
  >
1031
- > ---------------------------------------
1032
- >
1033
- > ## tiny-invariant
1034
- > License: MIT
1035
- > By: Alex Reardon
1036
- > Repository: https://github.com/alexreardon/tiny-invariant.git
1037
- >
1038
- > > MIT License
1039
- > >
1040
- > > Copyright (c) 2019 Alexander Reardon
1041
- > >
1042
- > > Permission is hereby granted, free of charge, to any person obtaining a copy
1043
- > > of this software and associated documentation files (the "Software"), to deal
1044
- > > in the Software without restriction, including without limitation the rights
1045
- > > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1046
- > > copies of the Software, and to permit persons to whom the Software is
1047
- > > furnished to do so, subject to the following conditions:
1048
- > >
1049
- > > The above copyright notice and this permission notice shall be included in all
1050
- > > copies or substantial portions of the Software.
1051
- > >
1052
- > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1053
- > > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1054
- > > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1055
- > > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1056
- > > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1057
- > > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1058
- > > SOFTWARE.
1059
- >
1060
986
  >
1061
987
  >
1062
988
  >
package/README.md CHANGED
@@ -663,7 +663,7 @@ The visulima package is open-sourced software licensed under the [MIT][license]
663
663
  [npm-downloads]: https://www.npmjs.com/package/@visulima/cerebro
664
664
  [prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge
665
665
  [prs-welcome]: https://github.com/visulima/visulima/blob/main/.github/CONTRIBUTING.md
666
- [chat-badge]: https://img.shields.io/discord/932323359193186354.svg?style=for-the-badge
667
- [chat]: https://discord.gg/TtFJY8xkFK
666
+ [chat-badge]: https://img.shields.io/discord/902465130518949899.svg?style=for-the-badge
667
+ [chat]: https://discord.gg/eajEZvk2PG
668
668
  [typescript-badge]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
669
669
  [typescript-url]: https://www.typescriptlang.org/
@@ -1 +1 @@
1
- import{inverse as d,cyan as f,green as h,yellow as y}from"@visulima/colorize";import{t as v,c as b,f as E}from"../packem_shared/format-positional-usage-DWL9qN10.js";const N=[{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}],$="__Other",C=r=>r.charAt(0).toUpperCase()+r.slice(1),w=(r,s,l,o)=>{r.debug("no command given, printing general help...");let m=[...new Set(l.values())].filter(t=>!t.hidden);o&&(m=m.filter(t=>t.group===o));const e=m.reduce((t,i)=>{const p=i.group??$;return t[p]??=[],t[p].push(i),t},{}),a=t=>t.map(i=>{let p="";typeof i.alias=="string"?p=i.alias:Array.isArray(i.alias)&&(p=i.alias.join(", ")),p!==""&&(p=` [${p}]`);let u=i.name;return i.commandPath&&i.commandPath.length>0&&(u=`${i.commandPath.join(" ")} ${i.name}`),[`${h(u)}${p}`,i.description??""]});(r.raw??r.log)(b([{content:`${f(s.getCliName())} ${h("<command>")} [positional arguments] ${y("[options]")}`,header:d.cyan(" Usage ")},...Object.keys(e).map(t=>{const i=o?` ${C(o)}`:"";return{content:a(e[t]),header:t===$||o?d.green(` Available${i} Commands `):` ${d.green(` ${C(t)} `)}`}}),l.has("help")?{header:d.yellow(" Command Options "),optionList:l.get("help").options?.filter(t=>!t.hidden)}:void 0,{header:d.yellow(" Global Options "),optionList:s.getGlobalOptions()},{content:N.filter(t=>!t.hidden).map(t=>[t.name,t.description??""]),header:d.magenta(" Environment Variables ")},{content:`Run "${f(s.getCliName())} ${h("help <command>")}" or "${f(s.getCliName())} ${h("<command>")} ${y("--help")}" for help with a specific command.`,raw:!0}].filter(Boolean)))},P=(r,s)=>{const l=[];for(const o of r.values()){if(o.hidden)continue;const m=o.commandPath??[];if(m.length!==s.length)continue;let e=!0;for(const[a,t]of s.entries())if(m[a]!==t){e=!1;break}e&&l.push(o)}return l},O=(r,s,l,o)=>{const m=l.join(" "),e=[{content:`${f(s.getCliName())} ${h(m)} ${h("<subcommand>")} [positional arguments] ${y("[options]")}`,header:d.cyan(" Usage ")},{content:o.map(a=>{const t=[...a.commandPath??[],a.name].join(" ");return[h(t),a.description??""]}),header:d.green(" Subcommands ")},{header:d.yellow(" Global Options "),optionList:s.getGlobalOptions()},{content:`Run "${f(s.getCliName())} ${h(`${m} <subcommand>`)} ${y("--help")}" for help with a specific subcommand.`,raw:!0}];(r.raw??r.log)(b(e))},A=(r,s,l,o,m)=>{let e=m??l.get(o);if(!e)for(const n of l.values()){const c=n.commandPath?[...n.commandPath,n.name]:[n.name];if(c.at(-1)===o||c.join(" ")===o){e=n;break}}if(!e){const n=o.split(" ").filter(Boolean),c=n.length>0?P(l,n):[];if(c.length>0){O(r,s,n,c);return}r.error(`Command "${o}" not found`);return}const a=[],i=(e.commandPath?[...e.commandPath,e.name]:[e.name]).join(" ");a.push({content:`${f(s.getCliName())} ${h(i)}${E(e)}${e.options?" [options]":""}`,header:d.cyan(" Usage ")}),e.description&&a.push({content:e.description,header:d.green(" Description ")});const p=(e.argument?[e.argument]:e.arguments??[]).filter(n=>!n.hidden);if(p.length>0&&a.push({header:"Command Positional Arguments",isArgument:!0,optionList:p}),Array.isArray(e.options)&&e.options.length>0&&a.push({header:d.yellow(" Command Options "),optionList:e.options.filter(n=>!n.hidden)}),a.push({header:d.yellow(" Global Options "),optionList:s.getGlobalOptions()}),Array.isArray(e.env)&&e.env.length>0){const n=e.env.filter(c=>!c.hidden);n.length>0&&a.push({content:n.map(c=>[c.name,c.description??""]),header:d.magenta(" Environment Variables ")})}if(e.alias!==void 0&&e.alias.length>0){let n=e.alias;typeof e.alias=="string"&&(n=[e.alias]),a.splice(1,0,{content:n,header:"Alias(es)"})}Array.isArray(e.examples)&&e.examples.length>0&&a.push({content:e.examples,header:"Examples"});const u=[...e.commandPath??[],e.name],g=P(l,u);g.length>0&&a.push({content:g.map(n=>{const c=[...n.commandPath??[],n.name].join(" ");return[h(c),n.description??""]}),header:d.green(" Subcommands ")}),(r.raw??r.log)(b(a))};class S{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(s){this.commands=s}execute(s){const{argument:l,command:o,commandName:m,logger:e,options:a,runtime:t}=s,{footer:i,header:p}=t.getCommandSection();p&&(e.raw??e.log)(v(p));const u=m==="help"&&Array.isArray(l)&&l.length>0?l.join(" "):void 0;if(m==="help"&&u===void 0)w(e,t,this.commands,typeof a?.group=="string"?a.group:void 0);else{const g=u!==void 0||o===void 0||o.name==="help"?void 0:o;A(e,t,this.commands,u??m,g)}i&&(e.raw??e.log)(v(i))}}export{S as default};
1
+ import{inverse as d,cyan as f,green as h,yellow as y}from"@visulima/colorize";import{t as v,c as b,f as E}from"../packem_shared/format-positional-usage-DWL9qN10.js";const N=[{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}],$="__Other",C=r=>r.charAt(0).toUpperCase()+r.slice(1),w=(r,s,l,o)=>{r.debug("no command given, printing general help...");let m=[...new Set(l.values())].filter(t=>!t.hidden);o&&(m=m.filter(t=>t.group===o));const e=m.reduce((t,i)=>{const p=i.group??$;return t[p]??=[],t[p].push(i),t},{}),a=t=>t.map(i=>{let p="";typeof i.alias=="string"?p=i.alias:Array.isArray(i.alias)&&(p=i.alias.join(", ")),p!==""&&(p=` [${p}]`);let u=i.name;return i.commandPath&&i.commandPath.length>0&&(u=`${i.commandPath.join(" ")} ${i.name}`),[`${h(u)}${p}`,i.description??""]});(r.raw??r.log)(b([{content:`${f(s.getCliName())} ${h("<command>")} [positional arguments] ${y("[options]")}`,header:d.cyan(" Usage ")},...Object.keys(e).map(t=>{const i=o?` ${C(o)}`:"";return{content:a(e[t]),header:t===$||o?d.green(` Available${i} Commands `):` ${d.green(` ${C(t)} `)}`}}),l.has("help")?{header:d.yellow(" Command Options "),optionList:l.get("help").options?.filter(t=>!t.hidden)}:void 0,{header:d.yellow(" Global Options "),optionList:s.getGlobalOptions()},{content:N.filter(t=>!t.hidden).map(t=>[t.name,t.description??""]),header:d.magenta(" Environment Variables ")},{content:`Run "${f(s.getCliName())} ${h("help <command>")}" or "${f(s.getCliName())} ${h("<command>")} ${y("--help")}" for help with a specific command.`,raw:!0}].filter(Boolean)))},P=(r,s)=>{const l=[];for(const o of r.values()){if(o.hidden)continue;const m=o.commandPath??[];if(m.length<s.length)continue;let e=!0;for(const[a,t]of s.entries())if(m[a]!==t){e=!1;break}e&&l.push(o)}return l},O=(r,s,l,o)=>{const m=l.join(" "),e=[{content:`${f(s.getCliName())} ${h(m)} ${h("<subcommand>")} [positional arguments] ${y("[options]")}`,header:d.cyan(" Usage ")},{content:o.map(a=>{const t=[...a.commandPath??[],a.name].join(" ");return[h(t),a.description??""]}),header:d.green(" Subcommands ")},{header:d.yellow(" Global Options "),optionList:s.getGlobalOptions()},{content:`Run "${f(s.getCliName())} ${h(`${m} <subcommand>`)} ${y("--help")}" for help with a specific subcommand.`,raw:!0}];(r.raw??r.log)(b(e))},A=(r,s,l,o,m)=>{let e=m??l.get(o);if(!e)for(const n of l.values()){const c=n.commandPath?[...n.commandPath,n.name]:[n.name];if(c.at(-1)===o||c.join(" ")===o){e=n;break}}if(!e){const n=o.split(" ").filter(Boolean),c=n.length>0?P(l,n):[];if(c.length>0){O(r,s,n,c);return}r.error(`Command "${o}" not found`);return}const a=[],i=(e.commandPath?[...e.commandPath,e.name]:[e.name]).join(" ");a.push({content:`${f(s.getCliName())} ${h(i)}${E(e)}${e.options?" [options]":""}`,header:d.cyan(" Usage ")}),e.description&&a.push({content:e.description,header:d.green(" Description ")});const p=(e.argument?[e.argument]:e.arguments??[]).filter(n=>!n.hidden);if(p.length>0&&a.push({header:"Command Positional Arguments",isArgument:!0,optionList:p}),Array.isArray(e.options)&&e.options.length>0&&a.push({header:d.yellow(" Command Options "),optionList:e.options.filter(n=>!n.hidden)}),a.push({header:d.yellow(" Global Options "),optionList:s.getGlobalOptions()}),Array.isArray(e.env)&&e.env.length>0){const n=e.env.filter(c=>!c.hidden);n.length>0&&a.push({content:n.map(c=>[c.name,c.description??""]),header:d.magenta(" Environment Variables ")})}if(e.alias!==void 0&&e.alias.length>0){let n=e.alias;typeof e.alias=="string"&&(n=[e.alias]),a.splice(1,0,{content:n,header:"Alias(es)"})}Array.isArray(e.examples)&&e.examples.length>0&&a.push({content:e.examples,header:"Examples"});const u=[...e.commandPath??[],e.name],g=P(l,u);g.length>0&&a.push({content:g.map(n=>{const c=[...n.commandPath??[],n.name].join(" ");return[h(c),n.description??""]}),header:d.green(" Subcommands ")}),(r.raw??r.log)(b(a))};class S{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(s){this.commands=s}execute(s){const{argument:l,command:o,commandName:m,logger:e,options:a,runtime:t}=s,{footer:i,header:p}=t.getCommandSection();p&&(e.raw??e.log)(v(p));const u=m==="help"&&Array.isArray(l)&&l.length>0?l.join(" "):void 0;if(m==="help"&&u===void 0)w(e,t,this.commands,typeof a?.group=="string"?a.group:void 0);else{const g=u!==void 0||o===void 0||o.name==="help"?void 0:o;A(e,t,this.commands,u??m,g)}i&&(e.raw??e.log)(v(i))}}export{S as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/cerebro",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "description": "A delightful toolkit for building cross-runtime CLIs for Node.js, Deno, and Bun.",
5
5
  "keywords": [
6
6
  "ansi",