@visulima/cerebro 3.1.3 → 4.0.1

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +120 -0
  2. package/LICENSE.md +55 -129
  3. package/MIGRATION-GUIDE.md +29 -7
  4. package/README.md +5 -6
  5. package/dist/commands/completion-command.d.ts +1 -1
  6. package/dist/commands/completion-command.js +4 -4
  7. package/dist/commands/help-command.d.ts +1 -1
  8. package/dist/commands/help-command.js +1 -1
  9. package/dist/commands/readme-command.d.ts +1 -1
  10. package/dist/commands/readme-command.js +1 -1
  11. package/dist/commands/version-command.d.ts +1 -1
  12. package/dist/index.d.ts +2 -2
  13. package/dist/index.js +1 -1
  14. package/dist/logger/create-pail-logger.js +1 -1
  15. package/dist/packem_shared/Cerebro-ggJmXJrF.js +4 -0
  16. package/dist/packem_shared/{command.d-Dz7hkMI0.d.ts → command.d-DNTe-FYX.d.ts} +2 -2
  17. package/dist/packem_shared/constants-BGGeBKGT-C4poKWYI.js +1 -0
  18. package/dist/packem_shared/format-positional-usage-Cm4bukjQ.js +6 -0
  19. package/dist/packem_shared/runtime-process-BLYbrTb0.js +1 -0
  20. package/dist/plugins/error-handler-plugin.d.ts +1 -1
  21. package/dist/plugins/error-handler-plugin.js +1 -1
  22. package/dist/plugins/runtime-version-check-plugin.d.ts +3 -5
  23. package/dist/plugins/runtime-version-check-plugin.js +1 -1
  24. package/dist/plugins/update-notifier/update-notifier-plugin.d.ts +1 -1
  25. package/dist/plugins/update-notifier/update-notifier-plugin.js +1 -1
  26. package/dist/util/general/heap-tuning.d.ts +2 -2
  27. package/dist/util/general/heap-tuning.js +1 -1
  28. package/package.json +6 -6
  29. package/dist/packem_shared/Cerebro-CENsjWZ1.js +0 -4
  30. package/dist/packem_shared/constants-aPzGW29R-Cuf0YlDT.js +0 -1
  31. package/dist/packem_shared/format-positional-usage-O92DKKjW.js +0 -6
  32. package/dist/packem_shared/runtime-process-BN-eTlwy.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,123 @@
1
+ ## @visulima/cerebro [4.0.1](https://github.com/visulima/visulima/compare/@visulima/cerebro@4.0.0...@visulima/cerebro@4.0.1) (2026-10-24)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **cerebro:** stop heap tuning from re-spawning in a loop ([#980](https://github.com/visulima/visulima/issues/980)) ([cce5555](https://github.com/visulima/visulima/commit/cce555505c57abd110a70a5b047f7f46dfd24800))
6
+
7
+ ### Miscellaneous Chores
8
+
9
+ * move the vis packages out to visulima/vis ([#975](https://github.com/visulima/visulima/issues/975)) ([558c24d](https://github.com/visulima/visulima/commit/558c24d2556e7773472d6adafc4908d68e932b35))
10
+
11
+ ## @visulima/cerebro [4.0.0](https://github.com/visulima/visulima/compare/@visulima/cerebro@3.1.3...@visulima/cerebro@4.0.0) (2026-10-15)
12
+
13
+ ### ⚠ BREAKING CHANGES
14
+
15
+ * Deno is no longer a supported runtime or package manager.
16
+ vis targets node/bun runtimes and aube/npm/pnpm/yarn package managers; the
17
+ deno-lint/deno-fmt adapters and deno inference targets are removed.
18
+
19
+ * fix: resolve eslint errors after deno removal
20
+
21
+ - vis: use a block body for applyIgnoreScripts (arrow-body-style)
22
+ - is-ansi-color-supported: drop stale eslint-disable directives and
23
+ replace the raw-release if/else with a ternary (unicorn/prefer-ternary)
24
+
25
+ * docs(cron-parser): remove remaining deno runtime mentions
26
+
27
+ These doc/config files arrived with main's dialect-gating commit after this
28
+ branch's base, so they still listed Deno as a supported runtime.
29
+
30
+ * feat!: remove deno runtime and tooling support
31
+
32
+ Deno is being wound down: Cloudflare is acquiring the Deno team, the runtime
33
+ gets one more year of monthly maintenance before development ends, and Deno
34
+ Deploy shuts down. Drop Deno as a supported runtime, package manager, and
35
+ lint/fmt/inference target across the monorepo.
36
+
37
+ - vis: remove the deno runtime path, deno-lint/deno-fmt adapters, the
38
+ deno.json inference detector, Deno PM handling (TypeScript + Rust native
39
+ resolver), and the devcontainer deno mount; regenerate the JSON schemas.
40
+ - libraries: drop Deno runtime detection from cerebro, ono,
41
+ is-ansi-color-supported, and task-runner command parsing; remove Deno
42
+ wording from package docs and READMEs.
43
+ - delete the examples/deno directories (ono, pail, storage) and Deno docs.
44
+ - keep JSR publishing (registry usable from Node), license/attribution
45
+ comments, the secret-scanner Deno-token rule, and the historical RFCs.
46
+ * Deno is no longer a supported runtime or package manager.
47
+ vis targets node/bun runtimes and aube/npm/pnpm/yarn package managers; the
48
+ deno-lint/deno-fmt adapters and deno inference targets are removed.
49
+
50
+ * fix: resolve eslint errors after deno removal
51
+
52
+ - vis: use a block body for applyIgnoreScripts (arrow-body-style)
53
+ - is-ansi-color-supported: drop stale eslint-disable directives and
54
+ replace the raw-release if/else with a ternary (unicorn/prefer-ternary)
55
+
56
+ * chore(vis): tidy deno-removal leftovers from review
57
+
58
+ * fix(vis): drop unused logger from x handler, restore bun typing
59
+
60
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
61
+
62
+ * docs: add migration notes for removed deno exports
63
+
64
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
65
+
66
+ * feat(vis): warn on stale adapter ids and deno-only projects
67
+
68
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
69
+
70
+ * refactor(vis): derive runtime ids and reuse bun detection
71
+
72
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
73
+
74
+ * refactor(vis): drop jsr deno option and deno auth reference
75
+
76
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
77
+
78
+ * fix(vis): restore runtime id schema description
79
+
80
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
81
+
82
+ * refactor(vis): remove jsr publishing support
83
+
84
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
85
+
86
+ * feat(bytes): port @std/bytes helpers back in
87
+
88
+ Carries the Uint8Array helpers from @std/bytes@1.0.6 (MIT, Copyright the Deno authors)
89
+ into src/std-bytes.ts and re-exports them from the package entry. Keeps the public API that
90
+ the Deno-removal commit dropped, without the jsr: devDependency. Docs and AGENTS notes are
91
+ restored to describe the ported functions.
92
+
93
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
94
+
95
+ * docs(bytes): attribute ported @std/bytes source
96
+
97
+ The license file still listed @jsr/std__bytes as a bundled dependency.
98
+ Replace it with the MIT notice for the ported src/std-bytes.ts, placed outside
99
+ the generated dependency blocks.
100
+
101
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
102
+
103
+ * fix(cron-parser): keep reviewed docs and 1.1.0 version
104
+
105
+ The rebase onto the remote branch dropped the reviewed dialect sentence in the README and
106
+ the installation table row, and the release commit's 1.1.0 version bump.
107
+
108
+ ### Features
109
+
110
+ * remove deno runtime and tooling support ([#973](https://github.com/visulima/visulima/issues/973)) ([26fada1](https://github.com/visulima/visulima/commit/26fada1ac04731cba9db8f74fe20849c0a15db74))
111
+
112
+
113
+ ### Dependencies
114
+
115
+ * **@visulima/colorize:** upgraded to 3.0.0
116
+ * **@visulima/boxen:** upgraded to 6.0.0
117
+ * **@visulima/find-cache-dir:** upgraded to 4.0.0
118
+ * **@visulima/pail:** upgraded to 6.0.0
119
+ * **@visulima/path:** upgraded to 5.0.0
120
+
1
121
  ## @visulima/cerebro [3.1.3](https://github.com/visulima/visulima/compare/@visulima/cerebro@3.1.2...@visulima/cerebro@3.1.3) (2026-10-13)
2
122
 
3
123
 
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
  >
@@ -6,14 +6,36 @@ This guide documents breaking changes and migration steps for the `@visulima/cer
6
6
 
7
7
  ### Breaking Changes Summary
8
8
 
9
- - **Supported runtimes**: Node.js 20.19+, Deno 1.0+, Bun 1.0+
9
+ - **Supported runtimes**: Node.js 20.19+, Bun 1.0+
10
10
  - **Module format**: ESM-only (CommonJS removed)
11
11
  - **Import structure**: Granular plugin and command exports
12
12
  - **Error handling**: Enhanced error types and validation
13
13
 
14
+ ### Deno runtime removed
15
+
16
+ Deno is no longer a supported runtime. Three public types changed with it:
17
+
18
+ - `RuntimeType` is now `"bun" | "node"`. `"deno"` is gone.
19
+ - `runtimeVersionCheckPlugin({ runtimes })` no longer accepts `runtimes.deno`. Remove that key. Passing it is a type error.
20
+ - The plugin no longer detects Deno. A Deno process falls through to the Node branch.
21
+
22
+ #### Before
23
+
24
+ ```ts
25
+ runtimeVersionCheckPlugin({ runtimes: { bun: { minVersion: 1 }, deno: { minVersion: 2 }, node: { minVersion: 20 } } });
26
+ ```
27
+
28
+ #### After
29
+
30
+ ```ts
31
+ runtimeVersionCheckPlugin({ runtimes: { bun: { minVersion: 1 }, node: { minVersion: 20 } } });
32
+ ```
33
+
34
+ If you match on the detected runtime type, drop the `"deno"` branch.
35
+
14
36
  ### CommonJS (CJS) Export Removed
15
37
 
16
- The CommonJS (CJS) export has been removed in favor of ECMAScript Modules (ESM) only. Cerebro now supports Node.js, Deno, and Bun runtimes. For CJS compatibility in Node.js 20.19+, use dynamic imports.
38
+ The CommonJS (CJS) export has been removed in favor of ECMAScript Modules (ESM) only. Cerebro now supports Node.js and Bun runtimes. For CJS compatibility in Node.js 20.19+, use dynamic imports.
17
39
 
18
40
  #### Before (v1.x)
19
41
 
@@ -22,14 +44,14 @@ The CommonJS (CJS) export has been removed in favor of ECMAScript Modules (ESM)
22
44
  const { Cerebro, createCerebro } = require("@visulima/cerebro");
23
45
  ```
24
46
 
25
- #### After (v2.x) - Node.js 20.19+, Deno 1.0+, Bun 1.0+
47
+ #### After (v2.x) - Node.js 20.19+, Bun 1.0+
26
48
 
27
49
  ```javascript
28
50
  // Use dynamic import for ESM modules from CJS (Node.js only)
29
51
  const { Cerebro, createCerebro } = await import("@visulima/cerebro");
30
52
  ```
31
53
 
32
- **Note**: Deno and Bun natively support ESM, so you can use standard `import` statements directly.
54
+ **Note**: Bun natively supports ESM, so you can use standard `import` statements directly.
33
55
 
34
56
  #### Alternative: Convert to ESM
35
57
 
@@ -271,7 +293,7 @@ Ensure your `package.json` uses ESM:
271
293
  }
272
294
  ```
273
295
 
274
- > **Note**: Deno and Bun don't use the `package.json` engines field. Deno uses `deno.json`, and Bun supports both `package.json` and `bunfig.toml`.
296
+ > **Note**: Bun doesn't use the `package.json` engines field; it supports both `package.json` and `bunfig.toml`.
275
297
 
276
298
  #### 2. Update Imports
277
299
 
@@ -709,8 +731,8 @@ cli.addPlugin(
709
731
 
710
732
  ### ESM Migration Benefits
711
733
 
712
- - **Better Performance**: ESM's improved module caching in Node.js 20.19+, native ESM support in Deno and Bun
713
- - **Cross-Runtime Support**: Works seamlessly across Node.js, Deno, and Bun
734
+ - **Better Performance**: ESM's improved module caching in Node.js 20.19+, native ESM support in Bun
735
+ - **Cross-Runtime Support**: Works seamlessly across Node.js and Bun
714
736
  - **Modern JavaScript**: Consistent module syntax across environments
715
737
  - **Bundle Optimization**: Better tree-shaking and dead code elimination
716
738
  - **Developer Experience**: Improved IDE support and error messages
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  </a>
8
8
 
9
- <h3 align="center">A delightful toolkit for building cross-runtime CLIs for Node.js, Deno, and Bun.</h3>
9
+ <h3 align="center">A delightful toolkit for building cross-runtime CLIs for Node.js and Bun.</h3>
10
10
 
11
11
  <!-- END_PACKAGE_OG_IMAGE_PLACEHOLDER -->
12
12
 
@@ -135,7 +135,7 @@ cli.addCommand({
135
135
  await cli.run();
136
136
  ```
137
137
 
138
- Now you can run your CLI with `node index.js` (or `deno run index.js`, `bun index.js`). Here are some example usages:
138
+ Now you can run your CLI with `node index.js` (or `bun index.js`). Here are some example usages:
139
139
 
140
140
  ```bash
141
141
  # Show help
@@ -237,7 +237,7 @@ When your command's `execute` function is called, it receives a toolbox object w
237
237
  - **`args`**: Named positional arguments (camelCase keys) from the command's `arguments: [ ... ]` definitions; empty when none are declared
238
238
  - **`env`**: Environment variables (camelCase keys) processed from the command's `env: [...]` definitions
239
239
  - **`fs`**: Injected filesystem adapter (subset of `node:fs/promises`). Swap via `CliOptions.fs` for tests or sandboxed runtimes.
240
- - **`process`**: Runtime snapshot — `cwd`, `env`, `argv`, `stdin`, `exit`, `platform`, `arch`. Prefer this over the global `process` so commands stay portable across Node, Deno, Bun, and mocked test runtimes.
240
+ - **`process`**: Runtime snapshot — `cwd`, `env`, `argv`, `stdin`, `exit`, `platform`, `arch`. Prefer this over the global `process` so commands stay portable across Node, Bun, and mocked test runtimes.
241
241
  - **`runtime`**: Reference to the CLI instance
242
242
  - **`argv`**: Original command-line arguments array
243
243
 
@@ -287,7 +287,7 @@ cli.addCommand({
287
287
 
288
288
  ## Runtime Injection
289
289
 
290
- Commands receive an injected `{ fs, console, process }` context on the toolbox. Prefer reading from these over reaching for `node:fs/promises`, the global `console`, or the global `process` — commands written against the injected context stay testable, portable across Node/Deno/Bun, and ready to run inside sandboxed environments like MCP servers.
290
+ Commands receive an injected `{ fs, console, process }` context on the toolbox. Prefer reading from these over reaching for `node:fs/promises`, the global `console`, or the global `process` — commands written against the injected context stay testable, portable across Node/Bun, and ready to run inside sandboxed environments like MCP servers.
291
291
 
292
292
  ```ts
293
293
  import { Cerebro } from "@visulima/cerebro";
@@ -513,7 +513,7 @@ yarn add @bomb.sh/tab
513
513
  Import and add the completion command to your CLI. The completion command supports two options:
514
514
 
515
515
  - **`--shell`**: Shell type (bash, zsh, fish, powershell) - auto-detected by default
516
- - **`--runtime`**: JavaScript runtime (node, bun, deno) - auto-detected by default
516
+ - **`--runtime`**: JavaScript runtime (node, bun) - auto-detected by default
517
517
 
518
518
  ```ts
519
519
  import { Cerebro } from "@visulima/cerebro";
@@ -621,7 +621,6 @@ If completions don't work:
621
621
  Cerebro supports multiple JavaScript runtimes:
622
622
 
623
623
  - **Node.js**: >=20.19 <=25.x (follows [Node.js' release schedule](https://github.com/nodejs/release#release-schedule))
624
- - **Deno**: 1.0+
625
624
  - **Bun**: 1.0+
626
625
 
627
626
  The library uses runtime-agnostic APIs to ensure compatibility across all supported runtimes. Here's [a post on why we think tracking Node.js releases is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
@@ -1,4 +1,4 @@
1
- import { C as Command } from "../packem_shared/command.d-Dz7hkMI0.js";
1
+ import { C as Command } from "../packem_shared/command.d-DNTe-FYX.js";
2
2
  import '@visulima/tabular';
3
3
  /**
4
4
  * Generates shell completion scripts for the CLI application.
@@ -1,5 +1,5 @@
1
- import{C as u}from"../packem_shared/cerebro-error-Dv3FuXO8.js";class d extends u{troubleshooting;constructor(t,n,o=[]){super(t,n,{troubleshooting:o}),this.name="CompletionError",this.troubleshooting=o,o.length>0&&(this.hint=o.join(`
2
- `))}}const c=["bash","zsh","fish","powershell"],h=["node","bun","deno"],f=e=>"Deno"in e,S=e=>"Bun"in e,p=()=>f(globalThis)?"deno":S(globalThis)?"bun":"node",m=e=>{const n=e?.starshipShell??e?.shell;if(n){const s=n.toLowerCase();if(s.includes("zsh"))return"zsh";if(s.includes("bash"))return"bash";if(s.includes("fish"))return"fish"}const o=e?.psModulePath,i=e?.prompt;if(o||i?.includes("PS"))return"powershell";if(e?.comSpec?.toLowerCase().includes("cmd.exe"))return"bash"},b=async()=>(await import("@bomb.sh/tab")).default,g=(e,t)=>{for(const n of t)n.hidden||(n.name&&e.option(n.name,n.description??""),n.alias&&e.option(n.alias,n.description??""))},w=(e,t)=>{for(const[n,o]of t){if(o.name!==n||o.hidden)continue;const i=e.command(o.name,o.description??"");o.options&&g(i,o.options)}},$=e=>{if(!c.includes(e))throw new d(`Invalid shell type: ${e}`,"INVALID_SHELL",[`Valid shells are: ${c.join(", ")}`,"Shell will be auto-detected if not specified"])},y=e=>{if(e&&!h.includes(e))throw new d(`Invalid runtime: ${e}`,"INVALID_RUNTIME",[`Valid runtimes are: ${h.join(", ")}`,"Runtime will be auto-detected if not specified"])},C=(e,t)=>{e.error("Could not detect current shell");const n=[`Usage: ${t} completion --shell=<bash|zsh|fish|powershell> [--runtime=<node|bun|deno>]`,"","Examples:"," # Install completions for zsh:",` ${t} completion --shell=zsh > ~/.${t}-completion.zsh`,` echo 'source ~/.${t}-completion.zsh' >> ~/.zshrc`,""," # Install completions for bash with custom runtime:",` ${t} completion --shell=bash --runtime=bun > ~/.${t}-completion.bash`,` echo 'source ~/.${t}-completion.bash' >> ~/.bashrc`,""," # Install completions for fish:",` ${t} completion --shell=fish > ~/.config/fish/completions/${t}.fish`].join(`
3
- `);e.info(n)},L={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:t,options:n,runtime:o})=>{const i=o.getCliName(),l=n.shell??m(e);if(!l){C(t,i);return}try{$(l),y(n.runtime);const s=await b();w(s,o.getCommands());const r=`${n.runtime??p()} ${i}`;s.setup(i,r,l)}catch(s){if(s instanceof d){const a=[`Failed to generate completion script: ${s.message}`,`Error code: ${s.code}`];throw s.troubleshooting.length>0&&a.push("","Troubleshooting:",...s.troubleshooting.map(r=>` • ${r}`)),t.error(a.join(`
1
+ import{C as u}from"../packem_shared/cerebro-error-Dv3FuXO8.js";import{h as f}from"../packem_shared/runtime-process-BLYbrTb0.js";class d extends u{troubleshooting;constructor(t,n,o=[]){super(t,n,{troubleshooting:o}),this.name="CompletionError",this.troubleshooting=o,o.length>0&&(this.hint=o.join(`
2
+ `))}}const c=["bash","zsh","fish","powershell"],h=["node","bun"],p=()=>f(globalThis)?"bun":"node",m=e=>{const n=e?.starshipShell??e?.shell;if(n){const s=n.toLowerCase();if(s.includes("zsh"))return"zsh";if(s.includes("bash"))return"bash";if(s.includes("fish"))return"fish"}const o=e?.psModulePath,i=e?.prompt;if(o||i?.includes("PS"))return"powershell";if(e?.comSpec?.toLowerCase().includes("cmd.exe"))return"bash"},S=async()=>(await import("@bomb.sh/tab")).default,b=(e,t)=>{for(const n of t)n.hidden||(n.name&&e.option(n.name,n.description??""),n.alias&&e.option(n.alias,n.description??""))},g=(e,t)=>{for(const[n,o]of t){if(o.name!==n||o.hidden)continue;const i=e.command(o.name,o.description??"");o.options&&b(i,o.options)}},w=e=>{if(!c.includes(e))throw new d(`Invalid shell type: ${e}`,"INVALID_SHELL",[`Valid shells are: ${c.join(", ")}`,"Shell will be auto-detected if not specified"])},$=e=>{if(e&&!h.includes(e))throw new d(`Invalid runtime: ${e}`,"INVALID_RUNTIME",[`Valid runtimes are: ${h.join(", ")}`,"Runtime will be auto-detected if not specified"])},y=(e,t)=>{e.error("Could not detect current shell");const n=[`Usage: ${t} completion --shell=<bash|zsh|fish|powershell> [--runtime=<node|bun>]`,"","Examples:"," # Install completions for zsh:",` ${t} completion --shell=zsh > ~/.${t}-completion.zsh`,` echo 'source ~/.${t}-completion.zsh' >> ~/.zshrc`,""," # Install completions for bash with custom runtime:",` ${t} completion --shell=bash --runtime=bun > ~/.${t}-completion.bash`,` echo 'source ~/.${t}-completion.bash' >> ~/.bashrc`,""," # Install completions for fish:",` ${t} completion --shell=fish > ~/.config/fish/completions/${t}.fish`].join(`
3
+ `);e.info(n)},L={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:t,options:n,runtime:o})=>{const i=o.getCliName(),l=n.shell??m(e);if(!l){y(t,i);return}try{w(l),$(n.runtime);const s=await S();g(s,o.getCommands());const r=`${n.runtime??p()} ${i}`;s.setup(i,r,l)}catch(s){if(s instanceof d){const a=[`Failed to generate completion script: ${s.message}`,`Error code: ${s.code}`];throw s.troubleshooting.length>0&&a.push("","Troubleshooting:",...s.troubleshooting.map(r=>` • ${r}`)),t.error(a.join(`
4
4
  `)),s}else{const r=["Failed to generate completion script",`Error: ${s instanceof Error?s.message:String(s)}`,"","Troubleshooting:"," • Ensure @bomb.sh/tab is installed: pnpm add @bomb.sh/tab",` • Verify shell is supported: ${c.join(", ")}`,` • Verify runtime is supported: ${h.join(", ")}`," • Check that your CLI name is correct"];t.error(r.join(`
5
- `))}}},name:"completion",options:[{defaultOption:!0,defaultValue:m(),description:"Shell type (bash, zsh, fish, powershell). Defaults to current shell if detected.",name:"shell",type:String,typeLabel:"{underline shell}"},{defaultValue:p(),description:"JavaScript runtime (node, bun, deno). Defaults to current runtime if detected.",name:"runtime",type:String,typeLabel:"{underline runtime}"}]};export{L as default};
5
+ `))}}},name:"completion",options:[{defaultOption:!0,defaultValue:m(),description:"Shell type (bash, zsh, fish, powershell). Defaults to current shell if detected.",name:"shell",type:String,typeLabel:"{underline shell}"},{defaultValue:p(),description:"JavaScript runtime (node, bun). Defaults to current runtime if detected.",name:"runtime",type:String,typeLabel:"{underline runtime}"}]};export{L as default};
@@ -1,4 +1,4 @@
1
- import { O as OptionDefinition, A as ArgumentDefinition, C as Command, T as Toolbox } from "../packem_shared/command.d-Dz7hkMI0.js";
1
+ import { O as OptionDefinition, A as ArgumentDefinition, C as Command, T as Toolbox } from "../packem_shared/command.d-DNTe-FYX.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 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-O92DKKjW.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-Cm4bukjQ.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,4 +1,4 @@
1
- import { C as Command } from "../packem_shared/command.d-Dz7hkMI0.js";
1
+ import { C as Command } from "../packem_shared/command.d-DNTe-FYX.js";
2
2
  import '@visulima/tabular';
3
3
  /**
4
4
  * Generates README documentation for cerebro CLI commands.
@@ -1,4 +1,4 @@
1
- import{createRequire as L}from"node:module";import{f as R,c as F}from"../packem_shared/format-positional-usage-O92DKKjW.js";import{g as q,a as G,b as U}from"../packem_shared/runtime-process-BN-eTlwy.js";let k;const O=e=>(k??=L(import.meta.url))(e),$=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=e=>{if(typeof $<"u"&&$.versions&&$.versions.node){const[n,t]=$.versions.node.split(".").map(Number);if(n>22||n===22&&t>=3||n===20&&t>=16)return $.getBuiltinModule(e)}return O(e)},{resolve:v,join:V,dirname:B}=T("node:path"),C=async(e,n)=>{try{return await e.access(n),!0}catch{return!1}},z=async()=>{const{default:e}=await import("github-slugger"),n=new e;return t=>n.slug(t)},I=e=>e.filter(Boolean),W=(e,n)=>{const t=new Set,o=[];for(const s of e){const r=n(s);t.has(r)||(t.add(r),o.push(s))}return o},D=(e,n)=>{const o=(e.commandPath?[...e.commandPath,e.name]:[e.name]).join(" ");return`${n} ${o}${R(e,"readme")}`},H=(e,n)=>{if(!Array.isArray(e.env)||e.env.length===0)return;const t=e.env.filter(o=>!o.hidden);t.length>0&&n.push({content:t.map(o=>[o.name,o.description??""]),header:" Environment Variables "})},N=(e,n)=>{const t=[],s=(e.commandPath?[...e.commandPath,e.name]:[e.name]).join(" "),r=!!e.options;t.push({content:`${n} ${s}${R(e)}${r?" [options]":""}`,header:" Usage "}),e.description&&t.push({content:e.description,header:" Description "});const c=(e.argument?[e.argument]:e.arguments??[]).filter(a=>!a.hidden);if(c.length>0&&t.push({header:"Command Positional Arguments",isArgument:!0,optionList:c}),Array.isArray(e.options)&&e.options.length>0&&t.push({header:" Command Options ",optionList:e.options.filter(a=>!a.hidden)}),H(e,t),e.alias!==void 0&&e.alias.length>0){const a=Array.isArray(e.alias)?e.alias:[e.alias];t.splice(1,0,{content:a,header:"Alias(es)"})}return Array.isArray(e.examples)&&e.examples.length>0&&t.push({content:e.examples,header:"Examples"}),F(t)},J=(e,n)=>{const t=e.description?.trim().split(`
1
+ import{createRequire as L}from"node:module";import{f as R,c as F}from"../packem_shared/format-positional-usage-Cm4bukjQ.js";import{g as q,a as G,b as U}from"../packem_shared/runtime-process-BLYbrTb0.js";let k;const O=e=>(k??=L(import.meta.url))(e),$=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=e=>{if(typeof $<"u"&&$.versions&&$.versions.node){const[n,t]=$.versions.node.split(".").map(Number);if(n>22||n===22&&t>=3||n===20&&t>=16)return $.getBuiltinModule(e)}return O(e)},{resolve:v,join:V,dirname:B}=T("node:path"),C=async(e,n)=>{try{return await e.access(n),!0}catch{return!1}},z=async()=>{const{default:e}=await import("github-slugger"),n=new e;return t=>n.slug(t)},I=e=>e.filter(Boolean),W=(e,n)=>{const t=new Set,o=[];for(const s of e){const r=n(s);t.has(r)||(t.add(r),o.push(s))}return o},D=(e,n)=>{const o=(e.commandPath?[...e.commandPath,e.name]:[e.name]).join(" ");return`${n} ${o}${R(e,"readme")}`},H=(e,n)=>{if(!Array.isArray(e.env)||e.env.length===0)return;const t=e.env.filter(o=>!o.hidden);t.length>0&&n.push({content:t.map(o=>[o.name,o.description??""]),header:" Environment Variables "})},N=(e,n)=>{const t=[],s=(e.commandPath?[...e.commandPath,e.name]:[e.name]).join(" "),r=!!e.options;t.push({content:`${n} ${s}${R(e)}${r?" [options]":""}`,header:" Usage "}),e.description&&t.push({content:e.description,header:" Description "});const c=(e.argument?[e.argument]:e.arguments??[]).filter(a=>!a.hidden);if(c.length>0&&t.push({header:"Command Positional Arguments",isArgument:!0,optionList:c}),Array.isArray(e.options)&&e.options.length>0&&t.push({header:" Command Options ",optionList:e.options.filter(a=>!a.hidden)}),H(e,t),e.alias!==void 0&&e.alias.length>0){const a=Array.isArray(e.alias)?e.alias:[e.alias];t.splice(1,0,{content:a,header:"Alias(es)"})}return Array.isArray(e.examples)&&e.examples.length>0&&t.push({content:e.examples,header:"Examples"}),F(t)},J=(e,n)=>{const t=e.description?.trim().split(`
2
2
  `)[0]??"",o=D(e,n),s=N(e,n);return I([`## \`${o}\``,t,`\`\`\`
3
3
  ${s.trim()}
4
4
  \`\`\``]).join(`
@@ -1,4 +1,4 @@
1
- import { C as Command } from "../packem_shared/command.d-Dz7hkMI0.js";
1
+ import { C as Command } from "../packem_shared/command.d-DNTe-FYX.js";
2
2
  import '@visulima/tabular';
3
3
  declare const _default: Command;
4
4
  export { _default as default };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as CerebroFs, b as CommandSection, O as OptionDefinition, T as Toolbox, c as CommandInput, P as Plugin, d as PluginManager, C as Command, e as CliRunOptions, R as RunCommandOptions, f as CommandExecute, g as Cli$1, h as OptionDefinitionRecord, E as EnvDefinitionRecord, A as ArgumentDefinition, L as LazyCommandModule } from "./packem_shared/command.d-Dz7hkMI0.js";
2
- export type { i as AnyCommandInput, j as CerebroProcess, k as EnvDefinition, l as OutputType, m as PluginContext, V as VERBOSITY_LEVEL } from "./packem_shared/command.d-Dz7hkMI0.js";
1
+ import { a as CerebroFs, b as CommandSection, O as OptionDefinition, T as Toolbox, c as CommandInput, P as Plugin, d as PluginManager, C as Command, e as CliRunOptions, R as RunCommandOptions, f as CommandExecute, g as Cli$1, h as OptionDefinitionRecord, E as EnvDefinitionRecord, A as ArgumentDefinition, L as LazyCommandModule } from "./packem_shared/command.d-DNTe-FYX.js";
2
+ export type { i as AnyCommandInput, j as CerebroProcess, k as EnvDefinition, l as OutputType, m as PluginContext, V as VERBOSITY_LEVEL } from "./packem_shared/command.d-DNTe-FYX.js";
3
3
  import { V as VisulimaError } from "./packem_shared/index.d-CnnVYgSZ.js";
4
4
  import '@visulima/tabular';
5
5
  type CliOptions<T extends Console = Console> = {