cdd-cli 3.1.7 → 3.2.0

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 (136) hide show
  1. package/.eslintrc.json +1 -1
  2. package/.github/workflows/ci.yml +3 -0
  3. package/.github/workflows/docs.yml +8 -1
  4. package/CHANGELOG.md +40 -0
  5. package/CONTRIBUTING.md +28 -15
  6. package/README.md +56 -88
  7. package/babel.config.cjs +18 -1
  8. package/coverage/clover.xml +604 -0
  9. package/coverage/coverage-final.json +17 -0
  10. package/coverage/lcov-report/base.css +224 -0
  11. package/coverage/lcov-report/block-navigation.js +87 -0
  12. package/coverage/lcov-report/favicon.png +0 -0
  13. package/coverage/lcov-report/helpers/constants.js.html +235 -0
  14. package/coverage/lcov-report/helpers/containerOptionsBuilder.js.html +211 -0
  15. package/coverage/lcov-report/helpers/dockerService/serviceComponents/containerActions.js.html +853 -0
  16. package/coverage/lcov-report/helpers/dockerService/serviceComponents/containerList.js.html +289 -0
  17. package/coverage/lcov-report/helpers/dockerService/serviceComponents/index.html +131 -0
  18. package/coverage/lcov-report/helpers/index.html +176 -0
  19. package/coverage/lcov-report/helpers/logger.js.html +424 -0
  20. package/coverage/lcov-report/helpers/safeCall.js.html +139 -0
  21. package/coverage/lcov-report/helpers/validationHelpers.js.html +394 -0
  22. package/coverage/lcov-report/hooks/creation/index.html +146 -0
  23. package/coverage/lcov-report/hooks/creation/useContainerActions.js.html +292 -0
  24. package/coverage/lcov-report/hooks/creation/useContainerCreation.js.html +478 -0
  25. package/coverage/lcov-report/hooks/creation/useLogsViewer.js.html +238 -0
  26. package/coverage/lcov-report/hooks/debug/index.html +116 -0
  27. package/coverage/lcov-report/hooks/debug/useDebugLogs.js.html +172 -0
  28. package/coverage/lcov-report/hooks/index.html +161 -0
  29. package/coverage/lcov-report/hooks/navigation/index.html +116 -0
  30. package/coverage/lcov-report/hooks/navigation/useContainerSelection.js.html +160 -0
  31. package/coverage/lcov-report/hooks/useContainerCommandRouter.js.html +415 -0
  32. package/coverage/lcov-report/hooks/useControls.js.html +685 -0
  33. package/coverage/lcov-report/hooks/useEraseConfirmation.js.html +202 -0
  34. package/coverage/lcov-report/hooks/useExitHandler.js.html +283 -0
  35. package/coverage/lcov-report/index.html +191 -0
  36. package/coverage/lcov-report/prettify.css +1 -0
  37. package/coverage/lcov-report/prettify.js +2 -0
  38. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  39. package/coverage/lcov-report/sorter.js +210 -0
  40. package/coverage/lcov.info +1216 -0
  41. package/dist/components/ContainerRow.js +5 -78
  42. package/dist/components/LogViewer.js +4 -9
  43. package/dist/helpers/containerOptionsBuilder.js +58 -0
  44. package/dist/hooks/creation/useContainerCreation.js +16 -1
  45. package/dist/hooks/debug/useDebugLogs.js +46 -0
  46. package/dist/hooks/navigation/useContainerSelection.js +36 -0
  47. package/dist/hooks/useContainerCommandRouter.js +151 -0
  48. package/dist/{helpers/actionHelpers.js → hooks/useContainerStats.js} +76 -78
  49. package/dist/hooks/useControls.js +83 -342
  50. package/dist/hooks/useEraseConfirmation.js +47 -0
  51. package/dist/hooks/useExitHandler.js +68 -0
  52. package/jest.config.cjs +1 -1
  53. package/package.json +2 -3
  54. package/src/components/ContainerRow.jsx +3 -38
  55. package/src/components/LogViewer.jsx +4 -10
  56. package/src/helpers/constants.js +20 -0
  57. package/src/helpers/containerOptionsBuilder.js +42 -0
  58. package/src/helpers/dockerService/serviceComponents/containerActions.js +55 -8
  59. package/src/helpers/validationHelpers.js +75 -18
  60. package/src/hooks/creation/useContainerCreation.js +34 -4
  61. package/src/hooks/debug/useDebugLogs.js +29 -0
  62. package/src/hooks/navigation/useContainerSelection.js +25 -0
  63. package/src/hooks/useContainerCommandRouter.js +110 -0
  64. package/src/hooks/useContainerStats.js +44 -0
  65. package/src/hooks/useControls.js +75 -274
  66. package/src/hooks/useEraseConfirmation.js +39 -0
  67. package/src/hooks/useExitHandler.js +66 -0
  68. package/test/containerActions.test.js +104 -13
  69. package/test/containerOptionsBuilder.test.js +36 -0
  70. package/test/useContainerCreation.dom.test.js +46 -2
  71. package/test/useControls.dom.test.js +117 -0
  72. package/test/validationHelpers.test.js +51 -0
  73. package/.babelrc +0 -6
  74. package/FIXES_APPLIED.md +0 -419
  75. package/SECURITY.md +0 -5
  76. package/dist/hooks/useLogsStream.js +0 -41
  77. package/docs/_config.yml +0 -13
  78. package/docs/components_ContainerCreationPrompt.jsx.html +0 -114
  79. package/docs/components_ContainerRow.jsx.html +0 -151
  80. package/docs/components_ContainerSection.jsx.html +0 -75
  81. package/docs/components_Footer.jsx.html +0 -66
  82. package/docs/components_Header.jsx.html +0 -84
  83. package/docs/components_LogViewer.jsx.html +0 -91
  84. package/docs/components_MessageFeedback.jsx.html +0 -76
  85. package/docs/components_PromptField.jsx.html +0 -99
  86. package/docs/components_StatsBar.jsx.html +0 -105
  87. package/docs/components_UsageMenu.jsx.html +0 -73
  88. package/docs/fonts/OpenSans-Bold-webfont.eot +0 -0
  89. package/docs/fonts/OpenSans-Bold-webfont.svg +0 -1830
  90. package/docs/fonts/OpenSans-Bold-webfont.woff +0 -0
  91. package/docs/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  92. package/docs/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
  93. package/docs/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  94. package/docs/fonts/OpenSans-Italic-webfont.eot +0 -0
  95. package/docs/fonts/OpenSans-Italic-webfont.svg +0 -1830
  96. package/docs/fonts/OpenSans-Italic-webfont.woff +0 -0
  97. package/docs/fonts/OpenSans-Light-webfont.eot +0 -0
  98. package/docs/fonts/OpenSans-Light-webfont.svg +0 -1831
  99. package/docs/fonts/OpenSans-Light-webfont.woff +0 -0
  100. package/docs/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  101. package/docs/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
  102. package/docs/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  103. package/docs/fonts/OpenSans-Regular-webfont.eot +0 -0
  104. package/docs/fonts/OpenSans-Regular-webfont.svg +0 -1831
  105. package/docs/fonts/OpenSans-Regular-webfont.woff +0 -0
  106. package/docs/global.html +0 -6145
  107. package/docs/helpers_actionHelpers.js.html +0 -94
  108. package/docs/helpers_constants.js.html +0 -81
  109. package/docs/helpers_dockerService_dockerService.js.html +0 -79
  110. package/docs/helpers_dockerService_serviceComponents_containerActions.js.html +0 -153
  111. package/docs/helpers_dockerService_serviceComponents_containerList.js.html +0 -81
  112. package/docs/helpers_dockerService_serviceComponents_containerLogs.js.html +0 -85
  113. package/docs/helpers_dockerService_serviceComponents_containerStats.js.html +0 -107
  114. package/docs/helpers_dockerService_serviceComponents_imageUtils.js.html +0 -82
  115. package/docs/helpers_exitWithMessage.js.html +0 -77
  116. package/docs/helpers_safeCall.js.html +0 -68
  117. package/docs/helpers_validationHelpers.js.html +0 -96
  118. package/docs/hooks_creation_useContainerActions.js.html +0 -120
  119. package/docs/hooks_creation_useContainerCreation.js.html +0 -152
  120. package/docs/hooks_creation_useLogsViewer.js.html +0 -102
  121. package/docs/hooks_useControls.js.html +0 -298
  122. package/docs/hooks_useLogsStream.js.html +0 -82
  123. package/docs/index.html +0 -65
  124. package/docs/index.js.html +0 -65
  125. package/docs/module-index.html +0 -171
  126. package/docs/scripts/linenumber.js +0 -25
  127. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -202
  128. package/docs/scripts/prettify/lang-css.js +0 -2
  129. package/docs/scripts/prettify/prettify.js +0 -28
  130. package/docs/styles/jsdoc-default.css +0 -358
  131. package/docs/styles/prettify-jsdoc.css +0 -111
  132. package/docs/styles/prettify-tomorrow.css +0 -132
  133. package/esbuild.config.cjs +0 -11
  134. package/src/helpers/actionHelpers.js +0 -52
  135. package/src/hooks/useLogsStream.js +0 -31
  136. package/test/actionHelpers.test.js +0 -106
package/.eslintrc.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "no-unsafe-optional-chaining": "error",
16
16
  "react/react-in-jsx-scope": "off",
17
17
  "no-console": "off",
18
- "react/prop-types": "off",
18
+ "react/prop-types": "warn",
19
19
  "no-unused-vars": [
20
20
  "warn",
21
21
  {
@@ -22,6 +22,9 @@ jobs:
22
22
  - name: Install dependencies
23
23
  run: npm ci
24
24
 
25
+ - name: Lint
26
+ run: npm run lint
27
+
25
28
  - name: Run tests
26
29
  run: npm test
27
30
 
@@ -1,12 +1,16 @@
1
1
  name: Build and deploy docs
2
2
 
3
3
  on:
4
- push:
4
+ workflow_run:
5
+ workflows: ["CI"]
6
+ types:
7
+ - completed
5
8
  branches:
6
9
  - main
7
10
 
8
11
  jobs:
9
12
  build-and-deploy:
13
+ if: ${{ github.event.workflow_run.conclusion == 'success' }}
10
14
  runs-on: ubuntu-latest
11
15
  permissions:
12
16
  contents: write
@@ -28,6 +32,9 @@ jobs:
28
32
  - name: Build docs
29
33
  run: npm run docs
30
34
 
35
+ - name: Ensure .nojekyll
36
+ run: mkdir -p docs && touch docs/.nojekyll
37
+
31
38
  - name: Deploy to GitHub Pages (push to gh-pages)
32
39
  uses: peaceiris/actions-gh-pages@v3
33
40
  with:
package/CHANGELOG.md CHANGED
@@ -7,6 +7,46 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
7
7
  ## [Unreleased]
8
8
  - Nothing yet.
9
9
 
10
+ ## [3.2.0] - 2026-04-25
11
+
12
+ ### Added
13
+
14
+ - `IMAGE_PROFILES` map in `src/helpers/constants.js` — defines `requiredEnv` and `defaultPort` per image type (mysql, mariadb, postgres, mongo, mssql, redis).
15
+ - `DB_IMAGES` constant exported from `src/helpers/constants.js`.
16
+ - Contextual validation in wizard: if image matches a known profile, required env vars are enforced before creation.
17
+ - Auto-assigned port feedback: after successful container creation, the success message shows which ports were mapped (e.g. `Ports: 3306→3306/tcp`).
18
+ - Image name normalization: tags and registry prefixes are stripped before profile lookup (`mysql:8`, `docker.io/library/postgres:16` → `mysql`, `postgres`).
19
+ - New test files: `test/containerOptionsBuilder.test.js`, `test/useControls.dom.test.js`.
20
+
21
+ ### Fixed
22
+
23
+ - `validateEnvVars()` was never called in the container creation wizard step 3 — now connected and blocks on invalid input.
24
+ - Env var parsing split on all `=` characters — fixed to split only on the first `=`, preserving values like `JWT=abc=def`.
25
+ - `dbImages` was hardcoded in `useControls.js` — now imports `DB_IMAGES` from constants.
26
+
27
+ ## [3.1.9] - 2026-04-11
28
+
29
+ ### Changed
30
+
31
+ - CI: added lint step to the test-and-build job; docs deploy now waits for CI to pass successfully via `workflow_run` trigger.
32
+
33
+ ## [3.1.8] - 2026-04-11
34
+
35
+ ### Refactored
36
+
37
+ - Removed dead code: `actionHelpers`, `useLogsStream`, and esbuild-related artifacts that were no longer in use.
38
+ - Consolidated Babel configuration into a single env-aware file, eliminating duplicate/split config files.
39
+ - Decomposed `useControls` god hook into focused single-responsibility hooks, each owning one concern.
40
+ - Extracted `useContainerStats` hook from `ContainerRow` to separate data-fetching from rendering.
41
+ - Set Jest default environment to `node`; `jsdom` is now opt-in per test file, reducing unnecessary DOM overhead.
42
+
43
+ ### Changed
44
+
45
+ - Removed generated JSDoc output from the repository; added the generated docs directory to `.gitignore`.
46
+ - Enabled `react/prop-types` ESLint rule project-wide and resolved all resulting warnings.
47
+ - Rewrote `README.md` and `CONTRIBUTING.md`: consolidated overlapping content, removed duplication, and updated both for accuracy.
48
+ - Various `docs(style)` and `docs` commits between v3.1.5 and the refactor wave: dark theme, sticky nav, landing page rewrite, CSS consolidation, and English translation for the JSDoc home (GitHub Pages site).
49
+
10
50
  ## [3.1.5] - 2025-10-18
11
51
  _Note: I'm sorry about the issues you've run into; this is a brand-new app and I'm still learning, but I'm moving as quickly as I can to deliver a quality experience._
12
52
 
package/CONTRIBUTING.md CHANGED
@@ -1,22 +1,35 @@
1
- # Contributing
1
+ # Contributing to CDD-CLI
2
2
 
3
- Thanks for your interest in contributing! Please follow these guidelines:
3
+ Thanks for your interest in contributing! Here are the guidelines to make collaboration smooth.
4
4
 
5
- - Fork the repository and create a feature branch.
6
- - Keep changes small and focused.
7
- - Add or update tests for new behaviors.
8
- - Run `npm test` and `npm run build` before opening a PR.
9
- - Use conventional commits where possible.
5
+ ## Getting started
10
6
 
11
- For any design or large changes, open an issue first to discuss.
12
- ## Contributing to CDD-CLI
7
+ 1. Fork the repo and create a branch for your feature or fix:
13
8
 
14
- Thanks for your interest in contributing! A few guidelines to make collaboration smooth:
9
+ ```bash
10
+ git checkout -b feat/my-feature
11
+ ```
15
12
 
16
- - Fork the repo and create a branch for your feature/fix: `git checkout -b feat/my-feature`.
17
- - Write tests for any new behavior and ensure existing tests pass: `npm test`.
18
- - Follow the existing code style and run `npm run build` before opening a PR.
19
- - Keep PRs focused and describe motivation and changes.
20
- - Tag reviewers and link related issues.
13
+ 2. Install dependencies and verify everything works before making changes:
14
+
15
+ ```bash
16
+ npm install
17
+ npm test
18
+ npm run build
19
+ ```
20
+
21
+ ## Guidelines
22
+
23
+ - Keep changes small and focused — one concern per PR.
24
+ - Write tests for any new behavior and ensure existing tests pass (`npm test`).
25
+ - Run `npm run build` and verify the CLI starts (`node dist/index.js`) before opening a PR.
26
+ - Use [Conventional Commits](https://www.conventionalcommits.org/) for commit messages.
27
+ - For large or design-changing contributions, open an issue first to discuss the approach.
28
+
29
+ ## Opening a Pull Request
30
+
31
+ - Describe the motivation and what changed.
32
+ - Link any related issues.
33
+ - Tag reviewers if applicable.
21
34
 
22
35
  We appreciate clear, well-tested contributions.
package/README.md CHANGED
@@ -6,34 +6,47 @@
6
6
  <a href="https://github.com/caertos/cdd/actions/workflows/ci.yml">
7
7
  <img src="https://github.com/caertos/cdd/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI status" />
8
8
  </a>
9
- <!-- Documentation published to GitHub Pages -->
10
9
  <a href="https://caertos.github.io/cdd/">
11
10
  <img src="https://img.shields.io/badge/docs-GitHub%20Pages-blue" alt="Docs" />
12
11
  </a>
12
+ <a href="https://deepwiki.com/Caertos/cdd"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
13
13
  </p>
14
14
 
15
- Short, bilingual README with quickstart, development and tests.
15
+ A terminal dashboard for monitoring and managing Docker containers in real time. Shows live CPU/memory stats, supports keyboard-driven actions, and requires no GUI.
16
16
 
17
17
  ---
18
18
 
19
- ## Quick start (local)
19
+ ## Features
20
+
21
+ - 🐳 Clear, compact view of all Docker containers
22
+ - 🔄 Auto-refresh every few seconds
23
+ - ⌨️ Keyboard shortcuts for fast actions (navigate, start, stop, logs, quit)
24
+ - 📊 Live CPU and memory stats for running containers
25
+ - 🪵 Real-time log streaming for selected containers
26
+ - 🎨 Color-coded states and visual feedback
20
27
 
21
- 1. Clone the repo and install dependencies:
28
+ ---
29
+
30
+ ## Install globally
22
31
 
23
32
  ```bash
24
- git clone https://github.com/caertos/cdd.git
25
- cd cdd
26
- npm install
33
+ npm install -g cdd-cli
34
+ cdd
27
35
  ```
28
36
 
29
- 2. Build and run locally:
37
+ ---
38
+
39
+ ## Quick start (local)
30
40
 
31
41
  ```bash
42
+ git clone https://github.com/caertos/cdd.git
43
+ cd cdd
44
+ npm install
32
45
  npm run build
33
46
  node dist/index.js
34
47
  ```
35
48
 
36
- 3. To test the CLI as a globally available command during development:
49
+ To use it as a global command during development:
37
50
 
38
51
  ```bash
39
52
  npm link
@@ -42,96 +55,65 @@ cdd
42
55
 
43
56
  ---
44
57
 
45
- ## Usage (interactive)
58
+ ## Usage
46
59
 
47
- - Use ↑/↓ to navigate containers.
48
- - I: start selected container
49
- - P: stop selected container
50
- - R: restart selected container
51
- - C: create container (interactive prompt)
52
- - L: view logs for selected container
53
- - D: toggle the on-screen debug log panel
54
- - E: erase (remove) selected container (confirmation required)
55
- - Q: quit
60
+ Use ↑/↓ to navigate containers. Available keyboard shortcuts:
56
61
 
57
- The dashboard auto-refreshes container list every few seconds.
62
+ | Key | Action |
63
+ |-----|--------|
64
+ | `I` | Start selected container |
65
+ | `P` | Stop selected container |
66
+ | `R` | Restart selected container |
67
+ | `C` | Create container (interactive prompt) |
68
+ | `L` | View logs for selected container |
69
+ | `E` | Erase (remove) selected container — confirmation required |
70
+ | `D` | Toggle live debug log panel |
71
+ | `Q` | Quit |
58
72
 
59
73
  ---
60
74
 
61
- ## Install globally
62
-
63
- To install the CLI globally so you can run `cdd` from any terminal, use:
64
-
65
- ```bash
66
- npm install -g cdd-cli
67
- ```
68
-
69
- After installing globally, run the CLI with:
75
+ ## Requirements
70
76
 
71
- ```bash
72
- cdd
73
- ```
77
+ - Node.js >= 18
78
+ - Docker installed and running (CLI connects to the local Docker socket)
74
79
 
75
80
  ---
76
81
 
77
82
  ## Development
78
83
 
79
- - Node.js >= 18 is recommended.
80
- - To run the app from source during development:
81
-
82
84
  ```bash
83
85
  npm install
84
- npm run build
85
- node dist/index.js
86
+ npm run build # compile src/ → dist/
87
+ node dist/index.js # run from compiled output
86
88
  ```
87
89
 
88
- If you change source files, re-run `npm run build` before running the CLI.
90
+ Re-run `npm run build` after any source changes.
89
91
 
90
92
  ---
91
93
 
92
94
  ## Tests
93
95
 
94
- We use Jest for unit tests. Run:
95
-
96
96
  ```bash
97
97
  npm test
98
98
  ```
99
99
 
100
- Tests are located in `test/` and cover utility helpers.
101
-
102
- ---
103
-
104
- ## Contributing
105
-
106
- 1. Fork the repo and create a feature branch.
107
- 2. Add tests for new behavior.
108
- 3. Ensure `npm test` and `npm run build` pass.
109
- 4. Open a Pull Request with a clear description.
110
-
111
- ---
112
-
113
- ## Troubleshooting
114
-
115
- - If you don't see containers, ensure Docker is running and that your user has access to the Docker socket.
116
- - If Docker permissions are required, run the CLI with `sudo` (Linux/macOS) or as Administrator (Windows).
117
- - The project generates `dist/` — keep it out of version control (it's in .gitignore).
100
+ Tests are in `test/` and cover helpers, services, and hooks.
118
101
 
119
102
  ---
120
103
 
121
104
  ## Logging
122
105
 
123
- - The CLI logs high-level `info`, `warn`, and `error` messages by default so you see meaningful feedback without noise.
124
- - When you need deeper diagnostics (for example, to troubleshoot why stats or logs are not updating), start the CLI with debug logging enabled:
106
+ By default the CLI shows `info`, `warn`, and `error` messages. For deeper diagnostics:
125
107
 
126
108
  ```bash
127
- CDD_LOG_LEVEL=debug cdd # if you installed globally
109
+ CDD_LOG_LEVEL=debug cdd
128
110
  # or
129
111
  CDD_LOG_LEVEL=debug node dist/index.js
130
112
  ```
131
113
 
132
- - The same effect can be achieved with `LOG_LEVEL=debug`. Set `LOG_LEVEL=warn` if you only want to see warnings and errors.
133
- - Inside the CLI, press `D` to toggle the live debug log panel; press `D` again or `Esc` to hide it.
134
- - Redirect output to a file when users report issues so they can share the log easily:
114
+ Press `D` inside the CLI to toggle the live debug panel. Press `D` again or `Esc` to hide it.
115
+
116
+ To capture logs to a file:
135
117
 
136
118
  ```bash
137
119
  CDD_LOG_LEVEL=debug cdd > cdd-debug.log 2>&1
@@ -139,34 +121,20 @@ CDD_LOG_LEVEL=debug cdd > cdd-debug.log 2>&1
139
121
 
140
122
  ---
141
123
 
142
- ## License
143
-
144
- This project is MIT/ISC licensed (see `LICENSE`).
124
+ ## Troubleshooting
145
125
 
146
- ```
126
+ - If you don't see containers, ensure Docker is running and your user has access to the Docker socket.
127
+ - On Linux/macOS, try `sudo cdd` if you have permission issues. On Windows, run as Administrator.
128
+ - `dist/` is generated by the build — it's in `.gitignore` and should not be committed.
147
129
 
148
- ## Usage
149
- - When you run `cdd`, you'll see a table with all your Docker containers.
150
- - Running containers show live CPU and memory stats.
151
- - Use `Ctrl+C` to exit.
152
-
153
- ## Main features
154
- - 🐳 Clear, compact visualization of all containers.
155
- - 🔄 Automatic data refresh (every 2 seconds).
156
- - ⌨️ Keyboard shortcuts for fast actions (navigate, start, stop, logs, quit).
157
- - 📊 Live resource usage stats for running containers.
158
- - 🪵 Real-time log streaming for selected containers.
159
- - 🎨 Visual interface with colors and emojis for states.
160
- - 👤 Author: Carlos Cochero (2025)
130
+ ---
161
131
 
162
- ## Requirements
163
- - Node.js >= 18
164
- - Docker installed and running (CLI connects to local Docker socket)
132
+ ## Contributing
165
133
 
166
- ## Troubleshooting
167
- - If you don't see containers, make sure Docker is running and your user has permission to access the Docker socket.
168
- - If you have issues with global install, try with `sudo` (Linux/macOS) or run terminal as administrator (Windows).
134
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
169
135
 
170
136
  ---
171
137
 
172
- ¡Disfruta monitoreando tus contenedores Docker desde la terminal con estilo! / Enjoy monitoring your Docker containers from the terminal in style!
138
+ ## License
139
+
140
+ MIT/ISC — see [`LICENSE`](LICENSE).
package/babel.config.cjs CHANGED
@@ -1,6 +1,23 @@
1
1
  module.exports = {
2
+ env: {
3
+ test: {
4
+ // Jest necesita CJS (transpila módulos) + React
5
+ presets: [
6
+ ['@babel/preset-env', { targets: { node: 'current' } }],
7
+ '@babel/preset-react'
8
+ ]
9
+ },
10
+ // build (NODE_ENV != 'test') → mantiene ESM para el output final
11
+ production: {
12
+ presets: [
13
+ ['@babel/preset-env', { modules: false }],
14
+ '@babel/preset-react'
15
+ ]
16
+ }
17
+ },
18
+ // Fallback para cualquier otro entorno (desarrollo local, etc.)
2
19
  presets: [
3
- ['@babel/preset-env', { targets: { node: 'current' } }],
20
+ ['@babel/preset-env', { modules: false }],
4
21
  '@babel/preset-react'
5
22
  ]
6
23
  };