domd 2.2.26__tar.gz → 2.2.27__tar.gz

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 (125) hide show
  1. {domd-2.2.26 → domd-2.2.27}/PKG-INFO +73 -4
  2. {domd-2.2.26 → domd-2.2.27}/README.md +70 -2
  3. {domd-2.2.26 → domd-2.2.27}/pyproject.toml +3 -2
  4. {domd-2.2.26 → domd-2.2.27}/src/domd/__init__.py +1 -1
  5. {domd-2.2.26 → domd-2.2.27}/src/domd/adapters/api/flask_api.py +12 -11
  6. {domd-2.2.26 → domd-2.2.27}/src/domd/adapters/cli/command_presenter.py +1 -2
  7. {domd-2.2.26 → domd-2.2.27}/src/domd/adapters/formatters/markdown_formatter.py +1 -1
  8. {domd-2.2.26 → domd-2.2.27}/src/domd/adapters/persistence/in_memory_command_repository.py +1 -1
  9. {domd-2.2.26 → domd-2.2.27}/src/domd/adapters/persistence/shell_command_executor.py +7 -4
  10. {domd-2.2.26 → domd-2.2.27}/src/domd/api.py +1 -1
  11. {domd-2.2.26 → domd-2.2.27}/src/domd/application/factory.py +2 -1
  12. {domd-2.2.26 → domd-2.2.27}/src/domd/cli.py +101 -92
  13. {domd-2.2.26 → domd-2.2.27}/src/domd/core/__init__.py +2 -2
  14. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_detection/base_detector.py +1 -1
  15. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_detection/handlers/command_handler.py +2 -1
  16. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_detection/handlers/config_handler.py +1 -1
  17. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_detection/parsers/base_parser.py +15 -15
  18. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_detection/parsers/parser_registry.py +1 -1
  19. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_detection/project_detector.py +0 -1
  20. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_detection/utils/virtualenv.py +4 -1
  21. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_execution/command_executor.py +2 -2
  22. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_execution/command_recorder.py +0 -1
  23. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_execution/environment_detector.py +1 -2
  24. {domd-2.2.26 → domd-2.2.27}/src/domd/core/domain/command.py +1 -2
  25. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsers/pyproject_toml.py +1 -1
  26. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsing/file_processor.py +1 -1
  27. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsing/pattern_matcher.py +1 -1
  28. {domd-2.2.26 → domd-2.2.27}/src/domd/core/ports/command_repository.py +2 -2
  29. {domd-2.2.26 → domd-2.2.27}/src/domd/core/ports/report_formatter.py +2 -2
  30. {domd-2.2.26 → domd-2.2.27}/src/domd/core/project_detection/command_handling.py +1 -1
  31. {domd-2.2.26 → domd-2.2.27}/src/domd/core/project_detection/config_files.py +0 -1
  32. {domd-2.2.26 → domd-2.2.27}/src/domd/core/project_detection/detector.py +2 -1
  33. {domd-2.2.26 → domd-2.2.27}/src/domd/core/reporters/done_md.py +2 -2
  34. {domd-2.2.26 → domd-2.2.27}/src/domd/core/reporters/todo_md.py +1 -2
  35. {domd-2.2.26 → domd-2.2.27}/src/domd/core/reporting/formatters.py +2 -3
  36. {domd-2.2.26 → domd-2.2.27}/src/domd/core/reporting/reporter.py +0 -2
  37. {domd-2.2.26 → domd-2.2.27}/src/domd/core/services/report_service.py +13 -4
  38. {domd-2.2.26 → domd-2.2.27}/src/domd/core/utils/logging_utils.py +1 -3
  39. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/markdown_parser.py +29 -15
  40. {domd-2.2.26 → domd-2.2.27}/LICENSE +0 -0
  41. {domd-2.2.26 → domd-2.2.27}/src/domd/adapters/__init__.py +0 -0
  42. {domd-2.2.26 → domd-2.2.27}/src/domd/adapters/api/__init__.py +0 -0
  43. {domd-2.2.26 → domd-2.2.27}/src/domd/adapters/cli/__init__.py +0 -0
  44. {domd-2.2.26 → domd-2.2.27}/src/domd/adapters/formatters/__init__.py +0 -0
  45. {domd-2.2.26 → domd-2.2.27}/src/domd/adapters/persistence/__init__.py +0 -0
  46. {domd-2.2.26 → domd-2.2.27}/src/domd/application/__init__.py +0 -0
  47. {domd-2.2.26 → domd-2.2.27}/src/domd/command_execution/__init__.py +0 -0
  48. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_detection/__init__.py +0 -0
  49. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_detection/handlers/__init__.py +0 -0
  50. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_detection/models.py +0 -0
  51. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_detection/parsers/__init__.py +0 -0
  52. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_detection/utils/__init__.py +0 -0
  53. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_detection/utils/file_utils.py +0 -0
  54. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_execution/__init__.py +0 -0
  55. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_execution/command_runner.py +0 -0
  56. {domd-2.2.26 → domd-2.2.27}/src/domd/core/command_execution/executor.py +0 -0
  57. {domd-2.2.26 → domd-2.2.27}/src/domd/core/commands/__init__.py +0 -0
  58. {domd-2.2.26 → domd-2.2.27}/src/domd/core/commands/command.py +0 -0
  59. {domd-2.2.26 → domd-2.2.27}/src/domd/core/commands/executor.py +0 -0
  60. {domd-2.2.26 → domd-2.2.27}/src/domd/core/detector.py +0 -0
  61. {domd-2.2.26 → domd-2.2.27}/src/domd/core/domain/__init__.py +0 -0
  62. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsers/__init__.py +0 -0
  63. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsers/ansible_galaxy.py +0 -0
  64. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsers/ansible_inventory.py +0 -0
  65. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsers/ansible_playbook.py +0 -0
  66. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsers/ansible_role.py +0 -0
  67. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsers/ansible_vault.py +0 -0
  68. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsers/base.py +0 -0
  69. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsers/cargo_toml.py +0 -0
  70. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsers/composer_json.py +0 -0
  71. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsers/go_mod.py +0 -0
  72. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsers/makefile.py +0 -0
  73. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsers/package_json.py +0 -0
  74. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsers/tox_ini.py +0 -0
  75. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsing/__init__.py +0 -0
  76. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsing/base.py +0 -0
  77. {domd-2.2.26 → domd-2.2.27}/src/domd/core/parsing/parser_registry.py +0 -0
  78. {domd-2.2.26 → domd-2.2.27}/src/domd/core/ports/__init__.py +0 -0
  79. {domd-2.2.26 → domd-2.2.27}/src/domd/core/ports/command_executor.py +0 -0
  80. {domd-2.2.26 → domd-2.2.27}/src/domd/core/project_detection/__init__.py +0 -0
  81. {domd-2.2.26 → domd-2.2.27}/src/domd/core/project_detection/virtualenv.py +0 -0
  82. {domd-2.2.26 → domd-2.2.27}/src/domd/core/reporters/__init__.py +0 -0
  83. {domd-2.2.26 → domd-2.2.27}/src/domd/core/reporters/base.py +0 -0
  84. {domd-2.2.26 → domd-2.2.27}/src/domd/core/reporting/__init__.py +0 -0
  85. {domd-2.2.26 → domd-2.2.27}/src/domd/core/services/__init__.py +0 -0
  86. {domd-2.2.26 → domd-2.2.27}/src/domd/core/services/command_service.py +0 -0
  87. {domd-2.2.26 → domd-2.2.27}/src/domd/core/utils/__init__.py +0 -0
  88. {domd-2.2.26 → domd-2.2.27}/src/domd/core/utils/command_utils.py +0 -0
  89. {domd-2.2.26 → domd-2.2.27}/src/domd/core/utils/environment.py +0 -0
  90. {domd-2.2.26 → domd-2.2.27}/src/domd/core/utils/file_utils.py +0 -0
  91. {domd-2.2.26 → domd-2.2.27}/src/domd/core/utils/virtualenv.py +0 -0
  92. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/__init__.py +0 -0
  93. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/ansible.py +0 -0
  94. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/base.py +0 -0
  95. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/build_systems.py +0 -0
  96. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/ci_cd.py +0 -0
  97. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/docker/__init__.py +0 -0
  98. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/docker/docker_compose.py +0 -0
  99. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/docker/dockerfile.py +0 -0
  100. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/docker.py +0 -0
  101. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/javascript/__init__.py +0 -0
  102. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/javascript.py +0 -0
  103. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/package_json.py +0 -0
  104. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/python.py +0 -0
  105. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/test_build_systems.py +0 -0
  106. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/test_ci_cd.py +0 -0
  107. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/test_docker.py +0 -0
  108. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/test_javascript.py +0 -0
  109. {domd-2.2.26 → domd-2.2.27}/src/domd/parsers/test_python.py +0 -0
  110. {domd-2.2.26 → domd-2.2.27}/src/domd/parsing/__init__.py +0 -0
  111. {domd-2.2.26 → domd-2.2.27}/src/domd/parsing/base.py +0 -0
  112. {domd-2.2.26 → domd-2.2.27}/src/domd/reporters/__init__.py +0 -0
  113. {domd-2.2.26 → domd-2.2.27}/src/domd/reporters/console.py +0 -0
  114. {domd-2.2.26 → domd-2.2.27}/src/domd/reporters/json_reporter.py +0 -0
  115. {domd-2.2.26 → domd-2.2.27}/src/domd/reporters/test_console.py +0 -0
  116. {domd-2.2.26 → domd-2.2.27}/src/domd/reporters/test_json_reporter.py +0 -0
  117. {domd-2.2.26 → domd-2.2.27}/src/domd/reporters/test_todo_md.py +0 -0
  118. {domd-2.2.26 → domd-2.2.27}/src/domd/reporters/todo_md.py +0 -0
  119. {domd-2.2.26 → domd-2.2.27}/src/domd/reporting/__init__.py +0 -0
  120. {domd-2.2.26 → domd-2.2.27}/src/domd/utils/__init__.py +0 -0
  121. {domd-2.2.26 → domd-2.2.27}/src/domd/utils/command_runner.py +0 -0
  122. {domd-2.2.26 → domd-2.2.27}/src/domd/utils/file_utils.py +0 -0
  123. {domd-2.2.26 → domd-2.2.27}/src/domd/utils/path_utils.py +0 -0
  124. {domd-2.2.26 → domd-2.2.27}/src/domd/utils/test_command_runner.py +0 -0
  125. {domd-2.2.26 → domd-2.2.27}/src/domd/utils/test_file_utils.py +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: domd
3
- Version: 2.2.26
3
+ Version: 2.2.27
4
4
  Summary: ✓ DoMD - Do Markdown Docs - automatically detect, run and show working commands in DONE.md and errors in TODO.md markdown files
5
5
  License: Apache-2.0
6
6
  Author: Tom Sapletta
7
7
  Author-email: info@softreck.dev
8
8
  Maintainer: WRONAI Team
9
- Requires-Python: >=3.8.1,<4.0
9
+ Requires-Python: >=3.9,<4.0
10
10
  Classifier: Development Status :: 3 - Alpha
11
11
  Classifier: Environment :: Console
12
12
  Classifier: Intended Audience :: Developers
@@ -34,6 +34,7 @@ Requires-Dist: colorama (>=0.4.6,<0.5.0) ; extra == "ui" or extra == "all"
34
34
  Requires-Dist: configparser (>=5.3.0,<6.0.0)
35
35
  Requires-Dist: docker (>=6.1.3,<7.0.0)
36
36
  Requires-Dist: flask (>=2.0.0,<3.0.0) ; extra == "api" or extra == "all"
37
+ Requires-Dist: flask-cors (>=6.0.1,<7.0.0)
37
38
  Requires-Dist: pathlib ; python_version >= "3.4"
38
39
  Requires-Dist: pyyaml (>=6.0,<7.0)
39
40
  Requires-Dist: rich (>=13.0.0,<14.0.0) ; extra == "ui" or extra == "all"
@@ -66,6 +67,16 @@ Description-Content-Type: text/markdown
66
67
  - **Cross-Platform** - Works on Linux, macOS, and Windows
67
68
  - **Extensible** - Add support for new command types and tools
68
69
 
70
+ ## 📚 Examples
71
+
72
+ Explore our comprehensive collection of examples to get started with DoMD:
73
+
74
+ - [Basic Examples](docs/examples/basic/) - Simple examples to get you started
75
+ - [Advanced Usage](docs/examples/advanced/) - Complex scenarios and custom configurations
76
+ - [Web Interface Guide](docs/examples/web/) - How to use the DoMD web interface
77
+ - [CI/CD Integration](docs/examples/ci_cd/) - Automate documentation with GitHub Actions and more
78
+ - [Integration Examples](docs/examples/integration/) - Using DoMD with other tools and platforms
79
+
69
80
  ## 🚀 Quick Start
70
81
 
71
82
  ### Prerequisites
@@ -105,7 +116,9 @@ docker run --rm -v $(pwd):/app ghcr.io/wronai/domd domd
105
116
 
106
117
  ## 🌐 Web Interface
107
118
 
108
- DoMD includes a web-based interface for a more interactive experience:
119
+ DoMD includes a secure web-based interface for a more interactive experience:
120
+
121
+ ### Starting the Web Interface
109
122
 
110
123
  ```bash
111
124
  # Start the web interface (default port: 3003)
@@ -116,23 +129,79 @@ domd web --port 8080
116
129
 
117
130
  # Start without opening browser automatically
118
131
  domd web --no-browser
132
+
133
+ # Start with specific host binding
134
+ domd web --host 0.0.0.0
119
135
  ```
120
136
 
137
+ ### Local Development
138
+
139
+ For local development, you can start both the backend and frontend services:
140
+
141
+ ```bash
142
+ # Start the backend server
143
+ poetry run uvicorn domd.main:app --reload --port 8000
144
+
145
+ # In a separate terminal, start the frontend
146
+ cd frontend
147
+ npm install
148
+ npm start
149
+ ```
150
+
151
+ ### Authentication & Login
152
+
153
+ The web interface is protected by authentication. Use the following default credentials:
154
+
155
+ - **URL**: http://localhost:3000 (frontend development server) or http://localhost:3003 (production build)
156
+ - **Username**: admin
157
+ - **Password**: admin123
158
+
159
+ > **Security Note**: Change the default password after first login by navigating to User Settings in the web interface.
160
+
161
+ #### First-Time Login
162
+
163
+ 1. Open your web browser and navigate to http://localhost:3000 (development) or http://localhost:3003 (production)
164
+ 2. Enter the default credentials:
165
+ - Email/Username: `admin`
166
+ - Password: `admin123`
167
+ 3. Click "Sign In"
168
+ 4. Immediately change your password in the User Settings menu
169
+
121
170
  ### Web Interface Features
122
171
 
172
+ - **Secure Login**: Protected by username/password authentication
123
173
  - **Interactive Dashboard**: View command execution results in real-time
124
174
  - **Command History**: Browse through previously executed commands
125
175
  - **Filtering**: Filter commands by status, type, or search term
126
176
  - **Detailed Views**: See full command output and execution details
177
+ - **User Management**: Manage users and permissions (admin only)
127
178
  - **Responsive Design**: Works on desktop and mobile devices
128
179
 
180
+ ### Troubleshooting Login Issues
181
+
182
+ If you're having trouble logging in:
183
+
184
+ 1. Ensure the backend server is running (check terminal for errors)
185
+ 2. Verify the frontend is properly connected to the backend (check browser's developer console for errors)
186
+ 3. Clear your browser cache and cookies if experiencing persistent login issues
187
+ 4. Check that your credentials are correct (default: admin/admin123)
188
+ 5. If you've forgotten your password, you can reset it by:
189
+ - Stopping the server
190
+ - Deleting the `domd.db` file (or your configured database file)
191
+ - Restarting the server (this will recreate the database with default credentials)
192
+ 2. Open http://localhost:3003 in your browser
193
+ 3. Log in with the default credentials
194
+ 4. Navigate to Settings > Users to change the default password
195
+ 5. (Optional) Create additional users with appropriate permissions
196
+
129
197
  ### Prerequisites
130
198
 
131
199
  To use the web interface, you'll need:
132
200
 
133
- - Node.js (v14 or later) and npm (v6 or later)
201
+ - Node.js (v16 or later) and npm (v8 or later)
134
202
  - Python 3.8+ with DoMD installed
135
203
  - Internet connection (for loading external resources)
204
+ - Modern web browser (Chrome, Firefox, Safari, or Edge)
136
205
 
137
206
  ## 📖 Basic Usage
138
207
 
@@ -19,6 +19,16 @@
19
19
  - **Cross-Platform** - Works on Linux, macOS, and Windows
20
20
  - **Extensible** - Add support for new command types and tools
21
21
 
22
+ ## 📚 Examples
23
+
24
+ Explore our comprehensive collection of examples to get started with DoMD:
25
+
26
+ - [Basic Examples](docs/examples/basic/) - Simple examples to get you started
27
+ - [Advanced Usage](docs/examples/advanced/) - Complex scenarios and custom configurations
28
+ - [Web Interface Guide](docs/examples/web/) - How to use the DoMD web interface
29
+ - [CI/CD Integration](docs/examples/ci_cd/) - Automate documentation with GitHub Actions and more
30
+ - [Integration Examples](docs/examples/integration/) - Using DoMD with other tools and platforms
31
+
22
32
  ## 🚀 Quick Start
23
33
 
24
34
  ### Prerequisites
@@ -58,7 +68,9 @@ docker run --rm -v $(pwd):/app ghcr.io/wronai/domd domd
58
68
 
59
69
  ## 🌐 Web Interface
60
70
 
61
- DoMD includes a web-based interface for a more interactive experience:
71
+ DoMD includes a secure web-based interface for a more interactive experience:
72
+
73
+ ### Starting the Web Interface
62
74
 
63
75
  ```bash
64
76
  # Start the web interface (default port: 3003)
@@ -69,23 +81,79 @@ domd web --port 8080
69
81
 
70
82
  # Start without opening browser automatically
71
83
  domd web --no-browser
84
+
85
+ # Start with specific host binding
86
+ domd web --host 0.0.0.0
72
87
  ```
73
88
 
89
+ ### Local Development
90
+
91
+ For local development, you can start both the backend and frontend services:
92
+
93
+ ```bash
94
+ # Start the backend server
95
+ poetry run uvicorn domd.main:app --reload --port 8000
96
+
97
+ # In a separate terminal, start the frontend
98
+ cd frontend
99
+ npm install
100
+ npm start
101
+ ```
102
+
103
+ ### Authentication & Login
104
+
105
+ The web interface is protected by authentication. Use the following default credentials:
106
+
107
+ - **URL**: http://localhost:3000 (frontend development server) or http://localhost:3003 (production build)
108
+ - **Username**: admin
109
+ - **Password**: admin123
110
+
111
+ > **Security Note**: Change the default password after first login by navigating to User Settings in the web interface.
112
+
113
+ #### First-Time Login
114
+
115
+ 1. Open your web browser and navigate to http://localhost:3000 (development) or http://localhost:3003 (production)
116
+ 2. Enter the default credentials:
117
+ - Email/Username: `admin`
118
+ - Password: `admin123`
119
+ 3. Click "Sign In"
120
+ 4. Immediately change your password in the User Settings menu
121
+
74
122
  ### Web Interface Features
75
123
 
124
+ - **Secure Login**: Protected by username/password authentication
76
125
  - **Interactive Dashboard**: View command execution results in real-time
77
126
  - **Command History**: Browse through previously executed commands
78
127
  - **Filtering**: Filter commands by status, type, or search term
79
128
  - **Detailed Views**: See full command output and execution details
129
+ - **User Management**: Manage users and permissions (admin only)
80
130
  - **Responsive Design**: Works on desktop and mobile devices
81
131
 
132
+ ### Troubleshooting Login Issues
133
+
134
+ If you're having trouble logging in:
135
+
136
+ 1. Ensure the backend server is running (check terminal for errors)
137
+ 2. Verify the frontend is properly connected to the backend (check browser's developer console for errors)
138
+ 3. Clear your browser cache and cookies if experiencing persistent login issues
139
+ 4. Check that your credentials are correct (default: admin/admin123)
140
+ 5. If you've forgotten your password, you can reset it by:
141
+ - Stopping the server
142
+ - Deleting the `domd.db` file (or your configured database file)
143
+ - Restarting the server (this will recreate the database with default credentials)
144
+ 2. Open http://localhost:3003 in your browser
145
+ 3. Log in with the default credentials
146
+ 4. Navigate to Settings > Users to change the default password
147
+ 5. (Optional) Create additional users with appropriate permissions
148
+
82
149
  ### Prerequisites
83
150
 
84
151
  To use the web interface, you'll need:
85
152
 
86
- - Node.js (v14 or later) and npm (v6 or later)
153
+ - Node.js (v16 or later) and npm (v8 or later)
87
154
  - Python 3.8+ with DoMD installed
88
155
  - Internet connection (for loading external resources)
156
+ - Modern web browser (Chrome, Firefox, Safari, or Edge)
89
157
 
90
158
  ## 📖 Basic Usage
91
159
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "domd"
3
- version = "2.2.26"
3
+ version = "2.2.27"
4
4
  description = " ✓ DoMD - Do Markdown Docs - automatically detect, run and show working commands in DONE.md and errors in TODO.md markdown files"
5
5
  authors = ["Tom Sapletta <info@softreck.dev>"]
6
6
  maintainers = ["WRONAI Team"]
@@ -37,7 +37,7 @@ classifiers = [
37
37
  "Documentation" = "https://wronai.github.io/domd"
38
38
 
39
39
  [tool.poetry.dependencies]
40
- python = ">=3.8.1,<4.0"
40
+ python = ">=3.9,<4.0"
41
41
  pyyaml = "^6.0"
42
42
  toml = "^0.10.2"
43
43
  configparser = "^5.3.0"
@@ -51,6 +51,7 @@ colorama = { version = "^0.4.6", optional = true }
51
51
  rich = { version = "^13.0.0", optional = true }
52
52
  click = { version = "^8.1.0", optional = true }
53
53
  flask = { version = "^2.0.0", optional = true }
54
+ flask-cors = "^6.0.1"
54
55
 
55
56
  [build-system]
56
57
  requires = ["poetry-core>=1.0.0"]
@@ -14,7 +14,7 @@ __license__ = "Apache-2.0"
14
14
 
15
15
  from typing import Callable, TypeVar
16
16
 
17
- from .core.detector import ProjectCommandDetector
17
+ from .core.project_detection.detector import ProjectCommandDetector
18
18
 
19
19
  # Define a type variable for the main function
20
20
  F = TypeVar("F", bound=Callable[..., int])
@@ -15,7 +15,8 @@ from flask_cors import CORS
15
15
  from werkzeug.security import check_password_hash, generate_password_hash
16
16
 
17
17
  from ...application.factory import ApplicationFactory
18
- from ...core.ports.command import Command
18
+ from ...core.domain.command import Command
19
+ from ...core.parsing.pattern_matcher import PatternMatcher
19
20
 
20
21
  # Configure logging
21
22
  logger = logging.getLogger(__name__)
@@ -76,6 +77,7 @@ class DomdFlaskApi:
76
77
  project_path=self.project_path,
77
78
  todo_file="TODO.md",
78
79
  done_file="DONE.md",
80
+ formatter=self.formatter,
79
81
  )
80
82
 
81
83
  # Register routes
@@ -145,6 +147,9 @@ class DomdFlaskApi:
145
147
  """Register all API routes."""
146
148
  # Health check (public)
147
149
  self.app.route("/health", methods=["GET"])(self.health)
150
+ self.app.route("/api/health", methods=["GET"])(
151
+ self.health
152
+ ) # Added for frontend compatibility
148
153
 
149
154
  # Authentication
150
155
  self.app.route("/api/auth/login", methods=["POST"])(self.login)
@@ -418,7 +423,7 @@ class DomdFlaskApi:
418
423
 
419
424
  # Use the command service to scan for commands
420
425
  try:
421
- from ...core.detector import ProjectCommandDetector
426
+ from ...core.project_detection.detector import ProjectCommandDetector
422
427
 
423
428
  detector = ProjectCommandDetector(
424
429
  project_path=project_path,
@@ -564,16 +569,12 @@ class DomdFlaskApi:
564
569
  todo_file = data.get("todo_file", "TODO.md")
565
570
  done_file = data.get("done_file", "DONE.md")
566
571
 
567
- # Aktualizuj usługę raportów
568
- self.report_service = ApplicationFactory.create_report_service(
569
- repository=self.repository,
570
- project_path=self.project_path,
571
- todo_file=todo_file,
572
- done_file=done_file,
573
- )
572
+ # Update report service with new file names
573
+ self.report_service.todo_file = todo_file
574
+ self.report_service.done_file = done_file
574
575
 
575
- # Generuj raporty
576
- todo_path, done_path = self.report_service.generate_reports(self.formatter)
576
+ # Generate reports
577
+ todo_path, done_path = self.report_service.generate_reports()
577
578
 
578
579
  return jsonify(
579
580
  {
@@ -3,8 +3,7 @@ Prezenter komend dla interfejsu wiersza poleceń.
3
3
  """
4
4
 
5
5
  import logging
6
- from pathlib import Path
7
- from typing import Any, Dict, List, Optional
6
+ from typing import Optional
8
7
 
9
8
  from ...core.ports.command_repository import CommandRepository
10
9
 
@@ -4,7 +4,7 @@ Implementacja formatera raportów w formacie Markdown.
4
4
 
5
5
  import logging
6
6
  from pathlib import Path
7
- from typing import Any, Dict, List
7
+ from typing import List
8
8
 
9
9
  from ...core.domain.command import Command
10
10
  from ...core.ports.report_formatter import ReportFormatter
@@ -2,7 +2,7 @@
2
2
  Implementacja repozytorium komend w pamięci.
3
3
  """
4
4
 
5
- from typing import Any, Dict, List, Optional
5
+ from typing import List
6
6
 
7
7
  from ...core.domain.command import Command
8
8
  from ...core.ports.command_repository import CommandRepository
@@ -2,12 +2,18 @@
2
2
  Implementacja wykonawcy komend powłoki systemowej.
3
3
  """
4
4
 
5
+ # Standard library imports
5
6
  import logging
7
+ import os
6
8
  import shlex
7
9
  import subprocess
8
10
  import time
9
11
  from pathlib import Path
10
- from typing import Any, Dict, List, Optional, Tuple, Union
12
+ from typing import Dict, List, Optional, Tuple
13
+
14
+ # Local application imports
15
+ from ...core.domain.command import Command, CommandResult
16
+ from ...core.ports.command_executor import CommandExecutor
11
17
 
12
18
  # List of common shell built-in commands
13
19
  SHELL_BUILTINS = {
@@ -72,9 +78,6 @@ SHELL_BUILTINS = {
72
78
  "wait",
73
79
  }
74
80
 
75
- from ...core.domain.command import Command, CommandResult
76
- from ...core.ports.command_executor import CommandExecutor
77
-
78
81
  logger = logging.getLogger(__name__)
79
82
 
80
83
 
@@ -112,7 +112,7 @@ def main() -> int:
112
112
  api = DomdFlaskApi(project_path=project_path)
113
113
 
114
114
  # Wyświetl informacje o serwerze
115
- print(f"DoMD REST API Server")
115
+ print("DoMD REST API Server")
116
116
  print(f"Projekt: {project_path}")
117
117
  print(f"Uruchamianie serwera na http://{args.host}:{args.port}")
118
118
  print("Dostępne endpointy:")
@@ -2,7 +2,6 @@
2
2
  Fabryka aplikacji DoMD.
3
3
  """
4
4
 
5
- import os
6
5
  from pathlib import Path
7
6
  from typing import List, Optional
8
7
 
@@ -91,6 +90,7 @@ class ApplicationFactory:
91
90
  project_path: Path,
92
91
  todo_file: str = "TODO.md",
93
92
  done_file: str = "DONE.md",
93
+ formatter: Optional[ReportFormatter] = None,
94
94
  ) -> ReportService:
95
95
  """
96
96
  Tworzy usługę raportów.
@@ -100,6 +100,7 @@ class ApplicationFactory:
100
100
  project_path: Ścieżka do katalogu projektu
101
101
  todo_file: Nazwa pliku z nieudanymi komendami
102
102
  done_file: Nazwa pliku z udanymi komendami
103
+ formatter: Opcjonalny formater raportów
103
104
 
104
105
  Returns:
105
106
  Usługa raportów