womm-cli 4.0.0__py3-none-any.whl

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 (218) hide show
  1. womm/__init__.py +53 -0
  2. womm/__main__.py +48 -0
  3. womm/_version.py +10 -0
  4. womm/assets/copier/meta/copier.yml +15 -0
  5. womm/assets/copier/meta/template/README.md.jinja +32 -0
  6. womm/assets/copier/meta/template/copier.yml.jinja +13 -0
  7. womm/assets/copier/meta/template/template/.gitkeep +0 -0
  8. womm/assets/copier/official/javascript/copier.yml +104 -0
  9. womm/assets/copier/official/javascript/template/.gitignore.jinja +35 -0
  10. womm/assets/copier/official/javascript/template/.nvmrc.jinja +1 -0
  11. womm/assets/copier/official/javascript/template/.prettierignore.jinja +10 -0
  12. womm/assets/copier/official/javascript/template/README.md.jinja +81 -0
  13. womm/assets/copier/official/javascript/template/biome.json.jinja +54 -0
  14. womm/assets/copier/official/javascript/template/eslint.config.mjs.jinja +51 -0
  15. womm/assets/copier/official/javascript/template/index.html.jinja +12 -0
  16. womm/assets/copier/official/javascript/template/package.json.jinja +88 -0
  17. womm/assets/copier/official/javascript/template/prettier.config.mjs.jinja +8 -0
  18. womm/assets/copier/official/javascript/template/src/App.jsx.jinja +10 -0
  19. womm/assets/copier/official/javascript/template/src/App.tsx.jinja +10 -0
  20. womm/assets/copier/official/javascript/template/src/App.vue.jinja +18 -0
  21. womm/assets/copier/official/javascript/template/src/index.jsx.jinja +10 -0
  22. womm/assets/copier/official/javascript/template/src/index.tsx.jinja +11 -0
  23. womm/assets/copier/official/javascript/template/src/main.js.jinja +21 -0
  24. womm/assets/copier/official/javascript/template/src/main.ts.jinja +21 -0
  25. womm/assets/copier/official/javascript/template/tsconfig.json.jinja +35 -0
  26. womm/assets/copier/official/javascript/template/vite.config.mjs.jinja +10 -0
  27. womm/assets/copier/official/javascript/template/{% if with_ci %}.github{% endif %}/workflows/ci.yml.jinja +63 -0
  28. womm/assets/copier/official/javascript/template/{% if with_tests %}tests{% endif %}/smoke.test.js.jinja +12 -0
  29. womm/assets/copier/official/javascript/template/{% if with_tests %}tests{% endif %}/smoke.test.ts.jinja +12 -0
  30. womm/assets/copier/official/javascript/template/{% if with_vscode %}.vscode{% endif %}/extensions.json.jinja +4 -0
  31. womm/assets/copier/official/javascript/template/{% if with_vscode %}.vscode{% endif %}/settings.json.jinja +27 -0
  32. womm/assets/copier/official/python/copier.yml +107 -0
  33. womm/assets/copier/official/python/template/.gitignore.jinja +40 -0
  34. womm/assets/copier/official/python/template/.pre-commit-config.yaml.jinja +19 -0
  35. womm/assets/copier/official/python/template/.python-version.jinja +1 -0
  36. womm/assets/copier/official/python/template/README.md.jinja +83 -0
  37. womm/assets/copier/official/python/template/pyproject.toml.jinja +114 -0
  38. womm/assets/copier/official/python/template/{% if framework == 'django' %}manage.py{% endif %}.jinja +23 -0
  39. womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/__init__.py.jinja +3 -0
  40. womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/asgi.py.jinja +9 -0
  41. womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/core/__init__.py.jinja +0 -0
  42. womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/core/apps.py.jinja +10 -0
  43. womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/core/models.py.jinja +1 -0
  44. womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/core/views.py.jinja +8 -0
  45. womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/py.typed +0 -0
  46. womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/settings.py.jinja +81 -0
  47. womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/urls.py.jinja +11 -0
  48. womm/assets/copier/official/python/template/{% if not use_src_layout %}{{ package_name }}{% endif %}/wsgi.py.jinja +9 -0
  49. womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/__init__.py.jinja +3 -0
  50. womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/asgi.py.jinja +9 -0
  51. womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/core/__init__.py.jinja +0 -0
  52. womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/core/apps.py.jinja +10 -0
  53. womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/core/models.py.jinja +1 -0
  54. womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/core/views.py.jinja +8 -0
  55. womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/py.typed +0 -0
  56. womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/settings.py.jinja +81 -0
  57. womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/urls.py.jinja +11 -0
  58. womm/assets/copier/official/python/template/{% if use_src_layout %}src{% endif %}/{{ package_name }}/wsgi.py.jinja +9 -0
  59. womm/assets/copier/official/python/template/{% if with_ci %}.github{% endif %}/workflows/ci.yml.jinja +78 -0
  60. womm/assets/copier/official/python/template/{% if with_tests %}tests{% endif %}/test_smoke.py.jinja +16 -0
  61. womm/assets/copier/official/python/template/{% if with_vscode %}.vscode{% endif %}/extensions.json.jinja +8 -0
  62. womm/assets/copier/official/python/template/{% if with_vscode %}.vscode{% endif %}/settings.json.jinja +28 -0
  63. womm/bin/refresh_env.cmd +130 -0
  64. womm/cli.py +111 -0
  65. womm/commands/__init__.py +30 -0
  66. womm/commands/core/__init__.py +29 -0
  67. womm/commands/core/doctor.py +52 -0
  68. womm/commands/core/path.py +337 -0
  69. womm/commands/project/__init__.py +31 -0
  70. womm/commands/project/create.py +128 -0
  71. womm/commands/project/setup.py +438 -0
  72. womm/commands/project/template.py +160 -0
  73. womm/commands/system/__init__.py +31 -0
  74. womm/commands/system/context/__init__.py +82 -0
  75. womm/commands/system/context/backup.py +344 -0
  76. womm/commands/system/context/inventory.py +111 -0
  77. womm/commands/system/context/registration.py +290 -0
  78. womm/commands/system/deps.py +165 -0
  79. womm/commands/system/system.py +130 -0
  80. womm/exceptions/__init__.py +69 -0
  81. womm/exceptions/common/__init__.py +55 -0
  82. womm/exceptions/common/command_service.py +91 -0
  83. womm/exceptions/common/file_service.py +60 -0
  84. womm/exceptions/common/security_service.py +44 -0
  85. womm/exceptions/common/validation_service.py +70 -0
  86. womm/exceptions/context/__init__.py +27 -0
  87. womm/exceptions/context/context_service.py +55 -0
  88. womm/exceptions/project/__init__.py +29 -0
  89. womm/exceptions/project/project_service.py +59 -0
  90. womm/exceptions/system/__init__.py +25 -0
  91. womm/exceptions/system/system_service.py +53 -0
  92. womm/interfaces/__init__.py +71 -0
  93. womm/interfaces/context/__init__.py +34 -0
  94. womm/interfaces/context/menu_interface.py +686 -0
  95. womm/interfaces/context/registry_interface.py +562 -0
  96. womm/interfaces/context/script_detector_interface.py +208 -0
  97. womm/interfaces/context/script_registrar.py +264 -0
  98. womm/interfaces/core/__init__.py +26 -0
  99. womm/interfaces/core/doctor_interface.py +102 -0
  100. womm/interfaces/dependencies/__init__.py +28 -0
  101. womm/interfaces/dependencies/deps_interface.py +160 -0
  102. womm/interfaces/project/__init__.py +36 -0
  103. womm/interfaces/project/create_interface.py +162 -0
  104. womm/interfaces/project/detection_interface.py +181 -0
  105. womm/interfaces/project/manager_interface.py +99 -0
  106. womm/interfaces/project/setup_interface.py +477 -0
  107. womm/interfaces/project/template_store_interface.py +196 -0
  108. womm/interfaces/system/__init__.py +32 -0
  109. womm/interfaces/system/detector_interface.py +84 -0
  110. womm/interfaces/system/environment_interface.py +110 -0
  111. womm/interfaces/system/path_interface.py +570 -0
  112. womm/services/__init__.py +70 -0
  113. womm/services/common/__init__.py +33 -0
  114. womm/services/common/base_validation_service.py +450 -0
  115. womm/services/common/command_runner_service.py +647 -0
  116. womm/services/common/file_scanner_service.py +483 -0
  117. womm/services/common/security_validator_service.py +348 -0
  118. womm/services/context/__init__.py +37 -0
  119. womm/services/context/backup_entries.py +148 -0
  120. womm/services/context/parameters.py +515 -0
  121. womm/services/context/registry_paths.py +56 -0
  122. womm/services/context/registry_service.py +573 -0
  123. womm/services/context/validation_service.py +691 -0
  124. womm/services/dependencies/__init__.py +29 -0
  125. womm/services/dependencies/probe.py +102 -0
  126. womm/services/project/__init__.py +48 -0
  127. womm/services/project/copier_project_creation_service.py +111 -0
  128. womm/services/project/destination_guard.py +96 -0
  129. womm/services/project/detection_service.py +354 -0
  130. womm/services/project/env_utils.py +333 -0
  131. womm/services/project/javascript_environment_service.py +348 -0
  132. womm/services/project/python_environment_service.py +245 -0
  133. womm/services/project/setup_profile_resolver.py +146 -0
  134. womm/services/project/template_store_service.py +344 -0
  135. womm/services/project/validation_service.py +418 -0
  136. womm/services/system/__init__.py +32 -0
  137. womm/services/system/detector_service.py +704 -0
  138. womm/services/system/environment_service.py +494 -0
  139. womm/services/system/path_service.py +642 -0
  140. womm/shared/__init__.py +30 -0
  141. womm/shared/configs/__init__.py +51 -0
  142. womm/shared/configs/context/__init__.py +43 -0
  143. womm/shared/configs/context/context_config.py +125 -0
  144. womm/shared/configs/context/context_file_types_config.py +159 -0
  145. womm/shared/configs/context/context_limits_config.py +187 -0
  146. womm/shared/configs/context/context_paths_config.py +115 -0
  147. womm/shared/configs/context/context_types_config.py +65 -0
  148. womm/shared/configs/context/script_config.py +219 -0
  149. womm/shared/configs/dependencies/__init__.py +32 -0
  150. womm/shared/configs/dependencies/runtime_config.py +46 -0
  151. womm/shared/configs/dependencies/runtime_package_manager_config.py +48 -0
  152. womm/shared/configs/logging_config.py +89 -0
  153. womm/shared/configs/project/__init__.py +33 -0
  154. womm/shared/configs/project/project_config.py +109 -0
  155. womm/shared/configs/project/project_structure_config.py +88 -0
  156. womm/shared/configs/project/python_project_config.py +165 -0
  157. womm/shared/configs/security/__init__.py +26 -0
  158. womm/shared/configs/security/security_patterns_config.py +242 -0
  159. womm/shared/configs/system/__init__.py +28 -0
  160. womm/shared/configs/system/system_detector_config.py +210 -0
  161. womm/shared/configs/system/system_environment_config.py +101 -0
  162. womm/shared/models/__init__.py +13 -0
  163. womm/shared/models/template_source.py +65 -0
  164. womm/shared/paths.py +192 -0
  165. womm/shared/results/__init__.py +138 -0
  166. womm/shared/results/base.py +85 -0
  167. womm/shared/results/command_results.py +61 -0
  168. womm/shared/results/context_results.py +345 -0
  169. womm/shared/results/dependency_results.py +110 -0
  170. womm/shared/results/doctor_results.py +41 -0
  171. womm/shared/results/file_results.py +97 -0
  172. womm/shared/results/project_results.py +163 -0
  173. womm/shared/results/security_results.py +128 -0
  174. womm/shared/results/system_results.py +268 -0
  175. womm/shared/results/template_results.py +43 -0
  176. womm/shared/runtime.py +36 -0
  177. womm/ui/__init__.py +31 -0
  178. womm/ui/common/__init__.py +39 -0
  179. womm/ui/common/interactive_menu.py +246 -0
  180. womm/ui/common/logging.py +184 -0
  181. womm/ui/common/prompts.py +93 -0
  182. womm/ui/context/__init__.py +31 -0
  183. womm/ui/context/display.py +485 -0
  184. womm/ui/context/menu_display.py +189 -0
  185. womm/ui/context/wizard.py +557 -0
  186. womm/ui/project/__init__.py +42 -0
  187. womm/ui/project/create/create_completion_summaries.py +55 -0
  188. womm/ui/project/project_wizard.py +174 -0
  189. womm/ui/project/setup/setup_completion_summaries.py +111 -0
  190. womm/ui/project/templates/template_store_display.py +128 -0
  191. womm/ui/system/__init__.py +60 -0
  192. womm/ui/system/display.py +531 -0
  193. womm/ui/system/path_display.py +387 -0
  194. womm/utils/__init__.py +23 -0
  195. womm/utils/common/__init__.py +49 -0
  196. womm/utils/common/file_scanner_utils.py +110 -0
  197. womm/utils/common/path_resolver_utils.py +127 -0
  198. womm/utils/common/safe_fs_utils.py +135 -0
  199. womm/utils/context/__init__.py +54 -0
  200. womm/utils/context/core_utils.py +345 -0
  201. womm/utils/context/icon_utils.py +259 -0
  202. womm/utils/project/__init__.py +106 -0
  203. womm/utils/project/asset_utils.py +154 -0
  204. womm/utils/project/core_utils.py +391 -0
  205. womm/utils/project/file_utils.py +494 -0
  206. womm/utils/project/platform_utils.py +170 -0
  207. womm/utils/project/validation_utils.py +273 -0
  208. womm/utils/security/__init__.py +46 -0
  209. womm/utils/security/security_validation_utils.py +258 -0
  210. womm/utils/system/__init__.py +69 -0
  211. womm/utils/system/detector_utils.py +299 -0
  212. womm/utils/system/environment_utils.py +172 -0
  213. womm/utils/system/path_utils.py +101 -0
  214. womm_cli-4.0.0.dist-info/METADATA +203 -0
  215. womm_cli-4.0.0.dist-info/RECORD +218 -0
  216. womm_cli-4.0.0.dist-info/WHEEL +4 -0
  217. womm_cli-4.0.0.dist-info/entry_points.txt +2 -0
  218. womm_cli-4.0.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,115 @@
1
+ #!/usr/bin/env python3
2
+ # ///////////////////////////////////////////////////////////////
3
+ # CONTEXT PATHS CONFIG - Registry Paths Configuration
4
+ # Project: works-on-my-machine
5
+ # ///////////////////////////////////////////////////////////////
6
+
7
+ """
8
+ Configuration for context menu registry paths.
9
+
10
+ This config class exposes registry path constants used by
11
+ context menu services for Windows registry operations.
12
+ """
13
+
14
+ from __future__ import annotations
15
+
16
+ # ///////////////////////////////////////////////////////////////
17
+ # IMPORTS
18
+ # ///////////////////////////////////////////////////////////////
19
+ # Standard library imports
20
+ from dataclasses import dataclass
21
+ from typing import ClassVar
22
+
23
+ # ///////////////////////////////////////////////////////////////
24
+ # CLASS DEFINITION
25
+ # ///////////////////////////////////////////////////////////////
26
+
27
+
28
+ @dataclass(frozen=True)
29
+ class ContextPathsConfig:
30
+ """Context menu registry paths configuration (static, read-only).
31
+
32
+ Contains registry paths for different context menu types
33
+ and command parameters for each type.
34
+ """
35
+
36
+ # ///////////////////////////////////////////////////////////
37
+ # REGISTRY PATHS BY CONTEXT NAME
38
+ # ///////////////////////////////////////////////////////////
39
+
40
+ CONTEXT_PATHS: ClassVar[dict[str, str]] = {
41
+ "directory": "Software\\Classes\\Directory\\shell",
42
+ "background": "Software\\Classes\\Directory\\background\\shell",
43
+ "file": "Software\\Classes\\*\\shell",
44
+ "image": "Software\\Classes\\SystemFileAssociations\\image\\shell",
45
+ "text": "Software\\Classes\\SystemFileAssociations\\text\\shell",
46
+ "archive": "Software\\Classes\\SystemFileAssociations\\compressed\\shell",
47
+ }
48
+
49
+ # ///////////////////////////////////////////////////////////
50
+ # REGISTRY PATHS BY CONTEXT TYPE
51
+ # ///////////////////////////////////////////////////////////
52
+
53
+ REGISTRY_PATHS_BY_TYPE: ClassVar[dict[str, str]] = {
54
+ "directory": "Software\\Classes\\Directory\\shell",
55
+ "background": "Software\\Classes\\Directory\\background\\shell",
56
+ "file": "Software\\Classes\\*\\shell",
57
+ "files": "Software\\Classes\\*\\shell",
58
+ "root": "Software\\Classes\\Drive\\shell",
59
+ }
60
+
61
+ # ///////////////////////////////////////////////////////////
62
+ # COMMAND PARAMETERS
63
+ # ///////////////////////////////////////////////////////////
64
+
65
+ COMMAND_PARAMETERS: ClassVar[dict[str, str]] = {
66
+ "directory": "%V", # Selected folder
67
+ "background": "%V", # Background context
68
+ "file": "%1", # Single selected file
69
+ "files": "%V", # Multiple selected files
70
+ "root": "%V", # Root directory (drive)
71
+ }
72
+
73
+ # ///////////////////////////////////////////////////////////
74
+ # HELPER METHODS
75
+ # ///////////////////////////////////////////////////////////
76
+
77
+ @classmethod
78
+ def get_registry_path(cls, context_type: str) -> str | None:
79
+ """Get registry path for a context type.
80
+
81
+ Args:
82
+ context_type: Type of context (directory, background, file, etc.)
83
+
84
+ Returns:
85
+ Registry path or None if not found
86
+ """
87
+ return cls.CONTEXT_PATHS.get(context_type)
88
+
89
+ @classmethod
90
+ def get_command_parameter(cls, context_type: str) -> str:
91
+ """Get command parameter for a context type.
92
+
93
+ Args:
94
+ context_type: Type of context
95
+
96
+ Returns:
97
+ Command parameter (default: %V)
98
+ """
99
+ return cls.COMMAND_PARAMETERS.get(context_type, "%V")
100
+
101
+ @classmethod
102
+ def get_all_context_types(cls) -> list[str]:
103
+ """Get all available context types.
104
+
105
+ Returns:
106
+ List of context type names
107
+ """
108
+ return list(cls.CONTEXT_PATHS.keys())
109
+
110
+
111
+ # ///////////////////////////////////////////////////////////////
112
+ # PUBLIC API
113
+ # ///////////////////////////////////////////////////////////////
114
+
115
+ __all__ = ["ContextPathsConfig"]
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env python3
2
+ # ///////////////////////////////////////////////////////////////
3
+ # CONTEXT TYPES CONFIG - Context Types Constants
4
+ # Project: works-on-my-machine
5
+ # ///////////////////////////////////////////////////////////////
6
+
7
+ """
8
+ Context types configuration for context menu operations.
9
+
10
+ This config class exposes constants for context types used throughout
11
+ context menu utilities and services.
12
+ """
13
+
14
+ from __future__ import annotations
15
+
16
+ # ///////////////////////////////////////////////////////////////
17
+ # IMPORTS
18
+ # ///////////////////////////////////////////////////////////////
19
+ # Standard library imports
20
+ from dataclasses import dataclass
21
+ from typing import ClassVar
22
+
23
+ # ///////////////////////////////////////////////////////////////
24
+ # CLASS DEFINITION
25
+ # ///////////////////////////////////////////////////////////////
26
+
27
+
28
+ @dataclass(frozen=True)
29
+ class ContextTypesConfig:
30
+ """Context types configuration (static, read-only).
31
+
32
+ Contains context type constants and registry patterns
33
+ for context menu operations.
34
+ """
35
+
36
+ # ///////////////////////////////////////////////////////////
37
+ # CONTEXT TYPE CONSTANTS
38
+ # ///////////////////////////////////////////////////////////
39
+
40
+ DIRECTORY: ClassVar[str] = "directory"
41
+ BACKGROUND: ClassVar[str] = "background"
42
+ FILE: ClassVar[str] = "file"
43
+ FILES: ClassVar[str] = "files"
44
+ ROOT: ClassVar[str] = "root"
45
+
46
+ # List of all interface context types
47
+ ALL_TYPES: ClassVar[list[str]] = [
48
+ "directory",
49
+ "background",
50
+ ]
51
+
52
+ # ///////////////////////////////////////////////////////////
53
+ # REGISTRY PATH PATTERNS
54
+ # ///////////////////////////////////////////////////////////
55
+
56
+ REGISTRY_PATTERN_DIRECTORY_SHELL: ClassVar[str] = "Directory\\shell"
57
+ REGISTRY_PATTERN_DIRECTORY_BACKGROUND: ClassVar[str] = "Directory\\background"
58
+ REGISTRY_PATTERN_DRIVE_SHELL: ClassVar[str] = "Drive\\shell"
59
+ REGISTRY_PATTERN_FILE_SHELL: ClassVar[str] = "*\\shell"
60
+
61
+ # Path separators
62
+ REGISTRY_PATH_SEPARATOR: ClassVar[str] = "\\"
63
+
64
+
65
+ __all__ = ["ContextTypesConfig"]
@@ -0,0 +1,219 @@
1
+ #!/usr/bin/env python3
2
+ # ///////////////////////////////////////////////////////////////
3
+ # SCRIPT CONFIG - Script & Icon Configuration
4
+ # Project: works-on-my-machine
5
+ # ///////////////////////////////////////////////////////////////
6
+
7
+ """
8
+ Script detection and icon configuration for context menu entries.
9
+
10
+ This config module exposes script type mappings, icon configurations,
11
+ and system paths used by context menu utilities and services.
12
+ """
13
+
14
+ from __future__ import annotations
15
+
16
+ # ///////////////////////////////////////////////////////////////
17
+ # IMPORTS
18
+ # ///////////////////////////////////////////////////////////////
19
+ # Standard library imports
20
+ from typing import ClassVar
21
+
22
+ # ///////////////////////////////////////////////////////////////
23
+ # ICON CONFIG CLASS
24
+ # ///////////////////////////////////////////////////////////////
25
+
26
+
27
+ class IconConfig:
28
+ """Icon configuration for context menu operations.
29
+
30
+ Contains icon mappings for file extensions, system shortcuts,
31
+ and paths for icon resolution.
32
+ """
33
+
34
+ # ///////////////////////////////////////////////////////////
35
+ # EXTENSION TO ICON MAPPING
36
+ # ///////////////////////////////////////////////////////////
37
+
38
+ EXTENSION_ICONS: ClassVar[dict[str, str | None]] = {
39
+ # Scripts
40
+ ".py": "python.exe,0",
41
+ ".ps1": "powershell.exe,0",
42
+ ".bat": "cmd.exe,0",
43
+ ".cmd": "cmd.exe,0",
44
+ ".js": "node.exe,0",
45
+ ".ts": "node.exe,0",
46
+ # Documents
47
+ ".txt": "notepad.exe,0",
48
+ ".md": "notepad.exe,0",
49
+ ".doc": "wordpad.exe,0",
50
+ ".docx": "wordpad.exe,0",
51
+ ".pdf": "AcroRd32.exe,0",
52
+ # Images
53
+ ".jpg": "rundll32.exe,shell32.dll,ShellImagePreview",
54
+ ".jpeg": "rundll32.exe,shell32.dll,ShellImagePreview",
55
+ ".png": "rundll32.exe,shell32.dll,ShellImagePreview",
56
+ ".gif": "rundll32.exe,shell32.dll,ShellImagePreview",
57
+ ".bmp": "rundll32.exe,shell32.dll,ShellImagePreview",
58
+ ".ico": "rundll32.exe,shell32.dll,ShellImagePreview",
59
+ # Archives
60
+ ".zip": "zipfldr.dll,0",
61
+ ".rar": "WinRAR.exe,0",
62
+ ".7z": "7zFM.exe,0",
63
+ ".tar": "zipfldr.dll,0",
64
+ ".gz": "zipfldr.dll,0",
65
+ # Code
66
+ ".html": "mshtml.dll,0",
67
+ ".htm": "mshtml.dll,0",
68
+ ".css": "mshtml.dll,0",
69
+ ".xml": "mshtml.dll,0",
70
+ ".json": "notepad.exe,0",
71
+ # Executables
72
+ ".exe": None, # Use file's own icon
73
+ ".msi": None, # Use file's own icon
74
+ }
75
+
76
+ # ///////////////////////////////////////////////////////////
77
+ # SYSTEM ICON SHORTCUTS
78
+ # ///////////////////////////////////////////////////////////
79
+
80
+ SYSTEM_ICONS: ClassVar[dict[str, str | None]] = {
81
+ "auto": None, # Auto-detect
82
+ "python": "python.exe,0",
83
+ "powershell": "powershell.exe,0",
84
+ "cmd": "cmd.exe,0",
85
+ "node": "node.exe,0",
86
+ "notepad": "notepad.exe,0",
87
+ "explorer": "explorer.exe,0",
88
+ "folder": "shell32.dll,4",
89
+ "file": "shell32.dll,1",
90
+ "gear": "shell32.dll,14",
91
+ "settings": "shell32.dll,21",
92
+ }
93
+
94
+ # ///////////////////////////////////////////////////////////
95
+ # SYSTEM PATHS FOR ICON SEARCH
96
+ # ///////////////////////////////////////////////////////////
97
+
98
+ SYSTEM_PATHS: ClassVar[list[str]] = [
99
+ "C:\\Windows\\System32",
100
+ "C:\\Windows",
101
+ "C:\\Program Files",
102
+ "C:\\Program Files (x86)",
103
+ ]
104
+
105
+ # ///////////////////////////////////////////////////////////
106
+ # ICON SEPARATOR CHARACTER
107
+ # ///////////////////////////////////////////////////////////
108
+
109
+ ICON_SEPARATOR: ClassVar[str] = ","
110
+
111
+ # ///////////////////////////////////////////////////////////
112
+ # SPECIAL ICON VALUES
113
+ # ///////////////////////////////////////////////////////////
114
+
115
+ SPECIAL_ICON_VALUE_AUTO: ClassVar[str] = "auto"
116
+ SPECIAL_ICON_VALUE_DEFAULT: ClassVar[str] = "default"
117
+ SPECIAL_ICON_VALUE_NONE: ClassVar[str] = "none"
118
+
119
+
120
+ # ///////////////////////////////////////////////////////////////
121
+ # SCRIPT CONFIG CLASS
122
+ # ///////////////////////////////////////////////////////////////
123
+
124
+
125
+ class ScriptConfig:
126
+ """Script detection and configuration for context menu.
127
+
128
+ Contains script type detection, command templates,
129
+ and execution parameters.
130
+ """
131
+
132
+ # ///////////////////////////////////////////////////////////
133
+ # SCRIPT TYPE CONSTANTS
134
+ # ///////////////////////////////////////////////////////////
135
+
136
+ TYPE_PYTHON: ClassVar[str] = "python"
137
+ TYPE_POWERSHELL: ClassVar[str] = "powershell"
138
+ TYPE_BATCH: ClassVar[str] = "batch"
139
+ TYPE_EXECUTABLE: ClassVar[str] = "executable"
140
+ TYPE_UNKNOWN: ClassVar[str] = "unknown"
141
+
142
+ # ///////////////////////////////////////////////////////////
143
+ # EXTENSION TO SCRIPT TYPE MAPPING
144
+ # ///////////////////////////////////////////////////////////
145
+
146
+ EXTENSION_TO_TYPE: ClassVar[dict[str, str]] = {
147
+ ".py": "python",
148
+ ".ps1": "powershell",
149
+ ".bat": "batch",
150
+ ".cmd": "batch",
151
+ ".exe": "executable",
152
+ ".msi": "executable",
153
+ }
154
+
155
+ # ///////////////////////////////////////////////////////////
156
+ # DEFAULT ICONS FOR SCRIPT TYPES
157
+ # ///////////////////////////////////////////////////////////
158
+
159
+ DEFAULT_ICONS: ClassVar[dict[str, str | None]] = {
160
+ "python": "python.exe,0",
161
+ "powershell": "powershell.exe,0",
162
+ "batch": "cmd.exe,0",
163
+ "executable": None, # Use file's own icon
164
+ "unknown": None,
165
+ }
166
+
167
+ # ///////////////////////////////////////////////////////////
168
+ # CONTEXT PARAMETERS FOR SCRIPT TYPES
169
+ # ///////////////////////////////////////////////////////////
170
+
171
+ CONTEXT_PARAMETERS: ClassVar[dict[str, str]] = {
172
+ "python": "%V", # Directory context
173
+ "powershell": "%V", # Directory context
174
+ "batch": "%V", # Directory context
175
+ "executable": "%V", # Directory context
176
+ "unknown": "%V", # Default to directory
177
+ }
178
+
179
+ # ///////////////////////////////////////////////////////////
180
+ # PYTHON INTERPRETERS TO CHECK
181
+ # ///////////////////////////////////////////////////////////
182
+
183
+ PYTHON_INTERPRETERS: ClassVar[list[str]] = [
184
+ "python3",
185
+ "python",
186
+ "py",
187
+ ]
188
+
189
+ # ///////////////////////////////////////////////////////////
190
+ # MINIMUM PYTHON VERSION (MAJOR.MINOR)
191
+ # ///////////////////////////////////////////////////////////
192
+
193
+ MINIMUM_PYTHON_VERSION: ClassVar[list[int]] = [3, 8]
194
+
195
+ # ///////////////////////////////////////////////////////////
196
+ # PYTHON LAUNCHER FALLBACK COMMAND
197
+ # ///////////////////////////////////////////////////////////
198
+
199
+ PYTHON_LAUNCHER_FALLBACK: ClassVar[str] = "cmd.exe /k py"
200
+
201
+ # ///////////////////////////////////////////////////////////
202
+ # POWERSHELL COMMAND TEMPLATE
203
+ # ///////////////////////////////////////////////////////////
204
+
205
+ POWERSHELL_COMMAND_TEMPLATE: ClassVar[str] = (
206
+ "powershell.exe -ExecutionPolicy Bypass -File"
207
+ )
208
+
209
+ # ///////////////////////////////////////////////////////////
210
+ # SCRIPT TYPE SET FOR DIRECT EXECUTION
211
+ # ///////////////////////////////////////////////////////////
212
+
213
+ DIRECT_EXECUTION_TYPES: ClassVar[set[str]] = {
214
+ "batch",
215
+ "executable",
216
+ }
217
+
218
+
219
+ __all__ = ["IconConfig", "ScriptConfig"]
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env python3
2
+ # ///////////////////////////////////////////////////////////////
3
+ # DEPENDENCIES CONFIGS - Dependencies Configuration Modules
4
+ # Project: works-on-my-machine
5
+ # ///////////////////////////////////////////////////////////////
6
+
7
+ """
8
+ Dependencies configuration modules for Works On My Machine.
9
+
10
+ This package contains configuration classes for the two strata WOMM cares
11
+ about:
12
+ - Runtimes (python, node, git)
13
+ - Runtime package managers (pip, uv, npm, yarn)
14
+ """
15
+
16
+ from __future__ import annotations
17
+
18
+ # ///////////////////////////////////////////////////////////////
19
+ # IMPORTS
20
+ # ///////////////////////////////////////////////////////////////
21
+ # Local imports
22
+ from .runtime_config import RuntimeConfig
23
+ from .runtime_package_manager_config import RuntimePackageManagerConfig
24
+
25
+ # ///////////////////////////////////////////////////////////////
26
+ # PUBLIC API
27
+ # ///////////////////////////////////////////////////////////////
28
+
29
+ __all__ = [
30
+ "RuntimeConfig",
31
+ "RuntimePackageManagerConfig",
32
+ ]
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env python3
2
+ # ///////////////////////////////////////////////////////////////
3
+ # RUNTIME CONFIG - Runtime Configuration
4
+ # Project: works-on-my-machine
5
+ # ///////////////////////////////////////////////////////////////
6
+
7
+ """
8
+ Runtime configuration for Works On My Machine.
9
+
10
+ Defines the runtimes (Strata 1) WOMM needs in order to run project setup and
11
+ template scaffolding: Python, Node.js and Git.
12
+
13
+ WOMM never installs a runtime. It reports what is present and, when a runtime
14
+ is missing, tells the user to install it themselves. Installation mappings for
15
+ system package managers were removed on 2026-08-02: managing winget / apt /
16
+ homebrew is explicitly out of scope.
17
+ """
18
+
19
+ from __future__ import annotations
20
+
21
+ # ///////////////////////////////////////////////////////////////
22
+ # IMPORTS
23
+ # ///////////////////////////////////////////////////////////////
24
+ # Standard library imports
25
+ from typing import ClassVar
26
+
27
+ # ///////////////////////////////////////////////////////////////
28
+ # RUNTIME DEFINITIONS
29
+ # ///////////////////////////////////////////////////////////////
30
+
31
+
32
+ class RuntimeConfig:
33
+ """Configuration for runtime dependencies (Strata 1)."""
34
+
35
+ RUNTIMES: ClassVar[dict[str, str]] = {
36
+ "python": "3.13+",
37
+ "node": "18+",
38
+ "git": "2.30+",
39
+ }
40
+
41
+
42
+ # ///////////////////////////////////////////////////////////////
43
+ # PUBLIC API
44
+ # ///////////////////////////////////////////////////////////////
45
+
46
+ __all__ = ["RuntimeConfig"]
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env python3
2
+ # ///////////////////////////////////////////////////////////////
3
+ # RUNTIME PACKAGE MANAGER CONFIG - Runtime Package Managers
4
+ # Project: works-on-my-machine
5
+ # ///////////////////////////////////////////////////////////////
6
+
7
+ """
8
+ Runtime package manager configuration for Works On My Machine.
9
+
10
+ Defines the package managers (Strata 2) that project setup and template
11
+ scaffolding rely on to install a project's own dependencies.
12
+
13
+ Scope note: only managers shipped with — or installed alongside — a runtime are
14
+ covered. System package managers (winget, chocolatey, homebrew, apt, dnf,
15
+ pacman) are out of scope, and so are the packages themselves: which linter,
16
+ formatter or test runner a project uses is the user's decision, not WOMM's.
17
+ """
18
+
19
+ from __future__ import annotations
20
+
21
+ # ///////////////////////////////////////////////////////////////
22
+ # IMPORTS
23
+ # ///////////////////////////////////////////////////////////////
24
+ # Standard library imports
25
+ from typing import ClassVar
26
+
27
+ # ///////////////////////////////////////////////////////////////
28
+ # RUNTIME PACKAGE MANAGER DEFINITIONS
29
+ # ///////////////////////////////////////////////////////////////
30
+
31
+
32
+ class RuntimePackageManagerConfig:
33
+ """Configuration for runtime package managers (Strata 2)."""
34
+
35
+ # Manager name -> runtime it depends on (see RuntimeConfig.RUNTIMES).
36
+ RUNTIME_PACKAGE_MANAGERS: ClassVar[dict[str, str]] = {
37
+ "pip": "python",
38
+ "uv": "python",
39
+ "npm": "node",
40
+ "yarn": "node",
41
+ }
42
+
43
+
44
+ # ///////////////////////////////////////////////////////////////
45
+ # PUBLIC API
46
+ # ///////////////////////////////////////////////////////////////
47
+
48
+ __all__ = ["RuntimePackageManagerConfig"]
@@ -0,0 +1,89 @@
1
+ #!/usr/bin/env python3
2
+ # ///////////////////////////////////////////////////////////////
3
+ # LOGGING CONFIG - Global logging configuration for WOMM
4
+ # Project: works-on-my-machine
5
+ # ///////////////////////////////////////////////////////////////
6
+
7
+ """
8
+ Global logging and ezpl configuration values.
9
+
10
+ This config class centralizes default log directory, file name and
11
+ rotation/retention/compression so they can be reused consistently
12
+ across the application.
13
+ """
14
+
15
+ from __future__ import annotations
16
+
17
+ # ///////////////////////////////////////////////////////////////
18
+ # IMPORTS
19
+ # ///////////////////////////////////////////////////////////////
20
+ # Standard library imports
21
+ from dataclasses import dataclass
22
+ from pathlib import Path
23
+ from typing import ClassVar
24
+
25
+ # Local imports
26
+ from ..paths import logs_dir
27
+
28
+ # ///////////////////////////////////////////////////////////////
29
+ # CLASS DEFINITION
30
+ # ///////////////////////////////////////////////////////////////
31
+
32
+
33
+ @dataclass(frozen=True)
34
+ class LoggingConfig:
35
+ """Logging configuration (static, read-only).
36
+
37
+ Contains logging constants and path methods for WOMM logging system.
38
+ """
39
+
40
+ # ///////////////////////////////////////////////////////////
41
+ # LOG DIRECTORY AND FILE
42
+ # ///////////////////////////////////////////////////////////
43
+
44
+ LOG_FILE_NAME: ClassVar[str] = "womm.log"
45
+
46
+ # ///////////////////////////////////////////////////////////
47
+ # ROTATION / RETENTION / COMPRESSION
48
+ # ///////////////////////////////////////////////////////////
49
+
50
+ ROTATION: ClassVar[str] = "10 MB"
51
+ RETENTION: ClassVar[str] = "30 days"
52
+ COMPRESSION: ClassVar[str] = "zip"
53
+
54
+ # ///////////////////////////////////////////////////////////
55
+ # LOG LEVELS
56
+ # ///////////////////////////////////////////////////////////
57
+
58
+ DEFAULT_LEVEL: ClassVar[str] = "INFO"
59
+
60
+ # ///////////////////////////////////////////////////////////
61
+ # PATH METHODS
62
+ # ///////////////////////////////////////////////////////////
63
+
64
+ @classmethod
65
+ def get_log_dir(cls) -> Path:
66
+ """Return the default directory used for WOMM log files.
67
+
68
+ Logs are user data: they live under the data directory
69
+ (``~/.womm/logs``, honoring ``$WOMM_HOME``), never alongside the
70
+ installed code.
71
+
72
+ Returns:
73
+ Path to log directory
74
+ """
75
+ return logs_dir()
76
+
77
+ @classmethod
78
+ def get_log_file(cls) -> Path:
79
+ """Return the default log file path for WOMM.
80
+
81
+ By default this is ``~/.womm/logs/womm.log``.
82
+
83
+ Returns:
84
+ Path to log file
85
+ """
86
+ return cls.get_log_dir() / cls.LOG_FILE_NAME
87
+
88
+
89
+ __all__ = ["LoggingConfig"]